clang-format the src/Vulkan directory
Bug: b/144825072
Change-Id: I1bd5196b34a7974a41dcb95814a1ae8643b26f22
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39658
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Vulkan/VkSampler.hpp b/src/Vulkan/VkSampler.hpp
index 042a7c7..5a6ecf0 100644
--- a/src/Vulkan/VkSampler.hpp
+++ b/src/Vulkan/VkSampler.hpp
@@ -27,27 +27,27 @@
class Sampler : public Object<Sampler, VkSampler>
{
public:
- Sampler(const VkSamplerCreateInfo* pCreateInfo, void* mem, const vk::SamplerYcbcrConversion *ycbcrConversion) :
- magFilter(pCreateInfo->magFilter),
- minFilter(pCreateInfo->minFilter),
- mipmapMode(pCreateInfo->mipmapMode),
- addressModeU(pCreateInfo->addressModeU),
- addressModeV(pCreateInfo->addressModeV),
- addressModeW(pCreateInfo->addressModeW),
- mipLodBias(pCreateInfo->mipLodBias),
- anisotropyEnable(pCreateInfo->anisotropyEnable),
- maxAnisotropy(pCreateInfo->maxAnisotropy),
- compareEnable(pCreateInfo->compareEnable),
- compareOp(pCreateInfo->compareOp),
- minLod(ClampLod(pCreateInfo->minLod)),
- maxLod(ClampLod(pCreateInfo->maxLod)),
- borderColor(pCreateInfo->borderColor),
- unnormalizedCoordinates(pCreateInfo->unnormalizedCoordinates),
- ycbcrConversion(ycbcrConversion)
+ Sampler(const VkSamplerCreateInfo *pCreateInfo, void *mem, const vk::SamplerYcbcrConversion *ycbcrConversion)
+ : magFilter(pCreateInfo->magFilter)
+ , minFilter(pCreateInfo->minFilter)
+ , mipmapMode(pCreateInfo->mipmapMode)
+ , addressModeU(pCreateInfo->addressModeU)
+ , addressModeV(pCreateInfo->addressModeV)
+ , addressModeW(pCreateInfo->addressModeW)
+ , mipLodBias(pCreateInfo->mipLodBias)
+ , anisotropyEnable(pCreateInfo->anisotropyEnable)
+ , maxAnisotropy(pCreateInfo->maxAnisotropy)
+ , compareEnable(pCreateInfo->compareEnable)
+ , compareOp(pCreateInfo->compareOp)
+ , minLod(ClampLod(pCreateInfo->minLod))
+ , maxLod(ClampLod(pCreateInfo->maxLod))
+ , borderColor(pCreateInfo->borderColor)
+ , unnormalizedCoordinates(pCreateInfo->unnormalizedCoordinates)
+ , ycbcrConversion(ycbcrConversion)
{
}
- static size_t ComputeRequiredAllocationSize(const VkSamplerCreateInfo* pCreateInfo)
+ static size_t ComputeRequiredAllocationSize(const VkSamplerCreateInfo *pCreateInfo)
{
return 0;
}
@@ -58,22 +58,22 @@
return sw::clamp(lod, 0.0f, (float)(sw::MAX_TEXTURE_LOD));
}
- const uint32_t id = nextID++;
- const VkFilter magFilter = VK_FILTER_NEAREST;
- const VkFilter minFilter = VK_FILTER_NEAREST;
- const VkSamplerMipmapMode mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST;
+ const uint32_t id = nextID++;
+ const VkFilter magFilter = VK_FILTER_NEAREST;
+ const VkFilter minFilter = VK_FILTER_NEAREST;
+ const VkSamplerMipmapMode mipmapMode = VK_SAMPLER_MIPMAP_MODE_NEAREST;
const VkSamplerAddressMode addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT;
const VkSamplerAddressMode addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT;
const VkSamplerAddressMode addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT;
- const float mipLodBias = 0.0f;
- const VkBool32 anisotropyEnable = VK_FALSE;
- const float maxAnisotropy = 0.0f;
- const VkBool32 compareEnable = VK_FALSE;
- const VkCompareOp compareOp = VK_COMPARE_OP_NEVER;
- const float minLod = 0.0f;
- const float maxLod = 0.0f;
- const VkBorderColor borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK;
- const VkBool32 unnormalizedCoordinates = VK_FALSE;
+ const float mipLodBias = 0.0f;
+ const VkBool32 anisotropyEnable = VK_FALSE;
+ const float maxAnisotropy = 0.0f;
+ const VkBool32 compareEnable = VK_FALSE;
+ const VkCompareOp compareOp = VK_COMPARE_OP_NEVER;
+ const float minLod = 0.0f;
+ const float maxLod = 0.0f;
+ const VkBorderColor borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK;
+ const VkBool32 unnormalizedCoordinates = VK_FALSE;
const vk::SamplerYcbcrConversion *ycbcrConversion = nullptr;
@@ -84,45 +84,45 @@
class SamplerYcbcrConversion : public Object<SamplerYcbcrConversion, VkSamplerYcbcrConversion>
{
public:
- SamplerYcbcrConversion(const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, void* mem) :
- format(pCreateInfo->format),
- ycbcrModel(pCreateInfo->ycbcrModel),
- ycbcrRange(pCreateInfo->ycbcrRange),
- components(ResolveIdentityMapping(pCreateInfo->components)),
- xChromaOffset(pCreateInfo->xChromaOffset),
- yChromaOffset(pCreateInfo->yChromaOffset),
- chromaFilter(pCreateInfo->chromaFilter),
- forceExplicitReconstruction(pCreateInfo->forceExplicitReconstruction)
+ SamplerYcbcrConversion(const VkSamplerYcbcrConversionCreateInfo *pCreateInfo, void *mem)
+ : format(pCreateInfo->format)
+ , ycbcrModel(pCreateInfo->ycbcrModel)
+ , ycbcrRange(pCreateInfo->ycbcrRange)
+ , components(ResolveIdentityMapping(pCreateInfo->components))
+ , xChromaOffset(pCreateInfo->xChromaOffset)
+ , yChromaOffset(pCreateInfo->yChromaOffset)
+ , chromaFilter(pCreateInfo->chromaFilter)
+ , forceExplicitReconstruction(pCreateInfo->forceExplicitReconstruction)
{
}
~SamplerYcbcrConversion() = default;
- static size_t ComputeRequiredAllocationSize(const VkSamplerYcbcrConversionCreateInfo* pCreateInfo)
+ static size_t ComputeRequiredAllocationSize(const VkSamplerYcbcrConversionCreateInfo *pCreateInfo)
{
return 0;
}
- const VkFormat format = VK_FORMAT_UNDEFINED;
+ const VkFormat format = VK_FORMAT_UNDEFINED;
const VkSamplerYcbcrModelConversion ycbcrModel = VK_SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY;
- const VkSamplerYcbcrRange ycbcrRange = VK_SAMPLER_YCBCR_RANGE_ITU_FULL;
- const VkComponentMapping components = {VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A};
- const VkChromaLocation xChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN;
- const VkChromaLocation yChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN;
- const VkFilter chromaFilter = VK_FILTER_NEAREST;
- const VkBool32 forceExplicitReconstruction = VK_FALSE;
+ const VkSamplerYcbcrRange ycbcrRange = VK_SAMPLER_YCBCR_RANGE_ITU_FULL;
+ const VkComponentMapping components = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A };
+ const VkChromaLocation xChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN;
+ const VkChromaLocation yChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN;
+ const VkFilter chromaFilter = VK_FILTER_NEAREST;
+ const VkBool32 forceExplicitReconstruction = VK_FALSE;
};
-static inline Sampler* Cast(VkSampler object)
+static inline Sampler *Cast(VkSampler object)
{
return Sampler::Cast(object);
}
-static inline SamplerYcbcrConversion* Cast(VkSamplerYcbcrConversion object)
+static inline SamplerYcbcrConversion *Cast(VkSamplerYcbcrConversion object)
{
return SamplerYcbcrConversion::Cast(object);
}
} // namespace vk
-#endif // VK_SAMPLER_HPP_
\ No newline at end of file
+#endif // VK_SAMPLER_HPP_
\ No newline at end of file