mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 21:28:36 +00:00
Pipelines (graphics and compute) whose translated shader declares set-0 bindings were refused. Their layout now holds the device's bindless set 0 and replay binds it at every draw and dispatch. d3d12_m2_textured_test drives heaps, SRVs, a POINT sampler, two root descriptor tables and DrawIndexedInstanced with a translated PS that loads the T#/S# from the tables; 4096 of 4096 pixels match, and the descriptor hash table is checked. d3d12_translated_draw_test is registered with ctest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
1.1 KiB
NASM
21 lines
1.1 KiB
NASM
; M2 pixel shader: samples a texture found through two root descriptor tables. Run: d3d12_m2_textured_test.
|
|
; User data from the root signature ([0] a table holding one SRV, [1] a table holding one sampler):
|
|
; s[0:1] = console VA of the SRV table's first slot: the 32 bytes of the T# CreateShaderResourceView wrote
|
|
; s[2:3] = console VA of the sampler table's first slot: the 16 bytes of the S# CreateSampler wrote
|
|
; The translator hashes the T# and the S# the shader loads and looks both up in the descriptor hash table (set 0,
|
|
; binding 2); the indices pick the image (binding 0) and the sampler (binding 1) in the bindless set.
|
|
; attr0.xy = (u, v), 0..1 over the quad. mrt0 = the texel under the pixel.
|
|
; fssm-at: 0x10
|
|
; fssm-data: 0x324d5350 0x20535020
|
|
s_load_dwordx8 s[8:15], s[0:1], 0x0
|
|
s_load_dwordx4 s[16:19], s[2:3], 0x0
|
|
s_waitcnt lgkmcnt(0)
|
|
v_interp_p1_f32_e32 v2, v0, attr0.x
|
|
v_interp_p2_f32_e32 v2, v1, attr0.x
|
|
v_interp_p1_f32_e32 v3, v0, attr0.y
|
|
v_interp_p2_f32_e32 v3, v1, attr0.y
|
|
image_sample v[4:7], v[2:3], s[8:15], s[16:19] dmask:0xf dim:SQ_RSRC_IMG_2D
|
|
s_waitcnt vmcnt(0)
|
|
exp mrt0 v4, v5, v6, v7 done vm
|
|
s_endpgm
|