![]() |
Qt 6.x
The Qt SDK
|
#include <qrhimetal_p.h>
Inheritance diagram for QMetalShaderResourceBindings:
Collaboration diagram for QMetalShaderResourceBindings:Classes | |
| struct | BoundResourceData |
| struct | BoundSampledTextureData |
| struct | BoundStorageBufferData |
| struct | BoundStorageImageData |
| struct | BoundUniformBufferData |
Public Member Functions | |
| QMetalShaderResourceBindings (QRhiImplementation *rhi) | |
| ~QMetalShaderResourceBindings () | |
| void | destroy () override |
| Releases (or requests deferred releasing of) the underlying native graphics resources. | |
| bool | create () override |
| void | updateResources (UpdateFlags flags) override |
Public Member Functions inherited from QRhiShaderResourceBindings | |
| QRhiResource::Type | resourceType () const override |
| void | setBindings (std::initializer_list< QRhiShaderResourceBinding > list) |
| Sets the list of bindings. | |
| template<typename InputIterator > | |
| void | setBindings (InputIterator first, InputIterator last) |
| Sets the list of bindings from the iterators first and last. | |
| const QRhiShaderResourceBinding * | cbeginBindings () const |
| const QRhiShaderResourceBinding * | cendBindings () const |
| const QRhiShaderResourceBinding * | bindingAt (qsizetype index) const |
| qsizetype | bindingCount () const |
| bool | isLayoutCompatible (const QRhiShaderResourceBindings *other) const |
| QVector< quint32 > | serializedLayoutDescription () const |
| virtual bool | create ()=0 |
| virtual void | updateResources (UpdateFlags flags={})=0 |
Public Member Functions inherited from QRhiResource | |
| virtual | ~QRhiResource () |
| Destructor. | |
| virtual Type | resourceType () const =0 |
| 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 |
Public Attributes | |
| QVarLengthArray< QRhiShaderResourceBinding, 8 > | sortedBindings |
| int | maxBinding = -1 |
| QVarLengthArray< BoundResourceData, 8 > | boundResourceData |
| uint | generation = 0 |
Friends | |
| class | QRhiMetal |
Definition at line 162 of file qrhimetal_p.h.
| QMetalShaderResourceBindings::QMetalShaderResourceBindings | ( | QRhiImplementation * | rhi | ) |
Definition at line 4257 of file qrhimetal.mm.
| QMetalShaderResourceBindings::~QMetalShaderResourceBindings | ( | ) |
Definition at line 4262 of file qrhimetal.mm.
References destroy().
Here is the call graph for this function:
|
overridevirtual |
Implements QRhiShaderResourceBindings.
Definition at line 4277 of file qrhimetal.mm.
References QVarLengthArray< T, Prealloc >::begin(), QRhiShaderResourceBinding::Data::binding, boundResourceData, QVarLengthArray< T, Prealloc >::cbegin(), QVarLengthArray< T, Prealloc >::cend(), QVarLengthArray< T, Prealloc >::count(), destroy(), QVarLengthArray< T, Prealloc >::end(), generation, QVarLengthArray< T, Prealloc >::isEmpty(), QVarLengthArray< T, Prealloc >::last(), QRhiShaderResourceBindings::m_bindings, maxBinding, QRHI_RES_RHI, QRhiImplementation::shaderResourceBindingData(), QRhiImplementation::sortedBindingLessThan(), and sortedBindings.
Here is the call graph for this function:
|
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 4267 of file qrhimetal.mm.
References QVarLengthArray< T, Prealloc >::clear(), maxBinding, QRHI_RES_RHI, and sortedBindings.
Referenced by ~QMetalShaderResourceBindings(), and create().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Implements QRhiShaderResourceBindings.
Definition at line 4305 of file qrhimetal.mm.
References QVarLengthArray< T, Prealloc >::begin(), QRhiShaderResourceBindings::BindingsAreSorted, boundResourceData, QVarLengthArray< T, Prealloc >::cbegin(), QVarLengthArray< T, Prealloc >::cend(), QVarLengthArray< T, Prealloc >::clear(), QVarLengthArray< T, Prealloc >::end(), generation, QRhiShaderResourceBindings::m_bindings, QRhiImplementation::sortedBindingLessThan(), and sortedBindings.
Here is the call graph for this function:
|
friend |
Definition at line 205 of file qrhimetal_p.h.
| QVarLengthArray<BoundResourceData, 8> QMetalShaderResourceBindings::boundResourceData |
Definition at line 202 of file qrhimetal_p.h.
Referenced by create(), QRhiMetal::setShaderResources(), and updateResources().
| uint QMetalShaderResourceBindings::generation = 0 |
Definition at line 204 of file qrhimetal_p.h.
Referenced by create(), QRhiMetal::setShaderResources(), and updateResources().
| int QMetalShaderResourceBindings::maxBinding = -1 |
Definition at line 171 of file qrhimetal_p.h.
Referenced by create(), destroy(), and QRhiMetal::setVertexInput().
| QVarLengthArray<QRhiShaderResourceBinding, 8> QMetalShaderResourceBindings::sortedBindings |
Definition at line 170 of file qrhimetal_p.h.
Referenced by create(), destroy(), QRhiMetal::enqueueShaderResourceBindings(), QRhiMetal::setShaderResources(), and updateResources().