summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_pipeline.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-01-10 01:47:14 -0600
committerJason Ekstrand <[email protected]>2019-01-10 20:34:00 +0000
commit8ea8727a87b7fe0ee89aa8fcb583b126b57ed3f9 (patch)
tree3260965c6a05fa2c68e476a41cb5c65ef548c457 /src/intel/vulkan/anv_pipeline.c
parent031e94dc72bda818e440bb66a8caf52e3d669748 (diff)
anv/pipeline: Constant fold after apply_pipeline_layout
Thanks to the new NIR load_descriptor intrinsic added by the UBO/SSBO lowering series, we weren't getting UBO pushing because the UBO range detection pass couldn't see the constants it needed. This fixes that problem with a quick round of constant folding. Because we're folding we no longer need to go out of our way to generate constants when we lower the vulkan_resource_index intrinsic and we can make it a bit simpler. Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r--src/intel/vulkan/anv_pipeline.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index d1efaaf060b..b99981d7a5c 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -544,6 +544,7 @@ anv_pipeline_lower_nir(struct anv_pipeline *pipeline,
pipeline->device->robust_buffer_access,
layout, nir, prog_data,
&stage->bind_map);
+ NIR_PASS_V(nir, nir_opt_constant_folding);
}
if (nir->info.stage != MESA_SHADER_COMPUTE)