mesa: Create _mesa_CreateShaderProgramv_impl

Factor out the implementation of _mesa_CreateShaderProgramv so that we
can make programs that will encode DXT5.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19827>
This commit is contained in:
Nanley Chery 2022-11-04 09:45:10 -07:00 committed by Marge Bot
parent cb296db853
commit c4a6176d19
2 changed files with 19 additions and 5 deletions

View file

@ -2671,12 +2671,11 @@ _mesa_copy_linked_program_data(const struct gl_shader_program *src,
/**
* ARB_separate_shader_objects: Compile & Link Program
*/
GLuint GLAPIENTRY
_mesa_CreateShaderProgramv(GLenum type, GLsizei count,
const GLchar* const *strings)
GLuint
_mesa_CreateShaderProgramv_impl(struct gl_context *ctx,
GLenum type, GLsizei count,
const GLchar* const *strings)
{
GET_CURRENT_CONTEXT(ctx);
const GLuint shader = create_shader_err(ctx, type, "glCreateShaderProgramv");
GLuint program = 0;
@ -2728,6 +2727,17 @@ _mesa_CreateShaderProgramv(GLenum type, GLsizei count,
return program;
}
/**
* ARB_separate_shader_objects: Compile & Link Program
*/
GLuint GLAPIENTRY
_mesa_CreateShaderProgramv(GLenum type, GLsizei count,
const GLchar* const *strings)
{
GET_CURRENT_CONTEXT(ctx);
return _mesa_CreateShaderProgramv_impl(ctx, type, count, strings);
}
static void
set_patch_vertices(struct gl_context *ctx, GLint value)

View file

@ -200,6 +200,10 @@ const char *
_mesa_lookup_shader_include(struct gl_context *ctx, char *path,
bool error_check);
GLuint
_mesa_CreateShaderProgramv_impl(struct gl_context *ctx,
GLenum type, GLsizei count,
const GLchar* const *strings);
#ifdef __cplusplus
}
#endif