mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-26 12:26:18 +00:00
shader_recompiler: Fix some shared memory accesses when workgroup struct is omitted. (#3110)
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / linux-qt-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / linux-qt-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
This commit is contained in:
parent
efa8f6a154
commit
5bc4cc761a
3 changed files with 17 additions and 30 deletions
|
@ -203,6 +203,14 @@ public:
|
|||
return final_result;
|
||||
}
|
||||
|
||||
Id EmitSharedMemoryAccess(const Id result_type, const Id shared_mem, const Id index) {
|
||||
if (std::popcount(static_cast<u32>(info.shared_types)) > 1) {
|
||||
return OpAccessChain(result_type, shared_mem, u32_zero_value, index);
|
||||
}
|
||||
// Workgroup layout struct omitted.
|
||||
return OpAccessChain(result_type, shared_mem, index);
|
||||
}
|
||||
|
||||
Info& info;
|
||||
const RuntimeInfo& runtime_info;
|
||||
const Profile& profile;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue