зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1491221 - Mark EXT_shader_texture_lod feature unsupported for OpenGL ES3 and above. r=jgilbert
MozReview-Commit-ID: G51cg7pqvBb Differential Revision: https://phabricator.services.mozilla.com/D6863 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
847b33d284
Коммит
23b34066f6
|
@ -184,7 +184,7 @@ WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const
|
||||||
case WebGLExtensionID::EXT_frag_depth:
|
case WebGLExtensionID::EXT_frag_depth:
|
||||||
return WebGLExtensionFragDepth::IsSupported(this);
|
return WebGLExtensionFragDepth::IsSupported(this);
|
||||||
case WebGLExtensionID::EXT_shader_texture_lod:
|
case WebGLExtensionID::EXT_shader_texture_lod:
|
||||||
return gl->IsSupported(gl::GLFeature::shader_texture_lod);
|
return WebGLExtensionShaderTextureLod::IsSupported(this);
|
||||||
case WebGLExtensionID::EXT_sRGB:
|
case WebGLExtensionID::EXT_sRGB:
|
||||||
return WebGLExtensionSRGB::IsSupported(this);
|
return WebGLExtensionSRGB::IsSupported(this);
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,25 @@ namespace mozilla {
|
||||||
WebGLExtensionShaderTextureLod::WebGLExtensionShaderTextureLod(WebGLContext* webgl)
|
WebGLExtensionShaderTextureLod::WebGLExtensionShaderTextureLod(WebGLContext* webgl)
|
||||||
: WebGLExtensionBase(webgl)
|
: WebGLExtensionBase(webgl)
|
||||||
{
|
{
|
||||||
|
MOZ_ASSERT(IsSupported(webgl), "Don't construct extension if unsupported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
WebGLExtensionShaderTextureLod::~WebGLExtensionShaderTextureLod()
|
WebGLExtensionShaderTextureLod::~WebGLExtensionShaderTextureLod()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
WebGLExtensionShaderTextureLod::IsSupported(const WebGLContext* webgl)
|
||||||
|
{
|
||||||
|
gl::GLContext* gl = webgl->GL();
|
||||||
|
if (gl->IsGLES() && gl->Version() >= 300) {
|
||||||
|
// ANGLE's shader translator doesn't yet translate
|
||||||
|
// WebGL1+EXT_shader_texture_lod to ES3. (Bug 1491221)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return gl->IsSupported(gl::GLFeature::shader_texture_lod);
|
||||||
|
}
|
||||||
|
|
||||||
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionShaderTextureLod, EXT_shader_texture_lod)
|
IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionShaderTextureLod, EXT_shader_texture_lod)
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -251,6 +251,8 @@ public:
|
||||||
explicit WebGLExtensionShaderTextureLod(WebGLContext*);
|
explicit WebGLExtensionShaderTextureLod(WebGLContext*);
|
||||||
virtual ~WebGLExtensionShaderTextureLod();
|
virtual ~WebGLExtensionShaderTextureLod();
|
||||||
|
|
||||||
|
static bool IsSupported(const WebGLContext* context);
|
||||||
|
|
||||||
DECL_WEBGL_EXTENSION_GOOP
|
DECL_WEBGL_EXTENSION_GOOP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче