nak: Handle MemScope::System on Kepler

We never actually create any MemScope::System instructions anymore, but
it's worth handling it now just so we don't forget.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35265>
This commit is contained in:
Faith Ekstrand
2025-05-30 14:56:08 -04:00
committed by Marge Bot
parent 81b6aece17
commit a3b4401fe6
+11 -2
View File
@@ -2322,6 +2322,9 @@ impl LdCacheOp {
// We assume that CacheAll is also safe for shared memory.
MemSpace::Global(_) => match order {
MemOrder::Constant => LdCacheOp::CacheAll,
MemOrder::Strong(MemScope::System) => {
LdCacheOp::CacheInvalidate
}
_ => LdCacheOp::CacheGlobal,
},
MemSpace::Local | MemSpace::Shared => LdCacheOp::CacheAll,
@@ -2355,11 +2358,17 @@ impl StCacheOp {
pub fn select(
_sm: &dyn ShaderModel,
space: MemSpace,
_order: MemOrder,
order: MemOrder,
_eviction_priority: MemEvictionPriority,
) -> Self {
match space {
MemSpace::Global(_) => StCacheOp::CacheGlobal,
MemSpace::Global(_) => match order {
MemOrder::Constant => panic!("Cannot store to constant"),
MemOrder::Strong(MemScope::System) => {
StCacheOp::WriteThrough
}
_ => StCacheOp::CacheGlobal,
},
MemSpace::Local | MemSpace::Shared => StCacheOp::WriteBack,
}
}