diff options
author | Ilia Mirkin <[email protected]> | 2015-05-09 13:25:51 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-05-09 13:36:23 -0400 |
commit | 7892210400e8f3bd14697c0a3dd56e98454a45df (patch) | |
tree | 248232a7e2b33cec18e453305c110633b2a0b5a8 | |
parent | e9b1ea29bf1e8f09e83bd6358d0d2068053f09d4 (diff) |
nvc0: reset the instanced elements state when doing blit using 3d engine
Since we update num_vtxelts here, we could otherwise end up with stale
instancing information in the upper bits which wouldn't otherwise get
reset. (Also we run the risk of the previous draw having set the first
element as instanced.)
This appears as one of the causes for the test pointed out in fdo#90363
to fail on nvc0.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90363
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: [email protected]
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_surface.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c index 4404d8c1a74..a820de7259a 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c @@ -1152,6 +1152,12 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info) NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32 | NVC0_3D_VERTEX_ATTRIB_FORMAT_CONST); } + if (nvc0->state.instance_elts) { + nvc0->state.instance_elts = 0; + BEGIN_NVC0(push, NVC0_3D(MACRO_VERTEX_ARRAY_PER_INSTANCE), 2); + PUSH_DATA (push, n); + PUSH_DATA (push, 0); + } nvc0->state.num_vtxelts = 2; for (i = 0; i < info->dst.box.depth; ++i, z += dz) { |