mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user