From eec4f504994f67a1d7d7d847e25f815c0a456f07 Mon Sep 17 00:00:00 2001 From: zleoyu Date: Thu, 4 Aug 2022 11:12:18 +0800 Subject: [PATCH] =?UTF-8?q?webGL=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E8=A6=86=E7=9B=96=20WebGLShaderPrecisionFormat=E7=B1=BB?= =?UTF-8?q?=E4=B8=AD=E7=9A=84rangeMin=E3=80=81rangeMax=20WebGLRenderingCon?= =?UTF-8?q?textBase=E7=B1=BB=E4=B8=AD=E7=9A=84LUMINANCE=5FALPHA=E3=80=81SH?= =?UTF-8?q?ADER=5FTYPE=E3=80=81LINK=5FSTATUS=E3=80=81VALIDATE=5FSTATUS?= =?UTF-8?q?=E3=80=81VERTEX=5FATTRIB=5FARRAY=5FPOINTER=E3=80=81FRAMEBUFFER?= =?UTF-8?q?=5FATTACHMENT=5FOBJECT=5FNAME=E3=80=81CONTEXT=5FLOST=5FWEBGL=20?= =?UTF-8?q?WebGL2RenderingContextBase=E7=B1=BB=E4=B8=AD=E7=9A=84EndTransfo?= =?UTF-8?q?rmFeedback=E3=80=81FRAMEBUFFER=5FDEFAULT=E3=80=81RG8UI=E3=80=81?= =?UTF-8?q?UNIFORM=5FIS=5FROW=5FMAJOR=E3=80=81ANY=5FSAMPLES=5FPASSED=5FCON?= =?UTF-8?q?SERVATIVE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zleoyu Change-Id: I3d762046cb3542efcdec5b80036bcb723f0745e4 --- .../src/main/js/default/test/WebGL.test14.js | 49 +++++++++++++++++++ .../src/main/js/default/test/WebGL.test15.js | 15 ++++++ 2 files changed, 64 insertions(+) diff --git a/graphic/webGL/src/main/js/default/test/WebGL.test14.js b/graphic/webGL/src/main/js/default/test/WebGL.test14.js index 5571eb900..3c9a25d1a 100644 --- a/graphic/webGL/src/main/js/default/test/WebGL.test14.js +++ b/graphic/webGL/src/main/js/default/test/WebGL.test14.js @@ -912,6 +912,22 @@ describe('webgl1Test_webgl15', function() { expect(texParameterValue).assertEqual(gl.COMPARE_REF_TO_TEXTURE); done(); }); + + /** + * @tc.number GRAPHIC_FUNCTION_JS_WEBGL_TESTWEBGL_1335 + * @tc.name testRangeMin + * @tc.desc Test RangeMin. + */ + it('testRangeMin', 0, async function(done) { + console.info('jsWebGL testRangeMin test start'); + gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.LOW_INT).rangeMin; + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).rangeMax; + gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).precision; + const errorCode = gl.getError(); + console.info("WebGLShaderPrecisionFormat getError: " + errorCode); + expect(errorCode).assertEqual(gl.NO_ERROR); + done(); + }); /** * @tc.number GRAPHIC_FUNCTION_JS_WEBGL_TESTWEBGL_1337 @@ -950,6 +966,39 @@ describe('webgl1Test_webgl15', function() { var x9 = gl2.OBJECT_TYPE; expect(x9).assertEqual(37138); + var x10 = gl2.FRAMEBUFFER_DEFAULT; + expect(x10).assertEqual(33304); + + var x11 = gl2.RG8UI; + expect(x11).assertEqual(33336); + + var x12 = gl2.UNIFORM_IS_ROW_MAJOR; + expect(x12).assertEqual(35390); + + var x13 = gl2.ANY_SAMPLES_PASSED_CONSERVATIVE; + expect(x13).assertEqual(36202); + + var y1 = gl.LUMINANCE_ALPHA; + expect(y1).assertEqual(6410); + + var y2 = gl.SHADER_TYPE; + expect(y2).assertEqual(35663); + + var y3 = gl.LINK_STATUS; + expect(y3).assertEqual(35714); + + var y4 = gl.VALIDATE_STATUS; + expect(y4).assertEqual(35715); + + var y5 = gl.VERTEX_ATTRIB_ARRAY_POINTER; + expect(y5).assertEqual(34373); + + var y6 = gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME; + expect(y6).assertEqual(36049); + + var y7 = gl.CONTEXT_LOST_WEBGL; + expect(y7).assertEqual(37442); + done(); }); }) diff --git a/graphic/webGL/src/main/js/default/test/WebGL.test15.js b/graphic/webGL/src/main/js/default/test/WebGL.test15.js index 502f1e177..f1e47306e 100644 --- a/graphic/webGL/src/main/js/default/test/WebGL.test15.js +++ b/graphic/webGL/src/main/js/default/test/WebGL.test15.js @@ -514,4 +514,19 @@ describe('webgl1Test_webgl16', function() { expect(stencilValue).assertEqual(false); done(); }) + + /** + * @tc.number GRAPHIC_FUNCTION_JS_WEBGL_TESTWEBGL_1348 + * @tc.name webgl_test_endTransformFeedback + * @tc.desc Test endTransformFeedback. + */ + it('webgl_test_endTransformFeedback', 0, async function(done) { + let transformFeedback = gl2.createTransformFeedback(); + gl2.endTransformFeedback(); + let errorCode = gl.getError(); + console.info("webgltest endTransformFeedback getError: " + errorCode); + expect(errorCode).assertLarger(gl.NO_ERROR); + //deleteContext(); + done(); + }); }) -- GitLab