cl_reloc(vc4, &vc4->rcl, ctex->bo, csurf->offset);
cl_u16(&vc4->rcl, width);
cl_u16(&vc4->rcl, height);
- cl_u16(&vc4->rcl, (VC4_RENDER_CONFIG_MEMORY_FORMAT_LINEAR |
+ cl_u16(&vc4->rcl, ((ctex->tiling <<
+ VC4_RENDER_CONFIG_MEMORY_FORMAT_SHIFT) |
VC4_RENDER_CONFIG_FORMAT_RGBA8888 |
VC4_RENDER_CONFIG_EARLY_Z_COVERAGE_DISABLE));
cl_u8(&vc4->rcl, VC4_PACKET_LOAD_TILE_BUFFER_GENERAL);
cl_u8(&vc4->rcl,
VC4_LOADSTORE_TILE_BUFFER_COLOR |
- VC4_LOADSTORE_TILE_BUFFER_FORMAT_RASTER);
+ (ctex->tiling <<
+ VC4_LOADSTORE_TILE_BUFFER_FORMAT_SHIFT));
cl_u8(&vc4->rcl,
VC4_LOADSTORE_TILE_BUFFER_RGBA8888);
cl_reloc(vc4, &vc4->rcl, ctex->bo,
} __attribute__ ((__packed__));
/** @{
+ * Bits used by packets like VC4_PACKET_STORE_TILE_BUFFER_GENERAL and
+ * VC4_PACKET_TILE_RENDERING_MODE_CONFIG.
+*/
+#define VC4_TILING_FORMAT_LINEAR 0
+#define VC4_TILING_FORMAT_T 1
+#define VC4_TILING_FORMAT_LT 2
+/** @} */
+
+/** @{
*
* byte 2 of VC4_PACKET_STORE_TILE_BUFFER_GENERAL and
* VC4_PACKET_LOAD_TILE_BUFFER_GENERAL (low bits of the address)
#define VC4_LOADSTORE_TILE_BUFFER_RGBA8888 (0 << 0)
#define VC4_LOADSTORE_TILE_BUFFER_BGR565_DITHER (1 << 0)
#define VC4_LOADSTORE_TILE_BUFFER_BGR565 (2 << 0)
+#define VC4_LOADSTORE_TILE_BUFFER_MASK (3 << 0)
/** @} */
/** @{
#define VC4_STORE_TILE_BUFFER_MODE_DECIMATE_X4 (1 << 6)
#define VC4_STORE_TILE_BUFFER_MODE_DECIMATE_X16 (2 << 6)
-#define VC4_LOADSTORE_TILE_BUFFER_FORMAT_RASTER (0 << 4)
-#define VC4_LOADSTORE_TILE_BUFFER_FORMAT_T (1 << 4)
-#define VC4_LOADSTORE_TILE_BUFFER_FORMAT_LT (2 << 4)
+/** The values of the field are VC4_TILING_FORMAT_* */
+#define VC4_LOADSTORE_TILE_BUFFER_FORMAT_MASK (3 << 4)
+#define VC4_LOADSTORE_TILE_BUFFER_FORMAT_SHIFT 4
+
#define VC4_LOADSTORE_TILE_BUFFER_NONE (0 << 0)
#define VC4_LOADSTORE_TILE_BUFFER_COLOR (1 << 0)
#define VC4_RENDER_CONFIG_COVERAGE_MODE (1 << 9)
#define VC4_RENDER_CONFIG_ENABLE_VG_MASK (1 << 8)
-#define VC4_RENDER_CONFIG_MEMORY_FORMAT_LINEAR (0 << 6)
-#define VC4_RENDER_CONFIG_MEMORY_FORMAT_T (1 << 6)
-#define VC4_RENDER_CONFIG_MEMORY_FORMAT_LT (2 << 6)
+/** The values of the field are VC4_TILING_FORMAT_* */
+#define VC4_RENDER_CONFIG_MEMORY_FORMAT_MASK (3 << 6)
+#define VC4_RENDER_CONFIG_MEMORY_FORMAT_SHIFT 6
#define VC4_RENDER_CONFIG_DECIMATE_MODE_1X (0 << 4)
#define VC4_RENDER_CONFIG_DECIMATE_MODE_4X (1 << 4)
vc4_setup_slices(rsc);
+ rsc->tiling = VC4_TILING_FORMAT_LINEAR;
rsc->bo = vc4_bo_alloc(vc4_screen(pscreen),
rsc->slices[0].offset +
rsc->slices[0].size0 * prsc->depth0,
if (!rsc)
return NULL;
+ rsc->tiling = VC4_TILING_FORMAT_LINEAR;
rsc->bo = vc4_screen_bo_from_handle(pscreen, handle, &slice->stride);
if (!rsc->bo)
goto fail;