From ea416d0b5dc6907045d55bc1074d4908a04d2ad3 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Tue, 18 Sep 2018 14:23:58 -0700 Subject: iris/program: Don't try to push ubo ranges for compute We only can push constants for compute shaders from one range. Gallium glsl-to-nir (src/mesa/state_tracker/st_glsl_to_nir.cpp) lowers all uniform accesses to a ubo. Unfortunately we also load the subgroup-id as a uniform in the compiler. Since we use the 1 push range for this subgroup-id, we then lose the ability to actually push the ubo with all the normal user uniform values. In other words, there is lots of room for performance improvement, but at least retrieving the uniforms as pull-constants is functional for now. Signed-off-by: Jordan Justen --- src/gallium/drivers/iris/iris_program.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index a62b2d0fb42..4aba8d0bfe3 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -429,7 +429,8 @@ iris_setup_uniforms(const struct brw_compiler *compiler, } // XXX: vs clip planes? - brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); + if (nir->info.stage != MESA_SHADER_COMPUTE) + brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); } /** -- cgit v1.2.3