Alyssa Rosenzweig
578f5d0000
pan/bi: Track scalarness of 16-bit ALU
...
Needed for optimal swizzle lowering.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10627 >
2021-05-05 02:19:03 +00:00
Alyssa Rosenzweig
59afff8708
pan/bi: Handle b2i8/16
...
Missing from the algebraic rules, get it right this time.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10627 >
2021-05-05 02:19:03 +00:00
Alyssa Rosenzweig
1c17a91731
pan/bi: Handle b2f ourselves
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10627 >
2021-05-05 02:19:03 +00:00
Alyssa Rosenzweig
0906d75479
pan/bi: Handle ineg
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10627 >
2021-05-05 02:19:03 +00:00
Alyssa Rosenzweig
ab56471955
pan/bi: Handle integer min/max ourselves
...
total instructions in shared programs: 158197 -> 158181 (-0.01%)
instructions in affected programs: 169 -> 153 (-9.47%)
helped: 3
HURT: 0
total nops in shared programs: 116393 -> 116397 (<.01%)
nops in affected programs: 60 -> 64 (6.67%)
helped: 0
HURT: 2
total clauses in shared programs: 28628 -> 28627 (<.01%)
clauses in affected programs: 10 -> 9 (-10.00%)
helped: 1
HURT: 0
total quadwords in shared programs: 124146 -> 124140 (<.01%)
quadwords in affected programs: 127 -> 121 (-4.72%)
helped: 3
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10627 >
2021-05-05 02:19:03 +00:00
Alyssa Rosenzweig
5e55824c62
pan/bi: Add imm_uintN helper
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10627 >
2021-05-05 02:19:03 +00:00
Mike Blumenkrantz
ff4ba3d4a7
zink: support PIPE_CAP_QUERY_MEMORY_INFO
...
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10511 >
2021-05-05 02:08:44 +00:00
Mike Blumenkrantz
ce1e05de8a
zink: hook up VK_EXT_memory_budget
...
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10511 >
2021-05-05 02:08:44 +00:00
Mike Blumenkrantz
d050be4b26
zink: grab GetPhysicalDeviceMemoryProperties2 from instance
...
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10511 >
2021-05-05 02:08:44 +00:00
Eric Anholt
c19801c939
ci/freedreno: Mark a5xx texture gather as flaky.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10633 >
2021-05-04 23:37:00 +00:00
Jason Ekstrand
e1edf74dde
nir/builder: Move clamp helpers to nir_builder.h
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10631 >
2021-05-04 22:51:34 +00:00
Erik Kurzinger
f4eb13dc55
vulkan/device_select: avoid segfault on Wayland if wl_drm is unavailable
...
On Wayland, if the wl_drm interface is not available, for example if the
compositor is using the proprietary NVIDIA driver along with their egl-wayland
library, the device_select layer will fail to initialize. However, the failure
path will unconditionally call wl_drm_destroy even though info.wl_drm would be
NULL in that case. This can cause a segfault in libwayland-client.so.
To fix this, check if info.wl_drm is NULL before calling wl_drm_destroy. This
way, initialization will fail gracefully even if that interface is not present.
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10598 >
2021-05-04 21:26:21 +00:00
Caio Marcelo de Oliveira Filho
dd48683cfd
nir: Move shared_memory_explicit_layout bit into common shader_info
...
Move it out of the "cs" sub-struct, since the bit can be used for
other shader stages in the future.
This also removes a subtle issue in spirv_to_nir:
info.cs.shared_memory_explicit_layout was used without checking for
the CS shader stage. It ended up being "harmless" since the effects
also depended on presence of shared variables.
Fixes: 5de6c5973a ("spirv: Implement SPV_KHR_workgroup_memory_explicit_layout")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10529 >
2021-05-04 20:54:58 +00:00
Eric Anholt
89114225b5
tunrip: Add support for VK_EXT_separate_stencil_usage.
...
We were implictly including it in exposing VK 1.2, but we weren't making
use of the supplied struct. Actually enabling it gives us a chance to do
slightly better at Z/S UBWC, and means we won't lose the separate usage
test coverage when switching back to exposing VK 1.1.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10594 >
2021-05-04 20:30:50 +00:00
Erik Faye-Lund
1d00e86078
zink: cache SpvId for aggregate glsl_types
...
This should reduce the amount of types we re-emit while producing
SPIR-V.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10372 >
2021-05-04 20:19:30 +00:00
Erik Faye-Lund
3d3867e7b1
zink: handle matrix-types after vectors
...
This makes us handle all non-aggregate types before we handle aggregate
types. This is going to matter in the next commit.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10372 >
2021-05-04 20:19:30 +00:00
Alyssa Rosenzweig
a9621c4493
pan/mdg: Don't print zero
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
cb10a8e2f1
pan/mdg: Reduced printed parens
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
0b45d4b6b5
pan/mdg: Don't print mem addr brackets
...
Already comma separated.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
d0fc23b7bd
pan/mdg: Don't print explicit .rte
...
Default round mode.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
9bd3ebf829
pan/mdg: Suppress most attribute tables
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
07740e78b4
pan/mdg: Don't print zero shifts
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
fa68c8bca9
pan/mdg: More concise RMU name
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
7752b09ade
pan/mdg: Hide units behind MIDGARD_MESA_DEBUG=verbose
...
Not usually interesting unless debugging bundling.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
93a176b6cf
panfrost: Key blend shaders to the input types
...
On Bifrost, fragment shaders might output either FP16 or FP32. The blend
shader will access the output as-is within the register, so depending on
the precision of the blend shader's logic, it may need to insert a
f2f16 or f2f32 conversion. This requires expanding the blend shader key.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
9df1d1306e
pan/blend: Emit explicit conversions for all types
...
Needed so we can mix and match.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
30423b0c36
panfrost/lower_framebufffer: Don't use i2imp
...
Fails when converting from i2i8, which is possible.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
03e3e65cd4
panfrost: Assume lower_fragcolor has been called
...
Allows us to clean up quite a bit.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
28ac4d1e00
panfrost: Call nir_lower_fragcolor based on key
...
We only want it to trigger if MRT is actually in use. This is a cheap
key (only require multiple variants for an obscure edge case) and avoids
the perf regression of using this pass which is needed for conformance.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
6a4482df98
panfrost/blend: Prepare for lower_fragcolor
...
FRAG_RESULT_COLOR means something a bit different.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
120dd92e86
panfrost/blend: Distribute to_c_factor
...
Easier to understand, I think.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
613722e046
panfrost/blend: Workaround a v7 implementation-detail
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
392bf00019
panfrost/blend: Fix outdated comments
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
86b0eddf2b
pan/lower_blend: Rename is_bifrost->scalar
...
Don't leak ISA details.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
f5211fcbed
pan/lower_blend: Use NIR helpers
...
Deletes a bunch of indentations.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
5fc1aed036
pan/lower_blend: Clean up type size handling
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
dad599f15e
panfrost: Don't clobber RT0 if RTn is disabled
...
Fixes: a124c47b9f ("panfrost: Fix NULL derefs in pan_cmdstream.c")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
5268a8500a
panfrost: Minor cleanup of blend CSO
...
No need to cast.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
3968f03754
panfrost: Support alpha_to_one
...
Gets rid of a bogus assert in the blend CSO create.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
a368cc022d
panfrost: Make comment less confusing
...
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
c6bb55ffcf
pan/bi: Lower 8-bit fragment input
...
Same reasons/technique as fragment output lowering, just need the NIR.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
3cc6a4c5d0
pan/bi: Handle swizzles in i2i8
...
Otherwise they get copypropped away.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
e180374ab1
pan/bi: Add single-component 8-bit mkvec lowering
...
So we can implement scalar i2i8.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
ba17342a1f
pan/bi: Handle different sizes of LD_TILE
...
v2: Fix overflow.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Alyssa Rosenzweig
f412801768
pan/bi: Track dual-src blend type
...
Will be needed for fp16 outputs. I am acutely aware dual-src blending is
broken on Bifrost right now anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10393 >
2021-05-04 20:04:03 +00:00
Yiwei Zhang
e44b4feb33
venus: query extended resource info from gralloc
...
Creating Android swapchain image from gralloc buffer requires to use
VkImageDrmFormatModifierExplicitCreateInfoEXT. To fill the struct info,
we need to query extended resource info from gralloc.
With the queried modifier from gralloc, we can ask the driver for the
plane count of the given format and modifier pair.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10553 >
2021-05-04 19:52:13 +00:00
Eric Anholt
a2efa2e833
tgsi: Mark the tgsi_exec_channel and tgsi_double_channel ALIGN16.
...
We allocate them all align16, so mark the unions (and their container
structs) that way so the compiler can do aligned SSE load/stores.
glmark2 -b loop FPS +0.197265% +/- 0.117633% (n=1906)
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10604 >
2021-05-04 18:58:51 +00:00
Charlie Turner
1d418e79b8
radv: Add a STONEY baseline for dEQP.
...
See:
https://gitlab.freedesktop.org/tanty/mesa-valve-ci/-/jobs/9286188
https://gitlab.freedesktop.org/tanty/mesa-valve-ci/-/jobs/9297109
https://gitlab.freedesktop.org/tanty/mesa-valve-ci/-/jobs/9297110
v2.
- Clarify that the dEQP-VK.texture.explicit_lod.2d tests are skipped
due to slow APU-based STONEY test devices.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10559 >
2021-05-04 16:42:57 +00:00
Iago Toral Quiroga
f099fc3e07
v3d: choose a larger CSD supergroup size if possible
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10541 >
2021-05-04 15:53:23 +00:00
Iago Toral Quiroga
3ce249e65e
broadcom/common: move CSD supergroup sizing to a common helper
...
We want to use this in GL too.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10541 >
2021-05-04 15:53:23 +00:00