diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 148d080e9c3..bac2a1eeea6 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -401,6 +401,7 @@ anv_pipeline_compile(struct anv_pipeline *pipeline, * them the maximum possible number */ assert(nir->num_uniforms <= MAX_PUSH_CONSTANTS_SIZE); + nir->num_uniforms = MAX_PUSH_CONSTANTS_SIZE; prog_data->nr_params += MAX_PUSH_CONSTANTS_SIZE / sizeof(float); } @@ -433,10 +434,7 @@ anv_pipeline_compile(struct anv_pipeline *pipeline, if (pipeline->layout) anv_nir_apply_pipeline_layout(pipeline, nir, prog_data, map); - /* nir_lower_io will only handle the push constants; we need to set this - * to the full number of possible uniforms. - */ - nir->num_uniforms = prog_data->nr_params * 4; + assert(nir->num_uniforms == prog_data->nr_params * 4); return nir; } |