Commit Graph

160894 Commits

Author SHA1 Message Date
Timur Kristóf df3fdbdeb5 aco: Fix build error with std::max on GCC 12
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18969>
2022-10-05 20:22:04 +00:00
Timur Kristóf 3ca8402ec7 ac/nir/ngg: Fix cross-invocation indices and cull outputs.
The layout calculation accidentally thought these would be
stored in variables, but that's not the case.

Fixes: 697ea02202
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/18846>
2022-10-05 19:47:25 +00:00
Brian Paul 458fc9ce81 cso: asst. clean-ups in cso_context.[ch]
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18954>
2022-10-05 19:03:27 +00:00
Brian Paul faf8398893 cso: asst. clean-ups in cso_cache.[ch]
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18954>
2022-10-05 19:03:27 +00:00
Brian Paul eaa93d7177 cso: use util_bitcount
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18954>
2022-10-05 19:03:27 +00:00
Brian Paul 983e06af2b cso: asst. clean-ups in cso_hash.[ch]
Consistent whitespace, move var decls to first use, add some const
qualifiers, etc.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18954>
2022-10-05 19:03:27 +00:00
Iván Briano 406a1854d0 vulkan_hasvk: set READ/WRITE_WITHOUT_FORMAT for buffer views
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18958>
2022-10-05 09:45:57 -07:00
Iván Briano b75fbfdd46 anv: set READ/WRITE_WITHOUT_FORMAT for buffer views
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18958>
2022-10-05 09:45:50 -07:00
Alyssa Rosenzweig 847361ba07 panfrost: Remove load_kernel_input path
Now the state tracker's responsible to lower away for us (and the state tracker
can do it correctly, our implementation is incorrect with a strict reading of
the Gallium contract).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18658>
2022-10-05 16:09:21 +00:00
Alyssa Rosenzweig deb3810f1e agx: Remove load_kernel_input path
Unused and now won't be used.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18658>
2022-10-05 16:09:21 +00:00
Brian Paul 6dcad8a13b lavapipe: zero-init sampler objects
The cso code hashes these as a block of bytes.  This silences some
Valgrind uninitialized memory warnings and possibly avoids creating
some redundant sampler instances.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18953>
2022-10-05 14:55:57 +00:00
Brian Paul 2aac8ef125 lavapipe: remove continue statements in emit_state() to be more consistent
Rejig some dirty state checks to avoid continue and make it consistent
with surrounding code.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18953>
2022-10-05 14:55:57 +00:00
Emma Anholt 77515d722b zink: Map ETC1 to ETC2 to avoid uncompressing in the frontend.
Maybe the frontend should map for us in this case, but it's easy enough
here: ETC2 is an extension to use undefined states from ETC1, and is
backwards compatible.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18957>
2022-10-05 14:35:11 +00:00
Emma Anholt 061914ad83 zink: Enable ASTC texture format translation.
Without this, the frontend would decompress them for us without even the
kindness of a perf debug warning.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18957>
2022-10-05 14:35:11 +00:00
SoroushIMG 44894ba8b1 zink: enable native ETC2 if vk driver supports it
There is a 1-to-1 mapping from pipe to vk formats for ETC2.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18957>
2022-10-05 14:35:11 +00:00
Emma Anholt 270ea2ac7e zink: Skip border color clamping for compressed formats.
You won't have a non-void channel for block formats, because "how many
bits are there in the red channel" doesn't even make sense.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18957>
2022-10-05 14:35:11 +00:00
Emma Anholt da04bbe586 ci/zink: Clear stale xfails for turnip.
The linked MR landed and fixed them.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18957>
2022-10-05 14:35:11 +00:00
Alejandro Tafalla afe4b534b5 freedreno: Fix graphic glitches on a4xx and a5xx
Like on adreno 3xx, hw binning and scissor optimizations don't work correctly
together on a4xx and a5xx GPUs.

Disable binning as a workaround if scissor optimizations are being used.

Fixes: f68c6951b8 8efaae3e19

Signed-off-by: Alejandro Tafalla <atafalla@dnyon.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18925>
2022-10-05 13:04:07 +00:00
Lionel Landwerlin 1d32bcdcb2 iris: better error message with GuC loading failures
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18952>
2022-10-05 12:37:48 +00:00
Jeremy Rand 537176181e llvmpipe: bump LP_MAX_THREADS to 32
On my ppc64le machine with 32 hardware threads, this speeds up OpenArena
(1920x1200) from 7.2 fps to 8.1 fps.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18415>
2022-10-04 22:59:12 +00:00
Yiwei Zhang 0a06db8fb9 ci/venus: enable render server for venus testing
Render server config will soon become a mandatory requirement for venus.

v2: updated DEBIAN_BASE_TAG and KERNEL_ROOTFS_TAG

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reveiwed-by: Ryan Neph <ryanneph@google.com> (v1)
Reveiwed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> (v1)
Reviewed-by: Corentin Noël <corentin.noel@collabora.com> (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18918>
2022-10-04 21:41:48 +00:00
Emma Anholt dadb29cf2e turnip: Don't use the dynamic color write enable during non-dynamic.
We have the correct merged color write enable state as a local var here,
use that instead of the zero cmd->state.color_write_enable.  Fixes
blending in many traces with ANGLE on turnip.  In the process of fixing,
clarify the logic a little bit.

Fixes: 169e03800d ("tu: Implement VK_EXT_color_write_enable")
Fixes: #7328
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18956>
2022-10-04 20:50:51 +00:00
Dave Airlie 6f27bf2504 gallivm: remove legacy pointer_get apis
These are no longer used.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
2022-10-05 06:20:42 +10:00
Dave Airlie 0c86524590 gallivm/sample: use retrieved types to do opaque pointer loads.
This uses the types to do the loads using opaque ptr interfaces.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
2022-10-05 06:20:37 +10:00
Dave Airlie 1a9889ae12 draw/llvmpipe: add way to return pointer types to generic code.
Some of the generic code tries to load from things it has no
types for, mip offsets, row and image strides.

Fix the interfaces to allow returning types for these.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
2022-10-05 06:20:20 +10:00
Dave Airlie 02c675b196 draw/llvmpipe: move texture/sampler/image member load to opaque.
This removes the non-opaque paths from the draw/lp sampling code.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
2022-10-05 06:20:14 +10:00
Dave Airlie 9fe8e5ccf7 gallivm/llvmpipe: add opaque pointers support to sampler
This adds explicit context types wiring through the sampler code

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
2022-10-05 06:20:11 +10:00
Dave Airlie 3d242c0447 llvmpipe/tests: port to new pointer interfaces.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18947>
2022-10-05 06:19:50 +10:00
José Roberto de Souza 0066e60fc4 anv: Split the debug part of anv_queue_exec_locked()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>
2022-10-04 18:35:50 +00:00
José Roberto de Souza bc384e24f0 anv: Use Vulkan types for priority as much as possible
Continuing the work to split i915_drm.h specific code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>
2022-10-04 18:35:50 +00:00
José Roberto de Souza f5a58b8886 anv: Split i915 specific parts of anv_queue_submit_simple_batch()
This will make easier to spot more places where the code can
simplified after the hasvk split.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>
2022-10-04 18:35:50 +00:00
José Roberto de Souza 35ed40f356 anv: Move fetch of i915 physical device parameters
Move everything that depends on i915_drm.h to its own function,
in a future MR will move the parameters that are also needed by
Iris to intel_device_info.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>
2022-10-04 18:35:50 +00:00
José Roberto de Souza a17783b066 intel/dev: Split i915 specific parts of intel_get_device_info_from_fd()
Continuing the work to split i915_drm.h specific code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>
2022-10-04 18:35:50 +00:00
José Roberto de Souza 03b959286e intel: Make engine related functions and types not i915 dependent
There is too much i915_drm.h code spread, this patch start to fix that
by re-organizing engine related code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18942>
2022-10-04 18:35:50 +00:00
Yiwei Zhang 24bc3b7644 docs: move VK_EXT_extended_dynamic_state3 out from 1.3
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18941>
2022-10-04 18:08:11 +00:00
Connor Abbott 68f3c38c80 tu: Implement extendedDynamicState2PatchControlPoints
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18773>
2022-10-04 15:39:43 +00:00
Connor Abbott 1bd3d28050 tu: DS primitive stride does not use patch control points
Previously we would use patch control points if there was no GS, but
it wasn't immediately obvious that this driver param is unused if there
is no GS. Make it output 0 instead, making it clear that we can emit it
even if we don't know the patch control points. This change in the
cmdstream is split out from the next commit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18773>
2022-10-04 15:39:43 +00:00
Connor Abbott 042c135a99 tu: Fix param_stride placement
Even though it's tessellation-related, it's set based on the
tessellation variant which is only known after linking. The param stride
may change due to LTO if fast linking is not used.

Fixes: e9f5de11d4 ("tu: Initial implementation of VK_EXT_graphics_pipeline_library")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18773>
2022-10-04 15:39:43 +00:00
Simon Zeni 998122d9c2 mesa: fix GL_INVALID_OPERATION in glEGLImageTargetTexStorageEXT
Using EGLImages from DMA-BUF as target storage should return
GL_INVALID_OPERATION if the target is not GL_TEXTURE_2D or
GL_TEXTURE_EXTERNAL_OES.

Fixes: 6a3f5c65 ("mesa: simplify st_egl_image binding process for texture storage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18939

Signed-off-by: Simon Zeni <simon@bl4ckb0ne.ca>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18939>
2022-10-04 14:44:57 +00:00
Connor Abbott 66b9c05bb9 ir3: Add missing cat5 encoding to asm parser
We were missing the case where there is a sampler and texture but the
texture offset is encoded in a1.x.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18840>
2022-10-04 14:00:50 +00:00
Connor Abbott dcab399a17 ir3/analyze_ubo_ranges: Account for reserved consts better
It turns out that the ir3_setup_const_state() already includes reserved
consts, so we were accidentally counting it twice. This makes us use
less consts, and if there are enough reserved consts can make it go
negative and wrap around. Fix this while also making sure the previous
bug remains fixed.

Fixes: 8cb1deded6 ("ir3/analyze_ubo_ranges: Account for reserved consts")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18840>
2022-10-04 14:00:50 +00:00
Connor Abbott c58d633dd2 ir3: Move fixup_regfootprint() to ir3_collect_info()
This fixes the case where fixup_regfootprint() adds to the reg footprint
but it isn't accounted for when determining whether we should double
threadsize in ir3_collect_info(). This would produce a hang on a650 and
above where we have a reg footprint of 33 and doubled threadsize.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18840>
2022-10-04 14:00:50 +00:00
Connor Abbott 7d1b8c8ab2 ir3: Delete outputs from fixup_regfootprint()
We weren't considering the number of components, which means that we
would overestimate the output size, which could result in nonsensical
things like a reg footprint of larger than r48.x. In addition, in some
cases we can force double regsize which would go badly if this
miscalculated the reg footprint, although currently this only happens
with compute shaders where there are no outputs. It's not actually
necessary anyway, because any output must come from an input or
something in the shader - this is how RA works. Just delete it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18840>
2022-10-04 14:00:50 +00:00
Alejandro Piñeiro 34a390569d v3dv/pipeline: use a array instead of individual pointer to stages
Before this commit we were using individual pointers to each pipeline
stage struct. We did that instead of an array because we needed to had
a pointer for the binner stages too, and at that time we didn't have a
enum to handle those stages.

Since then we introduced broadcom_shader_stage, and started to use in
a lot of places (and per-stage arrays) so we can now use an array.

The main advantage is being able to handle several cases as
loops. This also adds some consistency to the code (because as
mentioned, in a lot of other places we use an array).

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18943>
2022-10-04 12:01:44 +00:00
Georg Lehmann cc06b7e00d aco: Use s_pack_ll for s_bfe operand on GFX9+.
Foz-DB Navi21:
Totals from 1 (0.00% of 134913) affected shaders:
CodeSize: 340 -> 336 (-1.18%)
Instrs: 77 -> 76 (-1.30%)
Latency: 1065 -> 1063 (-0.19%)
InvThroughput: 4260 -> 4252 (-0.19%)

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18936>
2022-10-04 11:39:13 +00:00
Tapani Pälli 1cf1a94f97 intel: revert preemption disable via VFG changes
This register will not be whitelisted and this change will be
done in kernel instead.

This change reverts commits d5d4604a, ddcd6b38, 27c5b93d.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18897>
2022-10-04 10:38:49 +00:00
Gert Wollny 9ebe893a61 nir_lower_to_source_mods: Don't sneek in an abs modifier from parent
If the abs source modifiers is not supported for the current
instruction because it is an instruction with three sources we
may still see a parent mov that has the `abs` modifier. In this
case we must not propagate that abs modifier from that parent
instructions.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7350

Fixes: cd73b6174b
    nir/lower_to_source_mods: Stop turning add, sat, and neg into mov

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18902>
2022-10-04 08:36:57 +02:00
Dave Airlie 8945375b80 vulkan: update beta and video headers to 1.3.230
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18945>
2022-10-04 11:15:47 +10:00
Dave Airlie fbe7b6f6a2 gallium/tgsi: handle temps/outputs array.
The old code used GetElementType on a pointer, to pick a path,
I cant find a test to hit the second path, so just hardcode it
for now.

Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>
2022-10-03 22:42:07 +00:00
Dave Airlie 4a0394f54a gallivm/tgsi: port tgsi to explicit types.
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18932>
2022-10-03 22:42:07 +00:00