mirror of
https://github.com/love2d/love.git
synced 2026-08-21 21:15:09 +02:00
vulkan: code styling
This commit is contained in:
@@ -42,7 +42,7 @@ class Buffer final
|
||||
, public Volatile
|
||||
{
|
||||
public:
|
||||
Buffer(love::graphics::Graphics *gfx, const Settings& settings, const std::vector<DataDeclaration> &format, const void *data, size_t size, size_t arraylength);
|
||||
Buffer(love::graphics::Graphics *gfx, const Settings &settings, const std::vector<DataDeclaration> &format, const void *data, size_t size, size_t arraylength);
|
||||
virtual ~Buffer();
|
||||
|
||||
virtual bool loadVolatile() override;
|
||||
|
||||
@@ -1316,7 +1316,7 @@ bool Graphics::checkValidationSupport()
|
||||
{
|
||||
bool layerFound = false;
|
||||
|
||||
for (const auto& layerProperties : availableLayers)
|
||||
for (const auto &layerProperties : availableLayers)
|
||||
{
|
||||
if (strcmp(layerName, layerProperties.layerName) == 0)
|
||||
{
|
||||
@@ -1754,7 +1754,7 @@ VkSurfaceFormatKHR Graphics::chooseSwapSurfaceFormat(const std::vector<VkSurface
|
||||
// TODO: turn off GammaCorrect if a sRGB format can't be found?
|
||||
if (isGammaCorrect())
|
||||
{
|
||||
for (const auto& availableFormat : availableFormats)
|
||||
for (const auto &availableFormat : availableFormats)
|
||||
// fixme: what if this format and colorspace is not available?
|
||||
if (availableFormat.format == VK_FORMAT_B8G8R8A8_SRGB && availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR)
|
||||
return availableFormat;
|
||||
@@ -1969,7 +1969,7 @@ VkFramebuffer Graphics::createFramebuffer(FramebufferConfiguration &configuratio
|
||||
{
|
||||
std::vector<VkImageView> attachments;
|
||||
|
||||
for (const auto& colorView : configuration.colorViews)
|
||||
for (const auto &colorView : configuration.colorViews)
|
||||
attachments.push_back(colorView);
|
||||
|
||||
if (configuration.staticData.depthView)
|
||||
@@ -2323,7 +2323,7 @@ void Graphics::setRenderPass(const RenderTargets &rts, int pixelw, int pixelh, b
|
||||
|
||||
// fixme: hasSRGBtexture
|
||||
RenderPassConfiguration renderPassConfiguration{};
|
||||
for (const auto& color : rts.colors)
|
||||
for (const auto &color : rts.colors)
|
||||
renderPassConfiguration.colorAttachments.push_back({
|
||||
Vulkan::getTextureFormat(color.texture->getPixelFormat(), isPixelFormatSRGB(color.texture->getPixelFormat())).internalFormat,
|
||||
false,
|
||||
|
||||
@@ -126,6 +126,7 @@ struct FramebufferConfigurationHasher
|
||||
|
||||
struct OptionalInstanceExtensions
|
||||
{
|
||||
// VK_KHR_get_physical_device_properties2
|
||||
bool physicalDeviceProperties2 = false;
|
||||
};
|
||||
|
||||
@@ -401,7 +402,7 @@ private:
|
||||
std::unordered_map<uint64, VkSampler> samplers;
|
||||
VkCommandPool commandPool = VK_NULL_HANDLE;
|
||||
std::vector<VkCommandBuffer> commandBuffers;
|
||||
Shader* computeShader = nullptr;
|
||||
Shader *computeShader = nullptr;
|
||||
std::vector<VkSemaphore> imageAvailableSemaphores;
|
||||
std::vector<VkSemaphore> renderFinishedSemaphores;
|
||||
std::vector<VkFence> inFlightFences;
|
||||
|
||||
@@ -102,7 +102,7 @@ private:
|
||||
size_t baseoff,
|
||||
const std::string &basename);
|
||||
void initDescriptorSet();
|
||||
void updateUniform(const UniformInfo* info, int count, bool internal);
|
||||
void updateUniform(const UniformInfo *info, int count, bool internal);
|
||||
|
||||
VkDescriptorSet allocateDescriptorSet();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user