Home | History | Annotate | Download | only in functional

Lines Matching defs:renderCtx

822 static bool readIntegerTextureViaFBOAndVerify (const RenderContext&			renderCtx,
839 glu::Framebuffer fbo (renderCtx);
843 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "Bind FBO");
846 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glMemoryBarrier");
863 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "Bind texture to framebuffer color attachment 0");
868 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glReadPixels");
879 static bool readFloatOrNormTextureWithLookupsAndVerify (const RenderContext& renderCtx,
893 const std::string glslVersionDeclaration = getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
895 const glu::ShaderProgram program(renderCtx,
937 const glu::Buffer outputBuffer (renderCtx);
938 UniformAccessLogger uniforms (renderCtx.getFunctions(), log, program.getProgram());
951 const int blockSize = glu::getProgramResourceInt(renderCtx.getFunctions(), program.getProgram(), GL_SHADER_STORAGE_BLOCK, blockIndex, GL_BUFFER_DATA_SIZE);
959 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "SSB setup failed");
968 const int blockSize = glu::getProgramResourceInt(renderCtx.getFunctions(), program.getProgram(), GL_SHADER_STORAGE_BLOCK, blockIndex, GL_BUFFER_DATA_SIZE);
970 const glu::InterfaceVariableInfo valueInfo = glu::getProgramInterfaceVariableInfo(renderCtx.getFunctions(), program.getProgram(), GL_BUFFER_VARIABLE, valueIndex);
1003 const BufferMemMap bufMap(renderCtx.getFunctions(), GL_SHADER_STORAGE_BUFFER, 0, blockSize, GL_MAP_READ_BIT);
1031 static bool readBufferTextureWithMappingAndVerify (const RenderContext& renderCtx,
1046 const BufferMemMap bufMap(renderCtx.getFunctions(), GL_TEXTURE_BUFFER, 0, dataSize, GL_MAP_READ_BIT);
1054 static bool readTextureAndVerify (const RenderContext& renderCtx,
1064 return readBufferTextureWithMappingAndVerify(renderCtx, glLog, bufferGL, textureFormat, imageSize.x(), verifyLayer);
1066 return isFormatTypeInteger(textureFormat.type) ? readIntegerTextureViaFBOAndVerify (renderCtx, glLog, textureGL, textureType, textureFormat, imageSize, verifyLayer)
1067 : readFloatOrNormTextureWithLookupsAndVerify (renderCtx, glLog, textureGL, textureType, textureFormat, imageSize, verifyLayer);
1133 const RenderContext& renderCtx = m_context.getRenderContext();
1135 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
1145 const glu::Buffer textureBuf (renderCtx); // \note Only really used if using buffer texture.
1146 const glu::Texture texture (renderCtx);
1177 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
1179 const glu::ShaderProgram program(renderCtx,
1181 + textureTypeExtensionShaderRequires(shaderImageType, renderCtx) +
1203 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
1227 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1230 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
1236 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1239 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
1262 const bool compareOk = readTextureAndVerify(renderCtx, glLog, *texture, *textureBuf, m_textureType, m_format, imageSize, ImageLayerComparer(reference));
1352 const RenderContext& renderCtx = m_context.getRenderContext();
1354 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
1366 const glu::Buffer texture0Buf (renderCtx);
1367 const glu::Buffer texture1Buf (renderCtx);
1368 const glu::Texture texture0 (renderCtx);
1369 const glu::Texture texture1 (renderCtx);
1428 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
1430 const glu::ShaderProgram program(renderCtx,
1432 + textureTypeExtensionShaderRequires(shaderImageType, renderCtx) +
1454 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
1476 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1479 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1482 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
1488 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1491 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1494 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
1552 const bool compareOk = readTextureAndVerify(renderCtx, glLog, *texture1, *texture1Buf, m_textureType, m_textureFormat, imageSize, ImageLayerComparer(reference));
1928 const RenderContext& renderCtx = m_context.getRenderContext();
1930 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
1937 const glu::Buffer endResultTextureBuf (renderCtx);
1938 const glu::Buffer returnValueTextureBuf (renderCtx);
1939 const glu::Texture endResultTexture (renderCtx); //!< Texture for the final result; i.e. the texture on which the atomic operations are done. Size imageSize.
1940 const glu::Texture returnValueTexture (renderCtx); //!< Texture into which the return values are stored if m_caseType == CASETYPE_RETURN_VALUES.
1984 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2000 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2022 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
2024 const glu::ShaderProgram program(renderCtx,
2026 + imageAtomicExtensionShaderRequires(renderCtx)
2027 + textureTypeExtensionShaderRequires(m_imageType, renderCtx) +
2049 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
2064 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
2082 if (readTextureAndVerify(renderCtx, glLog, textureToCheckGL, textureToCheckBufGL, m_imageType, m_format, textureToCheckSize, *verifier))
2329 const RenderContext& renderCtx = m_context.getRenderContext();
2331 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
2338 const glu::Buffer endResultTextureBuf (renderCtx);
2339 const glu::Buffer returnValueTextureBuf (renderCtx);
2340 const glu::Texture endResultTexture (renderCtx); //!< Texture for the final result; i.e. the texture on which the atomic operations are done. Size imageSize.
2341 const glu::Texture returnValueTexture (renderCtx); //!< Texture into which the return values are stored if m_caseType == CASETYPE_RETURN_VALUES.
2385 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2401 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2419 const string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
2421 const glu::ShaderProgram program(renderCtx,
2423 + imageAtomicExtensionShaderRequires(renderCtx)
2424 + textureTypeExtensionShaderRequires(m_imageType, renderCtx) +
2448 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
2463 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
2487 if (readTextureAndVerify(renderCtx, glLog, textureToCheckGL, textureToCheckBufGL, m_imageType, m_format, relevantRegion, *verifier))
2549 const RenderContext& renderCtx = m_context.getRenderContext();
2551 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
2561 const glu::Buffer textureBuf (renderCtx);
2562 const glu::Texture texture (renderCtx);
2588 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2605 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
2608 const glu::ShaderProgram program(renderCtx,
2610 + textureTypeExtensionShaderRequires(m_imageType, renderCtx) +
2652 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
2667 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
2699 if (readTextureAndVerify(renderCtx, glLog, *texture, *textureBuf, m_imageType, m_format, imageSize, ImageLayerComparer(reference)))
2774 const RenderContext& renderCtx = m_context.getRenderContext();
2776 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
2779 const glu::Buffer mainTextureBuf (renderCtx);
2780 const glu::Texture mainTexture (renderCtx);
2781 const glu::Texture shaderOutResultTexture (renderCtx);
2797 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2804 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2817 const string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
2819 const glu::ShaderProgram program(renderCtx,
2821 + textureTypeExtensionShaderRequires(m_imageType, renderCtx) +
2843 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
2858 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
2869 if (readIntegerTextureViaFBOAndVerify(renderCtx, glLog, *shaderOutResultTexture, TEXTURETYPE_2D, TextureFormat(TextureFormat::R, TextureFormat::UNSIGNED_INT32),
2950 const RenderContext& renderCtx = m_context.getRenderContext();
2952 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
2957 const int viewportX = (m_renderTarget == RENDERTARGET_DEFAULT) ? (rnd.getInt(0, renderCtx.getRenderTarget().getWidth() - viewportWidth)) : (0);
2958 const int viewportY = (m_renderTarget == RENDERTARGET_DEFAULT) ? (rnd.getInt(0, renderCtx.getRenderTarget().getHeight() - viewportHeight)) : (0);
2959 const glu::Texture texture (renderCtx);
2979 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2985 fbo = de::MovePtr<glu::Framebuffer>(new glu::Framebuffer(renderCtx));
2986 colorAttachment = de::MovePtr<glu::Renderbuffer>(new glu::Renderbuffer(renderCtx));
2987 testAttachment = de::MovePtr<glu::Renderbuffer>(new glu::Renderbuffer(renderCtx));
2991 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "gen color attachment rb");
2995 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "set fbo color attachment");
3001 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "gen depth attachment rb");
3004 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "set fbo depth attachment");
3010 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "gen stencil attachment rb");
3013 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "set fbo stencil attachment");
3017 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "setup fbo");
3051 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
3055 const glu::ShaderProgram program(renderCtx,
3066 + imageAtomicExtensionShaderRequires(renderCtx) +
3081 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
3113 glu::draw(renderCtx, program.getProgram(), DE_LENGTH_OF_ARRAY(attrBindings), &attrBindings[0],
3115 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "Draw failed");
3122 glu::readPixels(renderCtx, viewportX, viewportY, rendered.getAccess());
3128 const int numSamples = de::max(1, renderCtx.getRenderTarget().getNumSamples());
3134 if (readIntegerTextureViaFBOAndVerify(renderCtx, glLog, *texture, TEXTURETYPE_2D, TextureFormat(TextureFormat::R, TextureFormat::UNSIGNED_INT32),