Fix memory corruption
This commit is contained in:
parent
30f8564298
commit
cd04784c33
|
@ -505,7 +505,7 @@ Vertex* _glSubmissionTargetEnd(SubmissionTarget* target) {
|
||||||
|
|
||||||
static inline void genTriangles(Vertex* output, GLuint count) {
|
static inline void genTriangles(Vertex* output, GLuint count) {
|
||||||
Vertex* it = output + 2;
|
Vertex* it = output + 2;
|
||||||
ITERATE(count) {
|
ITERATE(count / 3) {
|
||||||
it->flags = PVR_CMD_VERTEX_EOL;
|
it->flags = PVR_CMD_VERTEX_EOL;
|
||||||
it += 3;
|
it += 3;
|
||||||
}
|
}
|
||||||
|
@ -513,9 +513,9 @@ static inline void genTriangles(Vertex* output, GLuint count) {
|
||||||
|
|
||||||
static inline void genQuads(Vertex* output, GLuint count) {
|
static inline void genQuads(Vertex* output, GLuint count) {
|
||||||
Vertex* this = output + 2;
|
Vertex* this = output + 2;
|
||||||
Vertex* next = this + 1;
|
Vertex* next = output + 3;
|
||||||
|
|
||||||
ITERATE(count) {
|
ITERATE(count / 4) {
|
||||||
swapVertex(this, next);
|
swapVertex(this, next);
|
||||||
next->flags = PVR_CMD_VERTEX_EOL;
|
next->flags = PVR_CMD_VERTEX_EOL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user