Home | History | Annotate | Download | only in egl

Lines Matching full:shader

73 class Shader;
89 SharedPtr<Shader> popShader (int index);
90 const SharedPtr<Shader> getShader (int index) const { return m_shaders[index]; }
91 void addShader (SharedPtr<Shader> shader) { m_shaders.push_back(shader); }
102 std::vector<SharedPtr<Shader> > m_shaders;
124 SharedPtr<Shader> GLES2ResourceManager::popShader (int index)
126 SharedPtr<Shader> shader = m_shaders[index];
130 return shader;
1314 class Shader : public Object
1317 Shader (SharedPtr<tcu::ThreadUtil::Event> event, SharedPtr<FenceSync> sync);
1319 GLuint shader;
1325 Shader::Shader (SharedPtr<tcu::ThreadUtil::Event> event, SharedPtr<FenceSync> sync)
1326 : Object ("Shader", event, sync)
1327 , shader (0)
1337 CreateShader (GLenum type, SharedPtr<Shader>& shader, bool useSync, bool serverSync);
1341 SharedPtr<Shader> m_shader;
1345 CreateShader::CreateShader (GLenum type, SharedPtr<Shader>& shader, bool useSync, bool serverSync)
1349 shader = SharedPtr<Shader>(new Shader(getEvent(), getSync()));
1350 shader->type = type;
1352 m_shader = shader;
1358 GLuint shader = 0;
1361 shader = thread.gl.createShader(m_type);
1363 thread.newMessage() << "End -- " << shader << " = glCreateShader(" << m_type << ")" << tcu::ThreadUtil::Message::End;
1365 m_shader->shader = shader;
1371 DeleteShader (SharedPtr<Shader> shader, bool useSync, bool serverSync);
1375 SharedPtr<Shader> m_shader;
1378 DeleteShader::DeleteShader (SharedPtr<Shader> shader, bool useSync, bool serverSync)
1380 , m_shader (shader)
1388 GLuint shader = m_shader->shader;
1390 thread.newMessage() << "Begin -- glDeleteShader(" << shader << ")" << tcu::ThreadUtil::Message::End;
1391 GLU_CHECK_GLW_CALL(thread.gl, deleteShader(shader));
1394 m_shader->shader = 0;
1400 ShaderSource (SharedPtr<Shader> sharder, const char* source, bool useSync, bool serverSync);
1404 SharedPtr<Shader> m_shader;
1408 ShaderSource::ShaderSource (SharedPtr<Shader> shader, const char* source, bool useSync, bool serverSync)
1410 , m_shader (shader)
1422 thread.newMessage() << "Begin -- glShaderSource(" << m_shader->shader << ", 1, \"" << shaderSource << "\", DE_NULL)" << tcu::ThreadUtil::Message::End;
1423 GLU_CHECK_GLW_CALL(thread.gl, shaderSource(m_shader->shader, 1, &shaderSource, DE_NULL));
1430 ShaderCompile (SharedPtr<Shader> sharder, bool useSync, bool serverSync);
1434 SharedPtr<Shader> m_shader;
1437 ShaderCompile::ShaderCompile (SharedPtr<Shader> shader, bool useSync, bool serverSync)
1439 , m_shader (shader)
1449 thread.newMessage() << "Begin -- glCompileShader(" << m_shader->shader << ")" << tcu::ThreadUtil::Message::End;
1450 GLU_CHECK_GLW_CALL(thread.gl, compileShader(m_shader->shader));
1460 SharedPtr<Shader> vertexShader;
1461 SharedPtr<Shader> fragmentShader;
1541 AttachShader (SharedPtr<Program> sharder, SharedPtr<Shader> shader, bool useSync, bool serverSync);
1546 SharedPtr<Shader> m_shader;
1549 AttachShader::AttachShader (SharedPtr<Program> program, SharedPtr<Shader> shader, bool useSync, bool serverSync)
1552 , m_shader (shader)
1558 m_program->vertexShader = shader;
1560 m_program->fragmentShader = shader;
1569 thread.newMessage() << "Begin -- glAttachShader(" << m_program->program << ", " << m_shader->shader << ")" << tcu::ThreadUtil::Message::End;
1570 GLU_CHECK_GLW_CALL(thread.gl, attachShader(m_program->program, m_shader->shader));
1574 m_program->runtimeVertexShader = m_shader->shader;
1576 m_program->runtimeFragmentShader = m_shader->shader;
1602 m_program->vertexShader = SharedPtr<Shader>();
1607 m_program->fragmentShader = SharedPtr<Shader>();
2360 SharedPtr<GLES2ThreadTest::Shader> shader = m_threads[threadNdx]->context->resourceManager->getShader(shaderNdx);
2362 // Defined shader found
2363 if (shader->isDefined)
2371 // Vertex shader found
2372 if (shader->type == GL_VERTEX_SHADER)
2380 // Fragmet shader found
2381 if (shader->type == GL_FRAGMENT_SHADER)
2422 // Program that can be attached vertex shader
2431 // Program that can be attached fragment shader
2510 // Has shader
2520 // Has shader with defined source
2548 // Has program and shader pair that can be attached
2666 SharedPtr<GLES2ThreadTest::Shader> shader;
2667 m_threads[threadNdx]->addOperation(new GLES2ThreadTest::CreateShader(GL_VERTEX_SHADER, shader, m_config.useFenceSync, m_config.serverSync));
2668 m_threads[threadNdx]->context->resourceManager->addShader(shader);
2674 SharedPtr<GLES2ThreadTest::Shader> shader;
2675 m_threads[threadNdx]->addOperation(new GLES2ThreadTest::CreateShader(GL_FRAGMENT_SHADER, shader, m_config.useFenceSync, m_config.serverSync));
2676 m_threads[threadNdx]->context->resourceManager->addShader(shader);
2701 SharedPtr<GLES2ThreadTest::Shader> shader = m_threads[threadNdx]->context->resourceManager->popShader(destroyableShaderNdx);
2702 m_threads[threadNdx]->addOperation(new GLES2ThreadTest::ShaderSource(shader, (shader->type == GL_VERTEX_SHADER ? vertexShaderSource : fragmentShaderSource), m_config.useFenceSync, m_config.serverSync));
2703 m_threads[threadNdx]->context->resourceManager->addShader(shader);
2709 SharedPtr<GLES2ThreadTest::Shader> shader = m_threads[threadNdx]->context->resourceManager->popShader(definedShaderNdx);
2710 m_threads[threadNdx]->addOperation(new GLES2ThreadTest::ShaderCompile(shader, m_config.useFenceSync, m_config.serverSync));
2711 m_threads[threadNdx]->context->resourceManager->addShader(shader);
2730 SharedPtr<GLES2ThreadTest::Shader> shader = m_threads[threadNdx]->context->resourceManager->popShader(attachShaderNdx);
2732 m_threads[threadNdx]->addOperation(new GLES2ThreadTest::AttachShader(program, shader, m_config.useFenceSync, m_config.serverSync));
2735 m_threads[threadNdx]->context->resourceManager->addShader(shader);
3118 SharedPtr<GLES2ThreadTest::Shader> vertexShader;
3119 SharedPtr<GLES2ThreadTest::Shader> fragmentShader;
3205 SharedPtr<GLES2ThreadTest::Shader> vertexShader;
3206 SharedPtr<GLES2ThreadTest::Shader> fragmentShader;
3309 SharedPtr<GLES2ThreadTest::Shader> vertexShader;
3310 SharedPtr<GLES2ThreadTest::Shader> fragmentShader;
3457 SharedPtr<GLES2ThreadTest::Shader> shader;
3459 m_threads[0]->addOperation(new GLES2ThreadTest::CreateShader(type, shader, m_config.useFenceSync, m_config.serverSync));
3477 m_threads[0]->addOperation(new GLES2ThreadTest::ShaderSource(shader, (type == GL_VERTEX_SHADER ? vertexShaderSource : fragmentShaderSource), m_config.useFenceSync, m_config.serverSync));
3479 m_threads[1]->addOperation(new GLES2ThreadTest::ShaderSource(shader, (type == GL_VERTEX_SHADER ? vertexShaderSource : fragmentShaderSource), m_config.useFenceSync, m_config.serverSync));
3485 m_threads[0]->addOperation(new GLES2ThreadTest::ShaderCompile(shader, m_config.useFenceSync, m_config.serverSync));
3487 m_threads[1]->addOperation(new GLES2ThreadTest::ShaderCompile(shader, m_config.useFenceSync, m_config.serverSync));
3493 m_threads[0]->addOperation(new GLES2ThreadTest::DeleteShader(shader, m_config.useFenceSync, m_config.serverSync));
3495 m_threads[1]->addOperation(new GLES2ThreadTest::DeleteShader(shader, m_config.useFenceSync, m_config.serverSync));
3501 SharedPtr<GLES2ThreadTest::Shader> vertexShader;
3502 SharedPtr<GLES2ThreadTest::Shader> fragmentShader;
3978 TestCaseGroup* shaderTests = new TestCaseGroup(ctx, "shaders", "Shader management tests");
3989 shaderTests->addChild(new GLES2ThreadedSharingTest(ctx, config, "vtx_create_destroy", "Create and delete shader"));
4001 shaderTests->addChild(new GLES2ThreadedSharingTest(ctx, config, "vtx_shadersource", "Create, set source and delete shader"));
4013 shaderTests->addChild(new GLES2ThreadedSharingTest(ctx, config, "vtx_compile", "Create, set source, compile and delete shader"));
4025 shaderTests->addChild(new GLES2ThreadedSharingTest(ctx, config, "frag_create_destroy", "Create and delete shader"));
4037 shaderTests->addChild(new GLES2ThreadedSharingTest(ctx, config, "frag_shadersource", "Create, set source and delete shader"));
4049 shaderTests->addChild(new GLES2ThreadedSharingTest(ctx, config, "frag_compile", "Create, set source, compile and delete shader"));
4521 TestCaseGroup* shaderTests = new TestCaseGroup(ctx, "shaders", "Shader management tests");
4524 TestCaseGroup* createShaderTests = new TestCaseGroup(ctx, "create_destroy", "Shader create and destroy tests");
4557 TestCaseGroup* texImage2DTests = new TestCaseGroup(ctx, "source", "Shader create, destroy and source tests");
4598 TestCaseGroup* texSubImage2DTests = new TestCaseGroup(ctx, "compile", "Shader create, destroy, source and compile tests");