Gert Wollny
19ba29d996
r600/sfn: Add support for fdph
...
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Filip Gawin <filip@gawin.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17484 >
2022-07-13 15:10:39 +02:00
Gert Wollny
0b0a04635b
r600/sfn: Never consider an op with register dest as dead
...
Another hot-fix: when a local register is written to, it is
actually unlikely that the value is never used, so just make
sure that this is never done.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Filip Gawin <filip@gawin.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17484 >
2022-07-13 15:10:34 +02:00
Gert Wollny
8222840e3f
r600: limit loops when trying to merge alu groups
...
On Cayman bank_swizzle[4] is never counted up, so add an
additional condition to make sure the loop is finished
at one point. This is a hot-fix, the logic below should be
improved.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Filip Gawin <filip@gawin.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17484 >
2022-07-13 15:10:28 +02:00
Matt Coster
6165701b2e
pvr: Implicitly assert that the correct sub-command type is present
...
Now that we have separate C types for the different sub-command types,
we can require a pointer to that type to be passed into functions
which expect the current sub-command to be of a specific type.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17458 >
2022-07-13 12:30:10 +01:00
Matt Coster
b9d6ed445d
pvr: Split out unioned structs from struct pvr_sub_cmd
...
This is a simple optimization to make type-specific uses of struct
pvr_sub_cmd slightly less verbose.
Signed-off-by: Matt Coster <matt.coster@imgtec.com >
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17458 >
2022-07-13 12:28:05 +01:00
Rajnesh Kanwal
1df16b5f22
pvr: Implement vkCmdDraw API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17487 >
2022-07-13 10:35:10 +00:00
Iago Toral Quiroga
40976356f2
v3d,v3dv: stop copying and pasting the translate_swizzle helper
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17509 >
2022-07-13 10:09:34 +00:00
Iago Toral Quiroga
8d8491df5e
v3d: stop using a smaller texture limit in OpenGL
...
The compiler has improved significantly since we found this issue
and this is no longer required.
Notice that because we are increasing the number of samplers
supported beyond what we can loop unroll (currently capped at 16),
some piglit tests that test the maximum number of samplers supported
start to fail because they use indirect indexing on a sampler array
and we don't support that (previously the indirect indexing was
removed by loop unrolling). This is a bug in tests which the
GLSL linker detects, failing to compile the shaders.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17509 >
2022-07-13 10:09:34 +00:00
Iago Toral Quiroga
9b74f4218f
v3d,v3dv: stop hardcoding various image limits
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17509 >
2022-07-13 10:09:34 +00:00
Iago Toral Quiroga
25fc388d7e
v3dv: clean up get_internal_type_bpp_for_image_aspects
...
Also, remove the FIXME to pre-compute this in images. We only use
this helper from copy/clear operations where we may be working
with a compatible framebuffer format instead of the original image.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17509 >
2022-07-13 10:09:34 +00:00
newbluemoon
6a4fc6f6ca
nine: replace ulimit with sysconf call
...
__UL_GETOPENMAX seems to be glibc specific and not portable.
In glibc’s sysdeps/posix/ulimit.c it is assigned the return
value of sysconf(_SC_OPEN_MAX). So use the latter in the first place.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5176
CC: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17471 >
2022-07-13 08:34:18 +00:00
Chuansheng Liu
39f8c61f32
iris,anv: correct the max thread number for DG2+
...
Correct the max thread number for DG2+ platforms according
to below bspec.
Ref: Bspec: 47202
Cc: mesa-stable
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17506 >
2022-07-13 08:11:19 +00:00
Georg Lehmann
aac8ddae2f
nir/opt_algebraic: Optimize [ui](add|sub)_sat with 0.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17468 >
2022-07-13 07:34:09 +00:00
Georg Lehmann
90a8fb0355
nir/lower_io: Fix array length of buffers larger than INT32_MAX.
...
Before, if the ssbo is too large this would always return 0.
Also, this code is easier to optimize, so the common case of offset 0
and pot stride results in one ushr instead of 5+ instructions.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17468 >
2022-07-13 07:34:09 +00:00
Georg Lehmann
d9fb1b05eb
ir3: Implement [iu]sub_sat.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17468 >
2022-07-13 07:34:09 +00:00
Georg Lehmann
9a83ccf1fa
r600: Lower uadd_sat/usub_sat.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17468 >
2022-07-13 07:34:09 +00:00
Georg Lehmann
e09e04a2c0
zink: Lower uadd_sat/usub_sat.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17468 >
2022-07-13 07:34:09 +00:00
Georg Lehmann
d472c45810
nir_to_tgsi: Lower uadd_sat/usub_sat.
...
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17468 >
2022-07-13 07:34:09 +00:00
Panagiotis Apostolou
6f0aba42ad
util: Don't block SIGSEGV for new threads
...
SIGSEGV is used by Vulkan API trace layers to track user changes in
device memory mapped to user space. Now with drivers such as Zink, GLES
applications are translated into Vulkan API calls and therefore it is
possible to be tracked by Vulkan api trace layers.
Blocking SIGSEGV hinders one of the memory tracking mechanisms used by
such layers.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17273 >
2022-07-13 06:51:27 +00:00
Iago Toral Quiroga
1442861141
v3dv: fix comment for point_sprite_mask filed in shader key
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17486 >
2022-07-13 05:20:31 +00:00
Lionel Landwerlin
3a8ad28524
anv: skip flush/invalidate faster
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17481 >
2022-07-13 01:33:27 +00:00
Lionel Landwerlin
1aeb11cde1
intel: protect against empty invalidate ranges
...
It's legal for an application to call vkInvalidateMappedMemoryRanges()
/ vkFlushMappedMemoryRanges() with zero sized ranges.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: b91971c240 ("anv: use the right helper to invalidate memory")
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6852
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17481 >
2022-07-13 01:33:27 +00:00
Dave Airlie
105279e989
radv: add a dynamic vertex format cache.
...
With dynamic vertex bindings the vertex format lookups are a lot
more frequent (vs being baked in the pipeline). Add a simple lookup
cache using a dynamic array to keep track of the hw values, and
avoid repeated translation.
This also reduces the memset to just the bitfields since all
the others will be overwritten.
Seen in perf traces gputest gimark with zink on radv.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15846 >
2022-07-13 01:10:09 +00:00
Lionel Landwerlin
af1ecbeb0a
anv: add a comment about handling buffer view swizzles on gfx7
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17385 >
2022-07-13 00:45:36 +00:00
Lionel Landwerlin
a9edc268b9
anv: validate image view lowered storage formats for storage
...
Ensure that if we have swizzle on the initial format, that the
component bits are identical with the lowered format.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17385 >
2022-07-13 00:45:36 +00:00
Lionel Landwerlin
57a8efa222
anv: deal with isl format swizzles for buffer views
...
For some formats like VK_FORMAT_B5G6R5_UNORM_PACK16, we have no direct
matching HW format. We can support it by swizzling.
We already apply those swizzles for image views. We just forgot to
deal with buffer views.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6235
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17385 >
2022-07-13 00:45:36 +00:00
Danylo Piliaiev
bfd3c43aa9
freedreno: Add FD_GPU_TRACEPOINT envvar to toggle tracepoints
...
All tracepoints are enabled by default.
Example:
FD_GPU_TRACEPOINT=-flush_batch
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16781 >
2022-07-12 22:24:19 +00:00
Danylo Piliaiev
7a62219d33
freedreno: Refactor tracepoints generation to reduce duplication
...
This way we will not need to repeat arguments for "start" and "end"
tracepoints.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16781 >
2022-07-12 22:24:19 +00:00
Danylo Piliaiev
82e79f6cdf
freedreno: Add the rest of tracepoints with start/end to perfetto
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16781 >
2022-07-12 22:24:19 +00:00
Danylo Piliaiev
b059cdad40
turnip: Add TU_GPU_TRACEPOINT envvar to toggle tracepoints
...
All tracepoints are enabled by default.
Example:
TU_GPU_TRACEPOINT=-sysmem_clear
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16781 >
2022-07-12 22:24:19 +00:00
Danylo Piliaiev
d903c6c7f3
turnip: Refactor tracepoints generation to reduce duplication
...
This way we will not need to repeat arguments for "start" and "end"
tracepoints.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16781 >
2022-07-12 22:24:19 +00:00
Danylo Piliaiev
8d34cc2471
util/u_trace: Fix iteration over config_control
...
Fixes: e1811af75d
("util/perf: add options to enable/disable tracepoints")
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16781 >
2022-07-12 22:24:19 +00:00
Emma Anholt
e9d4c29f6a
ci/freedreno: Mark an occasional flake pass that happens on a530.
...
This MR just saw it happen for the second time I've noticed.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17470 >
2022-07-12 21:57:23 +00:00
Emma Anholt
bcc9199df2
loader: Just include driconf.h instead of redefining its values.
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17470 >
2022-07-12 21:57:23 +00:00
Emma Anholt
4c6a1e3f33
egl: Just include driconf.h instead of redefining its values.
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17470 >
2022-07-12 21:57:23 +00:00
Emma Anholt
679e9697a9
kopper: Respect the vblank_mode env var.
...
We were defaulting to a swap interval of 1, but we can follow dri2/dri3's
lead and respect the driconf var.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17470 >
2022-07-12 21:57:23 +00:00
Emma Anholt
ff18be0872
glx: Unify dri2/dri3 vblank_mode logic.
...
We need it from kopper, as well.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17470 >
2022-07-12 21:57:23 +00:00
Emma Anholt
f9ecf99ca9
kopper: Use the swap interval that was set at swapchain creation time.
...
We need to track what the caller has given us for swap interval, and use
that to set the present mode at startup.
Fixes incorrect vblank syncing in apitrace's glretrace, which sets the
swap interval to 0 before the swapchain is made.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17470 >
2022-07-12 21:57:23 +00:00
Emma Anholt
f3d3368065
kopper: Fix the return value of kopperSetSwapInterval().
...
Compare to dri2SetSwapInterval() and dri3_set_swap_interval()
implementations of the same method.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17470 >
2022-07-12 21:57:23 +00:00
Marek Vasut
378da2c3ff
etnaviv: Implement TXD
...
Fill in support for TXD instruction which emits shader TEXLDD opcode.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17500 >
2022-07-12 21:28:11 +00:00
Marek Vasut
221d042c31
etnaviv: Rename etna_emit_tex() args
...
Rename the args from low_bias/compare to src1/src2, since they
are used for different purposes depending on the texture load
type. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17500 >
2022-07-12 21:28:11 +00:00
Yiwei Zhang
20eeb529f7
venus: GetPhysicalDeviceSparseImageFormatProperties to match sparse support
...
Test: dEQP-VK.api.info.sparse_image_format_properties2.*
Fixes: 1a7632e54b ("venus: add NO_FENCE_FEEDBACK perf option and disable sparse resource")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17476 >
2022-07-12 21:20:19 +00:00
Enrico Galli
1f0d27e45f
microsoft/spirv_to_dxil: Fix discard to demote + return pass
...
While SPIR-V's OpKill is block terminating, the converted discard
intrinsic is not block terminating. This can lead to issues where
instruction could be placed after discard.
This patch adds an extra pass that drops all instructions after discard
before we convert discards.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17474 >
2022-07-12 20:22:52 +00:00
Samuel Pitoiset
ed6c346155
zink/ci: update list of CTS flakes for RADV
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17492 >
2022-07-12 19:23:39 +00:00
Adam Jackson
82fea22607
glx: Fix return values from __glXGetDrawableAttribute
...
This is intended to return true on attribute-found.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17422 >
2022-07-12 18:43:24 +00:00
Adam Jackson
11c30fcad0
glx/dri2: Stop tracking the protocol version in the display state
...
We only use it at init time, no need to keep it around.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17422 >
2022-07-12 18:43:24 +00:00
Adam Jackson
1255d370b7
glx: Remove excess screen parameter from CreateContext
...
This is effectively looked up from the config anyway, which we're
already passing in.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17422 >
2022-07-12 18:43:24 +00:00
Adam Jackson
215200d8f1
glx: Remove unused __glXSetupForCommand from __glXIsDirect
...
This was needed when we emitted an xlib request here, but xcb knows the
GLX major opcode for the connection already.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17422 >
2022-07-12 18:43:24 +00:00
Adam Jackson
61834ae898
glx: Remove some can't-happen checks from protocolDestroyDrawable
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17422 >
2022-07-12 18:43:24 +00:00
Connor Abbott
cf0cfd572e
freedreno/a6xx: VPC_SO_NCOMP is actually VPC_SO_BUFFER_STRIDE
...
This answers the question in a comment in turnip, and fixes some GL46
tests and piglit tests.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17494 >
2022-07-12 17:57:07 +00:00