lavapipe: fix logicop, independent blend enable/disable
The logicop_enable and independent_blend_enable vars need to always be assigned, otherwise, once turned on, they could never be disabled. This fixes a number of failures in VMware's test suite. Signed-off-by: Brian Paul <brianp@vmware.com> Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
This commit is contained in:
@@ -748,14 +748,14 @@ static void handle_graphics_pipeline(struct vk_cmd_queue_entry *cmd,
|
||||
const VkPipelineColorBlendStateCreateInfo *cb = pipeline->graphics_create_info.pColorBlendState;
|
||||
int i;
|
||||
|
||||
state->blend_state.logicop_enable = cb->logicOpEnable;
|
||||
if (cb->logicOpEnable) {
|
||||
state->blend_state.logicop_enable = VK_TRUE;
|
||||
if (!dynamic_states[conv_dynamic_state_idx(VK_DYNAMIC_STATE_LOGIC_OP_EXT)])
|
||||
state->blend_state.logicop_func = vk_conv_logic_op(cb->logicOp);
|
||||
}
|
||||
|
||||
if (cb->attachmentCount > 1)
|
||||
state->blend_state.independent_blend_enable = true;
|
||||
state->blend_state.independent_blend_enable = (cb->attachmentCount > 1);
|
||||
|
||||
for (i = 0; i < cb->attachmentCount; i++) {
|
||||
state->blend_state.rt[i].colormask = cb->pAttachments[i].colorWriteMask;
|
||||
state->blend_state.rt[i].blend_enable = cb->pAttachments[i].blendEnable;
|
||||
|
||||
Reference in New Issue
Block a user