645 Commits

Author SHA1 Message Date
Bill Hollings
91ed8ba4b0 Add verbose option to fetchDependencies and use it in Travis to avoid CI timeouts. 2018-12-24 22:15:23 -05:00
Bill Hollings
bdacc5392a Merge branch 'master' of https://github.com/KhronosGroup/MoltenVK 2018-12-24 19:18:01 -05:00
Bill Hollings
9b42574249 Build external dependencies into static libraries in External/build when fetched.
Add separate ExternalDependencies Xcode project.
Move external dependencies to ExternalDependencies project.
The fetchDependencies script builds external dependencies libraries into External/build.
The fetchDependencies script prepares SPIRV-Tools without preparing glslang.
MoltenVK links to pre-built external dependency static libraries.
MoltenVK includes external library headers using full relative paths.
2018-12-24 19:11:15 -05:00
Bill Hollings
8ad347d3f8
Merge pull request #424 from DiegoAce/master
Limit fetchDependencies Parallel Building to Number of Available Cores
2018-12-21 00:19:38 -05:00
DiegoAce
ea0bbe5780 Limit fetchDependencies Parallel Building to Number of Available Cores 2018-12-20 20:08:54 -06:00
Bill Hollings
a01b99514e
Merge pull request #420 from mlfarrell/bugfix/default-device-graphics-switching-macos
If user requests system default device curing vkCreateDevice, call …
2018-12-20 17:01:59 -05:00
Bill Hollings
0ac27b087e
Merge pull request #423 from cdavis5e/compressed-format-type
Use a specific format type for compressed formats.
2018-12-20 09:14:40 -05:00
Bill Hollings
e2bcd175bc
Merge pull request #422 from cdavis5e/aux-buffer-inline
Use an inline constant buffer for the auxiliary buffer.
2018-12-20 08:17:28 -05:00
Bill Hollings
b619951321
Merge pull request #421 from cdavis5e/print-vulkan-glsl
Enable Vulkan semantics when printing GLSL.
2018-12-20 08:09:51 -05:00
Bill Hollings
7152633db8
Merge pull request #412 from cdavis5e/forbid-uncompressed-views
MVKImage: Make BLOCK_TEXEL_VIEW a hard error.
2018-12-20 08:08:01 -05:00
Chip Davis
7c2ce795bb Use a specific format type for compressed formats.
Instead of assuming that `kMVKFormatNone` means the format is
compressed. This makes the code doing these checks more obvious and
self-documenting.

Since I changed the public MoltenVK-specific API, I also bumped the
`VK_MVK_moltenvk` spec revision.
2018-12-19 12:25:03 -07:00
Chip Davis
d973602edb Use an inline constant buffer for the auxiliary buffer.
Since a pipeline might be shared between multiple draws, but those draws
could use different textures, it isn't tenable to have a single aux
buffer shared between those draws. Instead, we'll set up constant
buffers using the `setXxxBytes()` method on the command encoder. That
way, separate draws using the same pipeline won't interfere with each
other.

This change also uses separate buffers for the vertex and fragment
shaders, since they may have different sets of textures.
2018-12-19 11:34:03 -07:00
Chip Davis
94fc4de563 Also claim the BLOCK_TEXEL_VIEW_COMPATIBLE bit is unsupported. 2018-12-19 11:32:25 -07:00
Chip Davis
4c9816d424 Enable Vulkan semantics when printing GLSL. 2018-12-19 11:29:38 -07:00
Bill Hollings
c3838c15de
Merge pull request #414 from cdavis5e/vertex-attr-offset-stride
MVKPipeline: Forbid vertex attribute offsets >= stride.
2018-12-19 12:23:56 -05:00
Bill Hollings
6aa4ddbffc
Merge pull request #413 from cdavis5e/immutable-sampler-lifetime
MVKDescriptorSet: Fix handling of immutable samplers.
2018-12-19 12:22:14 -05:00
Bill Hollings
4049518683
Merge pull request #411 from cdavis5e/copy-image-compat-format-2
vkCmdCopyImage: Cast source image to the destination format.
2018-12-19 12:05:10 -05:00
Bill Hollings
7b0630290f
Merge pull request #410 from cdavis5e/format-props-2-match-core
MVKDevice: Make result of extended getFormatProperties() match the core API.
2018-12-19 11:49:45 -05:00
Bill Hollings
f3fc725f38
Merge pull request #409 from cdavis5e/push-descriptor-uninit-ptr
vkCmdPushDescriptorSetWithTemplate: Initialize data pointer to null.
2018-12-19 11:41:38 -05:00
Mike Farrell
e658f9d1c4 - if user requests system default device curing vkCreateDevice, call required trigger method MTLCreateSystemDefaultDevice() to ensure proper graphics switching occurs on macos 2018-12-19 01:32:18 -08:00
Chip Davis
6ff8a46a3c Actually check the vertex binding I meant to check. 2018-12-17 11:05:37 -06:00
Chip Davis
288211d81f Fix handling of case where vertex bindings and binding indices don't match up. 2018-12-17 10:35:36 -06:00
Chip Davis
8e6b2e3e11 MVKPipeline: Forbid vertex attribute offsets >= stride.
Metal validates that this is so.
2018-12-17 09:36:45 -06:00
Chip Davis
972ba0e148 MVKDescriptorSet: Fix handling of immutable samplers.
Null the `sampler` field of the stored `VkDescriptorImageInfo` if the
descriptor uses an immutable sampler. That way, we won't try to
double-free a sampler.

Retain immutable samplers when the set is created. Release them when the
set is destroyed.
2018-12-17 09:32:55 -06:00
Chip Davis
9c9d23f621 MVKImage: Make BLOCK_TEXEL_VIEW a hard error.
As I feared. It's impossible to create an uncompressed view from a
compressed texture.
2018-12-17 09:32:11 -06:00
Chip Davis
79f0b175fc vkCmdCopyImage: Cast source image to the destination format.
In which I am proved wrong again. While Metal indeed won't assert if the
pixel formats don't match, the results of attempting such a copy are...
mixed, to say the least. Sometimes, nothing is copied at all. Other
times, pixels are copied in weird ways that don't seem to conform at all
to expectation. (This is most apparent in the output of the CTS's image
copying tests.) It's best, then, to ensure that the source and
destination have the same format.

Unfortunately, in the process of writing this, my fears regarding not
being able to make uncompressed views of compressed images were
confirmed. So we can't do this for compressed images.
2018-12-17 09:29:27 -06:00
Chip Davis
9f58016c35 MVKDevice: Make result of extended getFormatProperties() match the core API. 2018-12-17 09:25:31 -06:00
Chip Davis
2bfa7b47d6 vkCmdPushDescriptorSetWithTemplate: Initialize data pointer to null.
The command object assumes it is null if it hasn't been used yet. Let's
ensure this is so.
2018-12-17 09:23:46 -06:00
Bill Hollings
f3416e7806
Merge pull request #408 from billhollings/master
Update What's New document redux.
2018-12-15 16:53:43 -05:00
Bill Hollings
92c03d9dc6 Update What's New document redux. 2018-12-15 16:52:36 -05:00
Bill Hollings
34f524ee43
Merge pull request #407 from billhollings/master
Update What's New document.
2018-12-15 16:37:51 -05:00
Bill Hollings
b3fb1ecfdf Update What's New document. 2018-12-15 16:37:12 -05:00
Bill Hollings
d21f426fbd
Merge pull request #376 from aerofly/master
MVKVector and small bug fix
2018-12-15 14:37:15 -05:00
aerofly
c1347e6adf
Merge branch 'master' into master 2018-12-15 19:02:58 +01:00
aerofly
febeb9d738 Merge fork with master MoltenVK again 2018-12-15 18:59:58 +01:00
aerofly
ef21f2488a Merge fork with master MoltenVK again 2018-12-15 18:36:07 +01:00
aerofly
ffc74f3673
Update SPIRVToMSLConverter.cpp 2018-12-15 18:21:13 +01:00
Bill Hollings
19a83e32d3
Merge pull request #406 from billhollings/master
Add missing include MVKEnvironment.h to MVKImage.mm.
2018-12-15 10:28:11 -05:00
Bill Hollings
a9573782a1 Add missing include MVKEnvironment.h to MVKImage.mm. 2018-12-14 18:59:54 -05:00
Bill Hollings
ae5aa3b17c
Merge pull request #403 from cdavis5e/push-descriptor-2
vkCmdPushDescriptorSet: Fix mapping of binding numbers to descriptor layouts.
2018-12-14 18:26:51 -05:00
Chip Davis
b9fddfb1f8 vkCmdPushDescriptorSet: Fix mapping of binding numbers to descriptor layouts.
In the past, this function just used the passed-in binding number to
index into the array of bindings. When the binding numbers and the
indices of the array matched up, this worked really well.

When they didn't, it broke spectacularly.

So now we keep track of which binding numbers map to which elements in
the array. That way, we don't have to assume that the array indices and
the binding numbers will match up.
2018-12-14 16:10:37 -06:00
Bill Hollings
0ee58d2d42
Merge pull request #402 from cdavis5e/non-2d-depth
Forbid depth/stencil formats on anything but 2D images.
2018-12-14 14:29:05 -05:00
Bill Hollings
c6bf5c3b3a
Merge pull request #401 from cdavis5e/cmd-pool-transfer-image
MVKCommandPool: Destroy transfer images using the device.
2018-12-14 14:27:42 -05:00
Bill Hollings
afb5bd034b
Merge pull request #400 from cdavis5e/vertex-stride-mult-4
MVKPipeline: Reject non-multiple-of-4 vertex buffer strides.
2018-12-14 14:25:42 -05:00
Bill Hollings
6cae45aac8
Merge pull request #399 from billhollings/master
Cube demo on iOS support Portrait and Landscape device orientation.
2018-12-14 13:04:52 -05:00
Chip Davis
23ab87a1c8 Forbid depth/stencil formats on anything but 2D images. 2018-12-14 11:55:13 -06:00
Chip Davis
24fae026b9 MVKCommandPool: Destroy transfer images using the device.
Since we created them using the device. Otherwise, the device won't know
that it needs to stop tracking them for the purposes of generating
memory barriers.
2018-12-14 08:17:49 -06:00
Chip Davis
cb61882ed6 MVKPipeline: Reject non-multiple-of-4 vertex buffer strides.
Metal unfortunately insists on this, or it will assert.
2018-12-14 08:16:48 -06:00
aerofly
fba2eefa5e Modify MVKVector with feedback from cdavis5e 2018-12-14 14:19:30 +01:00
Bill Hollings
fc77281567 Merge branch 'master' of https://github.com/KhronosGroup/MoltenVK 2018-12-13 18:11:37 -05:00