Lines Matching refs:renderCtx
856 static bool readIntegerTextureViaFBOAndVerify (const RenderContext& renderCtx,
873 glu::Framebuffer fbo (renderCtx);
877 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "Bind FBO");
880 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glMemoryBarrier");
897 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "Bind texture to framebuffer color attachment 0");
902 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glReadPixels");
913 static bool readFloatOrNormTextureWithLookupsAndVerify (const RenderContext& renderCtx,
927 const std::string glslVersionDeclaration = getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
929 const glu::ShaderProgram program(renderCtx,
971 const glu::Buffer outputBuffer (renderCtx);
972 UniformAccessLogger uniforms (renderCtx.getFunctions(), log, program.getProgram());
985 const int blockSize = glu::getProgramResourceInt(renderCtx.getFunctions(), program.getProgram(), GL_SHADER_STORAGE_BLOCK, blockIndex, GL_BUFFER_DATA_SIZE);
993 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "SSB setup failed");
1002 const int blockSize = glu::getProgramResourceInt(renderCtx.getFunctions(), program.getProgram(), GL_SHADER_STORAGE_BLOCK, blockIndex, GL_BUFFER_DATA_SIZE);
1004 const glu::InterfaceVariableInfo valueInfo = glu::getProgramInterfaceVariableInfo(renderCtx.getFunctions(), program.getProgram(), GL_BUFFER_VARIABLE, valueIndex);
1037 const BufferMemMap bufMap(renderCtx.getFunctions(), GL_SHADER_STORAGE_BUFFER, 0, blockSize, GL_MAP_READ_BIT);
1065 static bool readBufferTextureWithMappingAndVerify (const RenderContext& renderCtx,
1080 const BufferMemMap bufMap(renderCtx.getFunctions(), GL_TEXTURE_BUFFER, 0, dataSize, GL_MAP_READ_BIT);
1088 static bool readTextureAndVerify (const RenderContext& renderCtx,
1098 return readBufferTextureWithMappingAndVerify(renderCtx, glLog, bufferGL, textureFormat, imageSize.x(), verifyLayer);
1100 return isFormatTypeInteger(textureFormat.type) ? readIntegerTextureViaFBOAndVerify (renderCtx, glLog, textureGL, textureType, textureFormat, imageSize, verifyLayer)
1101 : readFloatOrNormTextureWithLookupsAndVerify (renderCtx, glLog, textureGL, textureType, textureFormat, imageSize, verifyLayer);
1167 const RenderContext& renderCtx = m_context.getRenderContext();
1169 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
1179 const glu::Buffer textureBuf (renderCtx); // \note Only really used if using buffer texture.
1180 const glu::Texture texture (renderCtx);
1211 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
1213 const glu::ShaderProgram program(renderCtx,
1215 + textureTypeExtensionShaderRequires(shaderImageType, renderCtx) +
1237 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
1261 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1264 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
1270 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1273 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
1296 const bool compareOk = readTextureAndVerify(renderCtx, glLog, *texture, *textureBuf, m_textureType, m_format, imageSize, ImageLayerComparer(reference));
1386 const RenderContext& renderCtx = m_context.getRenderContext();
1388 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
1400 const glu::Buffer texture0Buf (renderCtx);
1401 const glu::Buffer texture1Buf (renderCtx);
1402 const glu::Texture texture0 (renderCtx);
1403 const glu::Texture texture1 (renderCtx);
1462 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
1464 const glu::ShaderProgram program(renderCtx,
1466 + textureTypeExtensionShaderRequires(shaderImageType, renderCtx) +
1488 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
1510 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1513 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1516 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
1522 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1525 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
1528 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
1586 const bool compareOk = readTextureAndVerify(renderCtx, glLog, *texture1, *texture1Buf, m_textureType, m_textureFormat, imageSize, ImageLayerComparer(reference));
1972 const RenderContext& renderCtx = m_context.getRenderContext();
1974 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
1981 const glu::Buffer endResultTextureBuf (renderCtx);
1982 const glu::Buffer returnValueTextureBuf (renderCtx);
1983 const glu::Texture endResultTexture (renderCtx); //!< Texture for the final result; i.e. the texture on which the atomic operations are done. Size imageSize.
1984 const glu::Texture returnValueTexture (renderCtx); //!< Texture into which the return values are stored if m_caseType == CASETYPE_RETURN_VALUES.
2040 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2056 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2078 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
2080 const glu::ShaderProgram program(renderCtx,
2082 + imageAtomicExtensionShaderRequires(renderCtx)
2083 + textureTypeExtensionShaderRequires(m_imageType, renderCtx) +
2105 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
2120 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
2138 if (readTextureAndVerify(renderCtx, glLog, textureToCheckGL, textureToCheckBufGL, m_imageType, m_format, textureToCheckSize, *verifier))
2385 const RenderContext& renderCtx = m_context.getRenderContext();
2387 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
2394 const glu::Buffer endResultTextureBuf (renderCtx);
2395 const glu::Buffer returnValueTextureBuf (renderCtx);
2396 const glu::Texture endResultTexture (renderCtx); //!< Texture for the final result; i.e. the texture on which the atomic operations are done. Size imageSize.
2397 const glu::Texture returnValueTexture (renderCtx); //!< Texture into which the return values are stored if m_caseType == CASETYPE_RETURN_VALUES.
2453 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2469 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2487 const string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
2489 const glu::ShaderProgram program(renderCtx,
2491 + imageAtomicExtensionShaderRequires(renderCtx)
2492 + textureTypeExtensionShaderRequires(m_imageType, renderCtx) +
2518 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
2541 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
2567 if (readTextureAndVerify(renderCtx, glLog, textureToCheckGL, textureToCheckBufGL, m_imageType, m_format, relevantRegion, *verifier))
2629 const RenderContext& renderCtx = m_context.getRenderContext();
2631 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
2641 const glu::Buffer textureBuf (renderCtx);
2642 const glu::Texture texture (renderCtx);
2668 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2685 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
2688 const glu::ShaderProgram program(renderCtx,
2690 + textureTypeExtensionShaderRequires(m_imageType, renderCtx) +
2732 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
2747 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
2779 if (readTextureAndVerify(renderCtx, glLog, *texture, *textureBuf, m_imageType, m_format, imageSize, ImageLayerComparer(reference)))
2854 const RenderContext& renderCtx = m_context.getRenderContext();
2856 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
2859 const glu::Buffer mainTextureBuf (renderCtx);
2860 const glu::Texture mainTexture (renderCtx);
2861 const glu::Texture shaderOutResultTexture (renderCtx);
2877 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2884 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
2897 const string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
2899 const glu::ShaderProgram program(renderCtx,
2901 + textureTypeExtensionShaderRequires(m_imageType, renderCtx) +
2923 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
2938 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glDispatchCompute");
2949 if (readIntegerTextureViaFBOAndVerify(renderCtx, glLog, *shaderOutResultTexture, TEXTURETYPE_2D, TextureFormat(TextureFormat::R, TextureFormat::UNSIGNED_INT32),
3030 const RenderContext& renderCtx = m_context.getRenderContext();
3032 glu::CallLogWrapper glLog (renderCtx.getFunctions(), log);
3037 const int viewportX = (m_renderTarget == RENDERTARGET_DEFAULT) ? (rnd.getInt(0, renderCtx.getRenderTarget().getWidth() - viewportWidth)) : (0);
3038 const int viewportY = (m_renderTarget == RENDERTARGET_DEFAULT) ? (rnd.getInt(0, renderCtx.getRenderTarget().getHeight() - viewportHeight)) : (0);
3039 const glu::Texture texture (renderCtx);
3059 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "glBindImageTexture");
3065 fbo = de::MovePtr<glu::Framebuffer>(new glu::Framebuffer(renderCtx));
3066 colorAttachment = de::MovePtr<glu::Renderbuffer>(new glu::Renderbuffer(renderCtx));
3067 testAttachment = de::MovePtr<glu::Renderbuffer>(new glu::Renderbuffer(renderCtx));
3071 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "gen color attachment rb");
3075 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "set fbo color attachment");
3081 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "gen depth attachment rb");
3084 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "set fbo depth attachment");
3090 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "gen stencil attachment rb");
3093 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "set fbo stencil attachment");
3097 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "setup fbo");
3131 const std::string glslVersionDeclaration = glu::getGLSLVersionDeclaration(glu::getContextTypeGLSLVersion(renderCtx.getType()));
3135 const glu::ShaderProgram program(renderCtx,
3146 + imageAtomicExtensionShaderRequires(renderCtx) +
3161 UniformAccessLogger uniforms(renderCtx.getFunctions(), log, program.getProgram());
3193 glu::draw(renderCtx, program.getProgram(), DE_LENGTH_OF_ARRAY(attrBindings), &attrBindings[0],
3195 GLU_EXPECT_NO_ERROR(renderCtx.getFunctions().getError(), "Draw failed");
3202 glu::readPixels(renderCtx, viewportX, viewportY, rendered.getAccess());
3208 const int numSamples = de::max(1, renderCtx.getRenderTarget().getNumSamples());
3214 if (readIntegerTextureViaFBOAndVerify(renderCtx, glLog, *texture, TEXTURETYPE_2D, TextureFormat(TextureFormat::R, TextureFormat::UNSIGNED_INT32),