Commit a5da17cd by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Remove vk:: inside namespace vk

Bug: angleproject:5404 Change-Id: I51df1ad69a65b17621a3cbe4e5d55621cc9ae6ec Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2562683Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent eabbfcdd
......@@ -584,7 +584,7 @@ class GraphicsPipelineDesc final
}
angle::Result initializePipeline(ContextVk *contextVk,
const vk::PipelineCache &pipelineCacheVk,
const PipelineCache &pipelineCacheVk,
const RenderPass &compatibleRenderPass,
const PipelineLayout &pipelineLayout,
const gl::AttributesMask &activeAttribLocationsMask,
......@@ -592,7 +592,7 @@ class GraphicsPipelineDesc final
const ShaderModule *vertexModule,
const ShaderModule *fragmentModule,
const ShaderModule *geometryModule,
const vk::SpecializationConstants specConsts,
const SpecializationConstants specConsts,
Pipeline *pipelineOut) const;
// Vertex input state. For ES 3.1 this should be separated into binding and attribute.
......@@ -772,7 +772,7 @@ class DescriptorSetLayoutDesc final
VkDescriptorType type,
uint32_t count,
VkShaderStageFlags stages,
const vk::Sampler *immutableSampler);
const Sampler *immutableSampler);
void unpackBindings(DescriptorSetLayoutBindingVector *bindings,
std::vector<VkSampler> *immutableSamplers) const;
......@@ -870,7 +870,7 @@ class SamplerDesc final
bool stencilMode,
uint64_t externalFormat);
void reset();
angle::Result init(ContextVk *contextVk, vk::Sampler *sampler) const;
angle::Result init(ContextVk *contextVk, Sampler *sampler) const;
size_t hash() const;
bool operator==(const SamplerDesc &other) const;
......
......@@ -37,7 +37,7 @@ bool HasShaderImageAtomicsSupport(const RendererVk *rendererVk,
{
// Only VK_FORMAT_R32_SFLOAT doesn't have mandatory support for the STORAGE_IMAGE_ATOMIC and
// STORAGE_TEXEL_BUFFER_ATOMIC features.
const vk::Format &formatVk = rendererVk->getFormat(GL_R32F);
const Format &formatVk = rendererVk->getFormat(GL_R32F);
const bool hasImageAtomicSupport = rendererVk->hasImageFormatFeatureBits(
formatVk.vkImageFormat, VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT);
......@@ -60,11 +60,11 @@ bool FormatReinterpretationSupported(const std::vector<GLenum> &optionalSizedFor
const gl::TextureCaps &baseCaps = rendererVk->getNativeTextureCaps().get(glFormat);
if (baseCaps.texturable && baseCaps.filterable)
{
const vk::Format &vkFormat = rendererVk->getFormat(glFormat);
const Format &vkFormat = rendererVk->getFormat(glFormat);
VkFormat reinterpretedFormat = checkLinearColorspace
? vk::ConvertToLinear(vkFormat.vkImageFormat)
: vk::ConvertToSRGB(vkFormat.vkImageFormat);
? ConvertToLinear(vkFormat.vkImageFormat)
: ConvertToSRGB(vkFormat.vkImageFormat);
ASSERT(reinterpretedFormat != VK_FORMAT_UNDEFINED);
constexpr uint32_t kBitsSampleFilter =
......@@ -137,16 +137,15 @@ bool GetTextureSRGBOverrideSupport(const RendererVk *rendererVk,
std::vector<GLenum> optionalR8LinearFormats = {GL_R8};
std::vector<GLenum> optionalBPTCLinearFormats = {GL_COMPRESSED_RGBA_BPTC_UNORM_EXT};
if (!vk::FormatReinterpretationSupported(optionalLinearFormats, rendererVk,
kNonLinearColorspace))
if (!FormatReinterpretationSupported(optionalLinearFormats, rendererVk, kNonLinearColorspace))
{
return false;
}
if (supportedExtensions.textureCompressionS3TCsRGB == true)
{
if (!vk::FormatReinterpretationSupported(optionalS3TCLinearFormats, rendererVk,
kNonLinearColorspace))
if (!FormatReinterpretationSupported(optionalS3TCLinearFormats, rendererVk,
kNonLinearColorspace))
{
return false;
}
......@@ -154,8 +153,8 @@ bool GetTextureSRGBOverrideSupport(const RendererVk *rendererVk,
if (supportedExtensions.sRGBR8EXT == true)
{
if (!vk::FormatReinterpretationSupported(optionalR8LinearFormats, rendererVk,
kNonLinearColorspace))
if (!FormatReinterpretationSupported(optionalR8LinearFormats, rendererVk,
kNonLinearColorspace))
{
return false;
}
......@@ -165,8 +164,8 @@ bool GetTextureSRGBOverrideSupport(const RendererVk *rendererVk,
if (supportedExtensions.textureCompressionBPTC == true)
{
if (!vk::FormatReinterpretationSupported(optionalBPTCLinearFormats, rendererVk,
kNonLinearColorspace))
if (!FormatReinterpretationSupported(optionalBPTCLinearFormats, rendererVk,
kNonLinearColorspace))
{
return false;
}
......@@ -177,7 +176,7 @@ bool GetTextureSRGBOverrideSupport(const RendererVk *rendererVk,
bool HasTexelBufferSupport(const RendererVk *rendererVk, GLenum formatGL)
{
const vk::Format &formatVk = rendererVk->getFormat(formatGL);
const Format &formatVk = rendererVk->getFormat(formatGL);
return rendererVk->hasBufferFormatFeatureBits(
formatVk.vkBufferFormat,
......
......@@ -257,7 +257,7 @@ void FormatTable::initialize(RendererVk *renderer,
{
for (size_t formatIndex = 0; formatIndex < angle::kNumANGLEFormats; ++formatIndex)
{
vk::Format &format = mFormatData[formatIndex];
Format &format = mFormatData[formatIndex];
const auto formatID = static_cast<angle::FormatID>(formatIndex);
const angle::Format &angleFormat = angle::Format::Get(formatID);
......
......@@ -1014,7 +1014,7 @@ class CommandBufferHelper : angle::NonCopyable
return mRenderPassStarted;
}
void onImageHelperRelease(const vk::ImageHelper *image);
void onImageHelperRelease(const ImageHelper *image);
void beginRenderPass(const Framebuffer &framebuffer,
const gl::Rectangle &renderArea,
......@@ -1110,8 +1110,8 @@ class CommandBufferHelper : angle::NonCopyable
void onDepthAccess(ResourceAccess access);
void onStencilAccess(ResourceAccess access);
void updateRenderPassForResolve(vk::Framebuffer *newFramebuffer,
const vk::RenderPassDesc &renderPassDesc);
void updateRenderPassForResolve(Framebuffer *newFramebuffer,
const RenderPassDesc &renderPassDesc);
bool hasDepthStencilWriteOrClear() const
{
......@@ -1267,9 +1267,9 @@ bool FormatHasNecessaryFeature(RendererVk *renderer,
VkFormatFeatureFlags featureBits);
bool CanCopyWithTransfer(RendererVk *renderer,
const vk::Format &srcFormat,
const Format &srcFormat,
VkImageTiling srcTilingMode,
const vk::Format &destFormat,
const Format &destFormat,
VkImageTiling destTilingMode);
class ImageHelper final : public Resource, public angle::Subject
......@@ -1446,12 +1446,12 @@ class ImageHelper final : public Resource, public angle::Subject
CommandBuffer *commandBuffer);
static angle::Result CopyImageSubData(const gl::Context *context,
vk::ImageHelper *srcImage,
ImageHelper *srcImage,
GLint srcLevel,
GLint srcX,
GLint srcY,
GLint srcZ,
vk::ImageHelper *dstImage,
ImageHelper *dstImage,
GLint dstLevel,
GLint dstX,
GLint dstY,
......
......@@ -437,8 +437,8 @@ angle::Result StagingBuffer::init(Context *context, VkDeviceSize size, StagingUs
VkMemoryPropertyFlags requiredFlags =
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
RendererVk *renderer = context->getRenderer();
const vk::Allocator &allocator = renderer->getAllocator();
RendererVk *renderer = context->getRenderer();
const Allocator &allocator = renderer->getAllocator();
uint32_t memoryTypeIndex = 0;
ANGLE_VK_TRY(context,
......@@ -451,8 +451,8 @@ angle::Result StagingBuffer::init(Context *context, VkDeviceSize size, StagingUs
// invalid values ensures our testing doesn't assume zero-initialized memory.
if (renderer->getFeatures().allocateNonZeroMemory.enabled)
{
ANGLE_TRY(vk::InitMappableAllocation(context, allocator, &mAllocation, size,
kNonZeroInitValue, requiredFlags));
ANGLE_TRY(InitMappableAllocation(context, allocator, &mAllocation, size, kNonZeroInitValue,
requiredFlags));
}
return angle::Result::Continue;
......@@ -466,18 +466,18 @@ void StagingBuffer::release(ContextVk *contextVk)
void StagingBuffer::collectGarbage(RendererVk *renderer, Serial serial)
{
vk::GarbageList garbageList;
garbageList.emplace_back(vk::GetGarbage(&mBuffer));
garbageList.emplace_back(vk::GetGarbage(&mAllocation));
GarbageList garbageList;
garbageList.emplace_back(GetGarbage(&mBuffer));
garbageList.emplace_back(GetGarbage(&mAllocation));
vk::SharedResourceUse sharedUse;
SharedResourceUse sharedUse;
sharedUse.init();
sharedUse.updateSerialOneOff(serial);
renderer->collectGarbage(std::move(sharedUse), std::move(garbageList));
}
angle::Result InitMappableAllocation(Context *context,
const vk::Allocator &allocator,
const Allocator &allocator,
Allocation *allocation,
VkDeviceSize size,
int value,
......@@ -524,7 +524,7 @@ angle::Result InitMappableDeviceMemory(Context *context,
return angle::Result::Continue;
}
angle::Result AllocateBufferMemory(vk::Context *context,
angle::Result AllocateBufferMemory(Context *context,
VkMemoryPropertyFlags requestedMemoryPropertyFlags,
VkMemoryPropertyFlags *memoryPropertyFlagsOut,
const void *extraAllocationInfo,
......@@ -537,7 +537,7 @@ angle::Result AllocateBufferMemory(vk::Context *context,
deviceMemoryOut, sizeOut);
}
angle::Result AllocateImageMemory(vk::Context *context,
angle::Result AllocateImageMemory(Context *context,
VkMemoryPropertyFlags memoryPropertyFlags,
VkMemoryPropertyFlags *memoryPropertyFlagsOut,
const void *extraAllocationInfo,
......@@ -549,7 +549,7 @@ angle::Result AllocateImageMemory(vk::Context *context,
extraAllocationInfo, image, deviceMemoryOut, sizeOut);
}
angle::Result AllocateImageMemoryWithRequirements(vk::Context *context,
angle::Result AllocateImageMemoryWithRequirements(Context *context,
VkMemoryPropertyFlags memoryPropertyFlags,
const VkMemoryRequirements &memoryRequirements,
const void *extraAllocationInfo,
......@@ -562,7 +562,7 @@ angle::Result AllocateImageMemoryWithRequirements(vk::Context *context,
deviceMemoryOut);
}
angle::Result AllocateBufferMemoryWithRequirements(vk::Context *context,
angle::Result AllocateBufferMemoryWithRequirements(Context *context,
VkMemoryPropertyFlags memoryPropertyFlags,
const VkMemoryRequirements &memoryRequirements,
const void *extraAllocationInfo,
......
......@@ -372,14 +372,14 @@ class StagingBuffer final : angle::NonCopyable
};
angle::Result InitMappableAllocation(Context *context,
const vk::Allocator &allocator,
const Allocator &allocator,
Allocation *allocation,
VkDeviceSize size,
int value,
VkMemoryPropertyFlags memoryPropertyFlags);
angle::Result InitMappableDeviceMemory(Context *context,
vk::DeviceMemory *deviceMemory,
DeviceMemory *deviceMemory,
VkDeviceSize size,
int value,
VkMemoryPropertyFlags memoryPropertyFlags);
......@@ -407,7 +407,7 @@ angle::Result AllocateImageMemoryWithRequirements(Context *context,
Image *image,
DeviceMemory *deviceMemoryOut);
angle::Result AllocateBufferMemoryWithRequirements(vk::Context *context,
angle::Result AllocateBufferMemoryWithRequirements(Context *context,
VkMemoryPropertyFlags memoryPropertyFlags,
const VkMemoryRequirements &memoryRequirements,
const void *extraAllocationInfo,
......
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