Alexander Orzechowski
829e34b305
render/gles2: Don't track image in texture
...
We can get it from the buffer
1 year ago
Alexander Orzechowski
cb5f67431b
render/gles2: Don't double import dmabuf
...
We can double import a dmabuf if we use it as a texture target and
a render target. Instead, let's unify render targets and texture dmabuf
imports to use wlr_gles2_buffer which manages the EGLImageKHR
1 year ago
Alexander Orzechowski
484e248446
renderer/gles2: Bail rendering to external buffers when binding them
...
We can't do it while we're creating them because we'll want to use
gles2 buffers for textures soon.
1 year ago
Alexander Orzechowski
0d9cd6932a
render/gles2: Lazily create buffer fbo
1 year ago
Alexander Orzechowski
9118226634
render/gles2: Don't track has_alpha in pixel_format
...
Why track the alpha here when we can already get that information
elsewhere?
1 year ago
Simon Ser
9a0a4ce221
render/vulkan: drop current_command_buffer
...
This was used by the legacy rendering API. Since begin()/end()
only need to set current_render_buffer and nothing else, we can
drop all of these bits.
1 year ago
Simon Ser
40633ae7fd
render: drop legacy render pass
...
All built-in renderers now implement the new API.
1 year ago
Manuel Stoeckl
e0adaaffb6
render/vulkan: constrain blend to output subpass to redrawn region
...
This commit only applies to the render pass API.
1 year ago
Kirill Primak
a09d649439
docs: replace the less commonly used "::" with "."
1 year ago
Simon Ser
65bbbbbf0c
render/vulkan: de-duplicate VkImageUsageFlags
...
The flags passed to vkCreateImage() must match the flags used when
querying formats. Make this clearer by using the same variable.
1 year ago
Alexander Orzechowski
6bd44c4fcd
renderer: Introduce wlr_scale_filter_mode
1 year ago
Alexander Orzechowski
3ee0f52e09
render/vulkan: Dynamically create texture views
...
Now that we are dynamically creating pipeline layouts, we need separate
texture views for each pipeline layout we choose to use with a texture.
1 year ago
Alexander Orzechowski
8a387b5558
render/vulkan: Dynamically create pipeline layouts
...
These will happen lazily when pipelines get created.
1 year ago
Alexander Orzechowski
3623005858
render/vulkan/pipeline_key: Add blending
...
This will become necessary when we switch away from scissoring. For the
time being, this cleans things up a bit and allows for a trivial
blending implementation for textures when that comes.
1 year ago
Alexander Orzechowski
9d31372930
render/vulkan: Handle quad pipeline through generic pipeline path
1 year ago
Alexander Orzechowski
97fdd57eb2
render/vulkan: Dynamically handle pipeline creation for textures
...
If we ever wanted to handle dynamic state that requires new pipelines
such as using different texture filters those can be added here with more
ease.
1 year ago
Rose Hudson
45ca284eee
render/gles2: implement timer API
2 years ago
Simon Ser
0ba3ea3bcd
render/vulkan: improve error handling in render_pass_submit()
...
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3644
2 years ago
Simon Ser
e07c77f846
render/vulkan: implement render pass API
2 years ago
Alexander Orzechowski
8af00d5534
renderer/gles2: Implement render pass interface
2 years ago
Alexander Orzechowski
b1d26ed47b
renderer/gles2: Compute texture coordinates based off of vertex positions
2 years ago
Simon Ser
f60b367db7
render/vulkan: drop unused vulkan_has_extension()
2 years ago
Simon Ser
42eec38ab6
render/vulkan: drop unused vulkan_change_layout_queue()
2 years ago
Simon Ser
c7ae9dfaf8
render/vulkan: generalize YCbCr format support
2 years ago
Simon Ser
5ea0eb3468
render/vulkan: add vulkan_get_pipeline_layout()
...
Will make it easier to add more pipeline layouts for other YCbCr
formats.
2 years ago
Simon Ser
fd38761676
render/vulkan: introduce struct wlr_vk_pipeline_layout
...
This will make it easier to create one pipeline layout (plus related
objects) per YCbCr format.
2 years ago
Simon Ser
96f3f3c92e
render/pixel-format: add support for block-based formats
...
Some formats like sub-sampled YCbCr use a block of bytes to
store the color values for more than one pixel. Update our format
table to be able to handle such formats.
2 years ago
Simon Ser
78a1ac540e
render/pixel-format: add docs
2 years ago
Manuel Stoeckl
10dd416694
render/vulkan: allow rendering to non-8-bit buffers
...
This is implemented by a two-subpass rendering scheme; the first
subpass draws (and blends) onto a linear R16G16B16A16_SFLOAT buffer,
while the second subpass performs linear->srgb conversion, writing
onto the actual output buffer.
2 years ago
Alexander Orzechowski
90d08f8f1c
wlr_drm_format: Rework wlr_drm_format_intersect
...
Now it takes a reference to a destination format
2 years ago
Alexander Orzechowski
340700cb70
wlr_drm_format: Change wlr_drm_format_dup to copy
2 years ago
Alexander Orzechowski
099a147439
wlr_drm_format: Change wlr_drm_format_create to init
2 years ago
Alexander Orzechowski
e427e019c4
wlr_drm_format: Don't take double pointer in wlr_drm_format_add
2 years ago
Simon Ser
b03f71fe5f
render/vulkan: add support for NV12
2 years ago
Simon Ser
f5a5712a02
render/vulkan: use VK_KHR_synchronization2
...
This simplifies the vkQueueSubmit call, removing the need to pass
timeline semaphore point values as separate arrays.
2 years ago
Simon Ser
6830bfc17f
render/pixman: implement render pass API
2 years ago
Simon Ser
6ce371a317
render/pixman: add begin_pixman_data_ptr_access()
...
This logic is used twice.
2 years ago
Simon Ser
471249ae4f
render/pass: add legacy render pass implementation
...
Add a render pass implementation which leverages the legacy
rendering API. This is helpful during the migration.
2 years ago
Simon Ser
92b726ef67
render/vulkan: use full names for extension command fields
...
This makes grepping much easier.
2 years ago
Simon Ser
40117e1e0d
render/vulkan: prefer render node for wlr_renderer_get_drm_fd()
...
Instead of returning a primary node from wlr_renderer_get_drm_fd(),
prefer to return a render node if any.
2 years ago
Simon Ser
b33ab26fe7
render/swapchain: make public
...
We've had this struct for a while. It'd be useful for compositors
if they want to manage the swap chains themselves instead of being
forced to use wlr_output's. Some compositors might also want to use
a swapchain without an output.
2 years ago
Simon Ser
8456ac6fa9
render/vulkan: wait for DMA-BUF fences
...
The Vulkan spec doesn't guarantee that the driver will wait for
implicitly synchronized client buffers before texturing from them.
radv happens to perform the wait, but anv doesn't.
Fix this by extracting implicit fences from DMA-BUFs, importing
them into Vulkan as a VkSemaphore objects, and make the render pass
wait on these VkSemaphores.
2 years ago
Simon Ser
30219cf76b
render/dmabuf: add dmabuf_export_sync_file()
2 years ago
Simon Ser
337ef33edc
render/vulkan: make shm/dmabuf split clearer in wlr_vk_format_props
...
struct wlr_vk_format_props contains a mix of properties for shm
and dmabuf, and it's not immediately clear which fields are for
which kind of buffer. Use a nested struct to group the fields.
2 years ago
Simon Ser
db9d277614
render/vulkan: make vulkan_format_props_find_modifier() return value const
2 years ago
Simon Ser
c9b378d21a
render/drm-format-set: add wlr_drm_format_set_copy()
2 years ago
Simon Ser
8b9a48c984
render/vulkan: drop "_format" in wlr_vk_format fields
...
"format" is already in the name, no need to repeat ourselves.
`format->vk_format` sounds a bit redundant.
2 years ago
Simon Ser
d2238bf722
render/vulkan: import semaphore to DMA-BUF instead of blocking
...
Right now the Vulkan renderer blocks until the frame is complete
after rendering. This is necessary because Vulkan doesn't
interoperate well with implicit sync we use everywhere else.
Use the new kernel API to import a sync_file into a DMA-BUF to
avoid blocking.
2 years ago
Simon Ser
aaf828d3d2
render/dmabuf: add dmabuf_import_sync_file
...
References: https://lore.kernel.org/dri-devel/20220506180216.2095060-1-jason@jlekstrand.net/
2 years ago
Simon Ser
10f543d579
render/vulkan: release stage buffers after command buffer completes
...
We need to wait for the pending command buffer to complete before
re-using stage buffers. Otherwise we'll overwrite the stage buffer
with new contents before the texture is fully uploaded.
2 years ago