From 081bdc3fd83f6479cfe5bc9542b6fbccfe957faa Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 29 Jul 2016 21:48:27 +0200 Subject: [PATCH] Back out breaking glslang change on nvidia, remove texel fetch hack * No fixed nvidia driver has been released, and since there is an easy workaround that doesn't break any other IHV's drivers, temporarily do that until nvidia's driver is working again. --- renderdoc/3rdparty/glslang/SPIRV/GlslangToSpv.cpp | 3 +++ renderdoc/driver/vulkan/vk_debug.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/renderdoc/3rdparty/glslang/SPIRV/GlslangToSpv.cpp b/renderdoc/3rdparty/glslang/SPIRV/GlslangToSpv.cpp index ceea1e2b1..3eac8334f 100644 --- a/renderdoc/3rdparty/glslang/SPIRV/GlslangToSpv.cpp +++ b/renderdoc/3rdparty/glslang/SPIRV/GlslangToSpv.cpp @@ -2590,12 +2590,15 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO bias = true; } + // Temporarily hacked out as it breaks on nvidia's driver + /* // See if the sampler param should really be just the SPV image part if (cracked.fetch) { // a fetch needs to have the image extracted first if (builder.isSampledImage(params.sampler)) params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler); } + */ // set the rest of the arguments diff --git a/renderdoc/driver/vulkan/vk_debug.cpp b/renderdoc/driver/vulkan/vk_debug.cpp index 5c33dfc1a..1b398573a 100644 --- a/renderdoc/driver/vulkan/vk_debug.cpp +++ b/renderdoc/driver/vulkan/vk_debug.cpp @@ -1417,8 +1417,10 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver, VkDevice dev) if(m_pDriver->IsNV()) { - // at time of writing, this isn't fixed on nv - texelFetchBrokenDriver = true; + // at time of writing, this isn't fixed on nv, but since we have a workaround + // that is harmless on other IHVs - keep it supported. Once a fixed version is + // out we will use this + a version check to stay working on older drivers. + // texelFetchBrokenDriver = true; } if(m_pDriver->IsAMD())