From: Marek Olšák Date: Wed, 9 Nov 2016 12:04:09 +0000 (+0100) Subject: mesa: remove LowerShaderSharedVariables X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f500c36339ee092b7b95cd2658d71d46ae7f28a8;p=mesa.git mesa: remove LowerShaderSharedVariables always true for compute shaders Reviewed-by: Kenneth Graunke --- diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 693a50b20d5..81678af23f5 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 18145beb23a..9387d64b054 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 08f72e0e41e..5e9804036c0 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 8d3eee67654..ef926e47d74 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;