aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/windows
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/drivers/windows')
-rw-r--r--mesalib/src/mesa/drivers/windows/gdi/mesa.def13
-rw-r--r--mesalib/src/mesa/drivers/windows/gdi/wmesa.c61
-rw-r--r--mesalib/src/mesa/drivers/windows/gdi/wmesadef.h2
-rw-r--r--mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c2
-rw-r--r--mesalib/src/mesa/drivers/windows/icd/mesa.def6
5 files changed, 23 insertions, 61 deletions
diff --git a/mesalib/src/mesa/drivers/windows/gdi/mesa.def b/mesalib/src/mesa/drivers/windows/gdi/mesa.def
index 62f75d954..b537b3460 100644
--- a/mesalib/src/mesa/drivers/windows/gdi/mesa.def
+++ b/mesalib/src/mesa/drivers/windows/gdi/mesa.def
@@ -867,10 +867,8 @@ EXPORTS
_glapi_get_proc_address
_mesa_add_soft_renderbuffers
_mesa_add_renderbuffer
- _mesa_bzero
- _mesa_calloc
+ _mesa_check_conditional_render
_mesa_choose_tex_format
- _mesa_compressed_texture_size
_mesa_create_framebuffer
_mesa_create_visual
_mesa_delete_array_object
@@ -887,7 +885,6 @@ EXPORTS
_mesa_error
_mesa_finish_render_texture
_mesa_framebuffer_renderbuffer
- _mesa_free
_mesa_free_context_data
_mesa_free_texture_image_data
_mesa_generate_mipmap
@@ -899,8 +896,6 @@ EXPORTS
_mesa_init_renderbuffer
_mesa_initialize_context
_mesa_make_current
- _mesa_memcpy
- _mesa_memset
_mesa_new_array_object
_mesa_new_framebuffer
_mesa_new_program
@@ -926,12 +921,13 @@ EXPORTS
_mesa_store_texsubimage1d
_mesa_store_texsubimage2d
_mesa_store_texsubimage3d
- _mesa_strcmp
_mesa_test_proxy_teximage
_mesa_reference_framebuffer
_mesa_update_framebuffer_visual
_mesa_use_program
_mesa_Viewport
+ _mesa_meta_init
+ _mesa_meta_free
_mesa_meta_CopyColorSubTable
_mesa_meta_CopyColorTable
_mesa_meta_CopyConvolutionFilter1D
@@ -941,7 +937,6 @@ EXPORTS
_mesa_meta_CopyTexSubImage1D
_mesa_meta_CopyTexSubImage2D
_mesa_meta_CopyTexSubImage3D
- _mesa_wait_query
_swrast_Accum
_swrast_Bitmap
_swrast_BlitFramebuffer
@@ -965,4 +960,4 @@ EXPORTS
_tnl_InvalidateState
_tnl_run_pipeline
_tnl_program_string
- _tnl_RasterPos \ No newline at end of file
+ _tnl_RasterPos
diff --git a/mesalib/src/mesa/drivers/windows/gdi/wmesa.c b/mesalib/src/mesa/drivers/windows/gdi/wmesa.c
index 8929b22af..22b0c46b4 100644
--- a/mesalib/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/mesalib/src/mesa/drivers/windows/gdi/wmesa.c
@@ -35,7 +35,7 @@ wmesa_new_framebuffer(HDC hdc, GLvisual *visual)
WMesaFramebuffer pwfb
= (WMesaFramebuffer) malloc(sizeof(struct wmesa_framebuffer));
if (pwfb) {
- _mesa_initialize_framebuffer(&pwfb->Base, visual);
+ _mesa_initialize_window_framebuffer(&pwfb->Base, visual);
pwfb->hDC = hdc;
/* insert at head of list */
pwfb->next = FirstFramebuffer;
@@ -248,16 +248,6 @@ static void wmesa_flush(GLcontext *ctx)
*/
/*
- * Set the color index used to clear the color buffer.
- */
-static void clear_index(GLcontext *ctx, GLuint index)
-{
- WMesaContext pwc = wmesa_context(ctx);
- /* Note that indexed mode is not supported yet */
- pwc->clearColorRef = RGB(0,0,0);
-}
-
-/*
* Set the color used to clear the color buffer.
*/
static void clear_color(GLcontext *ctx, const GLfloat color[4])
@@ -301,10 +291,10 @@ static void clear(GLcontext *ctx, GLbitfield mask)
/* Let swrast do all the work if the masks are not set to
* clear all channels. */
- if (ctx->Color.ColorMask[0] != 0xff ||
- ctx->Color.ColorMask[1] != 0xff ||
- ctx->Color.ColorMask[2] != 0xff ||
- ctx->Color.ColorMask[3] != 0xff) {
+ if (!ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3]) {
_swrast_Clear(ctx, mask);
return;
}
@@ -482,7 +472,7 @@ static void write_rgba_span_front(const GLcontext *ctx,
};
} BGRA;
BGRA *bgra, c;
- int i;
+ GLuint i;
if (n < 16) { // the value 16 is just guessed
y=FLIP(y);
@@ -827,9 +817,9 @@ static void read_rgba_span_32(const GLcontext *ctx,
lpdw = ((LPDWORD)(pwfb->pbPixels + pwfb->ScanWidth * y)) + x;
for (i=0; i<n; i++) {
pixel = lpdw[i];
- rgba[i][RCOMP] = (pixel & 0x00ff0000) >> 16;
- rgba[i][GCOMP] = (pixel & 0x0000ff00) >> 8;
- rgba[i][BCOMP] = (pixel & 0x000000ff);
+ rgba[i][RCOMP] = (GLubyte)((pixel & 0x00ff0000) >> 16);
+ rgba[i][GCOMP] = (GLubyte)((pixel & 0x0000ff00) >> 8);
+ rgba[i][BCOMP] = (GLubyte)(pixel & 0x000000ff);
rgba[i][ACOMP] = 255;
}
}
@@ -851,9 +841,9 @@ static void read_rgba_pixels_32(const GLcontext *ctx,
GLint y2 = FLIP(y[i]);
lpdw = ((LPDWORD)(pwfb->pbPixels + pwfb->ScanWidth * y2)) + x[i];
pixel = *lpdw;
- rgba[i][RCOMP] = (pixel & 0x00ff0000) >> 16;
- rgba[i][GCOMP] = (pixel & 0x0000ff00) >> 8;
- rgba[i][BCOMP] = (pixel & 0x000000ff);
+ rgba[i][RCOMP] = (GLubyte)((pixel & 0x00ff0000) >> 16);
+ rgba[i][GCOMP] = (GLubyte)((pixel & 0x0000ff00) >> 8);
+ rgba[i][BCOMP] = (GLubyte)(pixel & 0x000000ff);
rgba[i][ACOMP] = 255;
}
}
@@ -1245,7 +1235,7 @@ static void read_rgba_pixels_16(const GLcontext *ctx,
static void
wmesa_delete_renderbuffer(struct gl_renderbuffer *rb)
{
- _mesa_free(rb);
+ free(rb);
}
@@ -1271,7 +1261,7 @@ wmesa_renderbuffer_storage(GLcontext *ctx,
* on if we're drawing to the front or back color buffer.
*/
void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat,
- BYTE cColorBits, int double_buffer)
+ int cColorBits, int double_buffer)
{
if (double_buffer) {
/* back buffer */
@@ -1286,9 +1276,6 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat,
rb->PutMonoValues = write_mono_rgba_pixels_16;
rb->GetRow = read_rgba_span_16;
rb->GetValues = read_rgba_pixels_16;
- rb->RedBits = 5;
- rb->GreenBits = 6;
- rb->BlueBits = 5;
break;
case PF_8R8G8B:
if (cColorBits == 24)
@@ -1300,9 +1287,6 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat,
rb->PutMonoValues = write_mono_rgba_pixels_24;
rb->GetRow = read_rgba_span_24;
rb->GetValues = read_rgba_pixels_24;
- rb->RedBits = 8;
- rb->GreenBits = 8;
- rb->BlueBits = 8;
}
else
{
@@ -1313,9 +1297,6 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat,
rb->PutMonoValues = write_mono_rgba_pixels_32;
rb->GetRow = read_rgba_span_32;
rb->GetValues = read_rgba_pixels_32;
- rb->RedBits = 8;
- rb->GreenBits = 8;
- rb->BlueBits = 8;
}
break;
default:
@@ -1331,9 +1312,6 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat,
rb->PutMonoValues = write_mono_rgba_pixels_front;
rb->GetRow = read_rgba_span_front;
rb->GetValues = read_rgba_pixels_front;
- rb->RedBits = 8; /* XXX fix these (565?) */
- rb->GreenBits = 8;
- rb->BlueBits = 8;
}
}
@@ -1473,12 +1451,10 @@ WMesaContext WMesaCreateContext(HDC hDC,
break;
}
/* Create visual based on flags */
- visual = _mesa_create_visual(rgb_flag,
- db_flag, /* db_flag */
+ visual = _mesa_create_visual(db_flag, /* db_flag */
GL_FALSE, /* stereo */
red_bits, green_bits, blue_bits, /* color RGB */
alpha_flag ? alpha_bits : 0, /* color A */
- 0, /* index bits */
DEFAULT_SOFTWARE_DEPTH_BITS, /* depth_bits */
8, /* stencil_bits */
16,16,16, /* accum RGB */
@@ -1486,7 +1462,7 @@ WMesaContext WMesaCreateContext(HDC hDC,
1); /* num samples */
if (!visual) {
- _mesa_free(c);
+ free(c);
return NULL;
}
@@ -1497,7 +1473,6 @@ WMesaContext WMesaCreateContext(HDC hDC,
functions.GetBufferSize = wmesa_get_buffer_size;
functions.Flush = wmesa_flush;
functions.Clear = clear;
- functions.ClearIndex = clear_index;
functions.ClearColor = clear_color;
functions.ResizeBuffers = wmesa_resize_buffers;
functions.Viewport = wmesa_viewport;
@@ -1524,7 +1499,7 @@ WMesaContext WMesaCreateContext(HDC hDC,
!_tnl_CreateContext(ctx) ||
!_swsetup_CreateContext(ctx)) {
_mesa_free_context_data(ctx);
- _mesa_free(c);
+ free(c);
return NULL;
}
_swsetup_Wakeup(ctx);
@@ -1569,7 +1544,7 @@ void WMesaDestroyContext( WMesaContext pwc )
_swrast_DestroyContext(ctx);
_mesa_free_context_data(ctx);
- _mesa_free(pwc);
+ free(pwc);
}
diff --git a/mesalib/src/mesa/drivers/windows/gdi/wmesadef.h b/mesalib/src/mesa/drivers/windows/gdi/wmesadef.h
index 83a42e608..1c0e24511 100644
--- a/mesalib/src/mesa/drivers/windows/gdi/wmesadef.h
+++ b/mesalib/src/mesa/drivers/windows/gdi/wmesadef.h
@@ -27,7 +27,7 @@ struct wmesa_framebuffer
HDC hDC;
int pixelformat;
GLuint ScanWidth;
- BYTE cColorBits;
+ int cColorBits;
/* back buffer DIB fields */
HDC dib_hDC;
BITMAPINFO bmi;
diff --git a/mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c b/mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c
index e9c23d1cc..a420b36ff 100644
--- a/mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c
+++ b/mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c
@@ -1377,14 +1377,12 @@ SkipPrimaryCreate:
#ifdef _USE_GLD3_WGL
lpCtx->glVis = _mesa_create_visual(
- GL_TRUE, // RGB mode
bDouble, /* double buffer */
GL_FALSE, // stereo
lpPFD->cRedBits,
lpPFD->cGreenBits,
lpPFD->cBlueBits,
dwAlphaBits,
- 0, // index bits
dwDepthBits,
dwStencilBits,
lpPFD->cAccumRedBits, // accum bits
diff --git a/mesalib/src/mesa/drivers/windows/icd/mesa.def b/mesalib/src/mesa/drivers/windows/icd/mesa.def
index 25ac08a2f..6f33d170f 100644
--- a/mesalib/src/mesa/drivers/windows/icd/mesa.def
+++ b/mesalib/src/mesa/drivers/windows/icd/mesa.def
@@ -32,8 +32,6 @@ EXPORTS
_mesa_buffer_data
_mesa_buffer_map
_mesa_buffer_subdata
- _mesa_bzero
- _mesa_calloc
_mesa_choose_tex_format
_mesa_compressed_texture_size
_mesa_create_framebuffer
@@ -47,15 +45,12 @@ EXPORTS
_mesa_enable_1_5_extensions
_mesa_enable_sw_extensions
_mesa_error
- _mesa_free
_mesa_free_context_data
_mesa_get_current_context
_mesa_init_default_imports
_mesa_init_driver_functions
_mesa_initialize_context
_mesa_make_current
- _mesa_memcpy
- _mesa_memset
_mesa_new_buffer_object
_mesa_new_texture_object
_mesa_problem
@@ -72,7 +67,6 @@ EXPORTS
_mesa_store_texsubimage1d
_mesa_store_texsubimage2d
_mesa_store_texsubimage3d
- _mesa_strcmp
_mesa_test_proxy_teximage
_mesa_Viewport
_mesa_meta_CopyColorSubTable