summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_texture.c
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2004-02-02 07:46:27 +0000
committerDaniel Borca <[email protected]>2004-02-02 07:46:27 +0000
commit4c7883e402dd0733a56870f4517e455e46523cf4 (patch)
tree81c3a1e53141f07f31af6e3a3f8a8f2bef662d10 /src/mesa/swrast/s_texture.c
parentc9e1c8098b40e28a1273b2846972f2434076156b (diff)
fixed a bug in GL_NEAREST sampler
Diffstat (limited to 'src/mesa/swrast/s_texture.c')
-rw-r--r--src/mesa/swrast/s_texture.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c
index b5a4509c07e..37e8ea86f34 100644
--- a/src/mesa/swrast/s_texture.c
+++ b/src/mesa/swrast/s_texture.c
@@ -1592,12 +1592,18 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit,
switch (tObj->MinFilter) {
case GL_NEAREST:
if (repeatNoBorderPOT) {
- switch (tImg->Format) {
- case GL_RGB:
+ switch (tImg->TexFormat->MesaFormat) {
+ case MESA_FORMAT_RGB:
+ case MESA_FORMAT_RGB888:
+ /*case MESA_FORMAT_BGR888:*/
opt_sample_rgb_2d(ctx, texUnit, tObj, m, texcoords + minStart,
NULL, rgba + minStart);
break;
- case GL_RGBA:
+ case MESA_FORMAT_RGBA:
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_ARGB8888:
+ /*case MESA_FORMAT_ABGR8888:*/
+ /*case MESA_FORMAT_BGRA8888:*/
opt_sample_rgba_2d(ctx, texUnit, tObj, m, texcoords + minStart,
NULL, rgba + minStart);
break;
@@ -1649,12 +1655,18 @@ sample_lambda_2d( GLcontext *ctx, GLuint texUnit,
switch (tObj->MagFilter) {
case GL_NEAREST:
if (repeatNoBorderPOT) {
- switch (tImg->Format) {
- case GL_RGB:
+ switch (tImg->TexFormat->MesaFormat) {
+ case MESA_FORMAT_RGB:
+ case MESA_FORMAT_RGB888:
+ /*case MESA_FORMAT_BGR888:*/
opt_sample_rgb_2d(ctx, texUnit, tObj, m, texcoords + magStart,
NULL, rgba + magStart);
break;
- case GL_RGBA:
+ case MESA_FORMAT_RGBA:
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_ARGB8888:
+ /*case MESA_FORMAT_ABGR8888:*/
+ /*case MESA_FORMAT_BGRA8888:*/
opt_sample_rgba_2d(ctx, texUnit, tObj, m, texcoords + magStart,
NULL, rgba + magStart);
break;