redo some syncronization stuff
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#include "command/command_pool/gryphn_command_pool.h"
|
||||
#include "instance/gryphn_instance.h"
|
||||
|
||||
#include "stdio.h"
|
||||
|
||||
gnReturnCode gnCommandPoolAllocateCommandBuffersFromPointer(gnCommandBufferHandle* buffers, uint32_t count, gnCommandPoolHandle commandPool) {
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
buffers[i] = malloc(sizeof(struct gnCommandBuffer_t));
|
||||
@@ -12,11 +14,11 @@ gnReturnCode gnCommandPoolAllocateCommandBuffersFromPointer(gnCommandBufferHandl
|
||||
}
|
||||
|
||||
gnReturnCode gnCommandPoolAllocateCommandBuffersFromList(gnCommandBufferArrayList buffers, uint32_t count, gnCommandPoolHandle commandPool) {
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
gnCommandBufferArrayListAt(buffers, i)->commandBuffer = malloc(sizeof(struct gnCommandBuffer_t));
|
||||
gnCommandBufferArrayListAt(buffers, i)->commandPool = commandPool;
|
||||
}
|
||||
return gnCommandPoolAllocateCommandBuffersFromPointer(gnCommandBufferArrayListData(buffers), count, commandPool);
|
||||
gnCommandBufferHandle* buffersArray = malloc(sizeof(gnCommandBufferHandle) * count);
|
||||
gnReturnCode code = gnCommandPoolAllocateCommandBuffersFromPointer(buffersArray, count, commandPool);
|
||||
for (uint32_t i = 0; i < count; i++)
|
||||
gnCommandBufferArrayListAdd(buffers, buffersArray[i]);
|
||||
return code;
|
||||
}
|
||||
|
||||
void gnResetCommandBuffer(gnCommandBufferHandle commandBuffer) {
|
||||
|
@@ -5,10 +5,8 @@
|
||||
#include "loader/src/gryphn_loader.h"
|
||||
#include "loader/src/gryphn_loader.h"
|
||||
#include "stdio.h"
|
||||
|
||||
#include "validation_layers/function_loader/loader/function_loader.h"
|
||||
|
||||
|
||||
// this implementation of gnCreateInstance cannot return GN_UNLOADED_LAYER
|
||||
gnReturnCode gnCreateInstance(gnInstanceHandle* instance, gnInstanceCreateInfo* info) {
|
||||
*instance = malloc(sizeof(struct gnInstance_t));
|
||||
@@ -28,8 +26,8 @@ gnReturnCode gnCreateInstance(gnInstanceHandle* instance, gnInstanceCreateInfo*
|
||||
if (!gnIsExtensionSuppoted(info->coreAPI, info->extensions[i])) unsupportedExtension = GN_TRUE;
|
||||
}
|
||||
|
||||
// if ((*instance)->enabledExtensions[GN_EXT_SYNCHRONIZATION]) (*instance)->layers.data[0].syncFunctions = loadAPISyncFunctions(info->coreAPI);
|
||||
// if ((*instance)->enabledExtensions[GN_EXT_QUEUES]) (*instance)->layers.data[0].queueFunctions = loadAPIQueueFunctions(info->coreAPI);
|
||||
if ((*instance)->enabledExtensions[GN_EXT_SYNCHRONIZATION]) loaderLayerArrayListRefAt((*instance)->layers, 0)->syncFunctions = loadAPISyncFunctions(info->coreAPI);
|
||||
if ((*instance)->enabledExtensions[GN_EXT_QUEUES]) loaderLayerArrayListRefAt((*instance)->layers, 0)->queueFunctions = loadAPIQueueFunctions(info->coreAPI);
|
||||
|
||||
if (info->debuggerInfo.layerCount > 0) {
|
||||
for (uint32_t i = 0; i < info->debuggerInfo.layerCount; i++) {
|
||||
|
Reference in New Issue
Block a user