Erik Faye-Lund
329b26ab76
lavapipe: report correct value for minMemoryMapAlignment
...
The vulkan spec says the following about vkMapMemory:
"ppData is a pointer to a void * variable in which is returned a
host-accessible pointer to the beginning of the mapped range. This
pointer minus offset must be aligned to at least
VkPhysicalDeviceLimits::minMemoryMapAlignment."
So let's report the same value as the gallium-driver reports, otherwise
we'll fail to adhere to the alignment requirement.
This fixes a few Piglit failures for Zink.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4267
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8965 >
2021-02-10 20:42:02 +01:00
Michel Zou
aea36ee05e
zink: Fix win32 build
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8957 >
2021-02-10 18:19:43 +00:00
Alyssa Rosenzweig
60cd7ff7f7
pan/bi: Fix 2-write pseudo op scheduling
...
These cannot schedule to the last tuple, there needs to be other work in
the last clause, or a tuple of NOP's failing that. Can occur depending
on scheduling of CUBEFACE instructions, and will apply to computational
atomics in the near future.
Fixes: 77933d16d8 ("pan/bi: Switch to new scheduler")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8962 >
2021-02-10 18:08:11 +00:00
Alyssa Rosenzweig
214e7de909
pan/bi: Fix 'last tuple' for terminal-NOP clauses
...
This incorrectly assumed the last tuple was nontrivial, an invariant
that holds by accident on the current scheduler but will break
momentarily. Fix this, and document the invariants.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8962 >
2021-02-10 18:08:11 +00:00
Michel Zou
e487ae1b99
vulkan: Fix windows api conflict
...
Closes #4247
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8956 >
2021-02-10 17:10:50 +00:00
Erik Faye-Lund
7ea69f40d8
ci: run piglit on zink with lavapipe
...
Now that we can run on top of Lavapipe, we can finally start testing
Piglit on top of Zink in CI, yay!
Reviewed-by: Daniel Stone <daniel@fooishbar.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8879 >
2021-02-10 17:29:18 +01:00
Erik Faye-Lund
ef36de243c
ci: make sure all lava-builders have libvulkan
...
In the next commit, we'll start building Zink in the meson-testing step,
and because mega-drivers end up stuffing all dependencies in the same
shared-object, we end up requiring libvulkan for other drivers as well.
So let's no longer track separately who needs vulkan and who doesn't,
and just always install it.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8879 >
2021-02-10 17:14:02 +01:00
Pierre-Eric Pelloux-Prayer
c7725ad4aa
gallium/u_upload_mgr: lower risk of hitting an assert
...
The assert(size < INT32_MAX / 2) can be triggered by large uploads.
Since we know that the caller of u_upload_alloc_buffer will consume
min_size bytes, we can init buffer_private_refcount to a much smaller
value.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Fixes: ccf9ef3628 ("gallium/u_upload_mgr: eliminate all atomics for the upload buffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4235
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8880 >
2021-02-10 16:36:06 +01:00
Mike Blumenkrantz
d81087a700
zink: handle null xfb buffers
...
ARB_enhanced_layouts allows specifying explicit locations for xfb buffers,
which means we get arrays of buffers with gaps in the middle sometimes and
have to throw in a null handle
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8943 >
2021-02-10 14:21:01 +00:00
Mike Blumenkrantz
79dd0562f4
zink: create dummy xfb buffer
...
xfb spec disallows binding a null buffer, so we need something to throw in
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8943 >
2021-02-10 14:21:01 +00:00
Mike Blumenkrantz
ce230f15e4
zink: rename zink_context::dummy_buffer -> dummy_vertex_buffer
...
this is a bit more specific
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8943 >
2021-02-10 14:21:01 +00:00
Lionel Landwerlin
0b69e8b16f
anv: print out perf permission warning only once
...
This warning is bothering a number of people and rightfully so.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8955 >
2021-02-10 15:55:52 +02:00
Mike Blumenkrantz
b20e08fadd
zink: enable PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
e388fae898
zink: flush all resources with persistent maps on work batch before draw/compute
...
these require explicit memory sync on our part
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
564bb1410c
zink: slightly refactor batch resource referencing in update_descriptors()
...
this is easier to debug
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
b92ba0100e
zink: track persistent, non-coherent, writable transfer map count for resources
...
these require explicit memory flushes before being submitted to a batch
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
4a7a226e49
zink: set HOST_COHERENT bit for coherent resource creation
...
this allows memory to be mapped during draws without requiring a flush
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Mike Blumenkrantz
152916b2bb
zink: use = and not |= for VkMemoryPropertyFlags during resource creation
...
the previous value of this isn't used, so be explicit here
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8942 >
2021-02-10 13:28:10 +00:00
Iago Toral Quiroga
bd0ef080d0
v3d/compiler: fix QPU scheduler TMU sequence shuffling
...
The QPU scheduler allows to move certain TMU instructions around and
since we enabled pipelining, we need to protect against the case where
doing this might break a TMU sequence. For example, this test:
dEQP-VK.rasterization.line_continuity.line-strip
Was generating this VIR:
mov tmud, t187
mov.pushz null, t176
mov.ifa tmua, t9
nop null; wrtmuc (img[0].p0 | 0x0)
mov tmut, t185
mov tmud, t180
mov.ifa tmusf, t183
nop null; thrsw
where we have a general TMU access (tmud,tmua) followed by an image
access (wrtmuc, tmut, tmud, tmusf), which the QPU scheduler was turning
into:
nop ; nop ; ldunifrf.rf22 (0xffffff00 / -nan)
nop ; nop ; wrtmuc (img[0].p0 | 0x0)
nop ; nop ; ldtmu.r2
add r0, r2, 1 ; nop ; ldtmu.r3
nop ; nop ; ldtmu.r4
nop ; mov tmud, r0
nop ; mov.ifa tmua, rf15
nop ; mov tmut, r4 ; thrsw
nop ; mov tmud, rf22
nop ; mov.ifa tmusf, r3
where it allowed the wrtmuc to move up and before the general TMU access,
leading to an incorrect TMU sequence.
Fix this by flagging TMUA writes (which are the sequence terminators for
general TMU accessess) as writing new TMU configuration, like we do for all
other TMU sequence terminators for textures and images.
Fixes: 197090a3fc ('broadcom/compiler: implement pipelining for general TMU operations')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8954 >
2021-02-10 13:18:25 +00:00
Mike Blumenkrantz
79fcea9475
zink: add a texture barrier hook
...
this just flushes all the pending batches, which is enough since we
do our batch work synchronously and everything is awful
will be reworked when this is no longer the case
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8948 >
2021-02-10 13:12:12 +00:00
Mike Blumenkrantz
802c1afe9c
zink: handle nir_texop_texture_samples
...
this is just a SpvOpImageQuerySamples
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8947 >
2021-02-10 13:05:45 +00:00
Mike Blumenkrantz
efbd3584e3
zink: rework viewport handling
...
viewport can be transformed at draw time based on clip_halfz, so we actually
want to do the conversion from gallium->vulkan at that time
as a nice bonus, we get to delete a struct member
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8946 >
2021-02-10 12:59:37 +00:00
Danylo Piliaiev
f0a76b2067
turnip: enable inheritedQueries
...
Passes relevant CTS tests.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8824 >
2021-02-10 12:38:44 +00:00
Samuel Pitoiset
ed7e6eb54b
radv: fix memory leaks if a submission fails
...
If the device isn't lost, the application might want to re-submit.
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/8931 >
2021-02-10 12:25:38 +00:00
Mike Blumenkrantz
bf5713d736
zink: handle vote intrinsics in ntv
...
these are super simple and straightforward
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8950 >
2021-02-10 12:18:33 +00:00
Mike Blumenkrantz
e35612e45f
zink: add spirv_builder wrapper for vote intrinsics
...
these are all going to use the same mechanics, so we can simplify a bit
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8950 >
2021-02-10 12:18:33 +00:00
Michel Dänzer
cf6901809e
ci: Add trailing slash to path for documentation preview
...
Fixes the documentation preview link on the MR Overview tab. Found by
comparing with the same thing in weston.
(It still appears only after all jobs in the pipeline have at least
started once though)
Fixes: ae8f9584f4 "CI: always expose docs artifacts"
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8927 >
2021-02-10 12:04:22 +00:00
Alejandro Piñeiro
f758b1a25b
v3dv: support for depthBiasClamp
...
Gets tests like the following working:
dEQP-VK.dynamic_state.rs_state.depth_bias_clamp
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8928 >
2021-02-10 10:29:09 +00:00
Rhys Perry
f7575fa71f
aco: fix adjust_vertex_fetch_alpha
...
These offsets were wrong and didn't match the old behaviour.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: e8220e106b ("aco: optimize AC_FETCH_FORMAT_SNORM alpha adjust")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8935 >
2021-02-10 09:37:17 +00:00
Samuel Pitoiset
19711b0f44
radv: stop allocating useless ESGS scratch BO on GFX10+
...
On GFX10+, the ESGS ring is allocated in LDS. This saves one BO
when geometry shaders are used, and possibly two BOs if nothing
else (tess, scratch, etc) is used.
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/8926 >
2021-02-10 08:45:35 +00:00
Samuel Pitoiset
caafedf38f
radv: fix double free when creating a fence failed
...
It's already freed in radv_destroy_fence().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8938 >
2021-02-10 08:45:49 +01:00
Eric Anholt
cd03f1c6f6
gallium: Document behavior of more lowering pipe caps.
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
bcb5f9f94a
v3d: Stop advertising support for flat shading.
...
The GL frontend can lower this weird GL feature away for us. This should
fix redeclaration of the gl_Color/SecondaryColor as centroid, since that
case had been missed in the !flat special case here.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
ff805f8ac7
v3d: Stop advertising support for PIPE_CAP_*_COLOR_CLAMPED.
...
The GL frontend can lower away this deprecated GL feature for us.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
2992dc7386
v3d: Stop advertising support for PIPE_CAP_TWO_SIDED_COLOR.
...
The GL frontend can lower away this deprecated GL feature for us.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
5ddc2f916f
v3d: Clean up vestiges of alpha test lowering.
...
We had an unnecessary case in our uniforms upload switch statement, since
we no longer advertise the cap.
Fixes: 8ad931808e ("v3d: do not report alpha-test as supported")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
b9a9cd59ff
vc4: Stop advertising support for VS color clamping.
...
This is special GL behavior that the frontend is now able to handle for
us.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
e584d4f6dd
vc4: Stop advertising support for PIPE_CAP_TWO_SIDED_COLOR.
...
The GL frontend is perfectly able to handle this for us.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
cc0841c82a
vc4: Remove vestiges of alpha test lowering.
...
We stopped reporting the alpha test screen cap, and stopped using the
value in the key, so now shrink the key. This gets another switch case
out of the hot uniforms upload path.
Fixes: 1404b8b1e5 ("vc4: do not report alpha-test as supported")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
9aa7a2d10c
mesa/st: Assume that the default variant is always first in the list.
...
Since we always precompile now, we can remove some checks for presence of
the first variant or for it being the wrong key.
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
1d5ce66b02
mesa/st: Always precompile the first shader variant.
...
Every driver wants the chance to see the default variant of the shader in
the hopes of avoiding draw-time shader compiles, even if they have some
NOS compiled into the shader by st/mesa. Before, every driver had to
avoid st/mesa lowering options to get this behavior, even if they would
like to have the shared lowering code, and some drivers were just missing
the behavior because nobody had debugged that it was missing yet.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8601 >
2021-02-09 20:06:48 -08:00
Eric Anholt
659916d674
freedreno/a5xx: Don't forget to count our custom blits against queries.
...
Noticed when comparing the a5xx and a6xx paths.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8873 >
2021-02-10 03:46:25 +00:00
Eric Anholt
881ce0f0a4
freedreno: Remove FD_STAGE_* in favor of a "disable_all" flag.
...
The only paths are "prepare queries for rendering" and "finish all
queries", everything else is handled by set_active_query_state().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8873 >
2021-02-10 03:46:25 +00:00
Eric Anholt
4cc3956193
freedreno: Force updating active queries on batch reordering.
...
The state of queries for the batch we've just switched to may not reflect
the current active flag, so make sure that we update at the start of the
next draw.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8873 >
2021-02-10 03:46:25 +00:00
Eric Anholt
1bab56e1ba
ci/virgl: Fix GLES31 testing on desktop GL.
...
The version overrides leaked into the virglrenderer server, breaking
compiling of all sorts of shaders. We already get GLES3.1 when running
virgl on llvmpipe GL without doing any overrides.
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8854 >
2021-02-10 03:31:56 +00:00
Mike Blumenkrantz
697fb11cfc
features: mark off GL 4.3 for zink
...
\o/
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8941 >
2021-02-09 19:26:47 -05:00
Mike Blumenkrantz
cb80609bb0
zink: GLSL 430
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8941 >
2021-02-09 19:25:53 -05:00
Mike Blumenkrantz
7909c642b1
zink: enable compute
...
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
c5cf5ad6f0
zink: export compute-specific shader/compute caps
...
this doesn't enable the compute cap itself, it just handles all the other
caps
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00
Mike Blumenkrantz
a2771967cb
zink: add launch_grid pipe_context hook for compute handling
...
we're reusing update_descriptors, so this is trivial
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781 >
2021-02-10 00:19:39 +00:00