Skip to content

turnip: emit VPC_SO_DISABLE in xfb begin/end

Chia-I Wu requested to merge olv/mesa:tu-xfb into main

SO was always enabled before this change. That meant, after a call to tu_CmdBindTransformFeedbackBuffersEXT to emit VPC_SO_BUFFER_SIZE, any draw call (from the same render pass, in a different render pass, or in a different cmdbuf) could potentially cause writes to the SO buffers regardless of whether the draw is inside xfb begin/end or not.

I choose to emit VPC_SO_DISABLE instead of using stateobjs like freedreno does only because it is simpler. It is not clear to me which is more efficient to HW.

This also fixes double SO writes for gmem rendering. While tu6_tile_render_begin was careful to disable SO for the draw pass, tu6_emit_tile_select re-enabled it.

dEQP-VK.transform_feedback.* still passes. It fixes dEQP-GLES3.functional.transform_feedback.* on angle.

Merge request reports