Pierre-Eric Pelloux-Prayer
bdcefb8ec4
radeonsi: preserve derivatives after discards for ARB shaders
...
Contrary to the GLSL spec, the ARB fp spec doesn't explicitely
states that derivatives are undefined after discards.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5018
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11972 >
2021-07-28 08:49:30 +00:00
Pierre-Eric Pelloux-Prayer
8cd2e82c89
mesa: move gl_program::is_arb_asm to shader_info
...
This will be used from radeonsi in the next commit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11972 >
2021-07-28 08:49:30 +00:00
Erik Faye-Lund
bff8a948f7
lavapipe: do not assert on more than 32 samplers
...
We can have more than 32 samplers, but the code below will assert in that
case. The return value is not used for samplers, so let's just return
zero early and be done with it.
Fixes: c18ff60087 ("lavapipe: emit correct textures_used for texture-arrays")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11845 >
2021-07-28 08:16:28 +00:00
Chia-I Wu
206fe780d5
vulkan/wsi/x11: do not inherit last_present_mode
...
Under XWayland, the first present after a window resize is sometimes
completed with COPY (seems to happen when the previous present with the
old size is pending; not really sure). The following presents are
completed with FLIP.
When a swapchain is created with an old swapchain, and
old_chain->last_present_mode is FLIP, chain->last_present_mode is set to
FLIP as well. This causes the new swapchain to be marked
VK_SUBOPTIMAL_KHR, which is sticky, if the first present is completed
with COPY.
Instead of inheriting, treat each swapchain as independent. We will
miss the case where an old swapchain is flipping but a new swapchain is
copying. But swapchain reallocation normally happens in response to
present engine state change. If the newly allocated swapchain is
copying, another reallocation is unlikely to fix that.
Fixes: 61309c2a72 ("vulkan/wsi/x11: Return VK_SUBOPTIMAL_KHR for X11")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12030 >
2021-07-28 01:05:50 +00:00
Mike Blumenkrantz
6bfbce0447
zink: rework buffer mapping
...
this collects a bunch of changes which need to be made but which can't
be split up incrementally without breaking things:
* move map offset to zink_transfer::offset for consistent handling
* fix stream uploader map rules to only apply for discard cases so
the stream uploader doesn't explode
* fix the staging buffer map rules to apply to any non-staging readback
* stop making huge staging buffers for readback
* break out the DONTBLOCK case since this is only coming from qbo readback
* add explicit read-only sync for maps to stall on writes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12090 >
2021-07-28 00:42:56 +00:00
Mike Blumenkrantz
de2da3dadf
zink: use MAP_ONCE for qbo readback
...
this implies that the buffer can be unmapped
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12090 >
2021-07-28 00:42:56 +00:00
Alyssa Rosenzweig
ce6d43548b
pan/va: Allow floating-point swizzles on ATEST
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
5649f24d16
pan/bi: Align staging registers on Valhall
...
This handles the following from the Valhall specification (that I wrote):
If multiple subsequent staging registers are accessed, the base must
be aligned to 2. However, even if 4 registers are accessed, it is
not necessary to align to 4, only to 2. This restriction allows the
hardware to use a 64-bit data path without handling unaligned
access, which is more efficient. This restriction does not apply if
only a single register is accessed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
a6ccbf48e9
pan/bi: Clarify the logic of bi_reconverge_branches
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
30f8fb82c9
pan/bi: Clean up and export bi_reconverge_branches
...
Decides when we need "branch reconvergence" (canonical term), the
logical opposite of "back-to-back execution" (non-canonical term, this
is old code in Bifrost terms). So invert the return value, rename, and
export so we can use it when packing Valhall instructions.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
e3554a9a3a
pan/bi: Add branch_offset immediate
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
4f359cae43
pan/bi: Garbage collect stuff in bi_layout.c
...
Predates clause scheduling.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
73f8ef2961
pan/bi: Fix UBO push with nir_opt_shrink_vectors
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
16579ca4b7
pan/bi: Add constant folding unit test
...
I just played with the implementation, let's ensure I didn't break it.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
87ebad74e5
pan/bi: Refactor constant folding for testability
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
972d517d41
pan/bi: Use bi_apply_swizzle in constant folding
...
Much more legible now.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
ce8e269e60
pan/bi: Add helper to swizzle a constant
...
Instead of open-coding special cases in multiple places, just keep a
canonical version that handles every case.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
b55fb073a4
pan/bi: Add strip_index helper
...
Needed to correctly lower sources to moves, used in the FAU lowering.
Technically, the issue is already present on Bifrost, but it's hidden
because Bifrost packing doesn't validate the absense of unsupported
modifiers. Valhall packing adds more safety, which caught this issue.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
a5727909e1
pan/bi: Rename CLPER_V7 back to CLPER
...
v6 is really the oddball here. CLPER on v9 supports a superset of v7.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
f9616b7463
pan/bi: Rename NOP.i32 to NOP
...
Simpler and matches the syntax of Valhall I've picked out.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
245c0ec755
pan/bi: Fix typo in FAU enum
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
fccbf4985d
pan/bi: Model Valhall special values as FAU
...
Not sure if this is "really" FAU but it's convenient to treat it as
such.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
9324510173
pan/bi: Model RSCALE for Valhall
...
Faster than FMA_RSCALE. We'll want to optimize this (e.g. for exp2).
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
62147d4126
pan/bi: Model *ADD_IMM instructions in IR
...
Needed for Valhall.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
5b0d6672f0
pan/bi: Remove unused BIR_FAU_HI
...
Redundant with offset.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
1cde245f76
pan/bi: Add discard flag to bi_index
...
Needed to model Valhall instructions. Should also be useful to RA if we
ever get around to doing something SSA based.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
be95198de5
pan/bi: DCE after bifrost_nir_lower_algebraic_late
...
Needed for sat_signed to fuse, since we run modifier prop before backend
DCE.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
e6fdbb85bc
pan/bi: Constify BIR manipulation
...
For use in Valhall packing.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
0149dee377
pan/bi: Remove redundant check in clamp fusing
...
Already checked above.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
07b259defc
pan/bi: Add instruction unit test macro
...
Checks for instruction equality.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
6053741610
pan/bi: Add instruction equality helper
...
Useful for unit testing.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
0394cc7c1d
pan/bi: Add helpers for unit testing
...
At some point I should stop reinventing GTest but, look, writing tests
at all is big for me, one thing at a time, ok? 😋
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
cdc79d2a03
pan/bi: Output binaries from standalone compiler
...
Useful for shader replacement.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
8cbabbd532
pan/bi: Only call clause code on Bifrost
...
Valhall will have its own simpler code path.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
dc569585a6
pan/bi: Add quirks for Mali G78
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
18dedd80db
pan/bi: Do more mesa/st stuff in standalone compiler
...
From freedreno.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
f01f5e7168
pan/bi: Zero initialize shader_info
...
Fixes the following assert with the standalone compiler
bifrost_compiler: ../src/panfrost/bifrost/bi_opt_push_ubo.c:134: bi_opt_push_ubo: Assertion `ctx->info->push.count == 0' failed.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
027a8bf82c
pan/bi: Parse file names in standalone compiler
...
Would like to compile compute shaders too.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
e5b5132c63
pan/bi: Remove unused option
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Alyssa Rosenzweig
1b85dfb6a5
pan/bi: Remove unused pointer from bi_instr
...
Yikes.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026 >
2021-07-28 00:26:06 +00:00
Mike Blumenkrantz
59951b6f24
zink: use dynamic line stipple
...
save those pipeline bits!
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12011 >
2021-07-27 23:22:19 +00:00
Mike Blumenkrantz
b61c96b692
ci: add another zink job with timelines disabled
...
this codepath needs to be maintained for *vague handwaving*
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12089 >
2021-07-27 23:09:47 +00:00
Mike Blumenkrantz
64785df389
zink: add env var to disable timelines
...
for ci use only
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12089 >
2021-07-27 23:09:47 +00:00
Mike Blumenkrantz
627371fe01
zink: export PIPE_CAP_TGSI_BALLOT
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11990 >
2021-07-27 22:44:59 +00:00
Mike Blumenkrantz
410d4dc529
zink: remove VK_EXT_shader_subgroup_ballot from device info
...
restrict this to 1.2 only
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11990 >
2021-07-27 22:44:59 +00:00
Mike Blumenkrantz
a05693d332
zink: implement compiler handling for subgroup ballot builtins/intrinsics
...
these are all lowered and unremarkable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11990 >
2021-07-27 22:44:59 +00:00
Mike Blumenkrantz
252165d925
zink: lower subgroup ballot instructions
...
this handles rewrites of ballot-related instructions/builtins to spirv
vec4 types from the native GLSL U64 type
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11990 >
2021-07-27 22:44:59 +00:00
Mike Blumenkrantz
4bd6a0299b
zink: change descriptor flushing to assert
...
there should never be flushing due to pool depletion; instead, trigger an
oom flush and stall to replenish the pool after the draw/compute
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12012 >
2021-07-27 22:34:21 +00:00
Philipp Zabel
8ba44103b3
etnaviv: fix gbm_bo_get_handle_for_plane for multiplanar images
...
Implement resource_get_param for PIPE_RESOURCE_PARAM_NPLANES and fix
resource_get_handle to walk to the correct linked resource for
multiplanar images, allowing gbm_bo_get_handle_for_plane to be called
with plane > 0.
This fixes an assert that is triggered when a wayland client tries
to send weston an NV12 dmabuf, for example:
weston: .../mesa/src/gbm/backends/dri/gbm_dri.c:752: gbm_dri_bo_get_handle_for_plane: Assertion `plane == 0' failed.
Fixes: 788f6dc857 ('Revert "gallium/dri: fix dri2_from_planar for multiplanar images"')
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12037 >
2021-07-27 23:13:57 +02:00
Rohan Garg
f1cd56cdc1
virgl: Enable caching for sampler views and render targets
...
Signed-off-by: Rohan Garg <rohan.garg@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11241 >
2021-07-27 20:34:38 +00:00