mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-03 09:13:16 +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
|
@ -18,6 +18,7 @@
|
|||
#include "common/polyfill_thread.h"
|
||||
#include "common/types.h"
|
||||
#include "common/unique_function.h"
|
||||
#include "shader_recompiler/params.h"
|
||||
#include "video_core/amdgpu/pixel_format.h"
|
||||
#include "video_core/amdgpu/resource.h"
|
||||
|
||||
|
@ -171,6 +172,15 @@ struct Liverpool {
|
|||
return bininfo;
|
||||
}
|
||||
|
||||
static constexpr Shader::ShaderParams GetParams(const auto& sh) {
|
||||
auto* bininfo = GetBinaryInfo(sh);
|
||||
return {
|
||||
.user_data = sh.user_data,
|
||||
.code = sh.Code(),
|
||||
.hash = bininfo->shader_hash,
|
||||
};
|
||||
}
|
||||
|
||||
union PsInputControl {
|
||||
u32 raw;
|
||||
BitField<0, 5, u32> input_offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue