summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2013-07-01 02:29:50 +0200
committerMarek Olšák <maraeo@gmail.com>2013-07-08 20:25:18 +0200
commitb1a061b81ed78cd3c71304e122374ae970d04908 (patch)
tree38d8e9b4cb48852dc937faea55b59afd1c83abc2 /src
parent87669c3654fa22491fed68781d31cdec75c2a96c (diff)
downloadexternal_mesa3d-b1a061b81ed78cd3c71304e122374ae970d04908.zip
external_mesa3d-b1a061b81ed78cd3c71304e122374ae970d04908.tar.gz
external_mesa3d-b1a061b81ed78cd3c71304e122374ae970d04908.tar.bz2
r600g: enable fast MSAA color clear for array/3D/cube textures
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/r600_blit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c
index 3b8a28b..7a0e256 100644
--- a/src/gallium/drivers/r600/r600_blit.c
+++ b/src/gallium/drivers/r600/r600_blit.c
@@ -447,7 +447,6 @@ static bool can_fast_clear_color(struct pipe_context *ctx)
for (i = 0; i < fb->nr_cbufs; i++) {
struct r600_texture *tex = (struct r600_texture *)fb->cbufs[i]->texture;
- int target = fb->cbufs[i]->texture->target;
if (tex->cmask_size == 0) {
return false;
@@ -458,9 +457,9 @@ static bool can_fast_clear_color(struct pipe_context *ctx)
return false;
}
- /* textures with multiple images are not supported */
- if (target != PIPE_TEXTURE_2D && target != PIPE_TEXTURE_RECT &&
- target != PIPE_TEXTURE_1D) {
+ /* the clear is allowed if all layers are bound */
+ if (fb->cbufs[i]->u.tex.first_layer != 0 ||
+ fb->cbufs[i]->u.tex.last_layer != util_max_layer(&tex->resource.b.b, 0)) {
return false;
}
}