![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qrhimetal_p.h>
Public Member Functions | |
| QMetalShadingRateMap (QRhiImplementation *rhi) | |
| ~QMetalShadingRateMap () | |
| void | destroy () override |
| Releases (or requests deferred releasing of) the underlying native graphics resources. | |
| bool | createFrom (NativeShadingRateMap src) override |
| Sets up the shading rate map to use a native 3D API shading rate object src. | |
| QSize | logicalSize () const override |
| Public Member Functions inherited from QRhiShadingRateMap | |
| QRhiResource::Type | resourceType () const override |
| 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. | |
| 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 |
Public Attributes | |
| QMetalShadingRateMapData * | d |
| uint | generation = 0 |
| int | lastActiveFrameSlot = -1 |
Friends | |
| class | QRhiMetal |
Additional Inherited Members | |
| Public Types inherited from QRhiResource | |
| enum | Type { Buffer , Texture , Sampler , RenderBuffer , RenderPassDescriptor , SwapChainRenderTarget , TextureRenderTarget , ShaderResourceBindings , GraphicsPipeline , SwapChain , ComputePipeline , CommandBuffer , ShadingRateMap , IndirectCommandBuffer } |
| Specifies type of the resource. More... | |
| Protected Member Functions inherited from QRhiShadingRateMap | |
| QRhiShadingRateMap (QRhiImplementation *rhi) | |
| \variable QRhiShadingRateMap::NativeShadingRateMap::object | |
| Protected Member Functions inherited from QRhiResource | |
| QRhiResource (QRhiImplementation *rhi) | |
| Protected Attributes inherited from QRhiResource | |
| QRhiImplementation * | m_rhi = nullptr |
| quint64 | m_id |
| QByteArray | m_objectName |
Definition at line 117 of file qrhimetal_p.h.
| QMetalShadingRateMap::QMetalShadingRateMap | ( | QRhiImplementation * | rhi | ) |
Definition at line 5817 of file qrhimetal.mm.
References QMetalShadingRateMap(), and d.
Referenced by QMetalShadingRateMap().
| QMetalShadingRateMap::~QMetalShadingRateMap | ( | ) |
|
overridevirtual |
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>. Qt passes the MTLRasterizationRateMap on to the MTLRenderPassDescriptor, and, because Metal then interprets viewports and scissor rectangles in the map's screen space coordinate system, sizes the default scissor and converts viewports and scissors specified via QRhiCommandBuffer accordingly. The size of that coordinate system is reported by logicalSize(). Anything else, such as scaling when sampling the rendered result, is up to the application (or the XR compositor). Reimplemented from QRhiShadingRateMap.
Definition at line 5848 of file qrhimetal.mm.
References d, destroy(), and lastActiveFrameSlot.
|
overridevirtual |
Releases (or requests deferred releasing of) the underlying native graphics resources.
Safe to call multiple times, subsequent invocations will be a no-op then.
Once destroy() is called, the QRhiResource instance can be reused, by calling create() again. That will then result in creating new native graphics resources underneath.
The QRhiResource destructor also performs the same task, so calling this function is not necessary before deleting a QRhiResource.
Implements QRhiResource.
Definition at line 5829 of file qrhimetal.mm.
References d, QRhiMetal::d, lastActiveFrameSlot, QRhiMetalData::DeferredReleaseEntry::lastActiveFrameSlot, QRhiMetalData::DeferredReleaseEntry::ShadingRateMap, and QRhiMetalData::DeferredReleaseEntry::type.
Referenced by ~QMetalShadingRateMap(), and createFrom().
|
overridevirtual |
Some implementations, Metal in particular, describe a shading rate map in terms of a logical (screen space) size that is mapped onto the physical pixels of the render target. When such a map is attached to a render target, viewports and scissor rectangles are interpreted in the logical coordinate system, and the logical size is typically larger than QRhiRenderTarget::pixelSize(). Applications that derive viewports, scissors, or projection setup from the render target size should use this size instead whenever it is valid.
For implementations where the shading rate map is a tile image covering the render target, such as Vulkan and Direct 3D 12, there is no separate logical coordinate space, and an invalid QSize is returned. The render target's pixel size applies as usual in that case.
Reimplemented from QRhiShadingRateMap.
Definition at line 5866 of file qrhimetal.mm.
References d.
|
friend |
Definition at line 128 of file qrhimetal_p.h.
| QMetalShadingRateMapData* QMetalShadingRateMap::d |
Definition at line 125 of file qrhimetal_p.h.
Referenced by QMetalShadingRateMap(), ~QMetalShadingRateMap(), createFrom(), destroy(), and logicalSize().
| uint QMetalShadingRateMap::generation = 0 |
Definition at line 126 of file qrhimetal_p.h.
| int QMetalShadingRateMap::lastActiveFrameSlot = -1 |
Definition at line 127 of file qrhimetal_p.h.
Referenced by createFrom(), and destroy().