[Mesa-dev] [RFC PATCH 18/26] glsl: allow bindless samplers/images as vertex shader inputs
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Apr 11 16:48:29 UTC 2017
The ARB_bindless_texture spec says:
"Modify Section 4.3.4, Inputs, p. 34"
"(modify third paragraph of the section to allow sampler and
image types) ... Vertex shader inputs can only be float,
single-precision floating-point scalars, single-precision
floating-point vectors, matrices, signed and unsigned integers
and integer vectors, sampler and image types."
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/compiler/glsl/ast_to_hir.cpp | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 3392c7c4d3..9b8dfbcf47 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -5091,6 +5091,16 @@ ast_declarator_list::hir(exec_list *instructions,
* vectors, matrices, signed and unsigned integers and integer
* vectors. Vertex shader inputs cannot be arrays or
* structures."
+ *
+ * The ARB_bindless_texture spec says:
+ *
+ * "Modify Section 4.3.4, Inputs, p. 34"
+ *
+ * "(modify third paragraph of the section to allow sampler and
+ * image types) ... Vertex shader inputs can only be float,
+ * single-precision floating-point scalars, single-precision
+ * floating-point vectors, matrices, signed and unsigned
+ * integers and integer vectors, sampler and image types."
*/
const glsl_type *check_type = var->type->without_array();
@@ -5107,6 +5117,14 @@ ast_declarator_list::hir(exec_list *instructions,
case GLSL_TYPE_DOUBLE:
if (check_type->base_type == GLSL_TYPE_DOUBLE && (state->is_version(410, 0) || state->ARB_vertex_attrib_64bit_enable))
break;
+ case GLSL_TYPE_BINDLESS_SAMPLER:
+ if (check_type->base_type == GLSL_TYPE_BINDLESS_SAMPLER &&
+ state->has_bindless())
+ break;
+ case GLSL_TYPE_BINDLESS_IMAGE:
+ if (check_type->base_type == GLSL_TYPE_BINDLESS_IMAGE &&
+ state->has_bindless())
+ break;
/* FALLTHROUGH */
default:
_mesa_glsl_error(& loc, state,
--
2.12.2
More information about the mesa-dev
mailing list