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
28fdebe4
Commit
28fdebe4
authored
Mar 18, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Alloc / free shader private data and blt stuff in Init3D/Uninit3D.
parent
ac57b4e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
device.c
dlls/wined3d/device.c
+13
-2
directx.c
dlls/wined3d/directx.c
+1
-6
No files found.
dlls/wined3d/device.c
View file @
28fdebe4
...
@@ -173,8 +173,6 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
...
@@ -173,8 +173,6 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
GL_EXTCALL
(
glDeleteFramebuffersEXT
(
1
,
&
This
->
dst_fbo
));
GL_EXTCALL
(
glDeleteFramebuffersEXT
(
1
,
&
This
->
dst_fbo
));
}
}
This
->
shader_backend
->
shader_free_private
(
iface
);
if
(
This
->
glsl_program_lookup
)
hash_table_destroy
(
This
->
glsl_program_lookup
);
if
(
This
->
glsl_program_lookup
)
hash_table_destroy
(
This
->
glsl_program_lookup
);
/* TODO: Clean up all the surfaces and textures! */
/* TODO: Clean up all the surfaces and textures! */
...
@@ -2084,6 +2082,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
...
@@ -2084,6 +2082,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
IWineD3DSurface_AddRef
(
This
->
stencilBufferTarget
);
IWineD3DSurface_AddRef
(
This
->
stencilBufferTarget
);
}
}
hr
=
This
->
shader_backend
->
shader_alloc_private
(
iface
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Shader private data couldn't be allocated
\n
"
);
goto
err_out
;
}
/* Set up some starting GL setup */
/* Set up some starting GL setup */
ENTER_GL
();
ENTER_GL
();
...
@@ -2147,6 +2151,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
...
@@ -2147,6 +2151,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
return
WINED3D_OK
;
return
WINED3D_OK
;
err_out:
err_out:
This
->
shader_backend
->
shader_free_private
(
iface
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
render_targets
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
render_targets
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
fbo_color_attachments
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
fbo_color_attachments
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
draw_buffers
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
draw_buffers
);
...
@@ -2212,6 +2217,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, D3DCB_D
...
@@ -2212,6 +2217,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, D3DCB_D
IWineD3DDevice_SetTexture
(
iface
,
WINED3DVERTEXTEXTURESAMPLER0
+
sampler
,
NULL
);
IWineD3DDevice_SetTexture
(
iface
,
WINED3DVERTEXTEXTURESAMPLER0
+
sampler
,
NULL
);
}
}
/* Destroy the depth blt resources, they will be invalid after the reset. Also free shader
* private data, it might contain opengl pointers
*/
This
->
shader_backend
->
shader_destroy_depth_blt
(
iface
);
This
->
shader_backend
->
shader_free_private
(
iface
);
/* Release the update stateblock */
/* Release the update stateblock */
if
(
IWineD3DStateBlock_Release
((
IWineD3DStateBlock
*
)
This
->
updateStateBlock
)
>
0
){
if
(
IWineD3DStateBlock_Release
((
IWineD3DStateBlock
*
)
This
->
updateStateBlock
)
>
0
){
if
(
This
->
updateStateBlock
!=
This
->
stateBlock
)
if
(
This
->
updateStateBlock
!=
This
->
stateBlock
)
...
...
dlls/wined3d/directx.c
View file @
28fdebe4
...
@@ -3213,12 +3213,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
...
@@ -3213,12 +3213,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
object
->
devType
=
DeviceType
;
object
->
devType
=
DeviceType
;
select_shader_mode
(
&
GLINFO_LOCATION
,
DeviceType
,
&
object
->
ps_selected_mode
,
&
object
->
vs_selected_mode
);
select_shader_mode
(
&
GLINFO_LOCATION
,
DeviceType
,
&
object
->
ps_selected_mode
,
&
object
->
vs_selected_mode
);
object
->
shader_backend
=
select_shader_backend
(
Adapter
,
DeviceType
);
if
(
FAILED
(
object
->
shader_backend
->
shader_alloc_private
((
IWineD3DDevice
*
)
object
)))
{
object
->
shader_backend
=
select_shader_backend
(
Adapter
,
DeviceType
);
IWineD3D_Release
(
object
->
wineD3D
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
ppReturnedDeviceInterface
=
NULL
;
return
E_OUTOFMEMORY
;
}
/* Prefer the vtable with functions optimized for single dirtifyable objects if the shader
/* Prefer the vtable with functions optimized for single dirtifyable objects if the shader
* model can deal with that. It is essentially the same, just with adjusted
* model can deal with that. It is essentially the same, just with adjusted
...
...
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