docs: update nvc0 state

ARB_texture_buffer_object_rgb32 has been supported for a while already.
nv30: remove use_nv4x, it is identical to is_nv4x

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv30: remove unused render_mode and hw_pointsprite_control

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv30: remove unused sprite flipping parameter

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv30: remove nv30_context use from nvfx_*prog

This should pave the way to being able to use the compiler without a
context. Also leads to cleaner code.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nouveau: add a nouveau_compiler binary to compile TGSI into shader ISA

This makes it easy to compare output between different cards, especially
for ones that you don't have (and/or not in the current machine).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
i965: Only emit VS state pipe control workaround on IVB and BYT.

According to the BSpec's 3D workarounds page, this is unnecessary on
shipping Haswell hardware, and was never necessary on Broadwell.  It
unfortunately doesn't say anything about Baytrail.

The workaround database confirms those results for Ivybridge, Haswell,
and Broadwell.  Baytrail is less clear - one page says it's necessary,
while the other says it isn't.  For now, be conservative and leave it
enabled.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
i965: Convert VUE map generation checks to if rather than switch.

There are currently only two VUE map layouts: one for Gen4-5, and one
for everything else.  We keep having to add new "case N+1" labels for
every new hardware generation, and so far it's always been the same.

This patch makes it so we only have to do work in the case where
something actually changes.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
util/u_format: don't crash in util_format_translate if we can't do translation

Some formats can't be handled - in particular cannot handle ints/uints formats,
which lack the pack_rgba_float/unpack_rgba_float functions. Instead of trying
to call these (and crash) return an error (I'm not sure yet if we should try
to translate such formats too here might not make much sense).

v2: suggested by Jose, use separate checks for pack/unpack of rgba_8unorm and
rgba_float functions (right now if one exists the other should as well).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
meta: Restore API at the end of _mesa_meta_end(), not the start.

In _mesa_meta_begin(), we switch to API_OPENGL_COMPAT, then munge a lot
of state (including some that doesn't exist in the actual API - like
PolygonStipple in API_OPENGL_CORE).

It seems reasonable that in _mesa_meta_end(), we should restore it,
then switch back to the original API.  This at least makes it symmetric.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
meta: Drop ctx->API checks.

API is always API_OPENGL_COMPAT (since commit 4e4a537ad55f61a25,
"meta: Push into desktop GL mode when doing meta operations."),
so most of these checks do nothing.

We could instead check save->API to only bother setting/restoring
relevant GL state, but I'm not sure saving a few _mesa_set_enable
calls is worth the complexity.  My understanding is the point of
the ctx->API guards was to avoid raising GL errors.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>