# SecondSonPC <-> bridge boundary: the adapter layer's allowed direct dependencies on shadPS4 headers (P3.6.6;
# docs/PHASE3_P36_BRIDGE_ISOLATION.md §2). Checked at every build by cmake/sspc_boundary_check.cmake:
#   * a file of SecondSonPC's own runtime (src/ except src/bridge and src/app/main.cpp) includes only SecondSonPC's
#     headers and names no namespace of the bridge (not listed here: none is allowed);
#   * an adapter-layer file (src/bridge/**, src/app/main.cpp) includes a shadPS4 header only if it is listed on the
#     file's line below (a new one fails the build until it is added here with its owner and reason);
#   * the bridge's patches include only the SecondSonPC headers listed under "bridge ->" below.
# src/bridge/shadps4/generated/* is generated from the import table (every BRIDGE export's declaration): exempt.
# Format: <file> | <owner> | <reason> | <headers, space-separated>
# Lines starting with "bridge -> " list the SecondSonPC headers the patched bridge may include.

src/app/main.cpp | app | the executable's entry point is built in the bridge's target (stock link options) |
src/bridge/shadps4/bootstrap.cpp | start-up and lifecycle | starts the bridge (log, settings, mounts, ElfInfo, libraries, window, signals), the Phase 0 loader path, the exit steps that stop bridge services | common/elf_info.h common/key_manager.h common/logging/log.h common/ntapi.h common/path_util.h common/scm_rev.h common/singleton.h common/thread.h core/aerolib/aerolib.h core/emulator_settings.h core/file_format/psf.h core/file_sys/fs.h core/libraries/kernel/kernel.h core/libraries/kernel/time.h core/libraries/libc_internal/libc_internal.h core/libraries/libs.h core/libraries/save_data/save_backup.h core/linker.h core/debug_state.h core/guest_memory.h core/signals.h core/user_settings.h emulator.h input/controller.h sdl_window.h video_core/cache_storage.h video_core/renderdoc.h
src/bridge/shadps4/event_queue_host.cpp | kernel (event queues) | Kernel::EventQueues over the bridge's libkernel, the queues' owner (patch 0025) | core/libraries/kernel/equeue.h
src/bridge/shadps4/exceptions_host.cpp | cpu (exceptions) | the bridge's handlers behind SecondSonPC's dispatcher (patch 0022), bridge thread descriptions | common/logging/log.h core/cpu_patches.h core/libraries/kernel/threads/pthread.h core/signals.h
src/bridge/shadps4/fs_host.cpp | filesystem | FsHost: descriptors in the bridge's handle table, its mounts, foreign descriptors | common/singleton.h core/file_sys/fs.h core/guest_memory.h core/libraries/kernel/file_system.h core/libraries/kernel/kernel.h
src/bridge/shadps4/gpu_alloc_diag.cpp | diagnostics (SSPC-001) | Vulkan allocation wrappers of patch 0004 | video_core/renderer_vulkan/vk_common.h
src/bridge/shadps4/gpu_alloc_diag.h | diagnostics (SSPC-001) | included by the patched bridge (patch 0004) | video_core/renderer_vulkan/vk_common.h
src/bridge/shadps4/gpu_memory_host.cpp | gpu (P4.1.3) | Gpu::GuestMemory (SecondSonPC's contract) over the bridge's GpuMemory, one listener slot never shared, P4.4 tracking fault handler | common/signal_context.h core/address_space.h core/gpu_memory.h core/signals.h
src/bridge/shadps4/selftest_gpu.cpp | tests | the GPU contract's notifications through the bridge's memory manager and its listener slot, the PM4 decoder against the bridge's header layout and opcode table | core/gpu_memory.h core/libraries/kernel/memory.h video_core/amdgpu/pm4_cmds.h
src/bridge/shadps4/selftest_gpu_cp.cpp | tests | the command processor's packet fields, register indices and clear state against the bridge's layouts (the hardware's) | video_core/amdgpu/pm4_cmds.h video_core/amdgpu/regs.h
src/bridge/shadps4/shader_bridge_hooks.h | gpu (P4.3) | the bridge's pipeline cache reports its translations and pipelines (patch 0031), bridge types in | shader_recompiler/backend/bindings.h shader_recompiler/info.h shader_recompiler/profile.h shader_recompiler/runtime_info.h video_core/amdgpu/regs.h video_core/renderer_vulkan/vk_common.h
src/bridge/shadps4/shader_translator_host.cpp | gpu (P4.3) | SecondSonPC's ShaderTranslator over the bridge's recompiler (patch 0030) and the capture/view hooks (patch 0031), the auxiliary tessellation stages of rect/quad lists (P4.4) | shader_recompiler/backend/spirv/emit_spirv.h shader_recompiler/backend/spirv/emit_spirv_quad_rect.h shader_recompiler/frontend/fetch_shader.h shader_recompiler/info.h shader_recompiler/ir/program.h shader_recompiler/profile.h shader_recompiler/recompiler.h shader_recompiler/runtime_info.h video_core/amdgpu/regs.h
src/bridge/shadps4/host_shaders_host.cpp | gpu (P4.4) | the bridge's built tiling kernels (SPIR-V data) handed to SecondSonPC's backend | video_core/host_shaders/tiling_macro_128_comp.h video_core/host_shaders/tiling_macro_16_comp.h video_core/host_shaders/tiling_macro_32_comp.h video_core/host_shaders/tiling_macro_64_comp.h video_core/host_shaders/tiling_macro_8_comp.h video_core/host_shaders/tiling_macro_96_comp.h video_core/host_shaders/tiling_micro_128_comp.h video_core/host_shaders/tiling_micro_16_comp.h video_core/host_shaders/tiling_micro_32_comp.h video_core/host_shaders/tiling_micro_64_comp.h video_core/host_shaders/tiling_micro_8_comp.h video_core/host_shaders/tiling_micro_96_comp.h
src/bridge/shadps4/selftest_shader.cpp | tests | SecondSonPC's shader frontend, the adapter against the bridge's recompiler, fetch shader parser and layouts as the oracle | shader_recompiler/frontend/fetch_shader.h shader_recompiler/info.h shader_recompiler/recompiler.h video_core/amdgpu/regs.h video_core/amdgpu/resource.h
src/bridge/shadps4/guest_stack.cpp | kernel (threads) | guest stacks in the selected guest memory manager | core/guest_memory.h
src/bridge/shadps4/guest_stack.h | kernel (threads) | VAddr | common/types.h
src/bridge/shadps4/input_host.cpp | input | Pad::Host over the bridge's SDL controllers, overlay, clock | common/elf_info.h common/singleton.h core/libraries/kernel/time.h imgui/renderer/imgui_core.h input/controller.h input/input_handler.h sdl_window.h
src/bridge/shadps4/settings_host.cpp | pc settings | the bridge's own run-time controls of what it owns while playing (master volume, its FPS counter overlay, FSR/RCAS of its presenter) and the capabilities of the run | core/devtools/layer.h core/emulator_settings.h video_core/renderer_vulkan/vk_presenter.h
src/bridge/shadps4/kernel_host.cpp | kernel | Kernel::Host and ThreadHost: errno and clock adapters (patches 0023/0024), TCB slot, debugger thread list | core/debug_state.h core/guest_memory.h core/libraries/kernel/kernel.h core/libraries/kernel/threads/pthread.h core/libraries/kernel/time.h core/tls.h
src/bridge/shadps4/lifecycle_host.cpp | lifecycle | the bridge's Emulator::Shutdown hook (patch 0026), its log flush | common/logging/log.h emulator.h
src/bridge/shadps4/loader_host.cpp | loader, cpu | Loader::Host over the guest memory interfaces, TCB slot (patch 0021), the bridge's CPU patcher | common/elf_info.h common/thread.h core/cpu_patches.h core/guest_memory.h core/libraries/kernel/threads.h core/tls.h
src/bridge/shadps4/memory_host.cpp | memory | native direct memory beside the bridge's manager (patch 0007), memory map dumps | common/thread.h core/memory.h
src/bridge/shadps4/native_memory.cpp | memory | SecondSonPC's memory manager behind the bridge's guest/GPU memory interfaces (patch 0012) | core/libraries/kernel/memory.h
src/bridge/shadps4/native_memory.h | memory | the interfaces it implements | core/gpu_memory.h core/guest_memory.h
src/bridge/shadps4/rtld_tcb.cpp | loader (TLS) | the bridge's pthread TCB glue on SecondSonPC's loader (replaces threads/tcb.cpp) | common/assert.h common/singleton.h core/libraries/kernel/threads/pthread.h core/libraries/libs.h core/linker.h core/tls.h
src/bridge/shadps4/user_host.cpp | user service | the bridge's NP and user settings get SecondSonPC's UserService events (patch 0003) | core/libraries/np/np_manager.h core/libraries/system/userservice.h core/user_settings.h
src/bridge/shadps4/selftest.cpp | tests | NATIVE vs BRIDGE comparisons call the bridge's implementations | common/elf_info.h common/singleton.h core/file_format/psf.h core/file_sys/fs.h core/libraries/gnmdriver/gnmdriver.h core/libraries/kernel/kernel.h core/libraries/kernel/memory.h core/memory.h video_core/renderer_vulkan/vk_presenter.h video_core/renderer_vulkan/vk_rasterizer.h core/libraries/kernel/threads/pthread.h core/libraries/kernel/threads/sleepq.h core/user_settings.h
src/bridge/shadps4/selftest_equeue.cpp | tests | the event queues' guest API and GPU interrupts | core/libraries/gnmdriver/gnmdriver.h core/libraries/kernel/equeue.h core/libraries/kernel/orbis_error.h core/platform.h
src/bridge/shadps4/selftest_kernel_hle.cpp | tests | errno, memory functions and clock against the bridge | core/libraries/kernel/kernel.h core/libraries/kernel/memory.h core/libraries/kernel/time.h core/thread.h
src/bridge/shadps4/selftest_lifecycle.cpp | tests | the bridge's shutdown request and an event queue wait in child processes | common/singleton.h core/libraries/kernel/equeue.h emulator.h
src/bridge/shadps4/selftest_native_start.cpp | tests | SecondSonPC's memory manager started as for the game | common/elf_info.h core/libraries/kernel/kernel.h core/libraries/kernel/memory.h
src/bridge/shadps4/selftest_patch_race.cpp | tests | the bridge's CPU patcher under a race (SSPC-002) | core/cpu_patches.h core/signals.h core/tls.h
src/bridge/shadps4/selftest_threads.cpp | tests | guest stacks in the selected manager | core/guest_memory.h
src/bridge/shadps4/selftest_vmm.cpp | tests | the bridge's memory manager as the oracle | core/memory.h

bridge -> bridge/shadps4/track_diag.h | diagnostics (P2.5) | GPU write tracking statistics hooks (patch 0014)
bridge -> bridge/shadps4/gpu_alloc_diag.h | diagnostics (SSPC-001) | Vulkan allocation diagnostics (patch 0004)
bridge -> bridge/shadps4/perf_opts.h | performance switches (P2.5) | barrier-memo, image-memo, stream-host, stream-reads (patches 0015, 0018-0020)
bridge -> runtime/gpu/pm4_stats.h | diagnostics (P4.1.2) | PM4 command statistics hooks of the command processor and the renderer, --gpu-stats (patch 0027)
bridge -> runtime/gpu/frame_pacing.h | diagnostics (P4.2, SSPC-015) | the flip timeline of GnmDriver, Liverpool and VideoOut, --frame-pacing (patch 0029)
bridge -> bridge/shadps4/shader_bridge_hooks.h | validation (P4.3) | the bridge's translations and pipelines to SecondSonPC's shader frontend, --gpu-shader-capture and --gpu-shaders (patch 0031)
bridge -> runtime/gpu/cp_shadow.h | validation (P4.2) | SecondSonPC's command processor in the shadow of Liverpool: submissions and packets with Liverpool's state, --gpu-shadow and --gpu-trace (patch 0028)
src/bridge/shadps4/gcn_decoder_check.cpp | tests | SecondSonPC's GCN decoder against the oracle's decoder (--gcn-verify-decoder) | shader_recompiler/frontend/decode.h
src/bridge/shadps4/sysrt_host.cpp | R10 sysrt (dialogs, network) | the bridge's MsgDialog/SaveDataDialog/ErrorDialog read its own CommonDialog flag, its sockets/resolvers keep their own host start-up, pool table and errno beside SecondSonPC's libSceNet functions | core/libraries/kernel/kernel.h core/libraries/net/net.h core/libraries/system/commondialog.h
src/bridge/shadps4/selftest_sysrt.cpp | tests | SecondSonPC's CommonDialog, libSceNet and libSceLibcInternal functions against the bridge's (the oracle) | common/va_ctx.h core/libraries/libc_internal/libc_internal_io.h core/libraries/libc_internal/printf.h core/libraries/net/net.h core/libraries/system/commondialog.h core/libraries/system/msgdialog.h
