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
cd7f43b0
Commit
cd7f43b0
authored
Jul 17, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't activate a context unless we need one.
parent
c68a20fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+6
-2
glsl_shader.c
dlls/wined3d/glsl_shader.c
+4
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
cd7f43b0
...
...
@@ -4359,8 +4359,6 @@ static void shader_arb_destroy(IWineD3DBaseShader *iface) {
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
baseShader
->
baseShader
.
device
;
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
if
(
shader_is_pshader_version
(
baseShader
->
baseShader
.
reg_maps
.
shader_version
.
type
))
{
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
iface
;
...
...
@@ -4369,6 +4367,9 @@ static void shader_arb_destroy(IWineD3DBaseShader *iface) {
if
(
!
shader_data
)
return
;
/* This can happen if a shader was never compiled */
ENTER_GL
();
if
(
shader_data
->
num_gl_shaders
)
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
for
(
i
=
0
;
i
<
shader_data
->
num_gl_shaders
;
i
++
)
{
GL_EXTCALL
(
glDeleteProgramsARB
(
1
,
&
shader_data
->
gl_shaders
[
i
].
prgId
));
checkGLcall
(
"GL_EXTCALL(glDeleteProgramsARB(1, &shader_data->gl_shaders[i].prgId))"
);
...
...
@@ -4384,6 +4385,9 @@ static void shader_arb_destroy(IWineD3DBaseShader *iface) {
if
(
!
shader_data
)
return
;
/* This can happen if a shader was never compiled */
ENTER_GL
();
if
(
shader_data
->
num_gl_shaders
)
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
for
(
i
=
0
;
i
<
shader_data
->
num_gl_shaders
;
i
++
)
{
GL_EXTCALL
(
glDeleteProgramsARB
(
1
,
&
shader_data
->
gl_shaders
[
i
].
prgId
));
checkGLcall
(
"GL_EXTCALL(glDeleteProgramsARB(1, &shader_data->gl_shaders[i].prgId))"
);
...
...
dlls/wined3d/glsl_shader.c
View file @
cd7f43b0
...
...
@@ -4331,8 +4331,6 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
*/
char
pshader
=
shader_is_pshader_version
(
This
->
baseShader
.
reg_maps
.
shader_version
.
type
);
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
if
(
pshader
)
{
struct
glsl_pshader_private
*
shader_data
;
ps
=
(
IWineD3DPixelShaderImpl
*
)
This
;
...
...
@@ -4344,6 +4342,8 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
return
;
}
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
if
(
priv
->
glsl_program
&&
(
IWineD3DBaseShader
*
)
priv
->
glsl_program
->
pshader
==
iface
)
{
ENTER_GL
();
...
...
@@ -4361,6 +4361,8 @@ static void shader_glsl_destroy(IWineD3DBaseShader *iface) {
return
;
}
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
if
(
priv
->
glsl_program
&&
(
IWineD3DBaseShader
*
)
priv
->
glsl_program
->
vshader
==
iface
)
{
ENTER_GL
();
...
...
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