2016-04-28 13:01:47 -04:00
|
|
|
#pragma once
|
|
|
|
|
2016-04-30 11:34:51 -04:00
|
|
|
#include "common/common_types.h"
|
2016-04-28 13:40:11 -04:00
|
|
|
|
2016-04-28 13:01:47 -04:00
|
|
|
#include "video_core/pica.h"
|
|
|
|
|
|
|
|
namespace Pica {
|
|
|
|
|
2016-04-30 11:34:51 -04:00
|
|
|
namespace DebugUtils {
|
|
|
|
class MemoryAccessTracker;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Shader {
|
|
|
|
class InputVertex;
|
|
|
|
}
|
|
|
|
|
2016-04-28 13:01:47 -04:00
|
|
|
class VertexLoader {
|
|
|
|
public:
|
2016-04-28 13:40:11 -04:00
|
|
|
void Setup(const Pica::Regs& regs);
|
2016-04-29 02:50:21 -04:00
|
|
|
void LoadVertex(u32 base_address, int index, int vertex, Shader::InputVertex& input, DebugUtils::MemoryAccessTracker& memory_accesses);
|
2016-04-28 13:01:47 -04:00
|
|
|
|
|
|
|
int GetNumTotalAttributes() const { return num_total_attributes; }
|
2016-04-28 14:17:35 -04:00
|
|
|
|
2016-04-28 13:01:47 -04:00
|
|
|
private:
|
|
|
|
u32 vertex_attribute_sources[16];
|
|
|
|
u32 vertex_attribute_strides[16] = {};
|
|
|
|
Regs::VertexAttributeFormat vertex_attribute_formats[16] = {};
|
|
|
|
u32 vertex_attribute_elements[16] = {};
|
|
|
|
bool vertex_attribute_is_default[16];
|
|
|
|
int num_total_attributes;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Pica
|