reformat all files with clang-format

This commit is contained in:
wwylele 2018-06-29 16:56:12 +03:00
parent 7c5a76e58b
commit 0eab948728
79 changed files with 659 additions and 707 deletions

View file

@ -43,9 +43,8 @@ RasterizerOpenGL::RasterizerOpenGL()
allow_shadow = GLAD_GL_ARB_shader_image_load_store && GLAD_GL_ARB_shader_image_size &&
GLAD_GL_ARB_framebuffer_no_attachments;
if (!allow_shadow) {
LOG_WARNING(
Render_OpenGL,
"Shadow might not be able to render because of unsupported OpenGL extensions.");
LOG_WARNING(Render_OpenGL,
"Shadow might not be able to render because of unsupported OpenGL extensions.");
}
// Clipping plane 0 is always enabled for PICA fixed clip plane z <= 0
@ -1601,7 +1600,7 @@ void RasterizerOpenGL::SyncCullMode() {
default:
LOG_CRITICAL(Render_OpenGL, "Unknown cull mode {}",
static_cast<u32>(regs.rasterizer.cull_mode.Value()));
static_cast<u32>(regs.rasterizer.cull_mode.Value()));
UNIMPLEMENTED();
break;
}

View file

@ -1391,7 +1391,7 @@ SurfaceSurfaceRect_Tuple RasterizerCacheOpenGL::GetFramebufferSurfaces(
if (using_color_fb && using_depth_fb &&
boost::icl::length(color_vp_interval & depth_vp_interval)) {
LOG_CRITICAL(Render_OpenGL, "Color and depth framebuffer memory regions overlap; "
"overlapping framebuffers not supported!");
"overlapping framebuffers not supported!");
using_depth_fb = false;
}

View file

@ -573,8 +573,8 @@ private:
default: {
LOG_ERROR(HW_GPU, "Unhandled arithmetic instruction: 0x{:02x} ({}): 0x{:08x}",
(int)instr.opcode.Value().EffectiveOpCode(),
instr.opcode.Value().GetInfo().name, instr.hex);
(int)instr.opcode.Value().EffectiveOpCode(),
instr.opcode.Value().GetInfo().name, instr.hex);
throw DecompileFail("Unhandled instruction");
break;
}
@ -617,8 +617,8 @@ private:
}
} else {
LOG_ERROR(HW_GPU, "Unhandled multiply-add instruction: 0x{:02x} ({}): 0x{:08x}",
(int)instr.opcode.Value().EffectiveOpCode(),
instr.opcode.Value().GetInfo().name, instr.hex);
(int)instr.opcode.Value().EffectiveOpCode(),
instr.opcode.Value().GetInfo().name, instr.hex);
throw DecompileFail("Unhandled instruction");
}
break;
@ -771,8 +771,8 @@ private:
default: {
LOG_ERROR(HW_GPU, "Unhandled instruction: 0x{:02x} ({}): 0x{:08x}",
(int)instr.opcode.Value().EffectiveOpCode(),
instr.opcode.Value().GetInfo().name, instr.hex);
(int)instr.opcode.Value().EffectiveOpCode(),
instr.opcode.Value().GetInfo().name, instr.hex);
throw DecompileFail("Unhandled instruction");
break;
}

View file

@ -270,7 +270,7 @@ void PicaGSConfigCommonRaw::Init(const Pica::Regs& regs) {
semantic_maps[static_cast<size_t>(semantic)] = {attrib, comp};
} else if (semantic != VSOutputAttributes::INVALID) {
LOG_ERROR(Render_OpenGL, "Invalid/unknown semantic id: {}",
static_cast<u32>(semantic));
static_cast<u32>(semantic));
}
}
}
@ -321,7 +321,7 @@ static std::string SampleTexture(const PicaFSConfig& config, unsigned texture_un
return "shadowTextureCube(texcoord0, texcoord0_w)";
default:
LOG_CRITICAL(HW_GPU, "Unhandled texture type {:x}",
static_cast<int>(state.texture0_type));
static_cast<int>(state.texture0_type));
UNIMPLEMENTED();
return "texture(tex0, texcoord0)";
}
@ -535,7 +535,7 @@ static void AppendColorCombiner(std::string& out, TevStageConfig::Operation oper
default:
out += "vec3(0.0)";
LOG_CRITICAL(Render_OpenGL, "Unknown color combiner operation: {}",
static_cast<u32>(operation));
static_cast<u32>(operation));
break;
}
out += ", vec3(0.0), vec3(1.0))"; // Clamp result to 0.0, 1.0
@ -576,7 +576,7 @@ static void AppendAlphaCombiner(std::string& out, TevStageConfig::Operation oper
default:
out += "0.0";
LOG_CRITICAL(Render_OpenGL, "Unknown alpha combiner operation: {}",
static_cast<u32>(operation));
static_cast<u32>(operation));
break;
}
out += ", 0.0, 1.0)";

View file

@ -43,7 +43,7 @@ GLuint LoadShader(const char* source, GLenum type) {
LOG_DEBUG(Render_OpenGL, "{}", &shader_error[0]);
} else {
LOG_ERROR(Render_OpenGL, "Error compiling {} shader:\n{}", debug_type,
&shader_error[0]);
&shader_error[0]);
LOG_ERROR(Render_OpenGL, "Shader source code:\n{}", source);
}
}

View file

@ -172,8 +172,8 @@ void RendererOpenGL::LoadFBToScreenInfo(const GPU::Regs::FramebufferConfig& fram
: (!right_eye ? framebuffer.address_left2 : framebuffer.address_right2);
LOG_TRACE(Render_OpenGL, "0x{:08x} bytes from 0x{:08x}({}x{}), fmt {:x}",
framebuffer.stride * framebuffer.height, framebuffer_addr, (int)framebuffer.width,
(int)framebuffer.height, (int)framebuffer.format);
framebuffer.stride * framebuffer.height, framebuffer_addr, (int)framebuffer.width,
(int)framebuffer.height, (int)framebuffer.format);
int bpp = GPU::Regs::BytesPerPixel(framebuffer.color_format);
size_t pixel_stride = framebuffer.stride / bpp;
@ -494,8 +494,8 @@ static void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum
level = Log::Level::Debug;
break;
}
LOG_GENERIC(Log::Class::Render_OpenGL, level, "{} {} {}: {}", GetSource(source),
GetType(type), id, message);
LOG_GENERIC(Log::Class::Render_OpenGL, level, "{} {} {}: {}", GetSource(source), GetType(type),
id, message);
}
/// Initialize the renderer