Skip to content

Commit

Permalink
gow3 hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Xcedf committed Nov 17, 2024
1 parent e9e2157 commit 94a4127
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
15 changes: 13 additions & 2 deletions src/core/libraries/ajm/ajm_at9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ std::tuple<u32, u32> AjmAt9Decoder::ProcessData(std::span<u8>& in_buf, SparseOut
AjmInstanceGapless& gapless) {
int ret = 0;
int bytes_used = 0;
Frame* frame = &static_cast<Atrac9Handle*>(m_handle)->Frame;

switch (m_format) {
case AjmFormatEncoding::S16:
ret = Atrac9Decode(m_handle, in_buf.data(), reinterpret_cast<s16*>(m_pcm_buffer.data()),
&bytes_used, True(m_flags & AjmAt9CodecFlags::NonInterleavedOutput));
if (frame->Config != NULL) {
ret = Atrac9Decode(m_handle, in_buf.data(), reinterpret_cast<s16*>(m_pcm_buffer.data()),
&bytes_used, True(m_flags & AjmAt9CodecFlags::NonInterleavedOutput));
}
break;
case AjmFormatEncoding::S32:
ret = Atrac9DecodeS32(m_handle, in_buf.data(), reinterpret_cast<s32*>(m_pcm_buffer.data()),
Expand Down Expand Up @@ -103,6 +107,13 @@ std::tuple<u32, u32> AjmAt9Decoder::ProcessData(std::span<u8>& in_buf, SparseOut
UNREACHABLE();
}

if (m_codec_info.framesInSuperframe == 0) {
m_codec_info.framesInSuperframe = 1;
}
if (m_codec_info.channels == 0) {
m_codec_info.channels = 1;
}

const auto samples_written = pcm_written / m_codec_info.channels;
gapless.current.skipped_samples += m_codec_info.frameSamples - samples_written;
if (gapless.init.total_samples != 0) {
Expand Down
6 changes: 6 additions & 0 deletions src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ bool PipelineCache::RefreshGraphicsKey() {
return false;
}

// Skipping this fragment shader to workaround a white screen issue in God of War III
// Remastered.
if (bininfo->shader_hash == 0x394ef85fcecf26dd) {
return false;
}

auto params = Liverpool::GetParams(*pgm);
std::tie(infos[stage_out_idx], modules[stage_out_idx], key.stage_hashes[stage_out_idx]) =
GetProgram(stage_in, params, binding);
Expand Down
11 changes: 0 additions & 11 deletions src/video_core/texture_cache/texture_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,17 +334,6 @@ ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) {
Image& image = slot_images[image_id];
image.tick_accessed_last = scheduler.CurrentTick();

// TMP {
LOG_WARNING(Render_Vulkan, "{}:{:x}@[{}x{}:{}_{}:{}_{}:{}]->{:x}@[{}x{}:{}:{}:{}]({:x}_{:x})",
int(desc.type), info.guest_address, info.size.width, info.size.height,
desc.view_info.range.base.level, info.resources.levels,
desc.view_info.range.base.layer, info.resources.layers,
vk::to_string(info.pixel_format).c_str(), image.info.guest_address,
image.info.size.width, image.info.size.height, image.info.resources.levels,
image.info.resources.layers, vk::to_string(image.info.pixel_format).c_str(),
image.usage.raw, image.binding.raw);
// }

return image_id;
}

Expand Down

0 comments on commit 94a4127

Please sign in to comment.