[Mesa-dev] [PATCH v2 08/31] glsl: allow bindless samplers/images as out and inout parameters

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Apr 24 10:35:39 UTC 2017


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at 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."
     */
    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;
-- 
2.12.2



More information about the mesa-dev mailing list