Skip to content

vrend: don't cache blend enabled state and update it directly

Gert Wollny requested to merge gerddie/virglrenderer:fix-blend-state-leak into master

When enabling/disabling GL_BLEND via vrend_blend_enable the context caches the last state and doesn't call glEnable/glDisable if the state doesn't change. However, when gl(Enable|Disable)IndexedEXT is used with index 0, then this vrenderer internal state is not updated even though the corresonding GL state may be changed, and calling vrend_blend_enable later may not update the state correctly.

Hence, don't cache the state and set it directly.

Closes: #23 (closed)

Fixes state leak with: dEQP-GLES31.functional.draw_buffers_indexed.overwrite_common. common_separate_blend_eq_buffer_separate_blend_eq common_separate_blend_eq_buffer_advanced_blend_eq

Signed-off-by: Gert Wollny gert.wollny@collabora.com

Edited by Gert Wollny

Merge request reports