From f1efc9dc9f474519e9e4c9bf846d6446a9f47da6 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Wed, 16 Mar 2022 14:34:19 +0100 Subject: [PATCH] [dxso] Emit spirv OpCross if we can. --- src/dxso/dxso_compiler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dxso/dxso_compiler.cpp b/src/dxso/dxso_compiler.cpp index 0ff260ab..caa46f18 100644 --- a/src/dxso/dxso_compiler.cpp +++ b/src/dxso/dxso_compiler.cpp @@ -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 shiftIndices = { 1, 2, 0, 1 }; DxsoRegisterValue result; result.type = { DxsoScalarType::Float32, 3 }; - uint32_t typeId = getVectorTypeId(result.type); std::array products; for (uint32_t i = 0; i < 2; i++) {