platform/upstream/mesa.git
3 years agopanfrost: Implement panfrost_set_global_binding
Icecream95 [Tue, 22 Dec 2020 10:16:34 +0000 (23:16 +1300)]
panfrost: Implement panfrost_set_global_binding

This is enough OpenCL support to pass the Piglit test
cl-custom-run-simple-kernel with PAN_MESA_DEBUG=deqp.

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

3 years agopipe-loader: Stop trying to use kmsro for vgem
Icecream95 [Tue, 2 Mar 2021 20:11:17 +0000 (09:11 +1300)]
pipe-loader: Stop trying to use kmsro for vgem

Fixes two OpenCL devices being created for a single kmsro-using GPU
when vgem is enabled in the kernel.

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

3 years agopipe-loader,gallium/drm: Fix the kmsro pipe_loader target
Icecream95 [Sun, 28 Feb 2021 21:51:45 +0000 (10:51 +1300)]
pipe-loader,gallium/drm: Fix the kmsro pipe_loader target

Include drm_helper.h to define the driver descriptor again, but with a
new define GALLIUM_KMSRO_ONLY to disable defining descriptors for the
drivers that kmsro uses.

Fixes clinfo on Panfrost.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4002
Fixes: 9ec28b8d226 ("gallium/drm: Deduplicate screen creation for the dynamic (clover) pipe loader.")
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9380>

3 years agointel/fs/copy_prop: check stride constraints with actual final type
Lionel Landwerlin [Wed, 24 Mar 2021 07:56:42 +0000 (09:56 +0200)]
intel/fs/copy_prop: check stride constraints with actual final type

In some cases we will change the type of the destination register of
an instruction. This is the type we should use to verify that we're
allow to do the replacement.

Otherwise we can hit restrictions on CHV and upcoming Xe-Hp for
instance where the copy propagation transforms this :

send(16) (mlen: 2) vgrf10:UD, 0u, 0u, vgrf35:D, null:UD
mov(16) vgrf11:UW, vgrf10<2>:UW
mov(16) vgrf12:UW, vgrf10+0.2<2>:UW
mov(16) vgrf15:HF, |vgrf11|:HF
mov(16) vgrf16:HF, |vgrf12|:HF
mov(8) vgrf41<2>:UW, vgrf15+0.0:UW group0
mov(8) vgrf42<2>:UW, vgrf15+0.16:UW group8
mov(8) vgrf45<2>:UW, vgrf16+0.0:UW group0
mov(8) vgrf46<2>:UW, vgrf16+0.16:UW group8

into this :

send(16) (mlen: 2) vgrf10:UD, 0u, 0u, vgrf35:D, null:UD
mov(8) vgrf41<2>:HF, |vgrf10+0.0|<2>:HF group0
mov(8) vgrf42<2>:HF, |vgrf10+1.0|<2>:HF group8
mov(8) vgrf45<2>:HF, |vgrf10+0.2|<2>:HF group0
mov(8) vgrf46<2>:HF, |vgrf10+1.2|<2>:HF group8

Because of the floating point use, stride and offets should be the
same.

v2: Fix final destination type selection (Curro)

v3: constify (Curro)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9832>

3 years agotu: Skip tu_tiling_config_update_tile_layout() if not using gmem
Matt Turner [Mon, 15 Mar 2021 18:54:23 +0000 (18:54 +0000)]
tu: Skip tu_tiling_config_update_tile_layout() if not using gmem

Otherwise pass->tile_align_w will be 0, leading to a divide by zero and
undefined behavior. In practice, I saw this lead to an infinite loop in
tests like

dEQP-VK.draw.instanced.draw_indexed_indirect_vk_primitive_topology_line_list_attrib_divisor_0_multiview

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9606>

3 years agofreedreno/a5xx: Use VALIDREG/CONDREG like a6xx do.
Eric Anholt [Mon, 29 Mar 2021 20:54:15 +0000 (13:54 -0700)]
freedreno/a5xx: Use VALIDREG/CONDREG like a6xx do.

Fewer magic numbers and less to diff between the two.

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

3 years agofreedreno/a5xx: Add support for clip distances and use them for userclip.
Eric Anholt [Fri, 26 Mar 2021 23:28:46 +0000 (16:28 -0700)]
freedreno/a5xx: Add support for clip distances and use them for userclip.

A little low-stakes RE effort as I unwind from fighting CI all day.  Comes
from diffing dEQP-VK.clipping.user_defined.clip_distance.vert.* on the
blob and comparing to a6xx behavior.  (My blob doesn't do tess, so if
there are equivalent tess fields for some of these, I didn't find them)

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

3 years agolavapipe: enable KHR_shader_atomic_int64
Dave Airlie [Mon, 15 Mar 2021 01:44:17 +0000 (11:44 +1000)]
lavapipe: enable KHR_shader_atomic_int64

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

3 years agogallivm: add 64-bit atomic global support
Dave Airlie [Wed, 17 Mar 2021 00:12:52 +0000 (10:12 +1000)]
gallivm: add 64-bit atomic global support

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9591>

3 years agogallivm: add 64-bit atomic support for ssbo/shared.
Dave Airlie [Mon, 15 Mar 2021 01:43:43 +0000 (11:43 +1000)]
gallivm: add 64-bit atomic support for ssbo/shared.

This just fixes things up to handle bit-size

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9591>

3 years agoac/surface: do not allocate FMASK or CMASK for stencil-only surfaces on GFX9+
Samuel Pitoiset [Mon, 15 Mar 2021 21:24:41 +0000 (22:24 +0100)]
ac/surface: do not allocate FMASK or CMASK for stencil-only surfaces on GFX9+

FMASK/CMASK make no sense with depth/stencil or stencil-only surfaces.
gfx9_compute_miptree() was called twice for stencil-only surfaces,
and the first call was allocating FMASK/CMASK.

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

3 years agoci: Enable iris testing in meson-release
Kenneth Graunke [Fri, 26 Mar 2021 15:08:07 +0000 (08:08 -0700)]
ci: Enable iris testing in meson-release

This should catch any build breaks in release mode.  iris was already
build tested in debug builds, but not release mode.

Suggested by Michel Dänzer.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9862>

3 years agointel: Mark an otherwise unused variable in intel_dump_gpu as ASSERTED
Kenneth Graunke [Fri, 26 Mar 2021 18:04:49 +0000 (11:04 -0700)]
intel: Mark an otherwise unused variable in intel_dump_gpu as ASSERTED

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

3 years agoradv: require DRM 3.35+
Samuel Pitoiset [Wed, 24 Mar 2021 08:54:28 +0000 (09:54 +0100)]
radv: require DRM 3.35+

Linux Kernel 4.15+ is now required for RADV, this kernel has been
released 3 years ago and should be in most modern distros.

This allows us to remove a lot of legacy code for fence/semaphore.

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

3 years agoradv: Only set WRITE_COMPRESS_ENABLE on supported HW.
Bas Nieuwenhuizen [Sat, 27 Mar 2021 21:38:26 +0000 (22:38 +0100)]
radv: Only set WRITE_COMPRESS_ENABLE on supported HW.

Fixes: a7c0cf500b3 ("radv: Enable DCC for image stores on GFX10.")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9876>

3 years agor600/sfn: allocate number of VS outputs based on max driver_location
Gert Wollny [Sun, 28 Mar 2021 18:03:33 +0000 (20:03 +0200)]
r600/sfn: allocate number of VS outputs based on max driver_location

It seems that when the linker optimized the IO it might leave gaps
in the driver output locations, therefore set the size of the output
array based on the highest driver location occupied by a store_output.

Fixes #4520

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9879>

3 years agor600: Don't advertise support for scaled int16 vertex formats
Gert Wollny [Sat, 27 Mar 2021 18:17:07 +0000 (19:17 +0100)]
r600: Don't advertise support for scaled int16 vertex formats

They are not supported by the hardware.
Fixes:
  dEQP-GLES2.functional.vertex_arrays.single_attribute.strides.buffer_0_32_short3_vec4_dynamic_draw_quads_1
  dEQP-GLES2.functional.vertex_arrays.single_attribute.strides.buffer_0_32_short3_vec4_dynamic_draw_quads_256

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9877>

3 years agor600: don't set an index_bias for indirect draw calls
Gert Wollny [Sun, 28 Mar 2021 08:27:20 +0000 (10:27 +0200)]
r600: don't set an index_bias for indirect draw calls

The indirect draw call already encodes the index bias so that no
additional encoding in the hardware is needed in this case.

This fixes a regression with a number of tests from
   dEQP-GLES31.functional.draw_indirect.random.*

Fixes: c6c532faa8cf172715b38783ec7175b626a63944
  "gallium/u_vbuf: use updated pipe_draw_start_count while using draw_vbo"

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9877>

3 years agor600: Fix texture buffer offset alignment
Gert Wollny [Sun, 28 Mar 2021 09:03:35 +0000 (11:03 +0200)]
r600: Fix texture buffer offset alignment

It seems that this has to be 4 (radeonsi also sets this value to 4)

Fixes deqp-gles31:
 functional.texture.texture_buffer.modify.bufferdata.offset_1_alignments
 functional.texture.texture_buffer.modify.bufferdata.offset_7_alignments

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9877>

3 years agofreedreno: Fix file descriptor leak.
Vinson Lee [Mon, 29 Mar 2021 03:24:27 +0000 (20:24 -0700)]
freedreno: Fix file descriptor leak.

Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_handle: Handle variable fd going out of scope leaks the handle.

Fixes: 5a13507164a ("freedreno/perfcntrs: add fdperf")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9889>

3 years agozink: use pre-populated shader-locations
Erik Faye-Lund [Thu, 4 Feb 2021 16:27:49 +0000 (17:27 +0100)]
zink: use pre-populated shader-locations

This is the final step of this little journey, which allows us to no
longer deal with the shader-slot mapping inside the NIR to SPIR-V
translation.

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

3 years agozink: do not depend on shader_slots_reserved for xfb
Erik Faye-Lund [Thu, 4 Feb 2021 15:58:52 +0000 (16:58 +0100)]
zink: do not depend on shader_slots_reserved for xfb

This will be helpful in ripping this out later on.

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

3 years agozink: pre-populate locations in variables
Erik Faye-Lund [Thu, 4 Feb 2021 15:11:00 +0000 (16:11 +0100)]
zink: pre-populate locations in variables

These locations should match what we get out of the pre-existing pass,
and are currently unused. They will be used in a later commit in this
series, but is left like this because this code is fairly fragile.

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

3 years agozink: handle errors in nir_to_spirv
Erik Faye-Lund [Thu, 4 Feb 2021 13:28:46 +0000 (14:28 +0100)]
zink: handle errors in nir_to_spirv

We already have some appropriate error-handling further down here.

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

3 years agoaco/tests: fix isel.sparse.clause for LLVM 12+
Rhys Perry [Thu, 18 Mar 2021 19:14:24 +0000 (19:14 +0000)]
aco/tests: fix isel.sparse.clause for LLVM 12+

Seems disassembly of this instruction was fixed in LLVM 12.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4154
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9694>

3 years agofrontends/va: correct check for invalid format
Erik Faye-Lund [Mon, 29 Mar 2021 13:09:19 +0000 (15:09 +0200)]
frontends/va: correct check for invalid format

We need to check against the correct define, DRM_FORMAT_INVALID.
Checking an uint32_t against DRM_FORMAT_MOD_INVALID will always produce
false anyway.

Caught by Coverity.

Fixes: b85c6531f6d ("frontends/va: add support for VA_EXPORT_SURFACE_COMPOSED_LAYERS")
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9897>

3 years agoandroid: panfrost: Use the blend shader cache attached to the device
Mauro Rossi [Mon, 29 Mar 2021 11:25:19 +0000 (13:25 +0200)]
android: panfrost: Use the blend shader cache attached to the device

pan_blend_shaders.{c,h} files are removed from Makefile.sources
in order to avoid the following building error:

FAILED: out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_panfrost_intermediates/pan_blend_shaders.o
...
clang: error: no such file or directory: 'external/mesa/src/gallium/drivers/panfrost/pan_blend_shaders.c'
clang: error: no input files

Fixes: 7994929e84a3 ("panfrost: Use the blend shader cache attached to the device")
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9894>

3 years agoturnip,ir3: account for dispatch group offsets
Danylo Piliaiev [Mon, 1 Mar 2021 15:31:56 +0000 (17:31 +0200)]
turnip,ir3: account for dispatch group offsets

Fixes tests:
 dEQP-VK.compute.device_group.dispatch_base

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

3 years agoetnaviv/drm: only print out fence error on non timeout
Lionel Landwerlin [Mon, 29 Mar 2021 09:48:21 +0000 (11:48 +0200)]
etnaviv/drm: only print out fence error on non timeout

While looking at the traces emitted by chromium, I saw a lot of those
errors. But looking at the value of ns, it is 0, so it's probably just
the application checking whether work is done or not. Not much point
in printing out an error.

v2: check ret value (Christian)
    check both timeout codes (Lionel)

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9875>

3 years agoutil: rework AMD cpu L3 cache affinity code.
Dave Airlie [Thu, 25 Mar 2021 06:59:50 +0000 (16:59 +1000)]
util: rework AMD cpu L3 cache affinity code.

This changes how the L3 cache affinity code works out the affinity
masks. It works better with multi-CPU systems and should also be
capable of handling big/little type situations if they appear in
the future.

It now iterates over all CPU cores, gets the core count for each
CPU, and works out the L3_ID from the physical CPU ID, and
the current cores L3 cache. It then tracks how many L3 caches
it has seen and reallocate the affinity masks for each one.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4496
Fixes: d8ea5099658 ("util: completely rewrite and do AMD Zen L3 cache pinning correctly")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9782>

3 years agost/glthread: allow for invalid L3 cache id.
Dave Airlie [Thu, 25 Mar 2021 03:40:51 +0000 (13:40 +1000)]
st/glthread: allow for invalid L3 cache id.

If we get 0xffffffff consider L3 cache info invalid and
don't continue.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4496
Fixes: d8ea5099658 ("util: completely rewrite and do AMD Zen L3 cache pinning correctly")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9782>

3 years agollvmpipe: fix cube image size query
Dave Airlie [Mon, 22 Mar 2021 05:31:45 +0000 (15:31 +1000)]
llvmpipe: fix cube image size query

The 3rd coord wasn't being handled properly

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

3 years agollvmpipe: increase PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE value
Timothee Chabat [Mon, 22 Mar 2021 09:46:26 +0000 (10:46 +0100)]
llvmpipe: increase PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE value

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4237
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9750>

3 years agollvmpipe: stop flattening multidraws
Mike Blumenkrantz [Thu, 25 Mar 2021 19:24:20 +0000 (15:24 -0400)]
llvmpipe: stop flattening multidraws

these are now handled in the draw module

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

3 years agoaux/draw: pass full draw params to draw_pt_arrays()
Mike Blumenkrantz [Thu, 25 Mar 2021 19:23:33 +0000 (15:23 -0400)]
aux/draw: pass full draw params to draw_pt_arrays()

multidraw depth maximum: loop directly around the llvmpipe call

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

3 years agoaux/draw: track increment_draw_id value from draw info
Mike Blumenkrantz [Thu, 25 Mar 2021 19:22:27 +0000 (15:22 -0400)]
aux/draw: track increment_draw_id value from draw info

need this in order to accurately update drawid

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

3 years agoaux/draw: move draw param sanitization to end of function
Mike Blumenkrantz [Thu, 25 Mar 2021 19:08:18 +0000 (15:08 -0400)]
aux/draw: move draw param sanitization to end of function

this triggers more work if sanitizing no-ops the draw, but the rest of the
time it won't matter

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

3 years agoaux/draw: pass the full draw params through to draw_pt_arrays_restart()
Mike Blumenkrantz [Thu, 25 Mar 2021 19:04:43 +0000 (15:04 -0400)]
aux/draw: pass the full draw params through to draw_pt_arrays_restart()

multidraw depth 1.5: loop in draw_pt_arrays_restart()

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

3 years agoaux/draw: pass the full draw params through to draw_instances()
Mike Blumenkrantz [Thu, 25 Mar 2021 19:04:43 +0000 (15:04 -0400)]
aux/draw: pass the full draw params through to draw_instances()

multidraw depth 1: loop in draw_instances()

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

3 years agoaux/draw: rewrite PRIM_RESTART_LOOP macro as a function
Mike Blumenkrantz [Thu, 25 Mar 2021 18:58:22 +0000 (14:58 -0400)]
aux/draw: rewrite PRIM_RESTART_LOOP macro as a function

this was a bit too intense to work with

no functional changes

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

3 years agoaux/draw: stop copying draw params unnecessarily
Mike Blumenkrantz [Thu, 25 Mar 2021 18:17:50 +0000 (14:17 -0400)]
aux/draw: stop copying draw params unnecessarily

resolve_draw_info() is only for drawing from streamout, so this check
can be moved forward to avoid overwriting draw params when not necessary

no functional changes at this time

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

3 years agopanfrost: Use the blend shader cache attached to the device
Boris Brezillon [Tue, 23 Mar 2021 11:20:35 +0000 (12:20 +0100)]
panfrost: Use the blend shader cache attached to the device

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

3 years agopanfrost: Move the blend shader cache at the device level
Boris Brezillon [Tue, 23 Mar 2021 11:17:03 +0000 (12:17 +0100)]
panfrost: Move the blend shader cache at the device level

So we can re-use it in the Vulkan driver.

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

3 years agobroadcom/compiler: flag TMU reads with a read dependency on last TMU config
Iago Toral Quiroga [Thu, 25 Mar 2021 13:43:20 +0000 (14:43 +0100)]
broadcom/compiler: flag TMU reads with a read dependency on last TMU config

We were using a write dependency to ensure ordering since LDTMUs sequences
are ordered, but by using a write dependency with TMU config we were also
preserving ordering with TMU config writes that are not a sequence
terminator, which is not required and reduces scheduling flexibility.
Instead, use a write dependency to ensure strict ordering of TMU reads,
but only a read depdency with TMU config.

With this change we also need to update CS barriers to also have a write
dependency with TMU reads to ensure that we don't move TMU reads around
CS barriers.

total instructions in shared programs: 13602500 -> 13597851 (-0.03%)
instructions in affected programs: 2681428 -> 2676779 (-0.17%)
helped: 6567
HURT: 4960
Instructions are helped.

total max-temps in shared programs: 2317927 -> 2317914 (<.01%)
max-temps in affected programs: 13861 -> 13848 (-0.09%)
helped: 355
HURT: 300
Inconclusive result (value mean confidence interval includes 0).

total sfu-stalls in shared programs: 32074 -> 32247 (0.54%)
sfu-stalls in affected programs: 848 -> 1021 (20.40%)
helped: 160
HURT: 327
Inconclusive result (%-change mean confidence interval includes 0).

total inst-and-stalls in shared programs: 13634574 -> 13630098 (-0.03%)
inst-and-stalls in affected programs: 2703041 -> 2698565 (-0.17%)
helped: 6558
HURT: 5020
Inst-and-stalls are helped.

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

3 years agobroadcom/compiler: flag TMU read dependencies against last TMU config
Iago Toral Quiroga [Thu, 25 Mar 2021 10:36:03 +0000 (11:36 +0100)]
broadcom/compiler: flag TMU read dependencies against last TMU config

Instead of last TMU write. According to the documentation, the entries
in the output FIFO are pushed with the *final* input write for the
lookup, which is the one terminating the sequence. We flag these
with last_tmu_config.

This will allow us to move all TMU register writes for a lookup except
the last one ahead of the LDTMUs for the previous lookup, possibly
allowing us to pair up these writes the wrtmuc instructions for the
same lookup, turning code like this:

nop                  ; nop               ; wrtmuc (tex[0].p0 | 0x3)
nop                  ; nop               ; wrtmuc (tex[2].p1 | 0x1)
nop                  ; nop               ; ldunif (ubo[2]+0xe0)
fadd  r4, rf33, rf51 ; mov  unifa, r5    ; ldunif (ubo[2]+0x110)
fmax  rf34, 0, r4    ; nop
nop                  ; mov  tmut, rf11
nop                  ; mov  tmus, rf0

into:

nop                  ; mov  tmut, rf11   ; wrtmuc (tex[0].p0 | 0x3)
nop                  ; nop               ; wrtmuc (tex[2].p1 | 0x1)
nop                  ; nop               ; ldunif (ubo[2]+0xe0)
fadd  r4, rf33, rf51 ; mov  unifa, r5    ; ldunif (ubo[2]+0x110)
fmax  rf34, 0, r4    ; nop
nop                  ; mov  tmus, rf0

total instructions in shared programs: 13648140 -> 13602500 (-0.33%)
instructions in affected programs: 3497402 -> 3451762 (-1.30%)
helped: 12044
HURT: 3484
Instructions are helped.

total max-temps in shared programs: 2318687 -> 2317927 (-0.03%)
max-temps in affected programs: 17234 -> 16474 (-4.41%)
helped: 615
HURT: 198
Max-temps are helped.

total sfu-stalls in shared programs: 32354 -> 32074 (-0.87%)
sfu-stalls in affected programs: 1462 -> 1182 (-19.15%)
helped: 461
HURT: 188
Sfu-stalls are helped.

total inst-and-stalls in shared programs: 13680494 -> 13634574 (-0.34%)
inst-and-stalls in affected programs: 3514405 -> 3468485 (-1.31%)
helped: 12062
HURT: 3486
Inst-and-stalls are helped.

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

3 years agolavapipe: refactor indexed draw dispatch to handle multidraws
Mike Blumenkrantz [Thu, 25 Mar 2021 17:54:01 +0000 (13:54 -0400)]
lavapipe: refactor indexed draw dispatch to handle multidraws

each indexed direct draw cmd now contains n draws (though right now n=1)

indexed draws now also have a flag used to avoid recalculating start index if
a cmdbuf is submitted multiple times

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

3 years agolavapipe: refactor base draw dispatch to handle multidraws
Mike Blumenkrantz [Thu, 25 Mar 2021 17:54:01 +0000 (13:54 -0400)]
lavapipe: refactor base draw dispatch to handle multidraws

each direct draw cmd now contains n draws (though right now n=1)

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

3 years agozink: ci updates
Mike Blumenkrantz [Wed, 24 Mar 2021 19:24:26 +0000 (15:24 -0400)]
zink: ci updates

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

3 years agozink: remove explicit fencing for query results
Mike Blumenkrantz [Fri, 12 Mar 2021 14:00:16 +0000 (09:00 -0500)]
zink: remove explicit fencing for query results

now that the results are automatically being copied to internal buffers,
mapping the buffers will handle any fencing that's required

the only caveat is that the query still needs to be flushed for a result
to be returned

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

3 years agozink: reorder availability handling for (user) qbos
Mike Blumenkrantz [Sun, 14 Mar 2021 23:39:24 +0000 (19:39 -0400)]
zink: reorder availability handling for (user) qbos

if the shortcut method without a staging buffer fails, falling back
to the staging buffer is more sane than silently failing

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

3 years agozink: don't use PARTIAL bit for query results with time queries
Mike Blumenkrantz [Sun, 14 Mar 2021 23:28:52 +0000 (19:28 -0400)]
zink: don't use PARTIAL bit for query results with time queries

this is illegal

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

3 years agozink: bump pools up to 5k queries each
Mike Blumenkrantz [Wed, 24 Mar 2021 19:34:43 +0000 (15:34 -0400)]
zink: bump pools up to 5k queries each

50 is very small and triggers constant stalls; this should probably be
tuned more at some point in the future since even this value is small in
some scenarios

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

3 years agozink: rewrite query internals
Mike Blumenkrantz [Fri, 18 Dec 2020 17:52:05 +0000 (12:52 -0500)]
zink: rewrite query internals

this adds internal qbos to each query which record the results of queries incrementally,
meaning that any time we want the result of a query we just have to read the
buffer back

in particular this opens up some possibilities for further optimization, specifically with
actual qbos where we can now pass the internal qbo off to a compute shader to
mimic the check_query_results() handling and avoid having to actually sync or
do a cpu read

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

3 years agozink: remove special casing for occlusion qbos
Mike Blumenkrantz [Fri, 18 Dec 2020 23:07:00 +0000 (18:07 -0500)]
zink: remove special casing for occlusion qbos

this seems fine now

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

3 years agozink: manually handle more bool query types for copying
Mike Blumenkrantz [Fri, 18 Dec 2020 23:05:23 +0000 (18:05 -0500)]
zink: manually handle more bool query types for copying

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

3 years agozink: remove flush from query buffer copy
Mike Blumenkrantz [Fri, 18 Dec 2020 19:12:22 +0000 (14:12 -0500)]
zink: remove flush from query buffer copy

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

3 years agozink: create result buffers for all query streams
Mike Blumenkrantz [Fri, 18 Dec 2020 17:44:11 +0000 (12:44 -0500)]
zink: create result buffers for all query streams

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

3 years agozink: clean up query creation failure paths
Mike Blumenkrantz [Fri, 18 Dec 2020 17:40:21 +0000 (12:40 -0500)]
zink: clean up query creation failure paths

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

3 years agozink: rework border color handling
Mike Blumenkrantz [Mon, 28 Dec 2020 20:08:46 +0000 (15:08 -0500)]
zink: rework border color handling

we should be matching the format type here to the underlying surface type
for int/float

also we can avoid using a custom border color if the color can be reduced to
a non-custom color

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

3 years agozink: ralloc shader cache and keys
Mike Blumenkrantz [Mon, 14 Dec 2020 19:26:05 +0000 (14:26 -0500)]
zink: ralloc shader cache and keys

hash table keys (keybox) are allocated, so we can avoid leaking them by
allocating everything on a single ralloc context

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

3 years agozink: flatten out buffer creation usage flags codepath
Mike Blumenkrantz [Mon, 4 Jan 2021 16:55:16 +0000 (11:55 -0500)]
zink: flatten out buffer creation usage flags codepath

GL doesn't know what it's doing, so we just need all the flags all the time

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

3 years agozink: toggle between linear/optimal tiling during image creation
Mike Blumenkrantz [Thu, 4 Feb 2021 13:11:13 +0000 (08:11 -0500)]
zink: toggle between linear/optimal tiling during image creation

if we would be creating an unusable image, don't

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

3 years agozink: check image format props before creating image
Mike Blumenkrantz [Wed, 3 Feb 2021 20:34:58 +0000 (15:34 -0500)]
zink: check image format props before creating image

ensure that these attrs are viable before failing silently later on

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

3 years agozink: add color output bit and/or use linear tiling for sampled images
Mike Blumenkrantz [Wed, 3 Feb 2021 20:32:52 +0000 (15:32 -0500)]
zink: add color output bit and/or use linear tiling for sampled images

these need to have some way to get data onto them

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

3 years agozink: incrementally add image usage flags based on device caps
Mike Blumenkrantz [Wed, 3 Feb 2021 20:32:17 +0000 (15:32 -0500)]
zink: incrementally add image usage flags based on device caps

these should be provided, but if not...

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

3 years agozink: create separate vk image/buffer objects for shader image use
Mike Blumenkrantz [Sat, 12 Dec 2020 06:45:29 +0000 (01:45 -0500)]
zink: create separate vk image/buffer objects for shader image use

the STORAGE_TEXEL and STORAGE_IMAGE bits can't be accurately applied due
to opengl allowing all resources to be used everywhere, so instead we can
create a separate object on demand which is used only by shaders and gets
extra barriers inferred along with the base object to avoid desync whenever
it is used

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

3 years agozink: break out barrier struct initializing into helper funcs
Mike Blumenkrantz [Mon, 30 Nov 2020 17:36:24 +0000 (12:36 -0500)]
zink: break out barrier struct initializing into helper funcs

make this and the no-op handling reusable for future extension

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

3 years agozink: reorder barrier util functions to set up barrier struct before batch
Mike Blumenkrantz [Mon, 30 Nov 2020 17:27:24 +0000 (12:27 -0500)]
zink: reorder barrier util functions to set up barrier struct before batch

no functional changes

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

3 years agozink: make descriptor state invalidate public
Mike Blumenkrantz [Thu, 24 Dec 2020 01:15:22 +0000 (20:15 -0500)]
zink: make descriptor state invalidate public

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

3 years agozink: break out image/buffer create info structs into helper funcs
Mike Blumenkrantz [Sat, 12 Dec 2020 05:40:19 +0000 (00:40 -0500)]
zink: break out image/buffer create info structs into helper funcs

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

3 years agozink: fix format support detection for storage texel buffers and shader images
Mike Blumenkrantz [Thu, 10 Dec 2020 21:49:13 +0000 (16:49 -0500)]
zink: fix format support detection for storage texel buffers and shader images

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

3 years agozink: reset all fences when waiting on batch state
Mike Blumenkrantz [Fri, 27 Nov 2020 14:47:10 +0000 (09:47 -0500)]
zink: reset all fences when waiting on batch state

at this point we know all the states are available, so we can shortcut
future state-finding

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

3 years agozink: stall when we start getting a lot of uncompleted batches
Mike Blumenkrantz [Fri, 27 Nov 2020 14:37:24 +0000 (09:37 -0500)]
zink: stall when we start getting a lot of uncompleted batches

temporary oom handling, though it's unrealistic for this to be hit

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

3 years agozink: use correct surface ref function for context destroy
Mike Blumenkrantz [Mon, 29 Mar 2021 01:27:44 +0000 (21:27 -0400)]
zink: use correct surface ref function for context destroy

the regular surface reference function can never be used in the driver
if it is possible that a surface may be destroyed, as this may reference
a previously-destroyed context

Fixes: 92a5ea13fcd ("zink: implement a global framebuffer cache")

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

3 years agozink: only do shader updates when relevant stages are dirty
Mike Blumenkrantz [Wed, 16 Dec 2020 17:02:51 +0000 (12:02 -0500)]
zink: only do shader updates when relevant stages are dirty

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

3 years agolavapipe: fix array texture region copies
Mike Blumenkrantz [Mon, 22 Mar 2021 19:45:37 +0000 (15:45 -0400)]
lavapipe: fix array texture region copies

these need to use different struct members for copying array textures

the buffer2image variants are already doing the right thing

Fixes: b38879f8c5f ("vallium: initial import of the vulkan frontend")

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

3 years agozink: also fix image buffer layer copying
Mike Blumenkrantz [Mon, 22 Mar 2021 19:34:18 +0000 (15:34 -0400)]
zink: also fix image buffer layer copying

this differs based on image type

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

3 years agozink: fix handling for image types in resource_copy_region hook
Mike Blumenkrantz [Mon, 22 Mar 2021 19:16:06 +0000 (15:16 -0400)]
zink: fix handling for image types in resource_copy_region hook

different image types are supposed to use different members of this struct
to indicate layer copies, and this can't necessarily be inferred by checking
array_size

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

3 years agolavapipe: remove lvp_descriptor_update_template::descriptor_set_layout
Mike Blumenkrantz [Fri, 26 Mar 2021 18:04:16 +0000 (14:04 -0400)]
lavapipe: remove lvp_descriptor_update_template::descriptor_set_layout

this wasn't used and caused crashes when running with validation enabled
due to violating spec:

This parameter is ignored if templateType is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET

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

3 years agolavapipe: ignore templateType when descriptor template isn't for push descriptors
Mike Blumenkrantz [Fri, 26 Mar 2021 12:09:26 +0000 (08:09 -0400)]
lavapipe: ignore templateType when descriptor template isn't for push descriptors

spec compliance requires this and validation may crash without it

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

3 years agor600/sfn: make allocate_temp_register private to valuepool
Gert Wollny [Sat, 27 Mar 2021 16:42:04 +0000 (17:42 +0100)]
r600/sfn: make allocate_temp_register private to valuepool

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: use get_temp_vec4 directly when fetching
Gert Wollny [Sat, 27 Mar 2021 16:41:34 +0000 (17:41 +0100)]
r600/sfn: use get_temp_vec4 directly when fetching

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: clean up value pool interface usage in emit_stream
Gert Wollny [Sat, 27 Mar 2021 16:41:02 +0000 (17:41 +0100)]
r600/sfn: clean up value pool interface usage in emit_stream

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: clean up multi-sample texture load
Gert Wollny [Sat, 27 Mar 2021 16:40:28 +0000 (17:40 +0100)]
r600/sfn: clean up multi-sample texture load

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: remove find_msb lowering in driver
Gert Wollny [Sat, 27 Mar 2021 16:15:03 +0000 (17:15 +0100)]
r600/sfn: remove find_msb lowering in driver

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: force dual source blend output handling in some cases
Gert Wollny [Mon, 22 Mar 2021 07:18:52 +0000 (08:18 +0100)]
r600/sfn: force dual source blend output handling in some cases

If an output has a dual source index > 0 then we need to emit both
outputs, even if the number of outputs is larger than the number
of active outputs.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: remove old deref code
Gert Wollny [Sun, 21 Mar 2021 22:43:23 +0000 (23:43 +0100)]
r600/sfn: remove old deref code

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: lowered FS output IO
Gert Wollny [Sun, 21 Mar 2021 21:45:06 +0000 (22:45 +0100)]
r600/sfn: lowered FS output IO

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: lower VS IO and drop old deref code
Gert Wollny [Sun, 21 Mar 2021 19:48:19 +0000 (20:48 +0100)]
r600/sfn: lower VS IO and drop old deref code

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: drop the local register mep
Gert Wollny [Sun, 21 Mar 2021 18:50:02 +0000 (19:50 +0100)]
r600/sfn: drop the local register mep

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: switch assembler creation to use visitor
Gert Wollny [Sun, 21 Mar 2021 17:50:36 +0000 (18:50 +0100)]
r600/sfn: switch assembler creation to use visitor

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: fix some formatting
Gert Wollny [Mon, 15 Mar 2021 08:22:38 +0000 (09:22 +0100)]
r600/sfn: fix some formatting

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: remove extra parameter from alu assemebly emission
Gert Wollny [Sun, 14 Mar 2021 16:05:24 +0000 (17:05 +0100)]
r600/sfn: remove extra parameter from alu assemebly emission

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: Add skelton for visitor pattern
Gert Wollny [Tue, 2 Feb 2021 12:45:50 +0000 (13:45 +0100)]
r600/sfn: Add skelton for visitor pattern

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agor600/sfn: Make some value pool functions private
Gert Wollny [Sun, 21 Mar 2021 16:48:12 +0000 (17:48 +0100)]
r600/sfn: Make some value pool functions private

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9874>

3 years agoutil/primconvert: Handle indirect and multi-draw
Rob Clark [Sun, 21 Mar 2021 18:08:14 +0000 (11:08 -0700)]
util/primconvert: Handle indirect and multi-draw

Indirect handling was completely missing.  And even though we have to
emulate multi-draw, this pushes it out of the fast/hot path in the
driver's draw_vbo()

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

3 years agofreedreno: Don't handle multi-draw in indirect case
Rob Clark [Sun, 21 Mar 2021 17:37:40 +0000 (10:37 -0700)]
freedreno: Don't handle multi-draw in indirect case

num_draws is only applicable to direct draws, so we can simplify things
a bit.

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

3 years agovirgl: Use util_draw_multi() helper
Rob Clark [Sun, 21 Mar 2021 17:14:10 +0000 (10:14 -0700)]
virgl: Use util_draw_multi() helper

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

3 years agov3d: Use util_draw_multi() helper
Rob Clark [Sun, 21 Mar 2021 17:13:04 +0000 (10:13 -0700)]
v3d: Use util_draw_multi() helper

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742>

3 years agovc4: Use util_draw_multi() helper
Rob Clark [Sun, 21 Mar 2021 17:12:01 +0000 (10:12 -0700)]
vc4: Use util_draw_multi() helper

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742>