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
70fdfdb1
Commit
70fdfdb1
authored
Sep 16, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Sep 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Implement d3d11_device_CreateVertexShader().
parent
32892beb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
18 deletions
+42
-18
d3d11_private.h
dlls/d3d11/d3d11_private.h
+2
-2
device.c
dlls/d3d11/device.c
+17
-15
shader.c
dlls/d3d11/shader.c
+23
-1
No files found.
dlls/d3d11/d3d11_private.h
View file @
70fdfdb1
...
...
@@ -236,8 +236,8 @@ struct d3d_vertex_shader
ID3D11Device
*
device
;
};
HRESULT
d3d_vertex_shader_
init
(
struct
d3d_vertex_shader
*
shader
,
struct
d3d_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
)
DECLSPEC_HIDDEN
;
HRESULT
d3d_vertex_shader_
create
(
struct
d3d_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
,
struct
d3d_vertex_shader
**
shader
)
DECLSPEC_HIDDEN
;
struct
d3d_vertex_shader
*
unsafe_impl_from_ID3D10VertexShader
(
ID3D10VertexShader
*
iface
)
DECLSPEC_HIDDEN
;
/* ID3D10GeometryShader */
...
...
dlls/d3d11/device.c
View file @
70fdfdb1
...
...
@@ -199,10 +199,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateInputLayout(ID3D11Device *if
static
HRESULT
STDMETHODCALLTYPE
d3d11_device_CreateVertexShader
(
ID3D11Device
*
iface
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
,
ID3D11ClassLinkage
*
class_linkage
,
ID3D11VertexShader
**
shader
)
{
FIXME
(
"iface %p, byte_code %p, byte_code_length %lu, class_linkage %p, shader %p stub!
\n
"
,
struct
d3d_device
*
device
=
impl_from_ID3D11Device
(
iface
);
struct
d3d_vertex_shader
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, byte_code %p, byte_code_length %lu, class_linkage %p, shader %p.
\n
"
,
iface
,
byte_code
,
byte_code_length
,
class_linkage
,
shader
);
return
E_NOTIMPL
;
if
(
class_linkage
)
FIXME
(
"Class linkage is not implemented yet.
\n
"
);
if
(
FAILED
(
hr
=
d3d_vertex_shader_create
(
device
,
byte_code
,
byte_code_length
,
&
object
)))
return
hr
;
*
shader
=
&
object
->
ID3D11VertexShader_iface
;
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_device_CreateGeometryShader
(
ID3D11Device
*
iface
,
const
void
*
byte_code
,
...
...
@@ -2237,26 +2249,16 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateInputLayout(ID3D10Device1 *i
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_CreateVertexShader
(
ID3D10Device1
*
iface
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
,
ID3D10VertexShader
**
shader
)
{
struct
d3d_device
*
This
=
impl_from_ID3D10Device
(
iface
);
struct
d3d_device
*
device
=
impl_from_ID3D10Device
(
iface
);
struct
d3d_vertex_shader
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, byte_code %p, byte_code_length %lu, shader %p
\n
"
,
TRACE
(
"iface %p, byte_code %p, byte_code_length %lu, shader %p
.
\n
"
,
iface
,
byte_code
,
byte_code_length
,
shader
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
return
E_OUTOFMEMORY
;
hr
=
d3d_vertex_shader_init
(
object
,
This
,
byte_code
,
byte_code_length
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize vertex shader, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
if
(
FAILED
(
hr
=
d3d_vertex_shader_create
(
device
,
byte_code
,
byte_code_length
,
&
object
)))
return
hr
;
}
TRACE
(
"Created vertex shader %p.
\n
"
,
object
);
*
shader
=
&
object
->
ID3D10VertexShader_iface
;
return
S_OK
;
...
...
dlls/d3d11/shader.c
View file @
70fdfdb1
...
...
@@ -359,7 +359,7 @@ static const struct wined3d_parent_ops d3d_vertex_shader_wined3d_parent_ops =
d3d_vertex_shader_wined3d_object_destroyed
,
};
HRESULT
d3d_vertex_shader_init
(
struct
d3d_vertex_shader
*
shader
,
struct
d3d_device
*
device
,
static
HRESULT
d3d_vertex_shader_init
(
struct
d3d_vertex_shader
*
shader
,
struct
d3d_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
)
{
struct
wined3d_shader_signature
output_signature
;
...
...
@@ -408,6 +408,28 @@ HRESULT d3d_vertex_shader_init(struct d3d_vertex_shader *shader, struct d3d_devi
return
S_OK
;
}
HRESULT
d3d_vertex_shader_create
(
struct
d3d_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
,
struct
d3d_vertex_shader
**
shader
)
{
struct
d3d_vertex_shader
*
object
;
HRESULT
hr
;
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d3d_vertex_shader_init
(
object
,
device
,
byte_code
,
byte_code_length
)))
{
WARN
(
"Failed to initialize vertex shader, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created vertex shader %p.
\n
"
,
object
);
*
shader
=
object
;
return
S_OK
;
}
struct
d3d_vertex_shader
*
unsafe_impl_from_ID3D10VertexShader
(
ID3D10VertexShader
*
iface
)
{
if
(
!
iface
)
...
...
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