Skip to content

Commit

Permalink
softgpu: Minor opt, ignore unused z_stride.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Oct 3, 2022
1 parent 58a4376 commit 0be891c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GPU/Software/FuncId.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void ComputePixelFuncID(PixelFuncID *id) {
// Dither happens even in clear mode.
id->dithering = gstate.isDitherEnabled();
id->fbFormat = gstate.FrameBufFormat();
id->useStandardStride = gstate.FrameBufStride() == 512 && gstate.DepthBufStride() == 512;
id->useStandardStride = gstate.FrameBufStride() == 512;
id->applyColorWriteMask = gstate.getColorMask() != 0;

id->clearMode = gstate.isModeClear();
Expand Down Expand Up @@ -187,6 +187,9 @@ void ComputePixelFuncID(PixelFuncID *id) {
}
}

if (id->useStandardStride && (id->depthTestFunc != GE_COMP_ALWAYS || id->depthWrite))
id->useStandardStride = gstate.DepthBufStride() == 512;

// Cache some values for later convenience.
if (id->dithering) {
for (int y = 0; y < 4; ++y) {
Expand Down

0 comments on commit 0be891c

Please sign in to comment.