mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
rsx: Start splitting off some stuff into the graph backend class
This commit is contained in:
parent
77b9e6560b
commit
9e1019b1cf
6 changed files with 36 additions and 1 deletions
21
rpcs3/Emu/RSX/NV47/FW/GRAPH_backend.h
Normal file
21
rpcs3/Emu/RSX/NV47/FW/GRAPH_backend.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../HW/context.h"
|
||||||
|
|
||||||
|
#include <span>
|
||||||
|
|
||||||
|
namespace rsx
|
||||||
|
{
|
||||||
|
// GRAPH backend class. Wraps RSX acceleration capabilities for the host.
|
||||||
|
// TODO: Flesh this out.
|
||||||
|
// TODO: Replace the virtuals with something faster
|
||||||
|
class GRAPH_backend
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// virtual void begin() = 0;
|
||||||
|
// virtual void end() = 0;
|
||||||
|
|
||||||
|
// Patch transform constants
|
||||||
|
virtual void patch_transform_constants(context* ctx, u32 first_index, const std::span<u32>& data) {};
|
||||||
|
};
|
||||||
|
}
|
|
@ -33,6 +33,8 @@
|
||||||
#include "Core/RSXIOMap.hpp"
|
#include "Core/RSXIOMap.hpp"
|
||||||
#include "Core/RSXVertexTypes.h"
|
#include "Core/RSXVertexTypes.h"
|
||||||
|
|
||||||
|
#include "NV47/FW/GRAPH_backend.h"
|
||||||
|
|
||||||
extern atomic_t<bool> g_user_asked_for_frame_capture;
|
extern atomic_t<bool> g_user_asked_for_frame_capture;
|
||||||
extern atomic_t<bool> g_disable_frame_limit;
|
extern atomic_t<bool> g_disable_frame_limit;
|
||||||
extern rsx::frame_trace_data frame_debug;
|
extern rsx::frame_trace_data frame_debug;
|
||||||
|
@ -150,7 +152,7 @@ namespace rsx
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: This class is a mess, this needs to be broken into smaller chunks, like I did for RSXFIFO and RSXZCULL (kd)
|
// TODO: This class is a mess, this needs to be broken into smaller chunks, like I did for RSXFIFO and RSXZCULL (kd)
|
||||||
class thread : public cpu_thread, public GCM_context
|
class thread : public cpu_thread, public GCM_context, public GRAPH_backend
|
||||||
{
|
{
|
||||||
u64 timestamp_ctrl = 0;
|
u64 timestamp_ctrl = 0;
|
||||||
u64 timestamp_subvalue = 0;
|
u64 timestamp_subvalue = 0;
|
||||||
|
|
|
@ -2354,6 +2354,11 @@ void VKGSRender::update_vertex_env(u32 id, const vk::vertex_upload_info& vertex_
|
||||||
m_vertex_layout_ring_info.unmap();
|
m_vertex_layout_ring_info.unmap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VKGSRender::patch_transform_constants(rsx::context* ctx, u32 first_index, const std::span<u32>& data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void VKGSRender::init_buffers(rsx::framebuffer_creation_context context, bool)
|
void VKGSRender::init_buffers(rsx::framebuffer_creation_context context, bool)
|
||||||
{
|
{
|
||||||
prepare_rtts(context);
|
prepare_rtts(context);
|
||||||
|
|
|
@ -276,6 +276,9 @@ public:
|
||||||
// Host sync object
|
// Host sync object
|
||||||
inline std::pair<volatile vk::host_data_t*, VkBuffer> map_host_object_data() { return { m_host_data_ptr, m_host_object_data->value }; }
|
inline std::pair<volatile vk::host_data_t*, VkBuffer> map_host_object_data() { return { m_host_data_ptr, m_host_object_data->value }; }
|
||||||
|
|
||||||
|
// GRAPH backend
|
||||||
|
void patch_transform_constants(rsx::context* ctx, u32 first_index, const std::span<u32>& data) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void clear_surface(u32 mask) override;
|
void clear_surface(u32 mask) override;
|
||||||
void begin() override;
|
void begin() override;
|
||||||
|
|
|
@ -598,6 +598,7 @@
|
||||||
<ClInclude Include="Emu\RSX\Core\RSXVertexTypes.h" />
|
<ClInclude Include="Emu\RSX\Core\RSXVertexTypes.h" />
|
||||||
<ClInclude Include="Emu\RSX\NV47\FW\draw_call.hpp" />
|
<ClInclude Include="Emu\RSX\NV47\FW\draw_call.hpp" />
|
||||||
<ClInclude Include="Emu\RSX\NV47\FW\draw_call.inc.h" />
|
<ClInclude Include="Emu\RSX\NV47\FW\draw_call.inc.h" />
|
||||||
|
<ClInclude Include="Emu\RSX\NV47\FW\GRAPH_backend.h" />
|
||||||
<ClInclude Include="Emu\RSX\NV47\FW\reg_context.h" />
|
<ClInclude Include="Emu\RSX\NV47\FW\reg_context.h" />
|
||||||
<ClInclude Include="Emu\RSX\NV47\HW\context.h" />
|
<ClInclude Include="Emu\RSX\NV47\HW\context.h" />
|
||||||
<ClInclude Include="Emu\RSX\NV47\HW\context_accessors.define.h" />
|
<ClInclude Include="Emu\RSX\NV47\HW\context_accessors.define.h" />
|
||||||
|
|
|
@ -2536,6 +2536,9 @@
|
||||||
<ClInclude Include="Emu\savestate_utils.hpp">
|
<ClInclude Include="Emu\savestate_utils.hpp">
|
||||||
<Filter>Emu</Filter>
|
<Filter>Emu</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Emu\RSX\NV47\FW\GRAPH_backend.h">
|
||||||
|
<Filter>Emu\GPU\RSX\NV47\FW</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Emu\RSX\Program\GLSLSnippets\GPUDeswizzle.glsl">
|
<None Include="Emu\RSX\Program\GLSLSnippets\GPUDeswizzle.glsl">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue