Mesa (master): st/mesa: Set EmitNoIndirectSampler if GLSLVersion < 400.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 27 06:03:31 UTC 2019


Module: Mesa
Branch: master
Commit: acadeaff6a2e6e10e32e78bb745fbaf277544a6f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=acadeaff6a2e6e10e32e78bb745fbaf277544a6f

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Jun 25 21:00:46 2019 -0700

st/mesa: Set EmitNoIndirectSampler if GLSLVersion < 400.

This patch changes the code which sets EmitNoIndirectSampler to check
the core profile GLSL version, rather than the ARB_gpu_shader5 extension
enable.  st/mesa exposes ARB_gpu_shader5 if GLSLVersion (in core
profiles) or GLSLVersionCompat (in compat profiles) >= 400.

The Intel drivers do not currently expose ARB_gpu_shader5 in compat
profiles.  But the backend can absolutely handle indirect samplers.
Looking at the core profile version number should be a good indication
of what the driver supports.

Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/mesa/state_tracker/st_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index e60962388cb..fbf44ef352c 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -689,7 +689,7 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
    ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoSat =
       !st->has_shader_model3;
 
-   if (!ctx->Extensions.ARB_gpu_shader5) {
+   if (ctx->Const.GLSLVersion < 400) {
       for (i = 0; i < MESA_SHADER_STAGES; i++)
          ctx->Const.ShaderCompilerOptions[i].EmitNoIndirectSampler = true;
    }




More information about the mesa-commit mailing list