diff --git a/limadriver/limare/tests/cube_textured_spinning/limare.c b/limadriver/limare/tests/cube_textured_spinning/limare.c index e54ffaa..382baa3 100644 --- a/limadriver/limare/tests/cube_textured_spinning/limare.c +++ b/limadriver/limare/tests/cube_textured_spinning/limare.c @@ -41,18 +41,36 @@ main(int argc, char *argv[]) #ifndef HAVE_NO_LIBMALI_BLOB const char *vertex_shader_source = - "uniform mat4 modelviewprojectionMatrix;\n" - "\n" - "attribute vec4 in_position; \n" - "attribute vec2 in_coord; \n" - " \n" - "varying vec2 coord; \n" - " \n" - "void main() \n" - "{ \n" - " gl_Position = modelviewprojectionMatrix * in_position;\n" - " coord = in_coord; \n" - "} \n"; + "uniform mat4 modelviewprojectionMatrix; \n" + " \n" + "attribute vec4 in_position; \n" + "attribute vec2 in_coord; \n" + " \n" + "varying vec2 coord; \n" + " \n" + "void main() \n" + "{ \n" + " gl_Position = vec4(modelviewprojectionMatrix[0][0] * in_position.x + \n" + " modelviewprojectionMatrix[1][0] * in_position.y + \n" + " modelviewprojectionMatrix[2][0] * in_position.z + \n" + " modelviewprojectionMatrix[3][0] * in_position.w, \n" + " \n" + " modelviewprojectionMatrix[0][1] * in_position.x + \n" + " modelviewprojectionMatrix[1][1] * in_position.y + \n" + " modelviewprojectionMatrix[2][1] * in_position.z + \n" + " modelviewprojectionMatrix[3][1] * in_position.w, \n" + " \n" + " modelviewprojectionMatrix[0][2] * in_position.x + \n" + " modelviewprojectionMatrix[1][2] * in_position.y + \n" + " modelviewprojectionMatrix[2][2] * in_position.z + \n" + " modelviewprojectionMatrix[3][2] * in_position.w, \n" + " \n" + " modelviewprojectionMatrix[0][3] * in_position.x + \n" + " modelviewprojectionMatrix[1][3] * in_position.y + \n" + " modelviewprojectionMatrix[2][3] * in_position.z + \n" + " modelviewprojectionMatrix[3][3] * in_position.w); \n" + " coord = in_coord; \n" + "} \n"; const char *fragment_shader_source = "precision mediump float; \n" " \n" diff --git a/limadriver/limare/tests/cube_textured_spinning/shader_v.h b/limadriver/limare/tests/cube_textured_spinning/shader_v.h index c147ae0..5e50590 100644 --- a/limadriver/limare/tests/cube_textured_spinning/shader_v.h +++ b/limadriver/limare/tests/cube_textured_spinning/shader_v.h @@ -1,83 +1,85 @@ /* - * This vertex shader binary has been generated by the shader compiler from - * the proprietary libMali.so driver. + * This vertex shader binary has been generated by the open source + * shader compiler https://github.com/cwabbott0/lima_compiler + * (git shapshot 51f162b1e25efddc5084782c530f503cdc843b08) */ static char vertex_shader_binary[] = { - 0x4D, 0x42, 0x53, 0x31, 0x84, 0x03, 0x00, 0x00, 0x43, 0x56, 0x45, 0x52, - 0x7C, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x49, 0x4E, 0x53, - 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x0E, 0x00, 0x00, 0x00, 0x53, 0x55, 0x4E, 0x49, 0x64, 0x01, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x56, 0x55, 0x4E, 0x49, - 0x7C, 0x00, 0x00, 0x00, 0x53, 0x54, 0x52, 0x49, 0x18, 0x00, 0x00, 0x00, - 0x3F, 0x5F, 0x5F, 0x6D, 0x61, 0x6C, 0x69, 0x67, 0x70, 0x32, 0x5F, 0x63, - 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74, 0x5F, 0x30, 0x30, 0x30, 0x00, - 0x02, 0x01, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xFF, 0xFF, 0x56, 0x49, 0x44, 0x58, - 0x24, 0x00, 0x00, 0x00, 0x49, 0x54, 0x44, 0x52, 0x04, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x59, 0x55, 0x56, 0x04, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x47, 0x52, 0x44, 0x04, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0x49, 0x4E, 0x49, 0x14, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0xF9, 0x02, 0x15, 0xD0, 0xF9, 0x02, 0x15, 0x50, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x55, 0x4E, 0x49, + 0x4D, 0x42, 0x53, 0x31, 0x8C, 0x03, 0x00, 0x00, 0x43, 0x56, 0x45, 0x52, + 0x84, 0x03, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x49, 0x4E, 0x53, + 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x0F, 0x00, 0x00, 0x00, 0x53, 0x55, 0x4E, 0x49, 0x5C, 0x01, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x56, 0x55, 0x4E, 0x49, 0x64, 0x00, 0x00, 0x00, 0x53, 0x54, 0x52, 0x49, 0x1C, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x6D, 0x61, 0x6C, 0x69, 0x5F, 0x56, 0x69, 0x65, 0x77, 0x70, 0x6F, 0x72, 0x74, 0x54, 0x72, 0x61, 0x6E, 0x73, 0x66, 0x6F, 0x72, - 0x6D, 0x00, 0x00, 0x00, 0x02, 0x01, 0x04, 0x00, 0x04, 0x00, 0x02, 0x00, + 0x6D, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x04, 0x00, 0x02, 0x00, 0x04, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xFF, 0xFF, 0x56, 0x49, 0x44, 0x58, 0x24, 0x00, 0x00, 0x00, 0x49, 0x54, 0x44, 0x52, 0x04, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x59, 0x55, 0x56, 0x04, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x47, 0x52, 0x44, - 0x04, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0x55, 0x4E, 0x49, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x55, 0x4E, 0x49, 0x64, 0x00, 0x00, 0x00, 0x53, 0x54, 0x52, 0x49, 0x1C, 0x00, 0x00, 0x00, 0x6D, 0x6F, 0x64, 0x65, 0x6C, 0x76, 0x69, 0x65, 0x77, 0x70, 0x72, 0x6F, 0x6A, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x4D, 0x61, 0x74, 0x72, 0x69, - 0x78, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x78, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x56, 0x49, 0x44, 0x58, 0x24, 0x00, 0x00, 0x00, 0x49, 0x54, 0x44, 0x52, 0x04, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x59, 0x55, 0x56, 0x04, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x47, 0x52, 0x44, - 0x04, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x53, 0x41, 0x54, 0x54, - 0x5C, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x56, 0x41, 0x54, 0x54, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x55, 0x4E, 0x49, + 0x74, 0x00, 0x00, 0x00, 0x53, 0x54, 0x52, 0x49, 0x18, 0x00, 0x00, 0x00, + 0x3F, 0x5F, 0x5F, 0x6D, 0x61, 0x6C, 0x69, 0x67, 0x70, 0x32, 0x5F, 0x63, + 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74, 0x5F, 0x30, 0x30, 0x30, 0x00, + 0x00, 0x01, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xFF, 0xFF, 0x56, 0x49, 0x44, 0x58, + 0x24, 0x00, 0x00, 0x00, 0x49, 0x54, 0x44, 0x52, 0x04, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x59, 0x55, 0x56, 0x04, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x49, 0x47, 0x52, 0x44, 0x04, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x56, 0x49, 0x4E, 0x49, 0x0C, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0xF9, 0x02, 0x15, 0xD0, 0xF9, 0x02, 0x15, 0x50, + 0x53, 0x41, 0x54, 0x54, 0x5C, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x56, 0x41, 0x54, 0x54, 0x24, 0x00, 0x00, 0x00, 0x53, 0x54, 0x52, 0x49, + 0x0C, 0x00, 0x00, 0x00, 0x69, 0x6E, 0x5F, 0x70, 0x6F, 0x73, 0x69, 0x74, + 0x69, 0x6F, 0x6E, 0x00, 0x00, 0x01, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x56, 0x41, 0x54, 0x54, 0x24, 0x00, 0x00, 0x00, 0x53, 0x54, 0x52, 0x49, 0x0C, 0x00, 0x00, 0x00, - 0x69, 0x6E, 0x5F, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, - 0x02, 0x01, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x56, 0x41, 0x54, 0x54, 0x24, 0x00, 0x00, 0x00, - 0x53, 0x54, 0x52, 0x49, 0x0C, 0x00, 0x00, 0x00, 0x69, 0x6E, 0x5F, 0x63, - 0x6F, 0x6F, 0x72, 0x64, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x02, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x03, 0x00, 0x00, 0x04, 0x00, - 0x53, 0x56, 0x41, 0x52, 0x94, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x69, 0x6E, 0x5F, 0x63, 0x6F, 0x6F, 0x72, 0x64, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x03, + 0x00, 0x00, 0x04, 0x00, 0x53, 0x56, 0x41, 0x52, 0x94, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x56, 0x56, 0x41, 0x52, 0x28, 0x00, 0x00, 0x00, + 0x53, 0x54, 0x52, 0x49, 0x0C, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, + 0x6F, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x00, 0x01, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xFF, 0xFF, 0x56, 0x56, 0x41, 0x52, 0x24, 0x00, 0x00, 0x00, + 0x53, 0x54, 0x52, 0x49, 0x08, 0x00, 0x00, 0x00, 0x63, 0x6F, 0x6F, 0x72, + 0x64, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xFF, 0xFF, 0x56, 0x56, 0x41, 0x52, 0x2C, 0x00, 0x00, 0x00, 0x53, 0x54, 0x52, 0x49, 0x10, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, 0x6F, 0x69, 0x6E, 0x74, - 0x53, 0x69, 0x7A, 0x65, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x56, 0x56, 0x41, 0x52, 0x24, 0x00, 0x00, 0x00, - 0x53, 0x54, 0x52, 0x49, 0x08, 0x00, 0x00, 0x00, 0x63, 0x6F, 0x6F, 0x72, - 0x64, 0x00, 0x00, 0x00, 0x02, 0x01, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xFF, 0xFF, - 0x56, 0x56, 0x41, 0x52, 0x28, 0x00, 0x00, 0x00, 0x53, 0x54, 0x52, 0x49, - 0x0C, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, 0x6F, 0x73, 0x69, 0x74, - 0x69, 0x6F, 0x6E, 0x00, 0x02, 0x01, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0x44, 0x42, 0x49, 0x4E, 0xF0, 0x00, 0x00, 0x00, 0x2E, 0xB4, 0x40, 0xAD, - 0xB5, 0x42, 0x80, 0x43, 0x80, 0xE9, 0x07, 0x00, 0x00, 0xD5, 0x0A, 0x00, - 0xAC, 0xBF, 0x4E, 0xAD, 0xB5, 0x42, 0x80, 0x03, 0x80, 0x5F, 0x07, 0x00, - 0x00, 0xD5, 0x0A, 0x00, 0x0E, 0x34, 0x40, 0xAD, 0xB5, 0x02, 0x80, 0x43, - 0x80, 0xFF, 0x07, 0x00, 0x00, 0xD5, 0x0A, 0x00, 0x8C, 0x3F, 0x8E, 0xB4, - 0xDB, 0x2A, 0x80, 0x43, 0x80, 0xFF, 0x02, 0x00, 0x00, 0xD5, 0x09, 0x00, - 0xCE, 0x3F, 0x8F, 0xB7, 0x33, 0x8A, 0x80, 0x03, 0x80, 0xEB, 0x47, 0x12, - 0x00, 0x35, 0x06, 0x00, 0x16, 0xBE, 0x01, 0x2E, 0x71, 0xC2, 0x80, 0x43, - 0x80, 0x5F, 0x47, 0x02, 0x02, 0xDD, 0x0A, 0x00, 0x17, 0xBB, 0x8F, 0x25, - 0x71, 0xC2, 0x80, 0x03, 0x80, 0xFD, 0x47, 0x0E, 0x00, 0xFD, 0x03, 0x00, - 0xD0, 0x4A, 0x8B, 0xB5, 0xDA, 0x2A, 0x80, 0x03, 0x80, 0xFF, 0x47, 0x02, - 0x00, 0xE1, 0x0A, 0x00, 0x39, 0x37, 0xC8, 0x35, 0x36, 0xC0, 0x80, 0x13, - 0x80, 0xFF, 0x47, 0x01, 0x30, 0xE5, 0x0C, 0x00, 0x56, 0x5A, 0x8A, 0xCE, - 0x70, 0xC3, 0x80, 0x03, 0x80, 0xFF, 0x47, 0x02, 0x10, 0x31, 0x0C, 0x00, - 0xCD, 0x5A, 0x4A, 0x26, 0x70, 0x03, 0x81, 0x83, 0x81, 0xFF, 0x07, 0x00, - 0x00, 0x55, 0x07, 0x00, 0x90, 0x46, 0x49, 0xAD, 0x79, 0x82, 0x81, 0x03, - 0x80, 0xFF, 0x07, 0x00, 0x00, 0x57, 0x0D, 0x00, 0x91, 0x49, 0x4A, 0xAD, - 0xB5, 0x02, 0x81, 0x03, 0x80, 0xFF, 0x07, 0x00, 0x00, 0xD5, 0x0A, 0x00, - 0xFB, 0xCA, 0x0B, 0xB0, 0xD3, 0x49, 0x81, 0x47, 0x00, 0xF8, 0x47, 0xC6, - 0x08, 0x85, 0x0B, 0x00, 0xB5, 0x52, 0x8B, 0x6C, 0x93, 0x41, 0x81, 0x03, - 0x80, 0xC0, 0x43, 0x42, 0x08, 0xC5, 0x0A, 0x00 + 0x53, 0x69, 0x7A, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0xFF, 0x44, 0x42, 0x49, 0x4E, 0x00, 0x01, 0x00, 0x00, + 0xB5, 0xD6, 0xCA, 0xB3, 0xB5, 0xCA, 0x80, 0x03, 0x80, 0xFF, 0x07, 0x00, + 0x00, 0xD5, 0x0A, 0x00, 0x0F, 0xC0, 0x01, 0xB3, 0xB5, 0x0A, 0x80, 0x43, + 0x80, 0xFF, 0x07, 0x00, 0x00, 0xD5, 0x0A, 0x00, 0x10, 0xB4, 0x41, 0xAD, + 0xB5, 0xC2, 0x80, 0x43, 0x80, 0xFF, 0x07, 0x00, 0x00, 0xD5, 0x0A, 0x00, + 0x2E, 0xBC, 0xC0, 0xB6, 0xDA, 0x6A, 0x80, 0x43, 0x80, 0xFF, 0x07, 0x00, + 0x00, 0xD5, 0x0A, 0x00, 0x0D, 0x38, 0xC0, 0xB6, 0xDA, 0x2A, 0x80, 0x43, + 0x80, 0xFF, 0x07, 0x00, 0x00, 0xD5, 0x0A, 0x00, 0x2D, 0xB0, 0x40, 0xDE, + 0x53, 0x43, 0x80, 0x43, 0x80, 0xFF, 0x47, 0x02, 0x00, 0xE1, 0x0A, 0x00, + 0x4E, 0x3C, 0x41, 0x9E, 0x5A, 0x82, 0x80, 0x43, 0x80, 0xFF, 0x47, 0x02, + 0x00, 0x61, 0x0B, 0x00, 0x4D, 0x30, 0x01, 0x9E, 0x59, 0x82, 0x80, 0x43, + 0x80, 0xFF, 0x47, 0x02, 0x00, 0xD9, 0x0A, 0x00, 0x6E, 0x60, 0x4B, 0x96, + 0xF0, 0xC2, 0x80, 0x43, 0x80, 0xFF, 0x47, 0x02, 0x00, 0xD9, 0x0A, 0x00, + 0x31, 0x66, 0x4B, 0xB4, 0x73, 0x0B, 0x80, 0x03, 0x80, 0xFF, 0x47, 0x01, + 0x30, 0x45, 0x0B, 0x00, 0x56, 0x5A, 0x08, 0xA6, 0x53, 0xC3, 0x80, 0x03, + 0x80, 0xFF, 0x47, 0x02, 0x10, 0xB1, 0x0A, 0x00, 0x76, 0x64, 0x8B, 0xB3, + 0xCD, 0x2A, 0x81, 0x43, 0x80, 0xFF, 0x07, 0x00, 0x00, 0xD5, 0x0A, 0x00, + 0x38, 0x66, 0xC8, 0x94, 0xB5, 0x82, 0x81, 0x03, 0x80, 0xFF, 0x07, 0x00, + 0x00, 0x57, 0x0D, 0x00, 0x90, 0x4D, 0x4A, 0xAD, 0xB5, 0x02, 0x81, 0x03, + 0x80, 0xFF, 0x07, 0x00, 0x00, 0xD5, 0x0A, 0x00, 0xFA, 0xCA, 0xCB, 0x74, + 0xD7, 0x62, 0x81, 0x47, 0x00, 0xF3, 0x47, 0x46, 0x00, 0x81, 0x00, 0x00, + 0xD1, 0x42, 0xCB, 0x64, 0xB2, 0x41, 0x81, 0x03, 0x00, 0x64, 0x02, 0x40, + 0x08, 0xD5, 0x0A, 0x00 };