/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef GPU_SupportedLimits_H_ #define GPU_SupportedLimits_H_ #include "nsWrapperCache.h" #include "ObjectModel.h" namespace mozilla::webgpu { namespace ffi { struct WGPULimits; } class Adapter; class SupportedLimits final : public nsWrapperCache, public ChildOf { const UniquePtr mLimits; public: GPU_DECL_CYCLE_COLLECTION(SupportedLimits) GPU_DECL_JS_WRAP(SupportedLimits) uint32_t MaxTextureDimension1D() const; uint32_t MaxTextureDimension2D() const; uint32_t MaxTextureDimension3D() const; uint32_t MaxTextureArrayLayers() const; uint32_t MaxBindGroups() const; uint32_t MaxDynamicUniformBuffersPerPipelineLayout() const; uint32_t MaxDynamicStorageBuffersPerPipelineLayout() const; uint32_t MaxSampledTexturesPerShaderStage() const; uint32_t MaxSamplersPerShaderStage() const; uint32_t MaxStorageBuffersPerShaderStage() const; uint32_t MaxStorageTexturesPerShaderStage() const; uint32_t MaxUniformBuffersPerShaderStage() const; uint32_t MaxUniformBufferBindingSize() const; uint32_t MaxStorageBufferBindingSize() const; uint32_t MinUniformBufferOffsetAlignment() const; uint32_t MinStorageBufferOffsetAlignment() const; uint32_t MaxVertexBuffers() const; uint32_t MaxVertexAttributes() const; uint32_t MaxVertexBufferArrayStride() const; uint32_t MaxInterStageShaderComponents() const; uint32_t MaxComputeWorkgroupStorageSize() const; uint32_t MaxComputeInvocationsPerWorkgroup() const; uint32_t MaxComputeWorkgroupSizeX() const; uint32_t MaxComputeWorkgroupSizeY() const; uint32_t MaxComputeWorkgroupSizeZ() const; uint32_t MaxComputeWorkgroupsPerDimension() const; SupportedLimits(Adapter* const aParent, UniquePtr&& aLimits); private: ~SupportedLimits(); void Cleanup() {} }; } // namespace mozilla::webgpu #endif // GPU_SupportedLimits_H_