move device functions over to loader

This commit is contained in:
Gregory Wells
2025-06-24 13:46:01 -04:00
parent 93921452ba
commit 8d2c58b0e9
32 changed files with 172 additions and 134 deletions

View File

@@ -1,7 +1,7 @@
#include "vulkan_command_pool.h"
#include "output_device/vulkan_output_devices.h"
gnReturnCode gnCreateCommandPoolFn(struct gnCommandPool_t* commandPool, struct gnOutputDevice_t* device, struct gnCommandPoolInfo_t info) {
gnReturnCode gnCreateCommandPoolFn(struct gnCommandPool_t* commandPool, struct gnOutputDevice_t* device, gnCommandPoolInfo info) {
commandPool->commandPool = malloc(sizeof(gnPlatformCommandPool));
VkCommandPoolCreateInfo poolInfo = {

View File

@@ -8,7 +8,7 @@
#include "uniforms/vulkan_uniform.h"
#include "shader_module/vulkan_shader_module.h"
void gnCommandBeginRenderPassFn(gnCommandBuffer buffer, struct gnRenderPassInfo_t passInfo) {
void gnCommandBeginRenderPassFn(gnCommandBuffer buffer, gnRenderPassInfo passInfo) {
VkClearValue* values = malloc(sizeof(VkClearValue) * passInfo.clearValueCount);
for (int i = 0; i < passInfo.clearValueCount; i++) {
values[i] = (VkClearValue){{{
@@ -51,7 +51,7 @@ void gnCommandSetViewportFn(gnCommandBuffer buffer, gnViewport viewport) {
};
vkCmdSetViewport(buffer->commandBuffer->buffer, 0, 1, &vkViewport);
}
void gnCommandSetScissorFn(gnCommandBuffer buffer, struct gnScissor_t scissor) {
void gnCommandSetScissorFn(gnCommandBuffer buffer, gnScissor scissor) {
VkRect2D vkScissor = {
.extent = { scissor.size.x, scissor.size.y },
.offset = { scissor.position.x, scissor.position.y }