diff options
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 3 | ||||
-rw-r--r-- | src/compiler/shader_enums.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 42ca6a41df8..440d4ec9e5e 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -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; } diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index 5c6437749b8..d9eb290abf4 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -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), }; /** |