diff options
author | Maciej Cencora <m.cencora@gmail.com> | 2009-06-10 17:05:38 +0200 |
---|---|---|
committer | Maciej Cencora <m.cencora@gmail.com> | 2009-06-11 23:25:54 +0200 |
commit | 67bbfb9c68d0bf459f706a4cb50caf8245a37a34 (patch) | |
tree | fafb80e4c7b8aa93aeb8b0784290f1283a8f79c5 | |
parent | 234797564dea00c1463faa7a7791df466f52a91b (diff) |
r300: fix VAP setupradeon-rewrite
If GL context had e.g. tex0, tex2 and fog the VAPOutputCntl1 returned 0x104 instead of 0x124 - that meaned we're sending only 8 texcoords (instead of 12) which ended up in GPU hang.
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_emit.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_emit.c b/src/mesa/drivers/dri/r300/r300_emit.c index 4017224b10..c3817721dc 100644 --- a/src/mesa/drivers/dri/r300/r300_emit.c +++ b/src/mesa/drivers/dri/r300/r300_emit.c @@ -111,7 +111,7 @@ GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes, GLuint fp_reads) for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { if (vp_writes & (1 << (VERT_RESULT_TEX0 + i)) && fp_reads & FRAG_BIT_TEX(i)) { - ret |= (4 << (3 * i)); + ret |= (4 << (3 * first_free_texcoord)); ++first_free_texcoord; } } @@ -122,13 +122,14 @@ GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes, GLuint fp_reads) } if (vp_writes & (1 << VERT_RESULT_FOGC) && fp_reads & FRAG_BIT_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); } + if (first_free_texcoord > 8) { + fprintf(stderr, "\tout of free texcoords\n"); + _mesa_exit(-1); + } + return ret; } |