[DXBC] Use div for vtx_fmt w0 instead of rcp
This commit is contained in:
parent
a3b4c77fdb
commit
6d0e4787fb
src/xenia/gpu
|
@ -927,10 +927,10 @@ void DxbcShaderTranslator::CompleteVertexOrDomainShader() {
|
||||||
.Select(kSysConst_Flags_Comp));
|
.Select(kSysConst_Flags_Comp));
|
||||||
|
|
||||||
// Check if the shader already returns W, not 1/W, and if it doesn't, turn 1/W
|
// 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));
|
DxbcOpAnd(temp_x_dest, flags_src, DxbcSrc::LU(kSysFlag_WNotReciprocal));
|
||||||
DxbcOpIf(false, temp_x_src);
|
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));
|
DxbcSrc::R(system_temp_position_, DxbcSrc::kWWWW));
|
||||||
DxbcOpEndIf();
|
DxbcOpEndIf();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue