const struct pipe_resource *base,
unsigned pitch_in_bytes_override,
struct pb_buffer *buf,
- boolean alloc_bo,
struct radeon_surface *surface)
{
struct r600_texture *rtex;
return NULL;
}
- if (base->nr_samples > 1 && !rtex->is_depth && alloc_bo) {
+ if (base->nr_samples > 1 && !rtex->is_depth && !buf) {
r600_texture_allocate_cmask(rscreen, rtex);
r600_texture_allocate_fmask(rscreen, rtex);
}
}
/* Now create the backing buffer. */
- if (!buf && alloc_bo) {
+ if (!buf) {
unsigned base_align = rtex->surface.bo_alignment;
unsigned usage = R600_TEX_IS_TILED(rtex, 0) ? PIPE_USAGE_STATIC : base->usage;
FREE(rtex);
return NULL;
}
- } else if (buf) {
+ } else {
/* This is usually the window framebuffer. We want it in VRAM, always. */
resource->buf = buf;
resource->cs_buf = rscreen->ws->buffer_get_cs_handle(buf);
return NULL;
}
return (struct pipe_resource *)r600_texture_create_object(screen, templ,
- 0, NULL, TRUE, &surface);
+ 0, NULL, &surface);
}
struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe,
return NULL;
}
return (struct pipe_resource *)r600_texture_create_object(screen, templ,
- stride, buf, FALSE, &surface);
+ stride, buf, &surface);
}
bool r600_init_flushed_depth_texture(struct pipe_context *ctx,