Commit Graph

155176 Commits

Author SHA1 Message Date
Emma Anholt 2aeb83117a .gitignore: Qualify the path for the ignored build directory.
This was origally added for scons, which is gone, but keep it around since
enough people use "build" for their meson builds that you probably
shouldn't add anything to git under that name.  The qualifying '/' is
needed because we have a .gitlab-ci/build/ directory where we do check in
code.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16827>
2022-06-09 22:53:37 +00:00
Emma Anholt d2677cb6d7 mesa/st: Abort the linking on driver link failure.
If the driver said it can't do the shader, then listen to it and don't ask
it to create the shaders anyway.  Fixes a bunch of spam on i915/r300 (with
!16878) about unsupported opcodes during dEQP runs.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16895>
2022-06-09 22:28:01 +00:00
Emma Anholt c426e21ff1 turnip: Reverse the order of walking pipes or tiles on odd rows.
This improves the cache locality compared to raster order.  Improves
gfxbench vk-5-normal perf by 3.3009% +/- 0.105934% (n=3).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16917>
2022-06-09 20:36:42 +00:00
Chia-I Wu 790fc8455f ci/turnip: add a link to VkPhysicalDeviceMemoryProperties failure
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16939>
2022-06-09 19:55:32 +00:00
Emma Anholt e8d4eaf172 ci/iris: Disable skqp until it can be stabilized.
It keeps blocking marge with flakes across many different tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16951>
2022-06-09 18:35:24 +00:00
Yonggang Luo 0ef513699d util: Add unittest for timespec_get
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:34 +00:00
Yonggang Luo ef44bbdbed util: Remove unused function timespec_passed
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:34 +00:00
Yonggang Luo 1cc1ebdc46 util: always enable timespec_test.cpp
c11/time.h always contains `struct timespec` now

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:34 +00:00
Yonggang Luo 5abf590c71 util: Remove usage of designated initializers in timespec_test.cpp
As the default option for msvc 2019 does support designated initializers
```
../src/util/tests/timespec_test.cpp(302): error C7555: use of designated initializers requires at least '/std:c++20'
../src/util/tests/timespec_test.cpp(303): error C7555: use of designated initializers requires at least '/std:c++20'
../src/util/tests/timespec_test.cpp(312): error C7555: use of designated initializers requires at least '/std:c++20'
../src/util/tests/timespec_test.cpp(313): error C7555: use of designated initializers requires at least '/std:c++20'
```

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:34 +00:00
Yonggang Luo 672a93cd6d util: Use timespec_get directly, it's always present
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:34 +00:00
Yonggang Luo 65d5ee4012 c11: Implement timespec_get on win32 properly when not available
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:34 +00:00
Yonggang Luo b2ddec4e98 c11: Implement c11/time.h with c11/impl/time.c
Create c11/time.h instead of put timespec_get in `c11/threads.h`

Creating impl folder is used to avoid `#include <time.h>` point the c11/time.h file

Detecting if `struct timespec` present with meson
Define TIME_UTC in `c11/time.h` instead `c11/threads.h`
Define `struct timespec` in `c11/time.h` when not present.
Implement timespec_get in c11/impl/time.c instead threads.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:34 +00:00
Yonggang Luo fe01757ddf c11/threads: Remove the detecting code for `HAVE_TIMESPEC_GET` in threads_win32.h
The meson already detecting it properly now, so remove the duplicated detecting code

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:33 +00:00
Yonggang Luo a6dd77149a meson: Fixes timespec_get detect code
Add functions_to_detect dictionary to records the paths to include

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
2022-06-09 17:23:33 +00:00
Jesse Natalie cc805aef69 d3d12: Properly set HS input control point count
Looks like some hardware needs this info in the shader to match the
topology. Since there's no spot in the shader info for it, we're
currently using the array size of the TCS input vars to store it.

Cc: mesa-stable
Reviewed-by: Paul Dodzweit <paul.dodzweit@amd.com>
Tested-by: Paul Dodzweit <paul.dodzweit@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16920>
2022-06-09 17:08:18 +00:00
Konstantin Seurer 08577bbb70 nir/nir_lower_io: Optimize 32-bit inbounds access
Perform address calculation in 32 bits when
dealing with inbounds array derefs.

Closes: #6562
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16729>
2022-06-09 16:20:16 +00:00
Konstantin Seurer f19cbe98e3 nir,spirv: Preserve inbounds access information
Preserving information about inbounds access and
the required bit size for the bounds will help
with avoiding 64-bit operations when lowering io.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16729>
2022-06-09 16:20:16 +00:00
Boris Brezillon e6301b886b dzn: Enable depth-bounds testing
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16948>
2022-06-09 08:21:14 -07:00
Boris Brezillon 9feda65a83 dzn: Use CreatePipelineState()
This way we can easily extend the logic to support new features, like
depth-bounds testing.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16948>
2022-06-09 08:21:09 -07:00
Boris Brezillon 83c7fab53f dzn: Drop an unused argument passed to dzn_graphics_pipeline_translate_vi()
The 'out' argument is not used, let's drop it.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16948>
2022-06-09 08:21:04 -07:00
Boris Brezillon 185bae4c60 dzn: Switch to ID3D12Device2
So we can use the CreatePipelineState method and unlock new features
like depth-bounds tests.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16948>
2022-06-09 08:20:54 -07:00
Mike Blumenkrantz ee1a0a0772 zink: always create descriptor templates
the 'notemplates' debug mode is somewhat misleading since there's no
uncached+notemplates mechanism, meaning that if the descriptor cache
explodes it'll still use templates for updating in the fallback path

Fixes: 4e3768914d ("zink: add ZINK_DESCRIPTORS env var to explicitly set a mode")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16927>
2022-06-09 12:17:45 +00:00
Mike Blumenkrantz 3156a5705d zink: fix buffer descriptor hashing
since all the buffers are now an array descriptor, hashing needs
to iterate over all the descriptors in order to be accurate

Fixes: a7327c7cac ("zink: implement indirect buffer indexing")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16927>
2022-06-09 12:17:45 +00:00
Mike Blumenkrantz b818c0862b zink: simplify some compiler bo code
this is a bit easier to read

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16927>
2022-06-09 12:17:45 +00:00
Yurii Kolesnykov bcc22b9e4d Init macOS GitHub Action
Closes #6517

Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16875>
2022-06-09 09:24:52 +00:00
Yurii Kolesnykov 69b95b7839 Remove Travis CI config
Closes #4919

Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16875>
2022-06-09 09:24:52 +00:00
Juan A. Suarez Romero ef6cc03b17 v3d: add ARB_polygon_offset_clamp extension support
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16925>
2022-06-09 09:05:58 +00:00
Icecream95 a2463ec271 panfrost: Constant stencil value tracking
If stencil is constant across the resource, then it can be treated as
if it was cleared.

Improves performance in applications which create a stencil buffer but
do not use it. Originally the same was done for depth to help some 2D
applications, but that gave mixed results so the patch was dropped.

v2: Don't do anything if a fragment job wouldn't be needed otherwise.
v3: Set stencil_value when a batch is cleared (Alyssa)
v4: Handle clears when the stencil is already known (Alyssa)
v5: Make sure shared resources are not used (Alyssa)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16646>
2022-06-09 08:51:09 +00:00
Samuel Pitoiset 79877d5df5 radv: advertise VK_EXT_primitives_generated_query
Pass all dEQP-VK.transform_feedback.primitives_generated_query.*.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
2022-06-09 08:02:39 +00:00
Samuel Pitoiset 1ebf463a5a radv: implement VK_EXT_primitives_generated_query
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
2022-06-09 08:02:39 +00:00
Samuel Pitoiset e0edf8d240 radv: add few helpers related to streamout
Streamout must be enabled for the PRIMITIVES_GENERATED query to work.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
2022-06-09 08:02:39 +00:00
Samuel Pitoiset f3daf7ce40 radv: flush the NGG query state when the argument is declared
When primitives generated query is used, the driver also needs to
emulate counting for NGG VS/TES.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
2022-06-09 08:02:39 +00:00
Samuel Pitoiset fe57fe1fd8 ac/nir/ngg: count the number of generated primitives for VS and TES
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
2022-06-09 08:02:39 +00:00
Samuel Pitoiset 60b07a0ab2 radv: declare the NGG query argument for primitives generated query
To emulare counting for NGG VS/TES.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
2022-06-09 08:02:39 +00:00
Samuel Pitoiset 11734f935a radv: add primitives_generated_query to the graphics pipeline key
Different shader variants will be used to not hurt when the features
aren't enabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
2022-06-09 08:02:39 +00:00
Samuel Pitoiset dc8cf44f60 radv: track if primitives generated query features are enabled
This will be used to conditionally declare the NGG query argument
for NGG VS/TES and also adjust the NGG shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
2022-06-09 08:02:39 +00:00
Samuel Pitoiset 3efbbf9588 radv: rename ngg_gs_state to ngg_query_state
This state will be used by NGG VS and NGG TES too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15639>
2022-06-09 08:02:39 +00:00
Erico Nunes 6b9b28f94e lima/ci: Don't skip piglit opengl 1 tests
Some extensions and features we support only get covered in this space.
We still get a 10min runtime, so it makes sense to include them from
now on.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16928>
2022-06-09 07:48:29 +00:00
Charmaine Lee 704c9b2825 svga: fix shared memory index
State tracker only declares one shared memory for GLSL and all
references to the shared memory are with index 0.
So fix the shared memory index in the declaration to use 0 index.

Fixes spec@arb_compute_shader@execution@shared*

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16930>
2022-06-09 07:40:30 +00:00
Charmaine Lee d9aedaa795 svga: fix reference to NULL offset for atomic counter
ntt does not supply an offset source for HWATOMIC.
So no need to reference the offset source for HWATOMIC.

Fixes spec@arb_compute_shader@execution@basic*

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16930>
2022-06-09 07:40:30 +00:00
Timothy Arceri 893b4d98f8 glsl: inline do_common_optimization() call
The function was previously a helper for when some drivers still
called the GLSL IR optimisations in a loop. No drivers do that
anymore.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16924>
2022-06-08 22:58:50 +00:00
Timothy Arceri d09a37ef54 glsl: remove never true do_dead_code() parameter
Since we have now switched all drivers to using NIR and therefore
the NIR based uniform linker this param never needs to be set to
true so remove it.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16924>
2022-06-08 22:58:50 +00:00
Dylan Baker 3223f5b63f docs: link releases notes for 21.3.9
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16931>
2022-06-08 22:04:43 +00:00
Dylan Baker c44ece1679 docs Add sha256 sums for 21.3.9
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16931>
2022-06-08 22:04:43 +00:00
Dylan Baker d413674160 docs: add release notes for 21.3.9
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16931>
2022-06-08 22:04:43 +00:00
Jason Ekstrand 4655ff1f5b nir/deref: Handle RESTRICT for SSBO deref bindings
Tested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16894>
2022-06-08 21:30:59 +00:00
Jason Ekstrand 8492e78f9d nir/deref: Handle SSBO array bindings specially
Instead of just checking for the variables to match, check that the
entire deref up to the interface type matches.

Tested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16894>
2022-06-08 21:30:59 +00:00
Jason Ekstrand a5b1274275 nir/vars_tests: Use nir_var_mem_global instead of ssbo
We're about to add a bunch of SSBO special cases which will depend on
SSBOs always being either structs or arrays of structs.  All those
little vector SSBOs we're creating will no longer be valid.  Switch to
nir_var_mem_global to avoid this.

Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16894>
2022-06-08 21:30:59 +00:00
Jason Ekstrand 2d221c64e7 nir: Increase nir_variable_data::mode to 16 bits
This is required if we want to have variables with nir_var_mem_global
which we will for CL eventually.  Also, they're useful in unit tests
because they're the most generic thing imaginable and can't get
eliminated by normal means.

Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16894>
2022-06-08 21:30:59 +00:00
Jason Ekstrand 0ad2dfe942 nir/deref: Re-arrange variable checks in compare_deref_paths
Instead of having a bunch of mode checks as special cases, assert that
the modes equal and then switch on the mode.  This should make the
special cases a bit easier to understand.  Handling of `a_var == b_var`
looks redundant now but it won't be in the next patch.

Tested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16894>
2022-06-08 21:30:59 +00:00