Backed out changeset 8609f288794c (bug 1885032) for causing mochitest failures @ test_2_conformance__extensions__ext-depth-clamp.html CLOSED TREE

This commit is contained in:
Sandor Molnar 2024-07-04 21:46:19 +03:00
Родитель 61f4c43ba6
Коммит ec6b342b5a
13 изменённых файлов: 7 добавлений и 64 удалений

Просмотреть файл

@ -1155,11 +1155,6 @@ DOMInterfaces = {
'headerFile': 'ClientWebGLExtensions.h'
},
'EXT_depth_clamp': {
'nativeType': 'mozilla::ClientWebGLExtensionDepthClamp',
'headerFile': 'ClientWebGLExtensions.h'
},
'EXT_disjoint_timer_query': {
'nativeType': 'mozilla::ClientWebGLExtensionDisjointTimerQuery',
'headerFile': 'ClientWebGLExtensions.h'

Просмотреть файл

@ -57,21 +57,6 @@ DEFINE_WEBGL_EXTENSION_GOOP(WEBGL_provoking_vertex,
// --------------
JSObject* ClientWebGLExtensionDepthClamp::WrapObject(
JSContext* cx, JS::Handle<JSObject*> givenProto) {
return dom::EXT_depth_clamp_Binding::Wrap(cx, this, givenProto);
}
ClientWebGLExtensionDepthClamp::ClientWebGLExtensionDepthClamp(
ClientWebGLContext& webgl)
: ClientWebGLExtensionBase(webgl) {
auto& state = webgl.State();
// Add slot for new key:
(*state.mIsEnabledMap)[LOCAL_GL_DEPTH_CLAMP] = false;
}
// --------------
JSObject* ClientWebGLExtensionDisjointTimerQuery::WrapObject(
JSContext* cx, JS::Handle<JSObject*> givenProto) {
return dom::EXT_disjoint_timer_query_Binding::Wrap(cx, this, givenProto);

Просмотреть файл

@ -105,8 +105,6 @@ class ClientWebGLExtensionDebugShaders : public ClientWebGLExtensionBase {
}
};
DECLARE_SIMPLE_WEBGL_EXTENSION(WebGLExtensionDepthClamp)
DECLARE_SIMPLE_WEBGL_EXTENSION(WebGLExtensionDepthTexture)
DECLARE_SIMPLE_WEBGL_EXTENSION(WebGLExtensionElementIndexUint)

Просмотреть файл

@ -702,13 +702,6 @@ void WebGLContext::FinishInit() {
mScissorRect = {0, 0, size.width, size.height};
mScissorRect.Apply(*gl);
{
const auto& isEnabledMap = webgl::MakeIsEnabledMap(IsWebGL2());
for (const auto& pair : isEnabledMap) {
mIsEnabledMapKeys.insert(pair.first);
}
}
//////
// Check everything

Просмотреть файл

@ -1228,8 +1228,6 @@ class WebGLContext : public VRefCounted, public SupportsWeakPtr {
std::bitset<webgl::kMaxDrawBuffers> mColorWriteMaskNonzero = -1;
std::bitset<webgl::kMaxDrawBuffers> mBlendEnabled = 0;
std::unordered_set<GLenum> mIsEnabledMapKeys;
GLint mViewportX = 0;
GLint mViewportY = 0;
GLsizei mViewportWidth = 0;

Просмотреть файл

@ -26,7 +26,6 @@ const char* GetExtensionName(const WebGLExtensionID ext) {
WEBGL_EXTENSION_IDENTIFIER(EXT_blend_minmax)
WEBGL_EXTENSION_IDENTIFIER(EXT_color_buffer_float)
WEBGL_EXTENSION_IDENTIFIER(EXT_color_buffer_half_float)
WEBGL_EXTENSION_IDENTIFIER(EXT_depth_clamp)
WEBGL_EXTENSION_IDENTIFIER(EXT_disjoint_timer_query)
WEBGL_EXTENSION_IDENTIFIER(EXT_float_blend)
WEBGL_EXTENSION_IDENTIFIER(EXT_frag_depth)
@ -138,8 +137,6 @@ RefPtr<ClientWebGLExtensionBase> ClientWebGLContext::GetExtension(
return new ClientWebGLExtensionEXTColorBufferFloat(*this);
case WebGLExtensionID::EXT_color_buffer_half_float:
return new ClientWebGLExtensionColorBufferHalfFloat(*this);
case WebGLExtensionID::EXT_depth_clamp:
return new ClientWebGLExtensionDepthClamp(*this);
case WebGLExtensionID::EXT_disjoint_timer_query:
return new ClientWebGLExtensionDisjointTimerQuery(*this);
case WebGLExtensionID::EXT_float_blend:
@ -261,9 +258,6 @@ bool WebGLContext::IsExtensionSupported(WebGLExtensionID ext) const {
case WebGLExtensionID::EXT_color_buffer_half_float:
return WebGLExtensionColorBufferHalfFloat::IsSupported(this);
case WebGLExtensionID::EXT_depth_clamp:
return gl->IsSupported(gl::GLFeature::depth_clamp);
case WebGLExtensionID::EXT_disjoint_timer_query:
return WebGLExtensionDisjointTimerQuery::IsSupported(this);
@ -420,9 +414,6 @@ void WebGLContext::RequestExtension(const WebGLExtensionID ext,
case WebGLExtensionID::EXT_color_buffer_half_float:
slot.reset(new WebGLExtensionColorBufferHalfFloat(this));
break;
case WebGLExtensionID::EXT_depth_clamp:
slot.reset(new WebGLExtensionDepthClamp(this));
break;
case WebGLExtensionID::EXT_disjoint_timer_query:
slot.reset(new WebGLExtensionDisjointTimerQuery(this));
break;

Просмотреть файл

@ -27,7 +27,13 @@ void WebGLContext::SetEnabled(const GLenum cap, const Maybe<GLuint> i,
const FuncScope funcScope(*this, "enable(i)/disable(i)");
if (IsContextLost()) return;
if (!mIsEnabledMapKeys.count(cap)) {
static const auto webgl1Map = webgl::MakeIsEnabledMap(false);
static const auto webgl2Map = webgl::MakeIsEnabledMap(true);
const auto* map = &webgl2Map;
if (!IsWebGL2()) {
map = &webgl1Map;
}
if (!MaybeFind(*map, cap)) {
MOZ_ASSERT(false, "Bad cap.");
return;
}

Просмотреть файл

@ -118,12 +118,6 @@ class WebGLExtensionDebugShaders : public WebGLExtensionBase {
: WebGLExtensionBase(webgl) {}
};
class WebGLExtensionDepthClamp : public WebGLExtensionBase {
public:
explicit WebGLExtensionDepthClamp(WebGLContext* webgl)
: WebGLExtensionBase(webgl) {}
};
class WebGLExtensionDepthTexture : public WebGLExtensionBase {
public:
explicit WebGLExtensionDepthTexture(WebGLContext*);

Просмотреть файл

@ -215,7 +215,6 @@ enum class WebGLExtensionID : uint8_t {
EXT_blend_minmax,
EXT_color_buffer_float,
EXT_color_buffer_half_float,
EXT_depth_clamp,
EXT_disjoint_timer_query,
EXT_float_blend,
EXT_frag_depth,

Просмотреть файл

@ -1232,11 +1232,6 @@ interface WEBGL_provoking_vertex {
undefined provokingVertexWEBGL(GLenum provokeMode);
};
[Exposed=(Window,Worker), LegacyNoInterfaceObject]
interface EXT_depth_clamp {
const GLenum DEPTH_CLAMP_EXT = 0x864F;
};
// https://immersive-web.github.io/webxr/#dom-webglcontextattributes-xrcompatible
partial dictionary WebGLContextAttributes {
[Pref="dom.vr.webxr.enabled"]

Просмотреть файл

@ -102,7 +102,6 @@ static const char* const sExtensionNames[] = {
"GL_ARB_color_buffer_float",
"GL_ARB_compatibility",
"GL_ARB_copy_buffer",
"GL_ARB_depth_clamp",
"GL_ARB_depth_texture",
"GL_ARB_draw_buffers",
"GL_ARB_draw_instanced",
@ -143,7 +142,6 @@ static const char* const sExtensionNames[] = {
"GL_EXT_color_buffer_float",
"GL_EXT_color_buffer_half_float",
"GL_EXT_copy_texture",
"GL_EXT_depth_clamp",
"GL_EXT_disjoint_timer_query",
"GL_EXT_draw_buffers",
"GL_EXT_draw_buffers2",

Просмотреть файл

@ -83,7 +83,6 @@ enum class GLFeature {
blend_minmax,
clear_buffers,
copy_buffer,
depth_clamp,
depth_texture,
draw_buffers,
draw_buffers_indexed,
@ -381,7 +380,6 @@ class GLContext : public GenericAtomicRefCounted, public SupportsWeakPtr {
ARB_color_buffer_float,
ARB_compatibility,
ARB_copy_buffer,
ARB_depth_clamp,
ARB_depth_texture,
ARB_draw_buffers,
ARB_draw_instanced,
@ -422,7 +420,6 @@ class GLContext : public GenericAtomicRefCounted, public SupportsWeakPtr {
EXT_color_buffer_float,
EXT_color_buffer_half_float,
EXT_copy_texture,
EXT_depth_clamp,
EXT_disjoint_timer_query,
EXT_draw_buffers,
EXT_draw_buffers2,

Просмотреть файл

@ -90,12 +90,6 @@ static const FeatureInfo sFeatureInfoArr[] = {
GLESVersion::ES3,
GLContext::ARB_copy_buffer,
{GLContext::Extensions_End}},
{"depth_clamp",
GLVersion::GL3_2,
GLESVersion::NONE,
GLContext::Extension_None,
{GLContext::ARB_depth_clamp, GLContext::EXT_depth_clamp,
GLContext::Extensions_End}},
{"depth_texture",
GLVersion::GL2,
GLESVersion::ES3,