zink: add struct type support for ntv
also interface types since they're the same Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8142>
This commit is contained in:
committed by
Marge Bot
parent
26a955959e
commit
6d7ea0f020
@@ -246,6 +246,17 @@ get_glsl_type(struct ntv_context *ctx, const struct glsl_type *type)
|
||||
spirv_builder_emit_array_stride(&ctx->builder, ret, stride);
|
||||
return ret;
|
||||
}
|
||||
if (glsl_type_is_struct_or_ifc(type)) {
|
||||
SpvId types[glsl_get_length(type)];
|
||||
for (unsigned i = 0; i < glsl_get_length(type); i++)
|
||||
types[i] = get_glsl_type(ctx, glsl_get_struct_field(type, i));
|
||||
SpvId ret = spirv_builder_type_struct(&ctx->builder,
|
||||
types,
|
||||
glsl_get_length(type));
|
||||
for (unsigned i = 0; i < glsl_get_length(type); i++)
|
||||
spirv_builder_emit_member_offset(&ctx->builder, ret, i, glsl_get_struct_field_offset(type, i));
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (glsl_type_is_matrix(type))
|
||||
return spirv_builder_type_matrix(&ctx->builder,
|
||||
|
||||
Reference in New Issue
Block a user