From 577d81071eae21541359a3443d7993cb02601162 Mon Sep 17 00:00:00 2001 From: Stuart Carnie Date: Sun, 15 Jul 2018 15:58:23 -0700 Subject: [PATCH] fix(Metal): Cleanup shader logging messages --- gfx/common/metal_common.m | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gfx/common/metal_common.m b/gfx/common/metal_common.m index ad433da056..007f451abf 100644 --- a/gfx/common/metal_common.m +++ b/gfx/common/metal_common.m @@ -1204,7 +1204,7 @@ static vertex_t vertex_bytes[] = { if (lib == nil) { save_msl = true; - RARCH_ERR("Metal]: unable to compile vertex shader: %s\n", err.localizedDescription.UTF8String); + RARCH_ERR("[Metal]: unable to compile vertex shader: %s\n", err.localizedDescription.UTF8String); return NO; } #if DEBUG @@ -1220,7 +1220,7 @@ static vertex_t vertex_bytes[] = { if (lib == nil) { save_msl = true; - RARCH_ERR("Metal]: unable to compile fragment shader: %s\n", err.localizedDescription.UTF8String); + RARCH_ERR("[Metal]: unable to compile fragment shader: %s\n", err.localizedDescription.UTF8String); return NO; } #if DEBUG @@ -1234,7 +1234,8 @@ static vertex_t vertex_bytes[] = { if (err != nil) { save_msl = true; - RARCH_ERR("error creating pipeline state: %s", err.localizedDescription.UTF8String); + RARCH_ERR("[Metal]: error creating pipeline state for pass %d: %s\n", i, + err.localizedDescription.UTF8String); return NO; } @@ -1253,10 +1254,11 @@ static vertex_t vertex_bytes[] = { { if (save_msl) { - RARCH_LOG("[Metal]: saving metal shader files\n"); + NSString *basePath = [[NSString stringWithUTF8String:shader->pass[i].source.path] stringByDeletingPathExtension]; + + RARCH_LOG("[Metal]: saving metal shader files to %s\n", basePath.UTF8String); NSError *err = nil; - NSString *basePath = [[NSString stringWithUTF8String:shader->pass[i].source.path] stringByDeletingPathExtension]; [vs_src writeToFile:[basePath stringByAppendingPathExtension:@"vs.metal"] atomically:NO encoding:NSStringEncodingConversionAllowLossy