platform/upstream/mesa.git
3 years agogbm: Consolidate env var and default backend loops
James Jones [Sat, 14 Dec 2019 00:20:02 +0000 (16:20 -0800)]
gbm: Consolidate env var and default backend loops

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>

3 years agogbm: Create device directly in find_backend
James Jones [Sat, 14 Dec 2019 00:14:41 +0000 (16:14 -0800)]
gbm: Create device directly in find_backend

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>

3 years agogbm: Inline load_backend function content
James Jones [Fri, 13 Dec 2019 23:54:53 +0000 (15:54 -0800)]
gbm: Inline load_backend function content

It was a functional no-op with the currently
available backends (Only DRI), and its implied
intended functionality is implemented elsewhere
in subsequent patches.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>

3 years agogbm: Remove stat and refcount fields from gbm_device
James Jones [Wed, 2 Jun 2021 00:35:27 +0000 (17:35 -0700)]
gbm: Remove stat and refcount fields from gbm_device

These were unused.

Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>

3 years agoutil/vbuf: check 3-component 16bit int formats for translation
Mike Blumenkrantz [Mon, 5 Jul 2021 14:28:13 +0000 (10:28 -0400)]
util/vbuf: check 3-component 16bit int formats for translation

some drivers don't support these

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

3 years agolavapipe: handle null vertex buffers more gracefully
Mike Blumenkrantz [Mon, 5 Jul 2021 22:01:16 +0000 (18:01 -0400)]
lavapipe: handle null vertex buffers more gracefully

this should propagate down to be handled correctly in llvmpipe

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

3 years agopanfrost: Only clear existing color buffers
luc [Mon, 21 Jun 2021 23:41:44 +0000 (07:41 +0800)]
panfrost: Only clear existing color buffers

    in case that only one cbuf allocated but all clear bits set,
    the driver will crash due to null pointer dereference.

Signed-off-by: luc <onion0709@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11515>

3 years agoRevert "panfrost: Fix crc_valid condition"
Icecream95 [Thu, 17 Jun 2021 11:26:28 +0000 (23:26 +1200)]
Revert "panfrost: Fix crc_valid condition"

This "fix" is no longer needed now we write CRC data correctly for
partial writes.

This reverts commit a78487f795e81c8fc27c2d1054f58dd35eda8c3a.

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

3 years agopanfrost: Set bound dimensions to framebuffer size
Icecream95 [Thu, 17 Jun 2021 11:31:20 +0000 (23:31 +1200)]
panfrost: Set bound dimensions to framebuffer size

Otherwise CRC calculation will miss the pixels outside the extent
bounds but still in a tile that is rendered.

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

3 years agoac: fix win32 build
Dave Airlie [Tue, 6 Jul 2021 04:07:15 +0000 (14:07 +1000)]
ac: fix win32 build

Fixes: e2e9dd44f422 ("ac/surface: Handle non-retiled displayable DCC correctly for modifiers.")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11725>

3 years agoasahi: Use XML for interpolation packet
Alyssa Rosenzweig [Tue, 6 Jul 2021 03:17:33 +0000 (23:17 -0400)]
asahi: Use XML for interpolation packet

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

3 years agoasahi: Enable primitive restart
Alyssa Rosenzweig [Tue, 6 Jul 2021 01:53:09 +0000 (21:53 -0400)]
asahi: Enable primitive restart

Passes dEQP-GLES3.functional.primitive_restart.* except for a flake.

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

3 years agoasahi: Set data_valid for the depth buffer
Alyssa Rosenzweig [Tue, 6 Jul 2021 00:14:58 +0000 (20:14 -0400)]
asahi: Set data_valid for the depth buffer

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

3 years agoasahi: Identify attachment length field
Alyssa Rosenzweig [Tue, 6 Jul 2021 00:14:22 +0000 (20:14 -0400)]
asahi: Identify attachment length field

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

3 years agoasahi: Use GenXML for main bind fragment
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:56:22 +0000 (19:56 -0400)]
asahi: Use GenXML for main bind fragment

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

3 years agoasahi: Extend IOGPU header to contain encoder
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:50:13 +0000 (19:50 -0400)]
asahi: Extend IOGPU header to contain encoder

Let's squash together all the resulting zeroes. Trying to discern some structure out of this.

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

3 years agoasahi: Move IOGPU header to XML
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:45:41 +0000 (19:45 -0400)]
asahi: Move IOGPU header to XML

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

3 years agoasahi: Identify "command buffer" size field in map
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:38:47 +0000 (19:38 -0400)]
asahi: Identify "command buffer" size field in map

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

3 years agoasahi: Parametrize software "command buffer" size
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:37:15 +0000 (19:37 -0400)]
asahi: Parametrize software "command buffer" size

Will vary depending on # of attachments.

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

3 years agoasahi: Sync attachment magic with asahi demo
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:27:45 +0000 (19:27 -0400)]
asahi: Sync attachment magic with asahi demo

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

3 years agoasahi: Add XML for the attachment structure
Alyssa Rosenzweig [Mon, 5 Jul 2021 23:26:20 +0000 (19:26 -0400)]
asahi: Add XML for the attachment structure

We need a lot more control over these magic structures to get Z/S attachments working correctly. This is an early start.

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

3 years agoasahi: Skip over holes in the vbufs
Alyssa Rosenzweig [Mon, 5 Jul 2021 21:32:34 +0000 (17:32 -0400)]
asahi: Skip over holes in the vbufs

Fixes dEQP-GLES2.functional.vertex_arrays.multiple_attributes.stride.3_float2_17_float2_17_float2_0

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

3 years agoasahi: Comment on an embedded data structure
Alyssa Rosenzweig [Mon, 5 Jul 2021 21:01:44 +0000 (17:01 -0400)]
asahi: Comment on an embedded data structure

This file makes me sad :'(

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

3 years agoasahi: Flush for accesses to Z/S buffer
Alyssa Rosenzweig [Mon, 5 Jul 2021 20:48:20 +0000 (16:48 -0400)]
asahi: Flush for accesses to Z/S buffer

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

3 years agoasahi: Implement the stencil test
Alyssa Rosenzweig [Mon, 5 Jul 2021 20:01:13 +0000 (16:01 -0400)]
asahi: Implement the stencil test

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

3 years agoasahi: Prepack rasterizer faces
Alyssa Rosenzweig [Mon, 5 Jul 2021 20:00:45 +0000 (16:00 -0400)]
asahi: Prepack rasterizer faces

A bit more efficient and will allow easy implementation of the stencil test.

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

3 years agoasahi: Fix meson dependency on packing in compiler
Alyssa Rosenzweig [Tue, 6 Jul 2021 13:41:15 +0000 (09:41 -0400)]
asahi: Fix meson dependency on packing in compiler

Closes: #5030
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Fixes: 6a657b17b9b ("agx: Remap fragment shader varyings explicitly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11730>

3 years agoradv: implement VK_EXT_multi_draw
Mike Blumenkrantz [Wed, 30 Jun 2021 14:01:58 +0000 (10:01 -0400)]
radv: implement VK_EXT_multi_draw

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

3 years agoradv: add a gfx10 bug workaround for NOT_EOP
Mike Blumenkrantz [Wed, 19 May 2021 14:32:29 +0000 (10:32 -0400)]
radv: add a gfx10 bug workaround for NOT_EOP

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

3 years agoradv: split indexed draw cases based on whether drawid is used
Mike Blumenkrantz [Wed, 19 May 2021 14:25:11 +0000 (10:25 -0400)]
radv: split indexed draw cases based on whether drawid is used

fewer conditionals in the draw loop = less overhead

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

3 years agoradv: determine if hardware can emit NOT_EOP before emitting
Mike Blumenkrantz [Tue, 22 Jun 2021 17:05:17 +0000 (13:05 -0400)]
radv: determine if hardware can emit NOT_EOP before emitting

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

3 years agoradv: emit drawid for multidraws
Mike Blumenkrantz [Wed, 27 Jan 2021 22:33:15 +0000 (17:33 -0500)]
radv: emit drawid for multidraws

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

3 years agoradv: emit NOT_EOP for multi indexed draws
Mike Blumenkrantz [Tue, 30 Mar 2021 20:17:09 +0000 (16:17 -0400)]
radv: emit NOT_EOP for multi indexed draws

this is never emitted currently because drawCount is always 1

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

3 years agoradv: use multidraw iteration for direct draws
Mike Blumenkrantz [Tue, 30 Mar 2021 20:24:01 +0000 (16:24 -0400)]
radv: use multidraw iteration for direct draws

there's still no arrays of draw info being passed, but this takes care of
all the work for it

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

3 years agoradv: use null vertex descriptor if num_records=0
Rhys Perry [Tue, 29 Jun 2021 17:54:45 +0000 (18:54 +0100)]
radv: use null vertex descriptor if num_records=0

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11642>

3 years agoradv: adjust num_records when offset>stride
Rhys Perry [Tue, 29 Jun 2021 15:30:00 +0000 (16:30 +0100)]
radv: adjust num_records when offset>stride

If an attribute's offset is larger than the stride, the compiler will
increase the vertex index and use offset%stride instead as the offset.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5007
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11642>

3 years agoradv: don't ever convert num_records to bytes if it's zero
Rhys Perry [Tue, 29 Jun 2021 15:18:55 +0000 (16:18 +0100)]
radv: don't ever convert num_records to bytes if it's zero

If num_records==0, this conversion doesn't work. We should just keep it at
zero.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5007
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11642>

3 years agocrocus: enable threaded context support
Dave Airlie [Mon, 5 Jul 2021 07:13:48 +0000 (17:13 +1000)]
crocus: enable threaded context support

Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Tested-by: Matti Hämäläinen <ccr@tnsp.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>

3 years agocrocus: add unsync transfer pool
Dave Airlie [Mon, 5 Jul 2021 05:59:42 +0000 (15:59 +1000)]
crocus: add unsync transfer pool

Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>

3 years agocrocus/tc: init/deinit threaded resource
Dave Airlie [Mon, 5 Jul 2021 05:50:08 +0000 (15:50 +1000)]
crocus/tc: init/deinit threaded resource

Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>

3 years agocrocus: use threaded context base classes
Dave Airlie [Mon, 5 Jul 2021 05:46:54 +0000 (15:46 +1000)]
crocus: use threaded context base classes

should be a pretty non-functional change

Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>

3 years agocrocus: support rebinding streamout target buffers
Dave Airlie [Tue, 6 Jul 2021 03:21:58 +0000 (13:21 +1000)]
crocus: support rebinding streamout target buffers

Reviewed-by: Zoltán Böszörményi <zboszor@pr.hu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11710>

3 years agoac/surface: Handle non-retiled displayable DCC correctly for modifiers.
Bas Nieuwenhuizen [Sun, 2 May 2021 01:51:29 +0000 (03:51 +0200)]
ac/surface: Handle non-retiled displayable DCC correctly for modifiers.

There is some hardware with num_render_backends == 1, but the number
of render backends in GB_ADDR_CFG > 1. Turns out this can be turned
off by making them rb unaligned which is valid with only 1 render
backend.

Fixes: 0833dd7d124 ("amd/common: Add support for modifiers.")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10575>

3 years agofeatures: mark off EXT_vertex_input_dynamic_state for lavapipe
Mike Blumenkrantz [Mon, 5 Jul 2021 22:25:33 +0000 (18:25 -0400)]
features: mark off EXT_vertex_input_dynamic_state for lavapipe

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

3 years agofeatures: add VK_EXT_multi_draw
Mike Blumenkrantz [Mon, 5 Jul 2021 21:51:15 +0000 (17:51 -0400)]
features: add VK_EXT_multi_draw

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

3 years agofeatures: fix ARB_shader_group_vote -> GL_ARB_shader_group_vote
Mike Blumenkrantz [Mon, 5 Jul 2021 21:44:03 +0000 (17:44 -0400)]
features: fix ARB_shader_group_vote -> GL_ARB_shader_group_vote

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

3 years agofeatures: mark off some zink features
Mike Blumenkrantz [Mon, 5 Jul 2021 21:43:53 +0000 (17:43 -0400)]
features: mark off some zink features

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

3 years agofeatures: mark off line rasterization for lavapipe
Mike Blumenkrantz [Mon, 5 Jul 2021 21:29:04 +0000 (17:29 -0400)]
features: mark off line rasterization for lavapipe

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

3 years agorelnotes: add some line feature updates for lavapipe
Mike Blumenkrantz [Mon, 5 Jul 2021 15:22:35 +0000 (11:22 -0400)]
relnotes: add some line feature updates for lavapipe

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

3 years agoasahi: Handle nonzero first_level
Alyssa Rosenzweig [Mon, 5 Jul 2021 17:01:33 +0000 (13:01 -0400)]
asahi: Handle nonzero first_level

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

3 years agoasahi: Wire in u_blitter
Alyssa Rosenzweig [Mon, 5 Jul 2021 16:57:44 +0000 (12:57 -0400)]
asahi: Wire in u_blitter

Fixes dEQP-GLES3.functional.fbo.color.repeated_clear.blit.tex2d.rgba8

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

3 years agoasahi: Track more Gallium state
Alyssa Rosenzweig [Mon, 5 Jul 2021 16:56:23 +0000 (12:56 -0400)]
asahi: Track more Gallium state

Needed to feed u_blitter.

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

3 years agoasahi: Set vertex texture/sampler counts
Alyssa Rosenzweig [Mon, 5 Jul 2021 16:23:09 +0000 (12:23 -0400)]
asahi: Set vertex texture/sampler counts

Fixes

dEQP-GLES2.functional.shaders.texture_functions.vertex.texture2d

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

3 years agoasahi: Identify vertex texture/sampler counts
Alyssa Rosenzweig [Mon, 5 Jul 2021 16:21:06 +0000 (12:21 -0400)]
asahi: Identify vertex texture/sampler counts

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

3 years agoasahi: Identify texture/sampler count fields
Alyssa Rosenzweig [Mon, 5 Jul 2021 16:09:05 +0000 (12:09 -0400)]
asahi: Identify texture/sampler count fields

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

3 years agoasahi: Fail on LOD clamps/bias
Alyssa Rosenzweig [Mon, 5 Jul 2021 16:00:55 +0000 (12:00 -0400)]
asahi: Fail on LOD clamps/bias

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

3 years agoagx: Handle txl
Alyssa Rosenzweig [Mon, 5 Jul 2021 03:27:01 +0000 (23:27 -0400)]
agx: Handle txl

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

3 years agoagx: Legalize LOD sources to be 16-bit only
Alyssa Rosenzweig [Mon, 5 Jul 2021 03:26:07 +0000 (23:26 -0400)]
agx: Legalize LOD sources to be 16-bit only

I'm not convinced this is /right/ but it's a step.

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

3 years agoagx: Fix lod_mode shift
Alyssa Rosenzweig [Mon, 5 Jul 2021 03:25:36 +0000 (23:25 -0400)]
agx: Fix lod_mode shift

Was zero before so didn't notice the bug.

Fixes: 9f555388342 ("agx: Pack texture ops")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>

3 years agoagx: Pack LOD descriptors
Alyssa Rosenzweig [Mon, 5 Jul 2021 03:24:52 +0000 (23:24 -0400)]
agx: Pack LOD descriptors

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

3 years agoagx: Fix LOD_MIN enum
Alyssa Rosenzweig [Mon, 5 Jul 2021 03:24:37 +0000 (23:24 -0400)]
agx: Fix LOD_MIN enum

Fixes: 2470a080d29 ("agx: Stub NIR backend compiler")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>

3 years agoagx: Fix 32-bit bitwise shifts
Alyssa Rosenzweig [Sun, 4 Jul 2021 22:44:34 +0000 (18:44 -0400)]
agx: Fix 32-bit bitwise shifts

Fixes dEQP-GLES2.functional.shaders.functions.qualifiers.const_int_fragment

Fixes: e50bae00f48 ("agx: Add 32-bit bitwise shifts")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>

3 years agoasahi: Add ASAHI_MESA_DEBUG=no16 option
Alyssa Rosenzweig [Sun, 4 Jul 2021 22:33:26 +0000 (18:33 -0400)]
asahi: Add ASAHI_MESA_DEBUG=no16 option

A lot of dEQP failures go away with 32-bit forced...

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

3 years agoasahi: Generalize varying linking
Alyssa Rosenzweig [Sun, 4 Jul 2021 22:25:36 +0000 (18:25 -0400)]
asahi: Generalize varying linking

Handles matrices now. Fixes

dEQP-GLES2.functional.shaders.matrix.add.dynamic_mediump_mat4_float_fragment

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

3 years agoasahi: Remove spurious varying assignment
Alyssa Rosenzweig [Sun, 4 Jul 2021 22:10:33 +0000 (18:10 -0400)]
asahi: Remove spurious varying assignment

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

3 years agoasahi: Remove spurious assignment
Alyssa Rosenzweig [Sun, 4 Jul 2021 20:24:24 +0000 (16:24 -0400)]
asahi: Remove spurious assignment

Doesn't seem necessary.

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

3 years agoasahi: Implement colour buffer reloads
Alyssa Rosenzweig [Sat, 26 Jun 2021 16:05:52 +0000 (12:05 -0400)]
asahi: Implement colour buffer reloads

Gets glmark2 -bdesktop working.

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

3 years agoasahi: Set fragment key for non-U8NORM render targets
Alyssa Rosenzweig [Sun, 4 Jul 2021 20:20:58 +0000 (16:20 -0400)]
asahi: Set fragment key for non-U8NORM render targets

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

3 years agoasahi: Add internal (renderable) formats to the table
Alyssa Rosenzweig [Sun, 4 Jul 2021 20:20:36 +0000 (16:20 -0400)]
asahi: Add internal (renderable) formats to the table

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

3 years agoasahi: Save zsbuf ptr
Alyssa Rosenzweig [Sat, 26 Jun 2021 19:23:34 +0000 (15:23 -0400)]
asahi: Save zsbuf ptr

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

3 years agoasahi: Add zsbuf to batch
Alyssa Rosenzweig [Sat, 26 Jun 2021 19:23:17 +0000 (15:23 -0400)]
asahi: Add zsbuf to batch

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

3 years agoasahi: Handle Z16_UNORM textures
Alyssa Rosenzweig [Sat, 26 Jun 2021 19:23:03 +0000 (15:23 -0400)]
asahi: Handle Z16_UNORM textures

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

3 years agoasahi: Always flush when setting framebuffer state
Alyssa Rosenzweig [Sat, 26 Jun 2021 18:05:02 +0000 (14:05 -0400)]
asahi: Always flush when setting framebuffer state

We don't have batch tracking yet.

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

3 years agoasahi: Guard for overflow when packing
Alyssa Rosenzweig [Sat, 26 Jun 2021 16:05:21 +0000 (12:05 -0400)]
asahi: Guard for overflow when packing

I'm not convinced this is right.

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

3 years agoasahi: Fix random *2
Alyssa Rosenzweig [Tue, 22 Jun 2021 02:10:27 +0000 (22:10 -0400)]
asahi: Fix random *2

Accidentally committed at some point.

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

3 years agoasahi: Wire in tgsi_to_nir
Alyssa Rosenzweig [Sun, 13 Jun 2021 15:28:59 +0000 (11:28 -0400)]
asahi: Wire in tgsi_to_nir

Gets GALLIUM_HUD working.

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

3 years agoagx: Track logical control flow graph
Alyssa Rosenzweig [Sat, 26 Jun 2021 15:10:37 +0000 (11:10 -0400)]
agx: Track logical control flow graph

Logic lifted from the Bifrost compiler, which was a copypaste of the Midgard
compiler, which was based on a faulty understanding of the v3d compiler,
which...

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

3 years agoagx: Lift agx_block_add_successor from Panfrost
Alyssa Rosenzweig [Sun, 23 May 2021 18:25:25 +0000 (14:25 -0400)]
agx: Lift agx_block_add_successor from Panfrost

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

3 years agoagx: Count write registers, not components
Alyssa Rosenzweig [Sat, 19 Jun 2021 18:33:12 +0000 (14:33 -0400)]
agx: Count write registers, not components

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

3 years agoagx: Mark sources that kill
Alyssa Rosenzweig [Sat, 19 Jun 2021 17:56:28 +0000 (13:56 -0400)]
agx: Mark sources that kill

Trivially computed during liveness analysis (already a byproduct!) and required
for efficient register allocation.

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

3 years agoagx: Add liveness analysis pass
Alyssa Rosenzweig [Sat, 19 Jun 2021 17:48:03 +0000 (13:48 -0400)]
agx: Add liveness analysis pass

Based on the Panfrost one, scalarized and with some silly things fixed.

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

3 years agoagx: Add agx_exit_block helper
Alyssa Rosenzweig [Sat, 19 Jun 2021 17:47:52 +0000 (13:47 -0400)]
agx: Add agx_exit_block helper

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

3 years agoagx: Pull out agx_write_components
Alyssa Rosenzweig [Sat, 19 Jun 2021 17:23:25 +0000 (13:23 -0400)]
agx: Pull out agx_write_components

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

3 years agoasahi: Unify varying linking code with vertex shaders
Alyssa Rosenzweig [Sun, 13 Jun 2021 00:57:36 +0000 (20:57 -0400)]
asahi: Unify varying linking code with vertex shaders

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

3 years agoagx: Remap fragment shader varyings explicitly
Alyssa Rosenzweig [Sun, 13 Jun 2021 00:47:45 +0000 (20:47 -0400)]
agx: Remap fragment shader varyings explicitly

Needed to handle fragcoord.z correctly, for example. Step 1, at least.

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

3 years agoagx: Rename agx_pack to agx_pack_binary
Alyssa Rosenzweig [Sun, 13 Jun 2021 00:46:51 +0000 (20:46 -0400)]
agx: Rename agx_pack to agx_pack_binary

Conflicts with GenXML.

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

3 years agoagx: Implement ld_vary_flat
Alyssa Rosenzweig [Sun, 6 Jun 2021 18:05:20 +0000 (14:05 -0400)]
agx: Implement ld_vary_flat

Not clear what any of this is for but let's be nice and match the blob.

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

3 years agoagx: Implement nir_intrinsic_load_frag_coord
Alyssa Rosenzweig [Sun, 6 Jun 2021 18:03:54 +0000 (14:03 -0400)]
agx: Implement nir_intrinsic_load_frag_coord

Depends on matching ABI.

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

3 years agoagx: Rename remap_varyings -> remap_varyings_vs
Alyssa Rosenzweig [Sun, 6 Jun 2021 17:28:02 +0000 (13:28 -0400)]
agx: Rename remap_varyings -> remap_varyings_vs

Want to do the same for fragment shaders.

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

3 years agoasahi: Identify varying descriptor fields
Alyssa Rosenzweig [Sun, 6 Jun 2021 17:22:50 +0000 (13:22 -0400)]
asahi: Identify varying descriptor fields

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

3 years agoagx: Add ld_vary_flat opcode
Alyssa Rosenzweig [Sun, 16 May 2021 18:14:49 +0000 (14:14 -0400)]
agx: Add ld_vary_flat opcode

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

3 years agoagx: Update ld_vary encoding mask
Alyssa Rosenzweig [Sun, 16 May 2021 18:13:04 +0000 (14:13 -0400)]
agx: Update ld_vary encoding mask

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

3 years agoagx: Add perspective bit to ld_var
Alyssa Rosenzweig [Sat, 5 Jun 2021 20:20:11 +0000 (16:20 -0400)]
agx: Add perspective bit to ld_var

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

3 years agoagx: Add agx_immediate_f helper
Alyssa Rosenzweig [Sat, 5 Jun 2021 20:19:58 +0000 (16:19 -0400)]
agx: Add agx_immediate_f helper

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

3 years agoagx: Mark components as ASSERTED
Alyssa Rosenzweig [Mon, 5 Jul 2021 20:42:54 +0000 (16:42 -0400)]
agx: Mark components as ASSERTED

Prevents a release build warning.

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

3 years agolavapipe: remove initialization override
Thomas H.P. Andersen [Sun, 4 Jul 2021 22:27:24 +0000 (00:27 +0200)]
lavapipe: remove initialization override

These are duplicates from a few lines up

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11703>

3 years agozink: remove initialization override
Thomas H.P. Andersen [Sun, 4 Jul 2021 22:03:45 +0000 (00:03 +0200)]
zink: remove initialization override

These are duplicates from a few lines up

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11703>

3 years agoradv: Support address capture and replay.
Bas Nieuwenhuizen [Fri, 30 Apr 2021 12:22:15 +0000 (14:22 +0200)]
radv: Support address capture and replay.

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

3 years agoradv/winsys: Add support for a fixed VA address for replay.
Bas Nieuwenhuizen [Mon, 23 Nov 2020 02:13:18 +0000 (03:13 +0100)]
radv/winsys: Add support for a fixed VA address for replay.

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

3 years agoradv/winsys: Return vulkan errors for buffer creation.
Bas Nieuwenhuizen [Wed, 28 Apr 2021 00:10:57 +0000 (02:10 +0200)]
radv/winsys: Return vulkan errors for buffer creation.

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