Constant GPU_REQUEST_ADAPTER_MAC

Source
pub const GPU_REQUEST_ADAPTER_MAC: &str = r#"(()=>{const def=(o,m)=>Object.defineProperties(o,Object.fromEntries(Object.entries(m).map(([k,v])=>[k,{value:v,enumerable:true,configurable:true}]))),orig=navigator.gpu.requestAdapter.bind(navigator.gpu),M={maxTextureDimension1D:16384,maxTextureDimension2D:16384,maxTextureDimension3D:2048,maxTextureArrayLayers:2048,maxBindGroups:4,maxBindGroupsPlusVertexBuffers:24,maxBindingsPerBindGroup:1000,maxDynamicUniformBuffersPerPipelineLayout:10,maxDynamicStorageBuffersPerPipelineLayout:8,maxSampledTexturesPerShaderStage:16,maxSamplersPerShaderStage:16,maxStorageBuffersPerShaderStage:10,maxStorageTexturesPerShaderStage:8,maxUniformBuffersPerShaderStage:12,maxUniformBufferBindingSize:65536,maxStorageBufferBindingSize:4294967292,minUniformBufferOffsetAlignment:256,minStorageBufferOffsetAlignment:256,maxVertexBuffers:8,maxBufferSize:4294967296,maxVertexAttributes:30,maxVertexBufferArrayStride:2048,maxInterStageShaderVariables:28,maxColorAttachments:8,maxColorAttachmentBytesPerSample:128,maxComputeWorkgroupStorageSize:32768,maxComputeInvocationsPerWorkgroup:1024,maxComputeWorkgroupSizeX:1024,maxComputeWorkgroupSizeY:1024,maxComputeWorkgroupSizeZ:64,maxComputeWorkgroupsPerDimension:65535};navigator.gpu.requestAdapter=async opts=>{const a=await orig(opts),lim=a.limits;def(a.info,{vendor:'apple',architecture:'metal-3',device:'',description:''});for(const k of Object.getOwnPropertyNames(lim))if(!(k in M))delete lim[k];def(lim,M);return a};})();"#;