diff options
author | Marek Olšák <[email protected]> | 2011-09-04 02:58:41 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-09-10 08:53:29 +0200 |
commit | 840ad139aff401829552d0e3ba77f8abcb5862bd (patch) | |
tree | c88ae221adeed66dd0ba9db8e11be55dc664a6c5 /src/gallium/drivers/r600/r600_texture.c | |
parent | c4519c3aec37f5cb3db8fe7e8ead13ae04e792b5 (diff) |
r600g: always decompress all mipmaps and layers, slices, or faces of zbuffers
This fixes piglit/fbo-depth-array.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 691cc48dea7..425e269069f 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -573,19 +573,17 @@ int r600_texture_depth_flush(struct pipe_context *ctx, if (rtex->flushed_depth_texture) goto out; - resource.target = PIPE_TEXTURE_2D; + resource.target = texture->target; resource.format = texture->format; resource.width0 = texture->width0; resource.height0 = texture->height0; - resource.depth0 = 1; - resource.array_size = 1; + resource.depth0 = texture->depth0; + resource.array_size = texture->array_size; resource.last_level = texture->last_level; - resource.nr_samples = 0; + resource.nr_samples = texture->nr_samples; resource.usage = PIPE_USAGE_DYNAMIC; - resource.bind = 0; - resource.flags = R600_RESOURCE_FLAG_TRANSFER; - - resource.bind |= PIPE_BIND_DEPTH_STENCIL; + resource.bind = texture->bind | PIPE_BIND_DEPTH_STENCIL; + resource.flags = R600_RESOURCE_FLAG_TRANSFER | texture->flags; rtex->flushed_depth_texture = (struct r600_resource_texture *)ctx->screen->resource_create(ctx->screen, &resource); if (rtex->flushed_depth_texture == NULL) { |