diff options
author | Qt CI Bot <qt_ci_bot@qt-project.org> | 2021-03-30 17:19:59 +0000 |
---|---|---|
committer | Qt CI Bot <qt_ci_bot@qt-project.org> | 2021-03-30 17:19:59 +0000 |
commit | ae0fe7d4daa051f4f1e6540005d81c64f6c191a4 (patch) | |
tree | 1445e2f3f0bf922012db77ad4146e2be32b56801 /src/gui/rhi/qrhid3d11.cpp | |
parent | 18b9b5c560a806d12ece2cfc69fbbb1e0bf9bd7f (diff) | |
parent | 7ccd2d02463f8076631bc45e5bf1386c61037dc7 (diff) |
Merge integration refs/builds/qtci/dev/1617116580
Diffstat (limited to 'src/gui/rhi/qrhid3d11.cpp')
-rw-r--r-- | src/gui/rhi/qrhid3d11.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/rhi/qrhid3d11.cpp b/src/gui/rhi/qrhid3d11.cpp index 3e0ba0820b..addb058d4d 100644 --- a/src/gui/rhi/qrhid3d11.cpp +++ b/src/gui/rhi/qrhid3d11.cpp @@ -542,6 +542,8 @@ bool QRhiD3D11::isFeatureSupported(QRhi::Feature feature) const return true; case QRhi::PipelineCacheDataLoadSave: return false; + case QRhi::ImageDataStride: + return true; default: Q_UNREACHABLE(); return false; @@ -1401,7 +1403,10 @@ void QRhiD3D11::enqueueSubresUpload(QD3D11Texture *texD, QD3D11CommandBuffer *cb const QSize size = subresDesc.sourceSize().isEmpty() ? q->sizeForMipLevel(level, texD->m_pixelSize) : subresDesc.sourceSize(); quint32 bpl = 0; - textureFormatInfo(texD->m_format, size, &bpl, nullptr); + if (subresDesc.dataStride()) + bpl = subresDesc.dataStride(); + else + textureFormatInfo(texD->m_format, size, &bpl, nullptr, nullptr); box.left = UINT(dp.x()); box.top = UINT(dp.y()); box.right = UINT(dp.x() + size.width()); @@ -1577,7 +1582,7 @@ void QRhiD3D11::enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdate } quint32 byteSize = 0; quint32 bpl = 0; - textureFormatInfo(format, pixelSize, &bpl, &byteSize); + textureFormatInfo(format, pixelSize, &bpl, &byteSize, nullptr); D3D11_TEXTURE2D_DESC desc; memset(&desc, 0, sizeof(desc)); |