Mesa (mesa_7_7_branch): r200: Fix EXT_fogcoord rendering.

Pauli Nieminen suokko at kemper.freedesktop.org
Mon Feb 1 20:12:02 PST 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 7b92cb45b2f7076476b6a2f50ed044979b1eebe1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b92cb45b2f7076476b6a2f50ed044979b1eebe1

Author: Pauli Nieminen <suokkos at gmail.com>
Date:   Tue Feb  2 05:39:28 2010 +0200

r200: Fix EXT_fogcoord rendering.

The fogcoord calue was not pushed to GPU because of implicit float to int conversion.
Fix is to use float pointer to buffer object so no conversion is done in assigment.

---

 src/mesa/drivers/dri/r200/r200_maos_arrays.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
index 383a0c4..3762a1c 100644
--- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c
+++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
@@ -74,7 +74,7 @@ static void r200_emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
 			     GLvoid *data, int stride, int count)
 {
 	radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
-	uint32_t *out;
+	GLfloat *out;
 	int i;
 	int size = 1;
 
@@ -90,7 +90,7 @@ static void r200_emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
 	aos->components = size;
 	aos->count = count;
 
-	out = (uint32_t*)((char*)aos->bo->ptr + aos->offset);
+	out = (GLfloat*)((char*)aos->bo->ptr + aos->offset);
 	for (i = 0; i < count; i++) {
 	  out[0] = r200ComputeFogBlendFactor( ctx, *(GLfloat *)data );
 	  out++;



More information about the mesa-commit mailing list