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
a0abc665
Commit
a0abc665
authored
Dec 02, 2020
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Reference the UAV bo in context_load_unordered_access_resources().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
90cdea1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
39 deletions
+38
-39
context.c
dlls/wined3d/context.c
+0
-35
context_gl.c
dlls/wined3d/context_gl.c
+38
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-2
No files found.
dlls/wined3d/context.c
View file @
a0abc665
...
...
@@ -420,38 +420,3 @@ void context_load_shader_resources(struct wined3d_context *context,
}
}
}
void
context_load_unordered_access_resources
(
struct
wined3d_context
*
context
,
const
struct
wined3d_shader
*
shader
,
struct
wined3d_unordered_access_view
*
const
*
views
)
{
struct
wined3d_unordered_access_view
*
view
;
struct
wined3d_texture
*
texture
;
struct
wined3d_buffer
*
buffer
;
unsigned
int
i
;
context
->
uses_uavs
=
0
;
if
(
!
shader
)
return
;
for
(
i
=
0
;
i
<
MAX_UNORDERED_ACCESS_VIEWS
;
++
i
)
{
if
(
!
(
view
=
views
[
i
]))
continue
;
if
(
view
->
resource
->
type
==
WINED3D_RTYPE_BUFFER
)
{
buffer
=
buffer_from_resource
(
view
->
resource
);
wined3d_buffer_load_location
(
buffer
,
context
,
WINED3D_LOCATION_BUFFER
);
wined3d_unordered_access_view_invalidate_location
(
view
,
~
WINED3D_LOCATION_BUFFER
);
}
else
{
texture
=
texture_from_resource
(
view
->
resource
);
wined3d_texture_load
(
texture
,
context
,
FALSE
);
wined3d_unordered_access_view_invalidate_location
(
view
,
~
WINED3D_LOCATION_TEXTURE_RGB
);
}
context
->
uses_uavs
=
1
;
}
}
dlls/wined3d/context_gl.c
View file @
a0abc665
...
...
@@ -3684,6 +3684,42 @@ static void wined3d_context_gl_bind_unordered_access_views(struct wined3d_contex
checkGLcall
(
"Bind unordered access views"
);
}
static
void
context_gl_load_unordered_access_resources
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_shader
*
shader
,
struct
wined3d_unordered_access_view
*
const
*
views
)
{
struct
wined3d_unordered_access_view
*
view
;
struct
wined3d_buffer_gl
*
buffer_gl
;
struct
wined3d_texture
*
texture
;
unsigned
int
i
;
context_gl
->
c
.
uses_uavs
=
0
;
if
(
!
shader
)
return
;
for
(
i
=
0
;
i
<
MAX_UNORDERED_ACCESS_VIEWS
;
++
i
)
{
if
(
!
(
view
=
views
[
i
]))
continue
;
if
(
view
->
resource
->
type
==
WINED3D_RTYPE_BUFFER
)
{
buffer_gl
=
wined3d_buffer_gl
(
buffer_from_resource
(
view
->
resource
));
wined3d_buffer_load_location
(
&
buffer_gl
->
b
,
&
context_gl
->
c
,
WINED3D_LOCATION_BUFFER
);
wined3d_unordered_access_view_invalidate_location
(
view
,
~
WINED3D_LOCATION_BUFFER
);
wined3d_context_gl_reference_bo
(
context_gl
,
&
buffer_gl
->
bo
);
}
else
{
texture
=
texture_from_resource
(
view
->
resource
);
wined3d_texture_load
(
texture
,
&
context_gl
->
c
,
FALSE
);
wined3d_unordered_access_view_invalidate_location
(
view
,
~
WINED3D_LOCATION_TEXTURE_RGB
);
}
context_gl
->
c
.
uses_uavs
=
1
;
}
}
static
void
context_gl_load_stream_output_buffers
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_state
*
state
)
{
...
...
@@ -3733,7 +3769,7 @@ static BOOL context_apply_draw_state(struct wined3d_context *context,
wined3d_context_gl_update_tex_unit_map
(
context_gl
,
state
);
context_preload_textures
(
context
,
state
);
context_load_shader_resources
(
context
,
state
,
~
(
1u
<<
WINED3D_SHADER_TYPE_COMPUTE
));
context_
load_unordered_access_resources
(
context
,
state
->
shader
[
WINED3D_SHADER_TYPE_PIXEL
],
context_
gl_load_unordered_access_resources
(
context_gl
,
state
->
shader
[
WINED3D_SHADER_TYPE_PIXEL
],
state
->
unordered_access_view
[
WINED3D_PIPELINE_GRAPHICS
]);
context_gl_load_stream_output_buffers
(
context_gl
,
state
);
/* TODO: Right now the dependency on the vertex shader is necessary
...
...
@@ -3838,7 +3874,7 @@ static void wined3d_context_gl_apply_compute_state(struct wined3d_context_gl *co
unsigned
int
state_id
,
i
;
context_load_shader_resources
(
&
context_gl
->
c
,
state
,
1u
<<
WINED3D_SHADER_TYPE_COMPUTE
);
context_
load_unordered_access_resources
(
&
context_gl
->
c
,
state
->
shader
[
WINED3D_SHADER_TYPE_COMPUTE
],
context_
gl_load_unordered_access_resources
(
context_gl
,
state
->
shader
[
WINED3D_SHADER_TYPE_COMPUTE
],
state
->
unordered_access_view
[
WINED3D_PIPELINE_COMPUTE
]);
for
(
i
=
0
,
state_id
=
STATE_COMPUTE_OFFSET
;
i
<
ARRAY_SIZE
(
context_gl
->
c
.
dirty_compute_states
);
++
i
)
...
...
dlls/wined3d/wined3d_private.h
View file @
a0abc665
...
...
@@ -2151,8 +2151,6 @@ void wined3d_context_cleanup(struct wined3d_context *context) DECLSPEC_HIDDEN;
void
wined3d_context_init
(
struct
wined3d_context
*
context
,
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
void
context_load_shader_resources
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
unsigned
int
shader_mask
)
DECLSPEC_HIDDEN
;
void
context_load_unordered_access_resources
(
struct
wined3d_context
*
context
,
const
struct
wined3d_shader
*
shader
,
struct
wined3d_unordered_access_view
*
const
*
views
)
DECLSPEC_HIDDEN
;
void
context_preload_textures
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
void
context_update_stream_info
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
)
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