Commit Graph

70315 Commits

Author SHA1 Message Date
Jason Ekstrand 8bbe7fa7a8 i965/fs: Properly handle explicit depth in SIMD16 with dual-source blend
Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90629
Tested-by: Markus Wick <markus@selfnet.de>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-05-28 13:33:09 -07:00
Matt Turner e354cc9b79 i965: Silence warning in 3-src type-setting.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-05-28 12:59:04 -07:00
Matt Turner 0596134410 i965/fs: Fix lowering of integer multiplication with cmod.
If the multiplication's result is unused, except by a conditional_mod,
the destination will be null. Since the final instruction in the lowered
sequence is a partial-write, we can't put the conditional mod on it and
we have to store the full result to a register and do a MOV with a
conditional mod.

Cc: "10.6" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90580
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-05-28 12:58:50 -07:00
Iago Toral Quiroga 2231cf0ba3 nir: Fix output swizzle in get_mul_for_src
When we compute the output swizzle we want to consider the number of
components in the add operation. So far we were using the writemask
of the multiplication for this instead, which is not correct.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2015-05-28 18:25:37 +02:00
Jose Fonseca 09d6243aed gallivm: Workaround LLVM PR23628.
Temporarily undefine DEBUG macro while including LLVM C++ headers,
leveraging the push/pop_macro pragmas, which are supported both by GCC
and MSVC.

https://bugs.freedesktop.org/show_bug.cgi?id=90621

Trivial.
2015-05-28 10:12:55 +01:00
Eric Anholt 10aacf5ae8 vc4: Just stream out fallback IB contents.
The idea I had when I wrote the original shadow code was that you'd see a
set_index_buffer to the IB, then a bunch of draws out of it.  What's
actually happening in openarena is that set_index_buffer occurs at every
draw, so we end up making a new shadow BO every time, and converting more
of the BO than is actually used in the draw.

While I could maybe come up with a better caching scheme, for now just
do the simple thing that doesn't result in a new shadow IB allocation
per draw.

Improves performance of isosurf in drawelements mode by 58.7967% +/-
3.86152% (n=8).
2015-05-27 17:29:11 -07:00
Eric Anholt f8de6277bf vc4: Don't try to put our dmabuf-exported BOs into the BO cache.
We'd sometimes try to reallocate something that X was using as a new
pipe_resource, and potentially conflict in our rendering.  But even
worse, if we reallocated the BO as a shader, the kernel would reject
rendering using the shader.
2015-05-27 17:29:11 -07:00
Eric Anholt b0edc19a52 vc4: Don't forget to make our raster shadow textures non-raster.
Not sure what happened in my testing that made the previous shadow
code fix glxgears swapbuffering, but this also fixes lots of CopyArea
in X (like dragging xlogo around in metacity).
2015-05-27 17:29:11 -07:00
Samuel Pitoiset 41630c0653 vc4: make vc4_begin_query() return a boolean
I forgot to make the change in 96f164f6f0.
This fixes a warning with GCC and probably an error with Clang.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2015-05-27 17:29:03 -07:00
Ben Widawsky e2d84d99f5 i965: Emit 3DSTATE_MULTISAMPLE before WM_HZ_OP (gen8+)
Starting with GEN8, there is documentation that the multisample state command
must be emitted before the 3DSTATE_WM_HZ_OP command any time the multisample
count changes. The 3DSTATE_WM_HZ_OP packet gets emitted as a result of a
intel_hix_exec(), which is called upon a fast clear and/or a resolve. This can
happen before the state atoms are checked, and so the multisample state must be
put directly in the function.

v1:
- In v0, I was always emitting the command, but Ken came up with the condition to
determine whether or not the sample count actually changed.
- Ken's recommendation was to set brw->num_multisamples after emitting
3DSTATE_MULTISAMPLE. This doesn't work. I put my best guess as to why in the XXX
(it was causing 7 regressions on BDW).

v2:
Flag NEW_MULTISAMPLE state. As Ken found, in state upload we check for the
multisample change to determine whether or not to emit certain packets. Since
the hiz code doesn't actually care about the number of multisamples, set the
flag and let the later code take care of it.

Jenkins results:
http://otc-mesa-ci.jf.intel.com/view/dev/job/bwidawsk/136/

Fixes around 200 piglit tests on SKL. I'm somewhat surprised that it seems to
have no impact on BDW as the restriction is needed there as well.

Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Neil Roberts <neil@linux.intel.com> (v0)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v2)
2015-05-27 17:08:08 -07:00
Vinson Lee 147ffd4816 gallivm: Do not use NoFramePointerElim with LLVM 3.7.
TargetOptions::NoFramePointerElim was removed in llvm-3.7.0svn r238244
"Remove NoFramePointerElim and NoFramePointerElimOverride from
TargetOptions and remove ExecutionEngine's dependence on CodeGen. NFC."

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2015-05-27 17:01:51 -07:00
Kenneth Graunke 70c6f2323e i965: Remove _NEW_MULTISAMPLE dirty bit from 3DSTATE_PS_EXTRA.
BRW_NEW_NUM_SAMPLES is sufficient.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
2015-05-27 12:20:25 -07:00
Kenneth Graunke bb18df008e i965: Delete GS scratch space workaround warning.
This workaround is documented in the 3DSTATE_GS documentation.  It
appears to only apply to early steppings of Broadwell and Skylake.

I don't think it ever affected production hardware, so at this point it
probably makes sense to delete it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-05-27 12:20:18 -07:00
EdB 40665362fd clover: Log build options when dumping clc source.
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-05-27 15:33:58 +03:00
Ian Romanick 2b8c51834b glapi: Encapsulate nop table knowledge in new _mesa_new_nop_table function
Encapsulate the knowledge about how to build the nop table in a new
_mesa_new_nop_table function.  This makes it easier for dispatch_sanity
to keep working now and in the future.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Cc: 10.6 <mesa-stable@lists.freedesktop.org>
2015-05-26 18:25:41 -07:00
Thomas Helland 8d813d14e1 docs: Fix some typos in the developer notes
Found when double-checking my review on Brian's series.

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-05-26 15:14:04 -06:00
Brian Paul be71bbfaa2 mesa: do not use _glapi_new_nop_table() for DRI builds
Commit 4bdbb588a9 introduced new _glapi_new_nop_table() and
_glapi_set_nop_handler() functions in the glapi dispatcher (which
live in libGL.so).  The calls to those functions from context.c
would be undefined (i.e. an ABI break) if the libGL used at runtime
was older.

For the time being, use the old single generic_nop() function for
non-Windows builds to avoid this problem.  At some point in the future
it should be safe to remove this work-around.  See comments for more
details.

v2: Incorporate feedback from Emil.  Use _WIN32 instead of
GLX_DIRECT_RENDERING to control behavior, move comments.

Cc: 10.6 <mesa-stable@lists.freedesktop.org>
Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com>
2015-05-26 12:16:48 -06:00
Brian Paul 2ab0ca36c1 docs: add information about reviewing patches
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-05-26 12:16:36 -06:00
Brian Paul c6184f84b7 docs: update the coding style information
This hasn't been updated in a long time and from recent discussion on
the mailing list, it's not always clear what's expected.  Hopefully,
this will help a bit.

v2: document function brace placement, per Thomas Helland.

Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
2015-05-26 10:02:59 -06:00
Brian Paul d959885b91 docs: update documentation about patch formatting, testing, etc
v2: correctly escape < and > chars.

Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
2015-05-26 10:02:59 -06:00
Brian Paul 98f2f47f7a docs: reorganize devnotes.html file
Move "Adding Extensions" to the end.  Add a simple table of contents
at the top.

Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
2015-05-26 10:02:59 -06:00
Brian Paul eec904d29c xlib: fix X_GLXCreateContextAtrribs/Attribs typo
In case the glproto.h file isn't up to date, we provide the #define
for X_GLXCreateContextAttribsARB.

v2: fix other occurances, improve #ifndef test, per Jose.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-05-26 09:58:09 -06:00
Brian Paul dce53a7d24 mesa: add some comments in copyimage.c
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-05-26 09:58:09 -06:00
Brian Paul 0b76541ce0 mesa: move decls, add const qualifiers in copyimage.c
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-05-26 09:58:09 -06:00
Brian Paul 8369675a55 mesa: code clean-ups in textureview.[ch]
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-05-26 09:58:09 -06:00
Brian Paul 3ddd1cf7d1 mesa: const qualify, return bool for _mesa_texture_view_compatible_format()
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-05-26 09:58:09 -06:00
Brian Paul 09eabf5be6 mesa: add const qualifer on _mesa_is_compressed_format()
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2015-05-26 09:58:09 -06:00
Jose Fonseca b787f48ed2 glapi: Avoid argparse type argument for API XML input files.
argparse type is a nice type saver for simple data types, but it doesn't
look a good fit for the input XML file:

- Certain implementations of argparse (particularly python 2.7.3's)
  invoke the type constructor for the default argument even when an
  option is passed in the command line.  Causing `No such file or
  directory: 'gl_API.xml'` when the current dir is not
  src/mapi/glapi/gen.

- The parser takes multiple arguments.  This is currently worked around
  using lambdas, but that unnecessarily complex and hard to read.
  Furthermore it's odd to have a side-effect as heavy as parsing XML
  happening deep inside the argument parsing.

https://bugs.freedesktop.org/show_bug.cgi?id=90600

Reviewed-by: Brian Paul <brianp@vmware.com>
2015-05-26 15:26:03 +01:00
Marek Olšák 224a77cc60 radeonsi: use a switch statement in si_delete_shader_selector
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-05-26 12:42:37 +02:00
Marek Olšák 0c5a309cee radeonsi: use a switch statement in si_shader_selector_key
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-05-26 12:42:37 +02:00
Marek Olšák fa7f606e89 radeonsi: fix scratch buffer setup for geometry shaders
Cc: 10.6 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-05-26 12:42:37 +02:00
Marek Olšák f41517242a radeonsi: remove unused cases from si_shader_io_get_unique_index
These can't occur between VS and GS, because GS is only supported
in the core profile.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-05-26 12:42:37 +02:00
Marek Olšák af4b9c7c2e radeonsi: don't count special outputs for the VS export count
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-05-26 12:42:36 +02:00
Marek Olšák e4339bc988 radeonsi: add support for PIPE_CAP_TGSI_TEXCOORD
Without it, texcoords are mapped to GENERIC[0..7], PointCoord is mapped to
GENERIC[8], and user-defined varyings start from GENERIC[9]. Since texcoords
can only be used between VS and PS, and PointCoord is PS-only, it's silly to
always start from GENERIC[9] in all other shaders (such as LS, HS, ES, GS).

This adds support for TEXCOORD and PCOORD semantics. As a result, st/mesa
will use GENERIC[0] as a base for user-defined varyings, which should make
linking ES and GS as well as tessellation shaders at runtime easier.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-05-26 12:42:31 +02:00
Marek Olšák 3d35027fdc tgsi/ureg: enable creating tessellation shaders with ureg_create_shader
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-05-26 11:46:28 +02:00
Marek Olšák c1266f28d6 tgsi/text: enable parsing tessellation shaders
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-05-26 11:46:28 +02:00
Marek Olšák 0d84b6cf84 gallium: rename TGSI tessellation processor types to match pipe shader names
I forgot to do this when pushing the interface changes.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-05-26 11:46:28 +02:00
Marek Olšák 92c31bb0dd gallium: use const in set_tess_state
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-05-26 11:46:28 +02:00
Koop Mast 967825d053 clover: Build fix for FreeBSD.
Cc: 10.6 10.5 <mesa-stable@lists.freedesktop.org>
2015-05-26 11:46:28 +02:00
Neil Roberts 5ae6c7bfce i965/skl: Add a message header for the TXF_MCS instruction in vec4vs
When using SIMD4x2 on Skylake, the sampler instructions need a message
header to select the correct mode. This was added for most sample
instructions in 0ac4c2727 but the TXF_MCS instruction is emitted
separately and it was missed.

This fixes a bunch of Piglit tests which test texelFetch in a geometry
shader, for example:

 spec/arb_texture_multisample/texelfetch/2-gs-sampler2dms

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-05-26 10:22:27 +01:00
Ilia Mirkin 3ec1815285 nv30: falling back to draw path for edgeflag does no good
The problem is that the EDGEFLAG has to be toggled at vertex submission
time. This can be done from either the draw or the regular paths. Avoid
falling back to draw just because there's an edgeflag.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-05-25 21:45:31 -04:00
Ilia Mirkin 25be70462d nv30/draw: switch varying hookup logic to know about texcoords
Commit 8acaf862df switched things over to use TEXCOORD instead of
GENERIC, but did not update the nv30 swtnl draw paths. This teaches the
draw logic about TEXCOORD.

Among other things, this fixes a crash in demos/arbocclude when using
swtnl. Curiously enough, the point-sprite piglit works without this.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-05-25 21:45:31 -04:00
Ilia Mirkin c3d36a2e1a nv30/draw: allocate vertex buffers in gart
These are only used once per draw, so it makes sense to keep them in
GART. Also take this opportunity to modernize the buffer mapping API
usage.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-05-25 21:45:22 -04:00
Ilia Mirkin fdad7dfbda nv30/draw: only use the DMA1 object (GART) if the bo is not in VRAM
Instead of always having it in the data, let the bo placement decide it.
This fixes glxgears with swtnl forced on.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-05-25 21:45:08 -04:00
Ilia Mirkin 3600439897 nv30/draw: fix indexed draws with swtnl path and a resource index buffer
The map = assignment was missing.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-05-25 20:16:51 -04:00
Ilia Mirkin 5646f0f18a glsl: avoid leaking linked gl_shader when there's a late linker error
This makes piglit mixing-clip-distance-and-clip-vertex-disallowed have 0
definitely lost blocks with valgrind. (Same non-0 number of possibly
lost blocks though.)

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-05-25 16:52:11 -04:00
Roland Scheidegger 6a111e54d7 llvmpipe: (trivial) add parantheses in (!x == y) expression
Apparently some compilers think we probably wanted to do !(x == y) instead
and issue a warning, so just shut it up... No functional change, obviously.

Cc: <mesa-stable@lists.freedesktop.org>
2015-05-25 22:24:42 +02:00
Ilia Mirkin bb973723a5 st/mesa: don't leak glsl_to_tgsi object on link failure
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-05-25 15:45:12 -04:00
Ilia Mirkin 147816375d nv30/draw: draw expects constbuf size in bytes, not vec4 units
This fixes glxgears with NV30_SWTNL=1 forced on. Probably fixes a bunch
of other situations where we fall back to the swtnl path.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-05-25 14:11:16 -04:00
Ilia Mirkin 89585edf3c nv30/draw: avoid leaving stale pointers in draw state
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
2015-05-25 14:11:16 -04:00