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
6a307598
Commit
6a307598
authored
Apr 10, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Invalidate sub-levels in wined3d_texture_add_dirty_region().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
23103780
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
visual.c
dlls/d3d8/tests/visual.c
+1
-1
visual.c
dlls/d3d9/tests/visual.c
+1
-1
texture.c
dlls/wined3d/texture.c
+10
-7
No files found.
dlls/d3d8/tests/visual.c
View file @
6a307598
...
...
@@ -5518,7 +5518,7 @@ static void add_dirty_rect_test(void)
ok
(
SUCCEEDED
(
hr
),
"Failed to set texture stage state, hr %#x.
\n
"
,
hr
);
add_dirty_rect_test_draw
(
device
);
color
=
getPixelColor
(
device
,
320
,
240
);
todo_wine
ok
(
color_match
(
color
,
0x000000ff
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
ok
(
color_match
(
color
,
0x000000ff
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to present, hr %#x.
\n
"
,
hr
);
...
...
dlls/d3d9/tests/visual.c
View file @
6a307598
...
...
@@ -17618,7 +17618,7 @@ static void add_dirty_rect_test(void)
ok
(
SUCCEEDED
(
hr
),
"Failed to set sampler state, hr %#x.
\n
"
,
hr
);
add_dirty_rect_test_draw
(
device
);
color
=
getPixelColor
(
device
,
320
,
240
);
todo_wine
ok
(
color_match
(
color
,
0x000000ff
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
ok
(
color_match
(
color
,
0x000000ff
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
hr
=
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to present, hr %#x.
\n
"
,
hr
);
dlls/wined3d/texture.c
View file @
6a307598
...
...
@@ -1639,8 +1639,8 @@ static struct wined3d_texture_sub_resource *wined3d_texture_get_sub_resource(str
HRESULT
CDECL
wined3d_texture_add_dirty_region
(
struct
wined3d_texture
*
texture
,
UINT
layer
,
const
struct
wined3d_box
*
dirty_region
)
{
unsigned
int
sub_resource_idx
,
i
;
struct
wined3d_context
*
context
;
unsigned
int
sub_resource_idx
;
TRACE
(
"texture %p, layer %u, dirty_region %s.
\n
"
,
texture
,
layer
,
debug_box
(
dirty_region
));
...
...
@@ -1649,19 +1649,22 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
WARN
(
"Invalid layer %u specified.
\n
"
,
layer
);
return
WINED3DERR_INVALIDCALL
;
}
sub_resource_idx
=
layer
*
texture
->
level_count
;
if
(
dirty_region
)
FIXME
(
"Ignoring dirty_region %s.
\n
"
,
debug_box
(
dirty_region
));
context
=
context_acquire
(
texture
->
resource
.
device
,
NULL
,
0
);
if
(
!
wined3d_texture_load_location
(
texture
,
sub_resource_idx
,
context
,
texture
->
resource
.
map_binding
))
sub_resource_idx
=
layer
*
texture
->
level_count
;
for
(
i
=
0
;
i
<
texture
->
level_count
;
++
i
,
++
sub_resource_idx
)
{
ERR
(
"Failed to load location %s.
\n
"
,
wined3d_debug_location
(
texture
->
resource
.
map_binding
));
context_release
(
context
);
return
E_OUTOFMEMORY
;
if
(
!
wined3d_texture_load_location
(
texture
,
sub_resource_idx
,
context
,
texture
->
resource
.
map_binding
))
{
ERR
(
"Failed to load location %s.
\n
"
,
wined3d_debug_location
(
texture
->
resource
.
map_binding
));
context_release
(
context
);
return
E_OUTOFMEMORY
;
}
wined3d_texture_invalidate_location
(
texture
,
sub_resource_idx
,
~
texture
->
resource
.
map_binding
);
}
wined3d_texture_invalidate_location
(
texture
,
sub_resource_idx
,
~
texture
->
resource
.
map_binding
);
context_release
(
context
);
return
WINED3D_OK
;
...
...
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