mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 19:30:12 +01:00
freedreno/a6xx: Document buffer-specific tex const fields
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20105>
This commit is contained in:
parent
f94bd1d723
commit
3ca90405e8
4 changed files with 11 additions and 10 deletions
|
|
@ -317,8 +317,9 @@ cs_ibo_emit(struct fd_ringbuffer *ring, struct fd_submit *submit,
|
|||
|
||||
OUT_RING(state, A6XX_TEX_CONST_0_FMT(FMT6_32_UINT) | A6XX_TEX_CONST_0_TILE_MODE(0));
|
||||
OUT_RING(state, A6XX_TEX_CONST_1_WIDTH(width) | A6XX_TEX_CONST_1_HEIGHT(height));
|
||||
OUT_RING(state, A6XX_TEX_CONST_2_PITCH(0) | A6XX_TEX_CONST_2_BUFFER |
|
||||
A6XX_TEX_CONST_2_TYPE(A6XX_TEX_BUFFER));
|
||||
OUT_RING(state, A6XX_TEX_CONST_2_PITCH(0) |
|
||||
A6XX_TEX_CONST_2_STRUCTSIZETEXELS(1) |
|
||||
A6XX_TEX_CONST_2_TYPE(A6XX_TEX_BUFFER));
|
||||
OUT_RING(state, A6XX_TEX_CONST_3_ARRAY_PITCH(0));
|
||||
OUT_RELOC(state, kernel->bufs[i], 0, 0, 0);
|
||||
OUT_RING(state, 0x00000000);
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@ 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_BUFFER |
|
||||
descriptor[2] = A6XX_TEX_CONST_2_STRUCTSIZETEXELS(1) |
|
||||
A6XX_TEX_CONST_2_TYPE(A6XX_TEX_BUFFER);
|
||||
descriptor[4] = iova;
|
||||
descriptor[5] = iova >> 32;
|
||||
|
|
|
|||
|
|
@ -3852,13 +3852,13 @@ to upconvert to 32b float internally?
|
|||
</reg32>
|
||||
<reg32 offset="2" name="2">
|
||||
<!--
|
||||
b4 and b31 set for buffer/ssbo case, in which case low 15 bits
|
||||
of size encoded in WIDTH, and high 15 bits encoded in HEIGHT
|
||||
|
||||
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
|
||||
These fields overlap PITCH, and are used instead of
|
||||
PITCH/PITCHALIGN when TYPE is A6XX_TEX_BUFFER.
|
||||
-->
|
||||
<bitfield name="BUFFER" pos="4" type="boolean"/>
|
||||
<doc> probably for D3D structured UAVs, normally set to 1 </doc>
|
||||
<bitfield name="STRUCTSIZETEXELS" low="4" high="15" type="uint"/>
|
||||
<bitfield name="STARTOFFSETTEXELS" low="16" high="21" type="uint"/>
|
||||
|
||||
<!-- 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>
|
||||
|
|
|
|||
|
|
@ -1046,7 +1046,7 @@ write_buffer_descriptor_addr(const struct tu_device *device,
|
|||
dst[1] = DIV_ROUND_UP(range, 4);
|
||||
}
|
||||
dst[2] =
|
||||
A6XX_TEX_CONST_2_BUFFER | A6XX_TEX_CONST_2_TYPE(A6XX_TEX_BUFFER);
|
||||
A6XX_TEX_CONST_2_STRUCTSIZETEXELS(1) | A6XX_TEX_CONST_2_TYPE(A6XX_TEX_BUFFER);
|
||||
dst[3] = 0;
|
||||
dst[4] = A6XX_TEX_CONST_4_BASE_LO(va);
|
||||
dst[5] = A6XX_TEX_CONST_5_BASE_HI(va >> 32);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue