glsl: set prev/next_stage according to the new definition
Keep MESA_SHADER_NONE if there is no previous/next shader. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35315>
This commit is contained in:
@@ -1296,18 +1296,16 @@ preprocess_shader(const struct gl_constants *consts,
|
||||
}
|
||||
|
||||
/* Set the next shader stage hint for VS and TES. */
|
||||
if (!nir->info.separate_shader &&
|
||||
(nir->info.stage == MESA_SHADER_VERTEX ||
|
||||
nir->info.stage == MESA_SHADER_TESS_EVAL)) {
|
||||
if (!nir->info.separate_shader) {
|
||||
unsigned prev_stages = shader_program->data->linked_stages &
|
||||
BITFIELD_MASK(prog->info.stage);
|
||||
unsigned next_stages = shader_program->data->linked_stages &
|
||||
~BITFIELD_MASK(prog->info.stage + 1);
|
||||
|
||||
unsigned prev_stages = (1 << (prog->info.stage + 1)) - 1;
|
||||
unsigned stages_mask =
|
||||
~prev_stages & shader_program->data->linked_stages;
|
||||
|
||||
nir->info.next_stage = stages_mask ?
|
||||
(gl_shader_stage) u_bit_scan(&stages_mask) : MESA_SHADER_FRAGMENT;
|
||||
} else {
|
||||
nir->info.next_stage = MESA_SHADER_FRAGMENT;
|
||||
if (prev_stages)
|
||||
nir->info.prev_stage = util_last_bit(prev_stages) - 1;
|
||||
if (next_stages)
|
||||
nir->info.next_stage = u_bit_scan(&next_stages);
|
||||
}
|
||||
|
||||
prog->skip_pointsize_xfb = !(nir->info.outputs_written & VARYING_BIT_PSIZ);
|
||||
|
||||
@@ -1973,7 +1973,7 @@ agx_create_shader_state(struct pipe_context *pctx,
|
||||
};
|
||||
agx_get_shader_variant(agx_screen(pctx->screen), pctx, so, &key);
|
||||
|
||||
if (!next_stage) {
|
||||
if (next_stage == MESA_SHADER_NONE) {
|
||||
key.vs.hw = true;
|
||||
agx_get_shader_variant(agx_screen(pctx->screen), pctx, so, &key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user