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
e45926d5
Commit
e45926d5
authored
May 06, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't crash during initialization if the adapter doesn't have full GL info.
parent
fb3ee6e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
device.c
dlls/wined3d/device.c
+19
-15
No files found.
dlls/wined3d/device.c
View file @
e45926d5
...
...
@@ -7034,25 +7034,29 @@ HRESULT device_init(IWineD3DDeviceImpl *device, IWineD3DImpl *wined3d,
select_shader_mode
(
&
adapter
->
gl_info
,
&
device
->
ps_selected_mode
,
&
device
->
vs_selected_mode
);
device
->
shader_backend
=
adapter
->
shader_backend
;
device
->
shader_backend
->
shader_get_caps
(
&
adapter
->
gl_info
,
&
shader_caps
);
device
->
d3d_vshader_constantF
=
shader_caps
.
MaxVertexShaderConst
;
device
->
d3d_pshader_constantF
=
shader_caps
.
MaxPixelShaderConst
;
device
->
vs_clipping
=
shader_caps
.
VSClipping
;
if
(
device
->
shader_backend
)
{
device
->
shader_backend
->
shader_get_caps
(
&
adapter
->
gl_info
,
&
shader_caps
);
device
->
d3d_vshader_constantF
=
shader_caps
.
MaxVertexShaderConst
;
device
->
d3d_pshader_constantF
=
shader_caps
.
MaxPixelShaderConst
;
device
->
vs_clipping
=
shader_caps
.
VSClipping
;
}
fragment_pipeline
=
adapter
->
fragment_pipe
;
device
->
frag_pipe
=
fragment_pipeline
;
fragment_pipeline
->
get_caps
(
&
adapter
->
gl_info
,
&
ffp_caps
);
device
->
max_ffp_textures
=
ffp_caps
.
MaxSimultaneousTextures
;
hr
=
compile_state_table
(
device
->
StateTable
,
device
->
multistate_funcs
,
&
adapter
->
gl_info
,
ffp_vertexstate_template
,
fragment_pipeline
,
misc_state_template
);
if
(
FAILED
(
hr
))
if
(
fragment_pipeline
)
{
ERR
(
"Failed to compile state table, hr %#x.
\n
"
,
hr
);
IWineD3D_Release
(
device
->
wined3d
);
return
hr
;
}
fragment_pipeline
->
get_caps
(
&
adapter
->
gl_info
,
&
ffp_caps
);
device
->
max_ffp_textures
=
ffp_caps
.
MaxSimultaneousTextures
;
hr
=
compile_state_table
(
device
->
StateTable
,
device
->
multistate_funcs
,
&
adapter
->
gl_info
,
ffp_vertexstate_template
,
fragment_pipeline
,
misc_state_template
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to compile state table, hr %#x.
\n
"
,
hr
);
IWineD3D_Release
(
device
->
wined3d
);
return
hr
;
}
}
device
->
blitter
=
adapter
->
blitter
;
return
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