diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/gen6_render.c | 7 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 033f1cba..37064608 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -1220,9 +1220,10 @@ gen6_bind_bo(struct sna *sna, uint32_t *ss; uint32_t domains; uint16_t offset; + uint32_t is_scanout = is_dst && bo->scanout; /* After the first bind, we manage the cache domains within the batch */ - offset = kgem_bo_get_binding(bo, format); + offset = kgem_bo_get_binding(bo, format | is_scanout << 31); if (offset) { DBG(("[%x] bo(handle=%d), format=%d, reuse %s binding\n", offset, bo->handle, format, @@ -1249,9 +1250,9 @@ gen6_bind_bo(struct sna *sna, ss[3] = (gen6_tiling_bits(bo->tiling) | (bo->pitch - 1) << GEN6_SURFACE_PITCH_SHIFT); ss[4] = 0; - ss[5] = is_dst && bo->scanout ? 0 : 3 << 16; + ss[5] = is_scanout ? 0 : 3 << 16; - kgem_bo_set_binding(bo, format, offset); + kgem_bo_set_binding(bo, format, offset | is_scanout << 31); DBG(("[%x] bind bo(handle=%d, addr=%d), format=%d, width=%d, height=%d, pitch=%d, tiling=%d -> %s\n", offset, bo->handle, ss[1], diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index 9d4e1a29..18c9036f 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -1344,11 +1344,12 @@ gen7_bind_bo(struct sna *sna, uint32_t *ss; uint32_t domains; int offset; + uint32_t is_scanout = is_dst && bo->scanout; COMPILE_TIME_ASSERT(sizeof(struct gen7_surface_state) == 32); /* After the first bind, we manage the cache domains within the batch */ - offset = kgem_bo_get_binding(bo, format); + offset = kgem_bo_get_binding(bo, format | is_scanout << 31); if (offset) { if (is_dst) kgem_bo_mark_dirty(bo); @@ -1370,13 +1371,13 @@ gen7_bind_bo(struct sna *sna, (height - 1) << GEN7_SURFACE_HEIGHT_SHIFT); ss[3] = (bo->pitch - 1) << GEN7_SURFACE_PITCH_SHIFT; ss[4] = 0; - ss[5] = is_dst && bo->scanout ? 0 : 3 << 16; + ss[5] = is_scanout ? 0 : 3 << 16; ss[6] = 0; ss[7] = 0; if (sna->kgem.gen == 075) ss[7] |= HSW_SURFACE_SWIZZLE(RED, GREEN, BLUE, ALPHA); - kgem_bo_set_binding(bo, format, offset); + kgem_bo_set_binding(bo, format, offset | is_scanout << 31); DBG(("[%x] bind bo(handle=%d, addr=%d), format=%d, width=%d, height=%d, pitch=%d, tiling=%d -> %s\n", offset, bo->handle, ss[1], |