nv2a: Don't add clip offset to swizzled surfaces

This commit is contained in:
Matt Borgerson 2022-05-18 15:56:27 -07:00 committed by mborgerson
parent 38a0e46f8c
commit 9fafe92b25
1 changed files with 4 additions and 2 deletions

View File

@ -5758,8 +5758,10 @@ static void pgraph_populate_surface_binding_entry(NV2AState *d, bool color,
/* Since we determine surface dimensions based on the clipping
* rectangle, make sure to include the surface offset as well.
*/
width += pg->surface_shape.clip_x;
height += pg->surface_shape.clip_y;
if (pg->surface_type != NV097_SET_SURFACE_FORMAT_TYPE_SWIZZLE) {
width += pg->surface_shape.clip_x;
height += pg->surface_shape.clip_y;
}
} else {
width = pg->color_binding->width;
height = pg->color_binding->height;