diff options
author | Marek Olšák <[email protected]> | 2012-10-02 22:02:54 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-11-06 02:54:16 +0100 |
commit | 428e37c2da420f7dc14a2ea265f2387270f9bee1 (patch) | |
tree | 3b7b2334962ef164625fdbf9c60b9a155b000915 /src/gallium/drivers/r600/evergreend.h | |
parent | c80ceded6f0e420b4be28637155480225daefd15 (diff) |
r600g: add in-place DB decompression and texturing with DB tiling
The decompression is done in-place and only the compressed tiles are
decompressed. Note: R6xx-R7xx can do that only with Z16 and Z32F.
The texture unit is programmed to use non-displayable tiling and depth
ordering of samples, so that it can fetch the texture in the native DB format.
The latest version of the libdrm surface allocator is required for stencil
texturing to work. The old one didn't create the mipmap tree correctly.
We need a separate mipmap tree for stencil, because the stencil mipmap
offsets are not really depth offsets/4.
There are still some known bugs, but this should save some memory and it also
improves performance a little bit in Lightsmark (especially with low
resolutions; tested with Radeon HD 5000).
The DB->CB copy is still used for transfers.
Reviewed-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreend.h')
-rw-r--r-- | src/gallium/drivers/r600/evergreend.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/evergreend.h b/src/gallium/drivers/r600/evergreend.h index 05206912374..c91b2d820d2 100644 --- a/src/gallium/drivers/r600/evergreend.h +++ b/src/gallium/drivers/r600/evergreend.h @@ -1109,9 +1109,13 @@ #define C_030018_INTERLACED 0xFFFFFFBF #define S_030018_TILE_SPLIT(x) (((x) & 0x7) << 29) #define R_03001C_SQ_TEX_RESOURCE_WORD7_0 0x03001C +#define S_03001C_DATA_FORMAT(x) (((x) & 0x3F) << 0) +#define G_03001C_DATA_FORMAT(x) (((x) >> 0) & 0x3F) +#define C_03001C_DATA_FORMAT 0xFFFFFFC0 #define S_03001C_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 6) #define S_03001C_BANK_WIDTH(x) (((x) & 0x3) << 8) #define S_03001C_BANK_HEIGHT(x) (((x) & 0x3) << 10) +#define S_03001C_DEPTH_SAMPLE_ORDER(x) (((x) & 0x1) << 15) #define S_03001C_NUM_BANKS(x) (((x) & 0x3) << 16) #define S_03001C_TYPE(x) (((x) & 0x3) << 30) #define G_03001C_TYPE(x) (((x) >> 30) & 0x3) @@ -1120,9 +1124,6 @@ #define V_03001C_SQ_TEX_VTX_INVALID_BUFFER 0x00000001 #define V_03001C_SQ_TEX_VTX_VALID_TEXTURE 0x00000002 #define V_03001C_SQ_TEX_VTX_VALID_BUFFER 0x00000003 -#define S_03001C_DATA_FORMAT(x) (((x) & 0x3F) << 0) -#define G_03001C_DATA_FORMAT(x) (((x) >> 0) & 0x3F) -#define C_03001C_DATA_FORMAT 0xFFFFFFC0 #define R_030008_SQ_VTX_CONSTANT_WORD2_0 0x030008 #define S_030008_BASE_ADDRESS_HI(x) (((x) & 0xFF) << 0) @@ -1644,6 +1645,9 @@ #define S_02800C_IGNORE_SC_ZRANGE(x) (((x) & 0x1) << 17) #define G_02800C_IGNORE_SC_ZRANGE(x) (((x) >> 17) & 0x1) #define C_02800C_IGNORE_SC_ZRANGE 0xFFFDFFFF +#define S_02800C_DISABLE_PIXEL_RATE_TILES(x) (((x) & 0x1) << 26) +#define G_02800C_DISABLE_PIXEL_RATE_TILES(x) (((x) >> 26) & 0x1) +#define C_02800C_DISABLE_PIXEL_RATE_TILES 0xFFFDFFFF #define R_028010_DB_RENDER_OVERRIDE2 0x00028010 #define R_028014_DB_HTILE_DATA_BASE 0x00028014 #define R_028028_DB_STENCIL_CLEAR 0x00028028 |