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
35f64cd7
Commit
35f64cd7
authored
Nov 07, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Move glGetString extension filtering to unix_wgl.c.
parent
720afb14
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
35 deletions
+42
-35
make_opengl
dlls/opengl32/make_opengl
+8
-2
opengl_ext.h
dlls/opengl32/opengl_ext.h
+0
-1
thunks.c
dlls/opengl32/thunks.c
+9
-0
unix_thunks.c
dlls/opengl32/unix_thunks.c
+1
-8
unix_wgl.c
dlls/opengl32/unix_wgl.c
+24
-1
wgl.c
dlls/opengl32/wgl.c
+0
-23
No files found.
dlls/opengl32/make_opengl
View file @
35f64cd7
...
...
@@ -162,7 +162,6 @@ my %manual_win_functions =
my
%
manual_win_thunks
=
(
"glGetIntegerv"
=>
1
,
"glGetString"
=>
1
,
"wglGetCurrentReadDCARB"
=>
1
,
"wglGetPixelFormat"
=>
1
,
"wglGetProcAddress"
=>
1
,
...
...
@@ -510,7 +509,7 @@ sub needs_wrapper($$)
{
my
(
$name
,
$func
)
=
@_
;
return
1
if
$name
=~
/^glDebugMessageCallback|^glGetString
i
/
;
return
1
if
$name
=~
/^glDebugMessageCallback|^glGetString/
;
# check if return value needs special handling
(
my
$type
=
$func
->
[
0
]
->
textContent
())
=~
s/ $//
;
...
...
@@ -941,6 +940,12 @@ foreach (sort keys %wgl_functions)
next
unless
needs_wrapper
(
$_
,
$wgl_functions
{
$_
}
);
print
OUT
"extern NTSTATUS wgl_$_( void *args ) DECLSPEC_HIDDEN;\n"
;
}
foreach
(
sort
keys
%
norm_functions
)
{
next
if
defined
$manual_win_functions
{
$_
};
next
unless
needs_wrapper
(
$_
,
$norm_functions
{
$_
}
);
print
OUT
"extern NTSTATUS gl_$_( void *args ) DECLSPEC_HIDDEN;\n"
;
}
foreach
(
sort
keys
%
ext_functions
)
{
next
if
defined
$manual_win_functions
{
$_
};
...
...
@@ -958,6 +963,7 @@ foreach (sort keys %wgl_functions)
foreach
(
sort
keys
%
norm_functions
)
{
next
if
defined
$manual_win_functions
{
$_
};
next
if
needs_wrapper
(
$_
,
$norm_functions
{
$_
}
);
print
OUT
generate_unix_thunk
(
$_
,
$norm_functions
{
$_
},
"gl"
);
}
foreach
(
sort
keys
%
ext_functions
)
...
...
dlls/opengl32/opengl_ext.h
View file @
35f64cd7
...
...
@@ -101,7 +101,6 @@ static inline enum wgl_handle_type get_current_context_type(void)
extern
int
WINAPI
wglDescribePixelFormat
(
HDC
hdc
,
int
ipfd
,
UINT
cjpfd
,
PIXELFORMATDESCRIPTOR
*
ppfd
);
extern
BOOL
filter_extensions
(
const
char
*
extensions
,
GLubyte
**
exts_list
,
GLuint
**
disabled_exts
)
DECLSPEC_HIDDEN
;
extern
const
GLuint
*
disabled_extensions_index
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
check_extension_support
(
const
char
*
extension
,
const
char
*
available_extensions
)
DECLSPEC_HIDDEN
;
extern
char
*
build_extension_list
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/opengl32/thunks.c
View file @
35f64cd7
...
...
@@ -1011,6 +1011,15 @@ void WINAPI glGetPolygonStipple( GLubyte *mask )
if
((
status
=
UNIX_CALL
(
glGetPolygonStipple
,
&
args
)))
WARN
(
"glGetPolygonStipple returned %#x
\n
"
,
status
);
}
const
GLubyte
*
WINAPI
glGetString
(
GLenum
name
)
{
struct
glGetString_params
args
=
{
.
name
=
name
,
};
NTSTATUS
status
;
TRACE
(
"name %d
\n
"
,
name
);
if
((
status
=
UNIX_CALL
(
glGetString
,
&
args
)))
WARN
(
"glGetString returned %#x
\n
"
,
status
);
return
args
.
ret
;
}
void
WINAPI
glGetTexEnvfv
(
GLenum
target
,
GLenum
pname
,
GLfloat
*
params
)
{
struct
glGetTexEnvfv_params
args
=
{
.
target
=
target
,
.
pname
=
pname
,
.
params
=
params
,
};
dlls/opengl32/unix_thunks.c
View file @
35f64cd7
...
...
@@ -18,6 +18,7 @@ extern NTSTATUS wgl_wglCreateContext( void *args ) DECLSPEC_HIDDEN;
extern
NTSTATUS
wgl_wglDeleteContext
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wgl_wglMakeCurrent
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wgl_wglShareLists
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
gl_glGetString
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
ext_glDebugMessageCallback
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
ext_glDebugMessageCallbackAMD
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
ext_glDebugMessageCallbackARB
(
void
*
args
)
DECLSPEC_HIDDEN
;
...
...
@@ -1009,14 +1010,6 @@ static NTSTATUS gl_glGetPolygonStipple( void *args )
return
STATUS_SUCCESS
;
}
static
NTSTATUS
gl_glGetString
(
void
*
args
)
{
struct
glGetString_params
*
params
=
args
;
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
params
->
ret
=
funcs
->
gl
.
p_glGetString
(
params
->
name
);
return
STATUS_SUCCESS
;
}
static
NTSTATUS
gl_glGetTexEnvfv
(
void
*
args
)
{
struct
glGetTexEnvfv_params
*
params
=
args
;
dlls/opengl32/unix_wgl.c
View file @
35f64cd7
...
...
@@ -195,7 +195,7 @@ static GLuint *filter_extensions_index( const char *disabled )
}
/* build the extension string by filtering out the disabled extensions */
BOOL
filter_extensions
(
const
char
*
extensions
,
GLubyte
**
exts_list
,
GLuint
**
disabled_exts
)
static
BOOL
filter_extensions
(
const
char
*
extensions
,
GLubyte
**
exts_list
,
GLuint
**
disabled_exts
)
{
static
const
char
*
disabled
;
...
...
@@ -286,6 +286,22 @@ BOOL check_extension_support( const char *extension, const char *available_exten
return
FALSE
;
}
static
const
GLubyte
*
WINAPI
wrap_glGetString
(
GLenum
name
)
{
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
const
GLubyte
*
ret
;
if
((
ret
=
funcs
->
gl
.
p_glGetString
(
name
))
&&
name
==
GL_EXTENSIONS
)
{
struct
wgl_handle
*
ptr
=
get_current_context_ptr
();
GLubyte
**
extensions
=
&
ptr
->
u
.
context
->
extensions
;
GLuint
**
disabled
=
&
ptr
->
u
.
context
->
disabled_exts
;
if
(
*
extensions
||
filter_extensions
(
(
const
char
*
)
ret
,
extensions
,
disabled
))
return
*
extensions
;
}
return
ret
;
}
static
const
GLubyte
*
WINAPI
wrap_glGetStringi
(
GLenum
name
,
GLuint
index
)
{
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
...
...
@@ -711,6 +727,13 @@ NTSTATUS wgl_wglShareLists( void *args )
return
STATUS_SUCCESS
;
}
NTSTATUS
gl_glGetString
(
void
*
args
)
{
struct
glGetString_params
*
params
=
args
;
params
->
ret
=
wrap_glGetString
(
params
->
name
);
return
STATUS_SUCCESS
;
}
NTSTATUS
ext_glDebugMessageCallback
(
void
*
args
)
{
struct
glDebugMessageCallback_params
*
params
=
args
;
...
...
dlls/opengl32/wgl.c
View file @
35f64cd7
...
...
@@ -955,29 +955,6 @@ GLint WINAPI glDebugEntry( GLint unknown1, GLint unknown2 )
return
0
;
}
/***********************************************************************
* glGetString (OPENGL32.@)
*/
const
GLubyte
*
WINAPI
glGetString
(
GLenum
name
)
{
struct
glGetString_params
args
=
{
.
name
=
name
,
};
NTSTATUS
status
;
TRACE
(
"name %d
\n
"
,
name
);
if
((
status
=
UNIX_CALL
(
glGetString
,
&
args
)))
WARN
(
"glGetString returned %#x
\n
"
,
status
);
if
(
name
==
GL_EXTENSIONS
&&
args
.
ret
)
{
struct
wgl_handle
*
ptr
=
get_current_context_ptr
();
GLubyte
**
extensions
=
&
ptr
->
u
.
context
->
extensions
;
GLuint
**
disabled
=
&
ptr
->
u
.
context
->
disabled_exts
;
if
(
*
extensions
||
filter_extensions
(
(
const
char
*
)
args
.
ret
,
extensions
,
disabled
))
return
*
extensions
;
}
return
args
.
ret
;
}
static
BOOL
WINAPI
call_opengl_debug_message_callback
(
struct
wine_gl_debug_message_params
*
params
,
ULONG
size
)
{
params
->
user_callback
(
params
->
source
,
params
->
type
,
params
->
id
,
params
->
severity
,
...
...
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