summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r--src/gallium/drivers/r600/r600_state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index fc757812a86..3ac9b8d396b 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -1000,8 +1000,12 @@ static struct pipe_sampler_view *r600_create_sampler_view(struct pipe_context *c
}
if (tmp->is_depth && !tmp->is_flushing_texture) {
- r600_texture_depth_flush(ctx, texture, TRUE);
+ r600_init_flushed_depth_texture(ctx, texture);
tmp = tmp->flushed_depth_texture;
+ if (!tmp) {
+ FREE(view);
+ return NULL;
+ }
}
endian = r600_colorformat_endian_swap(format);