Use raster copies to work around lack of working copy support in MSAA mode.

This commit is contained in:
Henrik Rydgård 2022-11-28 23:30:35 +01:00
parent 8208768c15
commit b9ea8de135
2 changed files with 4 additions and 3 deletions

View File

@ -437,10 +437,11 @@ public:
int Width() { return width_; }
int Height() { return height_; }
int Layers() { return layers_; }
int MultiSampleLevel() { return multiSampleLevel_; }
virtual void UpdateTag(const char *tag) {}
protected:
int width_ = -1, height_ = -1, layers_ = 1;
int width_ = -1, height_ = -1, layers_ = 1, multiSampleLevel_ = 0;
};
class Buffer : public RefCountedObject {

View File

@ -3002,9 +3002,9 @@ void FramebufferManagerCommon::BlitFramebuffer(VirtualFramebuffer *dst, int dstX
bool useBlit = channel == RASTER_COLOR ? draw_->GetDeviceCaps().framebufferBlitSupported : false;
bool useCopy = channel == RASTER_COLOR ? draw_->GetDeviceCaps().framebufferCopySupported : false;
if (dst == currentRenderVfb_) {
if (dst == currentRenderVfb_ || dst->fbo->MultiSampleLevel() != 0 || src->fbo->MultiSampleLevel() != 0) {
// If already bound, using either a blit or a copy is unlikely to be an optimization.
// So we're gonna use a raster draw instead.
// So we're gonna use a raster draw instead. Also multisampling has problems with copies currently.
useBlit = false;
useCopy = false;
}