Alyssa Rosenzweig
15b5573194
agx: Set reads_tib appropriately
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
d0f566a90d
agx: Implement load_output
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
1b9b2f9046
agx: Condition writeout ops on already being emitted
...
There's a lot of r/e waiting here, but will be needed for ld_tile. Match
the Metal blob.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
41d8db33a2
agx: Assume lower_fragcolor has been called
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
1164c992cf
agx: Add ld_tile opcode
...
Variant of st_tile.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
07fdc0015e
agx: Rename blend -> st_tile
...
For symmetry.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
06fe6651b3
agx: Implement blend constant color sysvals
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
5fd489a6bd
agx: Return agx_instr* from emit_intrinsic
...
Aesthetically useful.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
dd64463d5f
asahi: Pass through "reads tilebuffer?" bit
...
To be determined if there's more to this, but it's the only bit I see
varying with Metal when blending is enabled.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
e2332dea05
asahi: Fix shader key hash function
...
Fixes: 080b05e29e ("asahi: Add Gallium driver")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:29:45 -04:00
Alyssa Rosenzweig
bedf1019be
asahi: Call nir_lower_fragcolor
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:19 -04:00
Alyssa Rosenzweig
d76ab2b5d6
asahi: Add blend constant system value
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:19 -04:00
Alyssa Rosenzweig
30d1223247
asahi: Implement set_blend_color
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:19 -04:00
Alyssa Rosenzweig
6b7cc1fa8f
asahi: Garbage collect bind_state
...
From noop.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:19 -04:00
Alyssa Rosenzweig
91b9839bf7
asahi: Call nir_lower_blend with selected key
...
Also need to key to pipe formats.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:18:11 -04:00
Alyssa Rosenzweig
f2179ed4f3
asahi: Augment Gallium key with blend state
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:17:50 -04:00
Alyssa Rosenzweig
77f1f12000
asahi: Translate blend CSO to lower_blend options
...
We'll just stick this in the key.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10720 >
2021-05-09 23:17:49 -04:00
Mike Blumenkrantz
564519dc84
zink: rework memory_barrier hook again (third time's the charm)
...
this improves granularity for the barriers and is more in line with the
spec for glMemoryBarrier
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10706 >
2021-05-10 02:21:13 +00:00
Mike Blumenkrantz
25ab2347f8
zink: fix texture barriers for real this time
...
according to spec, this is supposed to handle fragment shader fetch
from previous draw output, not color output readback from previous
color output write
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10706 >
2021-05-10 02:21:13 +00:00
Mike Blumenkrantz
4ebae25e17
zink: break out draw dispatch into separate functions
...
this is much easier to read and is going to greatly simplify the eventual
multidraw implementation which will be dropped in
also it allows moving conditionals outside of loops to very slightly improve
drawoverhead performance (with multidraw)
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10701 >
2021-05-10 01:39:46 +00:00
Mike Blumenkrantz
9e5d927d22
zink: remove compute cruft from resource mapping
...
this used to sync the compute batch, now it does nothing
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10707 >
2021-05-10 01:12:36 +00:00
Mike Blumenkrantz
b0c51cdc9e
zink: add debug assert to verify that zink_clear_framebuffer() is accurate
...
this should never be called for buffers that don't have pending clears
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10705 >
2021-05-10 01:02:22 +00:00
Mike Blumenkrantz
5ac6c70214
zink: break zs clear loop once both bits are set when beginning renderpass
...
no point in looping this any more than we have to
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10705 >
2021-05-10 01:02:22 +00:00
Mike Blumenkrantz
94aeb1041f
zink: handle in-renderpass clears in fb_clears_apply_internal()
...
this isn't used yet, but it may as well be handled in case that changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10705 >
2021-05-10 01:02:22 +00:00
Mike Blumenkrantz
b715aaa5f1
zink: only set layer info for samplerviews if there are multiple layers
...
fixes a bunch of validation errors
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10703 >
2021-05-10 00:52:08 +00:00
Mike Blumenkrantz
3c1ecb93d3
zink: simplify samplerview surface creation
...
instead of manually creating the ivci, there's already a util function for
that which will handle everything
also only set layer info if there are multiple layers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10703 >
2021-05-10 00:52:08 +00:00
Mike Blumenkrantz
b243b1d963
zink: add a target param to create_ivci()
...
allow creating views of different types than the base resource
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10703 >
2021-05-10 00:52:08 +00:00
Mike Blumenkrantz
438f0b31e2
zink: clamp 3D surface viewtype to 2D only in the create_surface hook
...
this is only applicable to things that go through the hook, not for internal
surfaces
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10703 >
2021-05-10 00:52:08 +00:00
Mike Blumenkrantz
0c2453bb59
zink: make ZINK_INLINE_UNIFORMS more standardized in function
...
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10696 >
2021-05-10 00:41:31 +00:00
Mauro Rossi
2736ae0454
android: nir: add nir_lower_fragcolor.c to Makefile.sources
...
Fixes the following building error:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: nir_lower_fragcolor
>>> referenced by pan_assemble.c:81 (external/mesa/src/gallium/drivers/panfrost/pan_assemble.c:81)
Cc: 21.0 21.1 <mesa-stable@lists.freedesktop.org >
Fixes: 1fd3563025 ("nir: add lowering pass for fragcolor -> fragdata")
Acked-by: Rob Clark <robclark@freedesktop.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10712 >
2021-05-09 00:34:46 +02:00
Iago Toral Quiroga
d81a6e5f1d
broadcom/compiler: change register allocation policy for accumulators
...
The current policy is to always favor accumulators if possible, however,
this is not always optimal.
Particularly, accumulators play a crucial role in enabling QPU instruction
merges, since these are limited to both the ADD and the ALU instructions
addressing at most 2 physical registers. For 2-src instructions, this means
that to be able to merge we need them to address at least 2 accumulators.
While favoring accumulators does help the case for instruction merges in
general, it is risky to assign accumulators to variables that have
long life spans. Doing so will make the accumulator unavailable for
any other instructions during that life span, and since we only have a few
accumulators, we can quickly run out and losing our capacity to merge
instructions for large parts of the qpu program.
On the other hand, we also want to avoid the extreme case were we keep
allocating physical registers to the point we run out, even if we have
accumulators available, since accumulators have additional restrictions
and may not be suitable for everything.
This change continues the policy of favoring accumulators, but it only
does so if the life span of the temps is short, to ensure that we can
recycle accumulators often across instructions and avoid running out
for sections of the QPU code, unless we are already running out of
physical registers.
total instructions in shared programs: 13654647 -> 13336921 (-2.33%)
instructions in affected programs: 11015919 -> 10698193 (-2.88%)
helped: 39758
HURT: 17325
Instructions are helped.
total threads in shared programs: 412046 -> 412038 (<.01%)
threads in affected programs: 16 -> 8 (-50.00%)
helped: 0
HURT: 4
Threads are HURT.
total uniforms in shared programs: 3745726 -> 3746003 (<.01%)
uniforms in affected programs: 17296 -> 17573 (1.60%)
helped: 76
HURT: 99
Uniforms are HURT.
total max-temps in shared programs: 2364430 -> 2359942 (-0.19%)
max-temps in affected programs: 109117 -> 104629 (-4.11%)
helped: 2893
HURT: 772
Max-temps are helped.
total spills in shared programs: 5727 -> 5746 (0.33%)
spills in affected programs: 221 -> 240 (8.60%)
helped: 1
HURT: 2
total fills in shared programs: 13121 -> 13139 (0.14%)
fills in affected programs: 466 -> 484 (3.86%)
helped: 1
HURT: 2
total sfu-stalls in shared programs: 33432 -> 34491 (3.17%)
sfu-stalls in affected programs: 18219 -> 19278 (5.81%)
helped: 4459
HURT: 5087
Inconclusive result
total inst-and-stalls in shared programs: 13688079 -> 13371412 (-2.31%)
inst-and-stalls in affected programs: 11030017 -> 10713350 (-2.87%)
helped: 39630
HURT: 17429
Inst-and-stalls are helped.
total nops in shared programs: 335753 -> 333708 (-0.61%)
nops in affected programs: 112659 -> 110614 (-1.82%)
helped: 8726
HURT: 7383
Inconclusive result
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10686 >
2021-05-08 13:15:42 +02:00
Jose Fonseca
24043d215f
lavapipe: Fix lvp_pipeline_compile's nir_xfb_info leak.
...
v2: Cleanup, as suggested by Mike Blumenkrantz.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10688 >
2021-05-08 07:17:49 +01:00
Jose Fonseca
c1609c3531
lavapipe: Fix lvp_execute_cmds' pipe_stream_output_target leak.
...
v2: Unbind SO targets, as suggested by Mike Blumenkrantz.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10688 >
2021-05-08 07:17:49 +01:00
Vinson Lee
38de1cd5f0
nv50/ir: Initialize CodeEmitterNV50 member progType.
...
Make progType a constructor argument.
Fix defect reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member progType is not initialized
in this constructor nor in any functions that it calls.
Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu >
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10562 >
2021-05-08 01:31:20 +00:00
Vinson Lee
b1f6aa6e48
nv50/ir: Initialize BuildUtil member tail.
...
Fix defect reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member tail is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10561 >
2021-05-08 01:21:35 +00:00
Vinson Lee
9b50ebfb2d
nvc0: Remove unnecessary bsp_bo NULL check.
...
Fix defect reported by Coverity Scan.
Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking bsp_bo suggests that it may be
null, but it has already been dereferenced on all paths leading
to the check.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10564 >
2021-05-08 01:11:15 +00:00
Vinson Lee
2ba50c1a01
nv50/ir: Initialize Graph::Node member tag.
...
Fix defect reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member tag is not initialized in
this constructor nor in any functions that it calls.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10563 >
2021-05-07 17:49:11 -07:00
Mike Blumenkrantz
edd06995d7
zink: never use LINEAR for VK_EXT_4444_formats
...
we shouldn't be reading these back, and some drivers lie about what features
are supported in linear tiling anyway
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10702 >
2021-05-07 21:13:46 +00:00
Adam Jackson
291aff3fcb
gallium: Remove unused st_visual::render_buffer
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10675 >
2021-05-07 16:47:30 -04:00
Ernst Sjöstrand
ca3dbecea6
nv50: Fix use of initializers on older compilers
...
Fixes the following error on Ubuntu 18.04 with GCC 7.
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp:1448:72:
sorry, unimplemented: non-trivial designated initializers not supported
info_out->prop.cp.gmem[gmemSlot++] = {.valid = 1, .slot = i};
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Fixes: f451854f3 ("nv50: add remapping of buffers/images into unified space")
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10668 >
2021-05-07 19:36:21 +00:00
Danylo Piliaiev
daad8f2245
freedreno/a5xx: SP_BLEND_CNTL has per-mrt blend enable bit
...
Blending in SP_BLEND_CNTL is not a binary flag but the same
mask as in RB_BLEND_CNTL. It is a per-mrt enable bit for blending.
Copied form a6xx, on a5xx it should be have the same since it seems
to have the same structure layout.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10682 >
2021-05-07 19:12:17 +00:00
Danylo Piliaiev
14da2444a9
turnip,freedreno/a6xx: SP_BLEND_CNTL has per-mrt blend enable bit
...
Blending in SP_BLEND_CNTL is not a binary flag but the same
mask as in RB_BLEND_CNTL. It is a per-mrt enable bit for blending.
Example SP_BLEND_CNTL produced by blob on a630 and different MRT
blendings:
SP_BLEND_CNTL: { UNK8 | 0x6 }
SP_BLEND_CNTL: { ENABLED | UNK8 | 0xe }
(Decoded before this commit)
Fixes mis-rendering with D3D11 game "Spelunky 2".
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10682 >
2021-05-07 19:12:17 +00:00
Erik Faye-Lund
39a938ecf4
lavapipe: fix fsum with swizzle
...
We can do stuff like this:
vec1 32 ssa_207 = fsum3 ssa_209.xxx
In this case, we'd end up not swizzling in get_alu_src, and reading
components out-of-bounds, which LLVM isn't very happy about, and thus
takes punitive actions, in the form of a segfault.
We don't want that, and we already know from the opcode what the
component counts should be here.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10690 >
2021-05-07 18:48:28 +00:00
Alyssa Rosenzweig
aa765c54bd
pan/bi: Add divergent intrinsic lowering pass
...
This is undefined behaviour in the hardware but perfectly legal NIR, so
lower to an if ladder predicated on the lane ID (the blob's preferred
strategy).
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022 >
2021-05-07 18:20:30 +00:00
Alyssa Rosenzweig
4055b99de4
pan/bi: Add "lanes per warp" accessor
...
Varies by architecture version.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022 >
2021-05-07 18:20:30 +00:00
Alyssa Rosenzweig
7e4ee9bd2f
pan/bi: Map load_subgroup_invocation to FAU
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022 >
2021-05-07 18:20:30 +00:00
Alyssa Rosenzweig
754c192e04
pan/bi: Drop load_sampler_lod_parameters_pan
...
Only used for an erratum workaround on Mali T720.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022 >
2021-05-07 18:20:30 +00:00
Alyssa Rosenzweig
db2f6b87a3
nir/divergence_anlysis: Add intrinsics for Bifrost
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10022 >
2021-05-07 18:20:30 +00:00
Samuel Pitoiset
54b0cfb061
radv: fix extending the dirty bits to 64-bit
...
New dynamic states added for VK_EXT_extended_dynamic_state2 causes
GPU hangs with vkd3d-proton.
Fixes: 7bdd569d7e ("radv: extend the dirty bits to 64-bit")
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/10693 >
2021-05-07 18:09:00 +00:00
Alyssa Rosenzweig
e0419c29cc
panfrost: Use common blend lowering
...
Contains a number of bugfixes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10601 >
2021-05-07 17:25:21 +00:00