mesa.git
7 years agogallium/radeon: subclass and handle threaded_query
Marek Olšák [Sun, 12 Mar 2017 20:44:07 +0000 (21:44 +0100)]
gallium/radeon: subclass and handle threaded_query

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: subclass threaded_transfer
Marek Olšák [Tue, 2 May 2017 23:51:42 +0000 (01:51 +0200)]
gallium/radeon: subclass threaded_transfer

v2: use assert on rtransfer->b.staging

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: subclass threaded_resource
Marek Olšák [Fri, 10 Mar 2017 14:48:24 +0000 (15:48 +0100)]
gallium/radeon: subclass threaded_resource

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: handle other map buffer flags from the threaded context
Marek Olšák [Sun, 12 Mar 2017 13:17:25 +0000 (14:17 +0100)]
gallium/radeon: handle other map buffer flags from the threaded context

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: handle TC_TRANSFER_MAP_THREADED_UNSYNC
Marek Olšák [Thu, 2 Mar 2017 00:27:53 +0000 (01:27 +0100)]
gallium/radeon: handle TC_TRANSFER_MAP_THREADED_UNSYNC

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: unwrap a context if we get a wrapped one
Marek Olšák [Sun, 26 Feb 2017 17:48:28 +0000 (18:48 +0100)]
gallium/radeon: unwrap a context if we get a wrapped one

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region
Marek Olšák [Tue, 2 May 2017 23:23:54 +0000 (01:23 +0200)]
gallium/radeon: require both WRITE and FLUSH_EXPLICIT in buffer_flush_region

spotted randomly.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/util: add threaded_context as a pipe_context wrapper
Marek Olšák [Thu, 2 Mar 2017 00:15:55 +0000 (01:15 +0100)]
gallium/util: add threaded_context as a pipe_context wrapper

v2: - rename num_calls -> num_call_slots (for tc_call)
    - rename num_calls -> num_total_call_slots (for tc_batch)
    - rename num_offloaded/direct_calls -> num_offloaded/direct_slots
    - declare slot[0] instead of slot[1]
    - remove no-op leftover code from tc_draw_vbo
    - use tc_set_resource_reference to fill threaded_transfer
    - fix map flags for sparse buffers
    - cosmetic changes

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium/u_upload: add u_upload_clone
Marek Olšák [Sat, 18 Feb 2017 22:01:14 +0000 (23:01 +0100)]
gallium/u_upload: add u_upload_clone

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agogallium: add flag PIPE_CONTEXT_PREFER_THREADED
Marek Olšák [Fri, 24 Mar 2017 00:57:40 +0000 (01:57 +0100)]
gallium: add flag PIPE_CONTEXT_PREFER_THREADED

State trackers can set this to tell the driver when u_threaded_context is
desirable.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
7 years agoradeonsi/gfx9: add support for Raven
Marek Olšák [Mon, 27 Feb 2017 21:26:10 +0000 (22:26 +0100)]
radeonsi/gfx9: add support for Raven

Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoamd/addrlib: import Raven support
Marek Olšák [Mon, 27 Feb 2017 21:25:43 +0000 (22:25 +0100)]
amd/addrlib: import Raven support

Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agorenderonly: Initialize fields of struct winsys_handle.
Eric Anholt [Tue, 9 May 2017 18:24:21 +0000 (11:24 -0700)]
renderonly: Initialize fields of struct winsys_handle.

vc4 was rejecting renderonly's import, because the offset field was
nonzero.

Fixes: 848b49b288f ("gallium: add renderonly library")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
7 years agoRevert "freedreno: use bypass if only clears"
Rob Clark [Sun, 14 May 2017 18:16:39 +0000 (14:16 -0400)]
Revert "freedreno: use bypass if only clears"

Causing issues with stk on a4xx.. still probably a good idea, but seems
some debugging is needed first.

This reverts commit 3ab072d3c8643c66d8e07e63df970b792728bac6.

7 years agofreedreno: fix crash when flush() but no rendering
Rob Clark [Sun, 14 May 2017 15:32:44 +0000 (11:32 -0400)]
freedreno: fix crash when flush() but no rendering

If we haven't created a batch, just bail in pipe->flush(), since there
is nothing to do.

Fixes crash in warsow, which creates a whole bunch of contexts used for
nothing but texture uploads.

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agofreedreno: fix indexbuffer upload
Rob Clark [Sat, 13 May 2017 18:43:45 +0000 (14:43 -0400)]
freedreno: fix indexbuffer upload

My fault for not having time to test Marek's patches while they were on
list.

Fixes: 330d0607 ("gallium: remove pipe_index_buffer and set_index_buffer")
Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agoradv: Save descriptor set even if vertex buffers are not saved.
Bas Nieuwenhuizen [Sat, 13 May 2017 16:05:36 +0000 (18:05 +0200)]
radv: Save descriptor set even if vertex buffers are not saved.

Totally independent.

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Fixes: 0e6d532d327 "radv/meta: add support for save/restore meta without vertex data."
7 years agofreedreno/a5xx: hw binning support
Rob Clark [Fri, 12 May 2017 13:56:56 +0000 (09:56 -0400)]
freedreno/a5xx: hw binning support

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agofreedreno: update generated headers
Rob Clark [Thu, 11 May 2017 17:53:55 +0000 (13:53 -0400)]
freedreno: update generated headers

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agofreedreno: use bypass if only clears
Rob Clark [Fri, 12 May 2017 18:24:33 +0000 (14:24 -0400)]
freedreno: use bypass if only clears

Some things trigger batches that only contain a clear (like glmark2
startup).  No point to use GMEM for this.

Signed-off-by: Rob Clark <robdclark@gmail.com>
7 years agonv50/ir: Report wrong prog types using proper var
Pierre Moreau [Fri, 12 May 2017 09:01:32 +0000 (11:01 +0200)]
nv50/ir: Report wrong prog types using proper var

Coverity caught the use of the uninitialised variable `type`.
However, it was `info->type`, which is initialised, which was meant to
be used.

CID: 1406000
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Fixes: b490ca9a387d ("nv50/ir: Fail if encountering unknown shader type")
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agomesa: fix KHR_no_error SSO support
Timothy Arceri [Fri, 12 May 2017 05:29:57 +0000 (15:29 +1000)]
mesa: fix KHR_no_error SSO support

Fixes: 00c5119a5e821 ("mesa: add KHR_no_error support for glUseProgramStages()")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agodocs: update calendar, add news item and link release notes for 17.0.6
Andres Gomez [Fri, 12 May 2017 23:20:32 +0000 (02:20 +0300)]
docs: update calendar, add news item and link release notes for 17.0.6

Signed-off-by: Andres Gomez <agomez@igalia.com>
7 years agodocs: add sha256 checksums for 17.0.6
Andres Gomez [Fri, 12 May 2017 23:14:17 +0000 (02:14 +0300)]
docs: add sha256 checksums for 17.0.6

Signed-off-by: Andres Gomez <agomez@igalia.com>
(cherry picked from commit 6a680243fcef4509372941d5c4c50b82c3aaa8ed)

7 years agodocs: add release notes for 17.0.6
Andres Gomez [Fri, 12 May 2017 20:41:51 +0000 (23:41 +0300)]
docs: add release notes for 17.0.6

Signed-off-by: Andres Gomez <agomez@igalia.com>
(cherry picked from commit 08abf3a2a2ca8733fb75277d41f2196fe899f129)

7 years agobin/get-fixes-pick-list.sh: bring back the warning
Andres Gomez [Mon, 8 May 2017 17:57:35 +0000 (20:57 +0300)]
bin/get-fixes-pick-list.sh: bring back the warning

We warn again if there are more than one line with the "fixes:" tag.

The warning is silenced when the commit has already landed or each
fixes tag reference a commit that is in branch.

v2:
 - Warn if any of the fixes tags has not landed (Emil)

v3:
 - Remove unnecessary head command
 - Clarify commit message (Emil)
 - Skip already picked commits sooner (Emil)

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: extend until the end of August
Andres Gomez [Sat, 6 May 2017 15:46:13 +0000 (18:46 +0300)]
docs: extend until the end of August

Completed the 17.1 cycle and added the beginning of the 17.2 one.

Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: update "Release manager" column
Andres Gomez [Sat, 6 May 2017 15:46:12 +0000 (18:46 +0300)]
docs: update "Release manager" column

Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Juan A. Suarez Romero <jasuarez@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoglsl: include image qualifiers when printing IR
Nicolai Hähnle [Wed, 26 Apr 2017 16:34:09 +0000 (18:34 +0200)]
glsl: include image qualifiers when printing IR

v2:
- fix copy&paste errors noted by Samuel
- rebase

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
7 years agoradeonsi: get rid of secondary input/output word
Nicolai Hähnle [Tue, 2 May 2017 15:46:12 +0000 (17:46 +0200)]
radeonsi: get rid of secondary input/output word

By keeping track of fewer generics, everything can fit into 64 bits.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: reduce the number of generics for shader IO unique indices
Nicolai Hähnle [Wed, 10 May 2017 11:22:10 +0000 (13:22 +0200)]
radeonsi: reduce the number of generics for shader IO unique indices

This is a high as possible while still allowing to merge the bitfields
with the next commit.

For OpenGL, 32 would be sufficient. Nine apparently uses (much!) higher
indices than. Indices that are out of bound don't hurt for VS-PS
pipelines, except that the VS output kill optimization is not applied.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: at most 8 sets of texture coordinates are supported
Nicolai Hähnle [Wed, 10 May 2017 07:58:31 +0000 (09:58 +0200)]
radeonsi: at most 8 sets of texture coordinates are supported

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: skip generic out/in indices without a shader IO index
Nicolai Hähnle [Wed, 10 May 2017 11:26:39 +0000 (13:26 +0200)]
radeonsi: skip generic out/in indices without a shader IO index

OpenGL uses at most 32 generic outputs/inputs in any stage, and they always
have a shader IO index and therefore fit into the outputs_written/
inputs_read/kill_outputs fields.

However, Nine uses semantic indices more liberally. We support that
in VS-PS pipelines, except that the optimization of killing outputs
must be skipped.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoradeonsi: use SI_MAX_IO_GENERIC instead of magic values
Nicolai Hähnle [Wed, 10 May 2017 07:55:36 +0000 (09:55 +0200)]
radeonsi: use SI_MAX_IO_GENERIC instead of magic values

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agoglsl: order indices for images inside a struct array
Samuel Pitoiset [Thu, 11 May 2017 15:43:19 +0000 (17:43 +0200)]
glsl: order indices for images inside a struct array

ARB_bindless_texture allows images to be declared inside
structures. This is similar to samplers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agoglsl: add parcel_out_uniform_storage::set_opaque_indices() helper
Samuel Pitoiset [Thu, 11 May 2017 15:43:18 +0000 (17:43 +0200)]
glsl: add parcel_out_uniform_storage::set_opaque_indices() helper

In order to sort indices for images inside a struct array we
need to do something similar to samplers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agoi965: Port 3DSTATE_VF_TOPOLOGY on gen8+ to genxml.
Rafael Antognolli [Wed, 10 May 2017 00:12:12 +0000 (17:12 -0700)]
i965: Port 3DSTATE_VF_TOPOLOGY on gen8+ to genxml.

With this last state ported, we can get rid of gen8_draw_upload.c.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoi965: Port 3DSTATE_INDEX_BUFFER to genxml.
Rafael Antognolli [Wed, 10 May 2017 00:12:11 +0000 (17:12 -0700)]
i965: Port 3DSTATE_INDEX_BUFFER to genxml.

Also make the brw_get_index_type() function not shift its return, since that
is genxml's job now.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoi965: Port brw_cs_state tracked state to genxml.
Rafael Antognolli [Wed, 10 May 2017 00:12:10 +0000 (17:12 -0700)]
i965: Port brw_cs_state tracked state to genxml.

Emit the respective commands using genxml code.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agogenxml: Add alias for MOCS.
Rafael Antognolli [Wed, 10 May 2017 00:12:09 +0000 (17:12 -0700)]
genxml: Add alias for MOCS.

Use an alias for this field on 3DSTATE_INDEX_BUFFER on gen6+, so we can set
the same value as the defines.

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
7 years agoi965/genxml: Mostly style fixes for emit_vertices code.
Rafael Antognolli [Wed, 10 May 2017 00:12:08 +0000 (17:12 -0700)]
i965/genxml: Mostly style fixes for emit_vertices code.

Several issues were caught on review after the original patch landed.
This commit fixes them.

v2:
   - Fix padding (Topi)
   - Remove .DestinationElementOffset change from this patch (Topi)

Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agor600g: Add defines for per-shader engine settings
Glenn Kennard [Sun, 5 Mar 2017 17:26:48 +0000 (18:26 +0100)]
r600g: Add defines for per-shader engine settings

Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
7 years agor600g: Add instruction encoding defines for MEM_RD
Glenn Kennard [Sun, 5 Mar 2017 17:26:47 +0000 (18:26 +0100)]
r600g: Add instruction encoding defines for MEM_RD

Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
7 years agor600g: Add scratch ring register defines
Glenn Kennard [Sun, 5 Mar 2017 17:26:46 +0000 (18:26 +0100)]
r600g: Add scratch ring register defines

Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Glenn Kennard <glenn.kennard@gmail.com>
7 years agoi965: Drop brw_context::viewport_transform_enable.
Kenneth Graunke [Wed, 10 May 2017 19:01:41 +0000 (12:01 -0700)]
i965: Drop brw_context::viewport_transform_enable.

This was used by the meta fast clear code.  Now that we've switched
back to BLORP, it's always true.

We might want it back when we add a RECTLIST extension to GL, but
that's someday in the future...

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
7 years agoi965: Port Gen4-5 VS_STATE to genxml.
Kenneth Graunke [Wed, 10 May 2017 19:41:39 +0000 (12:41 -0700)]
i965: Port Gen4-5 VS_STATE to genxml.

It's actually not that much code.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
7 years agoi965: Change GEN_GEN < 7 to GEN_GEN == 6 in 3DSTATE_VS code.
Kenneth Graunke [Wed, 10 May 2017 19:41:38 +0000 (12:41 -0700)]
i965: Change GEN_GEN < 7 to GEN_GEN == 6 in 3DSTATE_VS code.

This whole code is surrounded in #if GEN_GEN >= 6, and this code only
applies on Sandybridge.  So, use GEN_GEN == 6 to reduce the delta in
the next patch, when we add Gen4-5 support.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
7 years agogenxml: Fix KSPs on Ironlake to be offsets, not pointers.
Kenneth Graunke [Wed, 10 May 2017 19:41:37 +0000 (12:41 -0700)]
genxml: Fix KSPs on Ironlake to be offsets, not pointers.

We use Instruction State Base Address on Ironlake, so we want KSP to be
an offset not an actual pointer.  Gen4/G45 use pointers.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoglsl: simplify set_opaque_binding()
Samuel Pitoiset [Thu, 11 May 2017 10:31:27 +0000 (12:31 +0200)]
glsl: simplify set_opaque_binding()

While we are at it, update the GLSL spec comment.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agoglsl: add missing check for samplers in set_opaque_binding()
Samuel Pitoiset [Thu, 11 May 2017 10:31:26 +0000 (12:31 +0200)]
glsl: add missing check for samplers in set_opaque_binding()

Like images, this prevents out-of-bound access when the explicit
binding layout qualifier is used with an array which contains
too much samplers.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: remove useless get_uniform_parameter() declaration
Samuel Pitoiset [Thu, 11 May 2017 13:34:06 +0000 (15:34 +0200)]
mesa: remove useless get_uniform_parameter() declaration

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agomesa: remove unused gl_program_parameter::Initialized
Samuel Pitoiset [Thu, 11 May 2017 10:06:48 +0000 (12:06 +0200)]
mesa: remove unused gl_program_parameter::Initialized

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
7 years agogallium/tests: fix build after index buffer changes
Marek Olšák [Wed, 10 May 2017 17:52:46 +0000 (19:52 +0200)]
gallium/tests: fix build after index buffer changes

for some reason, only scons can build these.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
7 years agoconfigure: remove unneeded bits around libunwind handling
Emil Velikov [Mon, 8 May 2017 16:37:02 +0000 (17:37 +0100)]
configure: remove unneeded bits around libunwind handling

If libunwind is not found we'll fail at PKG_CHECK_MODULES, so the
follow-up check will be false. Additionally the AM_CONDITIONAL is not
used, so we can drop it.

Fixes: 3bcef6aa245 ("configure.ac: honour --disable-libunwind if the .pc file is present")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs/releasing: don't forget to update the calendar
Emil Velikov [Mon, 8 May 2017 15:05:12 +0000 (16:05 +0100)]
docs/releasing: don't forget to update the calendar

Suggested-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agodocs: remove released versions from the calendar
Emil Velikov [Thu, 4 May 2017 16:37:06 +0000 (17:37 +0100)]
docs: remove released versions from the calendar

v2: Remove Mesa 17.1.0 as well

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch> (v1)
7 years agovirgl: remove unused draw include
Emil Velikov [Thu, 27 Apr 2017 15:25:04 +0000 (16:25 +0100)]
virgl: remove unused draw include

Driver does not use the gallium draw module.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Dave Airlie <airlied@redhat.com>
7 years agoradeon: automake: remove unneeded elf Cflags/Libs
Emil Velikov [Thu, 4 May 2017 15:17:28 +0000 (16:17 +0100)]
radeon: automake: remove unneeded elf Cflags/Libs

No longer required as of commit d90bf4ef3e1 ("radeon: remove unused
radeon_elf_util.{c,h}")

v2: Add the required libelf link in src/amd/Makefile.common.am

Fixes: d90bf4ef3e1 ("radeon: remove unused radeon_elf_util.{c,h}")
Cc: Timothy Arceri <tarceri@itsqueeze.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
7 years agoanv: document that anv_gem_mmap returns MAP_FAILED on error
Emil Velikov [Thu, 4 May 2017 14:54:04 +0000 (15:54 +0100)]
anv: document that anv_gem_mmap returns MAP_FAILED on error

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agoegl: simplify the Android logger
Emil Velikov [Mon, 8 May 2017 14:38:11 +0000 (15:38 +0100)]
egl: simplify the Android logger

Drop the unsupported pre-JellyBean macros and use a simple egl2android
mapping. With this we loose the explicit abort() provided by LOG_FATAL,
although Mesa already already calls exit(1) in case of a fatal errors.

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
7 years agoAndroid: Drop linking libgcc
Rob Herring [Wed, 3 May 2017 19:35:26 +0000 (14:35 -0500)]
Android: Drop linking libgcc

Including libgcc breaks on Android O (master). This doesn't appear to be
needed any more as both Android M and N have also been built w/o libgcc.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: Add LLVM support for Android O
Rob Herring [Wed, 3 May 2017 19:35:25 +0000 (14:35 -0500)]
Android: Add LLVM support for Android O

Android O moves to LLVM 3.9 and also has some differences in header
dependencies as LLVM has moved to blueprint files. It seems libLLVMCore
was only needed for header dependencies, so we can drop that for O.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: rework LLVM build support
Rob Herring [Wed, 3 May 2017 19:35:24 +0000 (14:35 -0500)]
Android: rework LLVM build support

Currently, building with "mmma external/mesa3d" which builds all targets
and dependencies is broken for targets that require LLVM. This is due to
the build settings depending on MESA_ENABLE_LLVM. Instead of using a
conditional in the global Android.common.mk, make all the components that
need LLVM explicitly include the necessary build settings.

GALLIVM_CPP_SOURCES doesn't exist anymore, so remove that as well.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: rework libelf dependencies
Rob Herring [Wed, 3 May 2017 19:35:23 +0000 (14:35 -0500)]
Android: rework libelf dependencies

Add libelf as a library dependency rather than explicitly listing its
include paths. This should work for Android M and later which have the
necessary exported directories in libelf.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: drop LLVM support on Lollipop
Rob Herring [Wed, 3 May 2017 19:35:22 +0000 (14:35 -0500)]
Android: drop LLVM support on Lollipop

Mesa no longer supports LLVM 3.5 for any targets we support.
Android-x86 adds support for llvmpipe which could work, but android-x86
for L is using mesa 11.0 anyway.

Dropping this support enables clean-up of libelf dependencies.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: Add driver "all" option to enable all drivers
Rob Herring [Wed, 3 May 2017 19:35:21 +0000 (14:35 -0500)]
Android: Add driver "all" option to enable all drivers

Add a driver string "all" so that if BOARD_GPU_DRIVERS is set to "all",
all the drivers are enabled in the build. This makes build testing all
drivers easier to maintain.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: push driver build details to driver makefiles
Rob Herring [Wed, 3 May 2017 19:35:20 +0000 (14:35 -0500)]
Android: push driver build details to driver makefiles

src/gallium/targets/dri/Android.mk contains lots of conditional for
individual drivers. Let's move these details into the individual driver
makefiles.

In the process, align the make driver conditionals with automake
(i.e. HAVE_GALLIUM_*).

Signed-off-by: Rob Herring <robh@kernel.org>
[Emil Velikov: add the radeon winsys for radeonsi]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: remove needless conditional including of child makefiles
Rob Herring [Wed, 3 May 2017 19:35:19 +0000 (14:35 -0500)]
Android: remove needless conditional including of child makefiles

It is not necessary to filter driver and winsys directories based on the
list of enabled drivers. Selecting the included driver libraries or not is
sufficient to control what is built.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: Fix swrast only build
Rob Herring [Wed, 3 May 2017 19:35:18 +0000 (14:35 -0500)]
Android: Fix swrast only build

A build of only swrast is broken as the Android EGL now depends on
libdrm as does GBM. While we could make EGL conditionally depend on
libdrm, we probably want to enable kms_dri winsys as well and that will
need libdrm enabled. So just always enable libdrm and simplify the
Android makefiles a bit.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
[Emil Velikov: drop related inline comment]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: amd/common: fix dependency on libmesa_nir
Rob Herring [Wed, 3 May 2017 19:35:17 +0000 (14:35 -0500)]
Android: amd/common: fix dependency on libmesa_nir

Building libmesa_amd_common fails with:

external/mesa/src/amd/common/ac_shader_info.c:23:10: fatal error: 'nir/nir.h' file not found
         ^

external/mesa/src/compiler/nir/nir.h:48:10: fatal error: 'nir_opcodes.h' file not found
         ^

libmesa_amd_common now depends on libmesa_nir, so add it as a dependency
and export the necessary directories.

Fixes: 224cf29 "radv/ac: add initial pre-pass for shader info gathering"
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: amd: use exported include dirs instead of explicit includes
Rob Herring [Wed, 3 May 2017 19:35:16 +0000 (14:35 -0500)]
Android: amd: use exported include dirs instead of explicit includes

Add exported include paths rather than explicitly adding the includes
in each user of the common AMD libs.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: remove remaining explicit libcxx includes
Rob Herring [Wed, 3 May 2017 19:35:15 +0000 (14:35 -0500)]
Android: remove remaining explicit libcxx includes

Explicitly including libcxx includes is not necessary at least on
Android M and later. It appears that libc++ was made the default in
commit "Make libc++ the default STL." in Android build system post L.
However, if L support is still needed, using "LOCAL_CXX_STL=libc++" is
the preferred way.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: define required __STDC* macros as cflags
Mauro Rossi [Wed, 3 May 2017 19:35:14 +0000 (14:35 -0500)]
Android: define required __STDC* macros as cflags

Necessary to fix the following radeonsi building errors:

In file included from external/mesa/src/gallium/drivers/radeonsi/si_blit.c:24:
In file included from external/mesa/src/gallium/drivers/radeonsi/si_pipe.h:29:
In file included from external/mesa/src/gallium/drivers/radeonsi/si_shader.h:71:
In file included from external/llvm/include/llvm-c/Core.h:18:
In file included from external/llvm/include/llvm-c/ErrorHandling.h:17:
In file included from external/llvm/include/llvm-c/Types.h:17:
external/llvm/include/llvm/Support/DataTypes.h:49:3: error: "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h"
  ^
external/llvm/include/llvm/Support/DataTypes.h:53:3: error: "Must #define __STDC_CONSTANT_MACROS before "         "#including Support/DataTypes.h"
  ^
2 errors generated.

[Emil Velikov: add inline comment about the defines]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoAndroid: drop static linking of R600 LLVM libraries
Mauro Rossi [Wed, 3 May 2017 19:35:13 +0000 (14:35 -0500)]
Android: drop static linking of R600 LLVM libraries

Inspired by Chih-Wei Huang and Zhen Wu similar patches

Linking against llvm with both static and shared may be avoided,
provided that libLLVM shared library for device supports
whole static R600/AMDGPU libraries, necessary for radeonsi/amdgpu.

Complementary changes, limited to android external/llvm project
are necessary to correclty build libLLVM

Tested with marshmallow-x86 and nougat-x86 builds

Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
7 years agoconfigure.ac: Fix help string for --disable-pwr8 configure option
Philipp Zabel [Wed, 10 May 2017 15:44:29 +0000 (17:44 +0200)]
configure.ac: Fix help string for --disable-pwr8 configure option

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
7 years agomesa: remove _CurrentFragmentProgram from gl_pipeline_object
Timothy Arceri [Wed, 10 May 2017 00:37:35 +0000 (10:37 +1000)]
mesa: remove _CurrentFragmentProgram from gl_pipeline_object

This was added in b527dd65c830a as a work around because fixed function
fragment shaders were tracked in ctx->FragmentProgram._Current as
a gl_program rather than gl_shader_program.

However after my refactoring of the program and shader structs
at the end of 2016 which culminated in c505d6d85222, we no longer
need gl_shader_program to track the current program making
_CurrentFragmentProgram obsolete.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
7 years agomesa: add KHR_no_error support for FramebufferTexture*D functions
Timothy Arceri [Mon, 8 May 2017 01:10:58 +0000 (11:10 +1000)]
mesa: add KHR_no_error support for FramebufferTexture*D functions

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: add no error version of framebuffer_texture_with_dims()
Timothy Arceri [Mon, 8 May 2017 00:59:15 +0000 (10:59 +1000)]
mesa: add no error version of framebuffer_texture_with_dims()

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: add error version of get_texture_for_framebuffer()
Timothy Arceri [Fri, 5 May 2017 06:25:11 +0000 (16:25 +1000)]
mesa: add error version of get_texture_for_framebuffer()

This is a step towards KHR_no_error support.

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: pass rb attachment to _mesa_framebuffer_texture()
Timothy Arceri [Fri, 5 May 2017 07:00:34 +0000 (17:00 +1000)]
mesa: pass rb attachment to _mesa_framebuffer_texture()

This change will help us add KHR_no_error support to the caller.

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: add _mesa_get_and_validate_attachment() helper
Timothy Arceri [Fri, 5 May 2017 06:46:03 +0000 (16:46 +1000)]
mesa: add _mesa_get_and_validate_attachment() helper

Will be used to add KHR_no_error support. We make this available
external so it can be called from meta.

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: remove _mesa_problem() from a few locations
Timothy Arceri [Fri, 5 May 2017 05:39:15 +0000 (15:39 +1000)]
mesa: remove _mesa_problem() from a few locations

_mesa_problem() is still useful in some places such as is if a backend
compile fails, but for the majority of cases we should be able to
remove it.

OpenGL test suites are becoming very mature, we should place more
trust in debug builds picking up missed cases.

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: make _mesa_get_framebuffer_attachment_parameter() static
Timothy Arceri [Fri, 5 May 2017 05:21:22 +0000 (15:21 +1000)]
mesa: make _mesa_get_framebuffer_attachment_parameter() static

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: fix indentation
Timothy Arceri [Fri, 5 May 2017 05:09:37 +0000 (15:09 +1000)]
mesa: fix indentation

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: remove _mesa from static framebuffer object function
Timothy Arceri [Fri, 5 May 2017 05:02:20 +0000 (15:02 +1000)]
mesa: remove _mesa from static framebuffer object function

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agogallivm: Fix build against LLVM SVN >= r302589
Michel Dänzer [Wed, 10 May 2017 08:26:07 +0000 (17:26 +0900)]
gallivm: Fix build against LLVM SVN >= r302589

deregisterEHFrames doesn't take any parameters anymore.

Reviewed-by: Vedran Miletić <vedran@miletic.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
7 years agomesa: small _mesa_UseProgram() tidy up
Timothy Arceri [Wed, 3 May 2017 05:56:03 +0000 (15:56 +1000)]
mesa: small _mesa_UseProgram() tidy up

Makes the code easier to follow.

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: add KHR_no_error support for glBindProgramPipeline()
Timothy Arceri [Wed, 3 May 2017 05:34:52 +0000 (15:34 +1000)]
mesa: add KHR_no_error support for glBindProgramPipeline()

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: add KHR_no_error support for glActiveShaderProgram()
Timothy Arceri [Wed, 3 May 2017 05:26:22 +0000 (15:26 +1000)]
mesa: add KHR_no_error support for glActiveShaderProgram()

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: add KHR_no_error support for glUseProgramStages()
Timothy Arceri [Wed, 3 May 2017 04:20:26 +0000 (14:20 +1000)]
mesa: add KHR_no_error support for glUseProgramStages()

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agomesa: create use_program_stages() helper
Timothy Arceri [Wed, 3 May 2017 03:50:21 +0000 (13:50 +1000)]
mesa: create use_program_stages() helper

This will be used to create a KHR_no_error version of
glUseProgramStages().

Reviewed-by: Eric Anholt <eric@anholt.net>
7 years agoradv: handle fragment shader srgb resolve pass better
Dave Airlie [Thu, 11 May 2017 00:05:58 +0000 (10:05 +1000)]
radv: handle fragment shader srgb resolve pass better

Bas pointed out the fs key doesn't take srgb into account,
since there is just one srgb variant, just create a separate
pipeline for it. This also uses dest format to be more consistent
on when srgb matters.

Fixes: 69136f4e633 "radv/meta: add resolve pass using fragment/vertex shaders"
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
7 years agoi965: Make INTEL_DEBUG=bat decode VS/CLIP/GS/SF/WM/CC_STATE on Gen4-5.
Kenneth Graunke [Thu, 4 May 2017 05:07:16 +0000 (22:07 -0700)]
i965: Make INTEL_DEBUG=bat decode VS/CLIP/GS/SF/WM/CC_STATE on Gen4-5.

This is something the original decoder did, but I didn't bother with
until now.  I recently had to debug an Ironlake issue, and wanted to
inspect VS_STATE.  So, now it's back.

The other packets in the switch statement are all Gen6/7+, where we
use offsets from dynamic state base address, so we don't need the
gtt_offset subtraction introduced here.  We might want to make a
helper for this hack at some point - perhaps when we introduce the
next occurance.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
7 years agoi965: Switch BRW_NEW_CURBE_OFFSETS to BRW_NEW_PUSH_CONSTANT_ALLOCATION.
Kenneth Graunke [Mon, 8 May 2017 05:50:20 +0000 (22:50 -0700)]
i965: Switch BRW_NEW_CURBE_OFFSETS to BRW_NEW_PUSH_CONSTANT_ALLOCATION.

The BRW_NEW_CURBE_OFFSETS dirty bit is signalled when changing the
partitioning of the Constant Buffer URB section between the various
shader stages, on Gen4-5.

BRW_NEW_PUSH_CONSTANT_ALLOCATION is basically the same thing on Gen7+.

So, save a bit, and use the new name.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Drop BRW_NEW_PUSH_CONSTANT_ALLOCATION from Gen6 code.
Kenneth Graunke [Mon, 8 May 2017 05:59:38 +0000 (22:59 -0700)]
i965: Drop BRW_NEW_PUSH_CONSTANT_ALLOCATION from Gen6 code.

Gen6 doesn't have a configurable push constant region.  This is only
used on Gen7+.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
7 years agoi965: Only #if...#endif a single function or related section at a time.
Kenneth Graunke [Mon, 1 May 2017 22:51:41 +0000 (15:51 -0700)]
i965: Only #if...#endif a single function or related section at a time.

Previously we guarded large swathes of code with #if GEN ... #endif
blocks.  This made it difficult to see which generations include what.

This patch splits up the #if..#endif sections so they surround a small
section of code - usually a single function/atom, or sometimes a group
of related functions.  It should make the code easier to work on.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
7 years agoi965: Turn brw_get_line_width_float() into brw_get_line_width().
Kenneth Graunke [Tue, 9 May 2017 05:39:25 +0000 (22:39 -0700)]
i965: Turn brw_get_line_width_float() into brw_get_line_width().

Drop the old brw_get_line_width() helper which return the unsigned
fixed-point encoding of the line width - it's been dead since the
conversion to GENXML (which does the encoding for us).

Then rename brw_get_line_width_float() to the shorter name.

Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
7 years agoi965: Drop INTEL_DEBUG=stats.
Kenneth Graunke [Tue, 9 May 2017 06:53:36 +0000 (23:53 -0700)]
i965: Drop INTEL_DEBUG=stats.

For whatever reason, we had an INTEL_DEBUG=stats option that enabled
various statistics counters on Gen4-5 systems.  It's been around
forever, though I can't think of a single time that it's been useful.

On Gen6+, we enable statistics all the time because they're necessary
to support various query object targets.  Turning them off would break
those queries.

Gen4-5 don't support those queries, so the statistics counters generally
aren't useful; we disabled them by default.  This patch disables them
altogether.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agoi965: Disable ARB_pipeline_statistics_query on Gen4-5.
Kenneth Graunke [Tue, 9 May 2017 06:41:31 +0000 (23:41 -0700)]
i965: Disable ARB_pipeline_statistics_query on Gen4-5.

We apparently enabled this on all platforms in Mesa 10.6.  However, it
was only ever implemented for Gen6+.  The Gen4-5 query code goes up in
flames with an "Unrecognized query target" unreachable() error if you
even attempt to use any of the new functionality.

This wasn't caught because the Piglit tests require OpenGL 3.0, which
Gen4-5 cannot support.  The extension spec does say 3.0 is required,
though I'm not sure why - it seems like 2.1 would work fine.

We could implement it anyway, but it's a little bit of a pain due to the
lack of hardware contexts (so we have to snapshot around batches).

Given that it's been 100% broken for two years and I haven't seen a bug
report about it, I'm not terribly inclined to care.  So, let it go.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
7 years agoradeonsi: add new vega10 pci ids
Alex Deucher [Wed, 10 May 2017 15:40:01 +0000 (11:40 -0400)]
radeonsi: add new vega10 pci ids

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Cc: 17.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>