[Mesa-stable] [Mesa-dev] [PATCH] mesa: fix mismatch when returning 64-bit bindless uniform handles
Ilia Mirkin
imirkin at alum.mit.edu
Tue Jul 25 19:47:58 UTC 2017
On Tue, Jul 25, 2017 at 3:39 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> 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 <samuel.pitoiset at gmail.com>
> Cc: "17.2" <mesa-stable at lists.freedesktop.org>
> ---
> src/mesa/main/uniform_query.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
> index 928d3ce4fd..a48b6d2921 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)) {
Won't this mess things up for when returnType == INT and
uni->type->is_sampler() but uni->is_bindless is true? Or can that not
happen?
-ilia
P.S. yes, that's a pre-existing issue in this code...
More information about the mesa-stable
mailing list