testsuite: Add a test for texture-scale filters

Check that the right filter is chosen and that that filter is
implemented correctly.

The test is disabled for Cairo because Cairo (or rather Pixman)
doesn't follow the filtering specifications for GL/Vulkan and in
particular the nearest filter picks a different pixel.
This commit is contained in:
Benjamin Otte
2023-10-24 01:32:46 +02:00
parent dd7a38069f
commit c9b83dfa1d
3 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
texture-scale {
bounds: 4 4 24 24;
filter: nearest;
texture: "texture1" url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAJ0lEQVQYlWNkYPjwnwEPYMInSbqC\
AwwCDAcYBPCb4HAAlc9Ie0cCAB8uBo20gfbVAAAAAElFTkSuQmCC\
");
}
repeat {
bounds: 32 0 32 32;
child: texture-scale {
bounds: 0 0 1 1;
filter: nearest;
texture: "texture1";
}
}
repeat {
bounds: 0 32 32 32;
child: texture-scale {
bounds: 0 0 1 1;
texture: "texture1";
}
}
repeat {
bounds: 32 32 32 32;
child: texture-scale {
bounds: 0 0 1 1;
filter: trilinear;
texture: "texture1";
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

View File

@@ -98,6 +98,7 @@ compare_render_tests = [
'shadow-opacity',
'shrink-rounded-border',
'stroke',
'texture-scale-filters-3d',
'texture-scale-magnify-10000x',
'texture-scale-magnify-rotate',
'texture-scale-stripes',