Skip to content

Commit

Permalink
gow3 hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Xcedf committed Nov 18, 2024
1 parent 7b00273 commit b3b6f48
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/aerolib/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ template <int stub_index>
static u64 CommonStub() {
auto entry = stub_nids[stub_index];
if (entry) {
LOG_ERROR(Core, "Stub: {} (nid: {}) called, returning zero to {}", entry->name, entry->nid,
LOG_TRACE(Core, "Stub: {} (nid: {}) called, returning zero to {}", entry->name, entry->nid,
__builtin_return_address(0));
} else {
LOG_ERROR(Core, "Stub: Unknown (nid: {}) called, returning zero to {}",
Expand Down
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
10 changes: 10 additions & 0 deletions src/video_core/renderer_vulkan/vk_pipeline_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,16 @@ bool PipelineCache::RefreshGraphicsKey() {
return false;
}

//if (bininfo->shader_hash == 0xb585d534 || bininfo->shader_hash == 0x29c851e0) {
// 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
4 changes: 2 additions & 2 deletions src/video_core/texture_cache/image_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static constexpr std::pair micro_tile_extent{8u, 8u};
static constexpr auto hw_pipe_interleave = 256u;

static constexpr std::pair<u32, u32> GetMacroTileExtents(u32 tiling_idx, u32 bpp, u32 num_samples) {
ASSERT(num_samples == 1);
//ASSERT(num_samples == 1);
const auto row = tiling_idx * 5;
const auto column = std::bit_width(bpp) - 4; // bpps are 8, 16, 32, 64, 128
return macro_tile_extents[row + column];
Expand Down Expand Up @@ -274,7 +274,7 @@ void ImageInfo::UpdateSize() {
case AmdGpu::TilingMode::Texture_MacroTiled:
case AmdGpu::TilingMode::Depth_MacroTiled: {
ASSERT(!props.is_block);
ASSERT(num_samples == 1);
//ASSERT(num_samples == 1);
std::tie(mip_info.pitch, mip_info.size) =
ImageSizeMacroTiled(mip_w, mip_h, bpp, num_samples, tiling_idx);
break;
Expand Down

0 comments on commit b3b6f48

Please sign in to comment.