remove gnCreateDebugger function
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include "metal_command_buffer.h"
|
||||
#include "commands/command_pool/metal_command_pool.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
#include "instance/gryphn_instance.h"
|
||||
#import <Metal/Metal.h>
|
||||
|
||||
|
@@ -1,9 +0,0 @@
|
||||
#include <debugger/gryphn_debugger.h>
|
||||
|
||||
// these do nothing because I am too lazy to write a debugger for metal at this point in time
|
||||
gnReturnCode gnCreateDebuggerFn(gnDebuggerHandle debugger, gnInstanceHandle instance, const gnDebuggerInfo info) {
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
void gnDestroyDebuggerFn(gnDebuggerHandle instance) {
|
||||
|
||||
}
|
@@ -3,7 +3,6 @@
|
||||
#include "metal_output_devices.h"
|
||||
#include "instance/metal_instance.h"
|
||||
#include "instance/gryphn_instance.h"
|
||||
#include <debugger/gryphn_debugger.h>
|
||||
|
||||
gnReturnCode createMetalOutputDevice(gnOutputDeviceHandle outputDevice, gnInstanceHandle instance, gnOutputDeviceInfo deviceInfo) {
|
||||
outputDevice->outputDevice = malloc(sizeof(gnPlatformOutputDevice));
|
||||
|
@@ -1,5 +1,4 @@
|
||||
#include "metal_framebuffer.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
#include "texture/metal_texture.h"
|
||||
#include "renderpass/gryphn_render_pass_descriptor.h"
|
||||
#include "instance/gryphn_instance.h"
|
||||
|
@@ -1,6 +1,5 @@
|
||||
#include "metal_graphics_pipeline.h"
|
||||
#include "devices/metal_output_devices.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
#include "shader_module/metal_shader_module.h"
|
||||
#include "surface/metal_surface.h"
|
||||
#include "texture/metal_texture.h"
|
||||
|
@@ -4,7 +4,6 @@
|
||||
#include "devices/metal_output_devices.h"
|
||||
#include "sync/semaphore/metal_semaphore.h"
|
||||
#include "presentation_queue/metal_presentation_queue.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
#include "texture/metal_texture.h"
|
||||
#import <QuartzCore/CAMetalLayer.h>
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#include "metal_presentation_queue.h"
|
||||
#include "surface/metal_surface.h"
|
||||
#include "devices/metal_output_devices.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
#include "texture/metal_texture.h"
|
||||
#include "sync/semaphore/metal_semaphore.h"
|
||||
|
||||
|
@@ -1,12 +1,12 @@
|
||||
#include "metal_shader_module.h"
|
||||
#include "spirv_cross_c.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
#include "instance/gryphn_debugger.h"
|
||||
#include "devices/metal_output_devices.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Metal/Metal.h>
|
||||
|
||||
void mtlSpirVErrorCallback(void *userdata, const char *error) {
|
||||
gnDebugger debugger = (gnDebugger)userdata;
|
||||
gnDebuggerInfo debugger = *((gnDebuggerInfo*)userdata);
|
||||
gnDebuggerSetErrorMessage(debugger, (gnMessageData){
|
||||
.message = gnCombineStrings(gnCreateString("shader compilation error MSL "), gnCreateString(error))
|
||||
});
|
||||
@@ -25,7 +25,7 @@ gnReturnCode createMetalShaderModule(gnShaderModule module, gnDevice device, gnS
|
||||
size_t count;
|
||||
|
||||
spvc_context_create(&context);
|
||||
spvc_context_set_error_callback(context, mtlSpirVErrorCallback, module->device->instance->debugger);
|
||||
spvc_context_set_error_callback(context, mtlSpirVErrorCallback, &module->device->instance->debugger);
|
||||
spvc_context_parse_spirv(context, shaderModuleInfo.code, shaderModuleInfo.size / 4, &ir);
|
||||
spvc_context_create_compiler(context, SPVC_BACKEND_MSL, ir, SPVC_CAPTURE_MODE_COPY, &compiler);
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
#include "submit/gryphn_submit.h"
|
||||
#include "sync/semaphore/metal_semaphore.h"
|
||||
#include "commands/command_buffer/metal_command_buffer.h"
|
||||
#include "debugger/gryphn_debugger.h"
|
||||
#include "commands/command_pool/metal_command_pool.h"
|
||||
#include "synchronization/commands/gryphn_sync_submit.h"
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
#include "vulkan_debugger.h"
|
||||
#include <instance/vulkan_instance.h>
|
||||
// #include "vulkan_debugger.h"
|
||||
// #include <instance/vulkan_instance.h>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <debugger/gryphn_debugger.h>
|
||||
// #pragma once
|
||||
// #include <vulkan/vulkan.h>
|
||||
// #include <debugger/gryphn_debugger.h>
|
||||
|
||||
typedef struct gnPlatformDebugger_t {
|
||||
VkDebugUtilsMessengerEXT debugMessenger;
|
||||
} gnPlatformDebugger;
|
||||
// typedef struct gnPlatformDebugger_t {
|
||||
// VkDebugUtilsMessengerEXT debugMessenger;
|
||||
// } gnPlatformDebugger;
|
||||
|
@@ -80,8 +80,8 @@ gnReturnCode createInstance(gnInstanceHandle instance, gnInstanceInfo instanceIn
|
||||
#endif
|
||||
|
||||
if (instanceInfo.debugger != NULL) {
|
||||
for (int i = 0; i < instanceInfo.debugger->info.layerCount; i++) {
|
||||
if (instanceInfo.debugger->info.layers[i] == GN_DEBUGGER_LAYER_PLATFORM) {
|
||||
for (int i = 0; i < instanceInfo.debugger->layerCount; i++) {
|
||||
if (instanceInfo.debugger->layers[i] == GN_DEBUGGER_LAYER_PLATFORM) {
|
||||
vkStringArrayListAdd(&extensions, VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
|
||||
|
||||
const char* validation_layers[1] = { "VK_LAYER_KHRONOS_validation" };
|
||||
@@ -89,8 +89,8 @@ gnReturnCode createInstance(gnInstanceHandle instance, gnInstanceInfo instanceIn
|
||||
createInfo.ppEnabledLayerNames = (const char*[]){ "VK_LAYER_KHRONOS_validation" };
|
||||
|
||||
vkUserData* userData = malloc(sizeof(vkUserData));
|
||||
userData->debuggerCallback = instanceInfo.debugger->info.callback;
|
||||
userData->userData = instanceInfo.debugger->info.userData;
|
||||
userData->debuggerCallback = instanceInfo.debugger->callback;
|
||||
userData->userData = instanceInfo.debugger->userData;
|
||||
|
||||
VkDebugUtilsMessengerCreateInfoEXT debugCreateInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT,
|
||||
|
@@ -34,7 +34,7 @@ gnReturnCode createOutputDevice(gnOutputDeviceHandle outputDevice, gnInstanceHan
|
||||
for (int i = 0; i < deviceCreateInfo.enabledExtensionCount; i++)
|
||||
if (strcmp(deviceCreateInfo.ppEnabledExtensionNames[i], VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME) == 0) outputDevice->outputDevice->enabledOversizedDescriptorPools = gnTrue;
|
||||
|
||||
if (instance->debugger == NULL)
|
||||
if (instance->hasDebugger)
|
||||
deviceCreateInfo.enabledLayerCount = 0;
|
||||
else {
|
||||
const char* validation_layers[1] = { "VK_LAYER_KHRONOS_validation" };
|
||||
|
Reference in New Issue
Block a user