OSDN Git Service

mesa/st: use EmitNoIndirectSampler if !ARB_gpu_shader5
authorTapani Pälli <tapani.palli@intel.com>
Mon, 29 Jun 2015 06:48:52 +0000 (09:48 +0300)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 1 Jul 2015 14:22:40 +0000 (15:22 +0100)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f17c8c287f3581fccb52714fbd4b2ea09a58e3d3)

src/mesa/state_tracker/st_context.c

index 9fd6cae..a49e321 100644 (file)
@@ -276,6 +276,11 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
    /* For vertex shaders, make sure not to emit saturate when SM 3.0 is not supported */
    ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoSat = !st->has_shader_model3;
 
+   if (!ctx->Extensions.ARB_gpu_shader5) {
+      for (i = 0; i < MESA_SHADER_STAGES; i++)
+         ctx->Const.ShaderCompilerOptions[i].EmitNoIndirectSampler = true;
+   }
+
    _mesa_compute_version(ctx);
 
    if (ctx->Version == 0) {