summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-04-19 18:52:54 +0200
committerSamuel Pitoiset <[email protected]>2017-05-06 16:40:19 +0200
commit42a2fe25f4552805c253d96c121f1e4dd436eb4a (patch)
treee094c2409fc4afd66d0a4418d06f371299bf7059 /src/compiler
parentece1c04e8e552813040d603f72637291991465c4 (diff)
glsl: relax bindless sampler arrays indexing
From section 4.1.7 of the ARB_bindless_texture spec: "Samplers aggregated into arrays within a shader (using square brackets []) can be indexed with arbitrary integer expressions." v3: - update spec comment formatting Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/ast_array_index.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/glsl/ast_array_index.cpp b/src/compiler/glsl/ast_array_index.cpp
index dfa44b703d4..f6b7a64a281 100644
--- a/src/compiler/glsl/ast_array_index.cpp
+++ b/src/compiler/glsl/ast_array_index.cpp
@@ -299,12 +299,18 @@ _mesa_ast_array_index_to_hir(void *mem_ctx,
* values must not diverge between shader invocations run together. If the
* values *do* diverge, then the behavior of the operation requiring a
* dynamically uniform expression is undefined.
+ *
+ * From section 4.1.7 of the ARB_bindless_texture spec:
+ *
+ * "Samplers aggregated into arrays within a shader (using square
+ * brackets []) can be indexed with arbitrary integer expressions."
*/
if (array->type->without_array()->is_sampler()) {
if (!state->is_version(400, 320) &&
!state->ARB_gpu_shader5_enable &&
!state->EXT_gpu_shader5_enable &&
- !state->OES_gpu_shader5_enable) {
+ !state->OES_gpu_shader5_enable &&
+ !state->has_bindless()) {
if (state->is_version(130, 300))
_mesa_glsl_error(&loc, state,
"sampler arrays indexed with non-constant "