AnsweredAssumed Answered

OpenGL texture access corruption while rendering inside CAD's pipeline on FirePro?

Question asked by nuclear.bro on Sep 3, 2012

Hello all!


We've encountered a problem with our product working on FirePro devices, which possibly related to CAD-specific OpenGL optimizations in video driver. We are making CFD plugin which renders its own entities inside CAD's rendering pipeline (Solidworks, CATIA and several others), using main application context. Problem appeared when we implemented image-based flow visualization effects, using multipass shader programs. On Radeon HD series and on both Quadro and GeForce series images look fine, but on FirePro adapters (V3750 and V5900 tested so far) final image looks corrupted, missing the whole lot of 8x8 pixel squares.

Here is an example of basic n-pass Line Integral Convolution (LIC) effect as seen in Solidworks (in other applications results are the same):


At this point it looks fine, but once zoomed in...


image become corrupted, missing 8x8 pixel blocks.


Finally at this point it is clearly seen, that texture fetches, that occur inside triangles produce wrong results. Data preserved only in blocks intersected by triangle boundaries.


Algorithm is quite simple: encode field in a FP16 texture at first pass, then perform few 1D block-filter passes using ping-pong textures with constant noise as first source. At first we thought that our flow field encoding shader gives undefined behaviour (by using derivative functions), then we eliminated it, and rendered almost plain constant field but still result were the same:


A few other notable things: our standalone pure OGL 3.3 application with almost the same algorithm failed to reproduce this bug on problem machines. But opengl call trace of CAD application, recorded and replayed by ApiTrace 3 tool successfully reproducing it on FirePro machines. This give us a point to think of a special CAD-aware optimizations inside driver that accidentally produce these glitches.


We appreciate any help to find solution or workaround of this problem, thanks in advance.


PS. We can't figure out how to post a source code reproducing this thing, since it's only useful when running inside CAD application. But we can post a trace file, which can be replayed by ApiTrace tool, if needed.