From f500c36339ee092b7b95cd2658d71d46ae7f28a8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 9 Nov 2016 13:04:09 +0100 Subject: [PATCH] mesa: remove LowerShaderSharedVariables always true for compute shaders Reviewed-by: Kenneth Graunke --- src/compiler/glsl/linker.cpp | 2 +- src/mesa/drivers/dri/i965/brw_compiler.c | 3 --- src/mesa/main/mtypes.h | 3 --- src/mesa/state_tracker/st_extensions.c | 3 --- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 693a50b..81678af 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4678,7 +4678,7 @@ link_varyings_and_uniforms(unsigned first, unsigned last, lower_ubo_reference(prog->_LinkedShaders[i], options->ClampBlockIndicesToArrayBounds); - if (options->LowerShaderSharedVariables) + if (i == MESA_SHADER_COMPUTE) lower_shared_reference(prog->_LinkedShaders[i], &prog->Comp.SharedSize); diff --git a/src/mesa/drivers/dri/i965/brw_compiler.c b/src/mesa/drivers/dri/i965/brw_compiler.c index 18145be..9387d64 100644 --- a/src/mesa/drivers/dri/i965/brw_compiler.c +++ b/src/mesa/drivers/dri/i965/brw_compiler.c @@ -156,8 +156,5 @@ brw_compiler_create(void *mem_ctx, const struct gen_device_info *devinfo) if (compiler->scalar_stage[MESA_SHADER_GEOMETRY]) compiler->glsl_compiler_options[MESA_SHADER_GEOMETRY].EmitNoIndirectInput = false; - compiler->glsl_compiler_options[MESA_SHADER_COMPUTE] - .LowerShaderSharedVariables = true; - return compiler; } diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 08f72e0..5e98040 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2938,9 +2938,6 @@ struct gl_shader_compiler_options /** Clamp UBO and SSBO block indices so they don't go out-of-bounds. */ GLboolean ClampBlockIndicesToArrayBounds; - GLboolean LowerShaderSharedVariables; /**< Lower compute shader shared - * variable access to intrinsics. */ - const struct nir_shader_compiler_options *NirOptions; }; diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 8d3eee6..ef926e4 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -308,9 +308,6 @@ void st_init_limits(struct pipe_screen *screen, options->LowerCombinedClipCullDistance = true; options->LowerBufferInterfaceBlocks = true; - - if (sh == PIPE_SHADER_COMPUTE) - options->LowerShaderSharedVariables = true; } c->LowerTessLevel = true; -- 2.7.4