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 <jordan.l.justen@intel.com>
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user