Commit Graph

154678 Commits

Author SHA1 Message Date
Emma Anholt 7ae206d76e panfrost: always print the bad ALU op if we're failing to translate.
CI failure could have told me what needed fixing, but no...

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16437>
2022-06-01 10:56:35 +00:00
Emma Anholt 7472bb4bad glsl,nir: Move i/umulExtended lowering to NIR.
NIR already has the necessary lowering, and the GLSL lowering violates
GLSL IR validation rules.  Once quadop lowering was turned off, the IR
validation at the end of the compile path on DEBUG builds caught the
problem.

In order to move the lowering to NIR, though, we need to make sure that
drivers supporting these functions actually have the lowering flag set.

xfails added for t860, where apparently this tickles a variety of existing
64-bit bugs in the backend.

Fixes: #6461
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16437>
2022-06-01 10:56:35 +00:00
Emma Anholt 6f0db3778f mesa/st: Only scalarize for doubles lowering if we're lowering doubles.
lower_int64 doesn't need it, and the scalarizing ended up tickling some
bug in virgl once I started using lower_int64.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16437>
2022-06-01 10:56:35 +00:00
Sagar Ghuge 7e098db1ae anv: Disable storage image compression for possible atomic ops
It looks like atomics are slow on compressed surfaces so when enabling
compression for storage images that can be possibly used for atomic
operation hinders performance. Lets just disable compression in this
scenario.

v2: Reword comment (Ken)
    Allow mutable with 16/32/64 bits (Ken)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14712>
2022-06-01 10:05:19 +00:00
Kenneth Graunke f052e00a58 isl: Add an isl_format_supports_typed_atomics() helper.
v2: Add a fields in isl_format with per gen support (Lionel)

v3: Fixup R32_FLOAT from 80 to 90
    Fixup R32_[SU]INT from 80 to 70 (Ken)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14712>
2022-06-01 10:05:19 +00:00
Daniel Schürmann 8e41c66639 aco: fix spilling of phis without temp operands
These were spilled unconditionally.

Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16708>
2022-06-01 09:11:03 +00:00
Erik Faye-Lund 61a5034950 editorconfig: remove pl-rule
Fixes: 721b880e4c ("script: drop get_reviewer.pl")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16786>
2022-06-01 09:08:13 +00:00
Erik Faye-Lund 799bf3d686 editorconfig: remove m4-rule
Fixes: 95aefc94a9 ("Delete autotools")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16786>
2022-06-01 09:08:13 +00:00
Erik Faye-Lund 12aa3b82dc editorconfig: remove html-rule
Fixes: 44a4e34d52 ("docs: remove doxygen support")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16786>
2022-06-01 09:08:13 +00:00
Erik Faye-Lund 7a088d3583 editorconfig: remove scons-ism
Fixes: 6e6cd7d93c ("scons: Remove.")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16786>
2022-06-01 09:08:13 +00:00
Erik Faye-Lund 8901df12ab dzn: add debug option to redirect stdout/stderr
For applications that doesn't have a terminal, it's useful to get output
like nir_log etc output somewhere.

This outputs these to stderr.txt and stdout.txt in the current user's
home directory, typically in C:\Users\my-user\.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16640>
2022-06-01 08:54:22 +00:00
Erik Faye-Lund 9f3a5b4313 dzn: add a debug-flag to wait for the debugger
It's geneunely useful to wait for the debugger to attach in some cases.
So let's add a debug-flag and staill untik the debugger has attached.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16640>
2022-06-01 08:54:21 +00:00
Erik Faye-Lund 19044cf1de tests/graw: rename shaders from .sh to .txt
The vertex and fragment shaders are named foo.sh, while the geometry
shaders are named foo.txt. Since .sh can easily be confused with shell
scripts, let's rename the vertex and fragment shaders to .txt to match
the geometry shaders.

These tests aren't hooked up to run automatically, so there's no need to
update references to the file names.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16791>
2022-06-01 08:23:46 +00:00
Samuel Pitoiset b968b99c45 radv: reduce radv_discard_rectangle_info::count to 8-bit
DiscardRectangleCount must be less than or equal to
maxDiscardRectangles which is limited to 4.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16778>
2022-06-01 07:59:27 +00:00
Samuel Pitoiset b62f1cdee8 radv: reduce radv_rasterization_info::polygon_mode to 8-bit
It's large enough.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16778>
2022-06-01 07:59:27 +00:00
Samuel Pitoiset 38b6f2e0ce radv: reduce radv_input_assembly_info::primitive_topology to 8-bit
It's large enough.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16778>
2022-06-01 07:59:27 +00:00
Samuel Pitoiset 2f176f86c2 radv: reduce radv_tessellation_info::patch_control_points to 8-bit
The value must be less than or equal to maxTessellationPatchSize which
is limited to 32 with RADV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16778>
2022-06-01 07:59:27 +00:00
Samuel Pitoiset c869a5d550 radv: ignore DYNAMIC_STENCIL_OP if stencil test isn't enabled
Like compare/write masks and reference.

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/16783>
2022-06-01 07:34:28 +00:00
Iago Toral Quiroga 18985e8030 v3dv: use the global RCL EZ disable if we don't have any EZ draws in the job
Until now we would only disable EZ globally if we had a depth or stencil
load operation or if we had no draw calls at all, but even if we have draw
calls if all of them disable EZ we should also us the global disable.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16794>
2022-06-01 08:11:04 +02:00
Iago Toral Quiroga 0f65838933 v3dv: don't be too aggressive disabling early Z
When we have a draw call that is incompatible with EZ we should only
disable EZ for the remaining of the job in the case that both of the
following conditions are met:

1. The cause for the incompatibility is an incompatible depth test
   direction.

2. The pipeline does Z writes.

Otherwise it is enough to disable EZ temporarily only for draw calls
with the incompatible pipeline.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16794>
2022-06-01 08:10:57 +02:00
Martin Roukala (né Peres) 2f7f4060ee radv/ci: update the list of flakes
This commit has been created by aggregating all the flakes found in the
last 2 weeks, excluding the ones seen once.

v2 (Martin Roukala):
 - stop trying to hardcode all the flakes, use a wildcard

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16777>
2022-06-01 05:26:12 +00:00
Lionel Landwerlin 5078b4fff1 nir/divergence: handle load_ray_num_dss_rt_stacks_intel
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16797>
2022-06-01 04:58:50 +00:00
Lionel Landwerlin d3c1b0ac28 nir/divergence: handle load_scratch_base_ptr
v2: divergent (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16797>
2022-06-01 04:58:50 +00:00
Vinson Lee 6dfaedd607 d3d12: Remove unnecessary NULL check.
Fix defect reported by Coverity Scan.

Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking pD3D12VideoBuffer suggests that it may
be null, but it has already been dereferenced on all paths leading to
the check.

Fixes: d8206f6286 ("d3d12: Add video decode implementation of pipe_video_codec")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16714>
2022-06-01 04:46:27 +00:00
Connor Abbott 2e9c53549b tu: Expose VK_KHR_synchronization2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16374>
2022-06-01 04:06:46 +00:00
Connor Abbott 59259a0167 tu: Convert to sync2 entrypoints
Use the common Vulkan fallbacks to implement the now-deprecated original
entrypoints.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16374>
2022-06-01 04:06:46 +00:00
Timothy Arceri abe4536c51 ci: uprev piglit 2022-05-31
Also document additional piglit failures and passes.

Multiple changes, mostly notable:
  - few new tests
  - fixed test for upcoming mesa MR

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16785>
2022-06-01 03:14:29 +00:00
Mike Blumenkrantz d67a3ecc9a st/texture: allow compute blits for (some) non-finalized textures
this yields sizable perf improvements in some cases

KHR-GL46.copy_image.functional timing (zink+anv-icl):

before
MESA_LOADER_DRIVER_OVERRIDE=zink ./glcts -n   74.77s user 76.44s system 33% cpu 7:32.38 total

after
MESA_LOADER_DRIVER_OVERRIDE=zink ./glcts -n   69.95s user 68.84s system 33% cpu 6:51.54 total

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16545>
2022-06-01 02:50:32 +00:00
Mike Blumenkrantz debb016d96 st/texture: use base teximage for compute blits
this matches behavior of st_texture_image_map

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16545>
2022-06-01 02:50:32 +00:00
Mike Blumenkrantz 9f7029169b zink: make swapchain kill message more descriptive
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16776>
2022-06-01 02:34:59 +00:00
Mike Blumenkrantz 964a651e6f zink: add a #define for descriptor compaction
make those 2s a little less random

fixes #6556

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16755>
2022-06-01 02:02:31 +00:00
Mike Blumenkrantz 517894e819 zink: flag all cached descriptors as needing update on program change
programs have different usages of descriptors, so forcing a recalc on program
change ensures that the right hash values are always set, especially for compact
sets where there's more descriptors going into each hash value

this can (ideally) be optimized later to check for matching interfaces between old
program and new program to avoid recalc if both programs have identical descriptor
usage for a given set

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16755>
2022-06-01 02:02:31 +00:00
Mike Blumenkrantz 9d34cab4a8 zink: fix change flagging for compact descriptor cache
using pool existence alone is broken since the pools are compacted,
so instead flag based on whether usage exists

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16755>
2022-06-01 02:02:31 +00:00
Mike Blumenkrantz ddcd9c730c zink: store the real (non-compact) binding usage for programs
this is useful for quickly determining whether a program has a certain
type of descriptor usage

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16755>
2022-06-01 02:02:31 +00:00
Mike Blumenkrantz 41fce7ae57 zink: drop requirement for 6 descriptorsets to use bindless
compact mode takes care of this

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16755>
2022-06-01 02:02:31 +00:00
Mike Blumenkrantz 3304e5b5fb zink: only infer modifiers if winsys handle has a stride
if no stride is passed, the image creation will fail, so avoid this case

fixes:
spec@ext_external_objects@vk-image-overwrite

Fixes: d79c716331 ("zink: create images with modifiers any time there is an import handle")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16722>
2022-06-01 01:48:26 +00:00
Jason Ekstrand 2a22885a45 st,nir: Use nir_shader::xfb_info in nir_lower_io_passes
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand 16b0719441 glsl/nir: Stash the xfb_info in the nir_shader when linking XFB
This pass is used for shaders coming in from SPIR-V.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand 36d8a2f1d7 glsl/nir: Stop leaking varyings_info
Fixes: 34b3b92bbe ("nir/xfb: move varyings info out of nir_xfb_info")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand 7c5dc0b11a glsl/nir: Populate nir_shader::xfb_info after linking varyings
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand 64cc35d2ac nir: Drop nir_shader_get_xfb_info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand 7003ff2e3a radv: Use nir_gather_xfb_info
Instead of gathering XFB info over and over again every time we even
want to know if the shader uses XFB, gather it once when we compile the
shader and refer to the copy in the NIR.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand c8e191e369 turnip: Use nir_gather_xfb_info
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand 0eab41559f lavapipe: Use nir_shader_gather_xfb_info
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand e5ff2c2242 anv: Use nir_shader_gather_xfb_info
Now that the resulting xfb_info is stashed on the shader, we can put
this with all the other NIR stuff and only fetch it out at the last
minute when we upload the kernel.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand 23b55dcff4 nir: Add a nir_xfb_info to nir_shader
We want to be able to carry this along with the shader instead of always
having to re-generate it from scratch.  A new nir_gather_xfb_info()
helper is also added which, instead of returning it, adds it to the
shader.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jason Ekstrand 3e04432b3a nir: Rename nir_gather_xfb_info to nir_shader_get_xfb_info
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16750>
2022-05-31 23:09:30 +00:00
Jesse Natalie f812cc0fe6 nir: Consider PNTC to be a varying
Fixes: 3528dcdf ("nir: add nir_io_semantics::no_varying, no_sysval_output, and helpers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6091
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16761>
2022-05-31 20:51:22 +00:00
Mike Blumenkrantz 1c019ee1ba st/pbo_compute: fix z coords for compute pbos
without manually taking the value from the global_id vec, this will
end up being offset.y again, which breaks z-indexing

Fixes: e7b9561959 ("gallium: implement compute pbo download")

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16728>
2022-05-31 20:05:49 +00:00
Mike Blumenkrantz 15f37d8d6f st/pbo_compute: make compute download conditional in shader slightly more readable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16728>
2022-05-31 20:05:49 +00:00