diff options
author | Timothy Arceri <t_arceri@yahoo.com.au> | 2015-09-23 11:12:57 +1000 |
---|---|---|
committer | Timothy Arceri <t_arceri@yahoo.com.au> | 2015-09-24 10:07:42 +1000 |
commit | 827d7948340f4cbc7de2d02971e4f36fbd52f7a8 (patch) | |
tree | 734be032ce906a26d36cfd48f301e38830b1a957 /src/glsl/opt_dead_code.cpp | |
parent | 71e187430cdd1d82972554d7f9e994a41847bea1 (diff) | |
download | external_mesa3d-827d7948340f4cbc7de2d02971e4f36fbd52f7a8.zip external_mesa3d-827d7948340f4cbc7de2d02971e4f36fbd52f7a8.tar.gz external_mesa3d-827d7948340f4cbc7de2d02971e4f36fbd52f7a8.tar.bz2 |
glsl: correctly detect inactive UBO arrays
Previously the code was trying to get the packing type from the array not the
interface.
Cc: Ian Romanick <ian.d.romanick@intel.com>
Cc: Antia Puentes <apuentes@igalia.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Diffstat (limited to 'src/glsl/opt_dead_code.cpp')
-rw-r--r-- | src/glsl/opt_dead_code.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp index e4bf874..2cb7f41 100644 --- a/src/glsl/opt_dead_code.cpp +++ b/src/glsl/opt_dead_code.cpp @@ -119,11 +119,8 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned) * layouts, do not eliminate it. */ if (entry->var->is_in_buffer_block()) { - const glsl_type *const block_type = - entry->var->is_interface_instance() - ? entry->var->type : entry->var->get_interface_type(); - - if (block_type->interface_packing != GLSL_INTERFACE_PACKING_PACKED) + if (entry->var->get_interface_type()->interface_packing != + GLSL_INTERFACE_PACKING_PACKED) continue; } |