util: Move pipe_swizzle from p_defines.h to u_formats.h

pipe_swizzle is used by src/util/*, so do the move to decouple src/util/* from gallium

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19522>
This commit is contained in:
Yonggang Luo 2023-06-04 17:12:10 +08:00 committed by Marge Bot
parent 4de7e0034a
commit 9817f7d621
4 changed files with 17 additions and 15 deletions

View file

@ -25,7 +25,8 @@
#define V3D_UTIL_H
#include "common/v3d_device_info.h"
#include "pipe/p_defines.h"
#include "compiler/shader_enums.h"
#include "util/format/u_formats.h"
uint32_t
v3d_csd_choose_workgroups_per_supergroup(struct v3d_device_info *devinfo,

View file

@ -39,6 +39,7 @@
#include "gallivm/lp_bld.h"
#include "pipe/p_defines.h"
#include "util/format/u_formats.h"
struct lp_type;

View file

@ -580,20 +580,6 @@ enum pipe_sprite_coord_mode {
PIPE_SPRITE_COORD_LOWER_LEFT,
};
/**
* Texture & format swizzles
*/
enum pipe_swizzle {
PIPE_SWIZZLE_X,
PIPE_SWIZZLE_Y,
PIPE_SWIZZLE_Z,
PIPE_SWIZZLE_W,
PIPE_SWIZZLE_0,
PIPE_SWIZZLE_1,
PIPE_SWIZZLE_NONE,
PIPE_SWIZZLE_MAX, /**< Number of enums counter (must be last) */
};
/**
* Viewport swizzles
*/

View file

@ -652,6 +652,20 @@ pipe_format_to_chroma_format(enum pipe_format format)
}
}
/**
* Texture & format swizzles
*/
enum pipe_swizzle {
PIPE_SWIZZLE_X,
PIPE_SWIZZLE_Y,
PIPE_SWIZZLE_Z,
PIPE_SWIZZLE_W,
PIPE_SWIZZLE_0,
PIPE_SWIZZLE_1,
PIPE_SWIZZLE_NONE,
PIPE_SWIZZLE_MAX, /**< Number of enums counter (must be last) */
};
#ifdef __cplusplus
}
#endif