watchu think, maybe initialize the WSI platform?

This commit is contained in:
CocoSimone
2022-08-05 21:33:23 +02:00
parent d580dc6cdd
commit ef29e4797c
4 changed files with 8 additions and 3 deletions

4
.gitignore vendored
View File

@@ -6,4 +6,6 @@
roms/ roms/
*.bin *.bin
*.sh *.sh
.cache/ .cache/
.vscode/
vgcore.*

View File

@@ -9,7 +9,6 @@
using namespace Vulkan; using namespace Vulkan;
using namespace RDP; using namespace RDP;
using std::unique_ptr;
static CommandProcessor* command_processor; static CommandProcessor* command_processor;
static WSI* wsi; static WSI* wsi;
@@ -110,7 +109,7 @@ public:
Program* fullscreen_quad_program; Program* fullscreen_quad_program;
void LoadParallelRDP(const u8* rdram) { void LoadWSIPlatform() {
wsi = new WSI(); wsi = new WSI();
wsi->set_backbuffer_srgb(false); wsi->set_backbuffer_srgb(false);
wsi->set_platform(new SDLWSIPlatform()); wsi->set_platform(new SDLWSIPlatform());
@@ -118,7 +117,9 @@ void LoadParallelRDP(const u8* rdram) {
if (!wsi->init_context_from_platform(1, handles)) { if (!wsi->init_context_from_platform(1, handles)) {
util::panic("Failed to initialize WSI!"); util::panic("Failed to initialize WSI!");
} }
}
void LoadParallelRDP(const u8* rdram) {
ResourceLayout vertLayout; ResourceLayout vertLayout;
ResourceLayout fragLayout; ResourceLayout fragLayout;

View File

@@ -16,6 +16,7 @@ uint32_t GetVkGraphicsQueueFamily();
VkFormat GetVkFormat(); VkFormat GetVkFormat();
VkCommandBuffer GetVkCommandBuffer(); VkCommandBuffer GetVkCommandBuffer();
void SubmitRequestedVkCommandBuffer(); void SubmitRequestedVkCommandBuffer();
void LoadWSIPlatform();
void LoadParallelRDP(const u8* rdram); void LoadParallelRDP(const u8* rdram);
void UpdateScreenParallelRdp(Window& imguiWindow, const n64::VI& vi); void UpdateScreenParallelRdp(Window& imguiWindow, const n64::VI& vi);
void ParallelRdpEnqueueCommand(int command_length, u32* buffer); void ParallelRdpEnqueueCommand(int command_length, u32* buffer);

View File

@@ -8,6 +8,7 @@
Window::Window(std::shared_ptr<BaseCore> core) : core(std::move(core)) { Window::Window(std::shared_ptr<BaseCore> core) : core(std::move(core)) {
InitSDL(); InitSDL();
LoadWSIPlatform();
InitImgui(); InitImgui();
} }