*/
-#include "glheader.h"
-#include "context.h"
-#include "imports.h"
-#include "macros.h"
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/imports.h"
+#include "main/macros.h"
#include "s_context.h"
#include "s_logic.h"
-static INLINE void
-logicop_uint1(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
+static inline void
+logicop_uint1(struct gl_context *ctx, GLuint n, GLuint src[], const GLuint dest[],
const GLubyte mask[])
{
LOGIC_OP_LOOP(ctx->Color.LogicOp, 1);
}
-static INLINE void
-logicop_uint2(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
+static inline void
+logicop_uint2(struct gl_context *ctx, GLuint n, GLuint src[], const GLuint dest[],
const GLubyte mask[])
{
LOGIC_OP_LOOP(ctx->Color.LogicOp, 2);
}
-static INLINE void
-logicop_uint4(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[],
+static inline void
+logicop_uint4(struct gl_context *ctx, GLuint n, GLuint src[], const GLuint dest[],
const GLubyte mask[])
{
LOGIC_OP_LOOP(ctx->Color.LogicOp, 4);
-/*
- * Apply the current logic operator to a span of CI pixels. This is only
- * used if the device driver can't do logic ops.
- */
-void
-_swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- SWspan *span)
-{
- GLuint dest[MAX_WIDTH];
- GLuint *index = span->array->index;
-
- ASSERT(span->end < MAX_WIDTH);
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
-
- /* Read dest values from frame buffer */
- if (span->arrayMask & SPAN_XY) {
- _swrast_get_values(ctx, rb, span->end, span->array->x, span->array->y,
- dest, sizeof(GLuint));
- }
- else {
- rb->GetRow(ctx, rb, span->end, span->x, span->y, dest);
- }
-
- logicop_uint1(ctx, span->end, index, dest, span->array->mask);
-}
-
-
/**
* Apply the current logic operator to a span of RGBA pixels.
* We can handle horizontal runs of pixels (spans) or arrays of x/y
* pixel coordinates.
*/
void
-_swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
+_swrast_logicop_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
SWspan *span)
{
void *rbPixels;
- ASSERT(span->end < MAX_WIDTH);
+ ASSERT(span->end < SWRAST_MAX_WIDTH);
ASSERT(span->arrayMask & SPAN_RGBA);
- ASSERT(rb->DataType == span->array->ChanType);
rbPixels = _swrast_get_dest_rgba(ctx, rb, span);
if (span->array->ChanType == GL_UNSIGNED_BYTE) {
/* treat 4*GLubyte as GLuint */
logicop_uint1(ctx, span->end,
- (GLuint *) span->array->color.sz1.rgba,
+ (GLuint *) span->array->rgba8,
(const GLuint *) rbPixels, span->array->mask);
}
else if (span->array->ChanType == GL_UNSIGNED_SHORT) {
/* treat 2*GLushort as GLuint */
logicop_uint2(ctx, 2 * span->end,
- (GLuint *) span->array->color.sz2.rgba,
+ (GLuint *) span->array->rgba16,
(const GLuint *) rbPixels, span->array->mask);
}
else {