mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +00:00
The precision of the SSE2 rcp opcode was a little bit too low
This commit is contained in:
parent
34bf581957
commit
837d8f44d1
1 changed files with 2 additions and 2 deletions
|
@ -204,7 +204,7 @@ void DrawTriangleCodegen::LoopBlockX()
|
||||||
stack_x.store(minx);
|
stack_x.store(minx);
|
||||||
stack_posx_w.store(posy_w);
|
stack_posx_w.store(posy_w);
|
||||||
for (int i = 0; i < TriVertex::NumVarying; i++)
|
for (int i = 0; i < TriVertex::NumVarying; i++)
|
||||||
stack_posx_varying[i].store(stack_posy_varying[i].load());
|
stack_posx_varying[i].store(posy_varying[i]);
|
||||||
|
|
||||||
SSAForBlock loop;
|
SSAForBlock loop;
|
||||||
x = stack_x.load();
|
x = stack_x.load();
|
||||||
|
@ -277,7 +277,7 @@ void DrawTriangleCodegen::LoopBlockX()
|
||||||
void DrawTriangleCodegen::SetupAffineBlock()
|
void DrawTriangleCodegen::SetupAffineBlock()
|
||||||
{
|
{
|
||||||
// Calculate varying variables for affine block
|
// Calculate varying variables for affine block
|
||||||
SSAVec4f rcpW = SSAVec4f::rcp(SSAVec4f(posx_w, posx_w + gradWX, posx_w + gradWY, posx_w + gradWX + gradWY));
|
SSAVec4f rcpW = SSAVec4f(1.0f) / SSAVec4f(posx_w, posx_w + gradWX, posx_w + gradWY, posx_w + gradWX + gradWY);
|
||||||
for (int i = 0; i < TriVertex::NumVarying; i++)
|
for (int i = 0; i < TriVertex::NumVarying; i++)
|
||||||
{
|
{
|
||||||
// Top left, top right, bottom left, bottom right:
|
// Top left, top right, bottom left, bottom right:
|
||||||
|
|
Loading…
Reference in a new issue