mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-29 14:53:18 +00:00
video: Import new shader recompiler + display a triangle (#142)
This commit is contained in:
parent
8cf64a33b2
commit
8730968385
103 changed files with 17793 additions and 729 deletions
|
@ -15,6 +15,10 @@
|
|||
#include <thread>
|
||||
#include <queue>
|
||||
|
||||
namespace Vulkan {
|
||||
class Rasterizer;
|
||||
}
|
||||
|
||||
namespace AmdGpu {
|
||||
|
||||
#define GFX6_3D_REG_INDEX(field_name) (offsetof(AmdGpu::Liverpool::Regs, field_name) / sizeof(u32))
|
||||
|
@ -46,9 +50,10 @@ struct Liverpool {
|
|||
} settings;
|
||||
UserData user_data;
|
||||
|
||||
const u8* Address() const {
|
||||
template <typename T = u8>
|
||||
const T* Address() const {
|
||||
const uintptr_t addr = uintptr_t(address_hi) << 40 | uintptr_t(address_lo) << 8;
|
||||
return reinterpret_cast<const u8*>(addr);
|
||||
return reinterpret_cast<const T*>(addr);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -631,10 +636,15 @@ public:
|
|||
|
||||
void WaitGpuIdle();
|
||||
|
||||
void BindRasterizer(Vulkan::Rasterizer* rasterizer_) {
|
||||
rasterizer = rasterizer_;
|
||||
}
|
||||
|
||||
private:
|
||||
void ProcessCmdList(const u32* cmdbuf, u32 size_in_bytes);
|
||||
void Process(std::stop_token stoken);
|
||||
|
||||
Vulkan::Rasterizer* rasterizer;
|
||||
std::jthread process_thread{};
|
||||
std::queue<std::span<const u32>> gfx_ring{};
|
||||
std::condition_variable_any cv_submit{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue