Module: Mesa Branch: staging/23.2 Commit: 7ada92b433bb786ee902e252ce9952751917e529 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ada92b433bb786ee902e252ce9952751917e529
Author: Rob Clark <[email protected]> Date: Mon Oct 2 12:45:10 2023 -0700 freedreno: Add missing indirect_draw_count tracking Fixes: f677f64e80c4 ("freedreno: implement GL_ARB_indirect_parameters") Fixes: b43e5aec0d2c ("freedreno/batch: Move submit bo tracking to batch") Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25465> (cherry picked from commit 9870cca6a00e57248265046a4d740684db87194c) --- .pick_status.json | 2 +- src/gallium/drivers/freedreno/freedreno_draw.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 5f8fb34b17e..a2491880aef 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1674,7 +1674,7 @@ "description": "freedreno: Add missing indirect_draw_count tracking", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f677f64e80c453f21fbfa81855c88ba97c03b062", "notes": null diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index 85c786d8258..6b67db1b354 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -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; } @@ -257,8 +260,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)
