On 11/07/2016 04:34 AM, Ilia Mirkin wrote:
Primitive restart is a thing for non-indexed draws too. There's a
method that controls it - NVC0_3D_PRIM_RESTART_WITH_DRAW_ARRAYS. The
more recently GL 4.5 behaviour is to *not* do primitive restart for
draw arrays, however the older behavior is to do it. I don't think
there's clear direction on this, and I believe at least some piglits
expect the restart behavior. So for now, I think you should leave this
out, but keep it around for when this confusion is resolved.
Yes, I know that primitive restart behaviour has changed since GL 4.5
On Tue, Oct 25, 2016 at 3:41 PM, Samuel Pitoiset
<samuel.pitoi...@gmail.com> wrote:
Unnecessary to update it at every draw calls, especially for
non-indexed draws. This is similar to what nv50 already does.
Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
index bc4ab9e..138e24d 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_vbo.c
@@ -1050,8 +1050,6 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct
pipe_draw_info *info)
nvc0->idxbuf.buffer->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT)
nvc0->base.vbo_dirty = true;
- nvc0_update_prim_restart(nvc0, info->primitive_restart,
info->restart_index);
-
if (nvc0->base.vbo_dirty) {
if (nvc0->screen->eng3d->oclass < GM107_3D_CLASS)
IMMED_NVC0(push, NVC0_3D(VERTEX_ARRAY_FLUSH), 0);
@@ -1067,6 +1065,9 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct
pipe_draw_info *info)
if (info->indexed) {
bool shorten = info->max_index <= 65535;
+ nvc0_update_prim_restart(nvc0, info->primitive_restart,
+ info->restart_index);
+
if (info->primitive_restart && info->restart_index > 65535)
shorten = false;
--
2.10.1
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev