Remove warnings
This commit is contained in:
@@ -96,7 +96,6 @@ target_compile_definitions(wivrn PRIVATE IMGUI_USE_WCHAR32)
|
||||
target_compile_definitions(wivrn PRIVATE IMGUI_ENABLE_FREETYPE)
|
||||
# target_compile_definitions(wivrn PRIVATE IMGUI_DISABLE_OBSOLETE_FUNCTIONS) # incompatible with implot
|
||||
# target_compile_definitions(wivrn PRIVATE IMGUI_ENABLE_FREETYPE_LUNASVG)
|
||||
target_compile_definitions(wivrn PRIVATE IMGUI_DEFINE_MATH_OPERATORS)
|
||||
|
||||
target_compile_features(wivrn PRIVATE cxx_std_20)
|
||||
target_compile_definitions(wivrn PRIVATE "XR_USE_TIMESPEC=1")
|
||||
|
||||
@@ -340,7 +340,8 @@ void image_loader::do_load_raw(const void * pixels, vk::Extent3D extent, vk::For
|
||||
info.setCommandBuffers(*cb);
|
||||
auto fence = device.createFence(vk::FenceCreateInfo{});
|
||||
queue.submit(info, *fence);
|
||||
device.waitForFences(*fence, true, 1'000'000'000);
|
||||
if (auto result = device.waitForFences(*fence, true, 1'000'000'000); result != vk::Result::eSuccess)
|
||||
throw std::runtime_error("vkWaitForfences: " + vk::to_string(result));
|
||||
|
||||
r->image_view = vk::raii::ImageView{device, vk::ImageViewCreateInfo{
|
||||
.image = r->image,
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "imgui_impl.h"
|
||||
#include "implot.h"
|
||||
|
||||
@@ -38,7 +37,7 @@
|
||||
#include <optional>
|
||||
#include "image_loader.h"
|
||||
|
||||
#include "../external/IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
|
||||
/* Do not use:
|
||||
*
|
||||
@@ -472,7 +471,8 @@ XrCompositionLayerQuad imgui_context::end_frame()
|
||||
auto& cb = get_command_buffer().command_buffer;
|
||||
auto& fence = get_command_buffer().fence;
|
||||
|
||||
device.waitForFences(*fence, true, 1'000'000'000); // TODO check timeout
|
||||
if (auto result = device.waitForFences(*fence, true, 1'000'000'000); result != vk::Result::eSuccess)
|
||||
throw std::runtime_error("vkWaitForfences: " + vk::to_string(result));
|
||||
device.resetFences(*fence);
|
||||
|
||||
cb.begin({.flags = vk::CommandBufferUsageFlagBits::eOneTimeSubmit});
|
||||
@@ -531,7 +531,8 @@ imgui_context::~imgui_context()
|
||||
}
|
||||
|
||||
// Wait for fences before ImGui_ImplVulkan_Shutdown is called
|
||||
device.waitForFences(fences, true, 1'000'000'000);
|
||||
if (auto result = device.waitForFences(fences, true, 1'000'000'000); result != vk::Result::eSuccess)
|
||||
spdlog::error("vkWaitForfences: {}", vk::to_string(result));
|
||||
|
||||
ImGui_ImplVulkan_Shutdown();
|
||||
ImPlot::DestroyContext();
|
||||
|
||||
@@ -220,7 +220,8 @@ void scene_renderer::wait_idle()
|
||||
for(auto&& [i, f]: utils::enumerate(frame_resources))
|
||||
fences[i] = *f.fence;
|
||||
|
||||
device.waitForFences(fences, true, 1'000'000'000); // TODO check for timeout
|
||||
if (auto result = device.waitForFences(fences, true, 1'000'000'000); result != vk::Result::eSuccess)
|
||||
throw std::runtime_error("vkWaitForfences: " + vk::to_string(result));
|
||||
}
|
||||
|
||||
// #define MSAA_4x
|
||||
@@ -537,7 +538,8 @@ void scene_renderer::start_frame()
|
||||
current_frame_index = (current_frame_index + 1) % frame_resources.size();
|
||||
|
||||
auto& f = current_frame();
|
||||
device.waitForFences(*f.fence, true, 1'000'000'000);
|
||||
if (auto result = device.waitForFences(*f.fence, true, 1'000'000'000); result != vk::Result::eSuccess)
|
||||
throw std::runtime_error("vkWaitForfences: " + vk::to_string(result));
|
||||
device.resetFences(*f.fence);
|
||||
|
||||
f.resources.clear();
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
|
||||
#include "application.h"
|
||||
#include "imgui.h"
|
||||
#include "implot.h"
|
||||
@@ -233,11 +235,9 @@ void scenes::lobby::gui_server_list()
|
||||
if (!data.manual)
|
||||
{
|
||||
ImGui::SetCursorPos(ImVec2(pos.x, pos.y + 50));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0,1,0,1));
|
||||
if (ImGui::Checkbox(("Autoconnect##" + cookie).c_str(), &data.autoconnect))
|
||||
save_config();
|
||||
vibrate_on_hover();
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
|
||||
// TODO
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
|
||||
#include "imgui.h"
|
||||
#include "imgui_internal.h"
|
||||
#include "lobby.h"
|
||||
@@ -311,7 +313,7 @@ static void draw_single_key(const key& k, int key_id, ImVec2 size_arg)
|
||||
return /*false*/;
|
||||
|
||||
bool hovered, held;
|
||||
bool pressed = button_behavior(bb, id, &hovered, &held, flags);
|
||||
[[maybe_unused]] bool pressed = button_behavior(bb, id, &hovered, &held, flags);
|
||||
|
||||
// Render
|
||||
const ImU32 col = ImGui::GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
#include "application.h"
|
||||
@@ -202,7 +204,7 @@ XrCompositionLayerQuad scenes::stream::plot_performance_metrics(XrTime predicted
|
||||
for(auto&& [index, metrics]: utils::enumerate(decoder_metrics))
|
||||
{
|
||||
std::string title = "Decoder " + std::to_string(index);
|
||||
if (ImPlot::BeginPlot(title.c_str(), plot_size, ImPlotFlags_CanvasOnly | ImPlotFlags_NoChild))
|
||||
if (ImPlot::BeginPlot(title.c_str(), plot_size, ImPlotFlags_NoTitle | ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect | ImPlotFlags_NoMouseText | ImPlotFlags_NoChild))
|
||||
{
|
||||
float min_v = 0;
|
||||
float max_v = compute_plot_max_value(&(metrics.data()->displayed), metrics.size(), sizeof(decoder_metric));
|
||||
|
||||
Reference in New Issue
Block a user