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
73c6355d
Commit
73c6355d
authored
Jan 03, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Add a wined3d geoemtry shader to struct d3d10_geometry_shader.
parent
41401fb8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
4 deletions
+43
-4
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+5
-1
device.c
dlls/d3d10core/device.c
+2
-1
shader.c
dlls/d3d10core/shader.c
+36
-2
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
73c6355d
...
...
@@ -168,9 +168,13 @@ struct d3d10_geometry_shader
{
const
struct
ID3D10GeometryShaderVtbl
*
vtbl
;
LONG
refcount
;
IWineD3DGeometryShader
*
wined3d_shader
;
struct
wined3d_shader_signature
output_signature
;
};
HRESULT
d3d10_geometry_shader_init
(
struct
d3d10_geometry_shader
*
shader
);
HRESULT
d3d10_geometry_shader_init
(
struct
d3d10_geometry_shader
*
shader
,
struct
d3d10_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
)
DECLSPEC_HIDDEN
;
/* ID3D10PixelShader */
struct
d3d10_pixel_shader
...
...
dlls/d3d10core/device.c
View file @
73c6355d
...
...
@@ -848,6 +848,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device *i
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_CreateGeometryShader
(
ID3D10Device
*
iface
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
,
ID3D10GeometryShader
**
shader
)
{
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
struct
d3d10_geometry_shader
*
object
;
HRESULT
hr
;
...
...
@@ -861,7 +862,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateGeometryShader(ID3D10Device
return
E_OUTOFMEMORY
;
}
hr
=
d3d10_geometry_shader_init
(
object
);
hr
=
d3d10_geometry_shader_init
(
object
,
This
,
byte_code
,
byte_code_length
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize geometry shader, hr %#x.
\n
"
,
hr
);
...
...
dlls/d3d10core/shader.c
View file @
73c6355d
...
...
@@ -313,7 +313,7 @@ static ULONG STDMETHODCALLTYPE d3d10_geometry_shader_Release(ID3D10GeometryShade
if
(
!
refcount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
IWineD3DGeometryShader_Release
(
This
->
wined3d_shader
);
}
return
refcount
;
...
...
@@ -365,11 +365,45 @@ static const struct ID3D10GeometryShaderVtbl d3d10_geometry_shader_vtbl =
d3d10_geometry_shader_SetPrivateDataInterface
,
};
HRESULT
d3d10_geometry_shader_init
(
struct
d3d10_geometry_shader
*
shader
)
static
void
STDMETHODCALLTYPE
d3d10_geometry_shader_wined3d_object_destroyed
(
void
*
parent
)
{
struct
d3d10_geometry_shader
*
shader
=
parent
;
shader_free_signature
(
&
shader
->
output_signature
);
HeapFree
(
GetProcessHeap
(),
0
,
shader
);
}
static
const
struct
wined3d_parent_ops
d3d10_geometry_shader_wined3d_parent_ops
=
{
d3d10_geometry_shader_wined3d_object_destroyed
,
};
HRESULT
d3d10_geometry_shader_init
(
struct
d3d10_geometry_shader
*
shader
,
struct
d3d10_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
)
{
struct
d3d10_shader_info
shader_info
;
HRESULT
hr
;
shader
->
vtbl
=
&
d3d10_geometry_shader_vtbl
;
shader
->
refcount
=
1
;
shader_info
.
output_signature
=
&
shader
->
output_signature
;
hr
=
shader_extract_from_dxbc
(
byte_code
,
byte_code_length
,
&
shader_info
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to extract shader, hr %#x.
\n
"
,
hr
);
return
hr
;
}
hr
=
IWineD3DDevice_CreateGeometryShader
(
device
->
wined3d_device
,
shader_info
.
shader_code
,
&
shader
->
output_signature
,
&
shader
->
wined3d_shader
,
(
IUnknown
*
)
shader
,
&
d3d10_geometry_shader_wined3d_parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create wined3d vertex shader, hr %#x.
\n
"
,
hr
);
shader_free_signature
(
&
shader
->
output_signature
);
return
hr
;
}
return
S_OK
;
}
...
...
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