lavapipe: stop reading renderpass during pipeline creation
this is unnecessary and is going to be annoying in the future Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349>
This commit is contained in:

committed by
Marge Bot

parent
cae1ef0a11
commit
d103d5bb5d
@@ -842,12 +842,12 @@ lvp_graphics_pipeline_init(struct lvp_pipeline *pipeline,
|
|||||||
|
|
||||||
bool rasterization_disabled = !dynamic_state_contains(pipeline->graphics_create_info.pDynamicState, VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT) &&
|
bool rasterization_disabled = !dynamic_state_contains(pipeline->graphics_create_info.pDynamicState, VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT) &&
|
||||||
pipeline->graphics_create_info.pRasterizationState->rasterizerDiscardEnable;
|
pipeline->graphics_create_info.pRasterizationState->rasterizerDiscardEnable;
|
||||||
LVP_FROM_HANDLE(lvp_render_pass, pass, pipeline->graphics_create_info.renderPass);
|
|
||||||
if (!dynamic_state_contains(pipeline->graphics_create_info.pDynamicState, VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT) &&
|
if (!dynamic_state_contains(pipeline->graphics_create_info.pDynamicState, VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT) &&
|
||||||
!rasterization_disabled && pass->has_color_attachment) {
|
!rasterization_disabled) {
|
||||||
const VkPipelineColorWriteCreateInfoEXT *cw_state =
|
const VkPipelineColorWriteCreateInfoEXT *cw_state =
|
||||||
vk_find_struct_const(pCreateInfo->pColorBlendState, PIPELINE_COLOR_WRITE_CREATE_INFO_EXT);
|
vk_find_struct_const(pCreateInfo->pColorBlendState, PIPELINE_COLOR_WRITE_CREATE_INFO_EXT);
|
||||||
if (cw_state) {
|
if (cw_state) {
|
||||||
|
assert(cw_state->attachmentCount <= pipeline->graphics_create_info.pColorBlendState->attachmentCount);
|
||||||
for (unsigned i = 0; i < cw_state->attachmentCount; i++)
|
for (unsigned i = 0; i < cw_state->attachmentCount; i++)
|
||||||
if (!cw_state->pColorWriteEnables[i]) {
|
if (!cw_state->pColorWriteEnables[i]) {
|
||||||
VkPipelineColorBlendAttachmentState *att = (void*)&pipeline->graphics_create_info.pColorBlendState->pAttachments[i];
|
VkPipelineColorBlendAttachmentState *att = (void*)&pipeline->graphics_create_info.pColorBlendState->pAttachments[i];
|
||||||
|
Reference in New Issue
Block a user