mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
191 lines
7.7 KiB
Diff
191 lines
7.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dominika Liberda <ja@sdomi.pl>
|
|
Date: Sun, 2 Jul 2023 05:49:46 +0200
|
|
Subject: [PATCH] Fixup Vulkan/SDL platform quirks
|
|
|
|
---
|
|
lib/graphics_engine/include/ge_main.hpp | 1 +
|
|
lib/graphics_engine/include/vk_mem_alloc.h | 1 +
|
|
lib/graphics_engine/src/ge_main.cpp | 1 +
|
|
lib/graphics_engine/src/ge_spm_buffer.cpp | 1 +
|
|
lib/graphics_engine/src/ge_vulkan_command_loader.cpp | 1 +
|
|
lib/graphics_engine/src/ge_vulkan_depth_texture.cpp | 1 +
|
|
lib/graphics_engine/src/ge_vulkan_draw_call.cpp | 1 +
|
|
lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp | 1 +
|
|
lib/graphics_engine/src/ge_vulkan_fbo_texture.hpp | 1 +
|
|
lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp | 1 +
|
|
lib/graphics_engine/src/ge_vulkan_texture.cpp | 1 +
|
|
lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp | 1 +
|
|
lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp | 2 +-
|
|
src/graphics/irr_driver.cpp | 2 +-
|
|
14 files changed, 14 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/lib/graphics_engine/include/ge_main.hpp b/lib/graphics_engine/include/ge_main.hpp
|
|
index 83ba0084f32a5593a96f8e8f2f6be7b7a8846dac..13ce04d0345bd56b66cc612071c0b152b37c0ca6 100644
|
|
--- a/lib/graphics_engine/include/ge_main.hpp
|
|
+++ b/lib/graphics_engine/include/ge_main.hpp
|
|
@@ -7,6 +7,7 @@
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <unordered_set>
|
|
+#include <stdexcept>
|
|
|
|
namespace irr
|
|
{
|
|
diff --git a/lib/graphics_engine/include/vk_mem_alloc.h b/lib/graphics_engine/include/vk_mem_alloc.h
|
|
index bdb4ff57610ce556dd144ea022347b93ed6d7351..71cde96f50b018f90214b9e1284146471417780a 100644
|
|
--- a/lib/graphics_engine/include/vk_mem_alloc.h
|
|
+++ b/lib/graphics_engine/include/vk_mem_alloc.h
|
|
@@ -2562,6 +2562,7 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeStatsString(
|
|
#ifdef VMA_IMPLEMENTATION
|
|
#undef VMA_IMPLEMENTATION
|
|
|
|
+#include <cstdio>
|
|
#include <cstdint>
|
|
#include <cstdlib>
|
|
#include <cstring>
|
|
diff --git a/lib/graphics_engine/src/ge_main.cpp b/lib/graphics_engine/src/ge_main.cpp
|
|
index ea486dcd046aa196d3895c5a93fd35dc26517692..8813851a8c9a04e2af3188f07876d72f8628b719 100644
|
|
--- a/lib/graphics_engine/src/ge_main.cpp
|
|
+++ b/lib/graphics_engine/src/ge_main.cpp
|
|
@@ -10,6 +10,7 @@
|
|
|
|
#include <algorithm>
|
|
#include <chrono>
|
|
+#include <stdexcept>
|
|
|
|
namespace GE
|
|
{
|
|
diff --git a/lib/graphics_engine/src/ge_spm_buffer.cpp b/lib/graphics_engine/src/ge_spm_buffer.cpp
|
|
index 0dfa2829fa087c314f43ec76bfc1a41281c7e3ed..715af296c89cd7973b3fc71da70f655c3df48ade 100644
|
|
--- a/lib/graphics_engine/src/ge_spm_buffer.cpp
|
|
+++ b/lib/graphics_engine/src/ge_spm_buffer.cpp
|
|
@@ -4,6 +4,7 @@
|
|
#include "ge_vulkan_driver.hpp"
|
|
#include "ge_vulkan_features.hpp"
|
|
|
|
+#include <stdexcept>
|
|
#include <algorithm>
|
|
|
|
namespace GE
|
|
diff --git a/lib/graphics_engine/src/ge_vulkan_command_loader.cpp b/lib/graphics_engine/src/ge_vulkan_command_loader.cpp
|
|
index 358cf9ab6ec65f0ce14874f1e02de38fa355d7aa..66db6ec3cd34191b986ef6a1b0a900b9a469e7d7 100644
|
|
--- a/lib/graphics_engine/src/ge_vulkan_command_loader.cpp
|
|
+++ b/lib/graphics_engine/src/ge_vulkan_command_loader.cpp
|
|
@@ -9,6 +9,7 @@
|
|
#include <memory>
|
|
#include <mutex>
|
|
#include <thread>
|
|
+#include <stdexcept>
|
|
|
|
#include "../source/Irrlicht/os.h"
|
|
|
|
diff --git a/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp b/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp
|
|
index 25cb242963891e68088be867f3b11c65fafa0865..9bb1bd1d4251850dc319bf8a0da7c7392ef6964b 100644
|
|
--- a/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp
|
|
+++ b/lib/graphics_engine/src/ge_vulkan_depth_texture.cpp
|
|
@@ -1,5 +1,6 @@
|
|
#include "ge_vulkan_depth_texture.hpp"
|
|
|
|
+#include <stdexcept>
|
|
#include "ge_main.hpp"
|
|
#include "ge_vulkan_driver.hpp"
|
|
|
|
diff --git a/lib/graphics_engine/src/ge_vulkan_draw_call.cpp b/lib/graphics_engine/src/ge_vulkan_draw_call.cpp
|
|
index ee8fd08fcb9b58daaf4e1c457d27c8487704c90f..03657953e01ac9221057d2b6f82c9b802bc8062d 100644
|
|
--- a/lib/graphics_engine/src/ge_vulkan_draw_call.cpp
|
|
+++ b/lib/graphics_engine/src/ge_vulkan_draw_call.cpp
|
|
@@ -25,6 +25,7 @@
|
|
#include <algorithm>
|
|
#include <cmath>
|
|
#include <limits>
|
|
+#include <stdexcept>
|
|
|
|
#include "../source/Irrlicht/os.h"
|
|
#include "quaternion.h"
|
|
diff --git a/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp b/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp
|
|
index 9413a04bb00e0f19da1ab7ac104b8234b22f4bec..834a0b43b1e1a96bc1c7acb76910aa40d9aeee6c 100644
|
|
--- a/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp
|
|
+++ b/lib/graphics_engine/src/ge_vulkan_fbo_texture.cpp
|
|
@@ -6,6 +6,7 @@
|
|
|
|
#include <array>
|
|
#include <exception>
|
|
+#include <stdexcept>
|
|
|
|
namespace GE
|
|
{
|
|
diff --git a/lib/graphics_engine/src/ge_vulkan_fbo_texture.hpp b/lib/graphics_engine/src/ge_vulkan_fbo_texture.hpp
|
|
index ffc7fe9f831c9033c7951c3bdb3a788cec27513c..23d02a5b981e005a0ecbf66005844e7c478c97de 100644
|
|
--- a/lib/graphics_engine/src/ge_vulkan_fbo_texture.hpp
|
|
+++ b/lib/graphics_engine/src/ge_vulkan_fbo_texture.hpp
|
|
@@ -2,6 +2,7 @@
|
|
#define HEADER_GE_VULKAN_FBO_TEXTURE_HPP
|
|
|
|
#include "ge_vulkan_texture.hpp"
|
|
+#include <stdexcept>
|
|
|
|
namespace GE
|
|
{
|
|
diff --git a/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp b/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp
|
|
index 2543b16086ff134f2cf0eb435bb2986547aa25cb..b34340d7659b3af754183b6968d9cef5b7565a16 100644
|
|
--- a/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp
|
|
+++ b/lib/graphics_engine/src/ge_vulkan_skybox_renderer.cpp
|
|
@@ -12,6 +12,7 @@
|
|
#include <array>
|
|
#include <cstdint>
|
|
#include <unordered_map>
|
|
+#include <stdexcept>
|
|
|
|
namespace GE
|
|
{
|
|
diff --git a/lib/graphics_engine/src/ge_vulkan_texture.cpp b/lib/graphics_engine/src/ge_vulkan_texture.cpp
|
|
index 500eb65fc6204bda5b21eaef25c1c9de1404005e..9f7f155092c0762b1f2e40f9800a04c1e0b9b628 100644
|
|
--- a/lib/graphics_engine/src/ge_vulkan_texture.cpp
|
|
+++ b/lib/graphics_engine/src/ge_vulkan_texture.cpp
|
|
@@ -9,6 +9,7 @@
|
|
#include "ge_vulkan_command_loader.hpp"
|
|
#include "ge_vulkan_features.hpp"
|
|
#include "ge_vulkan_driver.hpp"
|
|
+#include <stdexcept>
|
|
|
|
extern "C"
|
|
{
|
|
diff --git a/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp b/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp
|
|
index 4fd8a2e8800e6620fb5980097fefefdab8150ab8..46b671ffdbe55e9be6f35eeb7d05857aa12880bc 100644
|
|
--- a/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp
|
|
+++ b/lib/graphics_engine/src/ge_vulkan_texture_descriptor.cpp
|
|
@@ -4,6 +4,7 @@
|
|
#include "ge_vulkan_driver.hpp"
|
|
#include "ge_vulkan_texture.hpp"
|
|
|
|
+#include <stdexcept>
|
|
#include <algorithm>
|
|
#include <exception>
|
|
|
|
diff --git a/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp b/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp
|
|
index 1dfef29db82f1f32bde84086d923dcea6e514329..bb0dda63093fd793afa347b121e69dc344d9764c 100644
|
|
--- a/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp
|
|
+++ b/lib/irrlicht/source/Irrlicht/CIrrDeviceSDL.cpp
|
|
@@ -362,7 +362,7 @@ extern "C" void update_fullscreen_desktop(int val)
|
|
// Used in OptionsScreenVideo for live updating vertical sync config
|
|
extern "C" void update_swap_interval(int swap_interval)
|
|
{
|
|
-#ifndef IOS_STK
|
|
+#if !defined(IOS_STK) && !defined(__serenity__)
|
|
// iOS always use vertical sync
|
|
if (swap_interval > 1)
|
|
swap_interval = 1;
|
|
diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp
|
|
index 763311a52293195bd59af4fc4807c6cf17b5705b..08bbf976a8ac63d7e703f32fa02b72f6789238c3 100644
|
|
--- a/src/graphics/irr_driver.cpp
|
|
+++ b/src/graphics/irr_driver.cpp
|
|
@@ -186,7 +186,7 @@ IrrDriver::IrrDriver()
|
|
p.WindowSize = core::dimension2d<u32>(1280,720);
|
|
p.ForceLegacyDevice = UserConfigParams::m_force_legacy_device;
|
|
#else
|
|
- p.DriverType = video::EDT_NULL;
|
|
+ p.DriverType = video::EDT_OPENGL;
|
|
p.Bits = 16U;
|
|
p.WindowSize = core::dimension2d<u32>(640,480);
|
|
#endif
|