From: Unsuk Jung Date: Tue, 30 Aug 2016 20:39:55 +0000 (+0000) Subject: Merge "Don't require supported binary formats in negative tests." into marshmallow... X-Git-Tag: upstream/0.1.0~669^2~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3aa5258338eccf0ed255b30b669f84612d1f44ce;hp=b9c3777b77e0ffa121a0041d4523c6ae14ab1dda;p=platform%2Fupstream%2FVK-GL-CTS.git Merge "Don't require supported binary formats in negative tests." into marshmallow-cts-dev --- diff --git a/modules/gles31/functional/es31fNegativeShaderApiTests.cpp b/modules/gles31/functional/es31fNegativeShaderApiTests.cpp index a35b941..fe43f10 100644 --- a/modules/gles31/functional/es31fNegativeShaderApiTests.cpp +++ b/modules/gles31/functional/es31fNegativeShaderApiTests.cpp @@ -452,20 +452,24 @@ void program_binary (NegativeTestContext& ctx) ctx.glGetProgramiv (srcProgram.getProgram(), GL_LINK_STATUS, &linkStatus); ctx.getLog() << TestLog::Message << "// GL_PROGRAM_BINARY_LENGTH = " << bufSize << TestLog::EndMessage; ctx.getLog() << TestLog::Message << "// GL_LINK_STATUS = " << linkStatus << TestLog::EndMessage; - TCU_CHECK(bufSize > 0); - binaryBuf.resize(bufSize); - ctx.glGetProgramBinary (srcProgram.getProgram(), bufSize, &binaryLength, &binaryFormat, &binaryBuf[0]); - ctx.expectError (GL_NO_ERROR); - ctx.beginSection("GL_INVALID_OPERATION is generated if program is not the name of an existing program object."); - ctx.glProgramBinary (dummyShader, binaryFormat, &binaryBuf[0], binaryLength); - ctx.expectError (GL_INVALID_OPERATION); - ctx.endSection(); + TCU_CHECK(bufSize >= 0); + if (bufSize > 0) + { + binaryBuf.resize(bufSize); + ctx.glGetProgramBinary (srcProgram.getProgram(), bufSize, &binaryLength, &binaryFormat, &binaryBuf[0]); + ctx.expectError (GL_NO_ERROR); - ctx.beginSection("GL_INVALID_ENUM is generated if binaryFormat is not a value recognized by the implementation."); - ctx.glProgramBinary (dstProgram, -1, &binaryBuf[0], binaryLength); - ctx.expectError (GL_INVALID_ENUM); - ctx.endSection(); + ctx.beginSection("GL_INVALID_OPERATION is generated if program is not the name of an existing program object."); + ctx.glProgramBinary (dummyShader, binaryFormat, &binaryBuf[0], binaryLength); + ctx.expectError (GL_INVALID_OPERATION); + ctx.endSection(); + + ctx.beginSection("GL_INVALID_ENUM is generated if binaryFormat is not a value recognized by the implementation."); + ctx.glProgramBinary (dstProgram, -1, &binaryBuf[0], binaryLength); + ctx.expectError (GL_INVALID_ENUM); + ctx.endSection(); + } ctx.glDeleteShader(dummyShader); ctx.glDeleteProgram(dstProgram);