From 8d15f8b28e1e51dde31ad9197cc2eaa16b98ad65 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 9 May 2020 20:51:34 -0400 Subject: VkPipelineCache: Use a null shader on invalid address. --- src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index fe45ed269..a5c7b7945 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -329,8 +329,7 @@ VKPipelineCache::DecompileShaders(const GraphicsPipelineCacheKey& key) { const GPUVAddr gpu_addr = GetShaderAddress(system, program_enum); const auto cpu_addr = memory_manager.GpuToCpuAddress(gpu_addr); - ASSERT(cpu_addr); - const auto shader = TryGet(*cpu_addr); + const auto shader = cpu_addr ? TryGet(*cpu_addr) : null_shader; ASSERT(shader); const std::size_t stage = index == 0 ? 0 : index - 1; // Stage indices are 0 - 5 -- cgit v1.2.3