Vulkan fixes on Linux
This commit is contained in:
parent
2f8a8ed763
commit
b6a7b2192c
5 changed files with 9 additions and 10 deletions
|
|
@ -67,11 +67,15 @@ void vk_instance_init(struct renderer_context *context)
|
|||
|
||||
usize extension_count = 0;
|
||||
const char **extension_names = vk_instance_extensions(&extension_count);
|
||||
u32 flags = 0;
|
||||
#ifdef PLATFORM_MACOS
|
||||
flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
|
||||
#endif
|
||||
|
||||
VkInstanceCreateInfo instance_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
|
||||
.pApplicationInfo = &application_info,
|
||||
.flags = VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR,
|
||||
.flags = flags,
|
||||
.enabledLayerCount = LAYER_COUNT,
|
||||
.ppEnabledLayerNames = layers,
|
||||
.enabledExtensionCount = extension_count,
|
||||
|
|
|
|||
|
|
@ -5,13 +5,12 @@
|
|||
#include "device.h"
|
||||
#include "surface.h"
|
||||
#include "vk.h"
|
||||
#include "../../core/arena.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
struct renderer_context *renderer_context_init(RGFW_window *window)
|
||||
{
|
||||
struct renderer_context *context = (struct renderer_context *)arena_alloc(global_arena, (sizeof(struct renderer_context)));
|
||||
struct renderer_context *context = (struct renderer_context *)malloc(sizeof(struct renderer_context));
|
||||
context->window = window;
|
||||
|
||||
vk_instance_init(context);
|
||||
|
|
@ -27,6 +26,7 @@ void renderer_context_deinit(struct renderer_context *context)
|
|||
vk_surface_deinit(context);
|
||||
vk_device_deinit(context);
|
||||
vk_instance_deinit(context);
|
||||
free(context);
|
||||
}
|
||||
|
||||
struct mesh *renderer_build_chunk_mesh(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue