summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common/spantmp.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-05-04 20:11:35 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-05-04 20:11:35 +0000
commite4b2356c07d31fbeeabb13b2fb47db703b473080 (patch)
treed8b7f1c7c9e7c84d84349485f942dd205dd4c16d /src/mesa/drivers/dri/common/spantmp.h
parentebef61f5c0950572f9c6a81b08f447957461675c (diff)
Major check-in of changes for GL_EXT_framebuffer_object extension.
Main driver impacts: - new code for creating the Mesa GLframebuffer - new span/pixel read/write code Some drivers not yet updated/tested.
Diffstat (limited to 'src/mesa/drivers/dri/common/spantmp.h')
-rw-r--r--src/mesa/drivers/dri/common/spantmp.h54
1 files changed, 32 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/common/spantmp.h b/src/mesa/drivers/dri/common/spantmp.h
index 96f26333fc..b15bbb2577 100644
--- a/src/mesa/drivers/dri/common/spantmp.h
+++ b/src/mesa/drivers/dri/common/spantmp.h
@@ -56,13 +56,14 @@
#endif
-static void TAG(WriteRGBASpan)( const GLcontext *ctx,
+static void TAG(WriteRGBASpan)( GLcontext *ctx,
+ struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
- const GLubyte rgba[][4],
- const GLubyte mask[] )
+ const void *values, const GLubyte mask[] )
{
HW_WRITE_LOCK()
{
+ const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values;
GLint x1;
GLint n1;
LOCAL_VARS;
@@ -98,13 +99,14 @@ static void TAG(WriteRGBASpan)( const GLcontext *ctx,
HW_WRITE_UNLOCK();
}
-static void TAG(WriteRGBSpan)( const GLcontext *ctx,
+static void TAG(WriteRGBSpan)( GLcontext *ctx,
+ struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
- const GLubyte rgb[][3],
- const GLubyte mask[] )
+ const void *values, const GLubyte mask[] )
{
HW_WRITE_LOCK()
{
+ const GLubyte (*rgb)[3] = (const GLubyte (*)[3]) values;
GLint x1;
GLint n1;
LOCAL_VARS;
@@ -136,15 +138,14 @@ static void TAG(WriteRGBSpan)( const GLcontext *ctx,
HW_WRITE_UNLOCK();
}
-static void TAG(WriteRGBAPixels)( const GLcontext *ctx,
- GLuint n,
- const GLint x[],
- const GLint y[],
- const GLubyte rgba[][4],
- const GLubyte mask[] )
+static void TAG(WriteRGBAPixels)( GLcontext *ctx,
+ struct gl_renderbuffer *rb,
+ GLuint n, const GLint x[], const GLint y[],
+ const void *values, const GLubyte mask[] )
{
HW_WRITE_LOCK()
{
+ const GLubyte (*rgba)[4] = (const GLubyte (*)[4]) values;
GLuint i;
LOCAL_VARS;
@@ -183,13 +184,15 @@ static void TAG(WriteRGBAPixels)( const GLcontext *ctx,
}
-static void TAG(WriteMonoRGBASpan)( const GLcontext *ctx,
+static void TAG(WriteMonoRGBASpan)( GLcontext *ctx,
+ struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
- const GLchan color[4],
+ const void *value,
const GLubyte mask[] )
{
HW_WRITE_LOCK()
{
+ const GLubyte *color = (const GLubyte *) value;
GLint x1;
GLint n1;
LOCAL_VARS;
@@ -221,14 +224,16 @@ static void TAG(WriteMonoRGBASpan)( const GLcontext *ctx,
}
-static void TAG(WriteMonoRGBAPixels)( const GLcontext *ctx,
+static void TAG(WriteMonoRGBAPixels)( GLcontext *ctx,
+ struct gl_renderbuffer *rb,
GLuint n,
- const GLint x[], const GLint y[],
- const GLchan color[],
- const GLubyte mask[] )
+ const GLint x[], const GLint y[],
+ const void *value,
+ const GLubyte mask[] )
{
HW_WRITE_LOCK()
{
+ const GLubyte *color = (const GLubyte *) value;
GLuint i;
LOCAL_VARS;
INIT_MONO_PIXEL(p, color);
@@ -261,12 +266,14 @@ static void TAG(WriteMonoRGBAPixels)( const GLcontext *ctx,
}
-static void TAG(ReadRGBASpan)( const GLcontext *ctx,
+static void TAG(ReadRGBASpan)( GLcontext *ctx,
+ struct gl_renderbuffer *rb,
GLuint n, GLint x, GLint y,
- GLubyte rgba[][4])
+ void *values)
{
HW_READ_LOCK()
{
+ GLubyte (*rgba)[4] = (GLubyte (*)[4]) values;
GLint x1,n1;
LOCAL_VARS;
@@ -287,12 +294,15 @@ static void TAG(ReadRGBASpan)( const GLcontext *ctx,
}
-static void TAG(ReadRGBAPixels)( const GLcontext *ctx,
+static void TAG(ReadRGBAPixels)( GLcontext *ctx,
+ struct gl_renderbuffer *rb,
GLuint n, const GLint x[], const GLint y[],
- GLubyte rgba[][4], const GLubyte mask[] )
+ void *values )
{
HW_READ_LOCK()
{
+ GLubyte (*rgba)[4] = (GLubyte (*)[4]) values;
+ const GLubyte *mask = NULL; /* remove someday */
GLuint i;
LOCAL_VARS;