platform/upstream/mesa.git
8 years agofreedreno: fix stream-out offset handling for lines/tris
Rob Clark [Tue, 12 Apr 2016 16:11:07 +0000 (12:11 -0400)]
freedreno: fix stream-out offset handling for lines/tris

We need to increment offset by # of vertices, not by # of prims.  Fixes
a bunch of dEQP fails involving prims other than points.  For example,
dEQP-GLES3.functional.transform_feedback.position.lines_separate

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: fix handling for stream-out offsets
Rob Clark [Tue, 12 Apr 2016 15:30:31 +0000 (11:30 -0400)]
freedreno: fix handling for stream-out offsets

If changed && append, we shouldn't be resetting the internal offset back
to zero.  This fixes issues w/ sequences like:

   glBeginTransformFeedback()
   glDraw()
   glPauseTransformFeedback()
   glDraw()
   glResumeTransformFeedback()
   glDraw()
   glEndTransformFeedback()

Fixes dEQP-GLES3.functional.transform_feedback.array.separate.points.lowp_vec3
and related tests.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: fix prims-emitted query
Rob Clark [Tue, 12 Apr 2016 00:53:13 +0000 (20:53 -0400)]
freedreno: fix prims-emitted query

This should only count when TF is not paused.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: fix max-line-width
Rob Clark [Mon, 11 Apr 2016 21:46:08 +0000 (17:46 -0400)]
freedreno: fix max-line-width

dEQP noticed that we were advertising completely bogus values.  The
actual maximum is 127.0f.

*But* we have to use an artifically low maximum to work around a bug
in the dEQP test, which gets confused when the max line width is too
large and lines start going off-screen.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: add flag to enable dEQP hacks
Rob Clark [Mon, 11 Apr 2016 21:55:37 +0000 (17:55 -0400)]
freedreno: add flag to enable dEQP hacks

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/ir3: hack to avoid getting stuck in a loop
Rob Clark [Mon, 11 Apr 2016 17:03:51 +0000 (13:03 -0400)]
freedreno/ir3: hack to avoid getting stuck in a loop

There are still some edge cases which result in a neighbor-loop.  Which
needs to be fixed, but this hack at least makes deqp tests finish.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/ir3: use (ss) instead of (sy) for ldlv
Rob Clark [Mon, 11 Apr 2016 16:57:31 +0000 (12:57 -0400)]
freedreno/ir3: use (ss) instead of (sy) for ldlv

Fixes a bunch of flat-varying fail on a4xx (where we need to use ldlv to
read the un-interpolated varying).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/ir3: cleanup double cmps.s from frontend
Rob Clark [Thu, 7 Apr 2016 16:53:07 +0000 (12:53 -0400)]
freedreno/ir3: cleanup double cmps.s from frontend

Since we cannot mov into a predicate register, the frontend uses a
'cmps.s p0.x, cond, 0' as a stand-in for mov to p0.x.  It does this
since it has no way to know that the source cond instruction (ie.
for a kill, br, etc) will only be used to write the predicate reg.
Detect this, and re-write the instruction writing p0.x to skip the
original cmps.[sfu].  (It is done like this, rather than re-writing
the dest of the first cmps.[sfu] in case the first cmps.[sfu]
actually has other users.)

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoglsl: Rename "vertex_input_slots" -> "is_vertex_input"
Matt Turner [Tue, 12 Apr 2016 22:26:06 +0000 (15:26 -0700)]
glsl: Rename "vertex_input_slots" -> "is_vertex_input"

vertex_input_slots would be an appropriate name for an integer, but not
a bool.

Also remove a cond ? true : false from a count_attribute_slots() call
site, noticed during the rename.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
8 years agogallivm: Workaround LLVM PR 27332.
Jose Fonseca [Wed, 13 Apr 2016 14:41:55 +0000 (15:41 +0100)]
gallivm: Workaround LLVM PR 27332.

The credit for finding and isolating this bug goes to Vinson and Roland.

The buggy LLVM versions were found by doing

  opt -instcombine llvm-pr27332.ll > /dev/null

where llvm-pr27332.ll is the IR from
https://llvm.org/bugs/show_bug.cgi?id=27332#c3

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agogallium/radeon: move a comment to the correct place
Marek Olšák [Wed, 13 Apr 2016 15:27:02 +0000 (17:27 +0200)]
gallium/radeon: move a comment to the correct place

trivial

8 years agoradeonsi: gate PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT by LLVM version
Nicolai Hähnle [Wed, 13 Apr 2016 14:11:44 +0000 (09:11 -0500)]
radeonsi: gate PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT by LLVM version

Otherwise we incorrectly claim ARB_ssbo support even with older LLVM versions.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94917
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agodoxygen: Generate Doxygen for NIR
Elie TOURNIER [Sat, 9 Apr 2016 13:48:13 +0000 (15:48 +0200)]
doxygen: Generate Doxygen for NIR

Now, one can do the following to generate and read the nir Doxygen:
cd $MESA_TOP/doxygen
make
firefox nir/index.html

Update v2:
Correct TAGFILES in nir.doxy

Signed-off-by: Elie TOURNIER <tournier.elie@gmail.com>
Reviewed-by: Rhys Kidd <rhyskidd@gmail.com>
[Emil Velikov] v3: Rebase.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: update glsl link
Elie TOURNIER [Thu, 7 Apr 2016 21:21:21 +0000 (23:21 +0200)]
doxygen: update glsl link

Signed-off-by: Elie TOURNIER <tournier.elie@gmail.com>
Reviewed-by: Rhys Kidd <rhyskidd@gmail.com>
Tested-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: Remove deprecated settings in common.doxy
Rhys Kidd [Sat, 9 Apr 2016 20:43:26 +0000 (16:43 -0400)]
doxygen: Remove deprecated settings in common.doxy

These Doxygen features are deprecated, as reported by Doxygen 1.8.9.1

Warning: Tag `USE_WINDOWS_ENCODING' at line 66 of file `common.doxy' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `DETAILS_AT_TOP' at line 157 of file `common.doxy' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `HTML_ALIGN_MEMBERS' at line 616 of file `common.doxy' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `XML_SCHEMA' at line 848 of file `common.doxy' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `XML_DTD' at line 854 of file `common.doxy' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `MAX_DOT_GRAPH_WIDTH' at line 1115 of file `common.doxy' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `MAX_DOT_GRAPH_HEIGHT' at line 1123 of file `common.doxy' has become obsolete.
         To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: Fix typo in doxygen/tnl.doxy
Rhys Kidd [Sat, 9 Apr 2016 20:43:25 +0000 (16:43 -0400)]
doxygen: Fix typo in doxygen/tnl.doxy

TAGFILE relative folder should match .tag file

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: Correct TAGFILE linkage of main
Rhys Kidd [Sat, 9 Apr 2016 20:43:24 +0000 (16:43 -0400)]
doxygen: Correct TAGFILE linkage of main

core.doxy was renamed to main.doxy, along with output folder in
the below 2004 commit.

Correct the other modules' TAGFILE linkage to find the main folder.

  commit 3ef972f538e1ff207f5919a8068bf14af18fb270
  Author: Brian Paul <brian.paul@tungstengraphics.com>
  Date:   Sun May 16 22:07:02 2004 +0000

      Replaced 'core' with 'main'.
      Other minor updates.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: Update .gitignore
Rhys Kidd [Sat, 9 Apr 2016 20:43:23 +0000 (16:43 -0400)]
doxygen: Update .gitignore

The last of these output directories was removed in 2007.

  commit c2e0570831ae130fce1fa374bebe25bb9c561e29
  Author: Jerome Glisse <glisse@freedesktop.org>
  Date:   Fri Feb 16 23:18:56 2007 +0100

      Update doxygen doc to reflet vbo changes.

      Update doxygen doc, array_cache no longuer exist,
      new shiny vbo modules is there. Tested on unix,
      but i think i didn't broke that bat :).

  commit 3ef972f538e1ff207f5919a8068bf14af18fb270
  Author: Brian Paul <brian.paul@tungstengraphics.com>
  Date:   Sun May 16 22:07:02 2004 +0000

      Replaced 'core' with 'main'.
      Other minor updates.

  commit 69db632a9df035cdc852cc64fb14038919929a70
  Author: Jose Fonseca <j_r_fonseca@yahoo.co.uk>
  Date:   Thu May 1 23:32:54 2003 +0000

      Move the Doxygen configuration files into the usual places and integrate with the build system.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: Remove references to miniglx
Rhys Kidd [Sat, 9 Apr 2016 20:43:22 +0000 (16:43 -0400)]
doxygen: Remove references to miniglx

miniglx was removed in February 2010. Clean up remaining
unnecessary doxygen references.

  commit a9e36696837b2c31ecee4017a0adffbd987c1eff
  Author: Kristian Høgsberg <krh@bitplanet.net>
  Date:   Thu Feb 25 16:17:04 2010 -0500

      Remove remaining miniglx references

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: Fix doxygen/gbm.doxy TAGFILES
Rhys Kidd [Sat, 9 Apr 2016 20:43:21 +0000 (16:43 -0400)]
doxygen: Fix doxygen/gbm.doxy TAGFILES

There has never been a doxygen/gbm_setup output folder.

Appears to have been a copy-paste error from original commit
in 245341f406bbdf23fec3d8ea8ad95c147c11ad1c.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: Correct TAGFILE relative paths
Rhys Kidd [Sat, 9 Apr 2016 20:43:20 +0000 (16:43 -0400)]
doxygen: Correct TAGFILE relative paths

Per Doxygen documentation, to combine external documentation (stored in
a *.tag file) with a project the TAGFILES option should be set in the
configuration file.

  A tag file typically only contains a relative location of the
  documentation from the point where doxygen was run. So when
  you include a tag file in other project you have to specify
  where the external documentation is located in relation this
  project.

  You can do this in the configuration file by assigning the
  (relative) location to the tag files specified after the
  TAGFILES configuration option.

  If you use a relative path it should be relative with respect
  to the directory where the HTML output of your project is
  generated; so a relative path from the HTML output directory
  of a project to the HTML output of the other project that is
  linked to.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: Fix doxygen/glapi.doxy
Rhys Kidd [Sat, 9 Apr 2016 20:43:19 +0000 (16:43 -0400)]
doxygen: Fix doxygen/glapi.doxy

The src/mesa/glapi folder was relocated in the below commit.
Amend the doxygen/glapi.doxy INPUT setting accordingly.

Whilst here, in addition this change also avoids a bug in the
consolidated Doxygen output caused by doxygen/glapi.doxy inadvertently
overwriting doxygen/swrast.tag via its GENERATE_TAGFILE setting.

This bug depended upon the specific order each *.tag was built.

   commit 296adbd545b8efd38c9ed508166b2de2764a444b
   Author: Chia-I Wu <olv@lunarg.com>
   Date:   Mon Apr 26 12:56:44 2010 +0800

       glapi: Move to src/mapi/.

       Move glapi to src/mapi/{glapi,es1api,es2api}.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodoxygen: Remove src/mesa/shader/ references
Rhys Kidd [Sat, 9 Apr 2016 20:43:18 +0000 (16:43 -0400)]
doxygen: Remove src/mesa/shader/ references

Mesa has not had a src/mesa/shader/ folder since Mesa 7.9 removed it
in October 2010, as part of a revised GLSL compiler written by Intel.

Remove doxygen/shader.doxy and consequential changes made throughout.

In addition to removing an unnecessary Doxygen doxyfile, this change also
avoids a bug in the consolidated Doxygen output caused by
doxygen/shader.doxy inadvertently overwriting doxygen/swrast.tag via its
GENERATE_TAGFILE setting.

This bug depended upon the specific order each *.tag was built.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
8 years agogallium/radeon: add an env variable to force a level of aniso filtering
Marek Olšák [Mon, 11 Apr 2016 15:54:51 +0000 (17:54 +0200)]
gallium/radeon: add an env variable to force a level of aniso filtering

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agollvmpipe: Test rounding of x.5.
Jose Fonseca [Wed, 13 Apr 2016 10:07:45 +0000 (11:07 +0100)]
llvmpipe: Test rounding of x.5.

Leverage nearbyintif function, which should be available on all C99
implementations.

Trivial.

8 years agogallivm: use llvm.nearbyint instead of llvm.round.
Roland Scheidegger [Wed, 13 Apr 2016 03:00:03 +0000 (05:00 +0200)]
gallivm: use llvm.nearbyint instead of llvm.round.

We used to use sse roundps intrinsic directly, but switched to use the llvm
intrinsics for rounding with e4f01da15d8c6ce3e8c77ff3ff3d2ce2574a3f7b.
However, llvm semantics follows standard math lib round function which is
specced to do roundNearestAwayFromZero but we really want roundNearestEven
(moreoever, using round generates atrocious code since the cpu can't do it
directly and it results in scalar calls to libm __roundf).
So, use llvm.nearbyint instead, which does exactly the right thing, and even
has the advantage of being available with llvm 3.3 too. (I've verified it
actually generates a roundps instruction with llvm 3.3.)

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=94909

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
8 years agonv50/ra: `isinf()` is in namespace `std` since C++11.
Pierre Moreau [Fri, 18 Mar 2016 00:17:31 +0000 (01:17 +0100)]
nv50/ra: `isinf()` is in namespace `std` since C++11.

This fixes a compile error while building Nouveau with C++11 enabled (and
glibc >= 2.23). This happens if SWR is enabled, as it forces C++11.

Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
https://bugs.freedesktop.org/show_bug.cgi?id=94907

8 years agoscons: Allow building with Address Sanitizer.
Jose Fonseca [Sat, 9 Apr 2016 19:26:42 +0000 (20:26 +0100)]
scons: Allow building with Address Sanitizer.

libasan is never linked to shared objects (which doesn't go well with
-z,defs).  It must either be linked to the main executable, or (more
practically for OpenGL drivers) be pre-loaded via LD_PRELOAD.

Otherwise works.

I didn't find anything with llvmpipe.  I suspect the fact that the
JIT compiled code isn't instrumented means there are lots of errors it
can't catch.

But for non-JIT drivers, the Address/Leak Sanitizers seem like a faster
alternative to Valgrind.

Usage (Ubuntu 15.10):

   scons asan=1 libgl-xlib
   export LD_LIBRARY_PATH=$PWD/build/linux-x86_64-debug/gallium/targets/libgl-xlib
   LD_PRELOAD=libasan.so.2 any-opengl-application

Acked-by: Roland Scheidegger <sroland@vmware.com>
8 years agomesa: Change an error code in glSamplerParameterI[iu]v().
Kenneth Graunke [Tue, 12 Apr 2016 22:23:47 +0000 (15:23 -0700)]
mesa: Change an error code in glSamplerParameterI[iu]v().

This is supposed to be INVALID_OPERATION in ES.  We already did this
for the fv/iv variants, but not Iiv/Iuv, which are new in ES 3.2 (or
extensions).

Fixes:
ES31-CTS.texture_border_clamp.samplerparameteri_non_gen_sampler_error

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
8 years agosoftpipe: Free tgsi.image elements on context destruction.
Jose Fonseca [Tue, 12 Apr 2016 16:03:52 +0000 (17:03 +0100)]
softpipe: Free tgsi.image elements on context destruction.

Courtesy of address sanitizer.

[airlied: free buffers as well]
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agosoftpipe: Enable ARB_framebuffer_no_attachments
Edward O'Callaghan [Sun, 10 Apr 2016 07:41:30 +0000 (17:41 +1000)]
softpipe: Enable ARB_framebuffer_no_attachments

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agovc4: Work around hardware limits on the number of verts in a single draw.
Eric Anholt [Fri, 12 Dec 2014 23:17:53 +0000 (15:17 -0800)]
vc4: Work around hardware limits on the number of verts in a single draw.

Fixes rendering failures in glmark2's refract and
bump:render-mode=high-poly demos, and partially in its terrain demo.

8 years agosoftpipe: avoid buffer overflow
Thomas Hindoe Paaboel Andersen [Wed, 13 Apr 2016 01:06:06 +0000 (03:06 +0200)]
softpipe: avoid buffer overflow

Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agotgsi: fix buffer overflow
Thomas Hindoe Paaboel Andersen [Wed, 13 Apr 2016 01:06:05 +0000 (03:06 +0200)]
tgsi: fix buffer overflow

Increase r to four channels as rgba is written to it
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoswr: handle pci cap requests
Tim Rowley [Sat, 2 Apr 2016 00:58:29 +0000 (19:58 -0500)]
swr: handle pci cap requests

Reviewed-by: George Kyriazis <george.kyriazis@intel.com>
8 years agoswr: support samplers in vertex shaders
Tim Rowley [Thu, 31 Mar 2016 03:40:25 +0000 (22:40 -0500)]
swr: support samplers in vertex shaders

Reviewed-by: George Kyriazis <george.kyriazis@intel.com>
8 years agoradeonsi: enable GLSL 4.20 and therefore OpenGL 4.2
Nicolai Hähnle [Fri, 18 Mar 2016 00:53:36 +0000 (19:53 -0500)]
radeonsi: enable GLSL 4.20 and therefore OpenGL 4.2

This is the last necessary bit for OpenGL 4.2 support. All driver-specific
functionality has already been implemented as part of extensions.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agova: check null context in vlVaDestroyContext
Iurie Salomov [Tue, 12 Apr 2016 22:24:30 +0000 (23:24 +0100)]
va: check null context in vlVaDestroyContext

Signed-off-by: Iurie Salomov <iurcic@gmail.com>
Reviewed-by: Julien Isorce <j.isorce@samsung.com>
8 years agonir/clone: Copy bit size when cloning registers
Jason Ekstrand [Mon, 11 Apr 2016 21:46:14 +0000 (14:46 -0700)]
nir/clone: Copy bit size when cloning registers

Reported-by: Mark Janes <mark.a.janes@intel.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
8 years agoradeonsi: fix a critical SI hang since PIPELINESTAT_START/STOP was added
Marek Olšák [Tue, 12 Apr 2016 21:39:42 +0000 (23:39 +0200)]
radeonsi: fix a critical SI hang since PIPELINESTAT_START/STOP was added

For some reason unknown to me, SI hangs if the event is written after
CONTEXT_CONTROL.

8 years agoglsl: Don't copy propagate or tree graft precise values.
Kenneth Graunke [Sun, 3 Apr 2016 09:02:12 +0000 (02:02 -0700)]
glsl: Don't copy propagate or tree graft precise values.

This is kind of a hack.  We currently track precise requirements
by decorating ir_variables.  Propagating or grafting the RHS of an
assignment to a precise value into some other expression tree can
lose those decorations.

In the long run, it might be better to replace these ir_variable
decorations with an "exact" decoration on ir_expression nodes,
similar to what NIR does.

In the short run, this is probably good enough.  It preserves
enough information for glsl_to_nir to generate "exact" decorations,
and NIR will then handle optimizing these expressions reasonably.

Fixes ES31-CTS.gpu_shader5.precise_qualifier.

v2: Drop invariant handling, as it shouldn't be necessary (caught
    by Jason Ekstrand).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965/tiled_memcpy: Fix rgba8_copy_16_aligned_dst() typo
Kristian Høgsberg Kristensen [Tue, 12 Apr 2016 22:23:17 +0000 (15:23 -0700)]
i965/tiled_memcpy: Fix rgba8_copy_16_aligned_dst() typo

Copy and paste error in commit eafeb8db66dae7619ff3cb039706b990d718cba7:

    i965/tiled_memcpy: Unroll bytes==64 case.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
8 years agoglsl/linker: Recurse on struct fields when adding shader variables
Kristian Høgsberg Kristensen [Mon, 11 Apr 2016 21:28:18 +0000 (14:28 -0700)]
glsl/linker: Recurse on struct fields when adding shader variables

ARB_program_interface_query requires that we add struct fields
recursively down to basic types.

Fixes 52 struct test cases in dEQP-GLES31.functional.program_interface_query.*

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoglsl/linker: Pass name and type through to create_shader_variable()
Kristian Høgsberg Kristensen [Mon, 11 Apr 2016 20:06:07 +0000 (13:06 -0700)]
glsl/linker: Pass name and type through to create_shader_variable()

No functional change here, but this now lets us recurse throught structs
in add_shader_variable().

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoglsl/linker: Pass absolute location to add_shader_variable()
Kristian Høgsberg Kristensen [Mon, 11 Apr 2016 20:03:12 +0000 (13:03 -0700)]
glsl/linker: Pass absolute location to add_shader_variable()

This lets us pass in the absolution location of a variable instead of
computing it in add_shader_variable() based on variable location and
bias. This is in preparation for recursing into struct variables.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoglsl/linker: Add add_shader_variable() helper
Kristian Høgsberg Kristensen [Mon, 11 Apr 2016 19:57:41 +0000 (12:57 -0700)]
glsl/linker: Add add_shader_variable() helper

This consolidates the combination of create_shader_variable() and
add_program_resource() into a new helper function. No functional
difference, but we'll expand add_shader_variable() in the next few
commits.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoi965/tiled_memcpy: Unroll bytes==64 case.
Matt Turner [Mon, 11 Apr 2016 18:59:59 +0000 (11:59 -0700)]
i965/tiled_memcpy: Unroll bytes==64 case.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agoi965/tiled_memcpy: Provide SSE2 for RGBA8 <-> BGRA8 swizzle.
Roland Scheidegger [Fri, 29 Jan 2016 02:18:36 +0000 (03:18 +0100)]
i965/tiled_memcpy: Provide SSE2 for RGBA8 <-> BGRA8 swizzle.

The existing code uses SSSE3, and because it isn't compiled in a
separate file compiled with that, it is usually not used (that, of
course, could be fixed...), whereas SSE2 is always present with 64-bit
builds.  This should be pretty much as fast as the pshufb version,
albeit those code paths aren't really used on chips without llc in any
case.

v2: fix andnot argument order, add comments
v3: use pshuflw/hw instead of shifts (suggested by Matt Turner), cut comments
v4: [mattst88] Rebase

Reviewed-by: Matt Turner <mattst88@gmail.com>
8 years agoi965/tiled_memcpy: Move SSSE3 code back into inline functions.
Matt Turner [Mon, 11 Apr 2016 18:47:21 +0000 (11:47 -0700)]
i965/tiled_memcpy: Move SSSE3 code back into inline functions.

This will make adding SSE2 code a lot cleaner.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agoi965/tiled_memcpy: Optimize RGBA -> BGRA swizzle.
Matt Turner [Fri, 8 Apr 2016 22:30:30 +0000 (15:30 -0700)]
i965/tiled_memcpy: Optimize RGBA -> BGRA swizzle.

Replaces four byte loads and four byte stores with a load, bswap,
rotate, store; or a movbe, rotate, store.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agoradeonsi: fix bounds check in si_create_vertex_elements
Nicolai Hähnle [Tue, 12 Apr 2016 17:23:31 +0000 (12:23 -0500)]
radeonsi: fix bounds check in si_create_vertex_elements

This was triggered by
dEQP-GLES3.functional.vertex_array_objects.all_attributes

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agodocs: mark atomic counters and SSBOs as done for radeonsi
Nicolai Hähnle [Mon, 21 Mar 2016 22:31:15 +0000 (17:31 -0500)]
docs: mark atomic counters and SSBOs as done for radeonsi

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: enable shader buffer pipe caps
Nicolai Hähnle [Tue, 15 Mar 2016 21:25:42 +0000 (16:25 -0500)]
radeonsi: enable shader buffer pipe caps

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: add shader buffer support to TGSI_OPCODE_RESQ
Nicolai Hähnle [Wed, 16 Mar 2016 23:03:19 +0000 (18:03 -0500)]
radeonsi: add shader buffer support to TGSI_OPCODE_RESQ

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: add shader buffer support to TGSI_OPCODE_STORE
Nicolai Hähnle [Wed, 16 Mar 2016 22:03:02 +0000 (17:03 -0500)]
radeonsi: add shader buffer support to TGSI_OPCODE_STORE

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: add shader buffer support to TGSI_OPCODE_LOAD
Nicolai Hähnle [Wed, 16 Mar 2016 00:11:38 +0000 (19:11 -0500)]
radeonsi: add shader buffer support to TGSI_OPCODE_LOAD

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: add shader buffer support to TGSI_OPCODE_ATOM*
Nicolai Hähnle [Wed, 16 Mar 2016 00:02:38 +0000 (19:02 -0500)]
radeonsi: add shader buffer support to TGSI_OPCODE_ATOM*

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: add offset parameter to buffer_append_args
Nicolai Hähnle [Wed, 16 Mar 2016 00:00:11 +0000 (19:00 -0500)]
radeonsi: add offset parameter to buffer_append_args

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: adjust buffer_append_args to take a 128 bit resource
Nicolai Hähnle [Tue, 15 Mar 2016 23:47:14 +0000 (18:47 -0500)]
radeonsi: adjust buffer_append_args to take a 128 bit resource

Move the buffer resource extraction code out into its own function.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: preload shader buffers in shaders
Nicolai Hähnle [Tue, 15 Mar 2016 23:34:52 +0000 (18:34 -0500)]
radeonsi: preload shader buffers in shaders

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: implement set_shader_buffers
Nicolai Hähnle [Tue, 15 Mar 2016 21:30:56 +0000 (16:30 -0500)]
radeonsi: implement set_shader_buffers

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agoradeonsi: move resetting of constant buffers into a separate function
Nicolai Hähnle [Wed, 16 Mar 2016 22:42:57 +0000 (17:42 -0500)]
radeonsi: move resetting of constant buffers into a separate function

This will be re-used for shader buffers.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agodri/i965: fix incorrect rgbFormat in intelCreateBuffer().
Haixia Shi [Thu, 7 Apr 2016 18:05:09 +0000 (11:05 -0700)]
dri/i965: fix incorrect rgbFormat in intelCreateBuffer().

It is incorrect to assume that pixel format is always in BGR byte order.
We need to check bitmask parameters (such as |redMask|) to determine whether
the RGB or BGR byte order is requested.

v2: reformat code to stay within 80 character per line limit.
v3: just fix the byte order problem first and investigate SRGB later.
v4: rebased on top of the GLES3 sRGB workaround fix.
v5: rebased on top of the GLES3 sRGB workaround fix v2.

Signed-off-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
8 years agoglsl: Reject illegal qualifiers on atomic counter uniforms.
Kenneth Graunke [Mon, 11 Apr 2016 05:50:05 +0000 (22:50 -0700)]
glsl: Reject illegal qualifiers on atomic counter uniforms.

This fixes

dEQP-GLES31.functional.uniform_location.negative.atomic_fragment
dEQP-GLES31.functional.uniform_location.negative.atomic_vertex

Both of which have lines like

layout(location = 3, binding = 0, offset = 0) uniform atomic_uint uni0;

The ARB_explicit_uniform_location spec makes a very tangential mention
regarding atomic counters, but location isn't something that makes sense
with them.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
8 years agoglsl: Add a method to print error messages for illegal qualifiers.
Kenneth Graunke [Mon, 11 Apr 2016 05:41:46 +0000 (22:41 -0700)]
glsl: Add a method to print error messages for illegal qualifiers.

Suggested by Timothy Arceri a while back on mesa-dev:
https://lists.freedesktop.org/archives/mesa-dev/2016-February/107735.html

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Acked-by: Matt Turner <mattst88@gmail.com>
8 years agoxlib: fix memory leak on Display close
John Sheu [Tue, 12 Apr 2016 18:53:00 +0000 (12:53 -0600)]
xlib: fix memory leak on Display close

The XMesaVisual instances freed in the visuals table on display close
are being freed with a free() call, instead of XMesaDestroyVisual(),
causing a memory leak.

Signed-off-by: John Sheu <sheu@google.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agost/mesa: Replace GLvoid with void
Jakob Sinclair [Tue, 12 Apr 2016 18:48:18 +0000 (20:48 +0200)]
st/mesa: Replace GLvoid with void

GLvoid was used before in OpenGL but it has changed to just using void.
All GLvoids in mesa's state tracker has been changed to void in this patch.

Tested this with piglit and no problems were found. No compiler warnings.

Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agoradeonsi: Mark ARB_robust_buffer_access_behavior as supported.
Bas Nieuwenhuizen [Sun, 3 Apr 2016 19:49:44 +0000 (21:49 +0200)]
radeonsi: Mark ARB_robust_buffer_access_behavior as supported.

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agogallium: Add capability for ARB_robust_buffer_access_behavior.
Bas Nieuwenhuizen [Tue, 12 Apr 2016 13:00:31 +0000 (15:00 +0200)]
gallium: Add capability for ARB_robust_buffer_access_behavior.

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agomesa: Expose the ARB_robust_buffer_access_behavior extension.
Bas Nieuwenhuizen [Tue, 12 Apr 2016 12:57:07 +0000 (14:57 +0200)]
mesa: Expose the ARB_robust_buffer_access_behavior extension.

Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agomain: rework the compatibility check of visuals in glXMakeCurrent
Miklós Máté [Thu, 24 Mar 2016 00:12:59 +0000 (01:12 +0100)]
main: rework the compatibility check of visuals in glXMakeCurrent

Now it follows the compatibility criteria listed in section 2.1 of
the GLX 1.4 specification.
This is needed for post-process effects in SW:KotOR.

Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
8 years agoswr: [rasterizer core] warning cleanup
Tim Rowley [Fri, 1 Apr 2016 21:52:34 +0000 (15:52 -0600)]
swr: [rasterizer core] warning cleanup

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer] Put in rudimentary garbage collection for the global arena allocator
Tim Rowley [Thu, 31 Mar 2016 01:24:32 +0000 (19:24 -0600)]
swr: [rasterizer] Put in rudimentary garbage collection for the global arena allocator

- Check for unused blocks every few frames or every 64K draws
- Delete data unused since the last check if total unused data is > 20MB

Doesn't seem to cause a perf degridation

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer core] Put DRAW_CONTEXT on a diet
Tim Rowley [Wed, 30 Mar 2016 21:54:48 +0000 (15:54 -0600)]
swr: [rasterizer core] Put DRAW_CONTEXT on a diet

No need for 256 pointers per DC.

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer core] Add experimental support for hyper-threaded front-end
Tim Rowley [Wed, 30 Mar 2016 20:59:40 +0000 (14:59 -0600)]
swr: [rasterizer core] Add experimental support for hyper-threaded front-end

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer] Avoid segv in thread creation on machines with non-consecutive...
Tim Rowley [Wed, 30 Mar 2016 18:32:41 +0000 (12:32 -0600)]
swr: [rasterizer] Avoid segv in thread creation on machines with non-consecutive NUMA topology.

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer core] Replace all naked OSALIGN macro uses with OSALIGNSIMD / OSALIG...
Tim Rowley [Tue, 29 Mar 2016 17:56:04 +0000 (11:56 -0600)]
swr: [rasterizer core] Replace all naked OSALIGN macro uses with OSALIGNSIMD / OSALIGNLINE

Future proofing

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer] Ensure correct alignment of stack variables used as vectors
Tim Rowley [Tue, 29 Mar 2016 16:58:43 +0000 (10:58 -0600)]
swr: [rasterizer] Ensure correct alignment of stack variables used as vectors

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer core] Quantize depth to depth buffer precision prior to depth test...
Tim Rowley [Fri, 25 Mar 2016 23:24:45 +0000 (17:24 -0600)]
swr: [rasterizer core] Quantize depth to depth buffer precision prior to depth test/write.

Fixes z-fighting issues.

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer common] win32 build fixups
Tim Rowley [Thu, 24 Mar 2016 23:48:57 +0000 (17:48 -0600)]
swr: [rasterizer common] win32 build fixups

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer core] Affinitize thread scratch space to numa node of worker
Tim Rowley [Thu, 24 Mar 2016 22:20:02 +0000 (16:20 -0600)]
swr: [rasterizer core] Affinitize thread scratch space to numa node of worker

Acked-by: Brian Paul <brianp@vmware.com>
8 years agoswr: [rasterizer] Misc fixes identified by static code analysis
Tim Rowley [Thu, 24 Mar 2016 21:52:11 +0000 (15:52 -0600)]
swr: [rasterizer] Misc fixes identified by static code analysis

No perf loss detected

Acked-by: Brian Paul <brianp@vmware.com>
8 years agost/mesa: fix memleak in glDrawPixels cache code
Brian Paul [Tue, 12 Apr 2016 00:54:28 +0000 (18:54 -0600)]
st/mesa: fix memleak in glDrawPixels cache code

If the glDrawPixels size changed, we leaked the previously cached
texture, if there was one.  This patch fixes the reference counting,
adds a refcount assertion check, and better handles potential malloc()
failures.

Tested with a modified version of the drawpix Mesa demo which changed
the image size for each glDrawPixels call.

Cc: "11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
8 years agogallium: Use STATIC_ASSERT whenever possible.
Jose Fonseca [Tue, 12 Apr 2016 06:36:06 +0000 (07:36 +0100)]
gallium: Use STATIC_ASSERT whenever possible.

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agosoftpipe: Use STATIC_ASSERT whenever possible.
Jose Fonseca [Tue, 12 Apr 2016 06:35:38 +0000 (07:35 +0100)]
softpipe: Use STATIC_ASSERT whenever possible.

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agosvga: Use STATIC_ASSERT whenever possible.
Jose Fonseca [Tue, 12 Apr 2016 06:35:23 +0000 (07:35 +0100)]
svga: Use STATIC_ASSERT whenever possible.

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agomesa: Use STATIC_ASSERT whenever possible.
Jose Fonseca [Tue, 12 Apr 2016 06:35:08 +0000 (07:35 +0100)]
mesa: Use STATIC_ASSERT whenever possible.

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
8 years agor600g: use common scissor and viewport code
Marek Olšák [Sun, 10 Apr 2016 02:56:46 +0000 (04:56 +0200)]
r600g: use common scissor and viewport code

It's the same as radeonsi. This adds guard band support to r600g.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agogallium/radeon: add R600/Evergreen/Cayman support to common viewport code
Marek Olšák [Sun, 10 Apr 2016 10:53:12 +0000 (12:53 +0200)]
gallium/radeon: add R600/Evergreen/Cayman support to common viewport code

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: move scissor and viewport states into gallium/radeon
Marek Olšák [Sun, 10 Apr 2016 02:26:50 +0000 (04:26 +0200)]
radeonsi: move scissor and viewport states into gallium/radeon

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: use guard band clipping
Marek Olšák [Sun, 10 Apr 2016 01:38:09 +0000 (03:38 +0200)]
radeonsi: use guard band clipping

Guard band clipping speeds up rasterization for primitives that are
partially off-screen.  This change in particular results in small
framerate improvements in a wide range of games.

Started by Grigori Goronzy <greg@chown.ath.cx>.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: compute scissor from viewport in set_viewport_states
Marek Olšák [Sun, 10 Apr 2016 01:29:57 +0000 (03:29 +0200)]
radeonsi: compute scissor from viewport in set_viewport_states

and clamp it right before emitting. This is a prerequisite for computing
the guard band.

Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agogallium/radeon: set GTT WC on tiled textures
Marek Olšák [Mon, 11 Apr 2016 18:24:34 +0000 (20:24 +0200)]
gallium/radeon: set GTT WC on tiled textures

Just for consistency. This should have no effect, because OpenGL textures
always go to VRAM.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agogallium/radeon: relax requirements on VRAM placements on APUs
Marek Olšák [Mon, 11 Apr 2016 17:56:07 +0000 (19:56 +0200)]
gallium/radeon: relax requirements on VRAM placements on APUs

This makes Tonga with vramlimit=128 2x faster in Heaven.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agowinsys/amdgpu: remove hack for low VRAM configuration
Marek Olšák [Mon, 11 Apr 2016 17:26:03 +0000 (19:26 +0200)]
winsys/amdgpu: remove hack for low VRAM configuration

A better solution will be used.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
8 years agor600g: disable aniso filtering for non-mipmap textures on EG
Marek Olšák [Thu, 7 Apr 2016 19:18:14 +0000 (21:18 +0200)]
r600g: disable aniso filtering for non-mipmap textures on EG

this is the default behavior of the closed driver when running on VI

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agor600g: clean up aniso state translation
Marek Olšák [Fri, 8 Apr 2016 00:09:59 +0000 (02:09 +0200)]
r600g: clean up aniso state translation

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: disable aniso filtering for non-mipmap textures on SI-CI
Marek Olšák [Thu, 7 Apr 2016 19:37:43 +0000 (21:37 +0200)]
radeonsi: disable aniso filtering for non-mipmap textures on SI-CI

The closed driver does this, but it looks at base_level and last_level
and uses a conditional assignment, which LLVM can't generate on SGPRs.

That led me to invent this solution that abuses the image descriptor.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: clean up aniso state translation
Marek Olšák [Fri, 8 Apr 2016 00:08:23 +0000 (02:08 +0200)]
radeonsi: clean up aniso state translation

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoradeonsi: enable some sampler fields to match the closed driver
Marek Olšák [Thu, 7 Apr 2016 15:02:51 +0000 (17:02 +0200)]
radeonsi: enable some sampler fields to match the closed driver

copied from the Vulkan driver

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>