Mesa (staging/19.2): v3d: take into account prim_counts_offset

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 10 22:25:04 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: 0beee2f72357691ca0e2d5882c8ad3c6ea588397
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0beee2f72357691ca0e2d5882c8ad3c6ea588397

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Tue Oct  8 15:44:19 2019 +0200

v3d: take into account prim_counts_offset

Specifically when reading the primitive counters.

This fixed ~700 CTS tests using this pattern:
dEQP-GLES3.functional.transform_feedback.*

when run after tests like
dEQP-GLES3.functional.prerequisite.read_pixels on the same
caselist. When run individually those tests were passing because
prim_counts_offset was zero.

Fixes: 0f2d1dfe65bfe1ee8f02ce45f100a5508debdfd4 ("v3d: use the GPU to
       record primitives written to transform feedback")

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova at igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
(cherry picked from commit fa41a51891e5a207da831fa7c4564a413159f221)

---

 src/gallium/drivers/v3d/v3d_job.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c
index 50ea7ef859c..cf0f0385079 100644
--- a/src/gallium/drivers/v3d/v3d_job.c
+++ b/src/gallium/drivers/v3d/v3d_job.c
@@ -457,7 +457,7 @@ v3d_read_and_accumulate_primitive_counters(struct v3d_context *v3d)
         perf_debug("stalling on TF counts readback");
         struct v3d_resource *rsc = v3d_resource(v3d->prim_counts);
         if (v3d_bo_wait(rsc->bo, PIPE_TIMEOUT_INFINITE, "prim-counts")) {
-                uint32_t *map = v3d_bo_map(rsc->bo);
+                uint32_t *map = v3d_bo_map(rsc->bo) + v3d->prim_counts_offset;
                 v3d->tf_prims_generated += map[V3D_PRIM_COUNTS_TF_WRITTEN];
         }
 }




More information about the mesa-commit mailing list