Add experimental option to allow use of D3D12 RT

This commit is contained in:
baldurk
2024-02-28 17:44:28 +00:00
parent 6254393bdf
commit 02539a6240
+6 -1
View File
@@ -23,6 +23,7 @@
******************************************************************************/
#include "d3d12_device.h"
#include "core/settings.h"
#include "driver/dxgi/dxgi_common.h"
#include "driver/ihv/amd/official/DXExt/AmdExtD3D.h"
#include "driver/ihv/amd/official/DXExt/AmdExtD3DCommandListMarkerApi.h"
@@ -31,6 +32,9 @@
#include "d3d12_resources.h"
#include "d3d12_shader_cache.h"
RDOC_DEBUG_CONFIG(bool, D3D12_Experimental_EnableRTSupport, false,
"Enable support for experimental DXR support");
static bool UsesExtensionUAV(const D3D12_SHADER_BYTECODE &sh, uint32_t reg, uint32_t space)
{
return sh.BytecodeLength > 0 && sh.pShaderBytecode &&
@@ -2319,7 +2323,8 @@ HRESULT WrappedID3D12Device::CheckFeatureSupport(D3D12_FEATURE Feature, void *pF
return E_INVALIDARG;
// don't support raytracing
opts->RaytracingTier = D3D12_RAYTRACING_TIER_NOT_SUPPORTED;
if(!D3D12_Experimental_EnableRTSupport())
opts->RaytracingTier = D3D12_RAYTRACING_TIER_NOT_SUPPORTED;
if(dolog)
RDCLOG("Forcing no raytracing tier support");