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
58080d4f
Commit
58080d4f
authored
Apr 22, 2004
by
Raphael Junqueira
Committed by
Alexandre Julliard
Apr 22, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- more FIXME -> TRACE
- begin vendor/card detection (versions/names)
parent
d996f60c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
8 deletions
+86
-8
d3dcore_gl.h
dlls/d3d8/d3dcore_gl.h
+23
-0
directx.c
dlls/d3d8/directx.c
+63
-8
No files found.
dlls/d3d8/d3dcore_gl.h
View file @
58080d4f
...
...
@@ -449,6 +449,20 @@ typedef enum _GL_SupportedExt {
OPENGL_SUPPORTED_EXT_END
}
GL_SupportedExt
;
typedef
enum
_GL_Vendors
{
VENDOR_WINE
=
0x0
,
VENDOR_ATI
=
0x1002
,
VENDOR_NVIDIA
=
0x10de
}
GL_Vendors
;
typedef
enum
_GL_Cards
{
CARD_WINE
=
0x0
,
CARD_ATI_RADEON_8500
=
0x514c
,
CARD_ATI_RADEON_9800PRO
=
0x4e48
,
CARD_NVIDIA_GEFORCE4_TI4600
=
0x0250
,
CARD_NVIDIA_GEFORCEFX_5900ULTRA
=
0x0330
}
GL_Cards
;
typedef
enum
_GL_VSVersion
{
VS_VERSION_NOT_SUPPORTED
=
0x0
,
VS_VERSION_10
=
0x10
,
...
...
@@ -472,6 +486,7 @@ typedef enum _GL_PSVersion {
PS_VERSION_FORCE_DWORD
=
0x7FFFFFFF
}
GL_PSVersion
;
#define MAKEDWORD_VERSION(maj, min) ((maj & 0x0000FFFF) << 16) | (min & 0x0000FFFF)
#define GL_EXT_FUNCS_GEN \
/** EXT Extensions **/
\
...
...
@@ -557,6 +572,14 @@ typedef struct Direct3DVertexStridedData {
#define USE_GL_FUNC(type, pfn) type pfn;
typedef
struct
_GL_Info
{
unsigned
bIsFilled
;
DWORD
glx_version
;
DWORD
gl_version
;
GL_Vendors
gl_vendor
;
GL_Cards
gl_card
;
DWORD
gl_driver_version
;
CHAR
gl_renderer
[
255
];
/**
* CAPS Constants
*/
...
...
dlls/d3d8/directx.c
View file @
58080d4f
...
...
@@ -127,12 +127,13 @@ HRESULT WINAPI IDirect3D8Impl_GetAdapterIdentifier (LPDIRECT3D8 iface,
}
if
(
Adapter
==
0
)
{
/* Display */
FIXME
(
"Autodetect device/Vendor Name and Version using FillGLCaps, currently using NVIDIA ids"
);
strcpy
(
pIdentifier
->
Driver
,
"Display"
);
strcpy
(
pIdentifier
->
Description
,
"Direct3D
Display
"
);
pIdentifier
->
DriverVersion
.
u
.
HighPart
=
1
;
pIdentifier
->
DriverVersion
.
u
.
LowPart
=
0
;
pIdentifier
->
VendorId
=
0
;
pIdentifier
->
DeviceId
=
0
;
strcpy
(
pIdentifier
->
Description
,
"Direct3D
HAL
"
);
pIdentifier
->
DriverVersion
.
u
.
HighPart
=
0xa
;
pIdentifier
->
DriverVersion
.
u
.
LowPart
=
MAKEDWORD_VERSION
(
53
,
96
);
/* last Linux Nvidia drivers */
pIdentifier
->
VendorId
=
VENDOR_NVIDIA
;
pIdentifier
->
DeviceId
=
CARD_NVIDIA_GEFORCE4_TI460
0
;
pIdentifier
->
SubSysId
=
0
;
pIdentifier
->
Revision
=
0
;
/*FIXME: memcpy(&pIdentifier->DeviceIdentifier, ??, sizeof(??GUID)); */
...
...
@@ -270,7 +271,7 @@ HRESULT WINAPI IDirect3D8Impl_CheckDeviceType (LPDIRECT3D8 iface,
UINT
Adapter
,
D3DDEVTYPE
CheckType
,
D3DFORMAT
DisplayFormat
,
D3DFORMAT
BackBufferFormat
,
BOOL
Windowed
)
{
ICOM_THIS
(
IDirect3D8Impl
,
iface
);
FIXM
E
(
"(%p)->(Adptr:%d, CheckType:(%x,%s), DispFmt:(%x,%s), BackBuf:(%x,%s), Win?%d): stub
\n
"
,
TRAC
E
(
"(%p)->(Adptr:%d, CheckType:(%x,%s), DispFmt:(%x,%s), BackBuf:(%x,%s), Win?%d): stub
\n
"
,
This
,
Adapter
,
CheckType
,
debug_d3ddevicetype
(
CheckType
),
...
...
@@ -338,7 +339,7 @@ HRESULT WINAPI IDirect3D8Impl_CheckDeviceMultiSampleType(LPDIRECT3D8 iface,
UINT
Adapter
,
D3DDEVTYPE
DeviceType
,
D3DFORMAT
SurfaceFormat
,
BOOL
Windowed
,
D3DMULTISAMPLE_TYPE
MultiSampleType
)
{
ICOM_THIS
(
IDirect3D8Impl
,
iface
);
FIXM
E
(
"(%p)->(Adptr:%d, DevType:(%x,%s), SurfFmt:(%x,%s), Win?%d, MultiSamp:%x)
\n
"
,
TRAC
E
(
"(%p)->(Adptr:%d, DevType:(%x,%s), SurfFmt:(%x,%s), Win?%d, MultiSamp:%x)
\n
"
,
This
,
Adapter
,
DeviceType
,
debug_d3ddevicetype
(
DeviceType
),
...
...
@@ -355,7 +356,7 @@ HRESULT WINAPI IDirect3D8Impl_CheckDepthStencilMatch(LPDIRECT3D8 iface,
UINT
Adapter
,
D3DDEVTYPE
DeviceType
,
D3DFORMAT
AdapterFormat
,
D3DFORMAT
RenderTargetFormat
,
D3DFORMAT
DepthStencilFormat
)
{
ICOM_THIS
(
IDirect3D8Impl
,
iface
);
FIXM
E
(
"(%p)->(Adptr:%d, DevType:(%x,%s), AdptFmt:(%x,%s), RendrTgtFmt:(%x,%s), DepthStencilFmt:(%x,%s))
\n
"
,
TRAC
E
(
"(%p)->(Adptr:%d, DevType:(%x,%s), AdptFmt:(%x,%s), RendrTgtFmt:(%x,%s), DepthStencilFmt:(%x,%s))
\n
"
,
This
,
Adapter
,
DeviceType
,
debug_d3ddevicetype
(
DeviceType
),
...
...
@@ -715,10 +716,64 @@ static void IDirect3D8Impl_FillGLCaps(LPDIRECT3D8 iface, Display* display) {
const
char
*
GL_Extensions
=
NULL
;
const
char
*
GLX_Extensions
=
NULL
;
GLint
gl_max
;
const
char
*
gl_string
=
NULL
;
const
char
*
gl_string_cursor
=
NULL
;
Bool
test
=
0
;
int
major
,
minor
;
ICOM_THIS
(
IDirect3D8Impl
,
iface
);
if
(
This
->
gl_info
.
bIsFilled
)
return
;
This
->
gl_info
.
bIsFilled
=
1
;
test
=
glXQueryVersion
(
NULL
,
&
major
,
&
minor
);
This
->
gl_info
.
glx_version
=
((
major
&
0x0000FFFF
)
<<
16
)
|
(
minor
&
0x0000FFFF
);
gl_string
=
glXGetClientString
(
NULL
,
GLX_VENDOR
);
if
(
strstr
(
gl_string
,
"NVIDIA"
))
{
This
->
gl_info
.
gl_vendor
=
VENDOR_NVIDIA
;
}
else
if
(
strstr
(
gl_string
,
"ATI"
))
{
This
->
gl_info
.
gl_vendor
=
VENDOR_ATI
;
}
else
{
This
->
gl_info
.
gl_vendor
=
VENDOR_WINE
;
}
gl_string
=
glGetString
(
GL_VERSION
);
switch
(
This
->
gl_info
.
gl_vendor
)
{
case
VENDOR_NVIDIA
:
gl_string_cursor
=
strstr
(
gl_string
,
"NVIDIA"
);
gl_string_cursor
=
strstr
(
gl_string_cursor
,
" "
);
while
(
*
gl_string_cursor
&&
' '
==
*
gl_string_cursor
)
++
gl_string_cursor
;
if
(
*
gl_string_cursor
)
{
char
tmp
[
16
];
int
cursor
=
0
;
while
(
*
gl_string_cursor
<=
'9'
&&
*
gl_string_cursor
>=
'0'
)
{
tmp
[
cursor
++
]
=
*
gl_string_cursor
;
++
gl_string_cursor
;
}
tmp
[
cursor
]
=
0
;
major
=
atoi
(
tmp
);
if
(
*
gl_string_cursor
!=
'.'
)
WARN
(
"malformed GL_VERSION:%s"
,
gl_string
);
++
gl_string_cursor
;
while
(
*
gl_string_cursor
<=
'9'
&&
*
gl_string_cursor
>=
'0'
)
{
tmp
[
cursor
++
]
=
*
gl_string_cursor
;
++
gl_string_cursor
;
}
tmp
[
cursor
]
=
0
;
minor
=
atoi
(
tmp
);
break
;
}
case
VENDOR_ATI
:
default:
major
=
0
;
minor
=
9
;
}
This
->
gl_info
.
gl_driver_version
=
((
major
&
0x0000FFFF
)
<<
16
)
|
(
minor
&
0x0000FFFF
);
gl_string
=
glGetString
(
GL_RENDERER
);
strcpy
(
This
->
gl_info
.
gl_renderer
,
gl_string
);
/*
* 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