mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
nir: Make nir_const_value a union
There's no good reason for it to be a struct of an anonymous union. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96221 Tested-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
e7776fa947
commit
15e553daf0
2 changed files with 8 additions and 10 deletions
|
|
@ -1266,15 +1266,13 @@ nir_tex_instr_src_index(nir_tex_instr *instr, nir_tex_src_type type)
|
|||
return -1;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
float f32[4];
|
||||
double f64[4];
|
||||
int32_t i32[4];
|
||||
uint32_t u32[4];
|
||||
int64_t i64[4];
|
||||
uint64_t u64[4];
|
||||
};
|
||||
typedef union {
|
||||
float f32[4];
|
||||
double f64[4];
|
||||
int32_t i32[4];
|
||||
uint32_t u32[4];
|
||||
int64_t i64[4];
|
||||
uint64_t u64[4];
|
||||
} nir_const_value;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ static nir_const_value
|
|||
evaluate_${name}(unsigned num_components, unsigned bit_size,
|
||||
nir_const_value *_src)
|
||||
{
|
||||
nir_const_value _dst_val = { { {0, 0, 0, 0} } };
|
||||
nir_const_value _dst_val = { {0, } };
|
||||
|
||||
switch (bit_size) {
|
||||
% for bit_size in [32, 64]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue