.frontFace = VK_FRONT_FACE_CCW
};
+ VkPipelineCbStateCreateInfo cb_create_info = {
+ .sType = VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO,
+ .pNext = &rs_create_info,
+ .attachmentCount = 1,
+ .pAttachments = (VkPipelineCbAttachmentState []) {
+ { .channelWriteMask = VK_CHANNEL_A_BIT |
+ VK_CHANNEL_R_BIT | VK_CHANNEL_G_BIT | VK_CHANNEL_B_BIT },
+ }
+ };
+
anv_pipeline_create((VkDevice) device,
&(VkGraphicsPipelineCreateInfo) {
.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
- .pNext = &rs_create_info,
+ .pNext = &cb_create_info,
.flags = 0,
.layout = 0
},
.sType = VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO,
},
&device->clear_state.rs_state);
+
+ anv_CreateDynamicColorBlendState((VkDevice) device,
+ &(VkDynamicCbStateCreateInfo) {
+ .sType = VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO
+ },
+ &device->clear_state.cb_state);
+
}
#define NUM_VB_USED 2
struct anv_bindings bindings;
struct anv_bindings *old_bindings;
struct anv_pipeline *old_pipeline;
+ VkDynamicCbState cb_state;
};
static void
.frontFace = VK_FRONT_FACE_CCW
};
+ VkPipelineCbStateCreateInfo cb_create_info = {
+ .sType = VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO,
+ .pNext = &rs_create_info,
+ .attachmentCount = 1,
+ .pAttachments = (VkPipelineCbAttachmentState []) {
+ { .channelWriteMask = VK_CHANNEL_A_BIT |
+ VK_CHANNEL_R_BIT | VK_CHANNEL_G_BIT | VK_CHANNEL_B_BIT },
+ }
+ };
+
VkGraphicsPipelineCreateInfo pipeline_info = {
.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO,
- .pNext = &rs_create_info,
+ .pNext = &cb_create_info,
.flags = 0,
.layout = pipeline_layout,
};
anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
VK_STATE_BIND_POINT_RASTER,
device->blit_state.rs_state);
+
+ saved_state->cb_state = (VkDynamicCbState) cmd_buffer->cb_state;
+ anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ VK_STATE_BIND_POINT_COLOR_BLEND,
+ device->blit_state.cb_state);
}
struct blit_region {
const struct anv_saved_state *saved_state)
{
anv_cmd_buffer_restore(cmd_buffer, saved_state);
+ anv_CmdBindDynamicStateObject((VkCmdBuffer) cmd_buffer,
+ VK_STATE_BIND_POINT_COLOR_BLEND,
+ saved_state->cb_state);
}
static VkFormat