2023-04-21 09:14:55 +02:00
|
|
|
add_subdirectory(host_shaders)
|
|
|
|
|
2017-12-11 00:55:03 +01:00
|
|
|
add_library(video_core STATIC
|
|
|
|
command_processor.cpp
|
|
|
|
command_processor.h
|
2023-04-27 06:38:28 +02:00
|
|
|
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
|
2017-12-11 00:55:03 +01:00
|
|
|
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
|
2022-12-17 16:06:38 +01:00
|
|
|
precompiled_headers.h
|
2017-12-11 00:55:03 +01:00
|
|
|
primitive_assembly.cpp
|
|
|
|
primitive_assembly.h
|
2023-03-27 13:29:17 +02:00
|
|
|
rasterizer_accelerated.cpp
|
|
|
|
rasterizer_accelerated.h
|
2017-12-11 00:55:03 +01:00
|
|
|
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
|
2023-04-21 09:14:55 +02:00
|
|
|
rasterizer_cache/framebuffer_base.h
|
|
|
|
rasterizer_cache/pixel_format.cpp
|
2022-08-20 11:17:31 +02:00
|
|
|
rasterizer_cache/pixel_format.h
|
2022-08-20 10:40:49 +02:00
|
|
|
rasterizer_cache/rasterizer_cache.cpp
|
|
|
|
rasterizer_cache/rasterizer_cache.h
|
2023-05-07 01:34:28 +02:00
|
|
|
rasterizer_cache/rasterizer_cache_base.h
|
|
|
|
rasterizer_cache/sampler_params.h
|
2023-07-18 16:31:31 +02:00
|
|
|
rasterizer_cache/slot_id.h
|
2023-04-21 09:14:55 +02:00
|
|
|
rasterizer_cache/surface_base.cpp
|
|
|
|
rasterizer_cache/surface_base.h
|
2022-08-20 10:40:49 +02:00
|
|
|
rasterizer_cache/surface_params.cpp
|
|
|
|
rasterizer_cache/surface_params.h
|
2023-04-21 09:14:55 +02:00
|
|
|
rasterizer_cache/texture_codec.h
|
2023-07-18 16:31:31 +02:00
|
|
|
rasterizer_cache/texture_cube.h
|
2023-04-21 09:14:55 +02:00
|
|
|
rasterizer_cache/utils.cpp
|
|
|
|
rasterizer_cache/utils.h
|
2020-01-28 14:57:30 +01:00
|
|
|
renderer_opengl/frame_dumper_opengl.cpp
|
|
|
|
renderer_opengl/frame_dumper_opengl.h
|
2023-04-21 09:14:55 +02:00
|
|
|
renderer_opengl/gl_blit_helper.cpp
|
|
|
|
renderer_opengl/gl_blit_helper.h
|
2023-03-27 13:29:17 +02:00
|
|
|
renderer_opengl/gl_driver.cpp
|
|
|
|
renderer_opengl/gl_driver.h
|
2017-12-11 00:55:03 +01:00
|
|
|
renderer_opengl/gl_rasterizer.cpp
|
|
|
|
renderer_opengl/gl_rasterizer.h
|
2023-05-07 01:34:28 +02:00
|
|
|
renderer_opengl/gl_rasterizer_cache.cpp
|
2018-11-06 10:40:49 +01:00
|
|
|
renderer_opengl/gl_resource_manager.cpp
|
2017-12-11 00:55:03 +01:00
|
|
|
renderer_opengl/gl_resource_manager.h
|
2019-09-08 00:11:09 +02:00
|
|
|
renderer_opengl/gl_shader_disk_cache.cpp
|
|
|
|
renderer_opengl/gl_shader_disk_cache.h
|
2018-04-09 23:31:11 +02:00
|
|
|
renderer_opengl/gl_shader_manager.cpp
|
|
|
|
renderer_opengl/gl_shader_manager.h
|
2017-12-11 00:55:03 +01:00
|
|
|
renderer_opengl/gl_shader_util.cpp
|
|
|
|
renderer_opengl/gl_shader_util.h
|
|
|
|
renderer_opengl/gl_state.cpp
|
|
|
|
renderer_opengl/gl_state.h
|
2018-02-23 10:56:30 +01:00
|
|
|
renderer_opengl/gl_stream_buffer.cpp
|
|
|
|
renderer_opengl/gl_stream_buffer.h
|
2023-08-01 02:35:41 +02:00
|
|
|
renderer_opengl/gl_texture_mailbox.cpp
|
|
|
|
renderer_opengl/gl_texture_mailbox.h
|
2023-04-21 09:14:55 +02:00
|
|
|
renderer_opengl/gl_texture_runtime.cpp
|
|
|
|
renderer_opengl/gl_texture_runtime.h
|
2019-01-30 21:10:33 +01:00
|
|
|
renderer_opengl/gl_vars.cpp
|
|
|
|
renderer_opengl/gl_vars.h
|
2017-12-11 00:55:03 +01:00
|
|
|
renderer_opengl/pica_to_gl.h
|
2019-08-09 20:00:47 +02:00
|
|
|
renderer_opengl/post_processing_opengl.cpp
|
|
|
|
renderer_opengl/post_processing_opengl.h
|
2017-12-11 00:55:03 +01:00
|
|
|
renderer_opengl/renderer_opengl.cpp
|
|
|
|
renderer_opengl/renderer_opengl.h
|
2023-03-27 13:29:17 +02:00
|
|
|
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
|
2023-06-20 14:24:24 +02:00
|
|
|
renderer_vulkan/pica_to_vk.h
|
2023-09-13 00:28:50 +02:00
|
|
|
renderer_vulkan/renderer_vulkan.cpp
|
|
|
|
renderer_vulkan/renderer_vulkan.h
|
|
|
|
renderer_vulkan/vk_blit_helper.cpp
|
|
|
|
renderer_vulkan/vk_blit_helper.h
|
2023-06-20 14:24:24 +02:00
|
|
|
renderer_vulkan/vk_common.cpp
|
|
|
|
renderer_vulkan/vk_common.h
|
2023-09-13 00:28:50 +02:00
|
|
|
renderer_vulkan/vk_descriptor_pool.cpp
|
|
|
|
renderer_vulkan/vk_descriptor_pool.h
|
|
|
|
renderer_vulkan/vk_graphics_pipeline.cpp
|
|
|
|
renderer_vulkan/vk_graphics_pipeline.h
|
|
|
|
renderer_vulkan/vk_master_semaphore.cpp
|
|
|
|
renderer_vulkan/vk_master_semaphore.h
|
|
|
|
renderer_vulkan/vk_rasterizer.cpp
|
|
|
|
renderer_vulkan/vk_rasterizer.h
|
|
|
|
renderer_vulkan/vk_rasterizer_cache.cpp
|
|
|
|
renderer_vulkan/vk_scheduler.cpp
|
|
|
|
renderer_vulkan/vk_scheduler.h
|
|
|
|
renderer_vulkan/vk_resource_pool.cpp
|
|
|
|
renderer_vulkan/vk_resource_pool.h
|
2023-06-20 14:24:24 +02:00
|
|
|
renderer_vulkan/vk_instance.cpp
|
|
|
|
renderer_vulkan/vk_instance.h
|
2023-09-13 00:28:50 +02:00
|
|
|
renderer_vulkan/vk_pipeline_cache.cpp
|
|
|
|
renderer_vulkan/vk_pipeline_cache.h
|
2023-06-20 14:24:24 +02:00
|
|
|
renderer_vulkan/vk_platform.cpp
|
|
|
|
renderer_vulkan/vk_platform.h
|
2023-09-13 00:28:50 +02:00
|
|
|
renderer_vulkan/vk_present_window.cpp
|
|
|
|
renderer_vulkan/vk_present_window.h
|
|
|
|
renderer_vulkan/vk_renderpass_cache.cpp
|
|
|
|
renderer_vulkan/vk_renderpass_cache.h
|
2023-06-26 16:22:51 +02:00
|
|
|
renderer_vulkan/vk_shader_util.cpp
|
|
|
|
renderer_vulkan/vk_shader_util.h
|
2023-09-13 00:28:50 +02:00
|
|
|
renderer_vulkan/vk_stream_buffer.cpp
|
|
|
|
renderer_vulkan/vk_stream_buffer.h
|
|
|
|
renderer_vulkan/vk_swapchain.cpp
|
|
|
|
renderer_vulkan/vk_swapchain.h
|
|
|
|
renderer_vulkan/vk_texture_runtime.cpp
|
|
|
|
renderer_vulkan/vk_texture_runtime.h
|
2017-12-11 00:55:03 +01:00
|
|
|
shader/debug_data.h
|
2023-09-30 11:06:06 +02:00
|
|
|
shader/generator/glsl_shader_decompiler.cpp
|
|
|
|
shader/generator/glsl_shader_decompiler.h
|
|
|
|
shader/generator/glsl_shader_gen.cpp
|
|
|
|
shader/generator/glsl_shader_gen.h
|
|
|
|
shader/generator/shader_gen.cpp
|
|
|
|
shader/generator/shader_gen.h
|
|
|
|
shader/generator/shader_uniforms.cpp
|
|
|
|
shader/generator/shader_uniforms.h
|
|
|
|
shader/generator/spv_shader_gen.cpp
|
|
|
|
shader/generator/spv_shader_gen.h
|
2017-12-11 00:55:03 +01:00
|
|
|
shader/shader.cpp
|
|
|
|
shader/shader.h
|
|
|
|
shader/shader_interpreter.cpp
|
|
|
|
shader/shader_interpreter.h
|
video_core: Implement an arm64 shader-jit backend (#7002)
* externals: Add oaksim submodule
Used for emitting ARM64 assembly
* common: Implement aarch64 ABI
Utilize oaknut to implement a stack frame.
* tests: Allow shader-jit tests for x64 and a64
Run the shader-jit tests for both x86_64 and arm64 targets
* video_core: Initialize arm64 shader-jit backend
Passes all current unit tests!
* shader_jit_a64: protect/unprotect memory when jit-ing
Required on MacOS. Memory needs to be fully unprotected and then
re-protected when writing or there will be memory access errors on
MacOS.
* shader_jit_a64: Fix ARM64-Imm overflow
These conditionals were throwing exceptions since the immediate values
were overflowing the available space in the `EOR` instructions. Instead
they are generated from `MOV` and then `EOR`-ed after.
* shader_jit_a64: Fix Geometry shader conditional
* shader_jit_a64: Replace `ADRL` with `MOVP2R`
Fixes some immediate-generation exceptions.
* common/aarch64: Fix CallFarFunction
* shader_jit_a64: Optimize `SantitizedMul`
Co-authored-by: merryhime <merryhime@users.noreply.github.com>
* shader_jit_a64: Fix address register offset behavior
Based on https://github.com/citra-emu/citra/pull/6942
Passes unit tests.
* shader_jit_a64: Fix `RET` address offset
A64 stack is 16-byte aligned rather than 8. So a direct port of the x64
code won't work. Fixes weird branches into invalid memory for any
shaders with subroutines.
* shader_jit_a64: Increase max program size
Tuned for A64 program size.
* shader_jit_a64: Use `UBFX` for extracting loop-state
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Optimize `SUB+CMP` to `SUBS`
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Optimize `CMP+B` to `CBNZ`
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Use `FMOV` for `ONE` vector
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Remove x86-specific documentation
* shader_jit_a64: Use `UBFX` to extract exponent
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Remove redundant MIN/MAX `SRC2`-NaN check
Special handling only needs to check SRC1 for NaN, not SRC2.
It would work as follows in the four possible cases:
No NaN: No special handling needed.
Only SRC1 is NaN: The special handling is triggered because SRC1 is NaN, and SRC2 is picked.
Only SRC2 is NaN: FMAX automatically picks SRC2 because it always picks the NaN if there is one.
Both SRC1 and SRC2 are NaN: The special handling is triggered because SRC1 is NaN, and SRC2 is picked.
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit/tests:: Add catch-stringifier for vec2f/vec3f
* shader_jit/tests: Add Dest Mask unit test
* shader_jit_a64: Fix Dest-Mask `BSL` operand order
Passes the dest-mask unit tests now.
* shader_jit_a64: Use `MOVI` for DestEnable mask
Accelerate certain cases of masking with MOVI as well
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit/tests: Add source-swizzle unit test
This is not expansive. Generating all `4^4` cases seems to make Catch2
crash. So I've added some component-masking(non-reordering) tests based
on the Dest-Mask unit-test and some additional ones to test
broadcasts/splats and component re-ordering.
* shader_jit_a64: Fix swizzle index generation
This was still generating `SHUFPS` indices and not the ones that we wanted for the `TBL` instruction. Passes all unit tests now.
* shader_jit/tests: Add `ShaderSetup` constructor to `ShaderTest`
Rather than using the direct output of `CompileShaderSetup` allow a
`ShaderSetup` object to be passed in directly. This enabled the ability
emit assembly that is not directly supported by nihstro.
* shader_jit/tests: Add `CALL` unit-test
Tests nested `CALL` instructions to eventually reach an `EX2`
instruction.
EX2 is picked in particular since it is implemented as an even deeper
dispatch and ensures subroutines are properly implemented between `CALL`
instructions and implementation-calls.
* shader_jit_a64: Fix nested `BL` subroutines
`lr` was getting writen over by nested calls to `BL`, causing undefined
behavior with mixtures of `CALL`, `EX2`, and `LG2` instructions.
Each usage of `BL` is now protected with a stach push/pop to preserve
and restore teh `lr` register to allow nested subroutines to work
properly.
* shader_jit/tests: Allocate generated tests on heap
Each of these generated shader-test objects were causing the stack to
overflow. Allocate each of the generated tests on the heap and use
unique_ptr so they only exist within the life-time of the `REQUIRE`
statement.
* shader_jit_a64: Preserve `lr` register from external function calls
`EMIT` makes an external function call, and should be preserving `lr`
* shader_jit/tests: Add `MAD` unit-test
The Inline Asm version requires an upstream fix:
https://github.com/neobrain/nihstro/issues/68
Instead, the program code is manually configured and added.
* shader_jit/tests: Fix uninitialized instructions
These `union`-type instruction-types were uninitialized, causing tests
to indeterminantly fail at times.
* shader_jit_a64: Remove unneeded `MOV`
Residue from the direct-port of x64 code.
* shader_jit_a64: Use `std::array` for `instr_table`
Add some type-safety and const-correctness around this type as well.
* shader_jit_a64: Avoid c-style offset casting
Add some more const-correctness to this function as well.
* video_core: Add arch preprocessor comments
* common/aarch64: Use X16 as the veneer register
https://developer.arm.com/documentation/102374/0101/Procedure-Call-Standard
* shader_jit/tests: Add uniform reading unit-test
Particularly to ensure that addresses are being properly truncated
* common/aarch64: Use `X0` as `ABI_RETURN`
`X8` is used as the indirect return result value in the case that the
result is bigger than 128-bits. Principally `X0` is the general-case
return register though.
* common/aarch64: Add veneer register note
`LR` is generally overwritten by `BLR` anyways, and would also be a safe
veneer to utilize for far-calls.
* shader_jit_a64: Remove unneeded scratch register from `SanitizedMul`
* shader_jit_a64: Fix CALLU condition
Should be `EQ` not `NE`. Fixes the regression on Kid Icarus.
No known regressions anymore!
---------
Co-authored-by: merryhime <merryhime@users.noreply.github.com>
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
2023-11-05 21:40:31 +01:00
|
|
|
shader/shader_jit_a64.cpp
|
|
|
|
shader/shader_jit_a64_compiler.cpp
|
|
|
|
shader/shader_jit_a64.h
|
|
|
|
shader/shader_jit_a64_compiler.h
|
2023-01-06 16:28:02 +01:00
|
|
|
shader/shader_jit_x64.cpp
|
|
|
|
shader/shader_jit_x64_compiler.cpp
|
|
|
|
shader/shader_jit_x64.h
|
|
|
|
shader/shader_jit_x64_compiler.h
|
2017-12-11 00:55:03 +01:00
|
|
|
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
|
|
|
|
)
|
2014-08-24 03:22:05 +02:00
|
|
|
|
2023-04-21 09:14:55 +02:00
|
|
|
add_dependencies(video_core host_shaders)
|
|
|
|
target_include_directories(video_core PRIVATE ${HOST_SHADERS_INCLUDE})
|
2020-03-16 15:42:05 +01:00
|
|
|
|
2017-12-11 00:55:03 +01:00
|
|
|
create_target_directory_groups(video_core)
|
2014-04-29 04:40:39 +02:00
|
|
|
|
2023-04-28 22:02:53 +02:00
|
|
|
target_link_libraries(video_core PUBLIC citra_common citra_core)
|
2023-06-20 14:24:24 +02:00
|
|
|
target_link_libraries(video_core PRIVATE Boost::serialization dds-ktx json-headers nihstro-headers tsl::robin_map)
|
2023-06-26 16:22:51 +02:00
|
|
|
target_link_libraries(video_core PRIVATE vulkan-headers vma glad sirit SPIRV glslang)
|
2017-05-28 03:26:55 +02:00
|
|
|
|
2023-01-06 16:28:02 +01:00
|
|
|
if ("x86_64" IN_LIST ARCHITECTURE)
|
2017-11-25 04:17:30 +01:00
|
|
|
target_link_libraries(video_core PUBLIC xbyak)
|
2016-12-12 10:23:08 +01:00
|
|
|
endif()
|
2022-12-17 16:06:38 +01:00
|
|
|
|
video_core: Implement an arm64 shader-jit backend (#7002)
* externals: Add oaksim submodule
Used for emitting ARM64 assembly
* common: Implement aarch64 ABI
Utilize oaknut to implement a stack frame.
* tests: Allow shader-jit tests for x64 and a64
Run the shader-jit tests for both x86_64 and arm64 targets
* video_core: Initialize arm64 shader-jit backend
Passes all current unit tests!
* shader_jit_a64: protect/unprotect memory when jit-ing
Required on MacOS. Memory needs to be fully unprotected and then
re-protected when writing or there will be memory access errors on
MacOS.
* shader_jit_a64: Fix ARM64-Imm overflow
These conditionals were throwing exceptions since the immediate values
were overflowing the available space in the `EOR` instructions. Instead
they are generated from `MOV` and then `EOR`-ed after.
* shader_jit_a64: Fix Geometry shader conditional
* shader_jit_a64: Replace `ADRL` with `MOVP2R`
Fixes some immediate-generation exceptions.
* common/aarch64: Fix CallFarFunction
* shader_jit_a64: Optimize `SantitizedMul`
Co-authored-by: merryhime <merryhime@users.noreply.github.com>
* shader_jit_a64: Fix address register offset behavior
Based on https://github.com/citra-emu/citra/pull/6942
Passes unit tests.
* shader_jit_a64: Fix `RET` address offset
A64 stack is 16-byte aligned rather than 8. So a direct port of the x64
code won't work. Fixes weird branches into invalid memory for any
shaders with subroutines.
* shader_jit_a64: Increase max program size
Tuned for A64 program size.
* shader_jit_a64: Use `UBFX` for extracting loop-state
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Optimize `SUB+CMP` to `SUBS`
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Optimize `CMP+B` to `CBNZ`
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Use `FMOV` for `ONE` vector
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Remove x86-specific documentation
* shader_jit_a64: Use `UBFX` to extract exponent
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit_a64: Remove redundant MIN/MAX `SRC2`-NaN check
Special handling only needs to check SRC1 for NaN, not SRC2.
It would work as follows in the four possible cases:
No NaN: No special handling needed.
Only SRC1 is NaN: The special handling is triggered because SRC1 is NaN, and SRC2 is picked.
Only SRC2 is NaN: FMAX automatically picks SRC2 because it always picks the NaN if there is one.
Both SRC1 and SRC2 are NaN: The special handling is triggered because SRC1 is NaN, and SRC2 is picked.
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit/tests:: Add catch-stringifier for vec2f/vec3f
* shader_jit/tests: Add Dest Mask unit test
* shader_jit_a64: Fix Dest-Mask `BSL` operand order
Passes the dest-mask unit tests now.
* shader_jit_a64: Use `MOVI` for DestEnable mask
Accelerate certain cases of masking with MOVI as well
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
* shader_jit/tests: Add source-swizzle unit test
This is not expansive. Generating all `4^4` cases seems to make Catch2
crash. So I've added some component-masking(non-reordering) tests based
on the Dest-Mask unit-test and some additional ones to test
broadcasts/splats and component re-ordering.
* shader_jit_a64: Fix swizzle index generation
This was still generating `SHUFPS` indices and not the ones that we wanted for the `TBL` instruction. Passes all unit tests now.
* shader_jit/tests: Add `ShaderSetup` constructor to `ShaderTest`
Rather than using the direct output of `CompileShaderSetup` allow a
`ShaderSetup` object to be passed in directly. This enabled the ability
emit assembly that is not directly supported by nihstro.
* shader_jit/tests: Add `CALL` unit-test
Tests nested `CALL` instructions to eventually reach an `EX2`
instruction.
EX2 is picked in particular since it is implemented as an even deeper
dispatch and ensures subroutines are properly implemented between `CALL`
instructions and implementation-calls.
* shader_jit_a64: Fix nested `BL` subroutines
`lr` was getting writen over by nested calls to `BL`, causing undefined
behavior with mixtures of `CALL`, `EX2`, and `LG2` instructions.
Each usage of `BL` is now protected with a stach push/pop to preserve
and restore teh `lr` register to allow nested subroutines to work
properly.
* shader_jit/tests: Allocate generated tests on heap
Each of these generated shader-test objects were causing the stack to
overflow. Allocate each of the generated tests on the heap and use
unique_ptr so they only exist within the life-time of the `REQUIRE`
statement.
* shader_jit_a64: Preserve `lr` register from external function calls
`EMIT` makes an external function call, and should be preserving `lr`
* shader_jit/tests: Add `MAD` unit-test
The Inline Asm version requires an upstream fix:
https://github.com/neobrain/nihstro/issues/68
Instead, the program code is manually configured and added.
* shader_jit/tests: Fix uninitialized instructions
These `union`-type instruction-types were uninitialized, causing tests
to indeterminantly fail at times.
* shader_jit_a64: Remove unneeded `MOV`
Residue from the direct-port of x64 code.
* shader_jit_a64: Use `std::array` for `instr_table`
Add some type-safety and const-correctness around this type as well.
* shader_jit_a64: Avoid c-style offset casting
Add some more const-correctness to this function as well.
* video_core: Add arch preprocessor comments
* common/aarch64: Use X16 as the veneer register
https://developer.arm.com/documentation/102374/0101/Procedure-Call-Standard
* shader_jit/tests: Add uniform reading unit-test
Particularly to ensure that addresses are being properly truncated
* common/aarch64: Use `X0` as `ABI_RETURN`
`X8` is used as the indirect return result value in the case that the
result is bigger than 128-bits. Principally `X0` is the general-case
return register though.
* common/aarch64: Add veneer register note
`LR` is generally overwritten by `BLR` anyways, and would also be a safe
veneer to utilize for far-calls.
* shader_jit_a64: Remove unneeded scratch register from `SanitizedMul`
* shader_jit_a64: Fix CALLU condition
Should be `EQ` not `NE`. Fixes the regression on Kid Icarus.
No known regressions anymore!
---------
Co-authored-by: merryhime <merryhime@users.noreply.github.com>
Co-authored-by: JosJuice <JosJuice@users.noreply.github.com>
2023-11-05 21:40:31 +01:00
|
|
|
if ("arm64" IN_LIST ARCHITECTURE)
|
|
|
|
target_link_libraries(video_core PUBLIC oaknut)
|
|
|
|
endif()
|
|
|
|
|
2022-12-17 16:06:38 +01:00
|
|
|
if (CITRA_USE_PRECOMPILED_HEADERS)
|
|
|
|
target_precompile_headers(video_core PRIVATE precompiled_headers.h)
|
|
|
|
endif()
|