diff options
author | Marek Olšák <[email protected]> | 2016-04-24 13:23:52 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-05-09 13:11:40 +0200 |
commit | 172bfdaa9e80342ade3f023f72d455d76713b866 (patch) | |
tree | c11ba92f19b948c30fc7d555dc6b54949d111ad0 /src/gallium/drivers/r300/r300_reg.h | |
parent | e54b2e902aba22f697c0ba8622cd0a905f1edfff (diff) |
r300g: add support for PIPE_FORMAT_x8R8G8B8_*
And set endian swap for packed formats the way it should be done
in theory.
This allows big endian to work again, but it can still be buggy.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71789
Cc: 11.1 11.2 <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300/r300_reg.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_reg.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/gallium/drivers/r300/r300_reg.h b/src/gallium/drivers/r300/r300_reg.h index 9c373c5d111..9c93b84ee5f 100644 --- a/src/gallium/drivers/r300/r300_reg.h +++ b/src/gallium/drivers/r300/r300_reg.h @@ -1700,10 +1700,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #define R300_TX_OFFSET_6 0x4558 #define R300_TX_OFFSET_7 0x455C -# define R300_TXO_ENDIAN_NO_SWAP (0 << 0) -# define R300_TXO_ENDIAN_BYTE_SWAP (1 << 0) -# define R300_TXO_ENDIAN_WORD_SWAP (2 << 0) -# define R300_TXO_ENDIAN_HALFDW_SWAP (3 << 0) +# define R300_TXO_ENDIAN(x) ((x) << 0) # define R300_TXO_MACRO_TILE_LINEAR (0 << 2) # define R300_TXO_MACRO_TILE_TILED (1 << 2) # define R300_TXO_MACRO_TILE(x) ((x) << 2) @@ -2418,10 +2415,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. # define R300_COLOR_MICROTILE_ENABLE (1 << 17) # define R300_COLOR_MICROTILE_ENABLE_SQUARE (2 << 17) /* Only available in 16-bit */ # define R300_COLOR_MICROTILE(x) ((x) << 17) -# define R300_COLOR_ENDIAN_NO_SWAP (0 << 19) -# define R300_COLOR_ENDIAN_WORD_SWAP (1 << 19) -# define R300_COLOR_ENDIAN_DWORD_SWAP (2 << 19) -# define R300_COLOR_ENDIAN_HALF_DWORD_SWAP (3 << 19) +# define R300_COLOR_ENDIAN(x) ((x) << 19) # define R500_COLOR_FORMAT_ARGB10101010 (0 << 21) # define R500_COLOR_FORMAT_UV1010 (1 << 21) # define R500_COLOR_FORMAT_CI8 (2 << 21) /* 2D only */ @@ -2693,10 +2687,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. # define R300_DEPTHMICROTILE_TILED (1 << 17) # define R300_DEPTHMICROTILE_TILED_SQUARE (2 << 17) # define R300_DEPTHMICROTILE(x) ((x) << 17) -# define R300_DEPTHENDIAN_NO_SWAP (0 << 18) -# define R300_DEPTHENDIAN_WORD_SWAP (1 << 18) -# define R300_DEPTHENDIAN_DWORD_SWAP (2 << 18) -# define R300_DEPTHENDIAN_HALF_DWORD_SWAP (3 << 18) +# define R300_DEPTHENDIAN(x) ((x) << 19) + +#define R300_SURF_NO_SWAP 0 +#define R300_SURF_WORD_SWAP 1 +#define R300_SURF_DWORD_SWAP 2 +#define R300_SURF_HALF_DWORD_SWAP 3 /* Z Buffer Clear Value */ #define R300_ZB_DEPTHCLEARVALUE 0x4f28 |