1 Conformance Test 2 3 CTS_ARB_parallel_shader_compile 4 5 Contributors 6 7 Adam Czupryna, Mobica 8 9 Contacts 10 11 Adam Czupryna, Mobica (adam.czupryna 'at' mobica.com) 12 13 Status 14 15 In review 16 17 Version 18 19 September 21, 2016 (version 1) 20 21 Dependencies 22 23 OpenGL 4.5 is required. 24 25 ARB_parallel_shader_compile extension is required. 26 27 This specification is written against: 28 - ARB_parallel_shader_compile extension specification, 29 - OpenGL 4.5 (CoreProfile) specification. 30 31 Overview 32 33 This test verifies the API added in ARB_parallel_shader_compile extension that 34 provides mechanism to limit the number of threads application wants to be used 35 to compile shaders, as well as a query to determine if the compilation process 36 is complete. 37 38 New Tests 39 40 Simple Queries Test 41 42 * Test GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev 43 queries for <pname>: 44 45 - MAX_SHADER_COMPILER_THREADS_ARB 46 47 Verify if returned value is the same for all queries. 48 49 Max Shader Compile Threads Test 50 51 * Use MaxShaderCompilerThreadsARB function to set the number of threads 52 that application will use to compile shaders. 53 Check values: 54 - 0 (non parallel compilation) 55 - 0xFFFFFFFF (maximum threads parallel compilation) 56 57 Verify if values were set properly by quering 58 MAX_SHADER_COMPILER_THREADS_ARB value. 59 60 Compilation Completion Test 61 62 * Prepare vertex and fragment shaders and: 63 64 - Set max shader compiler threads to 0. 65 Create vertex shader, fragment shader and program objects. 66 Compile shaders and verify if GetShaderiv query with 67 COMPLETION_STATUS <pname> return TRUE value. 68 Link shaders into program and verify if GetProgramiv query 69 with COMPLETION_STATUS <pname> return TRUE value. 70 71 - Set max shader compiler threads to 8. 72 Create vertex shader object, fragment shader objects in amount of 8 and 73 program objects in amount of 8. 74 Compile shaders and monit completion status by using GetShaderiv 75 query with COMPLETION_STATUS <pname> in loop until the value 76 is TRUE. Set the loop timeout to 1s and fail test if timeout reached. 77 Link shaders into program and monit completion status by using 78 GetProgramiv query with COMPLETION_STATUS <pname> in loop until the value 79 is TRUE. Set the loop timeout to 1s and fail test if timeout reached. 80 81 Revision History 82 83 Revision 1, 21 September, 2016 (Adam Czupryna) 84 - Intial version; 85