diff options
author | Jason Ekstrand <[email protected]> | 2016-05-18 20:28:07 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-05-23 19:12:34 -0700 |
commit | 27b9481d03959a7bee6d906c62b4a519b6b1dc38 (patch) | |
tree | 4578aca510eef5c8e2e27a00f83d7791377e3dd4 /src/mesa/drivers | |
parent | ac242aac3d2c38fd6843d85363a455271b1348c2 (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/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_compiler.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.c b/src/mesa/drivers/dri/i965/brw_compiler.c index 82131db9a8f..3f175892286 100644 --- a/src/mesa/drivers/dri/i965/brw_compiler.c +++ b/src/mesa/drivers/dri/i965/brw_compiler.c @@ -188,6 +188,7 @@ brw_compiler_create(void *mem_ctx, const struct brw_device_info *devinfo) } compiler->glsl_compiler_options[i].LowerBufferInterfaceBlocks = true; + compiler->glsl_compiler_options[i].ClampBlockIndicesToArrayBounds = true; } compiler->glsl_compiler_options[MESA_SHADER_TESS_CTRL].EmitNoIndirectInput = false; |