mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 16:48:07 +02:00
amd: replace SI_BIG_ENDIAN with UTIL_ARCH_BIG_ENDIAN
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21525>
This commit is contained in:
parent
e0c8b24e22
commit
98eee7dee3
5 changed files with 5 additions and 11 deletions
|
|
@ -957,7 +957,7 @@ radv_translate_colorformat(VkFormat format)
|
|||
uint32_t
|
||||
radv_colorformat_endian_swap(uint32_t colorformat)
|
||||
{
|
||||
if (0 /*SI_BIG_ENDIAN*/) {
|
||||
if (0 /*UTIL_ARCH_BIG_ENDIAN*/) {
|
||||
switch (colorformat) {
|
||||
/* 8-bit buffers. */
|
||||
case V_028C70_COLOR_8:
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||
return sscreen->info.has_graphics;
|
||||
|
||||
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
|
||||
return !SI_BIG_ENDIAN && sscreen->info.has_userptr;
|
||||
return !UTIL_ARCH_BIG_ENDIAN && sscreen->info.has_userptr;
|
||||
|
||||
case PIPE_CAP_DEVICE_PROTECTED_SURFACE:
|
||||
return sscreen->info.has_tmz_support;
|
||||
|
|
|
|||
|
|
@ -39,12 +39,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if UTIL_ARCH_BIG_ENDIAN
|
||||
#define SI_BIG_ENDIAN 1
|
||||
#else
|
||||
#define SI_BIG_ENDIAN 0
|
||||
#endif
|
||||
|
||||
#define ATI_VENDOR_ID 0x1002
|
||||
#define SI_NOT_QUERY 0xffffffff
|
||||
|
||||
|
|
|
|||
|
|
@ -1755,7 +1755,7 @@ uint32_t si_translate_colorformat(enum amd_gfx_level gfx_level,
|
|||
|
||||
static uint32_t si_colorformat_endian_swap(uint32_t colorformat)
|
||||
{
|
||||
if (SI_BIG_ENDIAN) {
|
||||
if (UTIL_ARCH_BIG_ENDIAN) {
|
||||
switch (colorformat) {
|
||||
/* 8-bit buffers. */
|
||||
case V_028C70_COLOR_8:
|
||||
|
|
@ -2587,7 +2587,7 @@ static void si_initialize_color_surface(struct si_context *sctx, struct si_surfa
|
|||
S_028C70_NUMBER_TYPE(ntype);
|
||||
|
||||
if (sctx->gfx_level >= GFX11) {
|
||||
assert(!SI_BIG_ENDIAN);
|
||||
assert(!UTIL_ARCH_BIG_ENDIAN);
|
||||
color_info |= S_028C70_FORMAT_GFX11(format);
|
||||
} else {
|
||||
color_info |= S_028C70_FORMAT_GFX6(format) | S_028C70_ENDIAN(endian);
|
||||
|
|
|
|||
|
|
@ -1489,7 +1489,7 @@ static void si_emit_draw_packets(struct si_context *sctx, const struct pipe_draw
|
|||
index_type = (((index_size >> 2) | (index_size << 1)) & 0x3) |
|
||||
S_028A7C_DISABLE_INSTANCE_PACKING(disable_instance_packing);
|
||||
|
||||
if (GFX_VERSION <= GFX7 && SI_BIG_ENDIAN) {
|
||||
if (GFX_VERSION <= GFX7 && UTIL_ARCH_BIG_ENDIAN) {
|
||||
/* GFX7 doesn't support ubyte indices. */
|
||||
index_type |= index_size == 2 ? V_028A7C_VGT_DMA_SWAP_16_BIT
|
||||
: V_028A7C_VGT_DMA_SWAP_32_BIT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue