On 24/04/17 20:35, Samuel Pitoiset wrote:
Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  src/compiler/glsl/ast_to_hir.cpp | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index f90ae3d09a..e4d8bae2f5 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -4293,7 +4293,8 @@ process_initializer(ir_variable *var, ast_declaration 
*decl,
      *     OpenGL API; they cannot be declared with an initializer in a
      *     shader."
      */
-   if (var->type->contains_opaque()) {
+   if (var->type->contains_atomic() ||
+       (!state->has_bindless() && var->type->contains_opaque())) {
        _mesa_glsl_error(&initializer_loc, state,
                         "cannot initialize opaque variable %s",
                         var->name);

Please add spec quote to the comment and update the error message to ? "atomic" : "opaque" as suggested elsewhere.

With that:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to