[DXBC] Use div for vtx_fmt w0 instead of rcp

This commit is contained in:
Triang3l 2020-05-11 16:51:48 +03:00
parent a3b4c77fdb
commit 6d0e4787fb
1 changed files with 2 additions and 2 deletions

View File

@ -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();