summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/windows')
-rw-r--r--src/mesa/drivers/windows/gdi/mesa.def29
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c5
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c20
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c20
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c20
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c26
-rw-r--r--src/mesa/drivers/windows/icd/mesa.def18
10 files changed, 58 insertions, 86 deletions
diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def
index bd3e5b2137..62f75d9541 100644
--- a/src/mesa/drivers/windows/gdi/mesa.def
+++ b/src/mesa/drivers/windows/gdi/mesa.def
@@ -867,12 +867,6 @@ EXPORTS
_glapi_get_proc_address
_mesa_add_soft_renderbuffers
_mesa_add_renderbuffer
- _mesa_begin_query
- _mesa_buffer_data
- _mesa_buffer_get_subdata
- _mesa_buffer_map
- _mesa_buffer_subdata
- _mesa_buffer_unmap
_mesa_bzero
_mesa_calloc
_mesa_choose_tex_format
@@ -880,9 +874,7 @@ EXPORTS
_mesa_create_framebuffer
_mesa_create_visual
_mesa_delete_array_object
- _mesa_delete_buffer_object
_mesa_delete_program
- _mesa_delete_query
_mesa_delete_texture_object
_mesa_destroy_framebuffer
_mesa_destroy_visual
@@ -892,7 +884,6 @@ EXPORTS
_mesa_enable_2_0_extensions
_mesa_enable_2_1_extensions
_mesa_enable_sw_extensions
- _mesa_end_query
_mesa_error
_mesa_finish_render_texture
_mesa_framebuffer_renderbuffer
@@ -911,10 +902,8 @@ EXPORTS
_mesa_memcpy
_mesa_memset
_mesa_new_array_object
- _mesa_new_buffer_object
_mesa_new_framebuffer
_mesa_new_program
- _mesa_new_query_object
_mesa_new_renderbuffer
_mesa_new_soft_renderbuffer
_mesa_new_texture_image
@@ -943,6 +932,15 @@ EXPORTS
_mesa_update_framebuffer_visual
_mesa_use_program
_mesa_Viewport
+ _mesa_meta_CopyColorSubTable
+ _mesa_meta_CopyColorTable
+ _mesa_meta_CopyConvolutionFilter1D
+ _mesa_meta_CopyConvolutionFilter2D
+ _mesa_meta_CopyTexImage1D
+ _mesa_meta_CopyTexImage2D
+ _mesa_meta_CopyTexSubImage1D
+ _mesa_meta_CopyTexSubImage2D
+ _mesa_meta_CopyTexSubImage3D
_mesa_wait_query
_swrast_Accum
_swrast_Bitmap
@@ -953,15 +951,6 @@ EXPORTS
_swrast_Clear
_swrast_choose_line
_swrast_choose_triangle
- _swrast_CopyColorSubTable
- _swrast_CopyColorTable
- _swrast_CopyConvolutionFilter1D
- _swrast_CopyConvolutionFilter2D
- _swrast_copy_teximage1d
- _swrast_copy_teximage2d
- _swrast_copy_texsubimage1d
- _swrast_copy_texsubimage2d
- _swrast_copy_texsubimage3d
_swrast_CreateContext
_swrast_DestroyContext
_swrast_exec_fragment_program
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index e1971db693..8929b22af1 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -12,6 +12,7 @@
#include "framebuffer.h"
#include "renderbuffer.h"
#include "drivers/common/driverfuncs.h"
+#include "drivers/common/meta.h"
#include "vbo/vbo.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
@@ -1515,6 +1516,8 @@ WMesaContext WMesaCreateContext(HDC hDC,
_mesa_enable_2_0_extensions(ctx);
_mesa_enable_2_1_extensions(ctx);
+ _mesa_meta_init(ctx);
+
/* Initialize the software rasterizer and helper modules. */
if (!_swrast_CreateContext(ctx) ||
!_vbo_CreateContext(ctx) ||
@@ -1558,6 +1561,8 @@ void WMesaDestroyContext( WMesaContext pwc )
DeleteObject(pwc->clearPen);
DeleteObject(pwc->clearBrush);
+ _mesa_meta_free(ctx);
+
_swsetup_DestroyContext(ctx);
_tnl_DestroyContext(ctx);
_vbo_DestroyContext(ctx);
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
index c99ba0bba5..0b373814fe 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
@@ -189,9 +189,9 @@
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
- if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
+ vbcolor = (GLchan (*)[4])VB->BackfaceColorPtr->data; \
+ if (VB->BackfaceSecondaryColorPtr) { \
+ vbspec = (GLchan (*)[4])VB->BackfaceSecondaryColorPtr->data; \
} else { \
vbspec = NULL; \
} \
@@ -241,33 +241,33 @@
DWORD dwColor;
#define GLD_SETUP_3D_VERTEX(v) \
- p4f = VB->ObjPtr->data; \
+ p4f = VB->AttribPtr[_TNL_ATTRIB_POS]->data; \
pV->Position.x = p4f[##v][0]; \
pV->Position.y = p4f[##v][1]; \
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
pV->Diffuse = dwColor;
#define GLD_SETUP_TEX0_3D(v) \
- if (VB->TexCoordPtr[0]) { \
- tc = VB->TexCoordPtr[0]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]) { \
+ tc = VB->AttribPtr[_TNL_ATTRIB_TEX0]->data; \
pV->TexUnit0.x = tc[##v][0]; \
pV->TexUnit0.y = tc[##v][1]; \
}
#define GLD_SETUP_TEX1_3D(v) \
- if (VB->TexCoordPtr[1]) { \
- tc = VB->TexCoordPtr[1]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]) { \
+ tc = VB->AttribPtr[_TNL_ATTRIB_TEX1]->data; \
pV->TexUnit1.x = tc[##v][0]; \
pV->TexUnit1.y = tc[##v][1]; \
}
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
index a85620dde8..c39775cad3 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
@@ -151,7 +151,7 @@ static GLboolean gld_d3d_render_stage_run(
#if 0
// For debugging: Useful to see if an app passes colour data in
// an unusual format.
- switch (VB->ColorPtr[0]->Type) {
+ switch (VB->AttribPtr[_TNL_ATTRIB_COLOR0]->Type) {
case GL_FLOAT:
ddlogMessage(GLDLOG_SYSTEM, "ColorPtr: GL_FLOAT\n");
break;
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
index a5b5462f03..990922580a 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
@@ -189,9 +189,9 @@
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
- if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
+ vbcolor = (GLchan (*)[4])VB->BackfaceColorPtr->data; \
+ if (VB->BackfaceSecondaryColorPtr) { \
+ vbspec = (GLchan (*)[4])VB->BackfaceSecondaryColorPtr->data; \
} else { \
vbspec = NULL; \
} \
@@ -241,33 +241,33 @@
DWORD dwColor;
#define GLD_SETUP_3D_VERTEX(v) \
- p4f = VB->ObjPtr->data; \
+ p4f = VB->AttribPtr[_TNL_ATTRIB_POS]->data; \
pV->Position.x = p4f[##v][0]; \
pV->Position.y = p4f[##v][1]; \
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
pV->Diffuse = dwColor;
#define GLD_SETUP_TEX0_3D(v) \
- if (VB->TexCoordPtr[0]) { \
- tc = VB->TexCoordPtr[0]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]) { \
+ tc = VB->TnlAttribPtr[_TNL_ATTRIB_TEX0]->data; \
pV->TexUnit0.x = tc[##v][0]; \
pV->TexUnit0.y = tc[##v][1]; \
}
#define GLD_SETUP_TEX1_3D(v) \
- if (VB->TexCoordPtr[1]) { \
- tc = VB->TexCoordPtr[1]->data; \
+ if (VB->TnlAttribPtr[_TNL_ATTRIB_TEX1]) { \
+ tc = VB->TnlAttribPtr[_TNL_ATTRIB_TEX1]->data; \
pV->TexUnit1.x = tc[##v][0]; \
pV->TexUnit1.y = tc[##v][1]; \
}
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
index cafbf4f5c5..265c81fb4a 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
@@ -149,7 +149,7 @@ static GLboolean gld_d3d_render_stage_run(
#if 0
// For debugging: Useful to see if an app passes colour data in
// an unusual format.
- switch (VB->ColorPtr[0]->Type) {
+ switch (VB->AttribPtr[_TNL_ATTRIB_COLOR0]->Type) {
case GL_FLOAT:
ddlogMessage(GLDLOG_SYSTEM, "ColorPtr: GL_FLOAT\n");
break;
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
index 403a9d5f86..fd4dd4ed75 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
@@ -189,9 +189,9 @@
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
- if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
+ vbcolor = (GLchan (*)[4])VB->BackfaceColorPtr->data; \
+ if (VB->BackfaceSecondaryColorPtr) { \
+ vbspec = (GLchan (*)[4])VB->BackfaceSecondaryColorPtr->data; \
} else { \
vbspec = NULL; \
} \
@@ -241,33 +241,33 @@
DWORD dwColor;
#define GLD_SETUP_3D_VERTEX(v) \
- p4f = VB->ObjPtr->data; \
+ p4f = VB->AttribPtr[_TNL_ATTRIB_POS]->data; \
pV->Position.x = p4f[##v][0]; \
pV->Position.y = p4f[##v][1]; \
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR00]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
pV->Diffuse = dwColor;
#define GLD_SETUP_TEX0_3D(v) \
- if (VB->TexCoordPtr[0]) { \
- tc = VB->TexCoordPtr[0]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]) { \
+ tc = VB->AttribPtr[_TNL_ATTRIB_TEX0]->data; \
pV->TexUnit0.x = tc[##v][0]; \
pV->TexUnit0.y = tc[##v][1]; \
}
#define GLD_SETUP_TEX1_3D(v) \
- if (VB->TexCoordPtr[1]) { \
- tc = VB->TexCoordPtr[1]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]) { \
+ tc = VB->AttribPtr[_TNL_ATTRIB_TEX1]->data; \
pV->TexUnit1.x = tc[##v][0]; \
pV->TexUnit1.y = tc[##v][1]; \
}
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
index 4fa6bcaf1a..91a68b3f2d 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
@@ -149,7 +149,7 @@ static GLboolean gld_d3d_render_stage_run(
#if 0
// For debugging: Useful to see if an app passes colour data in
// an unusual format.
- switch (VB->ColorPtr[0]->Type) {
+ switch (VB->AttribPtr[_TNL_ATTRIB_COLOR0]->Type) {
case GL_FLOAT:
ddlogMessage(GLDLOG_SYSTEM, "ColorPtr: GL_FLOAT\n");
break;
diff --git a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
index 342a742867..7ac425a109 100644
--- a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
+++ b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c
@@ -1346,6 +1346,8 @@ static void wmesa_update_state_first_time(
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference( ctx );
TNLcontext *tnl = TNL_CONTEXT(ctx);
+ _mesa_init_driver_functions(&ctx->Driver);
+
/*
* XXX these function pointers could be initialized just once during
* context creation since they don't depend on any state changes.
@@ -1362,8 +1364,6 @@ static void wmesa_update_state_first_time(
ctx->Driver.Viewport = wmesa_viewport;
- ctx->Driver.Accum = _swrast_Accum;
- ctx->Driver.Bitmap = _swrast_Bitmap;
ctx->Driver.Clear = clear;
ctx->Driver.Flush = flush;
@@ -1371,28 +1371,6 @@ static void wmesa_update_state_first_time(
ctx->Driver.ClearColor = clear_color;
ctx->Driver.Enable = enable;
- ctx->Driver.CopyPixels = _swrast_CopyPixels;
- ctx->Driver.DrawPixels = _swrast_DrawPixels;
- ctx->Driver.ReadPixels = _swrast_ReadPixels;
-
- ctx->Driver.ChooseTextureFormat = _mesa_choose_tex_format;
- ctx->Driver.TexImage1D = _mesa_store_teximage1d;
- ctx->Driver.TexImage2D = _mesa_store_teximage2d;
- ctx->Driver.TexImage3D = _mesa_store_teximage3d;
- ctx->Driver.TexSubImage1D = _mesa_store_texsubimage1d;
- ctx->Driver.TexSubImage2D = _mesa_store_texsubimage2d;
- ctx->Driver.TexSubImage3D = _mesa_store_texsubimage3d;
- ctx->Driver.TestProxyTexImage = _mesa_test_proxy_teximage;
-
- ctx->Driver.CopyTexImage1D = _swrast_copy_teximage1d;
- ctx->Driver.CopyTexImage2D = _swrast_copy_teximage2d;
- ctx->Driver.CopyTexSubImage1D = _swrast_copy_texsubimage1d;
- ctx->Driver.CopyTexSubImage2D = _swrast_copy_texsubimage2d;
- ctx->Driver.CopyTexSubImage3D = _swrast_copy_texsubimage3d;
- ctx->Driver.CopyColorTable = _swrast_CopyColorTable;
- ctx->Driver.CopyColorSubTable = _swrast_CopyColorSubTable;
- ctx->Driver.CopyConvolutionFilter1D = _swrast_CopyConvolutionFilter1D;
- ctx->Driver.CopyConvolutionFilter2D = _swrast_CopyConvolutionFilter2D;
// Does not apply for Mesa 5.x
//ctx->Driver.BaseCompressedTexFormat = _mesa_base_compressed_texformat;
diff --git a/src/mesa/drivers/windows/icd/mesa.def b/src/mesa/drivers/windows/icd/mesa.def
index 465b380a0c..25ac08a2f0 100644
--- a/src/mesa/drivers/windows/icd/mesa.def
+++ b/src/mesa/drivers/windows/icd/mesa.def
@@ -75,6 +75,15 @@ EXPORTS
_mesa_strcmp
_mesa_test_proxy_teximage
_mesa_Viewport
+ _mesa_meta_CopyColorSubTable
+ _mesa_meta_CopyColorTable
+ _mesa_meta_CopyConvolutionFilter1D
+ _mesa_meta_CopyConvolutionFilter2D
+ _mesa_meta_CopyTexImage1D
+ _mesa_meta_CopyTexImage2D
+ _mesa_meta_CopyTexSubImage1D
+ _mesa_meta_CopyTexSubImage2D
+ _mesa_meta_CopyTexSubImage3D
_swrast_Accum
_swrast_Bitmap
_swrast_CopyPixels
@@ -84,15 +93,6 @@ EXPORTS
_swrast_Clear
_swrast_choose_line
_swrast_choose_triangle
- _swrast_CopyColorSubTable
- _swrast_CopyColorTable
- _swrast_CopyConvolutionFilter1D
- _swrast_CopyConvolutionFilter2D
- _swrast_copy_teximage1d
- _swrast_copy_teximage2d
- _swrast_copy_texsubimage1d
- _swrast_copy_texsubimage2d
- _swrast_copy_texsubimage3d
_swrast_CreateContext
_swrast_DestroyContext
_swrast_InvalidateState