Files
mandy/tests/semantic/fixtures/ps_ij_computed_deriv_fallback.asm

31 lines
2.4 KiB
NASM

; Hand-written synthetic pixel shader exercising computed I/J interpolation without PerVertexKHR:
; 1. Pristine center f32 read of attr0.x first (matching the 200-shader corpus pattern).
; 2. EXEC-masked branch modifying (v0, v1) on lanes where I > 0.20 (non-uniform across a 2x2 quad),
; then evaluating computed f32 attr0.y and computed f16 low/high halves of attr1.x inside a branch.
v_interp_p1_f32_e32 v6, v0, attr0.x ; encoding: [0x00,0x00,0x00,0x00]
v_interp_p2_f32_e32 v6, v1, attr0.x ; encoding: [0x00,0x00,0x00,0x00]
v_interp_p1_f32_e32 v2, v0, attr0.y ; encoding: [0x00,0x00,0x00,0x00]
v_interp_p2_f32_e32 v2, v1, attr0.y ; encoding: [0x00,0x00,0x00,0x00]
v_mov_b32_e32 v10, v0 ; encoding: [0x00,0x00,0x00,0x00]
v_mov_b32_e32 v11, v1 ; encoding: [0x00,0x00,0x00,0x00]
v_cmp_lt_f32_e32 vcc_lo, 0x3e4ccccd, v0 ; encoding: [0xff,0x00,0x02,0x7c,0xcd,0xcc,0x4c,0x3e]
s_and_saveexec_b32 s4, vcc_lo ; encoding: [0x00,0x00,0x00,0x00]
s_cbranch_execz 4 ; encoding: [0x00,0x00,0x00,0x00]
v_mov_b32_e32 v0, 0.25 ; encoding: [0x00,0x00,0x00,0x00]
v_mov_b32_e32 v1, 0.25 ; encoding: [0x00,0x00,0x00,0x00]
v_interp_p1_f32_e32 v2, v0, attr0.y ; encoding: [0x00,0x00,0x00,0x00]
v_interp_p2_f32_e32 v2, v1, attr0.y ; encoding: [0x00,0x00,0x00,0x00]
s_mov_b32 exec_lo, s4 ; encoding: [0x00,0x00,0x00,0x00]
v_mov_b32_e32 v0, 0 ; encoding: [0x00,0x00,0x00,0x00]
v_mov_b32_e32 v1, 0 ; encoding: [0x00,0x00,0x00,0x00]
v_interp_p1ll_f16 v3, v0, attr1.x ; encoding: [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
v_interp_p2_f16 v3, v1, attr1.x, v3 ; encoding: [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
v_cvt_f32_f16_e32 v3, v3 ; encoding: [0x00,0x00,0x00,0x00]
v_mul_f32_e32 v1, 0.5, v11 ; encoding: [0x00,0x00,0x00,0x00]
v_mov_b32_e32 v0, v10 ; encoding: [0x00,0x00,0x00,0x00]
v_interp_p1ll_f16 v4, v0, attr1.x high ; encoding: [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
v_interp_p2_f16 v4, v1, attr1.x, v4 high ; encoding: [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
v_cvt_f32_f16_e32 v4, v4 ; encoding: [0x00,0x00,0x00,0x00]
exp mrt0 v6, v2, v3, v4 done vm ; encoding: [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
s_endpgm ; encoding: [0x00,0x00,0x00,0x00]