Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f2989a25
Commit
f2989a25
authored
Jul 27, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Only install emulation wrappers when required.
parent
6244735f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71 additions
and
3 deletions
+71
-3
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+6
-0
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+6
-0
directx.c
dlls/wined3d/directx.c
+7
-3
glsl_shader.c
dlls/wined3d/glsl_shader.c
+16
-0
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+7
-0
state.c
dlls/wined3d/state.c
+24
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
f2989a25
...
...
@@ -5871,6 +5871,11 @@ static void arbfp_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen
caps
->
MaxSimultaneousTextures
=
min
(
gl_info
->
limits
.
fragment_samplers
,
8
);
}
static
DWORD
arbfp_get_emul_mask
(
const
struct
wined3d_gl_info
*
gl_info
)
{
return
GL_EXT_EMUL_ARB_MULTITEXTURE
|
GL_EXT_EMUL_EXT_FOG_COORD
;
}
static
void
state_texfactor_arbfp
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
...
...
@@ -6871,6 +6876,7 @@ static void arbfp_free_context_data(struct wined3d_context *context)
const
struct
fragment_pipeline
arbfp_fragment_pipeline
=
{
arbfp_enable
,
arbfp_get_caps
,
arbfp_get_emul_mask
,
arbfp_alloc
,
arbfp_free
,
arbfp_alloc_context_data
,
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
f2989a25
...
...
@@ -1310,6 +1310,11 @@ static void atifs_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen
caps
->
MaxSimultaneousTextures
=
6
;
}
static
DWORD
atifs_get_emul_mask
(
const
struct
wined3d_gl_info
*
gl_info
)
{
return
GL_EXT_EMUL_ARB_MULTITEXTURE
|
GL_EXT_EMUL_EXT_FOG_COORD
;
}
static
void
*
atifs_alloc
(
const
struct
wined3d_shader_backend_ops
*
shader_backend
,
void
*
shader_priv
)
{
struct
atifs_private_data
*
priv
;
...
...
@@ -1386,6 +1391,7 @@ static void atifs_free_context_data(struct wined3d_context *context)
const
struct
fragment_pipeline
atifs_fragment_pipeline
=
{
atifs_enable
,
atifs_get_caps
,
atifs_get_emul_mask
,
atifs_alloc
,
atifs_free
,
atifs_alloc_context_data
,
...
...
dlls/wined3d/directx.c
View file @
f2989a25
...
...
@@ -3434,7 +3434,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
const
char
*
WGL_Extensions
=
NULL
;
enum
wined3d_gl_vendor
gl_vendor
;
enum
wined3d_pci_device
device
;
DWORD
gl_version
;
DWORD
gl_version
,
gl_ext_emul_mask
;
HDC
hdc
;
unsigned
int
i
,
j
;
GLint
context_profile
=
0
;
...
...
@@ -3805,8 +3805,12 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
fixup_extensions
(
gl_info
,
gl_renderer_str
,
gl_vendor
,
card_vendor
,
device
);
init_driver_info
(
driver_info
,
card_vendor
,
device
);
install_gl_compat_wrapper
(
gl_info
,
ARB_MULTITEXTURE
);
install_gl_compat_wrapper
(
gl_info
,
EXT_FOG_COORD
);
gl_ext_emul_mask
=
adapter
->
vertex_pipe
->
vp_get_emul_mask
(
gl_info
)
|
adapter
->
fragment_pipe
->
get_emul_mask
(
gl_info
);
if
(
gl_ext_emul_mask
&
GL_EXT_EMUL_ARB_MULTITEXTURE
)
install_gl_compat_wrapper
(
gl_info
,
ARB_MULTITEXTURE
);
if
(
gl_ext_emul_mask
&
GL_EXT_EMUL_EXT_FOG_COORD
)
install_gl_compat_wrapper
(
gl_info
,
EXT_FOG_COORD
);
return
TRUE
;
}
...
...
dlls/wined3d/glsl_shader.c
View file @
f2989a25
...
...
@@ -7742,6 +7742,13 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info,
caps
->
raster_caps
=
WINED3DPRASTERCAPS_FOGRANGE
;
}
static
DWORD
glsl_vertex_pipe_vp_get_emul_mask
(
const
struct
wined3d_gl_info
*
gl_info
)
{
if
(
gl_info
->
supported
[
WINED3D_GL_LEGACY_CONTEXT
])
return
GL_EXT_EMUL_ARB_MULTITEXTURE
;
return
0
;
}
static
void
*
glsl_vertex_pipe_vp_alloc
(
const
struct
wined3d_shader_backend_ops
*
shader_backend
,
void
*
shader_priv
)
{
struct
shader_glsl_priv
*
priv
;
...
...
@@ -8121,6 +8128,7 @@ const struct wined3d_vertex_pipe_ops glsl_vertex_pipe =
{
glsl_vertex_pipe_vp_enable
,
glsl_vertex_pipe_vp_get_caps
,
glsl_vertex_pipe_vp_get_emul_mask
,
glsl_vertex_pipe_vp_alloc
,
glsl_vertex_pipe_vp_free
,
glsl_vertex_pipe_vp_states
,
...
...
@@ -8167,6 +8175,13 @@ static void glsl_fragment_pipe_get_caps(const struct wined3d_gl_info *gl_info, s
caps
->
MaxSimultaneousTextures
=
min
(
gl_info
->
limits
.
fragment_samplers
,
8
);
}
static
DWORD
glsl_fragment_pipe_get_emul_mask
(
const
struct
wined3d_gl_info
*
gl_info
)
{
if
(
gl_info
->
supported
[
WINED3D_GL_LEGACY_CONTEXT
])
return
GL_EXT_EMUL_ARB_MULTITEXTURE
;
return
0
;
}
static
void
*
glsl_fragment_pipe_alloc
(
const
struct
wined3d_shader_backend_ops
*
shader_backend
,
void
*
shader_priv
)
{
struct
shader_glsl_priv
*
priv
;
...
...
@@ -8446,6 +8461,7 @@ const struct fragment_pipeline glsl_fragment_pipe =
{
glsl_fragment_pipe_enable
,
glsl_fragment_pipe_get_caps
,
glsl_fragment_pipe_get_emul_mask
,
glsl_fragment_pipe_alloc
,
glsl_fragment_pipe_free
,
glsl_fragment_pipe_alloc_context_data
,
...
...
dlls/wined3d/nvidia_texture_shader.c
View file @
f2989a25
...
...
@@ -738,6 +738,11 @@ static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
caps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
}
static
DWORD
nvrc_fragment_get_emul_mask
(
const
struct
wined3d_gl_info
*
gl_info
)
{
return
GL_EXT_EMUL_ARB_MULTITEXTURE
|
GL_EXT_EMUL_EXT_FOG_COORD
;
}
static
void
*
nvrc_fragment_alloc
(
const
struct
wined3d_shader_backend_ops
*
shader_backend
,
void
*
shader_priv
)
{
return
shader_priv
;
...
...
@@ -924,6 +929,7 @@ static void nvrc_context_free(struct wined3d_context *context)
const
struct
fragment_pipeline
nvts_fragment_pipeline
=
{
nvts_enable
,
nvrc_fragment_get_caps
,
nvrc_fragment_get_emul_mask
,
nvrc_fragment_alloc
,
nvrc_fragment_free
,
nvrc_context_alloc
,
...
...
@@ -935,6 +941,7 @@ const struct fragment_pipeline nvts_fragment_pipeline = {
const
struct
fragment_pipeline
nvrc_fragment_pipeline
=
{
nvrc_enable
,
nvrc_fragment_get_caps
,
nvrc_fragment_get_emul_mask
,
nvrc_fragment_alloc
,
nvrc_fragment_free
,
nvrc_context_alloc
,
...
...
dlls/wined3d/state.c
View file @
f2989a25
...
...
@@ -5582,10 +5582,16 @@ static void vp_ffp_get_caps(const struct wined3d_gl_info *gl_info, struct wined3
caps
->
raster_caps
|=
WINED3DPRASTERCAPS_FOGRANGE
;
}
static
DWORD
vp_ffp_get_emul_mask
(
const
struct
wined3d_gl_info
*
gl_info
)
{
return
GL_EXT_EMUL_ARB_MULTITEXTURE
|
GL_EXT_EMUL_EXT_FOG_COORD
;
}
const
struct
wined3d_vertex_pipe_ops
ffp_vertex_pipe
=
{
ffp_enable
,
vp_ffp_get_caps
,
vp_ffp_get_emul_mask
,
ffp_alloc
,
ffp_free
,
vp_ffp_states
,
...
...
@@ -5632,6 +5638,11 @@ static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
caps
->
MaxSimultaneousTextures
=
gl_info
->
limits
.
textures
;
}
static
DWORD
ffp_fragment_get_emul_mask
(
const
struct
wined3d_gl_info
*
gl_info
)
{
return
GL_EXT_EMUL_ARB_MULTITEXTURE
|
GL_EXT_EMUL_EXT_FOG_COORD
;
}
static
BOOL
ffp_color_fixup_supported
(
struct
color_fixup_desc
fixup
)
{
if
(
TRACE_ON
(
d3d
))
...
...
@@ -5663,6 +5674,7 @@ static void ffp_none_context_free(struct wined3d_context *context)
const
struct
fragment_pipeline
ffp_fragment_pipeline
=
{
ffp_enable
,
ffp_fragment_get_caps
,
ffp_fragment_get_emul_mask
,
ffp_alloc
,
ffp_free
,
ffp_none_context_alloc
,
...
...
@@ -5685,10 +5697,16 @@ static void vp_none_get_caps(const struct wined3d_gl_info *gl_info, struct wined
memset
(
caps
,
0
,
sizeof
(
*
caps
));
}
static
DWORD
vp_none_get_emul_mask
(
const
struct
wined3d_gl_info
*
gl_info
)
{
return
0
;
}
const
struct
wined3d_vertex_pipe_ops
none_vertex_pipe
=
{
none_enable
,
vp_none_get_caps
,
vp_none_get_emul_mask
,
none_alloc
,
none_free
,
NULL
,
...
...
@@ -5699,6 +5717,11 @@ static void fp_none_get_caps(const struct wined3d_gl_info *gl_info, struct fragm
memset
(
caps
,
0
,
sizeof
(
*
caps
));
}
static
DWORD
fp_none_get_emul_mask
(
const
struct
wined3d_gl_info
*
gl_info
)
{
return
0
;
}
static
BOOL
fp_none_color_fixup_supported
(
struct
color_fixup_desc
fixup
)
{
return
is_identity_fixup
(
fixup
);
...
...
@@ -5708,6 +5731,7 @@ const struct fragment_pipeline none_fragment_pipe =
{
none_enable
,
fp_none_get_caps
,
fp_none_get_emul_mask
,
none_alloc
,
none_free
,
ffp_none_context_alloc
,
...
...
dlls/wined3d/wined3d_private.h
View file @
f2989a25
...
...
@@ -1287,10 +1287,14 @@ struct fragment_caps
DWORD
MaxSimultaneousTextures
;
};
#define GL_EXT_EMUL_ARB_MULTITEXTURE 0x00000001
#define GL_EXT_EMUL_EXT_FOG_COORD 0x00000002
struct
fragment_pipeline
{
void
(
*
enable_extension
)(
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
enable
);
void
(
*
get_caps
)(
const
struct
wined3d_gl_info
*
gl_info
,
struct
fragment_caps
*
caps
);
DWORD
(
*
get_emul_mask
)(
const
struct
wined3d_gl_info
*
gl_info
);
void
*
(
*
alloc_private
)(
const
struct
wined3d_shader_backend_ops
*
shader_backend
,
void
*
shader_priv
);
void
(
*
free_private
)(
struct
wined3d_device
*
device
);
BOOL
(
*
allocate_context_data
)(
struct
wined3d_context
*
context
);
...
...
@@ -1316,6 +1320,7 @@ struct wined3d_vertex_pipe_ops
{
void
(
*
vp_enable
)(
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
enable
);
void
(
*
vp_get_caps
)(
const
struct
wined3d_gl_info
*
gl_info
,
struct
wined3d_vertex_caps
*
caps
);
DWORD
(
*
vp_get_emul_mask
)(
const
struct
wined3d_gl_info
*
gl_info
);
void
*
(
*
vp_alloc
)(
const
struct
wined3d_shader_backend_ops
*
shader_backend
,
void
*
shader_priv
);
void
(
*
vp_free
)(
struct
wined3d_device
*
device
);
const
struct
StateEntryTemplate
*
vp_states
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment