diff options
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/rhi/cubemap/cubemap.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/manual/rhi/cubemap/cubemap.cpp b/tests/manual/rhi/cubemap/cubemap.cpp index 6004c39ea9..7949d2ecfc 100644 --- a/tests/manual/rhi/cubemap/cubemap.cpp +++ b/tests/manual/rhi/cubemap/cubemap.cpp @@ -73,7 +73,8 @@ void Window::customInit() d.releasePool << d.ubuf; const QSize cubeMapSize(512, 512); - d.tex = m_r->newTexture(QRhiTexture::RGBA8, cubeMapSize, 1, QRhiTexture::CubeMap); + d.tex = m_r->newTexture(QRhiTexture::RGBA8, cubeMapSize, 1, QRhiTexture::CubeMap + | QRhiTexture::MipMapped | QRhiTexture::UsedWithGenerateMips); // exercise mipmap generation as well d.releasePool << d.tex; d.tex->create(); @@ -93,6 +94,8 @@ void Window::customInit() }); d.initialUpdates->uploadTexture(d.tex, desc); + d.initialUpdates->generateMips(d.tex); + d.sampler = m_r->newSampler(QRhiSampler::Linear, QRhiSampler::Linear, QRhiSampler::None, QRhiSampler::Repeat, QRhiSampler::Repeat); d.releasePool << d.sampler; |