Commit 2bdefbf8 by Jamie Madill Committed by Commit Bot

Vulkan: Remove some redundant "vk" prefixes.

Refactoring change only. Found when working on multithreading CLs. Bug: angleproject:2464 Change-Id: Ide91c7134b5f565e2f122a50cf92a4938189704a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1825444Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 39d142e8
...@@ -406,7 +406,7 @@ class LineLoopHelper final : angle::NonCopyable ...@@ -406,7 +406,7 @@ class LineLoopHelper final : angle::NonCopyable
angle::Result getIndexBufferForDrawArrays(ContextVk *contextVk, angle::Result getIndexBufferForDrawArrays(ContextVk *contextVk,
uint32_t clampedVertexCount, uint32_t clampedVertexCount,
GLint firstVertex, GLint firstVertex,
vk::BufferHelper **bufferOut, BufferHelper **bufferOut,
VkDeviceSize *offsetOut); VkDeviceSize *offsetOut);
angle::Result getIndexBufferForElementArrayBuffer(ContextVk *contextVk, angle::Result getIndexBufferForElementArrayBuffer(ContextVk *contextVk,
...@@ -414,7 +414,7 @@ class LineLoopHelper final : angle::NonCopyable ...@@ -414,7 +414,7 @@ class LineLoopHelper final : angle::NonCopyable
gl::DrawElementsType glIndexType, gl::DrawElementsType glIndexType,
int indexCount, int indexCount,
intptr_t elementArrayOffset, intptr_t elementArrayOffset,
vk::BufferHelper **bufferOut, BufferHelper **bufferOut,
VkDeviceSize *bufferOffsetOut, VkDeviceSize *bufferOffsetOut,
uint32_t *indexCountOut); uint32_t *indexCountOut);
...@@ -422,14 +422,14 @@ class LineLoopHelper final : angle::NonCopyable ...@@ -422,14 +422,14 @@ class LineLoopHelper final : angle::NonCopyable
gl::DrawElementsType glIndexType, gl::DrawElementsType glIndexType,
GLsizei indexCount, GLsizei indexCount,
const uint8_t *srcPtr, const uint8_t *srcPtr,
vk::BufferHelper **bufferOut, BufferHelper **bufferOut,
VkDeviceSize *bufferOffsetOut, VkDeviceSize *bufferOffsetOut,
uint32_t *indexCountOut); uint32_t *indexCountOut);
void release(ContextVk *contextVk); void release(ContextVk *contextVk);
void destroy(VkDevice device); void destroy(VkDevice device);
static void Draw(uint32_t count, vk::CommandBuffer *commandBuffer); static void Draw(uint32_t count, CommandBuffer *commandBuffer);
private: private:
DynamicBuffer mDynamicIndexBuffer; DynamicBuffer mDynamicIndexBuffer;
...@@ -644,7 +644,7 @@ class ImageHelper final : public CommandGraphResource ...@@ -644,7 +644,7 @@ class ImageHelper final : public CommandGraphResource
~ImageHelper() override; ~ImageHelper() override;
void initStagingBuffer(RendererVk *renderer, void initStagingBuffer(RendererVk *renderer,
const vk::Format &format, const Format &format,
VkBufferUsageFlags usageFlags, VkBufferUsageFlags usageFlags,
size_t initialSize); size_t initialSize);
...@@ -741,7 +741,7 @@ class ImageHelper final : public CommandGraphResource ...@@ -741,7 +741,7 @@ class ImageHelper final : public CommandGraphResource
uint32_t mipLevel, uint32_t mipLevel,
uint32_t baseArrayLayer, uint32_t baseArrayLayer,
uint32_t layerCount, uint32_t layerCount,
vk::CommandBuffer *commandBuffer); CommandBuffer *commandBuffer);
gl::Extents getSize(const gl::ImageIndex &index) const; gl::Extents getSize(const gl::ImageIndex &index) const;
...@@ -752,13 +752,13 @@ class ImageHelper final : public CommandGraphResource ...@@ -752,13 +752,13 @@ class ImageHelper final : public CommandGraphResource
const gl::Extents &copySize, const gl::Extents &copySize,
const VkImageSubresourceLayers &srcSubresources, const VkImageSubresourceLayers &srcSubresources,
const VkImageSubresourceLayers &dstSubresources, const VkImageSubresourceLayers &dstSubresources,
vk::CommandBuffer *commandBuffer); CommandBuffer *commandBuffer);
angle::Result generateMipmapsWithBlit(ContextVk *contextVk, GLuint maxLevel); angle::Result generateMipmapsWithBlit(ContextVk *contextVk, GLuint maxLevel);
// Resolve this image into a destination image. This image should be in the TransferSrc layout. // Resolve this image into a destination image. This image should be in the TransferSrc layout.
// The destination image is automatically transitioned into TransferDst. // The destination image is automatically transitioned into TransferDst.
void resolve(ImageHelper *dest, const VkImageResolve &region, vk::CommandBuffer *commandBuffer); void resolve(ImageHelper *dest, const VkImageResolve &region, CommandBuffer *commandBuffer);
// Data staging // Data staging
void removeStagedUpdates(ContextVk *contextVk, const gl::ImageIndex &index); void removeStagedUpdates(ContextVk *contextVk, const gl::ImageIndex &index);
...@@ -771,7 +771,7 @@ class ImageHelper final : public CommandGraphResource ...@@ -771,7 +771,7 @@ class ImageHelper final : public CommandGraphResource
const gl::PixelUnpackState &unpack, const gl::PixelUnpackState &unpack,
GLenum type, GLenum type,
const uint8_t *pixels, const uint8_t *pixels,
const vk::Format &vkFormat); const Format &vkFormat);
angle::Result stageSubresourceUpdateAndGetData(ContextVk *contextVk, angle::Result stageSubresourceUpdateAndGetData(ContextVk *contextVk,
size_t allocationSize, size_t allocationSize,
...@@ -788,7 +788,7 @@ class ImageHelper final : public CommandGraphResource ...@@ -788,7 +788,7 @@ class ImageHelper final : public CommandGraphResource
const gl::InternalFormat &formatInfo, const gl::InternalFormat &formatInfo,
FramebufferVk *framebufferVk); FramebufferVk *framebufferVk);
void stageSubresourceUpdateFromImage(vk::ImageHelper *image, void stageSubresourceUpdateFromImage(ImageHelper *image,
const gl::ImageIndex &index, const gl::ImageIndex &index,
const gl::Offset &destOffset, const gl::Offset &destOffset,
const gl::Extents &glExtents, const gl::Extents &glExtents,
...@@ -822,7 +822,7 @@ class ImageHelper final : public CommandGraphResource ...@@ -822,7 +822,7 @@ class ImageHelper final : public CommandGraphResource
uint32_t levelEnd, uint32_t levelEnd,
uint32_t layerStart, uint32_t layerStart,
uint32_t layerEnd, uint32_t layerEnd,
vk::CommandBuffer *commandBuffer); CommandBuffer *commandBuffer);
// Creates a command buffer and flushes all staged updates. This is used for one-time // Creates a command buffer and flushes all staged updates. This is used for one-time
// initialization of resources that we don't expect to accumulate further staged updates, such // initialization of resources that we don't expect to accumulate further staged updates, such
// as with renderbuffers or surface images. // as with renderbuffers or surface images.
...@@ -837,7 +837,7 @@ class ImageHelper final : public CommandGraphResource ...@@ -837,7 +837,7 @@ class ImageHelper final : public CommandGraphResource
void changeLayout(VkImageAspectFlags aspectMask, void changeLayout(VkImageAspectFlags aspectMask,
ImageLayout newLayout, ImageLayout newLayout,
vk::CommandBuffer *commandBuffer); CommandBuffer *commandBuffer);
bool isQueueChangeNeccesary(uint32_t newQueueFamilyIndex) const bool isQueueChangeNeccesary(uint32_t newQueueFamilyIndex) const
{ {
...@@ -847,13 +847,13 @@ class ImageHelper final : public CommandGraphResource ...@@ -847,13 +847,13 @@ class ImageHelper final : public CommandGraphResource
void changeLayoutAndQueue(VkImageAspectFlags aspectMask, void changeLayoutAndQueue(VkImageAspectFlags aspectMask,
ImageLayout newLayout, ImageLayout newLayout,
uint32_t newQueueFamilyIndex, uint32_t newQueueFamilyIndex,
vk::CommandBuffer *commandBuffer); CommandBuffer *commandBuffer);
private: private:
void forceChangeLayoutAndQueue(VkImageAspectFlags aspectMask, void forceChangeLayoutAndQueue(VkImageAspectFlags aspectMask,
ImageLayout newLayout, ImageLayout newLayout,
uint32_t newQueueFamilyIndex, uint32_t newQueueFamilyIndex,
vk::CommandBuffer *commandBuffer); CommandBuffer *commandBuffer);
void stageSubresourceClear(const gl::ImageIndex &index, void stageSubresourceClear(const gl::ImageIndex &index,
const angle::Format &format, const angle::Format &format,
...@@ -865,7 +865,7 @@ class ImageHelper final : public CommandGraphResource ...@@ -865,7 +865,7 @@ class ImageHelper final : public CommandGraphResource
uint32_t levelCount, uint32_t levelCount,
uint32_t baseArrayLayer, uint32_t baseArrayLayer,
uint32_t layerCount, uint32_t layerCount,
vk::CommandBuffer *commandBuffer); CommandBuffer *commandBuffer);
void clearDepthStencil(VkImageAspectFlags imageAspectFlags, void clearDepthStencil(VkImageAspectFlags imageAspectFlags,
VkImageAspectFlags clearAspectFlags, VkImageAspectFlags clearAspectFlags,
...@@ -874,13 +874,13 @@ class ImageHelper final : public CommandGraphResource ...@@ -874,13 +874,13 @@ class ImageHelper final : public CommandGraphResource
uint32_t levelCount, uint32_t levelCount,
uint32_t baseArrayLayer, uint32_t baseArrayLayer,
uint32_t layerCount, uint32_t layerCount,
vk::CommandBuffer *commandBuffer); CommandBuffer *commandBuffer);
struct SubresourceUpdate struct SubresourceUpdate
{ {
SubresourceUpdate(); SubresourceUpdate();
SubresourceUpdate(VkBuffer bufferHandle, const VkBufferImageCopy &copyRegion); SubresourceUpdate(VkBuffer bufferHandle, const VkBufferImageCopy &copyRegion);
SubresourceUpdate(vk::ImageHelper *image, const VkImageCopy &copyRegion); SubresourceUpdate(ImageHelper *image, const VkImageCopy &copyRegion);
SubresourceUpdate(const VkClearValue &clearValue, const gl::ImageIndex &imageIndex); SubresourceUpdate(const VkClearValue &clearValue, const gl::ImageIndex &imageIndex);
SubresourceUpdate(const SubresourceUpdate &other); SubresourceUpdate(const SubresourceUpdate &other);
...@@ -915,7 +915,7 @@ class ImageHelper final : public CommandGraphResource ...@@ -915,7 +915,7 @@ class ImageHelper final : public CommandGraphResource
}; };
struct ImageUpdate struct ImageUpdate
{ {
vk::ImageHelper *image; ImageHelper *image;
VkImageCopy copyRegion; VkImageCopy copyRegion;
}; };
...@@ -946,7 +946,7 @@ class ImageHelper final : public CommandGraphResource ...@@ -946,7 +946,7 @@ class ImageHelper final : public CommandGraphResource
uint32_t mLevelCount; uint32_t mLevelCount;
// Staging buffer // Staging buffer
vk::DynamicBuffer mStagingBuffer; DynamicBuffer mStagingBuffer;
std::vector<SubresourceUpdate> mSubresourceUpdates; std::vector<SubresourceUpdate> mSubresourceUpdates;
}; };
...@@ -1004,11 +1004,11 @@ class ShaderProgramHelper : angle::NonCopyable ...@@ -1004,11 +1004,11 @@ class ShaderProgramHelper : angle::NonCopyable
return mShaders[gl::ShaderType::Vertex].valid(); return mShaders[gl::ShaderType::Vertex].valid();
} }
vk::ShaderAndSerial &getShader(gl::ShaderType shaderType) { return mShaders[shaderType].get(); } ShaderAndSerial &getShader(gl::ShaderType shaderType) { return mShaders[shaderType].get(); }
void setShader(gl::ShaderType shaderType, RefCounted<ShaderAndSerial> *shader); void setShader(gl::ShaderType shaderType, RefCounted<ShaderAndSerial> *shader);
// For getting a vk::Pipeline and from the pipeline cache. // For getting a Pipeline and from the pipeline cache.
ANGLE_INLINE angle::Result getGraphicsPipeline( ANGLE_INLINE angle::Result getGraphicsPipeline(
ContextVk *contextVk, ContextVk *contextVk,
RenderPassCache *renderPassCache, RenderPassCache *renderPassCache,
...@@ -1018,11 +1018,11 @@ class ShaderProgramHelper : angle::NonCopyable ...@@ -1018,11 +1018,11 @@ class ShaderProgramHelper : angle::NonCopyable
const GraphicsPipelineDesc &pipelineDesc, const GraphicsPipelineDesc &pipelineDesc,
const gl::AttributesMask &activeAttribLocationsMask, const gl::AttributesMask &activeAttribLocationsMask,
const gl::ComponentTypeMask &programAttribsTypeMask, const gl::ComponentTypeMask &programAttribsTypeMask,
const vk::GraphicsPipelineDesc **descPtrOut, const GraphicsPipelineDesc **descPtrOut,
PipelineHelper **pipelineOut) PipelineHelper **pipelineOut)
{ {
// Pull in a compatible RenderPass. // Pull in a compatible RenderPass.
vk::RenderPass *compatibleRenderPass = nullptr; RenderPass *compatibleRenderPass = nullptr;
ANGLE_TRY(renderPassCache->getCompatibleRenderPass(contextVk, currentQueueSerial, ANGLE_TRY(renderPassCache->getCompatibleRenderPass(contextVk, currentQueueSerial,
pipelineDesc.getRenderPassDesc(), pipelineDesc.getRenderPassDesc(),
&compatibleRenderPass)); &compatibleRenderPass));
......
...@@ -295,19 +295,19 @@ class StagingBuffer final : angle::NonCopyable ...@@ -295,19 +295,19 @@ class StagingBuffer final : angle::NonCopyable
size_t mSize; size_t mSize;
}; };
angle::Result AllocateBufferMemory(vk::Context *context, angle::Result AllocateBufferMemory(Context *context,
VkMemoryPropertyFlags requestedMemoryPropertyFlags, VkMemoryPropertyFlags requestedMemoryPropertyFlags,
VkMemoryPropertyFlags *memoryPropertyFlagsOut, VkMemoryPropertyFlags *memoryPropertyFlagsOut,
const void *extraAllocationInfo, const void *extraAllocationInfo,
Buffer *buffer, Buffer *buffer,
DeviceMemory *deviceMemoryOut); DeviceMemory *deviceMemoryOut);
angle::Result AllocateImageMemory(vk::Context *context, angle::Result AllocateImageMemory(Context *context,
VkMemoryPropertyFlags memoryPropertyFlags, VkMemoryPropertyFlags memoryPropertyFlags,
const void *extraAllocationInfo, const void *extraAllocationInfo,
Image *image, Image *image,
DeviceMemory *deviceMemoryOut); DeviceMemory *deviceMemoryOut);
angle::Result AllocateImageMemoryWithRequirements(vk::Context *context, angle::Result AllocateImageMemoryWithRequirements(Context *context,
VkMemoryPropertyFlags memoryPropertyFlags, VkMemoryPropertyFlags memoryPropertyFlags,
const VkMemoryRequirements &memoryRequirements, const VkMemoryRequirements &memoryRequirements,
const void *extraAllocationInfo, const void *extraAllocationInfo,
...@@ -566,7 +566,7 @@ bool SamplerNameContainsNonZeroArrayElement(const std::string &name); ...@@ -566,7 +566,7 @@ bool SamplerNameContainsNonZeroArrayElement(const std::string &name);
std::string GetMappedSamplerName(const std::string &originalName); std::string GetMappedSamplerName(const std::string &originalName);
// A vector of image views, such as one per level or one per layer. // A vector of image views, such as one per level or one per layer.
using ImageViewVector = std::vector<vk::ImageView>; using ImageViewVector = std::vector<ImageView>;
// A vector of vector of image views. Primary index is layer, secondary index is level. // A vector of vector of image views. Primary index is layer, secondary index is level.
using LayerLevelImageViewVector = std::vector<ImageViewVector>; using LayerLevelImageViewVector = std::vector<ImageViewVector>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment