Commit 43e6686a authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Rename _WineD3D_GL_Info to struct wined3d_gl_info.

parent 0c110597
...@@ -192,8 +192,9 @@ static const char *debug_mask(GLuint mask) { ...@@ -192,8 +192,9 @@ static const char *debug_mask(GLuint mask) {
} }
#define GLINFO_LOCATION (*gl_info) #define GLINFO_LOCATION (*gl_info)
static void wrap_op1(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod, static void wrap_op1(const struct wined3d_gl_info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod,
GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) { GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
{
if(dstMask == GL_ALPHA) { if(dstMask == GL_ALPHA) {
TRACE("glAlphaFragmentOp1ATI(%s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst), debug_dstmod(dstMod), TRACE("glAlphaFragmentOp1ATI(%s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst), debug_dstmod(dstMod),
debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod)); debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod));
...@@ -206,9 +207,9 @@ static void wrap_op1(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLui ...@@ -206,9 +207,9 @@ static void wrap_op1(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLui
} }
} }
static void wrap_op2(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod, static void wrap_op2(const struct wined3d_gl_info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod,
GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) { {
if(dstMask == GL_ALPHA) { if(dstMask == GL_ALPHA) {
TRACE("glAlphaFragmentOp2ATI(%s, %s, %s, %s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst), debug_dstmod(dstMod), TRACE("glAlphaFragmentOp2ATI(%s, %s, %s, %s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst), debug_dstmod(dstMod),
debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod), debug_register(arg1), debug_rep(arg1Rep), debug_argmod(arg1Mod),
...@@ -223,10 +224,10 @@ static void wrap_op2(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLui ...@@ -223,10 +224,10 @@ static void wrap_op2(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLui
} }
} }
static void wrap_op3(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod, static void wrap_op3(const struct wined3d_gl_info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod,
GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod,
GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) { {
if(dstMask == GL_ALPHA) { if(dstMask == GL_ALPHA) {
/* Leave some free space to fit "GL_NONE, " in to align most alpha and color op lines */ /* Leave some free space to fit "GL_NONE, " in to align most alpha and color op lines */
TRACE("glAlphaFragmentOp3ATI(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst), debug_dstmod(dstMod), TRACE("glAlphaFragmentOp3ATI(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)\n", debug_op(op), debug_register(dst), debug_dstmod(dstMod),
...@@ -250,7 +251,7 @@ static void wrap_op3(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLui ...@@ -250,7 +251,7 @@ static void wrap_op3(const WineD3D_GL_Info *gl_info, GLuint op, GLuint dst, GLui
} }
} }
static GLuint register_for_arg(DWORD arg, const WineD3D_GL_Info *gl_info, static GLuint register_for_arg(DWORD arg, const struct wined3d_gl_info *gl_info,
unsigned int stage, GLuint *mod, GLuint *rep, GLuint tmparg) unsigned int stage, GLuint *mod, GLuint *rep, GLuint tmparg)
{ {
GLenum ret; GLenum ret;
...@@ -378,7 +379,7 @@ static GLuint find_tmpreg(const struct texture_stage_op op[MAX_TEXTURES]) ...@@ -378,7 +379,7 @@ static GLuint find_tmpreg(const struct texture_stage_op op[MAX_TEXTURES])
} }
} }
static GLuint gen_ati_shader(const struct texture_stage_op op[MAX_TEXTURES], const WineD3D_GL_Info *gl_info) static GLuint gen_ati_shader(const struct texture_stage_op op[MAX_TEXTURES], const struct wined3d_gl_info *gl_info)
{ {
GLuint ret = GL_EXTCALL(glGenFragmentShadersATI(1)); GLuint ret = GL_EXTCALL(glGenFragmentShadersATI(1));
unsigned int stage; unsigned int stage;
...@@ -1051,7 +1052,7 @@ static void atifs_enable(IWineD3DDevice *iface, BOOL enable) { ...@@ -1051,7 +1052,7 @@ static void atifs_enable(IWineD3DDevice *iface, BOOL enable) {
LEAVE_GL(); LEAVE_GL();
} }
static void atifs_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *caps) static void atifs_get_caps(WINED3DDEVTYPE devtype, const struct wined3d_gl_info *gl_info, struct fragment_caps *caps)
{ {
caps->TextureOpCaps = WINED3DTEXOPCAPS_DISABLE | caps->TextureOpCaps = WINED3DTEXOPCAPS_DISABLE |
WINED3DTEXOPCAPS_SELECTARG1 | WINED3DTEXOPCAPS_SELECTARG1 |
......
...@@ -1379,7 +1379,8 @@ static void shader_none_free(IWineD3DDevice *iface) {} ...@@ -1379,7 +1379,8 @@ static void shader_none_free(IWineD3DDevice *iface) {}
static BOOL shader_none_dirty_const(IWineD3DDevice *iface) {return FALSE;} static BOOL shader_none_dirty_const(IWineD3DDevice *iface) {return FALSE;}
#define GLINFO_LOCATION (*gl_info) #define GLINFO_LOCATION (*gl_info)
static void shader_none_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *pCaps) static void shader_none_get_caps(WINED3DDEVTYPE devtype,
const struct wined3d_gl_info *gl_info, struct shader_caps *pCaps)
{ {
/* Set the shader caps to 0 for the none shader backend */ /* Set the shader caps to 0 for the none shader backend */
pCaps->VertexShaderVersion = 0; pCaps->VertexShaderVersion = 0;
......
...@@ -140,7 +140,7 @@ static void cubetexture_cleanup(IWineD3DCubeTextureImpl *This, D3DCB_DESTROYSURF ...@@ -140,7 +140,7 @@ static void cubetexture_cleanup(IWineD3DCubeTextureImpl *This, D3DCB_DESTROYSURF
HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UINT levels, HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UINT levels,
IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent) IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent)
{ {
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info); const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info);
UINT pow2_edge_length; UINT pow2_edge_length;
unsigned int i, j; unsigned int i, j;
......
...@@ -343,7 +343,8 @@ static void wine_glFogCoorddvEXT(const GLdouble *f) { ...@@ -343,7 +343,8 @@ static void wine_glFogCoorddvEXT(const GLdouble *f) {
/* End GL_EXT_fog_coord emulation */ /* End GL_EXT_fog_coord emulation */
#define GLINFO_LOCATION (*gl_info) #define GLINFO_LOCATION (*gl_info)
void add_gl_compat_wrappers(WineD3D_GL_Info *gl_info) { void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info)
{
if(!GL_SUPPORT(ARB_MULTITEXTURE)) { if(!GL_SUPPORT(ARB_MULTITEXTURE)) {
TRACE("Applying GL_ARB_multitexture emulation hooks\n"); TRACE("Applying GL_ARB_multitexture emulation hooks\n");
gl_info->glActiveTextureARB = wine_glActiveTextureARB; gl_info->glActiveTextureARB = wine_glActiveTextureARB;
......
...@@ -610,7 +610,8 @@ static void nvts_enable(IWineD3DDevice *iface, BOOL enable) { ...@@ -610,7 +610,8 @@ static void nvts_enable(IWineD3DDevice *iface, BOOL enable) {
LEAVE_GL(); LEAVE_GL();
} }
static void nvrc_fragment_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *pCaps) static void nvrc_fragment_get_caps(WINED3DDEVTYPE devtype,
const struct wined3d_gl_info *gl_info, struct fragment_caps *pCaps)
{ {
pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD | pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD |
WINED3DTEXOPCAPS_ADDSIGNED | WINED3DTEXOPCAPS_ADDSIGNED |
......
...@@ -5392,7 +5392,8 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = { ...@@ -5392,7 +5392,8 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = {
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void ffp_enable(IWineD3DDevice *iface, BOOL enable) { } static void ffp_enable(IWineD3DDevice *iface, BOOL enable) { }
static void ffp_fragment_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *pCaps) static void ffp_fragment_get_caps(WINED3DDEVTYPE devtype,
const struct wined3d_gl_info *gl_info, struct fragment_caps *pCaps)
{ {
pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD | pCaps->TextureOpCaps = WINED3DTEXOPCAPS_ADD |
WINED3DTEXOPCAPS_ADDSIGNED | WINED3DTEXOPCAPS_ADDSIGNED |
...@@ -5479,7 +5480,7 @@ static void multistate_apply_3(DWORD state, IWineD3DStateBlockImpl *stateblock, ...@@ -5479,7 +5480,7 @@ static void multistate_apply_3(DWORD state, IWineD3DStateBlockImpl *stateblock,
} }
HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs, HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs,
const WineD3D_GL_Info *gl_info, const struct StateEntryTemplate *vertex, const struct wined3d_gl_info *gl_info, const struct StateEntryTemplate *vertex,
const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc) const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc)
{ {
unsigned int i, type, handlers; unsigned int i, type, handlers;
......
...@@ -38,7 +38,7 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d); ...@@ -38,7 +38,7 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d);
static void surface_cleanup(IWineD3DSurfaceImpl *This) static void surface_cleanup(IWineD3DSurfaceImpl *This)
{ {
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
renderbuffer_entry_t *entry, *entry2; renderbuffer_entry_t *entry, *entry2;
TRACE("(%p) : Cleaning up.\n", This); TRACE("(%p) : Cleaning up.\n", This);
...@@ -124,7 +124,7 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, ...@@ -124,7 +124,7 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type,
UINT multisample_quality, IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, UINT multisample_quality, IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format,
WINED3DPOOL pool, IUnknown *parent) WINED3DPOOL pool, IUnknown *parent)
{ {
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, &GLINFO_LOCATION); const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, &GLINFO_LOCATION);
void (*cleanup)(IWineD3DSurfaceImpl *This); void (*cleanup)(IWineD3DSurfaceImpl *This);
unsigned int resource_size; unsigned int resource_size;
......
...@@ -127,7 +127,7 @@ static void texture_cleanup(IWineD3DTextureImpl *This, D3DCB_DESTROYSURFACEFN su ...@@ -127,7 +127,7 @@ static void texture_cleanup(IWineD3DTextureImpl *This, D3DCB_DESTROYSURFACEFN su
HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT levels, HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT levels,
IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent) IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent)
{ {
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info); const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info);
UINT pow2_width, pow2_height; UINT pow2_width, pow2_height;
UINT tmp_w, tmp_h; UINT tmp_w, tmp_h;
......
...@@ -500,7 +500,7 @@ static inline int getFmtIdx(WINED3DFORMAT fmt) { ...@@ -500,7 +500,7 @@ static inline int getFmtIdx(WINED3DFORMAT fmt) {
return -1; return -1;
} }
static BOOL init_format_base_info(WineD3D_GL_Info *gl_info) static BOOL init_format_base_info(struct wined3d_gl_info *gl_info)
{ {
UINT format_count = sizeof(formats) / sizeof(*formats); UINT format_count = sizeof(formats) / sizeof(*formats);
UINT i; UINT i;
...@@ -529,7 +529,7 @@ static BOOL init_format_base_info(WineD3D_GL_Info *gl_info) ...@@ -529,7 +529,7 @@ static BOOL init_format_base_info(WineD3D_GL_Info *gl_info)
return TRUE; return TRUE;
} }
static BOOL init_format_compression_info(WineD3D_GL_Info *gl_info) static BOOL init_format_compression_info(struct wined3d_gl_info *gl_info)
{ {
unsigned int i; unsigned int i;
...@@ -558,7 +558,7 @@ static BOOL init_format_compression_info(WineD3D_GL_Info *gl_info) ...@@ -558,7 +558,7 @@ static BOOL init_format_compression_info(WineD3D_GL_Info *gl_info)
#define GLINFO_LOCATION (*gl_info) #define GLINFO_LOCATION (*gl_info)
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void check_fbo_compat(const WineD3D_GL_Info *gl_info, struct GlPixelFormatDesc *format_desc) static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct GlPixelFormatDesc *format_desc)
{ {
/* Check if the default internal format is supported as a frame buffer /* Check if the default internal format is supported as a frame buffer
* target, otherwise fall back to the render target internal. * target, otherwise fall back to the render target internal.
...@@ -682,7 +682,7 @@ static void check_fbo_compat(const WineD3D_GL_Info *gl_info, struct GlPixelForma ...@@ -682,7 +682,7 @@ static void check_fbo_compat(const WineD3D_GL_Info *gl_info, struct GlPixelForma
} }
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void init_format_fbo_compat_info(WineD3D_GL_Info *gl_info) static void init_format_fbo_compat_info(struct wined3d_gl_info *gl_info)
{ {
unsigned int i; unsigned int i;
GLuint fbo; GLuint fbo;
...@@ -738,7 +738,7 @@ static void init_format_fbo_compat_info(WineD3D_GL_Info *gl_info) ...@@ -738,7 +738,7 @@ static void init_format_fbo_compat_info(WineD3D_GL_Info *gl_info)
} }
} }
static BOOL init_format_texture_info(WineD3D_GL_Info *gl_info) static BOOL init_format_texture_info(struct wined3d_gl_info *gl_info)
{ {
unsigned int i; unsigned int i;
...@@ -770,7 +770,7 @@ static BOOL init_format_texture_info(WineD3D_GL_Info *gl_info) ...@@ -770,7 +770,7 @@ static BOOL init_format_texture_info(WineD3D_GL_Info *gl_info)
return TRUE; return TRUE;
} }
static void apply_format_fixups(WineD3D_GL_Info *gl_info) static void apply_format_fixups(struct wined3d_gl_info *gl_info)
{ {
int idx; int idx;
...@@ -890,7 +890,7 @@ static void apply_format_fixups(WineD3D_GL_Info *gl_info) ...@@ -890,7 +890,7 @@ static void apply_format_fixups(WineD3D_GL_Info *gl_info)
} }
} }
static BOOL init_format_vertex_info(WineD3D_GL_Info *gl_info) static BOOL init_format_vertex_info(struct wined3d_gl_info *gl_info)
{ {
unsigned int i; unsigned int i;
...@@ -918,7 +918,7 @@ static BOOL init_format_vertex_info(WineD3D_GL_Info *gl_info) ...@@ -918,7 +918,7 @@ static BOOL init_format_vertex_info(WineD3D_GL_Info *gl_info)
return TRUE; return TRUE;
} }
BOOL initPixelFormatsNoGL(WineD3D_GL_Info *gl_info) BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info)
{ {
if (!init_format_base_info(gl_info)) return FALSE; if (!init_format_base_info(gl_info)) return FALSE;
...@@ -932,7 +932,7 @@ BOOL initPixelFormatsNoGL(WineD3D_GL_Info *gl_info) ...@@ -932,7 +932,7 @@ BOOL initPixelFormatsNoGL(WineD3D_GL_Info *gl_info)
} }
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
BOOL initPixelFormats(WineD3D_GL_Info *gl_info) BOOL initPixelFormats(struct wined3d_gl_info *gl_info)
{ {
if (!init_format_base_info(gl_info)) return FALSE; if (!init_format_base_info(gl_info)) return FALSE;
...@@ -954,7 +954,7 @@ fail: ...@@ -954,7 +954,7 @@ fail:
#define GLINFO_LOCATION This->adapter->gl_info #define GLINFO_LOCATION This->adapter->gl_info
const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const WineD3D_GL_Info *gl_info) const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const struct wined3d_gl_info *gl_info)
{ {
int idx = getFmtIdx(fmt); int idx = getFmtIdx(fmt);
......
...@@ -32,7 +32,7 @@ static void volumetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINE ...@@ -32,7 +32,7 @@ static void volumetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINE
/* Override the IWineD3DResource Preload method. */ /* Override the IWineD3DResource Preload method. */
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
BOOL srgb_mode = This->baseTexture.is_srgb; BOOL srgb_mode = This->baseTexture.is_srgb;
BOOL srgb_was_toggled = FALSE; BOOL srgb_was_toggled = FALSE;
unsigned int i; unsigned int i;
...@@ -99,7 +99,7 @@ static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This, D3DCB_DESTROY ...@@ -99,7 +99,7 @@ static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This, D3DCB_DESTROY
HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height, UINT depth, UINT levels, HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height, UINT depth, UINT levels,
IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent) IWineD3DDeviceImpl *device, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool, IUnknown *parent)
{ {
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info); const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(format, gl_info);
UINT tmp_w, tmp_h, tmp_d; UINT tmp_w, tmp_h, tmp_d;
unsigned int i; unsigned int i;
......
...@@ -3949,67 +3949,68 @@ typedef BOOL (WINAPI * WINED3D_PFNWGLSETPIXELFORMATWINE) (HDC hdc, int iPixelFor ...@@ -3949,67 +3949,68 @@ typedef BOOL (WINAPI * WINED3D_PFNWGLSETPIXELFORMATWINE) (HDC hdc, int iPixelFor
****************************************************/ ****************************************************/
#define USE_GL_FUNC(type, pfn, ext, replace) type pfn; #define USE_GL_FUNC(type, pfn, ext, replace) type pfn;
typedef struct _WineD3D_GL_Info {
GL_Vendors gl_vendor; struct wined3d_gl_info
GL_Cards gl_card; {
UINT vidmem; GL_Vendors gl_vendor;
DWORD driver_version; GL_Cards gl_card;
DWORD driver_version_hipart; UINT vidmem;
const char *driver_description; DWORD driver_version;
/** DWORD driver_version_hipart;
* CAPS Constants const char *driver_description;
*/
UINT max_buffers; UINT max_buffers;
UINT max_lights; UINT max_lights;
UINT max_textures; UINT max_textures;
UINT max_texture_stages; UINT max_texture_stages;
UINT max_fragment_samplers; UINT max_fragment_samplers;
UINT max_vertex_samplers; UINT max_vertex_samplers;
UINT max_combined_samplers; UINT max_combined_samplers;
UINT max_sampler_stages; UINT max_sampler_stages;
UINT max_clipplanes; UINT max_clipplanes;
UINT max_texture_size; UINT max_texture_size;
UINT max_texture3d_size; UINT max_texture3d_size;
float max_pointsize, max_pointsizemin; float max_pointsize, max_pointsizemin;
UINT max_point_sprite_units; UINT max_point_sprite_units;
UINT max_blends; UINT max_blends;
UINT max_anisotropy; UINT max_anisotropy;
UINT max_glsl_varyings; UINT max_glsl_varyings;
float max_shininess; float max_shininess;
unsigned max_vshader_constantsF; unsigned int max_vshader_constantsF;
unsigned max_pshader_constantsF; unsigned int max_pshader_constantsF;
unsigned vs_arb_constantsF; unsigned int vs_arb_constantsF;
unsigned vs_arb_max_instructions; unsigned int vs_arb_max_instructions;
unsigned vs_arb_max_temps; unsigned int vs_arb_max_temps;
unsigned ps_arb_constantsF; unsigned int ps_arb_constantsF;
unsigned ps_arb_max_local_constants; unsigned int ps_arb_max_local_constants;
unsigned ps_arb_max_instructions; unsigned int ps_arb_max_instructions;
unsigned ps_arb_max_temps; unsigned int ps_arb_max_temps;
unsigned vs_glsl_constantsF; unsigned int vs_glsl_constantsF;
unsigned ps_glsl_constantsF; unsigned int ps_glsl_constantsF;
GL_PSVersion ps_arb_version; GL_PSVersion ps_arb_version;
GL_PSVersion ps_nv_version; GL_PSVersion ps_nv_version;
GL_VSVersion vs_arb_version; GL_VSVersion vs_arb_version;
GL_VSVersion vs_nv_version; GL_VSVersion vs_nv_version;
GL_VSVersion vs_ati_version; GL_VSVersion vs_ati_version;
DWORD reserved_glsl_constants; DWORD reserved_glsl_constants;
DWORD quirks; DWORD quirks;
BOOL supported[WINED3D_GL_EXT_COUNT]; BOOL supported[WINED3D_GL_EXT_COUNT];
/** OpenGL EXT and ARB functions ptr */ /* GL function pointers */
GL_EXT_FUNCS_GEN GL_EXT_FUNCS_GEN
/** OpenGL WGL functions ptr */ /* WGL function pointers */
WGL_EXT_FUNCS_GEN WGL_EXT_FUNCS_GEN
struct GlPixelFormatDesc *gl_formats; struct GlPixelFormatDesc *gl_formats;
} WineD3D_GL_Info; };
#undef USE_GL_FUNC #undef USE_GL_FUNC
#endif /* __WINE_WINED3D_GL */ #endif /* __WINE_WINED3D_GL */
...@@ -822,7 +822,7 @@ typedef struct { ...@@ -822,7 +822,7 @@ typedef struct {
HRESULT (*shader_alloc_private)(IWineD3DDevice *iface); HRESULT (*shader_alloc_private)(IWineD3DDevice *iface);
void (*shader_free_private)(IWineD3DDevice *iface); void (*shader_free_private)(IWineD3DDevice *iface);
BOOL (*shader_dirtifyable_constants)(IWineD3DDevice *iface); BOOL (*shader_dirtifyable_constants)(IWineD3DDevice *iface);
void (*shader_get_caps)(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *caps); void (*shader_get_caps)(WINED3DDEVTYPE devtype, const struct wined3d_gl_info *gl_info, struct shader_caps *caps);
BOOL (*shader_color_fixup_supported)(struct color_fixup_desc fixup); BOOL (*shader_color_fixup_supported)(struct color_fixup_desc fixup);
void (*shader_add_instruction_modifiers)(const struct wined3d_shader_instruction *ins); void (*shader_add_instruction_modifiers)(const struct wined3d_shader_instruction *ins);
} shader_backend_t; } shader_backend_t;
...@@ -1146,7 +1146,7 @@ struct fragment_caps { ...@@ -1146,7 +1146,7 @@ struct fragment_caps {
struct fragment_pipeline { struct fragment_pipeline {
void (*enable_extension)(IWineD3DDevice *iface, BOOL enable); void (*enable_extension)(IWineD3DDevice *iface, BOOL enable);
void (*get_caps)(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *caps); void (*get_caps)(WINED3DDEVTYPE devtype, const struct wined3d_gl_info *gl_info, struct fragment_caps *caps);
HRESULT (*alloc_private)(IWineD3DDevice *iface); HRESULT (*alloc_private)(IWineD3DDevice *iface);
void (*free_private)(IWineD3DDevice *iface); void (*free_private)(IWineD3DDevice *iface);
BOOL (*color_fixup_supported)(struct color_fixup_desc fixup); BOOL (*color_fixup_supported)(struct color_fixup_desc fixup);
...@@ -1164,7 +1164,7 @@ extern const struct fragment_pipeline nvrc_fragment_pipeline; ...@@ -1164,7 +1164,7 @@ extern const struct fragment_pipeline nvrc_fragment_pipeline;
/* "Base" state table */ /* "Base" state table */
HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs, HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs,
const WineD3D_GL_Info *gl_info, const struct StateEntryTemplate *vertex, const struct wined3d_gl_info *gl_info, const struct StateEntryTemplate *vertex,
const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc); const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc);
/* Shaders for color conversions in blits */ /* Shaders for color conversions in blits */
...@@ -1322,7 +1322,7 @@ struct WineD3DAdapter ...@@ -1322,7 +1322,7 @@ struct WineD3DAdapter
UINT num; UINT num;
BOOL opengl; BOOL opengl;
POINT monitorPoint; POINT monitorPoint;
WineD3D_GL_Info gl_info; struct wined3d_gl_info gl_info;
const char *driver; const char *driver;
const char *description; const char *description;
WCHAR DeviceName[CCHDEVICENAME]; /* DeviceName for use with e.g. ChangeDisplaySettings */ WCHAR DeviceName[CCHDEVICENAME]; /* DeviceName for use with e.g. ChangeDisplaySettings */
...@@ -1333,10 +1333,10 @@ struct WineD3DAdapter ...@@ -1333,10 +1333,10 @@ struct WineD3DAdapter
unsigned int UsedTextureRam; unsigned int UsedTextureRam;
}; };
extern BOOL initPixelFormats(WineD3D_GL_Info *gl_info); extern BOOL initPixelFormats(struct wined3d_gl_info *gl_info);
BOOL initPixelFormatsNoGL(WineD3D_GL_Info *gl_info); BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info);
extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram); extern long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram);
extern void add_gl_compat_wrappers(WineD3D_GL_Info *gl_info); extern void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info);
/***************************************************************************** /*****************************************************************************
* High order patch management * High order patch management
...@@ -2851,7 +2851,7 @@ struct GlPixelFormatDesc ...@@ -2851,7 +2851,7 @@ struct GlPixelFormatDesc
struct color_fixup_desc color_fixup; struct color_fixup_desc color_fixup;
}; };
const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const WineD3D_GL_Info *gl_info); const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const struct wined3d_gl_info *gl_info);
static inline BOOL use_vs(IWineD3DStateBlockImpl *stateblock) static inline BOOL use_vs(IWineD3DStateBlockImpl *stateblock)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment