2017-12-13 15:32:54 +01:00
|
|
|
#include "dxbc_defs.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
const std::array<DxbcInstFormat, 207> g_instructionFormats = {{
|
|
|
|
/* Add */
|
|
|
|
{ 3, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* And */
|
|
|
|
{ },
|
|
|
|
/* Break */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 0, DxbcInstClass::ControlFlow },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Breakc */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 1, DxbcInstClass::ControlFlow, {
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Call */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 1, DxbcInstClass::ControlFlow, {
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Callc */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 2, DxbcInstClass::ControlFlow, {
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Case */
|
|
|
|
{ },
|
|
|
|
/* Continue */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 0, DxbcInstClass::ControlFlow },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Continuec */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 1, DxbcInstClass::ControlFlow, {
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Cut */
|
2017-12-18 16:41:05 +01:00
|
|
|
{ 0, DxbcInstClass::GeometryEmit },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Default */
|
|
|
|
{ },
|
|
|
|
/* DerivRtx */
|
|
|
|
{ },
|
|
|
|
/* DerivRty */
|
|
|
|
{ },
|
|
|
|
/* Discard */
|
2017-12-18 16:41:05 +01:00
|
|
|
{ 1, DxbcInstClass::ControlFlow, {
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Div */
|
2017-12-17 01:36:41 +01:00
|
|
|
{ 3, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Dp2 */
|
|
|
|
{ 3, DxbcInstClass::VectorDot, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* Dp3 */
|
|
|
|
{ 3, DxbcInstClass::VectorDot, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* Dp4 */
|
|
|
|
{ 3, DxbcInstClass::VectorDot, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* Else */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 0, DxbcInstClass::ControlFlow },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Emit */
|
2017-12-18 16:41:05 +01:00
|
|
|
{ 0, DxbcInstClass::GeometryEmit },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* EmitThenCut */
|
|
|
|
{ },
|
|
|
|
/* EndIf */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 0, DxbcInstClass::ControlFlow },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* EndLoop */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 0, DxbcInstClass::ControlFlow },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* EndSwitch */
|
|
|
|
{ },
|
|
|
|
/* Eq */
|
2017-12-17 01:36:41 +01:00
|
|
|
{ 3, DxbcInstClass::VectorCmp, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Exp */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 2, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Frc */
|
|
|
|
{ },
|
|
|
|
/* FtoI */
|
|
|
|
{ },
|
|
|
|
/* FtoU */
|
|
|
|
{ },
|
|
|
|
/* Ge */
|
2017-12-17 01:36:41 +01:00
|
|
|
{ 3, DxbcInstClass::VectorCmp, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* IAdd */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 3, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* If */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 1, DxbcInstClass::ControlFlow, {
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* IEq */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 3, DxbcInstClass::VectorCmp, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* IGe */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 3, DxbcInstClass::VectorCmp, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* ILt */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 3, DxbcInstClass::VectorCmp, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* IMad */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 4, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* IMax */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 3, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* IMin */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 3, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* IMul */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 4, DxbcInstClass::VectorImul, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* INe */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 3, DxbcInstClass::VectorCmp, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* INeg */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 2, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Sint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* IShl */
|
|
|
|
{ },
|
|
|
|
/* IShr */
|
|
|
|
{ },
|
|
|
|
/* ItoF */
|
|
|
|
{ },
|
|
|
|
/* Label */
|
|
|
|
{ },
|
|
|
|
/* Ld */
|
|
|
|
{ },
|
|
|
|
/* LdMs */
|
|
|
|
{ },
|
|
|
|
/* Log */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 2, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Loop */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 0, DxbcInstClass::ControlFlow },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Lt */
|
2017-12-17 01:36:41 +01:00
|
|
|
{ 3, DxbcInstClass::VectorCmp, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Mad */
|
|
|
|
{ 4, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* Min */
|
2017-12-13 16:35:01 +01:00
|
|
|
{ 3, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Max */
|
2017-12-13 16:35:01 +01:00
|
|
|
{ 3, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* CustomData */
|
|
|
|
{ },
|
|
|
|
/* Mov */
|
|
|
|
{ 2, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* Movc */
|
2017-12-17 01:36:41 +01:00
|
|
|
{ 4, DxbcInstClass::VectorCmov, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Mul */
|
|
|
|
{ 3, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* Ne */
|
2017-12-17 01:36:41 +01:00
|
|
|
{ 3, DxbcInstClass::VectorCmp, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Nop */
|
|
|
|
{ },
|
|
|
|
/* Not */
|
|
|
|
{ },
|
|
|
|
/* Or */
|
|
|
|
{ },
|
|
|
|
/* ResInfo */
|
|
|
|
{ },
|
|
|
|
/* Ret */
|
|
|
|
{ 0, DxbcInstClass::ControlFlow },
|
|
|
|
/* Retc */
|
2017-12-18 11:53:28 +01:00
|
|
|
{ 1, DxbcInstClass::ControlFlow, {
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* RoundNe */
|
|
|
|
{ },
|
|
|
|
/* RoundNi */
|
|
|
|
{ },
|
|
|
|
/* RoundPi */
|
|
|
|
{ },
|
|
|
|
/* RoundZ */
|
|
|
|
{ },
|
|
|
|
/* Rsq */
|
|
|
|
{ 2, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* Sample */
|
|
|
|
{ 4, DxbcInstClass::TextureSample, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* SampleC */
|
|
|
|
{ },
|
|
|
|
/* SampleClz */
|
|
|
|
{ },
|
|
|
|
/* SampleL */
|
|
|
|
{ },
|
|
|
|
/* SampleD */
|
|
|
|
{ },
|
|
|
|
/* SampleB */
|
|
|
|
{ },
|
|
|
|
/* Sqrt */
|
2017-12-18 00:28:54 +01:00
|
|
|
{ 2, DxbcInstClass::VectorAlu, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* Switch */
|
|
|
|
{ },
|
|
|
|
/* SinCos */
|
2017-12-13 16:35:01 +01:00
|
|
|
{ 3, DxbcInstClass::VectorSinCos, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* UDiv */
|
2017-12-18 16:41:05 +01:00
|
|
|
{ 4, DxbcInstClass::VectorIdiv, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* ULt */
|
|
|
|
{ },
|
|
|
|
/* UGe */
|
|
|
|
{ },
|
|
|
|
/* UMul */
|
2017-12-18 16:41:05 +01:00
|
|
|
{ 4, DxbcInstClass::VectorImul, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* UMad */
|
|
|
|
{ },
|
|
|
|
/* UMax */
|
|
|
|
{ },
|
|
|
|
/* UMin */
|
|
|
|
{ },
|
|
|
|
/* UShr */
|
|
|
|
{ },
|
|
|
|
/* UtoF */
|
|
|
|
{ },
|
|
|
|
/* Xor */
|
|
|
|
{ },
|
|
|
|
/* DclResource */
|
|
|
|
{ 2, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::Imm32, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
|
|
|
/* DclConstantBuffer */
|
|
|
|
{ 1, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* DclSampler */
|
|
|
|
{ 1, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* DclIndexRange */
|
|
|
|
{ },
|
|
|
|
/* DclGsOutputPrimitiveTopology */
|
2017-12-18 16:41:05 +01:00
|
|
|
{ 0, DxbcInstClass::Declaration },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* DclGsInputPrimitive */
|
2017-12-18 16:41:05 +01:00
|
|
|
{ 0, DxbcInstClass::Declaration },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* DclMaxOutputVertexCount */
|
2017-12-18 16:41:05 +01:00
|
|
|
{ 1, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::Imm32, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
2017-12-13 15:32:54 +01:00
|
|
|
/* DclInput */
|
|
|
|
{ 1, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* DclInputSgv */
|
|
|
|
{ 2, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::Imm32, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
|
|
|
/* DclInputSiv */
|
|
|
|
{ 2, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::Imm32, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
|
|
|
/* DclInputPs */
|
|
|
|
{ 1, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* DclInputPsSgv */
|
|
|
|
{ 2, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::Imm32, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
|
|
|
/* DclInputPsSiv */
|
|
|
|
{ 2, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::Imm32, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
|
|
|
/* DclOutput */
|
|
|
|
{ 1, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
} },
|
|
|
|
/* DclOutputSgv */
|
|
|
|
{ 2, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::Imm32, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
|
|
|
/* DclOutputSiv */
|
|
|
|
{ 2, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
|
|
|
{ DxbcOperandKind::Imm32, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
|
|
|
/* DclTemps */
|
|
|
|
{ 1, DxbcInstClass::Declaration, {
|
|
|
|
{ DxbcOperandKind::Imm32, DxbcScalarType::Uint32 },
|
|
|
|
} },
|
|
|
|
/* DclIndexableTemp */
|
|
|
|
{ },
|
|
|
|
/* DclGlobalFlags */
|
|
|
|
{ 0, DxbcInstClass::Declaration },
|
|
|
|
/* Reserved0 */
|
|
|
|
{ 0, DxbcInstClass::Undefined },
|
|
|
|
/* Lod */
|
|
|
|
{ },
|
|
|
|
/* Gather4 */
|
|
|
|
{ },
|
|
|
|
/* SamplePos */
|
|
|
|
{ },
|
|
|
|
/* SampleInfo */
|
|
|
|
{ },
|
|
|
|
/* Reserved1 */
|
|
|
|
{ },
|
|
|
|
/* HsDecls */
|
|
|
|
{ },
|
|
|
|
/* HsControlPointPhase */
|
|
|
|
{ },
|
|
|
|
/* HsForkPhase */
|
|
|
|
{ },
|
|
|
|
/* HsJoinPhase */
|
|
|
|
{ },
|
|
|
|
/* EmitStream */
|
|
|
|
{ },
|
|
|
|
/* CutStream */
|
|
|
|
{ },
|
|
|
|
/* EmitThenCutStream */
|
|
|
|
{ },
|
|
|
|
/* InterfaceCall */
|
|
|
|
{ },
|
|
|
|
/* BufInfo */
|
|
|
|
{ },
|
|
|
|
/* DerivRtxCoarse */
|
|
|
|
{ },
|
|
|
|
/* DerivRtxFine */
|
|
|
|
{ },
|
|
|
|
/* DerivRtyCoarse */
|
|
|
|
{ },
|
|
|
|
/* DerivRtyFine */
|
|
|
|
{ },
|
|
|
|
/* Gather4C */
|
|
|
|
{ },
|
|
|
|
/* Gather4Po */
|
|
|
|
{ },
|
|
|
|
/* Gather4PoC */
|
|
|
|
{ },
|
|
|
|
/* Rcp */
|
|
|
|
{ },
|
|
|
|
/* F32toF16 */
|
|
|
|
{ },
|
|
|
|
/* F16toF32 */
|
|
|
|
{ },
|
|
|
|
/* UAddc */
|
|
|
|
{ },
|
|
|
|
/* USubb */
|
|
|
|
{ },
|
|
|
|
/* CountBits */
|
|
|
|
{ },
|
|
|
|
/* FirstBitHi */
|
|
|
|
{ },
|
|
|
|
/* FirstBitLo */
|
|
|
|
{ },
|
|
|
|
/* FirstBitShi */
|
|
|
|
{ },
|
|
|
|
/* UBfe */
|
|
|
|
{ },
|
|
|
|
/* IBfe */
|
|
|
|
{ },
|
|
|
|
/* Bfi */
|
|
|
|
{ },
|
|
|
|
/* BfRev */
|
|
|
|
{ },
|
|
|
|
/* Swapc */
|
|
|
|
{ },
|
|
|
|
/* DclStream */
|
|
|
|
{ },
|
|
|
|
/* DclFunctionBody */
|
|
|
|
{ },
|
|
|
|
/* DclFunctionTable */
|
|
|
|
{ },
|
|
|
|
/* DclInterface */
|
|
|
|
{ },
|
|
|
|
/* DclInputControlPointCount */
|
|
|
|
{ },
|
|
|
|
/* DclOutputControlPointCount */
|
|
|
|
{ },
|
|
|
|
/* DclTessDomain */
|
|
|
|
{ },
|
|
|
|
/* DclTessPartitioning */
|
|
|
|
{ },
|
|
|
|
/* DclTessOutputPrimitive */
|
|
|
|
{ },
|
|
|
|
/* DclHsMaxTessFactor */
|
|
|
|
{ },
|
|
|
|
/* DclHsForkPhaseInstanceCount */
|
|
|
|
{ },
|
|
|
|
/* DclHsJoinPhaseInstanceCount */
|
|
|
|
{ },
|
|
|
|
/* DclThreadGroup */
|
|
|
|
{ },
|
|
|
|
/* DclUavTyped */
|
|
|
|
{ },
|
|
|
|
/* DclUavRaw */
|
|
|
|
{ },
|
|
|
|
/* DclUavStructured */
|
|
|
|
{ },
|
|
|
|
/* DclThreadGroupSharedMemoryRaw */
|
|
|
|
{ },
|
|
|
|
/* DclThreadGroupSharedMemoryStructured */
|
|
|
|
{ },
|
|
|
|
/* DclResourceRaw */
|
|
|
|
{ },
|
|
|
|
/* DclResourceStructured */
|
|
|
|
{ },
|
|
|
|
/* LdUavTyped */
|
|
|
|
{ },
|
|
|
|
/* StoreUavTyped */
|
|
|
|
{ },
|
|
|
|
/* LdRaw */
|
|
|
|
{ },
|
|
|
|
/* StoreRaw */
|
|
|
|
{ },
|
|
|
|
/* LdStructured */
|
|
|
|
{ },
|
|
|
|
/* StoreStructured */
|
|
|
|
{ },
|
|
|
|
/* AtomicAnd */
|
|
|
|
{ },
|
|
|
|
/* AtomicOr */
|
|
|
|
{ },
|
|
|
|
/* AtomicXor */
|
|
|
|
{ },
|
|
|
|
/* AtomicCmpStore */
|
|
|
|
{ },
|
|
|
|
/* AtomicIAdd */
|
|
|
|
{ },
|
|
|
|
/* AtomicIMax */
|
|
|
|
{ },
|
|
|
|
/* AtomicIMin */
|
|
|
|
{ },
|
|
|
|
/* AtomicUMax */
|
|
|
|
{ },
|
|
|
|
/* AtomicUMin */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicAlloc */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicConsume */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicIAdd */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicAnd */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicOr */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicXor */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicExch */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicCmpExch */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicImax */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicImin */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicUmax */
|
|
|
|
{ },
|
|
|
|
/* ImmAtomicUmin */
|
|
|
|
{ },
|
|
|
|
/* Sync */
|
|
|
|
{ },
|
|
|
|
/* DAdd */
|
|
|
|
{ },
|
|
|
|
/* DMax */
|
|
|
|
{ },
|
|
|
|
/* DMin */
|
|
|
|
{ },
|
|
|
|
/* DMul */
|
|
|
|
{ },
|
|
|
|
/* DEq */
|
|
|
|
{ },
|
|
|
|
/* DGe */
|
|
|
|
{ },
|
|
|
|
/* DLt */
|
|
|
|
{ },
|
|
|
|
/* DNe */
|
|
|
|
{ },
|
|
|
|
/* DMov */
|
|
|
|
{ },
|
|
|
|
/* DMovc */
|
|
|
|
{ },
|
|
|
|
/* DtoF */
|
|
|
|
{ },
|
|
|
|
/* FtoD */
|
|
|
|
{ },
|
|
|
|
/* EvalSnapped */
|
|
|
|
{ },
|
|
|
|
/* EvalSampleIndex */
|
|
|
|
{ },
|
|
|
|
/* EvalCentroid */
|
|
|
|
{ },
|
|
|
|
/* DclGsInstanceCount */
|
|
|
|
{ },
|
|
|
|
}};
|
|
|
|
|
|
|
|
|
|
|
|
DxbcInstFormat dxbcInstructionFormat(DxbcOpcode opcode) {
|
|
|
|
const uint32_t idx = static_cast<uint32_t>(opcode);
|
|
|
|
|
|
|
|
return (idx < g_instructionFormats.size())
|
|
|
|
? g_instructionFormats.at(idx)
|
|
|
|
: DxbcInstFormat();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|