asahi: Identify line stride in texture/RT XML

The off-by-four is concerning.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086>
This commit is contained in:
Alyssa Rosenzweig 2021-05-31 03:31:43 +05:30 committed by Marge Bot
parent bacff07018
commit 118682dd83
2 changed files with 9 additions and 4 deletions

View file

@ -90,7 +90,10 @@
<field name="Flip vertical" size="1" start="54" type="bool" default="false"/>
<field name="Unk 55" size="9" start="55" type="hex"/>
<field name="Buffer" size="36" start="64" type="address" modifier="shr(4)"/>
<field name="Unk 100" size="28" start="100" type="hex"/>
<!-- Off by 4? -->
<field name="Stride" size="24" start="104" type="hex" prefix="AGX_RT_STRIDE">
<value name="Tiled" value="0x100000"/>
</field>
</struct>
<!-- Payloads follow, right-shifted by 4 because of course -->
@ -106,7 +109,8 @@
<field name="Unk 1" size="36" start="66" type="hex" modifier="shr(4)"/>
<field name="Compression" size="2" start="106" type="hex"/> <!-- 0 for 64x64 tiling -->
<field name="sRGB" size="1" start="108" type="bool"/>
<field name="Unk 2" size="19" start="109" type="hex"/>
<field name="Unk 2" size="1" start="109" type="bool"/>
<field name="Stride" size="18" start="110" type="hex" modifier="shr(4)"/>
</struct>
<enum name="Wrap">

View file

@ -343,7 +343,8 @@ agx_create_sampler_view(struct pipe_context *pctx,
cfg.height = texture->height0;
cfg.srgb = (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB);
cfg.unk_1 = rsrc->bo->ptr.gpu;
cfg.unk_2 = 0x20000;
cfg.unk_2 = false;
cfg.stride = AGX_RT_STRIDE_TILED;
}
/* Initialize base object */
@ -579,7 +580,7 @@ agx_set_framebuffer_state(struct pipe_context *pctx,
cfg.width = state->width;
cfg.height = state->height;
cfg.buffer = tex->bo->ptr.gpu;
cfg.unk_100 = 0x1000000;
cfg.stride = AGX_RT_STRIDE_TILED;
};
}
}