mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-07 17:50:59 +08:00
Qt 6.8.1
This commit is contained in:
@ -3312,6 +3312,10 @@ bool QD3D11Texture::prepareCreate(QSize *adjustedSize)
|
||||
if (tex || tex3D || tex1D)
|
||||
destroy();
|
||||
|
||||
QRHI_RES_RHI(QRhiD3D11);
|
||||
if (!rhiD->isTextureFormatSupported(m_format, m_flags))
|
||||
return false;
|
||||
|
||||
const bool isDepth = isDepthTextureFormat(m_format);
|
||||
const bool isCube = m_flags.testFlag(CubeMap);
|
||||
const bool is3D = m_flags.testFlag(ThreeDimensional);
|
||||
@ -3322,7 +3326,6 @@ bool QD3D11Texture::prepareCreate(QSize *adjustedSize)
|
||||
const QSize size = is1D ? QSize(qMax(1, m_pixelSize.width()), 1)
|
||||
: (m_pixelSize.isEmpty() ? QSize(1, 1) : m_pixelSize);
|
||||
|
||||
QRHI_RES_RHI(QRhiD3D11);
|
||||
dxgiFormat = toD3DTextureFormat(m_format, m_flags);
|
||||
mipLevelCount = uint(hasMipMaps ? rhiD->q->mipLevelsForSize(size) : 1);
|
||||
sampleDesc = rhiD->effectiveSampleDesc(m_sampleCount);
|
||||
|
Reference in New Issue
Block a user