Commit Graph

115626 Commits

Author SHA1 Message Date
Samuel Pitoiset 8137df3a46 radv: fix allocating number of user sgprs if streamout is used
streamout_buffers is assigned after that function, so the previous
fix was completely wrong. This probably fix something when streamout
buffers and push constants are used/inlined in the same shader.

Fixes: 378e2d2414 ("radv: fix computing number of user SGPRs for streamout buffers")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-09-13 07:55:30 +02:00
Jason Ekstrand acfa2340e6 intel/fs: Handle UNDEF in split_virtual_grfs
When the UNDEF instruction was added, we didn't do anything special in
split_virtual_grfs.  This mean that anything with an UNDEF wasn't
getting split which causes problems for the compiler.  Among other
things, it makes RA harder because things are in bigger chunks.  It also
meant that dvec4s weren't getting split which means that they are larger
than the maximum register size.

Shader-db results on Kaby Lake:

    total instructions in shared programs: 14959202 -> 14960035 (<.01%)
    instructions in affected programs: 96197 -> 97030 (0.87%)
    helped: 140
    HURT: 128
    helped stats (abs) min: 1 max: 17 x̄: 1.62 x̃: 1
    helped stats (rel) min: 0.09% max: 6.15% x̄: 0.65% x̃: 0.45%
    HURT stats (abs)   min: 1 max: 825 x̄: 8.28 x̃: 1
    HURT stats (rel)   min: 0.13% max: 139.83% x̄: 1.70% x̃: 0.50%
    95% mean confidence interval for instructions value: -2.96 9.18
    95% mean confidence interval for instructions %-change: -0.56% 1.51%
    Inconclusive result (value mean confidence interval includes 0).

    total loops in shared programs: 4372 -> 4372 (0.00%)
    loops in affected programs: 0 -> 0
    helped: 0
    HURT: 0

    total cycles in shared programs: 352646771 -> 352840997 (0.06%)
    cycles in affected programs: 218600800 -> 218795026 (0.09%)
    helped: 21167
    HURT: 21411
    helped stats (abs) min: 1 max: 2924 x̄: 36.89 x̃: 10
    helped stats (rel) min: <.01% max: 41.90% x̄: 2.97% x̃: 0.98%
    HURT stats (abs)   min: 1 max: 26027 x̄: 45.54 x̃: 10
    HURT stats (rel)   min: <.01% max: 324.46% x̄: 3.88% x̃: 1.06%
    95% mean confidence interval for cycles value: 2.87 6.26
    95% mean confidence interval for cycles %-change: 0.40% 0.55%
    Cycles are HURT.

    total spills in shared programs: 8840 -> 8953 (1.28%)
    spills in affected programs: 126 -> 239 (89.68%)
    helped: 1
    HURT: 2

    total fills in shared programs: 21782 -> 21914 (0.61%)
    fills in affected programs: 431 -> 563 (30.63%)
    helped: 1
    HURT: 3

    LOST:   0
    GAINED: 5

Shader-db results on Haswell:

    total instructions in shared programs: 13320918 -> 13320769 (<.01%)
    instructions in affected programs: 40998 -> 40849 (-0.36%)
    helped: 146
    HURT: 56
    helped stats (abs) min: 1 max: 8 x̄: 2.73 x̃: 2
    helped stats (rel) min: 0.16% max: 8.60% x̄: 2.52% x̃: 2.22%
    HURT stats (abs)   min: 2 max: 23 x̄: 4.45 x̃: 4
    HURT stats (rel)   min: 0.21% max: 10.26% x̄: 6.83% x̃: 10.26%
    95% mean confidence interval for instructions value: -1.26 -0.21
    95% mean confidence interval for instructions %-change: -0.62% 0.77%
    Inconclusive result (%-change mean confidence interval includes 0).

    total loops in shared programs: 4373 -> 4373 (0.00%)
    loops in affected programs: 0 -> 0
    helped: 0
    HURT: 0

    total cycles in shared programs: 374518258 -> 374384193 (-0.04%)
    cycles in affected programs: 231101954 -> 230967889 (-0.06%)
    helped: 21427
    HURT: 19438
    helped stats (abs) min: 1 max: 2035 x̄: 31.09 x̃: 8
    helped stats (rel) min: <.01% max: 40.95% x̄: 2.42% x̃: 0.86%
    HURT stats (abs)   min: 1 max: 20875 x̄: 27.38 x̃: 8
    HURT stats (rel)   min: <.01% max: 59.09% x̄: 2.49% x̃: 0.80%
    95% mean confidence interval for cycles value: -4.49 -2.07
    95% mean confidence interval for cycles %-change: -0.14% -0.04%
    Cycles are helped.

    total spills in shared programs: 23406 -> 23411 (0.02%)
    spills in affected programs: 3 -> 8 (166.67%)
    helped: 0
    HURT: 2

    total fills in shared programs: 34845 -> 34850 (0.01%)
    fills in affected programs: 3 -> 8 (166.67%)
    helped: 0
    HURT: 2

    LOST:   0
    GAINED: 0

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111566
Fixes: f4ef34f207 "intel/fs: Add an UNDEF instruction to avoid..."
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2019-09-13 04:12:24 +00:00
Jiadong Zhu 33aa039acf mesa: fix texStore for FORMAT_Z32_FLOAT_S8X24_UINT
_mesa_texstore_z32f_x24s8 calculates source rowStride at a
pace of 64-bit, this will make inaccuracy offset if the width
of src image is an odd number. Modify src pointer to int_32* as
source image format is gl_float which is 32-bit per pixel.

Reviewed by Ilia Mirkin

Signed-off-by: Jiadong Zhu <Jiadong.Zhu@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2019-09-12 23:28:28 -04:00
Rob Clark b4df115d3f freedreno/a6xx: pre-calculate userconst stateobj size
The AnTuTu "garden" benchmark overflows the fixed size constbuffer
stateobject, so lets be more clever and calculate (a potentially
slightly pessimistic) actual size.

Signed-off-by: Rob Clark <robdclark@chromium.org>
2019-09-12 18:07:20 -07:00
Adam Jackson 5a9dec7534 gallium: Restore VSX for llvm >= 4
Accidentally dropped in 4fdd455eeb.

Fixes: 4fdd455e ("gallium: Require LLVM >= 3.4)
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2019-09-12 20:09:12 -04:00
Eric Anholt 2efc804892 egl/android: Fix build since the DRI fourcc removal.
Fixes: 272f9cfe6a ("dri: Use DRM_FORMAT_* instead of defining our own copy.")

Reviewed-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-09-12 21:54:30 +00:00
Eric Anholt 89e840ec59 gitlab-ci/a630: Disable flappy layout_binding.ssbo.fragment_binding_array
It started showing up as unreliable post-merge.  There's a valgrind
complaint, but even fixing that doesn't make it stable.
2019-09-12 14:16:21 -07:00
Rob Clark 966b7c3ed2 freedreno: fix compiler warning
fd6_blitter.c:724:31: warning: passing argument 1 of ‘fd_resource_level_linear’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-09-12 12:52:04 -07:00
Eric Anholt 6f0dc087b7 freedreno: Introduce gitlab-based CI.
Since freedreno's kernel and GPU reset seem to be totally solid, we
don't need to have the complexity of the LAVA setup that panfrost has.
Instead, we can register some boards as shared gitlab runners and have
the jobs run out of a docker container just like we do for llvmpipe.
Just make sure that the DRI device node is passed through to the
containers in the gitlab config ('devices = ["/dev/dri"]' under
runners.docker).

If a runner fails (networking dies, kernel panic, etc.) it'll take out
one build but the rest can keep going since gitlab-runner is what
pulls jobs.  Since the runner pulls jobs, it also means that they can
live behind firewalls instead of needing some public address to be
accessed by gitlab.fd.o.

For now, enable it just on db410c (A307) and cheza (A630) as those are
the hardware that I have plenty of.  A307 is only testing GLES2 since
running all of GLES3 takes too long for the number of boards I've
brought up.

Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2019-09-12 10:55:42 -07:00
Eric Anholt 0b6b0c09f4 gitlab-ci: Log the driver version that got tested.
Sometimes you just want confirmation that dEQP really picked up the
driver we built you thought.  This is not as good as one might like,
because git isn't present in the cross-build image.

Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2019-09-12 10:55:42 -07:00
Eric Anholt 8d4742fe49 gitlab-ci: Disable dEQP's watchdog timer.
A handful of tests on freedreno have been close to the watchdog
timeout, and now sporadically fail since range analysis has slowed
down the compiler for them.

Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2019-09-12 10:55:42 -07:00
Caio Marcelo de Oliveira Filho f479878ce6 mesa/st: Fallback to name lookup when the variable have no Parameter
This brings back the fallback previously present in
st_nir_lookup_parameter_index(): if there's no parameter associated
with the variable, use a parameter from a variable with the same
prefix.

We'll have to sort out something for SPIR-V, but in the meantime let's
fix GLSL.

Fixes: b6384e57f5 ("mesa/st: Lookup parameters without using names")
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Eric Anholt <eric@anholt.net>
2019-09-12 17:53:54 +00:00
Adam Jackson ad9c1838e0 glx: Remove unused indirection for glx_context->fillImage
This slot is always filled in with __glFillImage.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-09-12 13:23:32 -04:00
Eric Engestrom f812cbfd88 meson/v3d: replace partial list of nir dep files with idep_nir_headers
"partial" because `nir_intrinsics_h` was missing.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-09-12 13:18:36 +01:00
Eric Engestrom f418de5490 meson/iris: replace partial list of nir dep files with idep_nir_headers
"partial" because `nir_intrinsics_h` was missing.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-09-12 13:18:36 +01:00
Jose Maria Casanova Crespo 068c8889dd v3d: flag dirty state when binding compute states
As introduced in "v3d: flag dirty state when binding new sampler states"
we need to add support for compute states. New flag VC5_DIRTY_COMPTEX and
VC5_DIRTY_UNCOMPILED_CS are introduced.

Reaching 33 flags at the dirty field forces us to change the type to
uint_64. Flags are reordered and empty continuous bits are available
for future pipeline stages.

v2: Update flag conditions to compile cs shader. (Eric Antholt)
    Now dirty flags use uint_64t and flags are reordered.
    Added VC5_DIRTY_UNCOMPILED_CS flag.

Reviewed-by: Eric Anholt <eric@anholt.net>
2019-09-12 12:20:17 +01:00
Danylo Piliaiev 175c32e9bd tgsi_to_nir: Translate TGSI_INTERPOLATE_COLOR as INTERP_MODE_NONE
Translating TGSI_INTERPOLATE_COLOR as INTERP_MODE_SMOOTH made
it for drivers impossible to have flatshaded color inputs.

Translate it to INTERP_MODE_NONE which drivers interpret as
smooth or flat depending on flatshading state.

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

Fixes: 770faf54 ("tgsi_to_nir: Improve interpolation modes.")

Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-09-12 10:17:39 +00:00
Iago Toral Quiroga 544b156968 nir/lower_point_size: assume scalar PSIZ
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-09-12 06:40:04 +00:00
Iago Toral Quiroga 7f0b4a803c gallium/ttn: VARYING_SLOT_PSIZ and VARYING_SLOT_FOGC are scalar
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-09-12 06:40:04 +00:00
Iago Toral Quiroga ab341e61f0 prog_to_nir: VARYING_SLOT_PSIZ is a scalar
v2: remove stray change (Erik Faye-Lund)

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2019-09-12 06:40:04 +00:00
Lepton Wu 8b1912c20b egl/android: Only keep BGRA EGL configs as fallback
Stock Android code actually doesn't support BGRA format EGL
configs. It's hard coded to use RGBA_8888 as window format
for BGRA EGL configs here:
https://android.googlesource.com/platform/frameworks/native/+/1eb32e2/opengl/libs/EGL/eglApi.cpp#608
So just remove it from EGL configs if RGBA is supported.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2019-09-12 06:38:59 +00:00
renchenglei e2485bb023 egl/android: Enable HAL_PIXEL_FORMAT_RGBA_1010102 format
The patch adds support for HAL_PIXEL_FORMAT_RGBA_1010102 on
Android platform.

Fixes android.media.cts.DecoderTest#testVp9HdrStaticMetadata
which failed in egl due to "Unsupported native buffer format 0x2b"
on Android.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chenglei Ren <chenglei.ren@intel.com>
2019-09-12 05:59:56 +00:00
Kenneth Graunke 6a82a374b4 iris: trivial whitespace fixes 2019-09-11 21:33:41 -07:00
Jonathan Marek 3690a53608 u_format: float type for R11G11B10_FLOAT/R9G9B9E5_FLOAT
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-09-11 22:39:19 -04:00
Jonathan Marek 8829f9ccb0 u_format: add ETC2 to util_format_srgb/util_format_linear
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-09-11 22:39:07 -04:00
Vinson Lee 8d286776b6 meson: Add coroutines component to llvmpipe build.
Fixes: d32690b43c ("gallivm: add coroutine pass manager support")
Suggested-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-09-11 15:14:17 -07:00
Eric Anholt 272f9cfe6a dri: Use DRM_FORMAT_* instead of defining our own copy.
We have only two defines that aren't from DRM_FORMAT_*: SARGB and
SABGR.  Keep only those as __DRI_IMAGE_FOURCC and garbage collect the
rest.

While this header is also used from the X server, the X server doesn't
use any __DRI_IMAGE enums.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-09-11 13:05:10 -07:00
Eric Anholt c18b1f0e71 uapi: Update drm_fourcc.h
Taken from drm-misc-next 268de6530aa1 ("drm: mst: Fix query_payload
ack reply struct")

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
2019-09-11 13:04:53 -07:00
Kenneth Graunke 73e4f974b8 st/mesa: Only pause queries if there are any active queries to pause.
Previously, ReadPixels, PBO upload/download, and clears would call
cso_save_state with CSO_PAUSE_QUERIES, causing cso_context to call
pipe->set_active_query_state() twice for each operation.  This can
potentially cause driver work to enable/disable statistics counters.

But often, there are no queries happening which need to be paused.
By keeping a simple tally of active queries, we can skip this work.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-09-11 19:47:57 +00:00
Jean Hertel 2c1983f757 Fix missing dri2_load_driver on platform_drm
Signed-off-by: Jean Hertel <jean.hertel@hotmail.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2019-09-11 19:28:09 +00:00
Anuj Phogat 729de1488f intel/gen11+: Enable Hardware filtering of Semi-Pipelined State in WM
Initial benchmarking didn't show any performance benefits. But it might eventually.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-09-11 11:29:37 -07:00
Anuj Phogat ee2bde5232 genxml/gen11+: Add COMMON_SLICE_CHICKEN4 register
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2019-09-11 11:29:37 -07:00
Adam Jackson 7e0e53a077 egl/dri2: Refuse to add EGLConfigs with no supported surface types
For example, the surfaceless platform only supports pbuffers. If the
driver supports MSAA, we would still create a config, but it would have
no supported surface types. That's meaningless, so don't do it.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-09-11 14:11:40 -04:00
Adam Jackson 96b592696f gallium: Require LLVM >= 3.9
To go any further than this would be to break the current version of
Android.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-11 17:00:43 +00:00
Adam Jackson 585d095610 gallium: Require LLVM >= 3.8
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-11 17:00:43 +00:00
Adam Jackson 59f18f2159 gallium: Require LLVM >= 3.7
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-11 17:00:43 +00:00
Adam Jackson 9abf7d5755 gallium: Require LLVM >= 3.6
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-11 17:00:43 +00:00
Adam Jackson 3c553d9cff gallium: Require LLVM >= 3.5
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>

[ Michel Dänzer: Dropped jessie line from debian-install.sh again ]
2019-09-11 17:00:43 +00:00
Michel Dänzer 57855ff8aa gitlab-ci: Keep g++ from stretch when installing foreign toolchains
Upgrading to a newer g++ causes older LLVM/clang packages to be
removed.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2019-09-11 17:00:43 +00:00
Michel Dänzer 3be7c67bbe gitlab-ci: Explicitly install linux-libc-dev for foreign architectures
Something seems to have changed in Debian buster causing installation
of the other foreign packages to fail without this.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2019-09-11 17:00:43 +00:00
Adam Jackson 4fdd455eeb gallium: Require LLVM >= 3.4
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2019-09-11 17:00:43 +00:00
Dylan Baker a1ebbc3225 Docs: mark that 19.2.0-rc3 has been released
Also update -rc4 to me.
2019-09-11 09:47:45 -07:00
Brian Paul d714415208 st/nir: fix illegal designated initializer in st_glsl_to_nir.cpp
IIRC, designated initializers are not legal C++.
Fixes the MSVC build.

Fixes: 83fd1e58 ("glsl/nir: Add and use a gl_nir_link() function")

Reviewed-by: Neha Bhende <bhenden@vmware.com>
2019-09-11 09:38:07 -06:00
Dylan Baker 52cf2d05a7 meson: don't generate file into subdirs
This is unsupported by meson and may become a hard error in the future.

Fixes: 5adfc8602c
       ("lima/ppir: move sin/cos input scaling into NIR")
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-09-11 08:35:05 -07:00
Kenneth Graunke 73b70b4952 iris: Set bo->reusable = false in iris_bo_make_external_locked
This fixes a missing bo->reusable = false in iris_bo_export_gem_handle.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-09-11 08:10:47 -07:00
Kenneth Graunke 06370c3167 iris: Finish initializing the BO before stuffing it in the hash table
Other threads may pick it up once it's in the hash table.  Not known
to fix anything currently.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-09-11 08:10:47 -07:00
Marek Olšák 9a59ad87df radeonsi/gfx9: honor user stride for imported buffers
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2019-09-11 11:03:31 -04:00
Marek Olšák b97c5edd7a prog_to_nir, tgsi_to_nir: make sure kill doesn't discard NaNs
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2019-09-11 10:59:27 -04:00
Marek Olšák 1bb2656276 ac: replace HAVE_LLVM with LLVM_VERSION_MAJOR for atomic-optimizations
trivial
2019-09-11 10:56:46 -04:00
Vasily Khoruzhick 32ea4c2c5e lima: set .out_sync field of req in lima_submit_start()
Looks like .out_sync wasn't set in lima_submit_start(), as result
submit completion fence was never signalled.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2019-09-10 21:49:53 -07:00