glsl: Use the without_array predicate in some more places

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
This commit is contained in:
Timothy Arceri
2014-08-19 13:56:42 -10:00
committed by Matt Turner
parent e6a53533b7
commit a1853eaea7
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -259,8 +259,7 @@ link_set_uniform_initializers(struct gl_shader_program *prog,
if (var->data.explicit_binding) {
const glsl_type *const type = var->type;
if (type->is_sampler()
|| (type->is_array() && type->fields.array->is_sampler())) {
if (type->without_array()->is_sampler()) {
linker::set_sampler_binding(prog, var->name, var->data.binding);
} else if (var->is_in_uniform_block()) {
const glsl_type *const iface_type = var->get_interface_type();
+1 -2
View File
@@ -2432,8 +2432,7 @@ add_uniform_to_shader::visit_field(const glsl_type *type, const char *name,
}
gl_register_file file;
if (type->is_sampler() ||
(type->is_array() && type->fields.array->is_sampler())) {
if (type->without_array()->is_sampler()) {
file = PROGRAM_SAMPLER;
} else {
file = PROGRAM_UNIFORM;