Module: Mesa Branch: master Commit: a1853eaea7fa5caf59b52567cc49f964ce5293ec URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1853eaea7fa5caf59b52567cc49f964ce5293ec
Author: Timothy Arceri <[email protected]> Date: Tue Aug 19 13:56:42 2014 -1000 glsl: Use the without_array predicate in some more places Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Timothy Arceri <[email protected]> --- src/glsl/link_uniform_initializers.cpp | 3 +-- src/mesa/program/ir_to_mesa.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/glsl/link_uniform_initializers.cpp b/src/glsl/link_uniform_initializers.cpp index a745c7c..f6a60bc 100644 --- a/src/glsl/link_uniform_initializers.cpp +++ b/src/glsl/link_uniform_initializers.cpp @@ -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(); diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 011ffed..e5844c3 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -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; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
