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
Adam Jackson
6c546ece69
dri: Move driCopySubBufferExtension into drisw
...
drisw is the only consumer so rename things to make it a bit more
obvious.
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
abb0ea31ca
dri: Inline dri2InvalidateDrawable into 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
Charmaine Lee
742a873209
svga/nir: enable lower double option
...
There is no translation support for dfloor, mod, and pow
in svga_tgsi_vgpu10, just enable the lowering passes in the
nir compile option.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16412 >
2022-05-10 21:17:01 +00:00
Charmaine Lee
6253a23eff
svga/tgsi: add translation for DTRUNC
...
DTRUNC is not lowered in glsl-nir-tgsi path. Add the translation
in svga_tgsi_vgpu10().
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16412 >
2022-05-10 21:17:01 +00:00
Charmaine Lee
e73443b7a5
svga: enable PIPE_CAP_TGSI_TEXCOORD for vgpu10 and up
...
Revise commit 0d456315f9 to enable PIPE_CAP_TGSI_TEXCOORD for
vgpu10 and up only.
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16434 >
2022-05-10 21:09:08 +00:00
Mike Blumenkrantz
705af4f95a
zink: ci updates
...
I don't know how !16167 made this pass, but no driver seems to be able to
pass this test, so ignore
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
8b8b580e42
docs: EXT_robustness2 for lavapipe
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
5167750d5b
lavapipe: ci updates
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
0cebb87025
lavapipe: set robustBufferAccess2 and robustImageAccess2
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
f5caaf2d75
gallivm: fix oob txf swizzling
...
this wasn't taking into account the format swizzle, returning broken
alpha values in most cases
Fixes: 0b6554ba6f ("gallivm,llvmpipe: handle TXF (texelFetch) instruction, including offsets")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Erik Faye-Lund
8c8d08a8b8
lavapipe: add support for null-descriptors from EXT_robustness2
...
Mike says this should be enough for full support, so let's see ;)
Nope, no robust image or buffer access implemented yet.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
6a219f318a
llvmpipe: always set ssbo data pointers for draw
...
skipping these would lead to reading the previously-set data if
a null buffer was set after a valid buffer
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
f1d1371e51
gallivm/draw: fix oob ubo reads
...
the first case in gallivm did no checking, so this was always going to be
broken, so instead just copy the now-correct ssbo logic
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
a51e83b74e
st/draw_feedback: set constant buffer stride
...
these shaders all do float-based reads, so using vec4 for robustness
checks breaks gallivm
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
49df9eeb9d
lavapipe: fix CmdPushDescriptorSetWithTemplateKHR with refcounting
...
this is a cmdbuf function, which means it gets enqueued, which means
the template can't be destroyed until the cmdbuf has finished using it
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
aa98a90265
gallivm: fix ssbo oob reads
...
this was checking (offset < size) when really it needs to be
(offset < size && extent < size && offset >= 0)
Fixes: 591899eedd ("gallivm/nir: Add a short circuit uniform-offset mode for load_ssbo/load_shared.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:09 +00:00
Mike Blumenkrantz
e339f65520
lavapipe: handle null samplerviews
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:08 +00:00
Erik Faye-Lund
8eae343401
lavapipe: tolerate NULL sampler-buffer view descriptors
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:08 +00:00
Erik Faye-Lund
427cc8d55e
lavapipe: tolerate NULL image-buffer view descriptors
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:08 +00:00
Erik Faye-Lund
aabf614f9b
lavapipe: tolerate NULL image view descriptors
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:08 +00:00
Erik Faye-Lund
bca9020b75
lavapipe: tolerate NULL UBO and SSBO descriptors
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16137 >
2022-05-10 20:30:08 +00:00
Georg Lehmann
60c9a45562
nir/opt_algebraic: Simple xor/ishr optimizations.
...
The first pattern here removes the xor-swap pattern.
Foz-DB GFX10_3:
Totals from 305 (0.23% of 134913) affected shaders:
CodeSize: 1589040 -> 1585164 (-0.24%)
Instrs: 284344 -> 283375 (-0.34%)
Latency: 4205148 -> 4198472 (-0.16%); split: -0.16%, +0.00%
InvThroughput: 708745 -> 708739 (-0.00%)
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16411 >
2022-05-10 19:29:31 +00:00
Georg Lehmann
66e917fff6
nir/opt_algebraic: Fix mask in shift by constant combining.
...
The comment above is correct, but the code to calculate the mask was broken.
No Foz-db changes outside of noise.
Fixes: 0e6581b87d ("nir/algebraic: Reassociate shift-by-constant of shift-by-constant")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15990 >
2022-05-10 18:47:21 +00:00
Timur Kristóf
81ad8c4979
radv/amdgpu: Use scheduled dependency for submitting to multiple queues.
...
This code path will be used on kernels that don't have the
"gang submit" feature in amdgpu yet.
It does each submission separately, and uses scheduled dependencies
to connect them.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16361 >
2022-05-10 18:20:24 +00:00
Timur Kristóf
03b3344a7c
radv/amdgpu: Pass correct struct type instead of repeating the cast.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16361 >
2022-05-10 18:20:24 +00:00
Timur Kristóf
da2ab1d8a2
radv/amdgpu: Pass new queue submit info structure to internal function.
...
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16361 >
2022-05-10 18:20:24 +00:00