mesa,radeonsi: add comments about vertex and mesh pipeline shader states
They are exclusive in mesa state tracker currently, so add some comments and assertions for developers. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37505>
This commit is contained in:
@@ -2333,6 +2333,14 @@ static void si_draw(struct pipe_context *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure that the MS is not set when vertex pipeline is used.
|
||||
*
|
||||
* This is ensured by mesa state tracker to always update all graphics shader
|
||||
* stages in any pipeline's draw call, and set the other pipeline's shader stages
|
||||
* to be NULL when internal draw operations.
|
||||
*/
|
||||
assert(!sctx->ms_shader_state.cso);
|
||||
|
||||
if (unlikely(sctx->dirty_shaders_mask)) {
|
||||
if (unlikely(!(si_update_shaders<GFX_VERSION, HAS_TESS, HAS_GS, NGG>(sctx)))) {
|
||||
DRAW_CLEANUP;
|
||||
|
||||
@@ -134,6 +134,13 @@ typedef BITSET_DECLARE(st_state_bitset, ST_NUM_ATOMS);
|
||||
ST_SET_STATE4(bitset, ST_NEW_##shader##_UBOS, ST_NEW_##shader##_ATOMICS, \
|
||||
ST_NEW_##shader##_SSBOS, ST_NEW_##shader##_IMAGES);
|
||||
|
||||
/* This is in fact states for vertex pipeline (as opposite to mesh pipeline).
|
||||
* But we still include mesh shader states to ensure mesh shader is not set
|
||||
* when using vertex pipeline (so does the mesh pipeline) to simplify driver
|
||||
* implementation.
|
||||
*
|
||||
* TODO: remove mesh shader states from this macro once driver is ready.
|
||||
*/
|
||||
#define ST_PIPELINE_RENDER_STATE_MASK(bitset) \
|
||||
st_state_bitset bitset = {0}; \
|
||||
ST_SHADER_STATE_MASK(bitset, CS); \
|
||||
|
||||
Reference in New Issue
Block a user