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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user