rhi: D3D-related doc cleanups
Change-Id: I46f1b10c49841719bf54e52b58ee565b963ca21c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit b2bfd757f7c537753b95140c3fe89bd2b60a1cb8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
45e2533ebf
commit
5feaf7ffaa
@ -71,19 +71,20 @@ Q_LOGGING_CATEGORY(QRHI_LOG_INFO, "qt.rhi.general")
|
|||||||
builds on QOpenGLContext, QOpenGLFunctions, and the related cross-platform
|
builds on QOpenGLContext, QOpenGLFunctions, and the related cross-platform
|
||||||
infrastructure of the Qt GUI module.
|
infrastructure of the Qt GUI module.
|
||||||
|
|
||||||
\li Direct3D 11.1 or newer, with Shader Model 5.0 or newer . When the D3D
|
\li Direct3D 11.1 or newer, with Shader Model 5.0 or newer. When the D3D
|
||||||
runtime has no support for 11.1 features or Shader Model 5.0,
|
runtime has no support for 11.1 features or Shader Model 5.0,
|
||||||
initialization using an accelerated graphics device will fail, but using
|
initialization using an accelerated graphics device will fail, but using
|
||||||
the
|
the
|
||||||
\l{https://learn.microsoft.com/en-us/windows/win32/direct3darticles/directx-warp}{software
|
\l{https://learn.microsoft.com/en-us/windows/win32/direct3darticles/directx-warp}{software
|
||||||
adapter} is still an option.
|
adapter} is still an option.
|
||||||
|
|
||||||
\li Direct3D 12.0 or newer. The D3D12 device is by default created with
|
\li Direct3D 12.0 or newer, with Shader Model 5.0 or newer. The D3D12
|
||||||
specifying a minimum feature level of \c{D3D_FEATURE_LEVEL_11_0}.
|
device is by default created with specifying a minimum feature level of
|
||||||
|
\c{D3D_FEATURE_LEVEL_11_0}.
|
||||||
|
|
||||||
\li Metal 1.2 or newer.
|
\li Metal 1.2 or newer.
|
||||||
|
|
||||||
\li Vulkan 1.0 or newer , optionally utilizing some Vulkan 1.1 level
|
\li Vulkan 1.0 or newer, optionally utilizing some Vulkan 1.1 level
|
||||||
features.
|
features.
|
||||||
|
|
||||||
\li Null, a "dummy" backend that issues no graphics calls at all.
|
\li Null, a "dummy" backend that issues no graphics calls at all.
|
||||||
@ -650,7 +651,7 @@ Q_LOGGING_CATEGORY(QRHI_LOG_INFO, "qt.rhi.general")
|
|||||||
mechanism because the cost of maintaining the related data structures is
|
mechanism because the cost of maintaining the related data structures is
|
||||||
not insignificant with some backends. With Vulkan this feature maps
|
not insignificant with some backends. With Vulkan this feature maps
|
||||||
directly to VkPipelineCache, vkGetPipelineCacheData and
|
directly to VkPipelineCache, vkGetPipelineCacheData and
|
||||||
VkPipelineCacheCreateInfo::pInitialData. With D3D11 there is no real
|
VkPipelineCacheCreateInfo::pInitialData. With Direct3D 11 there is no real
|
||||||
pipline cache, but the results of HLSL->DXBC compilations are stored and
|
pipline cache, but the results of HLSL->DXBC compilations are stored and
|
||||||
can be serialized/deserialized via this mechanism. This allows skipping the
|
can be serialized/deserialized via this mechanism. This allows skipping the
|
||||||
time consuming D3DCompile() in future runs of the applications for shaders
|
time consuming D3DCompile() in future runs of the applications for shaders
|
||||||
@ -771,7 +772,7 @@ Q_LOGGING_CATEGORY(QRHI_LOG_INFO, "qt.rhi.general")
|
|||||||
\value WideLines Indicates that lines with a width other than 1 are
|
\value WideLines Indicates that lines with a width other than 1 are
|
||||||
supported. When reported as not supported, the line width set on the
|
supported. When reported as not supported, the line width set on the
|
||||||
graphics pipeline state is ignored. This can always be false with some
|
graphics pipeline state is ignored. This can always be false with some
|
||||||
backends (D3D11, Metal). With Vulkan, the value depends on the
|
backends (D3D11, D3D12, Metal). With Vulkan, the value depends on the
|
||||||
implementation. With OpenGL, wide lines are not supported in core profile
|
implementation. With OpenGL, wide lines are not supported in core profile
|
||||||
contexts.
|
contexts.
|
||||||
|
|
||||||
@ -932,7 +933,7 @@ Q_LOGGING_CATEGORY(QRHI_LOG_INFO, "qt.rhi.general")
|
|||||||
with image load/store. This feature is only available with some backends as
|
with image load/store. This feature is only available with some backends as
|
||||||
it does not map well to all graphics APIs, and it is only meant to provide
|
it does not map well to all graphics APIs, and it is only meant to provide
|
||||||
support for special cases anyhow. In practice the feature can be expected to
|
support for special cases anyhow. In practice the feature can be expected to
|
||||||
be supported with Direct3D 11 and Vulkan.
|
be supported with Direct3D 11/12 and Vulkan.
|
||||||
|
|
||||||
\value NonFillPolygonMode Indicates that setting a PolygonMode other than
|
\value NonFillPolygonMode Indicates that setting a PolygonMode other than
|
||||||
the default Fill is supported for QRhiGraphicsPipeline. A common use case
|
the default Fill is supported for QRhiGraphicsPipeline. A common use case
|
||||||
@ -953,8 +954,8 @@ Q_LOGGING_CATEGORY(QRHI_LOG_INFO, "qt.rhi.general")
|
|||||||
When not supported, build() will succeed but just show a warning message
|
When not supported, build() will succeed but just show a warning message
|
||||||
and the values of the target attributes will be broken. In practice this
|
and the values of the target attributes will be broken. In practice this
|
||||||
feature will be unsupported in some OpenGL ES 2.0 and OpenGL 2.x
|
feature will be unsupported in some OpenGL ES 2.0 and OpenGL 2.x
|
||||||
implementations. Note that while D3D does support half precision input
|
implementations. Note that while Direct3D 11/12 does support half precision
|
||||||
attributes, it does not support the half3 type. The D3D backends pass
|
input attributes, it does not support the half3 type. The D3D backends pass
|
||||||
half3 attributes as half4. To ensure cross platform compatibility, half3
|
half3 attributes as half4. To ensure cross platform compatibility, half3
|
||||||
inputs should be padded to 8 bytes.
|
inputs should be padded to 8 bytes.
|
||||||
|
|
||||||
@ -1636,10 +1637,10 @@ QDebug operator<<(QDebug dbg, const QRhiVertexInputBinding &b)
|
|||||||
\value Half Half precision (16 bit) float
|
\value Half Half precision (16 bit) float
|
||||||
|
|
||||||
\note Support for half precision floating point attributes is indicated at
|
\note Support for half precision floating point attributes is indicated at
|
||||||
run time by the QRhi::Feature::HalfAttributes feature flag. Note that D3D
|
run time by the QRhi::Feature::HalfAttributes feature flag. Note that
|
||||||
supports half input attributes, but does not support the Half3 type. The
|
Direct3D 11/12 supports half input attributes, but does not support the
|
||||||
D3D backends pass through Half3 as Half4. To ensure cross platform
|
Half3 type. The D3D backends pass through Half3 as Half4. To ensure cross
|
||||||
compatibility, Half3 inputs should be padded to 8 bytes.
|
platform compatibility, Half3 inputs should be padded to 8 bytes.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -3541,10 +3542,13 @@ QRhi *QRhiResource::rhi() const
|
|||||||
objects array are pointers to a GLuint. With Vulkan, the native handle is a
|
objects array are pointers to a GLuint. With Vulkan, the native handle is a
|
||||||
VkBuffer, so the elements of the array are pointers to a VkBuffer. With
|
VkBuffer, so the elements of the array are pointers to a VkBuffer. With
|
||||||
Direct3D 11 and Metal the elements are pointers to a ID3D11Buffer or
|
Direct3D 11 and Metal the elements are pointers to a ID3D11Buffer or
|
||||||
MTLBuffer pointer, respectively.
|
MTLBuffer pointer, respectively. With Direct3D 12, the elements are
|
||||||
|
pointers to a ID3D12Resource.
|
||||||
|
|
||||||
\note Pay attention to the fact that the elements are always pointers to
|
\note Pay attention to the fact that the elements are always pointers to
|
||||||
the native buffer handle type, even if the native type itself is a pointer.
|
the native buffer handle type, even if the native type itself is a pointer.
|
||||||
|
(so the elements are \c{VkBuffer *} on Vulkan, even though VkBuffer itself
|
||||||
|
is a pointer on 64-bit architectures).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -4140,9 +4144,10 @@ bool QRhiRenderBuffer::createFrom(NativeRenderBuffer src)
|
|||||||
\brief 64-bit integer containing the native object handle.
|
\brief 64-bit integer containing the native object handle.
|
||||||
|
|
||||||
With OpenGL, the native handle is a GLuint value, so \c object can then be
|
With OpenGL, the native handle is a GLuint value, so \c object can then be
|
||||||
cast to a GLuint. With Vulkan, the native handle is a VkImage, so \c
|
cast to a GLuint. With Vulkan, the native handle is a VkImage, so \c object
|
||||||
object can be cast to a VkImage. With Direct3D 11 and Metal \c
|
can be cast to a VkImage. With Direct3D 11 and Metal \c object contains a
|
||||||
object contains a ID3D11Texture2D or MTLTexture pointer, respectively.
|
ID3D11Texture2D or MTLTexture pointer, respectively. With Direct3D 12
|
||||||
|
\c object contains a ID3D12Resource pointer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -9301,9 +9306,9 @@ const QRhiNativeHandles *QRhiCommandBuffer::nativeHandles()
|
|||||||
called when the pass recording was started with specifying
|
called when the pass recording was started with specifying
|
||||||
QRhiCommandBuffer::ExternalContent.
|
QRhiCommandBuffer::ExternalContent.
|
||||||
|
|
||||||
With Vulkan or Metal one can query the native command buffer or encoder
|
With Vulkan, Metal, or Direct3D 12 one can query the native command buffer
|
||||||
objects via nativeHandles() and enqueue commands to them. With OpenGL or
|
or encoder objects via nativeHandles() and enqueue commands to them. With
|
||||||
Direct3D 11 the (device) context can be retrieved from
|
OpenGL or Direct3D 11 the (device) context can be retrieved from
|
||||||
QRhi::nativeHandles(). However, this must never be done without ensuring
|
QRhi::nativeHandles(). However, this must never be done without ensuring
|
||||||
the QRhiCommandBuffer's state stays up-to-date. Hence the requirement for
|
the QRhiCommandBuffer's state stays up-to-date. Hence the requirement for
|
||||||
wrapping any externally added command recording between beginExternal() and
|
wrapping any externally added command recording between beginExternal() and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user