Move rsx::constants and rsx::limits to rsx_utils.h

This commit is contained in:
Lassi Hämäläinen 2018-09-28 23:20:38 +03:00 committed by Ivan
parent e9e87b8bd9
commit a070a414a6
5 changed files with 37 additions and 36 deletions

View file

@ -25,7 +25,9 @@ target_link_libraries(rpcs3_emu
3rdparty::pugixml 3rdparty::pugixml
3rdparty::gsl) 3rdparty::gsl)
set_source_files_properties("../../Utilities/JIT.cpp" PROPERTIES COMPILE_FLAGS -fno-rtti) if (NOT MSVC)
set_source_files_properties("../../Utilities/JIT.cpp" PROPERTIES COMPILE_FLAGS -fno-rtti)
endif()
# Crypto # Crypto

View file

@ -10,8 +10,7 @@ class D3D12FragmentDecompiler : public FragmentProgramDecompiler
protected: protected:
virtual std::string getFloatTypeName(size_t elementCount) override; virtual std::string getFloatTypeName(size_t elementCount) override;
virtual std::string getHalfTypeName(size_t elementCount) override; virtual std::string getHalfTypeName(size_t elementCount) override;
virtual std::string getFunction(enum class FUNCTION) override; virtual std::string getFunction(enum FUNCTION) override;
virtual std::string saturate(const std::string &code) override;
virtual std::string compareFunction(enum COMPARE, const std::string &, const std::string &) override; virtual std::string compareFunction(enum COMPARE, const std::string &, const std::string &) override;
virtual void insertHeader(std::stringstream &OS) override; virtual void insertHeader(std::stringstream &OS) override;

View file

@ -2,8 +2,8 @@
#include "GLVertexProgram.h" #include "GLVertexProgram.h"
#include "GLFragmentProgram.h" #include "GLFragmentProgram.h"
#include "GLHelpers.h" #include "GLHelpers.h"
#include "../RSXThread.h"
#include "../Common/ProgramStateCache.h" #include "../Common/ProgramStateCache.h"
#include "../rsx_utils.h"
struct GLTraits struct GLTraits
{ {

View file

@ -1,4 +1,4 @@
#pragma once #pragma once
#include <stack> #include <stack>
#include <deque> #include <deque>
@ -57,34 +57,6 @@ extern RSXIOTable RSXIOMem;
namespace rsx namespace rsx
{ {
namespace limits
{
enum
{
fragment_textures_count = 16,
vertex_textures_count = 4,
vertex_count = 16,
fragment_count = 32,
tiles_count = 15,
zculls_count = 8,
color_buffers_count = 4
};
}
namespace constants
{
static std::array<const char*, 16> fragment_texture_names =
{
"tex0", "tex1", "tex2", "tex3", "tex4", "tex5", "tex6", "tex7",
"tex8", "tex9", "tex10", "tex11", "tex12", "tex13", "tex14", "tex15",
};
static std::array<const char*, 4> vertex_texture_names =
{
"vtex0", "vtex1", "vtex2", "vtex3",
};
}
enum framebuffer_creation_context : u8 enum framebuffer_creation_context : u8
{ {
context_draw = 0, context_draw = 0,

View file

@ -1,4 +1,4 @@
#pragma once #pragma once
#include "../System.h" #include "../System.h"
#include "Utilities/address_range.h" #include "Utilities/address_range.h"
@ -72,9 +72,37 @@ namespace rsx
} }
}; };
namespace limits
{
enum
{
fragment_textures_count = 16,
vertex_textures_count = 4,
vertex_count = 16,
fragment_count = 32,
tiles_count = 15,
zculls_count = 8,
color_buffers_count = 4
};
}
namespace constants
{
static std::array<const char*, 16> fragment_texture_names =
{
"tex0", "tex1", "tex2", "tex3", "tex4", "tex5", "tex6", "tex7",
"tex8", "tex9", "tex10", "tex11", "tex12", "tex13", "tex14", "tex15",
};
static std::array<const char*, 4> vertex_texture_names =
{
"vtex0", "vtex1", "vtex2", "vtex3",
};
}
/** /**
* Holds information about a framebuffer * Holds information about a framebuffer
*/ */
struct gcm_framebuffer_info struct gcm_framebuffer_info
{ {
u32 address = 0; u32 address = 0;