mesa.git
5 years agonir/constant_folding: fold load_constant intrinsics
Rhys Perry [Wed, 4 Sep 2019 16:03:18 +0000 (17:03 +0100)]
nir/constant_folding: fold load_constant intrinsics

These can appear after loop unrolling.

v2: stylistic changes
v2: replace state->mem_ctx with state->shader
v2: add bounds checking
v3: use nir_intrinsic_range() for bounds checking
v3: fix issue where partially out-of-bounds reads are replaced with undefs
v4: fix merge conflicts during rebase
v5: split into two commits
v6: set constant_data to NULL after freeing (fixes nir_sweep()/Iris)
v7: don't remove the constant data if there are no constant loads

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com> (v6)
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
5 years agonir/constant_folding: add back and use constant_fold_state
Rhys Perry [Thu, 26 Sep 2019 10:19:07 +0000 (11:19 +0100)]
nir/constant_folding: add back and use constant_fold_state

Useful for load_constant folding.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
5 years agoanv: Implement VK_KHR_shader_clock
Caio Marcelo de Oliveira Filho [Fri, 19 Apr 2019 19:18:02 +0000 (12:18 -0700)]
anv: Implement VK_KHR_shader_clock

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agospirv: Implement SPV_KHR_shader_clock
Caio Marcelo de Oliveira Filho [Fri, 19 Apr 2019 19:15:16 +0000 (12:15 -0700)]
spirv: Implement SPV_KHR_shader_clock

We only have the subgroup variant in NIR (equivalent to clockARB), so
only support that for now.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agovulkan: Update the XML and headers to 1.1.124
Caio Marcelo de Oliveira Filho [Mon, 7 Oct 2019 15:19:20 +0000 (08:19 -0700)]
vulkan: Update the XML and headers to 1.1.124

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
5 years agoRevert "iris: Hack up a SKL/Gen9LP PS push constant fifo depth workaround"
Kenneth Graunke [Mon, 7 Oct 2019 16:08:41 +0000 (09:08 -0700)]
Revert "iris: Hack up a SKL/Gen9LP PS push constant fifo depth workaround"

This reverts commit 4f857423b3c095516e553b976b41969c2b9721fa.

It caused GPU hangs on all affected platforms, in e.g.
Piglit bin/stencil-twoside -auto -fbo.

5 years agogitlab-ci/lava: Fix image to use in test jobs
Tomeu Vizoso [Sun, 6 Oct 2019 16:12:00 +0000 (09:12 -0700)]
gitlab-ci/lava: Fix image to use in test jobs

In the test stage, we can use any of the two container images as we
arent going to do anything architecture-dependent when submitting the
jobs to LAVA.

But if we are in a pipeline in which the images need to be rebuilt and
one finishes much earlier than the other, it could happen that the test
job that executes first fails to find the container image.

To avoid that, have each job in the test stage to use the image that has
been already implicitly built by depending on the build job for the
given arch.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
5 years agoRevert "Revert "st/dri2: Implement DRI2bufferDamageExtension""
Boris Brezillon [Mon, 7 Oct 2019 10:24:51 +0000 (12:24 +0200)]
Revert "Revert "st/dri2: Implement DRI2bufferDamageExtension""

This reverts commit 19546108d3dd5541a189e36df4ea83b3f519e48f.
This commit breaks the build because lima implements
->set_damage_region(). I guess we'll need more discussion before
removing the ->set_damage_region() hook.

5 years agoRevert "st/dri2: Implement DRI2bufferDamageExtension"
Boris Brezillon [Tue, 1 Oct 2019 14:24:27 +0000 (16:24 +0200)]
Revert "st/dri2: Implement DRI2bufferDamageExtension"

This reverts commit 492ffbed63a2a62759224b1c7d45aa7923d8f542.

BACK_LEFT attachment can be outdated when the user calls
KHR_partial_update(), leading to a damage region update on the
wrong pipe_resource object.
Let's not expose the ->set_damage_region() method until the core is
fixed to handle that properly.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
5 years agogitlab-ci: Move LAVA-related files into top-level ci dir
Tomeu Vizoso [Wed, 18 Sep 2019 14:43:30 +0000 (16:43 +0200)]
gitlab-ci: Move LAVA-related files into top-level ci dir

In preparation for testing drivers other than Panfrost in LAVA labs.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agogitlab-ci: Run dEQP on devices with Panfrost
Tomeu Vizoso [Wed, 18 Sep 2019 14:03:36 +0000 (16:03 +0200)]
gitlab-ci: Run dEQP on devices with Panfrost

Include Panfrost's gitlab.ci.yml file from Mesa's main .gitlab-ci.yml so
we test on devices with Panfrost.

This uses LAVA to schedule jobs in the devices and will be the base for
testing Etnaviv, Lima, etc.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agoiris: Hack up a SKL/Gen9LP PS push constant fifo depth workaround
Kenneth Graunke [Sat, 5 Oct 2019 19:02:28 +0000 (15:02 -0400)]
iris: Hack up a SKL/Gen9LP PS push constant fifo depth workaround

This is a port of Nanley's 904c2a617d86944fbdc2c955f327aacd0b3df318
from i965 to iris.

One concern is that iris uses larger batches, and also emits far fewer
commands, so we may come closer to the 500 limit within a batch, and
could need to supplement this with actual counting.  Manhattan 3.0 had
239 3DSTATE_CONSTANT_PS packets in a batch,  Unigine Valley had 155.
So it seems like we're still in the realm of safety.

5 years agoiris: Refactor push constant allocation so we can reuse it
Kenneth Graunke [Sat, 5 Oct 2019 18:48:46 +0000 (14:48 -0400)]
iris: Refactor push constant allocation so we can reuse it

We'll need this for a workaround shortly.  While refactoring, also
improve the comment slightly.

5 years agointel/isl: set vertical surface alignment on null surfaces
Lionel Landwerlin [Fri, 4 Oct 2019 12:51:54 +0000 (15:51 +0300)]
intel/isl: set vertical surface alignment on null surfaces

Just following the spec. Somewhat unclear whether this applies to NULL
surfaces.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/isl: set surface array appropriately
Lionel Landwerlin [Fri, 4 Oct 2019 12:47:49 +0000 (15:47 +0300)]
intel/isl: set surface array appropriately

This doesn't seem to affect anything.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agointel/isl: Set null surface format to R32_UINT
Lionel Landwerlin [Fri, 4 Oct 2019 10:12:44 +0000 (13:12 +0300)]
intel/isl: Set null surface format to R32_UINT

It appears we never had a test in piglit or deqp sampling from a null
surface...

It turns out this triggers a hang on IVB only. Updating the null
surface format to R32_UINT fixes the hang on ivb and doesn't affect
other platforms, so set it by default for all platforms.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1872
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agoetnaviv: set texture INT_FILTER bit
Jonathan Marek [Thu, 12 Sep 2019 20:49:59 +0000 (16:49 -0400)]
etnaviv: set texture INT_FILTER bit

This should improve texture sampling performance on GC3000.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
5 years agoetnaviv: implement texture comparator
Jonathan Marek [Thu, 12 Sep 2019 20:46:02 +0000 (16:46 -0400)]
etnaviv: implement texture comparator

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
5 years agoetnaviv: update headers from rnndb
Jonathan Marek [Thu, 12 Sep 2019 20:41:22 +0000 (16:41 -0400)]
etnaviv: update headers from rnndb

Update to etna_viv commit 7ff8029.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
5 years agointel: fix subslice computation from topology data
Lionel Landwerlin [Fri, 4 Oct 2019 16:37:14 +0000 (19:37 +0300)]
intel: fix subslice computation from topology data

We're missing the offset of the slice in the subslice mask...

This worked for most platforms that don't have first slice fused off
because we would reread the same mask from slice0 again and again...

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c1900f5b0f ("intel: devinfo: add helper functions to fill fusing masks values")
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1869
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
5 years agodri: Avoid swapbuffer throttling in glXCopySubBufferMESA
Kenneth Graunke [Thu, 3 Oct 2019 16:16:50 +0000 (12:16 -0400)]
dri: Avoid swapbuffer throttling in glXCopySubBufferMESA

We were supplying __DRI2_THROTTLE_SWAPBUFFER, rather than the obvious
choice of __DRI2_THROTTLE_COPYSUBBUFFER.  This meant that we hit the
swap-based frame throttling.  glXCopySubBuffer doesn't seem like it's
intended to be a frame boundary, so we'd like to avoid this throttling.

Tested-by: Michel Dänzer <mdaenzer@redhat.com> # DRI3 only
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
5 years agost/dri: Perform MSAA downsampling for __DRI2_THROTTLE_COPYSUBBUFFER
Kenneth Graunke [Thu, 3 Oct 2019 16:11:22 +0000 (12:11 -0400)]
st/dri: Perform MSAA downsampling for __DRI2_THROTTLE_COPYSUBBUFFER

glXCopySubBufferMESA copies data from the back buffer to the front,
so it needs to perform a MSAA downsampling operation just like
glXSwapBuffers would.

Currently, the CopySubBuffer implementations supply a throttle reason
of __DRI2_THROTTLE_SWAPBUFFERS, so they hit this path and work today.
But we'd like to avoid swapbuffer throttling in this case, so the next
patch will change that reason.

Tested-by: Michel Dänzer <mdaenzer@redhat.com> # DRI3 only
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
5 years agoscons/MSYS2-MinGW-W64: Fix build options defaults
Prodea Alexandru-Liviu [Sat, 5 Oct 2019 08:43:13 +0000 (08:43 +0000)]
scons/MSYS2-MinGW-W64: Fix build options defaults
Signed-off-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Cc: <mesa-stable@lists.freedesktop.org>
When building in a MSYS2 Mingw-w64 environment Mesa3D sets wrong default build options which inevitably lead to build failure.

5 years agointel/error2aub: add support for platforms without PPGTT
Lionel Landwerlin [Thu, 3 Oct 2019 09:21:47 +0000 (12:21 +0300)]
intel/error2aub: add support for platforms without PPGTT

Not much to do to enable this, just make sure to always write to the
GGTT :)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agoaco: fix load_constant with multiple arrays
Rhys Perry [Sat, 21 Sep 2019 15:36:32 +0000 (16:36 +0100)]
aco: fix load_constant with multiple arrays

I thought I fixed this, but I guess I must have broken it again.

Fixes various dEQP-VK.draw.* tests

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
5 years agonir: Fix some wonky whitespace in nir_search.h.
Eric Anholt [Mon, 16 Sep 2019 22:18:28 +0000 (15:18 -0700)]
nir: Fix some wonky whitespace in nir_search.h.

Reviewed-by: Ian Romanick <ian.d.romainck@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
5 years agonir: Factor out most of the algebraic passes C code to .c/.h.
Eric Anholt [Mon, 23 Sep 2019 21:36:32 +0000 (14:36 -0700)]
nir: Factor out most of the algebraic passes C code to .c/.h.

Working on the algebraic implementation, I was being driven nuts by my
editor not highlighting and handling indentation for the C code.  It turns
out that it's basically not pass-specific code, and we can move it over to
the relevant .c file.  Replaces 30KB of code with 34KB of data on my i965
build.  No perf diff on shader-db (n=3)

Reviewed-by: Ian Romanick <ian.d.romainck@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
5 years agonir: Keep the range analysis HT around intra-pass until we make a change.
Eric Anholt [Mon, 23 Sep 2019 22:40:46 +0000 (15:40 -0700)]
nir: Keep the range analysis HT around intra-pass until we make a change.

This lets us memoize range analysis work across instructions.  Reduces
runtime of shader-db on Intel by -30.0288% +/- 2.1693% (n=3).

Fixes: 405de7ccb6cb ("nir/range-analysis: Rudimentary value range analysis pass")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
5 years agonir: Skip emitting no-op movs from the builder.
Eric Anholt [Mon, 16 Sep 2019 21:34:20 +0000 (14:34 -0700)]
nir: Skip emitting no-op movs from the builder.

Having passes generate these is just making more work for copy
propagation (and thus probably calling more optimization passes)
later.  Noticed while trying to debug nir_opt_algebraic()
top-to-bottom having O(n^2) behavior due to not finding new matches in
replacement code.

Reviewed-by: Ian Romanick <ian.d.romainck@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
5 years agonir: Make nir_search's dumping go to stderr.
Eric Anholt [Mon, 16 Sep 2019 21:27:24 +0000 (14:27 -0700)]
nir: Make nir_search's dumping go to stderr.

Reviewed-by: Ian Romanick <ian.d.romainck@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
5 years agosurfaceless: Support EGL_WL_bind_wayland_display
Adam Jackson [Thu, 3 Oct 2019 14:10:59 +0000 (10:10 -0400)]
surfaceless: Support EGL_WL_bind_wayland_display

Feature parity with the drm, x11, and wayland platforms.

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1870
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
5 years agonir/print: always use the right FILE *
Rhys Perry [Thu, 3 Oct 2019 18:09:24 +0000 (19:09 +0100)]
nir/print: always use the right FILE *

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agonir: initialize needs_helper_invocations as well
Erik Faye-Lund [Thu, 3 Oct 2019 19:45:41 +0000 (15:45 -0400)]
nir: initialize needs_helper_invocations as well

Similar to the previous commit, we should also initialize
needs_helper_invocations here.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agonir: initialize uses_discard to false
Erik Faye-Lund [Mon, 8 Apr 2019 12:59:39 +0000 (14:59 +0200)]
nir: initialize uses_discard to false

This matches what we do for uses_sample_qualifier, and what we
do in ir_set_program_inouts.cpp as well.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agoradv/aco,aco: set lower_fmod
Rhys Perry [Thu, 3 Oct 2019 14:32:19 +0000 (15:32 +0100)]
radv/aco,aco: set lower_fmod

This simplifies ACO and allows the lowered code to be optimized (in
particular, constant folded).

Totals from affected shaders:
SGPRS: 1776 -> 1776 (0.00 %)
VGPRS: 1436 -> 1436 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 203452 -> 203564 (0.06 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 103 -> 103 (0.00 %)

At least some of the code size increase seems to be from literals being
applied to instructions as a result of constant folding.

v2: remove fmod/frem handling in init_context()

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
5 years agoscons/windows: Fix build with LLVM>=8
Prodea Alexandru-Liviu [Fri, 4 Oct 2019 13:48:08 +0000 (13:48 +0000)]
scons/windows: Fix build with LLVM>=8

Fixes eebe091d292609de8aaf5b5c537d867b23908947
("scons/windows: Enable compute shaders when possible.")
Signed-off-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
5 years agodri3: Pass __DRI2_THROTTLE_COPYSUBBUFFER from loader_dri3_copy_drawable
Michel Dänzer [Thu, 3 Oct 2019 10:23:45 +0000 (12:23 +0200)]
dri3: Pass __DRI2_THROTTLE_COPYSUBBUFFER from loader_dri3_copy_drawable

0 is __DRI2_THROTTLE_SWAPBUFFER, which doesn't really make sense here.

Avoids dri_flush() throttling twice for the same glFlush call with front
buffer rendering, as described in
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2057 .

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agor600: Fix interpolateAtCentroid
Gert Wollny [Wed, 28 Aug 2019 08:48:04 +0000 (10:48 +0200)]
r600: Fix interpolateAtCentroid

If the instruction interpolateAtCentroid is used the extra interpolator
must also be enabled in the state.

Fixes: fs-interpolateatcentroid-block
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
5 years agomeson: Only error building gallium video without libdrm when the platform is drm
Dylan Baker [Thu, 3 Oct 2019 17:17:08 +0000 (10:17 -0700)]
meson: Only error building gallium video without libdrm when the platform is drm

Fixes: 3b265f61f5f61f08718fe5bb4b2726f9b8e016cc
       ("meson: gallium media state trackers require libdrm with x11")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1878
Tested-by: Vinson Lee <vlee@freedesktop.org>
5 years agopan/midgard: Replace mir_is_live_after with new pass
Alyssa Rosenzweig [Fri, 4 Oct 2019 01:42:09 +0000 (21:42 -0400)]
pan/midgard: Replace mir_is_live_after with new pass

Now that we have live_out calculated per block as metadata, calculating
liveness of an instruction at a given point in the program becomes O(n)
to the size of the block worst-case, rather than O(n) the program.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Calculate temp_count for liveness
Alyssa Rosenzweig [Fri, 4 Oct 2019 01:51:27 +0000 (21:51 -0400)]
pan/midgard: Calculate temp_count for liveness

This needs to be correct or the analysis fails.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Invalidate liveness for mir_is_live_after
Alyssa Rosenzweig [Fri, 4 Oct 2019 01:29:59 +0000 (21:29 -0400)]
pan/midgard: Invalidate liveness for mir_is_live_after

Callers should have liveness info ready. Ideally we'd have a nice
metadata tracking framework like NIR to handle this automatically, but
for now this will allow us to make forward progress... when we're about
to do something with liveness, invalidate everything ahead to force a
clean calculation.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Begin tracking liveness metadata
Alyssa Rosenzweig [Fri, 4 Oct 2019 01:16:56 +0000 (21:16 -0400)]
pan/midgard: Begin tracking liveness metadata

This will allow us to explicitly invalidate liveness analysis results so
we can cache liveness results.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Don't try to OR live_in of successors
Alyssa Rosenzweig [Thu, 3 Oct 2019 20:13:13 +0000 (16:13 -0400)]
pan/midgard: Don't try to OR live_in of successors

By definition, once liveness analysis has occurred:

   live_out = OR {succ} succ->live_in

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Move RA's liveness analysis into midgard_liveness.c
Alyssa Rosenzweig [Thu, 3 Oct 2019 20:10:03 +0000 (16:10 -0400)]
pan/midgard: Move RA's liveness analysis into midgard_liveness.c

There are unfortunately two distinct liveness analysis passes in the
compiler right now -- one good (but complex) pass used by RA based on
solving data flow equations, and one awful (but simple) pass used for
dead code elimination and bundling based on an abstract walk of the AST.

Let's move RA's pass into shared code so we can work on unifying.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Add mir_calculate_temp_count helper
Alyssa Rosenzweig [Fri, 4 Oct 2019 01:51:05 +0000 (21:51 -0400)]
pan/midgard: Add mir_calculate_temp_count helper

This allows us to fill in ctx->temp_count explicitly, even if we haven't
squished down the MIR.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopan/midgard: Remove mir_has_multiple_writes
Alyssa Rosenzweig [Thu, 3 Oct 2019 20:01:51 +0000 (16:01 -0400)]
pan/midgard: Remove mir_has_multiple_writes

We already enforce this with the SSA/register distinction in the
backend. There is no need to duplicate this logic merely for an assert.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years ago.mailmap: add a couple of aliases for Jakob Bornecrantz
Erik Faye-Lund [Mon, 16 Sep 2019 17:24:38 +0000 (19:24 +0200)]
.mailmap: add a couple of aliases for Jakob Bornecrantz

Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
5 years ago.mailmap: add an alias for Tomeu Vizoso
Erik Faye-Lund [Mon, 16 Sep 2019 18:00:46 +0000 (20:00 +0200)]
.mailmap: add an alias for Tomeu Vizoso

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
5 years ago.mailmap: add an alias for Gert Wollny
Erik Faye-Lund [Mon, 16 Sep 2019 17:18:06 +0000 (19:18 +0200)]
.mailmap: add an alias for Gert Wollny

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
5 years ago.mailmap: add an alias for Alexandros Frantzis
Erik Faye-Lund [Mon, 16 Sep 2019 16:33:10 +0000 (18:33 +0200)]
.mailmap: add an alias for Alexandros Frantzis

Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
5 years ago.mailmap: specify spelling for Elie Tournier
Erik Faye-Lund [Mon, 16 Sep 2019 17:09:46 +0000 (19:09 +0200)]
.mailmap: specify spelling for Elie Tournier

Reviewed-by: Elie Tournier <tournier.elie@gmail.com>
5 years agopanfrost: Get rid of the flush in panfrost_set_framebuffer_state()
Boris Brezillon [Sun, 15 Sep 2019 18:33:13 +0000 (20:33 +0200)]
panfrost: Get rid of the flush in panfrost_set_framebuffer_state()

Now that we have track inter-batch dependencies, the flush done in
panfrost_set_framebuffer_state() is no longer needed. Let's get rid of
it.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Kill the explicit serialization in panfrost_batch_submit()
Boris Brezillon [Sun, 15 Sep 2019 18:31:01 +0000 (20:31 +0200)]
panfrost: Kill the explicit serialization in panfrost_batch_submit()

Now that we have all the pieces in place to support pipelining batches
we can get rid of the drmSyncobjWait() at the end of
panfrost_batch_submit().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Do fine-grained flushing when preparing BO for CPU accesses
Boris Brezillon [Sun, 15 Sep 2019 18:35:52 +0000 (20:35 +0200)]
panfrost: Do fine-grained flushing when preparing BO for CPU accesses

We don't have to flush all batches when we're only interested in
reading/writing a specific BO. Thanks to the
panfrost_flush_batches_accessing_bo() and panfrost_bo_wait() helpers
we can now flush only the batches touching the BO we want to access
from the CPU.

This fixes the dEQP-GLES2.functional.fbo.render.texsubimage.* tests.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Make sure the BO is 'ready' when picked from the cache
Boris Brezillon [Sat, 31 Aug 2019 16:51:20 +0000 (18:51 +0200)]
panfrost: Make sure the BO is 'ready' when picked from the cache

This is needed if we want to free the panfrost_batch object at submit
time in order to not have to GC the batch on the next job submission.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Add flags to reflect the BO imported/exported state
Boris Brezillon [Sat, 14 Sep 2019 15:11:03 +0000 (17:11 +0200)]
panfrost: Add flags to reflect the BO imported/exported state

Will be useful to make the ioctl(WAIT_BO) call conditional on BOs that
are not exported/imported (meaning that all GPU accesses are known
by the context).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Add a panfrost_flush_batches_accessing_bo() helper
Boris Brezillon [Sun, 15 Sep 2019 18:17:14 +0000 (20:17 +0200)]
panfrost: Add a panfrost_flush_batches_accessing_bo() helper

This will allow us to only flush batches touching a specific resource,
which is particularly useful when the CPU needs to access a BO.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Add a panfrost_flush_all_batches() helper
Boris Brezillon [Sun, 15 Sep 2019 17:15:16 +0000 (19:15 +0200)]
panfrost: Add a panfrost_flush_all_batches() helper

And use it in panfrost_flush() to flush all batches, and not only the
one currently bound to the context.

We also replace all internal calls to panfrost_flush() by
panfrost_flush_all_batches() ones.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Prepare panfrost_fence for batch pipelining
Boris Brezillon [Sun, 15 Sep 2019 16:23:10 +0000 (18:23 +0200)]
panfrost: Prepare panfrost_fence for batch pipelining

The panfrost_fence logic currently waits on the last submitted batch,
but the batch serialization that was enforced in
panfrost_batch_submit() is about to go away, allowing for several
batches to be pipelined, and the last submitted one is not necessarily
the one that will finish last.

We need to make sure the fence logic waits on all flushed batches, not
only the last one.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Start tracking inter-batch dependencies
Boris Brezillon [Sun, 15 Sep 2019 11:39:52 +0000 (13:39 +0200)]
panfrost: Start tracking inter-batch dependencies

The idea is to track which BO are being accessed and the type of access
to determine when a dependency exists. Thanks to that we can build a
dependency graph that will allow us to flush batches in the correct
order.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Add a panfrost_freeze_batch() helper
Boris Brezillon [Sun, 15 Sep 2019 10:14:22 +0000 (12:14 +0200)]
panfrost: Add a panfrost_freeze_batch() helper

We'll soon need to freeze a batch not only when it's flushed, but also
when another batch depends on us, so let's add a helper to avoid
duplicating the logic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Use the per-batch fences to wait on the last submitted batch
Boris Brezillon [Sun, 15 Sep 2019 08:57:26 +0000 (10:57 +0200)]
panfrost: Use the per-batch fences to wait on the last submitted batch

We just replace the per-context out_sync object by a pointer to the
the fence of the last last submitted batch. Pipelining of batches will
come later.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Add a batch fence
Boris Brezillon [Sun, 15 Sep 2019 08:27:07 +0000 (10:27 +0200)]
panfrost: Add a batch fence

So we can implement fine-grained dependency tracking between batches.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Make panfrost_batch->bos a hash table
Boris Brezillon [Sun, 15 Sep 2019 07:27:14 +0000 (09:27 +0200)]
panfrost: Make panfrost_batch->bos a hash table

So we can store the flags as data and keep the BO as a key. This way
we keep track of the type of access done on BOs.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Extend the panfrost_batch_add_bo() API to pass access flags
Boris Brezillon [Sun, 15 Sep 2019 07:21:13 +0000 (09:21 +0200)]
panfrost: Extend the panfrost_batch_add_bo() API to pass access flags

The type of access being done on a BO has impacts on job scheduling
(shared resources being written enforce serialization while those
being read only allow for job parallelization) and BO lifetime (the
fragment job might last longer than the vertex/tiler ones, if we can,
it's good to release BOs earlier so that others can re-use them
through the BO re-use cache).

Let's pass extra access flags to panfrost_batch_add_bo() and
panfrost_batch_create_bo() so the batch submission logic can take the
appropriate when submitting batches. Note that this information is not
used yet, we're just patching callers to pass the correct flags here.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agopanfrost: Add the shader BO to the batch in patch_shader_state()
Boris Brezillon [Tue, 1 Oct 2019 18:12:12 +0000 (20:12 +0200)]
panfrost: Add the shader BO to the batch in patch_shader_state()

We know a shader will be used by a batch when
panfrost_patch_shader_state() is called, so let's add the shader BO at
that time.

Suggested-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
5 years agoegl: Remove the 565 pbuffer-only EGL config under X11.
Andres Gomez [Wed, 2 Oct 2019 15:50:38 +0000 (18:50 +0300)]
egl: Remove the 565 pbuffer-only EGL config under X11.

The CTS finally has agreed to drop the requirement for a
565-no-depth-no-stencil config for ES 3.0. Hence we can now remove the
code to satisfy this requirement using a pbuffer-only visual with
whatever other buffers the driver happens to have given us.

This reverts commit 82607f8a900796871470ac4f1a04e154392e4898,
commit 6ad31c4ff33d92f6359b196a94ace99682272111 and
commit dacb11a585face5ca179c34cfc588a71a425c1e0.

v2:
  - Reference the VK-GL-CTS issue (Eric E.).

v3:
  - Don't revert
    fc21394bc4d ("egl: Quiet warning about front buffer rendering for pixmaps/pbuffers")
    (Kenneth).

References: VK-GL-CTS issue 1601.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
5 years agobin: delete unused releasing scripts
Dylan Baker [Thu, 26 Sep 2019 21:34:49 +0000 (14:34 -0700)]
bin: delete unused releasing scripts

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Juan A. Suarez <jasuarez@igalia.com>
5 years agorelease: Add an update_release_calendar.py script
Dylan Baker [Thu, 26 Sep 2019 21:23:47 +0000 (14:23 -0700)]
release: Add an update_release_calendar.py script

This script is for updating post version bump.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Juan A. Suarez <jasuarez@igalia.com>
5 years agoscripts: Add a gen_release_notes.py script
Dylan Baker [Wed, 25 Sep 2019 21:56:21 +0000 (14:56 -0700)]
scripts: Add a gen_release_notes.py script

This script is responsible for generating an entire page in the
docs/relnotes/ directory. It includes a template for the page, and uses
mako to fill in the necessary bits. It is designed to be purely fire and
forget, calculating previous versions, shortlogs, bug fixes, and dates.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Juan A. Suarez <jasuarez@igalia.com>
5 years agodocs: add a new_features.text file and remove 19.3.0 release notes
Dylan Baker [Thu, 26 Sep 2019 18:00:43 +0000 (11:00 -0700)]
docs: add a new_features.text file and remove 19.3.0 release notes

The next patch is going to introduce a tool that creates the entire
release html page for us, without any user intervention. As such we
can't be editing it. To that end the script will read the
new_features.txt file to get a list of new features.

This is a flat text file, one entry per line.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Juan A. Suarez <jasuarez@igalia.com>
5 years agoanv/block_pool: Align anv_block_pool state to 64 bits.
Rafael Antognolli [Mon, 30 Sep 2019 21:08:11 +0000 (14:08 -0700)]
anv/block_pool: Align anv_block_pool state to 64 bits.

On 64 bits platforms, some atomic operations like __sync_fetch_and_add()
have constant time, but on 32 bits platforms they are implemented with a
loop and might take much longer.

Additionally, it seems like if their operands are not aligned to 64
bits, they also require extra memory accesses. From the Intel
Architecture's Developer Manual Vol. 1, 4.1.1:

 "A word or doubleword operand that crosses a 4-byte boundary or a
 quadword operand that crosses an 8-byte boundary is considered
 unaligned and requires two separate memory bus cycles for access."

Forcing the u64 field to be aligned to 64 bits seems to make the unit
tests that are stressing this finish much faster.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
5 years agoloader/dri3: do not blit outside old/new buffers
Erik Faye-Lund [Mon, 25 Mar 2019 08:47:58 +0000 (09:47 +0100)]
loader/dri3: do not blit outside old/new buffers

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agodocs: Add use of Closes: tag for closing gitlab issues
Dylan Baker [Wed, 25 Sep 2019 18:10:15 +0000 (11:10 -0700)]
docs: Add use of Closes: tag for closing gitlab issues

This replaces to old Bugzilla: tag, which no longer makes sense because
we don't use bugzilla anymore.

Reviewed-by: Eric Anholt <eric@anholt.net> (v1)
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agointel/isl/icl: Use halign 8 instead of 4 hw workaround
Anuj Phogat [Mon, 29 Oct 2018 12:38:58 +0000 (14:38 +0200)]
intel/isl/icl: Use halign 8 instead of 4 hw workaround

v1 by Topi Pohjolainen
v2,v3 by Anuj Phogat:
- Apply for gen >= 11
- Remove wa_bug_xxx function
- Use helper functions

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
5 years agoac/nir: remove unused code for nir_op_{fmod,frem}
Samuel Pitoiset [Thu, 3 Oct 2019 14:21:47 +0000 (16:21 +0200)]
ac/nir: remove unused code for nir_op_{fmod,frem}

RADV and RadeonSI both lower these two NIR instructions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv: enable lower_fmod for the LLVM path
Samuel Pitoiset [Thu, 3 Oct 2019 14:20:40 +0000 (16:20 +0200)]
radv: enable lower_fmod for the LLVM path

This lowers fmod and frem at NIR level like RadeonSI. fmod is
already lowered directly in NIR->LLVM, and frem will be lowered by
LLVM anyways.

This fixes a LLVM crash with:
dEQP-VK.glsl.builtin.precision_fp16_storage32b.frem.compute.scalar.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoegl/dri2: Don't dlclose() the driver on dri2_load_driver_common failure
Adam Jackson [Wed, 2 Oct 2019 20:26:48 +0000 (16:26 -0400)]
egl/dri2: Don't dlclose() the driver on dri2_load_driver_common failure

... because it's wrong to do so. The error path out of
dri2_initialize_drm ends with dri2_display_destroy, which calls
functions in the vtable we're trying to set up, so if we dlclose the
driver then those function pointers will point off into space and things
crash.

Noticed this because after !1923 eglinfo would crash when setting up the
GBM platform. This was something of a cascade failure, because my kernel
is too old for DRM_IOCTL_I915_GETPARAM to work without DRM_AUTH, so i965
wouldn't load. platform_drm.c then got very confused when it tries to
load swrast as a dri2 driver.

Reviewed-by: Eric Anholt <eric@anholt.net>
5 years agoradv: Fix warning in 32-bit build.
Bas Nieuwenhuizen [Mon, 30 Sep 2019 21:20:05 +0000 (23:20 +0200)]
radv: Fix warning in 32-bit build.

uintptr_t is 32 bits in a 32-bits build, resulting in shifting out
of bounds.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
5 years agoradv: Fix condition for skipping the continue CS.
Bas Nieuwenhuizen [Wed, 2 Oct 2019 19:26:01 +0000 (21:26 +0200)]
radv: Fix condition for skipping the continue CS.

We need the continue CS for referencing the tess/GDS/sample position BOs.

Fixes: 46e52df34d3 "radv: add tessellation ring allocation support. (v2)"
Fixes: e1dc3ab7534 "radv/gfx10: allocate GDS/OA buffer objects for NGG streamout"
Fixes: 1171b304f30 "radv: overhaul fragment shader sample positions."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
5 years agogitlab-ci: Use per-job ccache
Michel Dänzer [Tue, 1 Oct 2019 14:00:16 +0000 (16:00 +0200)]
gitlab-ci: Use per-job ccache

Instead of a single cache shared between all jobs, but reduce the
maximum cache size to 1.5G (from 5G).

Rationale for smaller cache:

Pulling & pushing a 5G cache could take a long time. Consider
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/684010 (click the "Show
complete raw" button to see timestamps): Pulling the cache took
1569927241-1569927194 = 47 seconds, pushing it 1569927671-1569927519
= 152, for a total of 199 seconds. The actual build took comparable
1569927518-1569927243 = 275 seconds, despite no cache hits from ccache.
In other words, the cache transfers almost doubled the job duration,
and they would have negated any build time benefits from ccache even
with a high cache hit rate.

Also, the smaller caches avoid blowing up storage requirements for them
too much.

Rationale for per-job caches:

Making a single cache significantly smaller might result in cached
build products from one job getting evicted by another job, reducing
the likelihood of cache hits from previous pipelines.

v2:
* Move up "ccache --max-size=1500M" call (Eric Engestrom)

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agovirgl: honor winsys supplied metadata
Gurchetan Singh [Wed, 25 Sep 2019 17:44:44 +0000 (10:44 -0700)]
virgl: honor winsys supplied metadata

To truly to do this correctly, we'll have to fix the discrepancy between
drm_virtgpu_3d_transfer_to_host and virtio_gpu_transfer_host_3d. However,
this is a good starting point.

Since virtio-gpu only supports self-import and export, this should be fine.
Let's only do WINSYS_HANDLE_TYPE_FD for this currently.

Reviewed by: Robert Tarasov <tutankhamen@chromium.org>

5 years agovirgl: modify internal structures to track winsys-supplied data
Gurchetan Singh [Wed, 25 Sep 2019 17:33:16 +0000 (10:33 -0700)]
virgl: modify internal structures to track winsys-supplied data

The winsys might supply dimensions that are different than
those we calculate.  In additional, it may supply virtualized
modifiers.

In practice, a stride != bpp * width and virtualized modifiers don't
happen yet, but the plan is to move in that direction.

Also make virgl_resource_layout static.

Reviewed by: Robert Tarasov <tutankhamen@chromium.org>

5 years agovirgl: modify resource_create_from_handle(..) callback
Gurchetan Singh [Wed, 25 Sep 2019 17:06:23 +0000 (10:06 -0700)]
virgl: modify resource_create_from_handle(..) callback

This commit makes no functional changes, just adds the revelant
plumbing.

Reviewed by: Robert Tarasov <tutankhamen@chromium.org>

5 years agovirgl: remove stride from virgl_hw_res
Gurchetan Singh [Wed, 25 Sep 2019 16:25:46 +0000 (09:25 -0700)]
virgl: remove stride from virgl_hw_res

It's not used anywhere, and stride isn't really an intrinsic
property of a GEM buffer.

Reviewed by: Robert Tarasov <tutankhamen@chromium.org>

5 years agointel: fix topology query
Lionel Landwerlin [Wed, 2 Oct 2019 14:13:06 +0000 (17:13 +0300)]
intel: fix topology query

i915 will report ENODEV on generations prior to Haswell because there
is no point in reporting values on those. This is prior any fusing
could happen on parts with identical PCI ids.

This query call was previously only triggered on generations that
support performance queries, which happens to match generation for
which i915 reports topology, but the commit pointed below started
using it on all generations.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1860
Cc: <mesa-stable@lists.freedesktop.org>
Fixes: 96e1c945f2 ("i965: Move device info initialization to common code")
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
5 years agodocs: Fix GL_EXT_demote_to_helper_invocation name
Caio Marcelo de Oliveira Filho [Tue, 1 Oct 2019 03:47:58 +0000 (20:47 -0700)]
docs: Fix GL_EXT_demote_to_helper_invocation name

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
5 years agoradv/gfx10: fix the ESGS ring size symbol
Samuel Pitoiset [Wed, 18 Sep 2019 07:58:54 +0000 (09:58 +0200)]
radv/gfx10: fix the ESGS ring size symbol

Random hangs no longer happen, I'm actually not sure if they were
related to this.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv: fix build
Samuel Pitoiset [Wed, 2 Oct 2019 18:37:43 +0000 (20:37 +0200)]
radv: fix build

Forgot to amend the commit before updating the MR.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
5 years agoRevert "radv: disable viewport clamping even if FS doesn't write Z"
Samuel Pitoiset [Wed, 2 Oct 2019 17:34:52 +0000 (19:34 +0200)]
Revert "radv: disable viewport clamping even if FS doesn't write Z"

This was actually the wrong fix.

This reverts commit 0a313cc285c2939de9cac07f045b0b699bc208ca.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv: rework the slow depthstencil clear to write depth from PS
Samuel Pitoiset [Wed, 18 Sep 2019 13:43:13 +0000 (15:43 +0200)]
radv: rework the slow depthstencil clear to write depth from PS

Make sure to export the expected clear values to the depth
stencil attachment.

This fixes dEQP-VK.pipeline.depth_range_unrestricted.* on GFX10.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: fix NGG streamout with triangle strips for VS
Samuel Pitoiset [Tue, 17 Sep 2019 16:52:02 +0000 (18:52 +0200)]
radv/gfx10: fix NGG streamout with triangle strips for VS

The number of vertices has to be adjusted with the output primitive
type.

This fixes dEQP-VK.transform_feedback.simple.triangle_strip_*.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: fix storing/loading NGG stream outputs for GS
Samuel Pitoiset [Tue, 17 Sep 2019 09:01:01 +0000 (11:01 +0200)]
radv/gfx10: fix storing/loading NGG stream outputs for GS

The GS outputs are stored differently in the LDS storage, they
are indexed by out_idx which is incremented for each stored DWORD.
Thus, we need a different path for exporting the stream outputs.

This fixes a bunch of CTS failures when NGG GS is force enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: use the component mask when storing/loading NGG stream outputs
Samuel Pitoiset [Tue, 17 Sep 2019 08:51:46 +0000 (10:51 +0200)]
radv/gfx10: use the component mask when storing/loading NGG stream outputs

It's unnecessary to store/load more components that needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: fix storing/loading NGG stream outputs for VS and TES
Samuel Pitoiset [Tue, 17 Sep 2019 08:43:15 +0000 (10:43 +0200)]
radv/gfx10: fix storing/loading NGG stream outputs for VS and TES

The LDS storage allocated for stream outputs is 4 * N, where N
is the number of outputs. So, we have to store/load with N as index
and not with the output location as index.

This doesn't fix anything known but it should fix out-of-bounds
access and it also reduces the number of outputs written to the
LDS storage.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: add missing counter buffer to the BO list
Samuel Pitoiset [Mon, 16 Sep 2019 14:16:05 +0000 (16:16 +0200)]
radv/gfx10: add missing counter buffer to the BO list

The buffer isn't necessarily used before.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agoradv/gfx10: add radv_device::use_ngg
Samuel Pitoiset [Wed, 18 Sep 2019 07:01:38 +0000 (09:01 +0200)]
radv/gfx10: add radv_device::use_ngg

Trivial.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
5 years agogit: delete .gitattributes
Eric Engestrom [Wed, 2 Oct 2019 12:20:13 +0000 (13:20 +0100)]
git: delete .gitattributes

The last of these was deleted in 44a8e5135470fa51ae36 ("d3d1x: Remove.")
over 6 years ago.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
5 years agoetnaviv: enable triangle strips only when the hardware supports it
Gert Wollny [Wed, 2 Oct 2019 07:28:55 +0000 (09:28 +0200)]
etnaviv: enable triangle strips only when the hardware supports it

Some hardware has a bug with triangle strips and it is signalled by the
flag BUG_FIXED8 whether this bug has been fixed. So only enable triangle
strips when this flag is set.

Thanks: Jonathan Marek and Christian Gmeiner for the pointers

v2: Add TODO to indicate that the handling should be refined
    (Jonathan & Christian)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>