From aba2731f0427a04a119a59567e6715ba4034920a Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 8 Jul 2021 13:55:21 -0700 Subject: Allow render-test to run inline ray tracing tests. (#1903) * Update VS projects to 2019. * Empty commit to trigger build * Implement gfx inline ray tracing on D3D12. * Allow render-test to run inline ray tracing tests. Co-authored-by: Yong He --- tools/gfx/d3d12/render-d3d12.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tools/gfx/d3d12/render-d3d12.cpp') diff --git a/tools/gfx/d3d12/render-d3d12.cpp b/tools/gfx/d3d12/render-d3d12.cpp index 277491ccd..e85fa84a3 100644 --- a/tools/gfx/d3d12/render-d3d12.cpp +++ b/tools/gfx/d3d12/render-d3d12.cpp @@ -4316,6 +4316,22 @@ Result D3D12Device::initialize(const Desc& desc) auto minPrecisionSupport = options.MinPrecisionSupport; } } + // Check ray tracing support + { + D3D12_FEATURE_DATA_D3D12_OPTIONS5 options; + if (SLANG_SUCCEEDED(m_device->CheckFeatureSupport( + D3D12_FEATURE_D3D12_OPTIONS5, &options, sizeof(options)))) + { + if (options.RaytracingTier != D3D12_RAYTRACING_TIER_NOT_SUPPORTED) + { + m_features.add("ray-tracing"); + } + if (options.RaytracingTier >= D3D12_RAYTRACING_TIER_1_1) + { + m_features.add("ray-query"); + } + } + } } m_desc = desc; -- cgit v1.2.3