[Mesa-dev] [PATCH] mesa: reset offset/size to 0 when removing atomic binding

Francisco Jerez currojerez at riseup.net
Fri Feb 12 20:17:38 UTC 2016


Ilia Mirkin <imirkin at alum.mit.edu> writes:

> Similar to commit dd9d2963d6 (mesa: AtomicBufferBindings should be
> initialized to zero.), we should reset these to zero when unbinding.
> This fixes a number of dEQP failures due to cross-test pollution. The
> tests properly unbound everything, but when querying the values again,
> the expectation was that they would be 0.
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

> ---
>  src/mesa/main/bufferobj.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index de1aba4..9aec425 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
> @@ -3007,8 +3007,8 @@ set_atomic_buffer_binding(struct gl_context *ctx,
>     _mesa_reference_buffer_object(ctx, &binding->BufferObject, bufObj);
>  
>     if (bufObj == ctx->Shared->NullBufferObj) {
> -      binding->Offset = -1;
> -      binding->Size = -1;
> +      binding->Offset = 0;
> +      binding->Size = 0;
>     } else {
>        binding->Offset = offset;
>        binding->Size = size;
> -- 
> 2.4.10
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160212/0f0f67ca/attachment.sig>


More information about the mesa-dev mailing list