aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-05-24 20:40:34 +0200
committerAlexander Orzechowski <alex@ozal.ski>2023-06-07 10:06:27 +0000
commit1b947c08c66c039ce44caeaa35de9f0f455206b8 (patch)
treeafb1a685382606d3c73edeea1100e1ddaab928f9 /render
parent2a2f0772a9b0ac9297fc10ede20b2385fe0777f7 (diff)
render/vulkan: require format info for shm
We use the format info to check the stride and need it to perform the texture upload.
Diffstat (limited to 'render')
-rw-r--r--render/vulkan/pixel_format.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/render/vulkan/pixel_format.c b/render/vulkan/pixel_format.c
index 3915075e..e75d9104 100644
--- a/render/vulkan/pixel_format.c
+++ b/render/vulkan/pixel_format.c
@@ -4,6 +4,7 @@
#include <vulkan/vulkan.h>
#include <wlr/util/log.h>
#include <xf86drm.h>
+#include "render/pixel_format.h"
#include "render/vulkan.h"
static const struct wlr_vk_format formats[] = {
@@ -433,10 +434,12 @@ void vulkan_format_props_query(struct wlr_vk_device *dev,
struct wlr_vk_format_props props = {0};
props.format = *format;
+ const struct wlr_pixel_format_info *format_info = drm_get_pixel_format_info(format->drm);
+
// non-dmabuf texture properties
const char *shm_texture_status;
if ((fmtp.formatProperties.optimalTilingFeatures & shm_tex_features) == shm_tex_features &&
- !format->is_ycbcr) {
+ !format->is_ycbcr && format_info != NULL) {
VkPhysicalDeviceImageFormatInfo2 fmti = {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2,
.type = VK_IMAGE_TYPE_2D,