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:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user