rhi: gl: take sample count from textures too for RTs
Rendering into a multisample texture (color or depth-stencil) is supported, but the code only seems to pick up the sample count from renderbuffers. Pick-to: 6.6 Change-Id: I95a97debfebc7582f2026282384f6fb97aadfe23 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit ce54e07dacd99ae9d532b6398cdeedc287ee2743) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
8dd7aba7fd
commit
f9557be6f6
@ -5720,7 +5720,7 @@ bool QGles2TextureRenderTarget::create()
|
|||||||
}
|
}
|
||||||
if (attIndex == 0) {
|
if (attIndex == 0) {
|
||||||
d.pixelSize = rhiD->q->sizeForMipLevel(colorAtt.level(), texD->pixelSize());
|
d.pixelSize = rhiD->q->sizeForMipLevel(colorAtt.level(), texD->pixelSize());
|
||||||
d.sampleCount = 1;
|
d.sampleCount = texD->sampleCount();
|
||||||
}
|
}
|
||||||
} else if (renderBuffer) {
|
} else if (renderBuffer) {
|
||||||
QGles2RenderBuffer *rbD = QRHI_RES(QGles2RenderBuffer, renderBuffer);
|
QGles2RenderBuffer *rbD = QRHI_RES(QGles2RenderBuffer, renderBuffer);
|
||||||
@ -5772,7 +5772,7 @@ bool QGles2TextureRenderTarget::create()
|
|||||||
}
|
}
|
||||||
if (d.colorAttCount == 0) {
|
if (d.colorAttCount == 0) {
|
||||||
d.pixelSize = depthTexD->pixelSize();
|
d.pixelSize = depthTexD->pixelSize();
|
||||||
d.sampleCount = 1;
|
d.sampleCount = depthTexD->sampleCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
d.dsAttCount = 1;
|
d.dsAttCount = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user