зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1477817 - Add test_has_rbab to guarantee we can skip index validation where available. - r=kvark,qdot
This commit is contained in:
Родитель
6a1d75ae7a
Коммит
ccc6711643
|
@ -297,6 +297,7 @@ class WebGLContext
|
|||
friend class WebGLExtensionDisjointTimerQuery;
|
||||
friend class WebGLExtensionDrawBuffers;
|
||||
friend class WebGLExtensionLoseContext;
|
||||
friend class WebGLExtensionMOZDebug;
|
||||
friend class WebGLExtensionVertexArray;
|
||||
friend class WebGLMemoryTracker;
|
||||
friend class webgl::AvailabilityRunnable;
|
||||
|
|
|
@ -59,7 +59,7 @@ WebGLExtensionMOZDebug::GetParameter(JSContext* cx, GLenum pname,
|
|||
return;
|
||||
}
|
||||
|
||||
case 0x10000: // "WSI_INFO"
|
||||
case dom::MOZ_debug_Binding::WSI_INFO:
|
||||
{
|
||||
nsCString info;
|
||||
gl->GetWSIInfo(&info);
|
||||
|
@ -67,6 +67,10 @@ WebGLExtensionMOZDebug::GetParameter(JSContext* cx, GLenum pname,
|
|||
return;
|
||||
}
|
||||
|
||||
case dom::MOZ_debug_Binding::DOES_INDEX_VALIDATION:
|
||||
retval.set(JS::BooleanValue(mContext->mNeedsIndexValidation));
|
||||
return;
|
||||
|
||||
default:
|
||||
mContext->ErrorInvalidEnumArg("MOZ_debug.getParameter", "pname", pname);
|
||||
retval.set(JS::NullValue());
|
||||
|
|
|
@ -66,6 +66,8 @@ support-files = ../captureStream_common.js
|
|||
[test_draw.html]
|
||||
[test_fb_param.html]
|
||||
[test_fb_param_crash.html]
|
||||
[test_has_rbab.html]
|
||||
fail-if = (os == 'linux') || (os == 'mac')
|
||||
[test_hidden_alpha.html]
|
||||
[test_hidden_depth_stencil.html]
|
||||
[test_implicit_color_buffer_float.html]
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Fail without robust_buffer_access_behavior</title>
|
||||
<script src='/tests/SimpleTest/SimpleTest.js'></script>
|
||||
<link rel='stylesheet' href='/tests/SimpleTest/test.css'>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
function AssertRBAB() {
|
||||
const c = document.createElement('canvas');
|
||||
const g = c.getContext('webgl');
|
||||
const e = g.getExtension('MOZ_debug');
|
||||
ok(e, 'Should have MOZ_debug.');
|
||||
|
||||
const does_index_validation = e.getParameter(e.DOES_INDEX_VALIDATION);
|
||||
ok(!does_index_validation,
|
||||
"Should have RBAB. Mark this test as failing on platforms that can't support it.");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
// -
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
const prefPairList = [
|
||||
['webgl.force-enabled', true],
|
||||
['webgl.enable-privileged-extensions', true],
|
||||
];
|
||||
const prefEnv = {'set': prefPairList};
|
||||
SpecialPowers.pushPrefEnv(prefEnv, AssertRBAB);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1101,8 +1101,10 @@ interface EXT_disjoint_timer_query {
|
|||
[NoInterfaceObject]
|
||||
interface MOZ_debug {
|
||||
const GLenum EXTENSIONS = 0x1F03;
|
||||
|
||||
const GLenum WSI_INFO = 0x10000;
|
||||
const GLenum UNPACK_REQUIRE_FASTPATH = 0x10001;
|
||||
const GLenum DOES_INDEX_VALIDATION = 0x10002;
|
||||
|
||||
[Throws]
|
||||
any getParameter(GLenum pname);
|
||||
|
|
Загрузка…
Ссылка в новой задаче