Lines Matching defs:context

153 	EGLContext		context;
168 , context (EGL_NO_CONTEXT)
213 SharedPtr<GLES2Context> context;
235 if (runtimeContext->context != EGL_NO_CONTEXT)
238 egl.destroyContext(runtimeContext->display, runtimeContext->context);
239 runtimeContext->context = EGL_NO_CONTEXT;
531 void addContext (SharedPtr<GLES2Context> context) { m_contexts.push_back(context); }
558 SharedPtr<GLES2Context> context = m_contexts[index];
560 return context;
573 CreateContext (EGLDisplay display, EGLConfig config, SharedPtr<GLES2Context> shared, SharedPtr<GLES2Context>& context);
584 CreateContext::CreateContext (EGLDisplay display, EGLConfig config, SharedPtr<GLES2Context> shared, SharedPtr<GLES2Context>& context)
593 context = SharedPtr<GLES2Context>(new GLES2Context(getEvent(), (shared ? shared->resourceManager : SharedPtr<GLES2ResourceManager>(new GLES2ResourceManager))));
594 m_context = context;
614 DE_ASSERT(m_shared->context != EGL_NO_CONTEXT);
618 thread.newMessage() << "Begin -- eglCreateContext(" << m_display << ", " << m_config << ", " << m_shared->context << ", { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE })" << tcu::ThreadUtil::Message::End;
619 m_context->context = thread.egl.createContext(m_display, m_config, m_shared->context, attriblist);
620 thread.newMessage() << "End -- " << m_context->context << " = eglCreateContext()" << tcu::ThreadUtil::Message::End;
625 m_context->context = thread.egl.createContext(m_display, m_config, EGL_NO_CONTEXT, attriblist);
626 thread.newMessage() << "End -- " << m_context->context << " = eglCreateContext()" << tcu::ThreadUtil::Message::End;
629 EGLU_CHECK_MSG(thread.egl, "Failed to create GLES2 context");
630 TCU_CHECK(m_context->context != EGL_NO_CONTEXT);
654 thread.newMessage() << "Begin -- eglDestroyContext(" << m_context->display << ", " << m_context->context << ")" << tcu::ThreadUtil::Message::End;
655 EGLU_CHECK_CALL(thread.egl, destroyContext(m_context->display, m_context->context));
658 m_context->context = EGL_NO_CONTEXT;
664 MakeCurrent (EGLThread& thread, EGLDisplay display, SharedPtr<Surface> surface, SharedPtr<GLES2Context> context);
674 MakeCurrent::MakeCurrent (EGLThread& thread, EGLDisplay display, SharedPtr<Surface> surface, SharedPtr<GLES2Context> context)
678 , m_context (context)
687 if (thread.context)
689 modifyObject(SharedPtr<tcu::ThreadUtil::Object>(thread.context));
698 thread.context = m_context;
712 thread.newMessage() << "Begin -- eglMakeCurrent(" << m_display << ", " << m_surface->surface << ", " << m_surface->surface << ", " << m_context->context << ")" << tcu::ThreadUtil::Message::End;
713 EGLU_CHECK_CALL(thread.egl, makeCurrent(m_display, m_surface->surface, m_surface->surface, m_context->context));
1880 // \note [mika] Unlike eglCreateImageKHR this operation requires current context and uses it for creating EGLImage
1881 // Current context is required to support EGL sync objects in current tests system
1931 thread.newMessage() << "Begin -- eglCreateImageKHR(" << thread.runtimeContext->display << ", " << thread.runtimeContext->context << ", EGL_GL_TEXTURE_2D_KHR, " << m_texture->texture << ", { EGL_GL_TEXTURE_LEVEL_KHR, 0, EGL_NONE })" << tcu::ThreadUtil::Message::End;
1932 m_image->image = thread.egl.createImageKHR(thread.runtimeContext->display, thread.runtimeContext->context, EGL_GL_TEXTURE_2D_KHR, (EGLClientBuffer)(deUintptr)m_texture->texture, attribList);
1944 // \note [mika] Unlike eglDestroyImageKHR this operation requires current context and uses it for creating EGLImage
1945 // Current context is required to support EGL sync objects in current tests system
2071 GLES2SharingRandomTest (EglTestContext& context, const TestConfig& config, const char* name, const char* description);
2113 GLES2SharingRandomTest::GLES2SharingRandomTest (EglTestContext& context, const TestConfig& config, const char* name, const char* description)
2114 : TestCase (context, name, description)
2173 SharedPtr<GLES2ThreadTest::GLES2Context> context;
2175 m_threads[threadNdx]->addOperation(new GLES2ThreadTest::CreateContext(m_eglDisplay, m_eglConfig, shared, context));
2177 resourceManager.addContext(context);
2237 SharedPtr<GLES2ThreadTest::GLES2Context> context = m_threads[threadNdx]->context;
2243 resourceManager.addContext(context);
2323 if (m_threads[threadNdx]->context->resourceManager->getBufferCount() > 0)
2324 destroyableBufferNdx = m_random.getUint32() % m_threads[threadNdx]->context->resourceManager->getBufferCount();
2326 if (m_threads[threadNdx]->context->resourceManager->getTextureCount() > 0)
2327 destroyableTextureNdx = m_random.getUint32() % m_threads[threadNdx]->context->resourceManager->getTextureCount();
2329 if (m_threads[threadNdx]->context->resourceManager->getShaderCount() > 0)
2330 destroyableShaderNdx = m_random.getUint32() % m_threads[threadNdx]->context->resourceManager->getShaderCount();
2332 if (m_threads[threadNdx]->context->resourceManager->getProgramCount() > 0)
2333 destroyableProgramNdx = m_random.getUint32() % m_threads[threadNdx]->context->resourceManager->getProgramCount();
2336 for (int bufferNdx = 0; bufferNdx < m_threads[threadNdx]->context->resourceManager->getBufferCount(); bufferNdx++)
2338 SharedPtr<GLES2ThreadTest::Buffer> buffer = m_threads[threadNdx]->context->resourceManager->getBuffer(bufferNdx);
2350 for (int textureNdx = 0; textureNdx < m_threads[threadNdx]->context->resourceManager->getTextureCount(); textureNdx++)
2352 SharedPtr<GLES2ThreadTest::Texture> texture = m_threads[threadNdx]->context->resourceManager->getTexture(textureNdx);
2373 for (int shaderNdx = 0; shaderNdx < m_threads[threadNdx]->context->resourceManager->getShaderCount(); shaderNdx++)
2375 SharedPtr<GLES2ThreadTest::Shader> shader = m_threads[threadNdx]->context->resourceManager->getShader(shaderNdx);
2406 for (int programNdx = 0; programNdx < m_threads[threadNdx]->context->resourceManager->getProgramCount(); programNdx++)
2408 SharedPtr<GLES2ThreadTest::Program> program = m_threads[threadNdx]->context->resourceManager->getProgram(programNdx);
2471 if (m_threads[threadNdx]->context->resourceManager->getTextureCount() > 0)
2608 m_threads[threadNdx]->context->resourceManager->addBuffer(buffer);
2614 SharedPtr<GLES2ThreadTest::Buffer> buffer = m_threads[threadNdx]->context->resourceManager->popBuffer(destroyableBufferNdx);
2621 SharedPtr<GLES2ThreadTest::Buffer> buffer = m_threads[threadNdx]->context->resourceManager->popBuffer(destroyableBufferNdx);
2623 m_threads[threadNdx]->context->resourceManager->addBuffer(buffer);
2629 SharedPtr<GLES2ThreadTest::Buffer> buffer = m_threads[threadNdx]->context->resourceManager->popBuffer(definedBufferNdx);
2631 m_threads[threadNdx]->context->resourceManager->addBuffer(buffer);
2639 m_threads[threadNdx]->context->resourceManager->addTexture(texture);
2644 m_threads[threadNdx]->addOperation(new GLES2ThreadTest::DeleteTexture(m_threads[threadNdx]->context->resourceManager->popTexture(destroyableTextureNdx), m_config.useFenceSync, m_config.serverSync));
2649 SharedPtr<GLES2ThreadTest::Texture> texture = m_threads[threadNdx]->context->resourceManager->popTexture(destroyableTextureNdx);
2651 m_threads[threadNdx]->context->resourceManager->addTexture(texture);
2657 SharedPtr<GLES2ThreadTest::Texture> texture = m_threads[threadNdx]->context->resourceManager->popTexture(definedTextureNdx);
2659 m_threads[threadNdx]->context->resourceManager->addTexture(texture);
2665 SharedPtr<GLES2ThreadTest::Texture> texture = m_threads[threadNdx]->context->resourceManager->popTexture(destroyableTextureNdx);
2667 m_threads[threadNdx]->context->resourceManager->addTexture(texture);
2673 SharedPtr<GLES2ThreadTest::Texture> texture = m_threads[threadNdx]->context->resourceManager->popTexture(definedTextureNdx);
2675 m_threads[threadNdx]->context->resourceManager->addTexture(texture);
2683 m_threads[threadNdx]->context->resourceManager->addShader(shader);
2691 m_threads[threadNdx]->context->resourceManager->addShader(shader);
2696 m_threads[threadNdx]->addOperation(new GLES2ThreadTest::DeleteShader(m_threads[threadNdx]->context->resourceManager->popShader(destroyableShaderNdx), m_config.useFenceSync, m_config.serverSync));
2716 SharedPtr<GLES2ThreadTest::Shader> shader = m_threads[threadNdx]->context->resourceManager->popShader(destroyableShaderNdx);
2718 m_threads[threadNdx]->context->resourceManager->addShader(shader);
2724 SharedPtr<GLES2ThreadTest::Shader> shader = m_threads[threadNdx]->context->resourceManager->popShader(definedShaderNdx);
2726 m_threads[threadNdx]->context->resourceManager->addShader(shader);
2734 m_threads[threadNdx]->context->resourceManager->addProgram(program);
2739 m_threads[threadNdx]->addOperation(new GLES2ThreadTest::DeleteProgram(m_threads[threadNdx]->context->resourceManager->popProgram(destroyableProgramNdx), m_config.useFenceSync, m_config.serverSync));
2744 SharedPtr<GLES2ThreadTest::Program> program = m_threads[threadNdx]->context->resourceManager->popProgram(attachProgramNdx);
2745 SharedPtr<GLES2ThreadTest::Shader> shader = m_threads[threadNdx]->context->resourceManager->popShader(attachShaderNdx);
2749 m_threads[threadNdx]->context->resourceManager->addProgram(program);
2750 m_threads[threadNdx]->context->resourceManager->addShader(shader);
2756 SharedPtr<GLES2ThreadTest::Program> program = m_threads[threadNdx]->context->resourceManager->popProgram(detachableProgramNdx);
2758 m_threads[threadNdx]->context->resourceManager->addProgram(program);
2764 SharedPtr<GLES2ThreadTest::Program> program = m_threads[threadNdx]->context->resourceManager->popProgram(linkableProgramNdx);
2766 m_threads[threadNdx]->context->resourceManager->addProgram(program);
2773 SharedPtr<GLES2ThreadTest::Texture> texture = m_threads[threadNdx]->context->resourceManager->popTexture(nonSiblingTextureNdx);
2776 m_threads[threadNdx]->context->resourceManager->addTexture(texture);
2792 SharedPtr<GLES2ThreadTest::Texture> texture = m_threads[threadNdx]->context->resourceManager->popTexture(destroyableTextureNdx);
2795 m_threads[threadNdx]->context->resourceManager->addTexture(texture);
2972 GLES2ThreadedSharingTest (EglTestContext& context, const TestConfig& config, const char* name, const char* description);
3005 GLES2ThreadedSharingTest::GLES2ThreadedSharingTest (EglTestContext& context, const TestConfig& config, const char* name, const char* description)
3006 : TestCase (context, name, description)
3121 // Destory context