Merge pull request #1143 from cdavis5e/msl-interpolation-functions

MVKPhysicalDevice: Expose support for interpolation functions.
This commit is contained in:
Bill Hollings 2020-11-08 17:13:32 -05:00 committed by GitHub
commit d208f94788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -1 +1 @@
fc644b50e631ccd88c324793823ade040a80caf5
46bf1e99d6e7bbbee51f412e9a97b4ca6bc858b8

View File

@ -629,6 +629,7 @@ typedef struct {
uint32_t maxPerStageStorageTextureCount; /**< The total number of per-stage Metal textures with read-write access available for writing to from a shader. */
VkBool32 astcHDRTextures; /**< If true, ASTC HDR pixel formats are supported. */
VkBool32 renderLinearTextures; /**< If true, linear textures are renderable. */
VkBool32 pullModelInterpolation; /**< If true, explicit interpolation functions are supported. */
} MVKPhysicalDeviceMetalFeatures;
/** MoltenVK performance of a particular type of activity. */

View File

@ -221,7 +221,7 @@ void MVKPhysicalDevice::getFeatures(VkPhysicalDeviceFeatures2* features) {
portabilityFeatures->pointPolygons = false;
portabilityFeatures->samplerMipLodBias = false;
portabilityFeatures->separateStencilMaskRef = true;
portabilityFeatures->shaderSampleRateInterpolationFunctions = false;
portabilityFeatures->shaderSampleRateInterpolationFunctions = _metalFeatures.pullModelInterpolation;
portabilityFeatures->tessellationIsolines = false;
portabilityFeatures->tessellationPointMode = false;
portabilityFeatures->triangleFans = false;
@ -1379,6 +1379,10 @@ void MVKPhysicalDevice::initMetalFeatures() {
_metalFeatures.rasterOrderGroups = _mtlDevice.rasterOrderGroupsSupported;
}
if ( [_mtlDevice respondsToSelector: @selector(supportsPullModelInterpolation)] ) {
_metalFeatures.pullModelInterpolation = _mtlDevice.supportsPullModelInterpolation;
}
if ( [_mtlDevice respondsToSelector: @selector(maxBufferLength)] ) {
_metalFeatures.maxMTLBufferSize = _mtlDevice.maxBufferLength;
}