platform/upstream/mesa.git
3 years agoaco: Introduce a new, post-RA optimizer.
Timur Kristóf [Tue, 24 Nov 2020 10:39:28 +0000 (11:39 +0100)]
aco: Introduce a new, post-RA optimizer.

This commit adds the skeleton of a new ACO post-RA optimizer,
which is intended to be a simple pass called after RA, and
is meant to do code changes which can only be done
after RA.

It is currently empty, the actual optimizations will be added
in their own commits. It only has a DCE pass, which deletes
some dead code generated by the spiller.

Fossil DB results on Sienna Cichlid:

Totals from 375 (0.25% of 149839) affected shaders:
CodeSize: 2933056 -> 2907192 (-0.88%)
Instrs: 534154 -> 530706 (-0.65%)
Latency: 12088064 -> 12084907 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 4433454 -> 4432421 (-0.02%); split: -0.02%, +0.00%
Copies: 81649 -> 78203 (-4.22%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>

3 years agoaco: New writeout overloads for the test framework.
Timur Kristóf [Fri, 4 Dec 2020 15:18:44 +0000 (16:18 +0100)]
aco: New writeout overloads for the test framework.

These will be used by future tests.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>

3 years agoaco: Add Operand(Temp, PhysReg) constructor.
Timur Kristóf [Fri, 4 Dec 2020 15:18:18 +0000 (16:18 +0100)]
aco: Add Operand(Temp, PhysReg) constructor.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>

3 years agoaco: Don't DCE instructions that write non-temps, eg. exec.
Timur Kristóf [Wed, 25 Nov 2020 18:53:51 +0000 (19:53 +0100)]
aco: Don't DCE instructions that write non-temps, eg. exec.

No Fossil DB changes.
This commit makes DCE usable after RA.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7779>

3 years agoRevert "ci: Configure DUTs for max performance"
Emma Anholt [Thu, 27 May 2021 03:40:59 +0000 (20:40 -0700)]
Revert "ci: Configure DUTs for max performance"

This reverts commit eef5409df4c3f1192687eaa6157875e4650c1206.

I suspect this has caused a lot of the CI instability today -- some flakes
were already added, but the a630-traces job is still flaking.  Revert
until a fix makes it stable.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11024>

3 years agoradv: fix generating hang reports if mutable descriptors are used
Samuel Pitoiset [Thu, 27 May 2021 08:21:23 +0000 (10:21 +0200)]
radv: fix generating hang reports if mutable descriptors are used

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/11031>

3 years agov3dv: remove unused v3dv_zs_buffer_from_vk_format
Alejandro Piñeiro [Thu, 27 May 2021 19:54:21 +0000 (21:54 +0200)]
v3dv: remove unused v3dv_zs_buffer_from_vk_format

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11050>

3 years agomesa: fix error set for glCompressedTexSubImage calls
Tapani Pälli [Mon, 10 May 2021 07:37:58 +0000 (10:37 +0300)]
mesa: fix error set for glCompressedTexSubImage calls

Desktop and ES expect a different error code here when dealing with
generic compressed format tokens. This fixes failures with upcoming
new tests for compressed texture related API calls.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11009>

3 years agomesa/st: Don't assert !unify_interfaces in the passthrough edge flags case
Ian Romanick [Wed, 26 May 2021 18:14:16 +0000 (11:14 -0700)]
mesa/st: Don't assert !unify_interfaces in the passthrough edge flags case

Technically, this is correct, and I think it's the right long-term
solution.  However, Iris has code that undoes the damage caused by
nir_lower_passthrough_edgeflags (see iris_fix_edge_flags in
iris_program.c), so it should be safe to do the lowering here.

I'm not marking this as closing mesa#4838 because I think we should move
the Iris code up to here, make a different version of the NIR pass, or
something different... to properly fix this problem.  In the mean time,
this gets a bunch of tests to stop crashing. :)

Fixes: a76ec17f12c ("mesa/st: Fix iris regression with clip distances.")
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11013>

3 years agoturnip: Make sure that SNORM blits don't clamp ambiguous -1.0 values.
Emma Anholt [Thu, 20 May 2021 16:45:20 +0000 (09:45 -0700)]
turnip: Make sure that SNORM blits don't clamp ambiguous -1.0 values.

The CTS expects that some paths transfer SNORM data exactly, but the HW
will clamp 0x80 values to 0x81 in the process.  We can treat snorm as
unorm, though, and get working compression without the clamping happening.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10735>

3 years agoturnip: Reorganize copy_format()'s switch statement.
Emma Anholt [Thu, 20 May 2021 19:16:05 +0000 (12:16 -0700)]
turnip: Reorganize copy_format()'s switch statement.

Now that we need FALLTHROUGH macros we weren't saving much by falling
through, and things were weirdly ordered anyway with depth intermixed with
color formats and the default case tucked in the middle of the switch
statement.  Replace with pretty obvious ordering of normal color, planar
color, depth, then default.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10735>

3 years agonv50/ir: don't optimize shl(mul_hi, a) to mul_hi
Karol Herbst [Wed, 26 May 2021 22:24:10 +0000 (00:24 +0200)]
nv50/ir: don't optimize shl(mul_hi, a) to mul_hi

Fixes shader_storage_buffer_object.advanced-unsizedArrayLength* CTS tests

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11021>

3 years agonv50/ir: when constant folding shl(mul, a) we need to copy muls type
Karol Herbst [Wed, 26 May 2021 22:21:31 +0000 (00:21 +0200)]
nv50/ir: when constant folding shl(mul, a) we need to copy muls type

Also clear subop while at it as we might convert a shl.wrap to mul.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11021>

3 years agopanfrost: Performance configuration
Antonio Caggiano [Thu, 13 May 2021 14:06:11 +0000 (16:06 +0200)]
panfrost: Performance configuration

Configure a panfrost performance structure with tables of categories and
counters for the current product id. An array for storing counter values
read from the GPU is also managed by this structure. A generic read
function can be used to retrieve the value of a counter from the conter
values array.

v2: Generate tables instead of calling register functions.
v3: Simplify counter read function and `pan_gen_perf.py` write method.
v4: Accumulate counter values from all cores.
v5: Wrap `STATIC_ASSERT`s within unused functions.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10844>

3 years agopanfrost: Counter definitions
Antonio Caggiano [Thu, 15 Apr 2021 08:08:38 +0000 (10:08 +0200)]
panfrost: Counter definitions

Add Mali events XML files generated with Panfrost HWC helper.
https://gitlab.freedesktop.org/fahien/panfrost-hwc-helper/

v2: Restore license headers.
v3: Fix shader core and memory system counter offsets.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10844>

3 years agost/mesa: fix clearing of 1D array textures
Pierre-Eric Pelloux-Prayer [Thu, 29 Apr 2021 16:22:14 +0000 (18:22 +0200)]
st/mesa: fix clearing of 1D array textures

st_gl_texture_dims_to_pipe_dims isn't usable in this case since its
API doesn't match the usage so fix up the dimensions manually.

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

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10523>

3 years agoci/freedreno: Skip Portal 2 trace on a630, due to flakiness
Tomeu Vizoso [Thu, 27 May 2021 09:23:40 +0000 (11:23 +0200)]
ci/freedreno: Skip Portal 2 trace on a630, due to flakiness

Sometimes the reticle is missing. Skip it for now to keep the number of
pipeline failures due to flakes low.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11033>

3 years agoradv: fix missing default state for DB_DFSM_CONTROL
Samuel Pitoiset [Thu, 27 May 2021 06:18:34 +0000 (08:18 +0200)]
radv: fix missing default state for DB_DFSM_CONTROL

Fixes: 69ae02151d7 ("radv: remove DFSM")
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/11028>

3 years agozink: improve unsupported feature warning message
Mike Blumenkrantz [Mon, 24 May 2021 13:36:36 +0000 (09:36 -0400)]
zink: improve unsupported feature warning message

this should print the device name and the missing features in order to
be less opaque

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10959>

3 years agozink: use actual const for const offset
Erik Faye-Lund [Thu, 27 May 2021 09:17:01 +0000 (11:17 +0200)]
zink: use actual const for const offset

When we emit constants, we don't know what type they'll be used as, so
we just emit them as uint, and then bitcast them to whatever we need.

But this isn't a good idea for ConstOffset, which needs to actually be a
const value, and not a const value bitcasted. So we sadly have to
open-code the const emitting here to avoid the problem.

Fixes: e963d35efe1 ("zink: use ConstOffset for nir_tex_src_offset")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4831
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11032>

3 years agov3dv: add v3dv_GetImageSparseMemoryRequirements back
Iago Toral Quiroga [Thu, 27 May 2021 10:55:33 +0000 (12:55 +0200)]
v3dv: add v3dv_GetImageSparseMemoryRequirements back

This one is not implemented in the common dispatch handler in terms
of its KHR_get_memory_requirements2 version, so the driver needs
to implement it.

Fixes: d87afc1acc ('v3dv: implement VK_KHR_get_memory_requirements2')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11038>

3 years agodocs: drop clayton from intel-ci notice
Erik Faye-Lund [Wed, 26 May 2021 10:02:15 +0000 (12:02 +0200)]
docs: drop clayton from intel-ci notice

As per his request.

Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10975>

3 years agodocs: update another IRC reference
Erik Faye-Lund [Tue, 25 May 2021 11:59:23 +0000 (13:59 +0200)]
docs: update another IRC reference

In the last round of IRC link updates, #freedesktop hadn't moved yet. Now
it has, so let's update the reference.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10975>

3 years agodocs: update another IRC reference
Erik Faye-Lund [Tue, 25 May 2021 11:58:19 +0000 (13:58 +0200)]
docs: update another IRC reference

I didn't initially update this one because craftguy hadn't moved to OFTC
when I wrote the last patch. But now he has, so let's also update this
reference.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10975>

3 years agoPartial revert of "ci: Add a manual job for tracking the performance of Freedreno"
Tomeu Vizoso [Thu, 27 May 2021 08:30:15 +0000 (10:30 +0200)]
Partial revert of "ci: Add a manual job for tracking the performance of Freedreno"

This reverts commit 8e470457de5b6e7903ceea0efaa99cb6e8b611f0.

Drop that jobs, as it's sometimes causing a gitlab-ci.yml parse error
that isn't readily reproducible:

Found errors in your .gitlab-ci.yml:

'a630-profile-traces' job needs 'arm_test' job but it was not added to the pipeline
'a630-profile-traces' job needs 'meson-arm64' job but it was not added to the pipeline

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11030>

3 years agov3dv: trivially handle VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR
Iago Toral Quiroga [Wed, 26 May 2021 08:45:31 +0000 (10:45 +0200)]
v3dv: trivially handle VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11002>

3 years agov3dv: implement VK_KHR_dedicated_allocation
Iago Toral Quiroga [Wed, 26 May 2021 07:14:02 +0000 (09:14 +0200)]
v3dv: implement VK_KHR_dedicated_allocation

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11002>

3 years agov3dv: keep track of whether an image may be backed by external memory
Iago Toral Quiroga [Wed, 26 May 2021 07:33:12 +0000 (09:33 +0200)]
v3dv: keep track of whether an image may be backed by external memory

Such images will always require dedicated allocations.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11002>

3 years agov3dv: implement VK_KHR_get_memory_requirements2
Iago Toral Quiroga [Wed, 26 May 2021 07:34:04 +0000 (09:34 +0200)]
v3dv: implement VK_KHR_get_memory_requirements2

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11002>

3 years agoRevert "util: disable glthread in CSGO"
Timothy Arceri [Mon, 24 May 2021 02:38:07 +0000 (12:38 +1000)]
Revert "util: disable glthread in CSGO"

This reverts commit 40c93e2f455d788cc920f395b899e70f730cf5a3.

The trust factor issue has now been resolved [1]

[1] https://github.com/ValveSoftware/csgo-osx-linux/issues/2630

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10948>

3 years agovirgl:Fix the leak of hw_res used as fence
cheyang [Wed, 26 May 2021 12:44:57 +0000 (20:44 +0800)]
virgl:Fix the leak of hw_res used as fence

Fence destroy hw_res not dec reference.Lead leak.
Call virgl_drm_resource_reference() to release hw_res
instead of calling virgl_hw_res_destroy() directly.

Fixes: c54fb6ef3d8 ("virgl: Don't destroy resource while it's in use.")

Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11008>

3 years agogallium/u_vbuf: add a fast path to skip refcounting for uploaded user buffers
Marek Olšák [Tue, 25 May 2021 18:55:42 +0000 (14:55 -0400)]
gallium/u_vbuf: add a fast path to skip refcounting for uploaded user buffers

This improves performance by 23% with radeonsi and Ryzen 3900X running
the game torcs.

All vertex buffers must be user buffers to get this.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10992>

3 years agoradeonsi: clamp clear_buffer values using new util helper
Mike Blumenkrantz [Sun, 16 May 2021 14:41:27 +0000 (10:41 -0400)]
radeonsi: clamp clear_buffer values using new util helper

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10822>

3 years agozink: clamp clear_buffer values
Mike Blumenkrantz [Sun, 16 May 2021 14:38:42 +0000 (10:38 -0400)]
zink: clamp clear_buffer values

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10822>

3 years agogallium/aux: add helper for pre-clamping clear_buffer value to dword
Mike Blumenkrantz [Sun, 16 May 2021 14:38:20 +0000 (10:38 -0400)]
gallium/aux: add helper for pre-clamping clear_buffer value to dword

copied from radeonsi

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10822>

3 years agolavapipe: also ignore multiple pipeline barriers in succession
Mike Blumenkrantz [Wed, 26 May 2021 21:32:01 +0000 (17:32 -0400)]
lavapipe: also ignore multiple pipeline barriers in succession

this just flushes repeatedly, which is pointless

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10762>

3 years agolavapipe: skip "pipeline barriers" if they're first or last in a cmdbuf
Mike Blumenkrantz [Wed, 12 May 2021 03:27:17 +0000 (23:27 -0400)]
lavapipe: skip "pipeline barriers" if they're first or last in a cmdbuf

barriers just trigger a full flush, which is unnecessary if it's:
* the first cmd in a cmdbuf, as the previous cmdbuf will have already
  flushed and so this is flushing nothing
* the last cmd in a cmdbuf, as there will be a flush immediately after
  returning from this function

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10762>

3 years agollvmpipe: stop accessing pipe_resource::screen internally
Mike Blumenkrantz [Wed, 26 May 2021 13:13:06 +0000 (09:13 -0400)]
llvmpipe: stop accessing pipe_resource::screen internally

this breaks driver tracing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11017>

3 years agollvmpipe: store a screen pointer in resource struct
Mike Blumenkrantz [Wed, 26 May 2021 13:10:25 +0000 (09:10 -0400)]
llvmpipe: store a screen pointer in resource struct

directly accessing the pipe_resource::screen pointer crashes trace,
so it's necessary to have an unwrapped pointer available if such things
are needed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11017>

3 years agollvmpipe: only dump tgsi shaders if they're actually tgsi shaders
Mike Blumenkrantz [Wed, 26 May 2021 13:24:28 +0000 (09:24 -0400)]
llvmpipe: only dump tgsi shaders if they're actually tgsi shaders

this crashes otherwise

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11016>

3 years agollvmpipe: split out scene surface init into separate function
Mike Blumenkrantz [Wed, 26 May 2021 13:02:09 +0000 (09:02 -0400)]
llvmpipe: split out scene surface init into separate function

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11015>

3 years agollvmpipe: split out scene surface info into separate struct
Mike Blumenkrantz [Wed, 26 May 2021 12:58:02 +0000 (08:58 -0400)]
llvmpipe: split out scene surface info into separate struct

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11015>

3 years agolavapipe: moar @optimize
Mike Blumenkrantz [Wed, 26 May 2021 21:20:33 +0000 (17:20 -0400)]
lavapipe: moar @optimize

without enough nir optimizing, some shaders fail to reduce as they should,
resulting in the wrong output

fixes dEQP-VK.graphicsfuzz.spv-stable-mergesort-flatten-selection-dead-continues

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11019>

3 years agollvmpipe: remove clamping to [0,1] for tri offset
Mike Blumenkrantz [Wed, 26 May 2021 18:39:27 +0000 (14:39 -0400)]
llvmpipe: remove clamping to [0,1] for tri offset

this was added in 315f8daab159 without much detail, then refactored
a bunch of times, and there's even now been a comment added questioning
whether it's correct: it does not appear to be.

fixes lavapipe cts cases:
dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltaone_bias_clamp_neg
dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltaone_bias_clamp_neg

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11012>

3 years agoci/freedreno: Turn off default a530 quick_gl testing, do full quick_shader.
Emma Anholt [Wed, 26 May 2021 19:58:42 +0000 (12:58 -0700)]
ci/freedreno: Turn off default a530 quick_gl testing, do full quick_shader.

The quick_gl set is too unstable -- even when I switched to a consistent
set of tests, and added lots of flakes, I keep getting new ones as some
test (unclear which, but it's like 7-8 minutes into the run) kills other
innocent ones.  Until we get per process pagetables, disable this testing
by default.

However, now that we've freed up a board that was doing quick_gl, we have
time to do all of quick_shader so that piglit uprevs don't reshuffle the
test list and expose new failures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11018>

3 years agovenus: advertise VK_ANDROID_external_memory_android_hardware_buffer
Yiwei Zhang [Thu, 20 May 2021 22:53:55 +0000 (22:53 +0000)]
venus: advertise VK_ANDROID_external_memory_android_hardware_buffer

Besides advertising AHB support, for Android, we do not advertise
KHR_external_memory_fd, EXT_external_memory_dma_buf or
EXT_image_drm_format_modifier so that AHB remains the sole channel for
external resource sharing.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: support AHB external format for sampler YCbCr conversion
Yiwei Zhang [Mon, 24 May 2021 18:25:02 +0000 (18:25 +0000)]
venus: support AHB external format for sampler YCbCr conversion

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: implement vn_GetMemoryAndroidHardwareBufferANDROID
Yiwei Zhang [Thu, 20 May 2021 22:26:27 +0000 (22:26 +0000)]
venus: implement vn_GetMemoryAndroidHardwareBufferANDROID

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: implement AHB allocation and import (part 2/2)
Yiwei Zhang [Wed, 19 May 2021 04:42:57 +0000 (04:42 +0000)]
venus: implement AHB allocation and import (part 2/2)

TODO left to fix plane count > 1 case for external memory.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: implement AHB allocation and import (part 1/2)
Yiwei Zhang [Tue, 18 May 2021 22:37:50 +0000 (22:37 +0000)]
venus: implement AHB allocation and import (part 1/2)

This patch refactors the struct look up logic for memory allocation, and
it prepares the necessary info for ahb allocation and import.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: refactor device memory fd import
Yiwei Zhang [Tue, 18 May 2021 21:01:13 +0000 (21:01 +0000)]
venus: refactor device memory fd import

This patch wraps up fd import logic, which will be used later by ahb
import. This patch also removes a redundant check in need_bo.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: implement image creation for ahb handle type
Yiwei Zhang [Tue, 18 May 2021 20:55:10 +0000 (20:55 +0000)]
venus: implement image creation for ahb handle type

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: prepare image creation helpers for AHB
Yiwei Zhang [Tue, 18 May 2021 04:58:13 +0000 (04:58 +0000)]
venus: prepare image creation helpers for AHB

Store image create info for deferred creation of AHB image.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: fix AHB image format properties query
Yiwei Zhang [Sun, 23 May 2021 21:05:15 +0000 (21:05 +0000)]
venus: fix AHB image format properties query

1. bail early if there's no compatiable AHB format
2. check against the corresponding drm format modifier

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: fix vn_GetAndroidHardwareBufferPropertiesANDROID
Yiwei Zhang [Sun, 23 May 2021 00:11:18 +0000 (00:11 +0000)]
venus: fix vn_GetAndroidHardwareBufferPropertiesANDROID

Append a VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT bit to pass cts.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: complete the format conversion between AHB and Vulkan
Yiwei Zhang [Mon, 24 May 2021 17:59:14 +0000 (17:59 +0000)]
venus: complete the format conversion between AHB and Vulkan

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agovenus: tiny refactor of vn_android_get_gralloc_buffer_info
Yiwei Zhang [Sun, 23 May 2021 22:30:43 +0000 (22:30 +0000)]
venus: tiny refactor of vn_android_get_gralloc_buffer_info

Return false if the queried drm format modifier is invalid.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>

3 years agoradv: move all game workarounds to drirc
Samuel Pitoiset [Tue, 25 May 2021 12:18:43 +0000 (14:18 +0200)]
radv: move all game workarounds to drirc

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/10978>

3 years agoutil/drirc: use application_name_match for the SotTR RADV workaround
Samuel Pitoiset [Tue, 25 May 2021 12:48:45 +0000 (14:48 +0200)]
util/drirc: use application_name_match for the SotTR RADV workaround

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/10978>

3 years agoradv: add few new drirc options
Samuel Pitoiset [Tue, 25 May 2021 12:09:15 +0000 (14:09 +0200)]
radv: add few new drirc options

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/10978>

3 years agoutil/drirc: make engine_versions an optional field
Samuel Pitoiset [Tue, 25 May 2021 12:32:14 +0000 (14:32 +0200)]
util/drirc: make engine_versions an optional field

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/10978>

3 years agoci/freedreno: Add spec@arb_copy_buffer@dlist flake on a530
Tomeu Vizoso [Wed, 26 May 2021 14:48:44 +0000 (16:48 +0200)]
ci/freedreno: Add spec@arb_copy_buffer@dlist flake on a530

Crashes occasionally, probably due to the same cause as
spec@arb_copy_buffer@intra-buffer-copy.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci/freedreno: Add new flake after "ci: Configure DUTs for max performance"
Tomeu Vizoso [Wed, 26 May 2021 14:47:56 +0000 (16:47 +0200)]
ci/freedreno: Add new flake after "ci: Configure DUTs for max performance"

Probably was made more probable since the cpufreq or devfreq changes. Or
maybe due to the lack of runtime PM?

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci/freedreno: Fix name of flake
Tomeu Vizoso [Wed, 26 May 2021 14:43:44 +0000 (16:43 +0200)]
ci/freedreno: Fix name of flake

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci/zink: Add nearest_linear_mirror_l8_pot flake
Tomeu Vizoso [Wed, 26 May 2021 10:50:16 +0000 (12:50 +0200)]
ci/zink: Add nearest_linear_mirror_l8_pot flake

Crashed once at https://gitlab.freedesktop.org/mesa/mesa/-/jobs/10116149

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci/freedreno: Add depth32f_stencil8 flakes
Tomeu Vizoso [Wed, 26 May 2021 10:26:08 +0000 (12:26 +0200)]
ci/freedreno: Add depth32f_stencil8 flakes

Started happening after disabling cpufreq, devfreq and runtime PM.

At least one of these fail in each run, so it's blocking MRs.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoradeonsi/ci: Add new Piglit failures
Tomeu Vizoso [Wed, 26 May 2021 07:42:59 +0000 (09:42 +0200)]
radeonsi/ci: Add new Piglit failures

These appeared after the execution order of tests changed after a Piglit
upgrade.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci: Add a manual job for tracking the performance of Freedreno
Antonio Caggiano [Wed, 28 Apr 2021 14:16:42 +0000 (16:16 +0200)]
ci: Add a manual job for tracking the performance of Freedreno

Use Piglit's replay profile to measure and store the time that frames
take to render in the GPU.

This job won't run automatically in regular pipelines, but will be
triggered automatically by a script for every successful pre-merge
pipeline.

This is because we want to generate performance data for every relevant
commit merged in main, but we don't want to keep a device busy during
the pre-merge run.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci: Uprev apitrace to 170424754bb4 "retrace: Get --loop to work without rewinding"
Tomeu Vizoso [Tue, 4 May 2021 06:26:55 +0000 (08:26 +0200)]
ci: Uprev apitrace to 170424754bb4 "retrace: Get --loop to work without rewinding"

Needed to be able to replay traces for performance tracking.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci: Uprev piglit to eee7d89611cf "tests: Replay profile frame times"
Tomeu Vizoso [Wed, 28 Apr 2021 14:16:32 +0000 (16:16 +0200)]
ci: Uprev piglit to eee7d89611cf "tests: Replay profile frame times"

So we can measure GPU times when replaying traces.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agoci: Configure DUTs for max performance
Tomeu Vizoso [Thu, 19 Nov 2020 16:01:41 +0000 (17:01 +0100)]
ci: Configure DUTs for max performance

Lock CPU and GPU frequency scaling on devices so to speed up test
execution and lower the variation of frame times from performance replay
jobs.

Also disable autosuspend of the GPU device.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>

3 years agopanfrost: Expose PIPE_CAP_SHAREABLE_SHADERS
Alyssa Rosenzweig [Mon, 24 May 2021 21:31:00 +0000 (17:31 -0400)]
panfrost: Expose PIPE_CAP_SHAREABLE_SHADERS

Now that the compile entrypoints don't touch the context, it's clear
that we can support this. Note, even though the pools for shaders and
descriptors are referenced from particular contexts, they are unowned
pools -- once uploaded, any thread can use the results.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10976>

3 years agopanfrost: Don't take ctx in panfrost_shader_compile
Alyssa Rosenzweig [Mon, 24 May 2021 21:29:18 +0000 (17:29 -0400)]
panfrost: Don't take ctx in panfrost_shader_compile

Complicates validation of PIPE_CAP_SHAREABLE_SHADERS.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10976>

3 years agopanfrost: Inline pan_prepare_shader_descriptor
Alyssa Rosenzweig [Mon, 24 May 2021 21:24:52 +0000 (17:24 -0400)]
panfrost: Inline pan_prepare_shader_descriptor

Complicates the next patch.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10976>

3 years agointel/gfx12+: Add Wa_14013840143
Anuj Phogat [Mon, 24 May 2021 17:56:12 +0000 (10:56 -0700)]
intel/gfx12+: Add Wa_14013840143

Cc: mesa-stable
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10984>

3 years agoradv: remove DFSM
Samuel Pitoiset [Tue, 25 May 2021 06:26:23 +0000 (08:26 +0200)]
radv: remove DFSM

DFSM has never been enabled by default because it was slower.
RadeonSI is also dropping support for this because they discovered
that's actually not efficient in practice.

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/10968>

3 years agozink: ci updates
Mike Blumenkrantz [Wed, 26 May 2021 14:30:06 +0000 (10:30 -0400)]
zink: ci updates

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11007>

3 years agozink: remove weird lod hack for texturing
Mike Blumenkrantz [Wed, 26 May 2021 14:11:01 +0000 (10:11 -0400)]
zink: remove weird lod hack for texturing

this breaks texturing in non-fragment stages and is unnecessary
due to using nir_lower_tex

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11007>

3 years agoci: downgrade sphinx to v3.x
Erik Faye-Lund [Wed, 26 May 2021 13:27:27 +0000 (15:27 +0200)]
ci: downgrade sphinx to v3.x

Sphinx 4.0 was recently released, but sadly the theme we're using is not
yet compatible with Sphinx 4.0.

So let's limit the sphinx-version we're using to a version before Sphinx
4.0 for now.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4843
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11005>

3 years agoradv: stop reporting ACO from the device name
Samuel Pitoiset [Tue, 25 May 2021 11:18:24 +0000 (13:18 +0200)]
radv: stop reporting ACO from the device name

ACO is the default compiler for almost a year from now, so it should
be fine to replace RADV/ACO by just RADV. LLVM is still added
when RADV_DEBUG=llvm is used for convenience.

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/10972>

3 years agoradv: fix formatting of radv_dri_options
Rhys Perry [Mon, 24 May 2021 14:53:36 +0000 (15:53 +0100)]
radv: fix formatting of radv_dri_options

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10980>

3 years agoradv: workaround incorrect depthBiasConstantFactor by Path of Exile
Rhys Perry [Mon, 24 May 2021 14:39:34 +0000 (15:39 +0100)]
radv: workaround incorrect depthBiasConstantFactor by Path of Exile

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4677
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10980>

3 years agoradv: add radv_absolute_depth_bias
Rhys Perry [Mon, 24 May 2021 15:23:59 +0000 (16:23 +0100)]
radv: add radv_absolute_depth_bias

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10980>

3 years agoradv: set maxVertexInputAttributeOffset to UINT32_MAX
Mike Blumenkrantz [Sun, 16 May 2021 18:17:38 +0000 (14:17 -0400)]
radv: set maxVertexInputAttributeOffset to UINT32_MAX

this is what amdvlk uses

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10827>

3 years agoradv: make radv_pipeline::attrib_ends 32bit
Mike Blumenkrantz [Fri, 21 May 2021 15:13:58 +0000 (11:13 -0400)]
radv: make radv_pipeline::attrib_ends 32bit

this is needed to support larger vertex attribute offsets

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10827>

3 years agoradv: don't allocate DCC predicate if the image doesn't use DCC
Rhys Perry [Tue, 25 May 2021 16:01:23 +0000 (17:01 +0100)]
radv: don't allocate DCC predicate if the image doesn't use DCC

Fixes replay of RenderDoc captures created before a7c0cf500b3.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10983>

3 years agoaco: fix emitting discard when the program just ends
Samuel Pitoiset [Mon, 24 May 2021 15:05:30 +0000 (17:05 +0200)]
aco: fix emitting discard when the program just ends

For fragment shaders that only contain a discard, the exec mask has
to be zero'd and everything discarded.

It seems unnecessary to emit an export here because if the FS has no
exports, the compiler already emits a null export at the end.

Fixes incorrect hair rendering in Detroit: Become Human.

fossil-db (Sienna Cichlid):
Totals from 3 (0.00% of 149839) affected shaders:
CodeSize: 2896 -> 2872 (-0.83%)
Instrs: 556 -> 553 (-0.54%)
Latency: 29266 -> 29214 (-0.18%)
InvThroughput: 3374 -> 3372 (-0.06%)

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10955>

3 years agov3dv: implement VK_KHR_bind_memory2
Iago Toral Quiroga [Tue, 25 May 2021 11:21:55 +0000 (13:21 +0200)]
v3dv: implement VK_KHR_bind_memory2

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11001>

3 years agov3d: use helper to simplify things
Erik Faye-Lund [Tue, 25 May 2021 14:03:27 +0000 (16:03 +0200)]
v3d: use helper to simplify things

We can use the util_prim_restart_index_from_size helper to avoid
open-coding the implicit index size here.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10981>

3 years agov3dv: implement VK_KHR_maintenance3
Iago Toral Quiroga [Tue, 25 May 2021 08:49:06 +0000 (10:49 +0200)]
v3dv: implement VK_KHR_maintenance3

We don't have any special restrictions associated with the number
of descriptors in a set other than maybe not exceeding what we can
put in a single memory allocation, so in practice, applications will
be limited by the per-stage contraints defined by other Vulkan limits.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10970>

3 years agov3dv: define V3D_MAX_BUFFER_RANGE
Iago Toral Quiroga [Tue, 25 May 2021 07:48:39 +0000 (09:48 +0200)]
v3dv: define V3D_MAX_BUFFER_RANGE

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10970>

3 years agoradv: use radv_dcc_enabled() for the FB mip flush workaround
Samuel Pitoiset [Thu, 6 May 2021 12:51:04 +0000 (14:51 +0200)]
radv: use radv_dcc_enabled() for the FB mip flush workaround

This has no effects because radv_image_has_CB_metadata() still
accounts for DCC which is incorrect. This should be changed.

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/10667>

3 years agoradv: do not decompress DCC for partial resolves if stores are supported
Samuel Pitoiset [Thu, 6 May 2021 12:38:56 +0000 (14:38 +0200)]
radv: do not decompress DCC for partial resolves if stores are supported

It seems unnecessary.

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/10667>

3 years agoradv: only init DCC if compressed in the HW resolve path
Samuel Pitoiset [Thu, 6 May 2021 12:30:19 +0000 (14:30 +0200)]
radv: only init DCC if compressed in the HW resolve path

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/10667>

3 years agoradv: only mark DCC as compressed when drawing if layout allows it
Samuel Pitoiset [Thu, 6 May 2021 12:18:40 +0000 (14:18 +0200)]
radv: only mark DCC as compressed when drawing if layout allows it

Just having DCC enabled on the base level doesn't mean we are
using compressed rendering.

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/10667>

3 years agoradv: remove redundant call to radv_dcc_enabled()
Samuel Pitoiset [Thu, 6 May 2021 12:06:05 +0000 (14:06 +0200)]
radv: remove redundant call to radv_dcc_enabled()

radv_layout_dcc_compressed() is now per level.

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/10667>

3 years agoradv: pass an image range to radv_layout_dcc_compressed()
Samuel Pitoiset [Thu, 6 May 2021 10:20:37 +0000 (12:20 +0200)]
radv: pass an image range to radv_layout_dcc_compressed()

With DCC and mipmaps, some mips can't be compressed and it makes
sense to check this here.

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/10667>

3 years agoci/freedreno: Add another a630 piglit flake.
Emma Anholt [Tue, 25 May 2021 18:37:00 +0000 (11:37 -0700)]
ci/freedreno: Add another a630 piglit flake.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10986>

3 years agoci: disentangle tags for containers and artifacts produced by them
Andres Gomez [Tue, 18 May 2021 11:14:35 +0000 (14:14 +0300)]
ci: disentangle tags for containers and artifacts produced by them

In order to reduce the amount of building work and network traffic, we
use docker caching. For that, we use the MESA_IMAGE_TAG and
MESA_BASE_TAG env variables which build the MESA_IMAGE variable to
identify different containers.

We are also using these tags to identify the cached artifacts produced
by other containers when those are part of the underlying OS to run
directly in DUTs through the DISTRIBUTION_TAG env variable.

The undesirable collateral effect is that we cannot combine a test job
using a container which would like to make use of some of the cached
artifacts created by another container. In other words, we cannot have
a job using a DISTRIBUTION_TAG and a MESA_IMAGE using a different
MESA_[IMAGE|BASE]_TAG variables.

Now, we split the usage in the DISTRIBUTION_TAG through the definition
of MESA_ARTIFACTS_TAG AND MESA_ARTIFACTS_BASE_TAG.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10977>

3 years agonir/builder: add nir_mask
Mike Blumenkrantz [Tue, 4 May 2021 14:24:03 +0000 (10:24 -0400)]
nir/builder: add nir_mask

it's handy to have functions for generating masks

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10620>