summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi/texuploads/texuploads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/rhi/texuploads/texuploads.cpp')
-rw-r--r--tests/manual/rhi/texuploads/texuploads.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/manual/rhi/texuploads/texuploads.cpp b/tests/manual/rhi/texuploads/texuploads.cpp
index 4c10a6b965..a6b7d87d3e 100644
--- a/tests/manual/rhi/texuploads/texuploads.cpp
+++ b/tests/manual/rhi/texuploads/texuploads.cpp
@@ -237,11 +237,11 @@ void Window::customRender()
// Exercise texture object export/import.
if (d.testStage == 6) {
- const QRhiNativeHandles *h = d.tex->nativeHandles();
- if (h) {
-#ifdef Q_OS_DARWIN
+ const QRhiTexture::NativeTexture nativeTexture = d.tex->nativeTexture();
+ if (nativeTexture.object) {
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
if (graphicsApi == Metal) {
- qDebug() << "Metal texture: " << static_cast<const QRhiMetalTextureNativeHandles *>(h)->texture;
+ qDebug() << "Metal texture: " << *(void**)nativeTexture.object;
// Now could cast to id<MTLTexture> and do something with
// it, keeping in mind that copy operations are only done
// in beginPass, while rendering into a texture may only
@@ -253,7 +253,7 @@ void Window::customRender()
d.importedTex = m_r->newTexture(QRhiTexture::RGBA8, d.tex->pixelSize());
d.releasePool << d.importedTex;
- if (!d.importedTex->buildFrom(h))
+ if (!d.importedTex->buildFrom(nativeTexture))
qWarning("Texture import failed");
// now d.tex and d.importedTex use the same MTLTexture