mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-02 16:53:17 +00:00
shader_recompiler: Better branch detection + more opcodes
This commit is contained in:
parent
f624f7749c
commit
02a50265f8
31 changed files with 772 additions and 120 deletions
|
@ -2,7 +2,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/io_file.h"
|
||||
#include "common/thread.h"
|
||||
#include "video_core/amdgpu/liverpool.h"
|
||||
#include "video_core/amdgpu/pm4_cmds.h"
|
||||
|
|
|
@ -374,10 +374,16 @@ struct Liverpool {
|
|||
FrontAndBack = 3,
|
||||
};
|
||||
|
||||
enum class FrontFace : u32 {
|
||||
CounterClockwise = 0,
|
||||
Clockwise = 1,
|
||||
};
|
||||
|
||||
union PolygonControl {
|
||||
u32 raw;
|
||||
BitField<0, 1, u32> cull_front;
|
||||
BitField<1, 1, u32> cull_back;
|
||||
BitField<2, 1, FrontFace> front_face;
|
||||
BitField<3, 2, u32> enable_polygon_mode;
|
||||
BitField<5, 3, PolygonMode> polygon_mode_front;
|
||||
BitField<8, 3, PolygonMode> polygon_mode_back;
|
||||
|
|
|
@ -110,11 +110,29 @@ struct Image {
|
|||
BitField<59, 1, u64> atc;
|
||||
BitField<60, 4, ImageType> type;
|
||||
};
|
||||
union {
|
||||
BitField<0, 13, u64> depth;
|
||||
BitField<13, 14, u64> pitch;
|
||||
BitField<32, 13, u64> base_array;
|
||||
BitField<45, 13, u64> last_array;
|
||||
};
|
||||
|
||||
VAddr Address() const {
|
||||
return base_address << 8;
|
||||
}
|
||||
|
||||
u32 Pitch() const {
|
||||
return pitch;
|
||||
}
|
||||
|
||||
u32 NumLayers() const {
|
||||
return last_array - base_array + 1;
|
||||
}
|
||||
|
||||
u32 NumLevels() const {
|
||||
return last_level + 1;
|
||||
}
|
||||
|
||||
DataFormat GetDataFmt() const noexcept {
|
||||
return static_cast<DataFormat>(data_format.Value());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue