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
6dc3ac2b
Commit
6dc3ac2b
authored
Jul 10, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make the core extensions enabling table-based.
parent
25247c5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
23 deletions
+31
-23
directx.c
dlls/wined3d/directx.c
+31
-23
No files found.
dlls/wined3d/directx.c
View file @
6dc3ac2b
...
...
@@ -3342,6 +3342,19 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
/* Context activation is done by the caller. */
static
BOOL
wined3d_adapter_init_gl_caps
(
struct
wined3d_adapter
*
adapter
)
{
static
const
struct
{
enum
wined3d_gl_extension
extension
;
DWORD
min_gl_version
;
}
core_extensions
[]
=
{
{
EXT_TEXTURE3D
,
MAKEDWORD_VERSION
(
1
,
2
)},
{
EXT_BLEND_MINMAX
,
MAKEDWORD_VERSION
(
1
,
4
)},
{
EXT_BLEND_SUBTRACT
,
MAKEDWORD_VERSION
(
1
,
4
)},
{
NV_POINT_SPRITE
,
MAKEDWORD_VERSION
(
1
,
4
)},
{
ARB_TEXTURE_NON_POWER_OF_TWO
,
MAKEDWORD_VERSION
(
2
,
0
)},
};
struct
wined3d_driver_info
*
driver_info
=
&
adapter
->
driver_info
;
const
char
*
gl_vendor_str
,
*
gl_renderer_str
,
*
gl_version_str
;
struct
wined3d_gl_info
*
gl_info
=
&
adapter
->
gl_info
;
...
...
@@ -3354,7 +3367,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
enum
wined3d_pci_device
device
;
DWORD
gl_version
;
HDC
hdc
;
unsigned
int
i
;
unsigned
int
i
,
j
;
GLint
context_profile
=
0
;
TRACE
(
"adapter %p.
\n
"
,
adapter
);
...
...
@@ -3429,30 +3442,25 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
parse_extension_string
(
gl_info
,
WGL_Extensions
,
wgl_extension_map
,
sizeof
(
wgl_extension_map
)
/
sizeof
(
*
wgl_extension_map
));
if
(
!
gl_info
->
supported
[
EXT_TEXTURE3D
]
&&
gl_version
>=
MAKEDWORD_VERSION
(
1
,
2
))
{
TRACE
(
"GL CORE: GL_EXT_texture3D support.
\n
"
);
gl_info
->
supported
[
EXT_TEXTURE3D
]
=
TRUE
;
}
if
(
!
gl_info
->
supported
[
NV_POINT_SPRITE
]
&&
gl_version
>=
MAKEDWORD_VERSION
(
1
,
4
))
{
TRACE
(
"GL CORE: GL_NV_point_sprite support.
\n
"
);
gl_info
->
supported
[
NV_POINT_SPRITE
]
=
TRUE
;
}
if
((
!
gl_info
->
supported
[
EXT_BLEND_MINMAX
]
||
!
gl_info
->
supported
[
EXT_BLEND_SUBTRACT
])
&&
gl_version
>=
MAKEDWORD_VERSION
(
1
,
4
))
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
core_extensions
);
++
i
)
{
TRACE
(
"GL CORE: GL_EXT_blend_minmax / GL_EXT_blend_subtract support.
\n
"
);
gl_info
->
supported
[
EXT_BLEND_MINMAX
]
=
TRUE
;
gl_info
->
supported
[
EXT_BLEND_SUBTRACT
]
=
TRUE
;
}
if
(
!
gl_info
->
supported
[
core_extensions
[
i
].
extension
]
&&
gl_version
>=
core_extensions
[
i
].
min_gl_version
)
{
for
(
j
=
0
;
j
<
ARRAY_SIZE
(
gl_extension_map
);
++
j
)
if
(
gl_extension_map
[
j
].
extension
==
core_extensions
[
i
].
extension
)
break
;
if
(
!
gl_info
->
supported
[
ARB_TEXTURE_NON_POWER_OF_TWO
]
&&
gl_version
>=
MAKEDWORD_VERSION
(
2
,
0
))
{
TRACE
(
"GL CORE: GL_ARB_texture_non_power_of_two support.
\n
"
);
gl_info
->
supported
[
ARB_TEXTURE_NON_POWER_OF_TWO
]
=
TRUE
;
if
(
j
<
ARRAY_SIZE
(
gl_extension_map
))
{
TRACE
(
"GL CORE: %s support.
\n
"
,
gl_extension_map
[
j
].
extension_string
);
gl_info
->
supported
[
core_extensions
[
i
].
extension
]
=
TRUE
;
}
else
{
FIXME
(
"GL extension %u not in the GL extensions map.
\n
"
,
core_extensions
[
i
].
extension
);
}
}
}
if
(
gl_info
->
supported
[
EXT_BLEND_MINMAX
]
||
gl_info
->
supported
[
EXT_BLEND_SUBTRACT
])
...
...
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