citra/src/video_core/CMakeLists.txt
GPUCode 06f3c90cfb
Custom textures rewrite (#6452)
* common: Add thread pool from yuzu

* Is really useful for asynchronous operations like shader compilation and custom textures, will be used in following PRs

* core: Improve ImageInterface

* Provide a default implementation so frontends don't have to duplicate code registering the lodepng version

* Add a dds version too which we will use in the next commit

* rasterizer_cache: Rewrite custom textures

* There's just too much to talk about here, look at the PR description for more details

* rasterizer_cache: Implement basic pack configuration file

* custom_tex_manager: Flip dumped textures

* custom_tex_manager: Optimize custom texture hashing

* If no convertions are needed then we can hash the decoded data directly removing the needed for duplicate decode

* custom_tex_manager: Implement asynchronous texture loading

* The file loading and decoding is offloaded into worker threads, while the upload itself still occurs in the main thread to avoid having to manage shared contexts

* Address review comments

* custom_tex_manager: Introduce custom material support

* video_core: Move custom textures to separate directory

* Also split the files to make the code cleaner

* gl_texture_runtime: Generate mipmaps for material

* custom_tex_manager: Prevent memory overflow when preloading

* externals: Add dds-ktx as submodule

* string_util: Return vector from SplitString

* No code benefits from passing it as an argument

* custom_textures: Use json config file

* gl_rasterizer: Only bind material for unit 0

* Address review comments
2023-04-27 07:38:28 +03:00

139 lines
4.4 KiB
CMake

add_subdirectory(host_shaders)
add_library(video_core STATIC
command_processor.cpp
command_processor.h
custom_textures/custom_format.cpp
custom_textures/custom_format.h
custom_textures/custom_tex_manager.cpp
custom_textures/custom_tex_manager.h
custom_textures/material.cpp
custom_textures/material.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/framebuffer_base.cpp
rasterizer_cache/framebuffer_base.h
rasterizer_cache/pixel_format.cpp
rasterizer_cache/pixel_format.h
rasterizer_cache/rasterizer_cache.cpp
rasterizer_cache/rasterizer_cache.h
rasterizer_cache/surface_base.cpp
rasterizer_cache/surface_base.h
rasterizer_cache/surface_params.cpp
rasterizer_cache/surface_params.h
rasterizer_cache/texture_codec.h
rasterizer_cache/utils.cpp
rasterizer_cache/utils.h
renderer_opengl/frame_dumper_opengl.cpp
renderer_opengl/frame_dumper_opengl.h
renderer_opengl/gl_blit_helper.cpp
renderer_opengl/gl_blit_helper.h
renderer_opengl/gl_driver.cpp
renderer_opengl/gl_driver.h
renderer_opengl/gl_format_reinterpreter.cpp
renderer_opengl/gl_format_reinterpreter.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_texture_runtime.cpp
renderer_opengl/gl_texture_runtime.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_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
)
add_dependencies(video_core host_shaders)
target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
create_target_directory_groups(video_core)
target_link_libraries(video_core PUBLIC common core)
target_link_libraries(video_core PRIVATE glad json-headers dds-ktx 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()