Lionel Landwerlin
2ff3fd4773
vulkan: put generated defines into their own header
...
v2: Put vk_enum_defines.h in the list of generated files
Signed-off-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/9045 >
2021-10-06 20:22:37 +00:00
Dave Airlie
7d388c8d09
wsi/x11: cleanup properly after mit shm paths are used.
...
This path was being skipped on sw + has_mit_shm, when it
shouldn't be.
Fixes: a069b4e9b9 ("vulkan/wsi/sw: add mit-shm support for pixmap allocation")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13217 >
2021-10-07 05:43:27 +10:00
Michel Zou
2414001bdd
docs: mark off missing lavapipe exts
...
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13232 >
2021-10-06 20:08:11 +02:00
Emma Anholt
591afd1d52
turnip: Free disk cache on pdev init failure.
...
Noticed while debugging test failure under valgrind (the disk cache
doesn't come from the vulkan allocator, so we could leak it and not fail
the test).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13200 >
2021-10-06 16:49:03 +00:00
Emma Anholt
36d761f2a5
turnip: Fix allocation failure handling around device->name.
...
Fixes regressions in dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail
Fixes: 5116388e0b ("turnip: Expose a device name similar to the blob.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13200 >
2021-10-06 16:49:03 +00:00
Emma Anholt
23cad1b566
turnip: Plug the vendor/device ID into the pipeline cache fields, too.
...
Fixes a regression in dEQP-VK.pipeline.cache.misc_tests.cache_header_test.
Fixes: 7e471541e0 ("turnip: Match the blob's format for vendorID and deviceID.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13200 >
2021-10-06 16:49:03 +00:00
Danylo Piliaiev
729991e09c
ir3: remove obsolete assert for intrinsic_store_output in tess
...
We do support non-zero nir_intrinsic_component for
nir_intrinsic_store_output in tess shaders.
Fixes vkd3d test "test_hull_shader_fork_phase_dxbc"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13196 >
2021-10-06 16:06:10 +00:00
Marcin Ślusarz
434df66792
anv: allocate zeroed device object
...
When enabling a new feature we made the mistake of initializing some fields
of the device object conditionally, which leads to crashes later. Initializing
those fields would be a trivial fix, but it's probably better to just zero
everything at allocation time and prevent any future screwups. Device objects
are allocated rarely enough for this additional memset to not matter for
performance.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
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/13221 >
2021-10-06 15:20:40 +00:00
Jason Ekstrand
1f7e11a190
genxml: Drop bit 27 from RENDER_SURFACE_STATE::Surface Format
...
Bit 27 is the "ASTC Format" bit in the PRMs but we just extended the
Surface Format field by one bit and made sure all the ASTC formats have
that bit set. Since Gfx12.5 doesn't support ASTC, we can drop that bit
from the field and this will cause GenXML packing functions to assert if
it's ever set.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Jason Ekstrand
e7f3da0138
intel/isl: ASTC support was removed on Gfx12.5
...
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Jason Ekstrand
58bb20179b
anv: Ask ISL about ASTC support
...
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Jason Ekstrand
8afc9626ad
intel/isl: Stop claiming ASTC works on Cherry View
...
We do, however, leave a nice tombstone comment in case anyone comes
looking. Given the age and scarcity of Cherry View hardware and ASTC
apps that run on desktop Linux, it's unlikely we'll ever bother to
implement it.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Jason Ekstrand
0c618f308c
intel/isl: Simplify isl_format_supports_filtering
...
For compressed formats, filtering and sampling has always gone together.
This lets us avoid duplicating all those nasty special cases between the
two functions.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206 >
2021-10-06 15:04:33 +00:00
Mike Blumenkrantz
7cc85dba71
build: unify vulkan cpp platform args
...
these were duplicated all over the place, and it's annoying to have to keep
duplicating them any time a new component includes the vulkan header
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13141 >
2021-10-06 14:19:35 +00:00
Mike Blumenkrantz
1d574d4860
lavapipe: remove display extension support
...
lavapipe doesn't actually support these
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Acked-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13141 >
2021-10-06 14:19:35 +00:00
Thomas Wagner
fe1a091bd0
lavapipe: enable KHR_external_memory_fd
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Thomas Wagner
9da15aa3aa
llvmpipe: enable EXT_memory_object(_fd)
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Thomas Wagner
895d3399f7
lavapipe: add support for KHR_external_memory_fd
...
Support creating exportable memory. Use memfd file
descriptors and import/export them as opaque fd handles.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Thomas Wagner
1608a815e3
llvmpipe: add support for EXT_memory_object(_fd)
...
Enable the import of memory via opaque fd handles, which
are based upon memory-fds. The extension is necessary for sharing
images and buffers from Vulkan.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Thomas Wagner
1166ee9caf
gallium: add utility and interface for memory fd allocations
...
Add utility functions to allocate aligned memory backed by
mem_fd objects. Add interface to Gallium for same allocation.
It will be used in later commits for external memory support
in Vulkan/OpenGL.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00
Connor Abbott
0209311c6e
ir3: Use source in ir3_output_conv_src_type()
...
This was incorrectly converted when splitting the regs array. Noticed by
inspection.
Fixes: d3e08327cf ("ir3/core: Switch to srcs/dsts arrays")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13220 >
2021-10-06 13:15:50 +00:00
Roman Stratiienko
f1c322c269
meson_options: Bump max value of platform-sdk-version to 31
...
During building Android-12, the following error appears:
meson.build:21:0: ERROR: New value 31 is more than maximum value 30.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com >
Acked-by: Emil Velikov <emil.l.velikov@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13216 >
2021-10-06 12:05:22 +00:00
Danylo Piliaiev
6a16b6a74c
turnip: fix vbs emission when there are holes in bindings
...
Otherwise we read garbage for bindings with value above
vertexBindingDescriptionCount.
Fixes vkd3d test "test_append_aligned_element"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13195 >
2021-10-06 10:05:50 +00:00
Alejandro Piñeiro
bc5892b7fc
v3dv: use NULL for vk_error on initialization failures
...
This commit fixes two issues:
* On CreateInstance, we are freeing the instance, and then trying to
use it when calling vk_error. This could be problematic, so let's
just use NULL.
* On CreateDevice, we are getting a unsupported feature error, and
then trying to call vk_error using the instance. That's is not
really a instance error, and will assert when the ongoing common
vk_error lands mesa. Let's use NULL instead, as the object it
applies, the device, was not created.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13219 >
2021-10-06 11:42:28 +02:00
Dave Airlie
ab1c888c8d
device_select: close dri3 fd after using it.
...
This can leak and causes crashes in some CTS test groups
dEQP-VK.wsi.xcb.incremental_present*
Fixes: 9bc5b2d169 ("vulkan: add initial device selection layer. (v6.1)")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13215 >
2021-10-06 18:24:54 +10:00
Dave Airlie
028591954a
lvp/fence: quick fix to previous commit.
...
This fixes last of xcb cts issues.
Fixes: 8a294b6f975e1 ("lavapipe: Fix vkWaitForFences for initially-signalled fences")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13212 >
2021-10-06 15:27:33 +10:00
Pavel Asyutchenko
b9617bc621
lavapipe: Fix vkWaitForFences for initially-signalled fences
...
Fences with VK_FENCE_CREATE_SIGNALED_BIT are created with
signalled=true and timeline=0, waiting on them without
submitting first returned VK_TIMEOUT instead of VK_SUCCESS.
Signed-off-by: Pavel Asyutchenko <sventeam@yandex.ru >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13128 >
2021-10-06 15:11:04 +10:00
Mike Blumenkrantz
96ea718b7e
lavapipe: EXT_4444_formats support
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12001 >
2021-10-06 04:35:25 +00:00
Dave Airlie
29f4931b52
llvmpipe: fix 4-bit output scaling.
...
This is overkill, but hey 4-bits per channel is hardly something to
care about.
(Suggestions welcome for a better version).
Fixes:
dEQP-GLES2.functional.fbo.render.*rgba4*
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12001 >
2021-10-06 04:35:25 +00:00
Emma Anholt
22a332f5ac
virgl: Add support for NIR shaders when VIRGL_DEBUG=nir.
...
This will let me incrementally fix nir-to-tgsi against virgl without
having to carry around the whole "remove TGSI from mesa/st" MR.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:18 +00:00
Emma Anholt
4e3e149ffd
nir_to_tgsi: Force the TXQ LOD argument to be scalar.
...
Otherwise, older virglrenderer fails all the texturesize tests.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
469f0345ac
nir_to_tgsi: Add a workaround for virgl UBO array dynamic indexing.
...
virgl makes one array of UBOs starting from the first non-CB0 UBO used,
and does dynamic indexing off of that. It requires that the dynamic
indexing be CONST[ADDR[0]+base], rather than having the base be loaded in
addr0.
If we had a nir_intrinsic_base() on load_ubo, this would be easy. As we
don't, emit a subtract at address deref time.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
a292268cd5
nir_to_tgsi: Sort FS output declarations to avoid virglrenderer bugs.
...
The TGSI debug output is a lot more readable if it's in location order,
anyway.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
7dde279db5
nir-to-tgsi: Avoid emitting TXL just for lod 0 on non-vertex shaders.
...
Prompted by comparing virgl fails and finding that it has issues with
immediate args to TXL/TXB, at least.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
c3c560089e
nir_to_tgsi: Turn GS PRIMID into an input instead of a sysval.
...
While TGSI can represent it either way, virgl and r600 at least demand an
input.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
91a5a18dbf
nir_to_tgsi: Add support for nir_intrinsic_load_barycentric_at_sample.
...
It doesn't have to be a constant sample, so we need to store it at load
time and use the load's dest at interpolate_at time.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
15aabcd806
nir_to_tgsi: Add support for load_barycentric_sample.
...
This is used for var->data.sample inputs, which are already declared to be
TGSI_INTERPOLATE_LOC_SAMPLE, so we can just use the interpolated inputs.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
80c007a4dd
nir_to_tgsi: Add support for declaring image arrays.
...
Required for virgl.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
8d6f738007
gallium/ureg: Sort the input decls, too.
...
Just like outputs, virglrenderer needs its inputs sorted. Should be
harmless for other TGSI producers, and makes the declarations more
readable.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
441643b105
nir_to_tgsi: Add support for load_output/load_per_vertex_output.
...
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
96cf3b3595
nir_to_tgsi: Include txf_ms's sample index.
...
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Emma Anholt
ba6368b54d
mesa/st: Don't bump locations of patch vars for !PIPE_CAP_TEXCOORD.
...
There's no need to reserve the bottom 9 VARYING_SLOT_PATCH*, since
VARYING_SLOT_TEXCOORD won't be mapped there. This helps us match up with
nir_to_tgsi, which wasn't shifting down by 9 for patch.
Acked-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12800 >
2021-10-06 03:44:17 +00:00
Mike Blumenkrantz
2f6debfd6d
lavapipe: inherit from vk_image
...
simple and easy since we don't use much of this anyway
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13146 >
2021-10-06 03:10:06 +00:00
Dave Airlie
9392bd89e9
llvmpipe/cs: change submission pattern for threadpool
...
Recent ncnn benchmarks showed a slowdown, and this change seemed
more likely.
The batching into threads for the main workloads is fine, however
the remainder stuff doesn't get spread out and can bottleneck in
one thread.
Switch to a model where the initial work is batched, but the
remainder is iterated over one by one.
Brings ncnn benchmarks back in line with previously.
Fixes: 69109e0b19 ("llvmpipe/cs: rework thread pool for avoid mtx locking")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13210 >
2021-10-06 02:42:20 +00:00
Lionel Landwerlin
3924df9fe7
anv: enable VK_KHR_maintenance4
...
v2 (Jason Ekstrand):
- Get maxBufferSize from ISL.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Jason Ekstrand
231653ea35
intel/isl: Add a max_buffer_size limit to isl_device
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Lionel Landwerlin
9edbd13f81
anv: implement vkGetDeviceImageSparseMemoryRequirementsKHR
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Lionel Landwerlin
4075dd16ab
anv: implement vkGetDeviceImageMemoryRequirementsKHR
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Lionel Landwerlin
9058fd8979
anv: move VkImage object allocation to anv_CreateImage
...
v2 (Jason Ekstrand):
- Switch the order of arguments to be device, image, other stuff
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00
Jason Ekstrand
8c2a1ed3da
anv: Add an anv_image_get_memory_requirements helper
...
This is similar to a patch from Lionel except works in terms of aspects
rather than bindings. This makes it easy to use from the Android code.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13199 >
2021-10-06 02:18:39 +00:00