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 e4b076f700..24ad4b117c 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -5548,7 +5548,8 @@ ast_parameter_declarator::hir(exec_list *instructions,
      *    assigned into."
      */

Please update to comment above.

From the ARB_bindless_texture spec:

   "Samplers can be used as l-values, so can be assigned into and used
   as "out" and "inout" function parameters.

   ...

   Images can be used as l-values, so can be assigned into and used as
   "out" and "inout" function parameters."

With that:

Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>


     if ((var->data.mode == ir_var_function_inout || var->data.mode == 
ir_var_function_out)
-       && type->contains_opaque()) {
+       && (type->contains_atomic() ||
+           (!state->has_bindless() && type->contains_opaque()))) {
        _mesa_glsl_error(&loc, state, "out and inout parameters cannot "
                         "contain opaque variables");
        type = glsl_type::error_type;

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to