platform/upstream/mesa.git
3 years agozink: make zink_context_update_descriptor_states() static
Mike Blumenkrantz [Thu, 1 Apr 2021 19:13:18 +0000 (15:13 -0400)]
zink: make zink_context_update_descriptor_states() static

this is no longer used externally

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

3 years agozink: call invalidate on invalid descriptor sets during recycle
Mike Blumenkrantz [Thu, 1 Apr 2021 18:51:53 +0000 (14:51 -0400)]
zink: call invalidate on invalid descriptor sets during recycle

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

3 years agozink: use better iterating for buffer rebinds
Mike Blumenkrantz [Thu, 1 Apr 2021 18:48:58 +0000 (14:48 -0400)]
zink: use better iterating for buffer rebinds

now that the number of descriptors for a given type is known, we can iterate
over all bound descriptors for the type instead of relying on shader usage

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

3 years agozink: add slot params to zink_context_invalidate_descriptor_state
Mike Blumenkrantz [Thu, 1 Apr 2021 18:45:51 +0000 (14:45 -0400)]
zink: add slot params to zink_context_invalidate_descriptor_state

allow more precision with invalidation

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

3 years agozink: track number of tbos in shader data
Mike Blumenkrantz [Thu, 1 Apr 2021 18:21:34 +0000 (14:21 -0400)]
zink: track number of tbos in shader data

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

3 years agozink: track max slot idx for descriptor types
Mike Blumenkrantz [Tue, 26 Jan 2021 14:34:13 +0000 (09:34 -0500)]
zink: track max slot idx for descriptor types

this will be useful when restoring states across renderpasses

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

3 years agozink: don't track sampler states onto buffer sampler sets
Mike Blumenkrantz [Sat, 3 Apr 2021 16:40:11 +0000 (12:40 -0400)]
zink: don't track sampler states onto buffer sampler sets

this should always just be a null pointer to reduce overhead

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

3 years agozink: update samplerview descriptor layouts when image binds are set
Mike Blumenkrantz [Fri, 5 Mar 2021 14:31:51 +0000 (09:31 -0500)]
zink: update samplerview descriptor layouts when image binds are set

for this case it's important to match the GENERAL layout in sampler bindings
if the resource is also being used as a shader image

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

3 years agozink: track bind counts for descriptors
Mike Blumenkrantz [Tue, 12 Jan 2021 22:53:47 +0000 (17:53 -0500)]
zink: track bind counts for descriptors

* for samplers this is a per-stage slot mask that will be used for fast layout updates
* images get a count for gfx and compute usage
* any writable descriptor bind gets its own gfx/compute counter
* all descriptor binds are now counted

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

3 years agozink: unify resource rebinding
Mike Blumenkrantz [Wed, 13 Jan 2021 19:12:45 +0000 (14:12 -0500)]
zink: unify resource rebinding

this improves handling for shader images

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

3 years agozink: add context-based descriptor info tracking infrastructure
Mike Blumenkrantz [Fri, 22 Jan 2021 20:46:00 +0000 (15:46 -0500)]
zink: add context-based descriptor info tracking infrastructure

this maintains the exact structs needed to update descriptor states

it's incomplete at this moment due to lacking shader image rebinds, but
it's also not yet being used

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

3 years agozink: stop invalidating descriptor sets on pool destroy
Mike Blumenkrantz [Wed, 12 May 2021 02:38:20 +0000 (22:38 -0400)]
zink: stop invalidating descriptor sets on pool destroy

this was debug code I was using for testing pool validity, but it
stopped being useful and just crashes sometimes now

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

3 years agovirgl: do not use winsys info for guest storage of classic resource
Yiwei Zhang [Tue, 11 May 2021 21:31:19 +0000 (21:31 +0000)]
virgl: do not use winsys info for guest storage of classic resource

winsys_stride is the stride of the host storage of the classic resource,
and using that breaks the readback on the guest storage.

v2: move the scrubbing to virgl_resource_from_handle
The returned modifier also points directly to the host driver's real
modifier but not a virtualized one. Leave plane_offset as zero here
matches the prior behavior before introducing winsys info.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> (v1)
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> (v2)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10757>

3 years agoiris: Use const uploader for user index data
Mark Janes [Tue, 25 Aug 2020 22:40:27 +0000 (15:40 -0700)]
iris: Use const uploader for user index data

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759>

3 years agoiris: Use const uploader for draw parameters
Mark Janes [Tue, 25 Aug 2020 22:38:47 +0000 (15:38 -0700)]
iris: Use const uploader for draw parameters

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759>

3 years agoiris: Use const uploader for blorp vertex data
Mark Janes [Tue, 25 Aug 2020 22:37:46 +0000 (15:37 -0700)]
iris: Use const uploader for blorp vertex data

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759>

3 years agoiris: Use const_uploader for iris_create_stream_output_target
Mark Janes [Tue, 25 Aug 2020 22:27:07 +0000 (15:27 -0700)]
iris: Use const_uploader for iris_create_stream_output_target

This data is written and read by the GPU, and does not need to be in
system memory.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759>

3 years agoiris: Upload constant resources for efficient GPU access
Mark Janes [Mon, 17 Aug 2020 21:37:03 +0000 (14:37 -0700)]
iris: Upload constant resources for efficient GPU access

Re-using the stream_uploader for constant data hurts performance on
DG1.  Constant data like uniform buffers should reside in local
memory for faster GPU access.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759>

3 years agoiris: Increase the size of upload buffers
Mark Janes [Tue, 25 Aug 2020 22:29:20 +0000 (15:29 -0700)]
iris: Increase the size of upload buffers

Smaller sizes may generate CPU overhead while saving negligible
memory.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10759>

3 years agoci/iris: Add some more traces to replay.
Emma Anholt [Thu, 15 Apr 2021 22:46:16 +0000 (15:46 -0700)]
ci/iris: Add some more traces to replay.

Reviewed-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/10295>

3 years agoci/panfrost: Add some more traces to replay.
Emma Anholt [Thu, 15 Apr 2021 22:40:10 +0000 (15:40 -0700)]
ci/panfrost: Add some more traces to replay.

Reviewed-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/10295>

3 years agoci: Switch to apitraces for glmark2
Emma Anholt [Thu, 15 Apr 2021 19:18:26 +0000 (12:18 -0700)]
ci: Switch to apitraces for glmark2

This brings in upstream mediump fixes, and should also replay faster than
.rdc files.

Reviewed-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/10295>

3 years agoci: Remove the need for an empty Piglit results file
Tomeu Vizoso [Tue, 11 May 2021 14:10:10 +0000 (16:10 +0200)]
ci: Remove the need for an empty Piglit results file

Just create such an empty file if there isn't already.

So drivers that are expected to pass all tests don't need to commit an
empty results file.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10295>

3 years agozink/ntv: Don't call free() on ralloc'd memory
Adam Jackson [Tue, 11 May 2021 15:07:20 +0000 (11:07 -0400)]
zink/ntv: Don't call free() on ralloc'd memory

Caught this with an LTO build:

[1465/1465] Linking target src/gallium/targets/dri/libgallium_dri.so
In function ‘spirv_shader_delete’,
    inlined from ‘nir_to_spirv’ at ../src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c:3907:7:
../src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c:3916:4: warning: ‘free’ called on pointer ‘block_1394’ with nonzero offset 48 [-Wfree-nonheap-object]
 3916 |    FREE(s);
      |    ^
../src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c: In function ‘nir_to_spirv’:
../src/util/ralloc.c:133:18: note: returned from ‘malloc’
  133 |    void *block = malloc(align64(size + sizeof(ralloc_header),
      |                  ^

Since s->words is allocated on the same ralloc context we can simplify
further by freeing the context all at once.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10754>

3 years agoiris: refcount separate screen objects for resource tracking
Mike Blumenkrantz [Tue, 4 May 2021 19:08:07 +0000 (15:08 -0400)]
iris: refcount separate screen objects for resource tracking

this screen object can never, ever be accessed like this in a resource,
as it may have previously been replaced by a wrapper (e.g., driver trace)
which will then explode when it is accessed directly

instead, keep a separate screen ref on the resource which is known to be
the actual driver object and not a wrapper

Fixes: 0a497eb1303 ("iris: make resources take a ref on the screen object")

Reviewed-by: Lionel Landwerlin lionel.g.landwerlin@intel.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10632>

3 years agoturnip: Drop fail annotation for driver_properties.
Emma Anholt [Mon, 10 May 2021 18:44:16 +0000 (11:44 -0700)]
turnip: Drop fail annotation for driver_properties.

These subtests weren't run in CI, and the whole set is skipped since
dropping to 1.1.

Fixes: 7bcda2144107 ("turnip: Demote API version to 1.1.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10734>

3 years agoci/turnip: Add some links to issues and MRs for some test failures.
Emma Anholt [Mon, 10 May 2021 18:42:24 +0000 (11:42 -0700)]
ci/turnip: Add some links to issues and MRs for some test failures.

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

3 years agoci/turnip: Clean up some stale fail annotations.
Emma Anholt [Mon, 10 May 2021 17:15:56 +0000 (10:15 -0700)]
ci/turnip: Clean up some stale fail annotations.

This test group was fixed in the deqp 1.2.6.0 uprev, but we do a
fractional run that didn't include these tests.

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

3 years agogallivm: Fix a signature mismatch warning
Adam Jackson [Mon, 10 May 2021 16:26:48 +0000 (12:26 -0400)]
gallivm: Fix a signature mismatch warning

gcc 11 says:

../src/gallium/auxiliary/gallivm/lp_bld_format_soa.c:84:49: warning: argument 3 of type ‘struct LLVMOpaqueValue * const*’ declared as a pointer [-Warray-parameter=]
   84 |                             const LLVMValueRef *unswizzled,
      |                             ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from ../src/gallium/auxiliary/gallivm/lp_bld_format_soa.c:42:
../src/gallium/auxiliary/gallivm/lp_bld_format.h:126:48: note: previously declared as an array ‘struct LLVMOpaqueValue * const[4]’
  126 |                             const LLVMValueRef unswizzled[4],
      |                             ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~

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

3 years agoturnip: copy all layers specified in vkCmdCopyImage
Danylo Piliaiev [Mon, 10 May 2021 17:52:53 +0000 (20:52 +0300)]
turnip: copy all layers specified in vkCmdCopyImage

When copying layered images we ignored .layerCount parameter.

Fixes mis-rendering of walls in D3D11 game "Company Of Heroes 2".

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10736>

3 years agobroadcom/compiler: clarify PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR setting
Iago Toral Quiroga [Tue, 11 May 2021 09:59:56 +0000 (11:59 +0200)]
broadcom/compiler: clarify PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR setting

We enabled this in the past to fix some register allocation issues we
faced with geometry shaders but we didn't document why it is safe for
us to do this, which is not immediately obvious.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10745>

3 years agov3d: disable GLSL loop unrolling again
Iago Toral Quiroga [Mon, 10 May 2021 07:30:54 +0000 (09:30 +0200)]
v3d: disable GLSL loop unrolling again

We had re-enabled this because of some test regressions:

KHR-GLES31.core.geometry_shader.limits.max_input_components and
ext_transform_feedback-max-varyings failed to register allocate,
but now that we support indirect indexing on vertex shader outputs natively
this is no longer an issue.

Piglit's max-samplers tests failed. These tests use indirect indexing
on samplers which is not supported and fail to link with this error message:
"Failed to link: error: sampler arrays indexed with non-constant expressions
is forbidden in GLSL  110". This is expected. The reason these were passing
before is that loop unrolling was able to turn indirect indexing into
direct indexing. We add them to the expected fail list.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>

3 years agobroadcom/compiler: don't unroll due to indirect indexing of outputs
Iago Toral Quiroga [Mon, 10 May 2021 07:18:38 +0000 (09:18 +0200)]
broadcom/compiler: don't unroll due to indirect indexing of outputs

We can handle this natively now, so there is no point.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>

3 years agov3dv: don't lower indirect derefs on output variables
Iago Toral Quiroga [Mon, 10 May 2021 07:14:37 +0000 (09:14 +0200)]
v3dv: don't lower indirect derefs on output variables

Our backend compiler can handle this for all supported shader stages now.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>

3 years agobroadcom/compiler: don't use nir_src_is_dynamically_uniform
Iago Toral Quiroga [Tue, 11 May 2021 07:56:24 +0000 (09:56 +0200)]
broadcom/compiler: don't use nir_src_is_dynamically_uniform

Now that we have divergence analysis we should use that.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>

3 years agobroacom/compiler: enable PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR
Iago Toral Quiroga [Mon, 10 May 2021 07:08:48 +0000 (09:08 +0200)]
broacom/compiler: enable PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR

We have been able to to handle indirect offsets on GS outputs for
a while and we have just implemented this for VS, so we can enable
this capability and avoid the horrible if-ladder code to convert
indirect output indices to constant indices.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>

3 years agobroadcom/compiler: make vir_VPM_WRITE_indirect handle non-uniform offsets
Iago Toral Quiroga [Mon, 10 May 2021 07:06:54 +0000 (09:06 +0200)]
broadcom/compiler: make vir_VPM_WRITE_indirect handle non-uniform offsets

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>

3 years agobroadcom/compiler: implement non-uniform offset on vertex outputs
Iago Toral Quiroga [Mon, 10 May 2021 07:02:10 +0000 (09:02 +0200)]
broadcom/compiler: implement non-uniform offset on vertex outputs

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>

3 years agobroadcom/compiler: move vertex shader output handling to its own function
Iago Toral Quiroga [Mon, 10 May 2021 06:50:04 +0000 (08:50 +0200)]
broadcom/compiler: move vertex shader output handling to its own function

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10723>

3 years agobroadcom/compiler: fix dynamic-stack-buffer-overflow error
Juan A. Suarez Romero [Fri, 30 Apr 2021 16:44:02 +0000 (18:44 +0200)]
broadcom/compiler: fix dynamic-stack-buffer-overflow error

When spilling a register, the number of temps can be increased when
introducing a temporal variable.

Those nodes are not elegible to be spilled, but we need to take care of
no accessing out-of-bounds of the arrays defined with a size equal to
the original number of temps.

Fixes address sanitizer error on
KHR-GLES3.shaders.uniform_block.random.all_shared_buffer.14 (and many
others).

v2 (Iago):
 - Add clarification in assertion.
 - Use `vir_get_temp` to increase num_temps.

v3 (Iago):
 - Update clarification

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10643>

3 years agost/mesa: fix pipe resource leak
Juan A. Suarez Romero [Fri, 30 Apr 2021 10:58:22 +0000 (12:58 +0200)]
st/mesa: fix pipe resource leak

When switching from a normal texture to a texture storage, unreference
the old one to avoid leaking it.

v2 (Emma):
 - Update commit message

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10643>

3 years agov3d: fix resource leak in error path
Juan A. Suarez Romero [Fri, 30 Apr 2021 10:49:59 +0000 (12:49 +0200)]
v3d: fix resource leak in error path

Do not leak pipe resource if scanout resource creation fails.

Fixes: bf6973199d1 ("v3d: Allow the UIF modifier with renderonly.")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10643>

3 years agoegl/x11: don't forget to exit the attrib list loop
Eric Engestrom [Sun, 9 May 2021 16:10:32 +0000 (18:10 +0200)]
egl/x11: don't forget to exit the attrib list loop

Without this check, if we receive any attribs from the client, we either
find an X11/XCB screen fd in there, or we keep going until we end up in
random bits of memory and crash.

Fixes: 4aebd86f9a1b0db0ebcc ("egl/x11: pick the user requested screen")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10717>

3 years agozink: use DONTCARE renderpass when a new scanout fb attachment is set
Mike Blumenkrantz [Tue, 12 Jan 2021 17:29:25 +0000 (12:29 -0500)]
zink: use DONTCARE renderpass when a new scanout fb attachment is set

using DONTCARE for the loadOp is more optimal for this case

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

3 years agofreedreno: Update editorconfig and emacs settings for freedreno reformat.
Emma Anholt [Mon, 10 May 2021 22:10:05 +0000 (15:10 -0700)]
freedreno: Update editorconfig and emacs settings for freedreno reformat.

Fixes: 2d439343ea1a ("freedreno: Re-indent")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10742>

3 years agodocs: Simplify now that kmsro is autoenabled
Alyssa Rosenzweig [Mon, 10 May 2021 15:07:56 +0000 (11:07 -0400)]
docs: Simplify now that kmsro is autoenabled

Since 70813c1c13b ("meson: Remove kmsro from gallium-drivers"), it is no
longer necessary to include kmsro in the gallium-drivers list; kmsro
will be automatically enabled if it may be required. Simplify the docs
for lima and panfrost accordingly to reflect the change.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10727>

3 years agoci: skip glsl-uniform-interstage-limits tests for softpipe jobs
Mike Blumenkrantz [Fri, 7 May 2021 17:53:47 +0000 (13:53 -0400)]
ci: skip glsl-uniform-interstage-limits tests for softpipe jobs

these tests take over 5 minutes just locally, and the codepaths are mostly
shared with llvmpipe in the draw module, so there's not much point in running
them given that other drivers are more likely to catch any issues here over
softpipe, which is only more likely to catch timeouts

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10708>

3 years agoturnip: Claim 2 discrete queue priorities.
Eric Anholt [Mon, 26 Apr 2021 18:12:19 +0000 (11:12 -0700)]
turnip: Claim 2 discrete queue priorities.

The spec requires at least 2, but says "No specific guarantees are made
about higher priority queues receiving more processing time or better
quality of service than lower priority queues."  So, we can just leave the
priorities as a stub.

Fixes dEQP-VK.info.device_properties

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

3 years agoturnip: Drop wideLines properties since we don't support wide lines.
Eric Anholt [Mon, 26 Apr 2021 18:08:20 +0000 (11:08 -0700)]
turnip: Drop wideLines properties since we don't support wide lines.

The blob doesn't expose wideLines either, and
dEQP-VK.info.device_properties fails if you claim wide line properties
without it.

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

3 years agopan/midgard: Don't emit zero padding
Tomeu Vizoso [Fri, 13 Dec 2019 08:38:36 +0000 (09:38 +0100)]
pan/midgard: Don't emit zero padding

util_dynarray_grow_bytes doesn't cope well with zero grow bytes.

../mesa/src/util/u_dynarray.h:134:8: runtime error: division by zero
    #0 0xffffa2d99288 in util_dynarray_grow_bytes ../mesa/src/util/u_dynarray.h:134
    #1 0xffffa2d99288 in emit_alu_bundle ../mesa/src/panfrost/midgard/midgard_emit.c:350
    #2 0xffffa2d99288 in emit_binary_bundle ../mesa/src/panfrost/midgard/midgard_emit.c:390
    #3 0xffffa2d738a8 in midgard_compile_shader_nir ../mesa/src/panfrost/midgard/midgard_compile.c:2740
    #4 0xffffa2cc8aa8 in panfrost_shader_compile ../mesa/src/gallium/drivers/panfrost/pan_assemble.c:68
    #5 0xffffa2c9918c in panfrost_bind_shader_state ../mesa/src/gallium/drivers/panfrost/pan_context.c:2015
    #6 0xffffa0726d94 in st_update_vp ../mesa/src/mesa/state_tracker/st_atom_shader.c:238
    #7 0xffffa070e028 in st_validate_state ../mesa/src/mesa/state_tracker/st_atom.c:261
    #8 0xffffa06c30bc in prepare_draw ../mesa/src/mesa/state_tracker/st_draw.c:132
    #9 0xffffa06c30bc in st_draw_vbo ../mesa/src/mesa/state_tracker/st_draw.c:184
    #10 0xffffa167bb20 in _mesa_validated_drawrangeelements ../mesa/src/mesa/main/draw.c:816
    #11 0xffffa167c684 in _mesa_DrawElements ../mesa/src/mesa/main/draw.c:970
    #12 0xaaaadfa5b55c in glu::drawFromUserPointers(glu::RenderContext const&, unsigned int, int, glu::VertexArrayBinding const*, glu::PrimitiveList const&, glu::DrawUtilCallback*) (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x3b355c)
    #13 0xaaaadf9ce514 in deqp::gls::ShaderLibraryCase::execute() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x326514)
    #14 0xaaaadf9cfb38 in deqp::gls::ShaderLibraryCase::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x327b38)
    #15 0xaaaadf70cc9c in deqp::gles2::TestCaseWrapper::iterate(tcu::TestCase*) (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x64c9c)
    #16 0xaaaadfb9a47c in tcu::TestSessionExecutor::iterateTestCase(tcu::TestCase*) (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4f247c)
    #17 0xaaaadfb9b240 in tcu::TestSessionExecutor::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4f3240)
    #18 0xaaaadfb7a564 in tcu::App::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4d2564)
    #19 0xaaaadf70a20c in main (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x6220c)
    #20 0xffffaf1e12a8 in __libc_start_main ../csu/libc-start.c:308
    #21 0xaaaadf70a8dc  (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x628dc)

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10695>

3 years agopanfrost: Don't access members of NULL pointers
Tomeu Vizoso [Fri, 13 Dec 2019 08:22:18 +0000 (09:22 +0100)]
panfrost: Don't access members of NULL pointers

This fixes the following UBSAN warning:

../mesa/src/gallium/drivers/panfrost/pan_resource.c:889:16: runtime error: member access within null pointer of type 'struct panfrost_resource'
    #0 0xffff79787a1c in panfrost_resource_get_stencil ../mesa/src/gallium/drivers/panfrost/pan_resource.c:889
    #1 0xffff7997af44 in u_transfer_helper_resource_destroy ../mesa/src/gallium/auxiliary/util/u_transfer_helper.c:141
    #2 0xffff77187f14 in pipe_resource_reference ../mesa/src/gallium/auxiliary/util/u_inlines.h:150
    #3 0xffff77187f14 in st_bufferobj_free ../mesa/src/mesa/state_tracker/st_cb_bufferobjects.c:87
    #4 0xffff774be848 in _mesa_reference_buffer_object_ ../mesa/src/mesa/main/bufferobj.c:504
    #5 0xffff77c2cb3c in _vbo_DestroyContext ../mesa/src/mesa/vbo/vbo_context.c:208
    #6 0xffff771bd854 in st_destroy_context ../mesa/src/mesa/state_tracker/st_context.c:1082
    #7 0xffff76f4b3cc in dri_destroy_context ../mesa/src/gallium/state_trackers/dri/dri_context.c:245
    #8 0xffff76f298a0 in driDestroyContext ../mesa/src/mesa/drivers/dri/common/dri_util.c:528
    #9 0xffff863ac118 in dri2_destroy_context ../mesa/src/egl/drivers/dri2/egl_dri2.c:1463
    #10 0xffff86372484 in eglDestroyContext ../mesa/src/egl/main/eglapi.c:826
    #11 0xaaaabf5ebe24 in tcu::surfaceless::EglRenderContext::~EglRenderContext() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x63e24)
    #12 0xaaaabf5ebeb8 in tcu::surfaceless::EglRenderContext::~EglRenderContext() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x63eb8)
    #13 0xaaaabf5ece30 in deqp::gles2::TestPackage::deinit() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x64e30)
    #14 0xaaaabfaabad0 in tcu::TestHierarchyIterator::next() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x523ad0)
    #15 0xaaaabfa7b65c in tcu::TestSessionExecutor::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4f365c)
    #16 0xaaaabfa5a564 in tcu::App::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4d2564)
    #17 0xaaaabf5ea20c in main (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x6220c)
    #18 0xffff85d322a8 in __libc_start_main ../csu/libc-start.c:308
    #19 0xaaaabf5ea8dc  (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x628dc)

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10695>

3 years agopanfrost: Drop panfrost_fence in favour of pipe_fence_handle
Alyssa Rosenzweig [Fri, 7 May 2021 16:34:44 +0000 (12:34 -0400)]
panfrost: Drop panfrost_fence in favour of pipe_fence_handle

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

3 years agolavapipe: report allocation-error
Erik Faye-Lund [Fri, 7 May 2021 10:20:26 +0000 (12:20 +0200)]
lavapipe: report allocation-error

If we fail to create an image, we need to report this, otherwise we'll
start doing crazy stuff, like reporting a required size of zero.

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

3 years agollvmpipe: allow calculating size of overly large texture
Erik Faye-Lund [Fri, 7 May 2021 11:04:00 +0000 (13:04 +0200)]
llvmpipe: allow calculating size of overly large texture

We need this for Lavapipe; we shouldn't fail to create an vkImage that
is too large, we should instead fail to allocate memory for it.

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

3 years agolavapipe: report out-of-memory when binding
Erik Faye-Lund [Fri, 7 May 2021 11:34:52 +0000 (13:34 +0200)]
lavapipe: report out-of-memory when binding

This isn't the perfect error-code, but we don't really have anything
better, it seems.

The ideal fix here would be to fix LLVMpipe to support larger textures,
but this is probably as far as I'm interested in chasing down this path
for now.

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

3 years agogallium: allow to report errors from p_screen::resource_bind_backing
Erik Faye-Lund [Fri, 7 May 2021 11:31:28 +0000 (13:31 +0200)]
gallium: allow to report errors from p_screen::resource_bind_backing

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

3 years agozink: check for error when binding memory
Erik Faye-Lund [Mon, 10 May 2021 13:31:18 +0000 (15:31 +0200)]
zink: check for error when binding memory

If binding fails, we don't really have a valid image. So let's make sure
we free up the memory sooner rather than later.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10689>

3 years agost/mesa: do not take util_logbase2 of a negative size
Erik Faye-Lund [Fri, 7 May 2021 12:31:08 +0000 (14:31 +0200)]
st/mesa: do not take util_logbase2 of a negative size

It's possible to get all width, height and depth as negative here, and
if we take the util_logbase2 of that, we get a nonsense value that might
be outside of the range the driver supports. So let's clamp to zero here
to avoid having to make the drivers overly pessimistic about what the
state-tracker demands.

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

3 years agodocs/perfetto: Updates for freedreno and render-stages
Rob Clark [Wed, 5 May 2021 21:58:32 +0000 (14:58 -0700)]
docs/perfetto: Updates for freedreno and render-stages

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agopps: Add a more interesting cfg example
Rob Clark [Wed, 5 May 2021 19:07:14 +0000 (12:07 -0700)]
pps: Add a more interesting cfg example

Includes counters and renderstages, as well as CPU process/freq, vblank,
dma_fence, etc.  This is a more reasonable starting point for system
level tracing.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agofreedreno: Add perfetto renderpass support
Rob Clark [Mon, 22 Mar 2021 22:52:15 +0000 (15:52 -0700)]
freedreno: Add perfetto renderpass support

Add a custom DataSource to provide trace events for render stages.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agofreedreno: Moar header C++-proofing
Rob Clark [Mon, 22 Mar 2021 22:33:36 +0000 (15:33 -0700)]
freedreno: Moar header C++-proofing

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agofreedreno/pps: Detect GPU suspend on newer kernels
Rob Clark [Wed, 24 Mar 2021 23:02:06 +0000 (16:02 -0700)]
freedreno/pps: Detect GPU suspend on newer kernels

We can avoid re-sending the configuration cmdstream constantly if we
know the device has not suspended since the last sampling period.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agofreedreno/drm: Add support to query device suspend count
Rob Clark [Wed, 24 Mar 2021 22:48:37 +0000 (15:48 -0700)]
freedreno/drm: Add support to query device suspend count

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agogallium/aux: Add perfetto support to u_trace
Rob Clark [Mon, 22 Mar 2021 20:25:49 +0000 (13:25 -0700)]
gallium/aux: Add perfetto support to u_trace

Not really direct perfetto support, but add a way that tracepoints can
be associated with a driver provided callback which can generate
perfetto events using the timestamps collected on the GPU.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agofreedreno: Add freedreno pps driver
Rob Clark [Wed, 17 Mar 2021 18:27:30 +0000 (11:27 -0700)]
freedreno: Add freedreno pps driver

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agoutil/perfetto: Add one-time init
Rob Clark [Mon, 22 Mar 2021 17:55:35 +0000 (10:55 -0700)]
util/perfetto: Add one-time init

Various places around mesa which might want to register a data-source,
etc, should call util_perfetto_init() first to ensure we connect to the
tracing service.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agopps: Lower min sampling interval
Rob Clark [Thu, 25 Mar 2021 18:56:37 +0000 (11:56 -0700)]
pps: Lower min sampling interval

A shorter interval lets us have more granularity to see counter changes
per tile pass.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>

3 years agoradv: stop special-casing multi-planar formats in radv_get_modifier_flags
Simon Ser [Tue, 4 May 2021 15:18:51 +0000 (17:18 +0200)]
radv: stop special-casing multi-planar formats in radv_get_modifier_flags

In radv_get_modifier_flags, we had a special case for multi-planar
formats. However ac_is_modifier_supported should already take care of
rejecting unsupported modifiers for multi-planar buffers.

Some time ago, ac_is_modifier_supported rejected any non-linear modifier
for multi-planar formats. 35e25ea1d07c ("ac/surface: allow non-DCC modifiers
for YUV on GFX9+") changed that to allow non-DCC modifiers with
multi-planar formats on GFX9+. Since then, the radv check has been out
of sync.

A similar patch was applied to radeonsi in 979e13869538 ("radeonsi: stop
special-casing YUV formats in si_query_dmabuf_modifiers").

This fixes tiling artifacts with NV12 buffers.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10623>

3 years agonouveau/mm: remove unused nouveau_mm_allocation.next field
Karol Herbst [Wed, 28 Apr 2021 12:39:06 +0000 (14:39 +0200)]
nouveau/mm: remove unused nouveau_mm_allocation.next field

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8765>

3 years agonouveau/mm: pass mm_bucket to mm_slab_new
Karol Herbst [Wed, 27 Jan 2021 09:43:06 +0000 (10:43 +0100)]
nouveau/mm: pass mm_bucket to mm_slab_new

We relied on mm_slab_new choosing the same bucket the caller used, just
pass it in.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8765>

3 years agonouveau: fix race in nouveau_screen_get_name
Karol Herbst [Tue, 26 Jan 2021 14:36:05 +0000 (15:36 +0100)]
nouveau: fix race in nouveau_screen_get_name

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

3 years agoclover/memory: fix data race in buffer subclasses
Karol Herbst [Wed, 27 Jan 2021 21:09:16 +0000 (22:09 +0100)]
clover/memory: fix data race in buffer subclasses

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8765>

3 years agoradv,aco: compact vertex buffer descriptors
Rhys Perry [Tue, 1 Dec 2020 17:05:14 +0000 (17:05 +0000)]
radv,aco: compact vertex buffer descriptors

It seems common for there to be holes.

fossil-db (GFX10.3, robustBufferAccess enabled):
Totals from 33791 (23.10% of 146267) affected shaders:
(no statistics changed)

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

3 years agoRevert "radv,aco: don't use MUBUF for multi-channel loads on GFX8 with robustness2"
Rhys Perry [Wed, 20 Jan 2021 16:05:04 +0000 (16:05 +0000)]
Revert "radv,aco: don't use MUBUF for multi-channel loads on GFX8 with robustness2"

This reverts commit a8a6b9fb2fdcb1bea55707fa0c2b8e96f03c6b5b.

This is no longer necessary now that we fixup the size when creating the
descriptors.

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

3 years agoradv,aco: use per-attribute vertex descriptors for robustness
Rhys Perry [Tue, 1 Dec 2020 17:41:16 +0000 (17:41 +0000)]
radv,aco: use per-attribute vertex descriptors for robustness

We have to use a different num_records for each attribute to correctly
implement robust buffer access.

fossil-db (GFX10.3, robustBufferAccess enabled):
Totals from 60059 (41.06% of 146267) affected shaders:
VGPRs: 2169040 -> 2169024 (-0.00%); split: -0.02%, +0.02%
CodeSize: 79473128 -> 81156016 (+2.12%); split: -0.00%, +2.12%
MaxWaves: 1635360 -> 1635258 (-0.01%); split: +0.00%, -0.01%
Instrs: 15559040 -> 15793205 (+1.51%); split: -0.01%, +1.52%
Latency: 90954792 -> 91308768 (+0.39%); split: -0.30%, +0.69%
InvThroughput: 14937873 -> 14958761 (+0.14%); split: -0.04%, +0.18%
VClause: 444280 -> 412074 (-7.25%); split: -9.22%, +1.97%
SClause: 588545 -> 644141 (+9.45%); split: -0.54%, +9.99%
Copies: 1010395 -> 1011232 (+0.08%); split: -0.44%, +0.53%
Branches: 274279 -> 274282 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1431171 -> 1405056 (-1.82%); split: -2.89%, +1.07%
PreVGPRs: 1575253 -> 1575259 (+0.00%)

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

3 years agoaco: group loads from the same vertex binding into the same clause
Rhys Perry [Mon, 30 Nov 2020 17:53:23 +0000 (17:53 +0000)]
aco: group loads from the same vertex binding into the same clause

In the future, we might have vertex attribute loads from the same binding
but with different descriptors. Since they will be loading from the same
buffer, we should continue grouping them into clauses.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7871>

3 years agoradv: Properly enable Wave32 mode for NGG GS.
Timur Kristóf [Fri, 7 May 2021 11:09:19 +0000 (13:09 +0200)]
radv: Properly enable Wave32 mode for NGG GS.

The condition for enabling it was incorrect, and was always false.
Therefore, it was never really enabled.

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

3 years agoradv: Ignore GS copy shader when determining NGG GS wave size.
Timur Kristóf [Fri, 7 May 2021 11:06:08 +0000 (13:06 +0200)]
radv: Ignore GS copy shader when determining NGG GS wave size.

The GS copy shader is not used with NGG GS.
This fixes a big bug when NGG GS is running in Wave32 mode.

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

3 years agoci/broadcom: update expected results
Juan A. Suarez Romero [Fri, 7 May 2021 15:32:48 +0000 (17:32 +0200)]
ci/broadcom: update expected results

Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10694>

3 years agonir: skip assert check with empty structs
Tapani Pälli [Fri, 7 May 2021 07:33:07 +0000 (10:33 +0300)]
nir: skip assert check with empty structs

Fixes issues with upcoming CTS test testing empty structs.

v2: decorate with UNUSED as only used in assert (Timothy)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10681>

3 years agoagx: Set reads_tib appropriately
Alyssa Rosenzweig [Mon, 10 May 2021 01:05:07 +0000 (21:05 -0400)]
agx: Set reads_tib appropriately

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoagx: Implement load_output
Alyssa Rosenzweig [Wed, 5 May 2021 03:00:55 +0000 (23:00 -0400)]
agx: Implement load_output

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoagx: Condition writeout ops on already being emitted
Alyssa Rosenzweig [Mon, 10 May 2021 01:01:34 +0000 (21:01 -0400)]
agx: Condition writeout ops on already being emitted

There's a lot of r/e waiting here, but will be needed for ld_tile. Match
the Metal blob.

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

3 years agoagx: Assume lower_fragcolor has been called
Alyssa Rosenzweig [Wed, 5 May 2021 02:55:37 +0000 (22:55 -0400)]
agx: Assume lower_fragcolor has been called

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoagx: Add ld_tile opcode
Alyssa Rosenzweig [Wed, 5 May 2021 02:50:25 +0000 (22:50 -0400)]
agx: Add ld_tile opcode

Variant of st_tile.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoagx: Rename blend -> st_tile
Alyssa Rosenzweig [Wed, 5 May 2021 02:44:54 +0000 (22:44 -0400)]
agx: Rename blend -> st_tile

For symmetry.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoagx: Implement blend constant color sysvals
Alyssa Rosenzweig [Wed, 5 May 2021 02:37:15 +0000 (22:37 -0400)]
agx: Implement blend constant color sysvals

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoagx: Return agx_instr* from emit_intrinsic
Alyssa Rosenzweig [Wed, 5 May 2021 02:42:07 +0000 (22:42 -0400)]
agx: Return agx_instr* from emit_intrinsic

Aesthetically useful.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoasahi: Pass through "reads tilebuffer?" bit
Alyssa Rosenzweig [Mon, 10 May 2021 01:04:38 +0000 (21:04 -0400)]
asahi: Pass through "reads tilebuffer?" bit

To be determined if there's more to this, but it's the only bit I see
varying with Metal when blending is enabled.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoasahi: Fix shader key hash function
Alyssa Rosenzweig [Mon, 10 May 2021 00:56:27 +0000 (20:56 -0400)]
asahi: Fix shader key hash function

Fixes: 080b05e29e1 ("asahi: Add Gallium driver")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoasahi: Call nir_lower_fragcolor
Alyssa Rosenzweig [Wed, 5 May 2021 02:55:26 +0000 (22:55 -0400)]
asahi: Call nir_lower_fragcolor

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoasahi: Add blend constant system value
Alyssa Rosenzweig [Wed, 5 May 2021 02:33:35 +0000 (22:33 -0400)]
asahi: Add blend constant system value

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoasahi: Implement set_blend_color
Alyssa Rosenzweig [Wed, 5 May 2021 02:29:18 +0000 (22:29 -0400)]
asahi: Implement set_blend_color

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoasahi: Garbage collect bind_state
Alyssa Rosenzweig [Wed, 5 May 2021 02:27:46 +0000 (22:27 -0400)]
asahi: Garbage collect bind_state

From noop.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoasahi: Call nir_lower_blend with selected key
Alyssa Rosenzweig [Mon, 10 May 2021 00:57:54 +0000 (20:57 -0400)]
asahi: Call nir_lower_blend with selected key

Also need to key to pipe formats.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoasahi: Augment Gallium key with blend state
Alyssa Rosenzweig [Wed, 5 May 2021 02:20:39 +0000 (22:20 -0400)]
asahi: Augment Gallium key with blend state

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agoasahi: Translate blend CSO to lower_blend options
Alyssa Rosenzweig [Wed, 5 May 2021 02:20:50 +0000 (22:20 -0400)]
asahi: Translate blend CSO to lower_blend options

We'll just stick this in the key.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720>

3 years agozink: rework memory_barrier hook again (third time's the charm)
Mike Blumenkrantz [Wed, 7 Apr 2021 15:00:06 +0000 (11:00 -0400)]
zink: rework memory_barrier hook again (third time's the charm)

this improves granularity for the barriers and is more in line with the
spec for glMemoryBarrier

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

3 years agozink: fix texture barriers for real this time
Mike Blumenkrantz [Thu, 8 Apr 2021 16:38:06 +0000 (12:38 -0400)]
zink: fix texture barriers for real this time

according to spec, this is supposed to handle fragment shader fetch
from previous draw output, not color output readback from previous
color output write

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