static boolean nvc0_compute_state_validate(struct nvc0_context *nvc0) { if (!nvc0_compute_validate_program(nvc0)) return FALSE; /* TODO: textures, samplers, surfaces, global memory buffers */ nvc0_bufctx_fence(nvc0, nvc0->bufctx_cp, FALSE); nouveau_pushbuf_bufctx(nvc0->base.pushbuf, nvc0->bufctx_cp); if (unlikely(nouveau_pushbuf_validate(nvc0->base.pushbuf))) return FALSE; if (unlikely(nvc0->state.flushed)) nvc0_bufctx_fence(nvc0, nvc0->bufctx_cp, TRUE); return TRUE; }
static bool nvc0_state_validate_cp(struct nvc0_context *nvc0, uint32_t mask) { bool ret; ret = nvc0_state_validate(nvc0, mask, validate_list_cp, ARRAY_SIZE(validate_list_cp), &nvc0->dirty_cp, nvc0->bufctx_cp); if (unlikely(nvc0->state.flushed)) nvc0_bufctx_fence(nvc0, nvc0->bufctx_cp, true); return ret; }