intel/blorp/gen6: Set BLEND_STATEChange only if emitting the blend state

This change is pretty straightforward: if set this field when we don't emit
the blend state, then the garbage at offset=0 will be set as a blend state,
and this will cause artifacts until the proper blend state will be given.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6544
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6232

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17132>
(cherry picked from commit 318473eaf1)
This commit is contained in:
Sviatoslav Peleshko 2022-06-20 12:47:25 +03:00 committed by Dylan Baker
parent 179ad03f5d
commit 78a64e862f
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@
"description": "intel/blorp/gen6: Set BLEND_STATEChange only if emitting the blend state",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -1323,7 +1323,7 @@ blorp_emit_pipeline(struct blorp_batch *batch,
* one CC_STATE_POINTERS packet so we have to emit that here.
*/
blorp_emit(batch, GENX(3DSTATE_CC_STATE_POINTERS), cc) {
cc.BLEND_STATEChange = true;
cc.BLEND_STATEChange = params->wm_prog_data ? true : false;
cc.ColorCalcStatePointerValid = true;
cc.DEPTH_STENCIL_STATEChange = true;
cc.PointertoBLEND_STATE = blend_state_offset;