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 Jan 7, 2025
1 parent 08a0804 commit 6b977ef
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/mbgl/vulkan/buffer_resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void BufferResource::updateVulkanBuffer(const int8_t destination, const uint8_t
if (!bufferWindowSize) {
return;
}

if (bufferWindowVersions[destination] < bufferWindowVersions[source]) {
uint8_t* dstData = static_cast<uint8_t*>(bufferAllocation->mappedBuffer) + bufferWindowSize * destination;
uint8_t* srcData = static_cast<uint8_t*>(bufferAllocation->mappedBuffer) + bufferWindowSize * source;
Expand Down
7 changes: 3 additions & 4 deletions src/mbgl/vulkan/renderable_resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@ void SurfaceRenderableResource::init(uint32_t w, uint32_t h) {
.setStencilLoadOp(vk::AttachmentLoadOp::eClear)
.setStencilStoreOp(vk::AttachmentStoreOp::eDontCare)
.setInitialLayout(vk::ImageLayout::eUndefined)
.setFinalLayout(vk::ImageLayout::eDepthStencilAttachmentOptimal)
};
.setFinalLayout(vk::ImageLayout::eDepthStencilAttachmentOptimal)};

const vk::AttachmentReference colorAttachmentRef(0, vk::ImageLayout::eColorAttachmentOptimal);
const vk::AttachmentReference depthAttachmentRef(1, vk::ImageLayout::eDepthStencilAttachmentOptimal);
Expand All @@ -348,7 +347,7 @@ void SurfaceRenderableResource::init(uint32_t w, uint32_t h) {
.setDstStageMask(vk::PipelineStageFlagBits::eColorAttachmentOutput)
.setSrcAccessMask({})
.setDstAccessMask(vk::AccessFlagBits::eColorAttachmentWrite),

vk::SubpassDependency()
.setSrcSubpass(VK_SUBPASS_EXTERNAL)
.setDstSubpass(0)
Expand All @@ -359,7 +358,7 @@ void SurfaceRenderableResource::init(uint32_t w, uint32_t h) {
.setSrcAccessMask({})
.setDstAccessMask(vk::AccessFlagBits::eDepthStencilAttachmentWrite),
};

const auto renderPassCreateInfo =
vk::RenderPassCreateInfo().setAttachments(attachments).setSubpasses(subpass).setDependencies(dependencies);

Expand Down
5 changes: 2 additions & 3 deletions src/mbgl/vulkan/renderer_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,18 +206,17 @@ void RendererBackend::initFrameCapture() {
void RendererBackend::startFrameCapture() {
#ifdef ENABLE_RENDERDOC_FRAME_CAPTURE
if (!g_rdoc.api) {
return;
return;
}

if (g_rdoc.loop) {
RENDERDOC_DevicePointer devicePtr = RENDERDOC_DEVICEPOINTER_FROM_VKINSTANCE(instance->operator VkInstance_T*());
g_rdoc.api->StartFrameCapture(devicePtr, nullptr);
} else {

if (g_rdoc.frameCaptureCount > 0 && g_rdoc.frameDelay == 0) {
g_rdoc.api->TriggerMultiFrameCapture(g_rdoc.frameCaptureCount);
}

--g_rdoc.frameDelay;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/mbgl/vulkan/uniform_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void UniformBufferArray::bindDescriptorSets(CommandEncoder& encoder) {

for (uint32_t i = 0; i < descriptorBindingCount; ++i) {
const uint32_t index = descriptorStartIndex + i;

if (!uniformBufferVector[index]) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mbgl/vulkan/upload_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const gfx::UniqueVertexBufferResource& UploadPass::getBuffer(const gfx::VertexVe
// If it's changed, update it
if (rawBufSize <= resource.getSizeInBytes()) {
if (vec->isModifiedAfter(resource.getLastUpdated())) {
//updateVertexBufferResource(resource, rawBufPtr, rawBufSize);
// updateVertexBufferResource(resource, rawBufPtr, rawBufSize);
} else {
return rawData->resource;
}
Expand Down

0 comments on commit 6b977ef

Please sign in to comment.