mesa: remove LowerShaderSharedVariables
authorMarek Olšák <marek.olsak@amd.com>
Wed, 9 Nov 2016 12:04:09 +0000 (13:04 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 10 Nov 2016 17:34:55 +0000 (18:34 +0100)
always true for compute shaders

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/linker.cpp
src/mesa/drivers/dri/i965/brw_compiler.c
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_extensions.c

index 693a50b20d569ee1ab01e3a29fb400c6b239e9b5..81678af23f5f6c4b23061067705e133ae660b256 100644 (file)
@@ -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);
 
index 18145beb23aea0f78a8f94134ecb72558dcb954a..9387d64b05432514d674a9a2fcf720663ef4150f 100644 (file)
@@ -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;
 }
index 08f72e0e41eec36b9aa7b2efcb9086a3dba794b2..5e9804036c098e44c9c36e6476bebb605211ee99 100644 (file)
@@ -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;
 };
 
index 8d3eee67654090048923970c01c0e6719ad403f8..ef926e47d741b920a8b32996acbce13555d7d9c1 100644 (file)
@@ -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;