Skip to content
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

SPIR-V/shader module validation does not support VK_KHR_maintenance5 and needs explicit vkCreateShaderModule() #8226

Open
n9H07 opened this issue Jul 2, 2024 · 1 comment
Assignees

Comments

@n9H07
Copy link

n9H07 commented Jul 2, 2024

Environment:

  • OS: windows 10
  • GPU and driver version: nvidia 556.12
  • SDK or header version if building from repo: 1.3.283.0
  • Options enabled (synchronization, best practices, etc.): synchronization, best practices.

Describe the Issue

SPIR-V/shader module validation does not support VK_KHR_maintenance5 and needs explicit vkCreateShaderModule().

Expected behavior

The specification states:

If the maintenance5 feature is enabled, shader module creation can be omitted entirely. Instead, applications should provide the VkShaderModuleCreateInfo structure directly in to pipeline creation by chaining it to VkPipelineShaderStageCreateInfo. This avoids the overhead of creating and managing an additional object.

Valid Usage ID

For example, without explicit vkCreateShaderModule(), the following checks are missing:

VUID-RuntimeSpirv-storageBuffer8BitAccess-06328(ERROR / SPEC): msgNum: -1143895426 - Validation Error: [ VUID-RuntimeSpirv-storageBuffer8BitAccess-06328 ] | MessageID = 0xbbd18a7e |
vkCreateShaderModule(): SPIR-V contains an 8-bit OpVariable with StorageBuffer Storage Class, but storageBuffer8BitAccess was not enabled.
%7 = OpVariable %47 12
. The Vulkan spec states: If storageBuffer8BitAccess is VK_FALSE, then objects containing an 8-bit integer element must not have Storage Class of StorageBuffer, ShaderRecordBufferKHR, or PhysicalStorageBuffer (https://vulkan.lunarg.com/doc/view/1.3.283.0/windows/1.3-extensions/vkspec.html#VUID-RuntimeSpirv-storageBuffer8BitAccess-06328)
Objects: 0

VUID-VkShaderModuleCreateInfo-pCode-08740(ERROR / SPEC): msgNum: 115483881 - Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08740 ] | MessageID = 0x6e224e9 |
vkCreateShaderModule(): SPIR-V Capability Int8 was declared, but one of the following requirements is required (VkPhysicalDeviceVulkan12Features::shaderInt8). The Vulkan spec states: If pCode is a pointer to SPIR-V code, and pCode declares any of the capabilities listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://vulkan.lunarg.com/doc/view/1.3.283.0/windows/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08740)
Objects: 0

BestPractices-LocalWorkgroup-Multiple64(WARN / PERF): msgNum: -2073599464 - Validation Performance Warning: [ BestPractices-LocalWorkgroup-Multiple64 ] | MessageID = 0x84676218 |
vkCreateComputePipelines(): pCreateInfos[0] [AMD] compute shader with work group dimensions (1, 1, 1), workgroup size (1), is not a multiple of 64. Make the workgroup size a multiple of 64 to obtain best performance across all AMD GPU generations.
Objects: 0

@n9H07 n9H07 changed the title Shader module validation does not support VK_KHR_maintenance5 and needs explicit vkCreateShaderModule() SPIR-V/shader module validation does not support VK_KHR_maintenance5 and needs explicit vkCreateShaderModule() Jul 2, 2024
@spencer-lunarg
Copy link
Contributor

(on PTO and will double check all these 3 cases next week before next SDK) but this should all be fixed from #8162

@spencer-lunarg spencer-lunarg self-assigned this Jul 3, 2024
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

No branches or pull requests

2 participants