Mike Blumenkrantz
795925e0ff
zink: hook up EXT_color_write_enable
...
no functional changes
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15392 >
2022-03-21 22:58:11 -04:00
Mike Blumenkrantz
b7b494299d
zink: use VK_EXT_depth_clip_control when available
...
this saves a few ALUs in vertex stages
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15174 >
2022-02-28 17:21:29 +00:00
Mike Blumenkrantz
7e8d609f6e
zink: enable VK_EXT_shader_atomic_float
...
this is needed for atomic ops, but we can let drivers that don't support
it have some warning messages instead of gating features
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14690 >
2022-01-31 20:34:07 +00:00
Mike Blumenkrantz
129e31cd4f
zink: hook up planar image format creation
...
it'll explode if used for anything, but this is how it's done
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13865 >
2022-01-21 01:02:18 +00:00
Mike Blumenkrantz
65e34fa70e
zink: add VK_KHR_external_memory_capabilities to instance exts
...
the props for this are weird so they have to be fetched "manually"
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14498 >
2022-01-18 23:31:01 +00:00
Mike Blumenkrantz
f0f1a94fcf
zink: add VK_KHR_external_semaphore_fd to device exts
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14498 >
2022-01-18 23:31:01 +00:00
Charles Baker
dcb2f48ed6
zink: Enable VK_KHR_image_format_list for VK_KHR_imageless_framebuffer
...
Validation layer reports that VK_KHR_imageless_framebuffer depends on
VK_KHR_image_format_list and that the latter must be enabled explicitly
with the former.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14570 >
2022-01-18 18:30:22 +00:00
Hoe Hao Cheng
9323d2ea6d
zink/codegen: remove bogus print statement
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14434 >
2022-01-07 17:51:45 +00:00
Mike Blumenkrantz
69501ff458
zink: explicitly enable VK_EXT_shader_subgroup_ballot
...
this is needed when not creating 1.2 contexts
cc: mesa-stable
ref #5567
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13562 >
2021-11-01 01:15:20 +00:00
Mike Blumenkrantz
04e9470bcf
zink: hook up VK_EXT_descriptor_indexing
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12855 >
2021-09-27 01:40:54 +00:00
Hoe Hao Cheng
3ee35b769a
zink/codegen: do not enable extensions based on vulkan version
...
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13004 >
2021-09-24 19:53:25 +00:00
Mike Blumenkrantz
464f0ed74b
zink: enable timeline ext features
...
this is required by spec even though nobody cares
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13033 >
2021-09-24 19:12:50 +00:00
Mike Blumenkrantz
6f7fe12fd4
zink: hook up VK_EXT_queue_family_foreign
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
b359950b0f
zink: hook up dmabuf ext
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11967 >
2021-09-14 03:14:12 +00:00
Mike Blumenkrantz
c96e854db3
zink: hook up VK_EXT_primitive_topology_list_restart
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12626 >
2021-09-08 03:08:39 +00:00
Mike Blumenkrantz
376b963c81
zink: hook up 8/16bit storage exts
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12634 >
2021-09-07 13:29:57 +00:00
Mike Blumenkrantz
c552d99b09
zink: use imageless framebuffers
...
this feature lets zink avoid the screen-based framebuffer cache with locks
in favor of a context-based one that doesn't need any complicated wizardry
to work since it doesn't need to track refcounts for attachments or work
across contexts since the surface info gets passed in when the renderpass
is begun
also expand the dummy surface to an array for use with multisampling and simplify
surface refs there for non-imageless case
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12661 >
2021-09-02 15:53:16 +00:00
Erik Faye-Lund
4b8f2b99e8
zink: avoid generating nonsensical code
...
With this code, we end up generating code such as:
if (!strcmp(extensions[i].extensionName, "VK_KHR_maintenance1")) {
if (VK_MAKE_VERSION(1,2,0) >= screen->vk_version) {
info->have_KHR_maintenance1 = true;
} else {
info->have_KHR_maintenance1 = true;
}
}
That's clearly nonsense, as it does the same thing in the true and false
case. So let's instead try to walk the Vulkan versions up to the one
we're using in a separate pass, and add all extensions that were made core
in that version.
CID: 1473289
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12593 >
2021-08-27 18:55:19 +00:00
Erik Faye-Lund
a00fccce0c
zink: reduce scope of version-struct hack
...
Without this, we'll end up checking against the wrong version when
enabling core features in the next commit.
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12593 >
2021-08-27 18:55:19 +00:00
Mike Blumenkrantz
7811037de5
zink: hook up VK_EXT_extended_dynamic_state2
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12585 >
2021-08-27 03:31:25 +00:00
Mike Blumenkrantz
410d4dc529
zink: remove VK_EXT_shader_subgroup_ballot from device info
...
restrict this to 1.2 only
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11990 >
2021-07-27 22:44:59 +00:00
Mike Blumenkrantz
6691a48bcc
zink: EXT_vertex_input_dynamic_state
...
this eliminates vertex attributes from the pipeline state, massively
deduplicating the number of pipelines needed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12009 >
2021-07-27 00:36:27 +00:00
Mike Blumenkrantz
a8727ec856
zink: hook up VK_KHR_dedicated_allocation
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11958 >
2021-07-19 23:34:21 +00:00
Mike Blumenkrantz
e9516a4edd
zink: check for dedicated allocation requirements during image alloc
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11958 >
2021-07-19 23:34:21 +00:00
Erik Faye-Lund
9e7e54b473
zink: hook up line-rasterization ext
...
The VK_EXT_line_rasterization extension allows to specify the
correct line-rasterization rules, which is needed for correct OpenGL
rendering.
So, let's prepare for filling this one out. Right now, it does a whole
lot of nothing, but that's about to change.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11795 >
2021-07-09 13:18:47 +00:00
Erik Faye-Lund
fa784acbdf
zink: remove some needless moltenvk details
...
This removes a macro that we don't need, and removes a comment about a
detail that we don't care about in that location.
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11554 >
2021-06-24 10:47:00 +02:00
Mike Blumenkrantz
b6855b2e18
zink: support multidraw
...
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11498 >
2021-06-22 13:06:35 +00:00
Hoe Hao Cheng
65c8ae6bbd
zink: zero-init structs with ISO C
...
zero-initing with empty braces is a GNU extension, MSVC does not like
it.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11376 >
2021-06-15 12:33:03 +00:00
Hoe Hao Cheng
b5d344c3af
zink: move extension function verification to when it is used
...
Some vulkan functions are not loaded when the corresponding features are
not enabled, but the verifier checks for *all* functions, so make the
verifier more forgiving and use a stub to catch when we actually use a
function that is not loaded.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11328 >
2021-06-13 18:58:34 +00:00
Hoe Hao Cheng
5574868103
zink: use the dispatch tables
...
- removed all usage of GET_PROC_ADDR
- find-and-replaced all instances of `screen->vk_` to `screen->vk.`
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11036 >
2021-06-10 20:24:40 +00:00
Hoe Hao Cheng
c3608e6ac0
zink/codegen: add zink_verify_*_extensions()
...
those are meant to be used with the dispatch tables, by checking whether
the functions added by the enabled extensions are actually loaded
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11036 >
2021-06-10 20:24:40 +00:00
Mike Blumenkrantz
7a5800af3d
zink: hook up push descriptor and descriptor template extensions
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10998 >
2021-05-26 03:55:37 +00:00
Mike Blumenkrantz
d7a1bd94fb
zink: check descriptor layout support before creating it
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9965 >
2021-05-07 01:50:11 +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
Erik Faye-Lund
91727182dc
zink: also enable float16 from KHR extension
...
This allows us to use 16 bit floats on pre Vulkan 1.2 drivers as well.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101 >
2021-04-30 12:02:04 +00:00
Mike Blumenkrantz
4b52a7f245
zink: hook up EXT_image_drm_format_modifier
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10520 >
2021-04-29 12:32:59 +00:00
Mike Blumenkrantz
4df25407e9
zink: hook up VK_EXT_shader_subgroup_ballot
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10520 >
2021-04-29 12:32:59 +00:00
Mike Blumenkrantz
b1aef8ccc6
zink: hook up VK_EXT_conservative_rasterization
...
just the ext bits
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10520 >
2021-04-29 12:32:59 +00:00
Mike Blumenkrantz
817a8fa22f
zink: hook up VK_EXT_sample_locations
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10520 >
2021-04-29 12:32:59 +00: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
Mike Blumenkrantz
78232665db
zink: hook up VK_EXT_provoking_vertex
...
ideally we would want to require transformFeedbackPreservesTriangleFanProvokingVertex,
but as there is no fallback path, any amount of provoking vertex support
is still better than none, so tests related to this will continue to fail
for that hardware (intel)
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
Adam Jackson
bbeee415ee
zink: Learn about VK_KHR_swapchain
...
We're gonna want it eventually.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10382 >
2021-04-21 14:03:27 -04:00
Erik Faye-Lund
95d9d811c9
zink: do not require vulkan memory model for shader-images
...
The claim that we require vulkan memory model's MakeAvailable and
MakeVisible semantics for image writes isn't accurate. This would be
required *if* we were already using the Vulkan memory model.
But we're using the GLSL450 memory model in those cases, which has no
such requirements.
This means that any problems on RADV due to the lack of these semantics
are RADV bugs, and should be fixed in RADV instead.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10345 >
2021-04-20 15:52:07 +00:00
Mike Blumenkrantz
b62633c599
zink: hook up VK_EXT_sampler_filter_minmax
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10248 >
2021-04-15 12:35:09 +00:00
Erik Faye-Lund
6940d3ba05
zink: document scalarBlockLayout requirement
...
We're currently using uint arrays instead of uvec4 arrays for UBOs and
SSBOs, which requires scalarBlockLayout. Fixing this is a lot of work,
so let's just document it for now.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10127 >
2021-04-10 09:48:38 +00:00
Mike Blumenkrantz
7580a69844
zink: hook up EXT_fragment_shader_interlock
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10013 >
2021-04-08 04:13:14 +00:00
Mike Blumenkrantz
9a13add12e
zink: hook up timeline semaphore signalling during batch submission
...
just basic parts, no waiting on semaphores yet
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9963 >
2021-04-01 13:25:51 +00:00
Erik Faye-Lund
a95912e9af
zink: check for mirror-clamp extension
...
This cap depends on a device extension.
Fixes: b59d98ae5f
("zink: enable PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9803 >
2021-03-24 21:12:00 +00:00
Adam Jackson
3c72c86742
zink: Wire up ARB_post_depth_coverage
...
Just a matter of passing the bits through in the right place.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9637 >
2021-03-17 23:15:12 +00:00
Mike Blumenkrantz
5945d7d2e9
zink: fix instance/device versioning (for real this time)
...
the maximum allowable runtime version of vk can be computed by MIN(instance_version, device_version)
despite this, instances and devices can be created using the maximum version available
for each respective type. the restriction is applied only at the point of
enabling/applying features and extensions, meaning that to correctly handle this,
zink must:
1. create an instance using the maximum allowable version
2. select a physical device using the instance
3. compute MIN(instance_version, device_version)
4. only now begin to enable/use features requiring vk 1.1+
ref #4392
Reviewed-by: Adam Jackson <ajax@redhat.com >
Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9479 >
2021-03-09 18:33:15 +00:00