From 6d0e4787fbaf9fb4a976b851e01c83233539b837 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Mon, 11 May 2020 16:51:48 +0300 Subject: [PATCH] [DXBC] Use div for vtx_fmt w0 instead of rcp --- src/xenia/gpu/dxbc_shader_translator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/gpu/dxbc_shader_translator.cc b/src/xenia/gpu/dxbc_shader_translator.cc index deb7fca35..39d4c479f 100644 --- a/src/xenia/gpu/dxbc_shader_translator.cc +++ b/src/xenia/gpu/dxbc_shader_translator.cc @@ -927,10 +927,10 @@ void DxbcShaderTranslator::CompleteVertexOrDomainShader() { .Select(kSysConst_Flags_Comp)); // Check if the shader already returns W, not 1/W, and if it doesn't, turn 1/W - // into W. + // into W. Using div rather than relaxed-precision rcp for safety. DxbcOpAnd(temp_x_dest, flags_src, DxbcSrc::LU(kSysFlag_WNotReciprocal)); DxbcOpIf(false, temp_x_src); - DxbcOpRcp(DxbcDest::R(system_temp_position_, 0b1000), + DxbcOpDiv(DxbcDest::R(system_temp_position_, 0b1000), DxbcSrc::LF(1.0f), DxbcSrc::R(system_temp_position_, DxbcSrc::kWWWW)); DxbcOpEndIf();