mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-04 13:07:32 +00:00
Merge remote-tracking branch 'upstream/main' into fix/relinker-linux-load-bounds
This commit is contained in:
commit
4930ee9e55
1983 files changed
+43433
-16883
No files matched your search
+11
-3
@@ -249,15 +249,23 @@ if(BUILD_TESTING)
|
||||
add_test(NAME env_reference COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_env_reference.py)
|
||||
set_tests_properties(env_reference PROPERTIES TIMEOUT 20)
|
||||
add_test(NAME conventions_env_reference COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_env_reference.py)
|
||||
set_tests_properties(conventions_env_reference PROPERTIES TIMEOUT 60)
|
||||
set(env_reference_test_source "${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_env_reference.py")
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${env_reference_test_source}")
|
||||
file(STRINGS "${env_reference_test_source}" env_reference_cases REGEX "^ def test_")
|
||||
foreach(test_case IN LISTS env_reference_cases)
|
||||
string(REGEX REPLACE "^ def (test_[A-Za-z0-9_]+).*" "\\1" test_case "${test_case}")
|
||||
add_test(NAME conventions_env_reference_${test_case} COMMAND ${Python3_EXECUTABLE}
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_env_reference.py" "EnvReferenceDiffTests.${test_case}")
|
||||
set_tests_properties(conventions_env_reference_${test_case} PROPERTIES TIMEOUT 30)
|
||||
endforeach()
|
||||
add_test(NAME conventions_body_bom COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_body_bom.py)
|
||||
add_test(NAME conventions_blob_reads COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_blob_reads.py)
|
||||
add_test(NAME conventions_agent_files COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_agent_files.py)
|
||||
add_test(NAME conventions_alignment COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_alignment.py)
|
||||
add_test(NAME conventions_pr_template COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tools/tests/test_check_conventions_pr_template.py)
|
||||
add_test(NAME check_compile COMMAND ${Python3_EXECUTABLE}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
## Code
|
||||
|
||||
- Follow the [coding conventions](docs/dev/CONVENTIONS.md): naming, no comments except [technical debt](docs/dev/TechnicalDebt.md), Conventional Commits.
|
||||
- **Every exported PS5 function with `APS5_VABI` must have exactly one declaration in a header reachable through the library's `<library>.hpp`. Duplicate declarations in headers, `.cpp` files and tests are forbidden. This is checked by the Python test [`public_headers`](core/libs/tests/test_public_headers.py).**
|
||||
- Every function either does exactly what it is supposed to or throws. Unimplemented exports call `NotImplemented_nid_no_patch(__func__)` (see [libSceAudioIn](core/libs/prx/libSceAudioIn/Export.cpp)).
|
||||
- Pull requests that add or change shader instruction semantics say where they come from: measured on hardware (which GPU and what was checked, e.g. with the [hardware oracle](docs/dev/HW_ORACLE.md)) or the exact source (ISA section, LLVM, ACO or Mesa file). Reviewers check the semantics on hardware. Cases the source doesn't settle throw, and behaviour not verified on hardware is recorded in [technical debt](docs/dev/TechnicalDebt.md).
|
||||
- An export's signature or behaviour taken from a title's call sites or from a library's disassembly follows [reading titles and libraries](docs/dev/REVERSE_ENGINEERING.md): a call site settles the arguments, not what the library does.
|
||||
@@ -11,6 +12,7 @@
|
||||
- Implement the general behaviour of a function, not what one title happens to need.
|
||||
- Don't add replacements for modules that titles ship themselves in `sce_module/`, `sce_modules/` or `prx/`: engine or middleware modules (Cohtml, FMOD, GOG Galaxy) and SDK libraries that only wrap other system libraries. The relinker converts and loads the title's own module, and a host library with the same name is left out of `DT_NEEDED`. Only system libraries, which reach the kernel or the hardware, are reimplemented in [core/libs/prx](core/libs/prx). A host copy may still exist for a wrapped library that some dumps lack entirely, like libSceNpCppWebApi: the title's own module wins whenever one is shipped, so it is only ever consulted by titles that ship nothing.
|
||||
- Avoid non-standard extensions (`__attribute__`, etc.) where standard C++ is enough. Helper symbols that must not become NIDs use the `_nid_no_patch` or `_nid_no_patch_cut` suffix.
|
||||
- `alignas` takes at most 8192: MinGW GCC, the Windows compiler, rejects static objects aligned above it. A larger block is aligned at run time inside a bigger buffer.
|
||||
- The relinker uses only the C++20 standard library.
|
||||
- Third-party code is added as a submodule under `3rdparty/` and built from source, not found on the system. With `ANYPS5_USE_SYSTEM_DEPS=ON` the packages packaged by the distributions (SDL2, freetype, Vulkan-Headers, SPIRV-Headers, glslang and SPIRV-Tools) come from the system instead; that resolution lives in [cmake/SystemDeps.cmake](cmake/SystemDeps.cmake) and the default build never reads the system.
|
||||
- Don't add tests that only check that a symbol is exported: a missing export already fails at startup.
|
||||
|
||||
@@ -289,6 +289,25 @@ if(BUILD_TESTING)
|
||||
|
||||
find_package(Python3 QUIET COMPONENTS Interpreter)
|
||||
if(Python3_Interpreter_FOUND)
|
||||
set(public_header_compiler_args)
|
||||
if(APPLE)
|
||||
foreach(architecture IN LISTS CMAKE_OSX_ARCHITECTURES)
|
||||
list(APPEND public_header_compiler_args --compiler-arg=-arch "--compiler-arg=${architecture}")
|
||||
endforeach()
|
||||
if(CMAKE_OSX_SYSROOT)
|
||||
list(APPEND public_header_compiler_args --compiler-arg=-isysroot "--compiler-arg=${CMAKE_OSX_SYSROOT}")
|
||||
endif()
|
||||
endif()
|
||||
set(public_header_manifest "${CMAKE_CURRENT_BINARY_DIR}/public_headers.json")
|
||||
add_test(NAME public_headers COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests/test_public_headers.py --audit-only --manifest "${public_header_manifest}")
|
||||
set_tests_properties(public_headers PROPERTIES TIMEOUT 30 RUN_SERIAL TRUE FIXTURES_SETUP public_headers_manifest)
|
||||
foreach(batch RANGE 0 63)
|
||||
add_test(NAME public_headers_compile_${batch} COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests/test_public_headers.py --compiler ${CMAKE_CXX_COMPILER} ${public_header_compiler_args}
|
||||
--manifest "${public_header_manifest}" --batch-index ${batch} --batch-count 64)
|
||||
set_tests_properties(public_headers_compile_${batch} PROPERTIES TIMEOUT 30 FIXTURES_REQUIRED public_headers_manifest)
|
||||
endforeach()
|
||||
add_test(NAME nid_gnu_hash COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nid/tests/test_gnu_hash.py $<TARGET_FILE:nid_patcher>)
|
||||
add_test(NAME nid_elf_duplicates COMMAND ${Python3_EXECUTABLE}
|
||||
@@ -355,6 +374,28 @@ if(BUILD_TESTING)
|
||||
set_tests_properties(guest_kernel_sys guest_kernel_sys_thread_defaults guest_kernel_sys_barrier guest_kernel_sys_pthread PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libkernel_sys>")
|
||||
endif()
|
||||
add_test_executable(guest_kernel_sys_threads_tests tests/GuestKernelSysThreads.cpp
|
||||
nid/src/NidCompute.cpp nid/src/Sha1.cpp)
|
||||
target_include_directories(guest_kernel_sys_threads_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/nid/include)
|
||||
target_link_libraries(guest_kernel_sys_threads_tests PRIVATE ${CMAKE_DL_LIBS})
|
||||
add_custom_target(guest_kernel_sys_threads_libraries DEPENDS
|
||||
${PATCHED_DIR}/libkernel_sys.prx ${PATCHED_DIR}/libkernel.prx ${LIBC_PATCHED})
|
||||
add_dependencies(guest_kernel_sys_threads_tests guest_kernel_sys_threads_libraries)
|
||||
configure_windows_unwind(guest_kernel_sys_threads_tests)
|
||||
if(MINGW)
|
||||
target_compile_options(guest_kernel_sys_threads_tests PRIVATE -fasynchronous-unwind-tables)
|
||||
target_link_options(guest_kernel_sys_threads_tests PRIVATE -static -static-libgcc -static-libstdc++)
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
add_test(NAME guest_kernel_sys_threads_main_late_load COMMAND guest_kernel_sys_threads_tests ${UNPATCHED_DIR} unpatched main_late_load)
|
||||
add_test(NAME guest_kernel_sys_threads_main_late_load_patched COMMAND guest_kernel_sys_threads_tests ${PATCHED_DIR} patched main_late_load)
|
||||
set_tests_properties(guest_kernel_sys_threads_main_late_load guest_kernel_sys_threads_main_late_load_patched PROPERTIES TIMEOUT 20)
|
||||
endif()
|
||||
foreach(case IN ITEMS main)
|
||||
add_test(NAME guest_kernel_sys_threads_${case} COMMAND guest_kernel_sys_threads_tests ${UNPATCHED_DIR} unpatched ${case})
|
||||
add_test(NAME guest_kernel_sys_threads_${case}_patched COMMAND guest_kernel_sys_threads_tests ${PATCHED_DIR} patched ${case})
|
||||
set_tests_properties(guest_kernel_sys_threads_${case} guest_kernel_sys_threads_${case}_patched PROPERTIES TIMEOUT 20)
|
||||
endforeach()
|
||||
|
||||
add_test_executable(guest_gnm_neo_packets_tests tests/GuestGnmNeoPackets.cpp)
|
||||
target_include_directories(guest_gnm_neo_packets_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@@ -4,7 +4,7 @@ import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from test_symbol_versions import build_image, patch, read_dynsym, IMPORTS, NID_NAME, SHN_UNDEF, STT_FUNC
|
||||
from test_symbol_versions import build_image, patch, read_dynsym, IMPORTS, NID_NAME, SHN_UNDEF, STT_FUNC, PATCHER
|
||||
|
||||
|
||||
def nid(name):
|
||||
@@ -21,6 +21,7 @@ def image(names, addresses=None):
|
||||
return bytes(build_image(entries, False))
|
||||
|
||||
|
||||
@unittest.skipUnless(PATCHER is not None and PATCHER.is_file(), "nid_patcher executable required")
|
||||
class ElfDuplicateTests(unittest.TestCase):
|
||||
def test_exports_patched_to_one_name_are_rejected(self):
|
||||
cases = (
|
||||
@@ -65,5 +66,4 @@ class ElfDuplicateTests(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
PATCHER = Path(sys.argv.pop(1)).resolve()
|
||||
unittest.main()
|
||||
@@ -3,9 +3,10 @@ import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from test_symbol_versions import build_image, symbols, patch, SHOFF
|
||||
from test_symbol_versions import build_image, symbols, patch, SHOFF, PATCHER
|
||||
|
||||
|
||||
@unittest.skipUnless(PATCHER is not None and PATCHER.is_file(), "nid_patcher executable required")
|
||||
class ElfLayoutTests(unittest.TestCase):
|
||||
def test_declared_layout_must_match_supported_tables(self):
|
||||
changes = ((5, "B", 2), (0x3a, "H", 32),
|
||||
@@ -44,5 +45,4 @@ class ElfLayoutTests(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
PATCHER = Path(sys.argv.pop(1)).resolve()
|
||||
unittest.main()
|
||||
@@ -3,7 +3,7 @@ import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from test_symbol_versions import build_image, symbols, patch, HASH_OFFSET, SHOFF, read_dynsym, gnu_hash, sections
|
||||
from test_symbol_versions import build_image, symbols, patch, HASH_OFFSET, SHOFF, read_dynsym, gnu_hash, sections, PATCHER
|
||||
|
||||
|
||||
def sysv_hash(name):
|
||||
@@ -31,6 +31,7 @@ def sysv_lookup(image, name):
|
||||
return None
|
||||
|
||||
|
||||
@unittest.skipUnless(PATCHER is not None and PATCHER.is_file(), "nid_patcher executable required")
|
||||
class GnuHashTests(unittest.TestCase):
|
||||
def image(self, buckets=4, bloom=1, shift=6, symoffset=3):
|
||||
image = build_image(symbols(False), False)
|
||||
@@ -95,6 +96,7 @@ class GnuHashTests(unittest.TestCase):
|
||||
self.assertEqual(struct.unpack_from("<I", after, HASH_OFFSET)[0], 0)
|
||||
|
||||
|
||||
@unittest.skipUnless(PATCHER is not None and PATCHER.is_file(), "nid_patcher executable required")
|
||||
class SysvHashTests(unittest.TestCase):
|
||||
def image(self, both, buckets):
|
||||
entries = symbols(False)
|
||||
@@ -153,5 +155,4 @@ class SysvHashTests(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
PATCHER = Path(sys.argv.pop(1)).resolve()
|
||||
unittest.main()
|
||||
@@ -7,6 +7,7 @@ import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
from test_symbol_versions import find_patcher, PATCHER
|
||||
|
||||
SUFFIX = bytes([0x51, 0x8D, 0x64, 0xA6, 0x35, 0xDE, 0xD8, 0xC1, 0xE6, 0xB0, 0x39, 0xB1, 0xC3, 0xE5, 0x52, 0x30])
|
||||
BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"
|
||||
@@ -270,7 +271,13 @@ def check_refusals(patcher, directory):
|
||||
|
||||
|
||||
def main():
|
||||
patcher = Path(sys.argv[1]).resolve()
|
||||
if len(sys.argv) > 1:
|
||||
patcher = Path(sys.argv[1]).resolve()
|
||||
else:
|
||||
patcher = PATCHER or find_patcher()
|
||||
if patcher is None:
|
||||
print("nid_patcher executable required")
|
||||
sys.exit(0)
|
||||
with tempfile.TemporaryDirectory(prefix="anyps5-macho-nid-a\u00e7\u00e3o-\u65e5\u672c-") as directory:
|
||||
check_shrinking(patcher, directory)
|
||||
check_growing(patcher, directory)
|
||||
|
||||
@@ -5,16 +5,14 @@ import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from test_macho_nids import build_dylib, exports_of, nid
|
||||
from test_macho_nids import build_dylib, exports_of, nid, PATCHER
|
||||
|
||||
try:
|
||||
import resource
|
||||
except ImportError:
|
||||
resource = None
|
||||
|
||||
PATCHER = Path(sys.argv.pop(1)).resolve()
|
||||
|
||||
|
||||
@unittest.skipUnless(PATCHER is not None and PATCHER.is_file(), "nid_patcher executable required")
|
||||
class NativePathTests(unittest.TestCase):
|
||||
def invoke(self, *arguments):
|
||||
return subprocess.run([str(PATCHER), "libtest", *map(str, arguments)],
|
||||
|
||||
@@ -5,7 +5,7 @@ import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from test_macho_nids import build_dylib, exports_of, nid
|
||||
from test_macho_nids import build_dylib, exports_of, nid, PATCHER
|
||||
|
||||
|
||||
def reference(*, headers=False, address=0x2000, ordinal=0):
|
||||
@@ -100,6 +100,7 @@ def forwarding_exports(image, bits):
|
||||
return string(table[4]), names, targets, addresses, (export_rva, export_size)
|
||||
|
||||
|
||||
@unittest.skipUnless(PATCHER is not None and PATCHER.is_file(), "nid_patcher executable required")
|
||||
class ReferenceTests(unittest.TestCase):
|
||||
def patch_with_reference(self, data):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
@@ -135,6 +136,7 @@ class ReferenceTests(unittest.TestCase):
|
||||
self.assertEqual(image, original)
|
||||
|
||||
|
||||
@unittest.skipUnless(PATCHER is not None and PATCHER.is_file(), "nid_patcher executable required")
|
||||
class ForwardingExportTests(unittest.TestCase):
|
||||
def patch(self, image):
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
@@ -242,5 +244,4 @@ class ForwardingExportTests(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
PATCHER = Path(sys.argv.pop(1)).resolve()
|
||||
unittest.main()
|
||||
@@ -3,9 +3,10 @@ import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from test_symbol_versions import build_image, symbols, patch, SHOFF, DYNSYM_OFFSET, read_dynsym, sections, DEFINITIONS
|
||||
from test_symbol_versions import build_image, symbols, patch, SHOFF, DYNSYM_OFFSET, read_dynsym, sections, DEFINITIONS, PATCHER
|
||||
|
||||
|
||||
@unittest.skipUnless(PATCHER is not None and PATCHER.is_file(), "nid_patcher executable required")
|
||||
class SharedStringTests(unittest.TestCase):
|
||||
def test_dynamic_names_keep_original_string_when_export_shares_offset(self):
|
||||
for tag in (1, 14, 15, 29):
|
||||
@@ -54,5 +55,4 @@ class SharedStringTests(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
PATCHER = Path(sys.argv.pop(1)).resolve()
|
||||
unittest.main()
|
||||
@@ -1,3 +1,4 @@
|
||||
import os
|
||||
import re
|
||||
import struct
|
||||
import subprocess
|
||||
@@ -198,8 +199,36 @@ def test_unversioned_library_is_still_patched(patcher):
|
||||
assert len({entry[0] for entry in after if entry[0]}) == len([entry for entry in after if entry[0]])
|
||||
|
||||
|
||||
def find_patcher():
|
||||
for index, argument in enumerate(sys.argv[1:], 1):
|
||||
candidate = Path(argument)
|
||||
if candidate.stem == "nid_patcher" and candidate.is_file():
|
||||
sys.argv.pop(index)
|
||||
return candidate.resolve()
|
||||
env = os.environ.get("ANYPS5_NID_PATCHER") or os.environ.get("NID_PATCHER")
|
||||
if env and Path(env).is_file():
|
||||
return Path(env).resolve()
|
||||
repo_root = Path(__file__).resolve().parents[4]
|
||||
for candidate in (
|
||||
repo_root / "build" / "core" / "libs" / "nid_patcher.exe",
|
||||
repo_root / "build" / "core" / "libs" / "nid_patcher",
|
||||
):
|
||||
if candidate.is_file():
|
||||
return candidate
|
||||
return None
|
||||
|
||||
|
||||
PATCHER = find_patcher()
|
||||
|
||||
|
||||
def main():
|
||||
patcher = Path(sys.argv[1]).resolve()
|
||||
if len(sys.argv) > 1:
|
||||
patcher = Path(sys.argv[1]).resolve()
|
||||
else:
|
||||
patcher = PATCHER or find_patcher()
|
||||
if patcher is None:
|
||||
print("nid_patcher executable required")
|
||||
sys.exit(0)
|
||||
test_versioned_library_is_rejected(patcher)
|
||||
test_unversioned_library_is_still_patched(patcher)
|
||||
print("NID patcher symbol version tests passed")
|
||||
|
||||
@@ -3,7 +3,7 @@ import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from test_symbol_versions import build_image, symbols, patch, SHOFF, DYNSTR_OFFSET, sections
|
||||
from test_symbol_versions import build_image, symbols, patch, SHOFF, DYNSTR_OFFSET, sections, PATCHER
|
||||
|
||||
VERNEED = 0x580
|
||||
|
||||
@@ -22,6 +22,7 @@ def image(*, auxiliary=16, count=1, size=32, version=1, auxnext=0, nextrecord=0)
|
||||
return data
|
||||
|
||||
|
||||
@unittest.skipUnless(PATCHER is not None and PATCHER.is_file(), "nid_patcher executable required")
|
||||
class VersionRequirementsTests(unittest.TestCase):
|
||||
def test_auxiliary_record_cannot_leave_declared_section(self):
|
||||
self.reject(image(auxiliary=32))
|
||||
@@ -72,5 +73,4 @@ class VersionRequirementsTests(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
PATCHER = Path(sys.argv.pop(1)).resolve()
|
||||
unittest.main()
|
||||
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
@@ -0,0 +1 @@
|
||||
#pragma once
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAc3Enc/include/Api.hpp"
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include "SceTypes.hpp"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAc3EncCreateEncoder();
|
||||
int APS5_VABI sceAc3EncDeleteEncoder();
|
||||
int APS5_VABI sceAc3EncEncode();
|
||||
int APS5_VABI sceAc3EncEncodeAsync();
|
||||
int APS5_VABI sceAc3EncFlush();
|
||||
int APS5_VABI sceAc3EncIsEncoding();
|
||||
int APS5_VABI sceAc3EncWaitEncode();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "prx/libSceAc3Enc/include/Api.hpp"
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAcm/include/Api.hpp"
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
@@ -217,7 +218,6 @@ int APS5_VABI sceAcm_IFFT() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int APS5_VABI sceAcmBatchJobNotification() {
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAcmBatchStartBuffer(AcmContextId context, const void* batchCommands, size_t batchSize, AcmBatchError* batchError, AcmBatchId* batch);
|
||||
int APS5_VABI sceAcmBatchStartBuffers(AcmContextId context, uint32_t batchInfoCount, const AcmBatchInfo* const batch_info[], AcmBatchError* batchError, AcmBatchId* batch);
|
||||
int APS5_VABI sceAcmBatchWait(AcmContextId context, AcmBatchId batch, uint32_t timeout);
|
||||
int APS5_VABI sceAcmContextCreate(AcmContextId* context);
|
||||
int APS5_VABI sceAcmContextDestroy(AcmContextId context);
|
||||
int APS5_VABI sceAcm_ConvReverb_SharedInput(AcmBatchInfo* batch, std::uint32_t mode, AcmReverbInput* input, std::uint32_t outputCount, const AcmReverbFilter* const* filters, const float* gains, const AcmReverbOutput* const* outputs);
|
||||
int APS5_VABI sceAcm_FFT(AcmBatchInfo* batch, std::int32_t transformSize, std::uint32_t transformCount, std::int32_t inputFormat, const void* const* inputs, std::int32_t outputFormat, void* const* outputs, std::int32_t flags);
|
||||
int APS5_VABI sceAcm_Panner(AcmBatchInfo* batch, std::uint32_t sourceCount, const void* const* sources, std::uint32_t sourceMode, std::uint32_t outputMode, std::uint32_t channelCount, const void* const* sourceParameters, const void* const* sourceMatrices, const void* const* inputChannels, void* const* outputChannels);
|
||||
int APS5_VABI sceAcmBatchJobPriority(AcmBatchInfo* batch, std::uint32_t priority);
|
||||
int APS5_VABI sceAcm_ConvReverb_SharedIr();
|
||||
int APS5_VABI sceAcm_IFFT();
|
||||
int APS5_VABI sceAcmBatchJobNotification();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "prx/libSceAcm/include/Api.hpp"
|
||||
@@ -1,4 +1,26 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_ACB_INCLUDE_CONTROL_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_ACB_INCLUDE_CONTROL_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcAcbAtomicGds_0900(CommandBuffer* buf, std::uint32_t control, std::uint32_t mode, std::uint32_t gdsOp, std::uint32_t src, std::uint16_t offset, std::uint16_t index, std::uint32_t mask, std::uint32_t data, std::uint64_t compareData, std::uint64_t extraData);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbJump(CommandBuffer* buf, std::uint8_t cachePolicy, const std::uint32_t* target, std::uint32_t sizeInDwords);
|
||||
uint32_t APS5_VABI sceAgcAcbJumpGetSize(void);
|
||||
uint32_t* APS5_VABI sceAgcAcbResetQueue(CommandBuffer* buf, uint32_t op, uint32_t value);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbRewind(CommandBuffer* buf, std::uint32_t initialState);
|
||||
std::uint32_t APS5_VABI sceAgcAcbRewindGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcAcbWaitUntilSafeForRendering(CommandBuffer* buf, std::uint32_t videoOutHandle, std::uint32_t displayBufferIndex);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbSetFlip(CommandBuffer* buf, std::uint32_t videoOutHandle, std::int32_t displayBufferIndex, std::uint32_t flipMode, std::int64_t flipArg);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbSetWorkloadsActive(CommandBuffer* buf, std::uint32_t streamId, const std::uint32_t* workloadIds, std::uint32_t workloadCount);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbSetWorkloadComplete(CommandBuffer* buf, std::uint32_t streamId, std::uint32_t workloadId);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbSetWorkloadStreamInactive(CommandBuffer* buf, std::uint32_t streamId);
|
||||
uint32_t* APS5_VABI sceAgcAcbPushMarker(CommandBuffer* buf, const char* str, uint32_t color);
|
||||
uint32_t* APS5_VABI sceAgcAcbPopMarker(CommandBuffer* buf);
|
||||
uint32_t* APS5_VABI sceAgcAcbSetMarker(CommandBuffer* buf, const char* str, uint32_t color);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_ACB_INCLUDE_DISPATCH_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_ACB_INCLUDE_DISPATCH_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcAcbDispatchIndirect(CommandBuffer* buf, const volatile void* indirectArgs, uint32_t modifier);
|
||||
std::uint32_t APS5_VABI sceAgcAcbDispatchIndirectGetSize();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,24 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_ACB_INCLUDE_MEMORY_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_ACB_INCLUDE_MEMORY_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcAcbAcquireMem(CommandBuffer* buf, std::uint32_t gcrControl, const volatile void* base, std::uint64_t sizeBytes, std::uint32_t pollCycles);
|
||||
uint32_t APS5_VABI sceAgcAcbAcquireMemGetSize(void);
|
||||
uint32_t* APS5_VABI sceAgcAcbCopyData(CommandBuffer* buf, uint8_t dst, uint8_t dstCachePolicy, uint64_t dstAddress, uint8_t src, uint8_t srcCachePolicy, uint64_t srcAddressOrImmediate, uint8_t itemSize, uint8_t writeConfirm);
|
||||
std::uint64_t APS5_VABI sceAgcAcbCopyDataGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcAcbDmaData(CommandBuffer* buf, std::uint8_t dst, std::uint8_t dstCachePolicy, std::uint64_t dstAddress, std::uint8_t src, std::uint8_t srcCachePolicy, std::uint64_t srcAddress, std::uint32_t numBytes, std::uint8_t waitForPrevious, std::uint8_t writeConfirm);
|
||||
std::uint32_t APS5_VABI sceAgcAcbDmaDataGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcAcbAtomicMem(CommandBuffer* buf, std::uint8_t atomicOp, std::uint8_t command, std::uint8_t cachePolicy, const volatile void* address, std::uint64_t srcData, std::uint64_t compareData, std::uint16_t loopInterval);
|
||||
std::uint32_t APS5_VABI sceAgcAcbAtomicMemGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcAcbAtomicGdsGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcAcbPrimeUtcl2(CommandBuffer* buf, const volatile void* address, std::uint32_t sizeInBytes);
|
||||
std::uint32_t APS5_VABI sceAgcAcbPrimeUtcl2GetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcAcbWriteData(CommandBuffer* buf, std::uint8_t dst, std::uint8_t cachePolicy, std::uint64_t address, const void* data, std::uint32_t numDwords, std::uint8_t increment, std::uint8_t writeConfirm);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,20 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_ACB_INCLUDE_SYNC_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_ACB_INCLUDE_SYNC_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcAcbCondExec(CommandBuffer* buf, const volatile uint32_t* address, uint32_t numDwords);
|
||||
uint32_t APS5_VABI sceAgcAcbCondExecGetSize(void);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbWaitRegMem(CommandBuffer* buf, std::uint8_t size, std::uint8_t compareFunction, std::uint8_t cachePolicy, const volatile void* address, std::uint64_t reference, std::uint64_t mask, std::uint32_t pollCycles);
|
||||
std::uint64_t APS5_VABI sceAgcAcbWaitOnAddressGetSize(std::uint8_t size);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbEventWrite(CommandBuffer* buf, std::uint8_t eventType, const volatile void* address);
|
||||
std::uint64_t APS5_VABI sceAgcAcbEventWriteGetSize(std::uint8_t eventType);
|
||||
std::uint32_t APS5_VABI sceAgcAcbQueueEndOfShaderActionGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcAcbMemSemaphore(CommandBuffer* buf, const volatile void* address, std::uint8_t waitForMailbox, std::uint8_t signalType, std::uint8_t operation);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,16 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_CB_INCLUDE_BRANCH_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_CB_INCLUDE_BRANCH_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcCbBranch(CommandBuffer* buf, std::uint8_t mode, std::uint8_t compareFunction, const volatile std::uint64_t* compareAddress, std::uint64_t mask, std::uint64_t reference, std::uint8_t cachePolicy1, const volatile std::uint32_t* buffer1, std::uint32_t sizeInDwords1, std::uint8_t cachePolicy2, const volatile std::uint32_t* buffer2, std::uint32_t sizeInDwords2);
|
||||
std::uint32_t APS5_VABI sceAgcCbBranchGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcCbCondWrite(CommandBuffer* buf, std::uint32_t compareFunction, std::uint32_t writeSpace, const volatile void* writeAddress, std::uint32_t writeData, const volatile void* pollAddress, std::uint32_t reference, std::uint32_t mask);
|
||||
std::uint32_t APS5_VABI sceAgcCbCondWriteGetSize();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_CB_INCLUDE_DISPATCH_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_CB_INCLUDE_DISPATCH_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcCbDispatch(CommandBuffer* buf, std::uint32_t threadGroupX, std::uint32_t threadGroupY, std::uint32_t threadGroupZ, std::uint32_t modifier);
|
||||
uint32_t APS5_VABI sceAgcCbDispatchGetSize(void);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,20 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_CB_INCLUDE_REGISTERS_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_CB_INCLUDE_REGISTERS_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcCbSetUcRegisterRangeDirect(CommandBuffer* buf, std::uint32_t offset, const std::uint32_t* values, std::uint32_t numValues);
|
||||
std::uint32_t* APS5_VABI sceAgcCbSetShRegisterRangeDirect(CommandBuffer* buf, std::uint32_t offset, const std::uint32_t* values, std::uint32_t numValues);
|
||||
uint32_t APS5_VABI sceAgcCbSetShRegisterRangeDirectGetSize(uint32_t numValues);
|
||||
std::uint32_t APS5_VABI sceAgcCbSetUcRegisterRangeDirectGetSize(std::uint32_t numValues);
|
||||
std::uint32_t* APS5_VABI sceAgcCbSetShRegistersDirect(CommandBuffer* buf, const volatile ShaderRegister* regs, std::uint32_t numRegs);
|
||||
std::uint32_t APS5_VABI sceAgcCbSetShRegistersDirectGetSize(std::uint32_t numRegs);
|
||||
std::uint32_t* APS5_VABI sceAgcCbSetUcRegistersDirect(CommandBuffer* buf, const volatile ShaderRegister* regs, std::uint32_t numRegs);
|
||||
std::uint32_t APS5_VABI sceAgcCbSetUcRegistersDirectGetSize(std::uint32_t numRegs);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -4,10 +4,19 @@
|
||||
#include "SceTypes.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
struct CommandBuffer;
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t* APS5_VABI sceAgcCbMemSemaphore(CommandBuffer* buf, const volatile void* address, std::uint32_t operation, std::uint32_t modifier, std::uint32_t value);
|
||||
}
|
||||
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcCbNop_nid_postfix(CommandBuffer* buf, std::uint32_t sizeInDwords);
|
||||
uint32_t APS5_VABI sceAgcCbNopGetSize(uint32_t sizeInDwords);
|
||||
std::uint32_t APS5_VABI sceAgcCbQueueEndOfPipeActionGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcCbReleaseMem(CommandBuffer* buf, std::uint8_t action, std::uint16_t gcrControl, std::uint8_t dst, std::uint8_t cachePolicy, const volatile Label* address, std::uint8_t dataSelect, std::uint64_t data, std::uint16_t gdsOffset, std::uint16_t gdsSize, std::uint8_t interrupt, std::uint32_t interruptContextId);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -115,17 +115,23 @@ std::uint32_t* WriteRegisters(CommandBuffer* buffer, std::uint32_t opcode, const
|
||||
Require(buffer != nullptr, function, "null command buffer");
|
||||
return buffer->cursor_up;
|
||||
}
|
||||
CheckAddress(reinterpret_cast<std::uintptr_t>(registers), 4, function);
|
||||
CheckAddress(reinterpret_cast<std::uintptr_t>(registers), 1, function);
|
||||
const auto* bytes = reinterpret_cast<const std::byte*>(const_cast<const ShaderRegister*>(registers));
|
||||
const auto entryAt = [&](std::uint32_t index) {
|
||||
ShaderRegister entry;
|
||||
std::memcpy(&entry, bytes + static_cast<std::size_t>(index) * sizeof(ShaderRegister), sizeof(entry));
|
||||
return entry;
|
||||
};
|
||||
std::vector<ShaderRegister> snapshot;
|
||||
if (snapshotAll) {
|
||||
snapshot.reserve(count);
|
||||
for (std::uint32_t i = 0; i < count; ++i) {
|
||||
snapshot.push_back({registers[i].offset, registers[i].value});
|
||||
snapshot.push_back(entryAt(i));
|
||||
CheckBits(snapshot.back().offset, 0xffffu, function);
|
||||
}
|
||||
}
|
||||
const auto offsetAt = [&](std::uint32_t index) { return snapshotAll ? snapshot[index].offset : registers[index].offset; };
|
||||
const auto valueAt = [&](std::uint32_t index) { return snapshotAll ? snapshot[index].value : registers[index].value; };
|
||||
const auto offsetAt = [&](std::uint32_t index) { return snapshotAll ? snapshot[index].offset : entryAt(index).offset; };
|
||||
const auto valueAt = [&](std::uint32_t index) { return snapshotAll ? snapshot[index].value : entryAt(index).value; };
|
||||
std::uint32_t* first = nullptr;
|
||||
std::uint32_t index = 0;
|
||||
while (index < count) {
|
||||
|
||||
@@ -1,4 +1,24 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_DRAWINDEXED_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_DRAWINDEXED_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcDcbDrawIndex(CommandBuffer* buf, std::uint32_t indexCount, const volatile void* indexAddress, std::uint64_t modifier);
|
||||
std::uint32_t APS5_VABI sceAgcDcbDrawIndexGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbDrawIndexAuto(CommandBuffer* buf, std::uint32_t indexCount, std::uint64_t modifier);
|
||||
std::uint32_t APS5_VABI sceAgcDcbDrawIndexAutoGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbDrawIndexOffset(CommandBuffer* buf, std::uint32_t indexOffset, std::uint32_t indexCount, std::uint64_t modifier);
|
||||
uint32_t APS5_VABI sceAgcDcbDrawIndexOffsetGetSize(void);
|
||||
uint32_t* APS5_VABI sceAgcDcbDrawIndexIndirect(CommandBuffer* buf, uint32_t dataOffsetInBytes, uint64_t modifier);
|
||||
std::uint32_t APS5_VABI sceAgcDcbDrawIndexIndirectGetSize();
|
||||
uint32_t* APS5_VABI sceAgcDcbDrawIndexIndirectMulti(CommandBuffer* buf, uint32_t dataOffsetInBytes, uint32_t countIndirect, uint32_t maxCountOrCount, const volatile void* countAddr, uint32_t strideInBytes, uint64_t modifier);
|
||||
std::uint32_t APS5_VABI sceAgcDcbDrawIndexIndirectMultiGetSize();
|
||||
uint32_t* APS5_VABI sceAgcDcbDrawIndexMultiInstanced(CommandBuffer* buf, uint32_t indexCount, const volatile void* indexAddr, const volatile void* objectIds, uint32_t instanceCount, uint64_t modifier);
|
||||
uint32_t APS5_VABI sceAgcDcbDrawIndexMultiInstancedGetSize(void);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,16 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_DRAWNONINDEXED_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_DRAWNONINDEXED_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcDcbDrawIndirect(CommandBuffer* buf, std::uint32_t dataOffsetInBytes, std::uint64_t modifier);
|
||||
std::uint32_t APS5_VABI sceAgcDcbDrawIndirectGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbDrawIndirectMulti(CommandBuffer* buf, std::uint32_t dataOffsetInBytes, std::uint32_t countIndirect, std::uint32_t maxCountOrCount, const volatile void* countAddress, std::uint32_t strideInBytes, std::uint64_t modifier);
|
||||
std::uint32_t APS5_VABI sceAgcDcbDrawIndirectMultiGetSize();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,21 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_INDEXBUFFER_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_INDEXBUFFER_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetIndexBuffer(CommandBuffer* buf, std::uint64_t indexAddress);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetIndexBufferGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetIndexCount(CommandBuffer* buf, std::uint32_t indexCount);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetIndexCountGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetIndexSize(CommandBuffer* buf, std::uint8_t indexSize, std::uint8_t cachePolicy);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetIndexSizeGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetIndexSize_0600(CommandBuffer* buf, std::uint8_t indexSize, std::uint8_t cachePolicy, std::uint8_t perInstanceObjectId);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetIndexIndirectArgs(CommandBuffer* buf, std::uint64_t attributeAddress, std::uint32_t attributeIndex);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetIndexIndirectArgsGetSize();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,15 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_INSTANCING_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_INSTANCING_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetNumInstances(CommandBuffer* buf, std::uint32_t numInstances);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetNumInstancesGetSize();
|
||||
uint32_t* APS5_VABI sceAgcDcbSetBaseIndirectArgs(CommandBuffer* buf, uint32_t shaderType, const volatile void* indirectBaseAddr);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,15 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_STATS_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBDRAW_INCLUDE_STATS_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcDcbGetLodStats(CommandBuffer* buf, std::uint8_t cachePolicy, const volatile void* buffer, std::uint32_t bufferSizeInBytes, std::uint32_t resetCount, std::uint8_t forceReset, std::uint8_t reportAndReset, std::uint32_t reportingIntervalIn100kClocks);
|
||||
std::uint32_t APS5_VABI sceAgcDcbBeginOcclusionQueryGetSize(std::int32_t queryType);
|
||||
std::uint32_t APS5_VABI sceAgcDcbEndOcclusionQueryGetSize();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -9,4 +9,18 @@ std::uint32_t* APS5_VABI sceAgcDcbAtomicGds(CommandBuffer* buf, std::uint32_t co
|
||||
std::uint32_t* APS5_VABI sceAgcDcbAtomicGds_0900(CommandBuffer* buf, std::uint32_t control, std::uint32_t mode, std::uint32_t gdsOp, std::uint32_t src, std::uint16_t offset, std::uint16_t index, std::uint32_t mask, std::uint32_t data, std::uint64_t compareData, std::uint64_t extraData);
|
||||
}
|
||||
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcDcbJump(CommandBuffer* buf, uint8_t mode, uint8_t cachePolicy, const uint32_t* target, uint32_t sizeInDwords);
|
||||
std::uint32_t APS5_VABI sceAgcDcbJumpGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbResetQueue(CommandBuffer* buf, std::uint32_t op, std::uint32_t state);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbClearState(CommandBuffer* buf, std::uint32_t command);
|
||||
uint32_t* APS5_VABI sceAgcDcbRewind(CommandBuffer* buf, uint32_t initialState);
|
||||
uint32_t APS5_VABI sceAgcDcbRewindGetSize(void);
|
||||
uint32_t* APS5_VABI sceAgcDcbWaitUntilSafeForRendering(CommandBuffer* buf, uint32_t videoOutHandle, uint32_t displayBufferIndex);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBFLOW_INCLUDE_DISPATCH_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBFLOW_INCLUDE_DISPATCH_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcDcbDispatchIndirect(CommandBuffer* buf, uint32_t dataOffsetInBytes, uint32_t flags);
|
||||
std::uint32_t APS5_VABI sceAgcDcbDispatchIndirectGetSize();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -9,4 +9,20 @@ std::uint32_t* APS5_VABI sceAgcDcbAcquireMem(CommandBuffer* buf, std::uint8_t en
|
||||
std::uint32_t APS5_VABI sceAgcDcbAtomicGdsGetSize();
|
||||
}
|
||||
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t APS5_VABI sceAgcDcbAcquireMemGetSize(void);
|
||||
uint32_t* APS5_VABI sceAgcDcbCopyData(CommandBuffer* buf, uint8_t dst, uint8_t dstCachePolicy, uint64_t dstAddress, uint8_t src, uint8_t srcCachePolicy, uint64_t srcAddressOrImmediate, uint8_t itemSize, uint8_t writeConfirm);
|
||||
std::uint64_t APS5_VABI sceAgcDcbCopyDataGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbDmaData(CommandBuffer* buf, std::uint8_t engine, std::uint8_t dst, std::uint8_t dstCachePolicy, std::uint64_t dstAddress, std::uint8_t src, std::uint8_t srcCachePolicy, std::uint64_t srcAddress, std::uint32_t numBytes, std::uint8_t waitForPrevious, std::uint8_t writeConfirm, std::uint8_t blockEngine);
|
||||
std::uint32_t APS5_VABI sceAgcDcbDmaDataGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbAtomicMem(CommandBuffer* buf, std::uint8_t atomicOp, std::uint8_t command, std::uint8_t cachePolicy, const volatile void* address, std::uint64_t srcData, std::uint64_t compareData, std::uint16_t loopInterval);
|
||||
std::uint32_t APS5_VABI sceAgcDcbAtomicMemGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbWriteData(CommandBuffer* buf, std::uint8_t dst, std::uint8_t cachePolicy, std::uint64_t address, const void* data, std::uint32_t numDwords, std::uint8_t increment, std::uint8_t writeConfirm);
|
||||
uint32_t APS5_VABI sceAgcDcbWriteDataGetSize(uint32_t numDwords);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,21 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBFLOW_INCLUDE_SYNC_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBFLOW_INCLUDE_SYNC_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcDcbCondExec(CommandBuffer* buf, const volatile uint32_t* address, uint32_t numDwords);
|
||||
uint32_t APS5_VABI sceAgcDcbCondExecGetSize(void);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbWaitRegMem(CommandBuffer* buf, std::uint8_t size, std::uint8_t compareFunction, std::uint8_t operation, std::uint8_t cachePolicy, const volatile void* address, std::uint64_t reference, std::uint64_t mask, std::uint32_t pollCycles);
|
||||
uint32_t APS5_VABI sceAgcDcbWaitOnAddressGetSize(uint32_t size);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbEventWrite(CommandBuffer* buf, std::uint8_t eventType, const volatile void* address);
|
||||
std::uint64_t APS5_VABI sceAgcDcbEventWriteGetSize(std::uint8_t eventType);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbStallCommandBufferParser(CommandBuffer* buf);
|
||||
std::uint32_t APS5_VABI sceAgcDcbStallCommandBufferParserGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbMemSemaphore(CommandBuffer* buf, const volatile void* address, std::uint8_t waitForMailbox, std::uint8_t signalType, std::uint8_t operation);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "SceTypes.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
struct CommandBuffer;
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcDcbContextStateOp(CommandBuffer* buf, uint32_t operation);
|
||||
@@ -14,4 +12,15 @@ uint64_t APS5_VABI sceAgcDcbContextStateOpGetSize(uint32_t operation);
|
||||
|
||||
}
|
||||
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetBaseDispatchIndirectArgsGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetBaseDrawIndirectArgsGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcDcbQueueEndOfShaderActionGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcDcbGetLodStatsGetSize();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,15 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_DISPLAY_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_DISPLAY_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcDcbSetFlip(CommandBuffer* buf, uint32_t videoOutHandle, int32_t displayBufferIndex, uint32_t flipMode, int64_t flipArg);
|
||||
uint32_t* APS5_VABI sceAgcDcbPrimeUtcl2(CommandBuffer* buf, const volatile void* address, uint32_t sizeInBytes);
|
||||
std::uint32_t APS5_VABI sceAgcDcbPrimeUtcl2GetSize();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_INIT_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_INIT_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcInit(std::uint32_t version);
|
||||
int APS5_VABI sceAgcInit_0090(std::uint32_t* state, std::uint32_t version);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -12,4 +12,14 @@ std::uint32_t* Pop(CommandBuffer* buf, const char* function);
|
||||
|
||||
}
|
||||
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcDcbSetMarker(CommandBuffer* buf, const char* str, uint32_t color);
|
||||
uint32_t* APS5_VABI sceAgcDcbPopMarker(CommandBuffer* buf);
|
||||
uint32_t* APS5_VABI sceAgcDcbPushMarker(CommandBuffer* buf, const char* str, uint32_t color);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,16 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_PREDICATION_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_PREDICATION_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcDcbSetPredication(CommandBuffer* buf, uint8_t condition, uint8_t op, uint8_t waitOp, const volatile void* address, uint32_t countInDwords);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetZPassPredicationEnableGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetPredicationDisableGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetBoolPredicationEnableGetSize();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,26 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_REGISTERS_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_REGISTERS_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetCfRegisterDirect(CommandBuffer* buf, ShaderRegister reg);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetCfRegisterRangeDirect(CommandBuffer* buf, std::uint32_t offset, const std::uint32_t* values, std::uint32_t numValues);
|
||||
uint32_t* APS5_VABI sceAgcDcbSetCxRegisterDirect(CommandBuffer* buf, ShaderRegister reg);
|
||||
uint32_t APS5_VABI sceAgcDcbSetCxRegisterDirectGetSize(void);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetCxRegistersIndirect(CommandBuffer* buf, const volatile ShaderRegister* regs, std::uint32_t numRegs);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetCxRegistersIndirectGetSize(std::uint32_t numRegs);
|
||||
uint32_t* APS5_VABI sceAgcDcbSetShRegisterDirect(CommandBuffer* buf, ShaderRegister reg);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetShRegisterDirectGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetShRegistersIndirect(CommandBuffer* buf, const volatile ShaderRegister* regs, std::uint32_t numRegs);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetShRegistersIndirectGetSize(std::uint32_t numRegs);
|
||||
uint32_t* APS5_VABI sceAgcDcbSetUcRegisterDirect(CommandBuffer* buf, ShaderRegister reg);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetUcRegisterDirectGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetUcRegistersIndirect(CommandBuffer* buf, const volatile ShaderRegister* regs, std::uint32_t numRegs);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetUcRegistersIndirectGetSize(std::uint32_t numRegs);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,15 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_WORKLOAD_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_DCBSTATE_INCLUDE_WORKLOAD_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t* APS5_VABI sceAgcDcbSetWorkloadComplete(CommandBuffer* buf, uint32_t streamId, uint32_t workloadId);
|
||||
uint32_t* APS5_VABI sceAgcDcbSetWorkloadsActive(CommandBuffer* buf, uint32_t streamId, const uint32_t* workloadIds, uint32_t workloadCount);
|
||||
uint32_t* APS5_VABI sceAgcDcbSetWorkloadStreamInactive(CommandBuffer* buf, uint32_t streamId);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/include/Agc.hpp"
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include "SceTypes.hpp"
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_MISC_INCLUDE_DEBUG_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_MISC_INCLUDE_DEBUG_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcDebugRaiseException(std::uint32_t exceptionId);
|
||||
int APS5_VABI sceAgcSetShaderInstrumentation(std::uint32_t flags);
|
||||
std::uint32_t APS5_VABI sceAgcGetShaderInstrumentation();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -14,4 +14,14 @@ int APS5_VABI sceAgcGetDataPacketPayloadAddress(uint32_t** addr, uint32_t* cmd,
|
||||
int APS5_VABI sceAgcGetDataPacketPayloadAddress_0090(uint32_t** addr, uint32_t* cmd, int type);
|
||||
}
|
||||
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
uint32_t APS5_VABI sceAgcGetPacketSize(uint32_t* packet);
|
||||
int APS5_VABI sceAgcGetDataPacketPayloadRange(SceAgcMemoryRange* range, uint32_t* cmd, int type);
|
||||
int APS5_VABI sceAgcDcbGetSystemSoftwareVersion(uint32_t* destination, const uint32_t* packet);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,13 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_MISC_INCLUDE_PLATFORM_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_MISC_INCLUDE_PLATFORM_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcGetIsTrinityMode(bool* isTrinityMode);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -4,6 +4,18 @@
|
||||
#include <cstdint>
|
||||
|
||||
extern "C" {
|
||||
int APS5_VABI sceAgcGetDefaultCxStateFlat(void* out_state, std::uint32_t size);
|
||||
int APS5_VABI sceAgcGetDefaultCxStateFlat(void* outState, std::uint32_t size);
|
||||
}
|
||||
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
void* APS5_VABI sceAgcGetRegisterDefaults();
|
||||
void* APS5_VABI sceAgcGetRegisterDefaultsInternal();
|
||||
void* APS5_VABI sceAgcGetRegisterDefaults2(std::uint32_t version);
|
||||
void* APS5_VABI sceAgcGetRegisterDefaults2Internal(std::uint32_t version);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_MISC_INCLUDE_SEMAPHORE_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_MISC_INCLUDE_SEMAPHORE_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcSetAmmSemaphoreMemory(void* memory, std::uint64_t sizeInBytes);
|
||||
int APS5_VABI sceAgcGetSemaphoreLabel(std::uint32_t index, void** label);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -10,7 +10,16 @@ struct SizeAlign {
|
||||
std::size_t m_align;
|
||||
};
|
||||
|
||||
extern "C" int APS5_VABI sceAgcFuseShaderHalves_0200(Shader* fused_result, const Shader* front, const Shader* back, void* scratch_mem);
|
||||
extern "C" int APS5_VABI sceAgcFuseShaderHalves_0200(Shader* fusedResult, const Shader* front, const Shader* back, void* scratchMem);
|
||||
extern "C" int APS5_VABI sceAgcGetFusedShaderSize_0080(SizeAlign* dst, const Shader* front, const Shader* back);
|
||||
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcFuseShaderHalves_nid_postfix(Shader* fusedResult, const Shader* front, const Shader* back, void* scratchMem);
|
||||
int APS5_VABI sceAgcUpdateInterpolantMapping_0100(ShaderRegister* regs, const Shader* vs, const Shader* ps);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_MISC_INCLUDE_SUSPEND_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_MISC_INCLUDE_SUSPEND_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcSuspendPoint(void);
|
||||
int APS5_VABI sceAgcSetSubmitMode(std::uint32_t mode);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,17 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_BRANCH_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_BRANCH_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcBranchPatchSetCompareAddress(std::uint32_t* cmd, const volatile std::uint64_t* compareAddress);
|
||||
int APS5_VABI sceAgcBranchPatchSetThenTarget(std::uint32_t* cmd, const volatile std::uint32_t* target, std::uint32_t sizeInDwords);
|
||||
int APS5_VABI sceAgcBranchPatchSetElseTarget(std::uint32_t* cmd, const volatile std::uint32_t* target, std::uint32_t sizeInDwords);
|
||||
int APS5_VABI sceAgcBranchPatchSetThenTarget_0300(std::uint32_t* cmd, std::uint8_t cachePolicy, const volatile std::uint32_t* target, std::uint32_t sizeInDwords);
|
||||
int APS5_VABI sceAgcBranchPatchSetElseTarget_0300(std::uint32_t* cmd, std::uint8_t cachePolicy, const volatile std::uint32_t* target, std::uint32_t sizeInDwords);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,16 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_CONDEXEC_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_CONDEXEC_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcCondExecPatchSetCommandAddress(uint32_t* cmd, const volatile uint32_t* command);
|
||||
int APS5_VABI sceAgcCondExecPatchSetEnd(uint32_t* cmd, const volatile uint32_t* buffer);
|
||||
int APS5_VABI sceAgcAsyncCondExecPatchSetCommandAddress(std::uint32_t* cmd, const volatile std::uint32_t* command);
|
||||
int APS5_VABI sceAgcAsyncCondExecPatchSetEnd(std::uint32_t* cmd, const volatile std::uint32_t* buffer);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_DMA_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_DMA_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcDmaDataPatchSetDstAddressOrOffset(std::uint32_t* cmd, std::uint64_t address);
|
||||
int APS5_VABI sceAgcDmaDataPatchSetSrcAddressOrOffsetOrImmediate(std::uint32_t* cmd, std::uint64_t address);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,21 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_INDIRECTREGISTERS_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_INDIRECTREGISTERS_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcSetCxRegIndirectPatchAddRegisters(std::uint32_t* cmd, std::uint32_t numRegs);
|
||||
int APS5_VABI sceAgcSetCxRegIndirectPatchSetAddress(std::uint32_t* cmd, const volatile ShaderRegister* regs);
|
||||
int APS5_VABI sceAgcSetCxRegIndirectPatchSetNumRegisters(std::uint32_t* cmd, std::uint32_t numRegs);
|
||||
int APS5_VABI sceAgcSetShRegIndirectPatchAddRegisters(std::uint32_t* cmd, std::uint32_t numRegs);
|
||||
int APS5_VABI sceAgcSetShRegIndirectPatchSetAddress(std::uint32_t* cmd, const volatile ShaderRegister* regs);
|
||||
int APS5_VABI sceAgcSetShRegIndirectPatchSetNumRegisters(std::uint32_t* cmd, std::uint32_t numRegs);
|
||||
int APS5_VABI sceAgcSetUcRegIndirectPatchAddRegisters(std::uint32_t* cmd, std::uint32_t numRegs);
|
||||
int APS5_VABI sceAgcSetUcRegIndirectPatchSetAddress(std::uint32_t* cmd, const volatile ShaderRegister* regs);
|
||||
int APS5_VABI sceAgcSetUcRegIndirectPatchSetNumRegisters(std::uint32_t* cmd, std::uint32_t numRegs);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_JUMP_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_JUMP_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcJumpPatchSetTarget(uint32_t* cmd, const volatile uint32_t* target, uint32_t sizeInDwords);
|
||||
int APS5_VABI sceAgcJumpPatchSetTarget_0300(uint32_t* cmd, uint64_t cachePolicy, const volatile uint32_t* target, uint32_t sizeInDwords);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,13 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_NOP_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_NOP_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
std::uint32_t* APS5_VABI sceAgcSetNop(CommandBuffer* buf, std::uint32_t sizeDw);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,16 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_QUEUEENDOFPIPEACTION_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_QUEUEENDOFPIPEACTION_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcQueueEndOfPipeActionPatchAddress(std::uint32_t* cmd, const volatile Label* address);
|
||||
int APS5_VABI sceAgcQueueEndOfPipeActionPatchData(uint32_t* cmd, uint64_t data);
|
||||
int APS5_VABI sceAgcQueueEndOfPipeActionPatchGcrCntl(std::uint32_t* cmd, std::uint16_t gcrControl);
|
||||
int APS5_VABI sceAgcQueueEndOfPipeActionPatchType(std::uint32_t* cmd, std::uint8_t action);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_REWIND_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_REWIND_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcRewindPatchSetRewindState(uint32_t* cmd, uint8_t state);
|
||||
int APS5_VABI sceAgcAsyncRewindPatchSetRewindState(std::uint32_t* cmd, std::uint8_t state);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,22 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_WAITREGMEM_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PATCH_INCLUDE_WAITREGMEM_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcWaitRegMemPatchAddress(std::uint32_t* cmd, const volatile void* address);
|
||||
int APS5_VABI sceAgcWaitRegMemPatchReference(std::uint32_t* cmd, std::uint32_t reference);
|
||||
int APS5_VABI sceAgcWaitRegMemPatchMask(std::uint32_t* cmd, std::uint32_t mask);
|
||||
int APS5_VABI sceAgcWaitRegMemPatchCompareFunction(std::uint32_t* cmd, std::uint8_t compareFunction);
|
||||
int APS5_VABI sceAgcWriteDataPatchSetAddressOrOffset(std::uint32_t* cmd, std::uint64_t address);
|
||||
int APS5_VABI sceAgcAsyncWriteDataPatchSetAddressOrOffset(std::uint32_t* cmd, std::uint64_t address);
|
||||
int APS5_VABI sceAgcWriteDataPatchSetDst(std::uint32_t* cmd, std::uint8_t dst);
|
||||
int APS5_VABI sceAgcAsyncWriteDataPatchSetDst(std::uint32_t* cmd, std::uint8_t dst);
|
||||
int APS5_VABI sceAgcWriteDataPatchSetCachePolicy(std::uint32_t* cmd, std::uint8_t cachePolicy);
|
||||
int APS5_VABI sceAgcAsyncWriteDataPatchSetCachePolicy(std::uint32_t* cmd, std::uint8_t cachePolicy);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_PREDICATION_INCLUDE_PREDICATION_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_PREDICATION_INCLUDE_PREDICATION_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcSetPacketPredication(uint32_t* packet, uint32_t predication);
|
||||
int APS5_VABI sceAgcSetRangePredication(uint32_t* start, const volatile uint32_t* end, uint32_t predication);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,13 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_SHADER_INCLUDE_CREATESHADER_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_SHADER_INCLUDE_CREATESHADER_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcCreateShader(Shader** dst, void* header, const volatile void* code);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcGetGsOversubscription(ShaderRegister* regs, const Shader* gs, std::uint32_t budget, float factor);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcGetGsPrimPayload(std::uint32_t* payload, const Shader* gs);
|
||||
|
||||
}
|
||||
@@ -1,4 +1,17 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_SHADER_INCLUDE_INTERPOLANTMAPPING_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_SHADER_INCLUDE_INTERPOLANTMAPPING_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcCreateInterpolantMapping_0100(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
int APS5_VABI sceAgcCreateInterpolantMapping_10000(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
int APS5_VABI sceAgcUpdateInterpolantMapping_10000(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
int APS5_VABI sceAgcCreateInterpolantMapping_nid_postfix(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
int APS5_VABI sceAgcUpdateInterpolantMapping_nid_postfix(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcLinkShaders(ShaderRegister* context, ShaderRegister* primitive, const void* reserved, const Shader* vertex, const Shader* pixel, std::uint32_t primitiveType);
|
||||
|
||||
}
|
||||
@@ -1,4 +1,14 @@
|
||||
#ifndef CORE_LIBS_PRX_LIBSCEAGC_SHADER_INCLUDE_PRIMSTATE_HPP
|
||||
#define CORE_LIBS_PRX_LIBSCEAGC_SHADER_INCLUDE_PRIMSTATE_HPP
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcCreatePrimState(ShaderRegister* cxRegs, ShaderRegister* ucRegs, const Shader* hs, const Shader* gs, std::uint32_t primType);
|
||||
int APS5_VABI sceAgcUpdatePrimState(ShaderRegister* cxRegs, ShaderRegister* ucRegs, std::uint32_t primType);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/Shader/include/GsOversubscription.hpp"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/Shader/include/GsPrimPayload.hpp"
|
||||
#include <cstdint>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#include "prx/libSceAgc/Shader/include/PrimState.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/LinkShaders.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/InterpolantMapping.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
#include "prx/libSceAgcDriver/Execution/include/ShaderPreparationScope.hpp"
|
||||
#include "prx/libSceAgcDriver/Execution/include/Driver.hpp"
|
||||
@@ -6,9 +9,6 @@
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
|
||||
extern "C" int APS5_VABI sceAgcCreatePrimState(ShaderRegister*, ShaderRegister*, const Shader*, const Shader*, std::uint32_t);
|
||||
extern "C" int APS5_VABI sceAgcCreateInterpolantMapping_0100(ShaderRegister*, const Shader*, const Shader*);
|
||||
|
||||
extern "C" int APS5_VABI sceAgcLinkShaders(ShaderRegister* context, ShaderRegister* primitive,
|
||||
const void* reserved, const Shader* vertex, const Shader* pixel, std::uint32_t primitiveType) {
|
||||
using namespace ShaderRegs;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/include/Agc.hpp"
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include "SceTypes.hpp"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "SceTypes.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceAgcSuspendPointAndCheckStatus(void);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbPushMarkerSpan(CommandBuffer* buffer, const char* text, std::uint32_t length, std::uint32_t color);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbSetMarkerSpan(CommandBuffer* buffer, const char* text, std::uint32_t length, std::uint32_t color);
|
||||
int APS5_VABI sceAgcAcquireMemSetEngine(std::uint32_t* packet, std::uint8_t engine);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbPushMarkerSpan(CommandBuffer* buffer, const char* text, std::uint32_t length, std::uint32_t color);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetMarkerSpan(CommandBuffer* buffer, const char* text, std::uint32_t length, std::uint32_t color);
|
||||
int APS5_VABI sceAgcSetSemaphoreMemory(void* memory, std::uint64_t size);
|
||||
std::uint32_t* APS5_VABI sceAgcCbMemsetExclusive(CommandBuffer* buffer, void* destination, const void* pattern, std::uint64_t size);
|
||||
|
||||
int APS5_VABI sceAgcAcbInitializeDefaultHardwareState();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#include "prx/libSceAgc/Acb/include/Control.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Dispatch.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/Cb/include/Branch.hpp"
|
||||
#include "prx/libSceAgc/Cb/include/Dispatch.hpp"
|
||||
#include "prx/libSceAgc/Cb/include/Registers.hpp"
|
||||
#include "prx/libSceAgc/Cb/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/DrawIndexed.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/DrawNonIndexed.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/IndexBuffer.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/Instancing.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/Stats.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Control.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Dispatch.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/ContextState.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Display.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Init.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Marker.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Predication.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Registers.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Workload.hpp"
|
||||
#include "prx/libSceAgc/include/Agc.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/Debug.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/PacketInfo.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/Platform.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/RegisterDefaults.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/Semaphore.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/ShaderFusion.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/StaticBuffer.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/Suspend.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/Branch.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/CondExec.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/Dma.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/IndirectRegisters.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/Jump.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/Nop.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/QueueEndOfPipeAction.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/Rewind.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/WaitRegMem.hpp"
|
||||
#include "prx/libSceAgc/Predication/include/Predication.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/CreateShader.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/GsOversubscription.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/GsPrimPayload.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/InterpolantMapping.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/LinkShaders.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/PrimState.hpp"
|
||||
@@ -1,14 +1,11 @@
|
||||
#include "prx/libSceAgc/Acb/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Control.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
|
||||
extern "C" std::uint32_t APS5_VABI sceAgcAcbAtomicGdsGetSize();
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbAtomicGds_0900(CommandBuffer* buf, std::uint32_t control, std::uint32_t mode,
|
||||
std::uint32_t gdsOp, std::uint32_t src, std::uint16_t offset, std::uint16_t index, std::uint32_t mask,
|
||||
std::uint32_t data, std::uint64_t compareData, std::uint64_t extraData);
|
||||
|
||||
int main() {
|
||||
constexpr std::uint32_t expectedSize = 11u * sizeof(std::uint32_t);
|
||||
if (sceAgcAcbAtomicGdsGetSize() != expectedSize) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "prx/libSceAgc/Patch/include/Branch.hpp"
|
||||
#include "prx/libSceAgc/Cb/include/Branch.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -7,16 +9,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t* APS5_VABI sceAgcCbBranch(CommandBuffer*, std::uint8_t, std::uint8_t, const volatile std::uint64_t*, std::uint64_t, std::uint64_t, std::uint8_t, const volatile std::uint32_t*, std::uint32_t, std::uint8_t, const volatile std::uint32_t*, std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcCbBranchGetSize();
|
||||
int APS5_VABI sceAgcBranchPatchSetCompareAddress(std::uint32_t*, const volatile std::uint64_t*);
|
||||
int APS5_VABI sceAgcBranchPatchSetThenTarget(std::uint32_t*, const volatile std::uint32_t*, std::uint32_t);
|
||||
int APS5_VABI sceAgcBranchPatchSetElseTarget(std::uint32_t*, const volatile std::uint32_t*, std::uint32_t);
|
||||
int APS5_VABI sceAgcBranchPatchSetThenTarget_0300(std::uint32_t*, std::uint8_t, const volatile std::uint32_t*, std::uint32_t);
|
||||
int APS5_VABI sceAgcBranchPatchSetElseTarget_0300(std::uint32_t*, std::uint8_t, const volatile std::uint32_t*, std::uint32_t);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/Cb/include/Branch.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
|
||||
#include <array>
|
||||
@@ -5,11 +6,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t* APS5_VABI sceAgcCbCondWrite(CommandBuffer*, std::uint32_t, std::uint32_t, const volatile void*, std::uint32_t, const volatile void*, std::uint32_t, std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcCbCondWriteGetSize();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr std::uint32_t Sentinel = 0xabcdef01u;
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
#include "prx/libSceAgc/include/Agc.hpp"
|
||||
#include "prx/libSceAgcDriver/Resource/include/Registration.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/WaitRegMem.hpp"
|
||||
#include "prx/libSceAgc/Patch/include/Nop.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/Suspend.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/RegisterDefaults.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/PacketInfo.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/Debug.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Workload.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Marker.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Init.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Display.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/ContextState.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Control.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/Instancing.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/IndexBuffer.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/DrawIndexed.hpp"
|
||||
#include "prx/libSceAgc/Cb/include/Registers.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Control.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/Command/include/RegisterDefaults.hpp"
|
||||
@@ -10,57 +30,6 @@
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbEventWrite(CommandBuffer* buf, std::uint8_t eventType, const volatile void* address);
|
||||
extern "C" std::uint64_t APS5_VABI sceAgcDcbEventWriteGetSize(std::uint8_t eventType);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbResetQueue(CommandBuffer* buf, std::uint32_t op, std::uint32_t state);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbClearState(CommandBuffer* buf, std::uint32_t command);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbSetFlip(CommandBuffer* buf, std::uint32_t handle, std::int32_t index, std::uint32_t mode, std::int64_t argument);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbWaitUntilSafeForRendering(CommandBuffer* buf, std::uint32_t handle, std::uint32_t index);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbSetFlip(CommandBuffer* buf, std::uint32_t handle, std::int32_t index, std::uint32_t mode, std::int64_t argument);
|
||||
extern "C" int APS5_VABI sceAgcSuspendPoint();
|
||||
extern "C" int APS5_VABI sceAgcInit(std::uint32_t version);
|
||||
extern "C" void* APS5_VABI sceAgcGetRegisterDefaults();
|
||||
extern "C" void* APS5_VABI sceAgcGetRegisterDefaults2(std::uint32_t version);
|
||||
extern "C" void* APS5_VABI sceAgcGetRegisterDefaultsInternal();
|
||||
extern "C" void* APS5_VABI sceAgcGetRegisterDefaults2Internal(std::uint32_t version);
|
||||
extern "C" int APS5_VABI sceAgcGetDefaultCxStateFlat(void* out_state, std::uint32_t size);
|
||||
extern "C" int APS5_VABI sceAgcInit_0090(std::uint32_t* state, std::uint32_t version);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbDrawIndexAuto(CommandBuffer* buf, std::uint32_t indexCount, std::uint64_t modifier);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbDrawIndexIndirect(CommandBuffer* buf, std::uint32_t dataOffsetInBytes, std::uint64_t modifier);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbDrawIndexIndirectMulti(CommandBuffer* buf, std::uint32_t dataOffsetInBytes, std::uint32_t countIndirect, std::uint32_t maxCountOrCount, const volatile void* countAddress, std::uint32_t strideInBytes, std::uint64_t modifier);
|
||||
extern "C" int APS5_VABI sceAgcWaitRegMemPatchAddress(std::uint32_t* cmd, const volatile void* address);
|
||||
extern "C" int APS5_VABI sceAgcWaitRegMemPatchCompareFunction(std::uint32_t* cmd, std::uint8_t compareFunction);
|
||||
extern "C" int APS5_VABI sceAgcWaitRegMemPatchReference(std::uint32_t* cmd, std::uint32_t reference);
|
||||
extern "C" int APS5_VABI sceAgcWaitRegMemPatchMask(std::uint32_t* cmd, std::uint32_t mask);
|
||||
extern "C" int APS5_VABI sceAgcGetDataPacketPayloadAddress_0090(std::uint32_t** addr, std::uint32_t* cmd, int type);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcCbSetShRegisterRangeDirect(CommandBuffer* buf, std::uint32_t offset, const std::uint32_t* values, std::uint32_t numValues);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbContextStateOp_0100(CommandBuffer* buf, std::uint32_t operation);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbPushMarker(CommandBuffer* buf, const char* str, std::uint32_t color);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbPopMarker(CommandBuffer* buf);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbSetWorkloadComplete(CommandBuffer* buf, std::uint32_t stream_id, std::uint32_t workload_id);
|
||||
extern "C" int APS5_VABI sceAgcDriverRegisterWorkloadStream(std::uint32_t stream_id, const void* stream);
|
||||
extern "C" int APS5_VABI sceAgcDriverUnregisterWorkloadStream(std::uint32_t stream_id);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbSetWorkloadsActive(CommandBuffer* buf, std::uint32_t stream_id, const std::uint32_t* workload_ids, std::uint32_t workload_count);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbSetWorkloadStreamInactive(CommandBuffer* buf, std::uint32_t streamId);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbSetWorkloadsActive(CommandBuffer* buf, std::uint32_t streamId, const std::uint32_t* workloadIds, std::uint32_t workloadCount);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbSetWorkloadComplete(CommandBuffer* buf, std::uint32_t streamId, std::uint32_t workloadId);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbSetWorkloadStreamInactive(CommandBuffer* buf, std::uint32_t streamId);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbSetMarker(CommandBuffer* buf, const char* str, std::uint32_t color);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbPushMarker(CommandBuffer* buf, const char* str, std::uint32_t color);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbPopMarker(CommandBuffer* buf);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbPushMarkerSpan(CommandBuffer* buf, const char* str, std::uint32_t length, std::uint32_t color);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbSetMarkerSpan(CommandBuffer* buf, const char* str, std::uint32_t length, std::uint32_t color);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbPushMarkerSpan(CommandBuffer* buf, const char* str, std::uint32_t length, std::uint32_t color);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbSetMarkerSpan(CommandBuffer* buf, const char* str, std::uint32_t length, std::uint32_t color);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbSetMarker(CommandBuffer* buf, const char* str, std::uint32_t color);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbSetIndexBuffer(CommandBuffer* buf, std::uint64_t indexAddress);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbSetIndexIndirectArgs(CommandBuffer* buf, std::uint64_t attributeAddress, std::uint32_t attributeIndex);
|
||||
extern "C" std::uint32_t APS5_VABI sceAgcDcbSetIndexIndirectArgsGetSize();
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbSetBaseIndirectArgs(CommandBuffer* buf, std::uint32_t shaderType, const volatile void* indirectBaseAddr);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcSetNop(CommandBuffer* buf, std::uint32_t sizeDw);
|
||||
extern "C" int APS5_VABI sceAgcDebugRaiseException(std::uint32_t exceptionId);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbAtomicGds_0900(CommandBuffer* buf, std::uint32_t control, std::uint32_t mode, std::uint32_t gdsOp, std::uint32_t src, std::uint16_t offset, std::uint16_t index, std::uint32_t mask, std::uint32_t data, std::uint64_t compareData, std::uint64_t extraData);
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#include "prx/libSceAgc/Patch/include/CondExec.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -7,15 +10,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t* APS5_VABI sceAgcDcbCondExec(CommandBuffer*, const volatile std::uint32_t*, std::uint32_t);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbCondExec(CommandBuffer*, const volatile std::uint32_t*, std::uint32_t);
|
||||
int APS5_VABI sceAgcCondExecPatchSetCommandAddress(std::uint32_t*, const volatile std::uint32_t*);
|
||||
int APS5_VABI sceAgcCondExecPatchSetEnd(std::uint32_t*, const volatile std::uint32_t*);
|
||||
int APS5_VABI sceAgcAsyncCondExecPatchSetCommandAddress(std::uint32_t*, const volatile std::uint32_t*);
|
||||
int APS5_VABI sceAgcAsyncCondExecPatchSetEnd(std::uint32_t*, const volatile std::uint32_t*);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr std::uint32_t Sentinel = 0xabcdef01u;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/DcbState/include/ContextState.hpp"
|
||||
#include "SceTypes.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
#include "prx/libc/include/Shutdown.hpp"
|
||||
@@ -7,10 +8,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" std::uint64_t APS5_VABI sceAgcDcbContextStateOpGetSize(std::uint32_t operation);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbContextStateOp(CommandBuffer* buf, std::uint32_t operation);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbContextStateOp_0100(CommandBuffer* buf, std::uint32_t operation);
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "prx/libSceAgc/DcbFlow/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -7,13 +9,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t* APS5_VABI sceAgcAcbDmaData(CommandBuffer*, std::uint8_t, std::uint8_t, std::uint64_t, std::uint8_t, std::uint8_t, std::uint64_t, std::uint32_t, std::uint8_t, std::uint8_t);
|
||||
std::uint32_t APS5_VABI sceAgcAcbDmaDataGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbDmaData(CommandBuffer*, std::uint8_t, std::uint8_t, std::uint8_t, std::uint64_t, std::uint8_t, std::uint8_t, std::uint64_t, std::uint32_t, std::uint8_t, std::uint8_t, std::uint8_t);
|
||||
std::uint32_t APS5_VABI sceAgcDcbDmaDataGetSize();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr std::uint32_t Sentinel = 0xabcdef01u;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#include "prx/libSceAgc/DcbState/include/ContextState.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Control.hpp"
|
||||
#include "prx/libSceAgc/Cb/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
#include "prx/libc/include/Shutdown.hpp"
|
||||
@@ -8,15 +13,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t APS5_VABI sceAgcDcbQueueEndOfShaderActionGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcAcbQueueEndOfShaderActionGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcCbReleaseMem(CommandBuffer*, std::uint8_t, std::uint16_t, std::uint8_t, std::uint8_t, const volatile Label*, std::uint8_t, std::uint64_t, std::uint16_t, std::uint16_t, std::uint8_t, std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcDcbAtomicGdsGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbAtomicGds_0900(CommandBuffer*, std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, std::uint16_t, std::uint16_t, std::uint32_t, std::uint32_t, std::uint64_t, std::uint64_t);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbAtomicGds(CommandBuffer*, std::uint32_t, std::uint32_t, std::uint32_t, std::uint32_t, std::uint16_t, std::uint16_t, std::uint32_t, std::uint32_t, std::uint64_t, std::uint64_t);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/Shader/include/GsOversubscription.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
#include "prx/libc/include/Shutdown.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
@@ -11,8 +12,6 @@
|
||||
#include <limits>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" int APS5_VABI sceAgcGetGsOversubscription(ShaderRegister* regs, const Shader* gs, std::uint32_t budget, float factor);
|
||||
|
||||
namespace {
|
||||
|
||||
using Registers = std::array<ShaderRegister, 2>;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/Shader/include/GsPrimPayload.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
#include "prx/libc/include/Shutdown.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
@@ -9,8 +10,6 @@
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
extern "C" int APS5_VABI sceAgcGetGsPrimPayload(std::uint32_t* payload, const Shader* gs);
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr std::uint32_t Sentinel = 0xccccccccu;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "prx/libSceAgc/Misc/include/Debug.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/Stats.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
#include "prx/libc/include/Shutdown.hpp"
|
||||
|
||||
@@ -5,13 +7,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
int APS5_VABI sceAgcSetShaderInstrumentation(std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcGetShaderInstrumentation();
|
||||
std::uint32_t APS5_VABI sceAgcDcbBeginOcclusionQueryGetSize(std::int32_t);
|
||||
std::uint32_t APS5_VABI sceAgcDcbEndOcclusionQueryGetSize();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/Shader/include/InterpolantMapping.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
#include "prx/libc/include/Shutdown.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
@@ -11,12 +12,6 @@
|
||||
#include <stdexcept>
|
||||
#include <span>
|
||||
|
||||
extern "C" int APS5_VABI sceAgcCreateInterpolantMapping_0100(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
extern "C" int APS5_VABI sceAgcCreateInterpolantMapping_10000(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
extern "C" int APS5_VABI sceAgcUpdateInterpolantMapping_10000(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
extern "C" int APS5_VABI sceAgcCreateInterpolantMapping_nid_postfix(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
extern "C" int APS5_VABI sceAgcUpdateInterpolantMapping_nid_postfix(ShaderRegister* regs, const Shader* gs, const Shader* ps);
|
||||
|
||||
namespace {
|
||||
|
||||
using Registers = std::array<ShaderRegister, 32>;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/Misc/include/PacketInfo.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
#include "prx/libc/include/Shutdown.hpp"
|
||||
|
||||
@@ -7,8 +8,6 @@
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
||||
extern "C" std::uint32_t APS5_VABI sceAgcGetPacketSize(std::uint32_t* packet);
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
#include <stdexcept>
|
||||
#include <tuple>
|
||||
|
||||
extern "C" int APS5_VABI sceAgcGetDataPacketPayloadRange(SceAgcMemoryRange* range, std::uint32_t* cmd, int type);
|
||||
extern "C" int APS5_VABI sceAgcGetDataPacketPayloadAddress(std::uint32_t** addr, std::uint32_t* cmd, int type);
|
||||
extern "C" int APS5_VABI sceAgcGetDataPacketPayloadAddress_0090(std::uint32_t** addr, std::uint32_t* cmd, int type);
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/Misc/include/Platform.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
#include "prx/libc/include/Shutdown.hpp"
|
||||
|
||||
@@ -5,8 +6,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" int APS5_VABI sceAgcGetIsTrinityMode(bool* isTrinityMode);
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#include "prx/libSceAgc/Predication/include/Predication.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Predication.hpp"
|
||||
#include "prx/libSceAgc/DcbDraw/include/IndexBuffer.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
|
||||
#include <array>
|
||||
@@ -5,17 +8,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetPredication(CommandBuffer*, std::uint8_t, std::uint8_t, std::uint8_t, const volatile void*, std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetZPassPredicationEnableGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetPredicationDisableGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetBoolPredicationEnableGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetIndexCount(CommandBuffer*, std::uint32_t);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetIndexBuffer(CommandBuffer*, std::uint64_t);
|
||||
int APS5_VABI sceAgcSetPacketPredication(std::uint32_t*, std::uint32_t);
|
||||
int APS5_VABI sceAgcSetRangePredication(std::uint32_t*, const volatile std::uint32_t*, std::uint32_t);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "prx/libSceAgc/DcbState/include/Display.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -7,13 +9,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t* APS5_VABI sceAgcAcbPrimeUtcl2(CommandBuffer*, const volatile void*, std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcAcbPrimeUtcl2GetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbPrimeUtcl2(CommandBuffer*, const volatile void*, std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcDcbPrimeUtcl2GetSize();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr std::uint32_t Sentinel = 0xabcdef01u;
|
||||
|
||||
@@ -1,39 +1,14 @@
|
||||
#include "prx/libSceAgc/Patch/include/IndirectRegisters.hpp"
|
||||
#include "prx/libSceAgc/DcbState/include/Registers.hpp"
|
||||
#include "prx/libSceAgc/Cb/include/Registers.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetCfRegisterDirect(CommandBuffer*, ShaderRegister);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetCfRegisterRangeDirect(CommandBuffer*, std::uint32_t, const std::uint32_t*, std::uint32_t);
|
||||
std::uint32_t* APS5_VABI sceAgcCbSetShRegisterRangeDirect(CommandBuffer*, std::uint32_t, const std::uint32_t*, std::uint32_t);
|
||||
std::uint32_t* APS5_VABI sceAgcCbSetUcRegisterRangeDirect(CommandBuffer*, std::uint32_t, const std::uint32_t*, std::uint32_t);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetCxRegisterDirect(CommandBuffer*, ShaderRegister);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetShRegisterDirect(CommandBuffer*, ShaderRegister);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetUcRegisterDirect(CommandBuffer*, ShaderRegister);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetCxRegisterDirectGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetShRegisterDirectGetSize();
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetUcRegisterDirectGetSize();
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetCxRegistersIndirect(CommandBuffer*, const volatile ShaderRegister*, std::uint32_t);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetShRegistersIndirect(CommandBuffer*, const volatile ShaderRegister*, std::uint32_t);
|
||||
std::uint32_t* APS5_VABI sceAgcDcbSetUcRegistersIndirect(CommandBuffer*, const volatile ShaderRegister*, std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetCxRegistersIndirectGetSize(std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetShRegistersIndirectGetSize(std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcDcbSetUcRegistersIndirectGetSize(std::uint32_t);
|
||||
int APS5_VABI sceAgcSetCxRegIndirectPatchSetNumRegisters(std::uint32_t*, std::uint32_t);
|
||||
int APS5_VABI sceAgcSetShRegIndirectPatchSetNumRegisters(std::uint32_t*, std::uint32_t);
|
||||
int APS5_VABI sceAgcSetUcRegIndirectPatchSetNumRegisters(std::uint32_t*, std::uint32_t);
|
||||
int APS5_VABI sceAgcSetCxRegIndirectPatchSetAddress(std::uint32_t*, const volatile ShaderRegister*);
|
||||
int APS5_VABI sceAgcSetShRegIndirectPatchSetAddress(std::uint32_t*, const volatile ShaderRegister*);
|
||||
int APS5_VABI sceAgcSetUcRegIndirectPatchSetAddress(std::uint32_t*, const volatile ShaderRegister*);
|
||||
std::uint32_t* APS5_VABI sceAgcCbSetShRegistersDirect(CommandBuffer*, const volatile ShaderRegister*, std::uint32_t);
|
||||
std::uint32_t* APS5_VABI sceAgcCbSetUcRegistersDirect(CommandBuffer*, const volatile ShaderRegister*, std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcCbSetShRegistersDirectGetSize(std::uint32_t);
|
||||
std::uint32_t APS5_VABI sceAgcCbSetUcRegistersDirectGetSize(std::uint32_t);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
void check(bool condition, const char* message) {
|
||||
@@ -125,6 +100,26 @@ void testRangeFromAnyByte() {
|
||||
}
|
||||
}
|
||||
|
||||
void testListFromAnyByte() {
|
||||
const std::array writers{sceAgcCbSetShRegistersDirect, sceAgcCbSetUcRegistersDirect};
|
||||
const std::array opcodes{0x7600u, 0x7900u};
|
||||
const std::array<ShaderRegister, 3> registers{{{0x10u, 0x11223344u}, {0x11u, 0x55667788u}, {0x30u, 0x99aabbccu}}};
|
||||
for (std::size_t i = 0; i < writers.size(); ++i) {
|
||||
for (const std::size_t offset : {1u, 2u, 3u, 5u}) {
|
||||
alignas(16) std::array<unsigned char, 48> bytes{};
|
||||
std::memcpy(bytes.data() + offset, registers.data(), sizeof(registers));
|
||||
Storage storage;
|
||||
storage.words.fill(0xabcdef01u);
|
||||
const auto* list = reinterpret_cast<const volatile ShaderRegister*>(bytes.data() + offset);
|
||||
auto* packet = writers[i](&storage.buffer, list, static_cast<std::uint32_t>(registers.size()));
|
||||
const std::array<std::uint32_t, 7> expected{0xc0020000u | opcodes[i], 0x10u, 0x11223344u, 0x55667788u, 0xc0010000u | opcodes[i], 0x30u, 0x99aabbccu};
|
||||
check(packet == storage.words.data() && storage.buffer.cursor_up == packet + expected.size(), "unaligned register list allocation mismatch");
|
||||
check(std::equal(expected.begin(), expected.end(), packet), "unaligned register list was not read byte for byte");
|
||||
check(packet[expected.size()] == 0xabcdef01u, "unaligned register list overwrote the following word");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void testIndirect() {
|
||||
const std::array writers{sceAgcDcbSetCxRegistersIndirect, sceAgcDcbSetShRegistersIndirect, sceAgcDcbSetUcRegistersIndirect};
|
||||
const std::array sizes{sceAgcDcbSetCxRegistersIndirectGetSize, sceAgcDcbSetShRegistersIndirectGetSize, sceAgcDcbSetUcRegistersIndirectGetSize};
|
||||
@@ -239,6 +234,7 @@ int main() {
|
||||
testDirect();
|
||||
testConfig();
|
||||
testRangeFromAnyByte();
|
||||
testListFromAnyByte();
|
||||
testIndirect();
|
||||
testIndirectPlaceholder();
|
||||
testDirectList();
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
#include "prx/libSceAgc/include/Agc.hpp"
|
||||
#include "prx/libSceAgc/Misc/include/Semaphore.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/Cb/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Sync.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
#include "prx/libc/include/Shutdown.hpp"
|
||||
@@ -12,13 +17,6 @@
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
extern "C" int APS5_VABI sceAgcSetAmmSemaphoreMemory(void* memory, std::uint64_t sizeInBytes);
|
||||
extern "C" int APS5_VABI sceAgcSetSemaphoreMemory(void* memory, std::uint64_t sizeInBytes);
|
||||
extern "C" int APS5_VABI sceAgcGetSemaphoreLabel(std::uint32_t index, void** label);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcCbMemSemaphore(CommandBuffer* buf, const volatile void* address, std::uint32_t operation, std::uint32_t modifier, std::uint32_t value);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcAcbMemSemaphore(CommandBuffer* buf, const volatile void* address, std::uint8_t waitForMailbox, std::uint8_t signalType, std::uint8_t operation);
|
||||
extern "C" std::uint32_t* APS5_VABI sceAgcDcbMemSemaphore(CommandBuffer* buf, const volatile void* address, std::uint8_t waitForMailbox, std::uint8_t signalType, std::uint8_t operation);
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr std::uint64_t blockBytes = 0x4000u;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prx/libSceAgc/Shader/include/LinkShaders.hpp"
|
||||
#include "SceShaders.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/PrimState.hpp"
|
||||
#include "prx/libSceAgc/Shader/include/InterpolantMapping.hpp"
|
||||
@@ -11,10 +12,6 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
extern "C" int APS5_VABI sceAgcLinkShaders(ShaderRegister*, ShaderRegister*, const void*, const Shader*, const Shader*, std::uint32_t);
|
||||
extern "C" int APS5_VABI sceAgcCreatePrimState(ShaderRegister*, ShaderRegister*, const Shader*, const Shader*, std::uint32_t);
|
||||
extern "C" int APS5_VABI sceAgcCreateInterpolantMapping_0100(ShaderRegister*, const Shader*, const Shader*);
|
||||
|
||||
namespace {
|
||||
std::array<ShaderRegister, 2> preparedContext;
|
||||
std::array<ShaderRegister, 3> preparedPrimitive;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#include "prx/libSceAgc/Patch/include/WaitRegMem.hpp"
|
||||
#include "prx/libSceAgc/DcbFlow/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/Acb/include/Memory.hpp"
|
||||
#include "prx/libSceAgc/Command/include/Packet.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -7,17 +10,6 @@
|
||||
#include <cstdio>
|
||||
#include <stdexcept>
|
||||
|
||||
extern "C" {
|
||||
std::uint32_t* APS5_VABI sceAgcDcbWriteData(CommandBuffer*, std::uint8_t, std::uint8_t, std::uint64_t, const void*, std::uint32_t, std::uint8_t, std::uint8_t);
|
||||
std::uint32_t* APS5_VABI sceAgcAcbWriteData(CommandBuffer*, std::uint8_t, std::uint8_t, std::uint64_t, const void*, std::uint32_t, std::uint8_t, std::uint8_t);
|
||||
int APS5_VABI sceAgcWriteDataPatchSetAddressOrOffset(std::uint32_t*, std::uint64_t);
|
||||
int APS5_VABI sceAgcAsyncWriteDataPatchSetAddressOrOffset(std::uint32_t*, std::uint64_t);
|
||||
int APS5_VABI sceAgcWriteDataPatchSetDst(std::uint32_t*, std::uint8_t);
|
||||
int APS5_VABI sceAgcAsyncWriteDataPatchSetDst(std::uint32_t*, std::uint8_t);
|
||||
int APS5_VABI sceAgcWriteDataPatchSetCachePolicy(std::uint32_t*, std::uint8_t);
|
||||
int APS5_VABI sceAgcAsyncWriteDataPatchSetCachePolicy(std::uint32_t*, std::uint8_t);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
constexpr std::array<std::uint32_t, 3> Payload{0x11111111u, 0x22222222u, 0x33333333u};
|
||||
|
||||
@@ -565,6 +565,42 @@ if(BUILD_TESTING)
|
||||
set_tests_properties(agc_handoff_spin PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
|
||||
add_test_executable(agc_capture_trace_tests tests/CaptureTrace.cpp)
|
||||
target_include_directories(agc_capture_trace_tests PRIVATE ${LIBS_INCLUDE_DIR})
|
||||
target_link_libraries(agc_capture_trace_tests PRIVATE libc)
|
||||
configure_windows_unwind(agc_capture_trace_tests)
|
||||
set(agcCaptureTraceDirectory ${CMAKE_CURRENT_BINARY_DIR}/capture_trace_tests)
|
||||
file(MAKE_DIRECTORY "${agcCaptureTraceDirectory}/default")
|
||||
file(MAKE_DIRECTORY "${agcCaptureTraceDirectory}/explicit")
|
||||
file(MAKE_DIRECTORY "${agcCaptureTraceDirectory}/failure")
|
||||
file(MAKE_DIRECTORY "${agcCaptureTraceDirectory}/best-effort")
|
||||
file(MAKE_DIRECTORY "${agcCaptureTraceDirectory}/disabled")
|
||||
set(agcCaptureTraceExplicitPath "${agcCaptureTraceDirectory}/explicit/trace.log")
|
||||
set(agcCaptureTraceFailurePath "${agcCaptureTraceDirectory}/failure/missing-parent/trace.log")
|
||||
set(agcCaptureTraceBestEffortPath "${agcCaptureTraceDirectory}/best-effort/trace.log")
|
||||
add_test(NAME agc_capture_trace_path_default COMMAND agc_capture_trace_tests path-default)
|
||||
add_test(NAME agc_capture_trace_path_empty COMMAND agc_capture_trace_tests path-empty)
|
||||
set_tests_properties(agc_capture_trace_path_empty PROPERTIES ENVIRONMENT "APS5_CAPTURE_TRACE_PATH=")
|
||||
add_test(NAME agc_capture_trace_path_explicit COMMAND agc_capture_trace_tests path-explicit)
|
||||
set_tests_properties(agc_capture_trace_path_explicit PROPERTIES ENVIRONMENT "APS5_CAPTURE_TRACE_PATH=${agcCaptureTraceExplicitPath}")
|
||||
add_test(NAME agc_capture_trace_explicit_writes COMMAND agc_capture_trace_tests explicit-writes)
|
||||
set_tests_properties(agc_capture_trace_explicit_writes PROPERTIES ENVIRONMENT "APS5_CAPTURE_TRACE=1;APS5_CAPTURE_TRACE_PATH=${agcCaptureTraceExplicitPath}")
|
||||
add_test(NAME agc_capture_trace_default_writes COMMAND agc_capture_trace_tests default-writes)
|
||||
set_tests_properties(agc_capture_trace_default_writes PROPERTIES ENVIRONMENT "APS5_CAPTURE_TRACE=1" WORKING_DIRECTORY "${agcCaptureTraceDirectory}/default")
|
||||
add_test(NAME agc_capture_trace_open_failure COMMAND agc_capture_trace_tests open-failure)
|
||||
set_tests_properties(agc_capture_trace_open_failure PROPERTIES ENVIRONMENT "APS5_CAPTURE_TRACE=1;APS5_CAPTURE_TRACE_PATH=${agcCaptureTraceFailurePath}" WORKING_DIRECTORY "${agcCaptureTraceDirectory}/failure")
|
||||
add_test(NAME agc_capture_trace_best_effort_overflow COMMAND agc_capture_trace_tests best-effort-overflow)
|
||||
set_tests_properties(agc_capture_trace_best_effort_overflow PROPERTIES ENVIRONMENT "APS5_CAPTURE_TRACE=1;APS5_CAPTURE_TRACE_PATH=${agcCaptureTraceBestEffortPath}" WORKING_DIRECTORY "${agcCaptureTraceDirectory}/best-effort")
|
||||
add_test(NAME agc_capture_trace_disabled COMMAND agc_capture_trace_tests disabled)
|
||||
set_tests_properties(agc_capture_trace_disabled PROPERTIES WORKING_DIRECTORY "${agcCaptureTraceDirectory}/disabled")
|
||||
if(WIN32)
|
||||
set_tests_properties(agc_capture_trace_path_default agc_capture_trace_path_empty
|
||||
agc_capture_trace_path_explicit agc_capture_trace_explicit_writes
|
||||
agc_capture_trace_default_writes agc_capture_trace_open_failure agc_capture_trace_best_effort_overflow
|
||||
agc_capture_trace_disabled PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
@@ -763,7 +799,15 @@ if(BUILD_TESTING)
|
||||
set_tests_properties(agc_write_tracking_metadata_commit PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 30)
|
||||
add_test(NAME agc_resident_direct_remap COMMAND agc_write_tracking_tests --resident-direct-remap)
|
||||
set_tests_properties(agc_resident_direct_remap PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 20)
|
||||
set_tests_properties(agc_write_tracking agc_write_tracking_metadata_commit agc_resident_direct_remap PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
add_test(NAME agc_rewatched_direct_shared COMMAND agc_write_tracking_tests --rewatched-direct-shared)
|
||||
set_tests_properties(agc_rewatched_direct_shared PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 20)
|
||||
add_test(NAME agc_import_alias_shared COMMAND agc_write_tracking_tests --import-alias-shared)
|
||||
set_tests_properties(agc_import_alias_shared PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 20)
|
||||
add_test(NAME agc_compared_shared_generations COMMAND agc_write_tracking_tests --compared-shared-generations)
|
||||
set_tests_properties(agc_compared_shared_generations PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 20)
|
||||
add_test(NAME agc_write_tracking_rewatch_import_pages COMMAND agc_write_tracking_tests --rewatch-import-pages)
|
||||
set_tests_properties(agc_write_tracking_rewatch_import_pages PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 20)
|
||||
set_tests_properties(agc_write_tracking agc_write_tracking_metadata_commit agc_resident_direct_remap agc_rewatched_direct_shared agc_import_alias_shared agc_compared_shared_generations agc_write_tracking_rewatch_import_pages PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
endif()
|
||||
@@ -1530,6 +1574,8 @@ if(BUILD_TESTING)
|
||||
endif()
|
||||
add_test(NAME agc_import_watch COMMAND agc_driver_recorder_tests --import-watch-only)
|
||||
set_tests_properties(agc_import_watch PROPERTIES SKIP_RETURN_CODE 77)
|
||||
add_test(NAME agc_import_settle_initial_dcc COMMAND agc_driver_recorder_tests --settle-initial-dcc-only)
|
||||
set_tests_properties(agc_import_settle_initial_dcc PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 30)
|
||||
if(WIN32)
|
||||
add_test(NAME agc_import_watch_other_family COMMAND agc_driver_recorder_tests --import-watch-other-family-only)
|
||||
set_tests_properties(agc_import_watch_other_family PROPERTIES SKIP_RETURN_CODE 77)
|
||||
@@ -1547,7 +1593,7 @@ if(BUILD_TESTING)
|
||||
add_test(NAME agc_import_settle_retire COMMAND agc_driver_recorder_tests --settle-retire-only)
|
||||
add_test(NAME agc_import_settle_storage_image COMMAND agc_driver_recorder_tests --settle-storage-image-only)
|
||||
set_tests_properties(agc_import_settle_deferred agc_import_settle_deferred_other_family agc_import_settle_first_use agc_import_settle_earlier_import agc_import_settle_retire agc_import_settle_storage_image PROPERTIES SKIP_RETURN_CODE 77 TIMEOUT 60)
|
||||
set_tests_properties(agc_import_watch agc_import_watch_other_family agc_import_settle_deferred agc_import_settle_deferred_other_family agc_import_settle_first_use agc_import_settle_earlier_import agc_import_settle_retire agc_import_settle_storage_image PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
set_tests_properties(agc_import_watch agc_import_watch_other_family agc_import_settle_deferred agc_import_settle_deferred_other_family agc_import_settle_first_use agc_import_settle_earlier_import agc_import_settle_retire agc_import_settle_storage_image agc_import_settle_initial_dcc PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
if(WIN32)
|
||||
@@ -2164,6 +2210,9 @@ if(NOT ANYPS5_AGC_EXECUTION_TESTS OR "PooledBufferRange" IN_LIST ANYPS5_AGC_EXEC
|
||||
endif()
|
||||
|
||||
target_link_libraries(agc_driver_gpu_map_on_fiber_tests PRIVATE libSceFiber)
|
||||
if(ANYPS5_ENABLE_SPIRV_TOOLS)
|
||||
target_link_libraries(agc_driver_optimize_on_fiber_tests PRIVATE libSceFiber shader_recompiler_agc_driver)
|
||||
endif()
|
||||
|
||||
target_link_libraries(agc_driver_rect_list_corner_tests PRIVATE shader_recompiler_agc_driver)
|
||||
target_link_libraries(agc_driver_queue_zero_late_interrupt_tests PRIVATE libkernel)
|
||||
@@ -2256,6 +2305,7 @@ if(BUILD_TESTING)
|
||||
endif()
|
||||
endif()
|
||||
target_include_directories(agc_driver_native_multisample_depth_tests PRIVATE $<TARGET_PROPERTY:shader_recompiler_agc_driver,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_include_directories(agc_driver_partially_resident_snapshot_tests PRIVATE $<TARGET_PROPERTY:shader_recompiler_agc_driver,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
|
||||
foreach(agcReadbackTestKind IN ITEMS Vertex Uint Depth)
|
||||
string(TOUPPER ${agcReadbackTestKind} agcReadbackTestSymbol)
|
||||
@@ -2304,6 +2354,8 @@ target_include_directories(agc_driver_packed_unorm4444_multisample_partial_write
|
||||
|
||||
target_include_directories(agc_driver_color1555_target_tests PRIVATE $<TARGET_PROPERTY:shader_recompiler_agc_driver,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
|
||||
target_include_directories(agc_driver_color_logic_op_tests PRIVATE $<TARGET_PROPERTY:shader_recompiler_agc_driver,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
|
||||
target_include_directories(agc_driver_color565_target_tests PRIVATE $<TARGET_PROPERTY:shader_recompiler_agc_driver,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
|
||||
target_include_directories(agc_driver_depth_range_remap_draw_tests PRIVATE $<TARGET_PROPERTY:shader_recompiler_agc_driver,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
@@ -2494,10 +2546,21 @@ if(BUILD_TESTING)
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
add_test(NAME agc_driver_sparse_indirect_indices_unreadable COMMAND agc_driver_sparse_indirect_indices_tests --unreadable)
|
||||
set_tests_properties(agc_driver_sparse_indirect_indices agc_driver_sparse_indirect_indices_unreadable PROPERTIES
|
||||
add_test(NAME agc_driver_sparse_indirect_indices_no_size COMMAND agc_driver_sparse_indirect_indices_tests --no-size)
|
||||
add_test(NAME agc_driver_sparse_indirect_indices_no_size_unreadable COMMAND agc_driver_sparse_indirect_indices_tests --no-size-unreadable)
|
||||
add_test(NAME agc_driver_sparse_indirect_indices_no_size_unreadable_record COMMAND agc_driver_sparse_indirect_indices_tests --no-size-unreadable-record)
|
||||
set_tests_properties(agc_driver_sparse_indirect_indices agc_driver_sparse_indirect_indices_unreadable agc_driver_sparse_indirect_indices_no_size agc_driver_sparse_indirect_indices_no_size_unreadable agc_driver_sparse_indirect_indices_no_size_unreadable_record PROPERTIES
|
||||
ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1" SKIP_RETURN_CODE 77 TIMEOUT 30 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
if(WIN32)
|
||||
set_tests_properties(agc_driver_sparse_indirect_indices_unreadable PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
set_tests_properties(agc_driver_sparse_indirect_indices_unreadable agc_driver_sparse_indirect_indices_no_size agc_driver_sparse_indirect_indices_no_size_unreadable agc_driver_sparse_indirect_indices_no_size_unreadable_record PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
add_test(NAME agc_driver_draw_cache_relocation_evicted COMMAND agc_driver_draw_cache_relocation_tests --evicted)
|
||||
add_test(NAME agc_driver_draw_cache_relocation_kept COMMAND agc_driver_draw_cache_relocation_tests --kept)
|
||||
set_tests_properties(agc_driver_draw_cache_relocation_evicted agc_driver_draw_cache_relocation_kept PROPERTIES
|
||||
ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_DRAW_CACHE_ENTRIES=2" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
if(WIN32)
|
||||
set_tests_properties(agc_driver_draw_cache_relocation_evicted agc_driver_draw_cache_relocation_kept PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
set_tests_properties(agc_driver_pixel_implicit_derivatives PROPERTIES TIMEOUT 30)
|
||||
@@ -2611,6 +2674,9 @@ if(BUILD_TESTING)
|
||||
add_test(NAME agc_driver_untracked_snapshot_hint COMMAND agc_driver_partially_resident_snapshot_tests --untracked-hint)
|
||||
set_tests_properties(agc_driver_untracked_snapshot_hint PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" TIMEOUT 30
|
||||
ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
add_test(NAME agc_driver_compared_shared_snapshot COMMAND agc_driver_partially_resident_snapshot_tests --compared-shared)
|
||||
set_tests_properties(agc_driver_compared_shared_snapshot PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" TIMEOUT 30
|
||||
ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
set_tests_properties(agc_driver_registration_trace PROPERTIES
|
||||
ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_TRACE_FRAMES=0:1;APS5_TRACE_EVENTS=64" TIMEOUT 30)
|
||||
@@ -2694,6 +2760,12 @@ if(BUILD_TESTING)
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
|
||||
add_test(NAME agc_address_copy_cap COMMAND agc_driver_graphics_tests --address-copy-cap)
|
||||
add_test(NAME agc_address_copy_cap_remembered COMMAND agc_driver_graphics_tests --address-copy-cap-remembered)
|
||||
set_tests_properties(agc_address_copy_cap agc_address_copy_cap_remembered PROPERTIES TIMEOUT 30)
|
||||
if(WIN32)
|
||||
set_tests_properties(agc_address_copy_cap agc_address_copy_cap_remembered PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
add_test(NAME agc_driver_emulated_color_compare_srgb_decode COMMAND agc_driver_emulated_color_compare_tests)
|
||||
set_tests_properties(agc_driver_emulated_color_compare_srgb_decode PROPERTIES
|
||||
ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_SRGB_SHADER_DECODE=1"
|
||||
@@ -2764,6 +2836,28 @@ if(BUILD_TESTING)
|
||||
if(WIN32)
|
||||
set_tests_properties(agc_driver_f16_to_f32_unpack_spirv PROPERTIES ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
set(agcDrawShaderFailureTraceDirectory ${CMAKE_CURRENT_BINARY_DIR}/draw_shader_failure_tests)
|
||||
file(MAKE_DIRECTORY "${agcDrawShaderFailureTraceDirectory}/failure")
|
||||
file(MAKE_DIRECTORY "${agcDrawShaderFailureTraceDirectory}/success")
|
||||
file(MAKE_DIRECTORY "${agcDrawShaderFailureTraceDirectory}/disabled")
|
||||
file(MAKE_DIRECTORY "${agcDrawShaderFailureTraceDirectory}/failure_correlation_disabled")
|
||||
set_tests_properties(agc_driver_draw_shader_failure PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_CAPTURE_TRACE=1;APS5_TRACE_SHADER_CORRELATION=1;APS5_CAPTURE_TRACE_PATH=${agcDrawShaderFailureTraceDirectory}/failure/trace.log" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
add_test(NAME agc_driver_draw_shader_failure_successful COMMAND agc_driver_draw_shader_failure_tests successful-draw)
|
||||
set_tests_properties(agc_driver_draw_shader_failure_successful PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_CAPTURE_TRACE=1;APS5_TRACE_SHADER_CORRELATION=1;APS5_CAPTURE_TRACE_PATH=${agcDrawShaderFailureTraceDirectory}/success/trace.log" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
add_test(NAME agc_driver_draw_shader_failure_correlation_disabled COMMAND agc_driver_draw_shader_failure_tests disabled-correlation)
|
||||
set_tests_properties(agc_driver_draw_shader_failure_correlation_disabled PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_CAPTURE_TRACE=1;APS5_CAPTURE_TRACE_PATH=${agcDrawShaderFailureTraceDirectory}/disabled/trace.log" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
add_test(NAME agc_driver_draw_shader_failure_request_correlation_disabled COMMAND agc_driver_draw_shader_failure_tests request-failure-correlation-disabled)
|
||||
set_tests_properties(agc_driver_draw_shader_failure_request_correlation_disabled PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_CAPTURE_TRACE=1;APS5_CAPTURE_TRACE_PATH=${agcDrawShaderFailureTraceDirectory}/failure_correlation_disabled/trace.log" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
file(MAKE_DIRECTORY "${agcDrawShaderFailureTraceDirectory}/materialization")
|
||||
file(MAKE_DIRECTORY "${agcDrawShaderFailureTraceDirectory}/materialization_correlation_disabled")
|
||||
add_test(NAME agc_driver_draw_shader_failure_materialization COMMAND agc_driver_draw_shader_failure_tests materialization-failure)
|
||||
set_tests_properties(agc_driver_draw_shader_failure_materialization PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_CAPTURE_TRACE=1;APS5_TRACE_SHADER_CORRELATION=1;APS5_CAPTURE_TRACE_PATH=${agcDrawShaderFailureTraceDirectory}/materialization/trace.log" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
add_test(NAME agc_driver_draw_shader_failure_materialization_correlation_disabled COMMAND agc_driver_draw_shader_failure_tests materialization-failure-correlation-disabled)
|
||||
set_tests_properties(agc_driver_draw_shader_failure_materialization_correlation_disabled PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_CAPTURE_TRACE=1;APS5_CAPTURE_TRACE_PATH=${agcDrawShaderFailureTraceDirectory}/materialization_correlation_disabled/trace.log" SKIP_RETURN_CODE 77 WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
if(WIN32)
|
||||
set_tests_properties(agc_driver_draw_shader_failure agc_driver_draw_shader_failure_successful agc_driver_draw_shader_failure_correlation_disabled agc_driver_draw_shader_failure_request_correlation_disabled agc_driver_draw_shader_failure_materialization agc_driver_draw_shader_failure_materialization_correlation_disabled PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
|
||||
endif()
|
||||
add_test(NAME agc_structurizer_intersection_off COMMAND agc_structurizer_tests)
|
||||
set_tests_properties(agc_structurizer_intersection_off PROPERTIES ENVIRONMENT "ANYPS5_NO_SHADER_CACHE=1;APS5_NO_PERF_DOM_INTERSECTION=1" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
|
||||
add_test(NAME agc_structurizer_iteration_selection_off COMMAND agc_structurizer_tests)
|
||||
@@ -3336,7 +3430,8 @@ if(BUILD_TESTING)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(WIN32)
|
||||
option(ANYPS5_RUN_QUARANTINED_FRAME_REPLAY "Build and register agc_driver_frame_replay on Windows" OFF)
|
||||
if(WIN32 AND ANYPS5_RUN_QUARANTINED_FRAME_REPLAY)
|
||||
add_test_executable(agc_driver_frame_replay_tests tests/FrameReplay.cpp Execution/src/FrameCapture.cpp)
|
||||
target_include_directories(agc_driver_frame_replay_tests PRIVATE ${LIBS_INCLUDE_DIR})
|
||||
target_link_libraries(agc_driver_frame_replay_tests PRIVATE libSceAgc libSceAgcDriver libkernel libc libzstd_static)
|
||||
|
||||
Loaded 100 of 1983 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user