From 2fddf0e9d9ebe4ce6ded6149c0ce9e3312a37995 Mon Sep 17 00:00:00 2001 From: Gregory Wells Date: Mon, 4 Aug 2025 09:48:50 -0400 Subject: [PATCH] enable fast math --- .../src/pipelines/graphics_pipeline/metal_graphics_pipeline.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/apis/metal/src/pipelines/graphics_pipeline/metal_graphics_pipeline.m b/projects/apis/metal/src/pipelines/graphics_pipeline/metal_graphics_pipeline.m index 1f2fe13..5d86749 100644 --- a/projects/apis/metal/src/pipelines/graphics_pipeline/metal_graphics_pipeline.m +++ b/projects/apis/metal/src/pipelines/graphics_pipeline/metal_graphics_pipeline.m @@ -76,7 +76,8 @@ gnReturnCode createMetalGraphicsPipeline(gnGraphicsPipeline graphicsPipeline, gn // printf("shader code: %s\n", shaderCode); NSError* error = nil; - MTLCompileOptions* mtloptions = nil; + MTLCompileOptions* mtloptions = [[MTLCompileOptions alloc] init]; + mtloptions.mathMode = MTLMathModeFast; NSString* sourceCode = [NSString stringWithCString:shaderCode encoding:NSUTF8StringEncoding]; id shaderLib = [device->outputDevice->device newLibraryWithSource:sourceCode options:mtloptions error:&error]; if (!shaderLib) {