mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 13:40:11 +01:00
vulkan/wsi: warn once when HDR metadata is skipped because of protocol errors
Signed-off-by: Xaver Hugl <xaver.hugl@kde.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34000>
This commit is contained in:
parent
cb7726bb2c
commit
0c1f2b90c9
1 changed files with 6 additions and 2 deletions
|
|
@ -1251,8 +1251,12 @@ wsi_wl_swapchain_update_colorspace(struct wsi_wl_swapchain *chain)
|
|||
.max_fall = round(chain->color.hdr_metadata.maxFrameAverageLightLevel),
|
||||
.max_cll = round(chain->color.hdr_metadata.maxContentLightLevel),
|
||||
};
|
||||
bool should_use_hdr_metadata = chain->color.has_hdr_metadata
|
||||
&& is_hdr_metadata_legal(&wayland_hdr_metadata);
|
||||
bool should_use_hdr_metadata = chain->color.has_hdr_metadata;
|
||||
if (should_use_hdr_metadata) {
|
||||
should_use_hdr_metadata &= is_hdr_metadata_legal(&wayland_hdr_metadata);
|
||||
if (!should_use_hdr_metadata)
|
||||
mesa_log_once(MESA_LOG_WARN, "Not using HDR metadata to avoid protocol errors");
|
||||
}
|
||||
for (int i = 0; i < ARRAY_SIZE(colorspace_mapping); i++) {
|
||||
if (colorspace_mapping[i].colorspace == chain->color.colorspace) {
|
||||
should_use_hdr_metadata &= colorspace_mapping[i].should_use_hdr_metadata;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue