mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 00:42:48 +00:00
remove UBO size from spec and always set it to max on shader side
This commit is contained in:
parent
9865692d35
commit
4323a4c31d
@ -634,8 +634,7 @@ void EmitContext::DefineBuffers() {
|
||||
for (const auto& desc : info.buffers) {
|
||||
const auto sharp = desc.GetSharp(info);
|
||||
const bool is_storage = desc.IsStorage(sharp, profile);
|
||||
const u32 array_size =
|
||||
sharp.NumDwords() != 0 ? sharp.NumDwords() : profile.max_ubo_size >> 2;
|
||||
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)
|
||||
|
@ -27,7 +27,6 @@ struct BufferSpecialization {
|
||||
u32 num_format : 4;
|
||||
u32 index_stride : 2;
|
||||
u32 element_size : 2;
|
||||
u32 size = 0;
|
||||
AmdGpu::CompMapping dst_select{};
|
||||
AmdGpu::NumberConversion num_conversion{};
|
||||
|
||||
@ -38,8 +37,7 @@ struct BufferSpecialization {
|
||||
(data_format == other.data_format && num_format == other.num_format &&
|
||||
dst_select == other.dst_select && num_conversion == other.num_conversion)) &&
|
||||
(!swizzle_enable ||
|
||||
(index_stride == other.index_stride && element_size == other.element_size)) &&
|
||||
(size >= other.is_storage || is_storage);
|
||||
(index_stride == other.index_stride && element_size == other.element_size));
|
||||
}
|
||||
};
|
||||
|
||||
@ -122,9 +120,6 @@ struct StageSpecialization {
|
||||
spec.index_stride = sharp.index_stride;
|
||||
spec.element_size = sharp.element_size;
|
||||
}
|
||||
if (!spec.is_storage) {
|
||||
spec.size = sharp.GetSize();
|
||||
}
|
||||
});
|
||||
ForEachSharp(binding, images, info->images,
|
||||
[](auto& spec, const auto& desc, AmdGpu::Image sharp) {
|
||||
|
Loading…
Reference in New Issue
Block a user