span.arrayMask = SPAN_RGBA;
span.arrayAttribs = FRAG_BIT_COL0; /* we're fill in COL0 attrib values */
- if (ctx->DrawBuffer->_NumColorDrawBuffers > 0 &&
- ctx->DrawBuffer->_ColorDrawBuffers[0]->DataType != GL_FLOAT &&
- ctx->Color.ClampFragmentColor != GL_FALSE) {
- /* need to clamp colors before applying fragment ops */
- transferOps |= IMAGE_CLAMP_BIT;
+ if (ctx->DrawBuffer->_NumColorDrawBuffers > 0) {
+ GLenum datatype = _mesa_get_format_datatype(
+ ctx->DrawBuffer->_ColorDrawBuffers[0]->Format);
+ if (datatype != GL_FLOAT &&
+ ctx->Color.ClampFragmentColor != GL_FALSE) {
+ /* need to clamp colors before applying fragment ops */
+ transferOps |= IMAGE_CLAMP_BIT;
+ }
}
/*