mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-23 05:50:40 +02:00
vertex_loader: Add constructors to facilitate immediate and two-step initialization
This commit is contained in:
parent
769f4a7018
commit
1357724cd9
@ -199,9 +199,8 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
|
|||||||
|
|
||||||
// Processes information about internal vertex attributes to figure out how a vertex is loaded.
|
// Processes information about internal vertex attributes to figure out how a vertex is loaded.
|
||||||
// Later, these can be compiled and cached.
|
// Later, these can be compiled and cached.
|
||||||
VertexLoader loader;
|
|
||||||
const u32 base_address = regs.vertex_attributes.GetPhysicalBaseAddress();
|
const u32 base_address = regs.vertex_attributes.GetPhysicalBaseAddress();
|
||||||
loader.Setup(regs);
|
VertexLoader loader(regs);
|
||||||
|
|
||||||
// Load vertices
|
// Load vertices
|
||||||
bool is_indexed = (id == PICA_REG_INDEX(trigger_draw_indexed));
|
bool is_indexed = (id == PICA_REG_INDEX(trigger_draw_indexed));
|
||||||
|
@ -17,6 +17,11 @@ class InputVertex;
|
|||||||
|
|
||||||
class VertexLoader {
|
class VertexLoader {
|
||||||
public:
|
public:
|
||||||
|
VertexLoader() = default;
|
||||||
|
explicit VertexLoader(const Pica::Regs& regs) {
|
||||||
|
Setup(regs);
|
||||||
|
}
|
||||||
|
|
||||||
void Setup(const Pica::Regs& regs);
|
void Setup(const Pica::Regs& regs);
|
||||||
void LoadVertex(u32 base_address, int index, int vertex, Shader::InputVertex& input, DebugUtils::MemoryAccessTracker& memory_accesses);
|
void LoadVertex(u32 base_address, int index, int vertex, Shader::InputVertex& input, DebugUtils::MemoryAccessTracker& memory_accesses);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user