545 Commits

Author SHA1 Message Date
aerofly
a4c6f64ecf Default to swizzle_texture_samples=false 2018-12-12 17:38:42 +01:00
aerofly
4cae69542d Update fork to latest MoltenVK 2018-12-12 16:24:57 +01:00
aerofly
8c1581f247 Update fork to latest MoltenVK 2018-12-12 16:08:22 +01:00
aerofly
b8d12f58a5 Add MVKVector a std::vector compatible container with configurable stack space 2018-12-09 17:24:29 +01:00
aerofly
3587bcf02f mvk_vector 2018-12-09 17:18:40 +01:00
aerofly
8d868926bf mvk_vector 2018-12-09 16:58:15 +01:00
aerofly
0c0afd4c68 mvk_vector 2018-12-09 16:41:48 +01:00
aerofly
f2bac60be4 mvk_vector 2018-12-09 16:34:30 +01:00
Bill Hollings
ffb4406388
Merge pull request #373 from cdavis5e/bind-memory2
Support the VK_KHR_bind_memory2 extension.
2018-12-06 15:05:54 -05:00
Chip Davis
89aaaee0b8 Support the VK_KHR_bind_memory2 extension.
This extension allows multiple device memory objects to be bound in one
call. It also provides extensible versions of the memory binding calls.
It is a prerequisite for both the `VK_KHR_device_group` and
`VK_KHR_sampler_ycbcr_conversion` extensions.

The `VK_IMAGE_CREATE_ALIAS_BIT`, also added in this extension, would be
more interesting if we used `MTLHeap` objects for device memory, since
that would determine whether or not we would make images aliasable.
2018-12-06 11:50:43 -06:00
Bill Hollings
1d8a95e4cb
Merge pull request #371 from cdavis5e/swapchain-mutable-format
Support the VK_KHR_swapchain_mutable_format extension.
2018-12-05 14:03:01 -05:00
Chip Davis
528d3daf2a Support the VK_KHR_swapchain_mutable_format extension.
This allows clients to create views of a swapchain image with a
different format, just like a regular image created with the
`VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT` set. This extension also supports
the additional features provided by `VK_KHR_maintenance2` and
`VK_KHR_image_format_list` for swapchain images.

We... admittedly don't do much with any of this. There wasn't really
anything in Metal stopping clients from doing this to begin with. This
change does, however, set the `MUTABLE_FORMAT` and `EXTENDED_USAGE`
image bits on any swapchain created with the new
`VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR`.
2018-12-05 12:15:55 -06:00
Bill Hollings
1518d0c5fe
Merge pull request #370 from cdavis5e/shader-float16-int8
Support the VK_KHR_shader_float16_int8 extension.
2018-12-05 13:02:35 -05:00
Chip Davis
f4295ab3f1 Support the VK_KHR_shader_float16_int8 extension.
Only the `shaderFloat16` feature is supported for now. The `shaderInt8`
feature may require additional work on SPIRV-Cross.

Update Vulkan-Headers to 1.1.95 to pull in the definitions for this new
extension.
2018-12-05 10:32:30 -06:00
Bill Hollings
b01fff16fb
Merge pull request #369 from cdavis5e/8-bit-storage
Support the VK_KHR_8bit_storage extension.
2018-12-05 11:29:46 -05:00
Chip Davis
faa455cec6 Support the VK_KHR_8bit_storage extension.
This isn't part of Vulkan 1.1, but it will almost certainly be part of
Vulkan 1.2. (Or whatever the new version is.)
2018-12-05 09:50:32 -06:00
Bill Hollings
5a93d80de0
Merge pull request #367 from cdavis5e/16-bit-storage
Support the VK_KHR_16bit_storage extension.
2018-12-05 05:24:23 +01:00
Bill Hollings
b4a8f2672c
Merge pull request #364 from cdavis5e/force-signedness
Force signedness of shader vertex attributes to match the host.
2018-12-05 05:20:22 +01:00
Chip Davis
533e25c342 Add all the extensions I added over the past few months to the user guide.
Sort the list.
2018-12-04 15:55:18 -06:00
Bill Hollings
85ba42a0a7
Merge pull request #366 from cdavis5e/debug-dsym-file
In debug configurations, create a dSYM bundle for libMoltenVK.dylib.
2018-12-04 22:27:58 +01:00
Bill Hollings
23b3837d1e
Merge pull request #365 from cdavis5e/lock-set-texture
MVKImage: Take lock when setting the MTLTexture manually.
2018-12-04 22:26:51 +01:00
Bill Hollings
1aec2cf5e9
Merge pull request #363 from cdavis5e/2dms-array-image
Add support for 2D multisample array textures.
2018-12-04 22:11:05 +01:00
Chip Davis
9e1a466669 Support the VK_KHR_16bit_storage extension.
This extension allows shaders to use 16-bit types in buffers, push
constants, and shader inputs and outputs. One step closer to Vulkan 1.1.
2018-12-04 15:11:04 -06:00
Bill Hollings
44cf6c3bf1
Merge pull request #362 from cdavis5e/relaxed-block-layout
Advertise the VK_KHR_relaxed_block_layout extension.
2018-12-04 22:08:51 +01:00
Bill Hollings
1b99ba03ab
Merge pull request #361 from cdavis5e/khr-maintenance3
Support the VK_KHR_maintenance3 extension.
2018-12-04 22:07:16 +01:00
Bill Hollings
4d432249ea
Merge pull request #360 from cdavis5e/storage-buffer-stg-class
Advertise the VK_KHR_storage_buffer_storage_class extension.
2018-12-04 22:05:08 +01:00
Chip Davis
18fa43994f Force signedness of shader vertex attributes to match the host.
Based on a patch by Stefan Dösinger.

Metal cannot do signedness conversion on vertex attributes, and for good
reason. Putting a `uint4` into an `int4`, or a `char4` into a `uint4`,
would lose those values that are outside the range of the target type.
But putting a `uchar4` into a `short4` or an `int4`, or a `ushort4` into
an `int4`, should work. In that case, force the signedness in the shader
to match the declared type of the host.

Update SPIRV-Cross to pull in the corresponding change. Bump MoltenVK
version.
2018-12-04 15:04:10 -06:00
Chip Davis
3ac51e46bf In debug configurations, create a dSYM bundle for libMoltenVK.dylib. 2018-12-04 13:29:02 -06:00
Stefan Dösinger
fe09f01cbe MVKImage: Take lock when setting the MTLTexture manually. 2018-12-04 13:26:11 -06:00
Chip Davis
f9e78313ba Correct format types of 8/16-bit integer formats.
They were using `Int32`/`UInt32`, which is fine I guess, but wasteful in
the blit/clear shaders. This will be more important later, when I work
around a bug in Metal.
2018-12-04 13:17:27 -06:00
Chip Davis
374741a989 Add support for 2D multisample array textures.
Requires Metal 2.1 on Mac. Not supported at all on iOS.

I'm split as to whether or not to have
`mvkMTLTextureTypeFromVkImageType()` return
`MTLTextureType2DMultisampleArray`.
2018-12-04 13:13:49 -06:00
Chip Davis
2b929c36ae Advertise the VK_KHR_relaxed_block_layout extension.
The recent updates to SPIRV-Cross should enable us to support this.
2018-12-04 13:12:16 -06:00
Chip Davis
08f9da1157 Support the VK_KHR_maintenance3 extension.
This is necessary to support the `VK_EXT_descriptor_indexing` extension.
It's also one step closer to Vulkan 1.1.
2018-12-04 13:10:02 -06:00
Chip Davis
bdbe5c71f8 Advertise the VK_KHR_storage_buffer_storage_class extension.
SPIRV-Cross already handles this. This extension was promoted to core in
Vulkan 1.1, and is a requirement for multiple other extensions, some of
which were also promoted to core in 1.1.
2018-12-04 13:07:51 -06:00
Bill Hollings
cd2217d8eb
Merge pull request #354 from billhollings/master
Change internal use of <MoltenVK/hdr.h> to "hdr.h" to add header path flexibility.
2018-11-24 10:01:12 +01:00
Bill Hollings
2afbcbf0ce Merge branch 'master' of https://github.com/KhronosGroup/MoltenVK 2018-11-23 23:12:12 +01:00
Bill Hollings
d29a2a2401
Merge pull request #351 from danginsburg/parallel_fetch_dependencies
Parallel build for fetchDependencies to speed this up.
2018-11-23 23:10:34 +01:00
Bill Hollings
60b5a34faf Change internal use of <MoltenVK/hdr.h> to "hdr.h" to add header path flexibility.
API-Samples demo use headers from MoltenVK framework.
Cube demo remove reference to framework to include MoltenVK API headers.
2018-11-23 16:58:50 +01:00
Dan Ginsburg
c41301f323 Parallel build for fetchDependencies to speed this up. 2018-11-20 10:35:27 -05:00
Bill Hollings
2c3ba0a4ff
Merge pull request #349 from billhollings/master
Update glslang to version compatible with Vulkan SDK 1.1.92.
2018-11-15 19:38:18 -05:00
Bill Hollings
fa73cdb441 Update glslang to version compatible with Vulkan SDK 1.1.92. 2018-11-16 00:57:39 +01:00
Bill Hollings
e8f29ad1d2
Merge pull request #348 from billhollings/master
Align MoltenVK with Vulkan SDK 1.1.92
2018-11-15 17:17:55 -05:00
Bill Hollings
2f131a7a85 Ensure imageview & sampler descriptor bindings have empty sampler & imageview values,
respectively, to avoid error when releasing them on descriptor binding destruction.
2018-11-15 21:38:02 +01:00
Bill Hollings
d99984e064 Align MoltenVK with Vulkan SDK 1.1.92.
Update to latest dependency libraries for Vulkan SDK 1.1.92.
Generate Hologram demo dispatch files in fetchDependencies and remove them from git.
Update MoltenVK version to 1.0.27.
Update What's New document.
2018-11-15 17:40:15 +01:00
Bill Hollings
ac087a1e55 Remove MVKSignalable class as redundant to MVKRefCountedDeviceObject. 2018-11-13 20:27:30 +01:00
Bill Hollings
946cdd0d45
Merge pull request #329 from cdavis5e/destroyed-resource-descset
Remove destroyed resources from descriptor sets.
2018-11-09 10:27:49 -05:00
Bill Hollings
a55429db62
Merge pull request #343 from cdavis5e/compress-format-non-2d
Forbid compressed formats on non-2D images.
2018-11-09 09:54:37 -05:00
Chip Davis
97b3c568c1 Forbid compressed formats on non-2D images.
Also forbid them on multisampled images.
2018-11-08 15:32:52 -06:00
Chip Davis
154107a0dc Revert "Sink MVKRefCountedDeviceObject into MVKBaseDeviceObject."
This reverts commit b34cc2fa821e1ba9b2e13abf5bdc18b099ed4a83. Doing this
makes anything derived from `MVKBaseDeviceObject` non-copyable.
2018-11-07 15:45:15 -06:00
Chip Davis
b34cc2fa82 Sink MVKRefCountedDeviceObject into MVKBaseDeviceObject.
Now every non-dispatchable device-owned object can be reference-counted,
and thus live beyond destruction by the client.
2018-11-07 12:49:48 -06:00