mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-01 19:29:16 +01:00
[dxbc] Implement CountBits/FirstBit instructions
This commit is contained in:
parent
495f58370c
commit
49f13cfdc4
@ -1264,6 +1264,26 @@ namespace dxvk {
|
||||
src.at(0).id, src.at(1).id);
|
||||
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
|
||||
case DxbcOpcode::ItoF:
|
||||
|
@ -623,13 +623,25 @@ namespace dxvk {
|
||||
/* USubb */
|
||||
{ },
|
||||
/* CountBits */
|
||||
{ },
|
||||
{ 2, DxbcInstClass::VectorAlu, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||
} },
|
||||
/* FirstBitHi */
|
||||
{ },
|
||||
{ 2, DxbcInstClass::VectorAlu, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||
} },
|
||||
/* FirstBitLo */
|
||||
{ },
|
||||
{ 2, DxbcInstClass::VectorAlu, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||
} },
|
||||
/* FirstBitShi */
|
||||
{ },
|
||||
{ 2, DxbcInstClass::VectorAlu, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||
} },
|
||||
/* UBfe */
|
||||
{ 4, DxbcInstClass::BitExtract, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||
|
Loading…
x
Reference in New Issue
Block a user