mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 14:50:05 +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:
|
case ColorFormat::RGBA4:
|
||||||
return 2;
|
return 2;
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(HW_GPU, "Unknown color format %u", format);
|
LOG_CRITICAL(HW_GPU, "Unknown color format %u", static_cast<u32>(format));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -258,7 +258,7 @@ struct FramebufferRegs {
|
|||||||
return 4;
|
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
|
// Returns the number of bits per depth component of the specified depth format
|
||||||
@ -271,7 +271,7 @@ struct FramebufferRegs {
|
|||||||
return 24;
|
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);
|
INSERT_PADDING_WORDS(0x20);
|
||||||
|
@ -1338,7 +1338,8 @@ void RasterizerOpenGL::SyncCullMode() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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();
|
UNIMPLEMENTED();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ static void AppendSource(std::string& out, const PicaShaderConfig& config,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
out += "vec4(0.0)";
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -323,7 +323,7 @@ static void AppendColorModifier(std::string& out, const PicaShaderConfig& config
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
out += "vec3(0.0)";
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -372,7 +372,7 @@ static void AppendAlphaModifier(std::string& out, const PicaShaderConfig& config
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
out += "0.0";
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -416,7 +416,8 @@ static void AppendColorCombiner(std::string& out, TevStageConfig::Operation oper
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
out += "vec3(0.0)";
|
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;
|
break;
|
||||||
}
|
}
|
||||||
out += ", vec3(0.0), vec3(1.0))"; // Clamp result to 0.0, 1.0
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
out += "0.0";
|
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;
|
break;
|
||||||
}
|
}
|
||||||
out += ", 0.0, 1.0)";
|
out += ", 0.0, 1.0)";
|
||||||
@ -486,7 +488,7 @@ static void AppendAlphaTestCondition(std::string& out, FramebufferRegs::CompareF
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
out += "false";
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ inline GLenum BlendEquation(Pica::FramebufferRegs::BlendEquation equation) {
|
|||||||
|
|
||||||
// Range check table for input
|
// Range check table for input
|
||||||
if (static_cast<size_t>(equation) >= ARRAY_SIZE(blend_equation_table)) {
|
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();
|
UNREACHABLE();
|
||||||
|
|
||||||
return GL_FUNC_ADD;
|
return GL_FUNC_ADD;
|
||||||
@ -133,7 +133,7 @@ inline GLenum BlendFunc(Pica::FramebufferRegs::BlendFactor factor) {
|
|||||||
|
|
||||||
// Range check table for input
|
// Range check table for input
|
||||||
if (static_cast<size_t>(factor) >= ARRAY_SIZE(blend_func_table)) {
|
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();
|
UNREACHABLE();
|
||||||
|
|
||||||
return GL_ONE;
|
return GL_ONE;
|
||||||
@ -164,7 +164,7 @@ inline GLenum LogicOp(Pica::FramebufferRegs::LogicOp op) {
|
|||||||
|
|
||||||
// Range check table for input
|
// Range check table for input
|
||||||
if (static_cast<size_t>(op) >= ARRAY_SIZE(logic_op_table)) {
|
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();
|
UNREACHABLE();
|
||||||
|
|
||||||
return GL_COPY;
|
return GL_COPY;
|
||||||
@ -187,7 +187,7 @@ inline GLenum CompareFunc(Pica::FramebufferRegs::CompareFunc func) {
|
|||||||
|
|
||||||
// Range check table for input
|
// Range check table for input
|
||||||
if (static_cast<size_t>(func) >= ARRAY_SIZE(compare_func_table)) {
|
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();
|
UNREACHABLE();
|
||||||
|
|
||||||
return GL_ALWAYS;
|
return GL_ALWAYS;
|
||||||
@ -210,7 +210,7 @@ inline GLenum StencilOp(Pica::FramebufferRegs::StencilAction action) {
|
|||||||
|
|
||||||
// Range check table for input
|
// Range check table for input
|
||||||
if (static_cast<size_t>(action) >= ARRAY_SIZE(stencil_op_table)) {
|
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();
|
UNREACHABLE();
|
||||||
|
|
||||||
return GL_KEEP;
|
return GL_KEEP;
|
||||||
|
@ -853,7 +853,7 @@ void JitShader::Compile_NextInstr() {
|
|||||||
} else {
|
} else {
|
||||||
// Unhandled instruction
|
// Unhandled instruction
|
||||||
LOG_CRITICAL(HW_GPU, "Unhandled instruction: 0x%02x (0x%08x)",
|
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:
|
default:
|
||||||
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format %x",
|
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format %x",
|
||||||
framebuffer.color_format.Value());
|
static_cast<u32>(framebuffer.color_format.Value()));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ const Math::Vec4<u8> GetPixel(int x, int y) {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format %x",
|
LOG_CRITICAL(Render_Software, "Unknown framebuffer color format %x",
|
||||||
framebuffer.color_format.Value());
|
static_cast<u32>(framebuffer.color_format.Value()));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,7 +123,8 @@ u32 GetDepth(int x, int y) {
|
|||||||
case FramebufferRegs::DepthFormat::D24S8:
|
case FramebufferRegs::DepthFormat::D24S8:
|
||||||
return Color::DecodeD24S8(src_pixel).x;
|
return Color::DecodeD24S8(src_pixel).x;
|
||||||
default:
|
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();
|
UNIMPLEMENTED();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -151,7 +152,7 @@ u8 GetStencil(int x, int y) {
|
|||||||
LOG_WARNING(
|
LOG_WARNING(
|
||||||
HW_GPU,
|
HW_GPU,
|
||||||
"GetStencil called for function which doesn't have a stencil component (format %u)",
|
"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;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,7 +185,8 @@ void SetDepth(int x, int y, u32 value) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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();
|
UNIMPLEMENTED();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -215,7 +217,8 @@ void SetStencil(int x, int y, u8 value) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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();
|
UNIMPLEMENTED();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -294,7 +297,7 @@ Math::Vec4<u8> EvaluateBlendEquation(const Math::Vec4<u8>& src, const Math::Vec4
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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();
|
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_normal = Math::MakeVec(0.0f, 0.0f, 1.0f);
|
||||||
surface_tangent = perturbation;
|
surface_tangent = perturbation;
|
||||||
} else {
|
} 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 {
|
} else {
|
||||||
surface_normal = Math::MakeVec(0.0f, 0.0f, 1.0f);
|
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()));
|
return std::min(combiner_output.a(), static_cast<u8>(255 - dest.a()));
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_CRITICAL(HW_GPU, "Unknown blend factor %x", factor);
|
LOG_CRITICAL(HW_GPU, "Unknown blend factor %x", static_cast<u32>(factor));
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user