actually get uniforms to work (with my test case)

This commit is contained in:
Gregory Wells
2025-07-21 09:33:05 -04:00
parent 3497e32e47
commit 6b71e44d21
5 changed files with 134 additions and 30 deletions

View File

@@ -1,6 +1,8 @@
#pragma once
#include "uniforms/gryphn_uniform.h"
#include <Metal/Metal.h>
#include <uniforms/gryphn_uniform_pool.h>
#include "shader_module/metal_shader_module.h"
typedef struct metalUniformBinding {
gnUniformType type;
@@ -8,9 +10,15 @@ typedef struct metalUniformBinding {
void* data;
} metalUniformBinding;
typedef id<MTLResource> mtlResource;
GN_ARRAY_LIST(mtlResource);
typedef struct gnPlatformUniform_t {
uint32_t bindingCount;
metalUniformBinding* bindings;
uint32_t index[MAX_METAL_BINDINGS];
id<MTLArgumentEncoder> encoder;
id<MTLBuffer> argumentBuffer;
mtlResourceArrayList resources;
} gnPlatformUniform;
void updateMetalBufferUniform(gnUniform uniform, gnBufferUniformInfo* info);