Compare commits

..

1 Commits

Author SHA1 Message Date
refractionpcsx2 211a12aa7e GS: Disable Z on invalid FRAME/Z combination 2026-07-14 12:52:14 +01:00
20 changed files with 37 additions and 30 deletions
-3
View File
@@ -6,9 +6,6 @@ updates:
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
commit-message:
# Prefix all commit messages with "Deps/gha: "
prefix: "Deps/gha"
groups:
ci-deps:
patterns:
+2 -2
View File
@@ -92,7 +92,7 @@ jobs:
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v6
uses: actions/cache@v5
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
@@ -114,7 +114,7 @@ jobs:
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v6
uses: actions/cache@v5
with:
path: ~/deps
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/linux/build-dependencies-qt.sh', '.github/workflows/scripts/common/*.patch') }}
+3 -3
View File
@@ -99,7 +99,7 @@ jobs:
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v6
uses: actions/cache@v5
with:
path: ~/deps
key: ${{ inputs.os }} ${{ inputs.arch }} deps ${{ hashFiles('.github/workflows/scripts/macos/*', '.github/workflows/scripts/common/*.patch') }}
@@ -120,7 +120,7 @@ jobs:
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: Cache ccache cache
uses: actions/cache@v6
uses: actions/cache@v5
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.arch }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
@@ -176,7 +176,7 @@ jobs:
- name: Sign the Application
if: ${{ inputs.sign_and_notarize == true && env.SIGN_KEY }}
uses: indygreg/apple-code-sign-action@5e7a4a01fe4dffe948ef3bcf1f4538d963cb0c72
uses: indygreg/apple-code-sign-action@44d0985b7f4363198e80b6fea63ac3e9dd3e9957
with:
input_path: 'PCSX2.app'
p12_file: cert.p12
+1 -1
View File
@@ -122,7 +122,7 @@ jobs:
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v6
uses: actions/cache@v5
with:
path: deps
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/windows/build-dependencies.bat', '.github/workflows/scripts/common/*.patch') }}
-3
View File
@@ -63,9 +63,6 @@ oprofile_data/
*.kdev4
/.kdev4*
# Kate Projects
.kateproject*
# Resources and docs in /bin are tracked
/bin/**/*.dll
/bin/**/*.dmp
+1 -1
View File
@@ -198,7 +198,7 @@ struct PS_OUTPUT
#if PS_RETURN_COLOR
#if PS_DATE == 1 || PS_DATE == 2
float c0 : SV_Target;
float c : SV_Target;
#else
float4 c0 : SV_Target0;
+1 -1
View File
@@ -12432,7 +12432,7 @@ This action cannot be undone.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="5305"/>
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="5306"/>
<source>Spin GPU During Readbacks is enabled, but calibrated timestamps are unavailable. This might be really slow.</source>
<translation type="unfinished"></translation>
</message>
+1 -1
View File
@@ -2976,7 +2976,7 @@ void GSState::InitReadFIFO(u8* mem, int len)
// Read the image all in one go.
m_mem.ReadImageX(m_tr.x, m_tr.y, m_tr.buff, m_tr.total, m_env.BITBLTBUF, m_env.TRXPOS, m_env.TRXREG);
if (GSConfig.SaveTransferImages && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
if (GSConfig.SaveRT && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
{
const std::string s(GetDrawDumpPath(
"%05lld_read_%05x_%d_%s_%d_%d_%d_%d.bmp",
+1 -1
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::Feedback;
const GSTexture::Usage null_usage = m_features.rov ? GSTexture::ShaderWriteTarget : GSTexture::Feedback;
m_null_texture = CreateSurface(null_usage, 1, 1, 1, GSTexture::Format::Color);
if (!m_null_texture)
return false;
+4 -2
View File
@@ -2719,9 +2719,11 @@ GSDevice12::ComPtr<ID3DBlob> GSDevice12::GetUtilityPixelShader(const std::string
bool GSDevice12::CreateNullTexture()
{
const GSTexture::Usage null_access = m_features.rov ? GSTexture::ShaderWriteTarget : GSTexture::FeedbackTarget;
const DXGI_FORMAT null_uav_format = m_features.rov ? DXGI_FORMAT_R8G8B8A8_UNORM : DXGI_FORMAT_UNKNOWN;
m_null_texture =
GSTexture12::Create(GSTexture::ShaderWriteTarget, GSTexture::Format::Color, 1, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_UNKNOWN, DXGI_FORMAT_R8G8B8A8_UNORM);
GSTexture12::Create(null_access, GSTexture::Format::Color, 1, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_UNKNOWN, null_uav_format);
if (!m_null_texture)
return false;
+9 -1
View File
@@ -2772,6 +2772,14 @@ void GSRendererHW::Draw()
return;
}
if ((m_cached_ctx.FRAME.PSM == PSMCT16) != (m_cached_ctx.ZBUF.PSM == PSMZ16))
{
// There are two groups of formats that a draw can use, group 2 is PSMCT16 and PSMZ16, those are exclusive to each other, every other combination is group 1.
// These are not allowed to be mixed due to a different swizzle, which causes writes to Z to be omitted.
m_cached_ctx.ZBUF.ZMSK = 1;
m_cached_ctx.TEST.ZTE = 0;
}
// Sometimes everything will get reset and it will draw a single black point in the top left corner,
// which can cause invalid targets to be created, so might as well skip it.
if (GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).eq(GSVector4i::zero()) && m_vt.m_eq.rgba == 0xffff &&
@@ -3435,7 +3443,7 @@ void GSRendererHW::Draw()
bool shuffle_target = false;
const u32 page_alignment = GSLocalMemory::IsPageAlignedMasked(m_cached_ctx.TEX0.PSM, m_r);
const bool page_aligned = (page_alignment & 0xF0F0) != 0; // Make sure Y is page aligned.
if (!no_rt && page_aligned && m_cached_ctx.ZBUF.ZMSK && GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].bpp == 16 && GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM].trbpp <= 16 &&
if (!no_rt && page_aligned && m_cached_ctx.ZBUF.ZMSK && GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].bpp == 16 && GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM].bpp >= 16 &&
(m_vt.m_primclass == GS_SPRITE_CLASS || (m_vt.m_primclass == GS_TRIANGLE_CLASS && (m_index->tail % 6) == 0 && TrianglesAreQuads(true) && m_index->tail > 6)))
{
// Tail check is to make sure we have enough strips to go all the way across the page, or if it's using a region clamp could be used to draw strips.
+6 -2
View File
@@ -1069,8 +1069,12 @@ bool GSRendererSW::GetScanlineGlobalData(SharedData* data)
gd.sel.ababcd = 0xff;
gd.sel.prim = primclass;
// There are two groups of formats that a draw can use, group 2 is PSMCT16 and PSMZ16, those are exclusive to each other, every other combination is group 1.
// These are not allowed to be mixed due to a different swizzle, which causes writes to Z to be omitted.
const bool invalid_combination = (m_context->FRAME.PSM == PSMCT16) != (m_context->ZBUF.PSM == PSMZ16);
u32 fm = context->FRAME.FBMSK;
u32 zm = context->ZBUF.ZMSK || context->TEST.ZTE == 0 ? 0xffffffff : 0;
u32 zm = invalid_combination || context->ZBUF.ZMSK || context->TEST.ZTE == 0 ? 0xffffffff : 0;
const u32 fm_mask = GSLocalMemory::m_psm[m_context->FRAME.PSM].fmsk;
// When the format is 24bit (Z or C), DATE ceases to function.
@@ -1123,7 +1127,7 @@ bool GSRendererSW::GetScanlineGlobalData(SharedData* data)
bool ftest = gd.sel.atst != ATST_ALWAYS || (context->TEST.DATE && context->FRAME.PSM != PSMCT24);
bool zwrite = zm != 0xffffffff;
bool ztest = context->TEST.ZTE && context->TEST.ZTST > ZTST_ALWAYS;
bool ztest = !invalid_combination && context->TEST.ZTE && context->TEST.ZTST > ZTST_ALWAYS;
/*
printf("%05x %d %05x %d %05x %d %dx%d\n",
fwrite || ftest ? m_context->FRAME.Block() : 0xfffff, m_context->FRAME.PSM,
+2 -1
View File
@@ -3906,7 +3906,8 @@ VkShaderModule GSDeviceVK::GetUtilityFragmentShader(const std::string& source, c
bool GSDeviceVK::CreateNullTexture()
{
m_null_texture = GSTextureVK::Create(GSTexture::ShaderWriteTarget, GSTexture::Format::Color, 1, 1, 1);
GSTexture::Usage null_usage = m_features.rov ? GSTexture::ShaderWriteTarget : GSTexture::FeedbackTarget;
m_null_texture = GSTextureVK::Create(null_usage, GSTexture::Format::Color, 1, 1, 1);
if (!m_null_texture)
return false;
+1 -1
View File
@@ -555,7 +555,7 @@ const Pad::ControllerInfo& PadDualshock2::GetInfo() const
void PadDualshock2::Set(u32 index, float value)
{
if (index >= Inputs::LENGTH)
if (index > Inputs::LENGTH)
{
return;
}
+1 -1
View File
@@ -258,7 +258,7 @@ const Pad::ControllerInfo& PadGuitar::GetInfo() const
void PadGuitar::Set(u32 index, float value)
{
if (index >= Inputs::LENGTH)
if (index > Inputs::LENGTH)
{
return;
}
+1 -1
View File
@@ -324,7 +324,7 @@ const Pad::ControllerInfo& PadJogcon::GetInfo() const
void PadJogcon::Set(u32 index, float value)
{
if (index >= Inputs::LENGTH)
if (index > Inputs::LENGTH)
{
return;
}
+1 -1
View File
@@ -307,7 +307,7 @@ const Pad::ControllerInfo& PadNegcon::GetInfo() const
void PadNegcon::Set(u32 index, float value)
{
if (index >= Inputs::LENGTH)
if (index > Inputs::LENGTH)
{
return;
}
+1 -1
View File
@@ -371,7 +371,7 @@ const Pad::ControllerInfo& PadPopn::GetInfo() const
void PadPopn::Set(u32 index, float value)
{
if (index >= Inputs::LENGTH)
if (index > Inputs::LENGTH)
{
return;
}
+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 = 108; // Last changed in PR 14688
static constexpr u32 SHADER_CACHE_VERSION = 107; // Last changed in PR 14634
-2
View File
@@ -80,8 +80,6 @@ namespace usb_lightgun
{"SLUS-20669", 90.25f, 93.5f, 420, 132, 640, 240}, // Resident Evil - Dead Aim (U)
{"SLUS-20619", 90.25f, 91.75f, 453, 154, 640, 256}, // Starsky & Hutch (U)
{"SCES-50300", 90.25f, 102.75f, 390, 138, 640, 256}, // Time Crisis II (E)
{"SLPS-20122", 90.25f, 97.5f, 390, 154, 640, 240}, // Time Crisis II (J)
{"SLPS-20113", 90.25f, 97.5f, 390, 154, 640, 240}, // Time Crisis II (with GunCon 2) (J)
{"SLUS-20219", 90.25f, 97.5f, 390, 154, 640, 240}, // Time Crisis 2 (U)
{"SCES-51844", 90.25f, 102.75f, 390, 138, 640, 256}, // Time Crisis 3 (E)
{"SLUS-20645", 90.25f, 97.5f, 390, 154, 640, 240}, // Time Crisis 3 (U)