mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Enable depth raster in all backends, not just Vulkan
This commit is contained in:
@@ -335,6 +335,9 @@ void DrawEngineD3D11::Flush() {
|
||||
context_->Draw(vertexCount, 0);
|
||||
}
|
||||
}
|
||||
if (useDepthRaster_) {
|
||||
DepthRasterTransform(prim, dec_, dec_->VertexType(), vertexCount);
|
||||
}
|
||||
} else {
|
||||
PROFILE_THIS_SCOPE("soft");
|
||||
VertexDecoder *swDec = dec_;
|
||||
@@ -388,6 +391,13 @@ void DrawEngineD3D11::Flush() {
|
||||
UpdateCachedViewportState(vpAndScissor);
|
||||
}
|
||||
|
||||
// At this point, rect and line primitives are still preserved as such. So, it's the best time to do software depth raster.
|
||||
// We could piggyback on the viewport transform below, but it gets complicated since it's different per-backend. Which we really
|
||||
// should clean up one day...
|
||||
if (useDepthRaster_) {
|
||||
DepthRasterPredecoded(prim, decoded_, numDecodedVerts_, swDec, vertexCount);
|
||||
}
|
||||
|
||||
SoftwareTransform swTransform(params);
|
||||
|
||||
const Lin::Vec3 trans(gstate_c.vpXOffset, -gstate_c.vpYOffset, gstate_c.vpZOffset * 0.5f + 0.5f);
|
||||
|
||||
@@ -292,6 +292,9 @@ void DrawEngineDX9::Flush() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (useDepthRaster_) {
|
||||
DepthRasterTransform(prim, dec_, dec_->VertexType(), vertexCount);
|
||||
}
|
||||
} else {
|
||||
VertexDecoder *swDec = dec_;
|
||||
if (swDec->nweights != 0) {
|
||||
@@ -344,6 +347,13 @@ void DrawEngineDX9::Flush() {
|
||||
UpdateCachedViewportState(vpAndScissor);
|
||||
}
|
||||
|
||||
// At this point, rect and line primitives are still preserved as such. So, it's the best time to do software depth raster.
|
||||
// We could piggyback on the viewport transform below, but it gets complicated since it's different per-backend. Which we really
|
||||
// should clean up one day...
|
||||
if (useDepthRaster_) {
|
||||
DepthRasterPredecoded(prim, decoded_, numDecodedVerts_, swDec, vertexCount);
|
||||
}
|
||||
|
||||
int maxIndex = numDecodedVerts_;
|
||||
SoftwareTransform swTransform(params);
|
||||
|
||||
|
||||
@@ -315,6 +315,9 @@ void DrawEngineGLES::Flush() {
|
||||
inputLayout, vertexBuffer, vertexBufferOffset,
|
||||
glprim[prim], 0, vertexCount);
|
||||
}
|
||||
if (useDepthRaster_) {
|
||||
DepthRasterTransform(prim, dec_, dec_->VertexType(), vertexCount);
|
||||
}
|
||||
} else {
|
||||
PROFILE_THIS_SCOPE("soft");
|
||||
VertexDecoder *swDec = dec_;
|
||||
@@ -371,6 +374,13 @@ void DrawEngineGLES::Flush() {
|
||||
}
|
||||
}
|
||||
|
||||
// At this point, rect and line primitives are still preserved as such. So, it's the best time to do software depth raster.
|
||||
// We could piggyback on the viewport transform below, but it gets complicated since it's different per-backend. Which we really
|
||||
// should clean up one day...
|
||||
if (useDepthRaster_) {
|
||||
DepthRasterPredecoded(prim, decoded_, numDecodedVerts_, swDec, vertexCount);
|
||||
}
|
||||
|
||||
SoftwareTransform swTransform(params);
|
||||
|
||||
const Lin::Vec3 trans(gstate_c.vpXOffset, gstate_c.vpYOffset, gstate_c.vpZOffset);
|
||||
|
||||
Reference in New Issue
Block a user