mirror of
https://github.com/patchzyy/wiicompiled
synced 2026-10-24 23:06:39 -04:00
279ce8328f
* macos: add x86_64 Intel support * (feat) Apple Silicon macOS CI building and Setup.pkg documentation (#118) * docs(macos): document Setup.pkg installation Add Apple Silicon macOS CI coverage for runtime configuration, substrate tests, and Setup.pkg packaging alongside the macOS installation instructions. * macos: pin Apple Silicon deployment target * fix(macos): restore Retro Rewind local builds * macos: package universal setup tools * ci: build macOS input expression tests * runtime: Do not force 14.0 minimum anymore new minimum is 12.0 * macos: support older libc++ algorithms * macos: allow undefined MTLLogStateDescriptor for older SDKs * tests: deflake input expression timing window test * build: Fix mac tests * translator: emit null statement after continuation labels for C++17 compatibility * feat(macos): add MetalFX spatial upscaling * Fix automatic music muting on macOS Co-Authored-By: Michael G <10155689+DarthMDev@users.noreply.github.com> Co-Authored-By: Daan Vervacke <23398694+DaanVervacke@users.noreply.github.com> * Address CodeRabbit review comments and integrate upstream TLS cmake * Remove version requirement for running package CI Co-Authored-By: Michael G <10155689+DarthMDev@users.noreply.github.com> * publish-app: fix dependency discovery from build dir, handle spaces in paths, and fail on missing deps * publish-app: preserve subdirectory suffix during @rpath dependency lookup * cmake: synchronize CMAKE_SYSTEM_PROCESSOR with CMAKE_OSX_ARCHITECTURES on macOS * fix rpaths --------- Co-authored-by: DarthM <mgracer48@yahoo.com> Co-authored-by: Michael G <10155689+DarthMDev@users.noreply.github.com> Co-authored-by: Daan Vervacke <23398694+DaanVervacke@users.noreply.github.com> Co-authored-by: patchzyy <64382339+patchzyy@users.noreply.github.com>
42 lines
1.4 KiB
C++
42 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include <webgpu/webgpu_cpp.h>
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
namespace aurora::webgpu::metalfx {
|
|
struct Size {
|
|
uint32_t inputWidth;
|
|
uint32_t inputHeight;
|
|
uint32_t outputWidth;
|
|
uint32_t outputHeight;
|
|
wgpu::TextureFormat format;
|
|
|
|
bool operator==(const Size&) const = default;
|
|
};
|
|
|
|
// All methods except supported() belong to the serialized frame encoder.
|
|
// GPU ownership is explicit: begin_input -> submit input -> upscale ->
|
|
// submit output consumption -> end_output. Neither texture may be used by
|
|
// Dawn outside its access interval. Destruction retires in-flight resources.
|
|
class SpatialScaler {
|
|
public:
|
|
virtual ~SpatialScaler() = default;
|
|
virtual const wgpu::TextureView& input_view() const = 0;
|
|
virtual const wgpu::TextureView& output_view() const = 0;
|
|
virtual const wgpu::Texture& output_texture() const = 0;
|
|
virtual bool begin_input() = 0;
|
|
virtual bool upscale() = 0;
|
|
virtual bool end_output() = 0;
|
|
virtual const std::string& error() const = 0;
|
|
};
|
|
|
|
bool supported(const wgpu::Device& device, wgpu::BackendType backend);
|
|
// A null result with no error means the bounded retirement pool is busy;
|
|
// skip upscaling for this frame and retry at a later frame boundary.
|
|
std::unique_ptr<SpatialScaler> create(const wgpu::Instance& instance,
|
|
const wgpu::Device& device, const Size& size,
|
|
std::string& error);
|
|
} // namespace aurora::webgpu::metalfx
|