Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
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
Nikolay Sivov
vkd3d
Commits
3e864840
Commit
3e864840
authored
1 month ago
by
Nikolay Sivov
Committed by
Henri Verbeet
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
vkd3d-shader/fx: Read fx_2_0 assignment data outside of its dumping helper.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
fb5d53bf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libs/vkd3d-shader/fx.c
+12
-11
12 additions, 11 deletions
libs/vkd3d-shader/fx.c
with
12 additions
and
11 deletions
libs/vkd3d-shader/fx.c
+
12
−
11
View file @
3e864840
...
...
@@ -3723,24 +3723,22 @@ static void fx_parse_fx_2_annotations(struct fx_parser *parser, uint32_t count)
vkd3d_string_buffer_printf
(
&
parser
->
buffer
,
">"
);
}
static
void
fx_parse_fx_2_assignment
(
struct
fx_parser
*
parser
)
static
void
fx_parse_fx_2_assignment
(
struct
fx_parser
*
parser
,
const
struct
fx_assignment
*
entry
)
{
const
struct
rhs_named_value
*
named_value
=
NULL
;
const
struct
fx_2_state
*
state
=
NULL
;
struct
fx_assignment
entry
;
fx_parser_read_u32s
(
parser
,
&
entry
,
sizeof
(
entry
));
if
(
entry
.
id
<=
ARRAY_SIZE
(
fx_2_states
))
if
(
entry
->
id
<=
ARRAY_SIZE
(
fx_2_states
))
{
state
=
&
fx_2_states
[
entry
.
id
];
state
=
&
fx_2_states
[
entry
->
id
];
vkd3d_string_buffer_printf
(
&
parser
->
buffer
,
"%s"
,
state
->
name
);
if
(
state
->
array_size
>
1
)
vkd3d_string_buffer_printf
(
&
parser
->
buffer
,
"[%u]"
,
entry
.
lhs_index
);
vkd3d_string_buffer_printf
(
&
parser
->
buffer
,
"[%u]"
,
entry
->
lhs_index
);
}
else
{
vkd3d_string_buffer_printf
(
&
parser
->
buffer
,
"<unrecognized state %u>"
,
entry
.
id
);
vkd3d_string_buffer_printf
(
&
parser
->
buffer
,
"<unrecognized state %u>"
,
entry
->
id
);
}
vkd3d_string_buffer_printf
(
&
parser
->
buffer
,
" = "
);
...
...
@@ -3749,7 +3747,7 @@ static void fx_parse_fx_2_assignment(struct fx_parser *parser)
const
struct
rhs_named_value
*
ptr
=
state
->
values
;
uint32_t
value
;
fx_parser_read_unstructured
(
parser
,
&
value
,
entry
.
value
,
sizeof
(
value
));
fx_parser_read_unstructured
(
parser
,
&
value
,
entry
->
value
,
sizeof
(
value
));
while
(
ptr
->
name
)
{
...
...
@@ -3768,11 +3766,11 @@ static void fx_parse_fx_2_assignment(struct fx_parser *parser)
}
else
if
(
state
&&
(
state
->
type
==
FX_UINT
||
state
->
type
==
FX_FLOAT
))
{
uint32_t
offset
=
entry
.
type
;
uint32_t
offset
=
entry
->
type
;
unsigned
int
size
;
size
=
fx_get_fx_2_type_size
(
parser
,
&
offset
);
parse_fx_2_numeric_value
(
parser
,
entry
.
value
,
size
,
entry
.
type
);
parse_fx_2_numeric_value
(
parser
,
entry
->
value
,
size
,
entry
->
type
);
}
else
{
...
...
@@ -3830,8 +3828,11 @@ static void fx_parse_fx_2_technique(struct fx_parser *parser)
parse_fx_start_indent
(
parser
);
for
(
uint32_t
j
=
0
;
j
<
pass
.
assignment_count
;
++
j
)
{
struct
fx_assignment
entry
;
parse_fx_print_indent
(
parser
);
fx_parse_fx_2_assignment
(
parser
);
fx_parser_read_u32s
(
parser
,
&
entry
,
sizeof
(
entry
));
fx_parse_fx_2_assignment
(
parser
,
&
entry
);
}
parse_fx_end_indent
(
parser
);
...
...
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