get vulkan queues
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
#include "vulkan_device_queues.h"
|
#include "vulkan_device_queues.h"
|
||||||
|
#include "output_device/vulkan_output_devices.h"
|
||||||
|
|
||||||
gnReturnCode vulkanPhysicalDeviceQueueProperties(gnPhysicalOutputDeviceHandle device, uint32_t queueFamilyCount, gnQueueFamilyProperties* queues) {
|
gnReturnCode vulkanPhysicalDeviceQueueProperties(gnPhysicalOutputDeviceHandle device, uint32_t queueFamilyCount, gnQueueFamilyProperties* queues) {
|
||||||
vkGetPhysicalDeviceQueueFamilyProperties(device->physicalDevice->device, &queueFamilyCount, NULL);
|
vkGetPhysicalDeviceQueueFamilyProperties(device->physicalDevice->device, &queueFamilyCount, NULL);
|
||||||
@@ -20,3 +21,9 @@ gnReturnCode vulkanPhysicalDeviceQueueProperties(gnPhysicalOutputDeviceHandle de
|
|||||||
|
|
||||||
return GN_SUCCESS;
|
return GN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gnGetDeviceQueue(gnOutputDevice device, uint32_t queueFamily, uint32_t queueIndex, gnQueue* queue) {
|
||||||
|
VkQueue vulkanQueue;
|
||||||
|
vkGetDeviceQueue(device->outputDevice->device, queueFamily, queueIndex, &vulkanQueue);
|
||||||
|
*queue = (uint64_t)vulkanQueue;
|
||||||
|
}
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <vulkan/vulkan.h>
|
||||||
|
|
||||||
#include <output_device/vulkan_physical_device.h>
|
#include <output_device/vulkan_physical_device.h>
|
||||||
#include <extensions/queues/gryphn_physcial_device_queue.h>
|
#include <extensions/queues/gryphn_physcial_device_queue.h>
|
||||||
|
@@ -8,6 +8,10 @@ typedef uint32_t gnFlags;
|
|||||||
typedef struct type##_t* type##Handle; \
|
typedef struct type##_t* type##Handle; \
|
||||||
typedef struct type##_t* type
|
typedef struct type##_t* type
|
||||||
|
|
||||||
|
#define GN_IMPLEMENTATION_HANDLE(type) \
|
||||||
|
typedef uint64_t type##Handle; \
|
||||||
|
typedef uint64_t type
|
||||||
|
|
||||||
#define GN_HANDLE_ALIAS(handle, alias) \
|
#define GN_HANDLE_ALIAS(handle, alias) \
|
||||||
typedef struct handle##_t* alias##Handle; \
|
typedef struct handle##_t* alias##Handle; \
|
||||||
typedef struct handle##_t* alias
|
typedef struct handle##_t* alias
|
||||||
@@ -36,4 +40,4 @@ GN_HANDLE(gnUniform);
|
|||||||
GN_HANDLE(gnSemaphore);
|
GN_HANDLE(gnSemaphore);
|
||||||
GN_HANDLE(gnFence);
|
GN_HANDLE(gnFence);
|
||||||
// GN_EXT_QUEUES
|
// GN_EXT_QUEUES
|
||||||
GN_HANDLE(gnQueue); // NOTE: this is an implementaion specific object
|
GN_IMPLEMENTATION_HANDLE(gnQueue); // NOTE: this is an implementaion specific object
|
||||||
|
4
projects/extensions/queues/gryphn_queue.h
Normal file
4
projects/extensions/queues/gryphn_queue.h
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <gryphn_handles.h>
|
||||||
|
|
||||||
|
void gnGetDeviceQueue(gnOutputDevice device, uint32_t queueFamily, uint32_t queueIndex, gnQueue* queue);
|
@@ -7,4 +7,5 @@ typedef struct gnQueueFamilyProperties gnQueueFamilyProperties;
|
|||||||
|
|
||||||
typedef struct gnQueueExtFunctions {
|
typedef struct gnQueueExtFunctions {
|
||||||
gnReturnCode (*_gnGetPhysicalDeviceQueueProperties)(gnPhysicalOutputDeviceHandle device, uint32_t queueCount, gnQueueFamilyProperties* queues);
|
gnReturnCode (*_gnGetPhysicalDeviceQueueProperties)(gnPhysicalOutputDeviceHandle device, uint32_t queueCount, gnQueueFamilyProperties* queues);
|
||||||
|
void (*_gnGetDeviceQueue)(gnOutputDevice device, uint32_t queueFamily, uint32_t queueIndex, gnQueue* queue);
|
||||||
} gnQueueExtFunctions;
|
} gnQueueExtFunctions;
|
||||||
|
Reference in New Issue
Block a user