aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_program.c
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2018-09-18 14:23:58 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:09 -0800
commitea416d0b5dc6907045d55bc1074d4908a04d2ad3 (patch)
tree0b6efb3329dd0e0efdf09c853473df6bcaa10429 /src/gallium/drivers/iris/iris_program.c
parentc7cfa4000fcef12ef0e5a2394d8780ae4112a800 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/iris/iris_program.c')
-rw-r--r--src/gallium/drivers/iris/iris_program.c3
1 files changed, 2 insertions, 1 deletions
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);
}
/**