mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
util: convert usage of uint to unsigned in u_format.h
Because uint comes from pipe/p_compiler.h, and that depends will be removed in future 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/19676>
This commit is contained in:
parent
b728bed567
commit
6832a9433d
1 changed files with 9 additions and 9 deletions
|
|
@ -820,7 +820,7 @@ util_format_is_rgbx_or_bgrx(enum pipe_format format)
|
|||
/**
|
||||
* Return total bits needed for the pixel format per block.
|
||||
*/
|
||||
static inline uint
|
||||
static inline unsigned
|
||||
util_format_get_blocksizebits(enum pipe_format format)
|
||||
{
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
|
|
@ -836,11 +836,11 @@ util_format_get_blocksizebits(enum pipe_format format)
|
|||
/**
|
||||
* Return bytes per block (not pixel) for the given format.
|
||||
*/
|
||||
static inline uint
|
||||
static inline unsigned
|
||||
util_format_get_blocksize(enum pipe_format format)
|
||||
{
|
||||
uint bits = util_format_get_blocksizebits(format);
|
||||
uint bytes = bits / 8;
|
||||
unsigned bits = util_format_get_blocksizebits(format);
|
||||
unsigned bytes = bits / 8;
|
||||
|
||||
assert(bits % 8 == 0);
|
||||
/* Some formats have bits set to 0, let's default to 1.*/
|
||||
|
|
@ -851,7 +851,7 @@ util_format_get_blocksize(enum pipe_format format)
|
|||
return bytes;
|
||||
}
|
||||
|
||||
static inline uint
|
||||
static inline unsigned
|
||||
util_format_get_blockwidth(enum pipe_format format)
|
||||
{
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
|
|
@ -864,7 +864,7 @@ util_format_get_blockwidth(enum pipe_format format)
|
|||
return desc->block.width;
|
||||
}
|
||||
|
||||
static inline uint
|
||||
static inline unsigned
|
||||
util_format_get_blockheight(enum pipe_format format)
|
||||
{
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
|
|
@ -877,7 +877,7 @@ util_format_get_blockheight(enum pipe_format format)
|
|||
return desc->block.height;
|
||||
}
|
||||
|
||||
static inline uint
|
||||
static inline unsigned
|
||||
util_format_get_blockdepth(enum pipe_format format)
|
||||
{
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
|
|
@ -938,10 +938,10 @@ util_format_get_2d_size(enum pipe_format format,
|
|||
return util_format_get_nblocksy(format, height) * stride;
|
||||
}
|
||||
|
||||
static inline uint
|
||||
static inline unsigned
|
||||
util_format_get_component_bits(enum pipe_format format,
|
||||
enum util_format_colorspace colorspace,
|
||||
uint component)
|
||||
unsigned component)
|
||||
{
|
||||
const struct util_format_description *desc = util_format_description(format);
|
||||
enum util_format_colorspace desc_colorspace;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue