summaryrefslogtreecommitdiff
path: root/src/mesa/main/texstore.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2004-02-06 17:39:03 +0000
committerIan Romanick <idr@us.ibm.com>2004-02-06 17:39:03 +0000
commit07d6a983595b7ee52c8448fc579d952ce36472b8 (patch)
treeccc7d63948da1efaca6cdd00c852c9d9094f5405 /src/mesa/main/texstore.c
parentc71ee917e325e8b8c1591047d6e33adb4e051da8 (diff)
Refactor "class" texture environments to be implemented in terms of
ARB_texture_env_combine state.
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r--src/mesa/main/texstore.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 3e73de29b0..97040487f6 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1425,9 +1425,9 @@ do_row(const struct gl_texture_format *format, GLint srcWidth,
const GLint rowAb1 = (rowA[k] >> 11) & 0x1f;
const GLint rowBb0 = (rowB[j] >> 11) & 0x1f;
const GLint rowBb1 = (rowB[k] >> 11) & 0x1f;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 4;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 4;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 4;
+ const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
dst[i] = (blue << 11) | (green << 5) | red;
}
}
@@ -1456,10 +1456,10 @@ do_row(const struct gl_texture_format *format, GLint srcWidth,
const GLint rowAa1 = (rowA[k] >> 12) & 0xf;
const GLint rowBa0 = (rowB[j] >> 12) & 0xf;
const GLint rowBa1 = (rowB[k] >> 12) & 0xf;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 4;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 4;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 4;
- const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 4;
+ const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
dst[i] = (alpha << 12) | (blue << 8) | (green << 4) | red;
}
}
@@ -1488,10 +1488,10 @@ do_row(const struct gl_texture_format *format, GLint srcWidth,
const GLint rowAa1 = (rowA[k] >> 15) & 0x1;
const GLint rowBa0 = (rowB[j] >> 15) & 0x1;
const GLint rowBa1 = (rowB[k] >> 15) & 0x1;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 4;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 4;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 4;
- const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 4;
+ const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
dst[i] = (alpha << 15) | (blue << 10) | (green << 5) | red;
}
}
@@ -1531,9 +1531,9 @@ do_row(const struct gl_texture_format *format, GLint srcWidth,
const GLint rowAb1 = (rowA[k] >> 5) & 0x7;
const GLint rowBb0 = (rowB[j] >> 5) & 0x7;
const GLint rowBb1 = (rowB[k] >> 5) & 0x7;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 4;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 4;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 4;
+ const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
dst[i] = (blue << 5) | (green << 2) | red;
}
}