mesa.git
8 years agogallium/radeon: nuke the final pre LLVM 3.6 codepath
Emil Velikov [Thu, 21 Apr 2016 13:37:16 +0000 (14:37 +0100)]
gallium/radeon: nuke the final pre LLVM 3.6 codepath

Missed with commit 100796c15c3 "gallium/radeon: drop support for LLVM
3.5"

v2: s/LLVN/LLVM/ in shortlog (Nicolai)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agoanv: include the files in the tarball
Emil Velikov [Fri, 29 Apr 2016 18:50:29 +0000 (19:50 +0100)]
anv: include the files in the tarball

Namely the python script, the ICD header and private headers. We could
get the system version of the ICD ones, although there is no .pc file to
easily locate and/or manage them.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoi965: don't forget to ship brw_nir_trig_workarounds.py
Emil Velikov [Fri, 29 Apr 2016 18:28:17 +0000 (19:28 +0100)]
i965: don't forget to ship brw_nir_trig_workarounds.py

Otherwise we won't be able to regenerate the source file(s).

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoisl: include all the files in the tarball
Emil Velikov [Sun, 1 May 2016 07:38:34 +0000 (08:38 +0100)]
isl: include all the files in the tarball

Add the missing header(s), generation scripts, README ...

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agospirv: automake: add missing headers to the tarball.
Emil Velikov [Fri, 29 Apr 2016 17:53:15 +0000 (18:53 +0100)]
spirv: automake: add missing headers to the tarball.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoautomake: wire up the intel vulkan driver to make distcheck
Emil Velikov [Fri, 29 Apr 2016 16:10:16 +0000 (17:10 +0100)]
automake: wire up the intel vulkan driver to make distcheck

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: update .gitignore
Emil Velikov [Fri, 29 Apr 2016 15:33:48 +0000 (16:33 +0100)]
anv: update .gitignore

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: automake: remove no longer needed include
Emil Velikov [Fri, 29 Apr 2016 15:31:40 +0000 (16:31 +0100)]
anv: automake: remove no longer needed include

Thanks to last commit we can nuke it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: automake: tweak anv_entrypoint.[ch] rule
Emil Velikov [Fri, 29 Apr 2016 15:29:45 +0000 (16:29 +0100)]
anv: automake: tweak anv_entrypoint.[ch] rule

Rather than using cat + cpp feed the file(s) directly into the latter.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: tweak libvulkan_intel.so link libraries
Emil Velikov [Thu, 21 Apr 2016 00:27:17 +0000 (01:27 +0100)]
anv: tweak libvulkan_intel.so link libraries

i.e do not use -lfoo directly.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: cosmetic makefile changes
Emil Velikov [Thu, 21 Apr 2016 00:20:10 +0000 (01:20 +0100)]
anv: cosmetic makefile changes

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: place the builddir includes before the srcdir ones
Emil Velikov [Thu, 21 Apr 2016 00:12:42 +0000 (01:12 +0100)]
anv: place the builddir includes before the srcdir ones

Otherwise we risk picking the possibly outdated file in the source dir
over the fresh one in the builddir.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoautomake: tweak SUBDIR reorder and comment it
Emil Velikov [Wed, 20 Apr 2016 18:44:51 +0000 (19:44 +0100)]
automake: tweak SUBDIR reorder and comment it

It should ease people with all the interaction and platforms and how
they interact (at least from a build POV) with each other.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoconfigure.ac: remove unused HAVE_EGL_PLATFORM_NULL conditional
Emil Velikov [Wed, 20 Apr 2016 18:36:53 +0000 (19:36 +0100)]
configure.ac: remove unused HAVE_EGL_PLATFORM_NULL conditional

Afaict the last user was based on st/egl.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoautomake: drop "EGL_" from HAVE_EGL_PLATFORM_WAYLAND
Emil Velikov [Wed, 20 Apr 2016 19:18:02 +0000 (20:18 +0100)]
automake: drop "EGL_" from HAVE_EGL_PLATFORM_WAYLAND

Analogous to previous commit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoautomake: drop "EGL_" from HAVE_EGL_PLATFORM_X11
Emil Velikov [Wed, 20 Apr 2016 19:17:53 +0000 (20:17 +0100)]
automake: drop "EGL_" from HAVE_EGL_PLATFORM_X11

The variable covers more than just EGL, let's try to untangle the
confusion it brings.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: get rid of VULKAN_ENTRYPOINT_CPPFLAGS variable
Emil Velikov [Wed, 20 Apr 2016 22:34:43 +0000 (23:34 +0100)]
anv: get rid of VULKAN_ENTRYPOINT_CPPFLAGS variable

Add the missing include to AM_CPPFLAGS and use it throughout the
makefile.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: factor out the X11/XCB build
Emil Velikov [Wed, 20 Apr 2016 18:15:18 +0000 (19:15 +0100)]
anv: factor out the X11/XCB build

Similar to earlier commit - move all the common bits into a single
place, thus improving readability and allowing us to see what's missing.

Also don't forget to add the missing bits. This commit should allows us
to build wayland only vulkan ;-)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: kill of custom define HAVE_WAYLAND_PLATFORM
Emil Velikov [Wed, 20 Apr 2016 18:01:00 +0000 (19:01 +0100)]
anv: kill of custom define HAVE_WAYLAND_PLATFORM

Vulkan API already has equivalent, so simplify things as just use it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: refactor wayland build handling
Emil Velikov [Wed, 20 Apr 2016 22:28:15 +0000 (23:28 +0100)]
anv: refactor wayland build handling

Rather than having things split out in multiple places, consolidate it
and add all the missing bits. Also ensure that we use the already built
static library libwayland-drm.la.

v2 Add missing '\' in the CFLAGS.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net> (v1)
8 years agoautomake: include vulkan subdir after wayland-drm
Emil Velikov [Fri, 29 Apr 2016 17:41:08 +0000 (18:41 +0100)]
automake: include vulkan subdir after wayland-drm

We'll reuse the existing wayland-drm static library with next commit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: use a common variable to manage the library dependencies
Emil Velikov [Wed, 20 Apr 2016 19:50:35 +0000 (20:50 +0100)]
anv: use a common variable to manage the library dependencies

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: use the GENERATED_FILES variable
Emil Velikov [Wed, 20 Apr 2016 17:09:22 +0000 (18:09 +0100)]
anv: use the GENERATED_FILES variable

... rather than having duplicates files through the sources lists.

Splitting things as is, has the side effect of making things clearer and
easing a potential android build. The latter of which automatically adds
BUILT_SOURCES to the binary.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: fold the tests' makefile
Emil Velikov [Wed, 20 Apr 2016 22:10:00 +0000 (23:10 +0100)]
anv: fold the tests' makefile

Recent commit removed the winsys defines from anv_private.h thus
breaking the tests. To fix that and avoid it in the future, merge the
tests makefile in the libvulkan one.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: build the core vulkan only once
Emil Velikov [Wed, 20 Apr 2016 17:07:15 +0000 (18:07 +0100)]
anv: build the core vulkan only once

Introduce a static library libvulkan_common.la that is used by
libvukan_intel.la and libvulkan_test.la.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: kill off custom CFLAGS
Emil Velikov [Wed, 20 Apr 2016 21:12:54 +0000 (22:12 +0100)]
anv: kill off custom CFLAGS

AM_CFLAGS already does all that we need.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: add missing link against the math library
Emil Velikov [Wed, 20 Apr 2016 19:33:46 +0000 (20:33 +0100)]
anv: add missing link against the math library

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: split sources lists to Makefile.sources
Emil Velikov [Wed, 20 Apr 2016 21:11:04 +0000 (22:11 +0100)]
anv: split sources lists to Makefile.sources

Will allow others to reuse the lists (scons/android anyone ?) and makes
the file a lot shorter and easier to read.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: remove custom rule to install the intel_icd.json
Emil Velikov [Fri, 29 Apr 2016 15:26:45 +0000 (16:26 +0100)]
anv: remove custom rule to install the intel_icd.json

Autoconf already does the exact same thing as the manually written rule.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94969
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: tweak the LDFLAGS
Emil Velikov [Wed, 20 Apr 2016 16:29:25 +0000 (17:29 +0100)]
anv: tweak the LDFLAGS

Copy/paste from the rest of mesa, but namely.
 - The module should be shared only.
 - We don't need the explicit ".so", as the vulkan loader will retrieve
the full filename from the json
 - No unresolved symbols in the final binary
 - Use the linker garbage collector to slim down the final binary.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: tweak the %.json rule
Emil Velikov [Wed, 20 Apr 2016 16:26:23 +0000 (17:26 +0100)]
anv: tweak the %.json rule

It's used only by dev_icd.json so just call it that way. While we're
here, manually expand $< (as it might cause issue on some systems)
and drop the unneeded install_libdir substitution.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoanv: add a comment about dev_icd.json
Emil Velikov [Wed, 20 Apr 2016 16:21:03 +0000 (17:21 +0100)]
anv: add a comment about dev_icd.json

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agogenxml: ship all the files needed in the tarball
Emil Velikov [Wed, 20 Apr 2016 14:52:28 +0000 (15:52 +0100)]
genxml: ship all the files needed in the tarball

v2: The xml files are not called "gen*_pack.xml" (Jason)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv: remove description about GENX_FUNC macro
Emil Velikov [Thu, 21 Apr 2016 02:48:39 +0000 (03:48 +0100)]
anv: remove description about GENX_FUNC macro

The macro has been gone since commit 1f1cf6fcb0e "anv: Get rid of
GENX_FUNC"

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agogallium/target-helpers: remove inline_wrapper_sw_helper.h
Emil Velikov [Fri, 15 Apr 2016 18:27:58 +0000 (19:27 +0100)]
gallium/target-helpers: remove inline_wrapper_sw_helper.h

Unused as of commit dddedbec0ed "{st,targets}/nine: use static/dynamic
pipe-loader"

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoegl/x11: resolve "initialization from incompatible pointer type" warning
Mark Kettenis [Fri, 29 Apr 2016 16:31:10 +0000 (17:31 +0100)]
egl/x11: resolve "initialization from incompatible pointer type" warning

With earlier commit we've moved a few functions and changing the
argument type from _EGLDisplay * to struct dri2_egl_display *.

The latter is effectively a wrapper around the former, thus
functionality was preserved, although GCC rightfully warned us about the
misuse.

Add a simple wrapper that casts and propagates the correct type.

Fixes: 9bbf3737f9c ("egl/x11: authenticate before doing chipset id
ioctls")
Cc: "11.2 11.1" <mesa-stable@lists.freedesktop.org>
Reported-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoglx: Refactor the configure options for glx implementation choice (v3)
Chuck Atkins [Mon, 18 Apr 2016 14:09:17 +0000 (10:09 -0400)]
glx: Refactor the configure options for glx implementation choice (v3)

Instead of cascading support for various different implementations of
GLX, all three options are now specified through the --enable-glx
option:

  --enable-glx=dri          : Enable the DRI-based GLX
  --enable-glx=xlib         : Enable the classic Xlib-based GLX
  --enable-glx=gallium-xlib : Enable the gallium Xlib-based GLX
  --enable-glx[=yes]        : Defaults to dri if DRI is enabled, else
                              gallium-xlib if gallium is enabled, else
                              xlib

This removes the --enable-xlib-glx option and fixes a bug in which both
the classic xlib-glx and gallium xlib-glx implementations were getting
built causing different versioned and conflicting libGL libraries to be
installed.

v2: Changes from various review feedback from Emil:
  a) Fixed typos
  b) Corrected help docs for new option
  c) Added appropriate a-b and r-b tags in commit msg
  d) Fixed various GLX related dependency checks.
v3: Rebased to current master and added changelog in commit msg

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

Acked-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
8 years agonir/lower_double_ops: fix indentation
Thomas Hindoe Paaboel Andersen [Fri, 29 Apr 2016 18:32:00 +0000 (20:32 +0200)]
nir/lower_double_ops: fix indentation

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_dead_cf: fix indentation
Thomas Hindoe Paaboel Andersen [Fri, 29 Apr 2016 18:31:59 +0000 (20:31 +0200)]
nir/opt_dead_cf: fix indentation

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_dead_cf: correction of side effect check
Thomas Hindoe Paaboel Andersen [Fri, 29 Apr 2016 18:31:58 +0000 (20:31 +0200)]
nir/opt_dead_cf: correction of side effect check

Parenthesis are needed here as ! takes precedence over the &. The
check had the opposite effect than intended.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agofreedreno/ir3: use pipe_debug_callback for shader-db traces
Rob Clark [Sun, 24 Apr 2016 20:59:16 +0000 (16:59 -0400)]
freedreno/ir3: use pipe_debug_callback for shader-db traces

For multi-threaded shader-db support.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/a4xx: add debug callback to emit
Rob Clark [Sun, 24 Apr 2016 20:58:29 +0000 (16:58 -0400)]
freedreno/a4xx: add debug callback to emit

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/a3xx: add debug callback to emit
Rob Clark [Sun, 24 Apr 2016 20:45:15 +0000 (16:45 -0400)]
freedreno/a3xx: add debug callback to emit

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno: wire up core pipe_debug_callback
Rob Clark [Sun, 24 Apr 2016 20:42:15 +0000 (16:42 -0400)]
freedreno: wire up core pipe_debug_callback

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agofreedreno/ir3: handle color clamp variant ourselves
Rob Clark [Mon, 25 Apr 2016 13:07:04 +0000 (09:07 -0400)]
freedreno/ir3: handle color clamp variant ourselves

Now that there is a pass to do this in NIR, lets just use that and
manage the variants ourself, rather than letting state-tracker do it.
This way, mesa/st will precompile shaders without requiring
ST_DEBUG=precompile (which requires a debug build).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agonir: clamp-color-output support
Rob Clark [Mon, 1 Feb 2016 22:29:22 +0000 (17:29 -0500)]
nir: clamp-color-output support

Handled by tgsi_emulate for glsl->tgsi case.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
8 years agofreedreno: fix indentation
Rob Clark [Wed, 27 Apr 2016 17:53:01 +0000 (13:53 -0400)]
freedreno: fix indentation

Signed-off-by: Rob Clark <robclark@freedesktop.org>
8 years agoradeonsi: fix synchronization of shader images
Marek Olšák [Thu, 28 Apr 2016 19:08:27 +0000 (21:08 +0200)]
radeonsi: fix synchronization of shader images

This fixes the winsys->cs_is_buffer_referenced query, which is used for
synchronization before buffers are mapped.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
8 years agost/glsl_to_tgsi: fix potential crash when allocating temporaries
Samuel Pitoiset [Thu, 28 Apr 2016 19:09:12 +0000 (21:09 +0200)]
st/glsl_to_tgsi: fix potential crash when allocating temporaries

When index - t->temps_size is greater than 4096, allocating space for
temporaries on demand will miserably crash. This can happen when a game
uses a lot of temporaries like the recent released Tomb raider.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
8 years agoglsl: Lower vector_extracts to swizzles after lower_vector_derefs.
Kenneth Graunke [Thu, 28 Apr 2016 04:07:07 +0000 (21:07 -0700)]
glsl: Lower vector_extracts to swizzles after lower_vector_derefs.

lower_vector_derefs can produce new vector_extract operations.
Neither i965 nor st_glsl_to_tgsi can handle them, so we'd best
convert them to swizzles.

Together with the previous patch, this fixes assertion failures in
GLideN64, as well as a new Piglit test which reproduces the issue:
spec/glsl-1.10/compiler/vector-dereference-in-dereference.frag

Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95164
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
8 years agoglsl: Convert lower_vec_index_to_swizzle to a rvalue visitor.
Kenneth Graunke [Thu, 28 Apr 2016 03:51:36 +0000 (20:51 -0700)]
glsl: Convert lower_vec_index_to_swizzle to a rvalue visitor.

The old visitor missed some cases.  For example, it wouldn't handle
an ir_dereference_array with a vector_extract as the index.

Rather than trying to add the missing cases, just rewrite it as an
ir_rvalue_visitor.  This makes it easy to replace any expression,
and is much less code.

Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95164
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
8 years agomesa: simplify _mesa_Lightfv
Thomas Faller [Fri, 29 Apr 2016 16:54:08 +0000 (10:54 -0600)]
mesa: simplify _mesa_Lightfv

Signed-off-by: Thomas Faller <tfaller1@gmx.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
8 years agogallium/radeon: fix crash in r600_set_streamout_targets
Nicolai Hähnle [Thu, 28 Apr 2016 20:11:42 +0000 (15:11 -0500)]
gallium/radeon: fix crash in r600_set_streamout_targets

Protect against dereferencing a gap in the targets array. This was triggered
by a test in the Khronos CTS.

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
8 years agost/glsl_to_tgsi: reduce stack explosion in recursive expression visitor
Nicolai Hähnle [Mon, 25 Apr 2016 23:20:50 +0000 (18:20 -0500)]
st/glsl_to_tgsi: reduce stack explosion in recursive expression visitor

In optimized builds, visit(ir_expression *) experiences inlining with gcc that
leads the function to have a roughly 32KB stack frame. This is a problem given
that the function is called recursively. In non-optimized builds, the stack
frame is much smaller, hence one gets crashes that happen only in optimized
builds.

Arguably there is a compiler bug or at least severe misfeature here. In any
case, the easy thing to do for now seems to be moving the bulk of the
non-recursive code into a separate function. This is sufficient to convince my
version of gcc not to blow up the stack frame of the recursive part. Just to be
sure, add the gcc-specific noinline attribute to prevent this bug from
reoccuring if inliner heuristics change.

v2: put ATTRIBUTE_NOINLINE into macros.h

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95133
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95026
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92850
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@gmail.com>
8 years agotgsi/text: fix parsing of memory instructions
Nicolai Hähnle [Thu, 28 Apr 2016 22:03:50 +0000 (17:03 -0500)]
tgsi/text: fix parsing of memory instructions

Properly handle Target and Format parameters when present.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
8 years agotgsi/text: add str_match_name_from_array
Nicolai Hähnle [Thu, 28 Apr 2016 21:43:10 +0000 (16:43 -0500)]
tgsi/text: add str_match_name_from_array

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
8 years agotgsi/text: add str_match_format helper function
Nicolai Hähnle [Thu, 28 Apr 2016 22:07:44 +0000 (17:07 -0500)]
tgsi/text: add str_match_format helper function

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
8 years agotgsi/build: pass Memory.Texture and .Format through tgsi_build_full_instruction
Nicolai Hähnle [Thu, 28 Apr 2016 22:34:40 +0000 (17:34 -0500)]
tgsi/build: pass Memory.Texture and .Format through tgsi_build_full_instruction

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
8 years agotgsi/dump: signal nospace when the last print exceeded the size
Nicolai Hähnle [Thu, 28 Apr 2016 20:51:25 +0000 (15:51 -0500)]
tgsi/dump: signal nospace when the last print exceeded the size

Previously, there was a bug where nospace wasn't signalled if it just so
happened that the very last print exceeded the available space.

Reviewed-by: Dave Airlie <airlied@redhat.com>
8 years agotgsi/dump: shared dump_ctx initialization
Nicolai Hähnle [Thu, 28 Apr 2016 20:29:23 +0000 (15:29 -0500)]
tgsi/dump: shared dump_ctx initialization

Reviewed-by: Dave Airlie <airlied@redhat.com>
8 years agost/omx: don't return early in vid_enc_EncodeFrame()
Emil Velikov [Fri, 29 Apr 2016 12:51:45 +0000 (13:51 +0100)]
st/omx: don't return early in vid_enc_EncodeFrame()

Earlier commit plugged a memory leak, although it missed a pair of
brackets. Thus we unconditionally returned even in the case of no error.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95203
Fixes: b87856d25d1 ("st/omx: Fix resource leak on OMX_ErrorNone")
Tested-by: Andy Furniss <adf.lists@gmail.com>
Acked-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
What an embarassing bug - missing brackets. Andy can you confirm that it
resolves the issue ?

8 years agoglsl: Checks for interpolation into its own function.
Andres Gomez [Wed, 23 Mar 2016 23:13:26 +0000 (01:13 +0200)]
glsl: Checks for interpolation into its own function.

This generalizes the validation also to be done for variables inside
interface blocks, which, for some cases, was missing.

For a discussion about the additional validation cases included see
https://lists.freedesktop.org/archives/mesa-dev/2016-March/109117.html
and Khronos bug #15671.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
8 years agonir/algebraic: Support lowering for both 64 and 32-bit ldexp
Jason Ekstrand [Wed, 27 Apr 2016 18:18:04 +0000 (11:18 -0700)]
nir/algebraic: Support lowering for both 64 and 32-bit ldexp

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
8 years agonir/opcodes: Make ldexp take an explicitly 32-bit int
Jason Ekstrand [Wed, 27 Apr 2016 18:12:44 +0000 (11:12 -0700)]
nir/opcodes: Make ldexp take an explicitly 32-bit int

There is no sense in having the double version of ldexp take a 64-bit
integer.  Instead, let's just take a 32-bit int all the time.  This also
matches what GLSL does where both variants of ldexp take a regular integer
for the exponent argument.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
8 years agonir/opcodes: Simplify the expressions for [un]pack_double
Jason Ekstrand [Wed, 27 Apr 2016 17:57:00 +0000 (10:57 -0700)]
nir/opcodes: Simplify the expressions for [un]pack_double

The new expressions are more explicit in terms of where the bits go so it's
a little easier to tell what's going on.  This is the way GLSL specifies
things so it's a bit easier to verify too.  It also has the benifit that
the new expressions easily vectorize so we can constant-fold vector forms
of the _split versions correctly.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
8 years agomesa: Fix indirect draw buffer size check on 32-bit systems.
Kenneth Graunke [Tue, 26 Apr 2016 05:34:37 +0000 (22:34 -0700)]
mesa: Fix indirect draw buffer size check on 32-bit systems.

Fixes dEQP-GLES31.functional subtests:
draw_indirect.negative.command_offset_not_in_buffer_signed32_wrap
draw_indirect.negative.command_offset_not_in_buffer_unsigned32_wrap

These tests use really large values that overflow GLsizeiptr, at
which point the buffer size isn't less than "end".

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95138
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
8 years agonir: Switch the arguments to nir_foreach_def
Jason Ekstrand [Wed, 27 Apr 2016 03:34:01 +0000 (20:34 -0700)]
nir: Switch the arguments to nir_foreach_def

This matches the "foreach x in container" pattern found in many other
programming languages.  Generated by the following regular expression:

s/nir_foreach_def(\([^,]*\),\s*\([^,]*\))/nir_foreach_def(\2, \1)/

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
8 years agonir: Switch the arguments to nir_foreach_use and friends
Jason Ekstrand [Wed, 27 Apr 2016 03:30:10 +0000 (20:30 -0700)]
nir: Switch the arguments to nir_foreach_use and friends

This matches the "foreach x in container" pattern found in many other
programming languages.  Generated by the following regular expression:

s/nir_foreach_use(\([^,]*\),\s*\([^,]*\))/nir_foreach_use(\2, \1)/

and similar expressions for nir_foreach_use_safe, etc.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
8 years agonir: Switch the arguments to nir_foreach_function
Jason Ekstrand [Wed, 27 Apr 2016 03:26:42 +0000 (20:26 -0700)]
nir: Switch the arguments to nir_foreach_function

This matches the "foreach x in container" pattern found in many other
programming languages.  Generated by the following regular expression:

s/nir_foreach_function(\([^,]*\),\s*\([^,]*\))/nir_foreach_function(\2, \1)/

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
8 years agonir: Switch the arguments to nir_foreach_parallel_copy_entry
Jason Ekstrand [Wed, 27 Apr 2016 03:21:27 +0000 (20:21 -0700)]
nir: Switch the arguments to nir_foreach_parallel_copy_entry

This matches the "foreach x in container" pattern found in many other
programming languages.

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
8 years agonir: Switch the arguments to nir_foreach_phi_src
Jason Ekstrand [Wed, 27 Apr 2016 03:16:21 +0000 (20:16 -0700)]
nir: Switch the arguments to nir_foreach_phi_src

This matches the "foreach x in container" pattern found in many other
programming languages.  Generated by the following regular expression:

s/nir_foreach_phi_src(\([^,]*\),\s*\([^,]*\))/nir_foreach_phi_src(\2, \1)/

and a similar expression for nir_foreach_phi_src_safe.

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
8 years agonir: Switch the arguments to nir_foreach_instr
Jason Ekstrand [Wed, 27 Apr 2016 01:34:19 +0000 (18:34 -0700)]
nir: Switch the arguments to nir_foreach_instr

This matches the "foreach x in container" pattern found in many other
programming languages.  Generated by the following regular expression:

s/nir_foreach_instr(\([^,]*\),\s*\([^,]*\))/nir_foreach_instr(\2, \1)/

and similar expressions for nir_foreach_instr_safe etc.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
8 years agoanv/lower_push_constants: fixup for nir_foreach_block()
Jason Ekstrand [Wed, 20 Apr 2016 04:20:26 +0000 (21:20 -0700)]
anv/lower_push_constants: fixup for nir_foreach_block()

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv/apply_pipeline_layout: fixup for nir_foreach_block()
Jason Ekstrand [Wed, 20 Apr 2016 04:19:56 +0000 (21:19 -0700)]
anv/apply_pipeline_layout: fixup for nir_foreach_block()

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoanv/apply_dynamic_offsets: fixup for nir_foreach_block()
Jason Ekstrand [Wed, 20 Apr 2016 04:18:56 +0000 (21:18 -0700)]
anv/apply_dynamic_offsets: fixup for nir_foreach_block()

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agoi965/nir: fixup for new foreach_block()
Connor Abbott [Wed, 13 Apr 2016 02:56:14 +0000 (22:56 -0400)]
i965/nir: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/algebraic: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 19:30:22 +0000 (15:30 -0400)]
nir/algebraic: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/validate: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 19:17:46 +0000 (15:17 -0400)]
nir/validate: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/nir_worklist: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 19:16:14 +0000 (15:16 -0400)]
nir/nir_worklist: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/remove_dead_variables: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 19:14:04 +0000 (15:14 -0400)]
nir/remove_dead_variables: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/split_var_copies: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 19:10:03 +0000 (15:10 -0400)]
nir/split_var_copies: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/repair_ssa: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 19:06:20 +0000 (15:06 -0400)]
nir/repair_ssa: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_peephole_select: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 19:03:41 +0000 (15:03 -0400)]
nir/opt_peephole_select: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/phi_builder: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 18:57:35 +0000 (14:57 -0400)]
nir/phi_builder: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_cp: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 18:55:19 +0000 (14:55 -0400)]
nir/opt_cp: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_remove_phis: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 18:49:09 +0000 (14:49 -0400)]
nir/opt_remove_phis: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_undef: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 18:46:03 +0000 (14:46 -0400)]
nir/opt_undef: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_dead_cf: fixup for new foreach_block()
Connor Abbott [Tue, 12 Apr 2016 18:43:16 +0000 (14:43 -0400)]
nir/opt_dead_cf: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_dce: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 21:43:48 +0000 (17:43 -0400)]
nir/opt_dce: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_gcm: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 21:40:02 +0000 (17:40 -0400)]
nir/opt_gcm: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/opt_constant_folding: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 21:37:40 +0000 (17:37 -0400)]
nir/opt_constant_folding: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/lower_samplers: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 21:33:42 +0000 (17:33 -0400)]
nir/lower_samplers: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/normalize_cubemap_coords: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 21:29:45 +0000 (17:29 -0400)]
nir/normalize_cubemap_coords: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/lower_var_copies: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 21:25:10 +0000 (17:25 -0400)]
nir/lower_var_copies: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/move_vec_src_uses_to_dest: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 21:18:45 +0000 (17:18 -0400)]
nir/move_vec_src_uses_to_dest: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/lower_vars_to_ssa: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 20:39:38 +0000 (16:39 -0400)]
nir/lower_vars_to_ssa: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/lower_vec_to_movs: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 20:37:04 +0000 (16:37 -0400)]
nir/lower_vec_to_movs: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/lower_idiv: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 20:32:58 +0000 (16:32 -0400)]
nir/lower_idiv: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/lower_to_source_mods: fixup for new foreeach_block()
Connor Abbott [Fri, 8 Apr 2016 20:18:55 +0000 (16:18 -0400)]
nir/lower_to_source_mods: fixup for new foreeach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
8 years agonir/lower_io: fixup for new foreach_block()
Connor Abbott [Fri, 8 Apr 2016 20:16:56 +0000 (16:16 -0400)]
nir/lower_io: fixup for new foreach_block()

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>