Age | Commit message (Collapse) | Author |
|
|
|
Some comments in here are noise.
|
|
|
|
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.
|
|
Address Sanitizer reported two memory leaks because of
fmt not being freed in wlr_drm_format_set_copy.
This commit fixes the memory leak by removing the
allocation to the heap. The struct is allocated to the
stack anyway.
|
|
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.
|
|
This fixes the following validation errors when shutting down Sway:
00:00:01.263 [wlr] [render/vulkan/vulkan.c:65] Validation Error: [ VUID-vkDestroyFramebuffer-framebuffer-00892 ] Object 0: handle = 0x62e00003c400, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xdb308312 | Cannot call vkDestroyFramebuffer on VkFramebuffer 0x2e2cd000000002b[] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to framebuffer must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyFramebuffer-framebuffer-00892) (VUID-vkDestroyFramebuffer-framebuffer-00892)
00:00:01.264 [wlr] [render/vulkan/vulkan.c:65] Validation Error: [ VUID-vkDestroyImage-image-01000 ] Object 0: handle = 0x62e00003c400, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf2d29b5a | Cannot call vkDestroyImage on VkImage 0x3fbcd60000000028[] that is currently in use by a command buffer. The Vulkan spec states: All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkDestroyImage-image-01000) (VUID-vkDestroyImage-image-01000)
|
|
|
|
|
|
Now it takes a reference to a destination format
|
|
|
|
|
|
|
|
Don't store modifiers as part of the struct.
|
|
|
|
This format doesn't change its layout on big endian because it's
not packed and has 8-bit channels.
|
|
Remove debug logs when a texture is created, since this happens
pretty often. Use drmGetFormatName() and drmGetFormatModifierName()
to log DRM formats and modifiers.
|
|
This ensures that the pool sizes grow exponentially, making the number
of pools needed logarithmic in the number of descriptors, instead of
linear. Since the first pool's size is 256, this change only has an
effect when the compositor creates a large number of textures.
|
|
|
|
The usages in linux_dmabuf zero out the dst before passing it so this
change should be fine.
|
|
|
|
|
|
|
|
Allow callers to pick the blend mode when rendering a rect. The
"none" mode can be used to disable blending and clear rects.
|
|
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3642
Fixes: 6830bfc17fd9 ("render/pixman: implement render pass API")
|
|
This simplifies the vkQueueSubmit call, removing the need to pass
timeline semaphore point values as separate arrays.
|
|
|
|
This logic is used twice.
|
|
Add a render pass implementation which leverages the legacy
rendering API. This is helpful during the migration.
|
|
|
|
Goals:
- Extensibility: we need to be able to add new params to the calls
to render a texture/rect. For instance we'll need to add fences to
the render texture operation for explicit sync purposes.
- No implicit state: no more bind_buffer, begin, end.
- No matrices: these hurt Pixman and we don't need them.
- Clip regions for optimized damage repainting.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3188
|
|
strcmp() returns a signed integer.
|
|
|
|
|
|
This makes grepping much easier.
|
|
Setting the GLESv2 parameter GL_PACK_ALIGNMENT to 1 ensures that the
stride of the glReadPixels output matches the value computed in
`pack_stride`. Since the default value of GL_PACK_ALIGNMENT is 4, this
does not make a difference under normal use; but without this patch
the stride can be incorrect; for example, with RGB565 buffers and
screenshots of regions with odd width.
|
|
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3610
|
|
|
|
Instead of returning a primary node from wlr_renderer_get_drm_fd(),
prefer to return a render node if any.
|
|
render/vulkan/renderer.c:388:70: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'VkFence' (aka 'unsigned long long') [-Werror,-Wint-conversion]
VkResult res = vkQueueSubmit(renderer->dev->queue, 1, &submit_info, NULL);
^~~~
render/vulkan/renderer.c:1141:81: error: incompatible pointer to integer conversion passing 'void *' to parameter of type 'VkFence' (aka 'unsigned long long') [-Werror,-Wint-conversion]
VkResult res = vkQueueSubmit(renderer->dev->queue, submit_count, submit_infos, NULL);
^~~~
/usr/include/sys/_null.h:34:14: note: expanded from macro 'NULL'
#define NULL ((void *)0)
^~~~~~~~~~~
/usr/local/include/vulkan/vulkan_core.h:4054:49: note: passing argument to parameter 'fence' here
VkFence fence);
^
Fixes: a8a194d695af ("render/vulkan: switch to timeline semaphores")
|
|
Past that point the wlr_allocator is gone and the listeners are
invalidated.
|
|
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.
|
|
Reverts commit c73e20628ad3cf8a38fc1cebd061a49da8708394.
This caused a regression in the GLES2 renderer because `egl->exts.EXT_device_drm` is set in
`egl_init_display()`, which is invoked after `get_egl_device_from_drm_fd()`. So the function will
always return `EGL_NO_DEVICE_EXT`.
|
|
Without EGL_EXT_device_drm, eglQueryDeviceStringEXT(EGL_DRM_DEVICE_FILE_EXT) further below is invalid.
|
|
The spec [1] says that the maximum value for a mediump float
is at least 2¹⁴ in section 4.5.2. However, when using a 4k
resolution texture coordinates will exceed this value. This causes
issues on drivers which implement mediump as a 16-bit [2].
Switch to highp. There's a twist: on GLES2, support for highp is
optional. So we need to guard it with cute GL_FRAGMENT_PRECISION_HIGH
ifdefs.
[1]: https://registry.khronos.org/OpenGL/specs/es/2.0/GLSL_ES_Specification_1.00.pdf
[2]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21082
|
|
Doesn't matter a lot, but let's try to be consistent with the
GL headers.
|
|
Fail with a clearer error when the requested size is too large.
Without this, we allocate a buffer with a size smaller than what
was requested.
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3975
|
|
|
|
|
|
|