rsx: Fix swapped width/height in NV309E_SET_FORMAT decoder

The bit field decoders for sw_width_log2 and sw_height_log2 were
swapped. According to the NV04_SURFACE_SWZ_FORMAT specification
(rnndb/Mesa):
- BASE_SIZE_U (width) is at bits [23:16] (shift 16)
- BASE_SIZE_V (height) is at bits [31:24] (shift 24)

The existing code had these reversed. While these fields are currently
unused in practice (the hardware appears to bypass them), this fix
ensures the decode matches hardware documentation.

Fixes #17510
This commit is contained in:
Phil Coulson 2026-05-11 15:17:56 +08:00
parent 473f03886d
commit dcee40388d

View File

@ -3775,12 +3775,12 @@ struct registers_decoder<NV309E_SET_FORMAT>
u8 sw_height_log2() const
{
return bf_decoder<16, 8>(value);
return bf_decoder<24, 8>(value);
}
u8 sw_width_log2() const
{
return bf_decoder<24, 8>(value);
return bf_decoder<16, 8>(value);
}
};