-
Notifications
You must be signed in to change notification settings - Fork 664
spirv-fuzz: FuzzerPassAddCompositeTypes doesn't support BuiltIn decoration #3676
Copy link
Copy link
Closed
Labels
component:fuzzerRelates to the spirv-fuzz toolRelates to the spirv-fuzz tool
Description
According to the SPIR-V spec:
A BuiltIn Decoration can only be applied as follows:
- When applied to a structure-type member, all members of that structure type must also be decorated with BuiltIn. (No allowed mixing of built-in variables and non-built-in variables within a single structure.)
- When applied to a structure-type member, that structure type cannot be contained as a member of another structure type.
- There is at most one object per Storage Class that can contain a structure type containing members decorated with BuiltIn, consumed per entry-point.
Thus, we can't have a struct type, whose element is a struct that has its element decorated with BuiltIn. Turns out that fuzzerutil::MaybeGetStructType returns 0 if the struct has BuiltIn components.
However, FuzzerPassAddCompositeTypes doesn't use that function, which causes validation errors for the following shader
_scraped_shader_4.vert.spv.txt
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component:fuzzerRelates to the spirv-fuzz toolRelates to the spirv-fuzz tool