Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4d543607
Commit
4d543607
authored
Apr 01, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Apr 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dcompiler: Move D3DCreateBlob() to blob.c.
parent
81f3d68a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
48 deletions
+45
-48
blob.c
dlls/d3dcompiler_43/blob.c
+45
-1
d3dcompiler_43_main.c
dlls/d3dcompiler_43/d3dcompiler_43_main.c
+0
-35
d3dcompiler_private.h
dlls/d3dcompiler_43/d3dcompiler_private.h
+0
-12
No files found.
dlls/d3dcompiler_43/blob.c
View file @
4d543607
...
...
@@ -26,6 +26,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dcompiler
);
struct
d3dcompiler_blob
{
ID3DBlob
ID3DBlob_iface
;
LONG
refcount
;
SIZE_T
size
;
void
*
data
;
};
static
inline
struct
d3dcompiler_blob
*
impl_from_ID3DBlob
(
ID3DBlob
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3dcompiler_blob
,
ID3DBlob_iface
);
...
...
@@ -108,7 +117,7 @@ static const struct ID3D10BlobVtbl d3dcompiler_blob_vtbl =
d3dcompiler_blob_GetBufferSize
,
};
HRESULT
d3dcompiler_blob_init
(
struct
d3dcompiler_blob
*
blob
,
SIZE_T
data_size
)
static
HRESULT
d3dcompiler_blob_init
(
struct
d3dcompiler_blob
*
blob
,
SIZE_T
data_size
)
{
blob
->
ID3DBlob_iface
.
lpVtbl
=
&
d3dcompiler_blob_vtbl
;
blob
->
refcount
=
1
;
...
...
@@ -124,6 +133,41 @@ HRESULT d3dcompiler_blob_init(struct d3dcompiler_blob *blob, SIZE_T data_size)
return
S_OK
;
}
HRESULT
WINAPI
D3DCreateBlob
(
SIZE_T
data_size
,
ID3DBlob
**
blob
)
{
struct
d3dcompiler_blob
*
object
;
HRESULT
hr
;
TRACE
(
"data_size %lu, blob %p
\n
"
,
data_size
,
blob
);
if
(
!
blob
)
{
WARN
(
"Invalid blob specified.
\n
"
);
return
D3DERR_INVALIDCALL
;
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate D3D blob object memory
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
d3dcompiler_blob_init
(
object
,
data_size
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize blob, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
*
blob
=
(
ID3DBlob
*
)
object
;
TRACE
(
"Created ID3DBlob %p
\n
"
,
object
);
return
S_OK
;
}
static
BOOL
check_blob_part
(
DWORD
tag
,
D3D_BLOB_PART
part
)
{
BOOL
add
=
FALSE
;
...
...
dlls/d3dcompiler_43/d3dcompiler_43_main.c
View file @
4d543607
...
...
@@ -46,41 +46,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
return
TRUE
;
}
HRESULT
WINAPI
D3DCreateBlob
(
SIZE_T
data_size
,
ID3DBlob
**
blob
)
{
struct
d3dcompiler_blob
*
object
;
HRESULT
hr
;
TRACE
(
"data_size %lu, blob %p
\n
"
,
data_size
,
blob
);
if
(
!
blob
)
{
WARN
(
"Invalid blob specified.
\n
"
);
return
D3DERR_INVALIDCALL
;
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate D3D blob object memory
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
d3dcompiler_blob_init
(
object
,
data_size
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize blob, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
*
blob
=
(
ID3DBlob
*
)
object
;
TRACE
(
"Created ID3DBlob %p
\n
"
,
object
);
return
S_OK
;
}
HRESULT
WINAPI
D3DGetBlobPart
(
const
void
*
data
,
SIZE_T
data_size
,
D3D_BLOB_PART
part
,
UINT
flags
,
ID3DBlob
**
blob
)
{
TRACE
(
"data %p, data_size %lu, part %s, flags %#x, blob %p
\n
"
,
data
,
...
...
dlls/d3dcompiler_43/d3dcompiler_private.h
View file @
4d543607
...
...
@@ -44,18 +44,6 @@ const char *debug_d3dcompiler_d3d_blob_part(D3D_BLOB_PART part) DECLSPEC_HIDDEN;
const
char
*
debug_d3dcompiler_shader_variable_class
(
D3D_SHADER_VARIABLE_CLASS
c
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dcompiler_shader_variable_type
(
D3D_SHADER_VARIABLE_TYPE
t
)
DECLSPEC_HIDDEN
;
/* ID3DBlob */
struct
d3dcompiler_blob
{
ID3DBlob
ID3DBlob_iface
;
LONG
refcount
;
SIZE_T
size
;
void
*
data
;
};
HRESULT
d3dcompiler_blob_init
(
struct
d3dcompiler_blob
*
blob
,
SIZE_T
data_size
)
DECLSPEC_HIDDEN
;
/* blob handling */
HRESULT
d3dcompiler_get_blob_part
(
const
void
*
data
,
SIZE_T
data_size
,
D3D_BLOB_PART
part
,
UINT
flags
,
ID3DBlob
**
blob
)
DECLSPEC_HIDDEN
;
HRESULT
d3dcompiler_strip_shader
(
const
void
*
data
,
SIZE_T
data_size
,
UINT
flags
,
ID3DBlob
**
blob
)
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