From f6c10bb43562d9ce62e0f4bc110f990504fa6e04 Mon Sep 17 00:00:00 2001 From: Pavel Kotek <334189328+kotekompotek@users.noreply.github.com> Date: Tue, 24 Nov 2026 18:01:31 +0500 Subject: [PATCH] d3d12: log CheckFeatureSupport answers for boot trace diagnostics --- docs/boot.md | 4 ++-- runtime/shims/d3d12_vulkan_device.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/boot.md b/docs/boot.md index 2b7186e302..e187c64153 100644 --- a/docs/boot.md +++ b/docs/boot.md @@ -189,7 +189,7 @@ order. It maps each question to the event to look for; it does not answer them. | 8 | XDXR desc layouts | measured in [xdxr.md](xdxr.md); the live signal is a non-empty stream desc at slot 62 | | 9 | Tiled textures / DCC | slot 76, `CopyTextureRegion`, resource descs; a `0x101` layout or tiled address | | 10 | Binning, DCC, VRS, wave MMA, stream output | shader-side answered by `tools/feature_scan.py`; the trace adds PSO/stream subobjects | -| 11 | `CheckFeatureSupport` answers | the call's `ok`/`failed` and the `[rt]` feature-id line; the answer itself is not logged yet | +| 11 | `CheckFeatureSupport` answers | the call's `ok`/`failed` and the `[rt]` feature-id + answer lines (`FEATURE_LEVELS`, `ARCHITECTURE UMA`, `OPTIONS ResourceBindingTier`, `OPTIONS1 WaveOps`, `OPTIONS5 RaytracingTier`, `OPTIONS7 MeshShaderTier`) | | 12 | Async compute / copy queues | queue creation and cross-queue fences | | 13 | 144-byte push constants | device creation `[rt]` line; `push_constants_need_fallback` when the device reports fewer | | 14 | Two code-base stages in one PSO | PSO creation log; the index metadata (`uses_code_base`) | @@ -200,7 +200,7 @@ order. It maps each question to the event to look for; it does not answer them. | 19 | `0x03000000` root-signature bits | the root-signature blobs; the mask is a workaround, not the meaning | | 20 | Which BVH builder programs the game uses | slot-62 PSOs on the first RT frame; map each to its `ILDN` container | | 21 | PIX `Metadata` blob | metadata values; 0 and 1 are decoded silently, so an `unsupported` line means an unexpected value; if it is 2, decode the console blob from the executable's PIX calls, not the PC WinPixEventRuntime layout | -| 22 | `CheckFeatureSupport(OPTIONS5)` RaytracingTier | the `[rt]` feature id; the tier answer itself is not logged yet, and `DispatchRays` stays unimplemented | +| 22 | `CheckFeatureSupport(OPTIONS5)` RaytracingTier | the `[rt]` `CheckFeatureSupport OPTIONS5 RaytracingTier ` line; `DispatchRays` stays unimplemented | ## 5. What a good first run looks like diff --git a/runtime/shims/d3d12_vulkan_device.cpp b/runtime/shims/d3d12_vulkan_device.cpp index 12494d201d..6ffa42a524 100644 --- a/runtime/shims/d3d12_vulkan_device.cpp +++ b/runtime/shims/d3d12_vulkan_device.cpp @@ -13775,6 +13775,7 @@ class Device final if (levels->pFeatureLevelsRequested[i] <= D3D_FEATURE_LEVEL_12_1) best = std::max(best, levels->pFeatureLevelsRequested[i]); levels->MaxSupportedFeatureLevel = best; // 0 with DXGI_ERROR_UNSUPPORTED, as the host writes it + log_once("CheckFeatureSupport FEATURE_LEVELS max", static_cast(best)); if (!best) return d3d12_trace::result(method, DXGI_ERROR_UNSUPPORTED); return d3d12_trace::result(method, S_OK); } @@ -13795,6 +13796,7 @@ class Device final arch->UMA = state_.uma ? TRUE : FALSE; arch->CacheCoherentUMA = FALSE; if (v1) arch->IsolatedMMU = TRUE; + log_once("CheckFeatureSupport ARCHITECTURE UMA", static_cast(arch->UMA)); return d3d12_trace::result(method, S_OK); } case D3D12_FEATURE_D3D12_OPTIONS: { @@ -13834,6 +13836,7 @@ class Device final // (docs/d3d12_xs_surface.md ยง7.1): fill the 0x3C-byte PC prefix and zero the trailing 4 bytes. std::memset(static_cast(data) + sizeof(pc_opts), 0, sizeof(UINT)); } + log_once("CheckFeatureSupport OPTIONS ResourceBindingTier", static_cast(pc_opts.ResourceBindingTier)); return d3d12_trace::result(method, S_OK); } case D3D12_FEATURE_D3D12_OPTIONS1: { @@ -13848,6 +13851,7 @@ class Device final // (section 4.1): a game that sizes work from it plans for less parallelism than the GPU has, not more. opts->TotalLaneCount = facts.lane_max; opts->ExpandedComputeResourceStates = TRUE; // Vulkan has no resource states to expand + log_once("CheckFeatureSupport OPTIONS1 WaveOps", static_cast(opts->WaveOps)); return d3d12_trace::result(method, S_OK); } case D3D12_FEATURE_D3D12_OPTIONS8: { @@ -13894,6 +13898,7 @@ class Device final opts->SRVOnlyTiledResourceTier3 = FALSE; opts->RenderPassesTier = D3D12_RENDER_PASS_TIER_0; opts->RaytracingTier = D3D12_RAYTRACING_TIER_NOT_SUPPORTED; + log_once("CheckFeatureSupport OPTIONS5 RaytracingTier", static_cast(opts->RaytracingTier)); return d3d12_trace::result(method, S_OK); } case D3D12_FEATURE_D3D12_OPTIONS7: { @@ -13906,6 +13911,7 @@ class Device final opts->MeshShaderTier = state_.info.mesh_shader ? D3D12_MESH_SHADER_TIER_1 : D3D12_MESH_SHADER_TIER_NOT_SUPPORTED; opts->SamplerFeedbackTier = D3D12_SAMPLER_FEEDBACK_TIER_NOT_SUPPORTED; + log_once("CheckFeatureSupport OPTIONS7 MeshShaderTier", static_cast(opts->MeshShaderTier)); return d3d12_trace::result(method, S_OK); } case D3D12_FEATURE_D3D12_OPTIONS9: {