You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I compile the following code with Vulkan 1.1 with profile spirv_1_3. The Vulkan validation layer will throw an error because OpCapability StorageImageReadWithoutFormat and OpCapability StorageImageWriteWithoutFormat are added while it's not necessary
[ VUID-VkShaderModuleCreateInfo-pCode-08740 ] | MessageID = 0x6e224e9 | vkCreateShaderModule(): SPIR-V Capability StorageImageReadWithoutFormat was declared, but one of the following requirements is required (VkPhysicalDeviceFeatures::shaderStorageImageReadWithoutFormat OR VK_VERSION_1_3 OR VK_KHR_format_feature_flags2). 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://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08740)
I believe these two capabilities are required because the texture does not specify its storage format. You will need to mark your texture declaration with [format("rgba8")] attribute to remove the requirement.
@csyonghe These caps are enabled by this code in slang-emit-spirv.cpp:
// TODO: It may not be necessary to have both of these
// depending on if we read or write
requireSPIRVCapability(SpvCapabilityStorageImageReadWithoutFormat);
requireSPIRVCapability(SpvCapabilityStorageImageWriteWithoutFormat);
when checking texture type, in this case RWTexture2D.
We should be able to do something like moving these from being enabled here to during load/store and subscript set/get calls so we can enable them individually. although this would require some work. In the example above only SpvCapabilityStorageImageWriteWithoutFormat should be enabled.
I believe these two capabilities are required because the texture does not specify its storage format. You will need to mark your texture declaration with [format("rgba8")] attribute to remove the requirement.
thank you for the reply. It's indeed my lack of understanding.
If I compile the following code with Vulkan 1.1 with profile spirv_1_3. The Vulkan validation layer will throw an error because OpCapability StorageImageReadWithoutFormat and OpCapability StorageImageWriteWithoutFormat are added while it's not necessary
The text was updated successfully, but these errors were encountered: