vulkan creation and destruction of shader modules
This commit is contained in:
@@ -53,5 +53,5 @@ typedef struct gnDeviceFunctions_t {
|
||||
void (*_gnDestroyPresentationQueue)(gnPresentationQueue *presentationQueue);
|
||||
|
||||
gnReturnCode (*_gnCreateShaderModule)(struct gnShaderModule_t* module, struct gnOutputDevice_t* device, struct gnShaderModuleInfo_t shaderModuleInfo);
|
||||
void (*_gnDestroyShaderModule)(struct gnShaderModuleInfo_t* module);
|
||||
void (*_gnDestroyShaderModule)(struct gnShaderModule_t* module);
|
||||
} gnDeviceFunctions;
|
||||
|
@@ -5,3 +5,7 @@ gnReturnCode gnCreateShaderModule(struct gnShaderModule_t* module, struct gnOutp
|
||||
module->device = device;
|
||||
return device->deviceFunctions->_gnCreateShaderModule(module, device, shaderModuleInfo);
|
||||
}
|
||||
|
||||
void gnDestroyShaderModule(struct gnShaderModule_t* module) {
|
||||
module->device->deviceFunctions->_gnDestroyShaderModule(module);
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ typedef enum gnShaderModuleStage_e {
|
||||
|
||||
typedef struct gnShaderModuleInfo_t {
|
||||
enum gnShaderModuleStage_e stage;
|
||||
unsigned char* code;
|
||||
uint32_t* code;
|
||||
uint32_t size;
|
||||
gnString entryPoint;
|
||||
} gnShaderModuleInfo;
|
||||
@@ -22,3 +22,4 @@ typedef struct gnShaderModule_t {
|
||||
} gnShaderModule;
|
||||
|
||||
gnReturnCode gnCreateShaderModule(struct gnShaderModule_t* module, struct gnOutputDevice_t* device, struct gnShaderModuleInfo_t shaderModuleInfo);
|
||||
void gnDestroyShaderModule(struct gnShaderModule_t* module);
|
||||
|
@@ -16,12 +16,11 @@ typedef enum gnReturnCode_t {
|
||||
GN_UNKNOWN_IMAGE_FORMAT,
|
||||
GN_FAILED_TO_CREATE_PRESENTATION_QUEUE,
|
||||
GN_UNSUPPORTED_IMAGE_COUNT,
|
||||
GN_FAILED_TO_CREATE_IMAGE_VIEW
|
||||
GN_FAILED_TO_CREATE_IMAGE_VIEW,
|
||||
GN_FAILED_TO_CREATE_SHADER_MODULE
|
||||
|
||||
// GN_UNKNOWN_FRAMEBUFFER_ATTACHMENT,
|
||||
// GN_UNKNOWN_SHADER_MODULE,
|
||||
// GN_UNKNOWN_FUNCTION,
|
||||
// GN_SHADER_FAILED_TO_COMPILE,
|
||||
// GN_UNKNOWN_COLOR_FORMAT,
|
||||
// GN_FAILED_CREATE_GRAPHICS_PIPELINE,
|
||||
// GN_FAILED_TO_CREATE_FRAMEBUFFER,
|
||||
@@ -48,5 +47,6 @@ static const char* gnErrorCodeToCString(enum gnReturnCode_t returnCode) {
|
||||
case GN_FAILED_TO_CREATE_PRESENTATION_QUEUE: return "GN_FAILED_TO_CREATE_PRESENTATION_QUEUE";
|
||||
case GN_UNSUPPORTED_IMAGE_COUNT: return "GN_UNSUPPORTED_IMAGE_COUNT";
|
||||
case GN_FAILED_TO_CREATE_IMAGE_VIEW: return "GN_FAILED_TO_CREATE_IMAGE_VIEW";
|
||||
case GN_FAILED_TO_CREATE_SHADER_MODULE: return "GN_FAILED_TO_CREATE_SHADER_MODULE";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user