Commit Graph

130677 Commits

Author SHA1 Message Date
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
Alyssa Rosenzweig b43b1535e2 pan/bi: Implement spilling
Now that all the helpers are in place, we can wire it up.

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 e33b2976f3 pan/bi: Pack LOAD/STORE
LOAD is the same as LOAD_UNIFORM (same instruction, I need to
deduplicate the IR), STORE is basically the same as LOAD.

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 74be83d876 pan/bi: Add bi_foreach_clause_in_block_safe helper
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 2ff54cacf0 pan/bi: Factor out singleton construction from scheduler
We'll reuse the logic in spilling.

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 2d0f46a181 pan/bi: Implement bi_spill_register
Given a node to spill, insert the appropriate loads and stores to spill
it.

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