Erik Faye-Lund
301ceab7ce
lavapipe: consistently use nir macros
...
NIR provides two helper macros to run transformation passes correctly,
NIR_PASS() and NIR_PASS_V(). So far we've seemingly been a bit haphazard
about when to use them.
Let's correct that, and consistently use the NIR helpers here. This
helps us in two ways:
1. We now run nir_validate_shader after each pass, ensuring we didn't
break the shader
2. We now respect the NIR_PRINT environment variable for all NIR passes,
making debugging much less surprising.
In addition, we had an OPT()-macro that doesn't seem to provide much
help other than to hiding some trivial details. But they make our code
different to other users of NIR, which doesn't seem ideal. So let's drop
that macro while we're at it.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10585 >
2021-05-04 07:18:55 +00:00
Mike Blumenkrantz
0e439541a5
lavapipe: implement VK_EXT_provoking_vertex
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10458 >
2021-04-26 20:19:48 +00:00
Bas Nieuwenhuizen
580f1ac473
nir: Extract shader_info->cs.shared_size out of union.
...
It is valid for all stages, just 0 for most of them. In particular
mesh/task shaders might be using it.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10094 >
2021-04-08 14:39:28 +00:00
Dave Airlie
34525bb088
lavapipe: enable subgroups features
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9645 >
2021-04-07 19:56:17 +00:00
Rhys Perry
8731a1beb7
lavapipe: fix initialization of pipe_stream_output with unwritten outputs
...
nir_assign_io_var_locations() does not use outputs_written when assigning
driver locations. Use driver_location to avoid incorrectly guessing what
locations it assigned.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8364 >
2021-04-01 10:15:44 +00:00
Dave Airlie
d62bb8bc0d
lavapipe: fail out if spirv->nir fails
...
Just fail out earlier and assume a feature is missing.
Fixes a crash in validation layer tests
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9937 >
2021-03-31 05:23:57 +00:00
Dave Airlie
115ba959dc
lavapipe: enable KHR_shader_atomic_int64
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9591 >
2021-03-29 20:32:09 +00:00
Dave Airlie
b06f121fcc
lavapipe: enable 8/16-bit storage extensions
...
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9643 >
2021-03-22 12:17:36 +10:00
Dave Airlie
a986d1ed63
lavapipe: add support for KHR_buffer_device_address.
...
Adds the missing magic lowering pass, and stores the pmem
pointer for easier returning to user.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9616 >
2021-03-16 23:05:10 +00:00
Mike Blumenkrantz
c3db26a6f6
lavapipe: use common interfaces for shader modules
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508 >
2021-03-15 21:47:44 +00:00
Dave Airlie
1fb43ae9bf
lavapipe: enable KHR_multiview
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9399 >
2021-03-12 05:05:51 +00:00
Dave Airlie
d061e21b7e
lavapipe: enable EXT_shader_viewport_index_layer
...
This is already implemented afaik
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9401 >
2021-03-05 21:43:59 +00:00
Dave Airlie
6bcd304278
lavapipe: fix pipeline vp/scissor mixup.
...
Not copying all the scissors caused
dEQP-VK.pipeline.extended_dynamic_state.two_draws_dynamic.2_viewports
to fail but thah test pointlessly relies on KHR_multiview (cts issue
filed).
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Fixes: b38879f8c5
("vallium: initial import of the vulkan frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9422 >
2021-03-05 03:34:47 +00:00
Dave Airlie
83c4e94196
lavapipe: handle tessellation domain winding
...
Fixes: dEQP-VK.tessellation.winding.*
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9238 >
2021-02-24 10:07:01 +10:00
Dave Airlie
368c804383
lavapipe: make OPT macro MSVC compatible
...
This macros is ugly, make it uglier but msvc compatible.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Dave Airlie
c1e0249e90
lavapipe: use msvc compatible 0 init
...
trivial changes
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Dave Airlie
ab42e49ea7
lavapipe: fix some void ptr arithmetic
...
msvc disagrees with it, and they are trivial to fix.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9120 >
2021-02-19 02:27:15 +00:00
Michel Zou
2ef3dca476
vulkan/lavapipe: add missing VKAPI_ATTR/CALL
...
Acked-by: Jose Fonseca <jfonsec@vmware.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8823 >
2021-02-09 19:21:03 +00:00
Dave Airlie
8be936f295
lavapipe: handle shader draw parameters
...
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8219 >
2021-01-27 23:36:52 +00:00
Caio Marcelo de Oliveira Filho
9f3d5e99ea
compiler: Use util/bitset.h for system_values_read
...
It is currently a bitset on top of a uint64_t but there are already
more than 64 values. Change to use BITSET to cover all the
SYSTEM_VALUE_MAX bits.
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Acked-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8585 >
2021-01-26 20:20:47 +00:00
Dave Airlie
6af87193c4
lavapipe: add basic vulkan device group support.
...
This just add the basic for vulkan device group support, base
dispatch, and dummy funcs
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Reviweed-by: Eric Anholt <eric@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8154 >
2020-12-24 08:10:06 +10:00
Eric Anholt
bb4ade40e4
lvp: Fix vtn warnings about unsupported image read/write without format.
...
These are just warnings printed to the console and don't affect testcase
pass/fail, but clog up the deqp-runner job logs.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8188 >
2020-12-21 20:33:35 +00:00
Dave Airlie
448e60314a
lavapipe: add transform feedback support
...
This adds support for EXT_transform_feedback which can be used by
zink to enable more CI
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7981 >
2020-12-21 01:12:42 +00:00
Erik Faye-Lund
3f0da800eb
lavapipe: implement VK_EXT_vertex_attribute_divisor (v2)
...
This is more or less just compile-tested, but this seems about right to
me. I see the extension being supported when running on top of Zink,
which makes me happy enough for now ;)
v2: fixed up to copy the structs on pipeline create [airlied]
gallium doesn't support the 0 divisor case yet.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7930 >
2020-12-10 11:01:07 +10:00
Dave Airlie
eec9d67e44
lavapipe: don't copy pNext
...
We have to ignore unknown structs, so don't init the deep copy pNext
with the src.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7978 >
2020-12-10 10:46:27 +10:00
Dave Airlie
6a27262cc2
lavapipe: split out pipeline struct duplication to a macro.
...
This just pulls a common pattern into a macro.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7978 >
2020-12-10 10:46:23 +10:00
Dave Airlie
a2cf059023
lavapipe: use ralloc for pipeline copies.
...
We have to store every struct that is in the pipeline for processing
later, use ralloc to make freeing this mess easier.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7978 >
2020-12-10 10:46:18 +10:00
Dave Airlie
f65b1d22f2
lavapipe: enable post depth coverage
...
This just works.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7888 >
2020-12-03 13:19:13 +10:00
Dave Airlie
0a6e1971ea
lavapipe: enable VK_EXT_shader_stencil_export
...
This should just work.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7888 >
2020-12-03 13:19:08 +10:00
Dave Airlie
0d90c7cbc4
lavapipe: fixup device allocate + enable private data
...
I'd only half ported private memory support, finish the job.
Cc: "20.3" <mesa-stable@lists.freedesktop.org >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7705 >
2020-11-24 06:50:21 +10:00
Eric Anholt
eda3e4e055
nir/builder: Add a name format arg to nir_builder_init_simple_shader().
...
This cleans up a bunch of gross sprintfs and keeps the caller from needing
to remember to ralloc_strdup. I added a couple of '"%s", name ? name :
""' to radv where I didn't fully trace through whether a non-null name was
being passed in.
I also took the liberty of adding a basic name to a few shaders (pan_blit,
unit tests)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323 >
2020-11-11 08:50:29 -08:00
Eric Anholt
5f992802f5
nir/builder: Drop the mem_ctx arg from nir_builder_init_simple_shader().
...
This looks a lot more simple now!
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323 >
2020-11-11 08:50:29 -08:00
Eric Anholt
4e9328e3b6
nir_builder: Return a new builder from nir_builder_init_simple_shader().
...
It's a little inline function, so we can just RAII it for better
ergonomics.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7323 >
2020-11-11 08:49:49 -08:00
Dave Airlie
e94fd4cc65
lavapipe: rename vallium to lavapipe
...
Just a cooler name, and a lot easier to search for. thanks Marek
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6921 >
2020-10-01 00:23:40 +00:00