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
95fb8eaa
Commit
95fb8eaa
authored
Apr 21, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to context_setup_target().
parent
1b26ccde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
context.c
dlls/wined3d/context.c
+8
-7
No files found.
dlls/wined3d/context.c
View file @
95fb8eaa
...
@@ -2090,14 +2090,15 @@ static void context_apply_state(struct wined3d_context *context, IWineD3DDeviceI
...
@@ -2090,14 +2090,15 @@ static void context_apply_state(struct wined3d_context *context, IWineD3DDeviceI
}
}
}
}
static
void
context_setup_target
(
IWineD3DDeviceImpl
*
device
,
struct
wined3d_context
*
context
,
IWineD3DSurface
*
target
)
static
void
context_setup_target
(
IWineD3DDeviceImpl
*
device
,
struct
wined3d_context
*
context
,
IWineD3DSurfaceImpl
*
target
)
{
{
BOOL
old_render_offscreen
=
context
->
render_offscreen
,
render_offscreen
;
BOOL
old_render_offscreen
=
context
->
render_offscreen
,
render_offscreen
;
const
struct
StateEntry
*
StateTable
=
device
->
StateTable
;
const
struct
StateEntry
*
StateTable
=
device
->
StateTable
;
if
(
!
target
)
return
;
if
(
!
target
)
return
;
else
if
(
context
->
current_rt
==
target
)
return
;
else
if
(
(
IWineD3DSurfaceImpl
*
)
context
->
current_rt
==
target
)
return
;
render_offscreen
=
surface_is_offscreen
(
(
IWineD3DSurfaceImpl
*
)
target
);
render_offscreen
=
surface_is_offscreen
(
target
);
context_set_render_offscreen
(
context
,
StateTable
,
render_offscreen
);
context_set_render_offscreen
(
context
,
StateTable
,
render_offscreen
);
...
@@ -2110,7 +2111,7 @@ static void context_setup_target(IWineD3DDeviceImpl *device, struct wined3d_cont
...
@@ -2110,7 +2111,7 @@ static void context_setup_target(IWineD3DDeviceImpl *device, struct wined3d_cont
else
else
{
{
const
struct
wined3d_format_desc
*
old
=
((
IWineD3DSurfaceImpl
*
)
context
->
current_rt
)
->
resource
.
format_desc
;
const
struct
wined3d_format_desc
*
old
=
((
IWineD3DSurfaceImpl
*
)
context
->
current_rt
)
->
resource
.
format_desc
;
const
struct
wined3d_format_desc
*
new
=
((
IWineD3DSurfaceImpl
*
)
target
)
->
resource
.
format_desc
;
const
struct
wined3d_format_desc
*
new
=
target
->
resource
.
format_desc
;
if
(
old
->
format
!=
new
->
format
)
if
(
old
->
format
!=
new
->
format
)
{
{
...
@@ -2130,7 +2131,7 @@ static void context_setup_target(IWineD3DDeviceImpl *device, struct wined3d_cont
...
@@ -2130,7 +2131,7 @@ static void context_setup_target(IWineD3DDeviceImpl *device, struct wined3d_cont
* has to be called with the old rendertarget active, otherwise a
* has to be called with the old rendertarget active, otherwise a
* wrong drawable is read. */
* wrong drawable is read. */
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
if
(
wined3d_settings
.
offscreen_rendering_mode
!=
ORM_FBO
&&
old_render_offscreen
&&
context
->
current_rt
!=
target
)
&&
old_render_offscreen
&&
(
IWineD3DSurfaceImpl
*
)
context
->
current_rt
!=
target
)
{
{
BOOL
oldInDraw
=
device
->
isInDraw
;
BOOL
oldInDraw
=
device
->
isInDraw
;
...
@@ -2162,7 +2163,7 @@ static void context_setup_target(IWineD3DDeviceImpl *device, struct wined3d_cont
...
@@ -2162,7 +2163,7 @@ static void context_setup_target(IWineD3DDeviceImpl *device, struct wined3d_cont
}
}
context
->
draw_buffer_dirty
=
TRUE
;
context
->
draw_buffer_dirty
=
TRUE
;
context
->
current_rt
=
target
;
context
->
current_rt
=
(
IWineD3DSurface
*
)
target
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -2186,7 +2187,7 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, IWineD3DSurf
...
@@ -2186,7 +2187,7 @@ struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, IWineD3DSurf
TRACE
(
"device %p, target %p, usage %#x.
\n
"
,
device
,
target
,
usage
);
TRACE
(
"device %p, target %p, usage %#x.
\n
"
,
device
,
target
,
usage
);
context
=
FindContext
(
device
,
(
IWineD3DSurfaceImpl
*
)
target
);
context
=
FindContext
(
device
,
(
IWineD3DSurfaceImpl
*
)
target
);
context_setup_target
(
device
,
context
,
target
);
context_setup_target
(
device
,
context
,
(
IWineD3DSurfaceImpl
*
)
target
);
context_enter
(
context
);
context_enter
(
context
);
if
(
!
context
->
valid
)
return
context
;
if
(
!
context
->
valid
)
return
context
;
...
...
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