static bool nv50_compute_validate_program(struct nv50_context *nv50) { struct nv50_program *prog = nv50->compprog; if (prog->mem) return true; if (!prog->translated) { prog->translated = nv50_program_translate( prog, nv50->screen->base.device->chipset, &nv50->base.debug); if (!prog->translated) return false; } if (unlikely(!prog->code_size)) return false; if (likely(prog->code_size)) { if (nv50_program_upload_code(nv50, prog)) { struct nouveau_pushbuf *push = nv50->base.pushbuf; BEGIN_NV04(push, NV50_COMPUTE(CODE_CB_FLUSH), 1); PUSH_DATA (push, 0); return true; } } return false; }
static bool nv50_program_validate(struct nv50_context *nv50, struct nv50_program *prog) { if (!prog->translated) { prog->translated = nv50_program_translate( prog, nv50->screen->base.device->chipset); if (!prog->translated) return false; } else if (prog->mem) return true; return nv50_program_upload_code(nv50, prog); }