From 150f2fa78999ff20a9e21e58b72ae31b7cd845b8 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 9 Jun 2016 06:23:13 +1000 Subject: [PATCH] mapi: Add support for ARB_gpu_shader_int64. Just add the boilerplate xml code. v2 (idr): Update dispatch_sanity. Only add extension functions in core profile. v3 (idr): Remove comment line from gl_API.xml. Suggested by Matt. Signed-off-by: Dave Airlie Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick [v1] Reviewed-by: Matt Turner --- src/mapi/glapi/gen/ARB_gpu_shader_int64.xml | 262 ++++++++++++++++++++ src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/apiexec.py | 39 +++ src/mapi/glapi/gen/gl_API.xml | 2 + src/mesa/main/tests/dispatch_sanity.cpp | 38 +++ src/mesa/main/uniforms.c | 182 ++++++++++++++ src/mesa/main/uniforms.h | 82 ++++++ 7 files changed, 606 insertions(+) create mode 100644 src/mapi/glapi/gen/ARB_gpu_shader_int64.xml diff --git a/src/mapi/glapi/gen/ARB_gpu_shader_int64.xml b/src/mapi/glapi/gen/ARB_gpu_shader_int64.xml new file mode 100644 index 00000000000..d0e4c546e33 --- /dev/null +++ b/src/mapi/glapi/gen/ARB_gpu_shader_int64.xml @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am index bd5115798cb..079b1bb225e 100644 --- a/src/mapi/glapi/gen/Makefile.am +++ b/src/mapi/glapi/gen/Makefile.am @@ -139,6 +139,7 @@ API_XML = \ ARB_get_program_binary.xml \ ARB_get_texture_sub_image.xml \ ARB_gpu_shader_fp64.xml \ + ARB_gpu_shader_int64.xml \ ARB_gpu_shader5.xml \ ARB_indirect_parameters.xml \ ARB_instanced_arrays.xml \ diff --git a/src/mapi/glapi/gen/apiexec.py b/src/mapi/glapi/gen/apiexec.py index 4bdc95d68e2..e5e1b7d78cb 100644 --- a/src/mapi/glapi/gen/apiexec.py +++ b/src/mapi/glapi/gen/apiexec.py @@ -252,4 +252,43 @@ functions = { "GetQueryBufferObjectuiv": exec_info(core=31), "GetQueryBufferObjecti64v": exec_info(core=31), "GetQueryBufferObjectui64v": exec_info(core=31), + + # GL_ARB_gpu_shader_int64 - nominally requires OpenGL 4.0, and Mesa + # only supports 4.0 in core profile. + "Uniform1i64ARB": exec_info(core=31), + "Uniform2i64ARB": exec_info(core=31), + "Uniform3i64ARB": exec_info(core=31), + "Uniform4i64ARB": exec_info(core=31), + "Uniform1i64vARB": exec_info(core=31), + "Uniform2i64vARB": exec_info(core=31), + "Uniform3i64vARB": exec_info(core=31), + "Uniform4i64vARB": exec_info(core=31), + "Uniform1ui64ARB": exec_info(core=31), + "Uniform2ui64ARB": exec_info(core=31), + "Uniform3ui64ARB": exec_info(core=31), + "Uniform4ui64ARB": exec_info(core=31), + "Uniform1ui64vARB": exec_info(core=31), + "Uniform2ui64vARB": exec_info(core=31), + "Uniform3ui64vARB": exec_info(core=31), + "Uniform4ui64vARB": exec_info(core=31), + "GetUniformi64vARB": exec_info(core=31), + "GetUniformui64vARB": exec_info(core=31), + "GetnUniformi64vARB": exec_info(core=31), + "GetnUniformui64vARB": exec_info(core=31), + "ProgramUniform1i64ARB": exec_info(core=31), + "ProgramUniform2i64ARB": exec_info(core=31), + "ProgramUniform3i64ARB": exec_info(core=31), + "ProgramUniform4i64ARB": exec_info(core=31), + "ProgramUniform1i64vARB": exec_info(core=31), + "ProgramUniform2i64vARB": exec_info(core=31), + "ProgramUniform3i64vARB": exec_info(core=31), + "ProgramUniform4i64vARB": exec_info(core=31), + "ProgramUniform1ui64ARB": exec_info(core=31), + "ProgramUniform2ui64ARB": exec_info(core=31), + "ProgramUniform3ui64ARB": exec_info(core=31), + "ProgramUniform4ui64ARB": exec_info(core=31), + "ProgramUniform1ui64vARB": exec_info(core=31), + "ProgramUniform2ui64vARB": exec_info(core=31), + "ProgramUniform3ui64vARB": exec_info(core=31), + "ProgramUniform4ui64vARB": exec_info(core=31), } diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 6e00363b6f6..2f421f5a57d 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8361,6 +8361,8 @@ + + diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 3fdd80a8a07..2ea87043029 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -1872,6 +1872,44 @@ const struct function gl_core_functions_possible[] = { /* GL_ARB_ES3_2_compatibility */ { "glPrimitiveBoundingBoxARB", 45, -1 }, + /* GL_ARB_gpu_shader_int64 */ + { "glUniform1i64ARB", 45, -1 }, + { "glUniform2i64ARB", 45, -1 }, + { "glUniform3i64ARB", 45, -1 }, + { "glUniform4i64ARB", 45, -1 }, + { "glUniform1ui64ARB", 45, -1 }, + { "glUniform2ui64ARB", 45, -1 }, + { "glUniform3ui64ARB", 45, -1 }, + { "glUniform4ui64ARB", 45, -1 }, + { "glUniform1i64vARB", 45, -1 }, + { "glUniform2i64vARB", 45, -1 }, + { "glUniform3i64vARB", 45, -1 }, + { "glUniform4i64vARB", 45, -1 }, + { "glUniform1ui64vARB", 45, -1 }, + { "glUniform2ui64vARB", 45, -1 }, + { "glUniform3ui64vARB", 45, -1 }, + { "glUniform4ui64vARB", 45, -1 }, + { "glGetUniformi64vARB", 45, -1 }, + { "glGetUniformui64vARB", 45, -1 }, + { "glGetnUniformi64vARB", 45, -1 }, + { "glGetnUniformui64vARB", 45, -1 }, + { "glProgramUniform1i64ARB", 45, -1 }, + { "glProgramUniform2i64ARB", 45, -1 }, + { "glProgramUniform3i64ARB", 45, -1 }, + { "glProgramUniform4i64ARB", 45, -1 }, + { "glProgramUniform1ui64ARB", 45, -1 }, + { "glProgramUniform2ui64ARB", 45, -1 }, + { "glProgramUniform3ui64ARB", 45, -1 }, + { "glProgramUniform4ui64ARB", 45, -1 }, + { "glProgramUniform1i64vARB", 45, -1 }, + { "glProgramUniform2i64vARB", 45, -1 }, + { "glProgramUniform3i64vARB", 45, -1 }, + { "glProgramUniform4i64vARB", 45, -1 }, + { "glProgramUniform1ui64vARB", 45, -1 }, + { "glProgramUniform2ui64vARB", 45, -1 }, + { "glProgramUniform3ui64vARB", 45, -1 }, + { "glProgramUniform4ui64vARB", 45, -1 }, + { NULL, 0, -1 } }; diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 51db39e63a0..b3d640ed20d 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -896,6 +896,27 @@ _mesa_GetUniformdv(GLuint program, GLint location, GLdouble *params) _mesa_GetnUniformdvARB(program, location, INT_MAX, params); } +void GLAPIENTRY +_mesa_GetnUniformi64vARB(GLuint program, GLint location, + GLsizei bufSize, GLint64 *params) +{ + +} +void GLAPIENTRY +_mesa_GetUniformi64vARB(GLuint program, GLint location, GLint64 *params) +{ +} + +void GLAPIENTRY +_mesa_GetnUniformui64vARB(GLuint program, GLint location, + GLsizei bufSize, GLuint64 *params) +{ +} +void GLAPIENTRY +_mesa_GetUniformui64vARB(GLuint program, GLint location, GLuint64 *params) +{ +} + GLint GLAPIENTRY _mesa_GetUniformLocation(GLuint programObj, const GLcharARB *name) @@ -1611,3 +1632,164 @@ _mesa_ProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, "glProgramUniformMatrix4x3dv"); _mesa_uniform_matrix(ctx, shProg, 4, 3, location, count, transpose, value, GLSL_TYPE_DOUBLE); } + +void GLAPIENTRY +_mesa_Uniform1i64ARB(GLint location, GLint64 v0) +{ +} + +void GLAPIENTRY +_mesa_Uniform2i64ARB(GLint location, GLint64 v0, GLint64 v1) +{ +} + +void GLAPIENTRY +_mesa_Uniform3i64ARB(GLint location, GLint64 v0, GLint64 v1, GLint64 v2) +{ +} + +void GLAPIENTRY +_mesa_Uniform4i64ARB(GLint location, GLint64 v0, GLint64 v1, GLint64 v2, GLint64 v3) +{ +} + +void GLAPIENTRY +_mesa_Uniform1i64vARB(GLint location, GLsizei count, const GLint64 *value) +{ +} + +void GLAPIENTRY +_mesa_Uniform2i64vARB(GLint location, GLsizei count, const GLint64 *value) +{ +} + +void GLAPIENTRY +_mesa_Uniform3i64vARB(GLint location, GLsizei count, const GLint64 *value) +{ +} + +void GLAPIENTRY +_mesa_Uniform4i64vARB(GLint location, GLsizei count, const GLint64 *value) +{ +} + +void GLAPIENTRY +_mesa_Uniform1ui64ARB(GLint location, GLuint64 v0) +{ +} + +void GLAPIENTRY +_mesa_Uniform2ui64ARB(GLint location, GLuint64 v0, GLuint64 v1) +{ +} + +void GLAPIENTRY +_mesa_Uniform3ui64ARB(GLint location, GLuint64 v0, GLuint64 v1, GLuint64 v2) +{ +} + +void GLAPIENTRY +_mesa_Uniform4ui64ARB(GLint location, GLuint64 v0, GLuint64 v1, GLuint64 v2, GLuint64 v3) +{ +} + +void GLAPIENTRY +_mesa_Uniform1ui64vARB(GLint location, GLsizei count, const GLuint64 *value) +{ +} + +void GLAPIENTRY +_mesa_Uniform2ui64vARB(GLint location, GLsizei count, const GLuint64 *value) +{ +} + +void GLAPIENTRY +_mesa_Uniform3ui64vARB(GLint location, GLsizei count, const GLuint64 *value) +{ +} + +void GLAPIENTRY +_mesa_Uniform4ui64vARB(GLint location, GLsizei count, const GLuint64 *value) +{ +} + +/* DSA int64 entrypoints */ +void GLAPIENTRY +_mesa_ProgramUniform1i64ARB(GLuint program, GLint location, GLint64 v0) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform2i64ARB(GLuint program, GLint location, GLint64 v0, GLint64 v1) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform3i64ARB(GLuint program, GLint location, GLint64 v0, GLint64 v1, GLint64 v2) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform4i64ARB(GLuint program, GLint location, GLint64 v0, GLint64 v1, GLint64 v2, GLint64 v3) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform1i64vARB(GLuint program, GLint location, GLsizei count, const GLint64 *value) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform2i64vARB(GLuint program, GLint location, GLsizei count, const GLint64 *value) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform3i64vARB(GLuint program, GLint location, GLsizei count, const GLint64 *value) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform4i64vARB(GLuint program, GLint location, GLsizei count, const GLint64 *value) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform1ui64ARB(GLuint program, GLint location, GLuint64 v0) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform2ui64ARB(GLuint program, GLint location, GLuint64 v0, GLuint64 v1) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform3ui64ARB(GLuint program, GLint location, GLuint64 v0, GLuint64 v1, GLuint64 v2) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform4ui64ARB(GLuint program, GLint location, GLuint64 v0, GLuint64 v1, GLuint64 v2, GLuint64 v3) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform1ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64 *value) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform2ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64 *value) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform3ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64 *value) +{ +} + +void GLAPIENTRY +_mesa_ProgramUniform4ui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64 *value) +{ +} diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h index 88fe9580167..77e9ba37acf 100644 --- a/src/mesa/main/uniforms.h +++ b/src/mesa/main/uniforms.h @@ -276,6 +276,16 @@ _mesa_Uniform3dv(GLint, GLsizei, const GLdouble *); void GLAPIENTRY _mesa_Uniform4dv(GLint, GLsizei, const GLdouble *); +void GLAPIENTRY +_mesa_GetUniformi64vARB(GLuint, GLint, GLint64 *); +void GLAPIENTRY +_mesa_GetUniformui64vARB(GLuint, GLint, GLuint64 *); + +void GLAPIENTRY +_mesa_GetnUniformi64vARB(GLuint, GLint, GLsizei, GLint64 *); +void GLAPIENTRY +_mesa_GetnUniformui64vARB(GLuint, GLint, GLsizei, GLuint64 *); + void GLAPIENTRY _mesa_UniformMatrix2dv(GLint, GLsizei, GLboolean, const GLdouble *); void GLAPIENTRY @@ -347,6 +357,78 @@ void GLAPIENTRY _mesa_ProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +void GLAPIENTRY +_mesa_Uniform1i64ARB(GLint, GLint64); +void GLAPIENTRY +_mesa_Uniform2i64ARB(GLint, GLint64, GLint64); +void GLAPIENTRY +_mesa_Uniform3i64ARB(GLint, GLint64, GLint64, GLint64); +void GLAPIENTRY +_mesa_Uniform4i64ARB(GLint, GLint64, GLint64, GLint64, GLint64); + +void GLAPIENTRY +_mesa_Uniform1i64vARB(GLint, GLsizei, const GLint64 *); +void GLAPIENTRY +_mesa_Uniform2i64vARB(GLint, GLsizei, const GLint64 *); +void GLAPIENTRY +_mesa_Uniform3i64vARB(GLint, GLsizei, const GLint64 *); +void GLAPIENTRY +_mesa_Uniform4i64vARB(GLint, GLsizei, const GLint64 *); + +void GLAPIENTRY +_mesa_Uniform1ui64ARB(GLint, GLuint64); +void GLAPIENTRY +_mesa_Uniform2ui64ARB(GLint, GLuint64, GLuint64); +void GLAPIENTRY +_mesa_Uniform3ui64ARB(GLint, GLuint64, GLuint64, GLuint64); +void GLAPIENTRY +_mesa_Uniform4ui64ARB(GLint, GLuint64, GLuint64, GLuint64, GLuint64); + +void GLAPIENTRY +_mesa_Uniform1ui64vARB(GLint, GLsizei, const GLuint64 *); +void GLAPIENTRY +_mesa_Uniform2ui64vARB(GLint, GLsizei, const GLuint64 *); +void GLAPIENTRY +_mesa_Uniform3ui64vARB(GLint, GLsizei, const GLuint64 *); +void GLAPIENTRY +_mesa_Uniform4ui64vARB(GLint, GLsizei, const GLuint64 *); + +void GLAPIENTRY +_mesa_ProgramUniform1i64ARB(GLuint, GLint, GLint64); +void GLAPIENTRY +_mesa_ProgramUniform2i64ARB(GLuint, GLint, GLint64, GLint64); +void GLAPIENTRY +_mesa_ProgramUniform3i64ARB(GLuint, GLint, GLint64, GLint64, GLint64); +void GLAPIENTRY +_mesa_ProgramUniform4i64ARB(GLuint, GLint, GLint64, GLint64, GLint64, GLint64); + +void GLAPIENTRY +_mesa_ProgramUniform1i64vARB(GLuint, GLint, GLsizei, const GLint64 *); +void GLAPIENTRY +_mesa_ProgramUniform2i64vARB(GLuint, GLint, GLsizei, const GLint64 *); +void GLAPIENTRY +_mesa_ProgramUniform3i64vARB(GLuint, GLint, GLsizei, const GLint64 *); +void GLAPIENTRY +_mesa_ProgramUniform4i64vARB(GLuint, GLint, GLsizei, const GLint64 *); + +void GLAPIENTRY +_mesa_ProgramUniform1ui64ARB(GLuint, GLint, GLuint64); +void GLAPIENTRY +_mesa_ProgramUniform2ui64ARB(GLuint, GLint, GLuint64, GLuint64); +void GLAPIENTRY +_mesa_ProgramUniform3ui64ARB(GLuint, GLint, GLuint64, GLuint64, GLuint64); +void GLAPIENTRY +_mesa_ProgramUniform4ui64ARB(GLuint, GLint, GLuint64, GLuint64, GLuint64, GLuint64); + +void GLAPIENTRY +_mesa_ProgramUniform1ui64vARB(GLuint, GLint, GLsizei, const GLuint64 *); +void GLAPIENTRY +_mesa_ProgramUniform2ui64vARB(GLuint, GLint, GLsizei, const GLuint64 *); +void GLAPIENTRY +_mesa_ProgramUniform3ui64vARB(GLuint, GLint, GLsizei, const GLuint64 *); +void GLAPIENTRY +_mesa_ProgramUniform4ui64vARB(GLuint, GLint, GLsizei, const GLuint64 *); + void _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shader_program, GLint location, GLsizei count, -- 2.30.2