|
16 | 16 | #include <atlbase.h> |
17 | 17 | #include <vector> |
18 | 18 |
|
19 | | -extern "C" { __declspec(dllexport) extern const UINT D3D12SDKVersion = 619; } |
| 19 | +extern "C" { __declspec(dllexport) extern const UINT D3D12SDKVersion = D3D12_SDK_VERSION; } |
20 | 20 | extern "C" { __declspec(dllexport) extern const char* D3D12SDKPath = u8".\\D3D12\\"; } |
21 | 21 |
|
22 | 22 |
|
@@ -284,6 +284,18 @@ void D3D12RaytracingHelloShaderExecutionReordering::CreateRaytracingPipelineStat |
284 | 284 | ThrowIfFalse(SM.HighestShaderModel >= D3D_SHADER_MODEL_6_9, |
285 | 285 | L"ERROR: Device doesn't support Shader Model 6.9.\n\n"); |
286 | 286 |
|
| 287 | + D3D12_FEATURE_DATA_D3D12_OPTIONS22 Options22 = {}; |
| 288 | + m_dxrDevice->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS22, &Options22, sizeof(Options22)); |
| 289 | + if (Options22.ShaderExecutionReorderingActuallyReorders) |
| 290 | + { |
| 291 | + PRINT("ShaderExecutionReorderingActuallyReorders = TRUE on this device.\n"); |
| 292 | + } |
| 293 | + else |
| 294 | + { |
| 295 | + PRINT("ShaderExecutionReorderingActuallyReorders = TRUE on this device.\n"); |
| 296 | + } |
| 297 | + m_shaderExecutionReorderingActuallyReorders = Options22.ShaderExecutionReorderingActuallyReorders; |
| 298 | + |
287 | 299 | // Create 7 subobjects that combine into a RTPSO: |
288 | 300 | // Subobjects need to be associated with DXIL exports (i.e. shaders) either by way of default or explicit associations. |
289 | 301 | // Default association applies to every exported shader entrypoint that doesn't have any of the same type of subobject associated with it. |
@@ -781,8 +793,9 @@ void D3D12RaytracingHelloShaderExecutionReordering::CalculateFrameStats() |
781 | 793 | wstringstream windowText; |
782 | 794 |
|
783 | 795 | windowText //<< setprecision(2) << fixed |
784 | | - << L" fps: " << fps << L" ~Million Primary Rays/s: " << MRaysPerSecond |
785 | | - << L" GPU[" << m_deviceResources->GetAdapterID() << L"]: " << m_deviceResources->GetAdapterDescription(); |
| 796 | + << L" fps: " << fps << L" ~MegaRays/s: " << MRaysPerSecond |
| 797 | + << L" GPU[" << m_deviceResources->GetAdapterID() << L"]: " << m_deviceResources->GetAdapterDescription() |
| 798 | + << L" Device reports ShaderExecutionReorderingActuallyReorders=" << (m_shaderExecutionReorderingActuallyReorders ? L"TRUE" : L"FALSE"); |
786 | 799 | SetCustomWindowText(windowText.str().c_str()); |
787 | 800 | } |
788 | 801 | } |
|
0 commit comments