mesa.git
7 years agowinsys/amdgpu: use only one fence per BO
Nicolai Hähnle [Wed, 7 Sep 2016 08:50:14 +0000 (10:50 +0200)]
winsys/amdgpu: use only one fence per BO

The fence that is added to the BO during flush is guaranteed to be
signaled after all the fences that were in the fences array of the BO
before the flush, because those fences are added as dependencies for the
submission (and all this happens atomically under the bo_fence_lock).

Therefore, keeping only the last fence around is sufficient.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agowinsys/amdgpu: add do_winsys_deinit function
Nicolai Hähnle [Tue, 6 Sep 2016 13:12:18 +0000 (15:12 +0200)]
winsys/amdgpu: add do_winsys_deinit function

The idea is to have matching init/deinit functions so that deinit can be
re-used for cleanup in the error path of amdgpu_winsys_create.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agowinsys/amdgpu: clean up error paths in amdgpu_winsys_create
Nicolai Hähnle [Tue, 6 Sep 2016 13:10:06 +0000 (15:10 +0200)]
winsys/amdgpu: clean up error paths in amdgpu_winsys_create

No need to call pb_cache_deinit, because the cache hasn't been initialized
at that point.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agogallium/radeon: page alignment for buffers is unnecessary
Nicolai Hähnle [Fri, 9 Sep 2016 10:59:10 +0000 (12:59 +0200)]
gallium/radeon: page alignment for buffers is unnecessary

In some places (e.g. shader program pointers) we require 256 bytes alignment.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agogallium/radeon/winsyses: remove #includes of pb_bufmgr.h
Nicolai Hähnle [Tue, 6 Sep 2016 12:50:52 +0000 (14:50 +0200)]
gallium/radeon/winsyses: remove #includes of pb_bufmgr.h

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoi965/rbc: Clarify rational given for shader image resolves
Topi Pohjolainen [Thu, 8 Sep 2016 05:22:38 +0000 (08:22 +0300)]
i965/rbc: Clarify rational given for shader image resolves

Original commit added documentation explaining lossless compression
case:

commit 56f29911ec9da25c78fbd3d4945d499e65ca4b5a
Author: Topi Pohjolainen <topi.pohjolainen@intel.com>
Date:   Tue Feb 2 10:00:41 2016 +0200

    i965: Add a flag telling color resolve pass to ignore CCS_E

It, however, easily gives the impression that the sole purpose
of the intel_miptree_resolve_color() is to address lossless
compression. Original intention is to document the lack of
INTEL_MIPTREE_IGNORE_CCS_E flag given for the resolve call.

This patch fixes this along with a typo found spotted further
down.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965/blorp: Use hw generetad primitive copies for layered clears
Topi Pohjolainen [Mon, 29 Aug 2016 05:57:31 +0000 (08:57 +0300)]
i965/blorp: Use hw generetad primitive copies for layered clears

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965/blorp: Sanity check all layers before actual clear
Topi Pohjolainen [Mon, 29 Aug 2016 07:16:40 +0000 (10:16 +0300)]
i965/blorp: Sanity check all layers before actual clear

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agointel/blorp: Add plumbing for setting color clear layer count
Topi Pohjolainen [Fri, 26 Aug 2016 15:44:18 +0000 (18:44 +0300)]
intel/blorp: Add plumbing for setting color clear layer count

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agointel/blorp: Allow multiple layers
Topi Pohjolainen [Fri, 26 Aug 2016 15:37:09 +0000 (18:37 +0300)]
intel/blorp: Allow multiple layers

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965/blorp: Instruct vertex fetcher to provide prim instance id
Topi Pohjolainen [Fri, 26 Aug 2016 14:37:44 +0000 (17:37 +0300)]
i965/blorp: Instruct vertex fetcher to provide prim instance id

This will indicate target layer (Render Target Array Index) needed
for layered clears.

v2: Use 3DSTATE_VF_SGVS for gen8+

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965/rbc: Allocate mcs directly
Topi Pohjolainen [Fri, 26 Aug 2016 06:26:15 +0000 (09:26 +0300)]
i965/rbc: Allocate mcs directly

such as we do for compressed msaa. In case of non-compressed simgle
sampled buffers the allocation of mcs is deferred until there is
actually a clear operation that needs the mcs.
In case of render buffer compression the mcs buffer always needed
and there is no real reason to defer the allocation. By doing it
directly allows to drop quite a bit unnecessary complexity.

Patch leaves brw_predraw_set_aux_buffers() a no-op. Subsequent
patches will re-use it and it seemed cleaner to leave it instead
of removing and re-introducing.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoisl/gen8+: Allow 1D and 3D auxiliary surfaces
Topi Pohjolainen [Wed, 31 Aug 2016 08:16:12 +0000 (11:16 +0300)]
isl/gen8+: Allow 1D and 3D auxiliary surfaces

Otherwise once mcs buffer gets allocated without delay for lossless
compression (same as we do for msaa), assert starts to fire in
piglit case: tex3d. The test uses depth of one which is in fact
supported even now.

v2 (Jason): Allow also 1D case as there is nothing in the specs
            constraining it either.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: Add sanity check for non-compressible texture views
Topi Pohjolainen [Wed, 7 Sep 2016 06:38:11 +0000 (09:38 +0300)]
i965: Add sanity check for non-compressible texture views

v2: Fix missing inline declaration

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965/rbc: Consult rb settings for texture surface setup
Topi Pohjolainen [Wed, 31 Aug 2016 07:08:17 +0000 (10:08 +0300)]
i965/rbc: Consult rb settings for texture surface setup

Once mcs buffer gets allocated without delay for lossless
compression (same as we do for msaa), one gets regression in:

GL45-CTS.texture_barrier_ARB.same-texel-rw

Setting the auxiliary surface for both sampling engine and data
port seems to fix this. I haven't found any hardware documentation
backing this though.

v2 (Jason): Prepare also for the case where surface is sampled with
            non-compressible format forcing also rendering without
            compression.
v3: Split asserts and decision making.
v4: Detailed comment provided by Jason explaining the need for using
    auxiliary buffer for texturing when the same surface is also
    used as render target.
    Added check for existence of renderbuffer before considering if
    underlying miptree matches.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: Track non-compressible sampling of renderbuffers
Topi Pohjolainen [Sun, 4 Sep 2016 08:02:39 +0000 (11:02 +0300)]
i965: Track non-compressible sampling of renderbuffers

v3:
   - Actually set the flags when needed instead of falsely
     overwriting them (Jason).
   - Use more generic name for flag (dropped RENDERBUFFER)
   - Consult also shader images
v4:
   - Consult only lossless compressd shader images

v5:
   - Check the existence of renderbuffer before considering
     if it matches the given miptree

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: Replace boolean rb surface state setup argument with flags
Topi Pohjolainen [Mon, 5 Sep 2016 12:14:11 +0000 (15:14 +0300)]
i965: Replace boolean rb surface state setup argument with flags

And add plumbing to provide it all the way to surface state emitter.
This is not used yet but will be in subsequent patches to carry
additional constraints.

v2 (Jason): Use uint32_t instead of int as the type

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965/rbc: Allow integer formats as advertised in isl_format.c
Topi Pohjolainen [Thu, 25 Aug 2016 14:46:09 +0000 (17:46 +0300)]
i965/rbc: Allow integer formats as advertised in isl_format.c

Blorp consults brw_is_color_fast_clear_compatible() to see if any
restrictions apply for fast clear in addition to the capablities
advertised in isl_format.c::format_info[]. On Gen8+ integer formats
are backlisted for plain old fast clear but there is no reason why
lossless compression shouldn't be supported. In fact, lossless
compression of integer formats is already supported for normal
render paths.

This patch prepares for dropping the delayed allocating of the mcs
buffer for lossless compression. Until now the skip of fast clear
also prevented the mcs being allocated and hence the lossless
compression being effectively turned off for integer formats.
Once the mcs buffer is allocated beforehand, the assertion addressed
here would start triggering.

v2: Drop the assert instead of relaxing it (Jason)
    Fix typo while at it.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: remove unused variable at intel_miptree_create_for_teximage
Alejandro Piñeiro [Sat, 10 Sep 2016 22:07:31 +0000 (00:07 +0200)]
i965: remove unused variable at intel_miptree_create_for_teximage

After commit "i965: Fix calculation of the image height at start level", it is
not needed. This commit removes the "warning: unused variable ‘i’" warning.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agomesa/glsl: Move string_to_uint_map into the util folder
Thomas Helland [Tue, 16 Aug 2016 20:10:36 +0000 (22:10 +0200)]
mesa/glsl: Move string_to_uint_map into the util folder

This clears the last bits of the usecases of the hash table
located in mesa/program, allowing us to remove it.

V2: Rebase on top of changes to Makefile.sources

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert glcpp-parse to the util hash table
Thomas Helland [Thu, 18 Aug 2016 19:59:19 +0000 (21:59 +0200)]
glsl: Convert glcpp-parse to the util hash table

And change the include in glcpp.h accordingly.

V2: Whitespace fix

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert loop analysis to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:34 +0000 (22:10 +0200)]
glsl: Convert loop analysis to the util hash table

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agomesa: Convert symbol table to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:33 +0000 (22:10 +0200)]
mesa: Convert symbol table to the util hash table

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert varying test to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:32 +0000 (22:10 +0200)]
glsl: Convert varying test to the util hash table

V2: remove now unused ht_count_callback() (Timothy Arceri)

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert output read lowering to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:31 +0000 (22:10 +0200)]
glsl: Convert output read lowering to the util hash table

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert interface block lowering to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:30 +0000 (22:10 +0200)]
glsl: Convert interface block lowering to the util hash table

V2: move comment to correct location (Timothy Arceri)

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert if lowering to use a set
Thomas Helland [Tue, 16 Aug 2016 20:10:28 +0000 (22:10 +0200)]
glsl: Convert if lowering to use a set

Also do some minor whitespace cleanups

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert linker to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:27 +0000 (22:10 +0200)]
glsl: Convert linker to the util hash table

We are getting the util hash table through the include in
program/hash_table.h for the moment until we migrate the
string_to_uint_map to a separate file.

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert link_varyings to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:26 +0000 (22:10 +0200)]
glsl: Convert link_varyings to the util hash table

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Change link_functions to use a set
Thomas Helland [Tue, 16 Aug 2016 20:10:24 +0000 (22:10 +0200)]
glsl: Change link_functions to use a set

The "locals" hash table is used as a set, so use a set to
avoid confusion and also spare some minor memory.

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert recursion detection to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:23 +0000 (22:10 +0200)]
glsl: Convert recursion detection to the util hash table

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert constant_expression to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:22 +0000 (22:10 +0200)]
glsl: Convert constant_expression to the util hash table

V2: Fix incorrect ordering on hash table insert

V3: null check value returned by _mesa_hash_table_search()
    (Timothy Arceri)

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert ast_to_hir to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:21 +0000 (22:10 +0200)]
glsl: Convert ast_to_hir to the util hash table

V2: Rebase to the adaption of new hashing functions

V3: move previous_label declaration to where it is used
    (Timothy Arceri)

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert ir_clone to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:20 +0000 (22:10 +0200)]
glsl: Convert ir_clone to the util hash table

V2: add braces to multiline if (Timothy Arceri)

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: Convert function inlining to the util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:19 +0000 (22:10 +0200)]
glsl: Convert function inlining to the util hash table

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agomesa: Convert string_to_uint_map to the util hash table
Thomas Helland [Thu, 18 Aug 2016 19:51:40 +0000 (21:51 +0200)]
mesa: Convert string_to_uint_map to the util hash table

And remove the now unused hash_table_replace.

V2: Actually do the equivalent thing, and don't leak memory

V3: fix minor typo in comment (Timothy Arceri)

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoutil: Move hash_table_call_foreach to util hash table
Thomas Helland [Tue, 16 Aug 2016 20:10:17 +0000 (22:10 +0200)]
util: Move hash_table_call_foreach to util hash table

It is included through the util/hash_table include in
the program hash_table, so this should be safe.
This will be needed when we start converting each use of
the program_hash_table, as some places need this function.

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agomesa: Remove prog_hash_table.c
Thomas Helland [Tue, 16 Aug 2016 20:10:15 +0000 (22:10 +0200)]
mesa: Remove prog_hash_table.c

Here we make the prog_hash_table functionally equivalent to
the one in util by wrapping the remaing functions that differ.

We also move the functions to the header so we can remove the c
file.

This enables us to do a step-by-step replacement of the table.

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agomesa: Remove unused hash table includes
Thomas Helland [Tue, 16 Aug 2016 20:10:14 +0000 (22:10 +0200)]
mesa: Remove unused hash table includes

This should prevent us from rebuilding the world.

Signed-off-by: Thomas Helland <thomashelland90@gmail.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agofreedreno/a3xx: disable filtering for texture buffers and int textures
Ilia Mirkin [Thu, 17 Sep 2015 06:04:22 +0000 (02:04 -0400)]
freedreno/a3xx: disable filtering for texture buffers and int textures

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
7 years agost/clover: Define __OPENCL_VERSION__ on the device side
Niels Ole Salscheider [Sun, 28 Aug 2016 14:42:34 +0000 (16:42 +0200)]
st/clover: Define __OPENCL_VERSION__ on the device side

This is required by the OpenCL standard.

Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Vedran Miletić <vedran@miletic.net>
7 years agogm107/ir: allow indirect inputs to be loaded by frag shader
Ilia Mirkin [Thu, 8 Sep 2016 06:13:56 +0000 (02:13 -0400)]
gm107/ir: allow indirect inputs to be loaded by frag shader

Looks like the GM107 IPA op does not allow a separate offset when
using an indirect register. Instead we must use AL2P like we do for
indirect vertex operations on Kepler+.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agogm107/ir: AL2P writes to a predicate register
Ilia Mirkin [Sat, 10 Sep 2016 16:53:37 +0000 (12:53 -0400)]
gm107/ir: AL2P writes to a predicate register

We have to force it to write to predicate 7 (aka PT) in order for it not
to mess up another predicate. Unclear what would be returned in the
predicate, perhaps an error code for out-of-bounds requests. Blob
doesn't seem to check it.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
7 years agoi965: Fix calculation of the image height at start level
Antia Puentes [Sat, 3 Sep 2016 01:04:37 +0000 (03:04 +0200)]
i965: Fix calculation of the image height at start level

- Fixes CTS tests:

* GL44-CTS.shader_image_size.advanced-nonMS-cs-float
* GL44-CTS.shader_image_size.advanced-nonMS-cs-int
* GL44-CTS.shader_image_size.advanced-nonMS-cs-uint
* GL44-CTS.shader_image_size.advanced-nonMS-gs-float
* GL44-CTS.shader_image_size.advanced-nonMS-gs-int
* GL44-CTS.shader_image_size.advanced-nonMS-gs-uint
* GL44-CTS.shader_image_size.advanced-nonMS-tes-float
* GL44-CTS.shader_image_size.advanced-nonMS-tes-int
* GL44-CTS.shader_image_size.advanced-nonMS-tes-uint
* GL44-CTS.shader_image_size.advanced-nonMS-vs-float
* GL44-CTS.shader_image_size.advanced-nonMS-vs-int
* GL44-CTS.shader_image_size.advanced-nonMS-vs-uint

v1: (written by Dave Airlie) Always shift height images for levels.
Fixed the CTS test.

v2: Only shift height if the texture is not an 1D_ARRAY,
it fixes assertion in GL44-CTS.texture_view.gettexparameter
due to the original patch (Antia).

v3: Remove the loop. Do not shift height either for 1D textures.
Use an explicit switch and add an assertion (levels == 0) for
multisampled textures (Jason).

v4: Rectangle textures can not have levels either (Ilia Mirkin).

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Antia Puentes <apuentes@igalia.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoradeonsi: flush TC L2 before using a compute indirect buffer
Marek Olšák [Thu, 8 Sep 2016 18:15:51 +0000 (20:15 +0200)]
radeonsi: flush TC L2 before using a compute indirect buffer

There is no known test for this.

Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: fix the VGT performance tweak for small instances
Marek Olšák [Wed, 7 Sep 2016 23:42:06 +0000 (01:42 +0200)]
radeonsi: fix the VGT performance tweak for small instances

Based on the VGT spec.

The Vulkan driver doesn't do it optimally and they plan to fix it.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: remove the cache_flush atom
Marek Olšák [Wed, 7 Sep 2016 22:59:55 +0000 (00:59 +0200)]
radeonsi: remove the cache_flush atom

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agowinsys/amdgpu: replace OUT_CS with radeon_emit
Marek Olšák [Fri, 9 Sep 2016 09:06:29 +0000 (11:06 +0200)]
winsys/amdgpu: replace OUT_CS with radeon_emit

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agowinsys/radeon: replace OUT_CS with radeon_emit
Marek Olšák [Fri, 9 Sep 2016 09:06:29 +0000 (11:06 +0200)]
winsys/radeon: replace OUT_CS with radeon_emit

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agodoc: document GALLIUM_DRIVER
Christoph Haag [Thu, 8 Sep 2016 19:32:04 +0000 (21:32 +0200)]
doc: document GALLIUM_DRIVER

v2: Add dot at end of sentence

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoegl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT
Haixia Shi [Fri, 26 Aug 2016 07:47:53 +0000 (10:47 +0300)]
egl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT

Set config attributes EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT to
hard-coded non-zero values. These two attributes are required on Android.

v2: use _EGL_MAX_PBUFFER_WIDTH/HEIGHT from egldefines.h
    (based on discussion on the first version)

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoandroid: depend on libmesa_genxml from i965 Android.gen.mk
Tapani Pälli [Wed, 7 Sep 2016 11:19:54 +0000 (14:19 +0300)]
android: depend on libmesa_genxml from i965 Android.gen.mk

Static library dependency is required to pull the generated
XML headers into the generated C file.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoi965: release GLSL IR in LinkShader after it's not needed
Tapani Pälli [Mon, 5 Sep 2016 06:18:09 +0000 (09:18 +0300)]
i965: release GLSL IR in LinkShader after it's not needed

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
7 years agoglsl: use hash instead of exec_list in copy propagation
Tapani Pälli [Tue, 6 Sep 2016 07:17:57 +0000 (10:17 +0300)]
glsl: use hash instead of exec_list in copy propagation

This change makes copy propagation pass faster. Complete link time
spent in test case attached to bug 94477 goes down to ~400 secs from
over 500 secs on my HSW machine. Does not fix the actual issue but
brings down the total. No regressions seen in CI.

v2: do not leak hash_table structure

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agoi965/fs: Fail the shader compile instead of asserting when we can't spill
Jason Ekstrand [Thu, 8 Sep 2016 21:08:02 +0000 (14:08 -0700)]
i965/fs: Fail the shader compile instead of asserting when we can't spill

Blorp doesn't handle spilling so we set allow_spilling to false in that
case.  The blorp 16x MSAA resolve shader spills in 16-wide but not 8-wide.
This commit makes it so that we fail the 16-wide compile and successfully
fall back to 8-wide instead of just assert-failing when trying to compile
the 16-wide shader.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
7 years agonir/gcm: Add global value numbering support
Jason Ekstrand [Wed, 10 Aug 2016 21:34:49 +0000 (14:34 -0700)]
nir/gcm: Add global value numbering support

Unlike the current CSE pass, global value numbering is capable of detecting
common values even if one does not dominate the other.  For instance, in
you have

if (...) {
   ssa_1 = ssa_0 + 7;
   /* use ssa_1 */
} else {
   ssa_2 = ssa_0 + 7;
   /* use ssa_2 */
}

Global value numbering doesn't care about dominance relationships so it
figures out that ssa_1 and ssa_2 are the same and converts this to

if (...) {
   ssa_1 = ssa_0 + 7;
   /* use ssa_1 */
} else {
   /* use ssa_1 */
}

Obviously, we just broke SSA form which is bad.  Global code motion,
however, will repair this for us by turning this into

ssa_1 = ssa_0 + 7;
if (...) {
   /* use ssa_1 */
} else {
   /* use ssa_1 */
}

This intended to eventually mostly replace CSE.  However, conventional CSE
may still be useful because it's less of a scorched-earth approach and
doesn't require GCM.  This makes it a bit more appropriate for use as a
clean-up in a late optimization run.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agonir/gcm: Call nir_metadata_preserve
Jason Ekstrand [Wed, 10 Aug 2016 21:34:37 +0000 (14:34 -0700)]
nir/gcm: Call nir_metadata_preserve

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agor300g: Set R300_VAP_CNTL on RSxxx to avoid triangle flickering
Max Staudt [Wed, 7 Sep 2016 23:53:45 +0000 (01:53 +0200)]
r300g: Set R300_VAP_CNTL on RSxxx to avoid triangle flickering

On the RSxxx chip series, HW TCL is missing and r300_emit_vs_state()
is never called.

However, if R300_VAP_CNTL is never set, the hardware (at least the
RS690 I tested this on) comes up with rendering artifacts, and
parts that are uploaded before this "fix" remain broken in VRAM.
This causes artifacts as in fdo#69076 ("triangle flickering").

It seems like this setup needs to happen at least once after power on
for 3D rendering to work properly. In the DDX with EXA, this happens in
RADEON_SWITCH_TO_3D() when processing an XRENDER Composite or an
Xv request. So playing back a video or starting a GTK+2 application
fixes 3D rendering for the rest of the session. However, this auto-fix
doesn't happen when EXA is not used, such as with GLAMOR or Wayland.

This patch ensures the register is configured even in absence of
the DDX's EXA module.

The register setting is taken from:
  xf86-video-ati  --  RADEONInit3DEngineInternal()
  mesa/src/mesa/drivers/dri/r300  --  r300EmitClearState()

Tested on RS690.

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Max Staudt <mstaudt@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agogallium: remove PIPE_BIND_TRANSFER_READ/WRITE
Marek Olšák [Wed, 7 Sep 2016 19:24:08 +0000 (21:24 +0200)]
gallium: remove PIPE_BIND_TRANSFER_READ/WRITE

not used in any useful way

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
7 years agoradeonsi: unify si_set_optimal_micro_tile_mode call sites
Marek Olšák [Wed, 7 Sep 2016 10:35:40 +0000 (12:35 +0200)]
radeonsi: unify si_set_optimal_micro_tile_mode call sites

There is nothing special happening in those code blocks.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: fix texture reinterpretation after DCC fast clear
Marek Olšák [Wed, 7 Sep 2016 00:51:24 +0000 (02:51 +0200)]
radeonsi: fix texture reinterpretation after DCC fast clear

The problem is that TC-compatible DCC clear codes translate
into different clear values when you change the format.

I have a new piglit reproducing the issue.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: enable DCC fast clear for 128-bit formats
Marek Olšák [Wed, 7 Sep 2016 00:05:34 +0000 (02:05 +0200)]
radeonsi: enable DCC fast clear for 128-bit formats

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: clamp integer clear color values for DCC fast clear
Marek Olšák [Tue, 6 Sep 2016 23:39:09 +0000 (01:39 +0200)]
radeonsi: clamp integer clear color values for DCC fast clear

It should be possible to get TC-compatible fast clear more often now.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoRevert "radeonsi: enable SDMA on CIK"
Marek Olšák [Thu, 8 Sep 2016 16:21:04 +0000 (18:21 +0200)]
Revert "radeonsi: enable SDMA on CIK"

This reverts commit 0241d8300f66ee2c6c2c55fe64ac88d76440c591.

It doesn't work with mobile Bonaire. It looks like the programming of
tiling parameters is wrong on some chips.

7 years agodoc: fix typo of GALLIUM_HUD_TOGGLE_SIGNAL
Christoph Haag [Tue, 6 Sep 2016 23:13:39 +0000 (01:13 +0200)]
doc: fix typo of GALLIUM_HUD_TOGGLE_SIGNAL

In the original commit message in 56a1c10 it was wrongly used too:
- env GALLIUM_HUD_SIGNAL_TOGGLE: toggle visibility via signal

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agonir/spirv: Refactor variable deocration handling
Jason Ekstrand [Wed, 7 Sep 2016 01:44:52 +0000 (18:44 -0700)]
nir/spirv: Refactor variable deocration handling

Previously, we dind't apply variable decorations to the members of a split
structure variable.  This doesn't quite work, unfortunately, because things
such as the "flat" qualifier may get applied to an entire structure instead
of propagated to the members.  This fixes 9 of the new CTS tests in the
dEQP-VK.glsl.linkage.varying.struct.* group.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
7 years agonir/spirv: Break variable decoration handling into a helper
Jason Ekstrand [Wed, 7 Sep 2016 01:33:14 +0000 (18:33 -0700)]
nir/spirv: Break variable decoration handling into a helper

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
7 years agoaubinator: only use program_invocation_short_name with glibc/cygwin
Jonathan Gray [Thu, 1 Sep 2016 17:12:26 +0000 (03:12 +1000)]
aubinator: only use program_invocation_short_name with glibc/cygwin

program_invocation_short_name is a gnu extension.  Limit use of it
to glibc and cygwin and otherwise use getprogname() which is available
on BSD and OS X.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoaubinator: include libgen.h for basename(3)
Jonathan Gray [Thu, 1 Sep 2016 17:12:25 +0000 (03:12 +1000)]
aubinator: include libgen.h for basename(3)

Include libgen.h for basename as required by posix.
The definition is not found on at least OpenBSD otherwise.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoaubinator: stop using non portable error() function
Jonathan Gray [Thu, 1 Sep 2016 17:12:24 +0000 (03:12 +1000)]
aubinator: stop using non portable error() function

error() is a gnu extension and is not present on OpenBSD
and likely other systems.

Convert use of error to fprintf/strerror/exit.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoegl: Fix up indentation on previous commit
Adam Jackson [Thu, 8 Sep 2016 17:21:24 +0000 (13:21 -0400)]
egl: Fix up indentation on previous commit

This was requested in review but I pushed the wrong version.

Signed-off-by: Adam Jackson <ajax@redhat.com>
7 years agoegl: Document why EGL_OPENGL{, _ES}_API are mostly identical
Adam Jackson [Wed, 7 Sep 2016 21:41:56 +0000 (17:41 -0400)]
egl: Document why EGL_OPENGL{, _ES}_API are mostly identical

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
7 years agoanv: Link to libX11-xcb only when unneeded
Chad Versace [Thu, 8 Sep 2016 03:07:50 +0000 (20:07 -0700)]
anv: Link to libX11-xcb only when unneeded

The Makefile unconditionally linked libX11-xcb into libvulkan_intel.so.
But it's needed only if HAVE_PLATFORM_X11.

Fixes build of libvulkan_intel.so on Chromium OS, which has no X11
libraries.

Fixes: 71258e9462c ("anv/x11: Add support for Xlib platform")
Cc: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoswr: fixes for format mapping and texture sizing
Tim Rowley [Wed, 17 Aug 2016 15:12:04 +0000 (10:12 -0500)]
swr: fixes for format mapping and texture sizing

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
7 years agointel/blorp: Allow single slice converter to suppress number of layers
Topi Pohjolainen [Mon, 29 Aug 2016 12:21:51 +0000 (15:21 +0300)]
intel/blorp: Allow single slice converter to suppress number of layers

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agospirv/nir: Implement OpAtomicLoad/Store for shared variables
Lionel Landwerlin [Tue, 6 Sep 2016 21:51:23 +0000 (22:51 +0100)]
spirv/nir: Implement OpAtomicLoad/Store for shared variables

Missing bits from 2afb950161f847d9b0a7be03dfb62cacc5ea51ba.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agonir/spirv: Remove an erroneous "fall through" comment
Jason Ekstrand [Wed, 7 Sep 2016 16:03:47 +0000 (09:03 -0700)]
nir/spirv: Remove an erroneous "fall through" comment

7 years agoEGL: Combine the GL and GLES current contexts (v2)
Kyle Brenneman [Fri, 8 Jul 2016 21:21:17 +0000 (15:21 -0600)]
EGL: Combine the GL and GLES current contexts (v2)

Only keep track of a single current context, instead of separate
contexts for GL and GLES.

In EGL 1.4 (and 1.5), EGL_OPENGL_API and EGL_OPENGL_ES_API are supposed
to be interchangeable for all purposes except for eglCreateContext.

The _EGLThreadInfo::CurrentContexts array is now a single pointer to the
current context, which may be a GL or GLES context. In addition, it now
keeps track of the current API as an enum instead of an index.

eglMakeCurrent will now replace the current context, regardless of which
client API is used for for the current and new contexts. It no longer
checks for a conflicting context. In addition, calling eglMakeCurrent
with EGL_NO_CONTEXT will now release the current context regardless of
the current API.

v2: Rebased against master (Adam Jackson)

Reviewed-by: Adam Jackson <ajax@redhat.com>
7 years agogbm: wire up fence extension
Rob Clark [Tue, 16 Aug 2016 16:56:45 +0000 (12:56 -0400)]
gbm: wire up fence extension

v2: make fence extension optional to not break non-i965 classic
    drivers, and move __DRI2_FENCE into core extensions, based
    on comments from Emil

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agofreedreno: reject imports with bogus pitch
Rob Clark [Sat, 3 Sep 2016 16:57:50 +0000 (12:57 -0400)]
freedreno: reject imports with bogus pitch

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agogbm: add missing R8 and GR88 formats
Rob Clark [Sat, 3 Sep 2016 12:49:49 +0000 (08:49 -0400)]
gbm: add missing R8 and GR88 formats

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agospirv/nir: Add support for OpAtomicLoad/Store
Lionel Landwerlin [Tue, 6 Sep 2016 13:26:17 +0000 (14:26 +0100)]
spirv/nir: Add support for OpAtomicLoad/Store

Fixes new CTS tests :

dEQP-VK.spirv_assembly.instruction.compute.opatomic.load
dEQP-VK.spirv_assembly.instruction.compute.opatomic.store

v2: don't handle images like ssbo/ubo (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoradeonsi: skip redundant INDEX_TYPE writes
Marek Olšák [Mon, 5 Sep 2016 22:35:12 +0000 (00:35 +0200)]
radeonsi: skip redundant INDEX_TYPE writes

Ported from Vulkan.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: add more unlikely() uses into si_draw_vbo
Marek Olšák [Mon, 5 Sep 2016 22:10:38 +0000 (00:10 +0200)]
radeonsi: add more unlikely() uses into si_draw_vbo

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoradeonsi: skip draws with instance_count == 0
Marek Olšák [Mon, 5 Sep 2016 22:09:17 +0000 (00:09 +0200)]
radeonsi: skip draws with instance_count == 0

loosely ported from Vulkan

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agogallium/radeon/winsyses: fix counting mapped memory
Marek Olšák [Sun, 4 Sep 2016 12:21:41 +0000 (14:21 +0200)]
gallium/radeon/winsyses: fix counting mapped memory

Not all buffers are unmapped explicitly.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agonir: fix definition of pack_uvec2_to_uint
Ilia Mirkin [Mon, 5 Sep 2016 02:46:13 +0000 (22:46 -0400)]
nir: fix definition of pack_uvec2_to_uint

Found by inspection. Untested beyond compilation. This also matches the
logic used in nir_lower_alu_to_scalar.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: mesa-stable@lists.freedesktop.org
7 years agomesa/formatquery: limit ES target support, fix core context support
Ilia Mirkin [Sat, 3 Sep 2016 18:31:44 +0000 (14:31 -0400)]
mesa/formatquery: limit ES target support, fix core context support

First off, as late as ES 3.2, GetInternalformat only supports
RENDERBUFFER and 2DMS(_ARRAY) targets.

Secondly, the _mesa_has_ext helpers are very accurate... a little too
accurate, some might say. If we only show an extension in compat
profiles because core profiles have the functionality guaranteed, they
will return false. Fix these to either check for a core profile
explicitly, or to a different-but-identical extension available in core
profile.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Matteo Bruni <matteo.mystral@gmail.com>
Tested-by: Matteo Bruni <matteo.mystral@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
7 years agomapi: add gl32.h to the list of GLES3 headers for installation
Ilia Mirkin [Tue, 6 Sep 2016 21:40:34 +0000 (17:40 -0400)]
mapi: add gl32.h to the list of GLES3 headers for installation

This was missed when I added the updated (and new) Khronos headers.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
7 years agomain: GL_RGB10_A2UI does not come with GL 3.0/EXT_texture_integer
Ilia Mirkin [Sun, 4 Sep 2016 00:19:56 +0000 (20:19 -0400)]
main: GL_RGB10_A2UI does not come with GL 3.0/EXT_texture_integer

Add a separate extension check for that format. Prevents glTexImage from
trying to find a matching format, which fails on drivers without support
for this format.

Fixes: sized-texture-format-channels (on a3xx)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: mesa-stable@lists.freedesktop.org
7 years agonir/spirv: Use fill_common_atomic_sources for image atomics
Jason Ekstrand [Tue, 6 Sep 2016 22:07:57 +0000 (15:07 -0700)]
nir/spirv: Use fill_common_atomic_sources for image atomics

We had two almost identical copies of this code and they were both broken
but in different ways.  The previous two commits fixed both of them.  This
one just unifies them so that it's easier to handle in the future.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agonir/spirv: Use the correct sources for CompareExchange on images
Jason Ekstrand [Tue, 6 Sep 2016 22:13:42 +0000 (15:13 -0700)]
nir/spirv: Use the correct sources for CompareExchange on images

The CompareExchange operation has two "Memory Semantics" parameters instead
of one so the real arguments start at w[7] instead of w[6].

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agonir/spirv: Swap the argument order for AtomicCompareExchange
Jason Ekstrand [Tue, 6 Sep 2016 22:02:31 +0000 (15:02 -0700)]
nir/spirv: Swap the argument order for AtomicCompareExchange

SPIR-V has the two arguments in the opposite order from GLSL.  NIR uses the
GLSL order so we had them backwards.

Fixes dEQP-VK.spirv_assembly.instruction.compute.opatomic.compex

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
7 years agovbo: increase VBO_SAVE_BUFFER_SIZE from 8k to 256k dwords
Tim Rowley [Wed, 17 Aug 2016 15:45:37 +0000 (10:45 -0500)]
vbo: increase VBO_SAVE_BUFFER_SIZE from 8k to 256k dwords

Increases the performance of legacy geometry-heavy apps
still using display lists.

Performance increase for a targeted testcase is on the
order of 8x, and applications like ParaView 4.x (5.x uses
no longer used display lists) improve by about 10%-20%.

Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoglsl: Add positional argument specifiers.
Vinson Lee [Thu, 1 Sep 2016 07:20:02 +0000 (00:20 -0700)]
glsl: Add positional argument specifiers.

Fix build with Python < 2.7.

  File "./glsl/ir_expression_operation.py", line 360, in get_enum_name
    return "ir_{}op_{}".format(("un", "bin", "tri", "quad")[self.num_operands-1], self.name)
ValueError: zero length field name in format

Fixes: e31c72a331b1 ("glsl: Convert tuple into a class")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
7 years agoutil: (trivial) add <stdint.h> include to slab.c
Roland Scheidegger [Tue, 6 Sep 2016 17:47:14 +0000 (19:47 +0200)]
util: (trivial) add <stdint.h> include to slab.c

should fix "src/util/slab.c:57:13: error: ‘uint8_t’ undeclared"

7 years agoglsl: Add .gitignore for make check warnings test
Jason Ekstrand [Tue, 6 Sep 2016 15:32:19 +0000 (08:32 -0700)]
glsl: Add .gitignore for make check warnings test

7 years agoanv/pipeline: Lower indirect outputs when EmitNoIndirectOutput is set
Jason Ekstrand [Tue, 6 Sep 2016 03:09:47 +0000 (20:09 -0700)]
anv/pipeline: Lower indirect outputs when EmitNoIndirectOutput is set

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reported-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agoAndroid: glsl: add rules to generate ir_expression*.h header files
Rob Herring [Thu, 1 Sep 2016 19:06:23 +0000 (14:06 -0500)]
Android: glsl: add rules to generate ir_expression*.h header files

Recent changes to generate ir_expression*.h header files broke Android
builds. This adds the generation rules. This change is complicated due to
creating a circular dependency between libmesa_glsl, libmesa_nir, and
libmesa_compiler. Normally, we add static libraries so that include paths
are added even if there's no linking dependency. That is the case here.
Instead, we explicitly add the include path using $(MESA_GEN_GLSL_H) to
libmesa_compiler. This in turn requires shuffling the order of make
includes. It also uncovered missing dependency tracking of glsl_parser.h.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agost/omx/dec: enable hevc omx decode support
Leo Liu [Mon, 29 Aug 2016 17:43:48 +0000 (13:43 -0400)]
st/omx/dec: enable hevc omx decode support

Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>