Hi Erik,

Not sure if this is our problem as I think that I only saw simple
bindings with a zero instance divisor while debugging supertux kart.

But at least I think that this is a problem in virglrenderer. The
glVertexBindingDivisor is per binding and not per vertex attribute
in OpenGL.
... you probably want to solve that differently, but for now this should
quick band aid to pinpoint the problem that we observe.

Does the attached patch to virglrenderer fix our problem?

best

Mathias
>From 257262929cd9f42dd9c20c31bde8c171ad569a8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mathias=20Fr=C3=B6hlich?= <mathias.froehl...@web.de>
Date: Mon, 10 Dec 2018 15:34:03 +0100
Subject: [PATCH] quick-fix

---
 src/vrend_renderer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 7ed0f41..ce6f3bc 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -2338,7 +2338,7 @@ int vrend_create_vertex_elements_state(struct vrend_context *ctx,
          else
             glVertexAttribFormat(i, ve->nr_chan, ve->type, ve->norm, ve->base.src_offset);
          glVertexAttribBinding(i, ve->base.vertex_buffer_index);
-         glVertexBindingDivisor(i, ve->base.instance_divisor);
+         glVertexBindingDivisor(ve->base.vertex_buffer_index, ve->base.instance_divisor);
          glEnableVertexAttribArray(i);
       }
    }
-- 
2.19.2

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to