mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-16 17:01:53 +00:00
Get vulkan back to where it was
This commit is contained in:
parent
e9f1bc7b30
commit
707bdfc5f2
3 changed files with 24 additions and 8 deletions
|
@ -9,7 +9,6 @@
|
|||
typedef struct vulkan_ctx_s {
|
||||
void (*load_vulkan) (struct vulkan_ctx_s *ctx);
|
||||
void (*unload_vulkan) (struct vulkan_ctx_s *ctx);
|
||||
void (*init_vulkan) (void);
|
||||
|
||||
const char * const *required_extensions;
|
||||
struct vulkan_presentation_s *presentation;
|
||||
|
@ -18,7 +17,6 @@ typedef struct vulkan_ctx_s {
|
|||
uint32_t queueFamilyIndex);
|
||||
VkSurfaceKHR (*create_surface) (struct vulkan_ctx_s *ctx);
|
||||
VkInstance instance;
|
||||
VkPhysicalDevice physicalDevice;
|
||||
#define EXPORTED_VULKAN_FUNCTION(fname) PFN_##fname fname;
|
||||
#define GLOBAL_LEVEL_VULKAN_FUNCTION(fname) PFN_##fname fname;
|
||||
#include "QF/Vulkan/funclist.h"
|
||||
|
|
|
@ -135,14 +135,30 @@ set_palette (const byte *palette)
|
|||
//an app using the QuakeForge engine)
|
||||
}
|
||||
|
||||
static void
|
||||
vulkan_vid_render_choose_visual (void)
|
||||
{
|
||||
//vulkan_ctx->coose_visual (vulkan_ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
vulkan_vid_render_create_context (void)
|
||||
{
|
||||
vulkan_ctx->create_surface (vulkan_ctx);
|
||||
}
|
||||
|
||||
static void
|
||||
vulkan_vid_render_init (void)
|
||||
{
|
||||
vulkan_ctx = vr_data.vid->vid_internal->vulkan_context ();
|
||||
vulkan_ctx->init_vulkan = Vulkan_Init_Common;
|
||||
vulkan_ctx->load_vulkan (vulkan_ctx);
|
||||
|
||||
Vulkan_Init_Common ();
|
||||
|
||||
vr_data.vid->vid_internal->set_palette = set_palette;
|
||||
vr_data.vid->vid_internal->choose_visual = vulkan_vid_render_choose_visual;
|
||||
vr_data.vid->vid_internal->create_context = vulkan_vid_render_create_context;
|
||||
|
||||
vr_funcs = &vulkan_vid_render_funcs;
|
||||
m_funcs = &model_funcs;
|
||||
}
|
||||
|
|
|
@ -165,6 +165,8 @@ create_suitable_device (VulkanInstance_t *instance)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int x = 1;
|
||||
|
||||
void
|
||||
Vulkan_Init_Common (void)
|
||||
{
|
||||
|
@ -176,11 +178,11 @@ Vulkan_Init_Common (void)
|
|||
if (!vulkan_device) {
|
||||
Sys_Error ("no suitable vulkan device found");
|
||||
}
|
||||
if (developer->int_val & SYS_VID) {
|
||||
Sys_Printf ("%p %p\n", vulkan_device->device, vulkan_device->queue);
|
||||
Vulkan_Shutdown_Common ();
|
||||
Sys_Quit();
|
||||
}
|
||||
// only for now...
|
||||
Sys_Printf ("%p %p\n", vulkan_device->device, vulkan_device->queue);
|
||||
Vulkan_Shutdown_Common ();
|
||||
if (x)
|
||||
Sys_Quit();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue