Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
TextureMtl.mm:108 (GetLayerMipIndex): \t! Unreachable reached
https://bugs.webkit.org/show_bug.cgi?id=240790 Reviewed by Darin Adler Check texture valid before use. * Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.mm: (rx::mtl::Texture::MakeTexture): Canonical link: https://commits.webkit.org/251435@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
3 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Test creating a max-size texture. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
Canvas.getContext | ||
PASS context exists | ||
|
||
PASS getError was one of: NO_ERROR or OUT_OF_MEMORY : unexpected result when creating MAX_TEXTURE_SIZE texture | ||
|
||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<title>WebGL Framebuffer Test</title> | ||
<script src="../../../resources/js-test.js"></script> | ||
<script src="resources/webgl-test.js"></script> | ||
</head> | ||
<body> | ||
<div id="description"></div> | ||
<div id="console"></div> | ||
<canvas id="canvas" width="2" height="2"> </canvas> | ||
<script> | ||
description("Test creating a max-size texture."); | ||
|
||
debug(""); | ||
debug("Canvas.getContext"); | ||
|
||
if (window.internals) | ||
window.internals.settings.setWebGLErrorsToConsoleEnabled(false); | ||
|
||
var canvas = document.getElementById("canvas"); | ||
var gl = create3DContext(canvas); | ||
if (!gl) { | ||
testFailed("context does not exist"); | ||
} else { | ||
testPassed("context exists"); | ||
|
||
debug(""); | ||
|
||
texSize = gl.getParameter(gl.MAX_TEXTURE_SIZE) | ||
var tex = gl.createTexture(); | ||
gl.bindTexture(gl.TEXTURE_2D, tex); | ||
gl.texImage2D(gl.TEXTURE_2D, | ||
0, // level | ||
gl.RGBA, // internalFormat | ||
texSize, // width | ||
texSize, // height | ||
0, // border | ||
gl.RGBA, // format | ||
gl.FLOAT, // type | ||
null); // data | ||
err = gl.getError(); | ||
glErrorShouldBe(gl, [gl.NO_ERROR, gl.OUT_OF_MEMORY], "unexpected result when creating MAX_TEXTURE_SIZE texture") | ||
} | ||
|
||
debug(""); | ||
|
||
</script> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters