summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/link_uniforms.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/link_uniforms.cpp')
-rw-r--r--src/compiler/glsl/link_uniforms.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_uniforms.cpp b/src/compiler/glsl/link_uniforms.cpp
index c195e767e25..f6335b0f9eb 100644
--- a/src/compiler/glsl/link_uniforms.cpp
+++ b/src/compiler/glsl/link_uniforms.cpp
@@ -340,9 +340,13 @@ private:
if (type->contains_subroutine()) {
this->num_shader_subroutines += values;
} else if (type->contains_sampler()) {
- this->num_shader_samplers += values;
+ /* 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()) {
- this->num_shader_images += values;
+ /* Images (bound or bindless) are counted as two components as
+ * specified by ARB_bindless_texture. */
+ this->num_shader_images += values / 2;
/* As drivers are likely to represent image uniforms as
* scalar indices, count them against the limit of uniform