NV_command_List+FBO causes Access violation

Hi,

I’m optimizing my app with NV_command_List(win7, 382.05, GeForceGTX670).
But NV_command_list with FBO change causes access violation at glBindFramebuffer after glDrawCommandsStatesNV.
It seems to depend on last fbo in NV_command_list or last bound fbo before glDrawCommandsStatesNV.

I modified gl_commandlist_basic sample to repro this issue.
This program makes 2 fbos with same color+depth textures.
Regular gl context uses fbo0 and glDrawCommandsStatesNV uses fbo1.

Please run this program, then choose draw mode to nvcmdlist buffer.
It will cause access violation at glBindFramebuffer.
The output is
“Exception thrown at 0x00000000691FA94F (nvoglv64.dll) in gl_commandlist_basic.exe: 0xC0000005: Access violation reading location 0x0000000000000B00.”

I think there are two workarounds.
1) binding 0 fbo before glDrawCommandsStatesNV
2) enqueue nop with fbo bound just before glDrawCommandsStatesNV as last token
You can test two workarounds if you change WORK_AROUND_TYPE macro in gl_commandlist_basic.cpp header part.

Is this behavior intended?
And I’m sorry if I was wrong.

basic-nvcommandlist.zip (9.23 KB)