mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-02 00:33:16 +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
|
@ -17,6 +17,7 @@
|
|||
#include "shader_recompiler/ir/reg.h"
|
||||
#include "shader_recompiler/ir/type.h"
|
||||
#include "shader_recompiler/params.h"
|
||||
#include "shader_recompiler/profile.h"
|
||||
#include "shader_recompiler/runtime_info.h"
|
||||
#include "video_core/amdgpu/liverpool.h"
|
||||
#include "video_core/amdgpu/resource.h"
|
||||
|
@ -24,8 +25,6 @@
|
|||
namespace Shader {
|
||||
|
||||
static constexpr size_t NumUserDataRegs = 16;
|
||||
static constexpr size_t MaxUboSize = 65536;
|
||||
static constexpr size_t MaxUboDwords = MaxUboSize >> 2;
|
||||
|
||||
enum class TextureType : u32 {
|
||||
Color1D,
|
||||
|
@ -50,8 +49,9 @@ struct BufferResource {
|
|||
bool is_written{};
|
||||
bool is_formatted{};
|
||||
|
||||
[[nodiscard]] bool IsStorage(const AmdGpu::Buffer& buffer) const noexcept {
|
||||
return buffer.GetSize() > MaxUboSize || is_written || is_gds_buffer;
|
||||
[[nodiscard]] bool IsStorage(const AmdGpu::Buffer& buffer,
|
||||
const Profile& profile) const noexcept {
|
||||
return buffer.GetSize() > profile.max_ubo_size || is_written || is_gds_buffer;
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr AmdGpu::Buffer GetSharp(const Info& info) const noexcept;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue