Skip to content

Commit

Permalink
softgpu: Avoid unnecessary clearMode checks.
Browse files Browse the repository at this point in the history
Already baked into the flag.
  • Loading branch information
unknownbrackets committed Mar 20, 2022
1 parent de5c02a commit 7389a36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GPU/Software/Rasterizer.cpp
Expand Up @@ -1038,7 +1038,7 @@ void DrawPoint(const VertexData &v0, const BinCoords &range, const RasterizerSta
auto &pixelID = state.pixelID;
auto &samplerID = state.samplerID;

if (state.enableTextures && !pixelID.clearMode) {
if (state.enableTextures) {
float s = v0.texturecoords.s();
float t = v0.texturecoords.t();
if (state.throughMode) {
Expand All @@ -1064,7 +1064,7 @@ void DrawPoint(const VertexData &v0, const BinCoords &range, const RasterizerSta
u16 z = pos.z;

u8 fog = 255;
if (pixelID.applyFog && !pixelID.clearMode) {
if (pixelID.applyFog) {
fog = ClampFogDepth(v0.fogdepth);
}

Expand Down Expand Up @@ -1315,7 +1315,7 @@ void DrawLine(const VertexData &v0, const VertexData &v1, const BinCoords &range
}

u8 fog = 255;
if (pixelID.applyFog && !pixelID.clearMode) {
if (pixelID.applyFog) {
fog = ClampFogDepth((v0.fogdepth * (float)(steps - i) + v1.fogdepth * (float)i) / steps1);
}

Expand All @@ -1325,7 +1325,7 @@ void DrawLine(const VertexData &v0, const VertexData &v1, const BinCoords &range
prim_color.a() = 0x7F;
}

if (state.enableTextures && !pixelID.clearMode) {
if (state.enableTextures) {
float s, s1;
float t, t1;
if (state.throughMode) {
Expand Down

0 comments on commit 7389a36

Please sign in to comment.