mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
freedreno/a6xx: re-express buffer textures more logically
Same as a5xx, move one bit into the tex type, one as a separate named BUFFER bit. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13805>
This commit is contained in:
parent
8c041f4bf3
commit
20e8e11d64
3 changed files with 7 additions and 4 deletions
|
|
@ -48,6 +48,7 @@ fdl6_tex_type(enum fdl_view_type type, bool storage)
|
|||
STATIC_ASSERT((unsigned) FDL_VIEW_TYPE_2D == (unsigned) A6XX_TEX_2D);
|
||||
STATIC_ASSERT((unsigned) FDL_VIEW_TYPE_CUBE == (unsigned) A6XX_TEX_CUBE);
|
||||
STATIC_ASSERT((unsigned) FDL_VIEW_TYPE_3D == (unsigned) A6XX_TEX_3D);
|
||||
STATIC_ASSERT((unsigned) FDL_VIEW_TYPE_BUFFER == (unsigned) A6XX_TEX_BUFFER);
|
||||
|
||||
return (storage && type == FDL_VIEW_TYPE_CUBE) ?
|
||||
A6XX_TEX_2D : (enum a6xx_tex_type) type;
|
||||
|
|
@ -392,7 +393,8 @@ fdl6_buffer_view_init(uint32_t *descriptor, enum pipe_format format,
|
|||
COND(util_format_is_srgb(format), A6XX_TEX_CONST_0_SRGB);
|
||||
descriptor[1] = A6XX_TEX_CONST_1_WIDTH(elements & ((1 << 15) - 1)) |
|
||||
A6XX_TEX_CONST_1_HEIGHT(elements >> 15);
|
||||
descriptor[2] = A6XX_TEX_CONST_2_UNK4 | A6XX_TEX_CONST_2_UNK31;
|
||||
descriptor[2] = A6XX_TEX_CONST_2_BUFFER |
|
||||
A6XX_TEX_CONST_2_TYPE(A6XX_TEX_BUFFER);
|
||||
descriptor[4] = iova;
|
||||
descriptor[5] = iova >> 32;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ enum fdl_view_type {
|
|||
FDL_VIEW_TYPE_2D = 1,
|
||||
FDL_VIEW_TYPE_CUBE = 2,
|
||||
FDL_VIEW_TYPE_3D = 3,
|
||||
FDL_VIEW_TYPE_BUFFER = 4,
|
||||
};
|
||||
|
||||
enum fdl_chroma_location {
|
||||
|
|
|
|||
|
|
@ -3785,6 +3785,7 @@ to upconvert to 32b float internally?
|
|||
<value name="A6XX_TEX_2D" value="1"/>
|
||||
<value name="A6XX_TEX_CUBE" value="2"/>
|
||||
<value name="A6XX_TEX_3D" value="3"/>
|
||||
<value name="A6XX_TEX_BUFFER" value="4"/>
|
||||
</enum>
|
||||
<reg32 offset="0" name="0">
|
||||
<bitfield name="TILE_MODE" low="0" high="1" type="a6xx_tile_mode"/>
|
||||
|
|
@ -3813,13 +3814,12 @@ to upconvert to 32b float internally?
|
|||
b31 is probably the 'BUFFER' bit.. it is the one that changes
|
||||
behavior of texture in dEQP-GLES31.functional.texture.texture_buffer.render.as_fragment_texture.buffer_size_131071
|
||||
-->
|
||||
<bitfield name="UNK4" pos="4" type="boolean"/>
|
||||
<bitfield name="BUFFER" pos="4" type="boolean"/>
|
||||
<!-- minimum pitch (for mipmap levels): log2(pitchalign / 64) -->
|
||||
<bitfield name="PITCHALIGN" low="0" high="3" type="uint"/>
|
||||
<doc>Pitch in bytes (so actually stride)</doc>
|
||||
<bitfield name="PITCH" low="7" high="28" type="uint"/>
|
||||
<bitfield name="TYPE" low="29" high="30" type="a6xx_tex_type"/>
|
||||
<bitfield name="UNK31" pos="31" type="boolean"/>
|
||||
<bitfield name="TYPE" low="29" high="31" type="a6xx_tex_type"/>
|
||||
</reg32>
|
||||
<reg32 offset="3" name="3">
|
||||
<!--
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue