mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 14:50:04 +00:00
video_core: clean format warnings
This commit is contained in:
parent
ed17c54307
commit
47c0c87c47
@ -193,7 +193,7 @@ struct FramebufferRegs {
|
||||
case ColorFormat::RGBA4:
|
||||
return 2;
|
||||
default:
|
||||
LOG_CRITICAL(HW_GPU, "Unknown color format %u", format);
|
||||
LOG_CRITICAL(HW_GPU, "Unknown color format %u", static_cast<u32>(format));
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
}
|
||||
@ -258,7 +258,7 @@ struct FramebufferRegs {
|
||||
return 4;
|
||||
}
|
||||
|
||||
ASSERT_MSG(false, "Unknown depth format %u", format);
|
||||
ASSERT_MSG(false, "Unknown depth format %u", static_cast<u32>(format));
|
||||
}
|
||||
|
||||
// Returns the number of bits per depth component of the specified depth format
|
||||
@ -271,7 +271,7 @@ struct FramebufferRegs {
|
||||
return 24;
|
||||
}
|
||||
|
||||
ASSERT_MSG(false, "Unknown depth format %u", format);
|
||||
ASSERT_MSG(false, "Unknown depth format %u", static_cast<u32>(format));
|
||||
}
|
||||
|
||||
INSERT_PADDING_WORDS(0x20);
|
||||
|
@ -1338,7 +1338,8 @@ void RasterizerOpenGL::SyncCullMode() {
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown cull mode %d", regs.rasterizer.cull_mode.Value());
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown cull mode %u",
|
||||
static_cast<u32>(regs.rasterizer.cull_mode.Value()));
|
||||
UNIMPLEMENTED();
|
||||
break;
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ static void AppendSource(std::string& out, const PicaShaderConfig& config,
|
||||
break;
|
||||
default:
|
||||
out += "vec4(0.0)";
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown source op %u", source);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown source op %u", static_cast<u32>(source));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -323,7 +323,7 @@ static void AppendColorModifier(std::string& out, const PicaShaderConfig& config
|
||||
break;
|
||||
default:
|
||||
out += "vec3(0.0)";
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown color modifier op %u", modifier);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown color modifier op %u", static_cast<u32>(modifier));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -372,7 +372,7 @@ static void AppendAlphaModifier(std::string& out, const PicaShaderConfig& config
|
||||
break;
|
||||
default:
|
||||
out += "0.0";
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown alpha modifier op %u", modifier);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown alpha modifier op %u", static_cast<u32>(modifier));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -416,7 +416,8 @@ static void AppendColorCombiner(std::string& out, TevStageConfig::Operation oper
|
||||
break;
|
||||
default:
|
||||
out += "vec3(0.0)";
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown color combiner operation: %u", operation);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown color combiner operation: %u",
|
||||
static_cast<u32>(operation));
|
||||
break;
|
||||
}
|
||||
out += ", vec3(0.0), vec3(1.0))"; // Clamp result to 0.0, 1.0
|
||||
@ -456,7 +457,8 @@ static void AppendAlphaCombiner(std::string& out, TevStageConfig::Operation oper
|
||||
break;
|
||||
default:
|
||||
out += "0.0";
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown alpha combiner operation: %u", operation);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown alpha combiner operation: %u",
|
||||
static_cast<u32>(operation));
|
||||
break;
|
||||
}
|
||||
out += ", 0.0, 1.0)";
|
||||
@ -486,7 +488,7 @@ static void AppendAlphaTestCondition(std::string& out, FramebufferRegs::CompareF
|
||||
|
||||
default:
|
||||
out += "false";
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown alpha test condition %u", func);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown alpha test condition %u", static_cast<u32>(func));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ inline GLenum BlendEquation(Pica::FramebufferRegs::BlendEquation equation) {
|
||||
|
||||
// Range check table for input
|
||||
if (static_cast<size_t>(equation) >= ARRAY_SIZE(blend_equation_table)) {
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown blend equation %d", equation);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown blend equation %u", static_cast<u32>(equation));
|
||||
UNREACHABLE();
|
||||
|
||||
return GL_FUNC_ADD;
|
||||
@ -133,7 +133,7 @@ inline GLenum BlendFunc(Pica::FramebufferRegs::BlendFactor factor) {
|
||||
|
||||
// Range check table for input
|
||||
if (static_cast<size_t>(factor) >= ARRAY_SIZE(blend_func_table)) {
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown blend factor %d", factor);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown blend factor %u", static_cast<u32>(factor));
|
||||
UNREACHABLE();
|
||||
|
||||
return GL_ONE;
|
||||
@ -164,7 +164,7 @@ inline GLenum LogicOp(Pica::FramebufferRegs::LogicOp op) {
|
||||
|
||||
// Range check table for input
|
||||
if (static_cast<size_t>(op) >= ARRAY_SIZE(logic_op_table)) {
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown logic op %d", op);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown logic op %u", static_cast<u32>(op));
|
||||
UNREACHABLE();
|
||||
|
||||
return GL_COPY;
|
||||
@ -187,7 +187,7 @@ inline GLenum CompareFunc(Pica::FramebufferRegs::CompareFunc func) {
|
||||
|
||||
// Range check table for input
|
||||
if (static_cast<size_t>(func) >= ARRAY_SIZE(compare_func_table)) {
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown compare function %d", func);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown compare function %u", static_cast<u32>(func));
|
||||
UNREACHABLE();
|
||||
|
||||
return GL_ALWAYS;
|
||||
@ -210,7 +210,7 @@ inline GLenum StencilOp(Pica::FramebufferRegs::StencilAction action) {
|
||||
|
||||
// Range check table for input
|
||||
if (static_cast<size_t>(action) >= ARRAY_SIZE(stencil_op_table)) {
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown stencil op %d", action);
|
||||
LOG_CRITICAL(Render_OpenGL, "Unknown stencil op %u", static_cast<u32>(action));
|
||||
UNREACHABLE();
|
||||
|
||||
return GL_KEEP;
|
||||
|
@ -853,7 +853,7 @@ void JitShader::Compile_NextInstr() {
|
||||
} else {
|
||||
// Unhandled instruction
|
||||
LOG_CRITICAL(HW_GPU, "Unhandled instruction: 0x%02x (0x%08x)",
|
||||
instr.opcode.Value().EffectiveOpCode(), instr.hex);
|
||||
static_cast<u32>(instr.opcode.Value().EffectiveOpCode()), instr.hex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ void DrawPixel(int x, int y, const Math::Vec4<u8>& color) {
|
||||
|
||||
default:
|
||||
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format %x",
|
||||
framebuffer.color_format.Value());
|
||||
static_cast<u32>(framebuffer.color_format.Value()));
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
}
|
||||
@ -94,7 +94,7 @@ const Math::Vec4<u8> GetPixel(int x, int y) {
|
||||
|
||||
default:
|
||||
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format %x",
|
||||
framebuffer.color_format.Value());
|
||||
static_cast<u32>(framebuffer.color_format.Value()));
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
@ -123,7 +123,8 @@ u32 GetDepth(int x, int y) {
|
||||
case FramebufferRegs::DepthFormat::D24S8:
|
||||
return Color::DecodeD24S8(src_pixel).x;
|
||||
default:
|
||||
LOG_CRITICAL(HW_GPU, "Unimplemented depth format %u", framebuffer.depth_format);
|
||||
LOG_CRITICAL(HW_GPU, "Unimplemented depth format %u",
|
||||
static_cast<u32>(framebuffer.depth_format.Value()));
|
||||
UNIMPLEMENTED();
|
||||
return 0;
|
||||
}
|
||||
@ -151,7 +152,7 @@ u8 GetStencil(int x, int y) {
|
||||
LOG_WARNING(
|
||||
HW_GPU,
|
||||
"GetStencil called for function which doesn't have a stencil component (format %u)",
|
||||
framebuffer.depth_format);
|
||||
static_cast<u32>(framebuffer.depth_format.Value()));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -184,7 +185,8 @@ void SetDepth(int x, int y, u32 value) {
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_CRITICAL(HW_GPU, "Unimplemented depth format %u", framebuffer.depth_format);
|
||||
LOG_CRITICAL(HW_GPU, "Unimplemented depth format %u",
|
||||
static_cast<u32>(framebuffer.depth_format.Value()));
|
||||
UNIMPLEMENTED();
|
||||
break;
|
||||
}
|
||||
@ -215,7 +217,8 @@ void SetStencil(int x, int y, u8 value) {
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_CRITICAL(HW_GPU, "Unimplemented depth format %u", framebuffer.depth_format);
|
||||
LOG_CRITICAL(HW_GPU, "Unimplemented depth format %u",
|
||||
static_cast<u32>(framebuffer.depth_format.Value()));
|
||||
UNIMPLEMENTED();
|
||||
break;
|
||||
}
|
||||
@ -294,7 +297,7 @@ Math::Vec4<u8> EvaluateBlendEquation(const Math::Vec4<u8>& src, const Math::Vec4
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_CRITICAL(HW_GPU, "Unknown RGB blend equation %x", equation);
|
||||
LOG_CRITICAL(HW_GPU, "Unknown RGB blend equation 0x%x", static_cast<u8>(equation));
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,8 @@ std::tuple<Math::Vec4<u8>, Math::Vec4<u8>> ComputeFragmentsColors(
|
||||
surface_normal = Math::MakeVec(0.0f, 0.0f, 1.0f);
|
||||
surface_tangent = perturbation;
|
||||
} else {
|
||||
LOG_ERROR(HW_GPU, "Unknown bump mode %u", lighting.config0.bump_mode.Value());
|
||||
LOG_ERROR(HW_GPU, "Unknown bump mode %u",
|
||||
static_cast<u32>(lighting.config0.bump_mode.Value()));
|
||||
}
|
||||
} else {
|
||||
surface_normal = Math::MakeVec(0.0f, 0.0f, 1.0f);
|
||||
|
@ -801,7 +801,7 @@ static void ProcessTriangleInternal(const Vertex& v0, const Vertex& v1, const Ve
|
||||
return std::min(combiner_output.a(), static_cast<u8>(255 - dest.a()));
|
||||
|
||||
default:
|
||||
LOG_CRITICAL(HW_GPU, "Unknown blend factor %x", factor);
|
||||
LOG_CRITICAL(HW_GPU, "Unknown blend factor %x", static_cast<u32>(factor));
|
||||
UNIMPLEMENTED();
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user