gecko0307 / dagon

3D game engine for D
https://gecko0307.github.io/dagon
Other
321 stars 30 forks source link

Invalid operation in active samplers #49

Closed isaacs-dev closed 4 years ago

isaacs-dev commented 5 years ago

Attempting to use Dagon (master) on my machine always crashes with:

OpenGL error 1282: GL_INVALID_OPERATION

after the loading screen.

If I disable the error check, the tutorials seem to render correctly. For now I can use this as a work-around.

Utilizing RenderDoc and Tutorial 1, I was able to get a clearer error message: GL_INVALID_OPERATION in active samplers with a different type refer to the same texture image unit

OS: Manjaro Linux Driver: Mesa 18.3.2 GL Version: 4.5 Video Card: RX 580

gecko0307 commented 5 years ago

That's strange, RenderDoc doesn't catch any errors for me.

gecko0307 commented 5 years ago

I've added debug output support if GL_KHR_debug is present, but I don't see any errors. I'm testing on Windows 10 laptop with Geforce 920MX. Unfortunately, I cannot test Dagon on an AMD card.

isaacs-dev commented 5 years ago

Having done more tests, this seems to be a Mesa-specific issue. Using my laptop, the error also occurs with Intel integrated graphics. This error does not occur under Windows when I use the exact same laptop.

I've added debug output support if GL_KHR_debug is present, but I don't see any errors. I'm testing on Windows 10 laptop with Geforce 920MX. Unfortunately, I cannot test Dagon on an AMD card.

While the debug output will be useful for future problems like this, the error check eliminates any (small) workaround to prevent the application from closing. #50 will fix this.