mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-08 21:31:36 +00:00
Calculate desired patched-buffer storage mode once
This commit is contained in:
3 files changed
+46
-2
No files matched your search
@@ -31,6 +31,7 @@
|
||||
#include "driver/ihv/amd/amd_counters.h"
|
||||
#include "driver/ihv/amd/official/GPUPerfAPI/Include/gpu_perf_api_vk.h"
|
||||
#include "driver/ihv/nv/nv_vk_counters.h"
|
||||
#include "driver/shaders/spirv/spirv_common.h"
|
||||
#include "driver/shaders/spirv/spirv_compile.h"
|
||||
#include "maths/camera.h"
|
||||
#include "maths/formatpacking.h"
|
||||
@@ -43,6 +44,8 @@
|
||||
#include "data/glsl/glsl_ubos_cpp.h"
|
||||
|
||||
RDOC_EXTERN_CONFIG(bool, Vulkan_Debug_SingleSubmitFlushing);
|
||||
RDOC_CONFIG(bool, Vulkan_Debug_DisableBufferDeviceAddress, false,
|
||||
"Disable use of buffer device address for PS Input fetch.");
|
||||
|
||||
RDOC_CONFIG(bool, Vulkan_HardwareCounters, true,
|
||||
"Enable support for IHV-specific hardware counters on Vulkan.");
|
||||
@@ -3316,6 +3319,40 @@ void VulkanReplay::CreateResources()
|
||||
|
||||
RenderDoc::Inst().SetProgress(LoadProgress::DebugManagerInit, 1.0f);
|
||||
|
||||
m_StorageMode = BufferStorageMode::Descriptor;
|
||||
|
||||
if(m_pDriver->GetExtensions(NULL).ext_KHR_buffer_device_address)
|
||||
{
|
||||
m_StorageMode = BufferStorageMode::KHR_bda32;
|
||||
|
||||
// we don't deliberately use bda64 for simplicity
|
||||
|
||||
RDCLOG("Using KHR_buffer_device_address");
|
||||
}
|
||||
else if(m_pDriver->GetExtensions(NULL).ext_EXT_buffer_device_address)
|
||||
{
|
||||
if(m_pDriver->GetDeviceEnabledFeatures().shaderInt64)
|
||||
{
|
||||
m_StorageMode = BufferStorageMode::EXT_bda;
|
||||
|
||||
RDCLOG("Using EXT_buffer_device_address");
|
||||
}
|
||||
else
|
||||
{
|
||||
RDCLOG(
|
||||
"EXT_buffer_device_address is available but shaderInt64 isn't, falling back to binding "
|
||||
"storage mode");
|
||||
}
|
||||
}
|
||||
|
||||
if(Vulkan_Debug_DisableBufferDeviceAddress() ||
|
||||
m_pDriver->GetDriverInfo().BufferDeviceAddressBrokenDriver())
|
||||
{
|
||||
m_StorageMode = BufferStorageMode::Descriptor;
|
||||
}
|
||||
|
||||
m_BindlessFeedback.m_StorageMode = m_StorageMode;
|
||||
|
||||
GpaVkContextOpenInfo context = {Unwrap(m_pDriver->GetInstance()), Unwrap(m_pDriver->GetPhysDev()),
|
||||
Unwrap(m_pDriver->GetDev())};
|
||||
|
||||
|
||||
@@ -31,6 +31,11 @@
|
||||
#include "vk_info.h"
|
||||
#include "vk_state.h"
|
||||
|
||||
namespace rdcspv
|
||||
{
|
||||
enum class BufferStorageMode : uint32_t;
|
||||
};
|
||||
|
||||
#if ENABLED(RDOC_WIN32)
|
||||
|
||||
#include <windows.h>
|
||||
@@ -587,6 +592,8 @@ private:
|
||||
WrappedVulkan *m_pDriver = NULL;
|
||||
VkDevice m_Device = VK_NULL_HANDLE;
|
||||
|
||||
BufferStorageMode m_StorageMode;
|
||||
|
||||
// General use/misc items that are used in many places
|
||||
struct GeneralMisc
|
||||
{
|
||||
@@ -815,6 +822,7 @@ private:
|
||||
{
|
||||
void Destroy(WrappedVulkan *driver);
|
||||
|
||||
BufferStorageMode m_StorageMode;
|
||||
GPUBuffer FeedbackBuffer;
|
||||
|
||||
std::map<uint32_t, VKDynamicShaderFeedback> Usage;
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
|
||||
RDOC_CONFIG(rdcstr, Vulkan_Debug_PSDebugDumpDirPath, "",
|
||||
"Path to dump pixel shader debugging generated SPIR-V files.");
|
||||
RDOC_CONFIG(bool, Vulkan_Debug_DisableBufferDeviceAddress, false,
|
||||
"Disable use of buffer device address for PS Input fetch.");
|
||||
RDOC_EXTERN_CONFIG(bool, Vulkan_Debug_DisableBufferDeviceAddress);
|
||||
RDOC_CONFIG(bool, Vulkan_Debug_ShaderDebugLogging, false,
|
||||
"Output verbose debug logging messages when debugging shaders.");
|
||||
|
||||
|
||||
Reference in new issue
Block a user