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
aaa7f2ca
Commit
aaa7f2ca
authored
Nov 18, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Make OpenGL traces more compact and readable.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ef9c0cec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
35 deletions
+16
-35
opengl.c
dlls/winex11.drv/opengl.c
+16
-35
No files found.
dlls/winex11.drv/opengl.c
View file @
aaa7f2ca
...
...
@@ -740,16 +740,15 @@ failed:
return
FALSE
;
}
static
int
describeContext
(
struct
wgl_context
*
ctx
)
{
int
tmp
;
int
ctx_vis_id
;
TRACE
(
" Context %p have (vis:%p):
\n
"
,
ctx
,
ctx
->
vis
);
pglXGetFBConfigAttrib
(
gdi_display
,
ctx
->
fmt
->
fbconfig
,
GLX_FBCONFIG_ID
,
&
tmp
);
TRACE
(
" - FBCONFIG_ID 0x%x
\n
"
,
tmp
);
pglXGetFBConfigAttrib
(
gdi_display
,
ctx
->
fmt
->
fbconfig
,
GLX_VISUAL_ID
,
&
tmp
);
TRACE
(
" - VISUAL_ID 0x%x
\n
"
,
tmp
);
ctx_vis_id
=
tmp
;
return
ctx_vis_id
;
static
const
char
*
debugstr_fbconfig
(
GLXFBConfig
fbconfig
)
{
int
id
,
visual
,
drawable
;
if
(
pglXGetFBConfigAttrib
(
gdi_display
,
fbconfig
,
GLX_FBCONFIG_ID
,
&
id
))
return
"*** invalid fbconfig"
;
pglXGetFBConfigAttrib
(
gdi_display
,
fbconfig
,
GLX_VISUAL_ID
,
&
visual
);
pglXGetFBConfigAttrib
(
gdi_display
,
fbconfig
,
GLX_DRAWABLE_TYPE
,
&
drawable
);
return
wine_dbg_sprintf
(
"fbconfig %#x visual id %#x drawable type %#x"
,
id
,
visual
,
drawable
);
}
static
int
ConvertAttribWGLtoGLX
(
const
int
*
iWGLAttr
,
int
*
oGLXAttr
,
struct
wgl_pbuffer
*
pbuf
)
{
...
...
@@ -1408,7 +1407,8 @@ static BOOL set_win_format( HWND hwnd, const struct wgl_pixel_format *format )
return
FALSE
;
}
TRACE
(
"created GL drawable %lx for win %p format %x
\n
"
,
gl
->
drawable
,
hwnd
,
format
->
fmt_id
);
TRACE
(
"created GL drawable %lx for win %p %s
\n
"
,
gl
->
drawable
,
hwnd
,
debugstr_fbconfig
(
format
->
fbconfig
));
XFlush
(
gdi_display
);
...
...
@@ -1465,22 +1465,6 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL allow_change)
}
}
if
(
TRACE_ON
(
wgl
))
{
int
gl_test
=
0
;
gl_test
=
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_FBCONFIG_ID
,
&
value
);
if
(
gl_test
)
{
ERR
(
"Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.
\n
"
);
}
else
{
TRACE
(
" FBConfig have :
\n
"
);
TRACE
(
" - FBCONFIG_ID 0x%x
\n
"
,
value
);
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_VISUAL_ID
,
&
value
);
TRACE
(
" - VISUAL_ID 0x%x
\n
"
,
value
);
pglXGetFBConfigAttrib
(
gdi_display
,
fmt
->
fbconfig
,
GLX_DRAWABLE_TYPE
,
&
value
);
TRACE
(
" - DRAWABLE_TYPE 0x%x
\n
"
,
value
);
}
}
return
set_win_format
(
hwnd
,
fmt
);
}
...
...
@@ -1858,10 +1842,8 @@ static BOOL glxdrv_wglMakeCurrent(HDC hdc, struct wgl_context *ctx)
goto
done
;
}
if
(
TRACE_ON
(
wgl
))
{
describeContext
(
ctx
);
TRACE
(
"hdc %p drawable %lx fmt %p ctx %p
\n
"
,
hdc
,
gl
->
drawable
,
gl
->
format
,
ctx
->
ctx
);
}
TRACE
(
"hdc %p drawable %lx fmt %p ctx %p %s
\n
"
,
hdc
,
gl
->
drawable
,
gl
->
format
,
ctx
->
ctx
,
debugstr_fbconfig
(
gl
->
format
->
fbconfig
));
ret
=
pglXMakeCurrent
(
gdi_display
,
gl
->
drawable
,
ctx
->
ctx
);
if
(
ret
)
...
...
@@ -1957,13 +1939,12 @@ static BOOL glxdrv_wglShareLists(struct wgl_context *org, struct wgl_context *de
}
else
{
describeContext
(
org
);
describeContext
(
dest
);
/* Re-create the GLX context and share display lists */
pglXDestroyContext
(
gdi_display
,
dest
->
ctx
);
dest
->
ctx
=
create_glxcontext
(
gdi_display
,
dest
,
org
->
ctx
);
TRACE
(
" re-created an OpenGL context (%p) for Wine context %p sharing lists with OpenGL ctx %p
\n
"
,
dest
->
ctx
,
dest
,
org
->
ctx
);
TRACE
(
" re-created context (%p) for Wine context %p (%s) sharing lists with ctx %p (%s)
\n
"
,
dest
->
ctx
,
dest
,
debugstr_fbconfig
(
dest
->
fmt
->
fbconfig
),
org
->
ctx
,
debugstr_fbconfig
(
org
->
fmt
->
fbconfig
));
org
->
sharing
=
TRUE
;
dest
->
sharing
=
TRUE
;
...
...
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