struct pipe_context *pipe = &nv30->base.pipe;
if (!fp) {
- nv30->blit_fp = pipe_buffer_create(pipe->screen, 0, 0, 12 * 4);
+ nv30->blit_fp =
+ pipe_buffer_create(pipe->screen, 0, PIPE_USAGE_STAGING, 12 * 4);
if (nv30->blit_fp) {
struct pipe_transfer *transfer;
u32 *map = pipe_buffer_map(pipe, nv30->blit_fp,
u32 format, stride;
if (nouveau_pushbuf_space(push, 512, 8, 0) ||
- nouveau_pushbuf_refn (push, refs, sizeof(refs) / sizeof(refs[0])))
+ nouveau_pushbuf_refn (push, refs, ARRAY_SIZE(refs)))
return;
/* various switches depending on cpp of the transfer */
si_arg |= NV03_SIFM_FORMAT_FILTER_BILINEAR;
}
- if (nouveau_pushbuf_space(push, 32, 6, 0) ||
+ if (nouveau_pushbuf_space(push, 64, 6, 0) ||
nouveau_pushbuf_refn (push, refs, 2))
return;
while (h) {
unsigned lines = (h > 2047) ? 2047 : h;
- if (nouveau_pushbuf_space(push, 13, 2, 0) ||
+ if (nouveau_pushbuf_space(push, 32, 2, 0) ||
nouveau_pushbuf_refn (push, refs, 2))
return;
{}
};
- method = methods - 1;
- while ((++method)->possible) {
+ for (method = methods; method->possible; method++) {
if (method->possible(nv30, filter, src, dst)) {
method->execute(nv30, filter, src, dst);
return;
lines = (pages > 2047) ? 2047 : pages;
pages -= lines;
- if (nouveau_pushbuf_space(push, 13, 2, 0) ||
+ if (nouveau_pushbuf_space(push, 32, 2, 0) ||
nouveau_pushbuf_refn (push, refs, 2))
return;
}
if (size) {
- if (nouveau_pushbuf_space(push, 13, 2, 0) ||
+ if (nouveau_pushbuf_space(push, 32, 2, 0) ||
nouveau_pushbuf_refn (push, refs, 2))
return;