Check for shader 64-bit support before using them in tests

This commit is contained in:
baldurk
2022-09-19 16:42:10 +01:00
parent 4e4a7518fa
commit 1fa4fed24a
+3 -2
View File
@@ -363,7 +363,8 @@ void main()
VkFormatProperties props = {};
vkGetPhysicalDeviceFormatProperties(phys, VK_FORMAT_R64G64B64_SFLOAT, &props);
const bool doubles = (props.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) != 0;
const bool doubles =
features.shaderFloat64 && (props.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) != 0;
props = {};
vkGetPhysicalDeviceFormatProperties(phys, VK_FORMAT_R64G64B64_SINT, &props);
@@ -373,7 +374,7 @@ void main()
vkGetPhysicalDeviceFormatProperties(phys, VK_FORMAT_R64G64B64_UINT, &props);
const bool ulongs = (props.bufferFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) != 0;
const bool longs = slongs && ulongs;
const bool longs = features.shaderInt64 && slongs && ulongs;
VkPipelineLayout layout = createPipelineLayout(vkh::PipelineLayoutCreateInfo());