Compare commits

..
16 changed files with 318 additions and 310 deletions
+1 -10
View File
@@ -185,7 +185,6 @@ PAPX-90020:
estimateTextureRegion: 1 # Improves performance and reduces hash cache size.
halfPixelOffset: 2 # Aligns post effects.
nativeScaling: 1 # Fixes post effects.
textureInsideRT: 1 # Fixes post shuffles.
PAPX-90201:
name: "ファンタビジョン [体験版]"
name-sort: "ふぁんたびじょん [たいけんばん]"
@@ -9112,7 +9111,6 @@ SCPS-15064:
estimateTextureRegion: 1 # Improves performance and reduces hash cache size.
halfPixelOffset: 2 # Aligns post effects.
nativeScaling: 1 # Fixes post effects.
textureInsideRT: 1 # Fixes post shuffles.
patches:
A5768F53:
content: |-
@@ -32429,10 +32427,6 @@ SLKA-25255:
name-sort: "Mobile Suit Gundam Seed - Kkeunnaji Anneun Naeillo"
name-en: "Mobile Suit Gundam Seed - Never Ending Tomorrow"
region: "NTSC-K"
SLKA-25256:
name: "UEFA 챔피언스 리그 2006-2007"
name-en: "UEFA Champions League 2006-2007"
region: "NTSC-K"
SLKA-25257:
name: "풍운 막말전" # Undumped on ReDump as of 2025-08-28
name-en: "Fu-un Bakumatsu-den"
@@ -32662,7 +32656,7 @@ SLKA-25299:
SLKA-25300:
name: "디지털 데빌 사가: 아바탈 튜너 [Special Package]"
name-en: "Digital Devil Saga - Avatar Tuner [Special Package]"
region: "NTSC-K"
region: "NTSC-J-K"
compat: 5
gameFixes:
- EETimingHack
@@ -64195,9 +64189,6 @@ SLPS-73270:
name-sort: "すーぱーろぼっとたいせんZ [PlayStation2 the Best]"
name-en: "Super Robot Taisen Z [PlayStation2 the Best]"
region: "NTSC-J"
memcardFilters:
- "SLPS-73270"
- "SLPS-25887"
SLPS-73401:
name: "はじめの一歩 VICTORIOUS BOXERS CHAMPIONSHIP VERSION [PlayStation2 the Best]"
name-sort: "はじめのいっぽ VICTORIOUS BOXERS CHAMPIONSHIP VERSION [PlayStation2 the Best]"
+1 -1
View File
@@ -587,7 +587,7 @@ void main()
#define PS_FEEDBACK_LOOP_IS_NEEDED_RT (PS_TEX_IS_FB == 1 || AFAIL_NEEDS_RT || PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW || (PS_DATE >= 5))
#define PS_FEEDBACK_LOOP_IS_NEEDED_DEPTH (AFAIL_NEEDS_DEPTH || ZTST_NEEDS_DEPTH || AA1_NEEDS_DEPTH)
#define ZWRITE (PS_ZCLAMP || PS_ZFLOOR || PS_FEEDBACK_LOOP_IS_NEEDED_DEPTH)
#define ZWRITE (PS_ZCLAMP || PS_ZFLOOR || SW_DEPTH || PS_FEEDBACK_LOOP_IS_NEEDED_DEPTH)
#define PS_RETURN_COLOR_ROV (!PS_NO_COLOR && PS_ROV_COLOR)
#define PS_RETURN_COLOR (!PS_NO_COLOR && !PS_ROV_COLOR)
+5 -1
View File
@@ -284,7 +284,7 @@ void DisplaySurface::handleKeyInputEvent(QEvent* event)
void DisplaySurface::onResizeDebounceTimer()
{
emit windowResizedEvent(m_last_window_width, m_last_window_height, m_last_window_scale);
emit windowResizedEvent(m_pending_window_width, m_pending_window_height, m_pending_window_scale);
}
bool DisplaySurface::event(QEvent* event)
@@ -397,6 +397,10 @@ bool DisplaySurface::event(QEvent* event)
// avoid spamming resize events for paint events (sent on move on windows)
if (m_last_window_width != scaled_width || m_last_window_height != scaled_height || m_last_window_scale != dpr)
{
m_pending_window_width = scaled_width;
m_pending_window_height = scaled_height;
m_pending_window_scale = dpr;
m_last_window_width = scaled_width;
m_last_window_height = scaled_height;
m_last_window_scale = dpr;
+4
View File
@@ -70,5 +70,9 @@ private:
float m_last_window_scale = 1.0f;
QTimer* m_resize_debounce_timer = nullptr;
u32 m_pending_window_width = 0;
u32 m_pending_window_height = 0;
float m_pending_window_scale = 1.0f;
QWidget* m_container = nullptr;
};
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -161,9 +161,9 @@ static bool OpenGSDevice(GSRendererType renderer, bool clear_state_on_fail, bool
return false;
}
if (GSConfig.OsdShowGPU && !g_gs_device->SetGPUTimingEnabled(true))
if (!g_gs_device->SetGPUTimingEnabled(true))
GSConfig.OsdShowGPU = false;
if (GSConfig.OsdShowGPUStats && !g_gs_device->SetGPUPipelineStatisticsEnabled(true))
if (!g_gs_device->SetGPUPipelineStatisticsEnabled(true))
GSConfig.OsdShowGPUStats = false;
Console.WriteLn(Color_StrongGreen, "%s Graphics Driver Info:", GSDevice::RenderAPIToString(new_api));
@@ -881,9 +881,9 @@ void GSUpdateConfig(const Pcsx2Config::GSOptions& new_config)
g_gs_renderer->PurgeTextureCache(true, false, true);
}
if (GSConfig.OsdShowGPU != old_config.OsdShowGPU)
if (GSConfig.OsdShowGPU && !old_config.OsdShowGPU)
{
if (!g_gs_device->SetGPUTimingEnabled(GSConfig.OsdShowGPU))
if (!g_gs_device->SetGPUTimingEnabled(true))
GSConfig.OsdShowGPU = false;
}
+8 -8
View File
@@ -603,7 +603,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
}
// 1x1 dummy texture.
const GSTexture::Usage null_usage = m_uav_texture ? GSTexture::ShaderWriteTarget : GSTexture::FeedbackTarget;
const GSTexture::Usage null_usage = m_uav_texture ? GSTexture::ShaderWriteTarget : GSTexture::Feedback;
m_null_texture = CreateSurface(null_usage, 1, 1, 1, GSTexture::Format::Color);
if (!m_null_texture)
return false;
@@ -1167,7 +1167,7 @@ void GSDevice11::DestroyTimestampQueries()
m_read_timestamp_query = 0;
m_write_timestamp_query = 0;
m_waiting_timestamp_queries = 0;
m_timestamp_query_started = false;
m_timestamp_query_started = 0;
}
void GSDevice11::PopTimestampQuery()
@@ -1286,13 +1286,13 @@ void GSDevice11::DestroyPipelineStatisticsQueries()
return;
if (m_pipeline_statistics_query_started)
m_ctx->End(m_pipeline_statistics_queries[m_write_pipeline_statistics_query].get());
m_ctx->End(m_pipeline_statistics_queries[m_write_timestamp_query].get());
m_pipeline_statistics_queries = {};
m_read_pipeline_statistics_query = 0;
m_write_pipeline_statistics_query = 0;
m_waiting_pipeline_statistics_queries = 0;
m_pipeline_statistics_query_started = false;
m_timestamp_queries = {};
m_read_timestamp_query = 0;
m_write_timestamp_query = 0;
m_waiting_timestamp_queries = 0;
m_timestamp_query_started = 0;
}
void GSDevice11::PopPipelineStatisticsQuery()
+6 -2
View File
@@ -9827,8 +9827,12 @@ bool GSRendererHW::CanUseSwPrimRender(bool no_rt, bool no_ds, bool draw_sprite_t
return false;
}
}
if (PRIM->ABE && m_vt.m_eq.rgba == 0xffff && !m_context->ALPHA.IsOpaque(GetAlphaMinMax().min, GetAlphaMinMax().max))
const u32 frame_mask = GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].fmsk;
const u32 alpha_mask = ((m_cached_ctx.FRAME.FBMSK & frame_mask) & 0xFF000000);
const u32 rgb_mask = ((m_cached_ctx.FRAME.FBMSK & frame_mask) & 0x00FFFFFF);
const bool difficult_fbmsk = m_cached_ctx.FRAME.FBMSK != 0 && (GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].bpp == 16 || (alpha_mask != 0 && alpha_mask != (GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].fmsk & 0xFF000000)) ||
(rgb_mask != 0 && rgb_mask != (GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].fmsk & 0x00FFFFFF)));
if (difficult_fbmsk || (PRIM->ABE && m_vt.m_eq.rgba == 0xffff && !m_context->ALPHA.IsOpaque(GetAlphaMinMax().min, GetAlphaMinMax().max)))
{
GSTextureCache::Target* rt = g_texture_cache->GetTargetWithSharedBits(m_cached_ctx.FRAME.Block(), m_cached_ctx.FRAME.PSM);
+13 -1
View File
@@ -545,7 +545,19 @@ bool GSRendererHWFunctions::SwPrimRender(GSRendererHW& hw, bool invalidate_tc, b
static_cast<GSSingleRasterizer*>(hw.m_sw_rasterizer.get())->Draw(data);
if (invalidate_tc)
g_texture_cache->InvalidateVideoMem(context->offset.fb, bbox);
{
GSOffset frame_offs = context->offset.fb;
if (GSLocalMemory::m_psm[context->FRAME.PSM].trbpp == 32 && context->FRAME.FBMSK)
{
if (context->FRAME.FBMSK == 0xFF000000)
frame_offs = GSRendererHW::GetInstance()->m_mem.GetOffset(context->FRAME.Block(), context->FRAME.FBW, PSMCT24);
else if (context->FRAME.FBMSK == 0x00FFFFFF)
frame_offs = GSRendererHW::GetInstance()->m_mem.GetOffset(context->FRAME.Block(), context->FRAME.FBW, PSMT8H);
}
g_texture_cache->InvalidateVideoMem(frame_offs, bbox);
}
// Jak does sw prim render, then draws to the same target, and it needs to be uploaded.
if (add_ee_transfer)
+14 -4
View File
@@ -1734,6 +1734,11 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const bool is_color, const
if (found_t && (bw != t->m_TEX0.TBW || t->m_TEX0.PSM != psm))
match = false;
// Situations where font has been uploaded to the alpha channel and they use a different buffer width, this can't currently be translated correctly.
GSLocalMemory::psm_t req_psm = GSLocalMemory::m_psm[psm];
if (!possible_shuffle && req_psm.trbpp <= 8 && req_psm.bpp == 32 && t->m_TEX0.TBW != bw && (bw * 64) != t->m_valid.z && r.w > req_psm.pgs.y)
match = false;
// Different swizzle, different width, and dirty, so probably not what we want.
// DevCon.Warning("Expected %x Got %x shuffle %d draw %d", psm, t_psm, possible_shuffle, GSState::s_n);
if (match)
@@ -7273,6 +7278,9 @@ GSTexture* GSTextureCache::LookupPaletteSource(u32 CBP, u32 CPSM, u32 CBW, GSVec
else if (GSConfig.UserHacks_GPUTargetCLUTMode == GSGPUTargetCLUTMode::InsideTarget &&
t->m_TEX0.TBP0 < CBP && t->m_end_block >= CBP)
{
// If it's more than one group of 4 blocks, it's probably going to fail, horribly.
if ((size.x > GSLocalMemory::m_psm[CPSM].bs.x || size.y > GSLocalMemory::m_psm[CPSM].bs.y) && (CBP & 0x3) != (t->m_TEX0.TBP0 & 0x3))
continue;
// Somewhere within this target, can we find it?
const GSVector4i rc(0, 0, size.x, size.y);
SurfaceOffset so = ComputeSurfaceOffset(CBP, std::max<u32>(CBW, 0), CPSM, rc, t);
@@ -7285,7 +7293,7 @@ GSTexture* GSTextureCache::LookupPaletteSource(u32 CBP, u32 CPSM, u32 CBW, GSVec
}
else
{
// Not inside this target, skip.
// Not inside this target or not aligned, skip.
continue;
}
@@ -7953,7 +7961,9 @@ void GSTextureCache::Target::Update(bool cannot_scale)
alloca(sizeof(GSDevice::MultiStretchRect) * static_cast<u32>(m_dirty.size())));
u32 ndrects = 0;
const GSOffset off(g_gs_renderer->m_mem.GetOffset(m_TEX0.TBP0, m_TEX0.TBW, m_TEX0.PSM));
// There are cases where the alpha gets populated with font data, and the target has previously been PSMCT32 (or will be) so we need to make sure it gets filled in.
const u32 psm = (m_TEX0.PSM == PSMCT24) ? PSMCT32 : m_TEX0.PSM;
const GSOffset off(g_gs_renderer->m_mem.GetOffset(m_TEX0.TBP0, m_TEX0.TBW, psm));
const u32 bpp = GSLocalMemory::m_psm[m_TEX0.PSM].bpp;
std::pair<u8, u8> alpha_minmax = {255, 0};
@@ -7976,7 +7986,7 @@ void GSTextureCache::Target::Update(bool cannot_scale)
const GSVector4i t_r(read_r - t_offset);
if (mapped)
{
if ((m_TEX0.PSM & 0xf) != PSMCT24 && m_dirty[i].rgba.c.a && bpp >= 16)
if (((m_TEX0.PSM & 0xf) != PSMCT24 || m_valid_alpha_high || m_valid_alpha_low) && m_dirty[i].rgba.c.a && bpp >= 16)
{
// TODO: Only read once in 32bit and copy to the mapped texture. Bit out of scope of this PR and not a huge impact.
const int pitch = VectorAlign(read_r.width() * sizeof(u32));
@@ -7995,7 +8005,7 @@ void GSTextureCache::Target::Update(bool cannot_scale)
const int pitch = VectorAlign(read_r.width() * sizeof(u32));
g_gs_renderer->m_mem.ReadTexture(off, read_r, s_unswizzle_buffer, pitch, TEXA);
if ((m_TEX0.PSM & 0xf) != PSMCT24 && m_dirty[i].rgba.c.a && bpp >= 16)
if (((m_TEX0.PSM & 0xf) != PSMCT24 || m_valid_alpha_high || m_valid_alpha_low) &&m_dirty[i].rgba.c.a && bpp >= 16)
{
std::pair<u8, u8> new_alpha_minmax = GSGetRGBA8AlphaMinMax(s_unswizzle_buffer, read_r.width(), read_r.height(), pitch);
alpha_minmax.first = std::min(alpha_minmax.first, new_alpha_minmax.first);
+1 -1
View File
@@ -1292,7 +1292,7 @@ bool GSDeviceOGL::SetGPUPipelineStatisticsEnabled(bool enabled)
else
DestroyPipelineStatisticsQueries();
return (enabled == m_gpu_pipeline_statistics_enabled);
return true;
}
void GSDeviceOGL::DrawPrimitive()
+3 -17
View File
@@ -1150,7 +1150,7 @@ GPUPipelineStatistics GSDeviceVK::GetAndResetAccumulatedGPUPipelineStatistics()
bool GSDeviceVK::SetGPUPipelineStatisticsEnabled(bool enabled)
{
m_gpu_pipeline_statistics_enabled = enabled && m_gpu_pipeline_statistics_supported;
return (enabled == m_gpu_pipeline_statistics_enabled);
return true;
}
void GSDeviceVK::ScanForCommandBufferCompletion()
@@ -2254,11 +2254,8 @@ void GSDeviceVK::Destroy()
m_swap_chain.reset();
if (m_device != VK_NULL_HANDLE)
{
DestroySpinResources();
DestroyResources();
}
DestroySpinResources();
DestroyResources();
VKShaderCache::Destroy();
@@ -5418,17 +5415,6 @@ void GSDeviceVK::PSSetROVs(GSTexture* rt, GSTexture* ds, bool write_rt, bool wri
PSSetShaderResource(TFX_TEXTURE_DEPTH_ROV, nullptr, false);
}
if (IsDeviceNVIDIA() && InRenderPass())
{
// Nvidia doesn't like switching ROV targets mid-render pass, doing so causes flickering or missing geometry.
// End the render pass to avoid such issues.
if (vkRt != oldVkRt || vkDs != oldVkDs)
{
GL_INS("VK: Ending render pass due to UAV switch");
EndRenderPass();
}
}
if (GSConfig.HWROVBarriersVK)
{
// This is to fix issues with some systems that seem to require barriers even with FSI.
+1 -1
View File
@@ -557,7 +557,6 @@ void FullscreenUI::Shutdown(bool clear_state)
CloseCoverDownloaderWindow();
s_cover_image_map.clear();
s_game_list_sorted_entries = {};
s_last_unsorted_entries = {};
s_game_list_directories_cache = {};
s_game_cheat_unlabelled_count = 0;
s_enabled_game_cheat_cache = {};
@@ -2468,6 +2467,7 @@ void FullscreenUI::PopulateGameListEntryList()
static int s_last_sort = -1;
static bool s_last_reverse = false;
static bool s_last_prefer_eng = false;
static std::vector<const GameList::Entry*> s_last_unsorted_entries;
// Sort can be expensive, try to avoid when possible
const u32 count = GameList::GetEntryCount();
-3
View File
@@ -369,9 +369,6 @@ namespace FullscreenUI
inline std::vector<const GameList::Entry*> s_game_list_sorted_entries;
inline GameListView s_game_list_view = GameListView::Grid;
// Cached list of unsorted game list entries; used to detect changes and re-sort when needed
inline std::vector<const GameList::Entry*> s_last_unsorted_entries;
//////////////////////////////////////////////////////////////////////////
// Background
//////////////////////////////////////////////////////////////////////////
+1 -1
View File
@@ -3,4 +3,4 @@
/// Version number for GS and other shaders. Increment whenever any of the contents of the
/// shaders change, to invalidate the cache.
static constexpr u32 SHADER_CACHE_VERSION = 109; // Last changed in PR 14795
static constexpr u32 SHADER_CACHE_VERSION = 108; // Last changed in PR 14688
+4 -4
View File
@@ -25,10 +25,10 @@ struct mVU_Globals
u32 one [4] = __four(0x3f800000);
u32 Pi4 [4] = __four(0x3f490fdb);
u32 T1 [4] = __four(0x3f7ffff5);
u32 T2 [4] = __four(0xbeaaa61c);
u32 T3 [4] = __four(0x3e4c40a6);
u32 T4 [4] = __four(0xbe0e6c63);
u32 T5 [4] = __four(0x3dc577df);
u32 T5 [4] = __four(0xbeaaa61c);
u32 T2 [4] = __four(0x3e4c40a6);
u32 T3 [4] = __four(0xbe0e6c63);
u32 T4 [4] = __four(0x3dc577df);
u32 T6 [4] = __four(0xbd6501c4);
u32 T7 [4] = __four(0x3cb31652);
u32 T8 [4] = __four(0xbb84d7e7);