![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qrhivulkan_p.h>
Public Member Functions | |
| QVkShadingRateMap (QRhiImplementation *rhi) | |
| ~QVkShadingRateMap () | |
| void | destroy () override |
| Releases (or requests deferred releasing of) the underlying native graphics resources. | |
| bool | createFrom (QRhiTexture *src) override |
| 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 QRhiShadingRateMap | |
| 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. | |
| 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 | |
| QVkTexture * | texture = nullptr |
Friends | |
| class | QRhiVulkan |
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 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 152 of file qrhivulkan_p.h.
| QVkShadingRateMap::QVkShadingRateMap | ( | QRhiImplementation * | rhi | ) |
Definition at line 7697 of file qrhivulkan.cpp.
References QVkShadingRateMap().
Referenced by QVkShadingRateMap().
| QVkShadingRateMap::~QVkShadingRateMap | ( | ) |
Definition at line 7702 of file qrhivulkan.cpp.
References destroy().
|
overridevirtual |
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 from QRhiShadingRateMap.
Definition at line 7715 of file qrhivulkan.cpp.
References destroy(), and texture.
|
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 7707 of file qrhivulkan.cpp.
References texture.
Referenced by ~QVkShadingRateMap(), and createFrom().
|
friend |
Definition at line 160 of file qrhivulkan_p.h.
| QVkTexture* QVkShadingRateMap::texture = nullptr |
Definition at line 159 of file qrhivulkan_p.h.
Referenced by QRhiVulkan::activateTextureRenderTarget(), QRhiVulkan::beginPass(), createFrom(), destroy(), and QRhiVulkan::recreateSwapChain().