mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
render/vulkan: make vulkan_format_props_find_modifier() return value const
This commit is contained in:
parent
b4ad4671dc
commit
db9d277614
3 changed files with 3 additions and 3 deletions
|
@ -108,7 +108,7 @@ struct wlr_vk_format_props {
|
||||||
|
|
||||||
void vulkan_format_props_query(struct wlr_vk_device *dev,
|
void vulkan_format_props_query(struct wlr_vk_device *dev,
|
||||||
const struct wlr_vk_format *format);
|
const struct wlr_vk_format *format);
|
||||||
struct wlr_vk_format_modifier_props *vulkan_format_props_find_modifier(
|
const struct wlr_vk_format_modifier_props *vulkan_format_props_find_modifier(
|
||||||
struct wlr_vk_format_props *props, uint64_t mod, bool render);
|
struct wlr_vk_format_props *props, uint64_t mod, bool render);
|
||||||
void vulkan_format_props_finish(struct wlr_vk_format_props *props);
|
void vulkan_format_props_finish(struct wlr_vk_format_props *props);
|
||||||
|
|
||||||
|
|
|
@ -414,7 +414,7 @@ void vulkan_format_props_finish(struct wlr_vk_format_props *props) {
|
||||||
free(props->render_mods);
|
free(props->render_mods);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_vk_format_modifier_props *vulkan_format_props_find_modifier(
|
const struct wlr_vk_format_modifier_props *vulkan_format_props_find_modifier(
|
||||||
struct wlr_vk_format_props *props, uint64_t mod, bool render) {
|
struct wlr_vk_format_props *props, uint64_t mod, bool render) {
|
||||||
if (render) {
|
if (render) {
|
||||||
for (unsigned i = 0u; i < props->render_mod_count; ++i) {
|
for (unsigned i = 0u; i < props->render_mod_count; ++i) {
|
||||||
|
|
|
@ -451,7 +451,7 @@ VkImage vulkan_import_dmabuf(struct wlr_vk_renderer *renderer,
|
||||||
|
|
||||||
uint32_t plane_count = attribs->n_planes;
|
uint32_t plane_count = attribs->n_planes;
|
||||||
assert(plane_count < WLR_DMABUF_MAX_PLANES);
|
assert(plane_count < WLR_DMABUF_MAX_PLANES);
|
||||||
struct wlr_vk_format_modifier_props *mod =
|
const struct wlr_vk_format_modifier_props *mod =
|
||||||
vulkan_format_props_find_modifier(fmt, attribs->modifier, for_render);
|
vulkan_format_props_find_modifier(fmt, attribs->modifier, for_render);
|
||||||
if (!mod) {
|
if (!mod) {
|
||||||
wlr_log(WLR_ERROR, "Format %"PRIx32" (%.4s) can't be used with modifier "
|
wlr_log(WLR_ERROR, "Format %"PRIx32" (%.4s) can't be used with modifier "
|
||||||
|
|
Loading…
Reference in a new issue