mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
spirv: Add a guard for OpTypeForwardPointer storage classes
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6479>
This commit is contained in:
parent
aabe37b969
commit
2bef02696d
1 changed files with 6 additions and 0 deletions
|
|
@ -1518,6 +1518,12 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
|
|||
|
||||
SpvStorageClass storage_class = w[2];
|
||||
|
||||
vtn_fail_if(opcode == SpvOpTypeForwardPointer &&
|
||||
b->shader->info.stage != MESA_SHADER_KERNEL &&
|
||||
storage_class != SpvStorageClassPhysicalStorageBuffer,
|
||||
"OpTypeForwardPointer is only allowed in Vulkan with "
|
||||
"the PhysicalStorageBuffer storage class");
|
||||
|
||||
if (val->value_type == vtn_value_type_invalid) {
|
||||
val->value_type = vtn_value_type_type;
|
||||
val->type = rzalloc(b, struct vtn_type);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue