Skip to content

Emit layout blocks for stage interfaces in Vulkan#2274

Merged
jstone-lucasfilm merged 9 commits intoAcademySoftwareFoundation:mainfrom
autodesk-forks:bhata/vkshadergen_fix
Mar 22, 2025
Merged

Emit layout blocks for stage interfaces in Vulkan#2274
jstone-lucasfilm merged 9 commits intoAcademySoftwareFoundation:mainfrom
autodesk-forks:bhata/vkshadergen_fix

Conversation

@ashwinbhat
Copy link
Copy Markdown
Contributor

@ashwinbhat ashwinbhat commented Mar 12, 2025

The VkShaderGenerator was earlier flattening the VertexData into separate layout entries. While this is valid syntax, it is preferred to use the same struct as glsl to be consistent.

current emitted code:

layout (location = 0) out vec3 normalWorld;
layout (location = 1) out vec3 tangentWorld;
layout (location = 2) out vec3 positionWorld;

new proposed output:

layout (location = 0) out VertexData
{
    vec3 normalWorld;
    vec3 tangentWorld;
    vec3 positionWorld;
} vd;

Also fixes #2271

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Mar 12, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

layout (location = 0) out VertexData
{
    vec3 normalWorld;
    vec3 tangentWorld;
    vec3 positionWorld;
} vd;
@ashwinbhat ashwinbhat force-pushed the bhata/vkshadergen_fix branch from 98825ca to 99b0811 Compare March 12, 2025 15:37
@jstone-lucasfilm jstone-lucasfilm changed the title Update the Vulkan shadergen to emit layout blocks for stage interfaces. Emit layout blocks for stage interfaces in Vulkan Mar 13, 2025
@jstone-lucasfilm
Copy link
Copy Markdown
Member

This change looks good to me, @ashwinbhat, and I'm CC'ing @kwokcb for his thoughts.

@ashwinbhat
Copy link
Copy Markdown
Contributor Author

ashwinbhat commented Mar 17, 2025

@jstone-lucasfilm @bernardkwok
I've updated the yml to reenable vulkan validation and generation.

Comment thread .github/workflows/main.yml Outdated
ashwinbhat and others added 5 commits March 20, 2025 16:13
This changelist optimizes our shader validation step, allowing it to include vulkan validation without significantly impacting build times.
@jstone-lucasfilm jstone-lucasfilm merged commit 16d601b into AcademySoftwareFoundation:main Mar 22, 2025
35 checks passed
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.

GenVK: Generated shader is invalid

2 participants