mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-23 20:05:01 +00:00
don't compile cs with higher shared memory than supported (#2175)
This commit is contained in:
parent
4e8c178aec
commit
99a04357d1
4 changed files with 11 additions and 0 deletions
|
@ -847,6 +847,10 @@ void EmitContext::DefineSharedMemory() {
|
|||
if (shared_memory_size == 0) {
|
||||
shared_memory_size = DefaultSharedMemSize;
|
||||
}
|
||||
|
||||
const u32 max_shared_memory_size = runtime_info.cs_info.max_shared_memory_size;
|
||||
ASSERT(shared_memory_size <= max_shared_memory_size);
|
||||
|
||||
const u32 num_elements{Common::DivCeil(shared_memory_size, 4U)};
|
||||
const Id type{TypeArray(U32[1], ConstU32(num_elements))};
|
||||
shared_memory_u32_type = TypePointer(spv::StorageClass::Workgroup, type);
|
||||
|
|
|
@ -198,6 +198,7 @@ struct FragmentRuntimeInfo {
|
|||
|
||||
struct ComputeRuntimeInfo {
|
||||
u32 shared_memory_size;
|
||||
u32 max_shared_memory_size;
|
||||
std::array<u32, 3> workgroup_size;
|
||||
std::array<bool, 3> tgid_enable;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue