Running the following code throws an exception (when creating the 1536th texture) from inside the driver:
Exception thrown at 0x00007FFC07BFDB20 (atio6axx.dll) in MyProgram.exe: 0xC0000005: Access violation reading location 0x0000000000000008.
I am simply creating a texture making it bindless and deleting it again.
If the texture is not made bindless it runs fine. Also putting glfwSwapBuffers always makes it run fine.
for (int i = 0; i < 1600; i++) {
uint32_t test;
glCreateTextures(GL_TEXTURE_2D, 1, &test);
glTextureStorage2D(test, 1, GL_R8, 1920, 1080);
glTextureParameteri(test, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTextureParameteri(test, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
// Not making it bindless makes it run fine
GLuint64 handle = glGetTextureHandleARB(test);
glMakeTextureHandleResidentARB(handle);
glMakeTextureHandleNonResidentARB(handle);
if (handle == 0) {
printf("err\n"); // never hit
}
glDeleteTextures(1, &test);
// Swapping buffers makes it run fine
//glfwSwapBuffers(window);
}