general: Fixes for Tales of the Abyss (#7381)

* geometry_pipeline: Remove unneeded assert

* Has been hw-tested that gs works correctly even when not in exclusive mode

* pica_core: Propagate output_mask to gs

* Has been hw-tested to occur under the same conditions that other uniforms are shared

* regs_shader: Intialize GPUREG_SH_INPUTBUFFER_CONFIG to default value

* Default value verified on hw. Tales of Abyss does not update the number of vertex attributes for the geometry unit and expects it to be 2

* texture_codec: Align buffer sizes to bpp

* Prevents out of bounds texture reads when launching TOA from the HOME menu

* pica_core: Make default value more clear
This commit is contained in:
GPUCode 2024-01-24 19:22:10 +02:00 committed by GitHub
parent 89e13a85a7
commit bea863efff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 21 additions and 6 deletions

View file

@ -341,8 +341,8 @@ static constexpr void MortonCopy(u32 width, u32 height, u32 start_offset, u32 en
*/
template <bool decode, PixelFormat format, bool converted = false>
static constexpr void LinearCopy(std::span<u8> src_buffer, std::span<u8> dst_buffer) {
const std::size_t src_size = src_buffer.size();
const std::size_t dst_size = dst_buffer.size();
std::size_t src_size = src_buffer.size();
std::size_t dst_size = dst_buffer.size();
if constexpr (converted) {
constexpr u32 encoded_bytes_per_pixel = GetFormatBpp(format) / 8;
@ -352,6 +352,9 @@ static constexpr void LinearCopy(std::span<u8> src_buffer, std::span<u8> dst_buf
constexpr u32 dst_bytes_per_pixel =
decode ? decoded_bytes_per_pixel : encoded_bytes_per_pixel;
src_size = Common::AlignDown(src_size, src_bytes_per_pixel);
dst_size = Common::AlignDown(dst_size, dst_bytes_per_pixel);
for (std::size_t src_index = 0, dst_index = 0; src_index < src_size && dst_index < dst_size;
src_index += src_bytes_per_pixel, dst_index += dst_bytes_per_pixel) {
const auto src_pixel = src_buffer.subspan(src_index, src_bytes_per_pixel);