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>
if (!var->is_in_buffer_block())
return visit_continue;
- const glsl_type *const block_type = var->is_interface_instance()
- ? var->type : var->get_interface_type();
-
/* Section 2.11.6 (Uniform Variables) of the OpenGL ES 3.0.3 spec says:
*
* "All members of a named uniform block declared with a shared or
* also considered active, even if no member of the block is
* referenced."
*/
- if (block_type->interface_packing == GLSL_INTERFACE_PACKING_PACKED)
+ if (var->get_interface_type()->interface_packing ==
+ GLSL_INTERFACE_PACKING_PACKED)
return visit_continue;
/* Process the block. Bail if there was an error.
* 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;
}