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
325d415e
Commit
325d415e
authored
Feb 16, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use create_primary_opengl_context() in wined3d_device_init_3d().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e1006611
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
25 deletions
+4
-25
device.c
dlls/wined3d/device.c
+4
-25
No files found.
dlls/wined3d/device.c
View file @
325d415e
...
...
@@ -1013,7 +1013,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
static
const
struct
wined3d_color
black
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
struct
wined3d_swapchain
*
swapchain
=
NULL
;
struct
wined3d_context
*
context
;
DWORD
clear_flags
=
0
;
HRESULT
hr
;
...
...
@@ -1027,18 +1026,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
if
(
!
(
device
->
fb
.
render_targets
=
wined3d_calloc
(
gl_info
->
limits
.
buffers
,
sizeof
(
*
device
->
fb
.
render_targets
))))
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hr
=
device
->
shader_backend
->
shader_alloc_private
(
device
,
device
->
adapter
->
vertex_pipe
,
device
->
adapter
->
fragment_pipe
)))
{
TRACE
(
"Shader private data couldn't be allocated
\n
"
);
goto
err_out
;
}
if
(
FAILED
(
hr
=
device
->
blitter
->
alloc_private
(
device
)))
{
TRACE
(
"Blitter private data couldn't be allocated
\n
"
);
goto
err_out
;
}
/* Setup the implicit swapchain. This also initializes a context. */
TRACE
(
"Creating implicit swapchain
\n
"
);
hr
=
device
->
device_parent
->
ops
->
create_swapchain
(
device
->
device_parent
,
...
...
@@ -1075,19 +1062,15 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
goto
err_out
;
}
device
->
swapchains
[
0
]
=
swapchain
;
device_init_swapchain_state
(
device
,
swapchain
);
context
=
context_acquire
(
device
,
NULL
,
0
);
create_dummy_textures
(
device
,
context
);
create_default_samplers
(
device
,
context
);
if
(
FAILED
(
hr
=
create_primary_opengl_context
(
device
,
swapchain
)))
goto
err_out
;
device_init_swapchain_state
(
device
,
swapchain
);
device
->
contexts
[
0
]
->
last_was_rhw
=
0
;
TRACE
(
"All defaults now set up, leaving 3D init.
\n
"
);
context_release
(
context
);
/* Clear the screen */
if
(
swapchain
->
back_buffers
&&
swapchain
->
back_buffers
[
0
])
clear_flags
|=
WINED3DCLEAR_TARGET
;
...
...
@@ -1103,17 +1086,13 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
return
WINED3D_OK
;
err_out:
HeapFree
(
GetProcessHeap
(),
0
,
device
->
fb
.
render_targets
);
HeapFree
(
GetProcessHeap
(),
0
,
device
->
swapchains
);
device
->
swapchain_count
=
0
;
if
(
device
->
back_buffer_view
)
wined3d_rendertarget_view_decref
(
device
->
back_buffer_view
);
if
(
swapchain
)
wined3d_swapchain_decref
(
swapchain
);
if
(
device
->
blit_priv
)
device
->
blitter
->
free_private
(
device
);
if
(
device
->
shader_priv
)
device
->
shader_backend
->
shader_free_private
(
device
);
HeapFree
(
GetProcessHeap
(),
0
,
device
->
fb
.
render_targets
);
return
hr
;
}
...
...
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