swrast: remove gl_renderbuffer::DataType check in DrawPixels()
The field will be going away so update this code.
This commit is contained in:
@@ -429,11 +429,14 @@ draw_rgba_pixels( struct gl_context *ctx, GLint x, GLint y,
|
|||||||
span.arrayMask = SPAN_RGBA;
|
span.arrayMask = SPAN_RGBA;
|
||||||
span.arrayAttribs = FRAG_BIT_COL0; /* we're fill in COL0 attrib values */
|
span.arrayAttribs = FRAG_BIT_COL0; /* we're fill in COL0 attrib values */
|
||||||
|
|
||||||
if (ctx->DrawBuffer->_NumColorDrawBuffers > 0 &&
|
if (ctx->DrawBuffer->_NumColorDrawBuffers > 0) {
|
||||||
ctx->DrawBuffer->_ColorDrawBuffers[0]->DataType != GL_FLOAT &&
|
GLenum datatype = _mesa_get_format_datatype(
|
||||||
ctx->Color.ClampFragmentColor != GL_FALSE) {
|
ctx->DrawBuffer->_ColorDrawBuffers[0]->Format);
|
||||||
/* need to clamp colors before applying fragment ops */
|
if (datatype != GL_FLOAT &&
|
||||||
transferOps |= IMAGE_CLAMP_BIT;
|
ctx->Color.ClampFragmentColor != GL_FALSE) {
|
||||||
|
/* need to clamp colors before applying fragment ops */
|
||||||
|
transferOps |= IMAGE_CLAMP_BIT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user