From bbffa6ad6945f2ea91a61dc7ab45c0fd814fcf82 Mon Sep 17 00:00:00 2001 From: Sam Spilsbury Date: Sun, 24 Apr 2016 23:40:52 +0800 Subject: shader: Format string must be provided inline and not as a variable --- src/video_core/shader/shader_jit_x64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index b47d3beda..d5a6a349c 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -148,7 +148,7 @@ static Instruction GetVertexShaderInstruction(size_t offset) { } static void LogCritical(const char* msg) { - LOG_CRITICAL(HW_GPU, msg); + LOG_CRITICAL(HW_GPU, "%s", msg); } void JitShader::Compile_Assert(bool condition, const char* msg) { -- cgit v1.2.3 From c6709d97bce27f248b78374a531a3ee01275c65d Mon Sep 17 00:00:00 2001 From: Sam Spilsbury Date: Sun, 24 Apr 2016 23:41:25 +0800 Subject: shader: Handle non-CALL opcodes with a break --- src/video_core/shader/shader_jit_x64.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/video_core') diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index d5a6a349c..9ee4065bf 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -795,6 +795,8 @@ void JitShader::FindReturnOffsets() { case OpCode::Id::CALLU: return_offsets.push_back(instr.flow_control.dest_offset + instr.flow_control.num_instructions); break; + default: + break; } } -- cgit v1.2.3 From 656a4424332824c144ef5b91482ee2a8d89fc0fb Mon Sep 17 00:00:00 2001 From: Sam Spilsbury Date: Sun, 24 Apr 2016 23:41:44 +0800 Subject: shader: Shader size is long uint, not uint. --- src/video_core/shader/shader_jit_x64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/shader/shader_jit_x64.cpp b/src/video_core/shader/shader_jit_x64.cpp index 9ee4065bf..b7747fa42 100644 --- a/src/video_core/shader/shader_jit_x64.cpp +++ b/src/video_core/shader/shader_jit_x64.cpp @@ -856,7 +856,7 @@ void JitShader::Compile() { uintptr_t size = reinterpret_cast(GetCodePtr()) - reinterpret_cast(program); ASSERT_MSG(size <= MAX_SHADER_SIZE, "Compiled a shader that exceeds the allocated size!"); - LOG_DEBUG(HW_GPU, "Compiled shader size=%d", size); + LOG_DEBUG(HW_GPU, "Compiled shader size=%lu", size); } JitShader::JitShader() { -- cgit v1.2.3