freedreno/a4xx: indicate whether outputs are uint/sint
Unclear whether this fixes anything, but the blob does seem to set these. (Discovered while trying to determine if value clamping was missing for non-32-bit integer formats, which fail in some tests.) Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13806>
This commit is contained in:
@@ -1666,6 +1666,8 @@ perhaps they should be taken with a grain of salt
|
||||
<reg32 offset="0x0" name="REG">
|
||||
<bitfield name="REGID" low="0" high="7" type="a3xx_regid"/>
|
||||
<bitfield name="HALF_PRECISION" pos="8" type="boolean"/>
|
||||
<bitfield name="COLOR_SINT" pos="10" type="boolean"/>
|
||||
<bitfield name="COLOR_UINT" pos="11" type="boolean"/>
|
||||
<bitfield name="MRTFORMAT" low="12" high="17" type="a4xx_color_fmt"/>
|
||||
<bitfield name="COLOR_SRGB" pos="18" type="boolean"/>
|
||||
</reg32>
|
||||
|
@@ -436,14 +436,22 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit, int nr,
|
||||
for (i = 0; i < 8; i++) {
|
||||
enum a4xx_color_fmt format = 0;
|
||||
bool srgb = false;
|
||||
bool uint = false;
|
||||
bool sint = false;
|
||||
if (i < nr) {
|
||||
format = fd4_emit_format(bufs[i]);
|
||||
if (bufs[i] && !emit->no_decode_srgb)
|
||||
srgb = util_format_is_srgb(bufs[i]->format);
|
||||
if (bufs[i]) {
|
||||
if (!emit->no_decode_srgb)
|
||||
srgb = util_format_is_srgb(bufs[i]->format);
|
||||
uint = util_format_is_pure_uint(bufs[i]->format);
|
||||
sint = util_format_is_pure_sint(bufs[i]->format);
|
||||
}
|
||||
}
|
||||
OUT_RING(ring, A4XX_SP_FS_MRT_REG_REGID(color_regid[i]) |
|
||||
A4XX_SP_FS_MRT_REG_MRTFORMAT(format) |
|
||||
COND(srgb, A4XX_SP_FS_MRT_REG_COLOR_SRGB) |
|
||||
COND(uint, A4XX_SP_FS_MRT_REG_COLOR_UINT) |
|
||||
COND(sint, A4XX_SP_FS_MRT_REG_COLOR_SINT) |
|
||||
COND(color_regid[i] & HALF_REG_ID,
|
||||
A4XX_SP_FS_MRT_REG_HALF_PRECISION));
|
||||
}
|
||||
|
Reference in New Issue
Block a user