mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 06:50:11 +01:00
nouveau: avoid LTO ODR warning (v2)
../src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp:69:8: warning: type ‘struct opProperties’ violates the C++ One Definition Rule [-Wodr]
69 | struct opProperties
| ^
../src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp:88:8: note: a different type is defined in another translation unit
88 | struct opProperties
| ^
../src/gallium/drivers/nouveau/codegen/nv50_ir_target_nv50.cpp:77:17: note: the first difference of corresponding definitions is field ‘fShared’
77 | unsigned int fShared : 3;
| ^
../src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp:96:17: note: a field with different name is defined in another translation unit
96 | unsigned int fImmd : 4; // last bit indicates if full immediate is suppoted
nvc0 code also has the same thing.
v2: rename both paths (Karol)
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5873>
This commit is contained in:
parent
ac002b15d3
commit
59b4c623c9
3 changed files with 11 additions and 11 deletions
|
|
@ -66,7 +66,7 @@ TargetNV50::getBuiltinOffset(int builtin) const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct opProperties
|
struct nv50_opProperties
|
||||||
{
|
{
|
||||||
operation op;
|
operation op;
|
||||||
unsigned int mNeg : 4;
|
unsigned int mNeg : 4;
|
||||||
|
|
@ -79,7 +79,7 @@ struct opProperties
|
||||||
unsigned int fImm : 3;
|
unsigned int fImm : 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct opProperties _initProps[] =
|
static const struct nv50_opProperties _initProps[] =
|
||||||
{
|
{
|
||||||
// neg abs not sat c[] s[], a[], imm
|
// neg abs not sat c[] s[], a[], imm
|
||||||
{ OP_ADD, 0x3, 0x0, 0x0, 0x8, 0x2, 0x1, 0x1, 0x2 },
|
{ OP_ADD, 0x3, 0x0, 0x0, 0x8, 0x2, 0x1, 0x1, 0x2 },
|
||||||
|
|
@ -172,7 +172,7 @@ void TargetNV50::initOpInfo()
|
||||||
opInfo[noPredList[i]].predicate = 0;
|
opInfo[noPredList[i]].predicate = 0;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(_initProps); ++i) {
|
for (i = 0; i < ARRAY_SIZE(_initProps); ++i) {
|
||||||
const struct opProperties *prop = &_initProps[i];
|
const struct nv50_opProperties *prop = &_initProps[i];
|
||||||
|
|
||||||
for (int s = 0; s < 3; ++s) {
|
for (int s = 0; s < 3; ++s) {
|
||||||
if (prop->mNeg & (1 << s))
|
if (prop->mNeg & (1 << s))
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ TargetNVC0::getBuiltinOffset(int builtin) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct opProperties
|
struct nvc0_opProperties
|
||||||
{
|
{
|
||||||
operation op;
|
operation op;
|
||||||
unsigned int mNeg : 4;
|
unsigned int mNeg : 4;
|
||||||
|
|
@ -96,7 +96,7 @@ struct opProperties
|
||||||
unsigned int fImmd : 4; // last bit indicates if full immediate is suppoted
|
unsigned int fImmd : 4; // last bit indicates if full immediate is suppoted
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct opProperties _initProps[] =
|
static const struct nvc0_opProperties _initProps[] =
|
||||||
{
|
{
|
||||||
// neg abs not sat c[] imm
|
// neg abs not sat c[] imm
|
||||||
{ OP_ADD, 0x3, 0x3, 0x0, 0x8, 0x2, 0x2 | 0x8 },
|
{ OP_ADD, 0x3, 0x3, 0x0, 0x8, 0x2, 0x2 | 0x8 },
|
||||||
|
|
@ -146,7 +146,7 @@ static const struct opProperties _initProps[] =
|
||||||
{ OP_PINTERP, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0 },
|
{ OP_PINTERP, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct opProperties _initPropsNVE4[] = {
|
static const struct nvc0_opProperties _initPropsNVE4[] = {
|
||||||
{ OP_SULDB, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0 },
|
{ OP_SULDB, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0 },
|
||||||
{ OP_SUSTB, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0 },
|
{ OP_SUSTB, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0 },
|
||||||
{ OP_SUSTP, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0 },
|
{ OP_SUSTP, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0 },
|
||||||
|
|
@ -155,7 +155,7 @@ static const struct opProperties _initPropsNVE4[] = {
|
||||||
{ OP_SUEAU, 0x0, 0x0, 0x0, 0x0, 0x6, 0x2 }
|
{ OP_SUEAU, 0x0, 0x0, 0x0, 0x0, 0x6, 0x2 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct opProperties _initPropsGM107[] = {
|
static const struct nvc0_opProperties _initPropsGM107[] = {
|
||||||
{ OP_SULDB, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2 },
|
{ OP_SULDB, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2 },
|
||||||
{ OP_SULDP, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2 },
|
{ OP_SULDP, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2 },
|
||||||
{ OP_SUSTB, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4 },
|
{ OP_SUSTB, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4 },
|
||||||
|
|
@ -165,10 +165,10 @@ static const struct opProperties _initPropsGM107[] = {
|
||||||
{ OP_XMAD, 0x0, 0x0, 0x0, 0x0, 0x6, 0x2 },
|
{ OP_XMAD, 0x0, 0x0, 0x0, 0x0, 0x6, 0x2 },
|
||||||
};
|
};
|
||||||
|
|
||||||
void TargetNVC0::initProps(const struct opProperties *props, int size)
|
void TargetNVC0::initProps(const struct nvc0_opProperties *props, int size)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < size; ++i) {
|
for (int i = 0; i < size; ++i) {
|
||||||
const struct opProperties *prop = &props[i];
|
const struct nvc0_opProperties *prop = &props[i];
|
||||||
|
|
||||||
for (int s = 0; s < 3; ++s) {
|
for (int s = 0; s < 3; ++s) {
|
||||||
if (prop->mNeg & (1 << s))
|
if (prop->mNeg & (1 << s))
|
||||||
|
|
|
||||||
|
|
@ -31,14 +31,14 @@ namespace nv50_ir {
|
||||||
|
|
||||||
#define NVC0_BUILTIN_COUNT 4
|
#define NVC0_BUILTIN_COUNT 4
|
||||||
|
|
||||||
struct opProperties;
|
struct nvc0_opProperties;
|
||||||
|
|
||||||
class TargetNVC0 : public Target
|
class TargetNVC0 : public Target
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TargetNVC0(unsigned int chipset);
|
TargetNVC0(unsigned int chipset);
|
||||||
|
|
||||||
void initProps(const struct opProperties *props, int size);
|
void initProps(const struct nvc0_opProperties *props, int size);
|
||||||
|
|
||||||
virtual CodeEmitter *getCodeEmitter(Program::Type);
|
virtual CodeEmitter *getCodeEmitter(Program::Type);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue