diff --git a/renderdoc/driver/shaders/dxbc/dxbc_bytecode.h b/renderdoc/driver/shaders/dxbc/dxbc_bytecode.h index 976a8adfe..f21a1944c 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_bytecode.h +++ b/renderdoc/driver/shaders/dxbc/dxbc_bytecode.h @@ -773,6 +773,8 @@ struct Operand // these correspond to the bits in OperandModifier FLAG_NEG = 0x01, FLAG_ABS = 0x02, + + FLAG_NONUNIFORM = 0x04, } flags; MinimumPrecision precision; diff --git a/renderdoc/driver/shaders/dxbc/dxbc_bytecode_ops.cpp b/renderdoc/driver/shaders/dxbc/dxbc_bytecode_ops.cpp index 3c95230e2..40194ea92 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_bytecode_ops.cpp +++ b/renderdoc/driver/shaders/dxbc/dxbc_bytecode_ops.cpp @@ -566,6 +566,9 @@ rdcstr Operand::toString(const DXBC::Reflection *reflection, ToString toStrFlags if(decl && !regstr.empty()) str += StringFormat::Fmt(" (%s)", regstr.c_str()); + if(flags & FLAG_NONUNIFORM) + str += " { nonuniform }"; + if(!name.empty()) { rdcstr n = name; @@ -1042,6 +1045,8 @@ bool Program::DecodeOperand(uint32_t *&tokenStream, ToString flags, Operand &ret { retOper.flags = Operand::Flags(retOper.flags | ExtendedOperand::Modifier.Get(OperandTokenN)); retOper.precision = ExtendedOperand::MinPrecision.Get(OperandTokenN); + if(ExtendedOperand::NonUniform.Get(OperandTokenN)) + retOper.flags = Operand::Flags(retOper.flags | Operand::FLAG_NONUNIFORM); } else { @@ -1349,7 +1354,7 @@ bool Program::DecodeDecl(uint32_t *&tokenStream, Declaration &retDecl, bool frie if(retDecl.operand.indices[1].index == retDecl.operand.indices[2].index) retDecl.str += StringFormat::Fmt(",reg=%u", retDecl.operand.indices[1].index); else if(retDecl.operand.indices[2].index == 0xffffffff) - retDecl.str += StringFormat::Fmt(",regs=%u:unbound", retDecl.operand.indices[1].index); + retDecl.str += StringFormat::Fmt(",regs=%u:unbounded", retDecl.operand.indices[1].index); else retDecl.str += StringFormat::Fmt(",regs=%u:%u", retDecl.operand.indices[1].index, retDecl.operand.indices[2].index); @@ -1469,6 +1474,8 @@ bool Program::DecodeDecl(uint32_t *&tokenStream, Declaration &retDecl, bool frie if(retDecl.operand.indices[1].index == retDecl.operand.indices[2].index) retDecl.str += StringFormat::Fmt(",reg=%u", retDecl.operand.indices[1].index); + else if(retDecl.operand.indices[2].index == 0xffffffff) + retDecl.str += StringFormat::Fmt(",regs=%u:unbounded", retDecl.operand.indices[1].index); else retDecl.str += StringFormat::Fmt(",regs=%u:%u", retDecl.operand.indices[1].index, retDecl.operand.indices[2].index); @@ -1528,6 +1535,8 @@ bool Program::DecodeDecl(uint32_t *&tokenStream, Declaration &retDecl, bool frie if(retDecl.operand.indices[1].index == retDecl.operand.indices[2].index) retDecl.str += StringFormat::Fmt(",reg=%u", retDecl.operand.indices[1].index); + else if(retDecl.operand.indices[2].index == 0xffffffff) + retDecl.str += StringFormat::Fmt(",regs=%u:unbounded", retDecl.operand.indices[1].index); else retDecl.str += StringFormat::Fmt(",regs=%u:%u", retDecl.operand.indices[1].index, retDecl.operand.indices[2].index); @@ -1737,6 +1746,8 @@ bool Program::DecodeDecl(uint32_t *&tokenStream, Declaration &retDecl, bool frie if(retDecl.operand.indices[1].index == retDecl.operand.indices[2].index) retDecl.str += StringFormat::Fmt(",reg=%u", retDecl.operand.indices[1].index); + else if(retDecl.operand.indices[2].index == 0xffffffff) + retDecl.str += StringFormat::Fmt(",regs=%u:unbounded", retDecl.operand.indices[1].index); else retDecl.str += StringFormat::Fmt(",regs=%u:%u", retDecl.operand.indices[1].index, retDecl.operand.indices[2].index); @@ -1783,6 +1794,8 @@ bool Program::DecodeDecl(uint32_t *&tokenStream, Declaration &retDecl, bool frie if(retDecl.operand.indices[1].index == retDecl.operand.indices[2].index) retDecl.str += StringFormat::Fmt(",reg=%u", retDecl.operand.indices[1].index); + else if(retDecl.operand.indices[2].index == 0xffffffff) + retDecl.str += StringFormat::Fmt(",regs=%u:unbounded", retDecl.operand.indices[1].index); else retDecl.str += StringFormat::Fmt(",regs=%u:%u", retDecl.operand.indices[1].index, retDecl.operand.indices[2].index); @@ -1842,6 +1855,8 @@ bool Program::DecodeDecl(uint32_t *&tokenStream, Declaration &retDecl, bool frie if(retDecl.operand.indices[1].index == retDecl.operand.indices[2].index) retDecl.str += StringFormat::Fmt(",reg=%u", retDecl.operand.indices[1].index); + else if(retDecl.operand.indices[2].index == 0xffffffff) + retDecl.str += StringFormat::Fmt(",regs=%u:unbounded", retDecl.operand.indices[1].index); else retDecl.str += StringFormat::Fmt(",regs=%u:%u", retDecl.operand.indices[1].index, retDecl.operand.indices[2].index);