diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2024-02-22 16:46:29 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2024-02-23 17:26:25 +0100 |
commit | ce54e07dacd99ae9d532b6398cdeedc287ee2743 (patch) | |
tree | 565cae3bde7d3ef981cefdc362c78b6e2ad9764d /src/gui/rhi/qrhigles2.cpp | |
parent | 51106995cbf51af0c92b34119f6d254568a67540 (diff) |
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.7 6.6
Change-Id: I95a97debfebc7582f2026282384f6fb97aadfe23
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhigles2.cpp')
-rw-r--r-- | src/gui/rhi/qrhigles2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index d42e72301b..29b6e60386 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -5728,7 +5728,7 @@ bool QGles2TextureRenderTarget::create() } if (attIndex == 0) { d.pixelSize = rhiD->q->sizeForMipLevel(colorAtt.level(), texD->pixelSize()); - d.sampleCount = 1; + d.sampleCount = texD->sampleCount(); } } else if (renderBuffer) { QGles2RenderBuffer *rbD = QRHI_RES(QGles2RenderBuffer, renderBuffer); @@ -5780,7 +5780,7 @@ bool QGles2TextureRenderTarget::create() } if (d.colorAttCount == 0) { d.pixelSize = depthTexD->pixelSize(); - d.sampleCount = 1; + d.sampleCount = depthTexD->sampleCount(); } } d.dsAttCount = 1; |