mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
nak: Emit MemBar before Bar
This is what NVIDIA does. I'm not sure why this order but it seems necessary to pass some of the 1.1 memory model tests. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
parent
bc58620e1e
commit
e111bfdb5c
1 changed files with 9 additions and 9 deletions
|
|
@ -1862,6 +1862,15 @@ impl<'a> ShaderFromNir<'a> {
|
|||
addr_offset: 0,
|
||||
});
|
||||
}
|
||||
match intrin.execution_scope() {
|
||||
SCOPE_NONE => (),
|
||||
SCOPE_WORKGROUP => {
|
||||
if self.nir.info.stage() == MESA_SHADER_COMPUTE {
|
||||
b.push_op(OpBar {}).deps.yld = true;
|
||||
}
|
||||
}
|
||||
_ => panic!("Unhandled execution scope"),
|
||||
}
|
||||
if intrin.memory_scope() != SCOPE_NONE {
|
||||
let mem_scope = match intrin.memory_scope() {
|
||||
SCOPE_INVOCATION | SCOPE_SUBGROUP => MemScope::CTA,
|
||||
|
|
@ -1872,15 +1881,6 @@ impl<'a> ShaderFromNir<'a> {
|
|||
};
|
||||
b.push_op(OpMemBar { scope: mem_scope });
|
||||
}
|
||||
match intrin.execution_scope() {
|
||||
SCOPE_NONE => (),
|
||||
SCOPE_WORKGROUP => {
|
||||
if self.nir.info.stage() == MESA_SHADER_COMPUTE {
|
||||
b.push_op(OpBar {}).deps.yld = true;
|
||||
}
|
||||
}
|
||||
_ => panic!("Unhandled execution scope"),
|
||||
}
|
||||
if (modes & nir_var_mem_global) != 0
|
||||
&& (semantics & NIR_MEMORY_ACQUIRE) != 0
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue