On 24/04/17 20:35, Samuel Pitoiset wrote:
For the explicit conversions.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  src/compiler/glsl/ast_function.cpp | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_function.cpp 
b/src/compiler/glsl/ast_function.cpp
index 6ec5eda043..9aac9c51e4 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -1969,7 +1969,8 @@ ast_function_expression::hir(exec_list *instructions,
/* Constructors for opaque types are illegal.
         */
-      if (constructor_type->contains_opaque()) {
+      if (constructor_type->contains_atomic() ||
+          (!state->has_bindless() && constructor_type->contains_opaque())) {
           _mesa_glsl_error(& loc, state, "cannot construct opaque type `%s'",
                            constructor_type->name);
           return ir_rvalue::error_value(ctx);

Again please update the comment and make the error message conditionally report atmmoc or opaque. 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