glapi: Add (empty) api section for ARB_fragment_layer_viewport

This extension is purely GLSL -- there are no new GL API elements.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
mesa: Add extension plumbing for ARB_fragment_layer_viewport

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Add extension plumbing for ARB_fragment_layer_viewport

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Add builtin define for ARB_fragment_layer_viewport

The spec doesn't actually mention adding this, but this is the usual
pattern so I'm assuming it's a spec bug.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl: Add gl_Layer and gl_ViewportIndex builtins to fragment shader

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
freedreno/a3xx: WFI fixes/cleanup

Blob driver seems to need WFI in some cases after CP_EVENT_WRITE,
implying that this is asynchronous and should reset needs_wfi.
Also, CP_INVALIDATE_STATE seems to need WFI.  But CP_LOAD_STATE
does not.

The blob driver also puts WFIs before writing GRAS_CL_VPORT registers.
The latter may be a work-around, as these registers should be banked/
context registers.  I haven't yet found a lockup that this averts, but
I expect viewport to change infrequently so out of paranoia I will
keep these for now.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
freedreno: use util_copy_framebuffer_state()

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Partially revert "glsl: Add builtin define for ARB_fragment_layer_viewport"

This partially reverts commit cc18b1ec2161c846109e921d7821dfeef7a06f3a,
which dropped some unrelated code due to a fumbled rebase.
targets/vdpau-nouveau: convert to static/shared pipe-drivers

Create a single library (for the vdpau api) thus reducing
the overall size of mesa. Current commit converts
vdpau-nouveau, with upcomming commits handling the rest.

The library can be built with the relevant pipe-drivers
statically linked in, or loaded as shared modules.
Currently we default to static.

Add SPLIT_TARGETS to guard the other VL targets.

Note: symlink handling is rather ugly and will need an
update to work with BSD and other non-linux platforms.

v2: Split the conversion into per-target basis.

Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Thomas Helland <thomashelland90 at gmail.com>
targets/r600/vdpau: convert to static/shared pipe-drivers

Similar to previous commit, this allows us to minimise some
of the duplication by compacting all vdpau targets into a
single library.

v2: Include the radeon winsys only when there is a user for it.
v3: Correcly include the winsys. Now with extra brown bag :\

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Thomas Helland <thomashelland90 at gmail.com>
targets/radeonsi/vdpau: convert to static/shared pipe-drivers

Similar to previous commits, this allows us to minimise some
of the duplication by compacting all vdpau targets into a
single library.

v2: Include the radeon winsys only when there is a user for it.
v3: Correcly include the winsys. Now with extra brown bag :\

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Thomas Helland <thomashelland90 at gmail.com>
targets/xvmc-nouveau: convert to static/shared pipe-drivers

Similar to vdpau targets, we're going to convert the individual
target libraries into a single one.

The library can be built with the relevant pipe-drivers
statically linked in, or loaded as shared modules.
Currently we default to static.

Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Thomas Helland <thomashelland90 at gmail.com>
targets/r600/xvmc: convert to static/shared pipe-drivers

The r600 equivalent of previous commit.

v2: Correctly include the radeon winsys/radeon_common.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Thomas Helland <thomashelland90 at gmail.com>