mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-23 11:55:00 +00:00
fix: lower UBO max size to account buffer cache offset (#2388)
* fix: lower UBO max size to account buffer cache offset * review comments * remove UBO size from spec and always set it to max on shader side
This commit is contained in:
parent
34a4f6e60e
commit
04fe3a79b9
14 changed files with 61 additions and 40 deletions
|
@ -633,8 +633,8 @@ void EmitContext::DefineBuffers() {
|
|||
|
||||
for (const auto& desc : info.buffers) {
|
||||
const auto sharp = desc.GetSharp(info);
|
||||
const bool is_storage = desc.IsStorage(sharp);
|
||||
const u32 array_size = sharp.NumDwords() != 0 ? sharp.NumDwords() : MaxUboDwords;
|
||||
const bool is_storage = desc.IsStorage(sharp, profile);
|
||||
const u32 array_size = profile.max_ubo_size >> 2;
|
||||
const auto* data_types = True(desc.used_types & IR::Type::F32) ? &F32 : &U32;
|
||||
const Id data_type = (*data_types)[1];
|
||||
const Id record_array_type{is_storage ? TypeRuntimeArray(data_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue