Xbox device slot 67 takes (desc, riid, out) with IID_ID3D12PipelineState and a console-only
descriptor with the root signature at +0x00 and code blob pointer/size at +0x28/+0x30.
Previously it logged and returned E_NOTIMPL.
Route it to CreateComputePipelineState on the PC device (slot 11) like slot 62, mapping the
console descriptor to D3D12_COMPUTE_PIPELINE_STATE_DESC. On the Vulkan device this resolves
through the translator via fssm_program and ShaderLibrary.
- Implement proxy_create_compute_pipeline_from_native_code in d3d12_xs_device.cpp
- Update device_proxy_test to verify slot 67 thunk, compute PSO creation over WARP, and argument checks
- Update d3d12_compute_test to verify slot 67 compute PSO creation on the Vulkan device
- Update documentation in d3d12_command_objects.md and d3d12_vulkan.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MoltenVK reports maxVertexOutputComponents = 124 because Metal counts
gl_Position in its 128 vertex-output scalars, and the validation layer
counts it too. With param 0's high halves at location 30, every VS that
exports a param under --f16-interp-fallback (on by default on MoltenVK)
failed VUID-RuntimeSpirv-Location-06272. Move the halves down one
location so the top one is 29 ((29 + 1) * 4 + 4 = 124).
Update the design.md contract row and the semantic test, which now also
checks the boundary (param27 keeps param 0's halves, param28 drops them)
and that no VS output goes above location 29.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1653's first commit and #1656 both landed, leaving the Known-problems
table with the implicit-layer row twice and two overlapping overlay
rows, and the validation paragraph saying the overlays ignore
VK_LOADER_LAYERS_DISABLE=~implicit~. Per @Rainmaker33's loader log, they
only stay in when the terminal is elevated: the loader ignores
VK_LOADER_LAYERS_DISABLE with administrator rights, while each layer's
disable_environment switch still works, and RTSS adds the STORAGE usage
only while RivaTuner Statistics Server runs. Keep one implicit-layer row
and one overlay row that say so, and correct the paragraph.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 29 FSPX programs of the upscaler DLL use the two signed-byte dot products 27,271 times, all in 13 programs,
and the translator had neither. The rule: the sum of the four products of the sign-extended bytes of two dwords,
plus the third source (v_dot4_i32_i8) or the destination's old value (v_dot4c_i32_i8), modulo 2^32.
Confirmed on gfx1036 with raw kernels through tools/hw_oracle: 10 operand sets, both instructions, both source
orders of the accumulating one. Two modifiers were measured and are refused: clamp saturates to a signed 32-bit
value, and op_sel 2 with op_sel_hi 5 (the 89 words llvm-mc does not decode) exchanges the 16-bit halves of the
second source. The measured words are the tables of tests/semantic/test_alu_dot4_i8.py.
With tools/fspx_unpack.py on version 1.0.2.1: 17 of the 29 programs translate and pass spirv-val, 13 before.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The radix sort's fixed latency dominated small builds (2,000 triangles: 0.81
ms with the sort, 0.08 ms without, on an RTX 2050; the 10k regression
@exhawk measured on #1572). Up to 1,024 keys are now sorted in one
workgroup's shared memory (bitonic, ties by element index: the stable
order; 8 KiB, within the 16 KiB minimum with the radix arrays), and the
radix tiles are 256 elements (4 chunks instead of 32 per workgroup).
RTX 2050: 1,000 triangles 0.24 ms, 2,000 0.28 ms (0.83), 10,000 0.38 ms
(0.81), 100,000 2.3 ms (2.5); 1M 21.9 ms (20.3, the larger scan).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In RDNA2 shaders, constant calculations and scalar descriptor bounds checking
occur frequently across compute and graphics stages.
- Fold constant scalar ALU operations (s_and_b32, s_or_b32, s_xor_b32, s_not_b32,
s_lshl_b32, s_lshr_b32, s_mul_i32) into immediate constants and constant SCC
writes at translate time, eliminating runtime OpBitwise*, OpShift*, OpNot, and OpIMul.
- In s_buffer_load (SMEM), evaluate limit = NUM_RECORDS * stride at compile time
when descriptor words 1 and 2 are known in sgpr_imm, eliminating 6 runtime SPIR-V
instructions (OpBitFieldUExtract, OpUConvert, OpIMul, OpIEqual, OpSelect).
- When offset and limit are constants, fold per-dword bounds statically: in-range
dwords emit straight-line OpAccessChain and OpLoad without branch diamonds
(OpSelectionMerge, OpBranchConditional, OpPhi), and out-of-range dwords emit
constant zero without issuing memory loads.
- When scalar load offset is passed via an SGPR with known literal, fold into
immediate constant without runtime OpBitwiseAnd, OpUConvert, and OpIAdd.
- Updated docs/design.md with static bounds folding behavior.
- Added tests in tests/semantic/test_scalar_alu_and_smem_folding.py covering all cases.
Clamping only the last page's granule made it smaller than the previous
page's when the trim target fell before that page started: a 27-packet
real-libopus fixture declared 24,000 frames but decoded 24,960, and the
Ogg granule went 24,960 -> 24,000. Emit the EOS page at the first packet
that reaches pre_skip + length and drop the remaining padding packets.
Also require +0x0C to agree with the interleaved +0 count before using
it, and clamp an oversized pre-skip to the stream length so the final
granule never falls below it.
Measured on real streams: with pre-skip 0, the 5%/10% attack point is
312 samples (30 streams from four banks, median 312; the 10% point ranges
278..868, none near 1920), so the default is measured, not just assumed
from libopus. 20 real streams at 48 and 32 kHz now decode to exactly
their declared counts.
In RDNA2 shaders, constant calculations and scalar descriptor bounds checking
occur frequently across compute and graphics stages.
- Fold constant scalar ALU operations (s_and_b32, s_or_b32, s_xor_b32, s_not_b32,
s_lshl_b32, s_lshr_b32, s_mul_i32) into immediate constants and constant SCC
writes at translate time, eliminating runtime OpBitwise*, OpShift*, OpNot, and OpIMul.
- In s_buffer_load (SMEM), evaluate limit = NUM_RECORDS * stride at compile time
when descriptor words 1 and 2 are known in sgpr_imm, eliminating 6 runtime SPIR-V
instructions (OpBitFieldUExtract, OpUConvert, OpIMul, OpIEqual, OpSelect).
- When offset and limit are constants, fold per-dword bounds statically: in-range
dwords emit straight-line OpAccessChain and OpLoad without branch diamonds
(OpSelectionMerge, OpBranchConditional, OpPhi), and out-of-range dwords emit
constant zero without issuing memory loads.
- When scalar load offset is passed via an SGPR with known literal, fold into
immediate constant without runtime OpBitwiseAnd, OpUConvert, and OpIAdd.
- Updated docs/design.md with static bounds folding behavior.
- Added tests in tests/semantic/test_scalar_alu_and_smem_folding.py covering all cases.
#1283 reduced the angle in turns with Fract. For a negative argument Fract is
1 - |x|, which rounds in binary32: sin(-2**-26 turns) became +0 and the
absolute error was up to ~1.7e-7 at -0.1 turns. x - RoundEven(x) is exact in
binary32 for every finite x and keeps the angle in [-pi, pi]. The change is
inside turn_angle (shared by the f32 and f16 forms), with the variable names
of the line that test_mutations.py anchors on kept.
- tests/semantic/test_alu_sincos.py: f32/f16 against sin/cos(2*pi*x) in
double, tiny arguments (fails on main), whole turns of either sign (+0, as
measured on an RX 6800 by shelbykb2), +-0, inf/NaN, modifiers.
- runtime/test/shaders/cs_w32_sincos.asm: wave32 GPU regression guard
(tolerance 1e-3, the driver Sin is only good to 2^-11), registered in
check.py and run_gpu_tests.py.
- docs/design.md: contract row with the RX 6800 measurement and what is not
matched (half/quarter turns, the small-x constant, inf/NaN words).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Raw kernels through the hardware oracle on a gfx1036 iGPU (AMD Windows driver
32.0.21044.64, HIP backend), 1,385 programs in wave32 and wave64, identical
words in both:
- an omod on an f16 result (v_add/mul/fma/fmac/cvt/exp/rcp_f16) acts only with
IEEE 0 and denorm_mode_16_64 = 0; omod comes before clamp; clamp gives +0
for -0 and, with DX10_CLAMP 1, for a NaN;
- v_fma_mix* operands: a float inline constant is f32 or the f16 constant
(zero high half) by op_sel_hi, an integer constant its 32-bit integer;
denormals follow the mode of their own width; NaN payloads are kept;
- v_fma_mixlo/mixhi_f16 round once (fma_mix_probe --oracle hw, 7 of 7 ties);
- v_exp_f16 / v_log_f16 repeat gfx1031's sweep counts exactly.
The translator is compared word for word and differs in five ways, listed
in docs/shader_validation.md; none is fixed here. Docs only. AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>