| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
No need to duplicate code in shaders when it can be shared.
|
|
|
|
|
| |
There are a bunch of intersection APIs available these days.
Let's use them.
|
|
|
|
|
|
|
|
|
| |
The idea is that for a rectangle intersection, each corner of the
result is either entirely part of one original rectangle or it is
an intersection point.
By detecting those 2 cases and treating them differently, we can
simplify the code to compare rounded rectangles.
|
|
|
|
|
| |
Instead of rendering unclipped, set the clip region to the extents of
the current clip region.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of emitting the render commands once per rectangle of the clip
region, just emit them once with the region's extents.
This is generally faster because it emits fewer commands to the GPU,
even though it may touch significantly more pixels.
For a proper method, we'd need to record the commands per clip rectangle
instead of emitting all of them all the time.
|
|
|
|
| |
Doesn't work yet, booo!
|
|
|
|
|
| |
We don't want to clamp to the border, that causes fade-outs at the
edges.
|
|
|
|
|
|
|
|
|
| |
The border and color shaders - the ones that do AA - now multiply their
coordinates by the scale factor, which gives them better rounding
capabilities.
This in particular improves the case where they are used in fractional
scaling situations, where the scale is defined at the root element.
|
|
|
|
|
|
|
| |
If we don't need them, exit early.
Shuts up the validation layers when running simple denos without
textures.
|
|
|
|
| |
There's no need to use 3 different ones when they are compatible.
|
|
|
|
|
| |
We end up with the backside, when we scale(-1) and we still want it to
be visible, just flipped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a testsuite called gsk-compare-vulkan to run
the gsk renderer tests with the Vulkan renderer.
The current stats:
Ok: 184
Expected Fail: 0
Fail: 204
Unexpected Pass: 0
Skipped: 2
Timeout: 0
For now, we mark all the tests as failing to
avoid ci breakage. To run the tests locally,
you can do:
meson test -C_build --suite gsk-compare-vulkan
|
|
|
|
|
|
|
|
| |
Previously, we just used the defaultscale factor, but now that we're
having it available in push constants, we can read it back for creating
offscreens and rendering fallbacks.
So do that.
|
|
|
|
|
| |
Now, the scale is no longer part of the matrix. This allows shaders to
transform points by the scale which increases accuracy for antialiasing.
|
|
|
|
| |
This allows doing more optimized math on it.
|
|
|
|
|
| |
This is adding extra work, but the benefits should become visible
in future commits.
|
|
|
|
| |
This way, it can be pushed to the shaders
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
It's a 1:1 replacement for GskVulkanPushConstants, just without the
indirection through a different file.
GskVulkanPushConstants as a struct is gone now.
The file still exists to handle the push_constants operation.
|
|
|
|
| |
Instead, only store the values that are needed.
|
|
|
|
| |
Simplifies the code and makes future refactoring easier
|
|
|
|
| |
Don't require a GskVulkanPushConstants there.
|
|
|
|
|
|
|
| |
We don't want to make the push constants larger than what the spec
guarantees. And that is 128 bytes, see value for
maxPushConstantsSize in table 55 of
https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-minmax
|
|
|
|
| |
This was broken in the last commit.
|
|
|
|
|
|
| |
This avoids emitting lots of push constant updates as most of the
transforms we have are simple translations to adjust drawing for the
next widget.
|
|
|
|
|
|
|
| |
Create offscreens with enough pixels for the given scale and ensure
the scale is passed on.
This improves text rendering on offscreens quite a bit.
|
|
|
|
|
|
|
|
|
| |
1. Use a graphene_vec2_t
2. Ensure it's always positive
3. Don't break with fallback
The scale value is nothing more than an indication of how many pixels to
assume per unit of a node.
|
| |
|
|
|
|
| |
We can compute it when needed, so do that.
|
|
|
|
|
| |
The initial matrix can be computed as needed, so we don't need to
precompute it.
|
|
|
|
|
| |
If no buffer has any vertex data (read: if nothing gets drawn), don't
try to allocate a 0 bytes buffer.
|
|
|
|
| |
Also add test to the testsuite for it.
|
| |
|
|
|
|
|
|
|
|
| |
We don't want to render the offscreen trnsformed, we want to render it
as-is.
We lose the correct scale factor, but that requires some separate work,
so for now it gets a bit blurry on hidpi.
|
|
|
|
|
| |
I don't want to ensure there's a RenderPass available everywhere and
recreate the quarks in each, I just want to use them.
|
|
|
|
| |
We can now create offscreens explicitly.
|
|
|
|
|
|
|
| |
... so set the corresponding flag.
Also name the function "new_for_offscreen()" because thats what this
function is about, "texture" is ambiguous.
|
|
|
|
| |
no need to go through a GskTransform
|
|
|
|
| |
We were rounding widths properly, make sure we always round up.
|
|
|
|
| |
If the corner is set to 0, keep it there.
|
|
|
|
|
| |
We can use this to properly compute distance in scaled situations.
We also now compute coverage with (imperfect) antialiasing.
|
|
|
|
|
|
|
|
|
|
| |
This introduces the rect object and adds a rect_distance() and
rect_coverage() function.
_distance() returns the signed distance tp the rectangle.
_coverage() returns the coverage of a pixel centered at that position.
Note that the pixel size is computed using dFdx/dFdy.
|
|
|
|
|
|
|
| |
When the node bounds were a non-integer size, the texture would get
ceil()ed pixels, but various viewport or scissor computations might
floor() instead, leaving the right/bottom row of pixels untouched.
Make sure those functions ceil(), too.
|
|
|
|
| |
And yes, I'm aware of the icon I'm using.
|
|
|
|
|
|
|
|
| |
I have no idea about the UI for this yet, but there's a list of nodes
now that you can click on to get previous ones back.
Ultimately I want to have some way to compare nodes or do transitions,
but so far, this is an experiment.
|
|\
| |
| |
| |
| | |
CI: Actually build our code
See merge request GNOME/gtk!5980
|
| |
| |
| |
| |
| |
| | |
Thanks, macos CI.
(We should have a Fedora clang build.)
|
| |
| |
| |
| |
| | |
They are failing to build because they use deprecated functions and
nobody thinks they're worth fixing.
|