summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_emit.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-03-20 10:52:17 +1000
committerDave Airlie <airlied@redhat.com>2009-03-20 10:52:17 +1000
commit407e8ae5b167b0193e1e5b1266a5d61ed836dfb5 (patch)
tree2d9d05a5c3122f41a13aa8bd9ae921c1176e6b0d /src/mesa/drivers/dri/r300/r300_emit.c
parentbdaa0341caffc353fd26bbd91865c2d86eed11c1 (diff)
parent114bb54324f22cb53bcd14607234d0acd74d37bd (diff)
Merge remote branch 'main/master' into radeon-rewrite
Conflicts: src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/r300/r300_state.c src/mesa/drivers/dri/r300/r300_swtcl.c src/mesa/drivers/dri/r300/radeon_ioctl.c src/mesa/drivers/dri/radeon/radeon_screen.c
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_emit.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_emit.c b/src/mesa/drivers/dri/r300/r300_emit.c
index 1512e906e8..4bf0e7a189 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.c
+++ b/src/mesa/drivers/dri/r300/r300_emit.c
@@ -177,14 +177,23 @@ 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;
}