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
9b0adb40
Commit
9b0adb40
authored
Oct 13, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Locking partial blocks is not allowed in DEFAULT pool resources.
parent
f1d98aed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
surface.c
dlls/wined3d/surface.c
+26
-3
No files found.
dlls/wined3d/surface.c
View file @
9b0adb40
...
...
@@ -6,7 +6,7 @@
* Copyright 2002-2003 Raphael Junqueira
* Copyright 2004 Christian Costa
* Copyright 2005 Oliver Stieber
* Copyright 2006-20
08
Stefan Dösinger for CodeWeavers
* Copyright 2006-20
11
Stefan Dösinger for CodeWeavers
* Copyright 2007-2008 Henri Verbeet
* Copyright 2006-2008 Roderick Colenbrander
* Copyright 2009-2011 Henri Verbeet for CodeWeavers
...
...
@@ -3782,6 +3782,8 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
HRESULT
CDECL
wined3d_surface_map
(
struct
wined3d_surface
*
surface
,
WINED3DLOCKED_RECT
*
locked_rect
,
const
RECT
*
rect
,
DWORD
flags
)
{
const
struct
wined3d_format
*
format
=
surface
->
resource
.
format
;
TRACE
(
"surface %p, locked_rect %p, rect %s, flags %#x.
\n
"
,
surface
,
locked_rect
,
wine_dbgstr_rect
(
rect
),
flags
);
...
...
@@ -3790,6 +3792,29 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
WARN
(
"Surface is already mapped.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
if
((
format
->
flags
&
(
WINED3DFMT_FLAG_COMPRESSED
|
WINED3DFMT_FLAG_BROKEN_PITCH
))
==
WINED3DFMT_FLAG_COMPRESSED
&&
rect
&&
(
rect
->
left
||
rect
->
top
||
rect
->
right
!=
surface
->
resource
.
width
||
rect
->
bottom
!=
surface
->
resource
.
height
))
{
UINT
width_mask
=
format
->
block_width
-
1
;
UINT
height_mask
=
format
->
block_height
-
1
;
if
((
rect
->
left
&
width_mask
)
||
(
rect
->
right
&
width_mask
)
||
(
rect
->
top
&
height_mask
)
||
(
rect
->
bottom
&
height_mask
))
{
switch
(
surface
->
resource
.
pool
)
{
case
WINED3DPOOL_DEFAULT
:
WARN
(
"Partial block lock with WINED3DPOOL_DEFAULT
\n
"
);
return
WINED3DERR_INVALIDCALL
;
default:
FIXME
(
"Partial block lock with %s
\n
"
,
debug_d3dpool
(
surface
->
resource
.
pool
));
}
}
}
surface
->
flags
|=
SFLAG_LOCKED
;
if
(
!
(
surface
->
flags
&
SFLAG_LOCKABLE
))
...
...
@@ -3809,8 +3834,6 @@ HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
}
else
{
const
struct
wined3d_format
*
format
=
surface
->
resource
.
format
;
if
((
format
->
flags
&
(
WINED3DFMT_FLAG_COMPRESSED
|
WINED3DFMT_FLAG_BROKEN_PITCH
))
==
WINED3DFMT_FLAG_COMPRESSED
)
{
/* Compressed textures are block based, so calculate the offset of
...
...
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