Pierre-Eric Pelloux-Prayer
0477fbc655
driconf: add workaround for Golf With Friends
...
The game has a shader that uses texture functions that rely on implicit
derivatives after a discard.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4547
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10278 >
2021-04-29 12:10:55 +00:00
Juan A. Suarez Romero
e532a47f76
util/hash_table: do not leak u64 struct key
...
For non 64bit devices the key stored in hash_table_u64 is wrapped in
hash_key_u64 structure, which is never free.
This commit fixes this issue by just removing the user-defined
`delete_function` parameter in hash_table_u64_{destroy,clear} (which
nobody is using) and using instead a delete function to free this
structure.
Fixes: 608257cf82 ("i965: Fix INTEL_DEBUG=bat")
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10480 >
2021-04-29 12:58:23 +02:00
Juan A. Suarez Romero
33f9b06b0e
v3dv: check dest bitsize in color blit
...
Otherwise, if src_bit_size > 0 and dst_bit_size == 0, we end up doing a
bad shift in `1 << (dst_bit_size - 1)`, as `dst_bit_size - 1` is a
negative value (in this case would be MAX_UINT32).
Fixes CID#1468134 "Bad bit shift operation (BAD_SHIFT)":
"large_shift: In expression 1 << dst_bit_size - 1U, left shifting by
more than 31 bits has undefined behavior. The shift amount,
dst_bit_size - 1U, is 4294967295."
v2:
- Use an assertion instead (Iago)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10251 >
2021-04-29 10:31:11 +00:00
Juan A. Suarez Romero
fd8d71ce41
v3dv: rename VC5 to V3D
...
As we are not using anymore references to the old VC5, let's rename
definitions from VC5 to V3D in the Vulkan driver.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402 >
2021-04-29 11:22:12 +02:00
Juan A. Suarez Romero
26618dfb87
broadcom/simulator: change references to VC5
...
We are referring the driver as V3D instead old VC5; so let's update the
references.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402 >
2021-04-29 11:22:12 +02:00
Juan A. Suarez Romero
a77002584d
broadcom/qpu: rename from VC5 to V3D
...
Get rid of old references to VC5.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402 >
2021-04-29 11:22:12 +02:00
Juan A. Suarez Romero
14b66e27dc
v3d: rename VC5 enums and definitions
...
As the driver was renamed in the past from VC5 to V3D, let's rename also
the definitions and enumerations to keep it consistent across the code.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402 >
2021-04-29 11:22:12 +02:00
Juan A. Suarez Romero
3c318e6335
v3d: rename header include guards
...
Long time ago VC5 was renamed to V3D, but the include guards `VC5_FOO_H`
were not.
In order to keep consistency, let's rename these guards from `VC5_FOO_H`
to `V3D_FOO_H`.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10402 >
2021-04-29 11:22:12 +02:00
Caio Marcelo de Oliveira Filho
e763db4a47
spirv: Don't replicate patch bool in vtn_variable
...
When we originally added patch variable handling to spirv_to_nir, we
were splitting I/O block variables in spirv_to_nir, so we weren't
guaranteed to have a nir_variable early enough in processing.
Since b0c643d8f5 ("spirv: Use NIR per-member splitting"), we've been
using NIR per-member splitting where we have a nir_variable which has
a separate nir_variable_data per member. With this, we can drop
vtn_variable::patch and use the patch boolean on the nir_variable
instead.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10469 >
2021-04-29 06:55:29 +00:00
Vinson Lee
3cd5e1b40f
clover: Add constructor for constant_argument.
...
Fix defects reported by Coverity Scan.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize buf.
member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize st.
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10399 >
2021-04-28 22:30:07 -07:00
Jason Ekstrand
656c30ac59
intel/isl: There are seven aux states
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10515 >
2021-04-28 23:16:03 -05:00
Mike Blumenkrantz
8243115836
zink: use first-created shader variant as the default
...
it's not really expected that most apps are going to be switching variants
all the time, so having the "default" one be more dynamic allows skipping
shader lookups more frequently
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10513 >
2021-04-29 03:43:08 +00:00
Mike Blumenkrantz
6dab5898db
zink: add fastpath for getting default shader variants
...
no need for hashing or lookups if this is the default variant
also have an alt variant for vertex stages to account for streamout and
halfz lowering
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10513 >
2021-04-29 03:43:08 +00:00
Mike Blumenkrantz
1ff40cedf0
zink: create entrypoints for descriptor variables with spirv 1.5
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10512 >
2021-04-29 03:33:22 +00:00
Mike Blumenkrantz
3bf52471cc
zink: generate spirv 1.5 from ntv when using vk >= 1.2
...
this has an ntv option so further tuning here should be easy enough
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10512 >
2021-04-29 03:33:22 +00:00
Mike Blumenkrantz
6398605f28
zink: export PIPE_CAP_TGSI_CLOCK
...
ARB_shader_clock
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510 >
2021-04-28 20:04:20 -04:00
Mike Blumenkrantz
ff5e0cb1bb
zink: support nir_intrinsic_shader_clock
...
simple const unop
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510 >
2021-04-28 20:04:14 -04:00
Mike Blumenkrantz
0fba3bc236
zink: add spirv builder for unops with a const operand
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510 >
2021-04-28 20:04:11 -04:00
Mike Blumenkrantz
73210e3a99
zink: add conversion util for nir_scope -> SpvScope
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510 >
2021-04-28 20:04:08 -04:00
Mike Blumenkrantz
3c06eede9c
zink: hook up VK_KHR_shader_clock
...
more extensions wooo
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510 >
2021-04-28 20:04:06 -04:00
Ian Romanick
3572e24e74
ci: Uprev piglit to b3a9fa345 ("framework/replay: Quote resource names before signing")
...
The PIGLIT_BUILD_CL_TESTS related changes were shamelessly stolen from
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6441/diffs?commit_id=5742be00e6b493b5289ed8120eb06f10d341ea3a .
v2: Remove glslang-tools from arm_build.sh. Suggested by Michel.
Reviewed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10492 >
2021-04-28 21:11:34 +00:00
Chia-I Wu
1e3981f69c
venus: enable external memory support
...
This enables VK_KHR_external_memory_fd and
VK_EXT_external_memory_dma_buf support.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:59:19 -07:00
Chia-I Wu
efa185ed5c
venus: rework external memory capability queries
...
The idea is to allow the renderer to use a completely different external
memory handle type (e.g., OPAQUE_WIN32!?) than the driver (always
OPAQUE_FD and DMA_BUF). It hides the mismatch by doing translations in
vkGetPhysicalDevice*.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:59:19 -07:00
Chia-I Wu
fbaa6dbf4e
venus: update venus-protocol for external memory
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:59:18 -07:00
Chia-I Wu
88f481dd74
venus: make sure gem_handle and vn_renderer_bo are 1:1
...
When two vn_renderer_bo's share the same gem_handle, destroying one of
them would invalidate the other.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
f41a79f948
venus: use sparse array to manage vn_renderer_bo
...
It should be faster. More importantly, we want to use it to keep track
of all BOs for correct dmabuf import.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
c62026165c
venus: move some common members to vn_renderer_bo
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
b39ea79c95
venus: merge bo create and init ops
...
There is no good reason to seprate them. I also plan to adopt
util_sparse_array, which requires the kernel BO to be created first (to
use its gem_handle/res_id as the key).
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
2db720330b
venus: move vn_renderer_bo_ops to vn_renderer
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
0d703b9d64
venus: pass vn_renderer in vn_renderer_bo functions
...
We will move vn_renderer_bo_ops to vn_renderer in the following commit.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
6db21119b7
venus: add dev->renderer pointer
...
dev->instance->renderer is slower to type and to follow.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
b54a262421
venus: use vn_renderer_shmem
...
vn_renderer_bo_create_cpu becomes unused and is removed.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
452a49fe19
venus: add vn_renderer_shmem
...
CPU BOs and GPU BOs are used different enough that it makes sense to
treat them as different objects. This commit adds vn_renderer_shmem to
represent CPU BOs.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
2c2fb015cc
venus: rename VN_CS_ENCODER_INITIALIZER
...
Rename it to VN_CS_ENCODER_INITIALIZER_LOCAL to make it clear that it is
only for local variables.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:58 -07:00
Chia-I Wu
b1f25da0b4
venus: update venus-protocol headers to use accessors
...
Switch to the newly added vn_instance_submit_command accessors.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:58:54 -07:00
Chia-I Wu
3c8255f602
venus: provide accessors for vn_instance_submit_command
...
This will allow us to change vn_instance_submit_command without
regenerating the headers.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10437 >
2021-04-28 12:53:28 -07:00
Dylan Baker
ce2706fc92
docs: update calendar for 21.1.0-rc3
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10503 >
2021-04-28 09:34:33 -07:00
Dylan Baker
c7dd23ff61
docs: update calendar for 21.1.0-rc2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10503 >
2021-04-28 09:34:32 -07:00
Dylan Baker
82484b9787
docs: update calendar for 21.1.0-rc1
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10503 >
2021-04-28 09:34:30 -07:00
Rob Clark
cbd6e5f2e5
freedreno/ci: Skip texsubmimage cube_map_array
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
1d19325483
freedreno/ci: Disable counterstrike trace on a306 for now
...
The combination of removing bottlenecks in userspace (userspace fences,
etc) and slow GPU results in hitting full ringbuffer on a306. Haven't
figured out a reasonable way to work around that in userspace until a
kernel fix is in place, so disable this one for now.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
f92f31455a
freedreno/drm: Assume explicit fences if in_fence_fd
...
If we ever see explicit fencing used, then we can disable implicit
fencing, even for internal or unfenced batches.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
e9a9ac6f77
freedreno/drm: Async submit support
...
Move the submit ioctl to it's own thread to unblock the driver thread
and let it move on to the next frame.
Note that I did experiment with doing the append_bo() parts
synchronously on the theory that we should be more likely to hit the
fast path if we did that part of submit merging before the bo was
potentially re-used in the next batch/submit. It helped some things
by a couple percent, but hurt more things.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
2c9e8db28d
freedreno/drm: pipe should hold reference to device
...
A more direct solution would be for bo's to have a reference to the
device. But bo's are ref/unrefd more frequently.
This avoids async submits unrefing a bo after the device handle-
table is freed.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
ad9654a4c1
freedreno/drm: fd_submit should hold ref to fd_pipe
...
Also, move this into the base class, no reason for it to be in backend.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
55eb75d3e6
freedreno: Avoid flushing deferred submits for u_trace
...
This is a bit ugly, but with userspace fences and deferred submits it is
better to poll until the timestamp buffer is ready. Otherwise we could
be triggering deferred submits to flush sooner than they normally would,
changing the behavior of what we are trying to measure.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
cccdc513e3
freedreno/drm/sp: Implement deferred submit merging
...
For submits flushed with (a) no required fence, and (b) no externally
visible effects (ie. imported/exported bo), we can defer flushing the
submit and merge it into a later submit.
This is a bit more work in userspace, but it cuts down the number of
submit ioctls. And a common case is that later submits overlap in the
bo's used (for example, blit upload to a buffer, which is then used in
the following draw pass), so it reduces the net amount of work needed
to be done in the kernel to handle the submit ioctl.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/19
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
c7dc5cf3cb
freedreno/drm/sp: Split submit prep and finish
...
For deferred submits, we still need to do the prep steps immediately,
but the ioctl construction can be deferred.. prepare for that by
splitting the prep out.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
62a6773d80
freedreno/drm: Add pipe tracking for deferred submits
...
Now that we have some bo state tracking for userspace fences, we can
build on this to add a way for the pipe implementation to defer a submit
flush in order to merge submits into a single ioctl.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00
Rob Clark
aafcd8aacb
freedreno: Re-work fd_submit fence interface
...
Move everything into a struct assocated with the pipe_fence_handle, so
that the drm layer can fill in the seqn/fd fences directly.
This will give us a comvenient place to insert a util_queue_fence in the
next commit.
While we're at it, extract the uint32_t fence (previously called
'timestamp' in place, a kgsl legacy) into a struct that encapsulates
both the kernel fence and the userspace fence.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444 >
2021-04-28 15:36:42 +00:00