Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h More...
#include <qrhi.h>
Classes | |
struct | NativeShadingRateMap |
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h More... | |
Public Member Functions | |
QRhiResource::Type | resourceType () const override |
virtual bool | createFrom (NativeShadingRateMap src) |
Sets up the shading rate map to use a native 3D API shading rate object src. | |
virtual bool | createFrom (QRhiTexture *src) |
Sets up the shading rate map to use the texture src as the image containing the per-tile shading rates. | |
Public Member Functions inherited from QRhiResource | |
virtual | ~QRhiResource () |
Destructor. | |
virtual void | destroy ()=0 |
Releases (or requests deferred releasing of) the underlying native graphics resources. | |
void | deleteLater () |
When called without a frame being recorded, this function is equivalent to deleting the object. | |
QByteArray | name () const |
void | setName (const QByteArray &name) |
Sets a name for the object. | |
quint64 | globalResourceId () const |
QRhi * | rhi () const |
Protected Member Functions | |
QRhiShadingRateMap (QRhiImplementation *rhi) | |
\variable QRhiShadingRateMap::NativeShadingRateMap::object | |
Protected Member Functions inherited from QRhiResource | |
QRhiResource (QRhiImplementation *rhi) | |
Additional Inherited Members | |
Public Types inherited from QRhiResource | |
enum | Type { Buffer , Texture , Sampler , RenderBuffer , RenderPassDescriptor , SwapChainRenderTarget , TextureRenderTarget , ShaderResourceBindings , GraphicsPipeline , SwapChain , ComputePipeline , CommandBuffer , ShadingRateMap } |
Specifies type of the resource. More... | |
Protected Attributes inherited from QRhiResource | |
QRhiImplementation * | m_rhi = nullptr |
quint64 | m_id |
QByteArray | m_objectName |
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
An object that wraps a texture or another kind of native 3D API object.
For an introduction to Variable Rate Shading (VRS), see \l{https://learn.microsoft.com/en-us/windows/win32/direct3d12/vrs}. Qt supports a subset of the VRS features offered by Direct 3D 12 and Vulkan. In addition, Metal's somewhat different mechanism is supported by making it possible to set up a QRhiShadingRateMap with an existing MTLRasterizationRateMap object.
|
protected |
\variable QRhiShadingRateMap::NativeShadingRateMap::object
64-bit integer containing the native object handle.
Used with QRhiShadingRateMap::createFrom(). For example, with Metal, object
is expected to be an id<MTLRasterizationRateMap>.
|
virtual |
Sets up the shading rate map to use a native 3D API shading rate object src.
true
when successful, false
when not supported.object
field of src is expected to contain an id<MTLRasterizationRateMap>. Note that Qt does not perform anything else apart from passing the MTLRasterizationRateMap on to the MTLRenderPassDescriptor. If any special scaling is required, it is up to the application (or the XR compositor) to perform that. Reimplemented in QMetalShadingRateMap.
|
virtual |
Sets up the shading rate map to use the texture src as the image containing the per-tile shading rates.
true
when successful, false
when not supported.The QRhiShadingRateMap does not take ownership of src.
{ceil(render_target_pixel_width / (float)tile_width)} and a height of
{ceil(render_target_pixel_height / (float)tile_height)}. It is up to the application to ensure the size of the texture is as expected, using the above formula, at all times. The tile size can be queried via \l QRhi::resourceLimit() and QRhi::ShadingRateImageTileSize.Each byte (texel) in the texture corresponds to the shading rate value for one tile. 0 indicates 1x1, while a value of 10 indicates 4x4. See \l{https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_shading_rate}{D3D12_SHADING_RATE} for other possible values.
Reimplemented in QVkShadingRateMap.
|
overridevirtual |