-
With option '-b', shader-db now generates a shader program binary file using GetProgramBinary(). This shader program binary can be loaded via ProgramBinary() to be executed by an application later. v2: 1. define MAX_LOG_LEN and use it as the size of gl log 2. define MAX_PROG_SIZE and use it as the max size of extracted shader_program 3. out_file is now pointer allocated by strdup for the file name v3: 1. automatically using original shader test file's name + ".bin" as a filename for program binary - better way to cover the case with batch compilation of many shader test files in the same directory 2. remove --out=<file name> since it is now unnecessary (due to v3-1.) to provide custom file name. Instead, option, "--bin", which is basically a flag that enables getting program binary as a file. 3. Now it tries to get the length of binary by reading program's GL_PROGRAM_BINARY_LENGTH_OES parameter v4: 1. '--bin' -> '-b' 2. stop generating binary program when failing to retrieve the binary size 3. error checking after malloc for binary program 4. changed some of variable names 5. several consecutive fprintfs are consolidated 6. removed MAX_LOG_LEN and MAX_PROG_SIZE v5: bug fix: +1 to the length of the output file to cover '\0' Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
9f6dc480