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) {
|
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
|
// If we're debugging, wipe out the xyz
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
@ -331,7 +331,6 @@ void _glClipTriangleStrip(SubmissionTarget* target, uint8_t fladeShade) {
|
||||||
triangle = -1;
|
triangle = -1;
|
||||||
} else {
|
} else {
|
||||||
Vertex* v4 = v3 + 1;
|
Vertex* v4 = v3 + 1;
|
||||||
uint32_t vi4 = v4 - start;
|
|
||||||
|
|
||||||
TO_CLIP[CLIP_COUNT].vertex[0] = *v3;
|
TO_CLIP[CLIP_COUNT].vertex[0] = *v3;
|
||||||
TO_CLIP[CLIP_COUNT].vertex[1] = *v2;
|
TO_CLIP[CLIP_COUNT].vertex[1] = *v2;
|
||||||
|
|
|
@ -24,6 +24,7 @@ static void pvr_list_submit(void *src, int n) {
|
||||||
/* fill/write queues as many times necessary */
|
/* fill/write queues as many times necessary */
|
||||||
while(n--) {
|
while(n--) {
|
||||||
__asm__("pref @%0" : : "r"(s + STRIDE)); /* prefetch 64 bytes for next loop */
|
__asm__("pref @%0" : : "r"(s + STRIDE)); /* prefetch 64 bytes for next loop */
|
||||||
|
if(*s != DEAD) {
|
||||||
d[0] = *(s++);
|
d[0] = *(s++);
|
||||||
d[1] = *(s++);
|
d[1] = *(s++);
|
||||||
d[2] = *(s++);
|
d[2] = *(s++);
|
||||||
|
@ -32,9 +33,13 @@ static void pvr_list_submit(void *src, int n) {
|
||||||
d[5] = *(s++);
|
d[5] = *(s++);
|
||||||
d[6] = *(s++);
|
d[6] = *(s++);
|
||||||
d[7] = *(s++);
|
d[7] = *(s++);
|
||||||
|
|
||||||
__asm__("pref @%0" : : "r"(d));
|
__asm__("pref @%0" : : "r"(d));
|
||||||
d += 8;
|
d += 8;
|
||||||
s += (STRIDE - 8);
|
s += (STRIDE - 8);
|
||||||
|
} else {
|
||||||
|
s += 16;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wait for both store queues to complete */
|
/* Wait for both store queues to complete */
|
||||||
|
|
|
@ -192,6 +192,8 @@ typedef struct {
|
||||||
GLfloat specularMaterial[4];
|
GLfloat specularMaterial[4];
|
||||||
} LightSource;
|
} LightSource;
|
||||||
|
|
||||||
|
#define DEAD 0xDEADBEEF
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* Same 32 byte layout as pvr_vertex_t */
|
/* Same 32 byte layout as pvr_vertex_t */
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user