mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
Added rsx_program_decompiler to the CMakeLists
This commit is contained in:
parent
c299a65aab
commit
c0487a634e
@ -46,7 +46,7 @@ before_install:
|
|||||||
fi;
|
fi;
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- git submodule update --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers Utilities/yaml-cpp
|
- git submodule update --init rsx_program_decompiler asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers Utilities/yaml-cpp
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake ..; else cmake .. -DLLVM_DIR=/usr/local/opt/llvm36/lib/llvm-3.6/share/llvm/cmake; fi
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake ..; else cmake .. -DLLVM_DIR=/usr/local/opt/llvm36/lib/llvm-3.6/share/llvm/cmake; fi
|
||||||
|
@ -23,4 +23,4 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_BINARY_DIR}/bin")
|
|||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_BINARY_DIR}/bin")
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_BINARY_DIR}/bin")
|
||||||
add_subdirectory( Vulkan )
|
add_subdirectory( Vulkan )
|
||||||
add_subdirectory( rpcs3 )
|
add_subdirectory( rpcs3 )
|
||||||
|
add_subdirectory( rsx_program_decompiler )
|
||||||
|
@ -18,6 +18,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxpro
|
|||||||
{A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669}
|
{A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669}
|
||||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} = {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}
|
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} = {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}
|
||||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
|
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
|
||||||
|
{97E17077-A21F-45EF-9C3A-73A0BC092D7E} = {97E17077-A21F-45EF-9C3A-73A0BC092D7E}
|
||||||
|
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F} = {7D73447B-3D2D-4DFE-BF62-57E644C1D09F}
|
||||||
{8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40}
|
{8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40}
|
||||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}
|
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}
|
||||||
{8BC303AB-25BE-4276-8E57-73F171B2D672} = {8BC303AB-25BE-4276-8E57-73F171B2D672}
|
{8BC303AB-25BE-4276-8E57-73F171B2D672} = {8BC303AB-25BE-4276-8E57-73F171B2D672}
|
||||||
|
@ -128,6 +128,8 @@ ${LLVM_INCLUDE_DIRS}
|
|||||||
# Includes 3rdparty stuff that isn't included yet
|
# Includes 3rdparty stuff that isn't included yet
|
||||||
"${RPCS3_SRC_DIR}/../3rdparty/GL"
|
"${RPCS3_SRC_DIR}/../3rdparty/GL"
|
||||||
"${RPCS3_SRC_DIR}/../3rdparty/stblib"
|
"${RPCS3_SRC_DIR}/../3rdparty/stblib"
|
||||||
|
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/rsx_decompiler"
|
||||||
|
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/shader_code"
|
||||||
)
|
)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/XAudio2_7") # Slimmed down version of minidx9 for XAudio2_7 only
|
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/XAudio2_7") # Slimmed down version of minidx9 for XAudio2_7 only
|
||||||
@ -205,5 +207,7 @@ if(LLVM_FOUND)
|
|||||||
target_link_libraries(rpcs3 ${LLVM_LIBS})
|
target_link_libraries(rpcs3 ${LLVM_LIBS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(rpcs3 rsx_decompiler shader_code)
|
||||||
|
|
||||||
set_target_properties(rpcs3 PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${RPCS3_SRC_DIR}/stdafx.h")
|
set_target_properties(rpcs3 PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${RPCS3_SRC_DIR}/stdafx.h")
|
||||||
cotire(rpcs3)
|
cotire(rpcs3)
|
||||||
|
@ -25,7 +25,7 @@ namespace rsx
|
|||||||
.write(raw_shader.ucode.data(), raw_shader.ucode.size());
|
.write(raw_shader.ucode.data(), raw_shader.ucode.size());
|
||||||
|
|
||||||
rsx::decompiled_shader decompiled_shader = decompile(raw_shader, ctxt.lang);
|
rsx::decompiled_shader decompiled_shader = decompile(raw_shader, ctxt.lang);
|
||||||
auto &inserted = m_entries.insert({ raw_shader, entry_t{ decompiled_shader } }).first;
|
auto inserted = m_entries.insert({ raw_shader, entry_t{ decompiled_shader } }).first;
|
||||||
inserted->second.decompiled.raw = &inserted->first;
|
inserted->second.decompiled.raw = &inserted->first;
|
||||||
entry = &inserted->second;
|
entry = &inserted->second;
|
||||||
}
|
}
|
||||||
@ -74,15 +74,15 @@ namespace rsx
|
|||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
program_info programs_cache::get(raw_program &raw_program, decompile_language lang)
|
program_info programs_cache::get(raw_program raw_program_, decompile_language lang)
|
||||||
{
|
{
|
||||||
raw_program.vertex_shader.type = program_type::vertex;
|
raw_program_.vertex_shader.type = program_type::vertex;
|
||||||
raw_program.fragment_shader.type = program_type::fragment;
|
raw_program_.fragment_shader.type = program_type::fragment;
|
||||||
|
|
||||||
analyze_raw_shader(raw_program.vertex_shader);
|
analyze_raw_shader(raw_program_.vertex_shader);
|
||||||
analyze_raw_shader(raw_program.fragment_shader);
|
analyze_raw_shader(raw_program_.fragment_shader);
|
||||||
|
|
||||||
auto found = m_program_cache.find(raw_program);
|
auto found = m_program_cache.find(raw_program_);
|
||||||
|
|
||||||
if (found != m_program_cache.end())
|
if (found != m_program_cache.end())
|
||||||
{
|
{
|
||||||
@ -91,10 +91,10 @@ namespace rsx
|
|||||||
|
|
||||||
program_info result;
|
program_info result;
|
||||||
|
|
||||||
result.vertex_shader = m_vertex_shaders_cache.get(context, raw_program.vertex_shader, raw_program.state);
|
result.vertex_shader = m_vertex_shaders_cache.get(context, raw_program_.vertex_shader, raw_program_.state);
|
||||||
result.fragment_shader = m_vertex_shaders_cache.get(context, raw_program.fragment_shader, raw_program.state);
|
result.fragment_shader = m_vertex_shaders_cache.get(context, raw_program_.fragment_shader, raw_program_.state);
|
||||||
result.program = context.make_program(result.vertex_shader.complete->user_data, result.fragment_shader.complete->user_data);
|
result.program = context.make_program(result.vertex_shader.complete->user_data, result.fragment_shader.complete->user_data);
|
||||||
m_program_cache.insert({ raw_program, result });
|
m_program_cache.insert({ raw_program_, result });
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ namespace rsx
|
|||||||
decompile_language lang;
|
decompile_language lang;
|
||||||
|
|
||||||
void*(*compile_shader)(program_type type, const std::string &code);
|
void*(*compile_shader)(program_type type, const std::string &code);
|
||||||
complete_shader(*complete_shader)(const decompiled_shader &shader, program_state state);
|
rsx::complete_shader(*complete_shader)(const decompiled_shader &shader, program_state state);
|
||||||
void*(*make_program)(const void *vertex_shader, const void *fragment_shader);
|
void*(*make_program)(const void *vertex_shader, const void *fragment_shader);
|
||||||
void(*remove_program)(void *ptr);
|
void(*remove_program)(void *ptr);
|
||||||
void(*remove_shader)(void *ptr);
|
void(*remove_shader)(void *ptr);
|
||||||
@ -55,7 +55,7 @@ namespace rsx
|
|||||||
|
|
||||||
~programs_cache();
|
~programs_cache();
|
||||||
|
|
||||||
program_info get(raw_program &raw_program, decompile_language lang);
|
program_info get(raw_program raw_program_, decompile_language lang);
|
||||||
void clear();
|
void clear();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 0d3807d2ab18b13617dd01981355a64144ecdc29
|
Subproject commit e4d938c76850549acd837326e2fe0890d5b4be03
|
Loading…
Reference in New Issue
Block a user