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
0c54dfe7
Commit
0c54dfe7
authored
Sep 06, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Getting the current vertex shader should never fail.
parent
992cb88f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
30 deletions
+20
-30
device.c
dlls/d3d8/device.c
+2
-3
device.c
dlls/d3d9/device.c
+7
-15
device.c
dlls/wined3d/device.c
+10
-10
wined3d.idl
include/wine/wined3d.idl
+1
-2
No files found.
dlls/d3d8/device.c
View file @
0c54dfe7
...
...
@@ -1960,7 +1960,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(IDirect3DDevice8 *ifa
static
HRESULT
WINAPI
IDirect3DDevice8Impl_DeleteVertexShader
(
LPDIRECT3DDEVICE8
iface
,
DWORD
pShader
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
IDirect3DVertexShader8Impl
*
shader
;
IWineD3DVertexShader
*
cur
=
NULL
;
IWineD3DVertexShader
*
cur
;
TRACE
(
"iface %p, shader %#x.
\n
"
,
iface
,
pShader
);
...
...
@@ -1974,8 +1974,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE
return
D3DERR_INVALIDCALL
;
}
IWineD3DDevice_GetVertexShader
(
This
->
WineD3DDevice
,
&
cur
);
cur
=
IWineD3DDevice_GetVertexShader
(
This
->
WineD3DDevice
);
if
(
cur
)
{
if
(
cur
==
shader
->
wineD3DVertexShader
)
IDirect3DDevice8_SetVertexShader
(
iface
,
0
);
...
...
dlls/d3d9/device.c
View file @
0c54dfe7
...
...
@@ -2219,34 +2219,26 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(IDirect3DDevice9Ex *i
IDirect3DVertexShader9
**
shader
)
{
IWineD3DVertexShader
*
wined3d_shader
;
HRESULT
hr
;
TRACE
(
"iface %p, shader %p.
\n
"
,
iface
,
shader
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetVertexShader
(((
IDirect3DDevice9Impl
*
)
iface
)
->
WineD3DDevice
,
&
wined3d_shader
);
if
(
SUCCEEDED
(
hr
)
)
wined3d_shader
=
IWineD3DDevice_GetVertexShader
(((
IDirect3DDevice9Impl
*
)
iface
)
->
WineD3DDevice
);
if
(
wined3d_shader
)
{
if
(
wined3d_shader
)
{
*
shader
=
IWineD3DVertexShader_GetParent
(
wined3d_shader
);
IDirect3DVertexShader9_AddRef
(
*
shader
);
IWineD3DVertexShader_Release
(
wined3d_shader
);
}
else
{
*
shader
=
NULL
;
}
*
shader
=
IWineD3DVertexShader_GetParent
(
wined3d_shader
);
IDirect3DVertexShader9_AddRef
(
*
shader
);
IWineD3DVertexShader_Release
(
wined3d_shader
);
}
else
{
WARN
(
"Failed to get vertex shader, hr %#x.
\n
"
,
hr
)
;
*
shader
=
NULL
;
}
wined3d_mutex_unlock
();
TRACE
(
"Returning %p.
\n
"
,
*
shader
);
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DDevice9Impl_SetVertexShaderConstantF
(
IDirect3DDevice9Ex
*
iface
,
...
...
dlls/wined3d/device.c
View file @
0c54dfe7
...
...
@@ -3208,18 +3208,18 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShader(IWineD3DDevice *iface,
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetVertexShader
(
IWineD3DDevice
*
iface
,
IWineD3DVertexShader
**
ppShader
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
static
IWineD3DVertexShader
*
WINAPI
IWineD3DDeviceImpl_GetVertexShader
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DVertexShader
*
shader
;
if
(
NULL
==
ppShader
)
{
return
WINED3DERR_INVALIDCALL
;
}
*
ppShader
=
This
->
stateBlock
->
vertexShader
;
if
(
NULL
!=
*
ppShader
)
IWineD3DVertexShader_AddRef
(
*
ppShader
);
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
*
ppShader
);
return
WINED3D_OK
;
shader
=
device
->
stateBlock
->
vertexShader
;
if
(
shader
)
IWineD3DVertexShader_AddRef
(
shader
);
TRACE
(
"Returning %p.
\n
"
,
shader
);
return
shader
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetVertexShaderConstantB
(
...
...
include/wine/wined3d.idl
View file @
0c54dfe7
...
...
@@ -3221,8 +3221,7 @@ interface IWineD3DDevice : IUnknown
HRESULT
SetVertexShader
(
[
in
]
IWineD3DVertexShader
*
shader
)
;
HRESULT
GetVertexShader
(
[
out
]
IWineD3DVertexShader
**
shader
IWineD3DVertexShader
*
GetVertexShader
(
)
;
HRESULT
SetVertexShaderConstantB
(
[
in
]
UINT
start_register
,
...
...
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