diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 430efb3021d..9d14d1f2139 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -190,8 +190,8 @@ fs_visitor::nir_setup_uniforms(nir_shader *shader) nir_setup_builtin_uniform(var); else nir_setup_uniform(var); - - param_size[var->data.driver_location] = type_size_scalar(var->type); + if(type_size_scalar(var->type) > 0) + param_size[var->data.driver_location] = type_size_scalar(var->type); } } else { /* prog_to_nir only creates a single giant uniform variable so we can @@ -202,7 +202,8 @@ fs_visitor::nir_setup_uniforms(nir_shader *shader) &prog->Parameters->ParameterValues[p][i]; } } - param_size[0] = prog->Parameters->NumParameters * 4; + if(prog->Parameters->NumParameters > 0) + param_size[0] = prog->Parameters->NumParameters * 4; } } |