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
0a72acc7
Commit
0a72acc7
authored
Sep 23, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Add a separate function for d3d10_vertex_shader initialization.
parent
462decdf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
20 deletions
+37
-20
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+3
-1
device.c
dlls/d3d10core/device.c
+3
-18
shader.c
dlls/d3d10core/shader.c
+31
-1
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
0a72acc7
...
@@ -132,7 +132,6 @@ HRESULT d3d10_input_layout_init(struct d3d10_input_layout *layout, struct d3d10_
...
@@ -132,7 +132,6 @@ HRESULT d3d10_input_layout_init(struct d3d10_input_layout *layout, struct d3d10_
const
void
*
shader_byte_code
,
SIZE_T
shader_byte_code_length
)
DECLSPEC_HIDDEN
;
const
void
*
shader_byte_code
,
SIZE_T
shader_byte_code_length
)
DECLSPEC_HIDDEN
;
/* ID3D10VertexShader */
/* ID3D10VertexShader */
extern
const
struct
ID3D10VertexShaderVtbl
d3d10_vertex_shader_vtbl
DECLSPEC_HIDDEN
;
struct
d3d10_vertex_shader
struct
d3d10_vertex_shader
{
{
const
struct
ID3D10VertexShaderVtbl
*
vtbl
;
const
struct
ID3D10VertexShaderVtbl
*
vtbl
;
...
@@ -142,6 +141,9 @@ struct d3d10_vertex_shader
...
@@ -142,6 +141,9 @@ struct d3d10_vertex_shader
struct
wined3d_shader_signature
output_signature
;
struct
wined3d_shader_signature
output_signature
;
};
};
HRESULT
d3d10_vertex_shader_init
(
struct
d3d10_vertex_shader
*
shader
,
struct
d3d10_device
*
device
,
const
void
*
byte_code
,
SIZE_T
byte_code_length
)
DECLSPEC_HIDDEN
;
/* ID3D10GeometryShader */
/* ID3D10GeometryShader */
extern
const
struct
ID3D10GeometryShaderVtbl
d3d10_geometry_shader_vtbl
DECLSPEC_HIDDEN
;
extern
const
struct
ID3D10GeometryShaderVtbl
d3d10_geometry_shader_vtbl
DECLSPEC_HIDDEN
;
struct
d3d10_geometry_shader
struct
d3d10_geometry_shader
...
...
dlls/d3d10core/device.c
View file @
0a72acc7
...
@@ -935,7 +935,6 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device *i
...
@@ -935,7 +935,6 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device *i
{
{
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
struct
d3d10_vertex_shader
*
object
;
struct
d3d10_vertex_shader
*
object
;
struct
d3d10_shader_info
shader_info
;
HRESULT
hr
;
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
"
,
...
@@ -948,29 +947,15 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device *i
...
@@ -948,29 +947,15 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device *i
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
object
->
vtbl
=
&
d3d10_vertex_shader_vtbl
;
hr
=
d3d10_vertex_shader_init
(
object
,
This
,
byte_code
,
byte_code_length
);
object
->
refcount
=
1
;
shader_info
.
output_signature
=
&
object
->
output_signature
;
hr
=
shader_extract_from_dxbc
(
byte_code
,
byte_code_length
,
&
shader_info
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
ERR
(
"Failed to extract shader, hr %#x
\n
"
,
hr
);
WARN
(
"Failed to initialize vertex shader, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
hr
=
IWineD3DDevice_CreateVertexShader
(
This
->
wined3d_device
,
shader_info
.
shader_code
,
&
object
->
output_signature
,
&
object
->
wined3d_shader
,
(
IUnknown
*
)
object
);
if
(
FAILED
(
hr
))
{
ERR
(
"CreateVertexShader failed, hr %#x
\n
"
,
hr
);
shader_free_signature
(
&
object
->
output_signature
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
return
hr
;
}
}
TRACE
(
"Created vertex shader %p.
\n
"
,
object
);
*
shader
=
(
ID3D10VertexShader
*
)
object
;
*
shader
=
(
ID3D10VertexShader
*
)
object
;
return
S_OK
;
return
S_OK
;
...
...
dlls/d3d10core/shader.c
View file @
0a72acc7
...
@@ -214,7 +214,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_SetPrivateDataInterface(ID3
...
@@ -214,7 +214,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_SetPrivateDataInterface(ID3
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
const
struct
ID3D10VertexShaderVtbl
d3d10_vertex_shader_vtbl
=
static
const
struct
ID3D10VertexShaderVtbl
d3d10_vertex_shader_vtbl
=
{
{
/* IUnknown methods */
/* IUnknown methods */
d3d10_vertex_shader_QueryInterface
,
d3d10_vertex_shader_QueryInterface
,
...
@@ -227,6 +227,36 @@ const struct ID3D10VertexShaderVtbl d3d10_vertex_shader_vtbl =
...
@@ -227,6 +227,36 @@ const struct ID3D10VertexShaderVtbl d3d10_vertex_shader_vtbl =
d3d10_vertex_shader_SetPrivateDataInterface
,
d3d10_vertex_shader_SetPrivateDataInterface
,
};
};
HRESULT
d3d10_vertex_shader_init
(
struct
d3d10_vertex_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_vertex_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_CreateVertexShader
(
device
->
wined3d_device
,
shader_info
.
shader_code
,
&
shader
->
output_signature
,
&
shader
->
wined3d_shader
,
(
IUnknown
*
)
shader
);
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
;
}
/* IUnknown methods */
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
d3d10_geometry_shader_QueryInterface
(
ID3D10GeometryShader
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d10_geometry_shader_QueryInterface
(
ID3D10GeometryShader
*
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