void nvc0_validate_textures(struct nvc0_context *nvc0) { boolean need_flush; if (nvc0->screen->base.class_3d >= NVE4_3D_CLASS) { need_flush = nve4_validate_tic(nvc0, 0); need_flush |= nve4_validate_tic(nvc0, 3); need_flush |= nve4_validate_tic(nvc0, 4); } else { need_flush = nvc0_validate_tic(nvc0, 0); need_flush |= nvc0_validate_tic(nvc0, 3); need_flush |= nvc0_validate_tic(nvc0, 4); } if (need_flush) { BEGIN_NVC0(nvc0->base.pushbuf, NVC0_3D(TIC_FLUSH), 1); PUSH_DATA (nvc0->base.pushbuf, 0); } }
static void nvc0_compute_validate_textures(struct nvc0_context *nvc0) { bool need_flush = nvc0_validate_tic(nvc0, 5); if (need_flush) { BEGIN_NVC0(nvc0->base.pushbuf, NVC0_CP(TIC_FLUSH), 1); PUSH_DATA (nvc0->base.pushbuf, 0); } /* Invalidate all 3D textures because they are aliased. */ for (int s = 0; s < 5; s++) { for (int i = 0; i < nvc0->num_textures[s]; i++) nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_TEX(s, i)); nvc0->textures_dirty[s] = ~0; } nvc0->dirty_3d |= NVC0_NEW_3D_TEXTURES; }