mesa: store bindless samplers as PROGRAM_UNIFORM
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Apr 2017 13:54:32 +0000 (15:54 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 14 Jun 2017 08:04:36 +0000 (10:04 +0200)
Old-style samplers (ie. bound samplers) are stored as
PROGRAM_SAMPLER, while bindless ones are PROGRAM_UNIFORM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/program/ir_to_mesa.cpp

index 825f03d590eee5f7cfd8a8cf2a964170816761b8..ab39406bd211b3ce50033bd78f099dde31947e3d 100644 (file)
@@ -2452,7 +2452,7 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
       return;
 
    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;