aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir_optimization.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-05-18 20:28:07 -0700
committerJason Ekstrand <[email protected]>2016-05-23 19:12:34 -0700
commit27b9481d03959a7bee6d906c62b4a519b6b1dc38 (patch)
tree4578aca510eef5c8e2e27a00f83d7791377e3dd4 /src/compiler/glsl/ir_optimization.h
parentac242aac3d2c38fd6843d85363a455271b1348c2 (diff)
glsl: Add an option to clamp block indices when lowering UBO/SSBOs
This prevents array overflow when the block is actually an array of UBOs or SSBOs. On some hardware such as i965, such overflows can cause GPU hangs. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir_optimization.h')
-rw-r--r--src/compiler/glsl/ir_optimization.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h
index 71b10e4d643..ba14e34b71e 100644
--- a/src/compiler/glsl/ir_optimization.h
+++ b/src/compiler/glsl/ir_optimization.h
@@ -123,7 +123,7 @@ bool lower_clip_cull_distance(struct gl_shader_program *prog, gl_shader *shader)
void lower_output_reads(unsigned stage, exec_list *instructions);
bool lower_packing_builtins(exec_list *instructions, int op_mask);
void lower_shared_reference(struct gl_shader *shader, unsigned *shared_size);
-void lower_ubo_reference(struct gl_shader *shader);
+void lower_ubo_reference(struct gl_shader *shader, bool clamp_block_indices);
void lower_packed_varyings(void *mem_ctx,
unsigned locations_used, ir_variable_mode mode,
unsigned gs_input_vertices, gl_shader *shader,