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)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 30 Jun 2015 08:12:44 +0000 (11:12 +0300)
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>
src/mesa/state_tracker/st_context.c

index ed9ed0f1b6c6b1e928eb74657ff2b197543d65a2..62a0fbee3bb92f965a878060014eac9fbfe65f43 100644 (file)
@@ -287,6 +287,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) {