/bin/bash: q : commande introuvable
r600/llvm: Read stacksize from config header
gallium/u_blitter: implement buffer clearing

Although this might be useful for ARB_clear_buffer_object,
I need it for initializating resources in r600g.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>

v2: comment cleanups

NOTE: This is a candidate for the 9.1 branch.
r600g: initialize CMASK and HTILE with the GPU using streamout

This fixes a crash when a resource cannot be mapped to the CPU's address space
because it's too big.

This puts a global pipe_context in r600_screen, which is guarded by a mutex,
so that we can use pipe_context when there isn't one around.
Hopefully our multi-context support is solid.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

NOTE: This is a candidate for the 9.1 branch.
gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center.

Squashed commit of the following:

commit 04c5fa2cbb8e89d6f2fa5a75af1cca03b1f6b852
Author: José Fonseca <jfonseca@vmware.com>
Date:   Tue Apr 23 17:37:18 2013 +0100

    gallium: s/lower_left_origin/bottom_edge_rule/

commit 4dff4f64fa83b9737def136fffd161d55e4f1722
Author: José Fonseca <jfonseca@vmware.com>
Date:   Tue Apr 23 17:35:04 2013 +0100

    gallium: Move diagram to docs.

commit 442a63012c8c3c3797f45e03f2ca20ad5f399832
Author: James Benton <jbenton@vmware.com>
Date:   Fri May 11 17:50:55 2012 +0100

    gallium: Replace gl_rasterization_rules with lower_left_origin and half_pixel_center.

    This change is necessary to achieve correct results when using OpenGL
    FBOs.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
st/mesa: depth-stencil-alpha state also depends on _NEW_BUFFERS

because the code looks at the visual if there is a depth or stencil buffer
before enabling depth or stencil, respectively.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: add a simple path to BufferData if it only discards buffer contents

Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: remove redundant _NEW_BUFFERS setting in ReadBuffer

already set by _mesa_readbuffer

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa,i965: use NewDriverState to communicate TFB state changes with the driver

_NEW_TRANSFORM_FEEDBACK is not used by core Mesa, so it can be removed.
Instead, an new private flag is added to i965 to serve the same purpose.

If you're new to this:

* When creating a context. you can set private dirty flags
  in gl_context::DriverFlags, eg.:
    ctx->DriverFlags.NewStateX = BRW_NEW_STATE_X;

* When StateX is changed, core Mesa does:
    ctx->NewDriverState |= ctx->DriverFlags.NewStateX;

* When you have to draw, read and clear ctx->NewDriverState.

* Pros: not touching NewState, the driver decides the mapping between
  GL states and hw state groups, unlimited number of flags in core Mesa
  (still limited number of flags in the driver though)

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: convert _NEW_RASTERIZER_DISCARD to a driver flag

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: remove _NEW_PACKUNPACK

No driver checks the flag. Nobody uses it.

I also removed the FLUSH_VERTICES calls, because PixelStorei has no effect
on rendering.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: don't set _NEW_BUFFERS in GenerateMipmap and BlitFramebuffer

both functions don't change the framebuffer in any way
(if mesa_meta is not used)

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: don't flush and don't flag _NEW_STENCIL in ClearStencil, ActiveStencilFace

The functions don't affect driver state. There is no code that would rely
on vertices being flushed prior to changing the states, and no code that
would check for _NEW_STENCIL before using the states.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: don't flush vertices and don't flag _NEW_DEPTH in ClearDepth

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: don't flag _NEW_DEPTH in Begin/EndQuery if driver implements the functions

We don't want to set the flag for Gallium.

I think only swrast needs the flag to be set for occlusion queries.

v2: fix stats_wm updates in i965

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: don't flush vertices and don't flag _NEW_COLOR for GL_CLAMP_READ_COLOR

There used to be a derived state _ClampReadColor, so setting _NEW_COLOR
made sense. The state is gone now.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: don't flush vertices and don't flag _NEW_COLOR in ClearColor, ClearIndex

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: remove unused opcodes AND, DP2A, NOT, NRM3, NRM4, OR, PRINT, XOR

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
mesa: use new _mesa_inside_begin_end() function

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: use new _mesa_inside_dlist_begin_end() function

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>