X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-adaptor%2Fdali-test-suite-utils%2Ftest-gl-abstraction.h;h=7ba7834058ae53b9275089bfc82b375a9c17732a;hb=2c55cc6b056f93522e36943d7bbaf770a5aa2170;hp=aec9f5dad925c687d8fd2226115bcbf79fd5090c;hpb=9a9ab95ca063cc2cbfddc0d249e441f8bf7845c2;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h index aec9f5d..7ba7834 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gl-abstraction.h @@ -2,7 +2,7 @@ #define TEST_GL_ABSTRACTION_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,6 +72,8 @@ public: bool IsAdvancedBlendEquationSupported() override; + bool IsMultisampledRenderToTextureSupported() override; + bool IsBlendEquationSupported(DevelBlendEquation::Type blendEquation) override; std::string GetShaderVersionPrefix(); @@ -299,6 +301,21 @@ public: return mFramebufferColorAttachmentCount; } + inline GLuint CheckFramebufferDepthAttachmentCount() + { + return mFramebufferDepthAttachmentCount; + } + + inline GLuint CheckFramebufferStencilAttachmentCount() + { + return mFramebufferStencilAttachmentCount; + } + + inline GLuint CheckFramebufferDepthStencilAttachmentCount() + { + return mFramebufferDepthStencilAttachmentCount; + } + inline GLenum CheckFramebufferDepthAttachment() { return mFramebufferDepthAttached; @@ -309,6 +326,11 @@ public: return mFramebufferStencilAttached; } + inline GLenum CheckFramebufferDepthStencilAttachment() + { + return mFramebufferDepthStencilAttached; + } + inline void Clear(GLbitfield mask) override { mClearCount++; @@ -630,8 +652,9 @@ public: } else if(attachment == GL_DEPTH_STENCIL_ATTACHMENT) { - mFramebufferStencilAttached = true; - mFramebufferDepthAttached = true; + mFramebufferStencilAttached = true; + mFramebufferDepthAttached = true; + mFramebufferDepthStencilAttached = true; } } @@ -650,6 +673,20 @@ public: ++mFramebufferColorAttachmentCount; } } + else if(attachment == GL_DEPTH_ATTACHMENT) + { + ++mFramebufferDepthAttachmentCount; + } + else if(attachment == GL_STENCIL_ATTACHMENT) + { + ++mFramebufferStencilAttachmentCount; + } + else if(attachment == GL_DEPTH_STENCIL_ATTACHMENT) + { + ++mFramebufferDepthAttachmentCount; + ++mFramebufferStencilAttachmentCount; + ++mFramebufferDepthStencilAttachmentCount; + } } inline void FrontFace(GLenum mode) override @@ -848,6 +885,9 @@ public: case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: *params = 100; break; + case GL_ACTIVE_ATTRIBUTES: + *params = static_cast(mAttribLocs.size()); + break; } } @@ -913,8 +953,8 @@ public: if(it2 == uniformIDs.end()) { // Uniform not found, so add it... - uniformIDs[name] = mLastUniformIdUsed++; - return mLastUniformIdUsed; + uniformIDs[name] = ++mLastUniformIdUsed; + return uniformIDs[name]; } return it2->second; @@ -991,7 +1031,30 @@ public: for(const auto& uniform : mCustomUniformData) { - GetUniformLocation(program, uniform.name.c_str()); + auto iter = uniform.name.find("["); + auto name = uniform.name; + if(iter != std::string::npos) + { + name = uniform.name.substr(0, iter); + auto arrayCount = std::stoi(uniform.name.substr(iter + 1)); + iter = uniform.name.find("]"); + std::string suffix; + if(iter != std::string::npos && iter + 1 != uniform.name.length()) + { + suffix = uniform.name.substr(iter + 1); // If there is a suffix, it means its an element of an array of struct + } + + for(int i = 0; i < arrayCount; ++i) + { + std::stringstream nss; + nss << name << "[" << i << "]" << suffix; + GetUniformLocation(program, nss.str().c_str()); // Generate a GL loc per element + } + } + else + { + GetUniformLocation(program, name.c_str()); + } } } @@ -1644,6 +1707,12 @@ public: { } + inline void FramebufferTexture2DMultisample(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) override + { + // TODO : Check it if need + FramebufferTexture2D(target, attachment, textarget, texture, level); + } + inline void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) override { } @@ -2468,8 +2537,12 @@ public: GLint mFramebufferStatus; GLenum mFramebufferDepthAttached; GLenum mFramebufferStencilAttached; + GLenum mFramebufferDepthStencilAttached; GLuint mFramebufferColorAttachmentCount; GLuint mFrameBufferColorStatus; + GLuint mFramebufferDepthAttachmentCount; + GLuint mFramebufferStencilAttachmentCount; + GLuint mFramebufferDepthStencilAttachmentCount; GLint mNumBinaryFormats; GLint mBinaryFormats; GLint mProgramBinaryLength;