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
5b2286a5
Commit
5b2286a5
authored
Nov 26, 2010
by
Rico Schüller
Committed by
Alexandre Julliard
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Add initial reflection parsing.
parent
4ad97d40
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
5 deletions
+53
-5
d3dcompiler_43_main.c
dlls/d3dcompiler_43/d3dcompiler_43_main.c
+16
-4
d3dcompiler_private.h
dlls/d3dcompiler_43/d3dcompiler_private.h
+3
-1
reflection.c
dlls/d3dcompiler_43/reflection.c
+34
-0
No files found.
dlls/d3dcompiler_43/d3dcompiler_43_main.c
View file @
5b2286a5
...
...
@@ -127,8 +127,15 @@ HRESULT WINAPI D3DStripShader(const void *data, SIZE_T data_size, UINT flags, ID
HRESULT
WINAPI
D3DReflect
(
const
void
*
data
,
SIZE_T
data_size
,
REFIID
riid
,
void
**
reflector
)
{
struct
d3dcompiler_shader_reflection
*
object
;
HRESULT
hr
;
FIXME
(
"data %p, data_size %lu, riid %s, blob %p stub!
\n
"
,
data
,
data_size
,
debugstr_guid
(
riid
),
reflector
);
TRACE
(
"data %p, data_size %lu, riid %s, blob %p
\n
"
,
data
,
data_size
,
debugstr_guid
(
riid
),
reflector
);
if
(
!
IsEqualGUID
(
riid
,
&
IID_ID3D11ShaderReflection
))
{
WARN
(
"Wrong riid %s, accept only %s!
\n
"
,
debugstr_guid
(
riid
),
debugstr_guid
(
&
IID_ID3D11ShaderReflection
));
return
E_NOINTERFACE
;
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
...
...
@@ -137,10 +144,15 @@ HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID riid, void
return
E_OUTOFMEMORY
;
}
object
->
vtbl
=
&
d3dcompiler_shader_reflection_vtbl
;
object
->
refcount
=
1
;
hr
=
d3dcompiler_shader_reflection_init
(
object
,
data
,
data_size
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize shader reflection
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
*
reflector
=
(
ID3D11ShaderReflection
*
)
object
;
*
reflector
=
object
;
TRACE
(
"Created ID3D11ShaderReflection %p
\n
"
,
object
);
...
...
dlls/d3dcompiler_43/d3dcompiler_private.h
View file @
5b2286a5
...
...
@@ -58,13 +58,15 @@ HRESULT d3dcompiler_get_blob_part(const void *data, SIZE_T data_size, D3D_BLOB_P
HRESULT
d3dcompiler_strip_shader
(
const
void
*
data
,
SIZE_T
data_size
,
UINT
flags
,
ID3DBlob
**
blob
)
DECLSPEC_HIDDEN
;
/* ID3D11ShaderReflection */
extern
const
struct
ID3D11ShaderReflectionVtbl
d3dcompiler_shader_reflection_vtbl
DECLSPEC_HIDDEN
;
struct
d3dcompiler_shader_reflection
{
const
struct
ID3D11ShaderReflectionVtbl
*
vtbl
;
LONG
refcount
;
};
/* reflection handling */
HRESULT
d3dcompiler_shader_reflection_init
(
struct
d3dcompiler_shader_reflection
*
reflection
,
const
void
*
data
,
SIZE_T
data_size
)
DECLSPEC_HIDDEN
;
/* Shader assembler definitions */
typedef
enum
_shader_type
{
ST_VERTEX
,
...
...
dlls/d3dcompiler_43/reflection.c
View file @
5b2286a5
...
...
@@ -241,3 +241,37 @@ const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtbl =
d3dcompiler_shader_reflection_GetMinFeatureLevel
,
d3dcompiler_shader_reflection_GetThreadGroupSize
,
};
HRESULT
d3dcompiler_shader_reflection_init
(
struct
d3dcompiler_shader_reflection
*
reflection
,
const
void
*
data
,
SIZE_T
data_size
)
{
struct
dxbc
src_dxbc
;
HRESULT
hr
;
unsigned
int
i
;
reflection
->
vtbl
=
&
d3dcompiler_shader_reflection_vtbl
;
reflection
->
refcount
=
1
;
hr
=
dxbc_parse
(
data
,
data_size
,
&
src_dxbc
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to parse reflection
\n
"
);
return
hr
;
}
for
(
i
=
0
;
i
<
src_dxbc
.
count
;
++
i
)
{
struct
dxbc_section
*
section
=
&
src_dxbc
.
sections
[
i
];
switch
(
section
->
tag
)
{
default:
FIXME
(
"Unhandled section %s!
\n
"
,
debugstr_an
((
const
char
*
)
&
section
->
tag
,
4
));
break
;
}
}
dxbc_destroy
(
&
src_dxbc
);
return
hr
;
}
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