nvc0: mark bound buffer range valid
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 3 Jun 2016 01:42:14 +0000 (21:42 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 5 Jun 2016 03:50:56 +0000 (23:50 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
src/gallium/drivers/nouveau/nvc0/nve4_compute.c

index 5cc119c00388cbb18542b1e706012e3d146c09d1..8c8822520915068b903d51d3178d16ed61365883 100644 (file)
@@ -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);
index a77486db54ccfd6f023f5e2b2d2e746f990aa801..ad44e859a7c547844507d5f786030de4e83ac89a 100644 (file)
@@ -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);
index cde076869bc3fb717f7768d2d6ab6d952e016927..a3f33a7d631e6dbfa9365bd27494df27d6e30384 100644 (file)
@@ -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);