xf86-video-intel: src/sna/gen2_render.c
Chris Wilson
ickle at kemper.freedesktop.org
Sun Feb 5 22:26:16 UTC 2017
src/sna/gen2_render.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit e4fe79cf0d9a05ee3f3a027148ef0aeb2b1b34e1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Feb 5 22:24:04 2017 +0000
sna/gen2: Take combined vertex arrays into account for inline limit
When extending the vertex array, we have to remove the currently used
inlined dwords from the available limit.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/gen2_render.c b/src/sna/gen2_render.c
index 11e8e52..49ad16a 100644
--- a/src/sna/gen2_render.c
+++ b/src/sna/gen2_render.c
@@ -1166,9 +1166,6 @@ inline static int gen2_get_rectangles(struct sna *sna,
{
int rem = batch_space(sna), size, need;
- if (rem > MAX_INLINE)
- rem = MAX_INLINE;
-
DBG(("%s: want=%d, floats_per_vertex=%d, rem=%d\n",
__FUNCTION__, want, op->floats_per_vertex, rem));
@@ -1203,7 +1200,13 @@ inline static int gen2_get_rectangles(struct sna *sna,
sna->render.vertex_offset = sna->kgem.nbatch;
BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST);
}
- }
+
+ need = 0;
+ } else
+ need = sna->kgem.nbatch - sna->render.vertex_offset;
+
+ if (rem > MAX_INLINE - need)
+ rem = MAX_INLINE -need;
if (want > 1 && want * size > rem)
want = rem / size;
More information about the xorg-commit
mailing list