Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 8, 2024
1 parent 9735feb commit d2cb218
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
7 changes: 3 additions & 4 deletions include/mbgl/util/instrumentation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ constexpr const char* tracyConstMemoryLabel = "Constant Buffer Memory";

#elif MLN_RENDER_BACKEND_VULKAN

#define MLN_END_FRAME() \
do { \
FrameMark; \
#define MLN_END_FRAME() \
do { \
FrameMark; \
} while (0);


#else

#define MLN_TRACE_GL_CONTEXT() ((void)0)
Expand Down
5 changes: 2 additions & 3 deletions src/mbgl/vulkan/descriptor_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ void DescriptorSet::allocate() {
auto& growablePool = context.getDescriptorPool(type);
const std::vector<vk::DescriptorSetLayout> layouts(context.getBackend().getMaxFrames(), descriptorSetLayout);

if (growablePool.currentPoolIndex == -1 || (growablePool.current().unusedSets.empty() &&
growablePool.current().remainingSets < layouts.size())) {

if (growablePool.currentPoolIndex == -1 ||
(growablePool.current().unusedSets.empty() && growablePool.current().remainingSets < layouts.size())) {
#ifdef USE_DESCRIPTOR_POOL_RESET
// find a pool that has unused allocated descriptor sets
const auto& unusedPoolIt = std::find_if(
Expand Down
3 changes: 1 addition & 2 deletions src/mbgl/vulkan/texture2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ Texture2D::~Texture2D() {
}

gfx::Texture2D& Texture2D::setSamplerConfiguration(const SamplerState& samplerState_) noexcept {
if (samplerState.filter == samplerState_.filter &&
samplerState.wrapU == samplerState_.wrapU &&
if (samplerState.filter == samplerState_.filter && samplerState.wrapU == samplerState_.wrapU &&
samplerState.wrapV == samplerState_.wrapV) {
return *this;
}
Expand Down

0 comments on commit d2cb218

Please sign in to comment.