mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-31 09:10:32 +01:00
nvc0: change logic for centering of eng2d blit when downsampling
We want to center the sample. The old code may have been correct given the limited values of ms_x/y, but the new logic should be more intuitive. Note that ms_x can only be 1/2 and ms_y can only be 0/1. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
6d5c3c8260
commit
47c19a5819
1 changed files with 2 additions and 2 deletions
|
|
@ -1066,8 +1066,8 @@ nvc0_blit_eng2d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
|
|||
|
||||
if (src->base.base.nr_samples > dst->base.base.nr_samples) {
|
||||
/* center src coorinates for proper MS resolve filtering */
|
||||
srcx += (int64_t)(src->ms_x + 0) << 32;
|
||||
srcy += (int64_t)(src->ms_y + 1) << 31;
|
||||
srcx += (int64_t)1 << (src->ms_x + 31);
|
||||
srcy += (int64_t)1 << (src->ms_y + 31);
|
||||
}
|
||||
|
||||
dstx = info->dst.box.x << dst->ms_x;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue