Fill a rectangle with fractional coordinates << 1.0 but scale it up so
that it ends up being nice integers.
Makes sure that nobody does any bad rounding here.
Instead of using the bounds of the clip region, emit individual
renderpasses for each rectangle of the clip region.
The benefit of this depends on how many pixels the clip region covers,
but for widget factory it reduces the required rendering by a huge
amount.
This is now the best clipping renderer - Cairo doesn't clip at all and
GL clips based on the extents.
Previously, we would set a scissor rect when doing a partial redraw, but
we would not clip the nodes based on that rectangle.
Do that now.
This massively reduces the amount of ops we emit for small redraws.
It's still possible to disable via -Dvulkan=disabled
We force-disable it on Mac OS.
I don't know how to best handle it on Windows. Technically we don't need
it, because the Vulkan stuff we want is about dmabufs, but I have no
idea how to convince the build system to toggle the default to
"disabled" on Windows, so it has to stay enabled for now.
This means we don't need to include gdkvulkancontext.h and it means we
don't initialize Vulkan if it isn't initialized yet.
Should we?
Should we add a button maybe?
No idea.
The Vulkan renderer can just be public API, because it doesn't expose
any Vulkan-specific APIs.
And it can just exist when compiled without Vulkan, because it can fail
to realize.
Also move get rid of the gsk/vulkan/gskvulkanrenderer.h header. It was
experimental and isn't necessary now that the renderer is included via
gsk.h.
Add a testsuite called gsk-compare-vulkan to run
the gsk renderer tests with the Vulkan renderer and
gsk-compare-ngl to run them with the NGL renderer.
To run the tests locally, you can do:
meson test -C_build --suite gsk-compare-vulkan
If shaders don't support nonuniform indexing, we emulate it via if/else
ladders (or switch ladders) which get inlined by the GLSL compiles and
massively blow up the code.
And that makes compilation of the shaders take minutes and results in
shader code that isn't necessarily faster.
So we disable it on GL entirely and on Vulkan if the required features
aren't available.
As it's only an optimization and does not fall back to Cairo anymore,
this should be fine.
Make the generator generate calls for the correct glBindAttribLocation()
calls.
Usually this was done correctly, but we can't rely on it. So do it
explicitly.
When downscaling more than 2x in either dimension, force mipmap use for
the texture in a texture node.
It improves the quality of textures but takes extra work.
The GL renderer does this, too (for textures that aren't in the icon cache).
This can be disabled via GSK_GPU_SKIP=mipmap.
Fixes the big-checkerboard-scaled-down2 test.