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
195d16c8
Commit
195d16c8
authored
Feb 08, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store custom pitches in the texture instead of the surface.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
77088e3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
surface.c
dlls/wined3d/surface.c
+6
-8
texture.c
dlls/wined3d/texture.c
+2
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/surface.c
View file @
195d16c8
...
...
@@ -1897,8 +1897,8 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
TRACE
(
"surface %p.
\n
"
,
surface
);
if
(
surface
->
pitch
)
return
surface
->
pitch
;
if
(
surface
->
container
->
row_
pitch
)
return
surface
->
container
->
row_
pitch
;
alignment
=
surface
->
resource
.
device
->
surface_alignment
;
pitch
=
wined3d_format_calculate_pitch
(
surface
->
resource
.
format
,
surface
->
resource
.
width
);
...
...
@@ -1909,8 +1909,7 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
return
pitch
;
}
HRESULT
wined3d_surface_update_desc
(
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
unsigned
int
pitch
)
HRESULT
wined3d_surface_update_desc
(
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
)
{
struct
wined3d_resource
*
texture_resource
=
&
surface
->
container
->
resource
;
unsigned
int
width
,
height
;
...
...
@@ -1959,20 +1958,19 @@ HRESULT wined3d_surface_update_desc(struct wined3d_surface *surface,
surface
->
resource
.
map_binding
=
WINED3D_LOCATION_USER_MEMORY
;
valid_location
=
WINED3D_LOCATION_USER_MEMORY
;
}
surface
->
pitch
=
pitch
;
surface
->
resource
.
format
=
texture_resource
->
format
;
surface
->
resource
.
multisample_type
=
texture_resource
->
multisample_type
;
surface
->
resource
.
multisample_quality
=
texture_resource
->
multisample_quality
;
if
(
surface
->
pitch
)
if
(
surface
->
container
->
row_
pitch
)
{
surface
->
resource
.
size
=
height
*
surface
->
pitch
;
surface
->
resource
.
size
=
height
*
surface
->
container
->
row_
pitch
;
}
else
{
/* User memory surfaces don't have the regular surface alignment. */
surface
->
resource
.
size
=
wined3d_format_calculate_size
(
texture_resource
->
format
,
1
,
width
,
height
,
1
);
surface
->
pitch
=
wined3d_format_calculate_pitch
(
texture_resource
->
format
,
width
);
surface
->
container
->
row_
pitch
=
wined3d_format_calculate_pitch
(
texture_resource
->
format
,
width
);
}
/* The format might be changed to a format that needs conversion.
...
...
dlls/wined3d/texture.c
View file @
195d16c8
...
...
@@ -645,8 +645,9 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
texture
->
resource
.
height
=
height
;
texture
->
user_memory
=
mem
;
texture
->
row_pitch
=
pitch
;
return
wined3d_surface_update_desc
(
surface
,
gl_info
,
pitch
);
return
wined3d_surface_update_desc
(
surface
,
gl_info
);
}
void
wined3d_texture_prepare_texture
(
struct
wined3d_texture
*
texture
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
...
...
dlls/wined3d/wined3d_private.h
View file @
195d16c8
...
...
@@ -2365,6 +2365,7 @@ struct wined3d_texture
GLenum
target
;
void
*
user_memory
;
unsigned
int
row_pitch
;
/* May only be accessed from the command stream worker thread. */
struct
wined3d_texture_async
...
...
@@ -2492,7 +2493,6 @@ struct wined3d_surface
DWORD
flags
;
UINT
pitch
;
UINT
pow2Width
;
UINT
pow2Height
;
...
...
@@ -2570,7 +2570,7 @@ void surface_set_texture_target(struct wined3d_surface *surface, GLenum target,
void
surface_translate_drawable_coords
(
const
struct
wined3d_surface
*
surface
,
HWND
window
,
RECT
*
rect
)
DECLSPEC_HIDDEN
;
HRESULT
wined3d_surface_unmap
(
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
HRESULT
wined3d_surface_update_desc
(
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
unsigned
int
pitch
)
DECLSPEC_HIDDEN
;
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
HRESULT
surface_upload_from_surface
(
struct
wined3d_surface
*
dst_surface
,
const
POINT
*
dst_point
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
)
DECLSPEC_HIDDEN
;
void
surface_validate_location
(
struct
wined3d_surface
*
surface
,
DWORD
location
)
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