mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Chore] (trace-replay): use manifest file to organize retrace fixtures
This commit is contained in:
@@ -8,111 +8,17 @@ fi
|
|||||||
|
|
||||||
case_name="$1"
|
case_name="$1"
|
||||||
fixture_dir="${2:-tools/trace_replay/fixtures}"
|
fixture_dir="${2:-tools/trace_replay/fixtures}"
|
||||||
|
python_bin="${PYTHON:-python3}"
|
||||||
|
|
||||||
files=()
|
if ! command -v "${python_bin}" >/dev/null 2>&1 && command -v python >/dev/null 2>&1; then
|
||||||
|
python_bin=python
|
||||||
|
fi
|
||||||
|
|
||||||
add_standard_case() {
|
fixture_list="$("${python_bin}" tools/trace_replay/trace_cases.py \
|
||||||
local golden_suffix="$1"
|
--format fixture-files \
|
||||||
files+=(
|
--case "${case_name}" \
|
||||||
"${fixture_dir}/${case_name}.tgz"
|
--fixture-root "${fixture_dir}")"
|
||||||
"${fixture_dir}/${case_name}.${golden_suffix}.png"
|
mapfile -t files <<< "${fixture_list}"
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
case "${case_name}" in
|
|
||||||
OpenRA)
|
|
||||||
files+=(
|
|
||||||
"${fixture_dir}/openra.tgz"
|
|
||||||
"${fixture_dir}/openra.0000031249.png"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-startup)
|
|
||||||
add_standard_case "0000092195"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-main-menu)
|
|
||||||
add_standard_case "0000481787"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-in-world)
|
|
||||||
add_standard_case "0000280000"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-sodium-in-world)
|
|
||||||
add_standard_case "0000923340"
|
|
||||||
;;
|
|
||||||
minecraft-26.2-main-menu)
|
|
||||||
add_standard_case "0000101926"
|
|
||||||
;;
|
|
||||||
minecraft-26.2-in-world)
|
|
||||||
add_standard_case "0000519370"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-rei-inventory-normal-world)
|
|
||||||
add_standard_case "0000734465"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world)
|
|
||||||
add_standard_case "0000457190"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world)
|
|
||||||
add_standard_case "0000573061"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-journeymap-in-world-normal-world)
|
|
||||||
add_standard_case "0000641975"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-modernui-inventory-normal-world)
|
|
||||||
add_standard_case "0000727926"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-bsl-in-world)
|
|
||||||
add_standard_case "0000110725"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world)
|
|
||||||
add_standard_case "0000095322"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world)
|
|
||||||
add_standard_case "0000141559"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-sundial-lite-in-world)
|
|
||||||
add_standard_case "0000150023"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world)
|
|
||||||
add_standard_case "0000151297"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-complementary-unbound-in-world)
|
|
||||||
add_standard_case "0000146559"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-mellow-in-world)
|
|
||||||
add_standard_case "0000096143"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-nostalgia-in-world)
|
|
||||||
files+=(
|
|
||||||
"${fixture_dir}/${case_name}.tgz"
|
|
||||||
"${fixture_dir}/${case_name}.0000153808-linux-mesa.png"
|
|
||||||
"${fixture_dir}/${case_name}.0000153808.png"
|
|
||||||
)
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-bliss-in-world)
|
|
||||||
add_standard_case "0000113511"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world)
|
|
||||||
add_standard_case "0000125124-linux-mesa"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-iterationt-in-world)
|
|
||||||
add_standard_case "0000110538"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world)
|
|
||||||
add_standard_case "0000115019"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-photon-v1.1-in-world)
|
|
||||||
add_standard_case "0000159866"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world)
|
|
||||||
add_standard_case "0000172128"
|
|
||||||
;;
|
|
||||||
minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world)
|
|
||||||
add_standard_case "0000145353"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "unknown trace case: ${case_name}" >&2
|
|
||||||
exit 2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
include="$(IFS=,; echo "${files[*]}")"
|
include="$(IFS=,; echo "${files[*]}")"
|
||||||
if [ "${case_name}" = "OpenRA" ]; then
|
if [ "${case_name}" = "OpenRA" ]; then
|
||||||
|
|||||||
+17
-329
@@ -128,10 +128,25 @@ jobs:
|
|||||||
path: android-plugin/app/build/outputs/apk/*Trace/release/*.apk
|
path: android-plugin/app/build/outputs/apk/*Trace/release/*.apk
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
trace-cases:
|
||||||
|
name: trace case matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
android: ${{ steps.trace-cases.outputs.android }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Load trace cases
|
||||||
|
id: trace-cases
|
||||||
|
run: echo "android=$(python3 tools/trace_replay/trace_cases.py --format github-apk)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
retrace:
|
retrace:
|
||||||
name: retrace (${{ matrix.backend.name }}, ${{ matrix.case.name }})
|
name: retrace (${{ matrix.backend.name }}, ${{ matrix.case.name }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs:
|
||||||
|
- build
|
||||||
|
- trace-cases
|
||||||
timeout-minutes: 75
|
timeout-minutes: 75
|
||||||
env:
|
env:
|
||||||
AVD_NAME: mobilegl-${{ matrix.backend.id }}
|
AVD_NAME: mobilegl-${{ matrix.backend.id }}
|
||||||
@@ -150,334 +165,7 @@ jobs:
|
|||||||
apk: MobileGL-MagmaTrace-release.apk
|
apk: MobileGL-MagmaTrace-release.apk
|
||||||
package: top.mobilegl.plugin.magma.trace
|
package: top.mobilegl.plugin.magma.trace
|
||||||
gpu: lavapipe
|
gpu: lavapipe
|
||||||
case:
|
case: ${{ fromJSON(needs.trace-cases.outputs.android) }}
|
||||||
- name: OpenRA
|
|
||||||
trace_archive: tools/trace_replay/fixtures/openra.tgz
|
|
||||||
trace_file: openra.trace
|
|
||||||
golden: tools/trace_replay/fixtures/openra.0000031249.png
|
|
||||||
target_call: 31249
|
|
||||||
width: 640
|
|
||||||
height: 480
|
|
||||||
crop_x: 1
|
|
||||||
crop_y: 1
|
|
||||||
crop_width: 638
|
|
||||||
crop_height: 478
|
|
||||||
timeout_seconds: 180
|
|
||||||
- name: minecraft-1.21.4-startup
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-startup.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-startup.0000092195.png
|
|
||||||
target_call: 92195
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 180
|
|
||||||
- name: minecraft-1.21.4-main-menu
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-main-menu.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-main-menu.0000481787.png
|
|
||||||
alternate_golden: tools/trace_replay/fixtures/minecraft-1.21.4-main-menu.0000481787-mali.png
|
|
||||||
target_call: 481787
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 180
|
|
||||||
- name: minecraft-1.21.4-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-in-world.0000280000.png
|
|
||||||
target_call: 280000
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-sodium-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-sodium-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-sodium-in-world.0000923340.png
|
|
||||||
target_call: 923340
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 1800
|
|
||||||
- name: minecraft-26.2-main-menu
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-26.2-main-menu.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-26.2-main-menu.0000101926.png
|
|
||||||
target_call: 101926
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 180
|
|
||||||
- name: minecraft-26.2-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-26.2-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-26.2-in-world.0000519370.png
|
|
||||||
target_call: 519370
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-rei-inventory-normal-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-rei-inventory-normal-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-rei-inventory-normal-world.0000734465.png
|
|
||||||
target_call: 734465
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 1800
|
|
||||||
- name: minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world.0000457190.png
|
|
||||||
target_call: 457190
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 10
|
|
||||||
crop_width: 140
|
|
||||||
crop_height: 158
|
|
||||||
timeout_seconds: 1800
|
|
||||||
- name: minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world.0000573061.png
|
|
||||||
target_call: 573061
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 1800
|
|
||||||
- name: minecraft-1.21.4-fabric-journeymap-in-world-normal-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-journeymap-in-world-normal-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-journeymap-in-world-normal-world.0000641975.png
|
|
||||||
target_call: 641975
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 1800
|
|
||||||
- name: minecraft-1.21.4-fabric-modernui-inventory-normal-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-modernui-inventory-normal-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-modernui-inventory-normal-world.0000727926.png
|
|
||||||
target_call: 727926
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 1800
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-bsl-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-bsl-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-bsl-in-world.0000110725.png
|
|
||||||
alternate_golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-bsl-in-world.0000110725-mali.png
|
|
||||||
target_call: 110725
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world.0000095322.png
|
|
||||||
target_call: 95322
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world.0000141559.png
|
|
||||||
target_call: 141559
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-sundial-lite-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-sundial-lite-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-sundial-lite-in-world.0000150023.png
|
|
||||||
target_call: 150023
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world.0000151297.png
|
|
||||||
target_call: 151297
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-complementary-unbound-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-complementary-unbound-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-complementary-unbound-in-world.0000146559.png
|
|
||||||
target_call: 146559
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-mellow-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-mellow-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-mellow-in-world.0000096143.png
|
|
||||||
target_call: 96143
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-nostalgia-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-nostalgia-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-nostalgia-in-world.0000153808-linux-mesa.png
|
|
||||||
alternate_golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-nostalgia-in-world.0000153808.png
|
|
||||||
target_call: 153808
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-bliss-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-bliss-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-bliss-in-world.0000113511.png
|
|
||||||
target_call: 113511
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world.0000125124-linux-mesa.png
|
|
||||||
target_call: 125124
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-iterationt-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-iterationt-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-iterationt-in-world.0000110538.png
|
|
||||||
target_call: 110538
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world.0000115019.png
|
|
||||||
target_call: 115019
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-photon-v1.1-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-photon-v1.1-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-photon-v1.1-in-world.0000159866.png
|
|
||||||
target_call: 159866
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world.0000172128.png
|
|
||||||
target_call: 172128
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
- name: minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world
|
|
||||||
trace_archive: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world.tgz
|
|
||||||
trace_file: trace.trace
|
|
||||||
golden: tools/trace_replay/fixtures/minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world.0000145353.png
|
|
||||||
target_call: 145353
|
|
||||||
width: 854
|
|
||||||
height: 480
|
|
||||||
crop_x: 0
|
|
||||||
crop_y: 0
|
|
||||||
crop_width: 0
|
|
||||||
crop_height: 0
|
|
||||||
timeout_seconds: 900
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
+15
-28
@@ -329,12 +329,26 @@ jobs:
|
|||||||
path: ci-artifacts/mobilegl-trace-replay.tgz
|
path: ci-artifacts/mobilegl-trace-replay.tgz
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
trace-cases:
|
||||||
|
name: trace case matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
names: ${{ steps.trace-cases.outputs.names }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Load trace cases
|
||||||
|
id: trace-cases
|
||||||
|
run: echo "names=$(python3 tools/trace_replay/trace_cases.py --format names)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
retrace:
|
retrace:
|
||||||
name: retrace (${{ matrix.backend }}, ${{ matrix.case }})
|
name: retrace (${{ matrix.backend }}, ${{ matrix.case }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build-linux
|
- build-linux
|
||||||
- build-retrace
|
- build-retrace
|
||||||
|
- trace-cases
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 4
|
max-parallel: 4
|
||||||
@@ -342,34 +356,7 @@ jobs:
|
|||||||
backend:
|
backend:
|
||||||
- DirectGLES
|
- DirectGLES
|
||||||
- DirectVulkan
|
- DirectVulkan
|
||||||
case:
|
case: ${{ fromJSON(needs.trace-cases.outputs.names) }}
|
||||||
- OpenRA
|
|
||||||
- minecraft-1.21.4-startup
|
|
||||||
- minecraft-1.21.4-main-menu
|
|
||||||
- minecraft-1.21.4-in-world
|
|
||||||
- minecraft-1.21.4-fabric-sodium-in-world
|
|
||||||
- minecraft-26.2-main-menu
|
|
||||||
- minecraft-26.2-in-world
|
|
||||||
- minecraft-1.21.4-fabric-rei-inventory-normal-world
|
|
||||||
- minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world
|
|
||||||
- minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world
|
|
||||||
- minecraft-1.21.4-fabric-journeymap-in-world-normal-world
|
|
||||||
- minecraft-1.21.4-fabric-modernui-inventory-normal-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-bsl-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-sundial-lite-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-complementary-unbound-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-mellow-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-nostalgia-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-bliss-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-iterationt-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-photon-v1.1-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world
|
|
||||||
- minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
|
|||||||
@@ -360,322 +360,12 @@ function(add_trace_replay_test_for_backends CASE_NAME)
|
|||||||
add_trace_replay_test(${CASE_NAME} DirectVulkan ${ARGN})
|
add_trace_replay_test(${CASE_NAME} DirectVulkan ${ARGN})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(OpenRA
|
set(MOBILEGL_TRACE_CASES_CMAKE "${CMAKE_CURRENT_BINARY_DIR}/trace_cases.cmake")
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/openra.tgz
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${MOBILEGL_TRACE_ROOT}/trace_cases.json")
|
||||||
TRACE_FILE openra.trace
|
execute_process(
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/openra.0000031249.png
|
COMMAND ${Python3_EXECUTABLE} "${MOBILEGL_TRACE_ROOT}/trace_cases.py"
|
||||||
TARGET_CALL 31249
|
--format cmake
|
||||||
WIDTH 640
|
--fixture-root "${MOBILEGL_TRACE_ROOT}/fixtures"
|
||||||
HEIGHT 480
|
OUTPUT_FILE "${MOBILEGL_TRACE_CASES_CMAKE}"
|
||||||
CROP_X 1
|
COMMAND_ERROR_IS_FATAL ANY)
|
||||||
CROP_Y 1
|
include("${MOBILEGL_TRACE_CASES_CMAKE}")
|
||||||
CROP_WIDTH 638
|
|
||||||
CROP_HEIGHT 478
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-startup
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-startup.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-startup.0000092195.png
|
|
||||||
TARGET_CALL 92195
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-main-menu
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-main-menu.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-main-menu.0000481787.png
|
|
||||||
ALTERNATE_GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-main-menu.0000481787-mali.png
|
|
||||||
TARGET_CALL 481787
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-in-world.0000280000.png
|
|
||||||
TARGET_CALL 280000
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-sodium-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-sodium-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-sodium-in-world.0000923340.png
|
|
||||||
TARGET_CALL 923340
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-26.2-main-menu
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-26.2-main-menu.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-26.2-main-menu.0000101926.png
|
|
||||||
TARGET_CALL 101926
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-26.2-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-26.2-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-26.2-in-world.0000519370.png
|
|
||||||
TARGET_CALL 519370
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-common-mods-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-common-mods-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-common-mods-in-world.0000522084.png
|
|
||||||
TARGET_CALL 522084
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-common-mods-inventory
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-common-mods-inventory.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-common-mods-inventory.0000728558.png
|
|
||||||
TARGET_CALL 728558
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-rei-inventory
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-rei-inventory.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-rei-inventory.0005431826.png
|
|
||||||
TARGET_CALL 5431826
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-xaero-minimap-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-xaero-minimap-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-xaero-minimap-in-world.0002553500.png
|
|
||||||
TARGET_CALL 2553500
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
CROP_X 0
|
|
||||||
CROP_Y 10
|
|
||||||
CROP_WIDTH 140
|
|
||||||
CROP_HEIGHT 158
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-xaero-world-map-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-xaero-world-map-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-xaero-world-map-in-world.0001598209.png
|
|
||||||
TARGET_CALL 1598209
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-journeymap-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-journeymap-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-journeymap-in-world.0002632392.png
|
|
||||||
TARGET_CALL 2632392
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-modernui-inventory
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-modernui-inventory.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-modernui-inventory.0004907381.png
|
|
||||||
TARGET_CALL 4907381
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-rei-inventory-normal-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-rei-inventory-normal-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-rei-inventory-normal-world.0000734465.png
|
|
||||||
TARGET_CALL 734465
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world.0000457190.png
|
|
||||||
TARGET_CALL 457190
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
CROP_X 0
|
|
||||||
CROP_Y 10
|
|
||||||
CROP_WIDTH 140
|
|
||||||
CROP_HEIGHT 158
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world.0000573061.png
|
|
||||||
TARGET_CALL 573061
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-journeymap-in-world-normal-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-journeymap-in-world-normal-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-journeymap-in-world-normal-world.0000641975.png
|
|
||||||
TARGET_CALL 641975
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-modernui-inventory-normal-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-modernui-inventory-normal-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-modernui-inventory-normal-world.0000727926.png
|
|
||||||
TARGET_CALL 727926
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-bsl-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-bsl-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-bsl-in-world.0000110725.png
|
|
||||||
TARGET_CALL 110725
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world.0000095322.png
|
|
||||||
TARGET_CALL 95322
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world.0000141559.png
|
|
||||||
TARGET_CALL 141559
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-sundial-lite-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-sundial-lite-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-sundial-lite-in-world.0000150023.png
|
|
||||||
TARGET_CALL 150023
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world.0000151297.png
|
|
||||||
TARGET_CALL 151297
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-complementary-unbound-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-complementary-unbound-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-complementary-unbound-in-world.0000146559.png
|
|
||||||
TARGET_CALL 146559
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-mellow-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-mellow-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-mellow-in-world.0000096143.png
|
|
||||||
TARGET_CALL 96143
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-nostalgia-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-nostalgia-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-nostalgia-in-world.0000153808-linux-mesa.png
|
|
||||||
ALTERNATE_GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-nostalgia-in-world.0000153808.png
|
|
||||||
TARGET_CALL 153808
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-bliss-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-bliss-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-bliss-in-world.0000113511.png
|
|
||||||
TARGET_CALL 113511
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world.0000125124-linux-mesa.png
|
|
||||||
TARGET_CALL 125124
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-iterationt-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-iterationt-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-iterationt-in-world.0000110538.png
|
|
||||||
TARGET_CALL 110538
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world.0000115019.png
|
|
||||||
TARGET_CALL 115019
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-photon-v1.1-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-photon-v1.1-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-photon-v1.1-in-world.0000159866.png
|
|
||||||
TARGET_CALL 159866
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world.0000172128.png
|
|
||||||
TARGET_CALL 172128
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
|
|
||||||
add_trace_replay_test_for_backends(minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world
|
|
||||||
TRACE_ARCHIVE ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world.tgz
|
|
||||||
TRACE_FILE trace.trace
|
|
||||||
GOLDEN ${MOBILEGL_TRACE_ROOT}/fixtures/minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world.0000145353.png
|
|
||||||
TARGET_CALL 145353
|
|
||||||
WIDTH 854
|
|
||||||
HEIGHT 480
|
|
||||||
)
|
|
||||||
@@ -1,41 +1,15 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
import { createWriteStream } from "node:fs";
|
import { createWriteStream, readFileSync } from "node:fs";
|
||||||
import { mkdir, readdir, readFile, stat } from "node:fs/promises";
|
import { mkdir, readdir, readFile, stat } from "node:fs/promises";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
const BACKENDS = ["DirectGLES", "DirectVulkan"];
|
const BACKENDS = ["DirectGLES", "DirectVulkan"];
|
||||||
const DEFAULT_FIXTURE_ROOT = path.join(path.dirname(fileURLToPath(import.meta.url)), "fixtures");
|
const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
|
||||||
const CASES = [
|
const DEFAULT_FIXTURE_ROOT = path.join(SCRIPT_DIR, "fixtures");
|
||||||
"OpenRA",
|
const TRACE_CASES = JSON.parse(readFileSync(path.join(SCRIPT_DIR, "trace_cases.json"), "utf8"));
|
||||||
"minecraft-1.21.4-startup",
|
const CASES = TRACE_CASES.cases.map((traceCase) => traceCase.name);
|
||||||
"minecraft-1.21.4-main-menu",
|
|
||||||
"minecraft-1.21.4-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-sodium-in-world",
|
|
||||||
"minecraft-26.2-main-menu",
|
|
||||||
"minecraft-26.2-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-rei-inventory-normal-world",
|
|
||||||
"minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world",
|
|
||||||
"minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world",
|
|
||||||
"minecraft-1.21.4-fabric-journeymap-in-world-normal-world",
|
|
||||||
"minecraft-1.21.4-fabric-modernui-inventory-normal-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-bsl-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-sundial-lite-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-complementary-unbound-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-mellow-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-nostalgia-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-bliss-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-iterationt-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-photon-v1.1-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world",
|
|
||||||
"minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world",
|
|
||||||
];
|
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
console.error(`Usage:
|
console.error(`Usage:
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from trace_cases import case_with_defaults, load_trace_cases
|
||||||
|
|
||||||
|
|
||||||
ROOT = Path(__file__).resolve().parents[2]
|
ROOT = Path(__file__).resolve().parents[2]
|
||||||
FIXTURES = ROOT / "tools" / "trace_replay" / "fixtures"
|
FIXTURES = ROOT / "tools" / "trace_replay" / "fixtures"
|
||||||
@@ -29,55 +31,7 @@ BACKENDS = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
CASES = [
|
CASES = load_trace_cases()
|
||||||
{
|
|
||||||
"name": "OpenRA",
|
|
||||||
"trace_archive": "openra.tgz",
|
|
||||||
"trace_file": "openra.trace",
|
|
||||||
"golden": "openra.0000031249.png",
|
|
||||||
"target_call": 31249,
|
|
||||||
"width": 640,
|
|
||||||
"height": 480,
|
|
||||||
"crop_x": 1,
|
|
||||||
"crop_y": 1,
|
|
||||||
"crop_width": 638,
|
|
||||||
"crop_height": 478,
|
|
||||||
"timeout_seconds": 180,
|
|
||||||
},
|
|
||||||
{"name": "minecraft-1.21.4-startup", "golden": "minecraft-1.21.4-startup.0000092195.png", "target_call": 92195, "timeout_seconds": 180},
|
|
||||||
{"name": "minecraft-1.21.4-main-menu", "golden": "minecraft-1.21.4-main-menu.0000481787.png", "alternate_golden": "minecraft-1.21.4-main-menu.0000481787-mali.png", "target_call": 481787, "timeout_seconds": 180},
|
|
||||||
{"name": "minecraft-1.21.4-in-world", "golden": "minecraft-1.21.4-in-world.0000280000.png", "target_call": 280000, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-sodium-in-world", "golden": "minecraft-1.21.4-fabric-sodium-in-world.0000923340.png", "target_call": 923340, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-26.2-main-menu", "golden": "minecraft-26.2-main-menu.0000101926.png", "target_call": 101926, "timeout_seconds": 180},
|
|
||||||
{"name": "minecraft-26.2-in-world", "golden": "minecraft-26.2-in-world.0000519370.png", "target_call": 519370, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-common-mods-in-world", "golden": "minecraft-1.21.4-fabric-common-mods-in-world.0000522084.png", "target_call": 522084, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-common-mods-inventory", "golden": "minecraft-1.21.4-fabric-common-mods-inventory.0000728558.png", "target_call": 728558, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-rei-inventory", "golden": "minecraft-1.21.4-fabric-rei-inventory.0005431826.png", "target_call": 5431826, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-xaero-minimap-in-world", "golden": "minecraft-1.21.4-fabric-xaero-minimap-in-world.0002553500.png", "target_call": 2553500, "crop_y": 10, "crop_width": 140, "crop_height": 158, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-xaero-world-map-in-world", "golden": "minecraft-1.21.4-fabric-xaero-world-map-in-world.0001598209.png", "target_call": 1598209, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-journeymap-in-world", "golden": "minecraft-1.21.4-fabric-journeymap-in-world.0002632392.png", "target_call": 2632392, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-modernui-inventory", "golden": "minecraft-1.21.4-fabric-modernui-inventory.0004907381.png", "target_call": 4907381, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-rei-inventory-normal-world", "golden": "minecraft-1.21.4-fabric-rei-inventory-normal-world.0000734465.png", "target_call": 734465, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world", "golden": "minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world.0000457190.png", "target_call": 457190, "crop_y": 10, "crop_width": 140, "crop_height": 158, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world", "golden": "minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world.0000573061.png", "target_call": 573061, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-journeymap-in-world-normal-world", "golden": "minecraft-1.21.4-fabric-journeymap-in-world-normal-world.0000641975.png", "target_call": 641975, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-modernui-inventory-normal-world", "golden": "minecraft-1.21.4-fabric-modernui-inventory-normal-world.0000727926.png", "target_call": 727926, "timeout_seconds": 1800},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-bsl-in-world", "golden": "minecraft-1.21.4-fabric-iris-bsl-in-world.0000110725.png", "alternate_golden": "minecraft-1.21.4-fabric-iris-bsl-in-world.0000110725-mali.png", "target_call": 110725, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world", "golden": "minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world.0000095322.png", "target_call": 95322, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world", "golden": "minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world.0000141559.png", "target_call": 141559, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-sundial-lite-in-world", "golden": "minecraft-1.21.4-fabric-iris-sundial-lite-in-world.0000150023.png", "target_call": 150023, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world", "golden": "minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world.0000151297.png", "target_call": 151297, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-complementary-unbound-in-world", "golden": "minecraft-1.21.4-fabric-iris-complementary-unbound-in-world.0000146559.png", "target_call": 146559, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-mellow-in-world", "golden": "minecraft-1.21.4-fabric-iris-mellow-in-world.0000096143.png", "target_call": 96143, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-nostalgia-in-world", "golden": "minecraft-1.21.4-fabric-iris-nostalgia-in-world.0000153808-linux-mesa.png", "alternate_golden": "minecraft-1.21.4-fabric-iris-nostalgia-in-world.0000153808.png", "target_call": 153808, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-bliss-in-world", "golden": "minecraft-1.21.4-fabric-iris-bliss-in-world.0000113511.png", "target_call": 113511, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world", "golden": "minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world.0000125124-linux-mesa.png", "target_call": 125124, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-iterationt-in-world", "golden": "minecraft-1.21.4-fabric-iris-iterationt-in-world.0000110538.png", "target_call": 110538, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world", "golden": "minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world.0000115019.png", "target_call": 115019, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-photon-v1.1-in-world", "golden": "minecraft-1.21.4-fabric-iris-photon-v1.1-in-world.0000159866.png", "target_call": 159866, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world", "golden": "minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world.0000172128.png", "target_call": 172128, "timeout_seconds": 900},
|
|
||||||
{"name": "minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world", "golden": "minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world.0000145353.png", "target_call": 145353, "timeout_seconds": 900},
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def safe_case(name):
|
def safe_case(name):
|
||||||
@@ -95,23 +49,6 @@ def bash_path(path):
|
|||||||
return "/" + drive + "/" + "/".join(parts)
|
return "/" + drive + "/" + "/".join(parts)
|
||||||
|
|
||||||
|
|
||||||
def case_with_defaults(case):
|
|
||||||
merged = {
|
|
||||||
"trace_archive": f"{case['name']}.tgz",
|
|
||||||
"trace_file": "trace.trace",
|
|
||||||
"width": 854,
|
|
||||||
"height": 480,
|
|
||||||
"ssim_threshold": "0.99",
|
|
||||||
"crop_x": 0,
|
|
||||||
"crop_y": 0,
|
|
||||||
"crop_width": 0,
|
|
||||||
"crop_height": 0,
|
|
||||||
"timeout_seconds": 900,
|
|
||||||
}
|
|
||||||
merged.update(case)
|
|
||||||
return merged
|
|
||||||
|
|
||||||
|
|
||||||
def mark_skipped(case, backend, reason):
|
def mark_skipped(case, backend, reason):
|
||||||
result_dir = RESULT_ROOT / f"{safe_case(case['name'])}-{backend}"
|
result_dir = RESULT_ROOT / f"{safe_case(case['name'])}-{backend}"
|
||||||
result_dir.mkdir(parents=True, exist_ok=True)
|
result_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|||||||
@@ -0,0 +1,252 @@
|
|||||||
|
{
|
||||||
|
"defaults": {
|
||||||
|
"trace_file": "trace.trace",
|
||||||
|
"width": 854,
|
||||||
|
"height": 480,
|
||||||
|
"ssim_threshold": 0.99,
|
||||||
|
"crop_x": 0,
|
||||||
|
"crop_y": 0,
|
||||||
|
"crop_width": 0,
|
||||||
|
"crop_height": 0,
|
||||||
|
"timeout_seconds": 900
|
||||||
|
},
|
||||||
|
"cases": [
|
||||||
|
{
|
||||||
|
"name": "OpenRA",
|
||||||
|
"trace_archive": "openra.tgz",
|
||||||
|
"trace_file": "openra.trace",
|
||||||
|
"golden": "openra.0000031249.png",
|
||||||
|
"target_call": 31249,
|
||||||
|
"width": 640,
|
||||||
|
"height": 480,
|
||||||
|
"crop_x": 1,
|
||||||
|
"crop_y": 1,
|
||||||
|
"crop_width": 638,
|
||||||
|
"crop_height": 478,
|
||||||
|
"timeout_seconds": 180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-startup",
|
||||||
|
"trace_archive": "minecraft-1.21.4-startup.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-startup.0000092195.png",
|
||||||
|
"target_call": 92195,
|
||||||
|
"timeout_seconds": 180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-main-menu",
|
||||||
|
"trace_archive": "minecraft-1.21.4-main-menu.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-main-menu.0000481787.png",
|
||||||
|
"alternate_golden": "minecraft-1.21.4-main-menu.0000481787-mali.png",
|
||||||
|
"target_call": 481787,
|
||||||
|
"timeout_seconds": 180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-in-world.0000280000.png",
|
||||||
|
"target_call": 280000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-sodium-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-sodium-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-sodium-in-world.0000923340.png",
|
||||||
|
"target_call": 923340,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-26.2-main-menu",
|
||||||
|
"trace_archive": "minecraft-26.2-main-menu.tgz",
|
||||||
|
"golden": "minecraft-26.2-main-menu.0000101926.png",
|
||||||
|
"target_call": 101926,
|
||||||
|
"timeout_seconds": 180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-26.2-in-world",
|
||||||
|
"trace_archive": "minecraft-26.2-in-world.tgz",
|
||||||
|
"golden": "minecraft-26.2-in-world.0000519370.png",
|
||||||
|
"target_call": 519370
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-common-mods-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-common-mods-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-common-mods-in-world.0000522084.png",
|
||||||
|
"target_call": 522084,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-common-mods-inventory",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-common-mods-inventory.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-common-mods-inventory.0000728558.png",
|
||||||
|
"target_call": 728558,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-rei-inventory",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-rei-inventory.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-rei-inventory.0005431826.png",
|
||||||
|
"target_call": 5431826,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-xaero-minimap-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-xaero-minimap-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-xaero-minimap-in-world.0002553500.png",
|
||||||
|
"target_call": 2553500,
|
||||||
|
"crop_y": 10,
|
||||||
|
"crop_width": 140,
|
||||||
|
"crop_height": 158,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-xaero-world-map-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-xaero-world-map-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-xaero-world-map-in-world.0001598209.png",
|
||||||
|
"target_call": 1598209,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-journeymap-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-journeymap-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-journeymap-in-world.0002632392.png",
|
||||||
|
"target_call": 2632392,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-modernui-inventory",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-modernui-inventory.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-modernui-inventory.0004907381.png",
|
||||||
|
"target_call": 4907381,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-rei-inventory-normal-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-rei-inventory-normal-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-rei-inventory-normal-world.0000734465.png",
|
||||||
|
"target_call": 734465,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-xaero-minimap-in-world-normal-world.0000457190.png",
|
||||||
|
"target_call": 457190,
|
||||||
|
"crop_y": 10,
|
||||||
|
"crop_width": 140,
|
||||||
|
"crop_height": 158,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-xaero-world-map-in-world-normal-world.0000573061.png",
|
||||||
|
"target_call": 573061,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-journeymap-in-world-normal-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-journeymap-in-world-normal-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-journeymap-in-world-normal-world.0000641975.png",
|
||||||
|
"target_call": 641975,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-modernui-inventory-normal-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-modernui-inventory-normal-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-modernui-inventory-normal-world.0000727926.png",
|
||||||
|
"target_call": 727926,
|
||||||
|
"timeout_seconds": 1800
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-bsl-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-bsl-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-bsl-in-world.0000110725.png",
|
||||||
|
"alternate_golden": "minecraft-1.21.4-fabric-iris-bsl-in-world.0000110725-mali.png",
|
||||||
|
"target_call": 110725
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-makeup-ultrafast-in-world.0000095322.png",
|
||||||
|
"target_call": 95322
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-super-duper-vanilla-in-world.0000141559.png",
|
||||||
|
"target_call": 141559
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-sundial-lite-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-sundial-lite-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-sundial-lite-in-world.0000150023.png",
|
||||||
|
"target_call": 150023
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-complementary-reimagined-in-world.0000151297.png",
|
||||||
|
"target_call": 151297
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-complementary-unbound-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-complementary-unbound-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-complementary-unbound-in-world.0000146559.png",
|
||||||
|
"target_call": 146559
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-mellow-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-mellow-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-mellow-in-world.0000096143.png",
|
||||||
|
"target_call": 96143
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-nostalgia-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-nostalgia-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-nostalgia-in-world.0000153808-linux-mesa.png",
|
||||||
|
"alternate_golden": "minecraft-1.21.4-fabric-iris-nostalgia-in-world.0000153808.png",
|
||||||
|
"target_call": 153808
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-bliss-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-bliss-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-bliss-in-world.0000113511.png",
|
||||||
|
"target_call": 113511
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-chocapic-v6-lite-in-world.0000125124-linux-mesa.png",
|
||||||
|
"target_call": 125124
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-iterationt-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-iterationt-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-iterationt-in-world.0000110538.png",
|
||||||
|
"target_call": 110538
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-iterationt-nodsa-in-world.0000115019.png",
|
||||||
|
"target_call": 115019
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-photon-v1.1-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-photon-v1.1-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-photon-v1.1-in-world.0000159866.png",
|
||||||
|
"target_call": 159866
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-photon-v1.3b-in-world.0000172128.png",
|
||||||
|
"target_call": 172128
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world",
|
||||||
|
"trace_archive": "minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world.tgz",
|
||||||
|
"golden": "minecraft-1.21.4-fabric-iris-derivative-main-d24.4.14-in-world.0000145353.png",
|
||||||
|
"target_call": 145353
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
TRACE_CASES_JSON = Path(__file__).with_name("trace_cases.json")
|
||||||
|
|
||||||
|
|
||||||
|
def load_trace_case_manifest(path=TRACE_CASES_JSON):
|
||||||
|
with Path(path).open("r", encoding="utf-8") as file:
|
||||||
|
manifest = json.load(file)
|
||||||
|
defaults = manifest.get("defaults", {})
|
||||||
|
cases = []
|
||||||
|
seen = set()
|
||||||
|
for case in manifest.get("cases", []):
|
||||||
|
merged = {**defaults, **case}
|
||||||
|
name = merged.get("name")
|
||||||
|
if not name:
|
||||||
|
raise ValueError("trace case is missing name")
|
||||||
|
if name in seen:
|
||||||
|
raise ValueError(f"duplicate trace case: {name}")
|
||||||
|
seen.add(name)
|
||||||
|
for key in ("trace_archive", "trace_file", "golden", "target_call", "width", "height"):
|
||||||
|
if key not in merged:
|
||||||
|
raise ValueError(f"{key} is required for {name}")
|
||||||
|
cases.append(merged)
|
||||||
|
return {"defaults": defaults, "cases": cases}
|
||||||
|
|
||||||
|
|
||||||
|
def load_trace_cases(path=TRACE_CASES_JSON):
|
||||||
|
return load_trace_case_manifest(path)["cases"]
|
||||||
|
|
||||||
|
|
||||||
|
def case_with_defaults(case):
|
||||||
|
return dict(case)
|
||||||
|
|
||||||
|
|
||||||
|
def trace_case_names(path=TRACE_CASES_JSON):
|
||||||
|
return [case["name"] for case in load_trace_cases(path)]
|
||||||
|
|
||||||
|
|
||||||
|
def find_trace_case(name, path=TRACE_CASES_JSON):
|
||||||
|
for case in load_trace_cases(path):
|
||||||
|
if case["name"] == name:
|
||||||
|
return case
|
||||||
|
raise KeyError(name)
|
||||||
|
|
||||||
|
|
||||||
|
def fixture_files(case, fixture_root):
|
||||||
|
root = fixture_root.rstrip("/\\")
|
||||||
|
files = [
|
||||||
|
f"{root}/{case['trace_archive']}",
|
||||||
|
f"{root}/{case['golden']}",
|
||||||
|
]
|
||||||
|
if case.get("alternate_golden"):
|
||||||
|
files.append(f"{root}/{case['alternate_golden']}")
|
||||||
|
return files
|
||||||
|
|
||||||
|
|
||||||
|
def github_apk_case(case):
|
||||||
|
result = dict(case)
|
||||||
|
for key in ("trace_archive", "golden", "alternate_golden"):
|
||||||
|
if result.get(key):
|
||||||
|
result[key] = f"tools/trace_replay/fixtures/{result[key]}"
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def cmake_quote(value):
|
||||||
|
return '"' + str(value).replace("\\", "/").replace('"', '\\"') + '"'
|
||||||
|
|
||||||
|
|
||||||
|
def emit_cmake(cases, fixture_root):
|
||||||
|
root = fixture_root.rstrip("/\\")
|
||||||
|
lines = ["# Generated from tools/trace_replay/trace_cases.json.", ""]
|
||||||
|
keys = [
|
||||||
|
("TRACE_ARCHIVE", "trace_archive", True),
|
||||||
|
("TRACE_FILE", "trace_file", False),
|
||||||
|
("GOLDEN", "golden", True),
|
||||||
|
("ALTERNATE_GOLDEN", "alternate_golden", True),
|
||||||
|
("TARGET_CALL", "target_call", False),
|
||||||
|
("WIDTH", "width", False),
|
||||||
|
("HEIGHT", "height", False),
|
||||||
|
("SSIM_THRESHOLD", "ssim_threshold", False),
|
||||||
|
("CROP_X", "crop_x", False),
|
||||||
|
("CROP_Y", "crop_y", False),
|
||||||
|
("CROP_WIDTH", "crop_width", False),
|
||||||
|
("CROP_HEIGHT", "crop_height", False),
|
||||||
|
]
|
||||||
|
for case in cases:
|
||||||
|
lines.append(f"add_trace_replay_test_for_backends({cmake_quote(case['name'])}")
|
||||||
|
for cmake_key, json_key, fixture_path in keys:
|
||||||
|
value = case.get(json_key)
|
||||||
|
if value is None or value == "":
|
||||||
|
continue
|
||||||
|
if fixture_path:
|
||||||
|
value = f"{root}/{value}"
|
||||||
|
lines.append(f" {cmake_key} {cmake_quote(value)}")
|
||||||
|
lines.append(")")
|
||||||
|
lines.append("")
|
||||||
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
|
||||||
|
def parse_args():
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument("--case", dest="case_name", help="Trace case name.")
|
||||||
|
parser.add_argument("--fixture-root", default="tools/trace_replay/fixtures")
|
||||||
|
parser.add_argument(
|
||||||
|
"--format",
|
||||||
|
choices=("names", "github-apk", "fixture-files", "cmake"),
|
||||||
|
default="names",
|
||||||
|
)
|
||||||
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
args = parse_args()
|
||||||
|
cases = load_trace_cases()
|
||||||
|
if args.format == "names":
|
||||||
|
print(json.dumps([case["name"] for case in cases], separators=(",", ":")))
|
||||||
|
elif args.format == "github-apk":
|
||||||
|
print(json.dumps([github_apk_case(case) for case in cases], separators=(",", ":")))
|
||||||
|
elif args.format == "fixture-files":
|
||||||
|
if not args.case_name:
|
||||||
|
print("--case is required for --format fixture-files", file=sys.stderr)
|
||||||
|
return 2
|
||||||
|
try:
|
||||||
|
case = find_trace_case(args.case_name)
|
||||||
|
except KeyError:
|
||||||
|
print(f"unknown trace case: {args.case_name}", file=sys.stderr)
|
||||||
|
return 2
|
||||||
|
print("\n".join(fixture_files(case, args.fixture_root)))
|
||||||
|
elif args.format == "cmake":
|
||||||
|
print(emit_cmake(cases, args.fixture_root))
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
Reference in New Issue
Block a user