mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 13:48:40 +00:00
* Initial implementation * Fix for crash caused by stale stages data; cosmetics applied * Someone mentioned the assert * Async blob writer * Fix for memory leak * Remain stuff * Async changed to `packaged_task`
36 lines
896 B
C++
36 lines
896 B
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <boost/container/set.hpp>
|
|
#include <boost/container/small_vector.hpp>
|
|
#include "common/types.h"
|
|
|
|
namespace Serialization {
|
|
struct Archive;
|
|
}
|
|
|
|
namespace Shader {
|
|
|
|
using PFN_SrtWalker = void PS4_SYSV_ABI (*)(const u32* /*user_data*/, u32* /*flat_dst*/);
|
|
PFN_SrtWalker RegisterWalkerCode(const u8* ptr, size_t size);
|
|
|
|
struct PersistentSrtInfo {
|
|
// Special case when fetch shader uses step rates.
|
|
struct SrtSharpReservation {
|
|
u32 sgpr_base;
|
|
u32 dword_offset;
|
|
u32 num_dwords;
|
|
};
|
|
|
|
PFN_SrtWalker walker_func{};
|
|
size_t walker_func_size{};
|
|
u32 flattened_bufsize_dw = 16; // NumUserDataRegs
|
|
|
|
void Serialize(Serialization::Archive& ar) const;
|
|
bool Deserialize(Serialization::Archive& ar);
|
|
};
|
|
|
|
} // namespace Shader
|