mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 00:10:20 +01:00
swr: [rasterizer core] viewport rounding for disabled scissor
Adjust viewport rounding when scissor rect is disabled during macro tile scissor setup. Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
This commit is contained in:
parent
96dfed49e4
commit
98641f4e73
1 changed files with 4 additions and 2 deletions
|
|
@ -732,10 +732,12 @@ void SetupMacroTileScissors(DRAW_CONTEXT *pDC)
|
|||
}
|
||||
else
|
||||
{
|
||||
// the vp width and height must be added to origin un-rounded then the result round to -inf.
|
||||
// The cast to int works for rounding assuming all [left, right, top, bottom] are positive.
|
||||
left = (int32_t)pState->vp[0].x;
|
||||
right = (int32_t)pState->vp[0].x + (int32_t)pState->vp[0].width;
|
||||
right = (int32_t)(pState->vp[0].x + pState->vp[0].width);
|
||||
top = (int32_t)pState->vp[0].y;
|
||||
bottom = (int32_t)pState->vp[0].y + (int32_t)pState->vp[0].height;
|
||||
bottom = (int32_t)(pState->vp[0].y + pState->vp[0].height);
|
||||
}
|
||||
|
||||
right = std::min<uint32_t>(right, KNOB_MAX_SCISSOR_X);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue