Rewriting hw vertex fetch

This commit is contained in:
wheremyfoodat 2024-09-04 03:18:39 +03:00
parent 15b6a9e2d9
commit 4a39b06262
5 changed files with 107 additions and 95 deletions

View file

@ -6,32 +6,37 @@
namespace PICA {
struct DrawAcceleration {
static constexpr u32 maxAttribCount = 12;
static constexpr u32 maxAttribCount = 16;
static constexpr u32 maxLoaderCount = 12;
struct AttributeInfo {
u8* data;
u32 offset;
u32 size;
u32 stride;
u8 inputReg; // Which input reg should this attribute go to in the vertex shader?
u8 type;
u8 componentCount;
bool fixed;
bool isPadding;
std::array<float, 4> fixedValue; // For fixed attributes
};
struct Loader {
// Data to upload for this loader
u8* data;
usize size;
};
u8* indexBuffer;
// Minimum and maximum index in the index buffer for a draw call
u16 minimumIndex, maximumIndex;
u32 totalAttribCount;
u32 totalLoaderCount;
u32 enabledAttributeMask;
u32 fixedAttributes;
u32 vertexDataSize;
std::array<AttributeInfo, maxAttribCount> attributeInfo;
std::array<Loader, maxLoaderCount> loaders;
bool canBeAccelerated;
bool indexed;