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
b9d955b8
Commit
b9d955b8
authored
Aug 23, 2009
by
Jörg Höhle
Committed by
Alexandre Julliard
Aug 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Delete meaningless UNIX GL driver version parsing.
parent
70c39c44
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
104 deletions
+5
-104
directx.c
dlls/wined3d/directx.c
+5
-104
No files found.
dlls/wined3d/directx.c
View file @
b9d955b8
...
...
@@ -927,7 +927,9 @@ static void fixup_extensions(struct wined3d_gl_info *gl_info, const char *gl_ren
/* Find out if PBOs work as they are supposed to. */
test_pbo_functionality
(
gl_info
);
/* Fixup the driver version */
/* Fixup the driver version we'll report to the app. */
gl_info
->
driver_version
=
MAKEDWORD_VERSION
(
8
,
6
);
/* Nvidia RIVA TNT, arbitrary */
gl_info
->
driver_version_hipart
=
MAKEDWORD_VERSION
(
7
,
1
);
for
(
i
=
0
;
i
<
(
sizeof
(
driver_version_table
)
/
sizeof
(
driver_version_table
[
0
]));
++
i
)
{
if
(
gl_info
->
gl_vendor
==
driver_version_table
[
i
].
vendor
...
...
@@ -944,6 +946,8 @@ static void fixup_extensions(struct wined3d_gl_info *gl_info, const char *gl_ren
break
;
}
}
TRACE_
(
d3d_caps
)(
"Reporting (fake) driver version 0x%08X-0x%08X.
\n
"
,
gl_info
->
driver_version_hipart
,
gl_info
->
driver_version
);
}
static
DWORD
wined3d_parse_gl_version
(
const
char
*
gl_version
)
...
...
@@ -964,105 +968,6 @@ static DWORD wined3d_parse_gl_version(const char *gl_version)
return
MAKEDWORD_VERSION
(
major
,
minor
);
}
static
DWORD
wined3d_guess_driver_version
(
const
char
*
gl_version
,
GL_Vendors
vendor
)
{
int
major
,
minor
;
const
char
*
ptr
;
DWORD
ret
;
/* Now parse the driver specific string which we'll report to the app. */
switch
(
vendor
)
{
case
VENDOR_NVIDIA
:
ptr
=
strstr
(
gl_version
,
"NVIDIA"
);
if
(
!
ptr
)
return
0
;
ptr
=
strstr
(
ptr
,
" "
);
if
(
!
ptr
)
return
0
;
while
(
isspace
(
*
ptr
))
++
ptr
;
if
(
!*
ptr
)
return
0
;
major
=
atoi
(
ptr
);
while
(
isdigit
(
*
ptr
))
++
ptr
;
if
(
*
ptr
++
!=
'.'
)
return
0
;
minor
=
atoi
(
ptr
);
minor
=
major
*
100
+
minor
;
major
=
10
;
break
;
case
VENDOR_ATI
:
major
=
minor
=
0
;
ptr
=
strchr
(
gl_version
,
'-'
);
if
(
!
ptr
)
return
0
;
++
ptr
;
/* Check if version number is of the form x.y.z. */
if
(
strlen
(
ptr
)
<
5
||
!
isdigit
(
ptr
[
0
])
||
ptr
[
1
]
!=
'.'
||
!
isdigit
(
ptr
[
2
])
||
ptr
[
3
]
!=
'.'
||
!
isdigit
(
ptr
[
4
]))
{
return
0
;
}
major
=
ptr
[
0
]
-
'0'
;
minor
=
((
ptr
[
2
]
-
'0'
)
<<
8
)
|
(
ptr
[
4
]
-
'0'
);
break
;
case
VENDOR_INTEL
:
/* Apple and Mesa version strings look differently, but both provide intel drivers. */
if
(
strstr
(
gl_version
,
"APPLE"
))
{
/* [0-9]+.[0-9]+ APPLE-[0-9]+.[0.9]+.[0.9]+
* We only need the first part, and use the APPLE as identification
* "1.2 APPLE-1.4.56". */
ptr
=
gl_version
;
major
=
atoi
(
ptr
);
while
(
isdigit
(
*
ptr
))
++
ptr
;
if
(
*
ptr
++
!=
'.'
)
return
0
;
minor
=
atoi
(
ptr
);
break
;
}
/* Fallthrough */
case
VENDOR_MESA
:
ptr
=
strstr
(
gl_version
,
"Mesa"
);
if
(
!
ptr
)
return
0
;
ptr
=
strstr
(
ptr
,
" "
);
if
(
!
ptr
)
return
0
;
while
(
isspace
(
*
ptr
))
++
ptr
;
if
(
!*
ptr
)
return
0
;
major
=
atoi
(
ptr
);
while
(
isdigit
(
*
ptr
))
++
ptr
;
if
(
*
ptr
++
!=
'.'
)
return
0
;
minor
=
atoi
(
ptr
);
break
;
default:
FIXME
(
"Unhandled vendor %#x.
\n
"
,
vendor
);
return
0
;
}
ret
=
MAKEDWORD_VERSION
(
major
,
minor
);
TRACE_
(
d3d_caps
)(
"Found driver version %s -> %d.%d -> 0x%08x.
\n
"
,
debugstr_a
(
gl_version
),
major
,
minor
,
ret
);
return
ret
;
}
static
GL_Vendors
wined3d_guess_vendor
(
const
char
*
gl_vendor
,
const
char
*
gl_renderer
)
{
if
(
strstr
(
gl_vendor
,
"NVIDIA"
))
...
...
@@ -1605,10 +1510,6 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_gl_info *gl_info)
return
FALSE
;
}
gl_version
=
wined3d_parse_gl_version
(
gl_string
);
gl_info
->
driver_version
=
wined3d_guess_driver_version
(
gl_string
,
gl_info
->
gl_vendor
);
if
(
!
gl_info
->
driver_version
)
FIXME_
(
d3d_caps
)(
"Unrecognized GL_VERSION %s.
\n
"
,
debugstr_a
(
gl_string
));
/* Current Windows drivers have versions like 6.14.... (some older have an earlier version). */
gl_info
->
driver_version_hipart
=
MAKEDWORD_VERSION
(
6
,
14
);
/*
* Initialize openGL extension related variables
...
...
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