summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-02-24 21:36:19 +0100
committerMarek Olšák <marek.olsak@amd.com>2016-03-09 15:02:27 +0100
commitabac6bf67a85310908c79187d102a86ee8fe6dd6 (patch)
tree47de9726796fc4f28ec518aaeb0b32bdf0555f58 /src
parentd4e847ea33039f1d31843e69ab238f2225982393 (diff)
downloadexternal_mesa3d-abac6bf67a85310908c79187d102a86ee8fe6dd6.zip
external_mesa3d-abac6bf67a85310908c79187d102a86ee8fe6dd6.tar.gz
external_mesa3d-abac6bf67a85310908c79187d102a86ee8fe6dd6.tar.bz2
gallium/radeon: don't use fast color clear if sharing doesn't allow it
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 21bb3f9..229fa5e 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -1487,6 +1487,14 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
continue;
}
+ /* shared textures can't use fast clear without an explicit flush,
+ * because there is no way to communicate the clear color among
+ * all clients
+ */
+ if (tex->resource.is_shared &&
+ !(tex->resource.external_usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
+ continue;
+
/* fast color clear with 1D tiling doesn't work on old kernels and CIK */
if (tex->surface.level[0].mode == RADEON_SURF_MODE_1D &&
rctx->chip_class >= CIK &&