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
a8f2c107
Commit
a8f2c107
authored
Jul 19, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Jul 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Compilation fixes.
parent
71924d7d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
20 deletions
+16
-20
device.c
dlls/wined3d/device.c
+1
-1
directx.c
dlls/wined3d/directx.c
+11
-16
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-2
wined3d_gl.h
include/wine/wined3d_gl.h
+3
-1
No files found.
dlls/wined3d/device.c
View file @
a8f2c107
...
...
@@ -2061,7 +2061,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
* with Default values
*/
((
IWineD3DImpl
*
)
This
->
wineD3D
)
->
isGLInfoValid
=
IWineD3DImpl_FillGLCaps
(
&
((
IWineD3DImpl
*
)
This
->
wineD3D
)
->
gl_info
,
swapchain
->
display
);
((
IWineD3DImpl
*
)
This
->
wineD3D
)
->
isGLInfoValid
=
IWineD3DImpl_FillGLCaps
(
This
->
wineD3D
,
swapchain
->
display
);
/* Setup all the devices defaults */
IWineD3DStateBlock_InitStartupStateBlock
((
IWineD3DStateBlock
*
)
This
->
stateBlock
);
#if 0
...
...
dlls/wined3d/directx.c
View file @
a8f2c107
...
...
@@ -253,7 +253,10 @@ static void select_shader_mode(
* IWineD3D parts follows
**********************************************************/
BOOL
IWineD3DImpl_FillGLCaps
(
WineD3D_GL_Info
*
gl_info
,
Display
*
display
)
{
BOOL
IWineD3DImpl_FillGLCaps
(
IWineD3D
*
iface
,
Display
*
display
)
{
IWineD3DImpl
*
This
=
(
IWineD3DImpl
*
)
iface
;
WineD3D_GL_Info
*
gl_info
=
&
This
->
gl_info
;
const
char
*
GL_Extensions
=
NULL
;
const
char
*
GLX_Extensions
=
NULL
;
const
char
*
gl_string
=
NULL
;
...
...
@@ -492,8 +495,9 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
gl_info
->
vs_ati_version
=
VS_VERSION_NOT_SUPPORTED
;
/* Now work out what GL support this card really has */
#define USE_GL_FUNC(type, pfn) gl_info->pfn =
NULL
;
#define USE_GL_FUNC(type, pfn) gl_info->pfn =
(type) glXGetProcAddressARB( (const GLubyte *) #pfn)
;
GL_EXT_FUNCS_GEN
;
GLX_EXT_FUNCS_GEN
;
#undef USE_GL_FUNC
/* Retrieve opengl defaults */
...
...
@@ -541,7 +545,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
glGetIntegerv
(
GL_MAX_TEXTURE_IMAGE_UNITS_ARB
,
&
gl_max
);
TRACE_
(
d3d_caps
)(
" FOUND: ARB Pixel Shader support - GL_MAX_TEXTURE_IMAGE_UNITS_ARB=%u
\n
"
,
gl_max
);
gl_info
->
max_samplers
=
min
(
MAX_SAMPLERS
,
gl_max
);
glGetProgramivARB
(
GL_FRAGMENT_PROGRAM_ARB
,
GL_MAX_PROGRAM_ENV_PARAMETERS_ARB
,
&
gl_max
);
GL_EXTCALL
(
glGetProgramivARB
(
GL_FRAGMENT_PROGRAM_ARB
,
GL_MAX_PROGRAM_ENV_PARAMETERS_ARB
,
&
gl_max
)
);
TRACE_
(
d3d_caps
)(
" FOUND: ARB Pixel Shader support - max float constants=%u
\n
"
,
gl_max
);
gl_info
->
ps_arb_constantsF
=
gl_max
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_ARB_imaging"
)
==
0
)
{
...
...
@@ -602,7 +606,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
gl_info
->
vs_arb_version
=
VS_VERSION_11
;
TRACE_
(
d3d_caps
)(
" FOUND: ARB Vertex Shader support - version=%02x
\n
"
,
gl_info
->
vs_arb_version
);
gl_info
->
supported
[
ARB_VERTEX_PROGRAM
]
=
TRUE
;
glGetProgramivARB
(
GL_VERTEX_PROGRAM_ARB
,
GL_MAX_PROGRAM_ENV_PARAMETERS_ARB
,
&
gl_max
);
GL_EXTCALL
(
glGetProgramivARB
(
GL_VERTEX_PROGRAM_ARB
,
GL_MAX_PROGRAM_ENV_PARAMETERS_ARB
,
&
gl_max
)
);
TRACE_
(
d3d_caps
)(
" FOUND: ARB Vertex Shader support - max float constants=%u
\n
"
,
gl_max
);
gl_info
->
vs_arb_constantsF
=
gl_max
;
}
else
if
(
strcmp
(
ThisExtn
,
"GL_ARB_vertex_blend"
)
==
0
)
{
...
...
@@ -783,11 +787,6 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
/* TODO: config lookups */
#define USE_GL_FUNC(type, pfn) gl_info->pfn = (type) glXGetProcAddressARB( (const GLubyte *) #pfn);
GL_EXT_FUNCS_GEN
;
#undef USE_GL_FUNC
if
(
display
!=
NULL
)
{
GLX_Extensions
=
glXQueryExtensionsString
(
display
,
DefaultScreen
(
display
));
TRACE_
(
d3d_caps
)(
"GLX_Extensions reported:
\n
"
);
...
...
@@ -810,10 +809,6 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
}
}
#define USE_GL_FUNC(type, pfn) gl_info->pfn = (type) glXGetProcAddressARB( (const GLubyte *) #pfn);
GLX_EXT_FUNCS_GEN
;
#undef USE_GL_FUNC
/* If we created a dummy context, throw it away */
if
(
NULL
!=
fake_ctx
)
WineD3D_ReleaseFakeGLContext
(
fake_ctx
);
...
...
@@ -1095,7 +1090,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
WineD3D_Context
*
fake_ctx
=
NULL
;
if
(
glXGetCurrentContext
()
==
NULL
)
fake_ctx
=
WineD3D_CreateFakeGLContext
();
/* If we don't know the device settings, go query them now */
isGLInfoValid
=
IWineD3DImpl_FillGLCaps
(
&
This
->
gl_info
,
IWineD3DImpl_GetAdapterDisplay
(
iface
,
Adapter
));
isGLInfoValid
=
IWineD3DImpl_FillGLCaps
(
iface
,
IWineD3DImpl_GetAdapterDisplay
(
iface
,
Adapter
));
if
(
fake_ctx
!=
NULL
)
WineD3D_ReleaseFakeGLContext
(
fake_ctx
);
}
...
...
@@ -1526,7 +1521,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
/* If we don't know the device settings, go query them now */
if
(
This
->
isGLInfoValid
==
FALSE
)
{
/* use the desktop window to fill gl caps */
BOOL
rc
=
IWineD3DImpl_FillGLCaps
(
&
This
->
gl_info
,
IWineD3DImpl_GetAdapterDisplay
(
iface
,
Adapter
));
BOOL
rc
=
IWineD3DImpl_FillGLCaps
(
iface
,
IWineD3DImpl_GetAdapterDisplay
(
iface
,
Adapter
));
/* We are running off a real context, save the values */
if
(
rc
)
This
->
isGLInfoValid
=
TRUE
;
...
...
@@ -1915,7 +1910,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
/* Setup some defaults for creating the implicit swapchain */
ENTER_GL
();
/* FIXME: both of those should be made per adapter */
IWineD3DImpl_FillGLCaps
(
&
This
->
gl_info
,
IWineD3DImpl_GetAdapterDisplay
(
iface
,
Adapter
));
IWineD3DImpl_FillGLCaps
(
iface
,
IWineD3DImpl_GetAdapterDisplay
(
iface
,
Adapter
));
LEAVE_GL
();
select_shader_mode
(
&
This
->
gl_info
,
DeviceType
,
&
wined3d_settings
.
ps_selected_mode
,
&
wined3d_settings
.
vs_selected_mode
);
...
...
dlls/wined3d/wined3d_private.h
View file @
a8f2c107
...
...
@@ -390,8 +390,7 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType);
(((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
/* Routine to fill gl caps for swapchains and IWineD3D */
BOOL
IWineD3DImpl_FillGLCaps
(
WineD3D_GL_Info
*
gl_info
,
Display
*
display
);
BOOL
IWineD3DImpl_FillGLCaps
(
IWineD3D
*
iface
,
Display
*
display
);
/*****************************************************************************
* Internal representation of a light
...
...
include/wine/wined3d_gl.h
View file @
a8f2c107
...
...
@@ -690,6 +690,7 @@ typedef unsigned int GLhandleARB;
#ifndef GL_ARB_vertex_shader
#define GL_ARB_vertex_shader 1
#define GL_VERTEX_SHADER_ARB 0x8B31
#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
#define GL_PROGRAM_OBJECT_ARB 0x8B40
#define GL_SHADER_OBJECT_ARB 0x8B48
#define GL_OBJECT_TYPE_ARB 0x8B4E
...
...
@@ -1474,7 +1475,7 @@ typedef enum _GL_SupportedExt {
USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3FEXTPROC, glSecondaryColor3fEXT); \
USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3FVEXTPROC, glSecondaryColor3fvEXT); \
USE_GL_FUNC(PGLFNGLSECONDARYCOLORPOINTEREXTPROC, glSecondaryColorPointerEXT); \
/* GL_
EXT_secondary_color
*/
\
/* GL_
ARB_vertex_program
*/
\
USE_GL_FUNC(PGLFNGENPROGRAMSARBPROC, glGenProgramsARB); \
USE_GL_FUNC(PGLFNBINDPROGRAMARBPROC, glBindProgramARB); \
USE_GL_FUNC(PGLFNPROGRAMSTRINGARBPROC, glProgramStringARB); \
...
...
@@ -1483,6 +1484,7 @@ typedef enum _GL_SupportedExt {
USE_GL_FUNC(PGLFNVERTEXATTRIBPOINTERARBPROC, glVertexAttribPointerARB); \
USE_GL_FUNC(PGLFNENABLEVERTEXATTRIBARRAYARBPROC, glEnableVertexAttribArrayARB); \
USE_GL_FUNC(PGLFNDISABLEVERTEXATTRIBARRAYARBPROC, glDisableVertexAttribArrayARB); \
USE_GL_FUNC(PGLFNGETPROGRAMIVARBPROC, glGetProgramivARB); \
/* GL_ARB_shader_objects */
\
USE_GL_FUNC(WINED3D_PFNGLGETOBJECTPARAMETERIVARBPROC, glGetObjectParameterivARB); \
USE_GL_FUNC(WINED3D_PFNGLGETOBJECTPARAMETERFVARBPROC, glGetObjectParameterfvARB); \
...
...
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