Use square cubemap textures in negative tests
authorMika Isojärvi <misojarvi@google.com>
Tue, 19 Apr 2016 19:24:43 +0000 (12:24 -0700)
committerMika Isojärvi <misojarvi@google.com>
Tue, 19 Apr 2016 19:42:06 +0000 (12:42 -0700)
Bug: 28249081
Bug: 28052105
Bug: 28052212
Change-Id: I15e9ca97c1300c4771a4797a8d29c68d779d3a9a

modules/gles31/functional/es31fNegativeTextureApiTests.cpp

index e6f5219..9cad1a8 100644 (file)
@@ -3717,7 +3717,7 @@ void texstorage2d_invalid_binding (NegativeTestContext& ctx)
 void texstorage2d_invalid_levels (NegativeTestContext& ctx)
 {
        deUint32        textures[]      = {0x1234, 0x1234};
-       deUint32        log2MaxSize     = deLog2Floor32(deMax32(16, 4)) + 1 + 1;
+       deUint32        log2MaxSize     = deLog2Floor32(deMax32(16, 16)) + 1 + 1;
        const bool      isES32          = contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
 
        ctx.glGenTextures(2, textures);
@@ -3744,19 +3744,11 @@ void texstorage2d_invalid_levels (NegativeTestContext& ctx)
        ctx.endSection();
 
        ctx.beginSection("GL_INVALID_OPERATION is generated if levels is greater than floor(log_2(max(width, height))) + 1");
-       ctx.glTexStorage2D(GL_TEXTURE_2D, log2MaxSize, GL_RGBA8, 16, 4);
-       ctx.expectError(GL_INVALID_OPERATION);
-       ctx.glTexStorage2D(GL_TEXTURE_2D, log2MaxSize, GL_RGBA8, 4, 16);
-       ctx.expectError(GL_INVALID_OPERATION);
        ctx.glTexStorage2D(GL_TEXTURE_2D, log2MaxSize, GL_RGBA8, 16, 16);
        ctx.expectError(GL_INVALID_OPERATION);
 
        if (isES32)
        {
-               ctx.glTexStorage2D(GL_TEXTURE_CUBE_MAP, log2MaxSize, GL_RGBA8, 16, 4);
-               ctx.expectError(GL_INVALID_OPERATION);
-               ctx.glTexStorage2D(GL_TEXTURE_CUBE_MAP, log2MaxSize, GL_RGBA8, 4, 16);
-               ctx.expectError(GL_INVALID_OPERATION);
                ctx.glTexStorage2D(GL_TEXTURE_CUBE_MAP, log2MaxSize, GL_RGBA8, 16, 16);
                ctx.expectError(GL_INVALID_OPERATION);
        }