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
6077c63f
Commit
6077c63f
authored
Dec 13, 2005
by
H. Verbeet
Committed by
Alexandre Julliard
Dec 13, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't change the shader's refcount in SetVertexShader and
SetPixelShader.
parent
ea942e1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
34 deletions
+3
-34
device.c
dlls/wined3d/device.c
+3
-34
No files found.
dlls/wined3d/device.c
View file @
6077c63f
...
...
@@ -3761,7 +3761,6 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetVertexDeclaration(IWineD3DDevice* iface, IW
HRESULT
WINAPI
IWineD3DDeviceImpl_SetVertexShader
(
IWineD3DDevice
*
iface
,
IWineD3DVertexShader
*
pShader
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DVertexShader
*
oldShader
=
This
->
updateStateBlock
->
vertexShader
;
This
->
updateStateBlock
->
vertexShader
=
pShader
;
This
->
updateStateBlock
->
changed
.
vertexShader
=
TRUE
;
...
...
@@ -3772,20 +3771,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShader(IWineD3DDevice *iface, IWineD3
return
D3D_OK
;
}
if
(
pShader
!=
NULL
)
{
IUnknown
*
newVertexShaderParent
;
/* GetParent will add a ref, so leave it hanging until the vertex buffer is cleared */
TRACE
(
"(%p) : setting pShader(%p)
\n
"
,
This
,
pShader
);
IWineD3DVertexShader_GetParent
(
pShader
,
&
newVertexShaderParent
);
}
else
{
TRACE
(
"Clear down the shader
\n
"
);
}
if
(
oldShader
!=
NULL
)
{
IUnknown
*
oldVertexShaderParent
;
IWineD3DVertexShader_GetParent
(
oldShader
,
&
oldVertexShaderParent
);
IUnknown_Release
(
oldVertexShaderParent
);
IUnknown_Release
(
oldVertexShaderParent
);
}
TRACE
(
"(%p) : setting pShader(%p)
\n
"
,
This
,
pShader
);
/**
* TODO: merge HAL shaders context switching from prototype
*/
...
...
@@ -3947,39 +3933,22 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantN(IWineD3DDevice *iface
#undef GET_SHADER_CONSTANT
HRESULT
WINAPI
IWineD3DDeviceImpl_SetPixelShader
(
IWineD3DDevice
*
iface
,
IWineD3DPixelShader
*
pShader
)
{
IUnknown
*
parent
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DPixelShader
*
oldpShader
=
This
->
updateStateBlock
->
pixelShader
;
This
->
updateStateBlock
->
pixelShader
=
pShader
;
This
->
updateStateBlock
->
changed
.
pixelShader
=
TRUE
;
This
->
updateStateBlock
->
set
.
pixelShader
=
TRUE
;
if
(
pShader
==
NULL
)
{
/* clear down the shader */
TRACE
(
"Clear down the shader
\n
"
);
}
/* Handle recording of state blocks */
if
(
This
->
isRecordingState
)
{
TRACE
(
"Recording... not performing anything
\n
"
);
return
D3D_OK
;
}
TRACE
(
"(%p) : setting pShader(%p)
\n
"
,
This
,
pShader
);
/**
* TODO: merge HAL shaders context switching from prototype
*/
/* manage reference counting. */
if
(
pShader
!=
NULL
)
{
IWineD3DPixelShader_GetParent
(
pShader
,
&
parent
);
/* get parent adds a ref for us*/
}
if
(
oldpShader
!=
NULL
)
{
IWineD3DPixelShader_GetParent
(
oldpShader
,
&
parent
);
IUnknown_Release
(
parent
);
/* once for the getparent */
IUnknown_Release
(
parent
);
/* and once for the ref */
}
return
D3D_OK
;
}
...
...
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