Don't submit dead vertices
This commit is contained in:
parent
36fe13095c
commit
26abe44336
|
@ -165,7 +165,7 @@ void _glClipTriangle(const Triangle* triangle, const uint8_t visible, Submission
|
|||
}
|
||||
|
||||
static inline void markDead(Vertex* vert) {
|
||||
vert->flags = VERTEX_CMD_EOL;
|
||||
vert->flags = DEAD; //VERTEX_CMD_EOL;
|
||||
|
||||
// If we're debugging, wipe out the xyz
|
||||
#ifndef NDEBUG
|
||||
|
@ -331,7 +331,6 @@ void _glClipTriangleStrip(SubmissionTarget* target, uint8_t fladeShade) {
|
|||
triangle = -1;
|
||||
} else {
|
||||
Vertex* v4 = v3 + 1;
|
||||
uint32_t vi4 = v4 - start;
|
||||
|
||||
TO_CLIP[CLIP_COUNT].vertex[0] = *v3;
|
||||
TO_CLIP[CLIP_COUNT].vertex[1] = *v2;
|
||||
|
|
27
GL/flush.c
27
GL/flush.c
|
@ -24,17 +24,22 @@ static void pvr_list_submit(void *src, int n) {
|
|||
/* fill/write queues as many times necessary */
|
||||
while(n--) {
|
||||
__asm__("pref @%0" : : "r"(s + STRIDE)); /* prefetch 64 bytes for next loop */
|
||||
d[0] = *(s++);
|
||||
d[1] = *(s++);
|
||||
d[2] = *(s++);
|
||||
d[3] = *(s++);
|
||||
d[4] = *(s++);
|
||||
d[5] = *(s++);
|
||||
d[6] = *(s++);
|
||||
d[7] = *(s++);
|
||||
__asm__("pref @%0" : : "r"(d));
|
||||
d += 8;
|
||||
s += (STRIDE - 8);
|
||||
if(*s != DEAD) {
|
||||
d[0] = *(s++);
|
||||
d[1] = *(s++);
|
||||
d[2] = *(s++);
|
||||
d[3] = *(s++);
|
||||
d[4] = *(s++);
|
||||
d[5] = *(s++);
|
||||
d[6] = *(s++);
|
||||
d[7] = *(s++);
|
||||
|
||||
__asm__("pref @%0" : : "r"(d));
|
||||
d += 8;
|
||||
s += (STRIDE - 8);
|
||||
} else {
|
||||
s += 16;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for both store queues to complete */
|
||||
|
|
|
@ -192,6 +192,8 @@ typedef struct {
|
|||
GLfloat specularMaterial[4];
|
||||
} LightSource;
|
||||
|
||||
#define DEAD 0xDEADBEEF
|
||||
|
||||
typedef struct {
|
||||
/* Same 32 byte layout as pvr_vertex_t */
|
||||
uint32_t flags;
|
||||
|
|
Loading…
Reference in New Issue
Block a user