Commit Graph

153861 Commits

Author SHA1 Message Date
Jason Ekstrand e4ad1b5b33 panvk: Advertise support for logicOp
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
2022-05-11 14:47:33 +00:00
Jason Ekstrand 25249e8be2 nir/lower_blend: Expand or shrink output variables as needed
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
2022-05-11 14:47:33 +00:00
Jason Ekstrand 7aec8db161 midgard: Handle FB fetch from non-vec4 output variables.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
2022-05-11 14:47:33 +00:00
Jason Ekstrand 1d22465362 nir/builder: Add a nir_resize_vector helper
We're about to use this a couple of places.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
2022-05-11 14:47:33 +00:00
Jason Ekstrand 352e32e5ba nir/builder: Add a nir_trim_vector helper
This pattern pops up a bunch and the semantics of nir_channels() aren't
very convenient much of the time.  Let's add a nir_trim_vector() which
matches nir_pad_vector().

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
2022-05-11 14:47:33 +00:00
Jason Ekstrand 244b654de6 nir/lower_blend: Support SNORM and integer formats for logic ops
This fixes 158 of the dEQP-VK.pipeline.logic_op.* tests, once we turn
the feature on.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
2022-05-11 14:47:33 +00:00
Jason Ekstrand 730d2b7660 nir/lower_blend: Stop passing the whole options object around
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
2022-05-11 14:47:33 +00:00
Jason Ekstrand dcfffdcad1 nir/lower_blend: Be more explicit about deref assumptions
Because we pull the RT from the variable location and use that to look
up formats, we need a constant RT index.  To deal with arrays (possibly
of arrays), we would either need to handle array derefs (we don't today)
or we need to require the variables to be split into one variable per
RT.  Given that we have to lower indirect derefs anyway (to get constant
indices), we may as well require the client to split output variables by
calling nir_lower_io_arrays_to_elements_no_indirect().

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
2022-05-11 14:47:33 +00:00
Jason Ekstrand 885437d1a6 panvk: Call nir_lower_io_arrays_to_elements_no_indirects
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16309>
2022-05-11 14:47:33 +00:00
Martin Roukala (né Peres) ac0a61e17b ci/radv: remove amdgpu.gpu_recovery=0 from the kernel cmdline
This was set as an attempt to detect when the GPU got hung, and let
our hangcheck detect this issue and kill the run. This however has
not been working so well, so let's try without it.

Suggested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16423>
2022-05-11 10:25:06 +00:00
Iago Toral Quiroga c708da6e29 v3dv: expose VK_KHR_spirv_1_4
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16424>
2022-05-11 09:12:27 +00:00
Iago Toral Quiroga e981ed21e3 v3dv: expose VK_KHR_shader_float_controls
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16424>
2022-05-11 09:12:27 +00:00
Danylo Piliaiev 187d3df52c tu: Do not flush ccu in clear/blits during renderpass
For clear/blits ccu flush not only worse for perf, but also messes up
flush_bits when executed in a conditional set of commands.

We already don't flush for 3d blits.

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

Fixes: 487aa807bd
("tu: Rewrite flushing to use barriers")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16352>
2022-05-11 08:07:50 +00:00
Samuel Pitoiset 66888d5121 radv: remove useless check against nir_texop_samples_identical
nir_texop_samples_identical is lowered to
nir_texop_fragment_mask_fetch_amd earlier.

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/16426>
2022-05-11 06:55:21 +00:00
Marek Olšák 98ea2347a0 radeonsi: report more missing/broken texture formats as unsupported on gfx6-9
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16386>
2022-05-11 06:21:11 +00:00
Marek Olšák e4283708f0 radeonsi: report 10_10_10_2 scaled formats as unsupported on gfx6-9 as well
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16386>
2022-05-11 06:21:11 +00:00
Dave Airlie 9775da1196 radv: optimised command buffer reset of vertex bindings.
This takes the buffer ptrs out of the struct, so they can be memset
separately and optimises the memset to be minimal for them.

Removing them from the struct avoids having to loop to clear them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>
2022-05-11 05:19:38 +00:00
Dave Airlie 543d52a7a2 radv: only dirty line stipple when necessary.
Line stipple only cares if things changes to/from line strip.

Reduces overheads seen running pixmark volplosion with zink.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>
2022-05-11 05:19:38 +00:00
Dave Airlie b20bd9e0df radv: cache the slab bo pointer in the pipeline.
Otherwise each emission has to pointer chase across cachelines.

Reduces overhead seen with zink on pixmark volplosion test.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>
2022-05-11 05:19:38 +00:00
Dave Airlie 87f4252a51 zink: don't finish barriers cmd buffer if not used.
finishing has some cpu overhead, which if the cmd buffer isn't
going to be used is pointless. just let it get reset next time.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>
2022-05-11 05:19:38 +00:00
Dave Airlie 57df27be5f zink: avoid extra submits for empty wait cmdbufs.
This just avoids cpu overheads from processing that won't get used.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16393>
2022-05-11 05:19:38 +00:00
Vinson Lee 997dc0a5e8 radeonsi: Move NULL check before dereference.
Fix defect reported by Coverity Scan.

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

Fixes: 2f83dce059 ("radeonsi: don't report R64_*INT as a sampler format because it doesn't work")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16380>
2022-05-11 04:55:35 +00:00
Dave Airlie 14b1ed1ce1 radeonsi: port tess ring calcs to the common helper.
This uses the common helper code to implement the tess ring sizing.

One question is if radeonsi should be using tess_offchip_ring_offset
in some places it's using tess_factor_ring_size?

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16415>
2022-05-11 02:08:08 +00:00
Dave Airlie 17fcbd8742 ac: port radeonsi tess factor calculations to common code.
This was updated in
4e49a05e37 ("radeonsi: increase the tesselation factor ring size")
and
9fecac091f ("radeonsi/gfx11: scattered register deltas")

This will apply this to radv.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16415>
2022-05-11 02:08:08 +00:00
Dave Airlie d4c7ffc550 radv/ac: introduce a new common function for hs calcs.
This ports the radv code to the new ac code.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16415>
2022-05-11 02:08:07 +00:00
Mike Blumenkrantz d79c716331 zink: create images with modifiers any time there is an import handle
there's no way to pass in a plane offset otherwise, so this is necessary
in order to handle yuv imports

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 4eeabb59f5 zink: rebind resources for export as needed
exporting all resources breaks suballocation, so instead just use the
existing heuristics and then forcibly rebind resources as needed
for this functionality

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 4a19ebfafc zink: add a LINEAR drm modifier if rebinding to add dmabuf export
this needs to have some kind of modifier, so be conservative here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 565bf8e45b zink: force memory exports if dmabuf bind is specified
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz c03f6967cc zink: fix conditional for modifier usage
the shared check here was inaccurate; if the resource has dmabuf
export, then use modifiers

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 5513597305 zink: add a bind flag to indicate a resource is exported as a dmabuf
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 8c1d9c7b74 zink: unset pipe_resource::next pointers when creating resource copies
this otherwise walks the chain and destroys all the resources

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 9aab9b4a1b zink: always check for fb rebinds when starting renderpass
ensure the right image is being used

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 17ac8e7604 Revert "zink: export fd info for all 2d images"
This reverts commit fda7371b4cfc5a15f2207f5165f3a8e14442a522.

this breaks suballocation

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz b978761385 zink: create a copy context for the screen on init
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 94d400d5af zink: introduce copy contexts
this is for creating a context which is only used for copying images

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz afa4c402dd zink: break out resource bind-adding into separate function for reuse
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 1c20688dcc zink: add a flag to indicate whether a resource is exportable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:38 +00:00
Mike Blumenkrantz 00591f3a99 zink: outdent some code
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:37 +00:00
Mike Blumenkrantz d474229ed1 zink: remove unused headers/struct members/linkage
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
2022-05-11 01:30:37 +00:00
Michael Skorokhodov fd75be7986 glsl: Fix ir_quadop_vector validation
Some glcts tests have failed due to incorrect processing of `ir_quadop_vector` in
`ir_validation`. e.g:
`GLES31.functional.shaders.builtin_functions.integer.imulextended.int_highp_geometry`

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6461
Fixes: 23cde71b ("glsl: Stop lowering ir_quadop_vector.")

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16420>
2022-05-10 23:53:33 +00:00
Benjamin Cheng 96a240e176 radv: fix memory leak of descriptor set layout
We need to be able to track the descriptor sets explicity to unref the
descriptor sets, otherwise these descriptor sets will not unref the
descriptor set layout it holds.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6222
Fixes: 66f7289d56
("radv: add reference counting for descriptor set layouts")

Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15741>
2022-05-10 23:18:56 +00:00
Mike Blumenkrantz d4dce29faf kopper: remove unused zink include
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16441>
2022-05-10 22:42:19 +00:00
Daniel Schürmann 4875c82d2d radv: call nir_lower_vars_to_ssa later
Totals from 599 (0.44% of 134913) affected shaders: (GFX10.3)
CodeSize: 1243732 -> 1240512 (-0.26%); split: -0.26%, +0.00%
Instrs: 223370 -> 222702 (-0.30%); split: -0.30%, +0.00%
Latency: 901762 -> 885446 (-1.81%); split: -1.81%, +0.00%
InvThroughput: 305546 -> 305536 (-0.00%)
SClause: 12690 -> 12554 (-1.07%); split: -1.13%, +0.06%
Copies: 23779 -> 23778 (-0.00%)
PreSGPRs: 17781 -> 17829 (+0.27%)

Acked-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/5668>
2022-05-10 22:20:54 +00:00
Daniel Schürmann f8ee0efd04 radv: move two NIR passes out of tight optimization loop
nir_remove_dead_variables
nir_opt_shrink_vectors

Acked-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/5668>
2022-05-10 22:20:54 +00:00
Iván Briano 2e46f38902 anv: re-alloc push constants after secondary command buffers
If the secondary command buffer executed used push constants on a
different set of stages than the primary is using, we may end up not
reallocating them for the primary, getting misrender artifacts at best,
or a nice GPU hang at worst.

Fixes the tests from a CTS from the future:
dEQP-VK.dynamic_rendering.random.*

Cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16439>
2022-05-10 21:56:49 +00:00
Adam Jackson 2a47c30ef9 dri: Remove what's left of utils.[ch]
Which is just moving the struct definition for __DRIconfigRec into
dri_util.h.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>
2022-05-10 21:25:57 +00:00
Adam Jackson 5eccb228ba dri: Move dri{Get,Index}ConfigAttrib near their vtable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>
2022-05-10 21:25:57 +00:00
Adam Jackson 66d25f96db dri: Move driC{reate,oncat}Configs near their only caller
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>
2022-05-10 21:25:57 +00:00
Adam Jackson 4873b13aec dri: move driQueryRendererIntegerCommon near its one caller
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16377>
2022-05-10 21:25:57 +00:00