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
ab9e4dd3
Commit
ab9e4dd3
authored
Jul 27, 2023
by
Evan Tang
Committed by
Alexandre Julliard
Sep 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Restart vk render pass on RT clear.
parent
8de2846c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
17 deletions
+16
-17
d3d11.c
dlls/d3d11/tests/d3d11.c
+0
-5
context_vk.c
dlls/wined3d/context_vk.c
+16
-12
No files found.
dlls/d3d11/tests/d3d11.c
View file @
ab9e4dd3
...
...
@@ -35361,7 +35361,6 @@ static void test_clear_during_render(void)
ID3D11DeviceContext_Draw
(
context
,
4
,
0
);
get_texture_readback
(
tex
,
0
,
&
rb
);
color
=
get_readback_color
(
&
rb
,
0
,
0
,
0
);
todo_wine_if
(
damavand
)
ok
(
color
==
0xff0000ff
,
"Got unexpected color 0x%08lx instead of 0xff0000ff.
\n
"
,
color
);
color
=
get_readback_color
(
&
rb
,
1
,
0
,
0
);
ok
(
color
==
0xff000000
,
"Got unexpected color 0x%08lx instead of 0xff000000.
\n
"
,
color
);
...
...
@@ -35384,7 +35383,6 @@ static void test_clear_during_render(void)
ID3D11DeviceContext_Draw
(
context
,
4
,
0
);
get_texture_readback
(
tex
,
0
,
&
rb
);
color
=
get_readback_color
(
&
rb
,
0
,
0
,
0
);
todo_wine_if
(
damavand
)
ok
(
color
==
0xff000000
,
"Got unexpected color 0x%08lx instead of 0xff000000.
\n
"
,
color
);
color
=
get_readback_color
(
&
rb
,
1
,
0
,
0
);
ok
(
color
==
0xff000000
,
"Got unexpected color 0x%08lx instead of 0xff000000.
\n
"
,
color
);
...
...
@@ -35414,10 +35412,8 @@ static void test_clear_during_render(void)
release_resource_readback
(
&
rb
);
get_texture_readback
(
dstex
,
0
,
&
rb
);
depth
=
get_readback_float
(
&
rb
,
0
,
0
);
todo_wine_if
(
damavand
)
ok
(
depth
==
0
.
25
f
,
"Got unexpected depth %.8e instead of 0.25.
\n
"
,
depth
);
depth
=
get_readback_float
(
&
rb
,
1
,
0
);
todo_wine_if
(
damavand
)
ok
(
depth
==
0
.
0
f
,
"Got unexpected depth %.8e instead of 0.0.
\n
"
,
depth
);
release_resource_readback
(
&
rb
);
...
...
@@ -35433,7 +35429,6 @@ static void test_clear_during_render(void)
color
=
get_readback_color
(
&
rb
,
0
,
0
,
0
);
ok
(
color
==
0xff0000ff
,
"Got unexpected color 0x%08lx instead of 0xff0000ff.
\n
"
,
color
);
color
=
get_readback_color
(
&
rb
,
1
,
0
,
0
);
todo_wine_if
(
damavand
)
ok
(
color
==
0xff00ff00
,
"Got unexpected color 0x%08lx instead of 0xff00ff00.
\n
"
,
color
);
release_resource_readback
(
&
rb
);
dlls/wined3d/context_vk.c
View file @
ab9e4dd3
...
...
@@ -3565,6 +3565,20 @@ static void wined3d_context_vk_load_shader_resources(struct wined3d_context_vk *
}
}
static
void
wined3d_context_vk_prepare_used_rtv
(
struct
wined3d_context_vk
*
context_vk
,
struct
wined3d_rendertarget_view
*
rtv
)
{
if
(
wined3d_rendertarget_view_get_locations
(
rtv
)
&
WINED3D_LOCATION_CLEARED
)
{
/* Need to restart render pass or the clear won't happen. */
wined3d_context_vk_end_current_render_pass
(
context_vk
);
wined3d_rendertarget_view_prepare_location
(
rtv
,
&
context_vk
->
c
,
rtv
->
resource
->
draw_binding
);
}
else
{
wined3d_rendertarget_view_load_location
(
rtv
,
&
context_vk
->
c
,
rtv
->
resource
->
draw_binding
);
}
}
VkCommandBuffer
wined3d_context_vk_apply_draw_state
(
struct
wined3d_context_vk
*
context_vk
,
const
struct
wined3d_state
*
state
,
struct
wined3d_buffer_vk
*
indirect_vk
,
bool
indexed
)
{
...
...
@@ -3607,10 +3621,7 @@ VkCommandBuffer wined3d_context_vk_apply_draw_state(struct wined3d_context_vk *c
{
/* We handle clears at the beginning of the render pass, no need for an explicit clear
* first. */
if
(
wined3d_rendertarget_view_get_locations
(
rtv
)
&
WINED3D_LOCATION_CLEARED
)
wined3d_rendertarget_view_prepare_location
(
rtv
,
&
context_vk
->
c
,
rtv
->
resource
->
draw_binding
);
else
wined3d_rendertarget_view_load_location
(
rtv
,
&
context_vk
->
c
,
rtv
->
resource
->
draw_binding
);
wined3d_context_vk_prepare_used_rtv
(
context_vk
,
rtv
);
invalidate_rt
|=
(
1
<<
i
);
}
else
...
...
@@ -3628,16 +3639,9 @@ VkCommandBuffer wined3d_context_vk_apply_draw_state(struct wined3d_context_vk *c
if
((
dsv
=
state
->
fb
.
depth_stencil
))
{
if
(
wined3d_state_uses_depth_buffer
(
state
))
{
if
(
wined3d_rendertarget_view_get_locations
(
dsv
)
&
WINED3D_LOCATION_CLEARED
)
wined3d_rendertarget_view_prepare_location
(
dsv
,
&
context_vk
->
c
,
dsv
->
resource
->
draw_binding
);
else
wined3d_rendertarget_view_load_location
(
dsv
,
&
context_vk
->
c
,
dsv
->
resource
->
draw_binding
);
}
wined3d_context_vk_prepare_used_rtv
(
context_vk
,
dsv
);
else
{
wined3d_rendertarget_view_prepare_location
(
dsv
,
&
context_vk
->
c
,
dsv
->
resource
->
draw_binding
);
}
if
(
!
state
->
depth_stencil_state
||
state
->
depth_stencil_state
->
writes_ds
)
invalidate_ds
=
true
;
...
...
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