mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
anv: centralize vk_to_intel_logic_op array
This avoids multiple copies as we will need this in multiple places. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10366>
This commit is contained in:
parent
1c718952c8
commit
e0c6055351
2 changed files with 4 additions and 2 deletions
|
|
@ -46,6 +46,8 @@ extern const uint32_t genX(vk_to_intel_compare_op)[];
|
|||
|
||||
extern const uint32_t genX(vk_to_intel_stencil_op)[];
|
||||
|
||||
extern const uint32_t genX(vk_to_intel_logic_op)[];
|
||||
|
||||
void genX(init_physical_device_state)(struct anv_physical_device *device);
|
||||
|
||||
VkResult genX(init_device_state)(struct anv_device *device);
|
||||
|
|
|
|||
|
|
@ -857,7 +857,7 @@ emit_ms_state(struct anv_graphics_pipeline *pipeline,
|
|||
#endif
|
||||
}
|
||||
|
||||
static const uint32_t vk_to_intel_logic_op[] = {
|
||||
const uint32_t genX(vk_to_intel_logic_op)[] = {
|
||||
[VK_LOGIC_OP_COPY] = LOGICOP_COPY,
|
||||
[VK_LOGIC_OP_CLEAR] = LOGICOP_CLEAR,
|
||||
[VK_LOGIC_OP_AND] = LOGICOP_AND,
|
||||
|
|
@ -1263,7 +1263,7 @@ emit_cb_state(struct anv_graphics_pipeline *pipeline,
|
|||
.AlphaToOneEnable = ms_info && ms_info->alphaToOneEnable,
|
||||
#endif
|
||||
.LogicOpEnable = info->logicOpEnable,
|
||||
.LogicOpFunction = vk_to_intel_logic_op[info->logicOp],
|
||||
.LogicOpFunction = genX(vk_to_intel_logic_op)[info->logicOp],
|
||||
/* Vulkan specification 1.2.168, VkLogicOp:
|
||||
*
|
||||
* "Logical operations are controlled by the logicOpEnable and
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue