summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-05 17:28:39 -0600
committerBrian Paul <[email protected]>2009-10-05 17:28:39 -0600
commit6ec3db6cab95c1025d4afa0e7951246b5aa51b48 (patch)
tree85e3225c00dd9ea050f1c4022f5c8a0c1762f42f
parent41bee4cff54c6a4c3ee193c80164a4b81863774b (diff)
mesa: use FetchTexelf() instead of FetchTexelc()
-rw-r--r--src/mesa/main/texrender.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index f47478421a1..c8b532acbbf 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -1,5 +1,6 @@
#include "context.h"
+#include "colormac.h"
#include "fbobject.h"
#include "texfetch.h"
#include "texrender.h"
@@ -46,7 +47,9 @@ texture_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
if (rb->DataType == CHAN_TYPE) {
GLchan *rgbaOut = (GLchan *) values;
for (i = 0; i < count; i++) {
- trb->TexImage->FetchTexelc(trb->TexImage, x + i, y, z, rgbaOut + 4 * i);
+ GLfloat rgba[4];
+ trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, rgba);
+ UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
}
}
else if (rb->DataType == GL_UNSIGNED_SHORT) {
@@ -100,8 +103,10 @@ texture_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
if (rb->DataType == CHAN_TYPE) {
GLchan *rgbaOut = (GLchan *) values;
for (i = 0; i < count; i++) {
- trb->TexImage->FetchTexelc(trb->TexImage, x[i], y[i] + trb->Yoffset,
- z, rgbaOut + 4 * i);
+ GLfloat rgba[4];
+ trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset,
+ z, rgba);
+ UNCLAMPED_FLOAT_TO_RGBA_CHAN(rgbaOut + 4 * i, rgba);
}
}
else if (rb->DataType == GL_UNSIGNED_SHORT) {