-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate task and mesh shader memory limits #6668
base: main
Are you sure you want to change the base?
Validate task and mesh shader memory limits #6668
Conversation
CI Vulkan-ValidationLayers build queued with queue ID 60658. |
CI Vulkan-ValidationLayers build # 13974 running. |
CI Vulkan-ValidationLayers build # 13974 failed. |
@@ -64,10 +64,14 @@ void DecorationBase::Add(uint32_t decoration, uint32_t value) { | |||
case spv::DecorationPerPrimitiveEXT: // VK_EXT_mesh_shader | |||
flags |= per_primitive_ext; | |||
break; | |||
case spv::DecorationPerViewNV: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are only found in the SPV_NV_mesh_shader
extension, not the EXT version
Would it be better to check the Entrypoint::execution_model
if ExecutionModelMeshNV
or ExecutionModelMeshEXT
and then have two different versions of CalculateMeshOutputMemory
t(or at least a bool is_ext
argument) that are called as it seems they are slightly different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't there be a an enum for the EXT as well? Or do ext mesh shaders not have per view attributes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so while the vulkan enum for shader stage is the same, the SPIR-V version of MeshNV and MeshEXT are slightly different (which is why there is no enum for EXT in spirv-headers)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: KhronosGroup/Vulkan-Docs#2287
d730cb0
to
c2a01f0
Compare
CI Vulkan-ValidationLayers build queued with queue ID 64140. |
CI Vulkan-ValidationLayers build # 14051 running. |
CI Vulkan-ValidationLayers build # 14051 failed. |
|
||
for (const auto& variable : entrypoint.stage_interface_variables) { | ||
for (const auto& slot : variable.interface_slots) { | ||
uint32_t size = slot.bit_width / 8u; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec talks about the number of attributes (components?) but doesn't say anything about their size. So I think this should just be 1. Maybe 2 if the size is 64 bits, but that depends on whether interface_slots
has one or two entries per 64-bit value.
Closes #6656