Skip to content

MSL: fix robust struct zero initialization - #1

Open
VladimirKras wants to merge 1 commit into
utmapp:geometry-shadersfrom
VladimirKras:fix-msl-robust-struct-zero
Open

MSL: fix robust struct zero initialization#1
VladimirKras wants to merge 1 commit into
utmapp:geometry-shadersfrom
VladimirKras:fix-msl-robust-struct-zero

Conversation

@VladimirKras

Copy link
Copy Markdown

For struct loads, this changes the --msl-robust-buffer-access2 out-of-bounds fallback from Type(0) to Type{}. Metal rejects the former because MSL structs do not have a scalar constructor.

Scalar and vector construction remains unchanged. This also adds a regression shader with normal and optimized MSL references.

Testing:

  • The new regression passes in normal and optimized modes using the repository's fixed glslang and SPIRV-Tools revisions.
  • Existing scalar/vector robust-access output remains byte-identical from MSL 1.0 through 4.0; the struct form passes Metal runtime validation from MSL 1.1 through 4.0.
  • The unpatched failure was reproduced, and the patched Vello 0.10 shell was visually verified end-to-end through guest Venus, MoltenVK, and Metal.

I have read the AI contribution guidelines and have followed them to the best of my ability.

Assisted-by: OpenAI Codex:gpt-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant