mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
Add fallthrough attribute
This commit is contained in:
parent
4d8bfe328b
commit
f37adc4188
@ -851,6 +851,7 @@ error_code cellVdecGetPicture(u32 handle, vm::cptr<CellVdecPicFormat> format, vm
|
||||
{
|
||||
case AV_PIX_FMT_YUVJ420P:
|
||||
cellVdec.error("cellVdecGetPicture(): experimental AVPixelFormat (%d). This may cause suboptimal video quality.", frame->format);
|
||||
[[fallthrough]];
|
||||
case AV_PIX_FMT_YUV420P:
|
||||
in_f = alpha_plane ? AV_PIX_FMT_YUVA420P : static_cast<AVPixelFormat>(frame->format);
|
||||
break;
|
||||
|
@ -2130,7 +2130,7 @@ bool spu_thread::process_mfc_cmd()
|
||||
break;
|
||||
}
|
||||
|
||||
// Fallthrough
|
||||
[[fallthrough]];
|
||||
}
|
||||
case MFC_PUT_CMD:
|
||||
case MFC_PUTB_CMD:
|
||||
|
@ -85,6 +85,7 @@ void FragmentProgramDecompiler::SetDst(std::string code, u32 flags)
|
||||
// NOTE: Sometimes varying inputs from VS are out of range so do not exempt any input types, unless fp16 (Naruto UNS)
|
||||
if (dst.fp16 && src0.fp16 && src0.reg_type == RSX_FP_REGISTER_TYPE_TEMP)
|
||||
break;
|
||||
[[fallthrough]];
|
||||
default:
|
||||
{
|
||||
// fp16 precsion flag on f32 register; ignore
|
||||
@ -942,6 +943,7 @@ bool FragmentProgramDecompiler::handle_tex_srb(u32 opcode)
|
||||
//Untested, should be x2d followed by TEX
|
||||
AddX2d();
|
||||
AddCode(Format("x2d = $0.xyxy + $1.xxxx * $2.xzxz + $1.yyyy * $2.ywyw;", true));
|
||||
[[fallthrough]];
|
||||
case RSX_FP_OPCODE_TEX:
|
||||
AddTex();
|
||||
switch (m_prog.get_texture_dimension(dst.tex_num))
|
||||
@ -974,6 +976,7 @@ bool FragmentProgramDecompiler::handle_tex_srb(u32 opcode)
|
||||
//Untested, should be x2d followed by TXP
|
||||
AddX2d();
|
||||
AddCode(Format("x2d = $0.xyxy + $1.xxxx * $2.xzxz + $1.yyyy * $2.ywyw;", true));
|
||||
[[fallthrough]];
|
||||
case RSX_FP_OPCODE_TXP:
|
||||
AddTex();
|
||||
switch (m_prog.get_texture_dimension(dst.tex_num))
|
||||
|
@ -104,12 +104,12 @@ vertex_program_utils::vertex_program_metadata vertex_program_utils::analyse_vert
|
||||
{
|
||||
d0.HEX = instruction._u32[0];
|
||||
static_jump = (d0.cond == 0x7);
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
}
|
||||
case RSX_SCA_OPCODE_BRB:
|
||||
{
|
||||
function_call = false;
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
}
|
||||
case RSX_SCA_OPCODE_CAL:
|
||||
case RSX_SCA_OPCODE_CLI:
|
||||
|
@ -1821,7 +1821,7 @@ namespace rsx
|
||||
case rsx::texture_upload_context::shader_read:
|
||||
if (!result.image_handle)
|
||||
break;
|
||||
// Conditional fallthrough
|
||||
[[fallthrough]];
|
||||
default:
|
||||
return result;
|
||||
}
|
||||
|
@ -43,12 +43,14 @@ namespace gl
|
||||
// Note : maybe add is signed on gl
|
||||
case rsx::blend_equation::add_signed:
|
||||
rsx_log.trace("blend equation add_signed used. Emulating using FUNC_ADD");
|
||||
[[fallthrough]];
|
||||
case rsx::blend_equation::add: return GL_FUNC_ADD;
|
||||
case rsx::blend_equation::min: return GL_MIN;
|
||||
case rsx::blend_equation::max: return GL_MAX;
|
||||
case rsx::blend_equation::substract: return GL_FUNC_SUBTRACT;
|
||||
case rsx::blend_equation::reverse_substract_signed:
|
||||
rsx_log.trace("blend equation reverse_subtract_signed used. Emulating using FUNC_REVERSE_SUBTRACT");
|
||||
[[fallthrough]];
|
||||
case rsx::blend_equation::reverse_substract: return GL_FUNC_REVERSE_SUBTRACT;
|
||||
case rsx::blend_equation::reverse_add_signed:
|
||||
default:
|
||||
|
@ -549,7 +549,7 @@ void GLGSRender::clear_surface(u32 arg)
|
||||
case rsx::surface_color_format::g8b8:
|
||||
{
|
||||
colormask = rsx::get_g8b8_r8g8_colormask(colormask);
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
@ -366,6 +366,7 @@ namespace gl
|
||||
{
|
||||
default:
|
||||
rsx_log.error("gl::fence sync returned unknown error 0x%X", err);
|
||||
[[fallthrough]];
|
||||
case GL_ALREADY_SIGNALED:
|
||||
case GL_CONDITION_SATISFIED:
|
||||
done = true;
|
||||
|
@ -586,6 +586,7 @@ namespace gl
|
||||
{
|
||||
default:
|
||||
rsx_log.error("Unknown remap function 0x%X", remap_lookup[channel]);
|
||||
[[fallthrough]];
|
||||
case CELL_GCM_TEXTURE_REMAP_REMAP:
|
||||
remap_values[channel] = swizzle_remap[remap_inputs[channel]];
|
||||
break;
|
||||
|
@ -450,7 +450,7 @@ namespace rsx
|
||||
|
||||
total_threads = CPUStats::get_thread_count();
|
||||
|
||||
// fallthrough
|
||||
[[fallthrough]];
|
||||
}
|
||||
case detail_level::medium:
|
||||
{
|
||||
@ -473,14 +473,14 @@ namespace rsx
|
||||
spu_usage = std::clamp(cpu_usage * spu_cycles / total_cycles, 0.f, 100.f);
|
||||
rsx_usage = std::clamp(cpu_usage * rsx_cycles / total_cycles, 0.f, 100.f);
|
||||
|
||||
// fallthrough
|
||||
[[fallthrough]];
|
||||
}
|
||||
case detail_level::low:
|
||||
{
|
||||
if (cpu_usage < 0.)
|
||||
cpu_usage = static_cast<f32>(m_cpu_stats.get_usage());
|
||||
|
||||
// fallthrough
|
||||
[[fallthrough]];
|
||||
}
|
||||
case detail_level::minimal:
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ namespace rsx
|
||||
if (m_no_saves)
|
||||
break;
|
||||
return_code = m_list->get_selected_index();
|
||||
// Fall through
|
||||
[[fallthrough]];
|
||||
case pad_button::circle:
|
||||
close(true, true);
|
||||
break;
|
||||
|
@ -703,6 +703,7 @@ namespace rsx
|
||||
{
|
||||
default:
|
||||
rsx_log.error("bad clip plane control (0x%x)", static_cast<u8>(clip_plane_control[index]));
|
||||
[[fallthrough]];
|
||||
|
||||
case rsx::user_clip_plane_op::disable:
|
||||
clip_enabled_flags[index] = 0;
|
||||
|
@ -162,11 +162,13 @@ namespace vk
|
||||
{
|
||||
case rsx::blend_equation::add_signed:
|
||||
rsx_log.trace("blend equation add_signed used. Emulating using FUNC_ADD");
|
||||
[[fallthrough]];
|
||||
case rsx::blend_equation::add:
|
||||
return VK_BLEND_OP_ADD;
|
||||
case rsx::blend_equation::substract: return VK_BLEND_OP_SUBTRACT;
|
||||
case rsx::blend_equation::reverse_substract_signed:
|
||||
rsx_log.trace("blend equation reverse_subtract_signed used. Emulating using FUNC_REVERSE_SUBTRACT");
|
||||
[[fallthrough]];
|
||||
case rsx::blend_equation::reverse_substract: return VK_BLEND_OP_REVERSE_SUBTRACT;
|
||||
case rsx::blend_equation::min: return VK_BLEND_OP_MIN;
|
||||
case rsx::blend_equation::max: return VK_BLEND_OP_MAX;
|
||||
|
@ -157,6 +157,7 @@ namespace rsx
|
||||
{
|
||||
default:
|
||||
rsx_log.error("Invalid AV format 0x%x", format);
|
||||
[[fallthrough]];
|
||||
case 0: // CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8R8G8B8:
|
||||
case 1: // CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8B8G8R8:
|
||||
return CELL_GCM_TEXTURE_A8R8G8B8;
|
||||
@ -171,6 +172,7 @@ namespace rsx
|
||||
{
|
||||
default:
|
||||
rsx_log.error("Invalid AV format 0x%x", format);
|
||||
[[fallthrough]];
|
||||
case 0: // CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8R8G8B8:
|
||||
case 1: // CELL_VIDEO_OUT_BUFFER_COLOR_FORMAT_X8B8G8R8:
|
||||
return 4;
|
||||
|
@ -809,6 +809,7 @@ const char* rsx_debugger::ParseGCMEnum(u32 value, u32 type)
|
||||
case a + m * 14: \
|
||||
case a + m * 15: \
|
||||
index = (cmd - a) / m; \
|
||||
[[fallthrough]]; \
|
||||
case a \
|
||||
|
||||
QString rsx_debugger::DisAsmCommand(u32 cmd, u32 count, u32 ioAddr)
|
||||
|
Loading…
Reference in New Issue
Block a user