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
07b5c4be
Commit
07b5c4be
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 pixel shader should never fail.
parent
0c54dfe7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
36 deletions
+23
-36
device.c
dlls/d3d8/device.c
+5
-7
device.c
dlls/d3d9/device.c
+7
-15
device.c
dlls/wined3d/device.c
+10
-12
wined3d.idl
include/wine/wined3d.idl
+1
-2
No files found.
dlls/d3d8/device.c
View file @
07b5c4be
...
...
@@ -2242,7 +2242,6 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(IDirect3DDevice8 *ifac
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
IWineD3DPixelShader
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, shader %p.
\n
"
,
iface
,
ppShader
);
...
...
@@ -2252,8 +2251,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(IDirect3DDevice8 *ifac
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetPixelShader
(
This
->
WineD3DDevice
,
&
object
);
if
(
SUCCEEDED
(
hr
)
&&
object
)
object
=
IWineD3DDevice_GetPixelShader
(
This
->
WineD3DDevice
);
if
(
object
)
{
IDirect3DPixelShader8Impl
*
d3d8_shader
;
d3d8_shader
=
IWineD3DPixelShader_GetParent
(
object
);
...
...
@@ -2268,13 +2267,13 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(IDirect3DDevice8 *ifac
TRACE
(
"(%p) : returning %#x
\n
"
,
This
,
*
ppShader
);
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DDevice8Impl_DeletePixelShader
(
LPDIRECT3DDEVICE8
iface
,
DWORD
pShader
)
{
IDirect3DDevice8Impl
*
This
=
(
IDirect3DDevice8Impl
*
)
iface
;
IDirect3DPixelShader8Impl
*
shader
;
IWineD3DPixelShader
*
cur
=
NULL
;
IWineD3DPixelShader
*
cur
;
TRACE
(
"iface %p, shader %#x.
\n
"
,
iface
,
pShader
);
...
...
@@ -2288,8 +2287,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 i
return
D3DERR_INVALIDCALL
;
}
IWineD3DDevice_GetPixelShader
(
This
->
WineD3DDevice
,
&
cur
);
cur
=
IWineD3DDevice_GetPixelShader
(
This
->
WineD3DDevice
);
if
(
cur
)
{
if
(
cur
==
shader
->
wineD3DPixelShader
)
IDirect3DDevice8_SetPixelShader
(
iface
,
0
);
...
...
dlls/d3d9/device.c
View file @
07b5c4be
...
...
@@ -2513,36 +2513,28 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(IDirect3DDevice9Ex *if
IDirect3DPixelShader9
**
shader
)
{
IWineD3DPixelShader
*
wined3d_shader
;
HRESULT
hr
;
TRACE
(
"iface %p, shader %p.
\n
"
,
iface
,
shader
);
if
(
!
shader
)
return
D3DERR_INVALIDCALL
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_GetPixelShader
(((
IDirect3DDevice9Impl
*
)
iface
)
->
WineD3DDevice
,
&
wined3d_shader
);
if
(
SUCCEEDED
(
hr
)
)
wined3d_shader
=
IWineD3DDevice_GetPixelShader
(((
IDirect3DDevice9Impl
*
)
iface
)
->
WineD3DDevice
);
if
(
wined3d_shader
)
{
if
(
wined3d_shader
)
{
*
shader
=
IWineD3DPixelShader_GetParent
(
wined3d_shader
);
IDirect3DPixelShader9_AddRef
(
*
shader
);
IWineD3DPixelShader_Release
(
wined3d_shader
);
}
else
{
*
shader
=
NULL
;
}
*
shader
=
IWineD3DPixelShader_GetParent
(
wined3d_shader
);
IDirect3DPixelShader9_AddRef
(
*
shader
);
IWineD3DPixelShader_Release
(
wined3d_shader
);
}
else
{
WARN
(
"Failed to get pixel shader, hr %#x.
\n
"
,
hr
)
;
*
shader
=
NULL
;
}
wined3d_mutex_unlock
();
TRACE
(
"Returning %p.
\n
"
,
*
shader
);
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DDevice9Impl_SetPixelShaderConstantF
(
IDirect3DDevice9Ex
*
iface
,
...
...
dlls/wined3d/device.c
View file @
07b5c4be
...
...
@@ -3604,20 +3604,18 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShader(IWineD3DDevice *iface, I
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetPixelShader
(
IWineD3DDevice
*
iface
,
IWineD3DPixelShader
**
ppShader
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
static
IWineD3DPixelShader
*
WINAPI
IWineD3DDeviceImpl_GetPixelShader
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DPixelShader
*
shader
;
if
(
NULL
==
ppShader
)
{
WARN
(
"(%p) : PShader is NULL, returning INVALIDCALL
\n
"
,
This
);
return
WINED3DERR_INVALIDCALL
;
}
TRACE
(
"iface %p.
\n
"
,
iface
);
*
ppShader
=
This
->
stateBlock
->
pixelShader
;
if
(
NULL
!=
*
ppShader
)
{
IWineD3DPixelShader_AddRef
(
*
ppShader
);
}
TRACE
(
"(%p) : returning %p
\n
"
,
This
,
*
ppShader
);
return
WINED3D_OK
;
shader
=
device
->
stateBlock
->
pixelShader
;
if
(
shader
)
IWineD3DPixelShader_AddRef
(
shader
);
TRACE
(
"Returning %p.
\n
"
,
shader
);
return
shader
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetPixelShaderConstantB
(
...
...
include/wine/wined3d.idl
View file @
07b5c4be
...
...
@@ -3091,8 +3091,7 @@ interface IWineD3DDevice : IUnknown
HRESULT
SetPixelShader
(
[
in
]
IWineD3DPixelShader
*
shader
)
;
HRESULT
GetPixelShader
(
[
out
]
IWineD3DPixelShader
**
shader
IWineD3DPixelShader
*
GetPixelShader
(
)
;
HRESULT
SetPixelShaderConstantB
(
[
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