mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 10:18:40 +12:00
Remove unnamed namespaces from headers
This commit is contained in:
parent
49294a3dd2
commit
c0fbf3091e
3 changed files with 31 additions and 44 deletions
|
@ -7,15 +7,6 @@
|
||||||
#include "Utilities/span.h"
|
#include "Utilities/span.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
template <typename T>
|
|
||||||
gsl::span<T> as_const_span(gsl::span<const std::byte> unformated_span)
|
|
||||||
{
|
|
||||||
return{ reinterpret_cast<T*>(unformated_span.data()), unformated_span.size_bytes() / sizeof(T) };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace rsx
|
namespace rsx
|
||||||
{
|
{
|
||||||
namespace utility
|
namespace utility
|
||||||
|
|
|
@ -8,32 +8,6 @@
|
||||||
#include "rsx_utils.h"
|
#include "rsx_utils.h"
|
||||||
#pragma warning(disable:4503)
|
#pragma warning(disable:4503)
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
std::string get_subreg_name(u8 subreg)
|
|
||||||
{
|
|
||||||
return subreg == 0 ? "x" :
|
|
||||||
subreg == 1 ? "y" :
|
|
||||||
subreg == 2 ? "z" :
|
|
||||||
"w";
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string print_vertex_attribute_format(rsx::vertex_base_type type)
|
|
||||||
{
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case rsx::vertex_base_type::s1: return "Signed short normalized";
|
|
||||||
case rsx::vertex_base_type::f: return "Float";
|
|
||||||
case rsx::vertex_base_type::sf: return "Half float";
|
|
||||||
case rsx::vertex_base_type::ub: return "Unsigned byte normalized";
|
|
||||||
case rsx::vertex_base_type::s32k: return "Signed short unormalized";
|
|
||||||
case rsx::vertex_base_type::cmp: return "CMP";
|
|
||||||
case rsx::vertex_base_type::ub256: return "Unsigned byte unormalized";
|
|
||||||
}
|
|
||||||
fmt::throw_exception("Unexpected enum found" HERE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace rsx
|
namespace rsx
|
||||||
{
|
{
|
||||||
std::string print_boolean(bool b);
|
std::string print_boolean(bool b);
|
||||||
|
@ -4150,6 +4124,14 @@ struct transform_constant_helper
|
||||||
|
|
||||||
static std::string dump(decoded_type &&decoded_values)
|
static std::string dump(decoded_type &&decoded_values)
|
||||||
{
|
{
|
||||||
|
auto get_subreg_name = [](u8 subreg) -> std::string
|
||||||
|
{
|
||||||
|
return subreg == 0 ? "x" :
|
||||||
|
subreg == 1 ? "y" :
|
||||||
|
subreg == 2 ? "z" :
|
||||||
|
"w";
|
||||||
|
};
|
||||||
|
|
||||||
return "TransformConstant[base + " + std::to_string(reg) + "]." + get_subreg_name(subreg) + " = " + std::to_string(decoded_values.constant_value());
|
return "TransformConstant[base + " + std::to_string(reg) + "]." + get_subreg_name(subreg) + " = " + std::to_string(decoded_values.constant_value());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -4329,6 +4311,21 @@ struct vertex_array_helper
|
||||||
if (decoded_values.size() == 0)
|
if (decoded_values.size() == 0)
|
||||||
return "(disabled)";
|
return "(disabled)";
|
||||||
|
|
||||||
|
auto print_vertex_attribute_format = [](rsx::vertex_base_type type) -> std::string
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case rsx::vertex_base_type::s1: return "Signed short normalized";
|
||||||
|
case rsx::vertex_base_type::f: return "Float";
|
||||||
|
case rsx::vertex_base_type::sf: return "Half float";
|
||||||
|
case rsx::vertex_base_type::ub: return "Unsigned byte normalized";
|
||||||
|
case rsx::vertex_base_type::s32k: return "Signed short unormalized";
|
||||||
|
case rsx::vertex_base_type::cmp: return "CMP";
|
||||||
|
case rsx::vertex_base_type::ub256: return "Unsigned byte unormalized";
|
||||||
|
}
|
||||||
|
fmt::throw_exception("Unexpected enum found" HERE);
|
||||||
|
};
|
||||||
|
|
||||||
return "Vertex array " + std::to_string(index) + ": Type = " + print_vertex_attribute_format(decoded_values.type()) +
|
return "Vertex array " + std::to_string(index) + ": Type = " + print_vertex_attribute_format(decoded_values.type()) +
|
||||||
" size = " + std::to_string(decoded_values.size()) +
|
" size = " + std::to_string(decoded_values.size()) +
|
||||||
" stride = " + std::to_string(decoded_values.stride()) +
|
" stride = " + std::to_string(decoded_values.stride()) +
|
||||||
|
|
|
@ -474,15 +474,6 @@ namespace rsx
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
template<typename T, size_t... N, typename Args>
|
|
||||||
std::array<T, sizeof...(N)> fill_array(Args&& arg, std::index_sequence<N...>)
|
|
||||||
{
|
|
||||||
return{ T(N, std::forward<Args>(arg))... };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct rsx_state
|
struct rsx_state
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -537,6 +528,14 @@ namespace rsx
|
||||||
std::array<register_vertex_data_info, 16> register_vertex_info;
|
std::array<register_vertex_data_info, 16> register_vertex_info;
|
||||||
std::array<data_array_format_info, 16> vertex_arrays_info;
|
std::array<data_array_format_info, 16> vertex_arrays_info;
|
||||||
|
|
||||||
|
private:
|
||||||
|
template<typename T, size_t... N, typename Args>
|
||||||
|
static std::array<T, sizeof...(N)> fill_array(Args&& arg, std::index_sequence<N...>)
|
||||||
|
{
|
||||||
|
return{ T(N, std::forward<Args>(arg))... };
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
rsx_state() :
|
rsx_state() :
|
||||||
fragment_textures(fill_array<fragment_texture>(registers, std::make_index_sequence<16>())),
|
fragment_textures(fill_array<fragment_texture>(registers, std::make_index_sequence<16>())),
|
||||||
vertex_textures(fill_array<vertex_texture>(registers, std::make_index_sequence<4>())),
|
vertex_textures(fill_array<vertex_texture>(registers, std::make_index_sequence<4>())),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue