Skip to content

Commit

Permalink
nv2a: Don't add clip offset to swizzled surfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mborgerson committed May 18, 2022
1 parent 38a0e46 commit 9fafe92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hw/xbox/nv2a/pgraph.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9fafe92

Please sign in to comment.