Commit Graph

127470 Commits

Author SHA1 Message Date
Eric Anholt c19b7fc024 ci/freedreno: Move our skips lists over to being known-flakes lists.
This makes sure that we keep executing the tests so that we can get our
alerts in IRC and know whether the tests are still flaking.  It also keeps
us from having adjustments to the skip list causing failures/flakes to
move to different tests (as seen with a530 having to move some xfails
around after changing the skip list)

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6392>
2020-08-20 23:59:50 +00:00
Eric Anholt 30da82c74c ci/deqp-runner: Add a post-deqp-run filter list for known flakes.
So far, we've been putting our known flakes that intermittently fail CI
into the skips list.  This has two downsides:

1) You don't know when the flakes stop happening and when to delist them
   from skips, unless you go do a bunch of manual runs with the skips list
   cleared.

2) If the flake was because the previous test left some broken state in
   the HW, you may just move your intermittent to a new test.

With this new path, you can list your flakes in the flakes file to keep
them from erroring out people's pipelines.  They still get run and
reported as is.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6392>
2020-08-20 23:59:50 +00:00
Eric Anholt 4bb59fcee9 ci/deqp-runner: Drop unused "count" variable
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6392>
2020-08-20 23:59:50 +00:00
Eric Anholt 32fd2ee023 ci/deqp-runner: Drop stale comment from deqp-runner.sh.
We don't rerun to detect flakes ourselves any more since the runner does
it internally.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6392>
2020-08-20 23:59:50 +00:00
Jesse Natalie 42d7bbfc22 nir: Use 'unsigned' instead of enum types in nir_variable::data
MSVC treats enums as signed, so storing values that use the topmost
bit of the explicitly sized field loads as a negative value instead.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6393>
2020-08-20 22:22:06 +00:00
Jason Ekstrand 1ccd681109 nir: Add an LOD parameter to image_*_size
The OpenCL image_width/height/depth functions have variants which can
take an LOD parameter.  More importantly, LLVM-SPIRV-Translator always
generates OpImageQuerySizeLod even if the LOD is guaranteed to be zero.
Given that over half the hardware out there has an LOD field for image
size queries (based on a rudimentary scan through their NIR -> whatever
code), we may as well just add the source to the NIR intrinsic.  If this
is ever a problem for anyone, the lowering is pretty trivial.

I've also added asserts to everyone's drivers that should alert them if
they ever see an LOD other than zero.  This will never happen with GL or
Vulkan so there's no need for panic.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6396>
2020-08-20 20:48:10 +00:00
Arcady Goldmints-Orlov a104902590 broadcom/compiler: Enable PER_QUAD for UBO and SSBO loads.
Helper invocations need to be able to read from UBOs since those values
can be used for flow control, but writes from helper invocations need to
be dropped.

Fixes CTS tests:
  dEQP-VK.glsl.derivate.*.uniform_loop.*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6356>
2020-08-20 20:14:14 +00:00
Arcady Goldmints-Orlov c3258f927c broadcom/compiler: Add a constant folding pass after nir_lower_io
The nir_lower_io pass produces a bunch of constant arithmetic, and
assumes that constant folding will simplify it away.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6356>
2020-08-20 20:14:14 +00:00
Arcady Goldmints-Orlov bd87cdad18 broadcom/compiler: support nir_intrinsic_load_sample_id
This adds support for the intrinsic as well as the vir_SAMPID
instruction that corresponds to it in vir.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6356>
2020-08-20 20:14:14 +00:00
Karol Herbst adda97c98b clover/spirv: pass list of supported extensions to the translator
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
2020-08-20 19:48:12 +00:00
Pierre Moreau a624faeef9 clover/nir: Register callback for translation messages (v2)
This allows us to add SPIR-V to NIR translation failure messages to the
program’s compilation log, which can then be queried by the user.

v2: Replace the if-statement in `debug_function()` with an assert.

Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
2020-08-20 19:48:12 +00:00
Pierre Moreau 2402466a08 clover/llvm: Use the highest supported SPIR-V version (v4)
v2:
   a) Move `supported_spirv_verssions()` to `spirv::` (Francisco Jerez)
   b) Introduce a `SPV_MAKE_VERSION` macro to avoid making mistakes and
     making it more readable than its uint representation.
v3: Replaced an if-statement with a `std::min()` in
    `spirv::get_spirv_translator_options()` (Karol Herbst)
v4: Turn `SPV_MAKE_VERSION()` into a function (Francisco Jerez)

Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
2020-08-20 19:48:12 +00:00
Pierre Moreau 6ed87594b1 meson: Raise minimum version for SPIR-V OpenCL deps (v4)
SPIRV-LLVM-Translator had API-breaking changes during version 0.2.1.
Since the new API was being used, a higher version has to be requested.

While at it and since SPIRV-LLVM-Translator added a new API to request a
specific SPIR-V version as well as allowed SPIR-V extensions, increase
the version number to the first including those new features.

v2: Require an LLVM version which is compatible with the
    SPIRV-LLVM-Translator that was found; that requirement was
    previously implicit and would be ensured when that library was
    built. Making it explicit will help in cases where multiple versions
    of LLVM might be installed.
v3: fix use of undefined _minimum_llvmspirvlib_version_array
v4 (Karol): fix creating the minimum requested version
            Simplifing the code

Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
2020-08-20 19:48:12 +00:00
Pierre Moreau ec6bad140b clover/spirv: Print linked SPIR-V module if asked
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
2020-08-20 19:48:12 +00:00
Pierre Moreau a9ca73730e clover/spirv: Remove unused tuple header
Fixes: 2147386505 ("clover/spirv: Add functions for parsing arguments, linking programs, etc.")
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Serge Martin <edb@sigluy.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
2020-08-20 19:48:12 +00:00
Karol Herbst e9ddb9b2ae clover/spirv: rework handling of spirv extensions
What extensions we support depends on spirv_to_nir but it doesn't give us a
list. So hardcode one and add extensions we know we support and hit in the
wild.

v2: move into spirv lib

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
2020-08-20 19:48:12 +00:00
Alyssa Rosenzweig 1cfbc5cff5 panfrost: Fix alignment on Bifrost
This was real "fun" to debug...

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 373a204bdd ("panfrost: Pass alignments explicitly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6410>
2020-08-20 19:37:08 +00:00
Connor Abbott b708a1acb8 tu: Enable VK_KHR_multiview
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:18 +00:00
Connor Abbott c0c7dbd103 tu: Implement multiview pipeline state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:18 +00:00
Connor Abbott c884afc6f7 tu: Add multiview lowering pass
For now this only handles an a630 quirk where PC_MULTIVIEW_MASK doesn't
exist. However in the future it will also handle multi-position output.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:18 +00:00
Connor Abbott 7b53ac1c1f tu: Implement multiview query interactions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:18 +00:00
Connor Abbott ff5f460980 tu: Improve timestamp queries
As the original comment says, we can't really give the user what they
want if there's a timestamp inside a GMEM renderpass, but we can give
them a better approximation of it. At least sysmem renderpasses will now
have an accurate timestamp.

Also, don't emit the WFI if it's not necessary, based on the stage
flags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:18 +00:00
Connor Abbott 6c446fe650 tu: Implement multiview clear/resolve interactions
Loads, stores, clears, and resolves now happen per-view. Since we only
support multiview with sysmem rendering, we only implement this for
sysmem clears and resolves.

There aren't any tests that mix multiview and MSAA, so no coverage of
the resolve path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:17 +00:00
Connor Abbott 99a87e5e0e tu: Parse multiview render pass info
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:17 +00:00
Connor Abbott f01a0dc27a tu: Translate VkRenderPassMultiviewCreateInfo to VkRenderPassCreateInfo2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:17 +00:00
Connor Abbott 5ef960e93c ir3: Add support for gl_ViewIndex in VS & FS
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:17 +00:00
Connor Abbott 4b163ff1eb freedreno/a6xx: Add multiview registers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5720>
2020-08-20 19:21:17 +00:00
Rob Clark 6a8aaf7c00 freedreno/a6xx: disable LRZ when color channels are masked
From the PoV of early-z tests, having masked color channels is basically
like blend, ie. we do actually care about the fragments (or at least
parts of them) from previous draws.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6409>
2020-08-20 19:01:52 +00:00
Rob Clark 4de027d6bf freedreno/cffdump: add arg to filter by process name
Usueful when you have a cmdstream trace which consists of multiple
different processes.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6409>
2020-08-20 19:01:52 +00:00
Eric Anholt b440c28b78 nir: Shrink store intrinsic num_components to the size used by the writemask.
This cuts a bunch of vector setup for undef components in the i965 vec4
backend.  Noticed while looking into codegen regressions in nir-to-tgsi.

brw results:
total instructions in shared programs: 3893221 -> 3881461 (-0.30%)
total cycles in shared programs: 113792154 -> 113810288 (0.02%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
2020-08-20 16:44:08 +00:00
Eric Anholt 5f26c21e62 nir: Expand opt_undef to handle undef channels in a store intrinsic.
Instead of only handling all-undef stores, shrink the writemask to just
the defined channels.  Cleans up a bunch of writemasks on prog_to_nir
output in particular.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
2020-08-20 16:44:08 +00:00
Eric Anholt a29b7b6ff5 nir/opt_undef: Handle a couple more normal store intrinsics.
They've got the value in the same slot as the others, and the same undef
behavior should be fine.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
2020-08-20 16:44:08 +00:00
Eric Anholt b3c822a0a8 radv: Move nir_opt_shrink_vectors() into the opt loop.
Upcoming changes to opt_undef will result in this pass doing more work and
generating vector MOVs that need re-scalarizing (which is inside of the
main opt loop).

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6054>
2020-08-20 16:44:08 +00:00
Alyssa Rosenzweig 94f4ecba8d panfrost: Reduce attribute buffer allocations
With vertex ID / instance ID in use, vs->attribute_count will be
expanded appropriately. Without them in use, everything is 1:1 (or 1:2
in the worst case of NPOT everything).

Down to 3 slabs + 64184 bytes.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:02 +02:00
Alyssa Rosenzweig 9a6934d67f panfrost: Don't reserve for NPOT w/o instancing
It's impossible. Down to 5 slabs + 45368.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:02 +02:00
Alyssa Rosenzweig 09ea7c09cc panfrost: Don't overallocate attributes
We only need vertex ID / instance ID if the shader actually requests it.
Cuts -bideas's beginning from (7 slab + 63352 bytes) to (7 slabs +
32568).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:02 +02:00
Alyssa Rosenzweig 3df90c7c27 panfrost: Fix attribute buffer underallocation
Breaks on the pathological where everything is NPOT.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: e646c861fc ("panfrost: Use packs for vertex attribute buffers")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:02 +02:00
Alyssa Rosenzweig 373a204bdd panfrost: Pass alignments explicitly
In most cases, GPU data structures need only be self-aligned; the
worst-case 128 byte alignment is wasteful. By passing explicit
alignments, we can reduce memory usage, avoid extra allocations, and
improve descriptor cache locality.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig 1cb47f8eea panfrost: Free batch->dependencies
On glmark2-es2 -bterrain:

594.05KB leaked over 9282 calls from:
    panfrost_batch_update_bo_access
      at ../src/gallium/drivers/panfrost/pan_job.c:462
      in /home/alyssa/rockchip_dri.so
    panfrost_batch_add_bo
      at ../src/gallium/drivers/panfrost/pan_job.c:560
    panfrost_batch_add_bo
      at ../src/gallium/drivers/panfrost/pan_job.c:519
      in /home/alyssa/rockchip_dri.so
    panfrost_batch_add_resource_bos
      at ../src/gallium/drivers/panfrost/pan_job.c:569
    panfrost_batch_add_fbo_bos
      at ../src/gallium/drivers/panfrost/pan_job.c:588
      in /home/alyssa/rockchip_dri.so
    panfrost_create_batch
      at ../src/gallium/drivers/panfrost/pan_job.c:126

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig 680fb05f99 panfrost: Use memctx for sysvals
8.74KB leaked over 52 calls from:
    0xffffbb5b9fc3
      in ??
    _mesa_hash_table_init
      at ../src/util/hash_table.c:163
      in /home/alyssa/rockchip_dri.so
    _mesa_hash_table_create
      at ../src/util/hash_table.c:186
    _mesa_hash_table_u64_create
      at ../src/util/hash_table.c:701
      in /home/alyssa/rockchip_dri.so
    panfrost_nir_assign_sysvals
      at ../src/panfrost/util/pan_sysval.c:130
      in /home/alyssa/rockchip_dri.so
    midgard_compile_shader_nir
      at ../src/panfrost/midgard/midgard_compile.c:2905
      in /home/alyssa/rockchip_dri.so

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig 8dd38e5a3e pan/mdg: Free previous liveness
Before we drop the reference.

160 calls with 0B peak consumption from:
    0xffffbd9d2fc3
      in ??
    pan_compute_liveness
      at ../src/panfrost/util/pan_liveness.c:127
      in /home/alyssa/rockchip_dri.so
    mir_compute_liveness
      at ../src/panfrost/midgard/midgard_liveness.c:55
      in /home/alyssa/rockchip_dri.so
    midgard_opt_dead_code_eliminate
      at ../src/panfrost/midgard/midgard_opt_dce.c:118
      in /home/alyssa/rockchip_dri.so

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig 62637a913a panfrost: Free hash_to_temp map
No need to put it on the context, we can keep it local in mir_squeeze
and drop when we're done.

15.77KB leaked over 85 calls from:
    0xffffaed3bfc3
      in ??
    _mesa_hash_table_rehash
      at ../src/util/hash_table.c:368
      in /home/alyssa/rockchip_dri.so
    hash_table_insert
      at ../src/util/hash_table.c:403
      in /home/alyssa/rockchip_dri.so
    find_or_allocate_temp
      at ../src/panfrost/midgard/mir_squeeze.c:48
      in /home/alyssa/rockchip_dri.so
    find_or_allocate_temp
      at ../src/panfrost/midgard/mir_squeeze.c:35
      in /home/alyssa/rockchip_dri.so
    mir_squeeze_index
      at ../src/panfrost/midgard/mir_squeeze.c:76

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig da6d0e3fac panfrost: Free NIR of blit shaders
After we compile from NIR to a native binary, we can throw away the NIR.

17.47KB leaked over 104 calls from:
    0xffff87dcafc3
      in ??
    _mesa_hash_table_init
      at ../src/util/hash_table.c:163
      in /home/alyssa/rockchip_dri.so
    _mesa_hash_table_create
      at ../src/util/hash_table.c:186
    nir_lower_vars_to_ssa_impl
      at ../src/compiler/nir/nir_lower_vars_to_ssa.c:717
      in /home/alyssa/rockchip_dri.so
    nir_lower_vars_to_ssa
      at ../src/compiler/nir/nir_lower_vars_to_ssa.c:817
    optimise_nir
      at ../src/panfrost/midgard/midgard_compile.c:504
      in /home/alyssa/rockchip_dri.so
    midgard_compile_shader_nir
      at ../src/panfrost/midgard/midgard_compile.c:2895
      in /home/alyssa/rockchip_dri.so
    panfrost_build_blit_shader
      at ../src/panfrost/lib/pan_blit.c:103
      in /home/alyssa/rockchip_dri.so

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig 9146f596ed panfrost: Free cloned NIR shader
Fixes heaptrack leak:

19.37KB leaked over 63 calls from:
    0xffff92bbefc3
      in ??
    nir_alu_instr_create
      at ../src/compiler/nir/nir.c:442
      in /home/alyssa/rockchip_dri.so
    clone_alu
      at ../src/compiler/nir/nir_clone.c:277
      in /home/alyssa/rockchip_dri.so
    clone_instr
      at ../src/compiler/nir/nir_clone.c:495
      in /home/alyssa/rockchip_dri.so
    clone_block
      at ../src/compiler/nir/nir_clone.c:544
    clone_cf_list
      at ../src/compiler/nir/nir_clone.c:594
    clone_function_impl
      at ../src/compiler/nir/nir_clone.c:672
      in /home/alyssa/rockchip_dri.so
    nir_shader_clone
      at ../src/compiler/nir/nir_clone.c:744
      in /home/alyssa/rockchip_dri.so
    panfrost_shader_compile
      at ../src/gallium/drivers/panfrost/pan_assemble.c:154
      in /home/alyssa/rockchip_dri.so

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig ba4fc67812 panfrost: Fix blend leak for render targets 5-8
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 375d4c2c74 ("panfrost: Extend blending to MRT")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig 4ff4b04b50 panfrost: Keep finalized blend state constant
It's probably fine, but the writes to an uninitialized struct make me
nervous. Let's do the obvious thing instead.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig 93200ce4c6 panfrost: Drop depth-only case in blend finalize
Since last commit, we don't call this function at all if there's no
matching colour buffer (it wouldn't make sense to!)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig 8249e2b9a2 panfrost: Explicitly handle nr_cbufs=0 case
Avoids some indirection around colour buffer count.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:01 +02:00
Alyssa Rosenzweig dc7fbe114b panfrost: Drop implicit blend pooling
We dropped blend shader pools a long time ago for various reasons, but
the indirection required remained. Oops.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:00 +02:00
Alyssa Rosenzweig d8deb1eb6a panfrost: Share tiler_heap across batches/contexts
There's only one tiler, so this is safe. (The blob does the same
optimization.) This avoids allocating multiple heaps for multiple
batches, which wastes memory and CPU time.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
2020-08-20 18:15:00 +02:00