mesa.git
4 years agointel/blorp: Fill out all the dwords of MI_ATOMIC
Jason Ekstrand [Fri, 10 Jan 2020 21:30:02 +0000 (15:30 -0600)]
intel/blorp: Fill out all the dwords of MI_ATOMIC

This makes us valgrind clean again.

Fixes: 9175c7058efb "intel/blorp: Make blorp update the clear color..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3366>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3366>

4 years agogitlab-ci: Upgrade kernel for LAVA jobs to v5.5-rc5
Tomeu Vizoso [Mon, 13 Jan 2020 10:47:58 +0000 (11:47 +0100)]
gitlab-ci: Upgrade kernel for LAVA jobs to v5.5-rc5

Some fixes got in that should prevent hangs in lima jobs.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3363>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3363>

4 years agoaco: fix unconditional demote_to_helper
Daniel Schürmann [Fri, 10 Jan 2020 16:19:40 +0000 (17:19 +0100)]
aco: fix unconditional demote_to_helper

This patch fixes an out-of-bounds access on p_exit_early
and binds the exec register to the correct operand.

Fixes: 2ea9e59e8d976ec77800d2a20645087b96d1e241 ('aco: move s_andn2_b64 instructions out of the p_discard_if')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3347>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3347>

4 years agoradeonsi: don't enable VBOs in user SGPRs if compute-based culling can be used
Marek Olšák [Thu, 9 Jan 2020 21:41:13 +0000 (16:41 -0500)]
radeonsi: don't enable VBOs in user SGPRs if compute-based culling can be used

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
4 years agoradeonsi: put up to 5 VBO descriptors into user SGPRs
Marek Olšák [Tue, 7 Jan 2020 23:23:53 +0000 (18:23 -0500)]
radeonsi: put up to 5 VBO descriptors into user SGPRs

gfx6-8: 1 VBO descriptor in user SGPRs
gfx9-10: 5 VBO descriptors in user SGPRs

We no longer pull up to 5 VBO descriptors from GTT when SDMA is disabled.

Totals from affected shaders:
SGPRS: 1110528 -> 1170528 (5.40 %)
VGPRS: 952896 -> 951936 (-0.10 %)
Spilled SGPRs: 83 -> 61 (-26.51 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 23766296 -> 22843920 (-3.88 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 179344 -> 179344 (0.00 %)
Wait states: 0 -> 0 (0.00 %)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
4 years agoac,radeonsi: increase the maximum number of shader args and return values
Marek Olšák [Wed, 8 Jan 2020 20:52:44 +0000 (15:52 -0500)]
ac,radeonsi: increase the maximum number of shader args and return values

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
4 years agoradeonsi: simplify si_set_vertex_buffers
Marek Olšák [Wed, 8 Jan 2020 00:45:01 +0000 (19:45 -0500)]
radeonsi: simplify si_set_vertex_buffers

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
4 years agoradeonsi: don't allow draw calls with uninitialized VS inputs
Marek Olšák [Tue, 7 Jan 2020 23:16:59 +0000 (18:16 -0500)]
radeonsi: don't allow draw calls with uninitialized VS inputs

These always hang, because vertex buffer descriptors are not set up.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
4 years agoradeonsi: add si_context::num_vertex_elements
Marek Olšák [Tue, 7 Jan 2020 23:10:38 +0000 (18:10 -0500)]
radeonsi: add si_context::num_vertex_elements

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
4 years agoradeonsi: rename desc_list_byte_size -> vb_desc_list_alloc_size
Marek Olšák [Tue, 7 Jan 2020 23:06:14 +0000 (18:06 -0500)]
radeonsi: rename desc_list_byte_size -> vb_desc_list_alloc_size

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
4 years agoanv: set stencil layout for input attachments
Lionel Landwerlin [Tue, 26 Nov 2019 15:53:09 +0000 (17:53 +0200)]
anv: set stencil layout for input attachments

If an input attachment has a stencil format, we need to set this.

v2: Fish out VkAttachmentReferenceStencilLayoutKHR from
    VkAttachmentReference2KHR::pNext (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reported-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: c1c346f16673 ("anv: implement VK_KHR_separate_depth_stencil_layouts")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2891>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2891>

4 years agoanv: Drop an unused variable
Jason Ekstrand [Mon, 13 Jan 2020 18:20:48 +0000 (12:20 -0600)]
anv: Drop an unused variable

4 years agonir/lower_atomics_to_ssbo: Also lower barriers
Jason Ekstrand [Wed, 8 Jan 2020 01:22:13 +0000 (19:22 -0600)]
nir/lower_atomics_to_ssbo: Also lower barriers

This is more correct for a pass which is supposed to completely lower
away atomic counters.  It also lets us stop supporting atomic counter
barriers in most of the drivers.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agonir: Rename nir_intrinsic_barrier to control_barrier
Jason Ekstrand [Tue, 7 Jan 2020 20:54:26 +0000 (14:54 -0600)]
nir: Rename nir_intrinsic_barrier to control_barrier

This is a more explicit name now that we don't want it to be doing any
memory barrier stuff for us.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agointel/nir: Stop adding redundant barriers
Jason Ekstrand [Tue, 7 Jan 2020 20:58:45 +0000 (14:58 -0600)]
intel/nir: Stop adding redundant barriers

Now that both GLSL and SPIR-V are adding shared and tcs_patch barriers
(as appropreate) prior to the nir_intrinsic_barrier, we don't need to do
it ourselves in the back-end.  This reverts commit
26e950a5de01564e3b5f2148ae994454ae5205fe.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agonir/glsl: Emit memory barriers as part of barrier()
Jason Ekstrand [Tue, 7 Jan 2020 20:40:53 +0000 (14:40 -0600)]
nir/glsl: Emit memory barriers as part of barrier()

The GLSL barrier() intrinsic does an implicit shared memory barrier in
compute shaders and an implicit TCS patch output barrier in tessellation
control shaders.  We'd like NIR's barrier intrinsic to just be a control
flow barrier and not have memory implications.  To satisfy this, we need
to add an extra memory barrier in front of each nir_intrinsic_barrier.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agospirv: Add output memory semantics to OpControlBarrier in TCS
Jason Ekstrand [Tue, 7 Jan 2020 18:01:13 +0000 (12:01 -0600)]
spirv: Add output memory semantics to OpControlBarrier in TCS

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agospirv: Add a workaround for OpControlBarrier on old GLSLang
Jason Ekstrand [Tue, 7 Jan 2020 17:35:54 +0000 (11:35 -0600)]
spirv: Add a workaround for OpControlBarrier on old GLSLang

As per the Vulkan memory model, the proper translation of GLSL barrier()
is an OpControlBarrier with a scope of Workgroup and semantics of
Acquire, Release, and WorkgroupMemory.  Older versions of GLSLang gave
an OpControlBarrier with semantics of None so we need to patch it up on
those versions.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agonir: Add a new memory_barrier_tcs_patch intrinsic
Jason Ekstrand [Tue, 7 Jan 2020 20:18:56 +0000 (14:18 -0600)]
nir: Add a new memory_barrier_tcs_patch intrinsic

Right now, it's implemented as a no-op for everyone.  For most drivers,
it's a switch case in the NIR -> whatever which just breaks.  For ir3,
they already have code to delete tessellation barriers so we just add a
case to also delete memory_barrier_tcs_patch.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agollmvpipe: No-op implement more barriers
Jason Ekstrand [Wed, 8 Jan 2020 01:21:37 +0000 (19:21 -0600)]
llmvpipe: No-op implement more barriers

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agonir: Handle barriers with more granularity in combine_stores
Jason Ekstrand [Tue, 7 Jan 2020 20:13:43 +0000 (14:13 -0600)]
nir: Handle barriers with more granularity in combine_stores

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agonir: Handle more barriers in dead_write and copy_prop
Jason Ekstrand [Tue, 7 Jan 2020 20:11:55 +0000 (14:11 -0600)]
nir: Handle more barriers in dead_write and copy_prop

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agointel/vec4: Support scoped_memory_barrier
Jason Ekstrand [Tue, 7 Jan 2020 22:14:56 +0000 (16:14 -0600)]
intel/vec4: Support scoped_memory_barrier

Fixes: 06aecb14c0476 "anv: Implement VK_KHR_vulkan_memory_model"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>

4 years agolima: Add stencil support
Andreas Baierl [Tue, 7 Jan 2020 16:06:46 +0000 (17:06 +0100)]
lima: Add stencil support

This re-enables and fixes support for stencil buffer.

It fixes 365 stencil related deqp tests. All tests that use INCR, INCR_WRAR,
DECR and DECR_WRAP as a stencil op still fail, but they also fail with the
blob, so we may ignore that for now.
We still have dEQP-GLES2.functional.depth_stencil_clear.depth_stencil_masked
failing, which is strange because it's the only one out of the
depth_stencil_clear.* set.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
4 years agolima/parser: Make rsw alpha blend parsing more readable
Andreas Baierl [Mon, 13 Jan 2020 07:58:09 +0000 (08:58 +0100)]
lima/parser: Make rsw alpha blend parsing more readable

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
4 years agopanfrost: Remove unneeded phi nodes
Boris Brezillon [Mon, 6 Jan 2020 13:31:38 +0000 (14:31 +0100)]
panfrost: Remove unneeded phi nodes

Add a pass to remove unneeded phi nodes as done in other drivers.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3294>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3294>

4 years agoaco: check if multiplication/clamp is live when applying output modifier
Rhys Perry [Thu, 2 Jan 2020 17:05:30 +0000 (17:05 +0000)]
aco: check if multiplication/clamp is live when applying output modifier

It's possible that a multiplication/clamp is dead code and the single use
is from a different user.

Fixes portal rendering in Path of Exile when global illumination is
enabled.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: disable add combining for ds_swizzle_b32
Rhys Perry [Mon, 16 Dec 2019 13:58:16 +0000 (13:58 +0000)]
aco: disable add combining for ds_swizzle_b32

ds_bpermute_b32/ds_permute_b32 are fine, I think

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: don't DCE atomics with return values
Rhys Perry [Mon, 16 Dec 2019 13:30:10 +0000 (13:30 +0000)]
aco: don't DCE atomics with return values

We don't create atomics with definitions if they are not used in NIR, but
our own DCE can remove the uses if an export turns out to be null.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: set exec_potentially_empty for demotes
Rhys Perry [Mon, 16 Dec 2019 11:29:08 +0000 (11:29 +0000)]
aco: set exec_potentially_empty for demotes

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: better handle neg/abs of sgprs
Rhys Perry [Fri, 13 Dec 2019 16:59:54 +0000 (16:59 +0000)]
aco: better handle neg/abs of sgprs

isel/label_instruction currently doesn't create these but we should
probably check anyway.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: check usesModifiers() when identifying a neg/abs
Rhys Perry [Wed, 11 Dec 2019 19:41:22 +0000 (19:41 +0000)]
aco: check usesModifiers() when identifying a neg/abs

This was fine because a literal used to mean that it didn't use modifiers,
but now VOP3 can take a literal on GFX10.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: handle omod successors with the constant in the first operand
Rhys Perry [Wed, 11 Dec 2019 15:54:18 +0000 (15:54 +0000)]
aco: handle omod successors with the constant in the first operand

No pipeline-db changes

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: handle VOP3 modifiers when combining a constant comparison's NaN test
Rhys Perry [Wed, 11 Dec 2019 16:57:11 +0000 (16:57 +0000)]
aco: handle VOP3 modifiers when combining a constant comparison's NaN test

No pipeline-db changes

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: fix uninitialized data in the binary
Rhys Perry [Tue, 24 Sep 2019 16:21:51 +0000 (17:21 +0100)]
aco: fix uninitialized data in the binary

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: fix imageSize()/textureSize() with large buffers on GFX8
Rhys Perry [Mon, 9 Dec 2019 18:00:55 +0000 (18:00 +0000)]
aco: fix imageSize()/textureSize() with large buffers on GFX8

Tested on Navi by using dEQP-VK.image.image_size.buffer.* and the GFX8
path with the size multipled by the stride.
dEQP-VK.image.image_size.buffer.* was also run with the tests modified to
use a 96bit format.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agoaco: set vm for pos0 exports on GFX10
Rhys Perry [Mon, 9 Dec 2019 13:38:47 +0000 (13:38 +0000)]
aco: set vm for pos0 exports on GFX10

RADV's LLVM backend and radeonsi does the same thing.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: 19.3 <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>

4 years agopanfrost: Fix headers and gpu_headers memory leak
Daniel Ogorchock [Tue, 7 Jan 2020 16:07:37 +0000 (10:07 -0600)]
panfrost: Fix headers and gpu_headers memory leak

The per-batch headers/gpu_headers dynarrays need to be freed during the
batch cleanup to prevent leaking.

Signed-off-by: Daniel Ogorchock <daniel.ogorchock@garmin.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3308>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3308>

4 years agopanfrost: Fix panfrost_bo_access memory leak
Daniel Ogorchock [Mon, 6 Jan 2020 23:33:49 +0000 (17:33 -0600)]
panfrost: Fix panfrost_bo_access memory leak

The bo access needs to be freed prior to removing it from its hash
table. This prevents leaking them over time.

Signed-off-by: Daniel Ogorchock <daniel.ogorchock@garmin.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3308>

4 years agoradv/gfx10: improve performance for TES using PrimID but not exporting it
Samuel Pitoiset [Wed, 8 Jan 2020 07:55:16 +0000 (08:55 +0100)]
radv/gfx10: improve performance for TES using PrimID but not exporting it

This field is for the primitive ID export to the fragment shader.
Ported from RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
4 years agoradv/gfx10: add support for NGG passthrough mode
Samuel Pitoiset [Thu, 9 Jan 2020 07:24:11 +0000 (08:24 +0100)]
radv/gfx10: add support for NGG passthrough mode

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
4 years agoradv/gfx10: do not declare LDS for NGG if useless
Samuel Pitoiset [Wed, 8 Jan 2020 07:39:10 +0000 (08:39 +0100)]
radv/gfx10: do not declare LDS for NGG if useless

Only needed for NGG without passthrough mode or for NGG streamout.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
4 years agoradv/gfx10: determine if a pipeline is eligible for NGG passthrough
Samuel Pitoiset [Thu, 9 Jan 2020 07:23:12 +0000 (08:23 +0100)]
radv/gfx10: determine if a pipeline is eligible for NGG passthrough

It can't be enabled for geometry shaders, for NGG streamout and
for vertex shaders that export the primitive ID. NGG passthrough
requires that LDS isn't used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
4 years agoradv/gfx10: disable vertex grouping
Samuel Pitoiset [Tue, 7 Jan 2020 16:01:39 +0000 (17:01 +0100)]
radv/gfx10: disable vertex grouping

RadeonSI and AMDVLK does that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
4 years agonvc0: treat all draws without color0 broadcast as MRT
Ilia Mirkin [Sun, 12 Jan 2020 05:07:05 +0000 (00:07 -0500)]
nvc0: treat all draws without color0 broadcast as MRT

Per the semi-recently-released NVIDIA docs, when this bit is not
enabled, then the result for RT[0] will be used. So if e.g. only a
single RT is drawn to and it's not RT[2], the results will not be
visible. Fixes
GTF-GL45.gtf33.GL3Tests.explicit_attrib_location.explicit_attrib_location_pipeline
which was failing due to a frag shader outputting only to location=2.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
4 years agogm107/ir: avoid combining geometry shader stores at 0x60
Ilia Mirkin [Tue, 7 Jan 2020 02:54:26 +0000 (21:54 -0500)]
gm107/ir: avoid combining geometry shader stores at 0x60

This corresponds to gl_PrimitiveID and gl_Layer. When both of these are
stored in a single AST.64 or AST.128 operation, then it appears as
though the whole store fails. Fixes the recently extended
glsl-1.50-transform-feedback-builtins piglit, and also
gtf30.GL3Tests.transform_feedback.transform_feedback_builtins.

The issue was reproduced on GM107 and GP108 but not GK208 nor GK104.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
4 years agonvc0: add dummy reset status support
Ilia Mirkin [Tue, 31 Dec 2019 02:30:28 +0000 (21:30 -0500)]
nvc0: add dummy reset status support

Perhaps in a future implementation, such events could be passed back to
the driver, or queried directly. However for now, this is required for
GL 4.3 robustness contexts.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
4 years agonv50,nvc0: fix destination coordinates of blit
Ilia Mirkin [Mon, 30 Dec 2019 02:50:34 +0000 (21:50 -0500)]
nv50,nvc0: fix destination coordinates of blit

The fix was found by Karol Herbst a long time ago, but it was unclear
why it helped or if it would create additional problems. This change
adds a comment that explains what's going on, and in the process also
normalizes the nv50 implementation to match.

The coordinates which are fed to gl_Position map directly to pixel
coordinates, since the viewport transform is disabled. If the
framebuffer is MSAA, then that doesn't affect the pixel coordinates at
all, it's just that each pixel has multiple samples.

Note that this makes it really clear that this approach is inappropriate
for EXT_framebuffer_multisample_blit_scaled, and also the 3d path will
fail terribly for direct copies. Thankfully the 2d path normally takes
care of this.

Fixes KHR-GL43.packed_depth_stencil.blit.depth32f_stencil8 as well as
scaling issues in a number of EXT_framebuffer_multisample-related piglit
tests (although they continue to fail due to inaccuracies).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
4 years agoradv: Use new scanout gfx9 metadata flag.
Bas Nieuwenhuizen [Tue, 31 Dec 2019 20:19:20 +0000 (21:19 +0100)]
radv: Use new scanout gfx9 metadata flag.

This updates for the new metadata ABI in radeonsi.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3244>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3244>

4 years agolima: fix PIPE_CAP_* to mark features that aren't supported yet
Vasily Khoruzhick [Sat, 11 Jan 2020 03:58:41 +0000 (19:58 -0800)]
lima: fix PIPE_CAP_* to mark features that aren't supported yet

lima doesn't support alpha test, flat shading, two-sided color nor
clip planes. We can enable these caps when corresponding hw features
are implemented in the driver.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
4 years agolima: implement polygon offset
Vasily Khoruzhick [Sat, 11 Jan 2020 03:48:11 +0000 (19:48 -0800)]
lima: implement polygon offset

Fixes some of dEQP-GLES2.functional.polygon_offset.* tests and shadows in Q3A.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
4 years agolima: fix viewport clipping
Vasily Khoruzhick [Sat, 11 Jan 2020 03:35:11 +0000 (19:35 -0800)]
lima: fix viewport clipping

Apparently Mali4x0 doesn't do viewport clipping, so anything rendered beyond viewport
is still rendered. Looks like we need to use scissors to do clipping.

Fixes most of dEQP-GLES2.functional.clipping.*, 6 out of 7 remaining failures
fail on blob as well. Remaining [1] fails on many other gallium drivers.

[1] dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_neg_x_neg_z_and_pos_x_pos_z_and_neg_x_neg_y_pos_z

Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
4 years agolima: fix PLBU_CMD_PRIMITIVE_SETUP command
Vasily Khoruzhick [Sat, 11 Jan 2020 03:33:21 +0000 (19:33 -0800)]
lima: fix PLBU_CMD_PRIMITIVE_SETUP command

Apparently it doesn't depend on primitive type, the value
only depends on whether we specify point size via PLBU command --
bit 12 is set in this case

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
4 years agoglsl: fix potential bug in nir uniform linker
Timothy Arceri [Fri, 10 Jan 2020 01:28:24 +0000 (12:28 +1100)]
glsl: fix potential bug in nir uniform linker

The state value of main_uniform_storage_index will be wrong for
add_parameter() when find_and_update_previous_uniform_storage()
finds a uniform if there is more than 1 uniform used in
multiple shader stages.

The new code is also simpler.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
4 years agoetnaviv: add deqp debug option
Christian Gmeiner [Fri, 10 Jan 2020 19:12:28 +0000 (20:12 +0100)]
etnaviv: add deqp debug option

This new debug option will fake some driver CAPs to be able to run dEQP
for GLES3.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3351>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3351>

4 years agoaco/wave32: Set the definitions of v_cmp instructions to the lane mask.
Timur Kristóf [Fri, 10 Jan 2020 16:13:06 +0000 (17:13 +0100)]
aco/wave32: Set the definitions of v_cmp instructions to the lane mask.

The output of v_cmp instructions is s1 (a single SGPR) in wave32 mode,
as opposed to s2 (an SGPR-pair) in wave64 mode.
A couple of cases where this should have been fixed were omitted from
the previous patch by mistake.

Fixes: e0bcefc3a0a15a8c7ec00cfa53fd8fffcc07342a
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
4 years agopan/midgard: Support indirect UBO offsets
Alyssa Rosenzweig [Fri, 10 Jan 2020 22:47:57 +0000 (17:47 -0500)]
pan/midgard: Support indirect UBO offsets

...in case we have arrays in a UBO block that we'd like to access
indirectly.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3352>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3352>

4 years agointel/fs: Make implied_mrf_writes() an fs_inst method.
Francisco Jerez [Sat, 28 Dec 2019 00:38:26 +0000 (16:38 -0800)]
intel/fs: Make implied_mrf_writes() an fs_inst method.

This will be convenient in a later commit enabling SIMD32 fragment
shaders, and happens to fix the calculation for MATH instructions
which is currently inaccurate for SIMD-lowered instructions on Gen4-5
platforms (all of them on Gen4 in SIMD16 mode), since it was based on
the shader's dispatch width rather than on the actual execution size
of the instruction.

This causes some shader-db noise on Gen4 due to the more compact
register allocation interacting with the SEND dependency workarounds,
but otherwise no major changes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
4 years agointel/fs/cse: Fix non-deterministic behavior due to inaccurate liveness calculation.
Francisco Jerez [Sun, 29 Dec 2019 14:10:47 +0000 (06:10 -0800)]
intel/fs/cse: Fix non-deterministic behavior due to inaccurate liveness calculation.

The liveness calculation done by the local CSE pass in order to prune
AEB entries whose sources are no longer live is currently inaccurate,
because the live intervals are calculated once at the beginning of the
pass, so they don't take into account any of the copy instructions
inserted by the CSE pass as it makes progress.  However the IP counter
used in that calculation is based on the start_ip of the basic block,
which is updated automatically whenever any instructions are inserted
into the CFG.  This causes the IP counter and liveness intervals to
get out of sync in programs with multiple basic blocks, causing the
CSE pass to toss AEB entries prematurely, which can lead to missed
optimization opportunities rather non-deterministically.

On BDW this leads to the following shader-db changes:

 total instructions in shared programs: 14952488 -> 14951763 (-0.00%)
 instructions in affected programs: 45416 -> 44691 (-1.60%)
 helped: 40
 HURT: 4

 total spills in shared programs: 20989 -> 20970 (-0.09%)
 spills in affected programs: 103 -> 84 (-18.45%)
 helped: 3
 HURT: 0

 total fills in shared programs: 24981 -> 24926 (-0.22%)
 fills in affected programs: 127 -> 72 (-43.31%)
 helped: 3
 HURT: 0

In addition it avoids a number of regressions in combination with some
of the optimization changes I'm working on for SIMD32, which would
have made CSE more effective...  Causing it to be less effective
elsewhere in the program astonishingly.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
4 years agointel/fs: Fix nir_intrinsic_load_barycentric_at_sample for SIMD32.
Francisco Jerez [Sat, 28 Dec 2019 01:06:30 +0000 (17:06 -0800)]
intel/fs: Fix nir_intrinsic_load_barycentric_at_sample for SIMD32.

For uniform sample ID, only the first channel of msg_data will be
initialized.  We need to pass that component only to the SEND message
for SIMD lowering to unzip the descriptor source correctly.

Fixes several dozens of conformance test failures with SIMD32 fragment
shaders enabled, including:

dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.*

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
4 years agointel/fs/gen8+: Fix r127 dst/src overlap RA workaround for EOT message payload.
Francisco Jerez [Sat, 28 Dec 2019 00:08:04 +0000 (16:08 -0800)]
intel/fs/gen8+: Fix r127 dst/src overlap RA workaround for EOT message payload.

The problem occured when the return payload of a SIMD8 SEND
instruction was re-used as source payload of an EOT SEND message.  In
such cases the interference edge added by that workaround between the
payload and grf127_send_hack_node would have no effect, because the
payload would be allocated to a fixed range of registers containing
r127 by the special handling of EOT message payloads in the same
function.  This would cause things to blow up if the source payload of
the first SIMD8 message ended up being allocated to a range which
happened to overlap the destination.

Fix it by avoiding r127 altogether in the allocation of EOT message
payloads.

The problem can be reproduced on ICL with the fp-indirections2 Piglit
test-case in combination with the other optimizer changes of this
series.

Fixes: 232ed8980217 "i965/fs: Register allocator shoudn't use grf127 for sends dest"
Cc: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
4 years agointel/fs/gen11+: Handle ROR/ROL in lower_simd_width().
Francisco Jerez [Mon, 25 Nov 2019 00:12:12 +0000 (16:12 -0800)]
intel/fs/gen11+: Handle ROR/ROL in lower_simd_width().

Prevents invalid code from being emitted for ROR/ROL instructions in
SIMD32 shaders.

The problem can be reproduced with the following tests while forcing
SIMD32 to be used for fragment shaders:

 piglit.shaders.glsl-rotate-left
 piglit.shaders.glsl-rotate-right

However the issue could occur in production already with compute
shaders and a workgroup size large enough to trigger SIMD32 dispatch.

Fixes: 83fdec0f0de "intel/compiler: Enable the emission of ROR/ROL instructions"
Cc: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
4 years agoglsl: Fix software 64-bit integer to 32-bit float conversions.
Francisco Jerez [Fri, 27 Dec 2019 22:10:31 +0000 (14:10 -0800)]
glsl: Fix software 64-bit integer to 32-bit float conversions.

The current implementation was broken for any integers between 2^24
and 2^30 (it would return zero for me on ICL).  The reason is that for
such integers we wouldn't take the 'if (0 <= shiftCount)' early return
path, however 'shiftCount + 7' would be positive, leading to a
negative 'count' argument passed to __shift64RightJamming(), which
would give undefined results.

This reworks the affected conversion functions to use either
__shortShift64Left() or __shift64RightJamming() based on the sign of
the final shift count, which should avoid the problem.  In addition
this should qualify as a clean-up/optimization -- This implementation
of the conversion functions translates to 7 instructions less than the
original on Intel hardware.

This fixes the 'KHR-GL46.shader_ballot_tests.ShaderBallotFunctionBallot'
conformance tests on soft fp64 hardware with large enough subgroup
size (>16).

Fixes: d5cf6e92b4f7 "glsl: Add built-in functions to do uint64_to_fp32(uint64_t)"
Fixes: c9d333a6b76e "glsl: Add built-in functions to do int64_to_fp32(int64_t)"
Cc: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
4 years agoaco: compact aco::span<T> to use uint16_t offset and size instead of pointer and...
Daniel Schürmann [Wed, 8 Jan 2020 11:46:47 +0000 (12:46 +0100)]
aco: compact aco::span<T> to use uint16_t offset and size instead of pointer and size_t.

This reduces the size of the Instruction base class
from 40 bytes to 16 bytes. No pipelinedb changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3332>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3332>

4 years agoaco: compact various Instruction classes
Daniel Schürmann [Wed, 8 Jan 2020 10:49:11 +0000 (11:49 +0100)]
aco: compact various Instruction classes

No pipelinedb changes.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3332>

4 years agomesa/st: fix a memory leak in get_version
Andrii Simiklit [Fri, 10 Jan 2020 15:37:13 +0000 (17:37 +0200)]
mesa/st: fix a memory leak in get_version

This patch prevents memory leak in get_version function in st_manager.c
This issue was found by valgrind:
16 bytes in 1 blocks are definitely lost in loss record 6 of 1,418
   at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x63D9476: st_init_extensions (st_extensions.c:1679)
   by 0x63B803B: get_version (st_manager.c:1271)
   by 0x63B8124: st_api_query_versions (st_manager.c:1289)
   by 0x63266EF: dri_init_screen_helper (dri_screen.c:583)
   by 0x6321B12: dri2_init_screen (dri2.c:2110)
   by 0x631AACC: driCreateNewScreen2 (dri_util.c:155)
   by 0x5D58192: dri3_create_screen (dri3_glx.c:897)
   by 0x5D39829: AllocAndFetchScreenConfigs (glxext.c:815)
   by 0x5D39C57: __glXInitialize (glxext.c:941)
   by 0x5D3290A: GetGLXPrivScreenConfig (glxcmds.c:174)
   by 0x5D34F38: glXQueryExtensionsString (glxcmds.c:1307)

Fixes: eca8032f20d0970184843d98e2bddb688e94a3a9 ("gallium: Add ARB_gl_spirv support")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3345>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3345>

4 years agofreedreno/drm: Fix memory leak in softpin implementation
Lasse Lopperi [Fri, 10 Jan 2020 08:47:55 +0000 (10:47 +0200)]
freedreno/drm: Fix memory leak in softpin implementation

Free the memory allocated for cmds/reloc_bos array when destoying the
associated ringbuffer.

For similar fix for the non-softpin implementation see:
https://gitlab.freedesktop.org/mesa/mesa/commit/d014af98b7afc69f4f733c8b8b6f2e3438e68407

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2324
Fixes: f3cc0d2 ("freedreno: import libdrm_freedreno + redesign submit")
Signed-off-by: Lasse Lopperi <lasse.lopperi@ge.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3342>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3342>

4 years agoaco: limit register usage for large work groups
Rhys Perry [Wed, 18 Dec 2019 16:18:35 +0000 (16:18 +0000)]
aco: limit register usage for large work groups

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
4 years agoac/llvm: Fix ac_build_reduce in wave32 mode.
Timur Kristóf [Fri, 10 Jan 2020 11:06:53 +0000 (12:06 +0100)]
ac/llvm: Fix ac_build_reduce in wave32 mode.

Previously, when cluster_size was set to 0, it always worked as if
the cluster size was 64. This commit fixes it in wave32 mode by
changing to work as if the cluster size was set to 32.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
4 years agoradeonsi: release saved resources in si_compute_do_clear_or_copy
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:59:49 +0000 (14:59 +0100)]
radeonsi: release saved resources in si_compute_do_clear_or_copy

Fixes: 9b331e462e5 ("radeonsi: use compute shaders for clear_buffer & copy_buffer")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
4 years agoradeonsi: release saved resources in si_compute_clear_12bytes_buffer
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:57:41 +0000 (14:57 +0100)]
radeonsi: release saved resources in si_compute_clear_12bytes_buffer

Fixes: 6c901f06752 ("radeonsi: use compute shader for clear 12-byte buffer")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
4 years agoradeonsi: release saved resources in si_compute_copy_image
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:41:48 +0000 (14:41 +0100)]
radeonsi: release saved resources in si_compute_copy_image

Fixes: 1b25d340b79 ("radeonsi: use compute for resource_copy_region when possible")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
4 years agoradeonsi: release saved resources in si_compute_clear_render_target
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:40:44 +0000 (14:40 +0100)]
radeonsi: release saved resources in si_compute_clear_render_target

Fixes: 984fd735152 ("radeonsi: use compute for clear_render_target when possible")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
4 years agoradeonsi: release saved resources in si_compute_expand_fmask
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:39:24 +0000 (14:39 +0100)]
radeonsi: release saved resources in si_compute_expand_fmask

Fixes: 095a58204d9 ("radeonsi: expand FMASK before MSAA image stores are used")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
4 years agoradeonsi: release saved resources in si_retile_dcc
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:32:11 +0000 (14:32 +0100)]
radeonsi: release saved resources in si_retile_dcc

Fixes: 1f21396431a ("radeonsi: add support for displayable DCC for multi-RB chips")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2330
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
4 years agomain: fix coverity error in _mesa_program_resource_find_name()
Samuel Iglesias Gonsálvez [Wed, 8 Jan 2020 18:12:53 +0000 (19:12 +0100)]
main: fix coverity error in _mesa_program_resource_find_name()

We did not take into account if name is NULL, so we could dereference
a NULL pointer in strncmp() call.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
4 years agopanfrost: Add negative lod bias support
Icecream95 [Thu, 9 Jan 2020 02:13:58 +0000 (15:13 +1300)]
panfrost: Add negative lod bias support

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
4 years agovirgl/drm: update UAPI
Gurchetan Singh [Fri, 20 Dec 2019 00:25:55 +0000 (16:25 -0800)]
virgl/drm: update UAPI

This seems to compile. Header copied over from drm-misc-next
7da5492739db.

Acked-by: Eric Engestrom <eric@engestrom.ch>
4 years agolima: drop support for R8G8B8 format
Vasily Khoruzhick [Thu, 9 Jan 2020 05:10:33 +0000 (21:10 -0800)]
lima: drop support for R8G8B8 format

We can only sample from 24-bit packed format and can't render into it and
it causes chromium-based browsers to fail when they create FBO with GL_RGB
format. Drop R8G8B8 alltogether so mesa can promote it to RGBX format.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
4 years agoanv: Re-use flush_descriptor_sets in flush_compute_state
Jason Ekstrand [Tue, 7 Jan 2020 16:00:54 +0000 (10:00 -0600)]
anv: Re-use flush_descriptor_sets in flush_compute_state

There's no reason to hand-roll all of the memory re-allocation fall-back
code for compute shaders.  It's  just duplicated complexity.  This also
makes it more clear in flush_compute_state where the
MEDIA_INTERFACE_DESCRIPTOR_LOAD command gets emitted relative to other
packets in the command stream.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
4 years agoanv: Flag descriptors dirty when gl_NumWorkgroups is used
Jason Ekstrand [Wed, 8 Jan 2020 20:47:11 +0000 (14:47 -0600)]
anv: Flag descriptors dirty when gl_NumWorkgroups is used

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
4 years agoanv: Don't add dynamic state base address to push constants on Gen7
Jason Ekstrand [Tue, 7 Jan 2020 23:51:03 +0000 (17:51 -0600)]
anv: Don't add dynamic state base address to push constants on Gen7

Because Gen7 push constants are already relative to dynamic state base
address, they aren't really an address.  It's deceptive to return an
address from the helper function.  Instead, let's leave it as a
special-case in the gen7-11 helper; we don't need the helper for code
de-duplication for Gen7 anyway.

Fixes: 67d2cb3e9367a "anv: Add get_push_range_address() helper"
Closes: #2323
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
4 years agolima: add debug flag to disable tiling
Vasily Khoruzhick [Tue, 10 Dec 2019 02:29:19 +0000 (18:29 -0800)]
lima: add debug flag to disable tiling

Add debug flag to disable tiling. Note that it prevents lima from creating
tiled buffers, but it's still able to import them if modifier is specified

Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
4 years agolima: use linear layout for shared buffers if modifier is not specified
Vasily Khoruzhick [Tue, 10 Dec 2019 02:23:17 +0000 (18:23 -0800)]
lima: use linear layout for shared buffers if modifier is not specified

Use linear layout for shared buffers if modifier is not specified
and use linear layout when importing buffers with invalid modifier.

Fixes: 01a451b04d2d ("lima: handle DRM_FORMAT_MOD_INVALID in resource_from_handle()")
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
4 years agoglsl: call calculate_subroutine_compat() from the nir linker
Timothy Arceri [Tue, 7 Jan 2020 02:49:50 +0000 (13:49 +1100)]
glsl: call calculate_subroutine_compat() from the nir linker

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
4 years agoglsl: move calculate_subroutine_compat() to shared linker code
Timothy Arceri [Tue, 7 Jan 2020 02:43:05 +0000 (13:43 +1100)]
glsl: move calculate_subroutine_compat() to shared linker code

We will make use of this in the nir linker in the following patch.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
4 years agoglsl: call uniform resource checks from the nir linker
Timothy Arceri [Mon, 6 Jan 2020 23:30:17 +0000 (10:30 +1100)]
glsl: call uniform resource checks from the nir linker

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
4 years agoglsl: move uniform resource checks into the common linker code
Timothy Arceri [Mon, 6 Jan 2020 23:27:39 +0000 (10:27 +1100)]
glsl: move uniform resource checks into the common linker code

We will call this from the nir linker in the following patch.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
4 years agoglsl: call check_subroutine_resources() from the nir linker
Timothy Arceri [Mon, 6 Jan 2020 23:15:23 +0000 (10:15 +1100)]
glsl: call check_subroutine_resources() from the nir linker

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
4 years agoglsl: move check_subroutine_resources() into the shared util code
Timothy Arceri [Mon, 6 Jan 2020 23:08:15 +0000 (10:08 +1100)]
glsl: move check_subroutine_resources() into the shared util code

We will make use of this in the nir linker in the following patch.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
4 years agogenxml: Remove a non-existant HW bit
Jason Ekstrand [Fri, 10 Jan 2020 00:40:04 +0000 (18:40 -0600)]
genxml: Remove a non-existant HW bit

4 years agoir3: Set up full/half register conflicts correctly
Kristian H. Kristensen [Thu, 9 Jan 2020 17:37:35 +0000 (09:37 -0800)]
ir3: Set up full/half register conflicts correctly

Setting up transitive conflicts between a full register and its two
half registers (eg r0.x and hr0.x and hr0.y) will make the half
registers conflict.  They don't actually conflict and this prevents us
from using both at the same time.

Add and use a new ra helper that sets up transitive conflicts between
a register and its subregisters, except it carefully avoids the
subregister conflict.

Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
4 years agollvmpipe: add ARB_derivative_control support
Dave Airlie [Thu, 9 Jan 2020 18:18:19 +0000 (04:18 +1000)]
llvmpipe: add ARB_derivative_control support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
4 years agoradeonsi/gfx9: force the micro tile mode for MSAA resolve correctly on gfx9
Marek Olšák [Wed, 8 Jan 2020 04:53:26 +0000 (23:53 -0500)]
radeonsi/gfx9: force the micro tile mode for MSAA resolve correctly on gfx9

Fixes: 69ea473 "amd/addrlib: update to the latest version"
Closes: #2325
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
4 years agoanv: fix intel perf queries availability writes
Lionel Landwerlin [Wed, 18 Dec 2019 07:16:44 +0000 (09:16 +0200)]
anv: fix intel perf queries availability writes

The availability is not written at the location changed in
ee6fbb95a74d...

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ee6fbb95a74d ("anv: Properly handle host query reset of performance queries")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
4 years agodocs: Add release notes for 19.3.2, update calendar and home page
Dylan Baker [Thu, 9 Jan 2020 18:33:49 +0000 (10:33 -0800)]
docs: Add release notes for 19.3.2, update calendar and home page

4 years agodocs: add SHA256 sums for 19.3.2
Dylan Baker [Thu, 9 Jan 2020 18:30:32 +0000 (10:30 -0800)]
docs: add SHA256 sums for 19.3.2

4 years agodocs: Add release notes for 19.3.2
Dylan Baker [Thu, 9 Jan 2020 18:10:46 +0000 (10:10 -0800)]
docs: Add release notes for 19.3.2

4 years agoradeon/vcn: Handle crop parameters for encoder
Satyajit Sahu [Tue, 24 Dec 2019 05:50:25 +0000 (11:20 +0530)]
radeon/vcn: Handle crop parameters for encoder

Set proper cropping parameter if frame cropping is enabled

Signed-off-by: Satyajit Sahu <satyajit.sahu@amd.com>
Reviewed-by: Boyuan Zhang boyuan.zhang@amd.com
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3328>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3328>

4 years agonir: fix printing of var_decl with more than 4 components.
Daniel Schürmann [Wed, 8 Jan 2020 15:09:10 +0000 (16:09 +0100)]
nir: fix printing of var_decl with more than 4 components.

Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Fixes: a8ec4082a41830cf67a4fd405402fd2d820722fd ('nir+vtn: vec8+vec16 support')
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3320>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3320>