compiler: add ACCESS_STREAM_CACHE_POLICY
authorMarek Olšák <marek.olsak@amd.com>
Thu, 1 Aug 2019 01:16:12 +0000 (21:16 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 12 Aug 2019 18:52:17 +0000 (14:52 -0400)
radeonsi will use this.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/amd/common/ac_nir_to_llvm.c
src/compiler/shader_enums.h

index 42ca6a41df812fd74d1d68916f7a70c5b118d0e9..440d4ec9e5ebaee7fdfcd68924ad79babe2742b6 100644 (file)
@@ -1549,6 +1549,9 @@ static unsigned get_cache_policy(struct ac_nir_context *ctx,
                cache_policy |= ac_glc;
        }
 
+       if (access & ACCESS_STREAM_CACHE_POLICY)
+               cache_policy |= ac_slc;
+
        return cache_policy;
 }
 
index 5c6437749b84d575dd14327362e2bffb86f285ee..d9eb290abf429a47a5757fbe5603ef96be09ee5d 100644 (file)
@@ -736,6 +736,9 @@ enum gl_access_qualifier
     * a lack of ACCESS_COHERENT and ACCESS_VOLATILE.
     */
    ACCESS_CAN_REORDER = (1 << 6),
+
+   /** Use as little cache space as possible. */
+   ACCESS_STREAM_CACHE_POLICY = (1 << 7),
 };
 
 /**