summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-06-09 00:18:02 +0200
committerMarek Olšák <[email protected]>2010-06-09 00:18:28 +0200
commit25470dcbb16a462294ee6a714176929be8a26bf1 (patch)
tree7cdcdfdb4189b515c9c857181dd5460800f2ad59 /src/gallium/drivers/r300
parentfccfb7b16512a36424370dc1942cdedd3d1c208a (diff)
r300g: fix loading compressed textures
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_transfer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c
index 0d88d745c07..3eabe230d3d 100644
--- a/src/gallium/drivers/r300/r300_transfer.c
+++ b/src/gallium/drivers/r300/r300_transfer.c
@@ -107,7 +107,7 @@ r300_texture_get_transfer(struct pipe_context *ctx,
struct r300_screen *r300screen = r300_screen(ctx->screen);
struct r300_transfer *trans;
struct pipe_resource base;
- boolean referenced_cs, referenced_hw;
+ boolean referenced_cs, referenced_hw, blittable;
referenced_cs = r300screen->rws->is_buffer_referenced(
r300screen->rws, tex->buffer, R300_REF_CS);
@@ -118,6 +118,10 @@ r300_texture_get_transfer(struct pipe_context *ctx,
r300screen->rws, tex->buffer, R300_REF_HW);
}
+ blittable = ctx->screen->is_format_supported(
+ ctx->screen, texture->format, texture->target, 0,
+ PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET, 0);
+
trans = CALLOC_STRUCT(r300_transfer);
if (trans) {
/* Initialize the transfer object. */
@@ -130,7 +134,7 @@ r300_texture_get_transfer(struct pipe_context *ctx,
* for this transfer.
* Also make write transfers pipelined. */
if (tex->microtile || tex->macrotile ||
- (referenced_hw & !(usage & PIPE_TRANSFER_READ))) {
+ ((referenced_hw & !(usage & PIPE_TRANSFER_READ)) && blittable)) {
base.target = PIPE_TEXTURE_2D;
base.format = texture->format;
base.width0 = box->width;