<li>Fixed some fragment program bugs in Intel i915 DRI driver
<li>Fixed glGetVertexAttribfvARB bug 8883
<li>Implemented glGetUniform[fi]vARB() functions
+<li>Fixed glDrawPixels(GL_COLOR_INDEX, GL_BITMAP) segfault (bug 9044)
</ul>
const GLint comps = _mesa_components_in_format(dstFormat);
GLuint i;
- if (dstType != GL_FLOAT) {
+ if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) {
/* need to clamp to [0, 1] */
transferOps |= IMAGE_CLAMP_BIT;
}
if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) {
/* compute luminance values */
- if (ctx->Color.ClampReadColor == GL_TRUE || dstType != GL_FLOAT) {
+ if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) {
for (i = 0; i < n; i++) {
GLfloat sum = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
luminance[i] = CLAMP(sum, 0.0F, 1.0F);
if (width <= 0 || height <= 0 || depth <= 0)
return NULL; /* generate error later */
- if (format == GL_BITMAP) {
+ if (type == GL_BITMAP) {
bytesPerRow = (width + 7) >> 3;
flipBytes = !unpack->LsbFirst;
swap2 = swap4 = GL_FALSE;