From 1eca8d544f14d043dd50639891259c7748c8eeb2 Mon Sep 17 00:00:00 2001 From: saii <120340942+Not-Saii@users.noreply.github.com> Date: Sat, 28 Nov 2026 20:56:15 +0200 Subject: [PATCH] compute: name the packed D16 and indexed raw view kinds in manifest reasons The kind-name table of format_compute_runtime_manifest's refusals (#3268) predates packed_d16_x_uav and indexed_raw_srv, so their refusals read "UAV kind unknown" / "SRV kind unknown". Both are named now, and a static_assert ties the table to the last enumerator. Refs #3224 Co-Authored-By: Claude Opus 5.5 --- src/direct_compute_cache.cpp | 5 ++++- tests/native_compute_manifest_reasons.cpp | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/direct_compute_cache.cpp b/src/direct_compute_cache.cpp index 79dcc6b3c5..a1be7060b4 100644 --- a/src/direct_compute_cache.cpp +++ b/src/direct_compute_cache.cpp @@ -893,7 +893,10 @@ static const char *view_kind_name(ComputeViewKind kind) { "heap_stride_srv", "raw_buffer_uav", "typed_buffer_uav", "half_buffer_uav", "root_buffer_srv", "comparison_texture_srv", "half2_texture_uav", "half4_texture_uav", "cube_sample_srv", "cube_comparison_srv", "indexed_atomic_uav", "d16_sample_srv", "byte_window_srv", "heap_buffer_srv", "heap_sampler", - "uint_texture_uav", "float_texture_uav", "float2_texture_uav", "float3_texture_uav"}; + "uint_texture_uav", "float_texture_uav", "float2_texture_uav", "float3_texture_uav", "packed_d16_x_uav", + "indexed_raw_srv"}; + // ponytail: catches a renamed last kind, not one appended after it; extend both together. + static_assert(std::size(names) == static_cast(ComputeViewKind::indexed_raw_srv) + 1); const auto index = static_cast(kind); return index < std::size(names) ? names[index] : "unknown"; } diff --git a/tests/native_compute_manifest_reasons.cpp b/tests/native_compute_manifest_reasons.cpp index 92d7147f14..019cd78862 100644 --- a/tests/native_compute_manifest_reasons.cpp +++ b/tests/native_compute_manifest_reasons.cpp @@ -59,6 +59,7 @@ int main() { {"SRV registers not contiguous", [](auto &p) { p.bindings[0].shader_register = 1; }}, {"UAV registers not contiguous", [](auto &p) { p.bindings[1].shader_register = 1; }}, {"SRV kind root_buffer_srv", [](auto &p) { p.bindings[0].kind = K::root_buffer_srv; }}, + {"SRV kind indexed_raw_srv", [](auto &p) { p.bindings[0].kind = K::indexed_raw_srv; }}, {"SRV kind texture_srv cube", [](auto &p) { p.bindings[0].kind = K::texture_srv; p.bindings[0].image_dimension = 3;