mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Fix dirtying caused by clip flag state. This could probably be a bit smarter.
This commit is contained in:
+1
-1
@@ -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();
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -370,6 +370,7 @@ protected:
|
||||
|
||||
// Depth tracking
|
||||
ClipInfoFlags clipInfoFlags_{};
|
||||
ClipInfoFlags lastClipInfoFlags_{}; // Flags at the last flush. For dirtying.
|
||||
|
||||
// Queue
|
||||
int depthVertexCount_ = 0;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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_) {
|
||||
|
||||
Reference in New Issue
Block a user