summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhivulkan_p_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-05-27 17:44:49 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-05-28 17:53:32 +0200
commit56977990e04efa051b1ebd4ce9274d6b69c7bd0c (patch)
treeeaa66635b67faaf94df7b0670fa9e0971268a936 /src/gui/rhi/qrhivulkan_p_p.h
parentc991d87ee2c239fedb77f76f25936dddf5eb5982 (diff)
rhi: Harmonize create-destroy API pattern with the rest of Qt
For historical reasons we use build and release instead of create and destroy. This becomes confusing now that more modules in Qt start taking QRhi into use. Migrate to the more familiar naming, so those who have used QWindow or QOpenGLContext before will find it natural. Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhivulkan_p_p.h')
-rw-r--r--src/gui/rhi/qrhivulkan_p_p.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/gui/rhi/qrhivulkan_p_p.h b/src/gui/rhi/qrhivulkan_p_p.h
index 1b2e4d0ebb..84caa1a627 100644
--- a/src/gui/rhi/qrhivulkan_p_p.h
+++ b/src/gui/rhi/qrhivulkan_p_p.h
@@ -74,8 +74,8 @@ struct QVkBuffer : public QRhiBuffer
{
QVkBuffer(QRhiImplementation *rhi, Type type, UsageFlags usage, int size);
~QVkBuffer();
- void release() override;
- bool build() override;
+ void destroy() override;
+ bool create() override;
QRhiBuffer::NativeBuffer nativeBuffer() override;
VkBuffer buffers[QVK_FRAMES_IN_FLIGHT];
@@ -101,8 +101,8 @@ struct QVkRenderBuffer : public QRhiRenderBuffer
int sampleCount, Flags flags,
QRhiTexture::Format backingFormatHint);
~QVkRenderBuffer();
- void release() override;
- bool build() override;
+ void destroy() override;
+ bool create() override;
QRhiTexture::Format backingFormat() const override;
VkDeviceMemory memory = VK_NULL_HANDLE;
@@ -120,14 +120,14 @@ struct QVkTexture : public QRhiTexture
QVkTexture(QRhiImplementation *rhi, Format format, const QSize &pixelSize,
int sampleCount, Flags flags);
~QVkTexture();
- void release() override;
- bool build() override;
- bool buildFrom(NativeTexture src) override;
+ void destroy() override;
+ bool create() override;
+ bool createFrom(NativeTexture src) override;
NativeTexture nativeTexture() override;
void setNativeLayout(int layout) override;
- bool prepareBuild(QSize *adjustedSize = nullptr);
- bool finishBuild();
+ bool prepareCreate(QSize *adjustedSize = nullptr);
+ bool finishCreate();
VkImageView imageViewForLevel(int level);
VkImage image = VK_NULL_HANDLE;
@@ -159,8 +159,8 @@ struct QVkSampler : public QRhiSampler
QVkSampler(QRhiImplementation *rhi, Filter magFilter, Filter minFilter, Filter mipmapMode,
AddressMode u, AddressMode v, AddressMode w);
~QVkSampler();
- void release() override;
- bool build() override;
+ void destroy() override;
+ bool create() override;
VkSampler sampler = VK_NULL_HANDLE;
int lastActiveFrameSlot = -1;
@@ -172,7 +172,7 @@ struct QVkRenderPassDescriptor : public QRhiRenderPassDescriptor
{
QVkRenderPassDescriptor(QRhiImplementation *rhi);
~QVkRenderPassDescriptor();
- void release() override;
+ void destroy() override;
bool isCompatible(const QRhiRenderPassDescriptor *other) const override;
const QRhiNativeHandles *nativeHandles() override;
@@ -204,7 +204,7 @@ struct QVkReferenceRenderTarget : public QRhiRenderTarget
{
QVkReferenceRenderTarget(QRhiImplementation *rhi);
~QVkReferenceRenderTarget();
- void release() override;
+ void destroy() override;
QSize pixelSize() const override;
float devicePixelRatio() const override;
@@ -217,14 +217,14 @@ struct QVkTextureRenderTarget : public QRhiTextureRenderTarget
{
QVkTextureRenderTarget(QRhiImplementation *rhi, const QRhiTextureRenderTargetDescription &desc, Flags flags);
~QVkTextureRenderTarget();
- void release() override;
+ void destroy() override;
QSize pixelSize() const override;
float devicePixelRatio() const override;
int sampleCount() const override;
QRhiRenderPassDescriptor *newCompatibleRenderPassDescriptor() override;
- bool build() override;
+ bool create() override;
QVkRenderTargetData d;
VkImageView rtv[QVkRenderTargetData::MAX_COLOR_ATTACHMENTS];
@@ -237,8 +237,8 @@ struct QVkShaderResourceBindings : public QRhiShaderResourceBindings
{
QVkShaderResourceBindings(QRhiImplementation *rhi);
~QVkShaderResourceBindings();
- void release() override;
- bool build() override;
+ void destroy() override;
+ bool create() override;
QVarLengthArray<QRhiShaderResourceBinding, 8> sortedBindings;
int poolIndex = -1;
@@ -290,8 +290,8 @@ struct QVkGraphicsPipeline : public QRhiGraphicsPipeline
{
QVkGraphicsPipeline(QRhiImplementation *rhi);
~QVkGraphicsPipeline();
- void release() override;
- bool build() override;
+ void destroy() override;
+ bool create() override;
VkPipelineLayout layout = VK_NULL_HANDLE;
VkPipeline pipeline = VK_NULL_HANDLE;
@@ -304,8 +304,8 @@ struct QVkComputePipeline : public QRhiComputePipeline
{
QVkComputePipeline(QRhiImplementation *rhi);
~QVkComputePipeline();
- void release() override;
- bool build() override;
+ void destroy() override;
+ bool create() override;
VkPipelineLayout layout = VK_NULL_HANDLE;
VkPipeline pipeline = VK_NULL_HANDLE;
@@ -318,7 +318,7 @@ struct QVkCommandBuffer : public QRhiCommandBuffer
{
QVkCommandBuffer(QRhiImplementation *rhi);
~QVkCommandBuffer();
- void release() override;
+ void destroy() override;
const QRhiNativeHandles *nativeHandles();
@@ -576,7 +576,7 @@ struct QVkSwapChain : public QRhiSwapChain
{
QVkSwapChain(QRhiImplementation *rhi);
~QVkSwapChain();
- void release() override;
+ void destroy() override;
QRhiCommandBuffer *currentFrameCommandBuffer() override;
QRhiRenderTarget *currentFrameRenderTarget() override;
@@ -584,7 +584,7 @@ struct QVkSwapChain : public QRhiSwapChain
QSize surfacePixelSize() override;
QRhiRenderPassDescriptor *newCompatibleRenderPassDescriptor() override;
- bool buildOrResize() override;
+ bool createOrResize() override;
bool ensureSurface();