diff options
author | Samuel Pitoiset <[email protected]> | 2017-02-24 19:24:56 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-14 10:04:36 +0200 |
commit | 326a82a255c1a72376ce2b7f3d878bfff5cb9621 (patch) | |
tree | 0e915868eecb94a8435ed619ab212272a6c2f7b4 /src/mesa/main/uniforms.c | |
parent | afb141156f09e7f2f22b88eeefe8e0800c26c1d6 (diff) |
mesa: add support for glUniformHandleui64*ARB()
Bindless sampler/image handles are represented using 64-bit
unsigned integers.
The ARB_bindless_texture spec says:
"The error INVALID_OPERATION is generated by UniformHandleui64{v}ARB
if the sampler or image uniform being updated has the "bound_sampler"
or "bound_image" layout qualifier"."
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r-- | src/mesa/main/uniforms.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index a9e7cda17c2..67c238e4f37 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -297,12 +297,17 @@ _mesa_Uniform4iv(GLint location, GLsizei count, const GLint * value) void GLAPIENTRY _mesa_UniformHandleui64ARB(GLint location, GLuint64 value) { + GET_CURRENT_CONTEXT(ctx); + _mesa_uniform_handle(location, 1, &value, ctx, ctx->_Shader->ActiveProgram); } void GLAPIENTRY _mesa_UniformHandleui64vARB(GLint location, GLsizei count, const GLuint64 *value) { + GET_CURRENT_CONTEXT(ctx); + _mesa_uniform_handle(location, count, value, ctx, + ctx->_Shader->ActiveProgram); } @@ -501,12 +506,22 @@ void GLAPIENTRY _mesa_ProgramUniformHandleui64ARB(GLuint program, GLint location, GLuint64 value) { + GET_CURRENT_CONTEXT(ctx); + struct gl_shader_program *shProg = + _mesa_lookup_shader_program_err(ctx, program, + "glProgramUniformHandleui64ARB"); + _mesa_uniform_handle(location, 1, &value, ctx, shProg); } void GLAPIENTRY _mesa_ProgramUniformHandleui64vARB(GLuint program, GLint location, GLsizei count, const GLuint64 *values) { + GET_CURRENT_CONTEXT(ctx); + struct gl_shader_program *shProg = + _mesa_lookup_shader_program_err(ctx, program, + "glProgramUniformHandleui64vARB"); + _mesa_uniform_handle(location, count, values, ctx, shProg); } |