gallium: add a way to query min/max texture gather offsets

Defaults to providing the same offsets as MIN/MAX_TEXEL_OFFSET. For
nvc0, the offset can be -32/31.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
mesa/st: set min/max texture gather offset to driver-reported value

It was always getting set to -8/7 unconditionally.  Use the
driver-reported value instead.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
i965: Fix missing _NEW_SCISSOR in Broadwell SF_CLIP_VIEWPORT state.

The _Xmin/_Xmax/_Ymin/_Ymax values need to be guarded by _NEW_SCISSOR.

Fixes Piglit's scissor-many, and rendering in GNOME Shell.
Hopefully fixes similar issues with Unity and ChromeOS.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75879
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: James Ausmus <james.ausmus@intel.com>
Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
docs/relnotes: Fix consistency, add i965 to ARB_buffer_storage.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
radeon/vce: remove RVCE_NUM_CPB_EXTRA_FRAMES

Doesn't seems to be needed any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
vl: add interface for H264 B-frame encoding

Signed-off-by: Christian König <christian.koenig@amd.com>
radeon/vce: add proper CPB backtrack

Remember what frames we encoded at which position.

Signed-off-by: Christian König <christian.koenig@amd.com>
radeon/vce: implement B-frame support

Signed-off-by: Slava Grigorev <slava.grigorev@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
st/omx/enc: separate input buffer private and task structure

Keep tasks as linked list, this way we can associate
more than one encoding task with each buffer.

Signed-off-by: Christian König <christian.koenig@amd.com>
gallium/radeon: fix missing winsys include in pipe-loader.

The commit 3b0b44f7def0acb4f7a7aef086c0bece321418a6 introduced a build
error:

error: dereferencing pointer to incomplete type

This patch fixes this issue in all the affected files.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
egl-static: Fix missing radeon_surface.h includes.

Fixes

  fatal error: radeon_surface.h: No such file or directory

when libdrm is not present, or non-Linux OSes.

Trivial.
swrast: fix more fetch_texel function names

These were missed/typo'd in the previous patch series:
s/R8G8B8A/R8G8B8A8/
s/rgba_16/RGBA_UNORM16/
s/rgba_uint/RGBA_UINT/
s/rgba_int/RGBA_SINT/

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
swrast: use macros to initialize texfetch_funcs[] table

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
mesa: use _mesa_get_srgb_format_linear() in sRGB texstore functions

Instead of switch statements.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
softpipe: add PIPE_CAP_MIN/MAX_TEXTURE_GATHER_OFFSET query cases

To silence compiler warnings.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
softpipe: fix shadow sampling

And remove nonsensical approximation of linear interpolation behavior
for shadow samplers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
linker: Split set_uniform_binding into separate functions for blocks and samplers

The two code paths are quite different, and there are some problems in
the handling of uniform blocks.  Future changes will cause these paths
to diverge further.  Ultimately, selecting between the two functions
will happen at the set_uniform_binding call site, and
set_uniform_binding will be deleted.

NOTE: This patch just moves code around.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Cc: github@socker.lepus.uberspace.de
linker: Various trivial clean-ups in set_sampler_binding

- Remove the spurious block left from the previous commit and re-indent.

- Constify elements.

- Make the spec reference in the code look like other spec references in
  the compiler.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Cc: github@socker.lepus.uberspace.de
linker: Fold set_uniform_binding into call site

In the next patch, we'll see that using
gl_shader_program::UniformStorage is not correct for uniform blocks.
That means we can't use ::UniformStorage to select between the sampler
path and the block path.  Instead we want to just use the type of the
variable.  That's never passed to set_uniform_binding, and it's easier
to just remove the function (especially for later patches in the series)
than to add another parameter.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Cc: github@socker.lepus.uberspace.de
linker: Clean up "unused parameter" warnings

../../src/glsl/link_uniform_initializers.cpp:87:1: warning: unused parameter 'mem_ctx' [-Wunused-parameter]
../../src/glsl/link_uniform_initializers.cpp:87:1: warning: unused parameter 'type' [-Wunused-parameter]
../../src/glsl/link_uniform_initializers.cpp:127:1: warning: unused parameter 'mem_ctx' [-Wunused-parameter]
../../src/glsl/link_uniform_initializers.cpp:127:1: warning: unused parameter 'type' [-Wunused-parameter]

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76323
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "10.1" <mesa-stable@lists.freedesktop.org>
Cc: github@socker.lepus.uberspace.de