freedreno: Move driconf settings into sub-struct
authorRob Clark <robdclark@chromium.org>
Wed, 29 Mar 2023 21:22:30 +0000 (14:22 -0700)
committerMarge Bot <emma+marge@anholt.net>
Sat, 1 Apr 2023 13:53:31 +0000 (13:53 +0000)
Organize all one of them in a single place before adding more.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>

src/gallium/drivers/freedreno/a6xx/fd6_emit.cc
src/gallium/drivers/freedreno/freedreno_screen.c
src/gallium/drivers/freedreno/freedreno_screen.h

index 1ac6717..c7d7ab9 100644 (file)
@@ -194,7 +194,7 @@ compute_lrz_state(struct fd6_emit *emit) assert_dt
     * enable LRZ write.  But this would cause early-z/lrz to discard
     * fragments from draw A which should be visible due to draw B.
     */
-   if (reads_dest && zsa->writes_z && ctx->screen->conservative_lrz) {
+   if (reads_dest && zsa->writes_z && ctx->screen->driconf.conservative_lrz) {
       if (!zsa->perf_warn_blend && rsc->lrz_valid) {
          perf_debug_ctx(ctx, "Invalidating LRZ due to blend+depthwrite");
          zsa->perf_warn_blend = true;
index 112ff43..0df23c3 100644 (file)
@@ -1108,7 +1108,7 @@ fd_screen_create(int fd,
    driParseConfigFiles(config->options, config->options_info, 0, "msm",
                        NULL, fd_dev_name(screen->dev_id), NULL, 0, NULL, 0);
 
-   screen->conservative_lrz =
+   screen->driconf.conservative_lrz =
          !driQueryOptionb(config->options, "disable_conservative_lrz");
 
    struct sysinfo si;
index 022f682..23affe6 100644 (file)
@@ -84,13 +84,15 @@ struct fd_screen {
    bool has_robustness;
    bool has_syncobj;
 
-   /* Conservative LRZ (default true) invalidates LRZ on draws with
-    * blend and depth-write enabled, because this can lead to incorrect
-    * rendering.  Driconf can be used to disable conservative LRZ for
-    * games which do not have the problematic sequence of draws *and*
-    * suffer a performance loss with conservative LRZ.
-    */
-   bool conservative_lrz;
+   struct {
+      /* Conservative LRZ (default true) invalidates LRZ on draws with
+       * blend and depth-write enabled, because this can lead to incorrect
+       * rendering.  Driconf can be used to disable conservative LRZ for
+       * games which do not have the problematic sequence of draws *and*
+       * suffer a performance loss with conservative LRZ.
+       */
+      bool conservative_lrz;
+   } driconf;
 
    const struct fd_dev_info *info;
    uint32_t ccu_offset_gmem;