diff --git a/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalPipeline.cpp b/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalPipeline.cpp index 52294dbd90..daf1883458 100644 --- a/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalPipeline.cpp +++ b/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalPipeline.cpp @@ -1694,23 +1694,19 @@ void plMetalPipeline::IBindLights() size_t lightSize = offsetof(plMetalLights, lampSources) + (sizeof(plMetalShaderLightSource) * fLights.count); // FIXME: These states should support dirtying instead of expense memcmps - if ( !(fState.fBoundLights.has_value() && fState.fBoundLights == fLights) ) - { + if ( !(fState.fBoundLights.has_value() && fState.fBoundLights == fLights) ) { fState.fBoundLights = fLights; - if (fLightingPerPixel) - { + if (fLightingPerPixel) { fDevice.CurrentRenderCommandEncoder()->setFragmentBytes(&fLights, sizeof(plMetalLights), FragmentShaderArgumentLights); } else { fDevice.CurrentRenderCommandEncoder()->setVertexBytes(&fLights, sizeof(plMetalLights), VertexShaderArgumentLights); } } - if ( !(fState.fBoundMaterialProperties.has_value() && fState.fBoundMaterialProperties == fCurrentRenderPassMaterialLighting) ) - { + if ( !(fState.fBoundMaterialProperties.has_value() && fState.fBoundMaterialProperties == fCurrentRenderPassMaterialLighting) ) { fState.fBoundMaterialProperties = fCurrentRenderPassMaterialLighting; fDevice.CurrentRenderCommandEncoder()->setVertexBytes(&fDevice.fPipeline->fCurrentRenderPassMaterialLighting, sizeof(plMaterialLightingDescriptor), VertexShaderArgumentMaterialLighting); - if (fLightingPerPixel) - { + if (fLightingPerPixel) { fDevice.CurrentRenderCommandEncoder()->setFragmentBytes(&fDevice.fPipeline->fCurrentRenderPassMaterialLighting, sizeof(plMaterialLightingDescriptor), FragmentShaderArgumentMaterialLighting); } } diff --git a/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalPipelineState.cpp b/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalPipelineState.cpp index db58b1cf77..037a50ff66 100644 --- a/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalPipelineState.cpp +++ b/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalPipelineState.cpp @@ -42,6 +42,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "plMetalPipelineState.h" +#include "HeadSpin.h" #include "plDrawable/plGBufferGroup.h" #include "plGImage/plCubicEnvironmap.h" #include "plGImage/plMipmap.h" @@ -271,7 +272,7 @@ MTL::Function* plMetalMaterialPassPipelineState::GetVertexFunction(MTL::Library* MTL::Function* function = library->newFunction(NS::String::string("pipelineVertexShader", NS::ASCIIStringEncoding), MakeFunctionConstants(), &error); - assert(!error); + hsAssert(!error, "Could not find vertex function"); return function->autorelease(); } @@ -281,7 +282,7 @@ MTL::Function* plMetalMaterialPassPipelineState::GetFragmentFunction(MTL::Librar MTL::Function* function = library->newFunction(NS::String::string("pipelineFragmentShader", NS::ASCIIStringEncoding), MakeFunctionConstants(), &error); - assert(!error); + hsAssert(!error, "Could not find fragment function"); return function->autorelease(); }