Merge pull request #1217 from billhollings/shaderInt64
Advertise support for shaderInt64 feature.
This commit is contained in:
commit
6c74fbf1b5
@ -18,6 +18,7 @@ MoltenVK 1.1.2
|
|||||||
|
|
||||||
Released TBD
|
Released TBD
|
||||||
|
|
||||||
|
- Advertise support for `shaderInt64` feature.
|
||||||
- Support fast math on MSL compiler via `MVKConfiguration::fastMathEnabled` configuration
|
- Support fast math on MSL compiler via `MVKConfiguration::fastMathEnabled` configuration
|
||||||
setting and `MVK_CONFIG_FAST_MATH_ENABLED` environment variable (both disabled by default).
|
setting and `MVK_CONFIG_FAST_MATH_ENABLED` environment variable (both disabled by default).
|
||||||
- Support _GitHub Actions_ for CI builds on pull requests.
|
- Support _GitHub Actions_ for CI builds on pull requests.
|
||||||
|
@ -322,6 +322,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns whether the MSL version is supported on this device. */
|
||||||
|
inline bool mslVersionIsAtLeast(MTLLanguageVersion minVer) { return _metalFeatures.mslVersionEnum >= minVer; }
|
||||||
|
|
||||||
|
|
||||||
#pragma mark Construction
|
#pragma mark Construction
|
||||||
|
|
||||||
/** Constructs an instance wrapping the specified Vulkan instance and Metal device. */
|
/** Constructs an instance wrapping the specified Vulkan instance and Metal device. */
|
||||||
|
@ -1587,6 +1587,7 @@ void MVKPhysicalDevice::initFeatures() {
|
|||||||
#if MVK_TVOS
|
#if MVK_TVOS
|
||||||
_features.textureCompressionETC2 = true;
|
_features.textureCompressionETC2 = true;
|
||||||
_features.textureCompressionASTC_LDR = true;
|
_features.textureCompressionASTC_LDR = true;
|
||||||
|
_features.shaderInt64 = mslVersionIsAtLeast(MTLLanguageVersion2_3) && supportsMTLGPUFamily(Apple3);
|
||||||
|
|
||||||
if (supportsMTLFeatureSet(tvOS_GPUFamily1_v3)) {
|
if (supportsMTLFeatureSet(tvOS_GPUFamily1_v3)) {
|
||||||
_features.dualSrcBlend = true;
|
_features.dualSrcBlend = true;
|
||||||
@ -1603,6 +1604,7 @@ void MVKPhysicalDevice::initFeatures() {
|
|||||||
|
|
||||||
#if MVK_IOS
|
#if MVK_IOS
|
||||||
_features.textureCompressionETC2 = true;
|
_features.textureCompressionETC2 = true;
|
||||||
|
_features.shaderInt64 = mslVersionIsAtLeast(MTLLanguageVersion2_3) && supportsMTLGPUFamily(Apple3);
|
||||||
|
|
||||||
if (supportsMTLFeatureSet(iOS_GPUFamily2_v1)) {
|
if (supportsMTLFeatureSet(iOS_GPUFamily2_v1)) {
|
||||||
_features.textureCompressionASTC_LDR = true;
|
_features.textureCompressionASTC_LDR = true;
|
||||||
@ -1645,6 +1647,7 @@ void MVKPhysicalDevice::initFeatures() {
|
|||||||
_features.depthClamp = true;
|
_features.depthClamp = true;
|
||||||
_features.vertexPipelineStoresAndAtomics = true;
|
_features.vertexPipelineStoresAndAtomics = true;
|
||||||
_features.fragmentStoresAndAtomics = true;
|
_features.fragmentStoresAndAtomics = true;
|
||||||
|
_features.shaderInt64 = mslVersionIsAtLeast(MTLLanguageVersion2_3);
|
||||||
|
|
||||||
_features.shaderStorageImageArrayDynamicIndexing = _metalFeatures.arrayOfTextures;
|
_features.shaderStorageImageArrayDynamicIndexing = _metalFeatures.arrayOfTextures;
|
||||||
|
|
||||||
@ -1719,7 +1722,7 @@ void MVKPhysicalDevice::initFeatures() {
|
|||||||
// VkBool32 shaderClipDistance; // done
|
// VkBool32 shaderClipDistance; // done
|
||||||
// VkBool32 shaderCullDistance;
|
// VkBool32 shaderCullDistance;
|
||||||
// VkBool32 shaderFloat64;
|
// VkBool32 shaderFloat64;
|
||||||
// VkBool32 shaderInt64;
|
// VkBool32 shaderInt64; // done
|
||||||
// VkBool32 shaderInt16; // done
|
// VkBool32 shaderInt16; // done
|
||||||
// VkBool32 shaderResourceResidency;
|
// VkBool32 shaderResourceResidency;
|
||||||
// VkBool32 shaderResourceMinLod; // done
|
// VkBool32 shaderResourceMinLod; // done
|
||||||
|
@ -71,7 +71,11 @@ bool mvk::compile(const string& mslSourceCode,
|
|||||||
#define mslVer(MJ, MN, PT) mslVersionMajor == MJ && mslVersionMinor == MN && mslVersionPoint == PT
|
#define mslVer(MJ, MN, PT) mslVersionMajor == MJ && mslVersionMinor == MN && mslVersionPoint == PT
|
||||||
|
|
||||||
MTLLanguageVersion mslVerEnum = (MTLLanguageVersion)0;
|
MTLLanguageVersion mslVerEnum = (MTLLanguageVersion)0;
|
||||||
if (mslVer(2, 1, 0)) {
|
if (mslVer(2, 3, 0)) {
|
||||||
|
mslVerEnum = MTLLanguageVersion2_3;
|
||||||
|
} else if (mslVer(2, 2, 0)) {
|
||||||
|
mslVerEnum = MTLLanguageVersion2_2;
|
||||||
|
} else if (mslVer(2, 1, 0)) {
|
||||||
mslVerEnum = MTLLanguageVersion2_1;
|
mslVerEnum = MTLLanguageVersion2_1;
|
||||||
} else if (mslVer(2, 0, 0)) {
|
} else if (mslVer(2, 0, 0)) {
|
||||||
mslVerEnum = MTLLanguageVersion2_0;
|
mslVerEnum = MTLLanguageVersion2_0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user