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
00aa8ab0
Commit
00aa8ab0
authored
Feb 12, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Deleting bound shaders unbinds them.
parent
12252d05
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
device.c
dlls/d3d8/device.c
+17
-4
device.c
dlls/d3d8/tests/device.c
+0
-0
No files found.
dlls/d3d8/device.c
View file @
00aa8ab0
...
...
@@ -1244,11 +1244,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(LPDIRECT3DDEVICE8 ifa
IWineD3DVertexShader_Release
(
pShader
);
*
ppShader
=
(
d3d8_shader
->
handle
-
This
->
shader_handles
)
+
(
VS_HIGHESTFIXEDFXF
+
1
);
}
else
{
WARN
(
"(%p) : The shader has been set to NULL
\n
"
,
This
);
/* TODO: Find out what should be returned, e.g. the FVF */
*
ppShader
=
0
;
hrc
=
D3D
ERR_INVALIDCALL
;
hrc
=
D3D
_OK
;
}
}
else
{
WARN
(
"(%p) : Call to IWineD3DDevice_GetVertexShader failed %u (device %p)
\n
"
,
This
,
hrc
,
This
->
WineD3DDevice
);
...
...
@@ -1267,8 +1264,16 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE
ERR
(
"(%p) : Trying to delete an invalid handle
\n
"
,
This
);
return
D3DERR_INVALIDCALL
;
}
else
{
IWineD3DVertexShader
*
cur
=
NULL
;
shader_handle
*
handle
=
&
This
->
shader_handles
[
pShader
-
(
VS_HIGHESTFIXEDFXF
+
1
)];
IDirect3DVertexShader8Impl
*
shader
=
*
handle
;
IWineD3DDevice_GetVertexShader
(
This
->
WineD3DDevice
,
&
cur
);
if
(
cur
)
{
if
(
cur
==
shader
->
wineD3DVertexShader
)
IDirect3DDevice8_SetVertexShader
(
iface
,
0
);
IWineD3DVertexShader_Release
(
cur
);
}
while
(
IUnknown_Release
((
IUnknown
*
)
shader
));
free_shader_handle
(
This
,
handle
);
}
...
...
@@ -1450,8 +1455,16 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 i
ERR
(
"(%p) : Trying to delete an invalid handle
\n
"
,
This
);
return
D3DERR_INVALIDCALL
;
}
else
{
IWineD3DPixelShader
*
cur
=
NULL
;
shader_handle
*
handle
=
&
This
->
shader_handles
[
pShader
-
(
VS_HIGHESTFIXEDFXF
+
1
)];
IDirect3DPixelShader8Impl
*
shader
=
*
handle
;
IWineD3DDevice_GetPixelShader
(
This
->
WineD3DDevice
,
&
cur
);
if
(
cur
)
{
if
(
cur
==
shader
->
wineD3DPixelShader
)
IDirect3DDevice8_SetPixelShader
(
iface
,
0
);
IWineD3DPixelShader_Release
(
cur
);
}
while
(
IUnknown_Release
((
IUnknown
*
)
shader
));
free_shader_handle
(
This
,
handle
);
}
...
...
dlls/d3d8/tests/device.c
View file @
00aa8ab0
This diff is collapsed.
Click to expand it.
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