mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Don't refer directly to g_Config.iMultiSampleLevel, it can contain unsupported modes.
This commit is contained in:
1 parent
41e5b1e95a
commit
11366a2ded
11 files changed
+55
-23
No files matched your search
+15
-1
@@ -428,6 +428,8 @@ GPUCommon::GPUCommon(GraphicsContext *gfxCtx, Draw::DrawContext *draw) :
|
||||
ResetMatrices();
|
||||
|
||||
PPGeSetDrawContext(draw);
|
||||
|
||||
UpdateMSAALevel(draw);
|
||||
}
|
||||
|
||||
GPUCommon::~GPUCommon() {
|
||||
@@ -484,6 +486,8 @@ void GPUCommon::BeginHostFrame() {
|
||||
gstate_c.Dirty(DIRTY_ALL);
|
||||
|
||||
UpdateCmdInfo();
|
||||
|
||||
UpdateMSAALevel(draw_);
|
||||
CheckConfigChanged();
|
||||
CheckDisplayResized();
|
||||
CheckRenderResized();
|
||||
@@ -659,7 +663,7 @@ void GPUCommon::CheckDisplayResized() {
|
||||
|
||||
void GPUCommon::CheckRenderResized() {
|
||||
if (renderResized_) {
|
||||
framebufferManager_->NotifyRenderResized();
|
||||
framebufferManager_->NotifyRenderResized(msaaLevel_);
|
||||
renderResized_ = false;
|
||||
}
|
||||
}
|
||||
@@ -3575,3 +3579,13 @@ u32 GPUCommon::CheckGPUFeaturesLate(u32 features) const {
|
||||
|
||||
return features;
|
||||
}
|
||||
|
||||
void GPUCommon::UpdateMSAALevel(Draw::DrawContext *draw) {
|
||||
int level = g_Config.iMultiSampleLevel;
|
||||
if (draw->GetDeviceCaps().multiSampleLevelsMask & (1 << level)) {
|
||||
msaaLevel_ = level;
|
||||
} else {
|
||||
// Didn't support the configured level, so revert to 0.
|
||||
msaaLevel_ = 0;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user