mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[dxbc] Implement Dmovc instruction
Fixes some mandelbrot demo mentioned in #216.
This commit is contained in:
parent
0cfa5b16d3
commit
a971370524
@ -1680,11 +1680,20 @@ namespace dxvk {
|
||||
// (src0) The condition vector
|
||||
// (src1) Vector to select from if the condition is not 0
|
||||
// (src2) Vector to select from if the condition is 0
|
||||
const DxbcRegisterValue condition = emitRegisterLoad(ins.src[0], ins.dst[0].mask);
|
||||
DxbcRegMask condMask = ins.dst[0].mask;
|
||||
|
||||
if (ins.dst[0].dataType == DxbcScalarType::Float64) {
|
||||
condMask = DxbcRegMask(
|
||||
condMask[0] && condMask[1],
|
||||
condMask[2] && condMask[3],
|
||||
false, false);
|
||||
}
|
||||
|
||||
const DxbcRegisterValue condition = emitRegisterLoad(ins.src[0], condMask);
|
||||
const DxbcRegisterValue selectTrue = emitRegisterLoad(ins.src[1], ins.dst[0].mask);
|
||||
const DxbcRegisterValue selectFalse = emitRegisterLoad(ins.src[2], ins.dst[0].mask);
|
||||
|
||||
const uint32_t componentCount = ins.dst[0].mask.popCount();
|
||||
uint32_t componentCount = condMask.popCount();
|
||||
|
||||
// We'll compare against a vector of zeroes to generate a
|
||||
// boolean vector, which in turn will be used by OpSelect
|
||||
|
@ -1013,7 +1013,12 @@ namespace dxvk {
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float64 },
|
||||
} },
|
||||
/* DMovc */
|
||||
{ },
|
||||
{ 4, DxbcInstClass::VectorCmov, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Float64 },
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Uint32 },
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float64 },
|
||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float64 },
|
||||
} },
|
||||
/* DtoF */
|
||||
{ 2, DxbcInstClass::ConvertFloat64, {
|
||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
||||
|
Loading…
x
Reference in New Issue
Block a user