shader_recompiler: Set array size to max UBO size when 0. (#1251)

* shader_recompiler: Set array size to max UBO size when 0.

* vulkan: Account for fallbacks when setting depth attachment format.
This commit is contained in:
squidbus 2024-10-05 12:31:52 -07:00 committed by GitHub
parent ee57c2fd69
commit 8576d5e72c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 5 deletions

View file

@ -18,6 +18,8 @@
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,
@ -42,7 +44,6 @@ struct BufferResource {
bool is_written{};
bool IsStorage(AmdGpu::Buffer buffer) const noexcept {
static constexpr size_t MaxUboSize = 65536;
return buffer.GetSize() > MaxUboSize || is_written || is_gds_buffer;
}