mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 10:10:09 +01:00
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:
parent
bacff07018
commit
118682dd83
2 changed files with 9 additions and 4 deletions
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue