mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxbc] Implement CountBits/FirstBit instructions
This commit is contained in:
parent
495f58370c
commit
49f13cfdc4
src/dxbc
@ -1264,6 +1264,26 @@ namespace dxvk {
|
|||||||
src.at(0).id, src.at(1).id);
|
src.at(0).id, src.at(1).id);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DxbcOpcode::CountBits:
|
||||||
|
dst.id = m_module.opBitCount(
|
||||||
|
typeId, src.at(0).id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DxbcOpcode::FirstBitLo:
|
||||||
|
dst.id = m_module.opFindILsb(
|
||||||
|
typeId, src.at(0).id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DxbcOpcode::FirstBitHi:
|
||||||
|
dst.id = m_module.opFindUMsb(
|
||||||
|
typeId, src.at(0).id);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DxbcOpcode::FirstBitShi:
|
||||||
|
dst.id = m_module.opFindSMsb(
|
||||||
|
typeId, src.at(0).id);
|
||||||
|
break;
|
||||||
|
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
// Conversion instructions
|
// Conversion instructions
|
||||||
case DxbcOpcode::ItoF:
|
case DxbcOpcode::ItoF:
|
||||||
|
@ -623,13 +623,25 @@ namespace dxvk {
|
|||||||
/* USubb */
|
/* USubb */
|
||||||
{ },
|
{ },
|
||||||
/* CountBits */
|
/* CountBits */
|
||||||
{ },
|
{ 2, DxbcInstClass::VectorAlu, {
|
||||||
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||||
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||||
|
} },
|
||||||
/* FirstBitHi */
|
/* FirstBitHi */
|
||||||
{ },
|
{ 2, DxbcInstClass::VectorAlu, {
|
||||||
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||||
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||||
|
} },
|
||||||
/* FirstBitLo */
|
/* FirstBitLo */
|
||||||
{ },
|
{ 2, DxbcInstClass::VectorAlu, {
|
||||||
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||||
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||||
|
} },
|
||||||
/* FirstBitShi */
|
/* FirstBitShi */
|
||||||
{ },
|
{ 2, DxbcInstClass::VectorAlu, {
|
||||||
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||||
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||||
|
} },
|
||||||
/* UBfe */
|
/* UBfe */
|
||||||
{ 4, DxbcInstClass::BitExtract, {
|
{ 4, DxbcInstClass::BitExtract, {
|
||||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user