From 2e995cdf25873756d7e5aad919aac1afe1c75e0d Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Wed, 21 Apr 2010 18:13:19 -0600 Subject: progs/demos: Fix the progs/demos/rain help text Signed-off-by: Brian Paul --- progs/demos/rain.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progs/demos/rain.cxx b/progs/demos/rain.cxx index 265d90cd95f..60fc4146c80 100644 --- a/progs/demos/rain.cxx +++ b/progs/demos/rain.cxx @@ -158,7 +158,7 @@ static void printhelp(void) glRasterPos2i(60,240); printstring(GLUT_BITMAP_TIMES_ROMAN_24,"l - Increase rain length"); glRasterPos2i(60,210); - printstring(GLUT_BITMAP_TIMES_ROMAN_24,"k - Increase rain length"); + printstring(GLUT_BITMAP_TIMES_ROMAN_24,"k - Decrease rain length"); } static void drawrain(void) -- cgit v1.2.3 From 986eb4b99fd9304abc949407e48dade5e122712e Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 22 Apr 2010 02:33:10 -0400 Subject: r300: fix vertex unit setup RV3xx is 2, RV560,RV570 is 8 Noticed by Tormod Volden. --- src/mesa/drivers/dri/r300/r300_state.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 5979dedac4f..188169ce87a 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1658,20 +1658,21 @@ void r300VapCntl(r300ContextPtr rmesa, GLuint input_count, (5 << R300_PVS_NUM_CNTLRS_SHIFT) | (5 << R300_VF_MAX_VTX_NUM_SHIFT)); - if (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV515) - rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (2 << R300_PVS_NUM_FPUS_SHIFT); - else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) || - (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) || - (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570)) + if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R300) || + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R350)) + rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (4 << R300_PVS_NUM_FPUS_SHIFT); + else if (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (5 << R300_PVS_NUM_FPUS_SHIFT); else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV410) || (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R420)) rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (6 << R300_PVS_NUM_FPUS_SHIFT); else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R520) || - (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580)) + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580) || + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) || + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570)) rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (8 << R300_PVS_NUM_FPUS_SHIFT); else - rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (4 << R300_PVS_NUM_FPUS_SHIFT); + rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (2 << R300_PVS_NUM_FPUS_SHIFT); } -- cgit v1.2.3 From 4d7ef6e06b45c75bc24f8f238bcc3d2328e53c7d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 22 Apr 2010 08:46:46 -0600 Subject: mesa: fix conversion errors in signed_rgba8888[rev] texel fetch Without the cast the returned texel colors were wrong. Also, we don't need the "& 0xff" part anymore. Bug found by Vinson Lee. --- src/mesa/main/texfetch_tmp.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h index e6772c89f36..b11ed5c39a3 100644 --- a/src/mesa/main/texfetch_tmp.h +++ b/src/mesa/main/texfetch_tmp.h @@ -1215,10 +1215,10 @@ static void FETCH(signed_rgba8888)( const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel ) { const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1); - texel[RCOMP] = BYTE_TO_FLOAT_TEX( (s >> 24) ); - texel[GCOMP] = BYTE_TO_FLOAT_TEX( (s >> 16) & 0xff ); - texel[BCOMP] = BYTE_TO_FLOAT_TEX( (s >> 8) & 0xff ); - texel[ACOMP] = BYTE_TO_FLOAT_TEX( (s ) & 0xff ); + texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 24) ); + texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 16) ); + texel[BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) ); + texel[ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s ) ); } #if DIM == 3 @@ -1235,10 +1235,10 @@ static void FETCH(signed_rgba8888_rev)( const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel ) { const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1); - texel[RCOMP] = BYTE_TO_FLOAT_TEX( (s ) & 0xff ); - texel[GCOMP] = BYTE_TO_FLOAT_TEX( (s >> 8) & 0xff ); - texel[BCOMP] = BYTE_TO_FLOAT_TEX( (s >> 16) & 0xff ); - texel[ACOMP] = BYTE_TO_FLOAT_TEX( (s >> 24) ); + texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s ) ); + texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) ); + texel[BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 16) ); + texel[ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 24) ); } #if DIM == 3 -- cgit v1.2.3 From b1a9c76b574f4da6b87c5a0750bfbe5bc98d1f4e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 22 Apr 2010 10:26:20 -0600 Subject: st/mesa: add cases for MESA_FORMAT_Z24_X8, MESA_FORMAT_X8_Z24 --- src/mesa/state_tracker/st_format.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 9ae0c9f9bab..91e386c848a 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -154,6 +154,10 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat) return PIPE_FORMAT_S8Z24_UNORM; case MESA_FORMAT_S8_Z24: return PIPE_FORMAT_Z24S8_UNORM; + case MESA_FORMAT_Z24_X8: + return PIPE_FORMAT_X8Z24_UNORM; + case MESA_FORMAT_X8_Z24: + return PIPE_FORMAT_Z24X8_UNORM; case MESA_FORMAT_YCBCR: return PIPE_FORMAT_UYVY; #if FEATURE_texture_s3tc -- cgit v1.2.3