intel/fs: Add assert on the brw_STAGE_prog_data downcasts
Motivation is to detect earlier certain bugs that can occur when missing a check for the stage before using the downcast. Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7540>
This commit is contained in:
@@ -1283,6 +1283,8 @@ brw_compile_tes(const struct brw_compiler *compiler,
|
||||
const bool is_scalar = compiler->scalar_stage[MESA_SHADER_TESS_EVAL];
|
||||
const unsigned *assembly;
|
||||
|
||||
prog_data->base.base.stage = MESA_SHADER_TESS_EVAL;
|
||||
|
||||
nir->info.inputs_read = key->inputs_read;
|
||||
nir->info.patch_inputs_read = key->patch_inputs_read;
|
||||
|
||||
|
Reference in New Issue
Block a user