diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-04-20 13:00:39 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-04-23 10:19:53 +0200 |
commit | 3ef7a760ff5ae61e4297ec2f271408ac453ca93d (patch) | |
tree | d6512e969023ff87c62e8e4baa16f2f9787735f7 /src/gui/rhi/qrhid3d11.cpp | |
parent | 4545eadd3e28be4b04537cc71a8697da4421d918 (diff) |
rhi: Take mip size into account for render target size
Also extend autotesting, both for rendering into a given mip level
and for rendering into a given cubemap face.
Change-Id: Ida94b71150477ceb50a3b5616d8b7be13174558b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhid3d11.cpp')
-rw-r--r-- | src/gui/rhi/qrhid3d11.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp index 0665304a19..c3c40b4cc4 100644 --- a/src/gui/rhi/qrhid3d11.cpp +++ b/src/gui/rhi/qrhid3d11.cpp @@ -470,6 +470,8 @@ bool QRhiD3D11::isFeatureSupported(QRhi::Feature feature) const return true; case QRhi::TexelFetch: return true; + case QRhi::RenderToNonBaseMipLevel: + return true; default: Q_UNREACHABLE(); return false; @@ -3243,7 +3245,7 @@ bool QD3D11TextureRenderTarget::build() } ownsRtv[attIndex] = true; if (attIndex == 0) { - d.pixelSize = texD->pixelSize(); + d.pixelSize = rhiD->q->sizeForMipLevel(colorAtt.level(), texD->pixelSize()); d.sampleCount = int(texD->sampleDesc.Count); } } else if (rb) { |