Commit Graph

134363 Commits

Author SHA1 Message Date
Jason Ekstrand e4cc52c054 vulkan: Add common extension tables
Unlike the per-driver tables, these contain every extension ever and
assume the maximum extension version.  This later assumption is ok
because Vulkan extension versions have only been used for something
interesting once in the history of the API.  If it happens again, we can
afford a special case.

This requires us to rework the extension table generation scripts
somewhat because we want to use the same script for both common and
per-driver codegen right now.  To do this we add a "prefix" variable to
go alongside "driver".

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
2021-02-01 18:54:24 +00:00
Jason Ekstrand 5d6ac87d61 vulkan: Add a return code to vk_device_init
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
2021-02-01 18:54:24 +00:00
Jason Ekstrand 8ee88948e3 vulkan: Move vk_device to its own file
Things are going to start getting more complicated so let's avoid the
single mega-file approach.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
2021-02-01 18:54:24 +00:00
Jason Ekstrand b283965427 lavapipe: Properly clean up vk_device
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
2021-02-01 18:54:24 +00:00
Jason Ekstrand 62f966cf44 v3dv: Properly clean up vk_device
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
2021-02-01 18:54:24 +00:00
Jason Ekstrand ce0e5cd35b turnip: Properly clean up vk_device
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
2021-02-01 18:54:24 +00:00
Jason Ekstrand 7e76c0ea82 radv: Properly clean up vk_device
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
2021-02-01 18:54:24 +00:00
Jason Ekstrand b3419512db anv: Clean up the vk_device on the CreateDevice error path
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
2021-02-01 18:54:23 +00:00
Jason Ekstrand 8d6cf9e1c2 vulkan/meson: Add missing dependencise on vk_extensions_gen.py
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
2021-02-01 18:54:23 +00:00
Eric Anholt 8647c98440 ci/freedreno: Add Valve games and other traces now that we have GLX.
Two games are skipped until we fix up their runtimes (or maybe make
scheduled overnight pipelines for longer traces?)

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>
2021-02-01 18:32:01 +00:00
Eric Anholt 23350b5939 ci/freedreno: Do our piglit runs against Xorg.
We were using surfaceless, which misses out on some useful coverage we'd
like to have in the GLX/EGL piglit tests, but more importantly prevented
many traces from running.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>
2021-02-01 18:32:01 +00:00
Eric Anholt d4855d2930 ci/lava+baremetal: Add an xserver to the root fs.
We want to be able to test GLX and EGL on real hardware, and we can't do
that with just the surfaceless backend.  Bringing up the xserver is pretty
easy.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>
2021-02-01 18:32:01 +00:00
Eric Anholt 2e2edaa89b docs/ci: Document setting up the http cache for traces.
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>
2021-02-01 18:32:01 +00:00
Eric Anholt 04a2f1462e ci/docs: Update CI farm requirements suggestions.
We have a handy printout for slow tests now, and DEQP_FRACTION is now
compatible with parallel.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>
2021-02-01 18:32:01 +00:00
Eric Anholt 2af6b53588 ci/freedreno: Use the http cache for artifacts downloads, too.
The gitlab artifacts handling has been slow in the past as we hit
gitlab.fdo from multiple runners, and it costs fd.o egress bandwidth.  Use
the local http cache against the packet.net minio to cut that downloads
cost.

Closes: #3249
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>
2021-02-01 18:32:01 +00:00
Eric Anholt a45810a246 ci/freedreno: Use the new nginx cache for trace downloads.
As we introduce bigger traces to the replay, pulling all of that down all
the way from packet is going to get unreasonable.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>
2021-02-01 18:32:01 +00:00
Eric Anholt 18bfb74292 ci/freedreno: Drop pointless GIT_STRATEGY setting for a630.
It's already in place due to extending from .test.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8727>
2021-02-01 18:32:01 +00:00
Bas Nieuwenhuizen 1eaefe6cfd radv: Do not hash vk_object_base in descriptor set layout.
It contains potentially pointer-y stuff.

Fixes: 178adfa6a8 ("radv: use the base object struct types")
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8809>
2021-02-01 17:03:43 +00:00
Samuel Pitoiset e870796113 radv: prefer CP DMA for GTT buffer copies/clears on dGPUs due to slow PCIe
The CP DMA bandwidth is always better than PCIe, so I think wasting
compute resources is not a good idea. This is only enabled on GFX10+
because untested on older gens and also because RadeonSI does that.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8763>
2021-02-01 12:26:20 +00:00
Samuel Pitoiset f5a02d16a6 radv/winsys: move the initial BO domain to radeon_winsys_bo
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8763>
2021-02-01 12:26:20 +00:00
Michel Dänzer 35f59e14f8 ci: Use GNU time as meson test wrapper
This will hopefully give us more information about why some tests are
intermittently timing out.

Only in build jobs using the x86_build docker image for now, since
those are where we're currently seeing most such timeouts. But may
expand this later if it provides the expected benefits.

v2:
* Add comment about why we test for and use /usr/bin/time explicitly.

Acked-by: Eric Engestrom <eric@engestrom.ch> # v1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8776>
2021-02-01 11:55:56 +00:00
Gert Wollny cf23161040 r600/sfn: Use the constant buffer ID when given
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800>
2021-02-01 10:11:49 +00:00
Gert Wollny d81439463a r600/sfn: Fix dual source blend lowered to FRAG_DATA
This fixes the Unigine benchmarks.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800>
2021-02-01 10:11:49 +00:00
Gert Wollny 576da40a73 r600/sfn: Fix FS inputs when reading from the same position
Don't add another varying in this case.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800>
2021-02-01 10:11:49 +00:00
Gert Wollny 374bc76706 r600/sfn: Add the position input as varying
Like this it will be handled correctly in the shader IO structure

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800>
2021-02-01 10:11:49 +00:00
Gert Wollny fd6c95a1b1 r600/sfn: Set unnormalized flag for z-coordinate when fetching from array
It shouldn't be relewant for fetch, but the TGSI code path does it, so
let's do it here as well.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800>
2021-02-01 10:11:49 +00:00
Gert Wollny 80200c75e0 r600/sfn: Fix use of cnde_int for bcsel
The boolean is an int, so use the int version of the opcode.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8800>
2021-02-01 10:11:48 +00:00
Erik Faye-Lund 56f1eb9de7 docs/features: mark ssbos as done for zink
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8778>
2021-02-01 09:23:08 +00:00
Arcady Goldmints-Orlov e47a9938d3 v3dv: Only lower local arrays of size up to 2 to if-chains
Larger arrays get lowered to scratch access later, as that turns out
to be faster, while the if-chain is actually faster for arrays of
2 elements.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov 8f583df7b6 broadcom/compiler: Enable PER_QUAD TMU access only in uniform control flow
PER_QUAD TMU lookups will partially override the predication mask on TMU
writes. If some but not all lanes in a quad are predicated out, setting
PER_QUAD will force them all to be enabled. This can result in TMU
access to bogus addresses when in nonuniform control flow. Also, since
PER_QUAD is needed to make sure derivatives work with helper
invocations, and derivatives are undefined in nonuniform control flow,
there is no reason to leave it enabled in this case.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov 79bde75131 broadcom/compiler: Emit uniform loops using uniform control flow
Similarly to if statements, uniform loops are now emitted without
predication, using simple branches for breaks and continues. The
uniformity of the loop is determined by running the
nir_divergence_analysis pass.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov 6643bdbd53 broadcom/compiler: Use ANYA for branches in uniform ifs
Using ANYAP instead of ALLAP makes things work correctly in cases
where all lanes are masked out.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
2021-02-01 08:11:48 +00:00
Jason Ekstrand c7fc44f9eb nir/from_ssa: Respect and populate divergence information
Reviewed-by: Arcady Goldmints-Orlov <agoldmints@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov 8fb6cbdcb6 nir: store the results of divergence analysis on loops
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov 019449dad7 nir: handle v3d intrinsics in divergence analysis
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
2021-02-01 08:11:48 +00:00
Arcady Goldmints-Orlov 349e4f3c65 nir: add more intrinsics to divergence analysis
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7726>
2021-02-01 08:11:48 +00:00
Rob Clark 824ae64477 mesa: Remove _mesa_destroy_context()
There was only one caller, an error path in mesa/st.  But this is now
incorrect as we need align_free().  Just remove it.

Fixes: 55e853d823 ("mesa/st: Allocate the gl_context with 16-byte alignment.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8801>
2021-02-01 01:33:02 +00:00
Mauro Rossi 28d902dd62 android: pan/mdg: create nir pass to lower image coord bitsize
Fixes the following building error:

FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: midgard_nir_lower_image_bitsize
>>> referenced by midgard_compile.c:321 (external/mesa/src/panfrost/midgard/midgard_compile.c:321)

Fixes: db725e1d52 ("pan/mdg: create nir pass to lower image coord bitsize")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8802>
2021-02-01 00:52:19 +01:00
Vinson Lee c897f7a722 v3dv: Fix assert.
Fix defect reported by Coverity Scan.

Side effect in assertion (ASSERT_SIDE_EFFECT)
assignment_where_comparison_intended: Assignment job->ez_state =
VC5_EZ_DISABLED has a side effect. This code will work differently in a
non-debug build.

Fixes: cec2ed7c80 ("v3dv: fix disabling Early Z for the whole frame")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8666>
2021-01-31 22:28:53 +00:00
Vinson Lee 70652885e3 lima: Fix typos.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8658>
2021-01-31 11:27:40 -08:00
Marek Olšák e014e3b6be mesa: don't count buffer references for the context that created them
See mtypes.h - it gives you the top level view of how it works, and other
code contains a lot of comments.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8606>
2021-01-30 21:57:58 +00:00
Marek Olšák c679e7debd mesa: pop all textures up to NumCurrentTexUsed, not just MaxTextureUnits
glPush/PopAttrib had 2 defects:
- Only MaxTextureUnits were pushed and popped (which is 8 at most).
- If some texture units had been unused, we would still push/pop them.

This fix changes how many units we push and pop to NumCurrentTexUsed,
which is the maximum texture unit + 1 that was used to by the user.

This commit:
- In glPushAttrib, save NumCurrentTexUsed texture units.
- In glPopAttrib, restore the same number of texture units, and if
  NumCurrentTexUsed has increased since glPushAttrib, bind 0 in the newly
  used units to get them to the state before glPushAttrib.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
2021-01-30 16:25:29 -05:00
Marek Olšák 81e6f6ef0c mesa: don't push/pop default texture attributes redundantly
Since default texture objects are bound in almost all texture units and all
texture targets, we can skip saving and restoring their attributes if we
just do that for default texture objects outside the loop saving all texture
units.

This reduces CPU time spent in glPushAttrib from 2.1% to 1.35% in one
subtest of viewperf13/catia.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
2021-01-30 16:25:29 -05:00
Marek Olšák 5da8352225 mesa: don't save gl_shared_state in glPushAttrib
glPushAttrib only saves values and names. It doesn't save objects.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
2021-01-30 16:25:29 -05:00
Marek Olšák 8706e97ffd mesa: partially skip glPush/PopAttrib for MSAA textures and texture buffers
This is based on the GL 4.6 Compatibility profile spec. Some fields just
don't have to be restored. This decreases CPU overhead.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
2021-01-30 16:25:29 -05:00
Marek Olšák 68030bbf73 mesa: only pop states in glPopAttrib that have been changed since glPushAttrib
PopAttribState records all state changes. glPopAttrib uses it to skip
restoring state groups that haven't been changed.

This eliminates a lot of glPopAttrib overhead.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
2021-01-30 16:25:29 -05:00
Marek Olšák 807c365c5e mesa: optimize out _NEW_ALL in glPopAttrib(GL_ENABLE_BIT)
I reviewed all affected states and this if the minimum attrib mask.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
2021-01-30 16:25:29 -05:00
Marek Olšák cd0148dd38 mesa: fix trivial bugs in glPopAttrib
There were quite a few. Hopefully the comments make it clear.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
2021-01-30 16:25:29 -05:00
Marek Olšák 674d275f59 mesa: for every state change, remember states we changed for glPopAttrib
The idea is to restore only those states in glPopAttrib that have been
changed. This will reduce glPopAttrib overhead a lot.

This is based on the state tables in the OpenGL 4.6 Compatibility Profile
specification and many extension specifications.

This code might superfluously flag GL_TEXTURE_BIT for texture and
sampler functions that don't have effect on states popped by glPopAttrib,
but I don't wanna test my luck and make a mistake. Thus,
if _NEW_TEXTURE_OBJECT if flagged, GL_TEXTURE_BIT is usually flagged too.

This has no effect on glPopAttrib yet. glPopAttrib will use this in a later
commit. This only adds attrib masks into FLUSH_VERTICES based on specs.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
2021-01-30 16:25:29 -05:00
Marek Olšák a1f16b59b3 mesa: flush glBegin/End before changing GL_DEPTH_STENCIL_TEXTURE_MODE
Fixes: 23e81b93bb "mesa: Add core API support for GL_ARB_stencil_texturing (from 4.3)."

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>
2021-01-30 16:25:26 -05:00