[Mesa-dev] [PATCH] mesa: don't set _NEW_PROGRAM_CONSTANTS for non-bindless opaque uniforms

Timothy Arceri tarceri at itsqueeze.com
Thu Jun 22 22:44:25 UTC 2017


v2: rebase on new _mesa_flush_vertices_for_uniforms() helper
---
 src/mesa/main/uniform_query.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 5eb0efc..5fe63e0 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -999,20 +999,26 @@ validate_uniform(GLint location, GLsizei count, const GLvoid *values,
       }
    }
 
    return uni;
 }
 
 void
 _mesa_flush_vertices_for_uniforms(struct gl_context *ctx,
                                   const struct gl_uniform_storage *uni)
 {
+
+   if (!uni->is_bindless && uni->type->contains_opaque()) {
+      FLUSH_VERTICES(ctx, 0);
+      return;
+   }
+
    uint64_t new_driver_state = 0;
    unsigned mask = uni->active_shader_mask;
 
    while (mask) {
       unsigned index = u_bit_scan(&mask);
 
       assert(index < MESA_SHADER_STAGES);
       new_driver_state |= ctx->DriverFlags.NewShaderConstants[index];
    }
 
-- 
2.9.4



More information about the mesa-dev mailing list