Merge pull request #13314 from unknownbrackets/warnings

GPU: Fix some case warnings
This commit is contained in:
Henrik Rydgård 2020-08-20 09:03:57 +02:00 committed by GitHub
commit e8779fdc88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 2 deletions

View file

@ -754,6 +754,7 @@ Draw::Texture *FramebufferManagerCommon::MakePixelTexture(const u8 *srcPixels, G
break;
case GE_FORMAT_INVALID:
case GE_FORMAT_DEPTH16:
_dbg_assert_msg_(false, "Invalid pixelFormat passed to DrawPixels().");
break;
}

View file

@ -226,6 +226,7 @@ StencilValueType ReplaceAlphaWithStencilType() {
case GE_FORMAT_4444:
case GE_FORMAT_8888:
case GE_FORMAT_INVALID:
case GE_FORMAT_DEPTH16:
switch (gstate.getStencilOpZPass()) {
case GE_STENCILOP_REPLACE:
// TODO: Could detect zero here and force ZERO - less uniform updates?

View file

@ -109,7 +109,9 @@ bool FramebufferManagerGLES::NotifyStencilUpload(u32 addr, int size, StencilUplo
values = 256;
break;
case GE_FORMAT_INVALID:
// Impossible.
case GE_FORMAT_DEPTH16:
// Inconceivable.
_assert_(false);
break;
}

View file

@ -268,6 +268,7 @@ static inline u32 GetPixelColor(int x, int y)
return fb.Get32(x, y, gstate.FrameBufStride());
case GE_FORMAT_INVALID:
case GE_FORMAT_DEPTH16:
_dbg_assert_msg_(false, "Software: invalid framebuf format.");
}
return 0;
@ -293,6 +294,7 @@ static inline void SetPixelColor(int x, int y, u32 value)
break;
case GE_FORMAT_INVALID:
case GE_FORMAT_DEPTH16:
_dbg_assert_msg_(false, "Software: invalid framebuf format.");
}
}
@ -1498,6 +1500,7 @@ void ClearRectangle(const VertexData &v0, const VertexData &v1)
break;
case GE_FORMAT_INVALID:
case GE_FORMAT_DEPTH16:
_dbg_assert_msg_(false, "Software: invalid framebuf format.");
break;
}

View file

@ -140,7 +140,9 @@ bool FramebufferManagerVulkan::NotifyStencilUpload(u32 addr, int size, StencilUp
values = 256;
break;
case GE_FORMAT_INVALID:
// Impossible.
case GE_FORMAT_DEPTH16:
// Inconceivable.
_assert_(false);
break;
}