nv50/ir: add wrap mode for shift operations

D3D1x specifies that only the low 5 bit of the shift are used.
This commit is contained in:
Christoph Bumiller 2011-10-17 23:02:16 +02:00
parent 974102c7c2
commit 0e4e0ca6df
3 changed files with 5 additions and 2 deletions

View file

@ -136,6 +136,7 @@ enum operation
#define NV50_IR_SUBOP_LDC_IL 1
#define NV50_IR_SUBOP_LDC_IS 2
#define NV50_IR_SUBOP_LDC_ISL 3
#define NV50_IR_SUBOP_SHIFT_WRAP 1
enum DataType
{

View file

@ -437,6 +437,8 @@ void Instruction::print() const
PRINT(" %sBB:%i", colour[TXT_BRA], asFlow()->target.bb->getId());
} else {
PRINT("%s ", operationStr[op]);
if (subOp)
PRINT("(SUBOP:%u) ", subOp);
if (perPatch)
PRINT("patch ");
if (asTex())

View file

@ -665,8 +665,8 @@ CodeEmitterNVC0::emitShift(const Instruction *i)
emitForm_A(i, HEX64(60000000, 00000003));
}
if (0)
code[0] |= 1 << 9; // clamp shift amount
if (i->subOp == NV50_IR_SUBOP_SHIFT_WRAP)
code[0] |= 1 << 9;
}
void