From 30724a6ec2526abd937546be9d7c9c650ee41e8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20D=C3=B6singer?= Date: Mon, 16 Jul 2007 19:59:41 +0200 Subject: [PATCH] wined3d: Find the shader constant limit at adapter init time. --- dlls/wined3d/directx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index dfe27a91dca..86eb0cc8874 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2471,10 +2471,6 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, object->shader_backend = &none_shader_backend; } - /* This function should *not* be modifying GL caps - * TODO: move the functionality where it belongs */ - select_shader_max_constants(object->ps_selected_mode, object->vs_selected_mode, &GLINFO_LOCATION); - /* set the state of the device to valid */ object->state = WINED3D_OK; @@ -2522,6 +2518,7 @@ ULONG WINAPI D3DCB_DefaultDestroyVolume(IWineD3DVolume *pVolume) { BOOL InitAdapters(void) { HDC device_context; BOOL ret; + int ps_selected_mode, vs_selected_mode; /* No need to hold any lock. The calling library makes sure only one thread calls * wined3d simultaneously @@ -2559,6 +2556,9 @@ BOOL InitAdapters(void) { } Adapters[0].driver = "Display"; Adapters[0].description = "Direct3D HAL"; + + select_shader_mode(&Adapters[0].gl_info, WINED3DDEVTYPE_HAL, &ps_selected_mode, &vs_selected_mode); + select_shader_max_constants(ps_selected_mode, vs_selected_mode, &Adapters[0].gl_info); } numAdapters = 1; TRACE("%d adapters successfully initialized\n", numAdapters); -- 2.11.4.GIT