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
b9379fc3
Commit
b9379fc3
authored
Jul 16, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jul 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Allocate render target management members in Init3D.
parent
327aa543
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
device.c
dlls/wined3d/device.c
+12
-4
directx.c
dlls/wined3d/directx.c
+0
-4
No files found.
dlls/wined3d/device.c
View file @
b9379fc3
...
...
@@ -192,10 +192,6 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) {
GL_EXTCALL
(
glDeleteFramebuffersEXT
(
1
,
&
This
->
dst_fbo
));
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
render_targets
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
fbo_color_attachments
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
draw_buffers
);
if
(
This
->
glsl_program_lookup
)
hash_table_destroy
(
This
->
glsl_program_lookup
);
/* TODO: Clean up all the surfaces and textures! */
...
...
@@ -1809,6 +1805,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
if
(
WINED3D_OK
!=
hr
)
return
hr
;
This
->
render_targets
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IWineD3DSurface
*
)
*
GL_LIMITS
(
buffers
));
This
->
fbo_color_attachments
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IWineD3DSurface
*
)
*
GL_LIMITS
(
buffers
));
This
->
draw_buffers
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
GLenum
)
*
GL_LIMITS
(
buffers
));
/* Initialize the texture unit mapping to a 1:1 mapping */
for
(
state
=
0
;
state
<
MAX_COMBINED_SAMPLERS
;
++
state
)
{
if
(
state
<
GL_LIMITS
(
fragment_samplers
))
{
...
...
@@ -2010,6 +2010,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, D3DCB_D
}
}
HeapFree
(
GetProcessHeap
(),
0
,
This
->
render_targets
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
fbo_color_attachments
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
draw_buffers
);
This
->
render_targets
=
NULL
;
This
->
fbo_color_attachments
=
NULL
;
This
->
draw_buffers
=
NULL
;
This
->
d3d_initialized
=
FALSE
;
return
WINED3D_OK
;
}
...
...
dlls/wined3d/directx.c
View file @
b9379fc3
...
...
@@ -2475,10 +2475,6 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
* TODO: move the functionality where it belongs */
select_shader_max_constants
(
object
->
ps_selected_mode
,
object
->
vs_selected_mode
,
&
GLINFO_LOCATION
);
object
->
render_targets
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IWineD3DSurface
*
)
*
GL_LIMITS
(
buffers
));
object
->
fbo_color_attachments
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IWineD3DSurface
*
)
*
GL_LIMITS
(
buffers
));
object
->
draw_buffers
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
GLenum
)
*
GL_LIMITS
(
buffers
));
/* set the state of the device to valid */
object
->
state
=
WINED3D_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