Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0047c55e
Commit
0047c55e
authored
Aug 03, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle destruction of a context's current render target.
parent
028b763f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
context.c
dlls/wined3d/context.c
+14
-4
No files found.
dlls/wined3d/context.c
View file @
0047c55e
...
...
@@ -594,6 +594,8 @@ void context_resource_released(IWineD3DDevice *iface, IWineD3DResource *resource
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
struct
fbo_entry
*
entry
,
*
entry2
;
if
(
context
->
current_rt
==
(
IWineD3DSurface
*
)
resource
)
context
->
current_rt
=
NULL
;
ENTER_GL
();
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
entry2
,
&
context
->
fbo_list
,
struct
fbo_entry
,
entry
)
...
...
@@ -1716,7 +1718,6 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf
struct
WineD3DContext
*
current_context
=
context_get_current
();
BOOL
oldRenderOffscreen
=
This
->
render_offscreen
;
const
struct
StateEntry
*
StateTable
=
This
->
StateTable
;
const
struct
GlPixelFormatDesc
*
old
,
*
new
;
struct
WineD3DContext
*
context
;
if
(
current_context
&&
current_context
->
destroyed
)
current_context
=
NULL
;
...
...
@@ -1724,6 +1725,7 @@ static inline WineD3DContext *FindContext(IWineD3DDeviceImpl *This, IWineD3DSurf
if
(
!
target
)
{
if
(
current_context
&&
current_context
->
current_rt
&&
((
IWineD3DSurfaceImpl
*
)
current_context
->
surface
)
->
resource
.
wineD3DDevice
==
This
)
{
target
=
current_context
->
current_rt
;
...
...
@@ -1833,8 +1835,15 @@ retry:
/* To compensate the lack of format switching with some offscreen rendering methods and on onscreen buffers
* the alpha blend state changes with different render target formats. */
old
=
((
IWineD3DSurfaceImpl
*
)
context
->
current_rt
)
->
resource
.
format_desc
;
new
=
((
IWineD3DSurfaceImpl
*
)
target
)
->
resource
.
format_desc
;
if
(
!
context
->
current_rt
)
{
Context_MarkStateDirty
(
context
,
STATE_RENDER
(
WINED3DRS_ALPHABLENDENABLE
),
StateTable
);
}
else
{
const
struct
GlPixelFormatDesc
*
old
=
((
IWineD3DSurfaceImpl
*
)
context
->
current_rt
)
->
resource
.
format_desc
;
const
struct
GlPixelFormatDesc
*
new
=
((
IWineD3DSurfaceImpl
*
)
target
)
->
resource
.
format_desc
;
if
(
old
->
format
!=
new
->
format
)
{
/* Disable blending when the alpha mask has changed and when a format doesn't support blending. */
...
...
@@ -1844,6 +1853,7 @@ retry:
Context_MarkStateDirty
(
context
,
STATE_RENDER
(
WINED3DRS_ALPHABLENDENABLE
),
StateTable
);
}
}
}
/* When switching away from an offscreen render target, and we're not using FBOs,
* we have to read the drawable into the texture. This is done via PreLoad(and
...
...
@@ -1871,7 +1881,7 @@ retry:
* After that, the outer ActivateContext(which calls PreLoad) can activate the new
* target for the new thread
*/
if
(
readTexture
&&
context
->
current_rt
!=
target
)
if
(
readTexture
&&
context
->
current_rt
&&
context
->
current_rt
!=
target
)
{
BOOL
oldInDraw
=
This
->
isInDraw
;
...
...
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