summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_resource.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-05-03 13:39:45 -0700
committerRob Clark <[email protected]>2019-05-04 11:50:44 -0700
commit11583dc65536f274db68cc5c8cb1a0d7007b0201 (patch)
tree9e3125c18ea624feadbf5601ce4c0ee539dec9a9 /src/gallium/drivers/freedreno/freedreno_resource.c
parent857d9f3b02c95713d845c54bc6cc1faf877095bb (diff)
freedreno/a6xx: UBWC support for images
There are still some fallbacks we'll need to handle before we can enable UBWC by default. I think we may need to fallback to uncompressed if image atomic operations are used. And we still need to sort out how to handle image and sampler views of compressed resources if the image/ sampler view is using a format that does not support compression. (I think the latter should hopefully be uncommon outside of deqp/piglit.) But at least this gets us to the point where supertuxkart works properly with UBWC enabled ;-) Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_resource.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index c7436d74da0..1f0bb040c24 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -911,8 +911,17 @@ fd_resource_create_with_modifiers(struct pipe_screen *pscreen,
allow_ubwc = drm_find_modifier(DRM_FORMAT_MOD_QCOM_COMPRESSED, modifiers, count);
/* TODO turn on UBWC for all internal buffers
- * Manhattan benchmark shows artifacts when enabled. Once this
- * is fixed the following line can be removed.
+ *
+ * There are still some regressions in deqp with UBWC enabled. I
+ * think it is mostly related to sampler/image views using a format
+ * that doesn't support compression with a resource created with
+ * a format that does. We need to track the compression state of
+ * a buffer and do an (in-place, hopefully?) resolve if it is re-
+ * interpreted with a format that does not support compression.
+ *
+ * It is possible (likely?) that we can't do atomic ops on a
+ * compressed buffer as well, so this would also require transition
+ * to a compressed state.
*/
allow_ubwc &= !!(fd_mesa_debug & FD_DBG_UBWC);