Commit 163ee765 authored by Phil Costin's avatar Phil Costin Committed by Alexandre Julliard

wined3d: Shader caps fix - code relocation.

parent 54e5f9c4
......@@ -1696,6 +1696,16 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D
*pCaps->MaxStreams = MAX_STREAMS;
*pCaps->MaxStreamStride = 1024;
/* Determine shader mode to use based on GL caps */
if (GL_SUPPORT(ARB_SHADING_LANGUAGE_100) && wined3d_settings.glslRequested
&& (wined3d_settings.vs_mode == VS_HW || wined3d_settings.ps_mode == PS_HW))
wined3d_settings.shader_mode = SHADER_GLSL;
else if ((GL_SUPPORT(ARB_VERTEX_PROGRAM) && wined3d_settings.vs_mode == VS_HW) ||
(GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && wined3d_settings.ps_mode == PS_HW))
wined3d_settings.shader_mode = SHADER_ARB;
else
wined3d_settings.shader_mode = SHADER_SW;
if (wined3d_settings.vs_mode == VS_HW && wined3d_settings.shader_mode == SHADER_GLSL
&& DeviceType != WINED3DDEVTYPE_REF) {
*pCaps->VertexShaderVersion = D3DVS_VERSION(3,0);
......@@ -1846,16 +1856,6 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, WINED3
IWineD3DImpl_FillGLCaps(&This->gl_info, IWineD3DImpl_GetAdapterDisplay(iface, Adapter));
LEAVE_GL();
/* Determine shader mode to use based on GL caps */
if (GL_SUPPORT(ARB_SHADING_LANGUAGE_100) && wined3d_settings.glslRequested
&& (wined3d_settings.vs_mode == VS_HW || wined3d_settings.ps_mode == PS_HW))
wined3d_settings.shader_mode = SHADER_GLSL;
else if ((GL_SUPPORT(ARB_VERTEX_PROGRAM) && wined3d_settings.vs_mode == VS_HW) ||
(GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && wined3d_settings.ps_mode == PS_HW))
wined3d_settings.shader_mode = SHADER_ARB;
else
wined3d_settings.shader_mode = SHADER_SW;
/* set the state of the device to valid */
object->state = WINED3D_OK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment