Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor change #2342

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/PPUInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ bool ppu_interpreter::CNTLZW(ppu_thread& ppu, ppu_opcode_t op)

bool ppu_interpreter::SLD(ppu_thread& ppu, ppu_opcode_t op)
{
const u32 n = ppu.gpr[op.rb];
const u64 n = ppu.gpr[op.rb];
ppu.gpr[op.ra] = UNLIKELY(n & 0x40) ? 0 : ppu.gpr[op.rs] << n;
if (UNLIKELY(op.rc)) ppu_cr_set<s64>(ppu, 0, ppu.gpr[op.ra], 0);
return true;
Expand Down Expand Up @@ -3023,7 +3023,7 @@ bool ppu_interpreter::SRW(ppu_thread& ppu, ppu_opcode_t op)

bool ppu_interpreter::SRD(ppu_thread& ppu, ppu_opcode_t op)
{
const u32 n = ppu.gpr[op.rb];
const u64 n = ppu.gpr[op.rb];
ppu.gpr[op.ra] = UNLIKELY(n & 0x40) ? 0 : ppu.gpr[op.rs] >> n;
if (UNLIKELY(op.rc)) ppu_cr_set<s64>(ppu, 0, ppu.gpr[op.ra], 0);
return true;
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/RSX/Common/BufferUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ namespace
case rsx::primitive_type::quads:
return expand_indexed_quads<T>(src.subspan(first), dst, restart_index_enabled, restart_index);
}
fmt::throw_exception("Don't know how to expand draw mode" HERE);
fmt::throw_exception("Unknown draw mode (0x%x)" HERE, (u32)draw_mode);
}
}

Expand Down
45 changes: 22 additions & 23 deletions rpcs3/Emu/RSX/D3D12/D3D12Formats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ D3D12_BLEND_OP get_blend_op(rsx::blend_equation op)
case rsx::blend_equation::reverse_substract_signed:
break;
}
fmt::throw_exception("Invalid or unsupported blend op (0x%x)" HERE, (u32)op);
fmt::throw_exception("Unknown or unsupported blend op (0x%x)" HERE, (u32)op);
}

D3D12_BLEND get_blend_factor(rsx::blend_factor factor)
Expand All @@ -45,7 +45,7 @@ D3D12_BLEND get_blend_factor(rsx::blend_factor factor)
case rsx::blend_factor::one_minus_constant_alpha:
return D3D12_BLEND_INV_BLEND_FACTOR;
}
fmt::throw_exception("Invalid blend factor (0x%x)" HERE, (u32)factor);
fmt::throw_exception("Unknown blend factor (0x%x)" HERE, (u32)factor);
}

D3D12_BLEND get_blend_factor_alpha(rsx::blend_factor factor)
Expand All @@ -70,7 +70,7 @@ D3D12_BLEND get_blend_factor_alpha(rsx::blend_factor factor)
case rsx::blend_factor::one_minus_constant_alpha:
return D3D12_BLEND_INV_BLEND_FACTOR;
}
fmt::throw_exception("Invalid blend alpha factor (0x%x)" HERE, (u32)factor);
fmt::throw_exception("Unknown blend alpha factor (0x%x)" HERE, (u32)factor);
}

/**
Expand All @@ -96,7 +96,7 @@ D3D12_LOGIC_OP get_logic_op(rsx::logic_op op)
case rsx::logic_op::logic_or_inverted: return D3D12_LOGIC_OP_OR_INVERTED;
case rsx::logic_op::logic_nand: return D3D12_LOGIC_OP_NAND;
}
fmt::throw_exception("Invalid logic op (0x%x)" HERE, (u32)op);
fmt::throw_exception("Unknown logic op (0x%x)" HERE, (u32)op);
}

/**
Expand All @@ -115,7 +115,7 @@ D3D12_STENCIL_OP get_stencil_op(rsx::stencil_op op)
case rsx::stencil_op::incr_wrap: return D3D12_STENCIL_OP_INCR;
case rsx::stencil_op::decr_wrap: return D3D12_STENCIL_OP_DECR;
}
fmt::throw_exception("Invalid stencil op (0x%x)" HERE, (u32)op);
fmt::throw_exception("Unknown stencil op (0x%x)" HERE, (u32)op);
}

D3D12_COMPARISON_FUNC get_compare_func(rsx::comparison_function op)
Expand All @@ -131,7 +131,7 @@ D3D12_COMPARISON_FUNC get_compare_func(rsx::comparison_function op)
case rsx::comparison_function::greater_or_equal: return D3D12_COMPARISON_FUNC_GREATER_EQUAL;
case rsx::comparison_function::always: return D3D12_COMPARISON_FUNC_ALWAYS;
}
fmt::throw_exception("Invalid or unsupported compare func (0x%x)" HERE, (u32)op);
fmt::throw_exception("Unknown compare func (0x%x)" HERE, (u32)op);
}

DXGI_FORMAT get_texture_format(u8 format)
Expand Down Expand Up @@ -167,9 +167,8 @@ DXGI_FORMAT get_texture_format(u8 format)
case CELL_GCM_TEXTURE_COMPRESSED_HILO_S8: return DXGI_FORMAT_R8G8_SNORM;
case ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN) & CELL_GCM_TEXTURE_COMPRESSED_B8R8_G8R8: return DXGI_FORMAT_G8R8_G8B8_UNORM;
case ~(CELL_GCM_TEXTURE_LN | CELL_GCM_TEXTURE_UN) & CELL_GCM_TEXTURE_COMPRESSED_R8B8_R8G8: return DXGI_FORMAT_R8G8_B8G8_UNORM;
break;
}
fmt::throw_exception("Invalid or unsupported texture format (0x%x)" HERE, (u32)format);
fmt::throw_exception("Unknown texture format (0x%x)" HERE, (u32)format);
}

UINT get_texture_max_aniso(rsx::texture_max_anisotropy aniso)
Expand All @@ -185,7 +184,7 @@ UINT get_texture_max_aniso(rsx::texture_max_anisotropy aniso)
case rsx::texture_max_anisotropy::x12: return 12;
case rsx::texture_max_anisotropy::x16: return 16;
}
fmt::throw_exception("Invalid texture max aniso (0x%x)" HERE, (u32)aniso);
fmt::throw_exception("Unknown texture max aniso (0x%x)" HERE, (u32)aniso);
}

D3D12_TEXTURE_ADDRESS_MODE get_texture_wrap_mode(rsx::texture_wrap_mode wrap)
Expand All @@ -201,7 +200,7 @@ D3D12_TEXTURE_ADDRESS_MODE get_texture_wrap_mode(rsx::texture_wrap_mode wrap)
case rsx::texture_wrap_mode::mirror_once_border: return D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE;
case rsx::texture_wrap_mode::mirror_once_clamp: return D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE;
}
fmt::throw_exception("Invalid texture wrap mode (0x%x)" HERE, (u32)wrap);
fmt::throw_exception("Unknown texture wrap mode (0x%x)" HERE, (u32)wrap);
}

namespace
Expand Down Expand Up @@ -239,7 +238,7 @@ namespace
mip = D3D12_FILTER_TYPE_POINT;
return;
}
fmt::throw_exception("Invalid max filter" HERE);
fmt::throw_exception("Unknown max filter" HERE);
}

D3D12_FILTER_TYPE get_mag_filter(rsx::texture_magnify_filter mag_filter)
Expand All @@ -250,7 +249,7 @@ namespace
case rsx::texture_magnify_filter::linear: return D3D12_FILTER_TYPE_LINEAR;
case rsx::texture_magnify_filter::convolution_mag: return D3D12_FILTER_TYPE_LINEAR;
}
fmt::throw_exception("Invalid mag filter" HERE);
fmt::throw_exception("Unknown mag filter" HERE);
}
}

Expand All @@ -277,7 +276,7 @@ D3D12_PRIMITIVE_TOPOLOGY get_primitive_topology(rsx::primitive_type draw_mode)
case rsx::primitive_type::quad_strip: return D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST;
case rsx::primitive_type::polygon: return D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST;
}
fmt::throw_exception("Invalid draw mode (0x%x)" HERE, (u32)draw_mode);
fmt::throw_exception("Unknown draw mode (0x%x)" HERE, (u32)draw_mode);
}

D3D12_PRIMITIVE_TOPOLOGY_TYPE get_primitive_topology_type(rsx::primitive_type draw_mode)
Expand All @@ -295,7 +294,7 @@ D3D12_PRIMITIVE_TOPOLOGY_TYPE get_primitive_topology_type(rsx::primitive_type dr
case rsx::primitive_type::polygon: return D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
case rsx::primitive_type::line_loop: return D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE;
}
fmt::throw_exception("Invalid or unsupported draw mode (0x%x)" HERE, (u32)draw_mode);
fmt::throw_exception("Unknown draw mode (0x%x)" HERE, (u32)draw_mode);
}

DXGI_FORMAT get_color_surface_format(rsx::surface_color_format format)
Expand All @@ -318,7 +317,7 @@ DXGI_FORMAT get_color_surface_format(rsx::surface_color_format format)
case rsx::surface_color_format::w32z32y32x32: return DXGI_FORMAT_R32G32B32A32_FLOAT;
case rsx::surface_color_format::x32: return DXGI_FORMAT_R32_FLOAT;
}
fmt::throw_exception("Invalid format (0x%x)" HERE, (u32)format);
fmt::throw_exception("Unknown format (0x%x)" HERE, (u32)format);
}

DXGI_FORMAT get_depth_stencil_surface_format(rsx::surface_depth_format format)
Expand All @@ -328,7 +327,7 @@ DXGI_FORMAT get_depth_stencil_surface_format(rsx::surface_depth_format format)
case rsx::surface_depth_format::z16: return DXGI_FORMAT_D16_UNORM;
case rsx::surface_depth_format::z24s8: return DXGI_FORMAT_D24_UNORM_S8_UINT;
}
fmt::throw_exception("Invalid format (0x%x)" HERE, (u32)format);
fmt::throw_exception("Unknown format (0x%x)" HERE, (u32)format);
}

DXGI_FORMAT get_depth_stencil_surface_clear_format(rsx::surface_depth_format format)
Expand All @@ -338,7 +337,7 @@ DXGI_FORMAT get_depth_stencil_surface_clear_format(rsx::surface_depth_format for
case rsx::surface_depth_format::z16: return DXGI_FORMAT_D16_UNORM;
case rsx::surface_depth_format::z24s8: return DXGI_FORMAT_D24_UNORM_S8_UINT;
}
fmt::throw_exception("Invalid format (0x%x)" HERE, (u32)format);
fmt::throw_exception("Unknown format (0x%x)" HERE, (u32)format);
}

DXGI_FORMAT get_depth_stencil_typeless_surface_format(rsx::surface_depth_format format)
Expand All @@ -348,7 +347,7 @@ DXGI_FORMAT get_depth_stencil_typeless_surface_format(rsx::surface_depth_format
case rsx::surface_depth_format::z16: return DXGI_FORMAT_R16_TYPELESS;
case rsx::surface_depth_format::z24s8: return DXGI_FORMAT_R24G8_TYPELESS;
}
fmt::throw_exception("Invalid format (0x%x)" HERE, (u32)format);
fmt::throw_exception("Unknown format (0x%x)" HERE, (u32)format);
}

DXGI_FORMAT get_depth_samplable_surface_format(rsx::surface_depth_format format)
Expand All @@ -358,7 +357,7 @@ DXGI_FORMAT get_depth_samplable_surface_format(rsx::surface_depth_format format)
case rsx::surface_depth_format::z16: return DXGI_FORMAT_R16_UNORM;
case rsx::surface_depth_format::z24s8: return DXGI_FORMAT_R24_UNORM_X8_TYPELESS;
}
fmt::throw_exception("Invalid format (0x%x)" HERE, (u32)format);
fmt::throw_exception("Unknown format (0x%x)" HERE, (u32)format);
}

BOOL get_front_face_ccw(rsx::front_face ffv)
Expand All @@ -368,7 +367,7 @@ BOOL get_front_face_ccw(rsx::front_face ffv)
case rsx::front_face::cw: return FALSE;
case rsx::front_face::ccw: return TRUE;
}
fmt::throw_exception("Invalid front face value (0x%x)" HERE, (u32)ffv);
fmt::throw_exception("Unknown front face value (0x%x)" HERE, (u32)ffv);
}

D3D12_CULL_MODE get_cull_face(rsx::cull_face cfv)
Expand All @@ -379,7 +378,7 @@ D3D12_CULL_MODE get_cull_face(rsx::cull_face cfv)
case rsx::cull_face::back: return D3D12_CULL_MODE_BACK;
case rsx::cull_face::front_and_back: return D3D12_CULL_MODE_NONE;
}
fmt::throw_exception("Invalid cull face value (0x%x)" HERE, (u32)cfv);
fmt::throw_exception("Unknown cull face value (0x%x)" HERE, (u32)cfv);
}

DXGI_FORMAT get_index_type(rsx::index_array_type index_type)
Expand All @@ -389,7 +388,7 @@ DXGI_FORMAT get_index_type(rsx::index_array_type index_type)
case rsx::index_array_type::u16: return DXGI_FORMAT_R16_UINT;
case rsx::index_array_type::u32: return DXGI_FORMAT_R32_UINT;
}
fmt::throw_exception("Invalid index_type (0x%x)" HERE, (u32)index_type);
fmt::throw_exception("Unknown index_type (0x%x)" HERE, (u32)index_type);
}

DXGI_FORMAT get_vertex_attribute_format(rsx::vertex_base_type type, u8 size)
Expand Down Expand Up @@ -468,7 +467,7 @@ DXGI_FORMAT get_vertex_attribute_format(rsx::vertex_base_type type, u8 size)
}
}

fmt::throw_exception("Invalid or unsupported type or size (type=0x%x, size=0x%x)" HERE, (u32)type, size);
fmt::throw_exception("Unknown or unsupported type or size (type=0x%x, size=0x%x)" HERE, (u32)type, size);
}

D3D12_RECT get_scissor(u16 clip_origin_x, u16 clip_origin_y, u16 clip_w, u16 clip_h)
Expand Down