Module: Mesa Branch: master Commit: 74a17a764dc2ad20d9d6f56afee963b23b597132 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=74a17a764dc2ad20d9d6f56afee963b23b597132
Author: Marek Olšák <[email protected]> Date: Thu Feb 7 04:29:42 2013 +0100 r300g: put textures with usage=staging in GTT and make them linear --- src/gallium/drivers/r300/r300_texture.c | 3 ++- src/gallium/drivers/r300/r300_texture_desc.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index e4cb967..d965730 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -998,7 +998,8 @@ r300_texture_create_object(struct r300_screen *rscreen, tex->tex.microtile = microtile; tex->tex.macrotile[0] = macrotile; tex->tex.stride_in_bytes_override = stride_in_bytes_override; - tex->domain = base->flags & R300_RESOURCE_FLAG_TRANSFER ? RADEON_DOMAIN_GTT : + tex->domain = (base->flags & R300_RESOURCE_FLAG_TRANSFER || + base->usage == PIPE_USAGE_STAGING) ? RADEON_DOMAIN_GTT : base->nr_samples > 1 ? RADEON_DOMAIN_VRAM : RADEON_DOMAIN_VRAM | RADEON_DOMAIN_GTT; tex->buf = buffer; diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c index eb31f82..df24e44 100644 --- a/src/gallium/drivers/r300/r300_texture_desc.c +++ b/src/gallium/drivers/r300/r300_texture_desc.c @@ -477,6 +477,10 @@ static void r300_setup_tiling(struct r300_screen *screen, tex->tex.microtile = RADEON_LAYOUT_LINEAR; tex->tex.macrotile[0] = RADEON_LAYOUT_LINEAR; + if (tex->b.b.usage == PIPE_USAGE_STAGING) { + return; + } + if (!util_format_is_plain(format)) { return; } _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
