Crash reports from 5% rollout of 1.5: Make some asserts dbg_asserts for now, try to fix an issue with framebuffers when postproc is enabled.

This commit is contained in:
Henrik Rydgård 2017-11-29 18:53:52 +01:00
parent e9303fd1cd
commit 6ea669368c
6 changed files with 12 additions and 6 deletions

View File

@ -635,7 +635,7 @@ size_t hleFormatLogArgs(char *message, size_t sz, const char *argmask) {
// TODO: Double? Does it ever happen?
default:
_assert_msg_(HLE, false, "Invalid argmask character: %c", argmask[i]);
_dbg_assert_msg_(HLE, false, "Invalid argmask character: %c", argmask[i]);
APPEND_FMT(" -- invalid arg format: %c -- %08x", argmask[i], regval);
break;
}
@ -673,7 +673,7 @@ void hleDoLogInternal(LogTypes::LOG_TYPE t, LogTypes::LOG_LEVELS level, u64 res,
// TODO: For now, floats are just shown as bits.
fmt = "%s%08x=%s(%s)%s";
} else {
_assert_msg_(HLE, false, "Invalid return format: %c", retmask);
_dbg_assert_msg_(HLE, false, "Invalid return format: %c", retmask);
fmt = "%s%08llx=%s(%s)%s";
}

View File

@ -136,6 +136,8 @@ FramebufferManagerCommon::~FramebufferManagerCommon() {
DestroyFramebuf(vfb);
}
bvfbs_.clear();
SetNumExtraFBOs(0);
}
void FramebufferManagerCommon::Init() {
@ -207,7 +209,8 @@ void FramebufferManagerCommon::SetNumExtraFBOs(int num) {
extraFBOs_.push_back(fbo);
}
currentRenderVfb_ = 0;
draw_->BindFramebufferAsRenderTarget(nullptr, { Draw::RPAction::KEEP, Draw::RPAction::KEEP });
if (num != 0)
draw_->BindFramebufferAsRenderTarget(nullptr, { Draw::RPAction::KEEP, Draw::RPAction::KEEP });
}
// Heuristics to figure out the size of FBO to create.

View File

@ -250,7 +250,6 @@ FramebufferManagerGLES::~FramebufferManagerGLES() {
if (stencilUploadProgram_) {
glsl_destroy(stencilUploadProgram_);
}
SetNumExtraFBOs(0);
for (auto it = tempFBOs_.begin(), end = tempFBOs_.end(); it != end; ++it) {
it->second.fbo->Release();

View File

@ -613,12 +613,14 @@ static void UIThemeInit() {
void RenderOverlays(UIContext *dc, void *userdata);
void NativeInitGraphics(GraphicsContext *graphicsContext) {
bool NativeInitGraphics(GraphicsContext *graphicsContext) {
ILOG("NativeInitGraphics");
_assert_msg_(G3D, graphicsContext, "No graphics context!");
using namespace Draw;
Core_SetGraphicsContext(graphicsContext);
g_draw = graphicsContext->GetDrawContext();
_assert_msg_(G3D, g_draw, "No draw context available!");
ui_draw2d.SetAtlas(&ui_atlas);
ui_draw2d_front.SetAtlas(&ui_atlas);
@ -694,6 +696,7 @@ void NativeInitGraphics(GraphicsContext *graphicsContext) {
g_graphicsInited = true;
ILOG("NativeInitGraphics completed");
return true;
}
void NativeShutdownGraphics() {

View File

@ -1139,6 +1139,7 @@ retry:
}
delete graphicsContext;
graphicsContext = nullptr;
return false;
}

View File

@ -49,7 +49,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch
// Runs after NativeInit() at some point. May (and probably should) call OpenGL.
// Should not initialize anything screen-size-dependent - do that in NativeResized.
void NativeInitGraphics(GraphicsContext *graphicsContext);
bool NativeInitGraphics(GraphicsContext *graphicsContext);
// Signals that you need to forget all buffered OpenGL resources,
// like textures, vbo etc.