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
b47695bf
Commit
b47695bf
authored
Feb 18, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Feb 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Reject unsupported pitches in wined3d_surface_update_desc().
parent
d56c168d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
texture.c
dlls/wined3d/texture.c
+13
-0
No files found.
dlls/wined3d/texture.c
View file @
b47695bf
...
...
@@ -658,6 +658,19 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
return
WINED3DERR_INVALIDCALL
;
}
/* We have no way of supporting a pitch that is not a multiple of the pixel
* byte width short of uploading the texture row-by-row.
* Fortunately that's not an issue since D3D9Ex doesn't allow a custom pitch
* for user-memory textures (it always expects packed data) while DirectDraw
* requires a 4-byte aligned pitch and doesn't support texture formats
* larger than 4 bytes per pixel nor any format using 3 bytes per pixel.
* This check is here to verify that the assumption holds. */
if
(
pitch
%
texture
->
resource
.
format
->
byte_count
)
{
WARN
(
"Pitch unsupported, not a multiple of the texture format byte width.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
surface
=
surface_from_resource
(
texture
->
sub_resources
[
0
]);
if
(
surface
->
resource
.
map_count
||
(
surface
->
flags
&
SFLAG_DCINUSE
))
{
...
...
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