VirtualBox

Ignore:
Timestamp:
Oct 6, 2009 6:07:06 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53228
Message:

crOpenGL: update to wine 1.1.30

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h

    r22496 r23571  
    143143}
    144144
    145 void *wined3d_rb_alloc(size_t size);
    146 void *wined3d_rb_realloc(void *ptr, size_t size);
    147 void wined3d_rb_free(void *ptr);
     145void *wined3d_rb_alloc(size_t size) DECLSPEC_HIDDEN;
     146void *wined3d_rb_realloc(void *ptr, size_t size) DECLSPEC_HIDDEN;
     147void wined3d_rb_free(void *ptr) DECLSPEC_HIDDEN;
    148148
    149149/* Device caps */
     
    165165#define NUM_SAVEDVERTEXSTATES_S    1
    166166
    167 extern const DWORD SavedPixelStates_R[NUM_SAVEDPIXELSTATES_R];
    168 extern const DWORD SavedPixelStates_T[NUM_SAVEDPIXELSTATES_T];
    169 extern const DWORD SavedPixelStates_S[NUM_SAVEDPIXELSTATES_S];
    170 extern const DWORD SavedVertexStates_R[NUM_SAVEDVERTEXSTATES_R];
    171 extern const DWORD SavedVertexStates_T[NUM_SAVEDVERTEXSTATES_T];
    172 extern const DWORD SavedVertexStates_S[NUM_SAVEDVERTEXSTATES_S];
     167extern const DWORD SavedPixelStates_R[NUM_SAVEDPIXELSTATES_R] DECLSPEC_HIDDEN;
     168extern const DWORD SavedPixelStates_T[NUM_SAVEDPIXELSTATES_T] DECLSPEC_HIDDEN;
     169extern const DWORD SavedPixelStates_S[NUM_SAVEDPIXELSTATES_S] DECLSPEC_HIDDEN;
     170extern const DWORD SavedVertexStates_R[NUM_SAVEDVERTEXSTATES_R] DECLSPEC_HIDDEN;
     171extern const DWORD SavedVertexStates_T[NUM_SAVEDVERTEXSTATES_T] DECLSPEC_HIDDEN;
     172extern const DWORD SavedVertexStates_S[NUM_SAVEDVERTEXSTATES_S] DECLSPEC_HIDDEN;
    173173
    174174typedef enum _WINELOOKUP {
     
    177177} WINELOOKUP;
    178178
    179 extern const int minLookup[MAX_LOOKUPS];
    180 extern const int maxLookup[MAX_LOOKUPS];
    181 extern DWORD *stateLookup[MAX_LOOKUPS];
     179extern const int minLookup[MAX_LOOKUPS] DECLSPEC_HIDDEN;
     180extern const int maxLookup[MAX_LOOKUPS] DECLSPEC_HIDDEN;
     181extern DWORD *stateLookup[MAX_LOOKUPS] DECLSPEC_HIDDEN;
    182182
    183183struct min_lookup
     
    186186};
    187187
    188 const struct min_lookup minMipLookup[WINED3DTEXF_LINEAR + 1];
    189 const struct min_lookup minMipLookup_noFilter[WINED3DTEXF_LINEAR + 1];
    190 const GLenum magLookup[WINED3DTEXF_LINEAR + 1];
    191 const GLenum magLookup_noFilter[WINED3DTEXF_LINEAR + 1];
     188const struct min_lookup minMipLookup[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN;
     189const struct min_lookup minMipLookup_noFilter[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN;
     190const struct min_lookup minMipLookup_noMip[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN;
     191const GLenum magLookup[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN;
     192const GLenum magLookup_noFilter[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN;
    192193
    193194static inline GLenum wined3d_gl_mag_filter(const GLenum mag_lookup[], WINED3DTEXTUREFILTERTYPE mag_filter)
     
    259260
    260261/**
    261  * Settings 
     262 * Settings
    262263 */
    263264#define VS_NONE    0
     
    284285
    285286#define RTL_DISABLE   -1
    286 #define RTL_AUTO       0
    287287#define RTL_READDRAW   1
    288288#define RTL_READTEX    2
    289 #define RTL_TEXDRAW    3
    290 #define RTL_TEXTEX     4
    291289
    292290#define PCI_VENDOR_NONE 0xffff /* e.g. 0x8086 for Intel and 0x10de for Nvidia */
     
    299297  int vs_mode;
    300298  int ps_mode;
    301   int vbo_mode;
    302299/* Ideally, we don't want the user to have to request GLSL.  If the hardware supports GLSL,
    303300    we should use it.  However, until it's fully implemented, we'll leave it as a registry
     
    314311} wined3d_settings_t;
    315312
    316 extern wined3d_settings_t wined3d_settings;
     313extern wined3d_settings_t wined3d_settings DECLSPEC_HIDDEN;
    317314
    318315typedef enum _WINED3DSAMPLER_TEXTURE_TYPE
     
    648645{
    649646    struct wined3d_shader_version shader_version;
    650     char texcoord[MAX_REG_TEXCRD];          /* pixel < 3.0 */
    651     char temporary[MAX_REG_TEMP];           /* pixel, vertex */
    652     char address[MAX_REG_ADDR];             /* vertex */
    653     char labels[MAX_LABELS];                /* pixel, vertex */
     647    BYTE texcoord;                          /* MAX_REG_TEXCRD, 8 */
     648    BYTE address;                           /* MAX_REG_ADDR, 1 */
     649    WORD labels;                            /* MAX_LABELS, 16 */
     650    DWORD temporary;                        /* MAX_REG_TEMP, 32 */
    654651    DWORD *constf;                          /* pixel, vertex */
    655652    DWORD texcoord_mask[MAX_REG_TEXCRD];    /* vertex < 3.0 */
     
    662659
    663660    WINED3DSAMPLER_TEXTURE_TYPE sampler_type[max(MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS)];
    664     BOOL bumpmat[MAX_TEXTURES], luminanceparams[MAX_TEXTURES];
    665 
    666     unsigned usesnrm        : 1;
    667     unsigned vpos           : 1;
    668     unsigned usesdsx        : 1;
    669     unsigned usesdsy        : 1;
    670     unsigned usestexldd     : 1;
    671     unsigned usesmova       : 1;
    672     unsigned usesfacing     : 1;
    673     unsigned usesrelconstF  : 1;
    674     unsigned fog            : 1;
    675     unsigned usestexldl     : 1;
    676     unsigned usesifc        : 1;
    677     unsigned usescall       : 1;
    678     unsigned padding        : 4;
     661    BYTE bumpmat;                           /* MAX_TEXTURES, 8 */
     662    BYTE luminanceparams;                   /* MAX_TEXTURES, 8 */
     663
     664    WORD usesnrm        : 1;
     665    WORD vpos           : 1;
     666    WORD usesdsx        : 1;
     667    WORD usesdsy        : 1;
     668    WORD usestexldd     : 1;
     669    WORD usesmova       : 1;
     670    WORD usesfacing     : 1;
     671    WORD usesrelconstF  : 1;
     672    WORD fog            : 1;
     673    WORD usestexldl     : 1;
     674    WORD usesifc        : 1;
     675    WORD usescall       : 1;
     676    WORD padding        : 4;
    679677
    680678    /* Whether or not loops are used in this shader, and nesting depth */
     
    742740    WINED3DDECLUSAGE usage;
    743741    UINT usage_idx;
     742};
     743
     744struct wined3d_shader_loop_control
     745{
     746    unsigned int count;
     747    unsigned int start;
     748    int step;
    744749};
    745750
     
    759764};
    760765
    761 extern const struct wined3d_shader_frontend sm1_shader_frontend;
    762 extern const struct wined3d_shader_frontend sm4_shader_frontend;
     766extern const struct wined3d_shader_frontend sm1_shader_frontend DECLSPEC_HIDDEN;
     767extern const struct wined3d_shader_frontend sm4_shader_frontend DECLSPEC_HIDDEN;
    763768
    764769typedef void (*SHADER_HANDLER)(const struct wined3d_shader_instruction *);
     
    854859} shader_backend_t;
    855860
    856 extern const shader_backend_t glsl_shader_backend;
    857 extern const shader_backend_t arb_program_shader_backend;
    858 extern const shader_backend_t none_shader_backend;
     861extern const shader_backend_t glsl_shader_backend DECLSPEC_HIDDEN;
     862extern const shader_backend_t arb_program_shader_backend DECLSPEC_HIDDEN;
     863extern const shader_backend_t none_shader_backend DECLSPEC_HIDDEN;
    859864
    860865/* X11 locking */
    861866
    862 extern void (* CDECL wine_tsx11_lock_ptr)(void);
    863 extern void (* CDECL wine_tsx11_unlock_ptr)(void);
     867extern void (* CDECL wine_tsx11_lock_ptr)(void) DECLSPEC_HIDDEN;
     868extern void (* CDECL wine_tsx11_unlock_ptr)(void) DECLSPEC_HIDDEN;
    864869
    865870/* As GLX relies on X, this is needed */
    866 extern int num_lock;
     871extern int num_lock DECLSPEC_HIDDEN;
    867872
    868873#if 0
     
    954959
    955960/* Trace vector and strided data information */
    956 #define TRACE_VECTOR(name) TRACE( #name "=(%f, %f, %f, %f)\n", name.x, name.y, name.z, name.w);
    957 #define TRACE_STRIDED(si, name) TRACE( #name "=(data:%p, stride:%d, format:%#x, vbo %d, stream %u)\n", \
     961#define TRACE_VECTOR(name) TRACE( #name "=(%f, %f, %f, %f)\n", name.x, name.y, name.z, name.w)
     962#define TRACE_STRIDED(si, name) do { if (si->use_map & (1 << name)) \
     963        TRACE( #name "=(data:%p, stride:%d, format:%#x, vbo %d, stream %u)\n", \
    958964        si->elements[name].data, si->elements[name].stride, si->elements[name].format_desc->format, \
    959         si->elements[name].buffer_object, si->elements[name].stream_idx);
     965        si->elements[name].buffer_object, si->elements[name].stream_idx); } while(0)
    960966
    961967/* Defines used for optimizations */
     
    972978
    973979/* Global variables */
    974 extern const float identity[16];
     980extern const float identity[16] DECLSPEC_HIDDEN;
    975981
    976982/*****************************************************************************
     
    981987#if 0 /* NOTE: Must be 0 in cvs */
    982988# define VTRACE(A) TRACE A
    983 #else 
    984 # define VTRACE(A) 
     989#else
     990# define VTRACE(A)
    985991#endif
    986992
     
    9951001# if 1 /* NOTE: Must be 1 in cvs, as this is mostly more useful than a trace from program start */
    9961002#  define SINGLE_FRAME_DEBUGGING
    997 # endif 
     1003# endif
    9981004  /* The following, when enabled, lets you see the makeup of the frame, by drawprimitive calls.
    999      It can only be enabled when FRAME_DEBUGGING is also enabled                               
    1000      The contents of the back buffer are written into /tmp/backbuffer_* after each primitive 
     1005     It can only be enabled when FRAME_DEBUGGING is also enabled
     1006     The contents of the back buffer are written into /tmp/backbuffer_* after each primitive
    10011007     array is drawn.                                                                            */
    1002 # if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */                                                                                       
     1008# if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
    10031009#  define SHOW_FRAME_MAKEUP 1
    1004 # endif 
     1010# endif
    10051011  /* The following, when enabled, lets you see the makeup of the all the textures used during each
    10061012     of the drawprimitive calls. It can only be enabled when SHOW_FRAME_MAKEUP is also enabled.
    1007      The contents of the textures assigned to each stage are written into 
     1013     The contents of the textures assigned to each stage are written into
    10081014     /tmp/texture_*_<Stage>.ppm after each primitive array is drawn.                            */
    10091015# if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
    10101016#  define SHOW_TEXTURE_MAKEUP 0
    1011 # endif 
     1017# endif
    10121018extern BOOL isOn;
    10131019extern BOOL isDumpingFrames;
     
    10781084
    10791085/* Routine common to the draw primitive and draw indexed primitive routines */
    1080 void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT numberOfVertices,
    1081         UINT start_idx, UINT idxBytes, const void *idxData, UINT minIndex);
    1082 DWORD get_flexible_vertex_size(DWORD d3dvtVertexType);
     1086void drawPrimitive(IWineD3DDevice *iface, UINT index_count,
     1087        UINT start_idx, UINT idxBytes, const void *idxData) DECLSPEC_HIDDEN;
     1088DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN;
    10831089
    10841090typedef void (WINE_GLAPI *glAttribFunc)(const void *data);
    10851091typedef void (WINE_GLAPI *glMultiTexCoordFunc)(GLenum unit, const void *data);
    1086 extern glAttribFunc position_funcs[WINED3D_FFP_EMIT_COUNT];
    1087 extern glAttribFunc diffuse_funcs[WINED3D_FFP_EMIT_COUNT];
    1088 extern glAttribFunc specular_func_3ubv;
    1089 extern glAttribFunc specular_funcs[WINED3D_FFP_EMIT_COUNT];
    1090 extern glAttribFunc normal_funcs[WINED3D_FFP_EMIT_COUNT];
    1091 extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT];
     1092extern glAttribFunc position_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN;
     1093extern glAttribFunc diffuse_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN;
     1094extern glAttribFunc specular_func_3ubv DECLSPEC_HIDDEN;
     1095extern glAttribFunc specular_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN;
     1096extern glAttribFunc normal_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN;
     1097extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN;
    10921098
    10931099#define eps 1e-8
     
    12811287};
    12821288
    1283 extern const struct StateEntryTemplate misc_state_template[];
    1284 extern const struct StateEntryTemplate ffp_vertexstate_template[];
    1285 extern const struct fragment_pipeline ffp_fragment_pipeline;
    1286 extern const struct fragment_pipeline atifs_fragment_pipeline;
    1287 extern const struct fragment_pipeline arbfp_fragment_pipeline;
    1288 extern const struct fragment_pipeline nvts_fragment_pipeline;
    1289 extern const struct fragment_pipeline nvrc_fragment_pipeline;
     1289extern const struct StateEntryTemplate misc_state_template[] DECLSPEC_HIDDEN;
     1290extern const struct StateEntryTemplate ffp_vertexstate_template[] DECLSPEC_HIDDEN;
     1291extern const struct fragment_pipeline ffp_fragment_pipeline DECLSPEC_HIDDEN;
     1292extern const struct fragment_pipeline atifs_fragment_pipeline DECLSPEC_HIDDEN;
     1293extern const struct fragment_pipeline arbfp_fragment_pipeline DECLSPEC_HIDDEN;
     1294extern const struct fragment_pipeline nvts_fragment_pipeline DECLSPEC_HIDDEN;
     1295extern const struct fragment_pipeline nvrc_fragment_pipeline DECLSPEC_HIDDEN;
    12901296
    12911297/* "Base" state table */
    12921298HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs,
    12931299        const struct wined3d_gl_info *gl_info, const struct StateEntryTemplate *vertex,
    1294         const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc);
     1300        const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc) DECLSPEC_HIDDEN;
    12951301
    12961302/* Shaders for color conversions in blits */
     
    13051311};
    13061312
    1307 extern const struct blit_shader ffp_blit;
    1308 extern const struct blit_shader arbfp_blit;
     1313extern const struct blit_shader ffp_blit DECLSPEC_HIDDEN;
     1314extern const struct blit_shader arbfp_blit DECLSPEC_HIDDEN;
    13091315
    13101316typedef enum ContextUsage {
     
    13151321} ContextUsage;
    13161322
    1317 struct wined3d_context *ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, enum ContextUsage usage);
     1323struct wined3d_context *ActivateContext(IWineD3DDeviceImpl *This,
     1324        IWineD3DSurface *target, enum ContextUsage usage) DECLSPEC_HIDDEN;
    13181325struct wined3d_context *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, HWND win,
    1319         BOOL create_pbuffer, const WINED3DPRESENT_PARAMETERS *pPresentParms);
    1320 void DestroyContext(IWineD3DDeviceImpl *This, struct wined3d_context *context);
    1321 void context_alloc_event_query(struct wined3d_context *context, struct wined3d_event_query *query);
    1322 void context_alloc_occlusion_query(struct wined3d_context *context, struct wined3d_occlusion_query *query);
    1323 void context_resource_released(IWineD3DDevice *iface, IWineD3DResource *resource, WINED3DRESOURCETYPE type);
    1324 void context_bind_fbo(struct wined3d_context *context, GLenum target, GLuint *fbo);
     1326        BOOL create_pbuffer, const WINED3DPRESENT_PARAMETERS *pPresentParms) DECLSPEC_HIDDEN;
     1327void DestroyContext(IWineD3DDeviceImpl *This, struct wined3d_context *context) DECLSPEC_HIDDEN;
     1328void context_alloc_event_query(struct wined3d_context *context,
     1329        struct wined3d_event_query *query) DECLSPEC_HIDDEN;
     1330void context_alloc_occlusion_query(struct wined3d_context *context,
     1331        struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
     1332void context_resource_released(IWineD3DDevice *iface,
     1333        IWineD3DResource *resource, WINED3DRESOURCETYPE type) DECLSPEC_HIDDEN;
     1334void context_bind_fbo(struct wined3d_context *context, GLenum target, GLuint *fbo) DECLSPEC_HIDDEN;
    13251335void context_attach_depth_stencil_fbo(struct wined3d_context *context,
    1326         GLenum fbo_target, IWineD3DSurface *depth_stencil, BOOL use_render_buffer);
     1336        GLenum fbo_target, IWineD3DSurface *depth_stencil, BOOL use_render_buffer) DECLSPEC_HIDDEN;
    13271337void context_attach_surface_fbo(const struct wined3d_context *context,
    1328         GLenum fbo_target, DWORD idx, IWineD3DSurface *surface);
    1329 void context_free_event_query(struct wined3d_event_query *query);
    1330 void context_free_occlusion_query(struct wined3d_occlusion_query *query);
    1331 struct wined3d_context *context_get_current(void);
    1332 DWORD context_get_tls_idx(void);
    1333 BOOL context_set_current(struct wined3d_context *ctx);
    1334 void context_set_tls_idx(DWORD idx);
    1335 
    1336 void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain);
    1337 HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain);
     1338        GLenum fbo_target, DWORD idx, IWineD3DSurface *surface) DECLSPEC_HIDDEN;
     1339void context_free_event_query(struct wined3d_event_query *query) DECLSPEC_HIDDEN;
     1340void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
     1341struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN;
     1342DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN;
     1343BOOL context_set_current(struct wined3d_context *ctx) DECLSPEC_HIDDEN;
     1344void context_set_tls_idx(DWORD idx) DECLSPEC_HIDDEN;
     1345
     1346void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain) DECLSPEC_HIDDEN;
     1347HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain) DECLSPEC_HIDDEN;
    13381348
    13391349/* Macros for doing basic GPU detection based on opengl capabilities */
     
    13441354
    13451355/* Default callbacks for implicit object destruction */
    1346 extern ULONG WINAPI D3DCB_DefaultDestroySurface(IWineD3DSurface *pSurface);
    1347 
    1348 extern ULONG WINAPI D3DCB_DefaultDestroyVolume(IWineD3DVolume *pSurface);
     1356extern ULONG WINAPI D3DCB_DefaultDestroyVolume(IWineD3DVolume *pSurface) DECLSPEC_HIDDEN;
    13491357
    13501358/*****************************************************************************
     
    13701378
    13711379/* The default light parameters */
    1372 extern const WINED3DLIGHT WINED3D_default_light;
     1380extern const WINED3DLIGHT WINED3D_default_light DECLSPEC_HIDDEN;
    13731381
    13741382typedef struct WineD3D_PixelFormat
     
    14021410};
    14031411
    1404 extern BOOL initPixelFormats(struct wined3d_gl_info *gl_info);
    1405 BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info);
    1406 extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram);
    1407 extern void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info);
     1412extern BOOL initPixelFormats(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
     1413BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
     1414extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram) DECLSPEC_HIDDEN;
     1415extern void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
    14081416
    14091417/*****************************************************************************
     
    14211429};
    14221430
    1423 HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This, struct WineD3DRectPatch *patch);
     1431HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This, struct WineD3DRectPatch *patch) DECLSPEC_HIDDEN;
    14241432
    14251433enum projection_types
     
    14741482};
    14751483
    1476 extern const struct wine_rb_functions wined3d_ffp_frag_program_rb_functions;
    1477 
    1478 void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_settings *settings, BOOL ignore_textype);
     1484extern const struct wine_rb_functions wined3d_ffp_frag_program_rb_functions DECLSPEC_HIDDEN;
     1485extern const struct wined3d_parent_ops wined3d_null_parent_ops DECLSPEC_HIDDEN;
     1486
     1487void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_settings *settings,
     1488        BOOL ignore_textype) DECLSPEC_HIDDEN;
    14791489const struct ffp_frag_desc *find_ffp_frag_shader(const struct wine_rb_tree *fragment_shaders,
    1480         const struct ffp_frag_settings *settings);
    1481 void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc);
     1490        const struct ffp_frag_settings *settings) DECLSPEC_HIDDEN;
     1491void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc) DECLSPEC_HIDDEN;
    14821492
    14831493/*****************************************************************************
     
    14981508} IWineD3DImpl;
    14991509
    1500 extern const IWineD3DVtbl IWineD3D_Vtbl;
    1501 
    1502 BOOL InitAdapters(IWineD3DImpl *This);
     1510extern const IWineD3DVtbl IWineD3D_Vtbl DECLSPEC_HIDDEN;
     1511
     1512BOOL InitAdapters(IWineD3DImpl *This) DECLSPEC_HIDDEN;
    15031513
    15041514/* A helper function that dumps a resource list */
    1505 void dumpResources(struct list *list);
     1515void dumpResources(struct list *list) DECLSPEC_HIDDEN;
    15061516
    15071517/*****************************************************************************
     
    16501660};
    16511661
    1652 extern const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl;
    1653 
    1654 void device_resource_add(IWineD3DDeviceImpl *This, IWineD3DResource *resource);
    1655 void device_resource_released(IWineD3DDeviceImpl *This, IWineD3DResource *resource);
     1662extern const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl DECLSPEC_HIDDEN;
     1663
     1664void device_resource_add(IWineD3DDeviceImpl *This, IWineD3DResource *resource) DECLSPEC_HIDDEN;
     1665void device_resource_released(IWineD3DDeviceImpl *This, IWineD3DResource *resource) DECLSPEC_HIDDEN;
    16561666void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
    1657         BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup);
     1667        BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup) DECLSPEC_HIDDEN;
    16581668void device_stream_info_from_strided(IWineD3DDeviceImpl *This,
    1659         const struct WineDirect3DVertexStridedData *strided, struct wined3d_stream_info *stream_info);
    1660 HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This,  IWineD3DSurfaceImpl *target, DWORD Count,
    1661                                         CONST WINED3DRECT* pRects, DWORD Flags, WINED3DCOLOR Color,
    1662                                         float Z, DWORD Stencil);
    1663 void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This);
    1664 void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state);
     1669        const struct WineDirect3DVertexStridedData *strided, struct wined3d_stream_info *stream_info) DECLSPEC_HIDDEN;
     1670HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, DWORD Count,
     1671        const WINED3DRECT *pRects, DWORD Flags, WINED3DCOLOR Color, float Z, DWORD Stencil) DECLSPEC_HIDDEN;
     1672void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) DECLSPEC_HIDDEN;
     1673void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) DECLSPEC_HIDDEN;
    16651674static inline BOOL isStateDirty(struct wined3d_context *context, DWORD state)
    16661675{
     
    17081717    struct list             privateData;
    17091718    struct list             resource_list_entry;
    1710 
     1719    const struct wined3d_parent_ops *parent_ops;
    17111720} IWineD3DResourceClass;
    17121721
     
    17181727} IWineD3DResourceImpl;
    17191728
    1720 void resource_cleanup(IWineD3DResource *iface);
    1721 HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID guid);
    1722 HRESULT resource_get_device(IWineD3DResource *iface, IWineD3DDevice **device);
    1723 HRESULT resource_get_parent(IWineD3DResource *iface, IUnknown **parent);
    1724 DWORD resource_get_priority(IWineD3DResource *iface);
     1729void resource_cleanup(IWineD3DResource *iface) DECLSPEC_HIDDEN;
     1730HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID guid) DECLSPEC_HIDDEN;
     1731HRESULT resource_get_device(IWineD3DResource *iface, IWineD3DDevice **device) DECLSPEC_HIDDEN;
     1732HRESULT resource_get_parent(IWineD3DResource *iface, IUnknown **parent) DECLSPEC_HIDDEN;
     1733DWORD resource_get_priority(IWineD3DResource *iface) DECLSPEC_HIDDEN;
    17251734HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID guid,
    1726         void *data, DWORD *data_size);
     1735        void *data, DWORD *data_size) DECLSPEC_HIDDEN;
    17271736HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type,
    17281737        IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct GlPixelFormatDesc *format_desc,
    1729         WINED3DPOOL pool, IUnknown *parent);
    1730 WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface);
    1731 DWORD resource_set_priority(IWineD3DResource *iface, DWORD new_priority);
     1738        WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
     1739WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) DECLSPEC_HIDDEN;
     1740DWORD resource_set_priority(IWineD3DResource *iface, DWORD new_priority) DECLSPEC_HIDDEN;
    17321741HRESULT resource_set_private_data(IWineD3DResource *iface, REFGUID guid,
    1733         const void *data, DWORD data_size, DWORD flags);
     1742        const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN;
    17341743
    17351744/* Tests show that the start address of resources is 32 byte aligned */
     
    17651774};
    17661775
     1776struct gl_texture
     1777{
     1778    DWORD                   states[MAX_WINETEXTURESTATES];
     1779    BOOL                    dirty;
     1780    GLuint                  name;
     1781};
     1782
    17671783/*****************************************************************************
    17681784 * IWineD3DBaseTexture implementation structure (extends IWineD3DResourceImpl)
     
    17701786typedef struct IWineD3DBaseTextureClass
    17711787{
    1772     DWORD                   states[MAX_WINETEXTURESTATES];
    1773     DWORD                   srgbstates[MAX_WINETEXTURESTATES];
     1788    struct gl_texture       texture_rgb, texture_srgb;
    17741789    UINT                    levels;
    1775     BOOL                    dirty, srgbDirty;
    1776     UINT                    textureName, srgbTextureName;
    17771790    float                   pow2Matrix[16];
    17781791    UINT                    LOD;
     
    17871800} IWineD3DBaseTextureClass;
    17881801
    1789 void surface_internal_preload(IWineD3DSurface *iface, enum WINED3DSRGB srgb);
     1802void surface_internal_preload(IWineD3DSurface *iface, enum WINED3DSRGB srgb) DECLSPEC_HIDDEN;
    17901803
    17911804typedef struct IWineD3DBaseTextureImpl
     
    18001813void basetexture_apply_state_changes(IWineD3DBaseTexture *iface,
    18011814        const DWORD texture_states[WINED3D_HIGHEST_TEXTURE_STATE + 1],
    1802         const DWORD sampler_states[WINED3D_HIGHEST_SAMPLER_STATE + 1]);
    1803 HRESULT basetexture_bind(IWineD3DBaseTexture *iface, BOOL srgb, BOOL *set_surface_desc);
    1804 void basetexture_cleanup(IWineD3DBaseTexture *iface);
    1805 void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface);
    1806 WINED3DTEXTUREFILTERTYPE basetexture_get_autogen_filter_type(IWineD3DBaseTexture *iface);
    1807 BOOL basetexture_get_dirty(IWineD3DBaseTexture *iface);
    1808 DWORD basetexture_get_level_count(IWineD3DBaseTexture *iface);
    1809 DWORD basetexture_get_lod(IWineD3DBaseTexture *iface);
     1815        const DWORD sampler_states[WINED3D_HIGHEST_SAMPLER_STATE + 1]) DECLSPEC_HIDDEN;
     1816HRESULT basetexture_bind(IWineD3DBaseTexture *iface, BOOL srgb, BOOL *set_surface_desc) DECLSPEC_HIDDEN;
     1817void basetexture_cleanup(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN;
     1818void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN;
     1819WINED3DTEXTUREFILTERTYPE basetexture_get_autogen_filter_type(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN;
     1820BOOL basetexture_get_dirty(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN;
     1821DWORD basetexture_get_level_count(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN;
     1822DWORD basetexture_get_lod(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN;
    18101823HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT levels, WINED3DRESOURCETYPE resource_type,
    18111824        IWineD3DDeviceImpl *device, UINT size, DWORD usage, const struct GlPixelFormatDesc *format_desc,
    1812         WINED3DPOOL pool, IUnknown *parent);
    1813 HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE filter_type);
    1814 BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty);
    1815 DWORD basetexture_set_lod(IWineD3DBaseTexture *iface, DWORD new_lod);
    1816 void basetexture_unload(IWineD3DBaseTexture *iface);
     1825        WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
     1826HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface,
     1827        WINED3DTEXTUREFILTERTYPE filter_type) DECLSPEC_HIDDEN;
     1828BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty) DECLSPEC_HIDDEN;
     1829DWORD basetexture_set_lod(IWineD3DBaseTexture *iface, DWORD new_lod) DECLSPEC_HIDDEN;
     1830void basetexture_unload(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN;
    18171831
    18181832/*****************************************************************************
     
    18331847} IWineD3DTextureImpl;
    18341848
    1835 extern const IWineD3DTextureVtbl IWineD3DTexture_Vtbl;
    1836 
    18371849HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT levels,
    1838         IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent);
     1850        IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool,
     1851        IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
    18391852
    18401853/*****************************************************************************
     
    18521865} IWineD3DCubeTextureImpl;
    18531866
    1854 extern const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl;
    1855 
    18561867HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UINT levels,
    1857         IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent);
     1868        IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool,
     1869        IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
    18581870
    18591871typedef struct _WINED3DVOLUMET_DESC
     
    18831895} IWineD3DVolumeImpl;
    18841896
    1885 extern const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl;
    1886 
    1887 void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box);
     1897void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) DECLSPEC_HIDDEN;
     1898HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT width,
     1899        UINT height, UINT depth, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool,
     1900        IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
    18881901
    18891902/*****************************************************************************
     
    19011914} IWineD3DVolumeTextureImpl;
    19021915
    1903 extern const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl;
    1904 
    1905 HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height, UINT depth, UINT levels,
    1906         IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent);
     1916HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height,
     1917        UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format,
     1918        WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
    19071919
    19081920typedef struct _WINED3DSURFACET_DESC
     
    20202032};
    20212033
    2022 extern const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl;
    2023 extern const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl;
    2024 
    2025 UINT surface_calculate_size(const struct GlPixelFormatDesc *format_desc, UINT alignment, UINT width, UINT height);
    2026 void surface_gdi_cleanup(IWineD3DSurfaceImpl *This);
     2034extern const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl DECLSPEC_HIDDEN;
     2035extern const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl DECLSPEC_HIDDEN;
     2036
     2037UINT surface_calculate_size(const struct GlPixelFormatDesc *format_desc,
     2038        UINT alignment, UINT width, UINT height) DECLSPEC_HIDDEN;
     2039void surface_gdi_cleanup(IWineD3DSurfaceImpl *This) DECLSPEC_HIDDEN;
    20272040HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment,
    20282041        UINT width, UINT height, UINT level, BOOL lockable, BOOL discard, WINED3DMULTISAMPLE_TYPE multisample_type,
    20292042        UINT multisample_quality, IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format,
    2030         WINED3DPOOL pool, IUnknown *parent);
     2043        WINED3DPOOL pool, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
    20312044
    20322045/* Predeclare the shared Surface functions */
    2033 HRESULT WINAPI IWineD3DBaseSurfaceImpl_QueryInterface(IWineD3DSurface *iface, REFIID riid, LPVOID *ppobj);
    2034 ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface);
    2035 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetParent(IWineD3DSurface *iface, IUnknown **pParent);
    2036 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetDevice(IWineD3DSurface *iface, IWineD3DDevice** ppDevice);
    2037 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPrivateData(IWineD3DSurface *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
    2038 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPrivateData(IWineD3DSurface *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
    2039 HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, REFGUID refguid);
    2040 DWORD   WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD PriorityNew);
    2041 DWORD   WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface);
    2042 WINED3DRESOURCETYPE WINAPI IWineD3DBaseSurfaceImpl_GetType(IWineD3DSurface *iface);
    2043 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetContainer(IWineD3DSurface* iface, REFIID riid, void** ppContainer);
    2044 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSURFACE_DESC *pDesc);
    2045 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWORD Flags);
    2046 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetFlipStatus(IWineD3DSurface *iface, DWORD Flags);
    2047 HRESULT WINAPI IWineD3DBaseSurfaceImpl_IsLost(IWineD3DSurface *iface);
    2048 HRESULT WINAPI IWineD3DBaseSurfaceImpl_Restore(IWineD3DSurface *iface);
    2049 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPalette(IWineD3DSurface *iface, IWineD3DPalette **Pal);
    2050 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPalette *Pal);
    2051 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetColorKey(IWineD3DSurface *iface, DWORD Flags, const WINEDDCOLORKEY *CKey);
    2052 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWineD3DBase *container);
    2053 DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface);
    2054 HRESULT WINAPI IWineD3DBaseSurfaceImpl_RealizePalette(IWineD3DSurface *iface);
    2055 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LONG X, LONG Y);
    2056 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetOverlayPosition(IWineD3DSurface *iface, LONG *X, LONG *Y);
    2057 HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder(IWineD3DSurface *iface, DWORD Flags, IWineD3DSurface *Ref);
     2046HRESULT WINAPI IWineD3DBaseSurfaceImpl_QueryInterface(IWineD3DSurface *iface,
     2047        REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
     2048ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
     2049HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetParent(IWineD3DSurface *iface, IUnknown **pParent) DECLSPEC_HIDDEN;
     2050HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetDevice(IWineD3DSurface *iface, IWineD3DDevice** ppDevice) DECLSPEC_HIDDEN;
     2051HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPrivateData(IWineD3DSurface *iface,
     2052        REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) DECLSPEC_HIDDEN;
     2053HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPrivateData(IWineD3DSurface *iface,
     2054        REFGUID refguid, void *pData, DWORD *pSizeOfData) DECLSPEC_HIDDEN;
     2055HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, REFGUID refguid) DECLSPEC_HIDDEN;
     2056DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD PriorityNew) DECLSPEC_HIDDEN;
     2057DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
     2058WINED3DRESOURCETYPE WINAPI IWineD3DBaseSurfaceImpl_GetType(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
     2059HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetContainer(IWineD3DSurface* iface,
     2060        REFIID riid, void **ppContainer) DECLSPEC_HIDDEN;
     2061HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSURFACE_DESC *pDesc) DECLSPEC_HIDDEN;
     2062HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWORD Flags) DECLSPEC_HIDDEN;
     2063HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetFlipStatus(IWineD3DSurface *iface, DWORD Flags) DECLSPEC_HIDDEN;
     2064HRESULT WINAPI IWineD3DBaseSurfaceImpl_IsLost(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
     2065HRESULT WINAPI IWineD3DBaseSurfaceImpl_Restore(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
     2066HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPalette(IWineD3DSurface *iface, IWineD3DPalette **Pal) DECLSPEC_HIDDEN;
     2067HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPalette *Pal) DECLSPEC_HIDDEN;
     2068HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetColorKey(IWineD3DSurface *iface,
     2069        DWORD Flags, const WINEDDCOLORKEY *CKey) DECLSPEC_HIDDEN;
     2070HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWineD3DBase *container) DECLSPEC_HIDDEN;
     2071DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
     2072HRESULT WINAPI IWineD3DBaseSurfaceImpl_RealizePalette(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
     2073HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LONG X, LONG Y) DECLSPEC_HIDDEN;
     2074HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetOverlayPosition(IWineD3DSurface *iface, LONG *X, LONG *Y) DECLSPEC_HIDDEN;
     2075HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder(IWineD3DSurface *iface,
     2076        DWORD Flags, IWineD3DSurface *Ref) DECLSPEC_HIDDEN;
    20582077HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, const RECT *SrcRect,
    2059         IWineD3DSurface *DstSurface, const RECT *DstRect, DWORD Flags, const WINEDDOVERLAYFX *FX);
    2060 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD3DClipper *clipper);
    2061 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DClipper **clipper);
    2062 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format);
    2063 HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface);
     2078        IWineD3DSurface *DstSurface, const RECT *DstRect, DWORD Flags, const WINEDDOVERLAYFX *FX) DECLSPEC_HIDDEN;
     2079HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD3DClipper *clipper) DECLSPEC_HIDDEN;
     2080HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DClipper **clipper) DECLSPEC_HIDDEN;
     2081HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) DECLSPEC_HIDDEN;
     2082HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
    20642083HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *DestRect, IWineD3DSurface *SrcSurface,
    2065         const RECT *SrcRect, DWORD Flags, const WINEDDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter);
     2084        const RECT *SrcRect, DWORD Flags, const WINEDDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter) DECLSPEC_HIDDEN;
    20662085HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty,
    2067         IWineD3DSurface *Source, const RECT *rsrc, DWORD trans);
    2068 HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags);
    2069 void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb);
    2070 const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface);
    2071 
    2072 void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height);
    2073 void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height);
    2074 void get_drawable_size_pbuffer(struct wined3d_context *context, UINT *width, UINT *height);
    2075 void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *height);
    2076 
    2077 void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back);
     2086        IWineD3DSurface *Source, const RECT *rsrc, DWORD trans) DECLSPEC_HIDDEN;
     2087HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKED_RECT *pLockedRect,
     2088        const RECT *pRect, DWORD Flags) DECLSPEC_HIDDEN;
     2089void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb) DECLSPEC_HIDDEN;
     2090const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
     2091
     2092void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
     2093void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
     2094void get_drawable_size_pbuffer(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
     2095void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
     2096
     2097void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) DECLSPEC_HIDDEN;
    20782098
    20792099/* Surface flags: */
     
    21312151#define SFLAG_DS_DISCARDED   SFLAG_DS_LOCATIONS
    21322152
    2133 BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]);
     2153BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]) DECLSPEC_HIDDEN;
    21342154
    21352155typedef enum {
     
    21612181} CONVERT_TYPES;
    21622182
    2163 HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_texturing, GLenum *format, GLenum *internal, GLenum *type, CONVERT_TYPES *convert, int *target_bpp, BOOL srgb_mode);
    2164 
    2165 BOOL palette9_changed(IWineD3DSurfaceImpl *This);
     2183HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_texturing, GLenum *format,
     2184        GLenum *internal, GLenum *type, CONVERT_TYPES *convert, int *target_bpp, BOOL srgb_mode) DECLSPEC_HIDDEN;
     2185
     2186BOOL palette9_changed(IWineD3DSurfaceImpl *This) DECLSPEC_HIDDEN;
    21662187
    21672188/*****************************************************************************
     
    21882209
    21892210    IUnknown                *parent;
     2211    const struct wined3d_parent_ops *parent_ops;
    21902212    IWineD3DDeviceImpl      *wineD3DDevice;
    21912213
     
    21992221} IWineD3DVertexDeclarationImpl;
    22002222
    2201 extern const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl;
    2202 
    2203 HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *This,
    2204         const WINED3DVERTEXELEMENT *elements, UINT element_count);
     2223HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *declaration, IWineD3DDeviceImpl *device,
     2224        const WINED3DVERTEXELEMENT *elements, UINT element_count,
     2225        IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
    22052226
    22062227/*****************************************************************************
     
    23482369};
    23492370
    2350 extern void stateblock_savedstates_set(
    2351     IWineD3DStateBlock* iface,
    2352     SAVEDSTATES* states,
    2353     BOOL value);
    2354 
    2355 extern void stateblock_copy(
    2356     IWineD3DStateBlock* destination,
    2357     IWineD3DStateBlock* source);
    2358 
    2359 extern const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl;
     2371extern void stateblock_savedstates_set(IWineD3DStateBlock *iface, SAVEDSTATES *states, BOOL value) DECLSPEC_HIDDEN;
     2372extern void stateblock_copy(IWineD3DStateBlock *destination, IWineD3DStateBlock *source) DECLSPEC_HIDDEN;
     2373
     2374extern const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl DECLSPEC_HIDDEN;
    23602375
    23612376/* Direct3D terminology with little modifications. We do not have an issued state
     
    23752390    const IWineD3DQueryVtbl  *lpVtbl;
    23762391    LONG                      ref;     /* Note: Ref counting not required */
    2377    
     2392
    23782393    IUnknown                 *parent;
    23792394    /*TODO: replace with iface usage */
     
    23892404    /* TODO: Think about using a IUnknown instead of a void* */
    23902405    void                     *extendedData;
    2391    
    2392  
    23932406} IWineD3DQueryImpl;
    23942407
    2395 extern const IWineD3DQueryVtbl IWineD3DQuery_Vtbl;
    2396 extern const IWineD3DQueryVtbl IWineD3DEventQuery_Vtbl;
    2397 extern const IWineD3DQueryVtbl IWineD3DOcclusionQuery_Vtbl;
     2408extern const IWineD3DQueryVtbl IWineD3DQuery_Vtbl DECLSPEC_HIDDEN;
     2409extern const IWineD3DQueryVtbl IWineD3DEventQuery_Vtbl DECLSPEC_HIDDEN;
     2410extern const IWineD3DQueryVtbl IWineD3DOcclusionQuery_Vtbl DECLSPEC_HIDDEN;
    23982411
    23992412/* IWineD3DBuffer */
     
    24432456};
    24442457
    2445 extern const IWineD3DBufferVtbl wined3d_buffer_vtbl;
    2446 const BYTE *buffer_get_memory(IWineD3DBuffer *iface, UINT offset, GLuint *buffer_object);
    2447 BYTE *buffer_get_sysmem(struct wined3d_buffer *This);
     2458const BYTE *buffer_get_memory(IWineD3DBuffer *iface, UINT offset, GLuint *buffer_object) DECLSPEC_HIDDEN;
     2459BYTE *buffer_get_sysmem(struct wined3d_buffer *This) DECLSPEC_HIDDEN;
     2460HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device,
     2461        UINT size, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, GLenum bind_hint,
     2462        const char *data, IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
    24482463
    24492464/* IWineD3DRendertargetView */
     
    24572472};
    24582473
    2459 extern const IWineD3DRendertargetViewVtbl wined3d_rendertarget_view_vtbl;
     2474extern const IWineD3DRendertargetViewVtbl wined3d_rendertarget_view_vtbl DECLSPEC_HIDDEN;
    24602475
    24612476/*****************************************************************************
     
    24892504} IWineD3DSwapChainImpl;
    24902505
    2491 extern const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl;
    2492 const IWineD3DSwapChainVtbl IWineGDISwapChain_Vtbl;
    2493 void x11_copy_to_screen(IWineD3DSwapChainImpl *This, const RECT *rc);
    2494 
    2495 HRESULT WINAPI IWineD3DBaseSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, REFIID riid, LPVOID *ppobj);
    2496 ULONG WINAPI IWineD3DBaseSwapChainImpl_AddRef(IWineD3DSwapChain *iface);
    2497 ULONG WINAPI IWineD3DBaseSwapChainImpl_Release(IWineD3DSwapChain *iface);
    2498 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetParent(IWineD3DSwapChain *iface, IUnknown ** ppParent);
    2499 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface, IWineD3DSurface *pDestSurface);
    2500 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UINT iBackBuffer, WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer);
    2501 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *iface, WINED3DRASTER_STATUS *pRasterStatus);
    2502 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, WINED3DDISPLAYMODE*pMode);
    2503 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, IWineD3DDevice**ppDevice);
    2504 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, WINED3DPRESENT_PARAMETERS *pPresentationParameters);
    2505 HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, DWORD Flags, CONST WINED3DGAMMARAMP *pRamp);
    2506 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface, WINED3DGAMMARAMP *pRamp);
    2507 
    2508 struct wined3d_context *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *iface);
     2506extern const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl DECLSPEC_HIDDEN;
     2507const IWineD3DSwapChainVtbl IWineGDISwapChain_Vtbl DECLSPEC_HIDDEN;
     2508void x11_copy_to_screen(IWineD3DSwapChainImpl *This, const RECT *rc) DECLSPEC_HIDDEN;
     2509
     2510HRESULT WINAPI IWineD3DBaseSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface,
     2511        REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
     2512ULONG WINAPI IWineD3DBaseSwapChainImpl_AddRef(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN;
     2513ULONG WINAPI IWineD3DBaseSwapChainImpl_Release(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN;
     2514HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetParent(IWineD3DSwapChain *iface, IUnknown **ppParent) DECLSPEC_HIDDEN;
     2515HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface,
     2516        IWineD3DSurface *pDestSurface) DECLSPEC_HIDDEN;
     2517HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UINT iBackBuffer,
     2518        WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) DECLSPEC_HIDDEN;
     2519HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *iface,
     2520        WINED3DRASTER_STATUS *pRasterStatus) DECLSPEC_HIDDEN;
     2521HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface,
     2522        WINED3DDISPLAYMODE *pMode) DECLSPEC_HIDDEN;
     2523HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface,
     2524        IWineD3DDevice **ppDevice) DECLSPEC_HIDDEN;
     2525HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface,
     2526        WINED3DPRESENT_PARAMETERS *pPresentationParameters) DECLSPEC_HIDDEN;
     2527HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface,
     2528        DWORD Flags, const WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN;
     2529HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface,
     2530        WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN;
     2531
     2532struct wined3d_context *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN;
     2533
     2534#define DEFAULT_REFRESH_RATE 0
    25092535
    25102536/*****************************************************************************
    2511  * Utility function prototypes 
     2537 * Utility function prototypes
    25122538 */
    25132539
    25142540/* Trace routines */
    2515 const char* debug_d3dformat(WINED3DFORMAT fmt);
    2516 const char* debug_d3ddevicetype(WINED3DDEVTYPE devtype);
    2517 const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res);
    2518 const char* debug_d3dusage(DWORD usage);
    2519 const char* debug_d3dusagequery(DWORD usagequery);
    2520 const char* debug_d3ddeclmethod(WINED3DDECLMETHOD method);
    2521 const char* debug_d3ddeclusage(BYTE usage);
    2522 const char* debug_d3dprimitivetype(WINED3DPRIMITIVETYPE PrimitiveType);
    2523 const char* debug_d3drenderstate(DWORD state);
    2524 const char* debug_d3dsamplerstate(DWORD state);
    2525 const char* debug_d3dtexturefiltertype(WINED3DTEXTUREFILTERTYPE filter_type);
    2526 const char* debug_d3dtexturestate(DWORD state);
    2527 const char* debug_d3dtstype(WINED3DTRANSFORMSTATETYPE tstype);
    2528 const char* debug_d3dpool(WINED3DPOOL pool);
    2529 const char *debug_fbostatus(GLenum status);
    2530 const char *debug_glerror(GLenum error);
    2531 const char *debug_d3dbasis(WINED3DBASISTYPE basis);
    2532 const char *debug_d3ddegree(WINED3DDEGREETYPE order);
    2533 const char* debug_d3dtop(WINED3DTEXTUREOP d3dtop);
    2534 void dump_color_fixup_desc(struct color_fixup_desc fixup);
    2535 const char *debug_surflocation(DWORD flag);
     2541const char *debug_d3dformat(WINED3DFORMAT fmt) DECLSPEC_HIDDEN;
     2542const char *debug_d3ddevicetype(WINED3DDEVTYPE devtype) DECLSPEC_HIDDEN;
     2543const char *debug_d3dresourcetype(WINED3DRESOURCETYPE res) DECLSPEC_HIDDEN;
     2544const char *debug_d3dusage(DWORD usage) DECLSPEC_HIDDEN;
     2545const char *debug_d3dusagequery(DWORD usagequery) DECLSPEC_HIDDEN;
     2546const char *debug_d3ddeclmethod(WINED3DDECLMETHOD method) DECLSPEC_HIDDEN;
     2547const char *debug_d3ddeclusage(BYTE usage) DECLSPEC_HIDDEN;
     2548const char *debug_d3dprimitivetype(WINED3DPRIMITIVETYPE PrimitiveType) DECLSPEC_HIDDEN;
     2549const char *debug_d3drenderstate(DWORD state) DECLSPEC_HIDDEN;
     2550const char *debug_d3dsamplerstate(DWORD state) DECLSPEC_HIDDEN;
     2551const char *debug_d3dtexturefiltertype(WINED3DTEXTUREFILTERTYPE filter_type) DECLSPEC_HIDDEN;
     2552const char *debug_d3dtexturestate(DWORD state) DECLSPEC_HIDDEN;
     2553const char *debug_d3dtstype(WINED3DTRANSFORMSTATETYPE tstype) DECLSPEC_HIDDEN;
     2554const char *debug_d3dpool(WINED3DPOOL pool) DECLSPEC_HIDDEN;
     2555const char *debug_fbostatus(GLenum status) DECLSPEC_HIDDEN;
     2556const char *debug_glerror(GLenum error) DECLSPEC_HIDDEN;
     2557const char *debug_d3dbasis(WINED3DBASISTYPE basis) DECLSPEC_HIDDEN;
     2558const char *debug_d3ddegree(WINED3DDEGREETYPE order) DECLSPEC_HIDDEN;
     2559const char *debug_d3dtop(WINED3DTEXTUREOP d3dtop) DECLSPEC_HIDDEN;
     2560void dump_color_fixup_desc(struct color_fixup_desc fixup) DECLSPEC_HIDDEN;
     2561const char *debug_surflocation(DWORD flag) DECLSPEC_HIDDEN;
    25362562
    25372563/* Routines for GL <-> D3D values */
    2538 GLenum StencilOp(DWORD op);
    2539 GLenum CompareFunc(DWORD func);
    2540 BOOL is_invalid_op(IWineD3DDeviceImpl *This, int stage, WINED3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3);
    2541 void   set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3, INT texture_idx, DWORD dst);
    2542 void   set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, BOOL transformed, DWORD coordtype, BOOL ffp_can_disable_proj);
    2543 void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context);
    2544 void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context);
    2545 void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context);
    2546 void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context);
    2547 void state_fogcolor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context);
    2548 void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context);
    2549 void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context);
    2550 void state_fog_fragpart(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context);
    2551 
    2552 void surface_add_dirty_rect(IWineD3DSurface *iface, const RECT *dirty_rect);
    2553 GLenum surface_get_gl_buffer(IWineD3DSurface *iface, IWineD3DSwapChain *swapchain);
    2554 void surface_load_ds_location(IWineD3DSurface *iface, struct wined3d_context *context, DWORD location);
    2555 void surface_modify_ds_location(IWineD3DSurface *iface, DWORD location);
    2556 void surface_set_compatible_renderbuffer(IWineD3DSurface *iface, unsigned int width, unsigned int height);
    2557 void surface_set_texture_name(IWineD3DSurface *iface, GLuint name, BOOL srgb_name);
    2558 void surface_set_texture_target(IWineD3DSurface *iface, GLenum target);
     2564GLenum StencilOp(DWORD op) DECLSPEC_HIDDEN;
     2565GLenum CompareFunc(DWORD func) DECLSPEC_HIDDEN;
     2566BOOL is_invalid_op(IWineD3DDeviceImpl *This, int stage, WINED3DTEXTUREOP op,
     2567        DWORD arg1, DWORD arg2, DWORD arg3) DECLSPEC_HIDDEN;
     2568void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEXTUREOP op,
     2569        DWORD arg1, DWORD arg2, DWORD arg3, INT texture_idx, DWORD dst) DECLSPEC_HIDDEN;
     2570void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords,
     2571        BOOL transformed, DWORD coordtype, BOOL ffp_can_disable_proj) DECLSPEC_HIDDEN;
     2572void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock,
     2573        struct wined3d_context *context) DECLSPEC_HIDDEN;
     2574void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock,
     2575        struct wined3d_context *context) DECLSPEC_HIDDEN;
     2576void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock,
     2577        struct wined3d_context *context) DECLSPEC_HIDDEN;
     2578void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock,
     2579        struct wined3d_context *context) DECLSPEC_HIDDEN;
     2580void state_fogcolor(DWORD state, IWineD3DStateBlockImpl *stateblock,
     2581        struct wined3d_context *context) DECLSPEC_HIDDEN;
     2582void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock,
     2583        struct wined3d_context *context) DECLSPEC_HIDDEN;
     2584void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock,
     2585        struct wined3d_context *context) DECLSPEC_HIDDEN;
     2586void state_fog_fragpart(DWORD state, IWineD3DStateBlockImpl *stateblock,
     2587        struct wined3d_context *context) DECLSPEC_HIDDEN;
     2588
     2589void surface_add_dirty_rect(IWineD3DSurface *iface, const RECT *dirty_rect) DECLSPEC_HIDDEN;
     2590GLenum surface_get_gl_buffer(IWineD3DSurface *iface, IWineD3DSwapChain *swapchain) DECLSPEC_HIDDEN;
     2591void surface_load_ds_location(IWineD3DSurface *iface, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
     2592void surface_modify_ds_location(IWineD3DSurface *iface, DWORD location) DECLSPEC_HIDDEN;
     2593void surface_set_compatible_renderbuffer(IWineD3DSurface *iface,
     2594        unsigned int width, unsigned int height) DECLSPEC_HIDDEN;
     2595void surface_set_texture_name(IWineD3DSurface *iface, GLuint name, BOOL srgb_name) DECLSPEC_HIDDEN;
     2596void surface_set_texture_target(IWineD3DSurface *iface, GLenum target) DECLSPEC_HIDDEN;
    25592597
    25602598BOOL getColorBits(const struct GlPixelFormatDesc *format_desc,
    2561         short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize);
    2562 BOOL getDepthStencilBits(const struct GlPixelFormatDesc *format_desc, short *depthSize, short *stencilSize);
     2599        short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize) DECLSPEC_HIDDEN;
     2600BOOL getDepthStencilBits(const struct GlPixelFormatDesc *format_desc,
     2601        short *depthSize, short *stencilSize) DECLSPEC_HIDDEN;
    25632602
    25642603/* Math utils */
    2565 void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED3DMATRIX *src2);
    2566 UINT wined3d_log2i(UINT32 x);
    2567 unsigned int count_bits(unsigned int mask);
     2604void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED3DMATRIX *src2) DECLSPEC_HIDDEN;
     2605UINT wined3d_log2i(UINT32 x) DECLSPEC_HIDDEN;
     2606unsigned int count_bits(unsigned int mask) DECLSPEC_HIDDEN;
    25682607
    25692608typedef struct local_constant {
     
    25872626} SHADER_LIMITS;
    25882627
    2589 /** Keeps track of details for TEX_M#x# shader opcodes which need to
    2590    maintain state information between multiple codes */
     2628/* Keeps track of details for TEX_M#x# shader opcodes which need to
     2629 * maintain state information between multiple codes */
    25912630typedef struct SHADER_PARSE_STATE {
    25922631    unsigned int current_row;
     
    26012640
    26022641/* Base Shader utility functions. */
    2603 int shader_addline(struct wined3d_shader_buffer *buffer, const char *fmt, ...) PRINTF_ATTR(2,3);
    2604 int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *fmt, va_list args);
     2642int shader_addline(struct wined3d_shader_buffer *buffer, const char *fmt, ...) PRINTF_ATTR(2,3) DECLSPEC_HIDDEN;
     2643int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *fmt, va_list args) DECLSPEC_HIDDEN;
    26052644
    26062645/* Vertex shader utility functions */
    2607 extern BOOL vshader_get_input(
    2608     IWineD3DVertexShader* iface,
    2609     BYTE usage_req, BYTE usage_idx_req,
    2610     unsigned int* regnum);
    2611 
    2612 extern HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object);
     2646extern BOOL vshader_get_input(IWineD3DVertexShader *iface,
     2647        BYTE usage_req, BYTE usage_idx_req, unsigned int *regnum) DECLSPEC_HIDDEN;
     2648
     2649extern HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object) DECLSPEC_HIDDEN;
    26132650
    26142651/*****************************************************************************
     
    26262663    const struct wined3d_shader_frontend *frontend;
    26272664    void *frontend_data;
     2665    void *backend_data;
     2666
     2667    IUnknown *parent;
     2668    const struct wined3d_parent_ops *parent_ops;
    26282669
    26292670    /* Programs this shader is linked with */
     
    26502691} IWineD3DBaseShaderImpl;
    26512692
    2652 void shader_buffer_clear(struct wined3d_shader_buffer *buffer);
    2653 BOOL shader_buffer_init(struct wined3d_shader_buffer *buffer);
    2654 void shader_buffer_free(struct wined3d_shader_buffer *buffer);
    2655 void shader_cleanup(IWineD3DBaseShader *iface);
     2693void shader_buffer_clear(struct wined3d_shader_buffer *buffer) DECLSPEC_HIDDEN;
     2694BOOL shader_buffer_init(struct wined3d_shader_buffer *buffer) DECLSPEC_HIDDEN;
     2695void shader_buffer_free(struct wined3d_shader_buffer *buffer) DECLSPEC_HIDDEN;
     2696void shader_cleanup(IWineD3DBaseShader *iface) DECLSPEC_HIDDEN;
    26562697void shader_dump_src_param(const struct wined3d_shader_src_param *param,
    2657         const struct wined3d_shader_version *shader_version);
     2698        const struct wined3d_shader_version *shader_version) DECLSPEC_HIDDEN;
    26582699void shader_dump_dst_param(const struct wined3d_shader_dst_param *param,
    2659         const struct wined3d_shader_version *shader_version);
     2700        const struct wined3d_shader_version *shader_version) DECLSPEC_HIDDEN;
     2701unsigned int shader_find_free_input_register(const struct shader_reg_maps *reg_maps, unsigned int max) DECLSPEC_HIDDEN;
    26602702void shader_generate_main(IWineD3DBaseShader *iface, struct wined3d_shader_buffer *buffer,
    2661         const shader_reg_maps *reg_maps, const DWORD *pFunction, void *backend_ctx);
     2703        const shader_reg_maps *reg_maps, const DWORD *pFunction, void *backend_ctx) DECLSPEC_HIDDEN;
    26622704HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3d_shader_frontend *fe,
    26632705        struct shader_reg_maps *reg_maps, struct wined3d_shader_attribute *attributes,
    26642706        struct wined3d_shader_signature_element *input_signature,
    2665         struct wined3d_shader_signature_element *output_signature, const DWORD *byte_code, DWORD constf_size);
    2666 void shader_init(struct IWineD3DBaseShaderClass *shader, IWineD3DDevice *device);
    2667 BOOL shader_match_semantic(const char *semantic_name, WINED3DDECLUSAGE usage);
    2668 const struct wined3d_shader_frontend *shader_select_frontend(DWORD version_token);
    2669 void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe_data, const DWORD *pFunction);
     2707        struct wined3d_shader_signature_element *output_signature,
     2708        const DWORD *byte_code, DWORD constf_size) DECLSPEC_HIDDEN;
     2709void shader_init(struct IWineD3DBaseShaderClass *shader, IWineD3DDeviceImpl *device,
     2710        IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
     2711BOOL shader_match_semantic(const char *semantic_name, WINED3DDECLUSAGE usage) DECLSPEC_HIDDEN;
     2712const struct wined3d_shader_frontend *shader_select_frontend(DWORD version_token) DECLSPEC_HIDDEN;
     2713void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe_data, const DWORD *pFunction) DECLSPEC_HIDDEN;
    26702714
    26712715static inline BOOL shader_is_pshader_version(enum wined3d_shader_type type)
     
    27352779 */
    27362780typedef struct IWineD3DVertexShaderImpl {
    2737     /* IUnknown parts*/   
     2781    /* IUnknown parts */
    27382782    const IWineD3DVertexShaderVtbl *lpVtbl;
    27392783
    27402784    /* IWineD3DBaseShader */
    27412785    IWineD3DBaseShaderClass     baseShader;
    2742 
    2743     /* IWineD3DVertexShaderImpl */
    2744     IUnknown                    *parent;
    2745 
    2746     DWORD                       usage;
    2747 
    2748     /* The GL shader */
    2749     void                        *backend_priv;
    27502786
    27512787    /* Vertex shader input and output semantics */
     
    27552791    UINT                       min_rel_offset, max_rel_offset;
    27562792    UINT                       rel_offset;
    2757 
    2758     UINT                       recompile_count;
    27592793} IWineD3DVertexShaderImpl;
    2760 extern const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl;
    2761 
    2762 void find_vs_compile_args(IWineD3DVertexShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, struct vs_compile_args *args);
     2794
     2795void find_vs_compile_args(IWineD3DVertexShaderImpl *shader, IWineD3DStateBlockImpl *stateblock,
     2796        struct vs_compile_args *args) DECLSPEC_HIDDEN;
     2797HRESULT vertexshader_init(IWineD3DVertexShaderImpl *shader, IWineD3DDeviceImpl *device,
     2798        const DWORD *byte_code, const struct wined3d_shader_signature *output_signature,
     2799        IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
    27632800
    27642801/*****************************************************************************
     
    27902827    IWineD3DBaseShaderClass     baseShader;
    27912828
    2792     /* IWineD3DPixelShaderImpl */
    2793     IUnknown                   *parent;
    2794 
    27952829    /* Pixel shader input semantics */
    27962830    struct wined3d_shader_signature_element input_signature[MAX_REG_INPUT];
     
    27992833    unsigned int declared_in_count;
    28002834
    2801     /* The GL shader */
    2802     void                        *backend_priv;
    2803 
    28042835    /* Some information about the shader behavior */
    28052836    char                        vpos_uniform;
     
    28102841} IWineD3DPixelShaderImpl;
    28112842
    2812 extern const IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl;
    2813 void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, IWineD3DBaseTexture * const *textures);
    2814 void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, struct ps_compile_args *args);
     2843HRESULT pixelshader_init(IWineD3DPixelShaderImpl *shader, IWineD3DDeviceImpl *device,
     2844        const DWORD *byte_code, const struct wined3d_shader_signature *output_signature,
     2845        IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
     2846void pixelshader_update_samplers(struct shader_reg_maps *reg_maps,
     2847        IWineD3DBaseTexture * const *textures) DECLSPEC_HIDDEN;
     2848void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImpl *stateblock,
     2849        struct ps_compile_args *args) DECLSPEC_HIDDEN;
    28152850
    28162851/* sRGB correction constants */
     
    28422877};
    28432878
    2844 extern const IWineD3DPaletteVtbl IWineD3DPalette_Vtbl;
    2845 DWORD IWineD3DPaletteImpl_Size(DWORD dwFlags);
     2879extern const IWineD3DPaletteVtbl IWineD3DPalette_Vtbl DECLSPEC_HIDDEN;
     2880DWORD IWineD3DPaletteImpl_Size(DWORD dwFlags) DECLSPEC_HIDDEN;
    28462881
    28472882/* DirectDraw utility functions */
    2848 extern WINED3DFORMAT pixelformat_for_depth(DWORD depth);
     2883extern WINED3DFORMAT pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN;
    28492884
    28502885/*****************************************************************************
     
    28612896#define WINED3DFMT_FLAG_FBO_ATTACHABLE           0x40
    28622897#define WINED3DFMT_FLAG_COMPRESSED               0x80
     2898#define WINED3DFMT_FLAG_GETDC                    0x100
    28632899
    28642900struct GlPixelFormatDesc
     
    28942930};
    28952931
    2896 const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const struct wined3d_gl_info *gl_info);
     2932const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt,
     2933        const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
    28972934
    28982935static inline BOOL use_vs(IWineD3DStateBlockImpl *stateblock)
    28992936{
     2937    /* Check stateblock->vertexDecl to allow this to be used from
     2938     * IWineD3DDeviceImpl_FindTexUnitMap(). This is safe because
     2939     * stateblock->vertexShader implies a vertex declaration instead of ddraw
     2940     * style strided data. */
    29002941    return (stateblock->vertexShader
    2901             && !stateblock->wineD3DDevice->strided_streams.position_transformed
     2942            && !((IWineD3DVertexDeclarationImpl *)stateblock->vertexDecl)->position_transformed
    29022943            && stateblock->wineD3DDevice->vs_selected_mode != SHADER_NONE);
    29032944}
     
    29092950}
    29102951
    2911 void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED3DRECT *src_rect,
    2912         IWineD3DSurface *dst_surface, WINED3DRECT *dst_rect, const WINED3DTEXTUREFILTERTYPE filter, BOOL flip);
     2952void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface,
     2953        WINED3DRECT *src_rect, IWineD3DSurface *dst_surface, WINED3DRECT *dst_rect,
     2954        const WINED3DTEXTUREFILTERTYPE filter, BOOL flip) DECLSPEC_HIDDEN;
    29132955
    29142956/* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette