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:
Caio Marcelo de Oliveira Filho
2020-11-10 13:11:31 -09:00
parent 671c850310
commit b3daf341d4
6 changed files with 41 additions and 17 deletions

View File

@@ -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;