aboutsummaryrefslogtreecommitdiff
path: root/render
AgeCommit message (Collapse)Author
2023-06-01render/vulkan: improve error handling in vulkan_begin_render_pass()Simon Ser
Release the command buffer if we end up not submitting it.
2023-06-01render/vulkan: improve error handling in render_pass_submit()Simon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3644
2023-05-31render/vulkan: handle vulkan_record_stage_cb() failuresSimon Ser
2023-05-30render/vulkan: implement render pass APISimon Ser
2023-05-28renderer/gles2: Implement render pass interfaceAlexander Orzechowski
2023-05-28renderer/gles2: Compute texture coordinates based off of vertex positionsAlexander Orzechowski
2023-05-28renderer/gles2: Merge get_buffer and create_bufferAlexander Orzechowski
2023-05-28renderer/gles2: Interpret matrix as column major in shaderAlexander Orzechowski
Avoids us needing to transpose.
2023-05-28render/vulkan: add 10, 12, and 16-bit YCbCr formatsSimon Ser
2023-05-26render/vulkan: document TEXTURE_TRANSFORM_* in shaderSimon Ser
2023-05-26render/vulkan: drop unused vulkan_has_extension()Simon Ser
2023-05-26render/vulkan: drop unused vulkan_change_layout_queue()Simon Ser
2023-05-24render/egl: check for EGL_EXT_device_query in get_egl_device_from_drm_fd()Simon Ser
We use eglQueryDeviceStringEXT() later on, which is optional and requires support for the EGL_EXT_device_query extension.
2023-05-24render/vulkan: de-dup pipeline layout initializationSimon Ser
2023-05-24render/vulkan: add more YCbCr formatsSimon Ser
The Vulkan spec states: > For the purposes of range expansion and Y′CBCR model conversion, > the R and B components contain color difference (chroma) values > and the G component contains luma. The equations below that sentence also help understand the mapping.
2023-05-24render/vulkan: require support for linear filter for YCbCrSimon Ser
YCBCR_CONVERSION_LINEAR_FILTER is not enough: this one only covers chromaFilter. For magFilter/minFilter we need FILTER_LINEAR as well.
2023-05-24render/vulkan: check format support before creating YCbCr samplerSimon Ser
We need to check whether the format supports dma_tex_ycbcr_features before creating the YCbCr sampler.
2023-05-24render/vulkan: generalize YCbCr format supportSimon Ser
2023-05-24render/vulkan: add init_{default,ycbcr}_pipeline_layout()Simon Ser
2023-05-24render/vulkan: add vulkan_get_pipeline_layout()Simon Ser
Will make it easier to add more pipeline layouts for other YCbCr formats.
2023-05-24render/vulkan: introduce struct wlr_vk_pipeline_layoutSimon Ser
This will make it easier to create one pipeline layout (plus related objects) per YCbCr format.
2023-05-24render/vulkan: use same sampler params for RGBA and NV12Simon Ser
2023-05-24render/vulkan: use VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE for default samplerSimon Ser
We don't actually need the REPEAT mode, and this makes things more consistent with the YCbCr sampler (which requires CLAMP_TO_EDGE for spec compliance). Also drop borderColor which is unused for this mode.
2023-05-24render/vulkan: use identity swizzle for YCbCr formatsSimon Ser
Fixes the following validation error: [ VUID-VkImageViewCreateInfo-pNext-01970 ] Object 0: handle = 0x62e00003c400, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf378e14b | vkCreateImageView(): If there is a VkSamplerYcbcrConversion, the imageView must be created with the identity swizzle.
2023-05-24render/vulkan: fix VkPipelineLayout when texturing NV12Simon Ser
The default pipeline layout was always passed. However, for NV12 we need to pass a different one.
2023-05-24render/vulkan: extract quad pipeline init to separate functionSimon Ser
Makes it clearer that all of these structs are for the quad pipeline.
2023-05-23render/vulkan: fix YCbCr format check in vulkan_texture_from_pixels()Simon Ser
2023-05-22render/vulkan: drop unnecessary commentsSimon Ser
Some comments in here are noise.
2023-05-21render/pixel-format: add YVYU and VYUYSimon Ser
2023-05-21render/pixel-format: add support for block-based formatsSimon Ser
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.
2023-05-14wlr_drm_format_set_copy: Do not allocate heapTobias Predel
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.
2023-05-12render/vulkan: allow rendering to non-8-bit buffersManuel Stoeckl
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.
2023-05-12render/vulkan: wait for idle queue before destroying render bufferSimon Ser
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)
2023-05-11wlr_drm_format_set_intersect: Clear destination before trying to write to itAlexander Orzechowski
2023-05-11wlr_drm_format_set: Store formats on arrayAlexander Orzechowski
2023-05-11wlr_drm_format: Rework wlr_drm_format_intersectAlexander Orzechowski
Now it takes a reference to a destination format
2023-05-11wlr_drm_format: Change wlr_drm_format_dup to copyAlexander Orzechowski
2023-05-11wlr_drm_format: Change wlr_drm_format_create to initAlexander Orzechowski
2023-05-11wlr_drm_format: Don't take double pointer in wlr_drm_format_addAlexander Orzechowski
2023-05-11wlr_drm_format: Make structure constant lengthAlexander Orzechowski
Don't store modifiers as part of the struct.
2023-05-11wlr_drm_format: Introduce drm_format_finishAlexander Orzechowski
2023-05-11render/vulkan: enable NV12 on big-endianSimon Ser
This format doesn't change its layout on big endian because it's not packed and has 8-bit channels.
2023-05-09render/vulkan: improve logging when creating textureSimon Ser
Remove debug logs when a texture is created, since this happens pretty often. Use drmGetFormatName() and drmGetFormatModifierName() to log DRM formats and modifiers.
2023-05-06render/vulkan: increase next descriptor pool sizeManuel Stoeckl
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.
2023-05-04render/vulkan: add support for NV12Simon Ser
2023-05-04drm_format_set_intersect: Require initialized dst and remove assertAlexander Orzechowski
The usages in linux_dmabuf zero out the dst before passing it so this change should be fine.
2023-05-04drm_format_set_union: Require initialized dst and remove assertAlexander Orzechowski
2023-05-04render/vulkan: fix code style for function bracketsSimon Ser
2023-05-03Add union function for format setsAustin Shafer
2023-05-02render: introduce blend modeSimon Ser
Allow callers to pick the blend mode when rendering a rect. The "none" mode can be used to disable blending and clear rects.