mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
nak: Only use suld.constant on Ampere+
Turing doesn't support it so we'll use suld.weak instead. While we're here, get rid of an accidental copy+paste condition. Fixes:ffdc0d8e98("nak: Use suld.constant when ACCESS_CAN_REORDER is set") Reviewed-by: Mel Henning <drawoc@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33649> (cherry picked from commit13f7ea7b3d)
This commit is contained in:
parent
43851b6850
commit
ff0f49e0ba
2 changed files with 13 additions and 11 deletions
|
|
@ -444,7 +444,7 @@
|
|||
"description": "nak: Only use suld.constant on Ampere+",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "ffdc0d8e98eeb68abcfff3c48b3691b999305004",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2305,11 +2305,12 @@ impl<'a> ShaderFromNir<'a> {
|
|||
let coord = self.get_image_coord(intrin, dim);
|
||||
// let sample = self.get_src(&srcs[2]);
|
||||
|
||||
let mem_order = if intrin.intrinsic
|
||||
== nir_intrinsic_load_global_constant
|
||||
|| (intrin.access() & ACCESS_CAN_REORDER) != 0
|
||||
{
|
||||
MemOrder::Constant
|
||||
let mem_order = if (intrin.access() & ACCESS_CAN_REORDER) != 0 {
|
||||
if self.sm.sm() >= 80 {
|
||||
MemOrder::Constant
|
||||
} else {
|
||||
MemOrder::Weak
|
||||
}
|
||||
} else {
|
||||
MemOrder::Strong(MemScope::System)
|
||||
};
|
||||
|
|
@ -2339,11 +2340,12 @@ impl<'a> ShaderFromNir<'a> {
|
|||
let coord = self.get_image_coord(intrin, dim);
|
||||
// let sample = self.get_src(&srcs[2]);
|
||||
|
||||
let mem_order = if intrin.intrinsic
|
||||
== nir_intrinsic_load_global_constant
|
||||
|| (intrin.access() & ACCESS_CAN_REORDER) != 0
|
||||
{
|
||||
MemOrder::Constant
|
||||
let mem_order = if (intrin.access() & ACCESS_CAN_REORDER) != 0 {
|
||||
if self.sm.sm() >= 80 {
|
||||
MemOrder::Constant
|
||||
} else {
|
||||
MemOrder::Weak
|
||||
}
|
||||
} else {
|
||||
MemOrder::Strong(MemScope::System)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue