mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 22:24:15 +01:00
[dxbc] Implemented BfRev instruction
This commit is contained in:
parent
0c2058e8c4
commit
563d4582ab
@ -1324,6 +1324,11 @@ namespace dxvk {
|
||||
typeId, src.at(0).id);
|
||||
break;
|
||||
|
||||
case DxbcOpcode::BfRev:
|
||||
dst.id = m_module.opBitReverse(
|
||||
typeId, src.at(0).id);
|
||||
break;
|
||||
|
||||
///////////////////////////
|
||||
// Conversion instructions
|
||||
case DxbcOpcode::ItoF:
|
||||
|
@ -693,7 +693,10 @@ namespace dxvk {
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||
} },
|
||||
/* BfRev */
|
||||
{ },
|
||||
{ 2, DxbcInstClass::VectorAlu, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Uint32 },
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||
} },
|
||||
/* Swapc */
|
||||
{ 5, DxbcInstClass::VectorCmov, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
||||
|
@ -946,6 +946,19 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
uint32_t SpirvModule::opBitReverse(
|
||||
uint32_t resultType,
|
||||
uint32_t operand) {
|
||||
uint32_t resultId = this->allocateId();
|
||||
|
||||
m_code.putIns (spv::OpBitReverse, 4);
|
||||
m_code.putWord(resultType);
|
||||
m_code.putWord(resultId);
|
||||
m_code.putWord(operand);
|
||||
return resultId;
|
||||
}
|
||||
|
||||
|
||||
uint32_t SpirvModule::opFindILsb(
|
||||
uint32_t resultType,
|
||||
uint32_t operand) {
|
||||
|
@ -381,6 +381,10 @@ namespace dxvk {
|
||||
uint32_t resultType,
|
||||
uint32_t operand);
|
||||
|
||||
uint32_t opBitReverse(
|
||||
uint32_t resultType,
|
||||
uint32_t operand);
|
||||
|
||||
uint32_t opFindILsb(
|
||||
uint32_t resultType,
|
||||
uint32_t operand);
|
||||
|
Loading…
Reference in New Issue
Block a user