[Mesa-dev] [PATCH 13/31] mesa: make _mesa_set_varying_vp_inputs a no-op in GL core profile

Marek Olšák maraeo at gmail.com
Mon Jun 12 16:55:38 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

just don't set _NEW_VARYING_VP_INPUTS.
---
 src/mesa/main/state.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index ebdc106..2b4d8d4 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -399,20 +399,24 @@ _mesa_update_state( struct gl_context *ctx )
  * texgen, etc.
  * 
  * The generated fragment program should then only declare inputs that
  * may vary or otherwise differ from the ctx->Current values.
  * Otherwise, the fp should track them as state values instead.
  */
 void
 _mesa_set_varying_vp_inputs( struct gl_context *ctx,
                              GLbitfield64 varying_inputs )
 {
+   if (ctx->API != API_OPENGL_COMPAT &&
+       ctx->API != API_OPENGLES)
+      return;
+
    if (ctx->varying_vp_inputs != varying_inputs) {
       ctx->varying_vp_inputs = varying_inputs;
 
       /* Only the fixed-func generated programs need to use the flag
        * and the fixed-func fragment program uses it only if there is also
        * a fixed-func vertex program, so this only depends on the latter.
        *
        * It's okay to check the VP pointer here, because this is called after
        * _mesa_update_state in the vbo module. */
       if (ctx->VertexProgram._TnlProgram ||
-- 
2.7.4



More information about the mesa-dev mailing list