mirror of https://github.com/xemu-project/xemu.git
nv2a: Simplify surface clip to scissor size calculation
This commit is contained in:
parent
860bccb722
commit
c3a8b9569f
|
@ -334,11 +334,10 @@ void pgraph_gl_draw_begin(NV2AState *d)
|
|||
/* FIXME: Consider moving to PSH w/ window clip */
|
||||
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;
|
||||
|
||||
unsigned int scissor_width = xmax - xmin + 1,
|
||||
scissor_height = ymax - ymin + 1;
|
||||
unsigned int scissor_width = pg->surface_shape.clip_width,
|
||||
scissor_height = pg->surface_shape.clip_height;
|
||||
|
||||
pgraph_apply_anti_aliasing_factor(pg, &xmin, &ymin);
|
||||
pgraph_apply_anti_aliasing_factor(pg, &scissor_width, &scissor_height);
|
||||
ymin = pg->surface_binding_dim.height - (ymin + scissor_height);
|
||||
|
|
|
@ -1475,11 +1475,8 @@ static void begin_draw(PGRAPHState *pg)
|
|||
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;
|
||||
|
||||
unsigned int scissor_width = xmax - xmin + 1,
|
||||
scissor_height = ymax - ymin + 1;
|
||||
unsigned int scissor_width = pg->surface_shape.clip_width,
|
||||
scissor_height = pg->surface_shape.clip_height;
|
||||
|
||||
pgraph_apply_anti_aliasing_factor(pg, &xmin, &ymin);
|
||||
pgraph_apply_anti_aliasing_factor(pg, &scissor_width, &scissor_height);
|
||||
|
|
Loading…
Reference in New Issue