util: Fix/silence variable shadowing warnings
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7552>
This commit is contained in:
@@ -382,6 +382,9 @@ struct util_format_unpack_description {
|
||||
typedef void (*util_format_fetch_rgba_func_ptr)(void *dst, const uint8_t *src,
|
||||
unsigned i, unsigned j);
|
||||
|
||||
/* Silence warnings triggered by sharing function/struct names */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
const struct util_format_description *
|
||||
util_format_description(enum pipe_format format) ATTRIBUTE_CONST;
|
||||
|
||||
@@ -390,6 +393,7 @@ util_format_pack_description(enum pipe_format format) ATTRIBUTE_CONST;
|
||||
|
||||
const struct util_format_unpack_description *
|
||||
util_format_unpack_description(enum pipe_format format) ATTRIBUTE_CONST;
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
/**
|
||||
* Returns a function to fetch a single pixel (i, j) from a block.
|
||||
|
||||
@@ -123,7 +123,7 @@ struct float16_t {
|
||||
uint16_t bits;
|
||||
float16_t(float f) : bits(_mesa_float_to_half(f)) {}
|
||||
float16_t(double d) : bits(_mesa_float_to_half(d)) {}
|
||||
float16_t(uint16_t bits) : bits(bits) {}
|
||||
float16_t(uint16_t raw_bits) : bits(raw_bits) {}
|
||||
static float16_t one() { return float16_t(FP16_ONE); }
|
||||
static float16_t zero() { return float16_t(FP16_ZERO); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user