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
1001745d
Commit
1001745d
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: Introduce new disabled_extensions_index helper.
parent
81cef172
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
34 deletions
+15
-34
wgl.c
dlls/opengl32/wgl.c
+15
-34
No files found.
dlls/opengl32/wgl.c
View file @
1001745d
...
...
@@ -455,39 +455,32 @@ static BOOL filter_extensions( const char *extensions, GLubyte **exts_list, GLui
return
(
exts_list
&&
*
exts_list
)
||
*
disabled_exts
;
}
static
const
GLuint
*
disabled_extensions_index
(
void
)
{
struct
wgl_handle
*
ptr
=
get_current_context_ptr
();
GLuint
**
disabled
=
&
ptr
->
u
.
context
->
disabled_exts
;
if
(
*
disabled
||
filter_extensions
(
NULL
,
NULL
,
disabled
))
return
*
disabled
;
return
NULL
;
}
void
WINAPI
glGetIntegerv
(
GLenum
pname
,
GLint
*
data
)
{
struct
glGetIntegerv_params
args
=
{
.
pname
=
pname
,
.
data
=
data
,
};
const
GLuint
*
disabled
;
NTSTATUS
status
;
TRACE
(
"pname %d, data %p
\n
"
,
pname
,
data
);
if
(
pname
==
GL_NUM_EXTENSIONS
)
{
struct
wgl_handle
*
ptr
=
get_current_context_ptr
();
GLuint
**
disabled
=
&
ptr
->
u
.
context
->
disabled_exts
;
if
(
*
disabled
||
filter_extensions
(
NULL
,
NULL
,
disabled
))
{
const
GLuint
*
disabled_exts
=
*
disabled
;
GLint
count
,
disabled_count
=
0
;
args
.
data
=
&
count
;
if
((
status
=
UNIX_CALL
(
glGetIntegerv
,
&
args
)))
WARN
(
"glGetIntegerv returned %#x
\n
"
,
status
);
while
(
*
disabled_exts
++
!=
~
0u
)
disabled_count
++
;
*
data
=
count
-
disabled_count
;
return
;
}
}
if
((
status
=
UNIX_CALL
(
glGetIntegerv
,
&
args
)))
WARN
(
"glGetIntegerv returned %#x
\n
"
,
status
);
if
(
pname
==
GL_NUM_EXTENSIONS
&&
(
disabled
=
disabled_extensions_index
()))
while
(
*
disabled
++
!=
~
0u
)
(
*
data
)
--
;
}
const
GLubyte
*
WINAPI
glGetStringi
(
GLenum
name
,
GLuint
index
)
{
const
struct
opengl_funcs
*
funcs
=
NtCurrentTeb
()
->
glTable
;
const
GLuint
*
disabled
;
TRACE
(
"(%d, %d)
\n
"
,
name
,
index
);
if
(
!
funcs
->
ext
.
p_glGetStringi
)
...
...
@@ -497,21 +490,9 @@ const GLubyte * WINAPI glGetStringi(GLenum name, GLuint index)
*
func_ptr
=
funcs
->
wgl
.
p_wglGetProcAddress
(
"glGetStringi"
);
}
if
(
name
==
GL_EXTENSIONS
)
{
struct
wgl_handle
*
ptr
=
get_current_context_ptr
();
if
(
ptr
->
u
.
context
->
disabled_exts
||
filter_extensions
(
NULL
,
NULL
,
&
ptr
->
u
.
context
->
disabled_exts
))
{
const
GLuint
*
disabled_exts
=
ptr
->
u
.
context
->
disabled_exts
;
unsigned
int
disabled_count
=
0
;
if
(
name
==
GL_EXTENSIONS
&&
(
disabled
=
disabled_extensions_index
()))
while
(
index
>=
*
disabled
++
)
index
++
;
while
(
index
+
disabled_count
>=
*
disabled_exts
++
)
disabled_count
++
;
return
funcs
->
ext
.
p_glGetStringi
(
name
,
index
+
disabled_count
);
}
}
return
funcs
->
ext
.
p_glGetStringi
(
name
,
index
);
}
...
...
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