aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-07-25 21:39:20 +0200
committerSamuel Pitoiset <[email protected]>2017-07-28 11:20:39 +0200
commitb38c9c57f272b54a190be4efd4297effa1a3deab (patch)
tree2fb51345f8b29cc7808b2b763da5ee15a7026146 /src/mesa
parente0e79f0b08410a64e0b0f0f0f95317e473e4db86 (diff)
mesa: fix mismatch when returning 64-bit bindless uniform handles
The slower convert-and-copy process performs a bad conversion because it converts the value to signed 64-bit integer, but bindless uniform handles are considered unsigned 64-bit. This fixes "Check glUniform*() with mixed texture units/handles" from arb_bindless_texture-uniform piglit. Signed-off-by: Samuel Pitoiset <[email protected]> Cc: "17.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/uniform_query.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 928d3ce4fd6..a48b6d29218 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -358,7 +358,8 @@ _mesa_get_uniform(struct gl_context *ctx, GLuint program, GLint location,
*/
if (returnType == uni->type->base_type ||
((returnType == GLSL_TYPE_INT || returnType == GLSL_TYPE_UINT) &&
- (uni->type->is_sampler() || uni->type->is_image()))) {
+ (uni->type->is_sampler() || uni->type->is_image())) ||
+ (returnType == GLSL_TYPE_UINT64 && uni->is_bindless)) {
memcpy(paramsOut, src, bytes);
} else {
union gl_constant_value *const dst =