Imagination PowerVR SDK Blog

glRenderbufferStorage GL_INVALID_OPERATION in SDK 2018 R2

pvrvframe

#1

Hello! I have GL_INALID_OPERATION on following code

void InitFBO()
{
	GLuint fbo = 0;
	glGenFramebuffers(1, &fbo);
	CheckOpenGLError();
	glBindFramebuffer(GL_FRAMEBUFFER, fbo);
	CheckOpenGLError();

	GLuint renderBufferId = 0;
	// create render buffer
	glGenRenderbuffers(1, &renderBufferId);
	CheckOpenGLError();
	glBindRenderbuffer(GL_RENDERBUFFER, renderBufferId);
	CheckOpenGLError();

	const uint width = 256;
	const uint height = 256;

	glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, renderBufferId);
	CheckOpenGLError();

	glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, width, height);
	CheckOpenGLError(); // GL_INVALID_OPERATION

	glBindFramebuffer(GL_FRAMEBUFFER, 0);
	CheckOpenGLError();
}

I have no error on SDK 2018 R1, Mali OpenGL ES Emulator, ANGLE, Adreno OpenGL ES Emulator.

Debug Info

OpenGL ES renderer PVRVFrame 10.9 - None (Host : AMD Radeon R7 200 Series) (SDK Build: 18.2@5236813)
OpenGL ES vendorImagination Technologies (Host: ATI Technologies Inc.)
5548:Mon Jan 14 23:10:08 2019 OpenGL ES version OpenGL ES 3.2 (Host : 4.6.13543 Core Profile Context 25.20.15003.5010)

Test Project, see function InitFBO() in OpenGLTest.cpp


#2

Hi,

thanks for reporting this, I’ll contact the developer team to fix the problem.

can you work around this somehow? eg. just use an FBO with a depth texture attached?

bests,
Marton


#3

Hi MartonTamas, thank you for your answer, I can work with old version of OpenGL ES emulator.(2018 R1)
Yes, FBO wors correctly for Depth texture.