intel: Mention how much data we're trying to subdata in perf debug.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: Add performance debug for meta code.

I noticed a fallback in regnum through sysprof, and wanted a nicer way to
get information about it.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
mesa: Generalize TexStorage allocator between swrast and intel.

This should be reusable for other non-gallium drivers, so we can make the
extension always be available.

v2: Add a more detailed comment than the old function had (recommended
    by Brian).

Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
mesa: Introduce a globally-available minify() macro.

This matches u_minify()'s behavior, for consistency.

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: minor indentation fixes
i965: Apply CMP NULL {Switch} work-around to other Gen7s.

Listed in the restrictions section of CMP, but not on the work-arounds
page.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
gallivm: Fix assignment of unsigned values to OUT register.

TEMP is not the only register file that accept unsigned. OUT too.

Actually, what determines the appropriate type of the destination value is
not the opcode, but rather the register.

Also cleanup/simplify code.  Add a few more asserts, but also make
code more robust by handling graceful if assert fails.

This fixes segfault / assertion in the included vert-uadd.sh graw shader.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
i965: Fix a mistake in the comments for software counters.

The code doesn't set brw->query.obj to NULL, it sets query->bo to NULL.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
gallium: Add a new clip_halfz rasterizer state.

gl_rasterization_rules lumps too many different flags.

Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: Remove extra MapBufferRange in create_beginend_table()

Looks like a copy&paste typo.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
!UPSTREAM i965: Use software primitive restart when transform feedback active.

TODO: NAK this patch, since Eric's "i965: Skip resetting SOL offsets at batch start when contexts are present." should take care of it.

When transform feedback is active, the driver manually counts the
number of primitives that run through the pipeline, so that if a batch
buffer flush happens, the next batch buffer can pick up transform
feedback where the last batch buffer left off.  Hardware-accelerated
primitive restart interferes with this process (because it makes the
primitive count depend not just on the number of vertices entering the
pipeline, but also on the contents of the index buffer).  So, when
transform feedback is active, we need to fall back to the software
implementation of primitive restart.

Fixes piglit test "spec/!OpenGL 3.1/primitive-restart-xfb flush".

NOTE: This is a candidate for stable release branches.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>