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
8de7e5cc
Commit
8de7e5cc
authored
Feb 22, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Return a BOOL from surface_load_location().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3d62cd26
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
17 deletions
+10
-17
surface.c
dlls/wined3d/surface.c
+8
-15
texture.c
dlls/wined3d/texture.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/surface.c
View file @
8de7e5cc
...
@@ -2747,11 +2747,10 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
...
@@ -2747,11 +2747,10 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
}
}
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
HRESULT
surface_load_location
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
BOOL
surface_load_location
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
{
{
unsigned
int
sub_resource_idx
=
surface_get_sub_resource_idx
(
surface
);
unsigned
int
sub_resource_idx
=
surface_get_sub_resource_idx
(
surface
);
struct
wined3d_texture
*
texture
=
surface
->
container
;
struct
wined3d_texture
*
texture
=
surface
->
container
;
HRESULT
hr
;
TRACE
(
"surface %p, location %s.
\n
"
,
surface
,
wined3d_debug_location
(
location
));
TRACE
(
"surface %p, location %s.
\n
"
,
surface
,
wined3d_debug_location
(
location
));
...
@@ -2760,7 +2759,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
...
@@ -2760,7 +2759,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
DWORD
current
=
texture
->
sub_resources
[
sub_resource_idx
].
locations
;
DWORD
current
=
texture
->
sub_resources
[
sub_resource_idx
].
locations
;
FIXME
(
"Unimplemented copy from %s to %s for depth/stencil buffers.
\n
"
,
FIXME
(
"Unimplemented copy from %s to %s for depth/stencil buffers.
\n
"
,
wined3d_debug_location
(
current
),
wined3d_debug_location
(
location
));
wined3d_debug_location
(
current
),
wined3d_debug_location
(
location
));
return
WINED3DERR_INVALIDCALL
;
return
FALSE
;
}
}
switch
(
location
)
switch
(
location
)
...
@@ -2769,31 +2768,25 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
...
@@ -2769,31 +2768,25 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
case
WINED3D_LOCATION_SYSMEM
:
case
WINED3D_LOCATION_SYSMEM
:
case
WINED3D_LOCATION_BUFFER
:
case
WINED3D_LOCATION_BUFFER
:
surface_load_sysmem
(
surface
,
context
,
location
);
surface_load_sysmem
(
surface
,
context
,
location
);
break
;
return
TRUE
;
case
WINED3D_LOCATION_DRAWABLE
:
case
WINED3D_LOCATION_DRAWABLE
:
if
(
FAILED
(
hr
=
surface_load_drawable
(
surface
,
context
)))
return
SUCCEEDED
(
surface_load_drawable
(
surface
,
context
));
return
hr
;
break
;
case
WINED3D_LOCATION_RB_RESOLVED
:
case
WINED3D_LOCATION_RB_RESOLVED
:
case
WINED3D_LOCATION_RB_MULTISAMPLE
:
case
WINED3D_LOCATION_RB_MULTISAMPLE
:
surface_load_renderbuffer
(
surface
,
context
,
location
);
surface_load_renderbuffer
(
surface
,
context
,
location
);
break
;
return
TRUE
;
case
WINED3D_LOCATION_TEXTURE_RGB
:
case
WINED3D_LOCATION_TEXTURE_RGB
:
case
WINED3D_LOCATION_TEXTURE_SRGB
:
case
WINED3D_LOCATION_TEXTURE_SRGB
:
if
(
FAILED
(
hr
=
surface_load_texture
(
surface
,
context
,
return
SUCCEEDED
(
surface_load_texture
(
surface
,
context
,
location
==
WINED3D_LOCATION_TEXTURE_SRGB
)))
location
==
WINED3D_LOCATION_TEXTURE_SRGB
));
return
hr
;
break
;
default:
default:
ERR
(
"Don't know how to handle location %#x.
\n
"
,
location
);
ERR
(
"Don't know how to handle location %#x.
\n
"
,
location
);
break
;
return
FALSE
;
}
}
return
WINED3D_OK
;
}
}
static
HRESULT
ffp_blit_alloc
(
struct
wined3d_device
*
device
)
{
return
WINED3D_OK
;
}
static
HRESULT
ffp_blit_alloc
(
struct
wined3d_device
*
device
)
{
return
WINED3D_OK
;
}
...
...
dlls/wined3d/texture.c
View file @
8de7e5cc
...
@@ -1574,7 +1574,7 @@ static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int
...
@@ -1574,7 +1574,7 @@ static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int
static
BOOL
texture2d_load_location
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
static
BOOL
texture2d_load_location
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context
*
context
,
DWORD
location
)
struct
wined3d_context
*
context
,
DWORD
location
)
{
{
return
SUCCEEDED
(
surface_load_location
(
texture
->
sub_resources
[
sub_resource_idx
].
u
.
surface
,
context
,
location
)
);
return
surface_load_location
(
texture
->
sub_resources
[
sub_resource_idx
].
u
.
surface
,
context
,
location
);
}
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
...
...
dlls/wined3d/wined3d_private.h
View file @
8de7e5cc
...
@@ -3024,7 +3024,7 @@ HRESULT wined3d_surface_create_dc(struct wined3d_surface *surface) DECLSPEC_HIDD
...
@@ -3024,7 +3024,7 @@ HRESULT wined3d_surface_create_dc(struct wined3d_surface *surface) DECLSPEC_HIDD
void
wined3d_surface_destroy_dc
(
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
void
wined3d_surface_destroy_dc
(
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
void
surface_load_fb_texture
(
struct
wined3d_surface
*
surface
,
BOOL
srgb
,
void
surface_load_fb_texture
(
struct
wined3d_surface
*
surface
,
BOOL
srgb
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
HRESULT
surface_load_location
(
struct
wined3d_surface
*
surface
,
BOOL
surface_load_location
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
surface_set_compatible_renderbuffer
(
struct
wined3d_surface
*
surface
,
void
surface_set_compatible_renderbuffer
(
struct
wined3d_surface
*
surface
,
const
struct
wined3d_surface
*
rt
)
DECLSPEC_HIDDEN
;
const
struct
wined3d_surface
*
rt
)
DECLSPEC_HIDDEN
;
...
...
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