Austin Shafer
d368028bd5
allocator: remove backend parameter in allocator_autocreate_with_drm_fd
...
Since we only use the backend capabilities here we can simply pass
them in directly. This allows other locations to create an allocator
even if they don't have a backend. They can simply specify the caps
they want instead.
10 months ago
Leo Li
71fb55f3bf
render/pixel-format: Move has_alpha into it's own array
...
Some opaque pixel formats (nv12, p010) require per-plane bytes_per_block
info. However, it doesn't make sense to store them in
wlr_pixel_format_info, as they will never be useful (currently, this
info is used for shm, which doesn't have a concept of multi-planar
buffers.)
Let's define a separate array and function for determining whether a
pixel format has alpha.
10 months ago
Manuel Stoeckl
d6859da3b4
render/vulkan: use _SRGB image view when possible
...
This is the last of a set of commits which ensures that both textures
and render buffers can be accessed through _UNORM and _SRGB image
views. While _UNORM image views are not yet used for 8-bpc image
formats, they will be needed in the future to support color transforms
for both textures and render buffers.
12 months ago
Manuel Stoeckl
566c413d8f
render/vulkan: constify vulkan_format_props_find_modifier
12 months ago
Manuel Stoeckl
fd4548bb93
render/vulkan: detect which _UNORM formats support _SRGB views
12 months ago
Manuel Stoeckl
eab89d6c76
render/vulkan: track and use _UNORM variants of _SRGB formats
...
Later commits will start using _SRGB image views again,
where appropriate.
12 months ago
Alexander Orzechowski
d3a339a03e
renderer: Drop buffer binding
12 months ago
Alexander Orzechowski
09f16b2a9c
render/vulkan: Implement texture_read_pixels
12 months ago
Alexander Orzechowski
e7055b4840
render/gles2: Implement texture_read_pixels
...
Also get rid of gles2_texture.owns_texture. We only use the tex/fbo
12 months ago
Simon Ser
e8b187cc92
render/gles2: save/restore context when creating/submitting a render pass
...
This is useful for e.g. lazily blitting a texture for readback
purposes while rendering.
1 year ago
Simon Ser
876d789ad5
render/gles2: reword wlr_gles2_texture comments
...
These comments were a bit misleading:
- "GL_TEXTURE_2D == mutable": not really, imported non-external-only
DMA-BUFs would also use this target, but are not mutable.
- "Only affects target == GL_TEXTURE_2D": same here.
- "If imported from a wlr_buffer": not really, would be NULL if
imported from a shm wlr_buffer.
Adjust these comments to better reflect reality and adjust the check
in gles2_texture_update_from_buffer().
1 year ago
Alexander Orzechowski
9bf51e744e
render/gles2: Don't attach texture as buffer addon
...
Since wlr_gles2_buffer is now managing importing for us, there is
no reason for us to continue doing this.
1 year ago
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
1 year 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