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
b0693216
Commit
b0693216
authored
Jan 12, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix and unify shader creation error handling.
parent
894edc49
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
device.c
dlls/wined3d/device.c
+17
-12
No files found.
dlls/wined3d/device.c
View file @
b0693216
...
@@ -1890,24 +1890,25 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexShader(IWineD3DDevice *ifac
...
@@ -1890,24 +1890,25 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexShader(IWineD3DDevice *ifac
object
->
lpVtbl
=
&
IWineD3DVertexShader_Vtbl
;
object
->
lpVtbl
=
&
IWineD3DVertexShader_Vtbl
;
object
->
parent
=
parent
;
object
->
parent
=
parent
;
shader_init
(
&
object
->
baseShader
,
iface
,
IWineD3DVertexShaderImpl_shader_ins
);
shader_init
(
&
object
->
baseShader
,
iface
,
IWineD3DVertexShaderImpl_shader_ins
);
list_add_head
(
&
This
->
shaders
,
&
object
->
baseShader
.
shader_list_entry
);
*
ppVertexShader
=
(
IWineD3DVertexShader
*
)
object
;
*
ppVertexShader
=
(
IWineD3DVertexShader
*
)
object
;
TRACE
(
"(%p) : Created
V
ertex shader %p
\n
"
,
This
,
*
ppVertexShader
);
TRACE
(
"(%p) : Created
v
ertex shader %p
\n
"
,
This
,
*
ppVertexShader
);
if
(
vertex_declaration
)
{
if
(
vertex_declaration
)
{
IWineD3DVertexShader_FakeSemantics
(
*
ppVertexShader
,
vertex_declaration
);
IWineD3DVertexShader_FakeSemantics
(
*
ppVertexShader
,
vertex_declaration
);
}
}
hr
=
IWineD3DVertexShader_SetFunction
(
*
ppVertexShader
,
pFunction
);
hr
=
IWineD3DVertexShader_SetFunction
(
*
ppVertexShader
,
pFunction
);
if
(
FAILED
(
hr
))
if
(
WINED3D_OK
!=
hr
)
{
{
FIXME
(
"(%p) : Failed to set the function, returning WINED3DERR_INVALIDCALL
\n
"
,
iface
);
WARN
(
"(%p) : Failed to set function, returning %#x
\n
"
,
iface
,
hr
);
IWineD3DVertexShader_Release
(
*
ppVertexShader
);
IWineD3DVertexShader_Release
(
*
ppVertexShader
);
return
WINED3DERR_INVALIDCALL
;
*
ppVertexShader
=
NULL
;
return
hr
;
}
}
list_add_head
(
&
This
->
shaders
,
&
object
->
baseShader
.
shader_list_entry
);
return
WINED3D_OK
;
return
hr
;
}
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreatePixelShader
(
IWineD3DDevice
*
iface
,
CONST
DWORD
*
pFunction
,
IWineD3DPixelShader
**
ppPixelShader
,
IUnknown
*
parent
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreatePixelShader
(
IWineD3DDevice
*
iface
,
CONST
DWORD
*
pFunction
,
IWineD3DPixelShader
**
ppPixelShader
,
IUnknown
*
parent
)
{
...
@@ -1928,14 +1929,18 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePixelShader(IWineD3DDevice *iface
...
@@ -1928,14 +1929,18 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePixelShader(IWineD3DDevice *iface
object
->
lpVtbl
=
&
IWineD3DPixelShader_Vtbl
;
object
->
lpVtbl
=
&
IWineD3DPixelShader_Vtbl
;
object
->
parent
=
parent
;
object
->
parent
=
parent
;
shader_init
(
&
object
->
baseShader
,
iface
,
IWineD3DPixelShaderImpl_shader_ins
);
shader_init
(
&
object
->
baseShader
,
iface
,
IWineD3DPixelShaderImpl_shader_ins
);
list_add_head
(
&
This
->
shaders
,
&
object
->
baseShader
.
shader_list_entry
);
*
ppPixelShader
=
(
IWineD3DPixelShader
*
)
object
;
*
ppPixelShader
=
(
IWineD3DPixelShader
*
)
object
;
TRACE
(
"(%p) : Created pixel shader %p
\n
"
,
This
,
*
ppPixelShader
);
hr
=
IWineD3DPixelShader_SetFunction
(
*
ppPixelShader
,
pFunction
);
hr
=
IWineD3DPixelShader_SetFunction
(
*
ppPixelShader
,
pFunction
);
if
(
WINED3D_OK
==
hr
)
{
if
(
FAILED
(
hr
))
TRACE
(
"(%p) : Created Pixel shader %p
\n
"
,
This
,
*
ppPixelShader
);
{
list_add_head
(
&
This
->
shaders
,
&
object
->
baseShader
.
shader_list_entry
);
WARN
(
"(%p) : Failed to set function, returning %#x
\n
"
,
iface
,
hr
);
}
else
{
IWineD3DPixelShader_Release
(
*
ppPixelShader
);
WARN
(
"(%p) : Failed to create pixel shader
\n
"
,
This
);
*
ppPixelShader
=
NULL
;
return
hr
;
}
}
return
hr
;
return
hr
;
...
...
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