summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-04-19 21:57:02 +0200
committerSamuel Pitoiset <[email protected]>2017-05-06 16:40:19 +0200
commitd6810ea2867f95d737b63e391d19b8a281f4a381 (patch)
treefde3a53b8f202f99f890919bb98b47a0a1d4eb55 /src/compiler
parent8b4c48673a7dae9301703a5e89a6eaa100a0c2ed (diff)
glsl: do not count bindless samplers/images when linking uniforms
From section 2.14.8 of the ARB_bindless_texture spec: "(modify second paragraph, p. 126) ... against the MAX_COMBINED_TEXTURE_IMAGE_UNITS limit. Samplers accessed using texture handles (section 3.9.X) are not counted against this limit." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/link_uniforms.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp
index f6335b0f9eb..b34c8706a7f 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -339,11 +339,11 @@ private:
const unsigned values = type->component_slots();
if (type->contains_subroutine()) {
this->num_shader_subroutines += values;
- } else if (type->contains_sampler()) {
+ } else if (type->contains_sampler() && !current_var->data.bindless) {
/* Samplers (bound or bindless) are counted as two components as
* specified by ARB_bindless_texture. */
this->num_shader_samplers += values / 2;
- } else if (type->contains_image()) {
+ } else if (type->contains_image() && !current_var->data.bindless) {
/* Images (bound or bindless) are counted as two components as
* specified by ARB_bindless_texture. */
this->num_shader_images += values / 2;