679 Commits

Author SHA1 Message Date
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
Bill Hollings
4b66a6ca24 Cube demo on iOS support Portrait and Landscape device orientation. 2018-12-13 18:10:56 -05:00
Bill Hollings
b4b2ca6b45
Merge pull request #397 from cdavis5e/sampler-border-colors
MVKSampler: Support border colors.
2018-12-13 15:31:43 -05:00
Bill Hollings
bc30eae4eb
Merge pull request #396 from cdavis5e/aux-buffer-offsets
MVKPipeline: Set auxiliary buffer offsets once, on layout creation.
2018-12-13 15:31:11 -05:00
Chip Davis
cef610ee14 MVKSampler: Support border colors.
In Metal 1.2 on Mac, the `MTLSamplerAddressModeClampToBorderColor`
address mode was added. This mode actually lets clients specify the
border color, instead of hardcoding it to black (opaque without alpha,
transparent with alpha). Use this new mode instead of
`MTLSamplerAddressModeClampToZero` when possible.
2018-12-12 14:03:47 -06:00
aerofly
6aad9dc0ba fix conflicts 2018-12-12 20:57:11 +01:00
Chip Davis
6f4c3d639f MVKPipeline: Set auxiliary buffer offsets once, on layout creation.
This avoids extra work. It also avoids a race condition flagged by tsan.
2018-12-12 13:44:58 -06:00
Bill Hollings
b8da89ac1e
Merge pull request #395 from billhollings/master
vkCmdClearAttachments apply [[render_target_array_index]] more carefully.
2018-12-12 14:41:41 -05:00
aerofly
2b19954d11
Merge branch 'master' into master 2018-12-12 20:11:18 +01:00
aerofly
5811ae5811 fix conflicts 2018-12-12 20:09:24 +01:00
Bill Hollings
f1af7a4a2e vkCmdClearAttachments apply [[render_target_array_index]] only if not multisampling,
or multisampling texture arrays are supported.
2018-12-12 11:43:50 -05:00
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
Bill Hollings
da598c0061
Merge pull request #392 from billhollings/master
MSL don't emit memory_scope after MSL 2.0.
2018-12-12 08:33:41 -05:00
Bill Hollings
b804fd536c
Merge pull request #391 from cdavis5e/format-features
Add new formats and fix existing ones
2018-12-12 08:33:12 -05:00
Bill Hollings
8051a36016
Merge pull request #390 from cdavis5e/pow2-image-align
MVKImage: Round up byte alignment to the nearest power of 2.
2018-12-12 08:32:02 -05:00