Skip to content

ArrayStride decoration check too strict #2863

@asuonpaa

Description

@asuonpaa

The SPIR-V code below gets a validation error saying %outputArray is missing an ArrayStride decoration.

OpDecorate %struct Block
%struct = OpTypeStruct %matrix %v4f32 %f32 %f32 %f32 %f32
%numElements = OpConstant %u32 8
%outputArray = OpTypeArray %struct %numElements
%Output = OpTypeStruct %outputArray
%_ptr_Output = OpTypePointer StorageBuffer %Output

But SPIR-V spec says

Each array type must have an ArrayStride decoration, unless it is an array that contains a structure decorated with Block or BufferBlock, in which case it must not have an ArrayStride decoration.

I suppose this exception is not handled correctly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions