1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "WebGLExtensions.h"
8 #include "mozilla/dom/WebGLRenderingContextBinding.h"
9 #include "WebGLContext.h"
10 #include "WebGLFormats.h"
14 WebGLExtensionTextureFloatLinear::WebGLExtensionTextureFloatLinear(
16 : WebGLExtensionBase(webgl
) {
17 auto& fua
= webgl
->mFormatUsage
;
19 fua
->EditUsage(webgl::EffectiveFormat::RGBA32F
)->isFilterable
= true;
20 fua
->EditUsage(webgl::EffectiveFormat::RGB32F
)->isFilterable
= true;
22 if (webgl
->IsWebGL2()) {
23 fua
->EditUsage(webgl::EffectiveFormat::R32F
)->isFilterable
= true;
24 fua
->EditUsage(webgl::EffectiveFormat::RG32F
)->isFilterable
= true;
26 fua
->EditUsage(webgl::EffectiveFormat::Luminance32FAlpha32F
)->isFilterable
=
28 fua
->EditUsage(webgl::EffectiveFormat::Luminance32F
)->isFilterable
= true;
29 fua
->EditUsage(webgl::EffectiveFormat::Alpha32F
)->isFilterable
= true;
33 } // namespace mozilla