mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 19:40:26 +01:00
nir/spirv: Add support for runtime arrays
This commit is contained in:
parent
55d16c090e
commit
48228c114e
1 changed files with 6 additions and 2 deletions
|
|
@ -507,10 +507,15 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
|
|||
break;
|
||||
}
|
||||
|
||||
case SpvOpTypeRuntimeArray:
|
||||
case SpvOpTypeArray: {
|
||||
struct vtn_type *array_element =
|
||||
vtn_value(b, w[2], vtn_value_type_type)->type;
|
||||
val->type->type = glsl_array_type(array_element->type, w[3]);
|
||||
|
||||
/* A length of 0 is used to denote unsized arrays */
|
||||
unsigned length = (opcode == SpvOpTypeArray) ? w[3] : 0;
|
||||
|
||||
val->type->type = glsl_array_type(array_element->type, length);
|
||||
val->type->array_element = array_element;
|
||||
val->type->stride = 0;
|
||||
break;
|
||||
|
|
@ -630,7 +635,6 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
|
|||
GLSL_TYPE_FLOAT);
|
||||
break;
|
||||
|
||||
case SpvOpTypeRuntimeArray:
|
||||
case SpvOpTypeOpaque:
|
||||
case SpvOpTypeEvent:
|
||||
case SpvOpTypeDeviceEvent:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue