diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index 240bdd3793..e03da34cda 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -422,7 +422,7 @@ static u32 sceSasSetVolume(u32 core, int voiceNum, int leftVol, int rightVol, in bool overVolume = abs(leftVol) > PSP_SAS_VOL_MAX || abs(rightVol) > PSP_SAS_VOL_MAX; overVolume = overVolume || abs(effectLeftVol) > PSP_SAS_VOL_MAX || abs(effectRightVol) > PSP_SAS_VOL_MAX; if (overVolume) { - return hleLogError(Log::sceSas, SCE_SAS_ERROR_INVALID_VOLUME); + return hleLogWarning(Log::sceSas, SCE_SAS_ERROR_INVALID_VOLUME, "invalid volume"); } __SasDrain(); diff --git a/GPU/Common/DrawEngineCommon.cpp b/GPU/Common/DrawEngineCommon.cpp index 92341dda81..6c174ec266 100644 --- a/GPU/Common/DrawEngineCommon.cpp +++ b/GPU/Common/DrawEngineCommon.cpp @@ -598,6 +598,8 @@ int DrawEngineCommon::ComputeNumVertsToDecode() const { return sum; } + + // Takes a list of consecutive PRIM opcodes, and extends the current draw call to include them. // This is just a performance optimization. NOTE: This isn't compatible with really accurate culling, // unless we refactor things a bit. diff --git a/GPU/Common/DrawEngineCommon.h b/GPU/Common/DrawEngineCommon.h index 8d2cd34199..cd00baffc7 100644 --- a/GPU/Common/DrawEngineCommon.h +++ b/GPU/Common/DrawEngineCommon.h @@ -370,6 +370,7 @@ protected: // Depth tracking ClipInfoFlags clipInfoFlags_{}; + ClipInfoFlags lastClipInfoFlags_{}; // Flags at the last flush. For dirtying. // Queue int depthVertexCount_ = 0; diff --git a/GPU/D3D11/DrawEngineD3D11.cpp b/GPU/D3D11/DrawEngineD3D11.cpp index 9d10071333..f58c034214 100644 --- a/GPU/D3D11/DrawEngineD3D11.cpp +++ b/GPU/D3D11/DrawEngineD3D11.cpp @@ -299,6 +299,13 @@ void DrawEngineD3D11::Flush() { useHWTransform = false; } } + if (clipInfoFlags_ != lastClipInfoFlags_) { + ClipInfoFlags changed = (ClipInfoFlags)((u32)clipInfoFlags_ ^ (u32)lastClipInfoFlags_); + if (changed & (ClipInfoFlags::DepthClampFragment | ClipInfoFlags::MinMaxZDiscard)) { + gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE | DIRTY_FRAGMENTSHADER_STATE | DIRTY_RASTER_STATE); + } + lastClipInfoFlags_ = clipInfoFlags_; + } if (useHWTransform != lastUseHwTransform_) { gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE | DIRTY_FRAGMENTSHADER_STATE | DIRTY_RASTER_STATE); diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index c2d9fa035a..603205c9cc 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -259,6 +259,13 @@ void DrawEngineGLES::Flush() { useHWTransform = false; } } + if (clipInfoFlags_ != lastClipInfoFlags_) { + ClipInfoFlags changed = (ClipInfoFlags)((u32)clipInfoFlags_ ^ (u32)lastClipInfoFlags_); + if (changed & (ClipInfoFlags::DepthClampFragment | ClipInfoFlags::MinMaxZDiscard)) { + gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE | DIRTY_FRAGMENTSHADER_STATE | DIRTY_RASTER_STATE); + } + lastClipInfoFlags_ = clipInfoFlags_; + } if (useHWTransform != lastUseHwTransform_) { gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE | DIRTY_FRAGMENTSHADER_STATE | DIRTY_RASTER_STATE); diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index fb31a0576d..ce357d9080 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -246,6 +246,13 @@ void DrawEngineVulkan::Flush() { useHWTransform = false; } } + if (clipInfoFlags_ != lastClipInfoFlags_) { + ClipInfoFlags changed = (ClipInfoFlags)((u32)clipInfoFlags_ ^ (u32)lastClipInfoFlags_); + if (changed & (ClipInfoFlags::DepthClampFragment | ClipInfoFlags::MinMaxZDiscard)) { + gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE | DIRTY_FRAGMENTSHADER_STATE | DIRTY_RASTER_STATE); + } + lastClipInfoFlags_ = clipInfoFlags_; + } // Is this still needed? if (useHWTransform != lastUseHwTransform_) {