Fix control flow analysis bug

This commit is contained in:
wheremyfoodat 2024-09-03 01:59:58 +03:00
parent 0e7697dc67
commit e332ab2e58
6 changed files with 54 additions and 14 deletions

View file

@ -14,6 +14,7 @@ namespace PICA {
u32 size;
u32 stride;
u8 inputReg; // Which input reg should this attribute go to in the vertex shader?
u8 type;
u8 componentCount;
bool fixed;
@ -27,6 +28,7 @@ namespace PICA {
// Minimum and maximum index in the index buffer for a draw call
u16 minimumIndex, maximumIndex;
u32 totalAttribCount;
u32 enabledAttributeMask;
u32 vertexDataSize;
std::array<AttributeInfo, maxAttribCount> attributeInfo;

View file

@ -70,6 +70,9 @@ class RendererGL final : public Renderer {
GLuint maximumIndex = 0;
void* hwIndexBufferOffset = nullptr;
// When doing hw shaders, we cache which attributes are enabled in our VAO to avoid having to enable/disable all attributes on each draw
u32 previousAttributeMask = 0;
// Cached pointer to the current vertex shader when using HW accelerated shaders
OpenGL::Shader* generatedVertexShader = nullptr;