TressFX on OpenGL : strange sync issue in release mode

Started by
1 comment, last by vlj 9 years, 1 month ago

Hi,

I'm trying to port the DX 11 only TressFX 2.2 sample to OpenGL 4.3.

The code is here :

https://github.com/vlj/YAGF/blob/master/examples/tfx.cpp

It's still WIP, shadows are not supported atm and the simulation doesnt use the hair guide components. But rendering works properly in debug mode, with anti aliased strands.

If you want to build you'll need GLFW, glew and freetype2

However I'm having trouble, I'm developping using Visual Studio 2013 and while it works fine in Debug Mode, in Release Mode I only get a black screen. Sometimes a frame with hairs pops up.

I'm suspecting some synchronisation issue but I have no idea where it can come from. Simulation only uses SSBO (9 of them !) with proper glMemoryBarrier() call, Rendering write atomic counter, image and a single ssbo in the first pass (with proper barrier before and after), and full screen pass reads image and read/write ssbo from the first pass. The ssbo is never read after (buffers swap) but I added an extra glMemoryBarrier() call just to be sure, and also use a SyncObject after full screen draw call which blocks before any OpenGL calls are issued. I know it's not the best placement for an object sync client wait but even there I still have a black screen.

For some reason debug mode makes the first rendering pass takes 9ms to complete according to GPU Perf Studio 2, the same pass on radeon sdk (debug mode too) takes around 1ms...

I'm using R9 290X with Catalyst 14.12 on Windows 8.1 64b (but I build the sample in 32b)

Advertisement

For some reason it looks like SSBO (where the vertex shaders fetch positions) is not properly read in the first rendering pass although proper barrier are in place. Did anyone encountered this issue ?

Actually was a stupid unitialized var error.

This topic is closed to new replies.

Advertisement