In my simple shader editor i want to add the ability to look at shader's source code and corresponding assembly output for selected line or region. I know in a debug mode i can get line numbers in dissasembly but they are very innacurate (I have line 9 and next 20 for example). Anywas i want to have something similar i release mode. I know that code got reorganized a lot in the optimization process so this can be hard and it wont be accurate. Any ideas how to do this?
I guess it would be quite easy with volatile (is it still ignored by the compiler? was it ever working? why won't they just remove this keyword?). Do you know any other instruction I could use as a "marker". I mean it shouldn't do anything that would change normal shader execution and it shouldn't be optimized by a compiler so it's still visible in the assembly output?
Edited by quaikohc2, 10 February 2014 - 05:08 PM.