MVKPhysicalDevice: Expose support for interpolation functions.
This is now supported in MSL 2.3. Support varies by device; devices that support this return `YES` from `supportsPullModelInterpolation`. Based on my testing, AMD devices do not yet support this, and Intel devices do. Apple GPUs probably also support this, in order to support OpenGL on top. Update SPIRV-Cross to pull in the changes needed for this.
This commit is contained in:
parent
c593983ae0
commit
e6d1f3cc67
@ -1 +1 @@
|
||||
fc644b50e631ccd88c324793823ade040a80caf5
|
||||
46bf1e99d6e7bbbee51f412e9a97b4ca6bc858b8
|
||||
|
@ -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. */
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user