mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 10:38:30 +02:00
softpipe: fix bug in perspective corrected interpolants for lines
Thanks to Michal for finding this. This will get fixed on the gallium-cylindrical-wrap branch and then merged to master.
This commit is contained in:
parent
34b36277b7
commit
3ca6cb3440
1 changed files with 1 additions and 2 deletions
|
|
@ -805,7 +805,6 @@ line_persp_coeff(const struct setup_context *setup,
|
|||
struct tgsi_interp_coef *coef,
|
||||
uint vertSlot, uint i)
|
||||
{
|
||||
/* XXX double-check/verify this arithmetic */
|
||||
const float a0 = setup->vmin[vertSlot][i] * setup->vmin[0][3];
|
||||
const float a1 = setup->vmax[vertSlot][i] * setup->vmax[0][3];
|
||||
const float da = a1 - a0;
|
||||
|
|
@ -813,7 +812,7 @@ line_persp_coeff(const struct setup_context *setup,
|
|||
const float dady = da * setup->emaj.dy * setup->oneoverarea;
|
||||
coef->dadx[i] = dadx;
|
||||
coef->dady[i] = dady;
|
||||
coef->a0[i] = (setup->vmin[vertSlot][i] -
|
||||
coef->a0[i] = (a0 -
|
||||
(dadx * (setup->vmin[0][0] - setup->pixel_offset) +
|
||||
dady * (setup->vmin[0][1] - setup->pixel_offset)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue