im confused about when to do a framebuffer update

This commit is contained in:
espes 2015-07-07 21:07:36 +10:00
parent 0a2d1ef9e4
commit 1d8adc942f
1 changed files with 6 additions and 3 deletions
hw/xbox

View File

@ -2404,6 +2404,8 @@ static void pgraph_update_framebuffer(NV2AState *d)
bool shape_changed = memcmp(&pg->surface_shape, &pg->last_surface_shape,
sizeof(SurfaceShape)) != 0;
if (!shape_changed) return;
if (!pg->surface_shape.color_format && !pg->surface_shape.zeta_format)
return;
printf("framebuffer shape changed\n");
@ -2509,9 +2511,6 @@ static void pgraph_update_surface(NV2AState *d, bool upload)
unsigned int width, height;
pgraph_get_surface_dimensions(d, &width, &height);
if (upload) {
pgraph_update_framebuffer(d);
}
if (pg->surface_shape.color_format != 0 && pg->color_mask
&& (upload || pg->surface_color.draw_dirty)) {
@ -2657,6 +2656,10 @@ static void pgraph_update_surface(NV2AState *d, bool upload)
}
}
if (!upload) {
pgraph_update_framebuffer(d);
}
}