#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)
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,
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) |