Lines Matching refs:pContext

212     struct wined3d_context *pContext;
215 pContext = (struct wined3d_context *)RTMemAllocZ(sizeof(struct wined3d_context));
216 AssertReturn(pContext, VERR_NO_MEMORY);
217 pContext->pDeviceContext = (IWineD3DDeviceImpl *)RTMemAllocZ(sizeof(IWineD3DDeviceImpl));
218 AssertReturn(pContext->pDeviceContext, VERR_NO_MEMORY);
220 pContext->gl_info = &g_adapter.gl_info;
222 pContext->pDeviceContext->adapter = &g_adapter;
223 pContext->pDeviceContext->shader_backend = &glsl_shader_backend;
224 pContext->pDeviceContext->ps_selected_mode = SHADER_GLSL;
225 pContext->pDeviceContext->vs_selected_mode = SHADER_GLSL;
226 pContext->render_offscreen = false;
228 list_init(&pContext->pDeviceContext->shaders);
236 hr = pContext->pDeviceContext->shader_backend->shader_alloc_private((IWineD3DDevice *)pContext->pDeviceContext);
240 pContext->pDeviceContext->shader_backend->shader_get_caps(&g_adapter.gl_info, &shader_caps);
241 pContext->pDeviceContext->d3d_vshader_constantF = shader_caps.MaxVertexShaderConst;
242 pContext->pDeviceContext->d3d_pshader_constantF = shader_caps.MaxPixelShaderConst;
243 pContext->pDeviceContext->vs_clipping = shader_caps.VSClipping;
245 pContext->pDeviceContext->stateBlock = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pContext->pDeviceContext->stateBlock));
246 AssertReturn(pContext->pDeviceContext->stateBlock, VERR_NO_MEMORY);
247 hr = stateblock_init(pContext->pDeviceContext->stateBlock, pContext->pDeviceContext, 0);
249 pContext->pDeviceContext->updateStateBlock = pContext->pDeviceContext->stateBlock;
251 pContext->pDeviceContext->stateBlock->vertexDecl = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DVertexDeclarationImpl));
252 AssertReturn(pContext->pDeviceContext->stateBlock->vertexDecl, VERR_NO_MEMORY);
257 if (state < pContext->gl_info->limits.fragment_samplers)
259 pContext->pDeviceContext->texUnitMap[state] = state;
260 pContext->pDeviceContext->rev_tex_unit_map[state] = state;
262 pContext->pDeviceContext->texUnitMap[state] = WINED3D_UNMAPPED_STAGE;
263 pContext->pDeviceContext->rev_tex_unit_map[state] = WINED3D_UNMAPPED_STAGE;
268 *ppShaderContext = (void *)pContext;
274 struct wined3d_context *pContext = (struct wined3d_context *)pShaderContext;
276 if (pContext->pDeviceContext)
278 IWineD3DStateBlockImpl *This = pContext->pDeviceContext->stateBlock;
281 if (pContext->pDeviceContext->shader_priv)
282 pContext->pDeviceContext->shader_backend->shader_free_private((IWineD3DDevice *)pContext->pDeviceContext);
303 RTMemFree(pContext->pDeviceContext);