Age | Commit message (Collapse) | Author |
|
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.
|
|
Fixes: 71fb55f3 ("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.
|
|
|
|
|
|
|
|
This makes wlroots build in C23 mode.
C23 is more strict and rejects implicit conversions from bool to a
pointer.
|
|
wl_drm is a legacy interface superseded by the linux-dmabuf
protocol. All clients should migrate.
As a first step, stop creating the wl_drm global by default.
This should let us discover any remaining issues in clients.
Compositors can still manually create the global if they want to.
As a second step, we can completely drop our implementation.
|
|
This is similar to wlr_pixman_texture_get_image and can be useful for
compositors to access the rendering data.
|
|
Replacement for wlr_gles2_renderer_get_current_fbo(). Wayfire uses
it for instance.
|
|
linux-dmabuf used to not need a DRM FD, however since v4 a DRM FD
is required for the main_device event.
|
|
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.
|
|
|
|
|
|
|
|
|
|
Later commits will start using _SRGB image views again,
where appropriate.
|
|
|
|
|
|
Sadly, the new API is not backwards compatible with the old API. Since
we have already switched all users in wlroots to the new API compositors
are already practically mandated to implement the new API. Let's get rid
of the old one since there is no point.
|
|
|
|
|
|
|
|
Also get rid of gles2_texture.owns_texture. We only use the tex/fbo
|
|
|
|
|
|
|
|
This is useful for e.g. lazily blitting a texture for readback
purposes while rendering.
|
|
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().
|
|
Let's us share more code with the other code path
|
|
Since wlr_gles2_buffer is now managing importing for us, there is
no reason for us to continue doing this.
|
|
We can get it from the buffer
|
|
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
|
|
Since imported textures will be based off of gles2_buffer we have
to destroy textures first or else they will have an invalid reference
to the buffers they are imported from.
|
|
We can't do it while we're creating them because we'll want to use
gles2 buffers for textures soon.
|
|
|
|
This is always true now that we can only render with a buffer.
|
|
|
|
If the external-only flag is set, then the EGLImage is only
supported for use with GL_TEXTURE_EXTERNAL_OES texture targets.
In particular, the EGLImage cannot be bound to a RBO.
|
|
Why track the alpha here when we can already get that information
elsewhere?
|
|
It's possible that we don't have an EGLDevice if we created the
EGL context from a GBM device. Let's ensure all GPU-accelerated
renderers always have a DRM FD to return by falling back to GBM's
FD.
|
|
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.
|
|
Many files used to require wlr_matrix but no longer do.
|
|
These aren't really tied to wlr_output.
|
|
|
|
|
|
|
|
|
|
All built-in renderers now implement the new API.
|
|
When a texel from the Vulkan format VK_FORMAT_B8G8R8A8_SRGB is read,
the sRGB to linear conversion is applied independently to the R, G,
and B channels; the A channel has no influence on this. However,
DRM_FORMAT_ARGB8888 buffers are, per Wayland protocol, not encoded
in this fashion; one must first unpremultiply the color channels
before doing sRGB to linear conversion. This commit switches to
handling ARGB8888 and ABGR8888 formats using the general fragment
shader conversion from electrical to optical values.
|