mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-07 19:23:14 +00:00
Tessellation (#1528)
* shader_recompiler: Tessellation WIP * fix compiler errors after merge DONT MERGE set log file to /dev/null DONT MERGE linux pthread bb fix save work DONT MERGE dump ir save more work fix mistake with ES shader skip list add input patch control points dynamic state random stuff * WIP Tessellation partial implementation. Squash commits * test: make local/tcs use attr arrays * attr arrays in TCS/TES * dont define empty attr arrays * switch to special opcodes for tess tcs/tes reads and tcs writes * impl tcs/tes read attr insts * rebase fix * save some work * save work probably broken and slow * put Vertex LogicalStage after TCS and TES to fix bindings * more refactors * refactor pattern matching and optimize modulos (disabled) * enable modulo opt * copyright * rebase fixes * remove some prints * remove some stuff * Add TCS/TES support for shader patching and use LogicalStage * refactor and handle wider DS instructions * get rid of GetAttributes for special tess constants reads. Immediately replace some upon seeing readconstbuffer. Gets rid of some extra passes over IR * stop relying on GNMX HsConstants struct. Change runtime_info.hs_info and some regs * delete some more stuff * update comments for current implementation * some cleanup * uint error * more cleanup * remove patch control points dynamic state (because runtime_info already depends on it) * fix potential problem with determining passthrough --------- Co-authored-by: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com>
This commit is contained in:
parent
3e22622508
commit
3c0c921ef5
54 changed files with 2146 additions and 189 deletions
|
@ -76,6 +76,7 @@ struct FrameDump {
|
|||
|
||||
struct ShaderDump {
|
||||
std::string name;
|
||||
Shader::LogicalStage l_stage;
|
||||
vk::ShaderModule module;
|
||||
|
||||
std::vector<u32> spv;
|
||||
|
@ -90,16 +91,17 @@ struct ShaderDump {
|
|||
std::string cache_isa_disasm{};
|
||||
std::string cache_patch_disasm{};
|
||||
|
||||
ShaderDump(std::string name, vk::ShaderModule module, std::vector<u32> spv,
|
||||
std::vector<u32> isa, std::vector<u32> patch_spv, bool is_patched)
|
||||
: name(std::move(name)), module(module), spv(std::move(spv)), isa(std::move(isa)),
|
||||
patch_spv(std::move(patch_spv)), is_patched(is_patched) {}
|
||||
ShaderDump(std::string name, Shader::LogicalStage l_stage, vk::ShaderModule module,
|
||||
std::vector<u32> spv, std::vector<u32> isa, std::vector<u32> patch_spv,
|
||||
bool is_patched)
|
||||
: name(std::move(name)), l_stage(l_stage), module(module), spv(std::move(spv)),
|
||||
isa(std::move(isa)), patch_spv(std::move(patch_spv)), is_patched(is_patched) {}
|
||||
|
||||
ShaderDump(const ShaderDump& other) = delete;
|
||||
ShaderDump(ShaderDump&& other) noexcept
|
||||
: name{std::move(other.name)}, module{std::move(other.module)}, spv{std::move(other.spv)},
|
||||
isa{std::move(other.isa)}, patch_spv{std::move(other.patch_spv)},
|
||||
patch_source{std::move(other.patch_source)},
|
||||
: name{std::move(other.name)}, l_stage(other.l_stage), module{std::move(other.module)},
|
||||
spv{std::move(other.spv)}, isa{std::move(other.isa)},
|
||||
patch_spv{std::move(other.patch_spv)}, patch_source{std::move(other.patch_source)},
|
||||
cache_spv_disasm{std::move(other.cache_spv_disasm)},
|
||||
cache_isa_disasm{std::move(other.cache_isa_disasm)},
|
||||
cache_patch_disasm{std::move(other.cache_patch_disasm)} {}
|
||||
|
@ -108,6 +110,7 @@ struct ShaderDump {
|
|||
if (this == &other)
|
||||
return *this;
|
||||
name = std::move(other.name);
|
||||
l_stage = other.l_stage;
|
||||
module = std::move(other.module);
|
||||
spv = std::move(other.spv);
|
||||
isa = std::move(other.isa);
|
||||
|
@ -203,7 +206,8 @@ public:
|
|||
void PushRegsDump(uintptr_t base_addr, uintptr_t header_addr,
|
||||
const AmdGpu::Liverpool::Regs& regs, bool is_compute = false);
|
||||
|
||||
void CollectShader(const std::string& name, vk::ShaderModule module, std::span<const u32> spv,
|
||||
void CollectShader(const std::string& name, Shader::LogicalStage l_stage,
|
||||
vk::ShaderModule module, std::span<const u32> spv,
|
||||
std::span<const u32> raw_code, std::span<const u32> patch_spv,
|
||||
bool is_patched);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue