freedreno: Add missing indirect_draw_count tracking

Fixes: f677f64e80 ("freedreno: implement GL_ARB_indirect_parameters")
Fixes: b43e5aec0d ("freedreno/batch: Move submit bo tracking to batch")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25465>
This commit is contained in:
Rob Clark
2023-10-02 12:45:10 -07:00
committed by Marge Bot
parent 8a3b4b69a2
commit 9870cca6a0

View File

@@ -221,6 +221,9 @@ needs_draw_tracking(struct fd_batch *batch, const struct pipe_draw_info *info,
if (indirect) {
if (indirect->buffer && !batch_references_resource(batch, indirect->buffer))
return true;
if (indirect->indirect_draw_count &&
!batch_references_resource(batch, indirect->indirect_draw_count))
return true;
if (indirect->count_from_stream_output)
return true;
}
@@ -252,8 +255,8 @@ batch_draw_tracking(struct fd_batch *batch, const struct pipe_draw_info *info,
/* Mark indirect draw buffer as being read */
if (indirect) {
if (indirect->buffer)
resource_read(batch, indirect->buffer);
resource_read(batch, indirect->buffer);
resource_read(batch, indirect->indirect_draw_count);
if (indirect->count_from_stream_output)
resource_read(
batch, fd_stream_output_target(indirect->count_from_stream_output)