diff options
author | Marek Olšák <[email protected]> | 2010-06-02 06:45:00 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-06-02 07:01:08 +0200 |
commit | b6b76cbb20b3d9467011231069e23972b98afa49 (patch) | |
tree | 42a99cd9d4c12f6ee49004102a6a1272be08a327 /src/gallium/drivers/r300/r300_texture.c | |
parent | bb45a15168e6c6678776fea5d8d0085454089260 (diff) |
r300g: store the GEM domain in buffer and texture structs
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index 33aa2508866..4e5dc5568f8 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -918,7 +918,6 @@ struct pipe_resource* r300_texture_create(struct pipe_screen* screen, struct r300_texture* tex = CALLOC_STRUCT(r300_texture); struct r300_screen* rscreen = r300_screen(screen); struct r300_winsys_screen *rws = (struct r300_winsys_screen *)screen->winsys; - enum r300_buffer_domain domain; if (!tex) { return NULL; @@ -960,10 +959,11 @@ struct pipe_resource* r300_texture_create(struct pipe_screen* screen, base->width0, base->height0, base->depth0, base->last_level, util_format_short_name(base->format)); - domain = base->flags & R300_RESOURCE_FLAG_TRANSFER ? R300_DOMAIN_GTT : - R300_DOMAIN_VRAM; + tex->domain = base->flags & R300_RESOURCE_FLAG_TRANSFER ? R300_DOMAIN_GTT : + R300_DOMAIN_VRAM; - tex->buffer = rws->buffer_create(rws, 2048, base->bind, domain, tex->size); + tex->buffer = rws->buffer_create(rws, 2048, base->bind, tex->domain, + tex->size); rws->buffer_set_tiling(rws, tex->buffer, tex->pitch[0] * util_format_get_blocksize(tex->b.b.format), @@ -1051,6 +1051,7 @@ r300_texture_from_handle(struct pipe_screen* screen, tex->b.vtbl = &r300_texture_vtbl; pipe_reference_init(&tex->b.b.reference, 1); tex->b.b.screen = screen; + tex->domain = R300_DOMAIN_VRAM; tex->stride_override = stride; |