-
Notifications
You must be signed in to change notification settings - Fork 343
render/vulkan: Refactor image usages for modifiers #3271
base: master
Are you sure you want to change the base?
render/vulkan: Refactor image usages for modifiers #3271
Conversation
cc @nyorain |
free(props->texture_mods); | ||
free(props->render_mods); | ||
for (int i = 0; i < WLR_VK_IMAGE_USAGE_COUNT; i++) | ||
free(props->mods[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codestyle nitpick: braces around the free statement
++props->texture_mod_count; | ||
|
||
found = true; | ||
wlr_drm_format_set_add(&dev->dmabuf_texture_formats, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You never add to this format_set anymore more if I didn't miss anything. This seems like a problem.
The code was repetitive, I agree that this approach is cleaner. |
render/vulkan/pixel_format.c
Outdated
|
||
static const VkFormatFeatureFlags mod_set_features[WLR_VK_IMAGE_USAGE_COUNT] = { | ||
[WLR_VK_IMAGE_USAGE_RENDER] = VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | | ||
VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: we don't align continuation lines, we just use one or two tabs.
render/vulkan/pixel_format.c
Outdated
|
||
static const VkImageUsageFlags mod_set_usage[WLR_VK_IMAGE_USAGE_COUNT] = { | ||
[WLR_VK_IMAGE_USAGE_RENDER] = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: unnecessary newline
if (!props->mods[i]) { | ||
wlr_log_errno(WLR_ERROR, "Allocation failed"); | ||
for (int j = 0; j < i; j++) | ||
free(props->mods[j]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: braces are mandatory
enum wlr_vk_image_usage { | ||
WLR_VK_IMAGE_USAGE_RENDER, | ||
WLR_VK_IMAGE_USAGE_SAMPLED, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nit: unnecessary newline
This is a glue file to allow integration with builds.sr.ht.
wlroots has migrated to gitlab.freedesktop.org. This pull request has been moved to: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3271 |
For `required` to disable search the value needs to be of `feature` type. Checking `gles2` via `in` keyword returns a `bool` but `required: false` makes the dependency optional instead of disabled.
This allows compositors to handle touch pointer emulation manually, instead of having Xwayland do it [1]. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/691
This struct contains additional information for session device change events, such as the DRM connector ID that has changed.
When a connector ID is specified in a hotplug event, don't scan all connectors. Only scan the connector that has changed.
Callers can access output->front_buffer instead.
The protocol uses a signed integer here, which is also what the wlr_input_method_v2_preedit_string struct provides to compositors from the input method protocol. Sway currently just passes those int32_t values directly to this function leading to an implicit conversion.
Makes this much more extensible so we could add a storage type in future for compute. Signed-off-by: Joshua Ashton <[email protected]>
88f06e9
to
9498632
Compare
Makes this much more extensible so we could add a storage type in future for compute.
Signed-off-by: Joshua Ashton [email protected]