Lines Matching full:program
37 // program.
46 GLuint program = glCreateProgram(); in TEST_P() local
47 glAttachShader(program, vs); in TEST_P()
48 glAttachShader(program, fs); in TEST_P()
50 glLinkProgram(program); in TEST_P()
51 glUseProgram(program); in TEST_P()
52 glLinkProgram(program); in TEST_P()
56 // When a program link or relink fails, if you try to install the unsuccessfully
57 // linked program (via UseProgram) and start rendering or dispatch compute,
59 // The result depends on the previous state: Whether a valid program is
61 // If a program successfully relinks when it is in use, the program might
62 // change from a rendering program to a compute program in theory,
65 // When program link fails and no valid rendering program is installed in the GL
70 GLuint program = glCreateProgram(); in TEST_P() local
72 glLinkProgram(program); in TEST_P()
74 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
77 glUseProgram(program); in TEST_P()
84 // When program link or relink fails and a valid rendering program is installed
85 // in the GL state before the link, using the failed program via UseProgram
90 // Install a render program in current GL state via UseProgram, then render. in TEST_P()
95 GLuint program = glCreateProgram(); in TEST_P() local
103 glAttachShader(program, vs); in TEST_P()
106 glAttachShader(program, fs); in TEST_P()
109 glLinkProgram(program); in TEST_P()
112 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
117 glUseProgram(program); in TEST_P()
125 // Link failure, and a valid program has been installed in the GL state. in TEST_P()
139 // Using the unsuccessfully linked program should report an error. in TEST_P()
143 // Using the unsuccessfully linked program, that program should not in TEST_P()
144 // replace the program binary residing in the GL state. It will not make in TEST_P()
145 // the installed program invalid either, like what UseProgram(0) can do. in TEST_P()
153 // We try to relink the installed program, but make it fail. in TEST_P()
156 glDetachShader(program, vs); in TEST_P()
157 glLinkProgram(program); in TEST_P()
158 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
169 // Using the unsuccessfully relinked program should report an error. in TEST_P()
170 glUseProgram(program); in TEST_P()
173 // Using the unsuccessfully relinked program, that program should not in TEST_P()
174 // replace the program binary residing in the GL state. It will not make in TEST_P()
175 // the installed program invalid either, like what UseProgram(0) can do. in TEST_P()
201 ANGLE_GL_PROGRAM(program, essl1_shaders::vs::Simple(), kFS); in TEST_P()
202 glUseProgram(program); in TEST_P()
204 drawQuad(program, essl1_shaders::PositionAttrib(), 0.5f, 1.0f, true); in TEST_P()
208 GLint loc = glGetUniformLocation(program, "u_uniform"); in TEST_P()
212 drawQuad(program, essl1_shaders::PositionAttrib(), 0.5f, 1.0f, true); in TEST_P()
216 glLinkProgram(program); in TEST_P()
219 drawQuad(program, essl1_shaders::PositionAttrib(), 0.5f, 1.0f, true); in TEST_P()
224 // When program link fails and no valid compute program is installed in the GL
230 GLuint program = glCreateProgram(); in TEST_P() local
232 glLinkProgram(program); in TEST_P()
234 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
237 glUseProgram(program); in TEST_P()
244 // When program link or relink fails and a valid compute program is installed in
245 // the GL state before the link, using the failed program via UseProgram should
249 // Install a compute program in the GL state via UseProgram, then dispatch in TEST_P()
258 GLuint program = glCreateProgram(); in TEST_P() local
263 glAttachShader(program, cs); in TEST_P()
266 glLinkProgram(program); in TEST_P()
268 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
273 glUseProgram(program); in TEST_P()
281 // Link failure, and a valid program has been installed in the GL state. in TEST_P()
295 // Using the unsuccessfully linked program should report an error. in TEST_P()
299 // Using the unsuccessfully linked program, that program should not in TEST_P()
300 // replace the program binary residing in the GL state. It will not make in TEST_P()
301 // the installed program invalid either, like what UseProgram(0) can do. in TEST_P()
309 // We try to relink the installed program, but make it fail. in TEST_P()
312 glDetachShader(program, cs); in TEST_P()
313 glLinkProgram(program); in TEST_P()
314 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
325 // Using the unsuccessfully relinked program should report an error. in TEST_P()
326 glUseProgram(program); in TEST_P()
329 // Using the unsuccessfully relinked program, that program should not in TEST_P()
330 // replace the program binary residing in the GL state. It will not make in TEST_P()
331 // the installed program invalid either, like what UseProgram(0) can do. in TEST_P()
340 // If you compile and link a compute program successfully and use the program,
342 // If you relink the compute program to a rendering program when it is in use,
352 GLuint program = glCreateProgram(); in TEST_P() local
357 glAttachShader(program, cs); in TEST_P()
360 glLinkProgram(program); in TEST_P()
361 glDetachShader(program, cs); in TEST_P()
363 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
368 glUseProgram(program); in TEST_P()
384 glAttachShader(program, vs); in TEST_P()
387 glAttachShader(program, fs); in TEST_P()
390 glLinkProgram(program); in TEST_P()
391 glDetachShader(program, vs); in TEST_P()
392 glDetachShader(program, fs); in TEST_P()
393 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
405 // If you compile and link a rendering program successfully and use the program,
407 // If you relink the rendering program to a compute program when it is in use,
417 GLuint program = glCreateProgram(); in TEST_P() local
425 glAttachShader(program, vs); in TEST_P()
428 glAttachShader(program, fs); in TEST_P()
431 glLinkProgram(program); in TEST_P()
432 glDetachShader(program, vs); in TEST_P()
433 glDetachShader(program, fs); in TEST_P()
435 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
440 glUseProgram(program); in TEST_P()
457 glAttachShader(program, cs); in TEST_P()
460 glLinkProgram(program); in TEST_P()
461 glDetachShader(program, cs); in TEST_P()
462 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
474 // Parallel link should continue unscathed even if the attached shaders to the program are modified.
500 GLuint program = glCreateProgram(); in TEST_P() local
510 glAttachShader(program, vs); in TEST_P()
511 glAttachShader(program, green); in TEST_P()
512 glLinkProgram(program); in TEST_P()
516 glDetachShader(program, green); in TEST_P()
517 glAttachShader(program, red); in TEST_P()
520 // Make sure the linked program draws with green in TEST_P()
521 glUseProgram(program); in TEST_P()
534 // Parallel link should continue unscathed even if new shaders are attached to the program.
565 GLuint program = glCreateProgram(); in TEST_P() local
575 glAttachShader(program, vs); in TEST_P()
576 glAttachShader(program, fs); in TEST_P()
577 glLinkProgram(program); in TEST_P()
581 glAttachShader(program, gs); in TEST_P()
584 // Make sure the linked program draws with green in TEST_P()
585 glUseProgram(program); in TEST_P()
601 GLuint program = glCreateProgram(); in TEST_P() local
606 // Attach the shaders to the program first. This makes sure the program doesn't prematurely in TEST_P()
608 glAttachShader(program, vs); in TEST_P()
609 glAttachShader(program, fs); in TEST_P()
622 glLinkProgram(program); in TEST_P()
626 drawQuad(program, essl1_shaders::PositionAttrib(), 0.5); in TEST_P()
630 glDeleteProgram(program); in TEST_P()
634 // If a program is linked successfully once, it should retain its executable if a relink fails.
637 // Install a render program in current GL state via UseProgram, then render. in TEST_P()
660 GLuint program = glCreateProgram(); in TEST_P() local
669 glAttachShader(program, vs); in TEST_P()
670 glAttachShader(program, fs); in TEST_P()
672 glLinkProgram(program); in TEST_P()
675 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
691 glUseProgram(program); in TEST_P()
695 // Cause the program to fail linking in TEST_P()
696 glDetachShader(program, fs); in TEST_P()
697 glAttachShader(program, badfs); in TEST_P()
699 glLinkProgram(program); in TEST_P()
701 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
704 // Link failed, but the program should still be usable. in TEST_P()
717 glDeleteProgram(program); in TEST_P()
728 // Install a render program in current GL state via UseProgram, then render. in TEST_P()
776 GLuint program = glCreateProgram(); in TEST_P() local
785 glAttachShader(program, vs); in TEST_P()
786 glAttachShader(program, fs); in TEST_P()
788 glLinkProgram(program); in TEST_P()
791 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
821 glUseProgram(program); in TEST_P()
823 const GLint uniLoc = glGetUniformLocation(program, "u"); in TEST_P()
827 const GLint uboIndex = glGetUniformBlockIndex(program, "UBO"); in TEST_P()
829 glUniformBlockBinding(program, uboIndex, 0); in TEST_P()
834 // Cause the program to fail linking in TEST_P()
835 glDetachShader(program, fs); in TEST_P()
836 glAttachShader(program, badfs); in TEST_P()
838 glLinkProgram(program); in TEST_P()
840 glGetProgramiv(program, GL_LINK_STATUS, &linkStatus); in TEST_P()
843 // Link failed, but the program should still be usable. in TEST_P()
856 glDeleteProgram(program); in TEST_P()
866 // Install a render program in current GL state via UseProgram, then render. in TEST_P()
930 // Cause the fs program to fail linking in TEST_P()
940 // Program link failed, but the program pipeline should still be usable. in TEST_P()