mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 01:33:45 +01:00
Unify the bounding depth checks, correct them if minmax clip is needed
This commit is contained in:
1 parent
0eede05f5f
commit
e75d9f8a5f
9 files changed
+53
-50
No files matched your search
@@ -254,18 +254,7 @@ void DrawEngineGLES::Flush() {
|
||||
GEPrimitiveType prim = prevPrim_;
|
||||
|
||||
bool useHWTransform = CanUseHardwareTransform(prim);
|
||||
|
||||
if (useHWTransform && boundingDepths_.valid) {
|
||||
if (boundingDepths_.hitClipSpaceZW) {
|
||||
// Revert to software transform so we can clip more accurately.
|
||||
useHWTransform = false;
|
||||
}
|
||||
if ((boundingDepths_.minProjZ < 0.0 || boundingDepths_.maxProjZ > 65535.0) && !gstate_c.Use(GPU_USE_DEPTH_CLAMP)) {
|
||||
// Revert to software transform so we can clamp more accurately.
|
||||
useHWTransform = false;
|
||||
}
|
||||
// Also handle clamping in software if it's not supported in hardware (or always?)
|
||||
}
|
||||
useHWTransform = CheckBoundingDepths(useHWTransform);
|
||||
|
||||
if (useHWTransform != lastUseHwTransform_) {
|
||||
gstate_c.Dirty(DIRTY_VERTEXSHADER_STATE | DIRTY_RASTER_STATE);
|
||||
|
||||
Reference in new issue
Block a user