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 */
static bool
nv30_transfer_sifm(XFER_ARGS)
{
- if (!src->pitch || (src->w | src->h) > 1024 || src->w < 2 || src->h < 2)
+ if (!src->pitch || src->w > 1024 || src->h > 1024 || src->w < 2 || src->h < 2)
return false;
if (src->d > 1 || dst->d > 1)
return false;
if (!dst->pitch) {
- if ((dst->w | dst->h) > 2048 || dst->w < 2 || dst->h < 2)
+ if (dst->w > 2048 || dst->h > 2048 || dst->w < 2 || dst->h < 2)
return false;
} else {
if (dst->domain != NOUVEAU_BO_VRAM)
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;