Changeset 23571 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h
- Timestamp:
- Oct 6, 2009 6:07:06 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 53228
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h
r22496 r23571 143 143 } 144 144 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) ;145 void *wined3d_rb_alloc(size_t size) DECLSPEC_HIDDEN; 146 void *wined3d_rb_realloc(void *ptr, size_t size) DECLSPEC_HIDDEN; 147 void wined3d_rb_free(void *ptr) DECLSPEC_HIDDEN; 148 148 149 149 /* Device caps */ … … 165 165 #define NUM_SAVEDVERTEXSTATES_S 1 166 166 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] ;167 extern const DWORD SavedPixelStates_R[NUM_SAVEDPIXELSTATES_R] DECLSPEC_HIDDEN; 168 extern const DWORD SavedPixelStates_T[NUM_SAVEDPIXELSTATES_T] DECLSPEC_HIDDEN; 169 extern const DWORD SavedPixelStates_S[NUM_SAVEDPIXELSTATES_S] DECLSPEC_HIDDEN; 170 extern const DWORD SavedVertexStates_R[NUM_SAVEDVERTEXSTATES_R] DECLSPEC_HIDDEN; 171 extern const DWORD SavedVertexStates_T[NUM_SAVEDVERTEXSTATES_T] DECLSPEC_HIDDEN; 172 extern const DWORD SavedVertexStates_S[NUM_SAVEDVERTEXSTATES_S] DECLSPEC_HIDDEN; 173 173 174 174 typedef enum _WINELOOKUP { … … 177 177 } WINELOOKUP; 178 178 179 extern const int minLookup[MAX_LOOKUPS] ;180 extern const int maxLookup[MAX_LOOKUPS] ;181 extern DWORD *stateLookup[MAX_LOOKUPS] ;179 extern const int minLookup[MAX_LOOKUPS] DECLSPEC_HIDDEN; 180 extern const int maxLookup[MAX_LOOKUPS] DECLSPEC_HIDDEN; 181 extern DWORD *stateLookup[MAX_LOOKUPS] DECLSPEC_HIDDEN; 182 182 183 183 struct min_lookup … … 186 186 }; 187 187 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]; 188 const struct min_lookup minMipLookup[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN; 189 const struct min_lookup minMipLookup_noFilter[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN; 190 const struct min_lookup minMipLookup_noMip[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN; 191 const GLenum magLookup[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN; 192 const GLenum magLookup_noFilter[WINED3DTEXF_LINEAR + 1] DECLSPEC_HIDDEN; 192 193 193 194 static inline GLenum wined3d_gl_mag_filter(const GLenum mag_lookup[], WINED3DTEXTUREFILTERTYPE mag_filter) … … 259 260 260 261 /** 261 * Settings 262 * Settings 262 263 */ 263 264 #define VS_NONE 0 … … 284 285 285 286 #define RTL_DISABLE -1 286 #define RTL_AUTO 0287 287 #define RTL_READDRAW 1 288 288 #define RTL_READTEX 2 289 #define RTL_TEXDRAW 3290 #define RTL_TEXTEX 4291 289 292 290 #define PCI_VENDOR_NONE 0xffff /* e.g. 0x8086 for Intel and 0x10de for Nvidia */ … … 299 297 int vs_mode; 300 298 int ps_mode; 301 int vbo_mode;302 299 /* Ideally, we don't want the user to have to request GLSL. If the hardware supports GLSL, 303 300 we should use it. However, until it's fully implemented, we'll leave it as a registry … … 314 311 } wined3d_settings_t; 315 312 316 extern wined3d_settings_t wined3d_settings ;313 extern wined3d_settings_t wined3d_settings DECLSPEC_HIDDEN; 317 314 318 315 typedef enum _WINED3DSAMPLER_TEXTURE_TYPE … … 648 645 { 649 646 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 */ 654 651 DWORD *constf; /* pixel, vertex */ 655 652 DWORD texcoord_mask[MAX_REG_TEXCRD]; /* vertex < 3.0 */ … … 662 659 663 660 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; 679 677 680 678 /* Whether or not loops are used in this shader, and nesting depth */ … … 742 740 WINED3DDECLUSAGE usage; 743 741 UINT usage_idx; 742 }; 743 744 struct wined3d_shader_loop_control 745 { 746 unsigned int count; 747 unsigned int start; 748 int step; 744 749 }; 745 750 … … 759 764 }; 760 765 761 extern const struct wined3d_shader_frontend sm1_shader_frontend ;762 extern const struct wined3d_shader_frontend sm4_shader_frontend ;766 extern const struct wined3d_shader_frontend sm1_shader_frontend DECLSPEC_HIDDEN; 767 extern const struct wined3d_shader_frontend sm4_shader_frontend DECLSPEC_HIDDEN; 763 768 764 769 typedef void (*SHADER_HANDLER)(const struct wined3d_shader_instruction *); … … 854 859 } shader_backend_t; 855 860 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 ;861 extern const shader_backend_t glsl_shader_backend DECLSPEC_HIDDEN; 862 extern const shader_backend_t arb_program_shader_backend DECLSPEC_HIDDEN; 863 extern const shader_backend_t none_shader_backend DECLSPEC_HIDDEN; 859 864 860 865 /* X11 locking */ 861 866 862 extern void (* CDECL wine_tsx11_lock_ptr)(void) ;863 extern void (* CDECL wine_tsx11_unlock_ptr)(void) ;867 extern void (* CDECL wine_tsx11_lock_ptr)(void) DECLSPEC_HIDDEN; 868 extern void (* CDECL wine_tsx11_unlock_ptr)(void) DECLSPEC_HIDDEN; 864 869 865 870 /* As GLX relies on X, this is needed */ 866 extern int num_lock ;871 extern int num_lock DECLSPEC_HIDDEN; 867 872 868 873 #if 0 … … 954 959 955 960 /* 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", \ 958 964 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) 960 966 961 967 /* Defines used for optimizations */ … … 972 978 973 979 /* Global variables */ 974 extern const float identity[16] ;980 extern const float identity[16] DECLSPEC_HIDDEN; 975 981 976 982 /***************************************************************************** … … 981 987 #if 0 /* NOTE: Must be 0 in cvs */ 982 988 # define VTRACE(A) TRACE A 983 #else 984 # define VTRACE(A) 989 #else 990 # define VTRACE(A) 985 991 #endif 986 992 … … 995 1001 # if 1 /* NOTE: Must be 1 in cvs, as this is mostly more useful than a trace from program start */ 996 1002 # define SINGLE_FRAME_DEBUGGING 997 # endif 1003 # endif 998 1004 /* 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 1001 1007 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 */ 1003 1009 # define SHOW_FRAME_MAKEUP 1 1004 # endif 1010 # endif 1005 1011 /* The following, when enabled, lets you see the makeup of the all the textures used during each 1006 1012 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 1008 1014 /tmp/texture_*_<Stage>.ppm after each primitive array is drawn. */ 1009 1015 # if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */ 1010 1016 # define SHOW_TEXTURE_MAKEUP 0 1011 # endif 1017 # endif 1012 1018 extern BOOL isOn; 1013 1019 extern BOOL isDumpingFrames; … … 1078 1084 1079 1085 /* 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) ;1086 void drawPrimitive(IWineD3DDevice *iface, UINT index_count, 1087 UINT start_idx, UINT idxBytes, const void *idxData) DECLSPEC_HIDDEN; 1088 DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN; 1083 1089 1084 1090 typedef void (WINE_GLAPI *glAttribFunc)(const void *data); 1085 1091 typedef 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] ;1092 extern glAttribFunc position_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; 1093 extern glAttribFunc diffuse_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; 1094 extern glAttribFunc specular_func_3ubv DECLSPEC_HIDDEN; 1095 extern glAttribFunc specular_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; 1096 extern glAttribFunc normal_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; 1097 extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; 1092 1098 1093 1099 #define eps 1e-8 … … 1281 1287 }; 1282 1288 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 ;1289 extern const struct StateEntryTemplate misc_state_template[] DECLSPEC_HIDDEN; 1290 extern const struct StateEntryTemplate ffp_vertexstate_template[] DECLSPEC_HIDDEN; 1291 extern const struct fragment_pipeline ffp_fragment_pipeline DECLSPEC_HIDDEN; 1292 extern const struct fragment_pipeline atifs_fragment_pipeline DECLSPEC_HIDDEN; 1293 extern const struct fragment_pipeline arbfp_fragment_pipeline DECLSPEC_HIDDEN; 1294 extern const struct fragment_pipeline nvts_fragment_pipeline DECLSPEC_HIDDEN; 1295 extern const struct fragment_pipeline nvrc_fragment_pipeline DECLSPEC_HIDDEN; 1290 1296 1291 1297 /* "Base" state table */ 1292 1298 HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs, 1293 1299 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; 1295 1301 1296 1302 /* Shaders for color conversions in blits */ … … 1305 1311 }; 1306 1312 1307 extern const struct blit_shader ffp_blit ;1308 extern const struct blit_shader arbfp_blit ;1313 extern const struct blit_shader ffp_blit DECLSPEC_HIDDEN; 1314 extern const struct blit_shader arbfp_blit DECLSPEC_HIDDEN; 1309 1315 1310 1316 typedef enum ContextUsage { … … 1315 1321 } ContextUsage; 1316 1322 1317 struct wined3d_context *ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, enum ContextUsage usage); 1323 struct wined3d_context *ActivateContext(IWineD3DDeviceImpl *This, 1324 IWineD3DSurface *target, enum ContextUsage usage) DECLSPEC_HIDDEN; 1318 1325 struct 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; 1327 void DestroyContext(IWineD3DDeviceImpl *This, struct wined3d_context *context) DECLSPEC_HIDDEN; 1328 void context_alloc_event_query(struct wined3d_context *context, 1329 struct wined3d_event_query *query) DECLSPEC_HIDDEN; 1330 void context_alloc_occlusion_query(struct wined3d_context *context, 1331 struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; 1332 void context_resource_released(IWineD3DDevice *iface, 1333 IWineD3DResource *resource, WINED3DRESOURCETYPE type) DECLSPEC_HIDDEN; 1334 void context_bind_fbo(struct wined3d_context *context, GLenum target, GLuint *fbo) DECLSPEC_HIDDEN; 1325 1335 void 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; 1327 1337 void 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; 1339 void context_free_event_query(struct wined3d_event_query *query) DECLSPEC_HIDDEN; 1340 void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; 1341 struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN; 1342 DWORD context_get_tls_idx(void) DECLSPEC_HIDDEN; 1343 BOOL context_set_current(struct wined3d_context *ctx) DECLSPEC_HIDDEN; 1344 void context_set_tls_idx(DWORD idx) DECLSPEC_HIDDEN; 1345 1346 void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain) DECLSPEC_HIDDEN; 1347 HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain) DECLSPEC_HIDDEN; 1338 1348 1339 1349 /* Macros for doing basic GPU detection based on opengl capabilities */ … … 1344 1354 1345 1355 /* Default callbacks for implicit object destruction */ 1346 extern ULONG WINAPI D3DCB_DefaultDestroySurface(IWineD3DSurface *pSurface); 1347 1348 extern ULONG WINAPI D3DCB_DefaultDestroyVolume(IWineD3DVolume *pSurface); 1356 extern ULONG WINAPI D3DCB_DefaultDestroyVolume(IWineD3DVolume *pSurface) DECLSPEC_HIDDEN; 1349 1357 1350 1358 /***************************************************************************** … … 1370 1378 1371 1379 /* The default light parameters */ 1372 extern const WINED3DLIGHT WINED3D_default_light ;1380 extern const WINED3DLIGHT WINED3D_default_light DECLSPEC_HIDDEN; 1373 1381 1374 1382 typedef struct WineD3D_PixelFormat … … 1402 1410 }; 1403 1411 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) ;1412 extern BOOL initPixelFormats(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; 1413 BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; 1414 extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram) DECLSPEC_HIDDEN; 1415 extern void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; 1408 1416 1409 1417 /***************************************************************************** … … 1421 1429 }; 1422 1430 1423 HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This, struct WineD3DRectPatch *patch) ;1431 HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This, struct WineD3DRectPatch *patch) DECLSPEC_HIDDEN; 1424 1432 1425 1433 enum projection_types … … 1474 1482 }; 1475 1483 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); 1484 extern const struct wine_rb_functions wined3d_ffp_frag_program_rb_functions DECLSPEC_HIDDEN; 1485 extern const struct wined3d_parent_ops wined3d_null_parent_ops DECLSPEC_HIDDEN; 1486 1487 void gen_ffp_frag_op(IWineD3DStateBlockImpl *stateblock, struct ffp_frag_settings *settings, 1488 BOOL ignore_textype) DECLSPEC_HIDDEN; 1479 1489 const 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; 1491 void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc) DECLSPEC_HIDDEN; 1482 1492 1483 1493 /***************************************************************************** … … 1498 1508 } IWineD3DImpl; 1499 1509 1500 extern const IWineD3DVtbl IWineD3D_Vtbl ;1501 1502 BOOL InitAdapters(IWineD3DImpl *This) ;1510 extern const IWineD3DVtbl IWineD3D_Vtbl DECLSPEC_HIDDEN; 1511 1512 BOOL InitAdapters(IWineD3DImpl *This) DECLSPEC_HIDDEN; 1503 1513 1504 1514 /* A helper function that dumps a resource list */ 1505 void dumpResources(struct list *list) ;1515 void dumpResources(struct list *list) DECLSPEC_HIDDEN; 1506 1516 1507 1517 /***************************************************************************** … … 1650 1660 }; 1651 1661 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) ;1662 extern const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl DECLSPEC_HIDDEN; 1663 1664 void device_resource_add(IWineD3DDeviceImpl *This, IWineD3DResource *resource) DECLSPEC_HIDDEN; 1665 void device_resource_released(IWineD3DDeviceImpl *This, IWineD3DResource *resource) DECLSPEC_HIDDEN; 1656 1666 void 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; 1658 1668 void 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; 1670 HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, DWORD Count, 1671 const WINED3DRECT *pRects, DWORD Flags, WINED3DCOLOR Color, float Z, DWORD Stencil) DECLSPEC_HIDDEN; 1672 void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) DECLSPEC_HIDDEN; 1673 void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) DECLSPEC_HIDDEN; 1665 1674 static inline BOOL isStateDirty(struct wined3d_context *context, DWORD state) 1666 1675 { … … 1708 1717 struct list privateData; 1709 1718 struct list resource_list_entry; 1710 1719 const struct wined3d_parent_ops *parent_ops; 1711 1720 } IWineD3DResourceClass; 1712 1721 … … 1718 1727 } IWineD3DResourceImpl; 1719 1728 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) ;1729 void resource_cleanup(IWineD3DResource *iface) DECLSPEC_HIDDEN; 1730 HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID guid) DECLSPEC_HIDDEN; 1731 HRESULT resource_get_device(IWineD3DResource *iface, IWineD3DDevice **device) DECLSPEC_HIDDEN; 1732 HRESULT resource_get_parent(IWineD3DResource *iface, IUnknown **parent) DECLSPEC_HIDDEN; 1733 DWORD resource_get_priority(IWineD3DResource *iface) DECLSPEC_HIDDEN; 1725 1734 HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID guid, 1726 void *data, DWORD *data_size) ;1735 void *data, DWORD *data_size) DECLSPEC_HIDDEN; 1727 1736 HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type, 1728 1737 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; 1739 WINED3DRESOURCETYPE resource_get_type(IWineD3DResource *iface) DECLSPEC_HIDDEN; 1740 DWORD resource_set_priority(IWineD3DResource *iface, DWORD new_priority) DECLSPEC_HIDDEN; 1732 1741 HRESULT 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; 1734 1743 1735 1744 /* Tests show that the start address of resources is 32 byte aligned */ … … 1765 1774 }; 1766 1775 1776 struct gl_texture 1777 { 1778 DWORD states[MAX_WINETEXTURESTATES]; 1779 BOOL dirty; 1780 GLuint name; 1781 }; 1782 1767 1783 /***************************************************************************** 1768 1784 * IWineD3DBaseTexture implementation structure (extends IWineD3DResourceImpl) … … 1770 1786 typedef struct IWineD3DBaseTextureClass 1771 1787 { 1772 DWORD states[MAX_WINETEXTURESTATES]; 1773 DWORD srgbstates[MAX_WINETEXTURESTATES]; 1788 struct gl_texture texture_rgb, texture_srgb; 1774 1789 UINT levels; 1775 BOOL dirty, srgbDirty;1776 UINT textureName, srgbTextureName;1777 1790 float pow2Matrix[16]; 1778 1791 UINT LOD; … … 1787 1800 } IWineD3DBaseTextureClass; 1788 1801 1789 void surface_internal_preload(IWineD3DSurface *iface, enum WINED3DSRGB srgb) ;1802 void surface_internal_preload(IWineD3DSurface *iface, enum WINED3DSRGB srgb) DECLSPEC_HIDDEN; 1790 1803 1791 1804 typedef struct IWineD3DBaseTextureImpl … … 1800 1813 void basetexture_apply_state_changes(IWineD3DBaseTexture *iface, 1801 1814 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; 1816 HRESULT basetexture_bind(IWineD3DBaseTexture *iface, BOOL srgb, BOOL *set_surface_desc) DECLSPEC_HIDDEN; 1817 void basetexture_cleanup(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; 1818 void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; 1819 WINED3DTEXTUREFILTERTYPE basetexture_get_autogen_filter_type(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; 1820 BOOL basetexture_get_dirty(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; 1821 DWORD basetexture_get_level_count(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; 1822 DWORD basetexture_get_lod(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; 1810 1823 HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT levels, WINED3DRESOURCETYPE resource_type, 1811 1824 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; 1826 HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface, 1827 WINED3DTEXTUREFILTERTYPE filter_type) DECLSPEC_HIDDEN; 1828 BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty) DECLSPEC_HIDDEN; 1829 DWORD basetexture_set_lod(IWineD3DBaseTexture *iface, DWORD new_lod) DECLSPEC_HIDDEN; 1830 void basetexture_unload(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN; 1817 1831 1818 1832 /***************************************************************************** … … 1833 1847 } IWineD3DTextureImpl; 1834 1848 1835 extern const IWineD3DTextureVtbl IWineD3DTexture_Vtbl;1836 1837 1849 HRESULT 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; 1839 1852 1840 1853 /***************************************************************************** … … 1852 1865 } IWineD3DCubeTextureImpl; 1853 1866 1854 extern const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl;1855 1856 1867 HRESULT 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; 1858 1870 1859 1871 typedef struct _WINED3DVOLUMET_DESC … … 1883 1895 } IWineD3DVolumeImpl; 1884 1896 1885 extern const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl; 1886 1887 void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box); 1897 void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box) DECLSPEC_HIDDEN; 1898 HRESULT 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; 1888 1901 1889 1902 /***************************************************************************** … … 1901 1914 } IWineD3DVolumeTextureImpl; 1902 1915 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); 1916 HRESULT 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; 1907 1919 1908 1920 typedef struct _WINED3DSURFACET_DESC … … 2020 2032 }; 2021 2033 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); 2034 extern const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl DECLSPEC_HIDDEN; 2035 extern const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl DECLSPEC_HIDDEN; 2036 2037 UINT surface_calculate_size(const struct GlPixelFormatDesc *format_desc, 2038 UINT alignment, UINT width, UINT height) DECLSPEC_HIDDEN; 2039 void surface_gdi_cleanup(IWineD3DSurfaceImpl *This) DECLSPEC_HIDDEN; 2027 2040 HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, UINT alignment, 2028 2041 UINT width, UINT height, UINT level, BOOL lockable, BOOL discard, WINED3DMULTISAMPLE_TYPE multisample_type, 2029 2042 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; 2031 2044 2032 2045 /* 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); 2046 HRESULT WINAPI IWineD3DBaseSurfaceImpl_QueryInterface(IWineD3DSurface *iface, 2047 REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN; 2048 ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface) DECLSPEC_HIDDEN; 2049 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetParent(IWineD3DSurface *iface, IUnknown **pParent) DECLSPEC_HIDDEN; 2050 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetDevice(IWineD3DSurface *iface, IWineD3DDevice** ppDevice) DECLSPEC_HIDDEN; 2051 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPrivateData(IWineD3DSurface *iface, 2052 REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) DECLSPEC_HIDDEN; 2053 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPrivateData(IWineD3DSurface *iface, 2054 REFGUID refguid, void *pData, DWORD *pSizeOfData) DECLSPEC_HIDDEN; 2055 HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, REFGUID refguid) DECLSPEC_HIDDEN; 2056 DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD PriorityNew) DECLSPEC_HIDDEN; 2057 DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface) DECLSPEC_HIDDEN; 2058 WINED3DRESOURCETYPE WINAPI IWineD3DBaseSurfaceImpl_GetType(IWineD3DSurface *iface) DECLSPEC_HIDDEN; 2059 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetContainer(IWineD3DSurface* iface, 2060 REFIID riid, void **ppContainer) DECLSPEC_HIDDEN; 2061 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSURFACE_DESC *pDesc) DECLSPEC_HIDDEN; 2062 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWORD Flags) DECLSPEC_HIDDEN; 2063 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetFlipStatus(IWineD3DSurface *iface, DWORD Flags) DECLSPEC_HIDDEN; 2064 HRESULT WINAPI IWineD3DBaseSurfaceImpl_IsLost(IWineD3DSurface *iface) DECLSPEC_HIDDEN; 2065 HRESULT WINAPI IWineD3DBaseSurfaceImpl_Restore(IWineD3DSurface *iface) DECLSPEC_HIDDEN; 2066 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPalette(IWineD3DSurface *iface, IWineD3DPalette **Pal) DECLSPEC_HIDDEN; 2067 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPalette *Pal) DECLSPEC_HIDDEN; 2068 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetColorKey(IWineD3DSurface *iface, 2069 DWORD Flags, const WINEDDCOLORKEY *CKey) DECLSPEC_HIDDEN; 2070 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWineD3DBase *container) DECLSPEC_HIDDEN; 2071 DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface) DECLSPEC_HIDDEN; 2072 HRESULT WINAPI IWineD3DBaseSurfaceImpl_RealizePalette(IWineD3DSurface *iface) DECLSPEC_HIDDEN; 2073 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LONG X, LONG Y) DECLSPEC_HIDDEN; 2074 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetOverlayPosition(IWineD3DSurface *iface, LONG *X, LONG *Y) DECLSPEC_HIDDEN; 2075 HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder(IWineD3DSurface *iface, 2076 DWORD Flags, IWineD3DSurface *Ref) DECLSPEC_HIDDEN; 2058 2077 HRESULT 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; 2079 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD3DClipper *clipper) DECLSPEC_HIDDEN; 2080 HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DClipper **clipper) DECLSPEC_HIDDEN; 2081 HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) DECLSPEC_HIDDEN; 2082 HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) DECLSPEC_HIDDEN; 2064 2083 HRESULT 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; 2066 2085 HRESULT 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; 2087 HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKED_RECT *pLockedRect, 2088 const RECT *pRect, DWORD Flags) DECLSPEC_HIDDEN; 2089 void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb) DECLSPEC_HIDDEN; 2090 const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface) DECLSPEC_HIDDEN; 2091 2092 void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; 2093 void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; 2094 void get_drawable_size_pbuffer(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; 2095 void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN; 2096 2097 void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) DECLSPEC_HIDDEN; 2078 2098 2079 2099 /* Surface flags: */ … … 2131 2151 #define SFLAG_DS_DISCARDED SFLAG_DS_LOCATIONS 2132 2152 2133 BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]) ;2153 BOOL CalculateTexRect(IWineD3DSurfaceImpl *This, RECT *Rect, float glTexCoord[4]) DECLSPEC_HIDDEN; 2134 2154 2135 2155 typedef enum { … … 2161 2181 } CONVERT_TYPES; 2162 2182 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); 2183 HRESULT 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 2186 BOOL palette9_changed(IWineD3DSurfaceImpl *This) DECLSPEC_HIDDEN; 2166 2187 2167 2188 /***************************************************************************** … … 2188 2209 2189 2210 IUnknown *parent; 2211 const struct wined3d_parent_ops *parent_ops; 2190 2212 IWineD3DDeviceImpl *wineD3DDevice; 2191 2213 … … 2199 2221 } IWineD3DVertexDeclarationImpl; 2200 2222 2201 extern const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl; 2202 2203 HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *This, 2204 const WINED3DVERTEXELEMENT *elements, UINT element_count); 2223 HRESULT 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; 2205 2226 2206 2227 /***************************************************************************** … … 2348 2369 }; 2349 2370 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; 2371 extern void stateblock_savedstates_set(IWineD3DStateBlock *iface, SAVEDSTATES *states, BOOL value) DECLSPEC_HIDDEN; 2372 extern void stateblock_copy(IWineD3DStateBlock *destination, IWineD3DStateBlock *source) DECLSPEC_HIDDEN; 2373 2374 extern const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl DECLSPEC_HIDDEN; 2360 2375 2361 2376 /* Direct3D terminology with little modifications. We do not have an issued state … … 2375 2390 const IWineD3DQueryVtbl *lpVtbl; 2376 2391 LONG ref; /* Note: Ref counting not required */ 2377 2392 2378 2393 IUnknown *parent; 2379 2394 /*TODO: replace with iface usage */ … … 2389 2404 /* TODO: Think about using a IUnknown instead of a void* */ 2390 2405 void *extendedData; 2391 2392 2393 2406 } IWineD3DQueryImpl; 2394 2407 2395 extern const IWineD3DQueryVtbl IWineD3DQuery_Vtbl ;2396 extern const IWineD3DQueryVtbl IWineD3DEventQuery_Vtbl ;2397 extern const IWineD3DQueryVtbl IWineD3DOcclusionQuery_Vtbl ;2408 extern const IWineD3DQueryVtbl IWineD3DQuery_Vtbl DECLSPEC_HIDDEN; 2409 extern const IWineD3DQueryVtbl IWineD3DEventQuery_Vtbl DECLSPEC_HIDDEN; 2410 extern const IWineD3DQueryVtbl IWineD3DOcclusionQuery_Vtbl DECLSPEC_HIDDEN; 2398 2411 2399 2412 /* IWineD3DBuffer */ … … 2443 2456 }; 2444 2457 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); 2458 const BYTE *buffer_get_memory(IWineD3DBuffer *iface, UINT offset, GLuint *buffer_object) DECLSPEC_HIDDEN; 2459 BYTE *buffer_get_sysmem(struct wined3d_buffer *This) DECLSPEC_HIDDEN; 2460 HRESULT 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; 2448 2463 2449 2464 /* IWineD3DRendertargetView */ … … 2457 2472 }; 2458 2473 2459 extern const IWineD3DRendertargetViewVtbl wined3d_rendertarget_view_vtbl ;2474 extern const IWineD3DRendertargetViewVtbl wined3d_rendertarget_view_vtbl DECLSPEC_HIDDEN; 2460 2475 2461 2476 /***************************************************************************** … … 2489 2504 } IWineD3DSwapChainImpl; 2490 2505 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); 2506 extern const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl DECLSPEC_HIDDEN; 2507 const IWineD3DSwapChainVtbl IWineGDISwapChain_Vtbl DECLSPEC_HIDDEN; 2508 void x11_copy_to_screen(IWineD3DSwapChainImpl *This, const RECT *rc) DECLSPEC_HIDDEN; 2509 2510 HRESULT WINAPI IWineD3DBaseSwapChainImpl_QueryInterface(IWineD3DSwapChain *iface, 2511 REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN; 2512 ULONG WINAPI IWineD3DBaseSwapChainImpl_AddRef(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN; 2513 ULONG WINAPI IWineD3DBaseSwapChainImpl_Release(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN; 2514 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetParent(IWineD3DSwapChain *iface, IUnknown **ppParent) DECLSPEC_HIDDEN; 2515 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetFrontBufferData(IWineD3DSwapChain *iface, 2516 IWineD3DSurface *pDestSurface) DECLSPEC_HIDDEN; 2517 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetBackBuffer(IWineD3DSwapChain *iface, UINT iBackBuffer, 2518 WINED3DBACKBUFFER_TYPE Type, IWineD3DSurface **ppBackBuffer) DECLSPEC_HIDDEN; 2519 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetRasterStatus(IWineD3DSwapChain *iface, 2520 WINED3DRASTER_STATUS *pRasterStatus) DECLSPEC_HIDDEN; 2521 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface, 2522 WINED3DDISPLAYMODE *pMode) DECLSPEC_HIDDEN; 2523 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface, 2524 IWineD3DDevice **ppDevice) DECLSPEC_HIDDEN; 2525 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface, 2526 WINED3DPRESENT_PARAMETERS *pPresentationParameters) DECLSPEC_HIDDEN; 2527 HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, 2528 DWORD Flags, const WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN; 2529 HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface, 2530 WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN; 2531 2532 struct wined3d_context *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *iface) DECLSPEC_HIDDEN; 2533 2534 #define DEFAULT_REFRESH_RATE 0 2509 2535 2510 2536 /***************************************************************************** 2511 * Utility function prototypes 2537 * Utility function prototypes 2512 2538 */ 2513 2539 2514 2540 /* 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) ;2541 const char *debug_d3dformat(WINED3DFORMAT fmt) DECLSPEC_HIDDEN; 2542 const char *debug_d3ddevicetype(WINED3DDEVTYPE devtype) DECLSPEC_HIDDEN; 2543 const char *debug_d3dresourcetype(WINED3DRESOURCETYPE res) DECLSPEC_HIDDEN; 2544 const char *debug_d3dusage(DWORD usage) DECLSPEC_HIDDEN; 2545 const char *debug_d3dusagequery(DWORD usagequery) DECLSPEC_HIDDEN; 2546 const char *debug_d3ddeclmethod(WINED3DDECLMETHOD method) DECLSPEC_HIDDEN; 2547 const char *debug_d3ddeclusage(BYTE usage) DECLSPEC_HIDDEN; 2548 const char *debug_d3dprimitivetype(WINED3DPRIMITIVETYPE PrimitiveType) DECLSPEC_HIDDEN; 2549 const char *debug_d3drenderstate(DWORD state) DECLSPEC_HIDDEN; 2550 const char *debug_d3dsamplerstate(DWORD state) DECLSPEC_HIDDEN; 2551 const char *debug_d3dtexturefiltertype(WINED3DTEXTUREFILTERTYPE filter_type) DECLSPEC_HIDDEN; 2552 const char *debug_d3dtexturestate(DWORD state) DECLSPEC_HIDDEN; 2553 const char *debug_d3dtstype(WINED3DTRANSFORMSTATETYPE tstype) DECLSPEC_HIDDEN; 2554 const char *debug_d3dpool(WINED3DPOOL pool) DECLSPEC_HIDDEN; 2555 const char *debug_fbostatus(GLenum status) DECLSPEC_HIDDEN; 2556 const char *debug_glerror(GLenum error) DECLSPEC_HIDDEN; 2557 const char *debug_d3dbasis(WINED3DBASISTYPE basis) DECLSPEC_HIDDEN; 2558 const char *debug_d3ddegree(WINED3DDEGREETYPE order) DECLSPEC_HIDDEN; 2559 const char *debug_d3dtop(WINED3DTEXTUREOP d3dtop) DECLSPEC_HIDDEN; 2560 void dump_color_fixup_desc(struct color_fixup_desc fixup) DECLSPEC_HIDDEN; 2561 const char *debug_surflocation(DWORD flag) DECLSPEC_HIDDEN; 2536 2562 2537 2563 /* 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); 2564 GLenum StencilOp(DWORD op) DECLSPEC_HIDDEN; 2565 GLenum CompareFunc(DWORD func) DECLSPEC_HIDDEN; 2566 BOOL is_invalid_op(IWineD3DDeviceImpl *This, int stage, WINED3DTEXTUREOP op, 2567 DWORD arg1, DWORD arg2, DWORD arg3) DECLSPEC_HIDDEN; 2568 void 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; 2570 void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, 2571 BOOL transformed, DWORD coordtype, BOOL ffp_can_disable_proj) DECLSPEC_HIDDEN; 2572 void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, 2573 struct wined3d_context *context) DECLSPEC_HIDDEN; 2574 void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, 2575 struct wined3d_context *context) DECLSPEC_HIDDEN; 2576 void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, 2577 struct wined3d_context *context) DECLSPEC_HIDDEN; 2578 void apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, 2579 struct wined3d_context *context) DECLSPEC_HIDDEN; 2580 void state_fogcolor(DWORD state, IWineD3DStateBlockImpl *stateblock, 2581 struct wined3d_context *context) DECLSPEC_HIDDEN; 2582 void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock, 2583 struct wined3d_context *context) DECLSPEC_HIDDEN; 2584 void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock, 2585 struct wined3d_context *context) DECLSPEC_HIDDEN; 2586 void state_fog_fragpart(DWORD state, IWineD3DStateBlockImpl *stateblock, 2587 struct wined3d_context *context) DECLSPEC_HIDDEN; 2588 2589 void surface_add_dirty_rect(IWineD3DSurface *iface, const RECT *dirty_rect) DECLSPEC_HIDDEN; 2590 GLenum surface_get_gl_buffer(IWineD3DSurface *iface, IWineD3DSwapChain *swapchain) DECLSPEC_HIDDEN; 2591 void surface_load_ds_location(IWineD3DSurface *iface, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; 2592 void surface_modify_ds_location(IWineD3DSurface *iface, DWORD location) DECLSPEC_HIDDEN; 2593 void surface_set_compatible_renderbuffer(IWineD3DSurface *iface, 2594 unsigned int width, unsigned int height) DECLSPEC_HIDDEN; 2595 void surface_set_texture_name(IWineD3DSurface *iface, GLuint name, BOOL srgb_name) DECLSPEC_HIDDEN; 2596 void surface_set_texture_target(IWineD3DSurface *iface, GLenum target) DECLSPEC_HIDDEN; 2559 2597 2560 2598 BOOL 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; 2600 BOOL getDepthStencilBits(const struct GlPixelFormatDesc *format_desc, 2601 short *depthSize, short *stencilSize) DECLSPEC_HIDDEN; 2563 2602 2564 2603 /* 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) ;2604 void multiply_matrix(WINED3DMATRIX *dest, const WINED3DMATRIX *src1, const WINED3DMATRIX *src2) DECLSPEC_HIDDEN; 2605 UINT wined3d_log2i(UINT32 x) DECLSPEC_HIDDEN; 2606 unsigned int count_bits(unsigned int mask) DECLSPEC_HIDDEN; 2568 2607 2569 2608 typedef struct local_constant { … … 2587 2626 } SHADER_LIMITS; 2588 2627 2589 /* * Keeps track of details for TEX_M#x# shader opcodes which need to2590 2628 /* Keeps track of details for TEX_M#x# shader opcodes which need to 2629 * maintain state information between multiple codes */ 2591 2630 typedef struct SHADER_PARSE_STATE { 2592 2631 unsigned int current_row; … … 2601 2640 2602 2641 /* 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) ;2642 int shader_addline(struct wined3d_shader_buffer *buffer, const char *fmt, ...) PRINTF_ATTR(2,3) DECLSPEC_HIDDEN; 2643 int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *fmt, va_list args) DECLSPEC_HIDDEN; 2605 2644 2606 2645 /* 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); 2646 extern BOOL vshader_get_input(IWineD3DVertexShader *iface, 2647 BYTE usage_req, BYTE usage_idx_req, unsigned int *regnum) DECLSPEC_HIDDEN; 2648 2649 extern HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object) DECLSPEC_HIDDEN; 2613 2650 2614 2651 /***************************************************************************** … … 2626 2663 const struct wined3d_shader_frontend *frontend; 2627 2664 void *frontend_data; 2665 void *backend_data; 2666 2667 IUnknown *parent; 2668 const struct wined3d_parent_ops *parent_ops; 2628 2669 2629 2670 /* Programs this shader is linked with */ … … 2650 2691 } IWineD3DBaseShaderImpl; 2651 2692 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) ;2693 void shader_buffer_clear(struct wined3d_shader_buffer *buffer) DECLSPEC_HIDDEN; 2694 BOOL shader_buffer_init(struct wined3d_shader_buffer *buffer) DECLSPEC_HIDDEN; 2695 void shader_buffer_free(struct wined3d_shader_buffer *buffer) DECLSPEC_HIDDEN; 2696 void shader_cleanup(IWineD3DBaseShader *iface) DECLSPEC_HIDDEN; 2656 2697 void 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; 2658 2699 void 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; 2701 unsigned int shader_find_free_input_register(const struct shader_reg_maps *reg_maps, unsigned int max) DECLSPEC_HIDDEN; 2660 2702 void 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; 2662 2704 HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3d_shader_frontend *fe, 2663 2705 struct shader_reg_maps *reg_maps, struct wined3d_shader_attribute *attributes, 2664 2706 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; 2709 void shader_init(struct IWineD3DBaseShaderClass *shader, IWineD3DDeviceImpl *device, 2710 IUnknown *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN; 2711 BOOL shader_match_semantic(const char *semantic_name, WINED3DDECLUSAGE usage) DECLSPEC_HIDDEN; 2712 const struct wined3d_shader_frontend *shader_select_frontend(DWORD version_token) DECLSPEC_HIDDEN; 2713 void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe_data, const DWORD *pFunction) DECLSPEC_HIDDEN; 2670 2714 2671 2715 static inline BOOL shader_is_pshader_version(enum wined3d_shader_type type) … … 2735 2779 */ 2736 2780 typedef struct IWineD3DVertexShaderImpl { 2737 /* IUnknown parts */2781 /* IUnknown parts */ 2738 2782 const IWineD3DVertexShaderVtbl *lpVtbl; 2739 2783 2740 2784 /* IWineD3DBaseShader */ 2741 2785 IWineD3DBaseShaderClass baseShader; 2742 2743 /* IWineD3DVertexShaderImpl */2744 IUnknown *parent;2745 2746 DWORD usage;2747 2748 /* The GL shader */2749 void *backend_priv;2750 2786 2751 2787 /* Vertex shader input and output semantics */ … … 2755 2791 UINT min_rel_offset, max_rel_offset; 2756 2792 UINT rel_offset; 2757 2758 UINT recompile_count;2759 2793 } IWineD3DVertexShaderImpl; 2760 extern const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl; 2761 2762 void find_vs_compile_args(IWineD3DVertexShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, struct vs_compile_args *args); 2794 2795 void find_vs_compile_args(IWineD3DVertexShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, 2796 struct vs_compile_args *args) DECLSPEC_HIDDEN; 2797 HRESULT 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; 2763 2800 2764 2801 /***************************************************************************** … … 2790 2827 IWineD3DBaseShaderClass baseShader; 2791 2828 2792 /* IWineD3DPixelShaderImpl */2793 IUnknown *parent;2794 2795 2829 /* Pixel shader input semantics */ 2796 2830 struct wined3d_shader_signature_element input_signature[MAX_REG_INPUT]; … … 2799 2833 unsigned int declared_in_count; 2800 2834 2801 /* The GL shader */2802 void *backend_priv;2803 2804 2835 /* Some information about the shader behavior */ 2805 2836 char vpos_uniform; … … 2810 2841 } IWineD3DPixelShaderImpl; 2811 2842 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); 2843 HRESULT 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; 2846 void pixelshader_update_samplers(struct shader_reg_maps *reg_maps, 2847 IWineD3DBaseTexture * const *textures) DECLSPEC_HIDDEN; 2848 void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImpl *stateblock, 2849 struct ps_compile_args *args) DECLSPEC_HIDDEN; 2815 2850 2816 2851 /* sRGB correction constants */ … … 2842 2877 }; 2843 2878 2844 extern const IWineD3DPaletteVtbl IWineD3DPalette_Vtbl ;2845 DWORD IWineD3DPaletteImpl_Size(DWORD dwFlags) ;2879 extern const IWineD3DPaletteVtbl IWineD3DPalette_Vtbl DECLSPEC_HIDDEN; 2880 DWORD IWineD3DPaletteImpl_Size(DWORD dwFlags) DECLSPEC_HIDDEN; 2846 2881 2847 2882 /* DirectDraw utility functions */ 2848 extern WINED3DFORMAT pixelformat_for_depth(DWORD depth) ;2883 extern WINED3DFORMAT pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN; 2849 2884 2850 2885 /***************************************************************************** … … 2861 2896 #define WINED3DFMT_FLAG_FBO_ATTACHABLE 0x40 2862 2897 #define WINED3DFMT_FLAG_COMPRESSED 0x80 2898 #define WINED3DFMT_FLAG_GETDC 0x100 2863 2899 2864 2900 struct GlPixelFormatDesc … … 2894 2930 }; 2895 2931 2896 const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const struct wined3d_gl_info *gl_info); 2932 const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, 2933 const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; 2897 2934 2898 2935 static inline BOOL use_vs(IWineD3DStateBlockImpl *stateblock) 2899 2936 { 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. */ 2900 2941 return (stateblock->vertexShader 2901 && ! stateblock->wineD3DDevice->strided_streams.position_transformed2942 && !((IWineD3DVertexDeclarationImpl *)stateblock->vertexDecl)->position_transformed 2902 2943 && stateblock->wineD3DDevice->vs_selected_mode != SHADER_NONE); 2903 2944 } … … 2909 2950 } 2910 2951 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); 2952 void 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; 2913 2955 2914 2956 /* 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.