Skip to content

Instantly share code, notes, and snippets.

@atyuwen
atyuwen / opt_fsr.fxh
Last active April 7, 2025 08:24
An optimized AMD FSR implementation for Mobiles
//==============================================================================================================================
// An optimized AMD FSR 1.0 implementation for Mobiles
// EASU and RCAS are combined in a single pass.
// Based on https://github.com/GPUOpen-Effects/FidelityFX-FSR/blob/master/ffx-fsr/ffx_fsr1.h
// Details can be found: https://atyuwen.github.io/posts/optimizing-fsr/
// Distributed under the MIT License. Copyright (c) 2021 atyuwen.
// -- FsrEasuSampleH should be implemented by calling shader, like following:
// AH3 FsrEasuSampleH(AF2 p) { return MyTex.SampleLevel(LinearSampler, p, 0).xyz; }
//==============================================================================================================================
void FsrMobile(
require 'optimist'
require 'plist'
# Setups of source path mapping for the framework at framework_path,
# which has a dsym at dsym_path. It maps the source paths to the
# source_path root. Implementation borrowed from https://medium.com/@maxraskin/background-1b4b6a9c65be
def setup_dsym_source_mapping(framework_path, dsym_path, source_path)
binary_uuids = get_uuids_of_dwarf(framework_path)
dsym_uuids = get_uuids_of_dwarf(dsym_path)
verify_uuids(binary_uuids, dsym_uuids)
"""
Prerequisites:
$ pip install biplist
$ pip install requests
Usage:
python dsym_symbolizer.py --dsym_url https://www.example.com/MyStuff.framework.dSYM.zip \
--source_path /Users/MeMySelfAndI/MyStuffSources \
--binary_path /Users/MeMySelfAndI/MyProject/Pods/MyStuff/MyStuff.framework
"""