summaryrefslogtreecommitdiff
path: root/r300/r300_emit.c
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2010-03-14 08:00:12 +0100
committerLuc Verhaegen <libv@skynet.be>2010-03-14 08:00:12 +0100
commitc40fdff4f4a1c7f53c0c3cdff1ff8bce4f5e168f (patch)
tree5c1367ec9bfe97c076c11f01c02c21f60c0d39a3 /r300/r300_emit.c
parent28d0497909299b17d9aff12a869cf8f8ae819097 (diff)
Import radeon, r200 and r300 dri drivers from mesa 7.5.0.7.5.0
Diffstat (limited to 'r300/r300_emit.c')
-rw-r--r--r300/r300_emit.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/r300/r300_emit.c b/r300/r300_emit.c
index 80bd338..28c3157 100644
--- a/r300/r300_emit.c
+++ b/r300/r300_emit.c
@@ -314,10 +314,6 @@ GLuint r300VAPOutputCntl0(GLcontext * ctx, GLuint OutputsWritten)
R300_VAP_OUTPUT_VTX_FMT_0__COLOR_2_PRESENT |
R300_VAP_OUTPUT_VTX_FMT_0__COLOR_3_PRESENT;
-#if 0
- if (OutputsWritten & (1 << VERT_RESULT_FOGC)) ;
-#endif
-
if (OutputsWritten & (1 << VERT_RESULT_PSIZ))
ret |= R300_VAP_OUTPUT_VTX_FMT_0__PT_SIZE_PRESENT;
@@ -326,12 +322,21 @@ GLuint r300VAPOutputCntl0(GLcontext * ctx, GLuint OutputsWritten)
GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint OutputsWritten)
{
- GLuint i, ret = 0;
+ GLuint i, ret = 0, first_free_texcoord = 0;
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
if (OutputsWritten & (1 << (VERT_RESULT_TEX0 + i))) {
ret |= (4 << (3 * i));
+ ++first_free_texcoord;
+ }
+ }
+
+ if (OutputsWritten & (1 << VERT_RESULT_FOGC)) {
+ if (first_free_texcoord > 8) {
+ fprintf(stderr, "\tout of free texcoords to write fog coord\n");
+ _mesa_exit(-1);
}
+ ret |= 4 << (3 * first_free_texcoord);
}
return ret;