Snapshot: fog implementation + fidelity tooling baseline (pre bilinear-clamp fix)
Per-vertex GS fog end-to-end (gs_stub emit incl. persp_emit5, gs_prim_list_feeder XYZ2->XYZF2 on PRIM.FGE, gs_make_sh3_scheduler_fixture.py F/FGE packing), new fog TBs, fidelity attribution tooling. Functional baseline before removing the dead bilinear lerp8 clamps (Codex: 161-node comb loop -> -0.042ns setup fail). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,9 @@ module gs_persp_uv #(
|
||||
input logic [Q_W-1:0] q,
|
||||
output logic out_valid,
|
||||
output logic [TEXEL_W-1:0] u,
|
||||
output logic [TEXEL_W-1:0] v
|
||||
output logic [TEXEL_W-1:0] v,
|
||||
output logic [3:0] u_frac,
|
||||
output logic [3:0] v_frac
|
||||
);
|
||||
localparam int RLAT = 3; // gs_reciprocal_stub latency
|
||||
|
||||
@@ -96,13 +98,23 @@ module gs_persp_uv #(
|
||||
out_valid <= 1'b0;
|
||||
u <= '0;
|
||||
v <= '0;
|
||||
u_frac <= '0;
|
||||
v_frac <= '0;
|
||||
end else begin
|
||||
logic [PROD_W-1:0] u_prod, v_prod;
|
||||
logic [PROD_W-1:0] u_fixed4, v_fixed4;
|
||||
out_valid <= recip_valid;
|
||||
u_prod = uq_pipe[RLAT-1] * w_recip;
|
||||
v_prod = vq_pipe[RLAT-1] * w_recip;
|
||||
u <= clamp_texel(u_prod);
|
||||
v <= clamp_texel(v_prod);
|
||||
// Preserve four fractional texel bits for the palette-bilinear
|
||||
// path. The legacy integer outputs remain the exact SCALE-bit
|
||||
// truncation above; these are simply the next four product bits.
|
||||
u_fixed4 = u_prod >> (SCALE - 4);
|
||||
v_fixed4 = v_prod >> (SCALE - 4);
|
||||
u_frac <= u_fixed4[3:0];
|
||||
v_frac <= v_fixed4[3:0];
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user