mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
cogl/tests: Do not blend for texture format paint tests
The default cogl blend string is `RGBA = ADD (SRC_COLOR, DST_COLOR*(1-SRC_COLOR[A]))` which is alpha blending with premult fragment results. We do not clear the src framebuffer and even if we did set alpha to 1 in the src fb, the resulting alpha would be 1 and we want to check the alpha of the fragment color. Just turn off any kind of blending instead and write out the fragment color to the fb. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3065>
This commit is contained in:
parent
d79e4c182e
commit
ae5512bc05
@ -344,6 +344,8 @@ test_offscreen_texture_formats_paint_rgb10 (void)
|
|||||||
red, green, blue, alpha);
|
red, green, blue, alpha);
|
||||||
|
|
||||||
pipeline = cogl_pipeline_new (test_ctx);
|
pipeline = cogl_pipeline_new (test_ctx);
|
||||||
|
cogl_pipeline_set_blend (pipeline,
|
||||||
|
"RGBA = ADD (SRC_COLOR, 0)", NULL);
|
||||||
cogl_pipeline_set_layer_texture (pipeline, 0, tex_src);
|
cogl_pipeline_set_layer_texture (pipeline, 0, tex_src);
|
||||||
cogl_framebuffer_draw_rectangle (COGL_FRAMEBUFFER (offscreen_dst),
|
cogl_framebuffer_draw_rectangle (COGL_FRAMEBUFFER (offscreen_dst),
|
||||||
pipeline,
|
pipeline,
|
||||||
@ -468,6 +470,8 @@ test_offscreen_texture_formats_paint_rgb8 (void)
|
|||||||
&color);
|
&color);
|
||||||
|
|
||||||
pipeline = cogl_pipeline_new (test_ctx);
|
pipeline = cogl_pipeline_new (test_ctx);
|
||||||
|
cogl_pipeline_set_blend (pipeline,
|
||||||
|
"RGBA = ADD (SRC_COLOR, 0)", NULL);
|
||||||
cogl_pipeline_set_layer_texture (pipeline, 0, tex_src);
|
cogl_pipeline_set_layer_texture (pipeline, 0, tex_src);
|
||||||
cogl_framebuffer_draw_rectangle (COGL_FRAMEBUFFER (offscreen_dst),
|
cogl_framebuffer_draw_rectangle (COGL_FRAMEBUFFER (offscreen_dst),
|
||||||
pipeline,
|
pipeline,
|
||||||
|
Loading…
Reference in New Issue
Block a user