nir/glsl: Consider block interfaces as structs when it comes to size/align calculation

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472>
This commit is contained in:
Boris Brezillon
2020-06-30 12:03:00 +02:00
committed by Marge Bot
parent be68de81ab
commit 42f97f8ce3

View File

@@ -696,6 +696,7 @@ glsl_get_natural_size_align_bytes(const struct glsl_type *type,
break; break;
} }
case GLSL_TYPE_INTERFACE:
case GLSL_TYPE_STRUCT: case GLSL_TYPE_STRUCT:
*size = 0; *size = 0;
*align = 0; *align = 0;
@@ -719,7 +720,6 @@ glsl_get_natural_size_align_bytes(const struct glsl_type *type,
case GLSL_TYPE_SUBROUTINE: case GLSL_TYPE_SUBROUTINE:
case GLSL_TYPE_VOID: case GLSL_TYPE_VOID:
case GLSL_TYPE_ERROR: case GLSL_TYPE_ERROR:
case GLSL_TYPE_INTERFACE:
case GLSL_TYPE_FUNCTION: case GLSL_TYPE_FUNCTION:
unreachable("type does not have a natural size"); unreachable("type does not have a natural size");
} }