Module: wine Branch: master Commit: e8ac9bbd7f5484de9a33c2d6402971274c30ff75 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e8ac9bbd7f5484de9a33c2d640...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue May 25 12:02:04 2010 +0200
wined3d: Get rid of GLINFO_LOCATION.
---
dlls/wined3d/arb_program_shader.c | 3 --- dlls/wined3d/ati_fragment_shader.c | 2 -- dlls/wined3d/buffer.c | 2 -- dlls/wined3d/context.c | 2 -- dlls/wined3d/device.c | 1 - dlls/wined3d/directx.c | 1 - dlls/wined3d/drawprim.c | 1 - dlls/wined3d/glsl_shader.c | 2 -- dlls/wined3d/nvidia_texture_shader.c | 2 -- dlls/wined3d/query.c | 1 - dlls/wined3d/state.c | 3 --- dlls/wined3d/surface.c | 2 -- dlls/wined3d/surface_base.c | 3 --- dlls/wined3d/swapchain.c | 2 -- dlls/wined3d/volume.c | 2 -- dlls/wined3d/wined3d_private.h | 2 +- 16 files changed, 1 insertions(+), 30 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 97840e5..0824fed 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -39,8 +39,6 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_constants); WINE_DECLARE_DEBUG_CHANNEL(d3d_caps); WINE_DECLARE_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION (*gl_info) - /* Extract a line. Note that this modifies the source string. */ static char *get_line(char **ptr) { @@ -5873,7 +5871,6 @@ static void gen_ffp_instr(struct wined3d_shader_buffer *buffer, unsigned int sta } }
-/* The stateblock is passed for GLINFO_LOCATION */ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, IWineD3DStateBlockImpl *stateblock) { const struct wined3d_gl_info *gl_info = &stateblock->device->adapter->gl_info; diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 344daf6..993ece0 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -28,8 +28,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader); WINE_DECLARE_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION (*gl_info) - /* GL locking for state handlers is done by the caller. */
/* Some private defines, Constant associations, etc. diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 73d5327..daece20 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -29,8 +29,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION (*gl_info) - #define VB_MAXDECLCHANGES 100 /* After that number of decl changes we stop converting */ #define VB_RESETDECLCHANGE 1000 /* Reset the decl changecount after that number of draws */ #define VB_MAXFULLCONVERSIONS 5 /* Number of full conversions before we stop converting */ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index e6eb50f..5304af2 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -28,8 +28,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION (*gl_info) - static DWORD wined3d_context_tls_idx;
/* FBO helper functions */ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 498efea..7eb9153 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -34,7 +34,6 @@ #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d); -#define GLINFO_LOCATION (*gl_info)
/* Define the default light parameters as specified by MSDN */ const WINED3DLIGHT WINED3D_default_light = { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 07120ec..ded549a 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -30,7 +30,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); WINE_DECLARE_DEBUG_CHANNEL(d3d_caps);
-#define GLINFO_LOCATION (*gl_info) #define WINE_DEFAULT_VIDMEM (64 * 1024 * 1024)
/* The d3d device ID */ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 4978ee5..b36ef5b 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -28,7 +28,6 @@ #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw); -#define GLINFO_LOCATION (*gl_info)
#include <stdio.h> #include <math.h> diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 54a78b1..056e9ad 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -39,8 +39,6 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_constants); WINE_DECLARE_DEBUG_CHANNEL(d3d_caps); WINE_DECLARE_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION (*gl_info) - #define WINED3D_GLSL_SAMPLE_PROJECTED 0x1 #define WINED3D_GLSL_SAMPLE_RECT 0x2 #define WINED3D_GLSL_SAMPLE_LOD 0x4 diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index d22989d..24cba32 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -28,8 +28,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION (*gl_info) - /* GL locking for state handlers is done by the caller. */
static void nvts_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index 5552bb1..b3c77ea 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -25,7 +25,6 @@ #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d); -#define GLINFO_LOCATION (*gl_info)
BOOL wined3d_event_query_supported(const struct wined3d_gl_info *gl_info) { diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 7a4f57f..4c6d5bf 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -35,8 +35,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); WINE_DECLARE_DEBUG_CHANNEL(d3d_shader);
-#define GLINFO_LOCATION (*gl_info) - /* GL locking for state handlers is done by the caller. */
static void state_blendop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context); @@ -5545,7 +5543,6 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = { { STATE_SAMPLER(7), { STATE_SAMPLER(7), sampler_texdim }, WINED3D_GL_EXT_NONE }, {0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE }, }; -#undef GLINFO_LOCATION
/* Context activation is done by the caller. */ static void ffp_enable(IWineD3DDevice *iface, BOOL enable) { } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index ca796c5..0903f6e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -34,8 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); WINE_DECLARE_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION (*gl_info) - static void surface_cleanup(IWineD3DSurfaceImpl *This) { IWineD3DDeviceImpl *device = This->resource.device; diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index b674f9d..2b6cdb4 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -83,9 +83,6 @@ static inline unsigned short float_32_to_16(const float *in) return ret; }
- -/* Do NOT define GLINFO_LOCATION in this file. THIS CODE MUST NOT USE IT */ - /* ******************************************* IWineD3DSurface IUnknown parts follow ******************************************* */ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 485329c..b0d591a 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -33,8 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); WINE_DECLARE_DEBUG_CHANNEL(fps);
-#define GLINFO_LOCATION (*gl_info) - /*IWineD3DSwapChain parts follow: */ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface) { diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 693ddd1..42e61e6 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -26,8 +26,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface);
-#define GLINFO_LOCATION (*gl_info) - /* Context activation is done by the caller. */ static void volume_bind_and_dirtify(IWineD3DVolume *iface) { IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 045d068..5c96d76 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -748,7 +748,7 @@ extern int num_lock DECLSPEC_HIDDEN;
/* GL related defines */ /* ------------------ */ -#define GL_EXTCALL(FuncName) (GLINFO_LOCATION.FuncName) +#define GL_EXTCALL(f) (gl_info->f)
#define D3DCOLOR_B_R(dw) (((dw) >> 16) & 0xFF) #define D3DCOLOR_B_G(dw) (((dw) >> 8) & 0xFF)