Mesa (main): driconf: add vk_dont_care_as_load workaround option

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 18 18:07:58 UTC 2021


Module: Mesa
Branch: main
Commit: 3d69800a0b111daabf51266a815be3be639af80c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d69800a0b111daabf51266a815be3be639af80c

Author: Danylo Piliaiev <dpiliaiev at igalia.com>
Date:   Mon Oct 18 13:45:52 2021 +0300

driconf: add vk_dont_care_as_load workaround option

It's easy to make a mistake of using VK_ATTACHMENT_LOAD_OP_DONT_CARE
when LOAD_OP_LOAD should be used since all desktop GPUs do the same
thing (nothing) for both of them.

However tiler GPUs do actually care about them.

Signed-off-by: Danylo Piliaiev <dpiliaiev at igalia.com>
Reviewed-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13367>

---

 src/util/driconf.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/driconf.h b/src/util/driconf.h
index b708a2d8c86..b1faacca096 100644
--- a/src/util/driconf.h
+++ b/src/util/driconf.h
@@ -255,6 +255,10 @@
    DRI_CONF_OPT_B(ignore_map_unsynchronized, def, \
                   "Ignore GL_MAP_UNSYNCHRONIZED_BIT, workaround for games that use it incorrectly")
 
+#define DRI_CONF_VK_DONT_CARE_AS_LOAD(def) \
+   DRI_CONF_OPT_B(vk_dont_care_as_load, def, \
+                  "Treat VK_ATTACHMENT_LOAD_OP_DONT_CARE as LOAD_OP_LOAD, workaround on tiler GPUs for games that confuse these two load ops")
+
 /**
  * \brief Image quality-related options
  */



More information about the mesa-commit mailing list