wined3d: Rename _WineD3D_GL_Info to struct wined3d_gl_info.

This commit is contained in:
Henri Verbeet 2009-07-17 10:34:01 +02:00 committed by Alexandre Julliard
parent 0c110597db
commit 43e6686a78
15 changed files with 201 additions and 189 deletions

View File

@ -42,13 +42,15 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d);
#define GLINFO_LOCATION (*gl_info) #define GLINFO_LOCATION (*gl_info)
/* GL locking for state handlers is done by the caller. */ /* GL locking for state handlers is done by the caller. */
static BOOL need_mova_const(IWineD3DBaseShader *shader, const WineD3D_GL_Info *gl_info) { static BOOL need_mova_const(IWineD3DBaseShader *shader, const struct wined3d_gl_info *gl_info)
{
IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) shader; IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) shader;
if(!This->baseShader.reg_maps.usesmova) return FALSE; if(!This->baseShader.reg_maps.usesmova) return FALSE;
return !GL_SUPPORT(NV_VERTEX_PROGRAM2_OPTION); return !GL_SUPPORT(NV_VERTEX_PROGRAM2_OPTION);
} }
static BOOL need_helper_const(const WineD3D_GL_Info *gl_info) { static BOOL need_helper_const(const struct wined3d_gl_info *gl_info)
{
if (!GL_SUPPORT(NV_VERTEX_PROGRAM) /* Need to init colors. */ if (!GL_SUPPORT(NV_VERTEX_PROGRAM) /* Need to init colors. */
|| gl_info->quirks & WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT /* Load the immval offset. */ || gl_info->quirks & WINED3D_QUIRK_ARB_VS_OFFSET_LIMIT /* Load the immval offset. */
|| gl_info->quirks & WINED3D_QUIRK_SET_TEXCOORD_W) /* Have to init texcoords. */ || gl_info->quirks & WINED3D_QUIRK_SET_TEXCOORD_W) /* Have to init texcoords. */
@ -58,7 +60,8 @@ static BOOL need_helper_const(const WineD3D_GL_Info *gl_info) {
return FALSE; return FALSE;
} }
static unsigned int reserved_vs_const(IWineD3DBaseShader *shader, const WineD3D_GL_Info *gl_info) { static unsigned int reserved_vs_const(IWineD3DBaseShader *shader, const struct wined3d_gl_info *gl_info)
{
unsigned int ret = 1; unsigned int ret = 1;
/* We use one PARAM for the pos fixup, and in some cases one to load /* We use one PARAM for the pos fixup, and in some cases one to load
* some immediate values into the shader * some immediate values into the shader
@ -74,7 +77,7 @@ static inline BOOL ffp_clip_emul(IWineD3DStateBlockImpl *stateblock)
} }
/* Returns TRUE if result.clip from GL_NV_vertex_program2 should be used and FALSE otherwise */ /* Returns TRUE if result.clip from GL_NV_vertex_program2 should be used and FALSE otherwise */
static inline BOOL use_nv_clip(const WineD3D_GL_Info *gl_info) static inline BOOL use_nv_clip(const struct wined3d_gl_info *gl_info)
{ {
return GL_SUPPORT(NV_VERTEX_PROGRAM2_OPTION); return GL_SUPPORT(NV_VERTEX_PROGRAM2_OPTION);
} }
@ -276,7 +279,7 @@ struct shader_arb_priv
* or GL_FRAGMENT_PROGRAM_ARB (for pixel shaders) * or GL_FRAGMENT_PROGRAM_ARB (for pixel shaders)
*/ */
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, const WineD3D_GL_Info *gl_info, static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl *This, const struct wined3d_gl_info *gl_info,
GLuint target_type, unsigned int max_constants, const float *constants, char *dirty_consts) GLuint target_type, unsigned int max_constants, const float *constants, char *dirty_consts)
{ {
local_constant* lconst; local_constant* lconst;
@ -382,7 +385,7 @@ static void shader_arb_load_np2fixup_constants(
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl *) device; IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl *) device;
const struct shader_arb_priv* const priv = (const struct shader_arb_priv *) deviceImpl->shader_priv; const struct shader_arb_priv* const priv = (const struct shader_arb_priv *) deviceImpl->shader_priv;
IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock; IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock;
const WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info; const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info;
if (!usePixelShader) { if (!usePixelShader) {
/* NP2 texcoord fixup is (currently) only done for pixelshaders. */ /* NP2 texcoord fixup is (currently) only done for pixelshaders. */
@ -425,7 +428,7 @@ static void shader_arb_load_np2fixup_constants(
static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl) static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl)
{ {
IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock; IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock;
const WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info; const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info;
unsigned char i; unsigned char i;
struct shader_arb_priv *priv = deviceImpl->shader_priv; struct shader_arb_priv *priv = deviceImpl->shader_priv;
const struct arb_ps_compiled_shader *gl_shader = priv->compiled_fprog; const struct arb_ps_compiled_shader *gl_shader = priv->compiled_fprog;
@ -489,7 +492,7 @@ static inline void shader_arb_ps_local_constants(IWineD3DDeviceImpl* deviceImpl)
static inline void shader_arb_vs_local_constants(IWineD3DDeviceImpl* deviceImpl) static inline void shader_arb_vs_local_constants(IWineD3DDeviceImpl* deviceImpl)
{ {
IWineD3DStateBlockImpl* stateBlock; IWineD3DStateBlockImpl* stateBlock;
const WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info; const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info;
unsigned char i; unsigned char i;
struct shader_arb_priv *priv = deviceImpl->shader_priv; struct shader_arb_priv *priv = deviceImpl->shader_priv;
const struct arb_vs_compiled_shader *gl_shader = priv->compiled_vprog; const struct arb_vs_compiled_shader *gl_shader = priv->compiled_vprog;
@ -531,7 +534,7 @@ static void shader_arb_load_constants(
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device; IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device;
IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock; IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock;
const WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info; const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info;
if (useVertexShader) { if (useVertexShader) {
IWineD3DBaseShaderImpl* vshader = (IWineD3DBaseShaderImpl*) stateBlock->vertexShader; IWineD3DBaseShaderImpl* vshader = (IWineD3DBaseShaderImpl*) stateBlock->vertexShader;
@ -603,7 +606,7 @@ static DWORD *local_const_mapping(IWineD3DBaseShaderImpl *This)
/* Generate the variable & register declarations for the ARB_vertex_program output target */ /* Generate the variable & register declarations for the ARB_vertex_program output target */
static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const shader_reg_maps *reg_maps, static DWORD shader_generate_arb_declarations(IWineD3DBaseShader *iface, const shader_reg_maps *reg_maps,
struct wined3d_shader_buffer *buffer, const WineD3D_GL_Info *gl_info, DWORD *lconst_map, struct wined3d_shader_buffer *buffer, const struct wined3d_gl_info *gl_info, DWORD *lconst_map,
DWORD *num_clipplanes, struct shader_arb_ctx_priv *ctx) DWORD *num_clipplanes, struct shader_arb_ctx_priv *ctx)
{ {
IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface; IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
@ -2882,7 +2885,7 @@ static void vshader_add_footer(IWineD3DVertexShaderImpl *This, struct wined3d_sh
{ {
const shader_reg_maps *reg_maps = &This->baseShader.reg_maps; const shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device; IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device;
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
unsigned int i; unsigned int i;
/* The D3DRS_FOGTABLEMODE render state defines if the shader-generated fog coord is used /* The D3DRS_FOGTABLEMODE render state defines if the shader-generated fog coord is used
@ -2986,7 +2989,7 @@ static void shader_hw_call(const struct wined3d_shader_instruction *ins)
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static GLuint create_arb_blt_vertex_program(const WineD3D_GL_Info *gl_info) static GLuint create_arb_blt_vertex_program(const struct wined3d_gl_info *gl_info)
{ {
GLuint program_id = 0; GLuint program_id = 0;
const char *blt_vprogram = const char *blt_vprogram =
@ -3012,7 +3015,7 @@ static GLuint create_arb_blt_vertex_program(const WineD3D_GL_Info *gl_info)
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static GLuint create_arb_blt_fragment_program(const WineD3D_GL_Info *gl_info, enum tex_types tex_type) static GLuint create_arb_blt_fragment_program(const struct wined3d_gl_info *gl_info, enum tex_types tex_type)
{ {
GLuint program_id = 0; GLuint program_id = 0;
static const char * const blt_fprograms[tex_type_count] = static const char * const blt_fprograms[tex_type_count] =
@ -3200,7 +3203,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct
{ {
const shader_reg_maps* reg_maps = &This->baseShader.reg_maps; const shader_reg_maps* reg_maps = &This->baseShader.reg_maps;
CONST DWORD *function = This->baseShader.function; CONST DWORD *function = This->baseShader.function;
const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info; const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info;
const local_constant *lconst; const local_constant *lconst;
GLuint retval; GLuint retval;
char fragcolor[16]; char fragcolor[16];
@ -3769,7 +3772,7 @@ static GLuint shader_arb_generate_vshader(IWineD3DVertexShaderImpl *This, struct
const shader_reg_maps *reg_maps = &This->baseShader.reg_maps; const shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
CONST DWORD *function = This->baseShader.function; CONST DWORD *function = This->baseShader.function;
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device; IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device;
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const local_constant *lconst; const local_constant *lconst;
GLuint ret; GLuint ret;
DWORD next_local, *lconst_map = local_const_mapping((IWineD3DBaseShaderImpl *) This); DWORD next_local, *lconst_map = local_const_mapping((IWineD3DBaseShaderImpl *) This);
@ -3909,7 +3912,7 @@ static void find_clip_texcoord(IWineD3DPixelShaderImpl *ps)
{ {
struct arb_pshader_private *shader_priv = ps->backend_priv; struct arb_pshader_private *shader_priv = ps->backend_priv;
int i; int i;
const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)ps->baseShader.device)->adapter->gl_info; const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)ps->baseShader.device)->adapter->gl_info;
/* See if we can use fragment.texcoord[7] for clipplane emulation /* See if we can use fragment.texcoord[7] for clipplane emulation
* *
@ -4039,7 +4042,7 @@ static struct arb_vs_compiled_shader *find_arb_vshader(IWineD3DVertexShaderImpl
struct wined3d_shader_buffer buffer; struct wined3d_shader_buffer buffer;
struct arb_vshader_private *shader_data; struct arb_vshader_private *shader_data;
GLuint ret; GLuint ret;
const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)shader->baseShader.device)->adapter->gl_info; const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)shader->baseShader.device)->adapter->gl_info;
if(!shader->backend_priv) { if(!shader->backend_priv) {
shader->backend_priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data)); shader->backend_priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*shader_data));
@ -4098,7 +4101,7 @@ static inline void find_arb_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWi
{ {
int i; int i;
WORD int_skip; WORD int_skip;
const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)shader->baseShader.device)->adapter->gl_info; const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)shader->baseShader.device)->adapter->gl_info;
find_ps_compile_args(shader, stateblock, &args->super); find_ps_compile_args(shader, stateblock, &args->super);
/* This forces all local boolean constants to 1 to make them stateblock independent */ /* This forces all local boolean constants to 1 to make them stateblock independent */
@ -4140,7 +4143,7 @@ static inline void find_arb_vs_compile_args(IWineD3DVertexShaderImpl *shader, IW
int i; int i;
WORD int_skip; WORD int_skip;
IWineD3DDeviceImpl *dev = (IWineD3DDeviceImpl *)shader->baseShader.device; IWineD3DDeviceImpl *dev = (IWineD3DDeviceImpl *)shader->baseShader.device;
const WineD3D_GL_Info *gl_info = &dev->adapter->gl_info; const struct wined3d_gl_info *gl_info = &dev->adapter->gl_info;
find_vs_compile_args(shader, stateblock, &args->super); find_vs_compile_args(shader, stateblock, &args->super);
args->boolclip_compare = 0; args->boolclip_compare = 0;
@ -4213,7 +4216,7 @@ static inline void find_arb_vs_compile_args(IWineD3DVertexShaderImpl *shader, IW
static void shader_arb_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) { static void shader_arb_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct shader_arb_priv *priv = This->shader_priv; struct shader_arb_priv *priv = This->shader_priv;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
int i; int i;
/* Deal with pixel shaders first so the vertex shader arg function has the input signature ready */ /* Deal with pixel shaders first so the vertex shader arg function has the input signature ready */
@ -4313,7 +4316,7 @@ static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types te
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct shader_arb_priv *priv = This->shader_priv; struct shader_arb_priv *priv = This->shader_priv;
GLuint *blt_fprogram = &priv->depth_blt_fprogram_id[tex_type]; GLuint *blt_fprogram = &priv->depth_blt_fprogram_id[tex_type];
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
if (!priv->depth_blt_vprogram_id) priv->depth_blt_vprogram_id = create_arb_blt_vertex_program(gl_info); if (!priv->depth_blt_vprogram_id) priv->depth_blt_vprogram_id = create_arb_blt_vertex_program(gl_info);
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->depth_blt_vprogram_id)); GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->depth_blt_vprogram_id));
@ -4328,7 +4331,7 @@ static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types te
static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) { static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct shader_arb_priv *priv = This->shader_priv; struct shader_arb_priv *priv = This->shader_priv;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
if (priv->current_vprogram_id) { if (priv->current_vprogram_id) {
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id)); GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id));
@ -4354,7 +4357,7 @@ static void shader_arb_deselect_depth_blt(IWineD3DDevice *iface) {
static void shader_arb_destroy(IWineD3DBaseShader *iface) { static void shader_arb_destroy(IWineD3DBaseShader *iface) {
IWineD3DBaseShaderImpl *baseShader = (IWineD3DBaseShaderImpl *) iface; IWineD3DBaseShaderImpl *baseShader = (IWineD3DBaseShaderImpl *) iface;
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)baseShader->baseShader.device; IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)baseShader->baseShader.device;
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
@ -4434,7 +4437,7 @@ static void release_signature(struct wine_rb_entry *entry, void *context)
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void shader_arb_free(IWineD3DDevice *iface) { static void shader_arb_free(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
struct shader_arb_priv *priv = This->shader_priv; struct shader_arb_priv *priv = This->shader_priv;
int i; int i;
@ -4457,7 +4460,8 @@ static BOOL shader_arb_dirty_const(IWineD3DDevice *iface) {
return TRUE; return TRUE;
} }
static void shader_arb_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *pCaps) static void shader_arb_get_caps(WINED3DDEVTYPE devtype, const struct wined3d_gl_info *gl_info,
struct shader_caps *pCaps)
{ {
/* We don't have an ARB fixed function pipeline yet, so let the none backend set its caps, /* We don't have an ARB fixed function pipeline yet, so let the none backend set its caps,
* then overwrite the shader specific ones * then overwrite the shader specific ones
@ -5092,7 +5096,7 @@ static HRESULT arbfp_alloc(IWineD3DDevice *iface) {
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void arbfp_free_ffpshader(struct wine_rb_entry *entry, void *context) static void arbfp_free_ffpshader(struct wine_rb_entry *entry, void *context)
{ {
const WineD3D_GL_Info *gl_info = context; const struct wined3d_gl_info *gl_info = context;
struct arbfp_ffp_desc *entry_arb = WINE_RB_ENTRY_VALUE(entry, struct arbfp_ffp_desc, parent.entry); struct arbfp_ffp_desc *entry_arb = WINE_RB_ENTRY_VALUE(entry, struct arbfp_ffp_desc, parent.entry);
ENTER_GL(); ENTER_GL();
@ -5115,7 +5119,7 @@ static void arbfp_free(IWineD3DDevice *iface) {
} }
} }
static void arbfp_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct fragment_caps *caps) static void arbfp_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 |

View File

@ -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
} }
} }
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
} }
} }
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
} }
} }
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])
} }
} }
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) {
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 |

View File

@ -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;

View File

@ -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;

View File

@ -352,7 +352,8 @@ static ULONG WINAPI IWineD3DImpl_Release(IWineD3D *iface) {
/* Set the shader type for this device, depending on the given capabilities, /* Set the shader type for this device, depending on the given capabilities,
* the device type, and the user preferences in wined3d_settings */ * the device type, and the user preferences in wined3d_settings */
static void select_shader_mode(const WineD3D_GL_Info *gl_info, WINED3DDEVTYPE DeviceType, int *ps_selected, int *vs_selected) static void select_shader_mode(const struct wined3d_gl_info *gl_info,
WINED3DDEVTYPE DeviceType, int *ps_selected, int *vs_selected)
{ {
if (wined3d_settings.vs_mode == VS_NONE) { if (wined3d_settings.vs_mode == VS_NONE) {
*vs_selected = SHADER_NONE; *vs_selected = SHADER_NONE;
@ -384,11 +385,8 @@ static void select_shader_mode(const WineD3D_GL_Info *gl_info, WINED3DDEVTYPE De
} }
/** Select the number of report maximum shader constants based on the selected shader modes */ /** Select the number of report maximum shader constants based on the selected shader modes */
static void select_shader_max_constants( static void select_shader_max_constants(int ps_selected_mode, int vs_selected_mode, struct wined3d_gl_info *gl_info)
int ps_selected_mode, {
int vs_selected_mode,
WineD3D_GL_Info *gl_info) {
switch (vs_selected_mode) { switch (vs_selected_mode) {
case SHADER_GLSL: case SHADER_GLSL:
gl_info->max_vshader_constantsF = gl_info->vs_glsl_constantsF; gl_info->max_vshader_constantsF = gl_info->vs_glsl_constantsF;
@ -419,7 +417,7 @@ static void select_shader_max_constants(
**********************************************************/ **********************************************************/
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static inline BOOL test_arb_vs_offset_limit(const WineD3D_GL_Info *gl_info) static inline BOOL test_arb_vs_offset_limit(const struct wined3d_gl_info *gl_info)
{ {
GLuint prog; GLuint prog;
BOOL ret = FALSE; BOOL ret = FALSE;
@ -464,7 +462,7 @@ static DWORD ver_for_ext(GL_SupportedExt ext)
return 0; return 0;
} }
static BOOL match_ati_r300_to_500(const WineD3D_GL_Info *gl_info, const char *gl_renderer) static BOOL match_ati_r300_to_500(const struct wined3d_gl_info *gl_info, const char *gl_renderer)
{ {
if (gl_info->gl_vendor != VENDOR_ATI) return FALSE; if (gl_info->gl_vendor != VENDOR_ATI) return FALSE;
if (gl_info->gl_card == CARD_ATI_RADEON_9500) return TRUE; if (gl_info->gl_card == CARD_ATI_RADEON_9500) return TRUE;
@ -473,7 +471,7 @@ static BOOL match_ati_r300_to_500(const WineD3D_GL_Info *gl_info, const char *gl
return FALSE; return FALSE;
} }
static BOOL match_geforce5(const WineD3D_GL_Info *gl_info, const char *gl_renderer) static BOOL match_geforce5(const struct wined3d_gl_info *gl_info, const char *gl_renderer)
{ {
if (gl_info->gl_vendor == VENDOR_NVIDIA) if (gl_info->gl_vendor == VENDOR_NVIDIA)
{ {
@ -485,7 +483,7 @@ static BOOL match_geforce5(const WineD3D_GL_Info *gl_info, const char *gl_render
return FALSE; return FALSE;
} }
static BOOL match_apple(const WineD3D_GL_Info *gl_info, const char *gl_renderer) static BOOL match_apple(const struct wined3d_gl_info *gl_info, const char *gl_renderer)
{ {
/* MacOS has various specialities in the extensions it advertises. Some have to be loaded from /* MacOS has various specialities in the extensions it advertises. Some have to be loaded from
* the opengl 1.2+ core, while other extensions are advertised, but software emulated. So try to * the opengl 1.2+ core, while other extensions are advertised, but software emulated. So try to
@ -516,7 +514,7 @@ static BOOL match_apple(const WineD3D_GL_Info *gl_info, const char *gl_renderer)
} }
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void test_pbo_functionality(WineD3D_GL_Info *gl_info) static void test_pbo_functionality(struct wined3d_gl_info *gl_info)
{ {
/* Some OpenGL implementations, namely Apple's Geforce 8 driver, advertises PBOs, /* Some OpenGL implementations, namely Apple's Geforce 8 driver, advertises PBOs,
* but glTexSubImage from a PBO fails miserably, with the first line repeated over * but glTexSubImage from a PBO fails miserably, with the first line repeated over
@ -584,12 +582,12 @@ static void test_pbo_functionality(WineD3D_GL_Info *gl_info)
} }
} }
static BOOL match_apple_intel(const WineD3D_GL_Info *gl_info, const char *gl_renderer) static BOOL match_apple_intel(const struct wined3d_gl_info *gl_info, const char *gl_renderer)
{ {
return gl_info->gl_vendor == VENDOR_INTEL && match_apple(gl_info, gl_renderer); return gl_info->gl_vendor == VENDOR_INTEL && match_apple(gl_info, gl_renderer);
} }
static BOOL match_apple_nonr500ati(const WineD3D_GL_Info *gl_info, const char *gl_renderer) static BOOL match_apple_nonr500ati(const struct wined3d_gl_info *gl_info, const char *gl_renderer)
{ {
if (!match_apple(gl_info, gl_renderer)) return FALSE; if (!match_apple(gl_info, gl_renderer)) return FALSE;
if (gl_info->gl_vendor != VENDOR_ATI) return FALSE; if (gl_info->gl_vendor != VENDOR_ATI) return FALSE;
@ -597,7 +595,7 @@ static BOOL match_apple_nonr500ati(const WineD3D_GL_Info *gl_info, const char *g
return TRUE; return TRUE;
} }
static BOOL match_fglrx(const WineD3D_GL_Info *gl_info, const char *gl_renderer) static BOOL match_fglrx(const struct wined3d_gl_info *gl_info, const char *gl_renderer)
{ {
if (gl_info->gl_vendor != VENDOR_ATI) return FALSE; if (gl_info->gl_vendor != VENDOR_ATI) return FALSE;
if (match_apple(gl_info, gl_renderer)) return FALSE; if (match_apple(gl_info, gl_renderer)) return FALSE;
@ -605,7 +603,7 @@ static BOOL match_fglrx(const WineD3D_GL_Info *gl_info, const char *gl_renderer)
return TRUE; return TRUE;
} }
static BOOL match_dx10_capable(const WineD3D_GL_Info *gl_info, const char *gl_renderer) static BOOL match_dx10_capable(const struct wined3d_gl_info *gl_info, const char *gl_renderer)
{ {
/* DX9 cards support 40 single float varyings in hardware, most drivers report 32. ATI misreports /* DX9 cards support 40 single float varyings in hardware, most drivers report 32. ATI misreports
* 44 varyings. So assume that if we have more than 44 varyings we have a dx10 card. * 44 varyings. So assume that if we have more than 44 varyings we have a dx10 card.
@ -618,7 +616,7 @@ static BOOL match_dx10_capable(const WineD3D_GL_Info *gl_info, const char *gl_re
} }
/* A GL context is provided by the caller */ /* A GL context is provided by the caller */
static BOOL match_allows_spec_alpha(const WineD3D_GL_Info *gl_info, const char *gl_renderer) static BOOL match_allows_spec_alpha(const struct wined3d_gl_info *gl_info, const char *gl_renderer)
{ {
GLenum error; GLenum error;
DWORD data[16]; DWORD data[16];
@ -644,7 +642,7 @@ static BOOL match_allows_spec_alpha(const WineD3D_GL_Info *gl_info, const char *
} }
} }
static void quirk_arb_constants(WineD3D_GL_Info *gl_info) static void quirk_arb_constants(struct wined3d_gl_info *gl_info)
{ {
TRACE_(d3d_caps)("Using ARB vs constant limit(=%u) for GLSL.\n", gl_info->vs_arb_constantsF); TRACE_(d3d_caps)("Using ARB vs constant limit(=%u) for GLSL.\n", gl_info->vs_arb_constantsF);
gl_info->vs_glsl_constantsF = gl_info->vs_arb_constantsF; gl_info->vs_glsl_constantsF = gl_info->vs_arb_constantsF;
@ -652,7 +650,7 @@ static void quirk_arb_constants(WineD3D_GL_Info *gl_info)
gl_info->ps_glsl_constantsF = gl_info->ps_arb_constantsF; gl_info->ps_glsl_constantsF = gl_info->ps_arb_constantsF;
} }
static void quirk_apple_glsl_constants(WineD3D_GL_Info *gl_info) static void quirk_apple_glsl_constants(struct wined3d_gl_info *gl_info)
{ {
quirk_arb_constants(gl_info); quirk_arb_constants(gl_info);
/* MacOS needs uniforms for relative addressing offsets. This can accumulate to quite a few uniforms. /* MacOS needs uniforms for relative addressing offsets. This can accumulate to quite a few uniforms.
@ -674,7 +672,7 @@ static void quirk_apple_glsl_constants(WineD3D_GL_Info *gl_info)
* *
* Note that disabling the extension entirely does not gain predictability because there is no point * Note that disabling the extension entirely does not gain predictability because there is no point
* sprite capability flag in d3d, so the potential rendering bugs are the same if we disable the extension. */ * sprite capability flag in d3d, so the potential rendering bugs are the same if we disable the extension. */
static void quirk_one_point_sprite(WineD3D_GL_Info *gl_info) static void quirk_one_point_sprite(struct wined3d_gl_info *gl_info)
{ {
if (gl_info->supported[ARB_POINT_SPRITE]) if (gl_info->supported[ARB_POINT_SPRITE])
{ {
@ -683,7 +681,7 @@ static void quirk_one_point_sprite(WineD3D_GL_Info *gl_info)
} }
} }
static void quirk_ati_dx9(WineD3D_GL_Info *gl_info) static void quirk_ati_dx9(struct wined3d_gl_info *gl_info)
{ {
quirk_arb_constants(gl_info); quirk_arb_constants(gl_info);
@ -708,7 +706,7 @@ static void quirk_ati_dx9(WineD3D_GL_Info *gl_info)
gl_info->reserved_glsl_constants = max(gl_info->reserved_glsl_constants, 8); gl_info->reserved_glsl_constants = max(gl_info->reserved_glsl_constants, 8);
} }
static void quirk_no_np2(WineD3D_GL_Info *gl_info) static void quirk_no_np2(struct wined3d_gl_info *gl_info)
{ {
/* The nVidia GeForceFX series reports OpenGL 2.0 capabilities with the latest drivers versions, but /* The nVidia GeForceFX series reports OpenGL 2.0 capabilities with the latest drivers versions, but
* doesn't explicitly advertise the ARB_tex_npot extension in the GL extension string. * doesn't explicitly advertise the ARB_tex_npot extension in the GL extension string.
@ -729,7 +727,7 @@ static void quirk_no_np2(WineD3D_GL_Info *gl_info)
gl_info->supported[ARB_TEXTURE_RECTANGLE] = TRUE; gl_info->supported[ARB_TEXTURE_RECTANGLE] = TRUE;
} }
static void quirk_texcoord_w(WineD3D_GL_Info *gl_info) static void quirk_texcoord_w(struct wined3d_gl_info *gl_info)
{ {
/* The Intel GPUs on MacOS set the .w register of texcoords to 0.0 by default, which causes problems /* The Intel GPUs on MacOS set the .w register of texcoords to 0.0 by default, which causes problems
* with fixed function fragment processing. Ideally this flag should be detected with a test shader * with fixed function fragment processing. Ideally this flag should be detected with a test shader
@ -748,20 +746,20 @@ static void quirk_texcoord_w(WineD3D_GL_Info *gl_info)
gl_info->quirks |= WINED3D_QUIRK_SET_TEXCOORD_W; gl_info->quirks |= WINED3D_QUIRK_SET_TEXCOORD_W;
} }
static void quirk_clip_varying(WineD3D_GL_Info *gl_info) static void quirk_clip_varying(struct wined3d_gl_info *gl_info)
{ {
gl_info->quirks |= WINED3D_QUIRK_GLSL_CLIP_VARYING; gl_info->quirks |= WINED3D_QUIRK_GLSL_CLIP_VARYING;
} }
static void quirk_allows_specular_alpha(WineD3D_GL_Info *gl_info) static void quirk_allows_specular_alpha(struct wined3d_gl_info *gl_info)
{ {
gl_info->quirks |= WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA; gl_info->quirks |= WINED3D_QUIRK_ALLOWS_SPECULAR_ALPHA;
} }
struct driver_quirk struct driver_quirk
{ {
BOOL (*match)(const WineD3D_GL_Info *gl_info, const char *gl_renderer); BOOL (*match)(const struct wined3d_gl_info *gl_info, const char *gl_renderer);
void (*apply)(WineD3D_GL_Info *gl_info); void (*apply)(struct wined3d_gl_info *gl_info);
const char *description; const char *description;
}; };
@ -894,7 +892,7 @@ static const struct driver_version_information driver_version_table[] =
}; };
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void fixup_extensions(WineD3D_GL_Info *gl_info, const char *gl_renderer) static void fixup_extensions(struct wined3d_gl_info *gl_info, const char *gl_renderer)
{ {
unsigned int i; unsigned int i;
@ -928,7 +926,8 @@ static void fixup_extensions(WineD3D_GL_Info *gl_info, const char *gl_renderer)
} }
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_gl_info *gl_info)
{
const char *GL_Extensions = NULL; const char *GL_Extensions = NULL;
const char *WGL_Extensions = NULL; const char *WGL_Extensions = NULL;
const char *gl_string = NULL; const char *gl_string = NULL;
@ -2354,7 +2353,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
return WINED3D_OK; return WINED3D_OK;
} }
static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const WineD3D_GL_Info *gl_info, static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined3d_gl_info *gl_info,
const WineD3D_PixelFormat *cfg, const struct GlPixelFormatDesc *format_desc) const WineD3D_PixelFormat *cfg, const struct GlPixelFormatDesc *format_desc)
{ {
short redSize, greenSize, blueSize, alphaSize, colorBits; short redSize, greenSize, blueSize, alphaSize, colorBits;
@ -2403,7 +2402,7 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const WineD3D_GL_I
return FALSE; return FALSE;
} }
static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const WineD3D_GL_Info *gl_info, static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3d_gl_info *gl_info,
const WineD3D_PixelFormat *cfg, const struct GlPixelFormatDesc *format_desc) const WineD3D_PixelFormat *cfg, const struct GlPixelFormatDesc *format_desc)
{ {
short depthSize, stencilSize; short depthSize, stencilSize;
@ -2782,7 +2781,7 @@ static BOOL CheckRenderTargetCapability(struct WineD3DAdapter *adapter,
static BOOL CheckSrgbReadCapability(struct WineD3DAdapter *adapter, const struct GlPixelFormatDesc *format_desc) static BOOL CheckSrgbReadCapability(struct WineD3DAdapter *adapter, const struct GlPixelFormatDesc *format_desc)
{ {
const WineD3D_GL_Info *gl_info = &adapter->gl_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
/* Check for supported sRGB formats (Texture loading and framebuffer) */ /* Check for supported sRGB formats (Texture loading and framebuffer) */
if(!GL_SUPPORT(EXT_TEXTURE_SRGB)) { if(!GL_SUPPORT(EXT_TEXTURE_SRGB)) {
@ -2862,7 +2861,7 @@ static BOOL CheckWrapAndMipCapability(struct WineD3DAdapter *adapter, const stru
static BOOL CheckTextureCapability(struct WineD3DAdapter *adapter, static BOOL CheckTextureCapability(struct WineD3DAdapter *adapter,
WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *format_desc) WINED3DDEVTYPE DeviceType, const struct GlPixelFormatDesc *format_desc)
{ {
const WineD3D_GL_Info *gl_info = &adapter->gl_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
const shader_backend_t *shader_backend; const shader_backend_t *shader_backend;
const struct fragment_pipeline *fp; const struct fragment_pipeline *fp;
@ -3142,7 +3141,7 @@ static BOOL CheckSurfaceCapability(struct WineD3DAdapter *adapter, const struct
static BOOL CheckVertexTextureCapability(struct WineD3DAdapter *adapter, const struct GlPixelFormatDesc *format_desc) static BOOL CheckVertexTextureCapability(struct WineD3DAdapter *adapter, const struct GlPixelFormatDesc *format_desc)
{ {
const WineD3D_GL_Info *gl_info = &adapter->gl_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
if (!GL_LIMITS(vertex_samplers)) { if (!GL_LIMITS(vertex_samplers)) {
TRACE_(d3d_caps)("[FAILED]\n"); TRACE_(d3d_caps)("[FAILED]\n");
@ -3171,7 +3170,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
WINED3DSURFTYPE SurfaceType) { WINED3DSURFTYPE SurfaceType) {
IWineD3DImpl *This = (IWineD3DImpl *)iface; IWineD3DImpl *This = (IWineD3DImpl *)iface;
struct WineD3DAdapter *adapter = &This->adapters[Adapter]; struct WineD3DAdapter *adapter = &This->adapters[Adapter];
const WineD3D_GL_Info *gl_info = &adapter->gl_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(CheckFormat, gl_info); const struct GlPixelFormatDesc *format_desc = getFormatDescEntry(CheckFormat, gl_info);
const struct GlPixelFormatDesc *adapter_format_desc = getFormatDescEntry(AdapterFormat, gl_info); const struct GlPixelFormatDesc *adapter_format_desc = getFormatDescEntry(AdapterFormat, gl_info);
DWORD UsageCaps = 0; DWORD UsageCaps = 0;
@ -3708,7 +3707,7 @@ static const shader_backend_t *select_shader_backend(struct WineD3DAdapter *adap
static const struct fragment_pipeline *select_fragment_implementation(struct WineD3DAdapter *adapter, static const struct fragment_pipeline *select_fragment_implementation(struct WineD3DAdapter *adapter,
WINED3DDEVTYPE DeviceType) WINED3DDEVTYPE DeviceType)
{ {
const WineD3D_GL_Info *gl_info = &adapter->gl_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
int vs_selected_mode; int vs_selected_mode;
int ps_selected_mode; int ps_selected_mode;
@ -3728,7 +3727,7 @@ static const struct fragment_pipeline *select_fragment_implementation(struct Win
static const struct blit_shader *select_blit_implementation(struct WineD3DAdapter *adapter, WINED3DDEVTYPE DeviceType) static const struct blit_shader *select_blit_implementation(struct WineD3DAdapter *adapter, WINED3DDEVTYPE DeviceType)
{ {
const WineD3D_GL_Info *gl_info = &adapter->gl_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
int vs_selected_mode; int vs_selected_mode;
int ps_selected_mode; int ps_selected_mode;
@ -3747,7 +3746,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
IWineD3DImpl *This = (IWineD3DImpl *)iface; IWineD3DImpl *This = (IWineD3DImpl *)iface;
struct WineD3DAdapter *adapter = &This->adapters[Adapter]; struct WineD3DAdapter *adapter = &This->adapters[Adapter];
const WineD3D_GL_Info *gl_info = &adapter->gl_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
int vs_selected_mode; int vs_selected_mode;
int ps_selected_mode; int ps_selected_mode;
struct shader_caps shader_caps; struct shader_caps shader_caps;
@ -4524,7 +4523,7 @@ static void WINE_GLAPI warn_no_specular_func(const void *data)
WARN("GL_EXT_secondary_color not supported\n"); WARN("GL_EXT_secondary_color not supported\n");
} }
static void fillGLAttribFuncs(const WineD3D_GL_Info *gl_info) static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
{ {
position_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func; position_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func;
position_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func; position_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func;
@ -4695,7 +4694,7 @@ BOOL InitAdapters(IWineD3DImpl *This)
/* For now only one default adapter */ /* For now only one default adapter */
{ {
struct WineD3DAdapter *adapter = &This->adapters[0]; struct WineD3DAdapter *adapter = &This->adapters[0];
const WineD3D_GL_Info *gl_info = &adapter->gl_info; const struct wined3d_gl_info *gl_info = &adapter->gl_info;
struct wined3d_fake_gl_ctx fake_gl_ctx = {0}; struct wined3d_fake_gl_ctx fake_gl_ctx = {0};
int iPixelFormat; int iPixelFormat;
int res; int res;

View File

@ -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;

View File

@ -177,7 +177,7 @@ static char *get_info_log_line(char **ptr)
/** Prints the GLSL info log which will contain error messages if they exist */ /** Prints the GLSL info log which will contain error messages if they exist */
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void print_glsl_info_log(const WineD3D_GL_Info *gl_info, GLhandleARB obj) static void print_glsl_info_log(const struct wined3d_gl_info *gl_info, GLhandleARB obj)
{ {
int infologLength = 0; int infologLength = 0;
char *infoLog; char *infoLog;
@ -242,7 +242,8 @@ static void print_glsl_info_log(const WineD3D_GL_Info *gl_info, GLhandleARB obj)
* Loads (pixel shader) samplers * Loads (pixel shader) samplers
*/ */
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void shader_glsl_load_psamplers(const WineD3D_GL_Info *gl_info, DWORD *tex_unit_map, GLhandleARB programId) static void shader_glsl_load_psamplers(const struct wined3d_gl_info *gl_info,
DWORD *tex_unit_map, GLhandleARB programId)
{ {
GLint name_loc; GLint name_loc;
int i; int i;
@ -266,7 +267,8 @@ static void shader_glsl_load_psamplers(const WineD3D_GL_Info *gl_info, DWORD *te
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void shader_glsl_load_vsamplers(const WineD3D_GL_Info *gl_info, DWORD *tex_unit_map, GLhandleARB programId) static void shader_glsl_load_vsamplers(const struct wined3d_gl_info *gl_info,
DWORD *tex_unit_map, GLhandleARB programId)
{ {
GLint name_loc; GLint name_loc;
char sampler_name[20]; char sampler_name[20];
@ -290,7 +292,7 @@ static void shader_glsl_load_vsamplers(const WineD3D_GL_Info *gl_info, DWORD *te
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static inline void walk_constant_heap(const WineD3D_GL_Info *gl_info, const float *constants, static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, const float *constants,
const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version) const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version)
{ {
int stack_idx = 0; int stack_idx = 0;
@ -352,7 +354,7 @@ static inline void walk_constant_heap(const WineD3D_GL_Info *gl_info, const floa
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static inline void apply_clamped_constant(const WineD3D_GL_Info *gl_info, GLint location, const GLfloat *data) static inline void apply_clamped_constant(const struct wined3d_gl_info *gl_info, GLint location, const GLfloat *data)
{ {
GLfloat clamped_constant[4]; GLfloat clamped_constant[4];
@ -367,7 +369,7 @@ static inline void apply_clamped_constant(const WineD3D_GL_Info *gl_info, GLint
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static inline void walk_constant_heap_clamped(const WineD3D_GL_Info *gl_info, const float *constants, static inline void walk_constant_heap_clamped(const struct wined3d_gl_info *gl_info, const float *constants,
const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version) const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version)
{ {
int stack_idx = 0; int stack_idx = 0;
@ -428,7 +430,7 @@ static inline void walk_constant_heap_clamped(const WineD3D_GL_Info *gl_info, co
/* Loads floating point constants (aka uniforms) into the currently set GLSL program. */ /* Loads floating point constants (aka uniforms) into the currently set GLSL program. */
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl *This, const WineD3D_GL_Info *gl_info, static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl *This, const struct wined3d_gl_info *gl_info,
const float *constants, const GLint *constant_locations, const struct constant_heap *heap, const float *constants, const GLint *constant_locations, const struct constant_heap *heap,
unsigned char *stack, UINT version) unsigned char *stack, UINT version)
{ {
@ -459,7 +461,7 @@ static void shader_glsl_load_constantsF(IWineD3DBaseShaderImpl *This, const Wine
/* Loads integer constants (aka uniforms) into the currently set GLSL program. */ /* Loads integer constants (aka uniforms) into the currently set GLSL program. */
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void shader_glsl_load_constantsI(IWineD3DBaseShaderImpl *This, const WineD3D_GL_Info *gl_info, static void shader_glsl_load_constantsI(IWineD3DBaseShaderImpl *This, const struct wined3d_gl_info *gl_info,
const GLint locations[MAX_CONST_I], const int *constants, WORD constants_set) const GLint locations[MAX_CONST_I], const int *constants, WORD constants_set)
{ {
unsigned int i; unsigned int i;
@ -496,7 +498,7 @@ static void shader_glsl_load_constantsI(IWineD3DBaseShaderImpl *This, const Wine
/* Loads boolean constants (aka uniforms) into the currently set GLSL program. */ /* Loads boolean constants (aka uniforms) into the currently set GLSL program. */
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void shader_glsl_load_constantsB(IWineD3DBaseShaderImpl *This, const WineD3D_GL_Info *gl_info, static void shader_glsl_load_constantsB(IWineD3DBaseShaderImpl *This, const struct wined3d_gl_info *gl_info,
GLhandleARB programId, const BOOL *constants, WORD constants_set) GLhandleARB programId, const BOOL *constants, WORD constants_set)
{ {
GLint tmp_loc; GLint tmp_loc;
@ -594,7 +596,7 @@ static void shader_glsl_load_np2fixup_constants(
} }
if (prog->ps_args.np2_fixup && -1 != prog->np2Fixup_location) { if (prog->ps_args.np2_fixup && -1 != prog->np2Fixup_location) {
const WineD3D_GL_Info* gl_info = &deviceImpl->adapter->gl_info; const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info;
const IWineD3DStateBlockImpl* stateBlock = (const IWineD3DStateBlockImpl*) deviceImpl->stateBlock; const IWineD3DStateBlockImpl* stateBlock = (const IWineD3DStateBlockImpl*) deviceImpl->stateBlock;
UINT i; UINT i;
UINT fixup = prog->ps_args.np2_fixup; UINT fixup = prog->ps_args.np2_fixup;
@ -633,7 +635,7 @@ static void shader_glsl_load_constants(
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device; IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device;
struct shader_glsl_priv *priv = deviceImpl->shader_priv; struct shader_glsl_priv *priv = deviceImpl->shader_priv;
IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock; IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock;
const WineD3D_GL_Info *gl_info = &deviceImpl->adapter->gl_info; const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info;
GLhandleARB programId; GLhandleARB programId;
struct glsl_shader_prog_link *prog = priv->glsl_program; struct glsl_shader_prog_link *prog = priv->glsl_program;
@ -790,7 +792,7 @@ static void shader_glsl_update_float_pixel_constants(IWineD3DDevice *iface, UINT
} }
} }
static unsigned int vec4_varyings(DWORD shader_major, const WineD3D_GL_Info *gl_info) static unsigned int vec4_varyings(DWORD shader_major, const struct wined3d_gl_info *gl_info)
{ {
unsigned int ret = GL_LIMITS(glsl_varyings) / 4; unsigned int ret = GL_LIMITS(glsl_varyings) / 4;
/* 4.0 shaders do not write clip coords because d3d10 does not support user clipplanes */ /* 4.0 shaders do not write clip coords because d3d10 does not support user clipplanes */
@ -803,7 +805,7 @@ static unsigned int vec4_varyings(DWORD shader_major, const WineD3D_GL_Info *gl_
/** Generate the variable & register declarations for the GLSL output target */ /** Generate the variable & register declarations for the GLSL output target */
static void shader_generate_glsl_declarations(IWineD3DBaseShader *iface, const shader_reg_maps *reg_maps, static void shader_generate_glsl_declarations(IWineD3DBaseShader *iface, const shader_reg_maps *reg_maps,
struct wined3d_shader_buffer *buffer, const WineD3D_GL_Info *gl_info, struct wined3d_shader_buffer *buffer, const struct wined3d_gl_info *gl_info,
struct shader_glsl_ctx_priv *ctx_priv) struct shader_glsl_ctx_priv *ctx_priv)
{ {
IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface; IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface;
@ -1183,7 +1185,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader; IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device; IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
const WineD3D_GL_Info* gl_info = &deviceImpl->adapter->gl_info; const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info;
char pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type); char pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type);
*is_color = FALSE; *is_color = FALSE;
@ -2727,7 +2729,7 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins)
{ {
IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader; IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device; IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) This->baseShader.device;
const WineD3D_GL_Info* gl_info = &deviceImpl->adapter->gl_info; const struct wined3d_gl_info *gl_info = &deviceImpl->adapter->gl_info;
glsl_sample_function_t sample_function; glsl_sample_function_t sample_function;
glsl_src_param_t coord_param, dx_param, dy_param; glsl_src_param_t coord_param, dx_param, dy_param;
DWORD sample_flags = WINED3D_GLSL_SAMPLE_GRAD; DWORD sample_flags = WINED3D_GLSL_SAMPLE_GRAD;
@ -3345,7 +3347,7 @@ static struct glsl_shader_prog_link *get_glsl_program_entry(struct shader_glsl_p
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void delete_glsl_program_entry(struct shader_glsl_priv *priv, const WineD3D_GL_Info *gl_info, static void delete_glsl_program_entry(struct shader_glsl_priv *priv, const struct wined3d_gl_info *gl_info,
struct glsl_shader_prog_link *entry) struct glsl_shader_prog_link *entry)
{ {
glsl_program_key_t key; glsl_program_key_t key;
@ -3364,7 +3366,7 @@ static void delete_glsl_program_entry(struct shader_glsl_priv *priv, const WineD
HeapFree(GetProcessHeap(), 0, entry); HeapFree(GetProcessHeap(), 0, entry);
} }
static void handle_ps3_input(struct wined3d_shader_buffer *buffer, const WineD3D_GL_Info *gl_info, const DWORD *map, static void handle_ps3_input(struct wined3d_shader_buffer *buffer, const struct wined3d_gl_info *gl_info, const DWORD *map,
const struct wined3d_shader_signature_element *input_signature, const struct shader_reg_maps *reg_maps_in, const struct wined3d_shader_signature_element *input_signature, const struct shader_reg_maps *reg_maps_in,
const struct wined3d_shader_signature_element *output_signature, const struct shader_reg_maps *reg_maps_out) const struct wined3d_shader_signature_element *output_signature, const struct shader_reg_maps *reg_maps_out)
{ {
@ -3527,7 +3529,7 @@ static void handle_ps3_input(struct wined3d_shader_buffer *buffer, const WineD3D
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer *buffer, static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer *buffer,
IWineD3DVertexShader *vertexshader, IWineD3DPixelShader *pixelshader, const WineD3D_GL_Info *gl_info) IWineD3DVertexShader *vertexshader, IWineD3DPixelShader *pixelshader, const struct wined3d_gl_info *gl_info)
{ {
GLhandleARB ret = 0; GLhandleARB ret = 0;
IWineD3DVertexShaderImpl *vs = (IWineD3DVertexShaderImpl *) vertexshader; IWineD3DVertexShaderImpl *vs = (IWineD3DVertexShaderImpl *) vertexshader;
@ -3674,7 +3676,7 @@ static GLhandleARB generate_param_reorder_function(struct wined3d_shader_buffer
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void hardcode_local_constants(IWineD3DBaseShaderImpl *shader, const WineD3D_GL_Info *gl_info, static void hardcode_local_constants(IWineD3DBaseShaderImpl *shader, const struct wined3d_gl_info *gl_info,
GLhandleARB programId, char prefix) GLhandleARB programId, char prefix)
{ {
const local_constant *lconst; const local_constant *lconst;
@ -3697,7 +3699,7 @@ static GLuint shader_glsl_generate_pshader(IWineD3DPixelShaderImpl *This, struct
{ {
const struct shader_reg_maps *reg_maps = &This->baseShader.reg_maps; const struct shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
CONST DWORD *function = This->baseShader.function; CONST DWORD *function = This->baseShader.function;
const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info; const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info;
struct shader_glsl_ctx_priv priv_ctx; struct shader_glsl_ctx_priv priv_ctx;
/* Create the hw GLSL shader object and assign it as the shader->prgId */ /* Create the hw GLSL shader object and assign it as the shader->prgId */
@ -3795,7 +3797,7 @@ static GLuint shader_glsl_generate_vshader(IWineD3DVertexShaderImpl *This,
{ {
const struct shader_reg_maps *reg_maps = &This->baseShader.reg_maps; const struct shader_reg_maps *reg_maps = &This->baseShader.reg_maps;
CONST DWORD *function = This->baseShader.function; CONST DWORD *function = This->baseShader.function;
const WineD3D_GL_Info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info; const struct wined3d_gl_info *gl_info = &((IWineD3DDeviceImpl *)This->baseShader.device)->adapter->gl_info;
struct shader_glsl_ctx_priv priv_ctx; struct shader_glsl_ctx_priv priv_ctx;
/* Create the hw GLSL shader program and assign it as the shader->prgId */ /* Create the hw GLSL shader program and assign it as the shader->prgId */
@ -3992,7 +3994,7 @@ static GLhandleARB find_glsl_vshader(struct wined3d_shader_buffer *buffer, IWine
static void set_glsl_shader_program(IWineD3DDevice *iface, BOOL use_ps, BOOL use_vs) { static void set_glsl_shader_program(IWineD3DDevice *iface, BOOL use_ps, BOOL use_vs) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct shader_glsl_priv *priv = This->shader_priv; struct shader_glsl_priv *priv = This->shader_priv;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
IWineD3DPixelShader *pshader = use_ps ? This->stateBlock->pixelShader : NULL; IWineD3DPixelShader *pshader = use_ps ? This->stateBlock->pixelShader : NULL;
IWineD3DVertexShader *vshader = use_vs ? This->stateBlock->vertexShader : NULL; IWineD3DVertexShader *vshader = use_vs ? This->stateBlock->vertexShader : NULL;
struct glsl_shader_prog_link *entry = NULL; struct glsl_shader_prog_link *entry = NULL;
@ -4172,7 +4174,7 @@ static void set_glsl_shader_program(IWineD3DDevice *iface, BOOL use_ps, BOOL use
} }
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static GLhandleARB create_glsl_blt_shader(const WineD3D_GL_Info *gl_info, enum tex_types tex_type) static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info, enum tex_types tex_type)
{ {
GLhandleARB program_id; GLhandleARB program_id;
GLhandleARB vshader_id, pshader_id; GLhandleARB vshader_id, pshader_id;
@ -4250,7 +4252,7 @@ static GLhandleARB create_glsl_blt_shader(const WineD3D_GL_Info *gl_info, enum t
static void shader_glsl_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) { static void shader_glsl_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct shader_glsl_priv *priv = This->shader_priv; struct shader_glsl_priv *priv = This->shader_priv;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
GLhandleARB program_id = 0; GLhandleARB program_id = 0;
GLenum old_vertex_color_clamp, current_vertex_color_clamp; GLenum old_vertex_color_clamp, current_vertex_color_clamp;
@ -4286,7 +4288,7 @@ static void shader_glsl_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void shader_glsl_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type) { static void shader_glsl_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
struct shader_glsl_priv *priv = This->shader_priv; struct shader_glsl_priv *priv = This->shader_priv;
GLhandleARB *blt_program = &priv->depth_blt_program[tex_type]; GLhandleARB *blt_program = &priv->depth_blt_program[tex_type];
@ -4304,7 +4306,7 @@ static void shader_glsl_select_depth_blt(IWineD3DDevice *iface, enum tex_types t
/* GL locking is done by the caller */ /* GL locking is done by the caller */
static void shader_glsl_deselect_depth_blt(IWineD3DDevice *iface) { static void shader_glsl_deselect_depth_blt(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
struct shader_glsl_priv *priv = This->shader_priv; struct shader_glsl_priv *priv = This->shader_priv;
GLhandleARB program_id; GLhandleARB program_id;
@ -4320,7 +4322,7 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) iface; IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *) iface;
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device; IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)This->baseShader.device;
struct shader_glsl_priv *priv = device->shader_priv; struct shader_glsl_priv *priv = device->shader_priv;
const WineD3D_GL_Info *gl_info = &device->adapter->gl_info; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
IWineD3DPixelShaderImpl *ps = NULL; IWineD3DPixelShaderImpl *ps = NULL;
IWineD3DVertexShaderImpl *vs = NULL; IWineD3DVertexShaderImpl *vs = NULL;
@ -4470,7 +4472,7 @@ static const struct wine_rb_functions wined3d_glsl_program_rb_functions =
static HRESULT shader_glsl_alloc(IWineD3DDevice *iface) { static HRESULT shader_glsl_alloc(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
struct shader_glsl_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct shader_glsl_priv)); struct shader_glsl_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct shader_glsl_priv));
SIZE_T stack_size = wined3d_log2i(max(GL_LIMITS(vshader_constantsF), GL_LIMITS(pshader_constantsF))) + 1; SIZE_T stack_size = wined3d_log2i(max(GL_LIMITS(vshader_constantsF), GL_LIMITS(pshader_constantsF))) + 1;
@ -4522,7 +4524,7 @@ fail:
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
static void shader_glsl_free(IWineD3DDevice *iface) { static void shader_glsl_free(IWineD3DDevice *iface) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
const WineD3D_GL_Info *gl_info = &This->adapter->gl_info; const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
struct shader_glsl_priv *priv = This->shader_priv; struct shader_glsl_priv *priv = This->shader_priv;
int i; int i;
@ -4550,7 +4552,8 @@ static BOOL shader_glsl_dirty_const(IWineD3DDevice *iface) {
return FALSE; return FALSE;
} }
static void shader_glsl_get_caps(WINED3DDEVTYPE devtype, const WineD3D_GL_Info *gl_info, struct shader_caps *pCaps) static void shader_glsl_get_caps(WINED3DDEVTYPE devtype,
const struct wined3d_gl_info *gl_info, struct shader_caps *pCaps)
{ {
/* Nvidia Geforce6/7 or Ati R4xx/R5xx cards with GLSL support, support VS 3.0 but older Nvidia/Ati /* Nvidia Geforce6/7 or Ati R4xx/R5xx cards with GLSL support, support VS 3.0 but older Nvidia/Ati
* models with GLSL support only support 2.0. In case of nvidia we can detect VS 2.0 support using * models with GLSL support only support 2.0. In case of nvidia we can detect VS 2.0 support using

View File

@ -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 |

View File

@ -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,
} }
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;

View File

@ -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,
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;

View File

@ -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;

View File

@ -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)
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)
#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
} }
/* 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)
} }
} }
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)
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)
} }
} }
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)
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)
} }
/* 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:
#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);

View File

@ -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
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;

View File

@ -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;
GL_Cards gl_card;
UINT vidmem;
DWORD driver_version;
DWORD driver_version_hipart;
const char *driver_description;
/**
* CAPS Constants
*/
UINT max_buffers;
UINT max_lights;
UINT max_textures;
UINT max_texture_stages;
UINT max_fragment_samplers;
UINT max_vertex_samplers;
UINT max_combined_samplers;
UINT max_sampler_stages;
UINT max_clipplanes;
UINT max_texture_size;
UINT max_texture3d_size;
float max_pointsize, max_pointsizemin;
UINT max_point_sprite_units;
UINT max_blends;
UINT max_anisotropy;
UINT max_glsl_varyings;
float max_shininess;
unsigned max_vshader_constantsF; struct wined3d_gl_info
unsigned max_pshader_constantsF; {
GL_Vendors gl_vendor;
GL_Cards gl_card;
UINT vidmem;
DWORD driver_version;
DWORD driver_version_hipart;
const char *driver_description;
unsigned vs_arb_constantsF; UINT max_buffers;
unsigned vs_arb_max_instructions; UINT max_lights;
unsigned vs_arb_max_temps; UINT max_textures;
unsigned ps_arb_constantsF; UINT max_texture_stages;
unsigned ps_arb_max_local_constants; UINT max_fragment_samplers;
unsigned ps_arb_max_instructions; UINT max_vertex_samplers;
unsigned ps_arb_max_temps; UINT max_combined_samplers;
unsigned vs_glsl_constantsF; UINT max_sampler_stages;
unsigned ps_glsl_constantsF; UINT max_clipplanes;
UINT max_texture_size;
UINT max_texture3d_size;
float max_pointsize, max_pointsizemin;
UINT max_point_sprite_units;
UINT max_blends;
UINT max_anisotropy;
UINT max_glsl_varyings;
float max_shininess;
GL_PSVersion ps_arb_version; unsigned int max_vshader_constantsF;
GL_PSVersion ps_nv_version; unsigned int max_pshader_constantsF;
GL_VSVersion vs_arb_version; unsigned int vs_arb_constantsF;
GL_VSVersion vs_nv_version; unsigned int vs_arb_max_instructions;
GL_VSVersion vs_ati_version; unsigned int vs_arb_max_temps;
unsigned int ps_arb_constantsF;
unsigned int ps_arb_max_local_constants;
unsigned int ps_arb_max_instructions;
unsigned int ps_arb_max_temps;
unsigned int vs_glsl_constantsF;
unsigned int ps_glsl_constantsF;
DWORD reserved_glsl_constants; GL_PSVersion ps_arb_version;
GL_PSVersion ps_nv_version;
DWORD quirks; GL_VSVersion vs_arb_version;
GL_VSVersion vs_nv_version;
GL_VSVersion vs_ati_version;
BOOL supported[WINED3D_GL_EXT_COUNT]; DWORD reserved_glsl_constants;
/** OpenGL EXT and ARB functions ptr */ DWORD quirks;
GL_EXT_FUNCS_GEN
/** OpenGL WGL functions ptr */ BOOL supported[WINED3D_GL_EXT_COUNT];
WGL_EXT_FUNCS_GEN
/* GL function pointers */
GL_EXT_FUNCS_GEN
/* WGL function pointers */
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 */

View File

@ -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 {
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;
/* "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
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
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
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)
{ {