From 29abbeecd80bb2cbf48c2c4c13155463d60c70f5 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Thu, 2 Jun 2016 21:42:14 -0400 Subject: [PATCH] nvc0: mark bound buffer range valid Signed-off-by: Ilia Mirkin Cc: "12.0" --- src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 3 +++ src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c | 3 +++ src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c index 5cc119c0038..8c882252091 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c @@ -262,6 +262,9 @@ nvc0_compute_validate_buffers(struct nvc0_context *nvc0) PUSH_DATA (push, nvc0->buffers[s][i].buffer_size); PUSH_DATA (push, 0); BCTX_REFN(nvc0->bufctx_cp, CP_BUF, res, RDWR); + util_range_add(&res->valid_buffer_range, + nvc0->buffers[s][i].buffer_offset, + nvc0->buffers[s][i].buffer_size); } else { PUSH_DATA (push, 0); PUSH_DATA (push, 0); diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c index a77486db54c..ad44e859a7c 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c @@ -517,6 +517,9 @@ nvc0_validate_buffers(struct nvc0_context *nvc0) PUSH_DATA (push, nvc0->buffers[s][i].buffer_size); PUSH_DATA (push, 0); BCTX_REFN(nvc0->bufctx_3d, 3D_BUF, res, RDWR); + util_range_add(&res->valid_buffer_range, + nvc0->buffers[s][i].buffer_offset, + nvc0->buffers[s][i].buffer_size); } else { PUSH_DATA (push, 0); PUSH_DATA (push, 0); diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c index cde076869bc..a3f33a7d631 100644 --- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c +++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c @@ -369,6 +369,9 @@ nve4_compute_validate_buffers(struct nvc0_context *nvc0) PUSH_DATA (push, nvc0->buffers[s][i].buffer_size); PUSH_DATA (push, 0); BCTX_REFN(nvc0->bufctx_cp, CP_BUF, res, RDWR); + util_range_add(&res->valid_buffer_range, + nvc0->buffers[s][i].buffer_offset, + nvc0->buffers[s][i].buffer_size); } else { PUSH_DATA (push, 0); PUSH_DATA (push, 0); -- 2.30.2