Matthias Clasen
72d043d51f
gsk: Change the profiler setup
...
Move away from the idea of intra-frame sampling, since we only
push samples once per frame, anyway. Instead, make the profiler
keep a rolling average of the last n frames.
2017-09-28 10:26:01 -04:00
Matthias Clasen
767966933d
gsk: Redo the sampling in the profiler
...
Reset the min/max/average counters before calculating,
and only print the values if we have samples. In addition,
print the number of samples.
2017-09-28 10:25:49 -04:00
Matthias Clasen
4d8e7d71ca
gsk: Add a profile counter for vulkan render passes
...
This is interesting now that we have multiple render passes.
2017-09-28 08:39:22 -04:00
Matthias Clasen
d61a715909
vulkan: Implement multiple render passes
...
Whenever we need a node as a texture, we now start a new render
pass that renders the node into a new intermediate texture, and
set up a semaphore to make the current render pass wait for it.
As part of this reorganization, much of the setup and drawing
code moved from gskvulkanrender.c to gskvulkanrenderpass.c.
2017-09-28 08:39:22 -04:00
Matthias Clasen
cbf897ab22
Add an api to get the vertex data for a render pass
2017-09-28 08:39:22 -04:00
Matthias Clasen
85e4e0672a
Add semaphores to the command buffer submit api
...
Allow to pass in semaphores to wait for before executing
and to signal after executing the command buffer. This
just exposes the capabilities of the underlying Vulkan
api. Update all callers to pass no semaphores, for now.
We will use this in the future.
2017-09-28 08:39:22 -04:00
Matthias Clasen
ff188f6bf0
Add an api to create intermediate textures
...
The new function creates a vulkan image that is suitable for
use as a framebuffer to render to and as a texture to read from.
2017-09-28 08:39:22 -04:00
Matthias Clasen
485470511f
vulkan: Update the outset-shadow fragment shaders
...
These were missing the blur-radius parameter that is written
by the vertex shader, causing Vulkan validation to complain.
2017-09-26 18:24:52 -04:00
Matthias Clasen
145e4fde92
gsk: Fix Vulkan validation errors for image upload
...
I've finally figured out the right combination of src and dest
stage and access flags to make all validation warnings go away.
This commit only fixes the direct upload code.
2017-09-26 18:18:31 -04:00
Matthias Clasen
ae2c645a2a
gsk: report fallback pixels as a profile counter
...
This makes the value show up in the inspector without
any extra work. We report the number per-frame, since
that makes the most sense.
2017-09-25 21:02:21 -04:00
Matthias Clasen
cfbd6b4b99
gsk: Add a way to reset profiler counters
...
It is often useful to count things per-frame, and reset
the counter afterwards.
2017-09-25 20:58:10 -04:00
Matthias Clasen
b1e98d106d
vulkan: add a frame counter to the profiler
...
This is just to match the gl renderer and to learn how
counters work.
2017-09-25 18:37:22 -04:00
Matthias Clasen
816b47d70d
gsk: Make profiler counters more useful
...
Make it possible to have counters that get incremented
by values other than 1.
2017-09-25 17:03:06 -04:00
Matthias Clasen
4970404d33
gsk: count fallback pixels
...
Always helps to have some measure of progress.
2017-09-25 09:28:18 -04:00
Rico Tzschichholz
d09f695172
gsk: Some g-i annotation fixes
2017-09-25 11:15:14 +02:00
Matthias Clasen
f6626a9e0e
gsk: Documentation additions
...
Document newly added apis, and ensure that all public apis
are listed in the docs.
2017-09-24 22:26:39 -04:00
Matthias Clasen
b5ac277654
Plug a memory leak
...
A function with ensure in the name would better check if the
thing it is supposed to ensure already exists.
2017-09-24 21:48:07 -04:00
Matthias Clasen
4a5ac93762
gsk: Fix a prefix mishap
...
There shouldn't be any gst_ functions in here...
2017-09-23 13:15:30 -04:00
Matthias Clasen
a7f077a3a9
Cosmetics
...
Go back to a single GskVulkanOpRender that can
handle 0, 1 or 2 sources.
2017-09-23 09:47:05 -04:00
Matthias Clasen
3c98b90fc6
vulkan: Implement nonseparable blendmodes
...
This is a directly-from-the-spec, unoptimized implementation.
2017-09-23 09:16:58 -04:00
Matthias Clasen
d61f6ff393
vulkan: Implement blend modes
...
This is another example for a 2-texture shader.
So far, only separable blend modes are implemented.
The implementation is not optimized, with an
if-else cascade in the shader.
2017-09-23 01:59:50 -04:00
Matthias Clasen
b192120f39
vulkan: fix a clip handling problem
...
We were looking at uninitialized memory here, instead
of the type of the source clip, as we should.
This showed up as mispositioned clip in the first frame
of a crossfade stack transition, and also as overdraw in
sliding stack transitions.
2017-09-22 22:16:10 -04:00
Matthias Clasen
a75d995bd4
vulkan: Implement crossfade
...
This is the first shader using two textures. It almost works.
2017-09-22 22:16:10 -04:00
Matthias Clasen
8ad0539cf7
vulkan: Drop GskVulkanPipelineLayout
...
We already move the descriptor set layout out of it,
so we can just as well keep the pipeline layouts in
the render object as well, and get rid of this extra
object. Update all callers.
2017-09-22 22:16:09 -04:00
Matthias Clasen
9b0ee4ac99
Allow different pipeline layouts
...
These are differentiated by the number of textures; currently
we have shaders with 0 and 1 textures.
2017-09-22 22:16:09 -04:00
Matthias Clasen
5ff6481310
Add a getter to the pipeline layout directly from the pipeline
...
This is a step towards allowing multiple pipeline layouts.
2017-09-22 22:16:09 -04:00
Matthias Clasen
4c7a51f88a
vulkan: Move descriptor set layout to the render object
...
We want to maintain a single descriptor set layout while introducing
multiple pipeline layouts, so split this off.
2017-09-22 22:16:09 -04:00
Matthias Clasen
e97a78840f
gsk: vulkan: Drop an unused api
...
We don't use the upload-single-region api anymore.
No need to keep it around.
2017-09-21 13:47:17 -04:00
Matthias Clasen
dbc0caf27d
vulkan: Batch uploads from the glyph cache
...
This uses the new api that was introduced in the previous
commit.
2017-09-21 13:45:01 -04:00
Matthias Clasen
64322a2c41
vulkan: Add an api to update multiple image regions
...
Instead of doing multiple copy commands with a tiny buffer
for each glyph, we can just batch them all together. This
also avoids the issue of creating multiple barriers for the
same image.
2017-09-21 13:42:57 -04:00
Matthias Clasen
9a1460218c
vulkan: Quiet another validation warning
...
It complains if a vertex shader has an out that is not matched
to an in of the fragment shader.
2017-09-21 12:05:00 -04:00
Matthias Clasen
8e26864778
vulkan: Quiet another validation error
2017-09-20 23:46:16 -04:00
Matthias Clasen
75bf6db5e0
Cosmetic change
2017-09-20 23:26:15 -04:00
Matthias Clasen
ce06c4b840
gsk: Make repeat nodes deserializable
...
This was just a simple oversight.
2017-09-20 23:26:15 -04:00
Matthias Clasen
b18ab9761a
gsk: Fix serialization of text nodes
2017-09-20 23:26:15 -04:00
Matthias Clasen
b5eeb98374
Add simple aging for the glyph cache
...
This should prevent the cache from growing out of bounds.
2017-09-20 23:26:14 -04:00
Lionel Landwerlin
7d7f8e5f8e
gsk vulkan: Use new api in the glyph cache
...
Use the newly introduced gsk_vulkan_image_new_for_atlas.
2017-09-20 23:26:14 -04:00
Lionel Landwerlin
b97fb75146
gsk: vulkan: rework image layout/access transitions
...
By tracking the last transition we can build the appropriate barriers.
Also use the most appropriate initial layout/access at creation :
for linear image : predefined (we prepare the content ourself through memcpy)
for everything else : undefined (we don't care about the content, will most likely be erase)
2017-09-20 23:26:14 -04:00
Lionel Landwerlin
28bd26ca06
gsk: vulkan: silence anisotropy validation warning
2017-09-20 23:26:14 -04:00
Matthias Clasen
b321b26a73
glyph cache: Upload glyphs incrementally
...
This does not work yet.
2017-09-20 23:26:14 -04:00
Matthias Clasen
7bbd4d41e0
vulkan: pass the context when creating a glyph cache
2017-09-20 23:26:14 -04:00
Matthias Clasen
5ee5af9bc8
vulkan: Add an upload_region api to GskVulkanImage
...
This will let us update larger textures incrementally.
Sadly, it does not work yet.
2017-09-20 23:26:14 -04:00
Matthias Clasen
6dbec5e4fc
Add some debug output for the glyph cache
...
Print out some statistics and dump the glyph caches to a png,
for now.
2017-09-20 23:26:14 -04:00
Matthias Clasen
baeff2a49b
Make the glyph cache grow as needed
...
Make it possible to have more than one texture in the
glyph cache, and create new ones when we run out of space
in the existing ones.
2017-09-20 23:26:14 -04:00
Matthias Clasen
cead00757d
vulkan: Move glyph cache to a separate file
...
Otherwise things will get too messy.
2017-09-20 23:26:14 -04:00
Matthias Clasen
4d4a0212fb
vulkan: Better glyph cache api
...
Move the glyph caching api to something that can support using
multiple textures. We now split the text render ops into multiple
ops for different textures, and make each op render just a substring
of the text node's glyph string.
2017-09-20 23:26:14 -04:00
Matthias Clasen
ff45a86a1c
Fix rendering glyphs from the cache
...
We were not quite using all the right dimensions.
2017-09-11 14:45:36 -04:00
Matthias Clasen
b0d108291b
Some fixes for the glyph cache
...
Copy the way cogl does its glyph caching some more.
At the minimum, this fixes problems where we were getting
wrong-sized Emoji inserted.
2017-09-11 14:02:44 -04:00
Matthias Clasen
40031930b2
Cosmetic changes
...
Make sure the cache size does not get out of sync with the
actual surface size.
2017-09-11 11:22:59 -04:00
Matthias Clasen
31ca709e23
Cosmetic changes
...
Use Pango macros for handling PANGO_SCALE.
2017-09-11 11:22:10 -04:00