Skip to content

Commit

Permalink
[dxso] Emit spirv OpCross if we can.
Browse files Browse the repository at this point in the history
  • Loading branch information
DadSchoorse authored and misyltoad committed Mar 16, 2022
1 parent 630fee5 commit f1efc9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dxso/dxso_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1523,12 +1523,16 @@ namespace dxvk {
DxsoRegisterValue DxsoCompiler::emitCross(
DxsoRegisterValue a,
DxsoRegisterValue b) {
uint32_t typeId = getVectorTypeId(a.type);

if (m_moduleInfo.options.d3d9FloatEmulation != D3D9FloatEmulation::Strict)
return {a.type, m_module.opCross(typeId, a.id, b.id)};

const std::array<uint32_t, 4> shiftIndices = { 1, 2, 0, 1 };

DxsoRegisterValue result;
result.type = { DxsoScalarType::Float32, 3 };

uint32_t typeId = getVectorTypeId(result.type);
std::array<DxsoRegisterValue, 2> products;

for (uint32_t i = 0; i < 2; i++) {
Expand Down

0 comments on commit f1efc9d

Please sign in to comment.