mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 07:20:16 +01:00
freedreno/a6xx: enable tiled images
Turns out we can write to tiled images as well as read. This avoids having to linearize or do the tiling in the shader. Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
0629b2a462
commit
908d5ee9eb
2 changed files with 8 additions and 5 deletions
|
|
@ -5406,6 +5406,12 @@ static inline uint32_t A6XX_TEX_CONST_10_FLAG_BUFFER_ARRAY_PITCH(uint32_t val)
|
|||
#define REG_A6XX_TEX_CONST_15 0x0000000f
|
||||
|
||||
#define REG_A6XX_IBO_0 0x00000000
|
||||
#define A6XX_IBO_0_TILE_MODE__MASK 0x00000003
|
||||
#define A6XX_IBO_0_TILE_MODE__SHIFT 0
|
||||
static inline uint32_t A6XX_IBO_0_TILE_MODE(enum a6xx_tile_mode val)
|
||||
{
|
||||
return ((val) << A6XX_IBO_0_TILE_MODE__SHIFT) & A6XX_IBO_0_TILE_MODE__MASK;
|
||||
}
|
||||
#define A6XX_IBO_0_FMT__MASK 0x3fc00000
|
||||
#define A6XX_IBO_0_FMT__SHIFT 22
|
||||
static inline uint32_t A6XX_IBO_0_FMT(enum a6xx_tex_fmt val)
|
||||
|
|
|
|||
|
|
@ -157,8 +157,6 @@ static void translate_buf(struct fd6_image *img, const struct pipe_shader_buffer
|
|||
|
||||
static void emit_image_tex(struct fd_ringbuffer *ring, struct fd6_image *img)
|
||||
{
|
||||
debug_assert(fd_resource(img->prsc)->tile_mode == 0);
|
||||
|
||||
OUT_RING(ring, A6XX_TEX_CONST_0_FMT(img->fmt) |
|
||||
A6XX_TEX_CONST_0_TILE_MODE(fd_resource(img->prsc)->tile_mode) |
|
||||
fd6_tex_swiz(img->prsc, img->pfmt, PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y,
|
||||
|
|
@ -208,9 +206,8 @@ fd6_emit_ssbo_tex(struct fd_ringbuffer *ring, const struct pipe_shader_buffer *p
|
|||
|
||||
static void emit_image_ssbo(struct fd_ringbuffer *ring, struct fd6_image *img)
|
||||
{
|
||||
debug_assert(fd_resource(img->prsc)->tile_mode == 0);
|
||||
|
||||
OUT_RING(ring, A6XX_IBO_0_FMT(img->fmt));
|
||||
OUT_RING(ring, A6XX_IBO_0_FMT(img->fmt) |
|
||||
A6XX_IBO_0_TILE_MODE(fd_resource(img->prsc)->tile_mode));
|
||||
OUT_RING(ring, A6XX_IBO_1_WIDTH(img->width) |
|
||||
A6XX_IBO_1_HEIGHT(img->height));
|
||||
OUT_RING(ring, A6XX_IBO_2_PITCH(img->pitch) |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue