Commit Graph

127612 Commits

Author SHA1 Message Date
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
Alyssa Rosenzweig 01d12c353e pan/decode: Don't try to dereference heap mapping
It might not be mapped from our perspective, we shouldn't crash on that
just for a validation that isn't actually correct.

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 b41692caf4 panfrost: Avoid minimum stack allocations
If stack isn't used, don't allocate it - simple as that.

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 17c617cdb7 panfrost: Introduce invisible pool
Whereas the main batch->pool is CPU read/write, the new
batch->invisible_pool is not. This enables GPU-internal structures that
the CPU must allocate from a pool dynamically but does not read,
corresponding to the BO_INVISIBLE create flag.

The use case is speeding up varying allocation by skipping the
CPU-side mmap/munmap.

We simultaneously half the pool's minimal allocation to avoid negatively
affecting memory usage.

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 40c0d7a13d panfrost: Pre-allocate memory for pool
Seeing random BO creates in the middle of command stream generation is
annoying, let's preallocate memory so CPU profiling is less random.

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
Kenneth Graunke 3fed1c75ef iris: Fix headerless sampler messages in compute shaders with preemption
We were failing to set the "Headerless Message for Preemptable Contexts"
bit in SAMPLER_MODE in the compute context.  Other drivers use a single
hardware context, so setting it on the render engine was sufficient to
flip it in both pipelines.  But iris uses a separate hardware context
for compute, so we were only getting these set for the render context.

Thanks to Jason Ekstrand for catching this bug.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6380>
2020-08-20 14:57:40 +00:00
Samuel Pitoiset 58817bda8b aco: fix file leak in ra_fail()
Fixes: c2b1978aa4 ("aco: rework the way various compilation/validation errors are reported")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6399>
2020-08-20 14:42:07 +00:00
Jason Ekstrand 74ac8f3f64 nir/opt_large_constants: Fix a type/deref_type typo
Fixes: df9596353a "nir/large_constants: Handle incomplete derefs"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6403>
2020-08-20 08:47:04 -05:00
Marcin Ślusarz e5bac3c669 gitlab: ask for more detailed info about GPU
PCIID is only printed by lspci/lshw on demand.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6345>
2020-08-20 11:56:19 +00:00