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
7da86b43
Commit
7da86b43
authored
Oct 02, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Oct 05, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Implement d3d11_device_CreateGeometryShader().
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
parent
d8f8194b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
17 deletions
+41
-17
d3d11_private.h
dlls/d3d11/d3d11_private.h
+2
-2
device.c
dlls/d3d11/device.c
+16
-14
shader.c
dlls/d3d11/shader.c
+23
-1
No files found.
dlls/d3d11/d3d11_private.h
View file @
7da86b43
...
...
@@ -251,8 +251,8 @@ struct d3d_geometry_shader
struct
wined3d_shader
*
wined3d_shader
;
};
HRESULT
d3d_geometry_shader_
init
(
struct
d3d_geometry_shader
*
shader
,
struct
d3d_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
)
DECLSPEC_HIDDEN
;
HRESULT
d3d_geometry_shader_
create
(
struct
d3d_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
,
struct
d3d_geometry_shader
**
shader
)
DECLSPEC_HIDDEN
;
struct
d3d_geometry_shader
*
unsafe_impl_from_ID3D10GeometryShader
(
ID3D10GeometryShader
*
iface
)
DECLSPEC_HIDDEN
;
/* ID3D11PixelShader, ID3D10PixelShader */
...
...
dlls/d3d11/device.c
View file @
7da86b43
...
...
@@ -215,10 +215,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateVertexShader(ID3D11Device *i
static
HRESULT
STDMETHODCALLTYPE
d3d11_device_CreateGeometryShader
(
ID3D11Device
*
iface
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
,
ID3D11ClassLinkage
*
class_linkage
,
ID3D11GeometryShader
**
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_geometry_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_geometry_shader_create
(
device
,
byte_code
,
byte_code_length
,
&
object
)))
return
hr
;
*
shader
=
&
object
->
ID3D11GeometryShader_iface
;
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_device_CreateGeometryShaderWithStreamOutput
(
ID3D11Device
*
iface
,
...
...
@@ -2309,26 +2321,16 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device1 *
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_CreateGeometryShader
(
ID3D10Device1
*
iface
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
,
ID3D10GeometryShader
**
shader
)
{
struct
d3d_device
*
This
=
impl_from_ID3D10Device
(
iface
);
struct
d3d_device
*
device
=
impl_from_ID3D10Device
(
iface
);
struct
d3d_geometry_shader
*
object
;
HRESULT
hr
;
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_geometry_shader_init
(
object
,
This
,
byte_code
,
byte_code_length
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize geometry shader, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
if
(
FAILED
(
hr
=
d3d_geometry_shader_create
(
device
,
byte_code
,
byte_code_length
,
&
object
)))
return
hr
;
}
TRACE
(
"Created geometry shader %p.
\n
"
,
object
);
*
shader
=
&
object
->
ID3D10GeometryShader_iface
;
return
S_OK
;
...
...
dlls/d3d11/shader.c
View file @
7da86b43
...
...
@@ -654,7 +654,7 @@ static const struct wined3d_parent_ops d3d_geometry_shader_wined3d_parent_ops =
d3d_geometry_shader_wined3d_object_destroyed
,
};
HRESULT
d3d_geometry_shader_init
(
struct
d3d_geometry_shader
*
shader
,
struct
d3d_device
*
device
,
static
HRESULT
d3d_geometry_shader_init
(
struct
d3d_geometry_shader
*
shader
,
struct
d3d_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
)
{
struct
wined3d_shader_signature
output_signature
;
...
...
@@ -700,6 +700,28 @@ HRESULT d3d_geometry_shader_init(struct d3d_geometry_shader *shader, struct d3d_
return
S_OK
;
}
HRESULT
d3d_geometry_shader_create
(
struct
d3d_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
,
struct
d3d_geometry_shader
**
shader
)
{
struct
d3d_geometry_shader
*
object
;
HRESULT
hr
;
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
d3d_geometry_shader_init
(
object
,
device
,
byte_code
,
byte_code_length
)))
{
WARN
(
"Failed to initialize geometry shader, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created geometry shader %p.
\n
"
,
object
);
*
shader
=
object
;
return
S_OK
;
}
struct
d3d_geometry_shader
*
unsafe_impl_from_ID3D10GeometryShader
(
ID3D10GeometryShader
*
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