Skip to content

Commit

Permalink
gpu rewrite initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DHrpcs3 committed Sep 25, 2024
1 parent 0d4ed51 commit 4cf808f
Show file tree
Hide file tree
Showing 133 changed files with 35,491 additions and 4 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ project(rpcsx)

set(CMAKE_CXX_EXTENSIONS off)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD_REQUIRED on)
set(CMAKE_BUILD_RPATH_USE_ORIGIN on)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

Expand Down Expand Up @@ -41,7 +42,7 @@ function(add_precompiled_vulkan_spirv target)

add_custom_command(
OUTPUT ${outputpath}
COMMAND $<TARGET_FILE:glslang::glslang-standalone> -V --target-env vulkan1.3 --vn "${varname}" -o "${outputpath}" "${CMAKE_CURRENT_SOURCE_DIR}/${input}"
COMMAND $<TARGET_FILE:glslang::glslang-standalone> -V --target-env vulkan1.2 --vn "${varname}" -o "${outputpath}" "${CMAKE_CURRENT_SOURCE_DIR}/${input}"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${input}" glslang::glslang-standalone
COMMENT "Generating ${outputname}..."
)
Expand All @@ -65,6 +66,7 @@ add_subdirectory(tools)
add_subdirectory(orbis-kernel)
add_subdirectory(rpcsx-os)
add_subdirectory(rpcsx-gpu)
add_subdirectory(rpcsx-gpu2)
add_subdirectory(hw/amdgpu)
add_subdirectory(rx)

Expand Down
2 changes: 1 addition & 1 deletion hw/amdgpu/device/src/rect_list.geom.glsl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#version 450

layout (triangles) in;
layout (triangles, invocations = 1) in;
layout (triangle_strip, max_vertices = 4) out;

void main(void)
Expand Down
36 changes: 36 additions & 0 deletions rpcsx-gpu2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
find_package(glfw3 3.3 REQUIRED)

add_precompiled_vulkan_spirv(rpcsx-gpu-shaders
shaders/fill_red.frag.glsl
shaders/flip.frag.glsl
shaders/flip.vert.glsl
shaders/rect_list.geom.glsl
)

add_executable(rpcsx-gpu2
Cache.cpp
main.cpp
Device.cpp
Pipe.cpp
Registers.cpp
Renderer.cpp
)

target_link_libraries(rpcsx-gpu2
PUBLIC
rpcsx-gpu-shaders
amdgpu::bridge
rx
gcn-shader
glfw
amdgpu::tiler::cpu
amdgpu::tiler::vulkan
rdna-semantic-spirv
gnm::vulkan
gnm
)

install(TARGETS rpcsx-gpu2 RUNTIME DESTINATION bin)
set_target_properties(rpcsx-gpu2 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

add_subdirectory(lib)
Loading

0 comments on commit 4cf808f

Please sign in to comment.