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