Corentin Noël
2e3cf3a6a6
mesa: Make sure to fallback to handling the original choose texture format
...
It is possible for st_ChooseTextureFormat to return MESA_FORMAT_NONE when
samples is forced to 2. Always allow to fallback to the original case.
Fixes: 89c94502b6
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6441
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16432 >
2022-05-11 19:55:34 +00:00
Dave Airlie
24176cae55
aco: drop unused radv include
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Dave Airlie
c44d5d61ce
aco: remove radv vs prolog key from aco internals.
...
This creates an aco specific key, and converts radv to it.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Dave Airlie
04c07a2413
aco/radv: convert to aco shader info at the radv level.
...
This removes the radv shader info type from aco completely.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Dave Airlie
199edce84d
aco/info: add some more fields.
...
These fields are also used in aco.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Dave Airlie
8cfd8420ab
aco: convert vs and so info over to aco structs.
...
This renames the vs to vp (vertex pipeline) on the way past.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Dave Airlie
3dba3458e9
aco: remove radv specific streamout info
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Dave Airlie
9bd89af1bc
aco/info: reduce the gs ring info to what is needed.
...
Only one member was being used.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Dave Airlie
87df607ff5
aco: move to a minimal aco shader info struct.
...
This should be kept to only things aco uses, and expanded when
radeonsi support is added. Things should be removed if lowered in NIR.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Dave Airlie
a2701bfdb8
aco: move info pointer to a copy.
...
This is just setup to move this to a different struct later.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16342 >
2022-05-11 19:07:11 +00:00
Georg Lehmann
29fbc88d6b
radv: Don't retile read-only images.
...
Avoid unnessecary work on FOREIGN queue release barriers. If we can't modify
the image there can't be a situation where we need to update the presentable
dcc data.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16371 >
2022-05-11 18:43:11 +00:00
Danylo Piliaiev
6bf4ae002a
pps: Open writable renderer node in DrmDevice::create
...
DrmDevice::create_all correctly opened the node with O_RDWR, while
DrmDevice::create was not, causing failure to create writable buffer.
Fixes pps-config on Freedreno.
Fixes: 1cc72b2aef
("pps: Gfx-pps v0.3.0")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16406 >
2022-05-11 15:41:28 +00:00
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
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