From f73cc61693b6a7c561798223fd0c997c4c1d21e6 Mon Sep 17 00:00:00 2001 From: Dynamitos Date: Sat, 15 Feb 2025 14:03:55 +0100 Subject: [PATCH] Have to refactor basically the entire uniform buffer API --- src/Engine/Graphics/Metal/Command.mm | 1 + src/Engine/Graphics/Metal/Descriptor.mm | 1 - src/Engine/Graphics/RenderPass/LightCullingPass.cpp | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Engine/Graphics/Metal/Command.mm b/src/Engine/Graphics/Metal/Command.mm index cb1e0fb..151836e 100644 --- a/src/Engine/Graphics/Metal/Command.mm +++ b/src/Engine/Graphics/Metal/Command.mm @@ -3,6 +3,7 @@ #include "Containers/Array.h" #include "Descriptor.h" #include "Enums.h" +#include "Foundation/NSString.hpp" #include "Graphics/Command.h" #include "Graphics/Enums.h" #include "Graphics/Graphics.h" diff --git a/src/Engine/Graphics/Metal/Descriptor.mm b/src/Engine/Graphics/Metal/Descriptor.mm index 085346c..41c292a 100644 --- a/src/Engine/Graphics/Metal/Descriptor.mm +++ b/src/Engine/Graphics/Metal/Descriptor.mm @@ -130,7 +130,6 @@ void DescriptorSet::updateSampler(uint32 binding, uint32 index, Gfx::PSampler sa .index = flattenedIndex, .sampler = sampler->getHandle(), }); - boundResources[flattenedIndex] = nullptr; // Samplers are not resources?????? } void DescriptorSet::updateTexture(uint32 binding, uint32 index, Gfx::PTexture2D texture) { diff --git a/src/Engine/Graphics/RenderPass/LightCullingPass.cpp b/src/Engine/Graphics/RenderPass/LightCullingPass.cpp index 73ca58e..e5d1e52 100644 --- a/src/Engine/Graphics/RenderPass/LightCullingPass.cpp +++ b/src/Engine/Graphics/RenderPass/LightCullingPass.cpp @@ -271,8 +271,6 @@ void LightCullingPass::setupFrustums() { graphics->beginShaderCompilation(createInfo); frustumShader = graphics->createComputeShader({0}); // Have to compile shader before finalizing layout as parameters get mapped later - Metal::ComputeShader* shader = (Metal::ComputeShader*)(*frustumShader); - std::cout << shader->getFunction()->newArgumentEncoder(1)->debugDescription()->cString(NS::ASCIIStringEncoding) << std::endl; frustumLayout->create(); Gfx::ComputePipelineCreateInfo pipelineInfo;