[Mesa-dev] [PATCH v2 09/31] glsl: allow bindless samplers/images as function return

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Apr 24 10:35:40 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 24ad4b117c..b100ded836 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -5723,7 +5723,8 @@ ast_function::hir(exec_list *instructions,
     *    "[Opaque types] can only be declared as function parameters
     *     or uniform-qualified variables."
     */
-   if (return_type->contains_opaque()) {
+   if (return_type->contains_atomic() ||
+       (!state->has_bindless() && return_type->contains_opaque())) {
       YYLTYPE loc = this->get_location();
       _mesa_glsl_error(&loc, state,
                        "function `%s' return type can't contain an opaque type",
-- 
2.12.2



More information about the mesa-dev mailing list