mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-04 17:28:19 +02:00
nv40: enable base vertex
Still appears to have issues with negative indices less than -1M, but that's a corner case of a corner case. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
19a0ba130f
commit
b5622313ea
3 changed files with 5 additions and 4 deletions
|
|
@ -1459,6 +1459,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#define NV40_3D_VTX_CACHE_INVALIDATE 0x00001714
|
||||
|
||||
#define NV40_3D_VB_ELEMENT_BASE 0x0000173c
|
||||
|
||||
#define NV30_3D_VTXFMT(i0) (0x00001740 + 0x4*(i0))
|
||||
#define NV30_3D_VTXFMT__ESIZE 0x00000004
|
||||
#define NV30_3D_VTXFMT__LEN 0x00000010
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ struct nv30_context {
|
|||
unsigned rt_enable;
|
||||
unsigned scissor_off;
|
||||
unsigned num_vtxelts;
|
||||
int index_bias;
|
||||
boolean prim_restart;
|
||||
struct nv30_fragprog *fragprog;
|
||||
} state;
|
||||
|
|
|
|||
|
|
@ -461,13 +461,11 @@ nv30_draw_elements(struct nv30_context *nv30, boolean shorten,
|
|||
struct nouveau_object *eng3d = nv30->screen->eng3d;
|
||||
unsigned prim = nv30_prim_gl(mode);
|
||||
|
||||
#if 0 /*XXX*/
|
||||
if (index_bias != nv30->state.index_bias) {
|
||||
BEGIN_NV04(push, NV30_3D(VB_ELEMENT_BASE), 1);
|
||||
if (eng3d->oclass >= NV40_3D_CLASS && index_bias != nv30->state.index_bias) {
|
||||
BEGIN_NV04(push, NV40_3D(VB_ELEMENT_BASE), 1);
|
||||
PUSH_DATA (push, index_bias);
|
||||
nv30->state.index_bias = index_bias;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (eng3d->oclass == NV40_3D_CLASS && index_size > 1 &&
|
||||
nv30->idxbuf.buffer) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue