platform/upstream/mesa.git
3 years agonir_to_tgsi: Run copy prop (and thus dce) after lower_bool_to_float.
Emma Anholt [Tue, 6 Jul 2021 19:24:51 +0000 (12:24 -0700)]
nir_to_tgsi: Run copy prop (and thus dce) after lower_bool_to_float.

Fixes some i915g instruction count failures by eliminating some MOVs from
translating b2f32s.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11744>

3 years agoi915g: Fix writemasking of SEQ/SNE/SSG.
Emma Anholt [Tue, 6 Jul 2021 19:41:41 +0000 (12:41 -0700)]
i915g: Fix writemasking of SEQ/SNE/SSG.

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

3 years agosoftpipe: add missing sentinel to debug option array
Heinrich Fink [Tue, 6 Jul 2021 18:37:52 +0000 (20:37 +0200)]
softpipe: add missing sentinel to debug option array

Add DEBUG_NAMED_VALUE_END to finalize debug option array (see
lp_screen.c). Otherwise debug_get_flags_option might attempt to read
debug_named_value::name at an offset and SIGSEGV.

Signed-off-by: Heinrich Fink <hfink@snap.com>
Fixes: 991def0edc8 ("softpipe: Convert to comma-separated SOFTPIPE_DEBUG for debug options.")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11742>

3 years agoci: fix source-deps for radv on windows
Erik Faye-Lund [Tue, 6 Jul 2021 14:00:32 +0000 (16:00 +0200)]
ci: fix source-deps for radv on windows

If we're giong to build RADV on Windows, we need to make sure we trigger
the build on all RADV-changes.

Fixes: d18563ea58b ("ci: Update Windows image to build RADV")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11731>

3 years agoiris: Force device local memory for u_upload_mgr buffers
Kenneth Graunke [Thu, 1 Jul 2021 21:49:49 +0000 (14:49 -0700)]
iris: Force device local memory for u_upload_mgr buffers

We try to place persistent/coherent buffers from the application in
system memory, because they want the CPU-GPU coherency.

However, our internal u_upload_mgr buffers are also flagged persistent +
coherent, but we absolutely want most of them in device local memory.

Mark had done this correctly in an earlier patch series, but I made a
mistake when refactoring things during upstreaming, and accidentally
put these in SMEM again.  This fixes that mistake.

Tested-by: Luis Felipe Strano Moraes <luis.strano@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11681>

3 years agodocs: Add calendar entries for 21.2 release candidates.
Dylan Baker [Wed, 7 Jul 2021 19:23:11 +0000 (12:23 -0700)]
docs: Add calendar entries for 21.2 release candidates.

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

3 years agoAOSP: Do not add '-Wl,--gc-sections' to the linker arguments
Roman Stratiienko [Wed, 16 Jun 2021 15:00:06 +0000 (18:00 +0300)]
AOSP: Do not add '-Wl,--gc-sections' to the linker arguments

With '-Wl,--gc-sections' meson.build cc.has_function() will never fail,
providing wrong input to the build system.

Fixes: 8621bd8d5e67 ("android: Add scripts to build using meson")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11637>

3 years agolavapipe: disable line rasterization ext
Mike Blumenkrantz [Wed, 7 Jul 2021 13:14:04 +0000 (09:14 -0400)]
lavapipe: disable line rasterization ext

need to add some gallium hooks for line drawing mode before this can
be reliably supported

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

3 years agonir/format_convert: add ssa version of uint packing
Mike Blumenkrantz [Sat, 1 May 2021 15:45:28 +0000 (11:45 -0400)]
nir/format_convert: add ssa version of uint packing

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

3 years agonir/format_convert: nir_shift -> nir_shift_imm
Mike Blumenkrantz [Tue, 4 May 2021 18:08:09 +0000 (14:08 -0400)]
nir/format_convert: nir_shift -> nir_shift_imm

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

3 years agopanfrost: Remove unused midgard-pack.h includes
Alyssa Rosenzweig [Tue, 6 Jul 2021 22:17:02 +0000 (18:17 -0400)]
panfrost: Remove unused midgard-pack.h includes

Now only included from the per-gen file.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Remove pan_cmdstream.h
Alyssa Rosenzweig [Tue, 6 Jul 2021 22:15:54 +0000 (18:15 -0400)]
panfrost: Remove pan_cmdstream.h

Now empty.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Move sample accessor to pan_cmdstream
Alyssa Rosenzweig [Tue, 6 Jul 2021 22:14:11 +0000 (18:14 -0400)]
panfrost: Move sample accessor to pan_cmdstream

Not really arch-dependent but technically uses GenXML. This is pretty
trivial anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Clean up pan_cmdstream.h
Alyssa Rosenzweig [Tue, 6 Jul 2021 22:10:06 +0000 (18:10 -0400)]
panfrost: Clean up pan_cmdstream.h

We don't want other files accessing these functions except through the
vtables, since they will soon be architecture dependent.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Use vtable for fragment descriptor functions
Alyssa Rosenzweig [Tue, 6 Jul 2021 22:09:43 +0000 (18:09 -0400)]
panfrost: Use vtable for fragment descriptor functions

Arch dependent and not directly from Gallium.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Move panfrost_emit_tile_map to pan_job
Alyssa Rosenzweig [Tue, 6 Jul 2021 22:08:52 +0000 (18:08 -0400)]
panfrost: Move panfrost_emit_tile_map to pan_job

...where it's actually called. Saves us from using the vtable since this
isn't version-dependent.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Move launch_grid to pan_cmdstream
Alyssa Rosenzweig [Tue, 6 Jul 2021 22:07:26 +0000 (18:07 -0400)]
panfrost: Move launch_grid to pan_cmdstream

Same issues apply as for draw_vbo.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Don't ralloc panfrost_blend_state
Alyssa Rosenzweig [Tue, 6 Jul 2021 21:55:21 +0000 (17:55 -0400)]
panfrost: Don't ralloc panfrost_blend_state

Pointless divergence from other CSO creates.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Move blend CSO to cmdstream/context
Alyssa Rosenzweig [Tue, 6 Jul 2021 21:53:15 +0000 (17:53 -0400)]
panfrost: Move blend CSO to cmdstream/context

Create is hardware specifc, bind/delete/set_colour is not.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Split out prepare_rsd into a vtbl
Alyssa Rosenzweig [Tue, 6 Jul 2021 21:48:46 +0000 (17:48 -0400)]
panfrost: Split out prepare_rsd into a vtbl

This needs to be per-gen, but the rest of the caller does not, so let's
split this out. iris makes extensive use of this vtbl pattern for cold
paths like this one.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Move most CSO creates to pan_cmdstream.c
Alyssa Rosenzweig [Tue, 6 Jul 2021 21:33:30 +0000 (17:33 -0400)]
panfrost: Move most CSO creates to pan_cmdstream.c

These need to be conditionally compiled per-generation.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agopanfrost: Move draw_vbo to pan_cmdstream.c
Alyssa Rosenzweig [Tue, 6 Jul 2021 21:27:07 +0000 (17:27 -0400)]
panfrost: Move draw_vbo to pan_cmdstream.c

This needs to be conditionally compiled per-generation.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11745>

3 years agoaco: fix emitting a16 for MIMG instructions on GFX10+
Samuel Pitoiset [Tue, 6 Jul 2021 16:06:40 +0000 (18:06 +0200)]
aco: fix emitting a16 for MIMG instructions on GFX10+

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

3 years agoaco: fix emitting d16 for MIMG instructions on GFX9+
Samuel Pitoiset [Tue, 6 Jul 2021 16:06:10 +0000 (18:06 +0200)]
aco: fix emitting d16 for MIMG instructions on GFX9+

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

3 years agov3dv: account for dst offset of copy query results operations
Iago Toral Quiroga [Wed, 7 Jul 2021 09:52:17 +0000 (11:52 +0200)]
v3dv: account for dst offset of copy query results operations

This fixes several CTS tests with this pattern:
  dEQP-VK.query_pool.occlusion_query.copy_results*dstoffset

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

3 years agoci: Bump virglrenderer
Corentin Noël [Wed, 16 Jun 2021 17:31:52 +0000 (19:31 +0200)]
ci: Bump virglrenderer

Use the latest commit from master branch

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11572>

3 years agoci: Re-enable virgl tesselation shader
Corentin Noël [Wed, 23 Jun 2021 17:21:15 +0000 (19:21 +0200)]
ci: Re-enable virgl tesselation shader

Partially undoes c8c7450fc73b8 ("llvmpipe: move coroutines out of noopt case")
as the required features are now implemented in llvmpipe.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11572>

3 years agoagx: Ensure we don't overallocate registers
Alyssa Rosenzweig [Wed, 7 Jul 2021 02:11:31 +0000 (22:11 -0400)]
agx: Ensure we don't overallocate registers

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

3 years agoagx: Pipe in nir_register
Alyssa Rosenzweig [Wed, 7 Jul 2021 01:54:01 +0000 (21:54 -0400)]
agx: Pipe in nir_register

This is kind of lazy...

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

3 years agoagx: Assign registers locally
Alyssa Rosenzweig [Sat, 19 Jun 2021 18:34:44 +0000 (14:34 -0400)]
agx: Assign registers locally

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

3 years agoagx: Count read registers as well
Alyssa Rosenzweig [Sat, 19 Jun 2021 18:33:30 +0000 (14:33 -0400)]
agx: Count read registers as well

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

3 years agoagx: Don't choke on registers in the optimizer
Alyssa Rosenzweig [Wed, 7 Jul 2021 02:16:20 +0000 (22:16 -0400)]
agx: Don't choke on registers in the optimizer

Just skip over them.

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

3 years agozink: store the default variant hash for a program
Mike Blumenkrantz [Fri, 14 May 2021 22:30:58 +0000 (18:30 -0400)]
zink: store the default variant hash for a program

the first created pipeline with a program is the default variants, and
this is likely to be the most common, so we can store the hash to avoid
needing to recalc it later

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

3 years agozink: flag shader modules as default
Mike Blumenkrantz [Fri, 14 May 2021 22:17:23 +0000 (18:17 -0400)]
zink: flag shader modules as default

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

3 years agozink: keep a mask of stages present in a gfx program
Mike Blumenkrantz [Fri, 14 May 2021 22:15:42 +0000 (18:15 -0400)]
zink: keep a mask of stages present in a gfx program

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

3 years agozink: flag all shaders for create during gfx program init
Mike Blumenkrantz [Fri, 14 May 2021 22:10:08 +0000 (18:10 -0400)]
zink: flag all shaders for create during gfx program init

now we can avoid needing extra conditionals in the update hotpath

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

3 years agozink: remove zink_shader_module refcounting
Mike Blumenkrantz [Fri, 14 May 2021 21:57:16 +0000 (17:57 -0400)]
zink: remove zink_shader_module refcounting

this is no longer necessary

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

3 years agofeatures: mark off VK_EXT_multi_draw for radv
Mike Blumenkrantz [Wed, 7 Jul 2021 02:09:03 +0000 (22:09 -0400)]
features: mark off VK_EXT_multi_draw for radv

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

3 years agozink: consolidate and optimize index buffer handling during draw
Mike Blumenkrantz [Tue, 11 May 2021 17:50:51 +0000 (13:50 -0400)]
zink: consolidate and optimize index buffer handling during draw

this can be reorganized to have more readable handling

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

3 years agozink: move descriptor update closer to start of draw
Mike Blumenkrantz [Wed, 7 Jul 2021 01:41:51 +0000 (21:41 -0400)]
zink: move descriptor update closer to start of draw

this can trigger flushes, so ensure that it doesn't break the cmdbuf

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

3 years agozink: update streamout buffer strides inline
Mike Blumenkrantz [Tue, 11 May 2021 16:50:32 +0000 (12:50 -0400)]
zink: update streamout buffer strides inline

loops--

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

3 years agozink: use last_vertex_stage pointer to optimize streamout emission during draw
Mike Blumenkrantz [Tue, 11 May 2021 16:43:38 +0000 (12:43 -0400)]
zink: use last_vertex_stage pointer to optimize streamout emission during draw

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

3 years agozink: store the last vertex stage to the context during bind
Mike Blumenkrantz [Tue, 11 May 2021 16:39:42 +0000 (12:39 -0400)]
zink: store the last vertex stage to the context during bind

make this more readily accessible

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

3 years agoutil/radeonsi: add radeonsi workaround for Nuclear Throne
Timothy Arceri [Sun, 4 Jul 2021 11:20:59 +0000 (21:20 +1000)]
util/radeonsi: add radeonsi workaround for Nuclear Throne

Without radeonsi_sync_compile the game crashes at startup. The
game engine uses a custom global new operator which doesn't
play well with multithreading.

Fixes: f1cc13727c68 ("radeonsi: enable workarounds for YoYo engine based games")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5023

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

3 years agorelnotes: EXT_extended_dynamic_state2 for lavapipe
Mike Blumenkrantz [Wed, 7 Jul 2021 00:38:02 +0000 (20:38 -0400)]
relnotes: EXT_extended_dynamic_state2 for lavapipe

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

3 years agofeatures: EXT_extended_dynamic_state2 for lavapipe
Mike Blumenkrantz [Wed, 7 Jul 2021 00:37:55 +0000 (20:37 -0400)]
features: EXT_extended_dynamic_state2 for lavapipe

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

3 years agolavapipe: implement EXT_extended_dynamic_state2
Mike Blumenkrantz [Tue, 6 Jul 2021 18:26:05 +0000 (14:26 -0400)]
lavapipe: implement EXT_extended_dynamic_state2

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

3 years agolavapipe: only apply pipeline state for depth bias if it's enabled
Mike Blumenkrantz [Tue, 6 Jul 2021 16:20:54 +0000 (12:20 -0400)]
lavapipe: only apply pipeline state for depth bias if it's enabled

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

3 years agozink: remove unnecessary stall during device-local map case
Mike Blumenkrantz [Mon, 17 May 2021 12:44:26 +0000 (08:44 -0400)]
zink: remove unnecessary stall during device-local map case

this stalls after the copy already, no need to also stall before it

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

3 years agozink: redo streamout and texture components of memory_barrier hook
Mike Blumenkrantz [Mon, 17 May 2021 23:03:08 +0000 (19:03 -0400)]
zink: redo streamout and texture components of memory_barrier hook

this is more consolidated (and legal)

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

3 years agozink: optimize buffer rebinds
Mike Blumenkrantz [Tue, 11 May 2021 15:08:03 +0000 (11:08 -0400)]
zink: optimize buffer rebinds

this leverages all the slot masks to more optimally run through all
the rebinds, also enabling some code consolidation

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

3 years agozink: remove barriers from buffer rebinds
Mike Blumenkrantz [Tue, 11 May 2021 14:53:58 +0000 (10:53 -0400)]
zink: remove barriers from buffer rebinds

these aren't needed anymore

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

3 years agozink: make image_bind_count work for buffers
Mike Blumenkrantz [Tue, 11 May 2021 14:34:40 +0000 (10:34 -0400)]
zink: make image_bind_count work for buffers

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

3 years agozink: make samplerview bind mask apply to buffer resources too
Mike Blumenkrantz [Tue, 11 May 2021 14:13:45 +0000 (10:13 -0400)]
zink: make samplerview bind mask apply to buffer resources too

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

3 years agozink: add a per-stage bind mask for ssbos
Mike Blumenkrantz [Tue, 11 May 2021 14:12:39 +0000 (10:12 -0400)]
zink: add a per-stage bind mask for ssbos

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

3 years agozink: add a per-stage mask for ubo binds
Mike Blumenkrantz [Tue, 11 May 2021 14:09:06 +0000 (10:09 -0400)]
zink: add a per-stage mask for ubo binds

optimizing buffer replacement was never so difficult

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

3 years agozink: remove some descriptor_refs_dirty checks from resource binding
Mike Blumenkrantz [Tue, 11 May 2021 14:20:35 +0000 (10:20 -0400)]
zink: remove some descriptor_refs_dirty checks from resource binding

these no longer provide any optimization

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

3 years agozink: remove fb surface resource refs
Mike Blumenkrantz [Tue, 11 May 2021 13:39:11 +0000 (09:39 -0400)]
zink: remove fb surface resource refs

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

3 years agozink: remove fb surface refs
Mike Blumenkrantz [Tue, 11 May 2021 13:24:26 +0000 (09:24 -0400)]
zink: remove fb surface refs

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

3 years agozink: remove samplerview refs
Mike Blumenkrantz [Tue, 11 May 2021 13:23:25 +0000 (09:23 -0400)]
zink: remove samplerview refs

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

3 years agozink: remove imageview refs from shader images
Mike Blumenkrantz [Tue, 11 May 2021 13:23:06 +0000 (09:23 -0400)]
zink: remove imageview refs from shader images

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

3 years agozink: set new batch usage during surface rebinds
Mike Blumenkrantz [Tue, 11 May 2021 13:32:41 +0000 (09:32 -0400)]
zink: set new batch usage during surface rebinds

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

3 years agozink: add surface ref during rebind if unflushed usage
Mike Blumenkrantz [Tue, 11 May 2021 13:22:25 +0000 (09:22 -0400)]
zink: add surface ref during rebind if unflushed usage

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

3 years agozink: remove refs from desc ref updating
Mike Blumenkrantz [Tue, 11 May 2021 13:21:37 +0000 (09:21 -0400)]
zink: remove refs from desc ref updating

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

3 years agozink: remove resource refs from samplerviews
Mike Blumenkrantz [Tue, 11 May 2021 13:21:17 +0000 (09:21 -0400)]
zink: remove resource refs from samplerviews

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

3 years agozink: remove refs from shader images
Mike Blumenkrantz [Tue, 11 May 2021 13:20:47 +0000 (09:20 -0400)]
zink: remove refs from shader images

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

3 years agozink: remove refs from shader buffers
Mike Blumenkrantz [Tue, 11 May 2021 13:20:25 +0000 (09:20 -0400)]
zink: remove refs from shader buffers

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

3 years agozink: remove refs from ubos
Mike Blumenkrantz [Tue, 11 May 2021 13:20:13 +0000 (09:20 -0400)]
zink: remove refs from ubos

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

3 years agozink: remove refs from vertex buffers
Mike Blumenkrantz [Tue, 11 May 2021 13:20:02 +0000 (09:20 -0400)]
zink: remove refs from vertex buffers

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

3 years agozink: remove refs from buffer rebinds
Mike Blumenkrantz [Tue, 11 May 2021 14:21:41 +0000 (10:21 -0400)]
zink: remove refs from buffer rebinds

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

3 years agozink: move resource object ref to batch in init_storage_object
Mike Blumenkrantz [Wed, 12 May 2021 11:17:19 +0000 (07:17 -0400)]
zink: move resource object ref to batch in init_storage_object

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

3 years agozink: move resource object ref to batch in invalidate hook
Mike Blumenkrantz [Wed, 12 May 2021 11:16:54 +0000 (07:16 -0400)]
zink: move resource object ref to batch in invalidate hook

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

3 years agozink: add util function for transferring resource refs to batch
Mike Blumenkrantz [Tue, 11 May 2021 14:27:55 +0000 (10:27 -0400)]
zink: add util function for transferring resource refs to batch

there's no point in doing unref->ref if it's known that this will happen

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

3 years agorelnotes: more lavapipe features
Mike Blumenkrantz [Tue, 6 Jul 2021 21:09:23 +0000 (17:09 -0400)]
relnotes: more lavapipe features

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

3 years agofeatures: more lavapipe extensions
Mike Blumenkrantz [Tue, 6 Jul 2021 21:09:13 +0000 (17:09 -0400)]
features: more lavapipe extensions

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

3 years agolavapipe: implement KHR_separate_depth_stencil_layouts
Mike Blumenkrantz [Tue, 6 Jul 2021 19:04:55 +0000 (15:04 -0400)]
lavapipe: implement KHR_separate_depth_stencil_layouts

this is a conformant implementation

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

3 years agolavapipe: implement EXT_separate_stencil_usage
Mike Blumenkrantz [Tue, 6 Jul 2021 19:04:55 +0000 (15:04 -0400)]
lavapipe: implement EXT_separate_stencil_usage

this is a conformant implementation

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

3 years agopan/decode: Handle IDVS jobs on Bifrost
Alyssa Rosenzweig [Tue, 22 Jun 2021 15:16:37 +0000 (11:16 -0400)]
pan/decode: Handle IDVS jobs on Bifrost

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

3 years agopanfrost: Add secondary shader XML fields
Alyssa Rosenzweig [Tue, 22 Jun 2021 15:05:22 +0000 (11:05 -0400)]
panfrost: Add secondary shader XML fields

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

3 years agopanfrost/genxml: Decode Bifrost index-driven vertex jobs
Daniel Stone [Wed, 16 Jun 2021 09:10:48 +0000 (10:10 +0100)]
panfrost/genxml: Decode Bifrost index-driven vertex jobs

Bifrost has a new type of job called 'index-driven vertex', which takes
in two shaders. The primary shader, called for all values, performs
position shading to a cacheline-aligned attribute buffer. The secondary
shader, called for values still live after culling, performs varying
shading.

It is the responsiblilty of the implementation to ensure that vertices
from different instances do not share a cacheline.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11413>

3 years agoiris: Use isl_surf_get_uncompressed_surf
Jason Ekstrand [Mon, 28 Jun 2021 22:15:28 +0000 (17:15 -0500)]
iris: Use isl_surf_get_uncompressed_surf

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>

3 years agoiris: Don't leak the surface if uncompressed re-interp fails
Jason Ekstrand [Tue, 29 Jun 2021 00:11:46 +0000 (19:11 -0500)]
iris: Don't leak the surface if uncompressed re-interp fails

Fixes: a032a9665f27 "iris: Enable PIPE_CAP_SURFACE_REINTERPRET_BLOCKS"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>

3 years agointel/isl: Add more cases to isl_surf_get_uncompressed_surf
Jason Ekstrand [Tue, 29 Jun 2021 00:03:18 +0000 (19:03 -0500)]
intel/isl: Add more cases to isl_surf_get_uncompressed_surf

We can actually create array surfaces instead of requiring single-slice
in a few cases.  This does require us to be very careful about our
checks, though.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>

3 years agointel/blorp: Use isl_surf_get_uncompressed_surf
Jason Ekstrand [Thu, 22 Feb 2018 22:31:00 +0000 (14:31 -0800)]
intel/blorp: Use isl_surf_get_uncompressed_surf

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>

3 years agointel/blorp: Adjust the compressed copy rectangle before convert_to_single_slice
Jason Ekstrand [Fri, 23 Feb 2018 19:51:55 +0000 (11:51 -0800)]
intel/blorp: Adjust the compressed copy rectangle before convert_to_single_slice

It doesn't matter for the actual copy rectangle and this makes the
asserts a bit nicer as we don't need to bother with the intratile
offsets because there aren't any yet.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>

3 years agointel/isl: Pull the uncompressed surface view code from anv
Jason Ekstrand [Thu, 22 Feb 2018 21:48:52 +0000 (13:48 -0800)]
intel/isl: Pull the uncompressed surface view code from anv

This adds a helper isl_surf_get_uncompressed_surf for creating a surface
which provides an uncompressed view into a compressed surface.  The code
is basically a direct port of the uncompressed surface code from the
Vulkan driver which, in turn, was a port from BLORP.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11647>

3 years agocrocus: Reduce SSBO alignment requirements from 64B to 4B.
Kenneth Graunke [Fri, 2 Jul 2021 19:47:38 +0000 (12:47 -0700)]
crocus: Reduce SSBO alignment requirements from 64B to 4B.

Mirroring a change in iris; see the previous commit for rationale.
One difference is that crocus does sometimes use CPU maps on Atoms
for *reads*...but writes don't go through CPU caches.  Should be OK.

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

3 years agoiris: Reduce SSBO alignment requirements from 64B to 4B
Kenneth Graunke [Fri, 2 Jul 2021 19:39:49 +0000 (12:39 -0700)]
iris: Reduce SSBO alignment requirements from 64B to 4B

Back when SSBOs were first enabled in i965, we tried to work around
issues where the CPU and GPU were incoherently writing to the same
cacheline by forcing an alignment such that different sections of
data would fall in different cachelines.  This seems wrong.

On integrated GPUs with LLC, CPU and GPU writes should be coherent.
On integrated GPUs without LLC, we either enable snooping (so they
are again coherent), or we use WC maps (so the CPU cache isn't used).
Discrete GPUs always use WC maps (so the CPU cache isn't used).

This should work.  In other words, I think the increased alignment
was just working around coherency problems on atoms that have been
fixed in the intervening 6 year time period.

Untyped surface messages require 4B alignment.

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

3 years agopanfrost: Eliminate redundant flushes with AFBC
Alyssa Rosenzweig [Fri, 28 May 2021 22:29:03 +0000 (18:29 -0400)]
panfrost: Eliminate redundant flushes with AFBC

We have all the information we need easily available.

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

3 years agopanfrost: Split "flush writer" from "flush accessing"
Alyssa Rosenzweig [Fri, 28 May 2021 22:23:37 +0000 (18:23 -0400)]
panfrost: Split "flush writer" from "flush accessing"

Since writers are counted in the accessor set, the old implementation
had a redundant flush in the "flush accessing" case. To fix, split the
two modes into separate functions, removing the redundancy and offering
a much more ergonomic API.

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

3 years agopanfrost: Do tracking of resources, not BOs
Boris Brezillon [Wed, 12 May 2021 16:23:19 +0000 (18:23 +0200)]
panfrost: Do tracking of resources, not BOs

Squashed together with commits from Boris's original dependency tracking
cleanup series.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077>

3 years agopanfrost: Wrap occlusion query in pipe_resource
Alyssa Rosenzweig [Mon, 17 May 2021 19:56:53 +0000 (15:56 -0400)]
panfrost: Wrap occlusion query in pipe_resource

For proper tracking.

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

3 years agopanfrost: Express dependencies as resources, not BOs
Alyssa Rosenzweig [Mon, 17 May 2021 18:42:13 +0000 (14:42 -0400)]
panfrost: Express dependencies as resources, not BOs

This is a more ergnomic API, and will allow further optimizations.

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

3 years agopanfrost: Replace the batch->bos hashmap by a sparse array
Boris Brezillon [Wed, 12 May 2021 17:49:08 +0000 (19:49 +0200)]
panfrost: Replace the batch->bos hashmap by a sparse array

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11077>

3 years agonir: Free the instructions in a DCE instr removal.
Emma Anholt [Mon, 28 Jun 2021 21:42:21 +0000 (14:42 -0700)]
nir: Free the instructions in a DCE instr removal.

No significant change in shader-db time (n=11), but should be a little win
for memory usage by the compiler.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628>

3 years agonir: Use remove_and_dce for nir_shader_lower_instructions().
Emma Anholt [Mon, 28 Jun 2021 17:51:06 +0000 (10:51 -0700)]
nir: Use remove_and_dce for nir_shader_lower_instructions().

Reduces the work that other shader passes have to do to look at dead code,
and possibly extra rounds around the optimization loop if dce wasn't the
last pass in it.

shader-db runtime -1.12919% +/- 0.264337% (n=49) on SKL.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628>

3 years agonir: Add a nir_instr_remove that recursively removes dead code.
Emma Anholt [Fri, 25 Jun 2021 23:53:55 +0000 (16:53 -0700)]
nir: Add a nir_instr_remove that recursively removes dead code.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628>

3 years agoanv: Fix unused var warning on release builds from an assertion.
Emma Anholt [Mon, 28 Jun 2021 20:08:37 +0000 (13:08 -0700)]
anv: Fix unused var warning on release builds from an assertion.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11628>

3 years agozinK: tweak shader module update -> pipeline combined_dirty conditional
Mike Blumenkrantz [Fri, 14 May 2021 21:44:29 +0000 (17:44 -0400)]
zinK: tweak shader module update -> pipeline combined_dirty conditional

make this more explicit

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

3 years agozink: remove shader_id
Mike Blumenkrantz [Fri, 14 May 2021 19:17:03 +0000 (15:17 -0400)]
zink: remove shader_id

now that shaders are per-program, shader_id is no longer useful

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