mesa.git
4 years agofreedreno: quiet INFO_MSG
Rob Clark [Sat, 15 Feb 2020 23:32:12 +0000 (15:32 -0800)]
freedreno: quiet INFO_MSG

Probably not useful unless LIBGL_DEBUG is set to something.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3833>

4 years agofreedreno/a6xx: few register updates
Rob Clark [Sat, 15 Feb 2020 23:14:24 +0000 (15:14 -0800)]
freedreno/a6xx: few register updates

Nothing used by mesa, but crashdec tool uses a few of these.  And since
the practice is these days to sync mesa->envytools, adding these on the
mesa side first.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3833>

4 years agofreedreno/registers: teach gen_header.py about a3xx_regid
Rob Clark [Sat, 15 Feb 2020 23:06:44 +0000 (15:06 -0800)]
freedreno/registers: teach gen_header.py about a3xx_regid

This is a builtin type (treated as uint, but with special type-aware
decoding) in envytools/cffdump.  Lets teach gen_header.py about it and
drop the enum hack in the xml so I don't have to keep deleting the enum
when I sync the xml back to the freedreno envytools tree.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3833>

4 years agomeson: explicitly disallow unsupported build directory layout
Eric Engestrom [Sat, 15 Feb 2020 10:53:26 +0000 (10:53 +0000)]
meson: explicitly disallow unsupported build directory layout

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2512
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3832>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3832>

4 years agointel/gen12: Take into account opcode when decoding SWSB
Caio Marcelo de Oliveira Filho [Fri, 31 Jan 2020 18:20:25 +0000 (10:20 -0800)]
intel/gen12: Take into account opcode when decoding SWSB

The interpretation of the fields is different depending whether the
instruction is a SEND/MATH or not.

This fixes the disassembly output for non-SEND/MATH instructions that
have both in-order and out-of-order dependencies.  Their dependencies
were wrongly represented as `@A $B` when the correct would be `@A
$B.dst`.

Fixes: 6154cdf924f ("intel/eu/gen12: Add auxiliary type to represent SWSB information during codegen.")
Fixes: 83612c01271 ("intel/disasm/gen12: Disassemble software scoreboard information.")
Acked-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3660>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3660>

4 years agopanfrost: Remove enum panfrost_memory_layout
Alyssa Rosenzweig [Tue, 18 Feb 2020 14:49:13 +0000 (09:49 -0500)]
panfrost: Remove enum panfrost_memory_layout

It duplicates mali_texture_layout. Let's use the native hardware enum
and spare a pointless translation.

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

4 years agoradv: Advertise VK_KHR_shader_non_semantic_info
Caio Marcelo de Oliveira Filho [Fri, 13 Dec 2019 21:21:44 +0000 (13:21 -0800)]
radv: Advertise VK_KHR_shader_non_semantic_info

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3856>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3856>

4 years agoanv: Advertise VK_KHR_shader_non_semantic_info
Caio Marcelo de Oliveira Filho [Fri, 13 Dec 2019 18:52:58 +0000 (10:52 -0800)]
anv: Advertise VK_KHR_shader_non_semantic_info

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3856>

4 years agovulkan: Update the XML and headers to 1.2.133
Jason Ekstrand [Tue, 18 Feb 2020 15:49:41 +0000 (09:49 -0600)]
vulkan: Update the XML and headers to 1.2.133

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

4 years agopanfrost: Debitfieldize mali_uniform_buffer_meta
Alyssa Rosenzweig [Sun, 16 Feb 2020 22:01:02 +0000 (17:01 -0500)]
panfrost: Debitfieldize mali_uniform_buffer_meta

It fits snugly in a u64, just give a macro for direct computation rather
than fudging around with bitfields. Not sure if this actually matters
with well-optimized compilers but it makes the code subjectively cleaner
so it's worth it for that if nothing else.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3838>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3838>

4 years agopanfrost: Avoid reading GPU memory when packing vertices
Alyssa Rosenzweig [Sun, 16 Feb 2020 21:41:29 +0000 (16:41 -0500)]
panfrost: Avoid reading GPU memory when packing vertices

These occurred unintentionally as a byproduct of bitfields, etc. Whoops.

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

4 years agopanfrost: Cleanup transfer_map
Alyssa Rosenzweig [Tue, 18 Feb 2020 13:30:10 +0000 (08:30 -0500)]
panfrost: Cleanup transfer_map

A lot of these checks are obsolete since we've started tracking BO
accesses correctly.

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

4 years agopanfrost: Update scoreboarding notes
Alyssa Rosenzweig [Sun, 16 Feb 2020 18:58:09 +0000 (13:58 -0500)]
panfrost: Update scoreboarding notes

Our understanding of the set/write value jobs has evolved, so let's
update the rules.

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

4 years agopanfrost: Rewrite scoreboarding routines
Alyssa Rosenzweig [Sun, 16 Feb 2020 19:59:11 +0000 (14:59 -0500)]
panfrost: Rewrite scoreboarding routines

Rather than manipulating job descriptor headers as fat pointers (slow)
and using fancy manipulation functions for programatically building the
tree in arbitrary orders (slow and complicated) and then having to do a
topological sort at runtime every frame (slow) which requires traversing
said headers in GPU memory (slow!)... we finally know enough about
the hardware to just get things right the first time, or second for
next_job linking. So rip out all that code and replace it with a much
better routine to create, upload, and queue a job all in one (since now
it's the same operation essentially - which is much better for memory
access patterns, by the way) and most everything falls into place
gracefully according to the rules we've set out. Even wallpapering isn't
*so* terrible if you just... move that one little... giant... hack out
of sight... ahem....

panfrost_scoreboard_link_batch is no longer a bottleneck, mostly because
it no longer exists :-)

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

4 years agopanfrost: Print synced traces to stderr
Alyssa Rosenzweig [Tue, 18 Feb 2020 13:05:11 +0000 (08:05 -0500)]
panfrost: Print synced traces to stderr

To match the existing behaviour.

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

4 years agopanfrost: Implement PAN_DBG_SYNC with pandecode/minimal
Alyssa Rosenzweig [Tue, 18 Feb 2020 12:50:19 +0000 (07:50 -0500)]
panfrost: Implement PAN_DBG_SYNC with pandecode/minimal

This way we avoid duplicating job traversal logic.

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

4 years agopan/decode: Cleanup pandecode_jc
Alyssa Rosenzweig [Tue, 18 Feb 2020 12:46:03 +0000 (07:46 -0500)]
pan/decode: Cleanup pandecode_jc

Some of this code is, to put it mildly, impossibly ancient horsedropping
crazy cruft.

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

4 years agopan/decode: Add `minimal` mode
Alyssa Rosenzweig [Tue, 18 Feb 2020 12:43:51 +0000 (07:43 -0500)]
pan/decode: Add `minimal` mode

We would like a mode to skip decoding job payloads so we can just
inspect for faults.

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

4 years agost/nir: Unify inputs_read/outputs_written before serializing NIR
Danylo Piliaiev [Wed, 12 Feb 2020 10:45:55 +0000 (12:45 +0200)]
st/nir: Unify inputs_read/outputs_written before serializing NIR

Otherwise input/output interfaces won't be unified when reading
NIR from a cache.

Fixes piglit test on iris:
  clip-distance-vs-gs-out.shader_test

Fixes: 19ed12af
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3787>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3787>

4 years agozink: do not convert bools to/from uint
Erik Faye-Lund [Mon, 10 Feb 2020 14:45:22 +0000 (15:45 +0100)]
zink: do not convert bools to/from uint

Since bools are the only 1-bit type, we always know if an SSA-def is a
bool or not. So we don't need to marshal it to uint.

So let's simplify the code a bit here.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>

4 years agozink/spirv: uint -> raw
Erik Faye-Lund [Mon, 10 Feb 2020 15:04:45 +0000 (16:04 +0100)]
zink/spirv: uint -> raw

Similarly to the previous commit, the important bit here is the rawness
of these variables, not the uintness. So let's rename these to reflect
this.

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

4 years agozink/spirv: unit_value -> raw_value
Erik Faye-Lund [Mon, 10 Feb 2020 14:26:41 +0000 (15:26 +0100)]
zink/spirv: unit_value -> raw_value

The point here isn't that the value is uint, but that is't untreated. So
raw seems more fitting as a description.

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

4 years agozink/spirv: rename functions a bit
Erik Faye-Lund [Fri, 7 Feb 2020 22:16:17 +0000 (23:16 +0100)]
zink/spirv: rename functions a bit

The code is about to change so the whole uint-story isn't as true as it
used to be. So let's soften up the semantics a bit here; we only care
about if we're doing a typed ot untyped store here, really.

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

4 years agozink/spirv: prefer store_dest over store_dest_uint
Erik Faye-Lund [Fri, 7 Feb 2020 22:52:43 +0000 (23:52 +0100)]
zink/spirv: prefer store_dest over store_dest_uint

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

4 years agozink/spirv: do not reinvent store_dest
Erik Faye-Lund [Fri, 7 Feb 2020 22:52:08 +0000 (23:52 +0100)]
zink/spirv: do not reinvent store_dest

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

4 years agozink: confused compilation macro usage for zink in target helpers.
luc [Sat, 15 Feb 2020 04:55:16 +0000 (12:55 +0800)]
zink: confused compilation macro usage for zink in target helpers.

Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3831>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3831>

4 years agozink: do not report texture-samplers for unsupported stages
Erik Faye-Lund [Fri, 14 Feb 2020 14:42:51 +0000 (15:42 +0100)]
zink: do not report texture-samplers for unsupported stages

This caused the max combined samplers to be reported as artificially
high.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3826>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3826>

4 years agozink: fix binding-usage
Erik Faye-Lund [Fri, 14 Feb 2020 15:50:42 +0000 (16:50 +0100)]
zink: fix binding-usage

Rewriting the variable bindings is nasty and error-prone, and this code
triggered an assert when trying to resolve API bindings into Vulkan
bindings.

This code still needs some tweaks, but this makes things much better,
and fixes a few bugs where we incorrectly accounted for the
array-indexes.

Fixes: 1c3f4c07047 ("zink: fixup sampler-usage")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3826>

4 years agoradv: add a comment about VK_AMD_mixed_attachment_samples on GFX6-GFX7
Samuel Pitoiset [Thu, 13 Feb 2020 08:52:53 +0000 (09:52 +0100)]
radv: add a comment about VK_AMD_mixed_attachment_samples on GFX6-GFX7

There is some CTS failures.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3808>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3808>

4 years agoradv: enable VK_NV_compute_shader_derivatives on GFX6-GFX7
Samuel Pitoiset [Thu, 13 Feb 2020 08:43:25 +0000 (09:43 +0100)]
radv: enable VK_NV_compute_shader_derivatives on GFX6-GFX7

All Crucible tests pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3808>

4 years agoradv: enable VK_EXT_sampler_filter_minmax on GFX6
Samuel Pitoiset [Thu, 13 Feb 2020 08:22:04 +0000 (09:22 +0100)]
radv: enable VK_EXT_sampler_filter_minmax on GFX6

Works fine.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3808>

4 years agoradv: enable shaderStorageImageMultisample on GFX6-GFX7
Samuel Pitoiset [Thu, 13 Feb 2020 08:00:22 +0000 (09:00 +0100)]
radv: enable shaderStorageImageMultisample on GFX6-GFX7

It was disabled because untested, but CTS is happy with it.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3808>

4 years agoegl: Implement getImage/putImage on pbuffer swrast.
Mathias Fröhlich [Fri, 13 Dec 2019 16:09:56 +0000 (17:09 +0100)]
egl: Implement getImage/putImage on pbuffer swrast.

This change adds getImage/putImage callbacks to the swrast pbuffer
loader extension.
This fixes a recent crash with Weston as well as a crashing
test with classic swrast without an official gitlab issue.

v2: Determine bytes per pixel differently and fix non X11 builds.
v3: Plug memory leak and fix crash on out of bounds access.
    (Daniel Stone)
v4: Follow the code structure of the wayland get/put image
    implementation - hopefully being more obvious.
    Handle 64 bits formats.
    Use BufferSize directly.
    (Emil Velikov)
v5: Change pixel size computation.
    (Eric Engestrom)

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2219
Fixes: d6edccee8da "egl: add EGL_platform_device support"
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3711>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3711>

4 years agolima: rename lima_submit to lima_job
Qiang Yu [Mon, 10 Feb 2020 08:25:11 +0000 (16:25 +0800)]
lima: rename lima_submit to lima_job

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: move dump check to macro for lima_dump_command_stream_print
Qiang Yu [Mon, 10 Feb 2020 08:09:31 +0000 (16:09 +0800)]
lima: move dump check to macro for lima_dump_command_stream_print

This can prevent the execution of some function like lima_ctx_buff_va
which is passed in as parameter when no dump case.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: enable multi submit optimization
Qiang Yu [Fri, 7 Feb 2020 12:32:51 +0000 (20:32 +0800)]
lima: enable multi submit optimization

Also provide a debug option to disable it.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: optinal flush submit in lima_clear
Qiang Yu [Fri, 7 Feb 2020 11:43:10 +0000 (19:43 +0800)]
lima: optinal flush submit in lima_clear

flush current submit only when there is any draw pending instead of
flush all submits.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: use per submit dump file
Qiang Yu [Wed, 5 Feb 2020 06:25:21 +0000 (14:25 +0800)]
lima: use per submit dump file

After multi lima_submit, commands for one lima_submit may not be
flushed when change framebuffer. But we want to track command
stream for one submit, so save dump file for each submit.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: move framebuffer info to lima_submit
Qiang Yu [Sun, 9 Feb 2020 12:07:12 +0000 (20:07 +0800)]
lima: move framebuffer info to lima_submit

draw code path does not use framebuffer info, only flush
code path use it now.

Use zsbuf/cbuf in submit instead of context.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: move clear into submit (v2)
Qiang Yu [Wed, 5 Feb 2020 12:05:03 +0000 (20:05 +0800)]
lima: move clear into submit (v2)

clear info is needed when submit flush and may be changed after
framebuffer switch, so we need to move it into submit.

This also fixes 5 dEQP tests as a side effect: clear info is per
submit so clear value when one submit won't affect next submit.

v2:
remove fixed dEQP test from CI list.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: move damage_rect into lima_submit
Qiang Yu [Tue, 4 Feb 2020 14:52:59 +0000 (22:52 +0800)]
lima: move damage_rect into lima_submit

damage_rect is preserved across draws.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: move pp_max_stack_size to lima_submit
Qiang Yu [Tue, 4 Feb 2020 13:35:33 +0000 (21:35 +0800)]
lima: move pp_max_stack_size to lima_submit

pp_max_stack_size is preserved across draws.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: move resolve into lima_submit
Qiang Yu [Tue, 4 Feb 2020 10:24:37 +0000 (18:24 +0800)]
lima: move resolve into lima_submit

resolve is preserved across draws.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: move plbu/vs_cmd_array into lima_submit
Qiang Yu [Tue, 4 Feb 2020 09:30:59 +0000 (17:30 +0800)]
lima: move plbu/vs_cmd_array into lima_submit

This information is preserved across draws and needed
when task submission.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: track write submits of context (v3)
Qiang Yu [Thu, 6 Feb 2020 12:02:31 +0000 (20:02 +0800)]
lima: track write submits of context (v3)

We need to flush submit which write to the FBO before read it as
texture.

v2:
rename lima_flush_previous_write_submit to
lima_flush_previous_submit_writing_resouce.

v3:
delay add submit to hash_table to lima_update_submit_wb when really
know the render target will be written.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: make lima_submit one time use drop data (v3)
Qiang Yu [Sun, 9 Feb 2020 08:10:18 +0000 (16:10 +0800)]
lima: make lima_submit one time use drop data (v3)

lima_submit is created by lima_submit_get() in draw/clear functions
and freed after submit to kernel.

There is a hash map to find the same lima_submit for color/depth
buffer combination if user switch framebuffer w/o flush the command
then switch back again.

v2:
rename lima_flush_submit to lima_flush_submit_accessing_bo.

v3:
delay flush access submit to lima_update_submit_wb when really know
if this submit will write to the target buffer.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: add lima_submit_get
Qiang Yu [Sun, 9 Feb 2020 03:49:52 +0000 (11:49 +0800)]
lima: add lima_submit_get

Replace all usage of "ctx->submit" in draw code path with
lima_submit_get(). This function will create new submit
in the following changes.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: use lima_submit_create_stream_bo for plbu/vs_cmd and pp_stack
Qiang Yu [Sun, 9 Feb 2020 02:19:49 +0000 (10:19 +0800)]
lima: use lima_submit_create_stream_bo for plbu/vs_cmd and pp_stack

lima_ctx_buff is used cross function calls in draws. But plbu/vs_cmd
and pp_stack are used immediately after create. And we need to get
rid of "ctx->submit" in the flush code path which exists in
lima_ctx_buff.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: adjust pp_stream to use lima_submit_create_stream_bo
Qiang Yu [Sun, 9 Feb 2020 02:05:33 +0000 (10:05 +0800)]
lima: adjust pp_stream to use lima_submit_create_stream_bo

No need to save the bo, just map and va for use in this submit
is enough.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: add lima_submit_create_stream_bo
Qiang Yu [Sun, 9 Feb 2020 01:37:53 +0000 (09:37 +0800)]
lima: add lima_submit_create_stream_bo

For creating stream buffer which is used in single submit
and freed after the submit is passed to kernel driver.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: pass submit parameter for functions in lima_submic.c (v2)
Qiang Yu [Sat, 8 Feb 2020 12:21:12 +0000 (20:21 +0800)]
lima: pass submit parameter for functions in lima_submic.c (v2)

"ctx->submit" won't be used directly, so remove the usage in
lima_submit.c by directly passing the submit parameter. And
more data in lima_context will be moved to lima_submit, so
"ctx" will be replaced by "submit" in those functions.

v2:
rename lima_submit_flush to lima_do_submit.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: move flush code to lima_submit.c
Qiang Yu [Sat, 8 Feb 2020 11:24:34 +0000 (19:24 +0800)]
lima: move flush code to lima_submit.c

Just code move, no content change.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: put hardware related info to lima_gpu.h
Qiang Yu [Sat, 8 Feb 2020 10:44:00 +0000 (18:44 +0800)]
lima: put hardware related info to lima_gpu.h

For sharing with multi .c files.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: merge gp/pp submit
Qiang Yu [Tue, 4 Feb 2020 07:23:11 +0000 (15:23 +0800)]
lima: merge gp/pp submit

Use single lima_submit for the submit operation. This is also
for moving more information in lima_context to lima_submit.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: move syncobj from lima_submit to lima_context
Qiang Yu [Tue, 4 Feb 2020 06:32:31 +0000 (14:32 +0800)]
lima: move syncobj from lima_submit to lima_context

As there will be multi lima_submit per context, move
syncobj out of it.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: add missing resolve check for damage and reload
Qiang Yu [Wed, 12 Feb 2020 03:07:03 +0000 (11:07 +0800)]
lima: add missing resolve check for damage and reload

If color buffer is not touched, we do not need to reload or get
damage region from it.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: add render target to submit by dirty buffer flags
Qiang Yu [Fri, 7 Feb 2020 09:07:51 +0000 (17:07 +0800)]
lima: add render target to submit by dirty buffer flags

No need to add un-touched buffer to submit.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: delay plbu head command generation to flush stage (v2)
Qiang Yu [Sat, 8 Feb 2020 10:00:24 +0000 (18:00 +0800)]
lima: delay plbu head command generation to flush stage (v2)

Prepare for multi submit in which case only know the plb_index when
final flush. Another need for this is proper reload detection: only
when flush stage can we know if need to do reload, because user may
first clear depth, then color individually, so we don't know if need
to pack repload plbu cmd when first clear depth.

v2:
move lima_update_submit_wb before ctx->resolve change for lima_ctx_dirty
to work in lima_submit_wb.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: delay add plb buffer to submit when flush
Qiang Yu [Sun, 2 Feb 2020 08:48:44 +0000 (16:48 +0800)]
lima: delay add plb buffer to submit when flush

Prepare for multi submit in which case plb buffer is known
only when flush.

Keep the write back buffer update which is needed for FB
dirty track.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: pass array as parameter to PLBU and VS command macros
Qiang Yu [Tue, 4 Feb 2020 03:06:54 +0000 (11:06 +0800)]
lima: pass array as parameter to PLBU and VS command macros

Don't assume the ctx parameter, prepare for moving PLBU and
VS arrary from lima_context to lima_submit and adding new
plbu_cmd_head array.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: remove lima_ctx_buff_va submit flags (v2)
Qiang Yu [Tue, 4 Feb 2020 02:54:40 +0000 (10:54 +0800)]
lima: remove lima_ctx_buff_va submit flags (v2)

We don't have any shared lima_ctx_buff for both GP and PP,
so no need to have these flags.

v2:
still add submit in lima_ctx_buff_va because some bo need
to exist cross flush, so not every submit will call
lima_ctx_buff_alloc.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: always add texture bo to submit
Qiang Yu [Tue, 11 Feb 2020 02:32:38 +0000 (10:32 +0800)]
lima: always add texture bo to submit

No matter texture desc change, we need to add texture to submit.
Otherwise texture may be freed before submit finish.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: use util_copy_framebuffer_state
Qiang Yu [Fri, 7 Feb 2020 03:12:09 +0000 (11:12 +0800)]
lima: use util_copy_framebuffer_state

Use this helper to replace self written code.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agolima: remove definition of lima_is_scanout
Qiang Yu [Thu, 6 Feb 2020 12:20:28 +0000 (20:20 +0800)]
lima: remove definition of lima_is_scanout

There is no implementation of this function.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>

4 years agopan/decode: Remove extraneous newline
Alyssa Rosenzweig [Wed, 12 Feb 2020 02:50:04 +0000 (21:50 -0500)]
pan/decode: Remove extraneous newline

pandecode_log already does this.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>

4 years agopan/midgard: Use fprintf instead of printf for constants
Alyssa Rosenzweig [Thu, 13 Feb 2020 22:14:05 +0000 (17:14 -0500)]
pan/midgard: Use fprintf instead of printf for constants

I was wondering where those constants disappeared to :-)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 968f36d1fc0 ("pan/midgard: Support disassembling to a file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>

4 years agopan/midgard: Don't crash with constants on unknown ops
Alyssa Rosenzweig [Thu, 13 Feb 2020 22:12:51 +0000 (17:12 -0500)]
pan/midgard: Don't crash with constants on unknown ops

Just use a dummy name instead.. we can't know a priori what type an
unknown op will consume, but we don't want to dereference a null
pointer.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 24360966ab3 ("panfrost/midgard: Prettify embedded constant
prints")

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

4 years agopan/midgard: Identify stack barrier flag
Alyssa Rosenzweig [Thu, 13 Feb 2020 12:41:38 +0000 (07:41 -0500)]
pan/midgard: Identify stack barrier flag

In case thread local storage is used.

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

4 years agopan/midgard: Set xyzx swizzle for load_compute_arg
Alyssa Rosenzweig [Wed, 12 Feb 2020 13:39:29 +0000 (08:39 -0500)]
pan/midgard: Set xyzx swizzle for load_compute_arg

Probably harmless but the w component doesn't appear valid so let's
match the blob... one less bit to be nervous about.

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

4 years agopan/midgard: Infer tags entirely
Alyssa Rosenzweig [Wed, 12 Feb 2020 02:43:43 +0000 (21:43 -0500)]
pan/midgard: Infer tags entirely

We're so close, again marking off a few edge cases is enough to allow us
to omit this data entirely. Woot!

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

4 years agopan/midgard: Imply next tags
Alyssa Rosenzweig [Wed, 12 Feb 2020 02:37:18 +0000 (21:37 -0500)]
pan/midgard: Imply next tags

As long as we can disambiguate a few edge cases, we can imply next tags
entirely which cleans up the disassembly a fair bit (though not as much
as implying tags entirely would -- we'll get there!)

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

4 years agopan/midgard: Overhaul tag handling
Alyssa Rosenzweig [Wed, 12 Feb 2020 02:20:30 +0000 (21:20 -0500)]
pan/midgard: Overhaul tag handling

We unify disparate metadata about tags into a single structure to ensure
information is not left out.

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

4 years agopan/midgard: Improve barrier disassembly
Alyssa Rosenzweig [Tue, 11 Feb 2020 20:58:18 +0000 (15:58 -0500)]
pan/midgard: Improve barrier disassembly

Just move some state from unknowns to actual keywords.

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

4 years agopan/midgard: Use dummy tag for empty shaders
Alyssa Rosenzweig [Tue, 4 Feb 2020 14:34:11 +0000 (09:34 -0500)]
pan/midgard: Use dummy tag for empty shaders

Fixes INSTR_INVALID_ENC in dEQP-GLES31.functional.compute.basic.empty

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

4 years agopan/midgard: Fix 32/64 mixed swizzle packing
Alyssa Rosenzweig [Tue, 4 Feb 2020 14:29:59 +0000 (09:29 -0500)]
pan/midgard: Fix 32/64 mixed swizzle packing

Occurs in SSBO address computation.

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

4 years agopan/midgard: Allow jumping out of a shader
Alyssa Rosenzweig [Tue, 4 Feb 2020 14:28:06 +0000 (09:28 -0500)]
pan/midgard: Allow jumping out of a shader

This comes up as a `return;` instruction in a compute shader. We need to
use the special tag 1 to signify "break". Fixes numerous
INSTR_INVALID_ENC faults in dEQP-GLES31.functional.compute.basic.*

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

4 years agopan/midgard: Implement barriers
Alyssa Rosenzweig [Tue, 4 Feb 2020 01:23:41 +0000 (20:23 -0500)]
pan/midgard: Implement barriers

Barriers execute on the texture pipeline on Midgard, so let's
tentatively handle barrier() as conservatively as possible (forcing
memory barriers of both buffers and shared memory). Implementation isn't
quite there yet -- it doesn't look at interactions of adjacent barriers
like it's supposed to -- but the core is there.

Fixes dEQP-GLES31.functional.compute.basic.ssbo_local_barrier_single_invocation

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

4 years agopan/midgard: Fix swizzles harder
Alyssa Rosenzweig [Tue, 4 Feb 2020 00:21:59 +0000 (19:21 -0500)]
pan/midgard: Fix swizzles harder

Just for disassembly for now~

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

4 years agopan/midgard: Fix missing prefixes
Alyssa Rosenzweig [Mon, 3 Feb 2020 20:12:24 +0000 (15:12 -0500)]
pan/midgard: Fix missing prefixes

I was wondering where those were going... :)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: c1952779d68 ("pan/decode: Dump to a file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>

4 years agopan/midgard: Track pressure when scheduling ld/st
Alyssa Rosenzweig [Mon, 3 Feb 2020 19:55:58 +0000 (14:55 -0500)]
pan/midgard: Track pressure when scheduling ld/st

Fixes RA failure in
dEQP-GLES31.functional.shaders.builtin_functions.common.modf.* (which
uses multiple indirect SSBO writes)

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

4 years agopanfrost: Allocate RAM backing of shared memory
Alyssa Rosenzweig [Thu, 6 Feb 2020 19:29:42 +0000 (14:29 -0500)]
panfrost: Allocate RAM backing of shared memory

Unlike other GPUs, Mali does not have dedicated shared memory for
compute workloads. Instead, we allocate shared memory (backed to RAM),
and the general memory access functions have modes to access shared
memory (essentially, think of these modes as adding this allocates base
+ workgroupid * stride  in harder). So let's allocate enough memory
based on the shared_size parameter and supply it.

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

4 years agopanfrost: Rename unknown2_8 to padding
Alyssa Rosenzweig [Mon, 10 Feb 2020 13:56:33 +0000 (08:56 -0500)]
panfrost: Rename unknown2_8 to padding

It's zero everywhere.

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

4 years agopanfrost: Rename bifrost_framebuffer->mali_framebuffer
Alyssa Rosenzweig [Mon, 10 Feb 2020 13:51:37 +0000 (08:51 -0500)]
panfrost: Rename bifrost_framebuffer->mali_framebuffer

(And bifrost_fb_extra to mali_framebuffer_extra, bifrost_render_target
to mali_render_target)

These structures are the norm on midgard t760+, drop the bifrost names,
it's silly... unrelated to the rest of the series but while I'm messing
with pandecode and cleaning up bifrost abstractions, might as well.

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

4 years agopanfrost: Unify bifrost_scratchpad with mali_shared_memory
Alyssa Rosenzweig [Mon, 10 Feb 2020 13:47:09 +0000 (08:47 -0500)]
panfrost: Unify bifrost_scratchpad with mali_shared_memory

It looks like these are the same structure, so this allows us to reuse
mali_shared_memory across architectures, and dispels with the
Bifrost-specific mystery of the scratchpads... nothing so mysterious
after all, just stack.

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

4 years agopanfrost: Identify mali_shared_memory structure
Alyssa Rosenzweig [Wed, 5 Feb 2020 20:58:28 +0000 (15:58 -0500)]
panfrost: Identify mali_shared_memory structure

This small structure is used to configure shared memory and stack for
compute shaders, and is also present at the beginning of framebuffer
descriptors. Let's factor it out.

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

4 years agopanfrost: Ensure compute shader_meta is zeroed
Alyssa Rosenzweig [Tue, 4 Feb 2020 19:24:44 +0000 (14:24 -0500)]
panfrost: Ensure compute shader_meta is zeroed

In theory the hardware doesn't care but it'll make for easier traces.

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

4 years agopanfrost: Update comment about magic number relating to barriers
Alyssa Rosenzweig [Tue, 4 Feb 2020 19:15:27 +0000 (14:15 -0500)]
panfrost: Update comment about magic number relating to barriers

It's a complicated story. But from what I can tell, in GL compute
without barriers, the blob is able to redistribute the workgroups in
various ways (that are not yet understood), whereas with barriers it
cannot redistribute anything, which accounts for erratic workgroup
packing without barriers.

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

4 years agoci: bump debian image and change llvm deps to 8
Dave Airlie [Fri, 14 Feb 2020 05:47:20 +0000 (15:47 +1000)]
ci: bump debian image and change llvm deps to 8

v3: remove version in a few places (Michel)

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3805>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3805>

4 years agogallivm/s390: fix pass init order on s390 with llvm 8 (v2)
Dave Airlie [Thu, 13 Feb 2020 00:35:51 +0000 (10:35 +1000)]
gallivm/s390: fix pass init order on s390 with llvm 8 (v2)

llvm 8 has some missing pass dependencies, fix the s390 case
as well.

v2: add ARM also (Michel)

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3805>

4 years agoiris: Trim "../../src/gallium/drivers/iris/" out of debug dump filenames
Kenneth Graunke [Tue, 11 Feb 2020 19:36:09 +0000 (11:36 -0800)]
iris: Trim "../../src/gallium/drivers/iris/" out of debug dump filenames

Easier to read.

v2: Also trim "/iris/" (Jordan Justen)

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3830>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3830>

4 years agoiris: Dump frame markers with INTEL_DEBUG=submit
Kenneth Graunke [Tue, 11 Feb 2020 19:21:47 +0000 (11:21 -0800)]
iris: Dump frame markers with INTEL_DEBUG=submit

Now you can see which batches go with which frames.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3830>

4 years agogallium/cso_hash: remove another layer of pointer indirection
Marek Olšák [Wed, 22 Jan 2020 03:53:13 +0000 (22:53 -0500)]
gallium/cso_hash: remove another layer of pointer indirection

Convert this:

    struct cso_hash {
       union {
          struct cso_hash_data *d;
          struct cso_node      *e;
       } data;
    };

to this:

    struct cso_hash {
       struct cso_hash_data data;
       struct cso_node      *end;
    };

1) data is not a pointer anymore.
2) "end" points to "data" and acts as the end of the linked list.
3) This code is still crazy.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

4 years agogallium/cso_hash: cosmetic changes, no behavior changes
Marek Olšák [Wed, 22 Jan 2020 02:47:47 +0000 (21:47 -0500)]
gallium/cso_hash: cosmetic changes, no behavior changes

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

4 years agogallium/cso_hash: remove always constant variable nodeSize
Marek Olšák [Wed, 22 Jan 2020 01:18:54 +0000 (20:18 -0500)]
gallium/cso_hash: remove always constant variable nodeSize

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

4 years agogallium/cso_hash: make cso_hash declared within structures instead of alloc'd
Marek Olšák [Wed, 22 Jan 2020 01:10:43 +0000 (20:10 -0500)]
gallium/cso_hash: make cso_hash declared within structures instead of alloc'd

This removes one level of indirection.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

4 years agogallium/cso_hash: inline a bunch of functions
Marek Olšák [Wed, 22 Jan 2020 00:46:34 +0000 (19:46 -0500)]
gallium/cso_hash: inline a bunch of functions

I'm probably not getting anything out of this, but it's harmless.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

4 years agogallium/u_vbuf: adjust the heuristic for unrolling indices
Marek Olšák [Tue, 21 Jan 2020 00:57:05 +0000 (19:57 -0500)]
gallium/u_vbuf: adjust the heuristic for unrolling indices

This improves performance in the first subtest of Viewperf11/Catia by 10%.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

4 years agogallium/u_upload_mgr: don't do align twice in the u_upload_alloc fast path
Marek Olšák [Fri, 24 Jan 2020 01:40:35 +0000 (20:40 -0500)]
gallium/u_upload_mgr: don't do align twice in the u_upload_alloc fast path

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

4 years agogallium/u_upload_mgr: reduce dereferences by adding buffer_size
Marek Olšák [Fri, 24 Jan 2020 01:35:48 +0000 (20:35 -0500)]
gallium/u_upload_mgr: reduce dereferences by adding buffer_size

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>

4 years agost/mesa: simplify releasing the current attrib buffer
Marek Olšák [Fri, 24 Jan 2020 02:13:44 +0000 (21:13 -0500)]
st/mesa: simplify releasing the current attrib buffer

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3829>