Commit graph

18 commits

Author SHA1 Message Date
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.
2022-12-02 15:18:59 +00:00
Simon Ser
db9d277614 render/vulkan: make vulkan_format_props_find_modifier() return value const 2022-12-02 15:18:59 +00:00
Simon Ser
bc7f8de842 render/vulkan: improve message on format prop error
Use a more appropriate message on
vkGetPhysicalDeviceImageFormatProperties2() error.
2022-12-02 16:10:42 +01:00
Simon Ser
338a9616bd render/vulkan: simplify vulkan_format_props_query() 2022-12-02 16:10:41 +01:00
Simon Ser
a3874cac6c render/vulkan: extract DMA-BUF format query to separate function 2022-12-02 16:09:58 +01:00
Simon Ser
21c4516838 render/vulkan: add 64-bit UNORM and SFLOAT formats 2022-12-02 10:36:36 +01:00
Simon Ser
9f938f7f2a render/vulkan: add more packed formats 2022-12-02 10:35:45 +01:00
Simon Ser
171c9081d1 render/vulkan: add more 8 bits per channel formats 2022-12-02 10:28:52 +01:00
Simon Ser
ad165f7daf render/vulkan: explain format mapping with DRM 2022-12-02 10:24:00 +01:00
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.
2022-12-02 10:24:00 +01:00
Simon Ser
0730552e85 render/vulkan: drop unused fields from wlr_vk_format_modifier_props
export_imported is never used, and dmabuf_flags is already checked
in query_modifier_support().
2022-11-28 10:22:56 +01:00
Manuel Stoeckl
3ed69b4946 render/vulkan: add support for RGB565 texture format
Since this does not have a matching _SRGB-type vulkan format, add a
new shader variant/pipeline to perform the sRGB->linear texture
conversion.
2022-11-25 14:19:27 +00:00
David96
dce1372e35 render/vulkan: Implement vulkan_read_pixels 2022-10-07 15:59:39 +00:00
Simon Ser
bca60c4eec render/vulkan: improve format logging 2022-09-14 12:13:48 +02:00
Simon Ser
30769723c1 render/vulkan: fix format features check for shm textures
We were checking whether any of the features was supported. We need
to check if all of them are.

This makes the check consistent with query_modifier_support() above.
2022-09-07 15:46:38 +02:00
bi4k8
f295aff762 Add missing & 2022-06-11 20:41:16 +00:00
bi4k8
35d1bcff6f render/vulkan/pixel_format: do not leak props->...
`vulkan_format_props_query` calls `query_modifier_support` which
initializes fields of `props` with allocated memory. this memory is
leaked if `query_modifier_support` does not find a supported format
and shmtex is not supported, as in this case `add_fmt_props` ends
up being false and the allocated fields of `props` are never freed.
2022-06-11 20:25:35 +00:00
nyorain
8e34692250 render/vulkan: add Vulkan renderer
This new renderer is implemented with the existing wlr_renderer API
(which is known to be sub-optimal for some operations). It's not
used by default, but users can opt-in by setting WLR_RENDERER=vulkan.

The renderer depends on VK_EXT_image_drm_format_modifier and
VK_EXT_physical_device_drm.

Co-authored-by: Simon Ser <contact@emersion.fr>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
2021-10-18 11:51:13 +02:00