Skip to content

Commit c37f53c

Browse files
committed
checking for shaderStorageImageReadWithoutFormat / shaderStorageImageWriteWithoutFormat support
1 parent 7748620 commit c37f53c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sources/engine/Stride.Graphics/Vulkan/GraphicsDevice.Vulkan.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,15 @@ void SetMaxDescriptorTypeCount(VkDescriptorType type, uint limit)
308308
depthClamp = true,
309309
};
310310

311-
if (graphicsProfiles.Any(x => x >= GraphicsProfile.Level_11_0))
311+
vkGetPhysicalDeviceFeatures(NativePhysicalDevice, out var deviceFeatures);
312+
313+
if (deviceFeatures.shaderStorageImageReadWithoutFormat)
312314
{
313315
enabledFeature.shaderStorageImageReadWithoutFormat = true;
316+
}
317+
318+
if (deviceFeatures.shaderStorageImageWriteWithoutFormat)
319+
{
314320
enabledFeature.shaderStorageImageWriteWithoutFormat = true;
315321
}
316322

0 commit comments

Comments
 (0)