nv2a: Fix surface clip to scissor origin

This commit is contained in:
Logan Stromberg 2025-03-17 14:32:40 -07:00 committed by GitHub
parent b455d58227
commit 860bccb722
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -332,8 +332,8 @@ void pgraph_gl_draw_begin(NV2AState *d)
/* Surface clip */
/* FIXME: Consider moving to PSH w/ window clip */
unsigned int xmin = pg->surface_shape.clip_x - pg->surface_binding_dim.clip_x,
ymin = pg->surface_shape.clip_y - pg->surface_binding_dim.clip_y;
unsigned int xmin = pg->surface_shape.clip_x,
ymin = pg->surface_shape.clip_y;
unsigned int xmax = xmin + pg->surface_shape.clip_width - 1,
ymax = ymin + pg->surface_shape.clip_height - 1;

View File

@ -1472,10 +1472,8 @@ static void begin_draw(PGRAPHState *pg)
/* Surface clip */
/* FIXME: Consider moving to PSH w/ window clip */
unsigned int xmin = pg->surface_shape.clip_x -
pg->surface_binding_dim.clip_x,
ymin = pg->surface_shape.clip_y -
pg->surface_binding_dim.clip_y;
unsigned int xmin = pg->surface_shape.clip_x,
ymin = pg->surface_shape.clip_y;
unsigned int xmax = xmin + pg->surface_shape.clip_width - 1,
ymax = ymin + pg->surface_shape.clip_height - 1;