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
93cc58d1
Commit
93cc58d1
authored
Apr 10, 2023
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Implement d3d10_effect_parse() on top of vkd3d_shader_parse_dxbc().
parent
27c4c64c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
15 deletions
+30
-15
effect.c
dlls/d3d10/effect.c
+30
-15
No files found.
dlls/d3d10/effect.c
View file @
93cc58d1
...
...
@@ -19,6 +19,7 @@
*/
#include "d3d10_private.h"
#include <vkd3d_shader.h>
#include <float.h>
#include <stdint.h>
...
...
@@ -4056,28 +4057,42 @@ static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, size_t data_
return
parse_fx10_body
(
e
,
ptr
,
data_size
-
(
ptr
-
data
));
}
static
HRESULT
fx10_chunk_handler
(
const
char
*
data
,
size_t
data_size
,
uint32_t
tag
,
void
*
ctx
)
HRESULT
d3d10_effect_parse
(
struct
d3d10_effect
*
effect
,
const
void
*
data
,
SIZE_T
data_size
)
{
struct
d3d10_effect
*
e
=
ctx
;
TRACE
(
"tag: %s.
\n
"
,
debugstr_an
((
const
char
*
)
&
tag
,
4
));
const
struct
vkd3d_shader_code
dxbc
=
{.
code
=
data
,
.
size
=
data_size
};
const
struct
vkd3d_shader_dxbc_section_desc
*
section
;
struct
vkd3d_shader_dxbc_desc
dxbc_desc
;
HRESULT
hr
=
S_OK
;
unsigned
int
i
;
int
ret
;
TRACE
(
"Chunk size: %#Ix.
\n
"
,
data_size
);
if
((
ret
=
vkd3d_shader_parse_dxbc
(
&
dxbc
,
0
,
&
dxbc_desc
,
NULL
))
<
0
)
{
WARN
(
"Failed to parse DXBC, ret %d.
\n
"
,
ret
);
return
E_FAIL
;
}
switch
(
tag
)
for
(
i
=
0
;
i
<
dxbc_desc
.
section_count
;
++
i
)
{
case
TAG_FX10
:
return
parse_fx10
(
e
,
data
,
data_size
);
section
=
&
dxbc_desc
.
sections
[
i
];
default:
FIXME
(
"Unhandled chunk %s.
\n
"
,
debugstr_an
((
const
char
*
)
&
tag
,
4
));
return
S_OK
;
TRACE
(
"Section %u: tag %s, data {%p, %#Ix}.
\n
"
,
i
,
debugstr_an
((
const
char
*
)
&
section
->
tag
,
4
),
section
->
data
.
code
,
section
->
data
.
size
);
if
(
section
->
tag
!=
TAG_FX10
)
{
FIXME
(
"Unhandled chunk %s.
\n
"
,
debugstr_an
((
const
char
*
)
&
section
->
tag
,
4
));
continue
;
}
if
(
FAILED
(
hr
=
parse_fx10
(
effect
,
section
->
data
.
code
,
section
->
data
.
size
)))
break
;
}
}
HRESULT
d3d10_effect_parse
(
struct
d3d10_effect
*
effect
,
const
void
*
data
,
SIZE_T
data_size
)
{
return
parse_dxbc
(
data
,
data_size
,
fx10_chunk_handler
,
effect
)
;
vkd3d_shader_free_dxbc
(
&
dxbc_desc
);
return
hr
;
}
static
void
d3d10_effect_shader_variable_destroy
(
struct
d3d10_effect_shader_variable
*
s
,
...
...
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