flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR;
- BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->poly_cache);
+ if (screen->poly_cache)
+ BCTX_REFN_bo(nvc0->bufctx_3d, SCREEN, flags, screen->poly_cache);
if (screen->compute)
BCTX_REFN_bo(nvc0->bufctx_cp, CP_SCREEN, flags, screen->tls);
BEGIN_NVC0(push, SUBC_3D(0x0de8), 1);
PUSH_DATA (push, 1);
- BEGIN_NVC0(push, SUBC_3D(0x12ac), 1);
- PUSH_DATA (push, 0);
+ if (obj_class < GM107_3D_CLASS) {
+ BEGIN_NVC0(push, SUBC_3D(0x12ac), 1);
+ PUSH_DATA (push, 0);
+ }
BEGIN_NVC0(push, SUBC_3D(0x0218), 1);
PUSH_DATA (push, 0x10);
BEGIN_NVC0(push, SUBC_3D(0x10fc), 1);
PUSH_DATA (push, 1);
BEGIN_NVC0(push, SUBC_3D(0x19c0), 1);
PUSH_DATA (push, 1);
- BEGIN_NVC0(push, SUBC_3D(0x075c), 1);
- PUSH_DATA (push, 3);
- if (obj_class >= NVE4_3D_CLASS) {
- BEGIN_NVC0(push, SUBC_3D(0x07fc), 1);
- PUSH_DATA (push, 1);
+ if (obj_class < GM107_3D_CLASS) {
+ BEGIN_NVC0(push, SUBC_3D(0x075c), 1);
+ PUSH_DATA (push, 3);
+
+ if (obj_class >= NVE4_3D_CLASS) {
+ BEGIN_NVC0(push, SUBC_3D(0x07fc), 1);
+ PUSH_DATA (push, 1);
+ }
}
/* TODO: find out what software methods 0x1528, 0x1280 and (on nve4) 0x02dc
case 0xf0:
case 0x100:
return nve4_screen_compute_setup(screen, screen->base.pushbuf);
+ case 0x110:
+ return 0;
default:
return -1;
}
case 0xe0:
case 0xf0:
case 0x100:
+ case 0x110:
break;
default:
return NULL;
switch (dev->chipset & ~0xf) {
+ case 0x110:
case 0x100:
case 0xf0:
obj_class = NVF0_P2MF_CLASS;
BEGIN_NVC0(push, NVC0_3D(LOCAL_BASE), 1);
PUSH_DATA (push, 0);
- ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 20, NULL,
- &screen->poly_cache);
- if (ret)
- goto fail;
+ if (screen->eng3d->oclass < GM107_3D_CLASS) {
+ ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 20, NULL,
+ &screen->poly_cache);
+ if (ret)
+ goto fail;
- BEGIN_NVC0(push, NVC0_3D(VERTEX_QUARANTINE_ADDRESS_HIGH), 3);
- PUSH_DATAh(push, screen->poly_cache->offset);
- PUSH_DATA (push, screen->poly_cache->offset);
- PUSH_DATA (push, 3);
+ BEGIN_NVC0(push, NVC0_3D(VERTEX_QUARANTINE_ADDRESS_HIGH), 3);
+ PUSH_DATAh(push, screen->poly_cache->offset);
+ PUSH_DATA (push, screen->poly_cache->offset);
+ PUSH_DATA (push, 3);
+ }
ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 17, NULL,
&screen->txc);
0x03f01c46, 0x0a7e0080, /* export b96 o[0x80] $r0:$r1:$r2 */
0x00001de7, 0x80000000, /* exit */
};
+ static const uint32_t code_gm107[] =
+ {
+ 0xfc0007e0, 0x001f8000, /* sched 0x7e0 0x7e0 0x7e0 */
+ 0x0807ff04, 0xefd8ff80, /* ld b64 $r4 a[0x80] 0x0 */
+ 0x0907ff00, 0xefd97f80, /* ld b96 $r0 a[0x90] 0x0 */
+ 0x0707ff04, 0xeff0ff80, /* st b64 a[0x70] $r4 0x0 */
+ 0xfc0007e0, 0x00000000, /* sched 0x7e0 0x7e0 0x0 */
+ 0x0807ff00, 0xeff17f80, /* st b96 a[0x80] $r0 0x0 */
+ 0x0007000f, 0xe3000000, /* exit */
+ };
blit->vp.type = PIPE_SHADER_VERTEX;
blit->vp.translated = TRUE;
+ if (blit->screen->base.class_3d >= GM107_3D_CLASS) {
+ blit->vp.code = (uint32_t *)code_gm107; /* const_cast */
+ blit->vp.code_size = sizeof(code_gm107);
+ } else
if (blit->screen->base.class_3d >= NVE4_3D_CLASS) {
blit->vp.code = (uint32_t *)code_nve4; /* const_cast */
blit->vp.code_size = sizeof(code_nve4);
PUSH_SPACE(push, 2);
IMMED_NVC0(push, NVC0_3D(SERIALIZE), 0);
nvc0_query_fifo_wait(push, so->pq);
- IMMED_NVC0(push, NVC0_3D(VERTEX_ARRAY_FLUSH), 0);
+ if (nvc0->screen->eng3d->oclass < GM107_3D_CLASS)
+ IMMED_NVC0(push, NVC0_3D(VERTEX_ARRAY_FLUSH), 0);
NOUVEAU_DRV_STAT(&nvc0->screen->base, gpu_serialize_count, 1);
}
nvc0->base.vbo_dirty = TRUE;
if (nvc0->base.vbo_dirty) {
- IMMED_NVC0(push, NVC0_3D(VERTEX_ARRAY_FLUSH), 0);
+ if (nvc0->screen->eng3d->oclass < GM107_3D_CLASS)
+ IMMED_NVC0(push, NVC0_3D(VERTEX_ARRAY_FLUSH), 0);
nvc0->base.vbo_dirty = FALSE;
}
if (unlikely(ctx.need_vertex_id))
nvc0_push_upload_vertex_ids(&ctx, nvc0, info);
- IMMED_NVC0(ctx.push, NVC0_3D(VERTEX_ARRAY_FLUSH), 0);
+ if (nvc0->screen->eng3d->oclass < GM107_3D_CLASS)
+ IMMED_NVC0(ctx.push, NVC0_3D(VERTEX_ARRAY_FLUSH), 0);
BEGIN_NVC0(ctx.push, NVC0_3D(VERTEX_BEGIN_GL), 1);
PUSH_DATA (ctx.push, prim);
switch (index_size) {
case 0xe0:
case 0xf0:
case 0x100:
+ case 0x110:
init = nvc0_screen_create;
break;
default: