Commit Graph

130382 Commits

Author SHA1 Message Date
Daniel Schürmann cf083f1d02 aco: use do_pack() for self-intersecting operations.
This improves the code for GFX8+, but is slightly
worse for GFX6_7.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7189>
2020-10-26 12:21:13 +00:00
Daniel Schürmann d96f387e7a aco: improve code sequences for 16bit packing
This includes using alignbyte for GFX6 and GFX7,
and 32-bit instructions for GFX8.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7189>
2020-10-26 12:21:13 +00:00
Daniel Schürmann 40bfb08828 aco: refactor GFX6_7 subdword copy lowering
The new code uses alignbyte which leads
to shorter code and preserves the operand's
registers.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7189>
2020-10-26 12:21:13 +00:00
Eleni Maria Stea 06b41ca589 iris: add support for fence signal capability
This enables GL_EXT_semaphore feature.

v2:
* reversed previous commit that was conditionally setting the signal
  fence capability if the syncobj was present
* reversed previous commit that was introducing a bool has_syncobj that
  is not necessary anymore

v3:
* changed the signal function to use fence->seqno due to recent changes
  to master

v4:
* changed the signal callback to use the new structs of the fences
  backend (iris_fine_fence)

v5:
* removed check for ctx == NULL in iris_fence_signal and await functions
  as at the time they are called we always have a context
* splitted a line to not exceed width

v6:
* put back the if(ctx) check in iris_fence_await, if this is an error
  the fix should be in a different MR

Signed-off-by: Eleni Maria Stea <estea@igalia.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7042>
2020-10-26 12:13:54 +00:00
Eleni Maria Stea aa1d298b33 iris: handle PIPE_FD_TYPE_SYNCOBJ type
Add support for importing syncobj semaphore types from fd handles.

v2:
* Used a C99 initializer instead of memset for drm_syncobj_handle in
  iris_fence.c

Signed-off-by: Eleni Maria Stea <estea@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7042>
2020-10-26 12:13:54 +00:00
Rhys Perry bddaa9339c ac/nir: remove bindless image atomic format check
PIPE_FORMAT_* is supposed to be used and a similar check will probably be
added to nir_validate soon anyway.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7275>
2020-10-26 11:58:15 +00:00
Erik Faye-Lund 2ff97847d1 docs: document zink's gl > 3.0 requirements
The new versions of OpenGL exposed by Zink requires additional Vulkan
features, so let's document them.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7286>
2020-10-26 10:49:58 +00:00
Erik Faye-Lund be693beef1 docs: do not document required minimum
We already document that shaderClipDistance is required, and for that
feature to be supported maxClipDistances needs to be at least 8. So
there's no point in documenting the maxClipDistances-requirement.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7286>
2020-10-26 10:49:58 +00:00
Erik Faye-Lund dd0f941097 zink: verify geometry shader feature
We shouldn't try to use geometry shaders on implementations that don't
support them. So let's verify the feature before using it.

Fixes: 8028991f36 ("zink: enable gs pipe caps")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7287>
2020-10-26 10:36:42 +00:00
Dave Airlie 82512a163b gallivm: lower flrp for all sizes.
This fixes:
builtin-float-mix-1.0.generated.cl

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7309>
2020-10-26 11:33:28 +10:00
Dave Airlie b8a9bd9b93 gallivm: get correct min/max behaviour for kernels.
NaN handling for CL is harsher than GLSL

Fixes piglit min/max CL tests

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7309>
2020-10-26 11:23:05 +10:00
Dave Airlie 9845c1636c gallivm: add support for 8/16-bit mul_hi
This 32x32 code only needs small tweaks for this case.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7309>
2020-10-26 11:03:51 +10:00
Dave Airlie 4b6d332843 gallivm: handle sub-32 bit masked stores.
This is used for register stores < 32 bit size.

Fixes:
builtin-char-rotate-1.0.generated.cl

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7309>
2020-10-26 10:53:00 +10:00
Dave Airlie 81d8ca70eb gallivm: add b2i8/b216 support
This is part of the fix for
builtin-*-rotate-1.0.generated.cl

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7309>
2020-10-26 10:09:58 +10:00
Dave Airlie 0f78ca9d54 gallivm: add 16-bit split/merge support.
Fixes piglit load-hi16.cl, load-lo16.cl

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7309>
2020-10-26 10:08:34 +10:00
Dave Airlie 4ecdc5ec4e gallivm: fix 64->16 f2f16
llvm appears to callout to a library to do 64-bit->16-bit
fp trunc, just trunc to 32-bit first to avoid it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7309>
2020-10-26 09:55:35 +10:00
Dave Airlie 842a53913c llvmpipe: fix 8/16 bit global stores
Fixes:
CL vstore_half-float-global*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7309>
2020-10-26 08:30:04 +10:00
Lionel Landwerlin d1ea49d924 anv: report latest extension spec versions
In many cases those revision happened every before the first public
release of the spec and we just forgot to update our numbers.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7136>
2020-10-25 19:12:35 +02:00
Marijn Suijten 303a74c52c android: panfrost: Move nir_undef_to_zero to util
clang: error: no such file or directory: 'external/mesa3d/src/panfrost/midgard/nir_undef_to_zero.c'
    clang: error: no input files

Fixes: 86b2b4eb76 ("panfrost: Move nir_undef_to_zero to common util/")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7298>
2020-10-25 13:02:06 +00:00
James Park 6a189c89f8 util/xmlconfig: Disable for Windows like Android
The code does not compile on Windows, so just disable for now. There is
already a pattern to do this for Android.

Stop including expat dependency if building Windows.

Disable WITH_XMLCONFIG if _WIN32 is defined.

Tuck _WIN32 incompatible includes inside WITH_XMLCONFIG.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7249>
2020-10-25 03:04:09 +00:00
Dave Airlie fb56fb02a1 gallivm: add load/store scratch support.
Scratch space is per-thread space, so allocate the scratch size
* vector width, and add a per-thread base offset to each
load/store.

This is needed for OpenCL private memory space

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7304>
2020-10-25 08:02:06 +10:00
Bas Nieuwenhuizen 9c1f6ed804 frontends/va: Initialize drm modifier on import.
On import we don't get a modifier so the modifier in the Gallium
handle should be set to DRM_FORMAT_MOD_INVALID instead of LINEAR.

Otherwise things like screen capture break if the driver actually
starts supporting modifiers.

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7302>
2020-10-24 16:15:33 +00:00
SureshGuttula bef6007c3a gallium: update abs_delta segementation parameter
This patch updates segmentation_abs_or_delta_update value based on
VP9 bitstream header info.

Netflix videos are showing corrupted output when codec is HW vp9
and segemantion enabled.This change will fix the corruption issue.

Signed-off-by: SureshGuttula <suresh.guttula@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7290>
2020-10-24 14:34:53 +00:00
Ruijing Dong 9c67f3d723 frontends/omx/enc: fix omx h264 encoding force-keyframe-period issue.
poc was not set to 0 in IDR frames except the first one.

Signed-off-by: Ruijing Dong <Ruijing.Dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7293>
2020-10-24 14:16:28 +00:00
Ian Romanick 390887ff58 mesa: Remove the key parameter from the _mesa_HashDeleteAll callback
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7171>
2020-10-24 01:15:20 +00:00
Ian Romanick cc6dcc6ab4 mesa: Remove the key parameter from the _mesa_HashWalk callback
_mesa_HashWalkLocked too.  After the previous couple commits, there are
no users.  This eliminates a lot of unused parameter warnings.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7171>
2020-10-24 01:15:20 +00:00
Ian Romanick ca752b08c9 i965: Get the gl_perf_query_object Id from the object
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7171>
2020-10-24 01:15:20 +00:00
Ian Romanick f71488d1d1 mesa: Store the atlas Id in the gl_bitmap_atlas structure
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7171>
2020-10-24 01:15:20 +00:00
Ian Romanick 0e17bb509e mesa: Open-code hash walk in _mesa_HashPrint
Previously the deleted key data would get printed at the beginning and
the end.  I don't think that was intentional, so I changed it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7171>
2020-10-24 01:15:20 +00:00
Marek Olšák 3c2489d2e4 amd: print NUM_PKRS with AMD_DEBUG=info on gfx10.3
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7264>
2020-10-23 20:51:25 -04:00
Marek Olšák 989cc76f0c amd: replace 0x028848 with the register definition
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7264>
2020-10-23 20:51:22 -04:00
Marek Olšák e72b76b94b amd: update gfx10-rsrc.json for gfx10.3
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7264>
2020-10-23 20:51:20 -04:00
Marek Olšák e477255271 amd: correct typos in gfx10-rsrc.json
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7264>
2020-10-23 20:51:18 -04:00
Marek Olšák 19e32793b6 amd: regenerate gfx103.json from kernel headers
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7264>
2020-10-23 20:51:14 -04:00
Vinson Lee 9d3b802c6a scons/windows: Support build with LLVM 11.
Added LLVMFrontendOpenMP.
Removed LLVMX86Utils.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7242>
2020-10-23 17:17:01 -07:00
Marijn Suijten f21dd3bc5a scons: gallium/auxiliary: Unconditionally compile NIR regardless of LLVM
NIR sources are not depending on LLVM (anymore?) as can be seen in the
equivalent unconditional inclusion of nir/ source files in meson.build.
Symbols in these files are necessary to compile softpipe:

    Linking build/linux-x86_64-debug/gallium/targets/libgl-xlib/libGL.so.1.5 ...
    /usr/bin/ld: build/linux-x86_64-debug/gallium/drivers/softpipe/libsoftpipe.a(sp_state_shader.os): in function `softpipe_create_shader_state':
    src/gallium/drivers/softpipe/sp_state_shader.c:146: undefined reference to `nir_to_tgsi'
    /usr/bin/ld: build/linux-x86_64-debug/gallium/drivers/softpipe/libsoftpipe.a(sp_state_shader.os): in function `softpipe_create_compute_state':
    src/gallium/drivers/softpipe/sp_state_shader.c:435: undefined reference to `nir_to_tgsi'

Fixes: fa483d8cd1 ("android: gallium/auxiliary: Deduplicate nir_to_tgsi.c inclusion")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3669

Tested-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7250>
2020-10-23 17:34:31 +00:00
Jason Ekstrand 3ba786f624 spirv: Fix OpCopyMemorySized
I have no idea how we are passing CTS tests with that bug in there.  I
guess by luck?

Fixes: 8323c03bbf "spirv: Add support for OpCopyMemorySized"
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7294>
2020-10-23 16:46:52 +00:00
Leo Liu a071590b1d frontends/omx/h265: Check the pps set before the scaling data
Certain clip has no scaling list data in the pps set

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7240>
2020-10-23 14:59:03 +00:00
Leo Liu 08762d5171 frontends/omx/dec: Use the known codec profile when allocating buffers
We should use it since the profile has been known already,
otherwise it will get incorrect buffers in some cases.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7240>
2020-10-23 14:59:03 +00:00
Alyssa Rosenzweig 56f90a6ac1 pan/bi: Account for bool32 ld_ubo reads
Fixes crash in sway.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig 3cdca1514f panfrost: Don't advertise MSAA on Bifrost
Not yet supported and rather broken.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig f0e65805cb panfrost: Drop PIPE_CAP_GLSL_FEATURE_LEVEL for Bifrost
We don't want derivative instructions sneaking in from desktop GL before
we support them.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig b9a136cdd1 panfrost: Implement BGRA textures
Stopgap before the full format rework.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig 048e431542 panfrost: Fix component order XML
For v7. This should be complete and correct now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 8389976b7c ("panfrost: XML-ify the blend descriptors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig 25b66e61f7 panfrost: Calculate thread count on Bifrost
Since the register is missing in practice we need to apply the
per-architecture default.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig fb32406e56 panfrost: Don't export queries
They should be cached onto the device anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig f4ecc432bf panfrost: Record architecture major version
This tends to be easier to work with than the raw GPU ID and needs some
special casing for Midgard vs Bifrost/Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig 81b28ebcb5 pan/bi: Use nir_undef_to_zero
We don't handle undefs explicitly in NIR->BIR which means if they aren't
optimized out they won't be RA'd to anything and then backend RA will
crash (as occurs in a glamor shader seen in MATE).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig 86b2b4eb76 panfrost: Move nir_undef_to_zero to common util/
Will use for Bifrost as well.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00
Alyssa Rosenzweig f0421099ef pan/bi: Pipe through tls_size
So we have stack memory allocated.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7206>
2020-10-23 14:48:23 +00:00