Commit Graph

132353 Commits

Author SHA1 Message Date
Christian Gmeiner 533f6debb1 nir: change return type to void
init_liveness_block(..) only gets called without using the
always true return value. Switch from bool to void.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8051>
2020-12-11 16:45:57 +00:00
Samuel Iglesias Gonsálvez e8bf15d107 turnip: pCounterBufferOffsets can be NULL on vkCmd*TransformFeedbackEXT()
According to the spec for both vkCmd{Begin,End}TransformFeedbackEXT(),
if pCounterBufferOffsets is NULL, then it is assumed the offsets are
zero.

Fixes crash on dEQP-VK.transform_feedback.simple.backward_dependency_no_offset_array

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8057>
2020-12-11 16:30:51 +00:00
Adam Jackson c0e7a2cd02 mesa: Remove silly "dummy_false" extension support
This removes the memory of some old OES extensions from the table, which
seems to be harmless.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8037>
2020-12-11 16:10:48 +00:00
Daniel Schürmann fd49ba59a3 aco/ra: use get_reg_specified() for p_extract_vector
On GFX6/7, it might violate validation rules, otherwise.

Fixes: 51f4b22fee ('aco: don't allow unaligned subdword accesses on GFX6/7')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8047>
2020-12-11 13:44:47 +00:00
Timur Kristóf 731f8fc9dd aco: Use program->num_waves as maximum in scheduler.
The scheduler doesn't take SGPR use into account, which can be
a limiting factor on older GPUs. This patch fixes a CTS test crash
on GFX6.

CC: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8040>
2020-12-11 13:32:26 +00:00
Rhys Perry b548512813 nir/opt_access: don't ignore infer_non_readable
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Fixes: d7d0b4445a ("nir/opt_access: infer writeonly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3959
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8018>
2020-12-11 12:19:23 +00:00
Hoe Hao Cheng fe669ff4a0 zink: replace old code with generated zink_instance
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7800>
2020-12-11 12:07:13 +00:00
Hoe Hao Cheng 52138ea9b3 zink: hook zink_instance to build
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7800>
2020-12-11 12:07:13 +00:00
Hoe Hao Cheng 2b4fcf0a06 zink: generate instance creation code with a python script
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7800>
2020-12-11 12:07:13 +00:00
Adam Jackson 12656de341 zink: factor out GET_PROC_ADDR and friends to zink_screen.h
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7800>
2020-12-11 12:07:13 +00:00
Hoe Hao Cheng 2f58d933ea zink: allow Extension/Version to be shared across files
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7800>
2020-12-11 12:07:13 +00:00
Erik Faye-Lund 4ad7541cf0 mesa: check for extension instead of desktop GL
If we ever decide to allow this extension for GLES, this will make life
easier.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8028>
2020-12-11 11:21:49 +00:00
Erik Faye-Lund 47eb9b865d mesa: do not allow es2-extension enums for es1
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8028>
2020-12-11 11:21:49 +00:00
Erik Faye-Lund 4eaff8dba7 .gitlab-ci: verify that Get-Content worked
This will hopefully prevent future breakages similar to what the
previous commit fixed.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8052>
2020-12-11 11:02:37 +00:00
Erik Faye-Lund 9eea521391 gitlab-ci: copy piglit expected results to artifacts
I somehow missed this while reworking the CI bits to reduce bandwidth
usage. This emits an error on stdout, but doesn't actually fail the
tests.

Fixes: 195a001d73 ("gitlab-ci: do not clone git-repo for test-job")
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8052>
2020-12-11 11:02:37 +00:00
cheyang 83d1e2efd0 android: fix build failure with libbacktrace
because 848e7b94 commit cause.it  modify u_debug_stack_android.cpp
location from src/gallium/auxiliary/util to src/util but Android.mk
not modify

Fixes: 848e7b94 ("Move stack debug functions to src/util")
Signed-off-by: cheyang <cheyang@bytedance.com>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7851>
2020-12-11 10:41:14 +00:00
Juan A. Suarez Romero 42fd7e3457 v3d: extend the list of formats supported by the TFU unit
TFU can convert from these new formats, but can not autogenerate
mipmaps from them.

Hence we need to set what is the purpose to know if the formats are
supported or not.

v1:
 - Use the same and shorter variable name (Alejandro)

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8050>
2020-12-11 10:29:34 +00:00
Boris Brezillon 4117f08226 panfrost: Fix several depth/stencil format mappings
Stencil should always be loaded in component Y, even when the buffer
only contains stencil values. Patch the blit shaders accordingly, and
fix some format definitions.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7922>
2020-12-11 09:47:38 +00:00
Boris Brezillon 7ca72f1726 gallium/util: Fix depth/stencil blit shaders
When loading the depth, we want to store component X of the texel fetch
result into position.Z which can't be expressed without an extra MOV
unless the backend replicates the depth.

Stencil is always expected in the Y component, but some TGSI shaders
assume it will also be available in X, which only works if the backend
replicates the stencil value.

Let's fix those shaders so backend drivers are not forced to replicate
the depth/stencil values.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7922>
2020-12-11 09:47:38 +00:00
Boris Brezillon e15fd6c36e panfrost: Reload depth/stencil when they are read
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7922>
2020-12-11 09:47:38 +00:00
Boris Brezillon 94009cbebc panfrost: Force ->s_writeback_base to ->zs_writeback_base for Z24S8 buffers
Apparently this field is used even if the stencil is part of the ZS
buffer. Fixes a bunch of page faults on Bifrost.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7922>
2020-12-11 09:47:38 +00:00
Boris Brezillon 27d622cffe panfost: Fix depth/stencil writeback on Bifrost v7
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7922>
2020-12-11 09:47:38 +00:00
Boris Brezillon 27af135280 panfrost: Allow 2DMS arrays
The midgard compiler has been fixed to handle texture operations on
2DMS arrays, and Bifrost already had this case handled properly. Relax
the assert.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8042>
2020-12-11 09:15:39 +01:00
Boris Brezillon 727cc80fe3 pan/mdg: Fix texture handling for 2DMS arrays
While at it, move the coordinate building logic to a dedicated helper
and make it generalize it to handle 1D arrays too.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8042>
2020-12-11 09:15:39 +01:00
Hyunjun Ko 77b67a747e vulkan: Enable VK_KHR_performance_query on android
The tests of this extension seem to be added to Android 11 CTS,
since they can be found on android-11-x branches.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7602>
2020-12-11 07:19:36 +00:00
Nanley Chery 574429f952 intel/blorp: Drop support for STC_CCS resolves
There are no users of this feature.

Reverts the following commits:

* 87c57b8dae (effectively)
* 53d472df24
* 9ab0e92cff

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8021>
2020-12-10 22:41:33 +00:00
Nanley Chery 0f369e1472 iris: Stop using blorp_hiz_stencil_op
Delete this function call for two reasons:

1. Calling blorp_hiz_stencil_op within iris_resolve_color seems out of
   place.
2. AFAICT, iris stopped doing STC_CCS resolves with commit
   5b82d8ce8b.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8021>
2020-12-10 22:41:33 +00:00
Dave Airlie ac0d393eb1 CI: add lavapipe vulkan testing
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7952>
2020-12-11 06:37:50 +10:00
Eric Anholt cf3fc79cd0 st/mesa: Replace mesa_to_tgsi() with prog_to_nir() and nir_to_tgsi().
This introduces NIR optimizations to ARB programs in all gallium drivers,
while deleting code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7927>
2020-12-10 11:53:34 -08:00
Eric Anholt e11513b740 ci: Make sure that osmesa stays warnings-clean in release builds.
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1243>
2020-12-10 18:38:13 +00:00
Eric Anholt ee80237218 mesa: Retire classic OSMesa.
The classic OSMesa renders directly into user memory using
src/mesa/swrast, while gallium OSMesa renders using softpipe or llvmpipe
and copies out at glFlush() time.  This would make gallium look like a
worse choice for OSMesa, except that swrast is:

1) Painfully slow to render compared to llvmpipe
2) Incorrect at derivatives
3) Limited to GL 2.1 instead of GL 4.6

In my survey of OSMesa users, debian was the remaining holdout with
classic OSMesa in use on hurd and some rare non-LLVM-supported
architectures (sh4, alpha, etc.).  As of today, they've switched to
softpipe-based gallium OSMesa for them.

To prevent people from running the wrong OSMesa (to the extent that
running OSMesa can ever be the right thing), delete the classic
version.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>

Closes: #320
Closes: #877
Closes: #2297
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1243>
2020-12-10 18:38:13 +00:00
Eric Anholt 6ffc5611c8 docs: Fix the documentation of the OSMesa path.
Typo in gallium, along with the fact that gallium's osmesa installs to the
same directory as classic's.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1243>
2020-12-10 18:38:13 +00:00
Eric Anholt 7497917cfd osmesa/test: Clear the stencil bits in the depth test.
Since the depth buffer starts out as a malloc, and we weren't clearing it,
you could get undefined values in your top 8 bits.  This should fix
intermittent failures of the depth test.

(Sadly, valgrind wasn't catching this, presumably because the 32-bit value
there *is* written, just some bits are left undef)

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1243>
2020-12-10 18:38:13 +00:00
Timur Kristóf a9a8e05b69 aco: Skip TCS s_barrier when VS outputs are not stored in the LDS.
When VS outputs are known to be never stored in LDS, there is no
reason for HS waves to wait for all LS waves to complete. So, the
s_barrier between the LS and HS can be safely skipped.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7727>
2020-12-10 17:23:16 +00:00
Rob Clark 790144e65a util+treewide: container_of() cleanup
Replace mesa's slightly different container_of() with one more aligned
to the linux kernel's version which takes a type as the 2nd param.  This
avoids warnings like:

  freedreno_context.c:396:44: warning: variable 'batch' is uninitialized when used within its own initialization [-Wuninitialized]

At the same time, we can add additional build-time type-checking asserts

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7941>
2020-12-10 16:48:36 +00:00
Rob Clark 6fe84c5dda util: Allow STATIC_ASSERT() everywhere
Remove -Werror=vla from c_msvc_compat_args so we can use STATIC_ASSERT()
in core code.  We have a CI job for this.

(And arguably we could probably just drop c_msvc_compat_args entirely.)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7941>
2020-12-10 16:48:36 +00:00
Rob Clark 5a082911cd util: Promote __builtin_types_compatible_p compat
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7941>
2020-12-10 16:48:36 +00:00
jzielins f63c595a73 swr: fix crashes caused by incorrectly reporting SSBO support
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8036>
2020-12-10 15:54:49 +01:00
Tomeu Vizoso 5d833f433a ci: Only run the sanity job if there's a MR
As it will fail right away if there isn't, and that prevents the CI to
run on people's branches.

$ ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
ERROR: No open merge request against mesa/mesa with sha 9f6aba4be0ceb59d35732651cc44f676e93b70b5

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: d4151f2e ("ci: Run sanity job only in pre-merge pipelines")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8032>
2020-12-10 12:57:08 +00:00
Hoe Hao Cheng f27ee2a3ad zink: remove useless import in zink_device_info.py
Acked-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7756>
2020-12-10 12:40:59 +00:00
Hoe Hao Cheng 3f1d4de25b zink: move blend_operation_advanced conditions to zink_device_info.py
Acked-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7756>
2020-12-10 12:40:59 +00:00
Hoe Hao Cheng a103666b02 zink: decouple features and enabling conditions in zink_device_info.py
replace `have_feature` with `conditions` and add `features=True`
to places where `have_feature` was used.

Acked-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7756>
2020-12-10 12:40:59 +00:00
Hoe Hao Cheng 6e313bc918 zink: define and use <%guard> helper in zink_device_info
this is an attempt to improve readability of the template code, with
the elimination of excessive whitespace as a bonus.

Acked-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7756>
2020-12-10 12:40:59 +00:00
Michel Dänzer f0ca77c478 ci: Move deploy stage to the end of the pipeline
This should make more important jobs visible without scrolling on
pipeline pages.

The deploy stage jobs only depend on the sanity job or none at all, so
this has no impact on when the former can run.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7926>
2020-12-10 10:23:22 +00:00
Michel Dänzer d4151f2efd ci: Run sanity job only in pre-merge pipelines
It's more of a nuisance than useful for forked branches.

This means the test-docs job can no longer have a direct dependency on
sanity for forked branches, so split it up into two jobs: one for
pre-merge pipelines, one for forked branches.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7926>
2020-12-10 10:23:22 +00:00
Simon Ser ef75ede4ed egl/wayland: remove libwayland < 1.18 workaround
Require libwayland 1.18 and remove the workaround for
WL_SHM_FORMAT_{A,X}BGR16161616F.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7771>
2020-12-10 09:55:22 +00:00
Erik Faye-Lund f5711ae7d2 zink: use _mesa_pointer_set_create for simplicity
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7985>
2020-12-10 09:45:28 +00:00
Erik Faye-Lund 8a30ac49ac zink: fail if set failed to create
Fixes: a03d17ede7 ("zink: refcount zink_gfx_program objects")

Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7985>
2020-12-10 09:45:28 +00:00
Pierre-Eric Pelloux-Prayer 7c85b1d2f0 gallium/u_threaded: set has_user_indices = false for merged draws
Fixes an assert when running this piglit test:
   arb_shader_draw_parameters-drawid-single-draw

Fixes: 351ba767af ("gallium/u_threaded: set has_user_indices = false in the driver thread")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8004>
2020-12-10 09:17:45 +00:00
Pierre-Eric Pelloux-Prayer 5eda9673b2 radeonsi: fix si_get_draw_start_count count value
Fixes: 0ce68852c1 ("radeonsi: implement multi_draw but supporting only 1 draw")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3932
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8004>
2020-12-10 09:17:45 +00:00