mesa/bufferobj: don't double negate the range
authorDave Airlie <airlied@redhat.com>
Mon, 23 Oct 2017 00:34:54 +0000 (10:34 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 23 Oct 2017 22:40:23 +0000 (08:40 +1000)
This fixes a regression I introduced refactoring this code,
I managed to invert range twice, I moved the inversion into
the common code, but forgot to stop doing it in the callee.

Fixes: GL45-CTS.multi_bind.dispatch_bind_buffers_base
Fixes: 35ac13ed3 (mesa/bufferobj: consolidate some codepaths between ubo/ssbo/atomics.)
Reported-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/bufferobj.c

index b7a969265acac840ee68d53321ba32b07c925017..dfeea94bd19d0aacba3dbd3445e1c160389a8720 100644 (file)
@@ -3815,7 +3815,7 @@ bind_uniform_buffers(struct gl_context *ctx, GLuint first, GLsizei count,
       }
 
       set_buffer_multi_binding(ctx, buffers, i, caller,
-                               binding, offset, size, !range,
+                               binding, offset, size, range,
                                USAGE_UNIFORM_BUFFER);
    }
 
@@ -3916,7 +3916,7 @@ bind_shader_storage_buffers(struct gl_context *ctx, GLuint first,
       }
 
       set_buffer_multi_binding(ctx, buffers, i, caller,
-                               binding, offset, size, !range,
+                               binding, offset, size, range,
                                USAGE_SHADER_STORAGE_BUFFER);
    }
 
@@ -4238,7 +4238,7 @@ bind_atomic_buffers(struct gl_context *ctx,
       }
 
       set_buffer_multi_binding(ctx, buffers, i, caller,
-                               binding, offset, size, !range,
+                               binding, offset, size, range,
                                USAGE_ATOMIC_COUNTER_BUFFER);
    }