Disable KHR_buffer_device_address on AMD windows for now

* It seems to be broken at the moment unfortunately, at least for our internal
  use cases (shader debugging and bindless feedback)
This commit is contained in:
baldurk
2020-10-01 17:40:05 +01:00
parent 98c171918a
commit d863885373
5 changed files with 26 additions and 4 deletions
+9 -3
View File
@@ -58,7 +58,9 @@ CONFIG_SUPPORT_TYPE(rdcarray<rdcstr>);
#define RDOC_CONFIG(type, name, defaultValue, description) \
static ConfigVarRegistration<type> CONCAT(config, __LINE__)( \
STRING_LITERAL(STRINGIZE(name)), defaultValue, false, STRING_LITERAL(description)); \
static const type &name() { return CONCAT(config, __LINE__).value(); }
const type &name() { return CONCAT(config, __LINE__).value(); }
#define RDOC_EXTERN_CONFIG(type, name) extern const type &name();
// debug configs get set to constants in official stable builds, they will remain configurable
// in nightly builds and of course in development builds
#if RENDERDOC_STABLE_BUILD
@@ -66,11 +68,15 @@ CONFIG_SUPPORT_TYPE(rdcarray<rdcstr>);
#define RDOC_DEBUG_CONFIG(type, name, defaultValue, description) \
static ConfigVarRegistration<type> CONCAT(config, __LINE__)( \
STRING_LITERAL(STRINGIZE(name)), defaultValue, true, STRING_LITERAL(description)); \
static type name() { return defaultValue; }
const type &name() \
{ \
static const type ret = defaultValue; \
return ret; \
}
#else
#define RDOC_DEBUG_CONFIG(type, name, defaultValue, description) \
static ConfigVarRegistration<type> CONCAT(config, __LINE__)( \
STRING_LITERAL(STRINGIZE(name)), defaultValue, true, STRING_LITERAL(description)); \
static const type &name() { return CONCAT(config, __LINE__).value(); }
const type &name() { return CONCAT(config, __LINE__).value(); }
#endif
@@ -36,6 +36,7 @@ RDOC_DEBUG_CONFIG(rdcstr, Vulkan_Debug_FeedbackDumpDirPath, "",
RDOC_CONFIG(
bool, Vulkan_BindlessFeedback, true,
"Enable fetching from GPU which descriptors were dynamically used in descriptor arrays.");
RDOC_EXTERN_CONFIG(bool, Vulkan_Debug_DisableBufferDeviceAddress);
struct feedbackData
{
@@ -551,6 +552,10 @@ void VulkanReplay::FetchShaderFeedback(uint32_t eventId)
m_pDriver->GetExtensions(NULL).ext_EXT_buffer_device_address) &&
m_pDriver->GetDeviceEnabledFeatures().shaderInt64;
if(Vulkan_Debug_DisableBufferDeviceAddress() ||
m_pDriver->GetDriverInfo().AMDBufferDeviceAddressBrokenDriver())
useBufferAddress = false;
bool useBufferAddressKHR = m_pDriver->GetExtensions(NULL).ext_KHR_buffer_device_address;
const VulkanRenderState &state = m_pDriver->m_RenderState;
+6
View File
@@ -970,6 +970,12 @@ VkDriverInfo::VkDriverInfo(const VkPhysicalDeviceProperties &physProps)
if(physProps.driverVersion < VK_MAKE_VERSION(2, 0, 33))
amdStorageMSAABrokenDriver = true;
}
if(m_Vendor == GPUVendor::AMD)
{
// not yet fixed
amdBDABrokenDriver = true;
}
#endif
// not fixed yet
+4
View File
@@ -253,6 +253,9 @@ public:
// On Qualcomm emitting an image sample operation with DRef and explicit lod will crash on non-2D
// textures. Since 2D is the common/expected case, we avoid compiling that case entirely.
bool QualcommDrefNon2DCompileCrash() const { return qualcommDrefNon2DCompileCrash; }
// On AMD unfortunately the initial implementation of KHR_buffer_device_address is broken and
// produces bad results.
bool AMDBufferDeviceAddressBrokenDriver() const { return amdBDABrokenDriver; }
private:
GPUVendor m_Vendor;
@@ -264,6 +267,7 @@ private:
bool amdStorageMSAABrokenDriver = false;
bool qualcommLeakingUBOOffsets = false;
bool qualcommDrefNon2DCompileCrash = false;
bool amdBDABrokenDriver = false;
};
enum
+2 -1
View File
@@ -3787,7 +3787,8 @@ ShaderDebugTrace *VulkanReplay::DebugPixel(uint32_t eventId, uint32_t x, uint32_
}
}
if(Vulkan_Debug_DisableBufferDeviceAddress())
if(Vulkan_Debug_DisableBufferDeviceAddress() ||
m_pDriver->GetDriverInfo().AMDBufferDeviceAddressBrokenDriver())
storageMode = Binding;
rdcarray<uint32_t> fragspv = shader.spirv.GetSPIRV();