mesa/src/vulkan/runtime/vk_blend.h
Christian Gmeiner 5eebc9c13f vulkan/runtime: Add helper to convert VkBlendOverlapEXT to pipe_blend_overlap_mode
Add vk_blend_overlay_to_pipe() to translate Vulkan's
blend overlap (VK_BLEND_OVERLAP_*_EXT) to the corresponding
pipe_blend_overlap_mode enum values.

This will be used by drivers implementing VK_EXT_blend_operation_advanced
to convert Vulkan state to driver-internal representation.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38929>
2026-01-24 21:44:01 +00:00

27 lines
595 B
C

/*
* Copyright 2023 Valve Corporation
* SPDX-License-Identifier: MIT
*/
#ifndef VK_BLEND_H
#define VK_BLEND_H
#include <stdbool.h>
#include "util/blend.h"
#include "vulkan/vulkan_core.h"
#ifdef __cplusplus
extern "C" {
#endif
enum pipe_logicop vk_logic_op_to_pipe(VkLogicOp in);
enum pipe_blend_func vk_blend_op_to_pipe(VkBlendOp in);
enum pipe_blendfactor vk_blend_factor_to_pipe(VkBlendFactor in);
enum pipe_advanced_blend_mode vk_advanced_blend_op_to_pipe(VkBlendOp in);
enum pipe_blend_overlap_mode vk_blend_overlap_to_pipe(VkBlendOverlapEXT in);
#ifdef __cplusplus
}
#endif
#endif