gallium: allow setting of the internal stream output offset

D3D10 allows setting of the internal offset of a buffer, which is
in general only incremented via actual stream output writes. By
allowing setting of the internal offset draw_auto is capable
of rendering from buffers which have not been actually streamed
out to. Our interface didn't allow. This change functionally
shouldn't make any difference to OpenGL where instead of an
append_bitmask you just get a real array where -1 means append
(like in D3D) and 0 means do not append.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
radeon: Fix build.

Fix build error introduced with commit
dfa25ea5cd19d5a050a1c94bd7370a2259b9f007.

  CC       r600_streamout.lo
r600_streamout.c:108:6: error: conflicting types for 'r600_set_streamout_targets'
void r600_set_streamout_targets(struct pipe_context *ctx,
     ^
./r600_pipe_common.h:413:6: note: previous declaration is here
void r600_set_streamout_targets(struct pipe_context *ctx,
     ^

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76009
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
automake: use MKDIR_P when possible

Use the automake predefined macro over hardcoding mkdir -p everywhere.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
automake: silence folder creation

There is little gain in printing whenever a folder is created.

v2:
 - Use $(AM_V_at) over @ to have control in verbose builds.
Suggested by Erik Faye-Lund.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
automake: use only the folder name if it's a subfolder of the present one

v2: Resolve rebase conflicts.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
automake: make install-lib-links less chatty

There is little point in echoing everything that the script does
to stdout. Wrap it in AM_V_GEN so that a reasonable message is
printed as a indication of it's invocation.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
automake: use install-lib-links.mk across all classic mesa

Use the handy script and minimise the boilerplate in the makefiles.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
automake: introduce install-gallium-links.mk

This helper script will be used to minimise the duplication
during link generation across all gallium targets.

v2:
 - Handle vdpau_LTLIBRARIES. Requested by Christian König.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
targets/dri: use install-gallium-links.mk

Drop the duplication across all dri targets.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
targets/vdpau: use install-gallium-links.mk

Drop the duplication across all vdpau targets.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
gallium/targets: drop link generation for non DRI targets

All three (xvmc and omx) do not have an alternative loading
similar to the dri modules. Thus one needs to explicitly install
them in order to use/test them.

v2:
 - Keep vdpau targets, as an equivalent of LIBGL_DRIVERS_PATH
is being worked on.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
gallium/targets: use install-gallium-targets.mk

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
configure: remove old makefile variables

All the variables were used before the automake conversion
and do not make sense (nor are used) currently.

Replace GL_LIB_NAME with lib$(GL_LIB).$(LIB_EXTENSION) for
apple-glx. The build has been broken for ages, but this will
ease the recovery process as it happens.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
automake: do not use symbols names for static glapi.la

In the cases where one links against the static glapi.la there
is no need to create temporary variables only to explicitly
link agaist it.

Instead use SHARED_GLAPI_LIB to explicitly indicate when one
is building and linking with the shared glapi provider.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
configure: use LIB_EXT rather than hardcoded .so

Some platforms different library extension - dll, dylib, a.
Honor that when we are creating the required links.

Rename LIB_EXTENSION to LIB_EXT while we're here.

With libglapi linking aside, building classic drivers on
non-linux platforms should be possible now.

v2: Resolve conflicts.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
automake: create compat symlinks only for linux systems

The primary users of these are linux developers, although
it can be extended for *BSD and others if needed.

Fixes make install for Cygwin and OpenBSD at least.

v2:
 - Wrap vdpau targets as well.
v3:
 - Fold HAVE_COMPAT_SYMLINKS conditional within install*links.mk

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63269
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> (v1)
Reviewed-by: Christian König <christian.koenig@amd.com>
configure: read libomxil-bellagio.pc only when it exists

Currenly configure.ac will print a warning when one is missing the package.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Christian König <christian.koenig@amd.com>
glx/tests: honor enable-driglx-direct configure flag

Recent commit fixed build issues in dri2_query_renderer.c by
wrapping in defined(direct_rendering) && !defined(applegl)

This patch targets the query_renderer tests, so that make check
passes on platforms such as hurd and cygwin.

v2: (Emil)
 - Rebase and update commit message.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glx: cleanup unneeded headers

 - xf86dri.h is the old dri1 header, not required by dri2 nor dri3
 - fold xf86drm.h inclusiong inside dri2.h
 - dri3_glx does not have any drm specific dependencies
 - glapi.h is not required by the dri2 and dri3 codepaths

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
st/dri: build the drm backend when libdrm is present

Prevent build issues on systems lacking libdrm.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>