Skip to content

Commit

Permalink
Don't crash on missing readback formats.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jan 28, 2018
1 parent bd3a681 commit 6c109ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion ext/native/thin3d/DataFormatGL.cpp
Expand Up @@ -81,7 +81,6 @@ bool Thin3DFormatToFormatAndType(DataFormat fmt, GLuint &internalFormat, GLuint
#endif

default:
_assert_msg_(G3D, false, "Thin3d GL: Unsupported texture format %d", (int)fmt);
return false;
}
return true;
Expand Down
3 changes: 2 additions & 1 deletion ext/native/thin3d/GLQueueRunner.cpp
Expand Up @@ -984,7 +984,8 @@ void GLQueueRunner::PerformReadback(const GLRStep &pass) {
GLuint type;
int alignment;
if (!Draw::Thin3DFormatToFormatAndType(pass.readback.dstFormat, internalFormat, format, type, alignment)) {
assert(false);
ELOG("Readback failed - format %d not available", (int)pass.readback.dstFormat);
return;
}
int pixelStride = pass.readback.srcRect.w;
// Apply the correct alignment.
Expand Down

0 comments on commit 6c109ab

Please sign in to comment.