summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_texture.c
diff options
context:
space:
mode:
authorHenri Verbeet <hverbeet@gmail.com>2011-01-30 18:57:39 +0100
committerHenri Verbeet <hverbeet@gmail.com>2011-01-30 18:59:13 +0100
commit38b54158b68479e1f97c8452ba0d67f50dce7582 (patch)
treea899fdb5944ccf2d3e59a80a470ca2cfc673ff4b /src/gallium/drivers/r600/r600_texture.c
parent3f0a966807f03a364edea0272ddf45f08ab7ce4f (diff)
r600g: Update the flushed depth texture after drawing to the corresponding texture.
I know Jerome will probably rewrite the way depth textures work sometime soon. For the time being this should at least make common depth texture usage for shadowing work properly though.
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
-rw-r--r--src/gallium/drivers/r600/r600_texture.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 51560bd19e..91076269ec 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -302,6 +302,9 @@ r600_texture_create_object(struct pipe_screen *screen,
resource->bo = bo;
rtex->pitch_override = pitch_in_bytes_override;
+ if (util_format_is_depth_or_stencil(base->format))
+ rtex->depth = 1;
+
if (array_mode)
rtex->tiled = 1;
r600_setup_miptree(screen, rtex, array_mode);
@@ -632,7 +635,6 @@ void r600_texture_transfer_destroy(struct pipe_context *ctx,
struct pipe_transfer *transfer)
{
struct r600_transfer *rtransfer = (struct r600_transfer*)transfer;
- struct r600_resource_texture *rtex = (struct r600_resource_texture*)transfer->resource;
if (rtransfer->staging_texture) {
if (transfer->usage & PIPE_TRANSFER_WRITE) {
@@ -640,9 +642,6 @@ void r600_texture_transfer_destroy(struct pipe_context *ctx,
}
pipe_resource_reference(&rtransfer->staging_texture, NULL);
}
- if (rtex->flushed_depth_texture) {
- pipe_resource_reference((struct pipe_resource **)&rtex->flushed_depth_texture, NULL);
- }
pipe_resource_reference(&transfer->resource, NULL);
FREE(transfer);
}