diff options
author | Eric Anholt <[email protected]> | 2014-08-02 20:19:38 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-08-11 14:45:31 -0700 |
commit | ff4748491b27a0b52564e48788b70cd617ed0ff2 (patch) | |
tree | 00e03ab808151a143de38ca600f6b5e33c4ffd7c /src/gallium/drivers/vc4/vc4_packet.h | |
parent | 0bc2aed90fdfcedad501f769cbd2ae61b5a0ecb8 (diff) |
vc4: Store the (currently always linear) tiling format in the resource.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_packet.h')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_packet.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/gallium/drivers/vc4/vc4_packet.h b/src/gallium/drivers/vc4/vc4_packet.h index 35ce7300f3f..732463c22ab 100644 --- a/src/gallium/drivers/vc4/vc4_packet.h +++ b/src/gallium/drivers/vc4/vc4_packet.h @@ -82,6 +82,15 @@ enum vc4_packet { } __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) @@ -106,6 +115,7 @@ enum vc4_packet { #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) /** @} */ /** @{ @@ -117,9 +127,10 @@ enum vc4_packet { #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) @@ -194,9 +205,9 @@ enum vc4_packet { #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) |