OSDN Git Service

i965: allow sampler indirects on all gens
authorTimothy Arceri <timothy.arceri@collabora.com>
Fri, 16 Sep 2016 12:36:30 +0000 (22:36 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 22 Dec 2016 23:15:35 +0000 (10:15 +1100)
Without this we will regress the max-samplers piglit test on Gen6
and lower when loop unrolling is done in NIR. There is a check
in the GLSL IR linker that errors when it finds indirects and
EmitNoIndirectSampler is set.

As far as I can tell there is no reason for not enabling this for
all gens regardless of whether they fully support ARB_gpu_shader5
or not.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_compiler.c

index 1aa72bc..6a73719 100644 (file)
@@ -133,10 +133,6 @@ brw_compiler_create(void *mem_ctx, const struct gen_device_info *devinfo)
       compiler->glsl_compiler_options[i].EmitNoIndirectTemp = is_scalar;
       compiler->glsl_compiler_options[i].OptimizeForAOS = !is_scalar;
 
-      /* !ARB_gpu_shader5 */
-      if (devinfo->gen < 7)
-         compiler->glsl_compiler_options[i].EmitNoIndirectSampler = true;
-
       if (is_scalar) {
          compiler->glsl_compiler_options[i].NirOptions = &scalar_nir_options;
       } else {