Module: Mesa Branch: nvfx-nv30-fixes Commit: 0c14b3a31c5d32d6cf5fa756f77430ca6271a93d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c14b3a31c5d32d6cf5fa756f77430ca6271a93d
Author: Luca Barbieri <[email protected]> Date: Mon Apr 12 22:55:21 2010 +0200 add assertions and checks for vtxfmt 0 --- src/gallium/drivers/nvfx/nvfx_vbo.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c index a721c5b..feb31eb 100644 --- a/src/gallium/drivers/nvfx/nvfx_vbo.c +++ b/src/gallium/drivers/nvfx/nvfx_vbo.c @@ -518,9 +518,11 @@ nvfx_vbo_validate(struct nvfx_context *nvfx) if (!vb->stride && type == NV34TCL_VTXFMT_TYPE_FLOAT) { nvfx_vbo_static_attrib(nvfx, i, ve, vb, ncomp); vtxfmt[i] = type; + assert(type); } else { vtxfmt[i] = ((vb->stride << NV34TCL_VTXFMT_STRIDE_SHIFT) | (ncomp << NV34TCL_VTXFMT_SIZE_SHIFT) | type); + assert(vtxfmt[i]); nvfx->vbo_bo |= (1 << i); } } @@ -563,6 +565,12 @@ nvfx_vbo_validate(struct nvfx_context *nvfx) OUT_RING(chan, RING_3D(0x1710, 1)); OUT_RING(chan, 0); + for (i = 0; i < elements; i++) { + if(!vtxfmt[i]) { + fprintf(stderr, "vtxfmt[%i] is 0!\n", i); + abort(); + } + } OUT_RING(chan, RING_3D(NV34TCL_VTXFMT(0), elements)); OUT_RINGp(chan, vtxfmt, elements); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
