nv50: handle gl_Layer writes in GP

Marks gl_Layer as only having one component, and makes sure to keep
track of where it is and emit it in the output map, since it is not an
input to the FP.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: enable primitive id generation when it is an FP input without GP

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: VP_RESULT_MAP_SIZE has to be positive

Make sure that we never try to use a 0-sized map. This can happen when
using a gp, so add a dummy mapping when computing vp_gp_mapping in that
case.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: GP_REG_ALLOC_RESULT must be positive

Set max_out to 1 when there are no outputs.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: allocate an extra code bo to avoid dmesg spam

Each code BO is a heap that allocates at the end first, and so GPs are
allocated at the very end of the allocated space. When executing, we see
PAGE_NOT_PRESENT errors for the next page. Just over-allocate to make
sure that there's something there.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: don't forget to also clear additional layers

Fixes most of the tests/spec/gl-3.2/layered-rendering/* piglits.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nvc0: don't forget to also clear additional layers

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: add comments about CB_AUX contents

Updates a few inconsistencies as well, like the size of the buffer,
location of the runout, etc.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: copy nvc0's get_sample_position implementation

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: add support for textureFetch'ing MS textures, ARB_texture_multisample

Creates two areas in the AUX constbuf:
 - Sample offsets for MS textures
 - Per-texture MS settings

When executing a textureFetch with a MS sampler, looks up that texture's
settings and adjusts the parameters given to the texfetch instruction.

With this change, all the ARB_texture_multisample piglits pass, so turn
on PIPE_CAP_TEXTURE_MULTISAMPLE.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: report glsl 1.50 now that gp tests pass

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
nv50: enable seamless cube maps on all hw

Some of the hardware support is missing. The NVIDIA-provided driver,
which claims seamless cube map support fails the relevant tests as well.
As this is the last extension before we can have OpenGL 3.2, doing this
allows us to expose geometry shaders without doing the additional
work involved in supporting ARB_geometry_shader4.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>