From f6ac09c4e1f386310dd3eaf96ed7654947d301d1 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 15 Jun 2022 16:58:56 +0100 Subject: [PATCH] Workaround intel mesa issue reading invalid sample locations --- renderdoc/driver/vulkan/vk_shader_cache.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/vulkan/vk_shader_cache.cpp b/renderdoc/driver/vulkan/vk_shader_cache.cpp index 25f9de36b..e9d260cb0 100644 --- a/renderdoc/driver/vulkan/vk_shader_cache.cpp +++ b/renderdoc/driver/vulkan/vk_shader_cache.cpp @@ -789,9 +789,11 @@ void VulkanShaderCache::MakeGraphicsPipelineInfo(VkGraphicsPipelineCreateInfo &p VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT, }; - if(m_pDriver->GetExtensions(GetRecord(m_Device)).ext_EXT_sample_locations) + if(m_pDriver->GetExtensions(GetRecord(m_Device)).ext_EXT_sample_locations && + pipeInfo.sampleLocations.enabled) { sampleLoc.sampleLocationsEnable = pipeInfo.sampleLocations.enabled; + sampleLoc.sampleLocationsInfo.sType = VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT; sampleLoc.sampleLocationsInfo.sampleLocationGridSize = pipeInfo.sampleLocations.gridSize; sampleLoc.sampleLocationsInfo.sampleLocationsPerPixel = pipeInfo.rasterizationSamples; sampleLoc.sampleLocationsInfo.sampleLocationsCount =