mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-20 18:34:58 +00:00
shader_recompiler: Implement render target swizzles when no format is available (#739)
* shader_recompiler: Use null image when shader is compiled with unbound sharp * video_core: Refactor and render target swizzles * liverpool_to_vk: Add missing swap format from RDR * video_core: Refactor shader recompiler interface * Makes it much easier to pass runtime information to the recompiler and have it treated as part of the shader key. Also pulls out most runtime state from Info struct * shader_recompiler: Avoid some asserts
This commit is contained in:
parent
3f8a8d3a24
commit
f087f43736
30 changed files with 704 additions and 560 deletions
26
src/shader_recompiler/params.h
Normal file
26
src/shader_recompiler/params.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <span>
|
||||
#include "common/types.h"
|
||||
|
||||
namespace Shader {
|
||||
|
||||
/**
|
||||
* Compilation parameters used to identify and locate a guest shader program.
|
||||
*/
|
||||
struct ShaderParams {
|
||||
static constexpr u32 NumShaderUserData = 16;
|
||||
|
||||
std::span<const u32, NumShaderUserData> user_data;
|
||||
std::span<const u32> code;
|
||||
u64 hash;
|
||||
|
||||
VAddr Base() const noexcept {
|
||||
return reinterpret_cast<VAddr>(code.data());
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Shader
|
Loading…
Add table
Add a link
Reference in a new issue