summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/gen4_render.c1
-rw-r--r--src/sna/gen5_render.c1
-rw-r--r--src/sna/gen6_render.c1
-rw-r--r--src/sna/gen7_render.c1
-rw-r--r--src/sna/gen8_render.c1
5 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index 4f4a4c80..1d164b6e 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -514,6 +514,7 @@ gen4_bind_bo(struct sna *sna,
/* After the first bind, we manage the cache domains within the batch */
offset = kgem_bo_get_binding(bo, format | is_dst << 31);
if (offset) {
+ assert(offset >= sna->kgem.surface);
if (is_dst)
kgem_bo_mark_dirty(bo);
return offset * sizeof(uint32_t);
diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 3396acd0..8fb47cb6 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -499,6 +499,7 @@ gen5_bind_bo(struct sna *sna,
if (offset) {
if (is_dst)
kgem_bo_mark_dirty(bo);
+ assert(offset >= sna->kgem.surface);
return offset * sizeof(uint32_t);
}
}
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index cf417d4c..08c9f785 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -1052,6 +1052,7 @@ gen6_bind_bo(struct sna *sna,
DBG(("[%x] bo(handle=%d), format=%d, reuse %s binding\n",
offset, bo->handle, format,
is_dst ? "render" : "sampler"));
+ assert(offset >= sna->kgem.surface);
if (is_dst)
kgem_bo_mark_dirty(bo);
return offset * sizeof(uint32_t);
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index f15e057f..1574813a 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -1286,6 +1286,7 @@ gen7_bind_bo(struct sna *sna,
/* After the first bind, we manage the cache domains within the batch */
offset = kgem_bo_get_binding(bo, format | is_dst << 30 | is_scanout << 31);
if (offset) {
+ assert(offset >= sna->kgem.surface);
if (is_dst)
kgem_bo_mark_dirty(bo);
return offset * sizeof(uint32_t);
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c
index 25fd5285..5c718bc5 100644
--- a/src/sna/gen8_render.c
+++ b/src/sna/gen8_render.c
@@ -1303,6 +1303,7 @@ gen8_bind_bo(struct sna *sna,
if (offset) {
if (is_dst)
kgem_bo_mark_dirty(bo);
+ assert(offset >= sna->kgem.surface);
return offset * sizeof(uint32_t);
}