mirror of
https://github.com/citra-emu/citra.git
synced 2025-01-08 15:00:05 +00:00
b5d6f645bd
* externals: Update dynarmic * settings: Introduce GraphicsAPI enum * For now it's OpenGL only but will be expanded upon later * citra_qt: Introduce backend agnostic context management * Mostly a direct port from yuzu * core: Simplify context acquire * settings: Add option to create debug contexts * renderer_opengl: Abstract initialization to Driver * This commit also updates glad and adds some useful extensions which we will use in part 2 * Rasterizer construction is moved to the specific renderer instead of RendererBase. Software rendering has been disable to achieve this but will be brought back in the next commit. * video_core: Remove Init/Shutdown methods from renderer * The constructor and destructor can do the same job * In addition move opengl function loading to Qt since SDL already does this. Also remove ErrorVideoCore which is never reached * citra_qt: Decouple software renderer from opengl part 1 * citra: Decouple software renderer from opengl part 2 * android: Decouple software renderer from opengl part 3 * swrasterizer: Decouple software renderer from opengl part 4 * This commit simply enforces the renderer naming conventions in the software renderer * video_core: Move RendererBase to VideoCore * video_core: De-globalize screenshot state * video_core: Pass system to the renderers * video_core: Commonize shader uniform data * video_core: Abstract backend agnostic rasterizer operations * bootmanager: Remove references to OpenGL for macOS OpenGL macOS headers definitions clash heavily with each other * citra_qt: Proper title for api settings * video_core: Reduce boost usage * bootmanager: Fix hide mouse option Remove event handlers from RenderWidget for events that are already handled by the parent GRenderWindow. Also enable mouse tracking on the RenderWidget. * android: Remove software from graphics api list * code: Address review comments * citra: Port per-game settings read * Having to update the default value for all backends is a pain so lets centralize it * android: Rename to OpenGLES --------- Co-authored-by: MerryMage <MerryMage@users.noreply.github.com> Co-authored-by: Vitor Kiguchi <vitor-kiguchi@hotmail.com>
172 lines
6.0 KiB
CMake
172 lines
6.0 KiB
CMake
add_library(video_core STATIC
|
|
command_processor.cpp
|
|
command_processor.h
|
|
debug_utils/debug_utils.cpp
|
|
debug_utils/debug_utils.h
|
|
geometry_pipeline.cpp
|
|
geometry_pipeline.h
|
|
gpu_debugger.h
|
|
pica.cpp
|
|
pica.h
|
|
pica_state.h
|
|
pica_types.h
|
|
precompiled_headers.h
|
|
primitive_assembly.cpp
|
|
primitive_assembly.h
|
|
rasterizer_accelerated.cpp
|
|
rasterizer_accelerated.h
|
|
rasterizer_interface.h
|
|
regs.cpp
|
|
regs.h
|
|
regs_framebuffer.h
|
|
regs_lighting.h
|
|
regs_pipeline.h
|
|
regs_rasterizer.h
|
|
regs_shader.h
|
|
regs_texturing.h
|
|
renderer_base.cpp
|
|
renderer_base.h
|
|
rasterizer_cache/cached_surface.cpp
|
|
rasterizer_cache/cached_surface.h
|
|
rasterizer_cache/morton_swizzle.h
|
|
rasterizer_cache/pixel_format.h
|
|
rasterizer_cache/rasterizer_cache.cpp
|
|
rasterizer_cache/rasterizer_cache.h
|
|
rasterizer_cache/rasterizer_cache_types.h
|
|
rasterizer_cache/rasterizer_cache_utils.cpp
|
|
rasterizer_cache/rasterizer_cache_utils.h
|
|
rasterizer_cache/surface_params.cpp
|
|
rasterizer_cache/surface_params.h
|
|
rasterizer_cache/texture_runtime.cpp
|
|
rasterizer_cache/texture_runtime.h
|
|
renderer_opengl/frame_dumper_opengl.cpp
|
|
renderer_opengl/frame_dumper_opengl.h
|
|
renderer_opengl/gl_driver.cpp
|
|
renderer_opengl/gl_driver.h
|
|
renderer_opengl/gl_rasterizer.cpp
|
|
renderer_opengl/gl_rasterizer.h
|
|
renderer_opengl/gl_resource_manager.cpp
|
|
renderer_opengl/gl_resource_manager.h
|
|
renderer_opengl/gl_shader_decompiler.cpp
|
|
renderer_opengl/gl_shader_decompiler.h
|
|
renderer_opengl/gl_shader_disk_cache.cpp
|
|
renderer_opengl/gl_shader_disk_cache.h
|
|
renderer_opengl/gl_shader_gen.cpp
|
|
renderer_opengl/gl_shader_gen.h
|
|
renderer_opengl/gl_shader_manager.cpp
|
|
renderer_opengl/gl_shader_manager.h
|
|
renderer_opengl/gl_shader_util.cpp
|
|
renderer_opengl/gl_shader_util.h
|
|
renderer_opengl/gl_state.cpp
|
|
renderer_opengl/gl_state.h
|
|
renderer_opengl/gl_stream_buffer.cpp
|
|
renderer_opengl/gl_stream_buffer.h
|
|
renderer_opengl/gl_vars.cpp
|
|
renderer_opengl/gl_vars.h
|
|
renderer_opengl/pica_to_gl.h
|
|
renderer_opengl/post_processing_opengl.cpp
|
|
renderer_opengl/post_processing_opengl.h
|
|
renderer_opengl/renderer_opengl.cpp
|
|
renderer_opengl/renderer_opengl.h
|
|
renderer_opengl/texture_downloader_es.cpp
|
|
renderer_opengl/texture_downloader_es.h
|
|
renderer_opengl/texture_filters/anime4k/anime4k_ultrafast.cpp
|
|
renderer_opengl/texture_filters/anime4k/anime4k_ultrafast.h
|
|
renderer_opengl/texture_filters/bicubic/bicubic.cpp
|
|
renderer_opengl/texture_filters/bicubic/bicubic.h
|
|
renderer_opengl/texture_filters/nearest_neighbor/nearest_neighbor.cpp
|
|
renderer_opengl/texture_filters/nearest_neighbor/nearest_neighbor.h
|
|
renderer_opengl/texture_filters/scale_force/scale_force.cpp
|
|
renderer_opengl/texture_filters/scale_force/scale_force.h
|
|
renderer_opengl/texture_filters/texture_filter_base.h
|
|
renderer_opengl/texture_filters/texture_filterer.cpp
|
|
renderer_opengl/texture_filters/texture_filterer.h
|
|
renderer_opengl/texture_filters/xbrz/xbrz_freescale.cpp
|
|
renderer_opengl/texture_filters/xbrz/xbrz_freescale.h
|
|
#temporary, move these back in alphabetical order before merging
|
|
renderer_opengl/gl_format_reinterpreter.cpp
|
|
renderer_opengl/gl_format_reinterpreter.h
|
|
renderer_software/rasterizer.cpp
|
|
renderer_software/rasterizer.h
|
|
renderer_software/renderer_software.cpp
|
|
renderer_software/renderer_software.h
|
|
renderer_software/sw_clipper.cpp
|
|
renderer_software/sw_clipper.h
|
|
renderer_software/sw_framebuffer.cpp
|
|
renderer_software/sw_framebuffer.h
|
|
renderer_software/sw_lighting.cpp
|
|
renderer_software/sw_lighting.h
|
|
renderer_software/sw_proctex.cpp
|
|
renderer_software/sw_proctex.h
|
|
renderer_software/sw_rasterizer.cpp
|
|
renderer_software/sw_rasterizer.h
|
|
renderer_software/sw_texturing.cpp
|
|
renderer_software/sw_texturing.h
|
|
shader/debug_data.h
|
|
shader/shader.cpp
|
|
shader/shader.h
|
|
shader/shader_interpreter.cpp
|
|
shader/shader_interpreter.h
|
|
shader/shader_jit_x64.cpp
|
|
shader/shader_jit_x64_compiler.cpp
|
|
shader/shader_jit_x64.h
|
|
shader/shader_jit_x64_compiler.h
|
|
shader/shader_uniforms.cpp
|
|
shader/shader_uniforms.h
|
|
texture/etc1.cpp
|
|
texture/etc1.h
|
|
texture/texture_decode.cpp
|
|
texture/texture_decode.h
|
|
utils.h
|
|
vertex_loader.cpp
|
|
vertex_loader.h
|
|
video_core.cpp
|
|
video_core.h
|
|
)
|
|
|
|
set(SHADER_FILES
|
|
renderer_opengl/depth_to_color.frag
|
|
renderer_opengl/depth_to_color.vert
|
|
renderer_opengl/ds_to_color.frag
|
|
renderer_opengl/texture_filters/anime4k/refine.frag
|
|
renderer_opengl/texture_filters/anime4k/x_gradient.frag
|
|
renderer_opengl/texture_filters/anime4k/y_gradient.frag
|
|
renderer_opengl/texture_filters/bicubic/bicubic.frag
|
|
renderer_opengl/texture_filters/nearest_neighbor/nearest_neighbor.frag
|
|
renderer_opengl/texture_filters/scale_force/scale_force.frag
|
|
renderer_opengl/texture_filters/tex_coord.vert
|
|
renderer_opengl/texture_filters/xbrz/xbrz_freescale.frag
|
|
renderer_opengl/texture_filters/xbrz/xbrz_freescale.vert
|
|
)
|
|
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/generate_shaders.cmake)
|
|
|
|
foreach(shader_file ${SHADER_FILES})
|
|
get_filename_component(shader_file_name ${shader_file} NAME)
|
|
GetShaderHeaderFile(${shader_file_name})
|
|
list(APPEND SHADER_HEADERS ${shader_header_file})
|
|
endforeach()
|
|
|
|
add_custom_target(shaders
|
|
BYPRODUCTS ${SHADER_HEADERS}
|
|
COMMAND "${CMAKE_COMMAND}" -P ${CMAKE_CURRENT_SOURCE_DIR}/generate_shaders.cmake
|
|
SOURCES ${SHADER_FILES}
|
|
)
|
|
add_dependencies(video_core shaders)
|
|
|
|
target_include_directories(video_core PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
create_target_directory_groups(video_core)
|
|
|
|
target_link_libraries(video_core PUBLIC common core)
|
|
target_link_libraries(video_core PRIVATE glad nihstro-headers Boost::serialization)
|
|
set_target_properties(video_core PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${ENABLE_LTO})
|
|
|
|
if ("x86_64" IN_LIST ARCHITECTURE)
|
|
target_link_libraries(video_core PUBLIC xbyak)
|
|
endif()
|
|
|
|
if (CITRA_USE_PRECOMPILED_HEADERS)
|
|
target_precompile_headers(video_core PRIVATE precompiled_headers.h)
|
|
endif()
|