Commit Graph

148464 Commits

Author SHA1 Message Date
Samuel Pitoiset e836174077 aco: do not print prologs disassembly if no disassembler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13376>
2022-01-04 07:50:07 +00:00
Samuel Pitoiset 3ef736c94e aco: fix a dynamic-stack-buffer-overflow when printing instructions
Detected by ASAN.

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/14329>
2022-01-04 08:04:50 +01:00
Dave Airlie ad2902cbbe mapi: generate correct dispatch for EXT_draw_instanced
These APIs can be exposed in GLES2.0 via EXT_draw_instanced,
they were incorrectly being stuck on GLES 3.0 only.

Fixes piglit ext_draw_instanced-drawarrays

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14338>
2022-01-03 21:37:34 +00:00
Pavel Ondračka 96ad4f6437 r300: Remove broken optimization in rc_transform_KILL
The logic was reversed so this was not only not working but it was
also removing random instructions around. The special IF-KILP-ENDIF
case this optimization was targeting is already transformed to
KILL_IF in the TGSI, so just remove this altogether.

This fixes piglit glsl-fs-discard-04
v2: Update the comment as well

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/343
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip.gawin@zoho.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14378>
2022-01-03 20:45:32 +00:00
Thomas H.P. Andersen 496947d0d4 ci: debian-clang: drop -Wno-error=absolute-value
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14302>
2022-01-03 20:20:37 +00:00
Thomas H.P. Andersen c32c9014f5 broadcom/compiler: fix compile warning -Wabsolute-value
fixes a compile warning with clang

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14302>
2022-01-03 20:20:37 +00:00
Thomas H.P. Andersen 574c4466f8 xa: fix compile warning for -Wabsolute-value
fixes a compile warning with clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14302>
2022-01-03 20:20:37 +00:00
Lionel Landwerlin 8092d58e2e util/u_trace: protect against reentrant calls
With the Iris driver, the first tracepoint triggers the tracepoint for
"begin of command buffer" which leads to 2 tracepoints using the same
idx.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14254>
2022-01-03 18:15:08 +00:00
Marek Olšák 13bdd8da5e driconf: enable glthread for Minecraft-FTB, Stellaris, Battletech
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14368>
2022-01-03 17:45:59 +00:00
M Henning d28677cfd9 nouveau/nir: Lower 64-bit phis
Fixes arb_gpu_shader_fp64-fs-non-uniform-control-flow-ubo
on kepler with NV50_PROG_USE_NIR=1

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14343>
2022-01-03 17:35:05 +00:00
Marek Olšák ce72395008 radeonsi: add a debug option that disables DCC for all exported buffers
requested internally

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14283>
2022-01-03 17:19:56 +00:00
Thomas H.P. Andersen 4cc0548046 zink: malloc/sizeof mismatch
buffer_infos is VkBufferView* but malloc is using the
size of VkImageView. The size is the same but this
fixes a warning

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14335>
2022-01-03 17:00:55 +00:00
Thomas H.P. Andersen 495b2c537b ci: debian-clang: -Wno-error for sometimes-uninitialized
The last of this kind of warning is gone for CPP

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14296>
2022-01-03 14:34:22 +00:00
Thomas H.P. Andersen 9e2f1f05c6 r600/sb: silence a sometimes-uninitialized warning
Fixes a warning from clang

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14296>
2022-01-03 14:34:22 +00:00
Mike Blumenkrantz 2a4c56e4e3 mesa/vbo: be more comprehensive for degenerate primitive conversion in dlists
these shouldn't result in any sort of draw, and passing the unsupported primtype
to the driver is invalid

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13845>
2022-01-03 13:59:48 +00:00
Alyssa Rosenzweig 29d319c767 pan/bi: Fix load_const of 1-bit booleans
For historical reasons, we ingest 1-bit booleans in NIR but expand them
to 16/32-bit booleans in the backend IR. We need to handle this case
when loading boolean constants, extending from 1-bit to 16/32-bit as
required. This issue is masked by effective constant folding for
booleans, but is visible in a shader from Firefox WebRender.

Fixes: 646e03c451 ("pan/bi: Temporarily switch back to 0/~0 bools")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reported-by: Icecream95
Closes: #5797
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14371>
2022-01-02 20:26:15 +00:00
Uday Kiran Pichika 78ef08a061 anv: enable adaptive sync for ANV
Signed-off-by: Uday Kiran Pichika <pichika.uday.kiran@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6420>
2022-01-02 18:53:29 +00:00
Uday Kiran Pichika 89b54626fe iris: enable adaptive sync for IRIS
Signed-off-by: Uday Kiran Pichika <pichika.uday.kiran@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6420>
2022-01-02 18:53:29 +00:00
Alyssa Rosenzweig 795638767d pan/bi: Use fused dual source blending
Instead of emitting a pile of moves to fixed registers at codegen time
and hoping everything works out, add a second staging source to the
BLEND instruction in the intermediate representation containing the dual
source colour, and modify register allocation appropriately. This better
models the operation of blending render target #0 with two sources.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Alyssa Rosenzweig af3863c658 pan/bi: Allow an extra staging source
Useful for dual source blending.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Alyssa Rosenzweig 251b1c1753 pan/bi: Use is_staging_src helper
This will allow us to have a separate set of staging sources, which will
be useful for dual-source blending.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Alyssa Rosenzweig c4da1b84d3 panfrost: Remove pan_nir_reorder_writeout
Now that dual source stores are fused, there's no ordering hazard so we
can remove this tricky code.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Alyssa Rosenzweig d3fb341b4a panfrost: Combine dual source blends
Reuse the store_combined_output_pan infrastructure for dual source
blending as well. This simplifies ordering.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Alyssa Rosenzweig 24ea7cbb06 nir: Extend store_combined_output_pan
Extend store_combined_output_pan to take a dual source blend input in
addition to colour, depth, and stencil inputs. Use the last source for
this, and represent the type with the DEST_TYPE index. This is a hack
but there is no SRC2_TYPE and NIR doesn't seem to mind as long as we
know what we mean. This allows the backend to emit a combined "blend
render target #0" instruction taking two sources.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Alyssa Rosenzweig e42133aa2f panfrost: Simplify blend lowering pass
Combine depth/stencil writeout redundancy. This simplifies the code and
will allow us to add dual source blend handling without duplicating even
more code.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Alyssa Rosenzweig 5c168f09eb nir: Eliminate store_combined_output_pan BASE
It's meaningless for this intrinsic and is just adding noise to the
lowering pass.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Alyssa Rosenzweig b3d7272753 pan/mdg: Don't read base for combined stores
`base` is meaningless for combined stores, so don't read it. This allows
us to remove the base index from the intrinsic and simplify the lowering
code generating the combined store intrinsic.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Alyssa Rosenzweig 996645e479 pan/bi: Don't read base for combined stores
`base` is meaningless for combined stores, so don't read it. This allows
us to remove the base index from the intrinsic and simplify the lowering
code generating the combined store intrinsic.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13714>
2022-01-02 01:12:05 +00:00
Tatsuyuki Ishi 31d839aacc aco: lower masked swizzle to DPP8
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13971>
2021-12-31 20:56:39 +00:00
Tatsuyuki Ishi da0412e55b aco: support DPP8
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13971>
2021-12-31 20:56:39 +00:00
Jesse Natalie 5c3dfb4ef5 gallium/aux: Move index offsetting from prim restart to primconvert
Fixes: b34fed64 ("u_prim_restart: Fix index scanning with start offset")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5799
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14346>
2021-12-31 17:29:46 +00:00
Bas Nieuwenhuizen 46c59e8fd6 radv: Remove dependencies on vk_common entrypoints.
Fixes: 91fe0b5629 ("radv: Delete lots of sync code.")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14366>
2021-12-31 17:49:10 +01:00
Bas Nieuwenhuizen 8c4c63a6ed radv: Rename submit2->submit.
Cleanup after the big switcheroo.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:19 +00:00
Bas Nieuwenhuizen 84ec547f69 radv: Remove syncobj reset mechanism.
Now done with the vulkan runtime.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:19 +00:00
Bas Nieuwenhuizen 91fe0b5629 radv: Delete lots of sync code.
This make things all fall back to the common synchronization functions
which will switch things to the new submission path and to use
vk_fence and vk_semaphore.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

radv: Use common AcquireNextImage2KHR.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

radv: Use common functions for Metro Exodus layer.

Needs to be squashed with the big "switch the world" deletion patch
but kept it separate for review.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:19 +00:00
Bas Nieuwenhuizen 967fc415fc radv: Add new submission path for use by the common sync framework.
Basically just a copy of radv's internal deferred submission handler.

This uses the new winsys submit2 to later be able to move the sem_info
to the winsys.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:19 +00:00
Bas Nieuwenhuizen 93cde57f7a radv: Add new cs_submit2 winsys call.
A bit more runtime dependence so we can remove all the syncobj stuff
in radv itself.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:19 +00:00
Bas Nieuwenhuizen 9d75f23350 radv: Use vk_command_buffer for preambles.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:19 +00:00
Bas Nieuwenhuizen 31da5c41b6 radv: Set horizontal sync types.
We basically use 2 types for amdgpu:

1) syncobj. This supports both binary & timeline and autodetects
  all the features.
2) emulated timelines if (1) doesn't detect timeline syncobj support.

Note that one has to put these in order of preference so that the
common CreateFence/CreateSemaphore functions decide on the right
type.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:19 +00:00
Bas Nieuwenhuizen 1965872b41 radv: Add function to allow WSI signalling fences/semaphores.
Added but not enabled yet. Will enable in the big switchover.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:18 +00:00
Bas Nieuwenhuizen 3055d2f9df radv: Initialize vk device drm fd.
For common sync.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:18 +00:00
Bas Nieuwenhuizen 101a366e57 meson: Bump libdrm_amdgpu version req to 2.4.109.
For getting the fd from the device.

This uses the new function introduced with libdrm 2.4.109. This has
already been updated in CI and is already required for mesa common
bits so requiring it for libdrm_amdgpu is no big deal.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:18 +00:00
Bas Nieuwenhuizen 1a84dd6358 radv: Use vulkan runtime for device lost.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:18 +00:00
Bas Nieuwenhuizen 085f99b729 radv: Use dispatch table for wsi_display.c
Pretty sure this could be moved into WSI.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:18 +00:00
Bas Nieuwenhuizen 40558dbe91 radv: Use dispatch table for QueueWaitIdle in the SQTT layer.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:18 +00:00
Bas Nieuwenhuizen 7a84314c12 vulkan/runtime: Add sparse bind support.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:18 +00:00
Bas Nieuwenhuizen 73cdc302ab vulkan/runtime: Refactor queue submit to take an argument struct.
For merging with the sparse binding structs.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13974>
2021-12-31 15:14:18 +00:00
Daniel Schürmann 16a527deef aco: don't split VOP3P definitions
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13576>
2021-12-31 14:52:14 +00:00
Daniel Schürmann 7e02787a54 aco: use p_create_vector(v2b,v2b) in get_alu_src_vop3p()
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13576>
2021-12-31 14:52:14 +00:00
Daniel Schürmann e56d8b0b2e aco: use explicit zero-padding for 64bit image loads in expand_vector()
Previously, this only worked because of regClass mismatches
in the allocated vector.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13576>
2021-12-31 14:52:14 +00:00