tests: extend output-damage to GL shadow framebuffer
Extend the existing output-damage test to test blit_shadow_to_output() specifically. This function had problems originally, so make sure they can't reappear. The added quirk is explained in the test. An additional check of the quirk in gl_renderer_output_create() ensures that the shadow framebuffer is really used. The test could false-pass if the shadow is not used. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
@@ -1750,7 +1750,10 @@ gl_renderer_repaint_output(struct weston_output *output,
|
||||
|
||||
if (shadow_exists(go)) {
|
||||
/* Repaint into shadow. */
|
||||
repaint_views(output, output_damage);
|
||||
if (compositor->test_data.test_quirks.gl_force_full_redraw_of_shadow_fb)
|
||||
repaint_views(output, &output->region);
|
||||
else
|
||||
repaint_views(output, output_damage);
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
glViewport(go->borders[GL_RENDERER_BORDER_LEFT].width,
|
||||
@@ -3316,10 +3319,13 @@ gl_renderer_output_create(struct weston_output *output,
|
||||
{
|
||||
struct gl_output_state *go;
|
||||
struct gl_renderer *gr = get_renderer(output->compositor);
|
||||
const struct weston_testsuite_quirks *quirks;
|
||||
GLint internal_format;
|
||||
bool ret;
|
||||
int i;
|
||||
|
||||
quirks = &output->compositor->test_data.test_quirks;
|
||||
|
||||
go = zalloc(sizeof *go);
|
||||
if (go == NULL)
|
||||
return -1;
|
||||
@@ -3357,6 +3363,9 @@ gl_renderer_output_create(struct weston_output *output,
|
||||
free(go);
|
||||
return -1;
|
||||
}
|
||||
} else if (quirks->gl_force_full_redraw_of_shadow_fb) {
|
||||
weston_log("ERROR: gl_force_full_redraw_of_shadow_fb quirk used but shadow fb was not enabled.\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
output->renderer_state = go;
|
||||
|
||||
Reference in New Issue
Block a user