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
c1f5b9ac
Commit
c1f5b9ac
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: Merge surface_load_location() into texture2d_load_location().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3d21ea08
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
38 deletions
+43
-38
surface.c
dlls/wined3d/surface.c
+5
-35
texture.c
dlls/wined3d/texture.c
+30
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+8
-2
No files found.
dlls/wined3d/surface.c
View file @
c1f5b9ac
...
@@ -2060,7 +2060,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
...
@@ -2060,7 +2060,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE
}
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
static
BOOL
surface_load_sysmem
(
struct
wined3d_surface
*
surface
,
BOOL
surface_load_sysmem
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
DWORD
dst_location
)
struct
wined3d_context
*
context
,
DWORD
dst_location
)
{
{
unsigned
int
sub_resource_idx
=
surface_get_sub_resource_idx
(
surface
);
unsigned
int
sub_resource_idx
=
surface_get_sub_resource_idx
(
surface
);
...
@@ -2108,7 +2108,7 @@ static BOOL surface_load_sysmem(struct wined3d_surface *surface,
...
@@ -2108,7 +2108,7 @@ static BOOL surface_load_sysmem(struct wined3d_surface *surface,
}
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
static
BOOL
surface_load_drawable
(
struct
wined3d_surface
*
surface
,
BOOL
surface_load_drawable
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
)
struct
wined3d_context
*
context
)
{
{
unsigned
int
sub_resource_idx
=
surface_get_sub_resource_idx
(
surface
);
unsigned
int
sub_resource_idx
=
surface_get_sub_resource_idx
(
surface
);
...
@@ -2155,7 +2155,7 @@ static BOOL surface_load_drawable(struct wined3d_surface *surface,
...
@@ -2155,7 +2155,7 @@ static BOOL surface_load_drawable(struct wined3d_surface *surface,
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
surface_load_texture
(
struct
wined3d_surface
*
surface
,
BOOL
surface_load_texture
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
struct
wined3d_context
*
context
,
BOOL
srgb
)
{
{
unsigned
int
width
,
height
,
level
,
src_row_pitch
,
src_slice_pitch
,
dst_row_pitch
,
dst_slice_pitch
;
unsigned
int
width
,
height
,
level
,
src_row_pitch
,
src_slice_pitch
,
dst_row_pitch
,
dst_slice_pitch
;
...
@@ -2326,8 +2326,8 @@ static BOOL surface_load_texture(struct wined3d_surface *surface,
...
@@ -2326,8 +2326,8 @@ static BOOL surface_load_texture(struct wined3d_surface *surface,
}
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
static
BOOL
surface_load_renderbuffer
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
BOOL
surface_load_renderbuffer
(
struct
wined3d_surface
*
surface
,
DWORD
dst_location
)
struct
wined3d_context
*
context
,
DWORD
dst_location
)
{
{
struct
wined3d_texture
*
texture
=
surface
->
container
;
struct
wined3d_texture
*
texture
=
surface
->
container
;
unsigned
int
level
=
surface_get_sub_resource_idx
(
surface
)
%
texture
->
level_count
;
unsigned
int
level
=
surface_get_sub_resource_idx
(
surface
)
%
texture
->
level_count
;
...
@@ -2359,36 +2359,6 @@ static BOOL surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
...
@@ -2359,36 +2359,6 @@ static BOOL surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
return
TRUE
;
return
TRUE
;
}
}
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
BOOL
surface_load_location
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
{
TRACE
(
"surface %p, location %s.
\n
"
,
surface
,
wined3d_debug_location
(
location
));
switch
(
location
)
{
case
WINED3D_LOCATION_USER_MEMORY
:
case
WINED3D_LOCATION_SYSMEM
:
case
WINED3D_LOCATION_BUFFER
:
return
surface_load_sysmem
(
surface
,
context
,
location
);
case
WINED3D_LOCATION_DRAWABLE
:
return
surface_load_drawable
(
surface
,
context
);
case
WINED3D_LOCATION_RB_RESOLVED
:
case
WINED3D_LOCATION_RB_MULTISAMPLE
:
return
surface_load_renderbuffer
(
surface
,
context
,
location
);
case
WINED3D_LOCATION_TEXTURE_RGB
:
case
WINED3D_LOCATION_TEXTURE_SRGB
:
return
surface_load_texture
(
surface
,
context
,
location
==
WINED3D_LOCATION_TEXTURE_SRGB
);
default:
ERR
(
"Don't know how to handle location %#x.
\n
"
,
location
);
return
FALSE
;
}
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
static
void
fbo_blitter_destroy
(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_context
*
context
)
static
void
fbo_blitter_destroy
(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_context
*
context
)
{
{
...
...
dlls/wined3d/texture.c
View file @
c1f5b9ac
...
@@ -1788,10 +1788,39 @@ static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int
...
@@ -1788,10 +1788,39 @@ static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int
texture
->
resource
.
format
,
&
src_rect
,
row_pitch
,
&
dst_point
,
FALSE
,
data
);
texture
->
resource
.
format
,
&
src_rect
,
row_pitch
,
&
dst_point
,
FALSE
,
data
);
}
}
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
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
surface_load_location
(
texture
->
sub_resources
[
sub_resource_idx
].
u
.
surface
,
context
,
location
);
struct
wined3d_surface
*
surface
;
TRACE
(
"texture %p, sub_resource_idx %u, context %p, location %s.
\n
"
,
texture
,
sub_resource_idx
,
context
,
wined3d_debug_location
(
location
));
surface
=
texture
->
sub_resources
[
sub_resource_idx
].
u
.
surface
;
switch
(
location
)
{
case
WINED3D_LOCATION_USER_MEMORY
:
case
WINED3D_LOCATION_SYSMEM
:
case
WINED3D_LOCATION_BUFFER
:
return
surface_load_sysmem
(
surface
,
context
,
location
);
case
WINED3D_LOCATION_DRAWABLE
:
return
surface_load_drawable
(
surface
,
context
);
case
WINED3D_LOCATION_RB_RESOLVED
:
case
WINED3D_LOCATION_RB_MULTISAMPLE
:
return
surface_load_renderbuffer
(
surface
,
context
,
location
);
case
WINED3D_LOCATION_TEXTURE_RGB
:
case
WINED3D_LOCATION_TEXTURE_SRGB
:
return
surface_load_texture
(
surface
,
context
,
location
==
WINED3D_LOCATION_TEXTURE_SRGB
);
default:
ERR
(
"Don't know how to handle location %#x.
\n
"
,
location
);
return
FALSE
;
}
}
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
...
...
dlls/wined3d/wined3d_private.h
View file @
c1f5b9ac
...
@@ -3337,10 +3337,16 @@ static inline struct wined3d_texture_sub_resource *surface_get_sub_resource(stru
...
@@ -3337,10 +3337,16 @@ 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
,
HRESULT
wined3d_surface_blt
(
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
DWORD
flags
,
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
;
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
,
void
surface_load_fb_texture
(
struct
wined3d_surface
*
surface
,
BOOL
srgb
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
BOOL
surface_load_location
(
struct
wined3d_surface
*
surface
,
BOOL
surface_load_renderbuffer
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context
,
DWORD
dst_location
)
DECLSPEC_HIDDEN
;
BOOL
surface_load_sysmem
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
DWORD
dst_location
)
DECLSPEC_HIDDEN
;
BOOL
surface_load_texture
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
void
wined3d_surface_upload_data
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
void
wined3d_surface_upload_data
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_format
*
format
,
const
RECT
*
src_rect
,
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_format
*
format
,
const
RECT
*
src_rect
,
unsigned
int
src_pitch
,
const
POINT
*
dst_point
,
BOOL
srgb
,
unsigned
int
src_pitch
,
const
POINT
*
dst_point
,
BOOL
srgb
,
...
...
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