Don't crash on missing readback formats.

This commit is contained in:
Henrik Rydgård committed 2018-01-28 18:00:48 +01:00
1 parent bd3a681fd3
commit 6c109abd9e
2 files changed
+2 -2

No files matched your search

+2 -1
View File
@@ -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.