mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
anv: disable dual source blending state if not used in shader
Fixing some simulation issues on Gfx9/11 with zink on anv running dual source blending piglit tests like : ./bin/arb_blend_func_extended-dual-src-blending-discard-without-src1 -auto -fbo Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28901>
This commit is contained in:
parent
e6fb3ba037
commit
68dfe17abc
1 changed files with 19 additions and 0 deletions
|
|
@ -315,6 +315,15 @@ genX(rasterization_mode)(VkPolygonMode raster_mode,
|
|||
}
|
||||
}
|
||||
|
||||
static bool
|
||||
is_src1_blend_factor(enum GENX(3D_Color_Buffer_Blend_Factor) factor)
|
||||
{
|
||||
return factor == BLENDFACTOR_SRC1_COLOR ||
|
||||
factor == BLENDFACTOR_SRC1_ALPHA ||
|
||||
factor == BLENDFACTOR_INV_SRC1_COLOR ||
|
||||
factor == BLENDFACTOR_INV_SRC1_ALPHA;
|
||||
}
|
||||
|
||||
#if GFX_VERx10 == 125
|
||||
/**
|
||||
* Return the dimensions of the current rendering area, defined as the
|
||||
|
|
@ -1032,6 +1041,16 @@ genX(cmd_buffer_flush_gfx_runtime_state)(struct anv_cmd_buffer *cmd_buffer)
|
|||
dyn->cb.attachments[i].dst_alpha_blend_factor];
|
||||
}
|
||||
|
||||
/* Replace and Src1 value by 1.0 if dual source blending is not
|
||||
* enabled.
|
||||
*/
|
||||
if (wm_prog_data && !wm_prog_data->dual_src_blend) {
|
||||
if (is_src1_blend_factor(SourceBlendFactor))
|
||||
SourceBlendFactor = BLENDFACTOR_ONE;
|
||||
if (is_src1_blend_factor(DestinationBlendFactor))
|
||||
DestinationBlendFactor = BLENDFACTOR_ONE;
|
||||
}
|
||||
|
||||
if (instance->intel_enable_wa_14018912822 &&
|
||||
intel_needs_workaround(cmd_buffer->device->info, 14018912822) &&
|
||||
pipeline->rasterization_samples > 1) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue