Not pretty, but with this, you can switch MSAA level at runtime.

This commit is contained in:
Henrik Rydgård 2022-12-01 23:41:31 +01:00
parent 28e1b532bd
commit 8a3e92aa38
12 changed files with 40 additions and 15 deletions

View file

@ -2878,11 +2878,7 @@ static void DoRelease(T *&obj) {
obj = nullptr;
}
void FramebufferManagerCommon::DeviceLost() {
DestroyAllFBOs();
presentation_->DeviceLost();
void FramebufferManagerCommon::ReleasePipelines() {
for (int i = 0; i < ARRAY_SIZE(reinterpretFromTo_); i++) {
for (int j = 0; j < ARRAY_SIZE(reinterpretFromTo_); j++) {
DoRelease(reinterpretFromTo_[i][j]);
@ -2899,9 +2895,16 @@ void FramebufferManagerCommon::DeviceLost() {
DoRelease(draw2DPipelineDepth_);
DoRelease(draw2DPipeline565ToDepth_);
DoRelease(draw2DPipeline565ToDepthDeswizzle_);
}
void FramebufferManagerCommon::DeviceLost() {
DestroyAllFBOs();
presentation_->DeviceLost();
draw2D_.DeviceLost();
ReleasePipelines();
draw_ = nullptr;
}