[Mesa-dev] [RFC PATCH 10/65] mesa: store bindless samplers as PROGRAM_UNIFORM

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri May 19 16:52:15 UTC 2017


Old-style samplers (ie. bound samplers) are stored as
PROGRAM_SAMPLER, while bindless ones are PROGRAM_UNIFORM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/mesa/program/ir_to_mesa.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index a1a788e9e8..8ed249f8ca 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2462,7 +2462,7 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
    }
 
    gl_register_file file;
-   if (type->without_array()->is_sampler()) {
+   if (type->without_array()->is_sampler() && !var->data.bindless) {
       file = PROGRAM_SAMPLER;
    } else {
       file = PROGRAM_UNIFORM;
-- 
2.13.0



More information about the mesa-dev mailing list