anv: fix some dynamic rasterization discard cases in pipeline construction

cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15280>
This commit is contained in:
Mike Blumenkrantz 2022-03-07 20:20:11 -05:00 committed by Marge Bot
parent 1e3e7b3a4d
commit 5ab0e3f0bb
1 changed files with 2 additions and 4 deletions

View File

@ -2426,8 +2426,7 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
}
const VkPipelineMultisampleStateCreateInfo *ms_info =
pCreateInfo->pRasterizationState->rasterizerDiscardEnable ? NULL :
pCreateInfo->pMultisampleState;
raster_discard ? NULL : pCreateInfo->pMultisampleState;
if (states & ANV_CMD_DIRTY_DYNAMIC_SAMPLE_LOCATIONS) {
const VkPipelineSampleLocationsStateCreateInfoEXT *sl_info = ms_info ?
vk_find_struct_const(ms_info, PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT) : NULL;
@ -2457,8 +2456,7 @@ copy_non_dynamic_state(struct anv_graphics_pipeline *pipeline,
}
if (states & ANV_CMD_DIRTY_DYNAMIC_COLOR_BLEND_STATE) {
if (!pCreateInfo->pRasterizationState->rasterizerDiscardEnable &&
uses_color_att) {
if (!raster_discard && uses_color_att) {
assert(pCreateInfo->pColorBlendState);
const VkPipelineColorWriteCreateInfoEXT *color_write_info =
vk_find_struct_const(pCreateInfo->pColorBlendState->pNext,