File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 614
614
portabilityFeatures->multisampleArrayImage = _metalFeatures.multisampleArrayTextures ;
615
615
portabilityFeatures->mutableComparisonSamplers = _metalFeatures.depthSampleCompare ;
616
616
portabilityFeatures->pointPolygons = false ;
617
+ #if MVK_XCODE_26
618
+ portabilityFeatures->samplerMipLodBias = true ;
619
+ #else
617
620
portabilityFeatures->samplerMipLodBias = getMVKConfig ().useMetalPrivateAPI ;
621
+ #endif
618
622
portabilityFeatures->separateStencilMaskRef = true ;
619
623
portabilityFeatures->shaderSampleRateInterpolationFunctions = _metalFeatures.pullModelInterpolation ;
620
624
portabilityFeatures->tessellationIsolines = false ;
3185
3189
3186
3190
_properties.limits .maxImageDimension3D = _metalFeatures.maxTextureLayers ;
3187
3191
_properties.limits .maxImageArrayLayers = _metalFeatures.maxTextureLayers ;
3188
- // Max sum of API and shader values. Bias not publicly supported in API, but can be applied in the shader directly.
3189
- // The lack of API value is covered by VkPhysicalDevicePortabilitySubsetFeaturesKHR::samplerMipLodBias.
3190
- // Metal does not specify a limit for the shader value, so choose something reasonable.
3191
- _properties.limits .maxSamplerLodBias = 16 ;
3192
+ _properties.limits .maxSamplerLodBias = 15.999 ;
3192
3193
_properties.limits .maxSamplerAnisotropy = 16 ;
3193
3194
3194
3195
_properties.limits .maxVertexInputAttributes = 31 ;
Original file line number Diff line number Diff line change @@ -2535,7 +2535,9 @@ static MSLSamplerYCbCrRange getSpvSamplerYcbcrRangeFromVkSamplerYcbcrRange(VkSam
2535
2535
mtlSampDesc.mipFilter = (pCreateInfo->unnormalizedCoordinates
2536
2536
? MTLSamplerMipFilterNotMipmapped
2537
2537
: mvkMTLSamplerMipFilterFromVkSamplerMipmapMode (pCreateInfo->mipmapMode ));
2538
- #if MVK_USE_METAL_PRIVATE_API
2538
+ #if MVK_XCODE_26
2539
+ mtlSampDesc.lodBiasMVK = pCreateInfo->mipLodBias ;
2540
+ #elif MVK_USE_METAL_PRIVATE_API
2539
2541
if (getMVKConfig ().useMetalPrivateAPI ) {
2540
2542
mtlSampDesc.lodBiasMVK = pCreateInfo->mipLodBias ;
2541
2543
}
Original file line number Diff line number Diff line change 21
21
#include " MVKCommonEnvironment.h"
22
22
23
23
24
- #if MVK_USE_METAL_PRIVATE_API
24
+ #if MVK_USE_METAL_PRIVATE_API && !MVK_XCODE_26
25
25
/* * Additional methods not necessarily declared in <Metal/MTLSampler.h>. */
26
26
@interface MTLSamplerDescriptor ()
27
27
@@ -55,14 +55,14 @@ -(void) setBorderColorMVK: (NSUInteger) color {
55
55
}
56
56
57
57
-(float ) lodBiasMVK {
58
- #if MVK_USE_METAL_PRIVATE_API
58
+ #if MVK_USE_METAL_PRIVATE_API || MVK_XCODE_26
59
59
if ( [self respondsToSelector: @selector (lodBias )] ) { return self.lodBias ; }
60
60
#endif
61
61
return 0 .0f ;
62
62
}
63
63
64
64
-(void ) setLodBiasMVK : (float ) bias {
65
- #if MVK_USE_METAL_PRIVATE_API
65
+ #if MVK_USE_METAL_PRIVATE_API || MVK_XCODE_26
66
66
if ( [self respondsToSelector: @selector (setLodBias: )] ) { self.lodBias = bias; }
67
67
#endif
68
68
}
You can’t perform that action at this time.
0 commit comments