Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wine
vkd3d
Commits
9c5cb2de
Commit
9c5cb2de
authored
1 year ago
by
Elizabeth Figura
Committed by
Alexandre Julliard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
vkd3d-shader: Factor more code into vkd3d_shader_scan_get_uav_descriptor_info().
parent
8484bd59
No related branches found
No related tags found
1 merge request
!295
vkd3d-shader: Extend vkd3d_shader_scan_descriptor_info, part 1/2.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libs/vkd3d-shader/vkd3d_shader_main.c
+13
-26
13 additions, 26 deletions
libs/vkd3d-shader/vkd3d_shader_main.c
with
13 additions
and
26 deletions
libs/vkd3d-shader/vkd3d_shader_main.c
+
13
−
26
View file @
9c5cb2de
...
...
@@ -703,18 +703,23 @@ static struct vkd3d_shader_cf_info *vkd3d_shader_scan_find_innermost_loop_cf_inf
return
NULL
;
}
static
struct
vkd3d_shader_
descriptor_info
*
vkd3d_shader_scan_get_uav_descriptor_info
(
const
struct
vkd3d_shader_
scan_context
*
context
,
unsigned
int
range_id
)
static
void
vkd3d_shader_
scan_add_uav_flag
(
const
struct
vkd3d_shader_scan_context
*
context
,
const
struct
vkd3d_shader_
register
*
reg
,
uint32_t
flag
)
{
unsigned
int
range_id
=
reg
->
idx
[
0
].
offset
;
unsigned
int
i
;
if
(
!
context
->
scan_descriptor_info
)
return
;
for
(
i
=
0
;
i
<
context
->
uav_range_count
;
++
i
)
{
if
(
context
->
uav_ranges
[
i
].
id
==
range_id
)
return
&
context
->
scan_descriptor_info
->
descriptors
[
context
->
uav_ranges
[
i
].
descriptor_idx
];
{
context
->
scan_descriptor_info
->
descriptors
[
context
->
uav_ranges
[
i
].
descriptor_idx
].
flags
|=
flag
;
break
;
}
}
return
NULL
;
}
static
bool
vkd3d_shader_instruction_is_uav_read
(
const
struct
vkd3d_shader_instruction
*
instruction
)
...
...
@@ -730,13 +735,7 @@ static bool vkd3d_shader_instruction_is_uav_read(const struct vkd3d_shader_instr
static
void
vkd3d_shader_scan_record_uav_read
(
struct
vkd3d_shader_scan_context
*
context
,
const
struct
vkd3d_shader_register
*
reg
)
{
struct
vkd3d_shader_descriptor_info
*
d
;
if
(
!
context
->
scan_descriptor_info
)
return
;
d
=
vkd3d_shader_scan_get_uav_descriptor_info
(
context
,
reg
->
idx
[
0
].
offset
);
d
->
flags
|=
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_READ
;
vkd3d_shader_scan_add_uav_flag
(
context
,
reg
,
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_READ
);
}
static
bool
vkd3d_shader_instruction_is_uav_counter
(
const
struct
vkd3d_shader_instruction
*
instruction
)
...
...
@@ -749,13 +748,7 @@ static bool vkd3d_shader_instruction_is_uav_counter(const struct vkd3d_shader_in
static
void
vkd3d_shader_scan_record_uav_counter
(
struct
vkd3d_shader_scan_context
*
context
,
const
struct
vkd3d_shader_register
*
reg
)
{
struct
vkd3d_shader_descriptor_info
*
d
;
if
(
!
context
->
scan_descriptor_info
)
return
;
d
=
vkd3d_shader_scan_get_uav_descriptor_info
(
context
,
reg
->
idx
[
0
].
offset
);
d
->
flags
|=
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_COUNTER
;
vkd3d_shader_scan_add_uav_flag
(
context
,
reg
,
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_COUNTER
);
}
static
bool
vkd3d_shader_instruction_is_uav_atomic_op
(
const
struct
vkd3d_shader_instruction
*
instruction
)
...
...
@@ -768,13 +761,7 @@ static bool vkd3d_shader_instruction_is_uav_atomic_op(const struct vkd3d_shader_
static
void
vkd3d_shader_scan_record_uav_atomic_op
(
struct
vkd3d_shader_scan_context
*
context
,
const
struct
vkd3d_shader_register
*
reg
)
{
struct
vkd3d_shader_descriptor_info
*
d
;
if
(
!
context
->
scan_descriptor_info
)
return
;
d
=
vkd3d_shader_scan_get_uav_descriptor_info
(
context
,
reg
->
idx
[
0
].
offset
);
d
->
flags
|=
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_ATOMICS
;
vkd3d_shader_scan_add_uav_flag
(
context
,
reg
,
VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_ATOMICS
);
}
static
bool
vkd3d_shader_scan_add_descriptor
(
struct
vkd3d_shader_scan_context
*
context
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment