diff options
author | Jason Ekstrand <[email protected]> | 2017-08-21 17:41:28 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-08-24 16:34:29 -0700 |
commit | 95f533d922d3e628f56eec50c5680fca6f2cbb5e (patch) | |
tree | 5d4ad32fbf8493e4ac71b0fb62698ace431b710e /src/intel/vulkan/anv_pipeline.c | |
parent | 725741f10d5e8889115c5f25b7a1fafb7099d97c (diff) |
anv,i965: Move CS shared lowering into anv
Right now, OpenGL uses the GLSL lowering for shared variables and anv
uses NIR to lower them. For a long time, we've done this weird thing
where we do the NIR lowering unconditionally and then add the SLM sizes
from the two together. This works because one of them will always be 0
but it's a bit sketchy. Let's just move the NIR-based lowering into
anv_pipeline and get rid of the sketch.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 6ae682fd8d0..279d76561a1 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -381,6 +381,11 @@ anv_pipeline_compile(struct anv_pipeline *pipeline, if (stage != MESA_SHADER_COMPUTE) NIR_PASS_V(nir, anv_nir_lower_multiview, pipeline->subpass->view_mask); + if (stage == MESA_SHADER_COMPUTE) { + NIR_PASS_V(nir, brw_nir_lower_cs_shared); + prog_data->total_shared = nir->num_shared; + } + nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); /* Figure out the number of parameters */ |