attempt to remove some warnings when using -Wall

This commit is contained in:
Greg Wells
2025-05-29 22:34:49 -04:00
parent 77e92957a6
commit 706b558684
11 changed files with 68 additions and 36 deletions

View File

@@ -0,0 +1,10 @@
#pragma once
#include <core/command/command_pool/gryphn_command_pool.h>
#include "core/renderpass/gryphn_render_pass.h"
typedef struct gnCommandBuffer_t {
struct gnPlatformCommandBuffer_t* commandBuffer;
} gnCommandBuffer;
gnReturnCode gnBeginCommandBuffer(struct gnCommandBuffer_t* commandBuffer);
void gnCommandBufferBeginRenderPass(struct gnRenderPassInfo_t passInfo);

View File

@@ -53,7 +53,7 @@ typedef struct gnDebugger_t {
gnReturnCode gnCreateDebugger(gnDebugger* debugger, const struct gnDebuggerInfo_t info);
void gnDestroyDebugger(gnDebugger* debugger);
static void gnDebuggerSetErrorMessage(gnDebugger* debugger, gnMessageData data) {
void gnDebuggerSetErrorMessage(gnDebugger* debugger, gnMessageData data) {
debugger->info.callback(
GN_MESSAGE_ERROR,
GN_DEBUG_MESSAGE_VALIDATION,

View File

@@ -12,6 +12,7 @@
#include "pipelines/graphics_pipeline/gryphn_graphics_pipeline.h"
#include "framebuffer/gryphn_framebuffer.h"
#include "command/command_pool/gryphn_command_pool.h"
#include "command/command_buffer/gryphn_command_buffer.h"
typedef struct gnFunctions_t {
gnReturnCode (*_gnCreateInstance)(gnInstance* instance, struct gnInstanceInfo_t info);
@@ -71,3 +72,7 @@ typedef struct gnDeviceFunctions_t {
gnReturnCode (*_gnCreateCommandPool)(struct gnCommandPool_t* commandPool, struct gnOutputDevice_t* device, struct gnCommandPoolInfo_t info);
void (*_gnDestroyCommandPool)(struct gnCommandPool_t* commandPool);
} gnDeviceFunctions;
typedef struct gnCommandFunctions_t {
gnReturnCode (*_gnCommandPoolAllocateCommandBuffers)(struct gnCommandBuffer_t* commandBuffers, uint32_t count, struct gnCommandPool_t* pool);
} gnCommandFunctions;

View File

@@ -11,7 +11,7 @@ typedef enum gnRenderingAPI_t {
GN_RENDERINGAPI_METAL
} gnRenderingAPI;
static gnString gnRenderingAPIName(gnRenderingAPI api) {
gnString gnRenderingAPIName(gnRenderingAPI api) {
switch (api) {
case GN_RENDERINGAPI_NONE: return gnCreateString("GN_RENDERINGAPI_NONE");
case GN_RENDERINGAPI_SOFTWARE: return gnCreateString("GN_RENDERINGAPI_SOFTWARE");

View File

@@ -19,11 +19,15 @@ typedef struct gnInstanceInfo_t {
typedef struct gnInstance_t {
struct gnPlatformInstance_t* instance;
gnBool valid, loadDeviceFunctions;
gnBool valid,
loadDeviceFunctions,
loadCommandFunctions;
struct gnDynamicLibrary_t* dynamicLib;
struct gnFunctions_t* functions;
struct gnDeviceFunctions_t* deviceFunctions;
struct gnDynamicLibrary_t* dynamicLib;
struct gnCommandFunctions_t* commandFunctions;
struct gnDebugger_t* debugger;
} gnInstance;

View File

@@ -14,7 +14,7 @@ typedef struct gnPhysicalDeviceProperties_t {
} gnPhysicalDeviceProperties;
typedef struct gnPhysicalDeviceFeatures_t {
gnBool supportsGeometryShader;
} gnPhysicalDeviceFeatures;
typedef enum gnQueueTypeFlags_e {

View File

@@ -1,5 +1,6 @@
#pragma once
#include "stdint.h"
typedef struct gnUniformLayout_t {
uint32_t pushConstantCount;
} gnUniformLayout;

View File

@@ -0,0 +1,10 @@
#pragma once
#include "gryphn_render_pass_descriptor.h"
#include "core/framebuffer/gryphn_framebuffer.h"
typedef struct gnRenderPassInfo_t {
struct gnRenderPassDescriptor_t* renderPassDescriptor;
struct gnFramebuffer_t* framebuffer;
gnUInt2 offset;
gnUInt2 size;
} gnRenderPassInfo;