diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-04-02 12:32:39 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-04-03 23:03:46 +0200 |
commit | a4c4efad89eceb26cf82f4643ce6a4eb656072a6 (patch) | |
tree | 6a646309310463b0bf1ea41a6ae189196bf4f975 /src/compiler/glsl/blob.c | |
parent | d64f689f616580344b512235dac3ca9673e83f88 (diff) |
radv: Rework guard band calculation.
We want the guardband_x/y to be the largerst scalars such that each
viewport scaled by that amount is still a subrange of [-32767, 32767].
The old code has a couple of issues:
1) It used scissor instead of viewport_scissor, potentially taking into
account a viewport that is too small and therefore selecting a scale
that is too large.
2) Merging the viewports isn't ideal, as for example viewports with
boundaries [0,1] and [1000, 1001] would allow a guardband scale of ~30k,
while their union [0, 1001] only allows a scale of ~32.
The new code just determines the guardband per viewport and takes the minimum.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/compiler/glsl/blob.c')
0 files changed, 0 insertions, 0 deletions