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
798439ba
Commit
798439ba
authored
Mar 06, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a texture and sub-resource index to surface_load_drawable().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3b47e108
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
surface.c
dlls/wined3d/surface.c
+5
-5
texture.c
dlls/wined3d/texture.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/surface.c
View file @
798439ba
...
...
@@ -2106,12 +2106,11 @@ BOOL texture2d_load_sysmem(struct wined3d_texture *texture, unsigned int sub_res
}
/* Context activation is done by the caller. */
BOOL
surface_load_drawable
(
struct
wined3d_surface
*
surfac
e
,
struct
wined3d_context
*
context
)
BOOL
texture2d_load_drawable
(
struct
wined3d_texture
*
textur
e
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context
*
context
)
{
unsigned
int
sub_resource_idx
=
surface_get_sub_resource_idx
(
surface
);
struct
wined3d_texture
*
texture
=
surface
->
container
;
struct
wined3d_surface
*
restore_rt
=
NULL
;
struct
wined3d_surface
*
surface
;
struct
wined3d_device
*
device
;
unsigned
int
level
;
RECT
r
;
...
...
@@ -2127,11 +2126,12 @@ BOOL surface_load_drawable(struct wined3d_surface *surface,
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_FBO
&&
wined3d_resource_is_offscreen
(
&
texture
->
resource
))
{
ERR
(
"Trying to load offscreen
surfac
e into WINED3D_LOCATION_DRAWABLE.
\n
"
);
ERR
(
"Trying to load offscreen
textur
e into WINED3D_LOCATION_DRAWABLE.
\n
"
);
return
FALSE
;
}
device
=
texture
->
resource
.
device
;
surface
=
texture
->
sub_resources
[
sub_resource_idx
].
u
.
surface
;
restore_rt
=
context_get_rt_surface
(
context
);
if
(
restore_rt
!=
surface
)
context
=
context_acquire
(
device
,
texture
,
sub_resource_idx
);
...
...
dlls/wined3d/texture.c
View file @
798439ba
...
...
@@ -1806,7 +1806,7 @@ static BOOL texture2d_load_location(struct wined3d_texture *texture, unsigned in
return
texture2d_load_sysmem
(
texture
,
sub_resource_idx
,
context
,
location
);
case
WINED3D_LOCATION_DRAWABLE
:
return
surface_load_drawable
(
surface
,
context
);
return
texture2d_load_drawable
(
texture
,
sub_resource_idx
,
context
);
case
WINED3D_LOCATION_RB_RESOLVED
:
case
WINED3D_LOCATION_RB_MULTISAMPLE
:
...
...
dlls/wined3d/wined3d_private.h
View file @
798439ba
...
...
@@ -3234,6 +3234,8 @@ static inline unsigned int wined3d_texture_get_level_pow2_height(const struct wi
return
max
(
1
,
texture
->
pow2_height
>>
level
);
}
BOOL
texture2d_load_drawable
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
BOOL
texture2d_load_sysmem
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context
*
context
,
DWORD
dst_location
)
DECLSPEC_HIDDEN
;
...
...
@@ -3340,8 +3342,6 @@ static inline struct wined3d_texture_sub_resource *surface_get_sub_resource(stru
HRESULT
wined3d_surface_blt
(
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
DWORD
flags
,
const
struct
wined3d_blt_fx
*
blt_fx
,
enum
wined3d_texture_filter_type
filter
)
DECLSPEC_HIDDEN
;
BOOL
surface_load_drawable
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
surface_load_fb_texture
(
struct
wined3d_surface
*
surface
,
BOOL
srgb
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
BOOL
surface_load_renderbuffer
(
struct
wined3d_surface
*
surface
,
...
...
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