Lines Matching refs:adapter

346     struct wined3d_adapter *adapter = D3DDevice->adapter;
348 adapter->UsedTextureRam += glram;
349 TRACE("Adjusted gl ram by %ld to %d\n", glram, adapter->UsedTextureRam);
350 return adapter->UsedTextureRam;
354 static void wined3d_adapter_cleanup(struct wined3d_adapter *adapter)
356 HeapFree(GetProcessHeap(), 0, adapter->gl_info.gl_formats);
357 HeapFree(GetProcessHeap(), 0, adapter->cfgs);
2141 static const struct fragment_pipeline *select_fragment_implementation(struct wined3d_adapter *adapter)
2143 const struct wined3d_gl_info *gl_info = &adapter->gl_info;
2156 static const shader_backend_t *select_shader_backend(struct wined3d_adapter *adapter)
2160 select_shader_mode(&adapter->gl_info, &ps_selected_mode, &vs_selected_mode);
2166 static const struct blit_shader *select_blit_implementation(struct wined3d_adapter *adapter)
2168 const struct wined3d_gl_info *gl_info = &adapter->gl_info;
2178 static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter)
2180 struct wined3d_driver_info *driver_info = &adapter->driver_info;
2181 struct wined3d_gl_info *gl_info = &adapter->gl_info;
2645 adapter->fragment_pipe = select_fragment_implementation(adapter);
2646 adapter->shader_backend = select_shader_backend(adapter);
2647 adapter->blitter = select_blit_implementation(adapter);
2649 adapter->fragment_pipe->get_caps(gl_info, &fragment_caps);
2836 /* TODO: Store modes per adapter and read it from the adapter structure */
2882 /* TODO: Store modes per adapter and read it from the adapter structure */
3090 struct wined3d_adapter *adapter;
3099 adapter = &This->adapters[Adapter];
3106 const char *name = adapter->driver_info.name;
3114 const char *description = adapter->driver_info.description;
3136 pIdentifier->driver_version.u.HighPart = adapter->driver_info.version_high;
3137 pIdentifier->driver_version.u.LowPart = adapter->driver_info.version_low;
3138 pIdentifier->vendor_id = adapter->driver_info.vendor;
3139 pIdentifier->device_id = adapter->driver_info.device;
3144 memcpy(&pIdentifier->adapter_luid, &adapter->luid, sizeof(pIdentifier->adapter_luid));
3145 pIdentifier->video_memory = adapter->TextureRam;
3230 const struct wined3d_adapter *adapter;
3247 adapter = &This->adapters[Adapter];
3248 rt_format_desc = getFormatDescEntry(RenderTargetFormat, &adapter->gl_info);
3249 ds_format_desc = getFormatDescEntry(DepthStencilFormat, &adapter->gl_info);
3260 cfgs = adapter->cfgs;
3261 nCfgs = adapter->nCfgs;
3263 if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, &cfgs[it], rt_format_desc))
3265 if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, &cfgs[it], ds_format_desc))
3283 const struct wined3d_adapter *adapter;
3311 adapter = &This->adapters[Adapter];
3312 glDesc = getFormatDescEntry(SurfaceFormat, &adapter->gl_info);
3319 cfgs = adapter->cfgs;
3320 nCfgs = adapter->nCfgs;
3325 if (!IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, &cfgs[i], glDesc))
3346 cfgs = adapter->cfgs;
3347 nCfgs = adapter->nCfgs;
3389 * combination is available on the given adapter. In fullscreen mode microsoft specified
3461 static BOOL CheckBumpMapCapability(struct wined3d_adapter *adapter,
3474 if (adapter->fragment_pipe->color_fixup_supported(format_desc->color_fixup))
3489 static BOOL CheckDepthStencilCapability(struct wined3d_adapter *adapter,
3505 for (it = 0; it < adapter->nCfgs; ++it)
3507 WineD3D_PixelFormat *cfg = &adapter->cfgs[it];
3508 if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info, cfg, display_format_desc))
3510 if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&adapter->gl_info, cfg, ds_format_desc))
3521 static BOOL CheckFilterCapability(struct wined3d_adapter *adapter, const struct wined3d_format_desc *format_desc)
3530 static BOOL CheckRenderTargetCapability(struct wined3d_adapter *adapter,
3536 WineD3D_PixelFormat *cfgs = adapter->cfgs;
3553 for (it = 0; it < adapter->nCfgs; ++it)
3555 if (cfgs[it].windowDrawable && IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&adapter->gl_info,
3573 static BOOL CheckSrgbReadCapability(struct wined3d_adapter *adapter, const struct wined3d_format_desc *format_desc)
3575 const struct wined3d_gl_info *gl_info = &adapter->gl_info;
3606 static BOOL CheckSrgbWriteCapability(struct wined3d_adapter *adapter,
3616 select_shader_mode(&adapter->gl_info, &ps_selected_mode, &vs_selected_mode);
3629 static BOOL CheckPostPixelShaderBlendingCapability(struct wined3d_adapter *adapter,
3638 static BOOL CheckWrapAndMipCapability(struct wined3d_adapter *adapter, const struct wined3d_format_desc *format_desc)
3652 /* Check if a texture format is supported on the given adapter */
3653 static BOOL CheckTextureCapability(struct wined3d_adapter *adapter,
3656 const struct wined3d_gl_info *gl_info = &adapter->gl_info;
3734 if (adapter->shader_backend->shader_color_fixup_supported(format_desc->color_fixup))
3850 if (adapter->shader_backend->shader_color_fixup_supported(format_desc->color_fixup)
3851 && adapter->fragment_pipe->color_fixup_supported(format_desc->color_fixup))
3884 static BOOL CheckSurfaceCapability(struct wined3d_adapter *adapter,
3919 if (CheckTextureCapability(adapter, DeviceType, check_format_desc)) return TRUE;
3921 if (CheckDepthStencilCapability(adapter, adapter_format_desc, check_format_desc)) return TRUE;
3924 if (adapter->blitter->blit_supported(&adapter->gl_info, BLIT_OP_BLIT,
3937 static BOOL CheckVertexTextureCapability(struct wined3d_adapter *adapter,
3940 const struct wined3d_gl_info *gl_info = &adapter->gl_info;
3971 struct wined3d_adapter *adapter = &This->adapters[Adapter];
3972 const struct wined3d_gl_info *gl_info = &adapter->gl_info;
4009 if (CheckTextureCapability(adapter, DeviceType, format_desc))
4027 if(CheckRenderTargetCapability(adapter, adapter_format_desc, format_desc))
4042 if (CheckFilterCapability(adapter, format_desc))
4053 if (CheckPostPixelShaderBlendingCapability(adapter, format_desc))
4064 if (CheckSrgbReadCapability(adapter, format_desc))
4075 if (CheckSrgbWriteCapability(adapter, DeviceType, format_desc))
4086 if (CheckVertexTextureCapability(adapter, format_desc))
4097 if (CheckWrapAndMipCapability(adapter, format_desc))
4120 if (CheckSurfaceCapability(adapter, adapter_format_desc, DeviceType, format_desc, SurfaceType))
4123 if (CheckDepthStencilCapability(adapter, adapter_format_desc, format_desc))
4133 if (CheckRenderTargetCapability(adapter, adapter_format_desc, format_desc))
4144 if (CheckPostPixelShaderBlendingCapability(adapter, format_desc))
4176 if (CheckTextureCapability(adapter, DeviceType, format_desc))
4194 if (CheckRenderTargetCapability(adapter, adapter_format_desc, format_desc))
4209 if (CheckFilterCapability(adapter, format_desc))
4220 if (CheckBumpMapCapability(adapter, DeviceType, format_desc))
4231 if (CheckPostPixelShaderBlendingCapability(adapter, format_desc))
4242 if (CheckSrgbReadCapability(adapter, format_desc))
4253 if (CheckSrgbWriteCapability(adapter, DeviceType, format_desc))
4264 if (CheckVertexTextureCapability(adapter, format_desc))
4275 if (CheckWrapAndMipCapability(adapter, format_desc))
4285 if (CheckDepthStencilCapability(adapter, adapter_format_desc, format_desc))
4316 if (!CheckTextureCapability(adapter, DeviceType, format_desc))
4332 if (CheckFilterCapability(adapter, format_desc))
4343 if (CheckPostPixelShaderBlendingCapability(adapter, format_desc))
4354 if (CheckSrgbReadCapability(adapter, format_desc))
4365 if (CheckSrgbWriteCapability(adapter, DeviceType, format_desc))
4376 if (CheckVertexTextureCapability(adapter, format_desc))
4387 if (CheckWrapAndMipCapability(adapter, format_desc))
4486 struct wined3d_adapter *adapter = &This->adapters[Adapter];
4487 const struct wined3d_gl_info *gl_info = &adapter->gl_info;
4500 select_shader_mode(&adapter->gl_info, &ps_selected_mode, &vs_selected_mode);
4869 adapter->shader_backend->shader_get_caps(&adapter->gl_info, &shader_caps);
4872 adapter->fragment_pipe->get_caps(&adapter->gl_info, &fragment_caps);
4918 pCaps->VS20Caps.NumTemps = max(32, adapter->gl_info.limits.arb_vs_temps);
4922 pCaps->MaxVertexShader30InstructionSlots = max(512, adapter->gl_info.limits.arb_vs_instructions);
4928 pCaps->VS20Caps.NumTemps = max(12, adapter->gl_info.limits.arb_vs_temps);
4954 pCaps->PS20Caps.NumTemps = max(32, adapter->gl_info.limits.arb_ps_temps);
4960 adapter->gl_info.limits.arb_ps_instructions);
4967 pCaps->PS20Caps.NumTemps = max(12, adapter->gl_info.limits.arb_ps_temps);
5062 if (adapter->opengl)
5087 /* Validate the adapter number. If no adapters are available(no GL), ignore the adapter
5088 * number and create a device without a 3D adapter for 2D only operation. */
5415 /* For now only one default adapter */
5417 struct wined3d_adapter *adapter = &This->adapters[0];
5418 const struct wined3d_gl_info *gl_info = &adapter->gl_info;
5427 TRACE("Initializing default adapter\n");
5428 adapter->ordinal = 0;
5429 adapter->monitorPoint.x = -1;
5430 adapter->monitorPoint.y = -1;
5432 if (!AllocateLocallyUniqueId(&adapter->luid))
5435 ERR("Failed to set adapter LUID (%#x).\n", err);
5438 TRACE("Allocated LUID %08x:%08x for adapter.\n",
5439 adapter->luid.HighPart, adapter->luid.LowPart);
5443 ERR("Failed to get a gl context for default adapter\n");
5447 ret = IWineD3DImpl_FillGLCaps(adapter);
5449 ERR("Failed to initialize gl caps for default adapter\n");
5453 ret = initPixelFormats(&adapter->gl_info, adapter->driver_info.vendor);
5464 adapter->TextureRam = wined3d_settings.emulated_textureram;
5466 adapter->TextureRam = adapter->gl_info.vidmem;
5467 adapter->UsedTextureRam = 0;
5468 TRACE("Emulating %dMB of texture ram\n", adapter->TextureRam/(1024*1024));
5474 strcpyW(adapter->DeviceName, DisplayDevice.DeviceName);
5484 GL_EXTCALL(wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, &attribute, &adapter->nCfgs));
5486 adapter->cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, adapter->nCfgs *sizeof(WineD3D_PixelFormat));
5487 cfgs = adapter->cfgs;
5500 for (iPixelFormat=1; iPixelFormat <= adapter->nCfgs; ++iPixelFormat)
5546 adapter->cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nCfgs*sizeof(WineD3D_PixelFormat));
5547 adapter->nCfgs = 0; /* We won't accept all formats e.g. software accelerated ones will be skipped */
5549 cfgs = adapter->cfgs;
5588 adapter->nCfgs++;
5592 if(!adapter->nCfgs)
5597 HeapFree(GetProcessHeap(), 0, adapter->cfgs);
5609 * Mark an adapter with this broken stencil behavior.
5611 adapter->brokenStencil = TRUE;
5612 for (i = 0, cfgs = adapter->cfgs; i < adapter->nCfgs; ++i)
5616 adapter->brokenStencil = FALSE;
5623 select_shader_mode(&adapter->gl_info, &ps_selected_mode, &vs_selected_mode);
5624 fillGLAttribFuncs(&adapter->gl_info);
5625 adapter->opengl = TRUE;
5638 /* Initialize an adapter for ddraw-only memory counting */