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
aa11dfa8
Commit
aa11dfa8
authored
Apr 21, 2016
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use wined3d_texture_prepare_location() in draw_primitive().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7cabef14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
drawprim.c
dlls/wined3d/drawprim.c
+8
-7
No files found.
dlls/wined3d/drawprim.c
View file @
aa11dfa8
...
...
@@ -415,6 +415,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
const
struct
wined3d_stream_info
*
stream_info
;
struct
wined3d_event_query
*
ib_query
=
NULL
;
struct
wined3d_stream_info
si_emulated
;
struct
wined3d_rendertarget_view
*
dsv
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
BOOL
emulation
=
FALSE
;
...
...
@@ -448,21 +449,21 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
}
else
{
wined3d_surface_prepare
(
target
,
context
,
rtv
->
resource
->
draw_binding
);
wined3d_texture_prepare_location
(
target
->
container
,
rtv
->
sub_resource_idx
,
context
,
rtv
->
resource
->
draw_binding
);
}
}
}
if
(
fb
->
depth_stencil
)
if
(
(
dsv
=
fb
->
depth_stencil
)
)
{
/* Note that this depends on the context_acquire() call above to set
* context->render_offscreen properly. We don't currently take the
* Z-compare function into account, but we could skip loading the
* depthstencil for D3DCMP_NEVER and D3DCMP_ALWAYS as well. Also note
* that we never copy the stencil data.*/
DWORD
location
=
context
->
render_offscreen
?
fb
->
depth_stencil
->
resource
->
draw_binding
:
WINED3D_LOCATION_DRAWABLE
;
struct
wined3d_surface
*
ds
=
wined3d_rendertarget_view_get_surface
(
fb
->
depth_stencil
);
DWORD
location
=
context
->
render_offscreen
?
dsv
->
resource
->
draw_binding
:
WINED3D_LOCATION_DRAWABLE
;
struct
wined3d_surface
*
ds
=
wined3d_rendertarget_view_get_surface
(
dsv
);
if
(
state
->
render_states
[
WINED3D_RS_ZWRITEENABLE
]
||
state
->
render_states
[
WINED3D_RS_ZENABLE
])
{
...
...
@@ -482,10 +483,10 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
if
(
!
EqualRect
(
&
r
,
&
draw_rect
))
surface_load_location
(
ds
,
context
,
location
);
else
wined3d_
surface_prepare
(
ds
,
context
,
location
);
wined3d_
texture_prepare_location
(
ds
->
container
,
dsv
->
sub_resource_idx
,
context
,
location
);
}
else
wined3d_
surface_prepare
(
ds
,
context
,
location
);
wined3d_
texture_prepare_location
(
ds
->
container
,
dsv
->
sub_resource_idx
,
context
,
location
);
}
if
(
!
context_apply_draw_state
(
context
,
device
,
state
))
...
...
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