get the queues when GN_EXT_QUEUES is enabled
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
#define GN_NULL_HANDLE 0
|
||||
typedef uint32_t gnFlags;
|
||||
|
||||
#define GN_HANDLE(type) \
|
||||
typedef struct type##_t* type##Handle; \
|
||||
|
@@ -14,10 +14,10 @@ gnReturnCode gnCreateInstance(gnInstanceHandle* instance, gnInstanceInfo info) {
|
||||
.layerToLoad = api_layer
|
||||
}));
|
||||
|
||||
// TODO: still needs to check to see if the extension is supported
|
||||
for (int i = 0; i < info.extensionCount; i++) {
|
||||
if (info.extensions[i] == GN_EXT_SYNCHRONIZATION) (*instance)->layers.data[0].syncFunctions = loadAPISyncFunctions(info.renderingAPI);
|
||||
}
|
||||
for (int c = 0; c < GN_EXT_MAX; c++) (*instance)->enabledExtensions[c] = gnFalse;
|
||||
for (int i = 0; i < info.extensionCount; i++) (*instance)->enabledExtensions[info.extensions[i]] = gnTrue;
|
||||
|
||||
if ((*instance)->enabledExtensions[GN_EXT_SYNCHRONIZATION]) (*instance)->layers.data[0].syncFunctions = loadAPISyncFunctions(info.renderingAPI);
|
||||
|
||||
gnBool loaderFunctionChecker = gnFalse;
|
||||
if (info.debugger != NULL) {
|
||||
|
@@ -30,6 +30,8 @@ struct gnInstance_t {
|
||||
loaderLayer* callingLayer;
|
||||
uint32_t currentLayer;
|
||||
|
||||
gnBool enabledExtensions[GN_EXT_MAX];
|
||||
|
||||
gnBool hasDebugger;
|
||||
gnDebuggerInfo debugger;
|
||||
};
|
||||
|
@@ -14,41 +14,3 @@ gnBool gnPhysicalDeviceCanPresentToSurface(gnPhysicalOutputDeviceHandle device,
|
||||
|
||||
gnPhysicalDeviceProperties gnGetPhysicalDeviceProperties(gnPhysicalOutputDeviceHandle device) { return device->properties; }
|
||||
gnPhysicalDeviceFeatures gnGetPhysicalDeviceFeatures(gnPhysicalOutputDeviceHandle device) { return device->features; }
|
||||
|
||||
// gnBool gnHasGraphicsQueue(gnPhysicalDevice device) {
|
||||
// for (int i = 0; i < device->queueProperties.queueCount; i++) {
|
||||
// if ((device->queueProperties.queueProperties[i].queueType & GN_QUEUE_GRAPHICS) == GN_QUEUE_GRAPHICS) {
|
||||
// return gnTrue;
|
||||
// }
|
||||
// }
|
||||
// return gnFalse;
|
||||
// }
|
||||
// gnBool gnHasPresentQueue(gnPhysicalDevice device, gnWindowSurfaceHandle windowSurface) {
|
||||
// for (int i = 0; i < device->queueProperties.queueCount; i++) {
|
||||
// if (gnQueueCanPresentToSurface(device, i, windowSurface)) {
|
||||
// return gnTrue;
|
||||
// }
|
||||
// }
|
||||
// return gnFalse;
|
||||
// }
|
||||
|
||||
// int gnGetGraphicsQueueIndex(gnPhysicalDevice device) {
|
||||
// for (int i = 0; i < device->queueProperties.queueCount; i++) {
|
||||
// if ((device->queueProperties.queueProperties[i].queueType & GN_QUEUE_GRAPHICS) == GN_QUEUE_GRAPHICS) {
|
||||
// return i;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// return -1;
|
||||
// }
|
||||
// int gnGetPresentQueueIndex(gnPhysicalDevice device, gnWindowSurfaceHandle windowSurface) {
|
||||
// for (int i = 0; i < device->queueProperties.queueCount; i++) {
|
||||
// if (gnQueueCanPresentToSurface(device, i, windowSurface)) {
|
||||
// return i;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// return -1;
|
||||
// }
|
||||
|
||||
// gnPhysicalDeviceQueueProperties gnGetPhysicalDeviceQueueProperties(gnPhysicalOutputDeviceHandle device) { return device->queueProperties; }
|
||||
|
@@ -28,29 +28,11 @@ typedef struct gnPhysicalDeviceFeatures {
|
||||
uint32_t maxPushConstantSize;
|
||||
} gnPhysicalDeviceFeatures;
|
||||
|
||||
// typedef enum gnQueueTypeFlags {
|
||||
// GN_QUEUE_GRAPHICS = 1 << 0,
|
||||
// GN_QUEUE_COMPUTE = 1 << 1,
|
||||
// GN_QUEUE_TRANSFER = 1 << 2,
|
||||
// GN_QUEUE_SPARSE_BINDING = 1 << 3
|
||||
// } gnQueueTypeFlags;
|
||||
|
||||
// typedef struct gnQueueProperties {
|
||||
// uint32_t queueCount;
|
||||
// gnQueueTypeFlags queueType;
|
||||
// } gnQueueProperties;
|
||||
|
||||
// typedef struct gnPhysicalDeviceQueueProperties {
|
||||
// uint32_t queueCount;
|
||||
// gnQueueProperties* queueProperties;
|
||||
// } gnPhysicalDeviceQueueProperties;
|
||||
|
||||
#ifdef GN_REVEAL_IMPL
|
||||
typedef struct gnPhysicalOutputDevice_t {
|
||||
struct gnPlatformPhysicalDevice_t* physicalDevice;
|
||||
gnPhysicalDeviceProperties properties;
|
||||
gnPhysicalDeviceFeatures features;
|
||||
// gnPhysicalDeviceQueueProperties queueProperties;
|
||||
|
||||
gnInstanceHandle instance;
|
||||
} gnPhysicalOutputDevice_t;
|
||||
@@ -61,10 +43,3 @@ gnBool gnPhysicalDeviceCanPresentToSurface(gnPhysicalOutputDeviceHandle device,
|
||||
|
||||
gnPhysicalDeviceProperties gnGetPhysicalDeviceProperties(gnPhysicalOutputDeviceHandle device);
|
||||
gnPhysicalDeviceFeatures gnGetPhysicalDeviceFeatures(gnPhysicalOutputDeviceHandle device);
|
||||
// gnPhysicalDeviceQueueProperties gnGetPhysicalDeviceQueueProperties(gnPhysicalOutputDeviceHandle device);
|
||||
|
||||
// gnBool gnHasGraphicsQueue(gnPhysicalOutputDeviceHandle device);
|
||||
// gnBool gnHasPresentQueue(gnPhysicalOutputDeviceHandle device, gnWindowSurfaceHandle windowSurface);
|
||||
|
||||
// int gnGetGraphicsQueueIndex(gnPhysicalOutputDeviceHandle device);
|
||||
// int gnGetPresentQueueIndex(gnPhysicalOutputDeviceHandle device, gnWindowSurfaceHandle windowSurface);
|
||||
|
Reference in New Issue
Block a user