![]() |
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>
Classes | |
struct | BoundResourceData |
struct | BoundSampledTextureData |
struct | BoundStorageBufferData |
struct | BoundStorageImageData |
struct | BoundUniformBufferData |
Public Member Functions | |
QVkShaderResourceBindings (QRhiImplementation *rhi) | |
~QVkShaderResourceBindings () | |
void | destroy () override |
Releases (or requests deferred releasing of) the underlying native graphics resources. | |
bool | create () override |
Creates the corresponding resource binding set. | |
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 |
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 | |
QVarLengthArray< QRhiShaderResourceBinding, 8 > | sortedBindings |
bool | hasDynamicOffset = false |
int | poolIndex = -1 |
VkDescriptorSetLayout | layout = VK_NULL_HANDLE |
VkDescriptorSet | descSets [QVK_FRAMES_IN_FLIGHT] |
int | lastActiveFrameSlot = -1 |
uint | generation = 0 |
QVarLengthArray< BoundResourceData, 8 > | boundResourceData [QVK_FRAMES_IN_FLIGHT] |
Friends | |
class | QRhiVulkan |
Definition at line 246 of file qrhivulkan_p.h.
QVkShaderResourceBindings::QVkShaderResourceBindings | ( | QRhiImplementation * | rhi | ) |
Definition at line 8071 of file qrhivulkan.cpp.
References QVkShaderResourceBindings().
Referenced by QVkShaderResourceBindings().
QVkShaderResourceBindings::~QVkShaderResourceBindings | ( | ) |
Definition at line 8076 of file qrhivulkan.cpp.
References destroy().
|
overridevirtual |
Creates the corresponding resource binding set.
Depending on the underlying graphics API, this may involve creating native graphics resources, and therefore it should not be assumed that this is a cheap operation.
If create() has been called before with no corresponding destroy(), then destroy() is called implicitly first.
true
when successful, false
when failed. Regardless of the return value, calling destroy() is always safe. Implements QRhiShaderResourceBindings.
Definition at line 8107 of file qrhivulkan.cpp.
References destroy(), hasDynamicOffset, lastActiveFrameSlot, and QVK_FRAMES_IN_FLIGHT.
|
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 8081 of file qrhivulkan.cpp.
References QRhiVulkan::DeferredReleaseEntry::lastActiveFrameSlot, lastActiveFrameSlot, poolIndex, QRhiVulkan::DeferredReleaseEntry::ShaderResourceBindings, and QRhiVulkan::DeferredReleaseEntry::type.
Referenced by ~QVkShaderResourceBindings(), and create().
|
overridevirtual |
Implements QRhiShaderResourceBindings.
Definition at line 8181 of file qrhivulkan.cpp.
References QVK_FRAMES_IN_FLIGHT.
|
friend |
Definition at line 296 of file qrhivulkan_p.h.
QVarLengthArray<BoundResourceData, 8> QVkShaderResourceBindings::boundResourceData[QVK_FRAMES_IN_FLIGHT] |
Definition at line 294 of file qrhivulkan_p.h.
VkDescriptorSet QVkShaderResourceBindings::descSets[QVK_FRAMES_IN_FLIGHT] |
Definition at line 258 of file qrhivulkan_p.h.
uint QVkShaderResourceBindings::generation = 0 |
Definition at line 260 of file qrhivulkan_p.h.
bool QVkShaderResourceBindings::hasDynamicOffset = false |
Definition at line 255 of file qrhivulkan_p.h.
Referenced by create(), and QRhiVulkan::setShaderResources().
int QVkShaderResourceBindings::lastActiveFrameSlot = -1 |
Definition at line 259 of file qrhivulkan_p.h.
VkDescriptorSetLayout QVkShaderResourceBindings::layout = VK_NULL_HANDLE |
Definition at line 257 of file qrhivulkan_p.h.
int QVkShaderResourceBindings::poolIndex = -1 |
Definition at line 256 of file qrhivulkan_p.h.
Referenced by destroy().
QVarLengthArray<QRhiShaderResourceBinding, 8> QVkShaderResourceBindings::sortedBindings |
Definition at line 254 of file qrhivulkan_p.h.