mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-10-30 11:47:51 +00:00
renderer_vulkan: Remove vulkan prefix in SetObjectName
This commit is contained in:
parent
2733189c0d
commit
b08f382c7c
4 changed files with 16 additions and 16 deletions
|
@ -99,8 +99,7 @@ void MasterSemaphoreTimeline::SubmitWork(vk::CommandBuffer cmdbuf, vk::Semaphore
|
||||||
try {
|
try {
|
||||||
instance.GetGraphicsQueue().submit(submit_info);
|
instance.GetGraphicsQueue().submit(submit_info);
|
||||||
} catch (vk::DeviceLostError& err) {
|
} catch (vk::DeviceLostError& err) {
|
||||||
LOG_CRITICAL(Render_Vulkan, "Device lost during submit: {}", err.what());
|
UNREACHABLE_MSG("Device lost during submit: {}", err.what());
|
||||||
UNREACHABLE();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +113,10 @@ MasterSemaphoreFence::MasterSemaphoreFence(const Instance& instance_) : instance
|
||||||
wait_thread = std::jthread([this](std::stop_token token) { WaitThread(token); });
|
wait_thread = std::jthread([this](std::stop_token token) { WaitThread(token); });
|
||||||
}
|
}
|
||||||
|
|
||||||
MasterSemaphoreFence::~MasterSemaphoreFence() = default;
|
MasterSemaphoreFence::~MasterSemaphoreFence() {
|
||||||
|
std::ranges::for_each(free_queue,
|
||||||
|
[this](auto fence) { instance.GetDevice().destroyFence(fence); });
|
||||||
|
}
|
||||||
|
|
||||||
void MasterSemaphoreFence::Refresh() {}
|
void MasterSemaphoreFence::Refresh() {}
|
||||||
|
|
||||||
|
@ -153,8 +155,7 @@ void MasterSemaphoreFence::SubmitWork(vk::CommandBuffer cmdbuf, vk::Semaphore wa
|
||||||
try {
|
try {
|
||||||
instance.GetGraphicsQueue().submit(submit_info, *fence);
|
instance.GetGraphicsQueue().submit(submit_info, *fence);
|
||||||
} catch (vk::DeviceLostError& err) {
|
} catch (vk::DeviceLostError& err) {
|
||||||
LOG_CRITICAL(Render_Vulkan, "Device lost during submit: {}", err.what());
|
UNREACHABLE_MSG("Device lost during submit: {}", err.what());
|
||||||
UNREACHABLE();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::scoped_lock lock{wait_mutex};
|
std::scoped_lock lock{wait_mutex};
|
||||||
|
@ -181,8 +182,7 @@ void MasterSemaphoreFence::WaitThread(std::stop_token token) {
|
||||||
|
|
||||||
const vk::Result result = device.waitForFences(*fence.handle, true, WAIT_TIMEOUT);
|
const vk::Result result = device.waitForFences(*fence.handle, true, WAIT_TIMEOUT);
|
||||||
if (result != vk::Result::eSuccess) {
|
if (result != vk::Result::eSuccess) {
|
||||||
LOG_CRITICAL(Render_Vulkan, "Fence wait failed with error {}", vk::to_string(result));
|
UNREACHABLE_MSG("Fence wait failed with error {}", vk::to_string(result));
|
||||||
UNREACHABLE();
|
|
||||||
}
|
}
|
||||||
device.resetFences(*fence.handle);
|
device.resetFences(*fence.handle);
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,8 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
class MasterSemaphoreFence : public MasterSemaphore {
|
class MasterSemaphoreFence : public MasterSemaphore {
|
||||||
|
using Waitable = std::pair<vk::Fence, u64>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MasterSemaphoreFence(const Instance& instance);
|
explicit MasterSemaphoreFence(const Instance& instance);
|
||||||
~MasterSemaphoreFence() override;
|
~MasterSemaphoreFence() override;
|
||||||
|
|
|
@ -254,10 +254,8 @@ void Swapchain::RefreshSemaphores() {
|
||||||
|
|
||||||
if (instance.HasDebuggingToolAttached()) {
|
if (instance.HasDebuggingToolAttached()) {
|
||||||
for (u32 i = 0; i < image_count; ++i) {
|
for (u32 i = 0; i < image_count; ++i) {
|
||||||
Vulkan::SetObjectName(device, image_acquired[i],
|
SetObjectName(device, image_acquired[i], "Swapchain Semaphore: image_acquired {}", i);
|
||||||
"Swapchain Semaphore: image_acquired {}", i);
|
SetObjectName(device, present_ready[i], "Swapchain Semaphore: present_ready {}", i);
|
||||||
Vulkan::SetObjectName(device, present_ready[i], "Swapchain Semaphore: present_ready {}",
|
|
||||||
i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -269,7 +267,7 @@ void Swapchain::SetupImages() {
|
||||||
|
|
||||||
if (instance.HasDebuggingToolAttached()) {
|
if (instance.HasDebuggingToolAttached()) {
|
||||||
for (u32 i = 0; i < image_count; ++i) {
|
for (u32 i = 0; i < image_count; ++i) {
|
||||||
Vulkan::SetObjectName(device, images[i], "Swapchain Image {}", i);
|
SetObjectName(device, images[i], "Swapchain Image {}", i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,9 +207,9 @@ Handle MakeHandle(const Instance* instance, u32 width, u32 height, u32 levels, T
|
||||||
vk::UniqueImageView image_view = instance->GetDevice().createImageViewUnique(view_info);
|
vk::UniqueImageView image_view = instance->GetDevice().createImageViewUnique(view_info);
|
||||||
|
|
||||||
if (!debug_name.empty() && instance->HasDebuggingToolAttached()) {
|
if (!debug_name.empty() && instance->HasDebuggingToolAttached()) {
|
||||||
Vulkan::SetObjectName(instance->GetDevice(), image, debug_name);
|
SetObjectName(instance->GetDevice(), image, debug_name);
|
||||||
Vulkan::SetObjectName(instance->GetDevice(), image_view.get(), "{} View({})", debug_name,
|
SetObjectName(instance->GetDevice(), image_view.get(), "{} View({})", debug_name,
|
||||||
vk::to_string(aspect));
|
vk::to_string(aspect));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Handle{
|
return Handle{
|
||||||
|
@ -1088,7 +1088,7 @@ void Surface::ScaleUp(u32 new_scale) {
|
||||||
vk::PipelineStageFlagBits::eTopOfPipe,
|
vk::PipelineStageFlagBits::eTopOfPipe,
|
||||||
vk::DependencyFlagBits::eByRegion, {}, {}, barriers);
|
vk::DependencyFlagBits::eByRegion, {}, {}, barriers);
|
||||||
});
|
});
|
||||||
LOG_INFO(HW_GPU, "Surface scale up!");
|
|
||||||
for (u32 level = 0; level < levels; level++) {
|
for (u32 level = 0; level < levels; level++) {
|
||||||
const VideoCore::TextureBlit blit = {
|
const VideoCore::TextureBlit blit = {
|
||||||
.src_level = level,
|
.src_level = level,
|
||||||
|
|
Loading…
Reference in a new issue