On Fri, 30 Sep 2011 20:59:39 -0700, Ben Widawsky <b...@bwidawsk.net> wrote:
> Clean the code up, and always use a BO when creating a new buffer. I've
> not seen any regressions but haven't yet tried this on < Gen6.

You have a bunch of different patches squashed into this here:

Replacing GL_TRUE/GL_FALSE with true/false.
Using a BO even for range-flushes
Rearranging logic.

Using a BO for range flushes is a definite behavior change that should
be separate from others and not hidden in a patch titled "i965: Cleanup
MapRangeBuffer".

> +   if (intel_obj->buffer == NULL)
> +      goto error_out;
> +
>     /* If the mapping is synchronized with other GL operations, flush
>      * the batchbuffer so that GEM knows about the buffer access for later
>      * syncing.
> @@ -322,11 +325,6 @@ intel_bufferobj_map_range(struct gl_context * ctx,
>         drm_intel_bo_references(intel->batch.bo, intel_obj->buffer))
>        intel_flush(ctx);
>  
> -   if (intel_obj->buffer == NULL) {
> -      obj->Pointer = NULL;
> -      return NULL;
> -   }
> -

I don't object to moving the code up, but making a goto for error case
used only once seems wrong.

Attachment: pgpmKOKwqGpxc.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to