451 Commits

Author SHA1 Message Date
Khronos Group Webmaster
562065becf
Create CODE_OF_CONDUCT.md 2018-10-10 16:04:15 -04:00
Bill Hollings
e651841e67
Merge pull request #300 from billhollings/master
Include struct size parameter in VK_MVK_moltenvk extension functions that pass structs that might change size across extension versions.
2018-10-09 16:14:55 -04:00
Bill Hollings
209ed01acc Update VulkanSamples to latest version, and update What's New document. 2018-10-09 15:18:48 -04:00
Bill Hollings
aad51f82f2 Merge branch 'master' of https://github.com/KhronosGroup/MoltenVK 2018-10-09 11:56:42 -04:00
Bill Hollings
2adc450c62 Include struct size parameter in VK_MVK_moltenvk extension functions
that pass structs that might change size across extension versions
2018-10-08 20:22:12 -04:00
Bill Hollings
4640d273af
Merge pull request #296 from cdavis5e/copy-image-compat-format
vkCmdCopyImage: Allow copies between compatible formats.
2018-10-03 13:14:35 -04:00
Chip Davis
b8202e7b65 Forbid copying between 3D texture and a 2D array texture.
Metal doesn't support that yet.
2018-10-03 11:24:49 -05:00
Bill Hollings
2204113b86
Merge pull request #295 from cdavis5e/blend-state-unused
MVKPipeline: Don't set blend state for unused attachments.
2018-10-03 12:00:07 -04:00
Bill Hollings
2444dfee37
Merge pull request #294 from cdavis5e/vertex-rgb10a2-unorm
Map VK_FORMAT_A2B10G10R10_UNORM_PACKED to an MTLVertexFormat.
2018-10-03 11:59:49 -04:00
Bill Hollings
b173ea5964
Merge pull request #293 from cdavis5e/linear-tiled-props
MVKDevice: Correct properties of linear-tiled images.
2018-10-03 10:50:11 -04:00
Bill Hollings
d0b111ef46
Merge pull request #292 from cdavis5e/dedicated-free
MVKDeviceMemory: Allow dedicated allocations to forget their resources.
2018-10-03 10:44:14 -04:00
Chip Davis
44c9aaa957 vkCmdCopyImage: Allow copies between compatible formats.
The docs for the `MTLBlitCommandEncoder`'s `copyFromTexture:...` method
state that the source and destination textures must have the same
format.

This was true when it was written in the iOS 8 timeframe for Metal 1.0.
But, I suspect it was changed in Metal 1.1 when support was added for
texture views of differing formats. Like with texture views, the two
formats now need only be compatible. This is the same behavior that
Vulkan prescribes.
2018-10-03 09:42:31 -05:00
Bill Hollings
f8c85b1850
Merge pull request #291 from cdavis5e/fix-vertex-divisor
MVKPipeline: Fix getting the vertex attribute divisor struct.
2018-10-03 10:41:45 -04:00
Chip Davis
a0a93e0cdb MVKPipeline: Don't set blend state for unused attachments.
Some clients always set blend state for all eight attachments, even if
the attachments are unused. Since the attachments are unused, the
expectation is that the corresponding blend states won't matter. But in
Metal, there's no way to tell if an attachment won't be used. So, if you
enable blending on an unused attachment, its pixel format will be
`MTLPixelFormatInvalid`, which doesn't support blending; Metal will
assert on this.
2018-10-03 09:39:42 -05:00
Chip Davis
0171fd46c5 Set the VERTEX_BUFFER feature bit on VK_FORMAT_A2B10G10R10_UNORM_PACK32.
Since we can use it in a vertex buffer now.
2018-10-03 09:37:31 -05:00
Bill Hollings
4fba647123 Optimize scheme configuration and make consistent. 2018-10-03 10:09:47 -04:00
Khronos Group Webmaster
625b33839a
Revert LICENSE to Apache 2.0 2018-10-03 10:06:43 -04:00
Chip Davis
230ec2569e Map VK_FORMAT_A2B10G10R10_UNORM_PACKED to an MTLVertexFormat.
Use `MTLVertexFormatUInt1010102Normalized`. This is the unsigned
equivalent to the signed `MTLVertexFormatInt1010102Normalized`, which we
already use for `VK_FORMAT_A2B10G10R10_SNORM_PACKED`.
2018-10-02 18:24:49 -05:00
Chip Davis
b86e6b2be3 MVKDevice: Correct properties of linear-tiled images.
According to the Vulkan spec, linear-tiled images *may* not be supported
unless certain restrictions are satisfied. That means that
implementations may support features--or restrictions--above and beyond
the restrictions given in the Vulkan spec.

Metal places these limitations on linear textures:
* They must be 2D.
* They may only have one mip level.
* They may only have one array layer.
* They may not be multisampled--sample count must be one.
* On macOS, they may not be used as attachments.
* They may not be depth/stencil textures.
* They may not have a compressed format.

Have `vkGetPhysicalDeviceFormatProperties()` and
`vkGetPhysicalDeviceImageFormatProperties()` return results consistent
with these constraints. Also, allow creation of linear textures with
usages other than `VK_IMAGE_USAGE_TRANSFER_{SRC,DST}_BIT`.
2018-10-02 18:14:33 -05:00
Chip Davis
6da32e55b0 MVKDeviceMemory: Allow dedicated allocations to forget their resources.
Otherwise, if the resource is destroyed first (which it almost always
will be), then when the `VkDeviceMemory` is freed, it will access a
freed resource, at which point it will then proceed to fandango on core.
2018-10-02 18:00:38 -05:00
Chip Davis
9490e96164 MVKPipeline: Fix getting the vertex attribute divisor struct.
Bah. I read the spec wrong. It's hung off the vertex input state, not
the top-level create info.
2018-10-02 18:00:13 -05:00
Bill Hollings
b296f51153 Fix descriptive comments in fetchDependencies script. 2018-10-02 15:14:33 -04:00
Bill Hollings
a3f571e89b Include version number in VK_MVK_moltenvk extension functions that pass structs that might change. 2018-10-02 12:48:51 -04:00
Bill Hollings
70dae8946a
Merge pull request #290 from billhollings/master
Allocate MVKDescriptorSets from a pool within MVKDescriptorPool.
2018-10-01 16:59:57 -04:00
Bill Hollings
05e028084b Update What's New document. 2018-10-01 16:32:50 -04:00
Bill Hollings
c933330406 Allocate MVKDescriptorSets from a pool within MVKDescriptorPool,
keyed by MVKDescriptorSetLayout reference.

Add MVKObjectPool subclass MVKDeviceObjectPool.
Enlarge window dimensions on macOS Cube demo.
2018-09-30 18:07:13 -04:00
Bill Hollings
26c7b69a3f
Merge pull request #288 from billhollings/master
Update glslang version and What's New document.
2018-09-27 22:36:08 -04:00
Bill Hollings
cded63b008 Merge branch 'master' of https://github.com/KhronosGroup/MoltenVK 2018-09-27 18:21:05 -04:00
Bill Hollings
9f28854a2a Update glslang version and What's New document. 2018-09-27 18:20:20 -04:00
Bill Hollings
dc0da2ceb6
Merge pull request #287 from cdavis5e/render-area
Use the passed render area to set the render target extent.
2018-09-27 18:17:25 -04:00
Chip Davis
6f1c97966c Use the passed render area to set the render target extent.
Use the smaller of the render area and the framebuffer area.
2018-09-27 16:29:37 -05:00
Bill Hollings
7ffc5bd806
Merge pull request #286 from cdavis5e/resource-array-dynamic-indexing
Support the shader{Sampled,Storage}ImageArrayDynamicIndexing feature.
2018-09-27 17:27:11 -04:00
Bill Hollings
dfcc815c82
Merge pull request #285 from cdavis5e/tsan-build
Build the dylib with -fsanitize=thread when tsan is enabled.
2018-09-27 17:25:50 -04:00
Khronos Group Webmaster
7953a73016
Update LICENSE
Change Apache 2.0 to Khronos Apache 2.0 CLA
2018-09-27 17:09:36 -04:00
Bill Hollings
8c58c0bf72
Merge pull request #284 from cdavis5e/no-attachments
Add a dummy attachment in case no attachments were specified.
2018-09-27 16:29:06 -04:00
Chip Davis
fcbbdc1948 Support the shader{Sampled,Storage}ImageArrayDynamicIndexing feature.
Update SPIRV-Cross to support dynamic indexing on iOS 10... and to
actually support arrays of input buffers (which should've been present
before I flipped the `shader{Uniform,Storage}BufferArrayDynamicIndexing`
switch).

Bump patch version.

Fixes #96.
2018-09-27 13:11:55 -05:00
Chip Davis
522793e680 Build the dylib with -fsanitize=thread when tsan is enabled. 2018-09-27 11:27:36 -05:00
Chip Davis
f9022614bb Add a dummy attachment in case no attachments were specified.
Metal currently requires at least one attachment, in order to define the
size of the render target area (and thus, how many times to run the
fragment shader). Vulkan, however, allows specifying no attachments. In
that case, the size of the render target area comes from the extent and
layer count of the framebuffer object. Since Metal doesn't let you (at
least on macOS) define the render target area without an attachment, we
have to supply a dummy attachment that will be discarded once rendering
is complete.

When possible, the render target uses the memoryless storage mode,
falling back to private when that isn't supported. It is marked as
volatile, and its load and store actions are set to "don't care." The
texture is retained for the lifetime of the subpass.
2018-09-26 21:00:07 -05:00
Bill Hollings
99a242e167 Allocate MVKCommandBuffers from a pool within MVKCommandPool.
Add support for trimming command pools.
2018-09-26 18:31:31 -04:00
Bill Hollings
4c5f7b8b0d
Merge pull request #281 from billhollings/master
Update What's New document.
2018-09-25 14:22:36 -04:00
Bill Hollings
dfa27ecc61 Update SPRIV-Cross version. 2018-09-25 13:47:43 -04:00
Bill Hollings
166ff6adf5 Update What's New document. 2018-09-25 13:09:36 -04:00
Bill Hollings
1f7bd607d1
Merge pull request #280 from cdavis5e/fix-dedicated-alloc-segfault
MVKResource: Check that a VkDeviceMemory is nonnull before using it.
2018-09-25 12:01:26 -04:00
Bill Hollings
c89d22fc31
Merge pull request #279 from cdavis5e/vertex-attribute-divisor
Support the VK_EXT_vertex_attribute_divisor extension.
2018-09-25 11:59:49 -04:00
Chip Davis
f1888dff95 MVKResource: Check that a VkDeviceMemory is nonnull before using it. 2018-09-25 10:21:08 -05:00
Chip Davis
d667f570f6 Support the VK_EXT_vertex_attribute_divisor extension. 2018-09-25 10:19:05 -05:00
Bill Hollings
1533fdda39
Merge pull request #278 from cdavis5e/fix-query-deadlock
MVKQueryPool: Shunt copying results off to another thread.
2018-09-25 10:56:29 -04:00
Bill Hollings
ec32a16971
Merge pull request #276 from cdavis5e/fence-sitter-race
MVKFenceSitter: Put a hash table read behind the lock.
2018-09-25 10:51:07 -04:00
Bill Hollings
873bceabe5
Merge pull request #275 from cdavis5e/3d-subviews
Better support subviews of 3D textures.
2018-09-25 10:48:11 -04:00
Bill Hollings
21cb79df09
Merge pull request #274 from cdavis5e/render-target-size
vkRenderPass: Set renderTargetWidth and renderTargetHeight when possible.
2018-09-25 10:47:48 -04:00