# Help with NV\_command\_list

**URL:** <https://forums.developer.nvidia.com/t/help-with-nv-command-list/37411>\
**Category:** OpenGL\
**Created:** [March 28, 2015, 1:17am UTC](https://forums.developer.nvidia.com/t/help-with-nv-command-list/37411 "2015-03-28T01:17:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexbetts](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/alexbetts/32/70453_2.png) [@alexbetts](https://forums.developer.nvidia.com/u/alexbetts)\
**Post date:** [March 28, 2015, 1:17am UTC](https://forums.developer.nvidia.com/t/help-with-nv-command-list/37411/1 "2015-03-28T01:17:15Z")

</div>

(Development environment is Linux Mint with beta driver 349.12; GPU is a GTX 760).

Having some trouble using the new NV\_command\_list extension. I’ve got a draw function that looks a bit like this:

glBindFramebuffer(GL\_READ\_FRAMEBUFFER, 0);  
glBindFramebuffer(GL\_DRAW\_FRAMEBUFFER, fbo);

// clear:  
glClearColor(1, 0, 0, 0);  
glClearDepth(1.0);  
glClear(GL\_COLOR\_BUFFER\_BIT | GL\_DEPTH\_BUFFER\_BIT);

// draw:  
glDrawCommandsStatesAddressNV(…);

// blit:  
glBindFramebuffer(GL\_READ\_FRAMEBUFFER, fbo);  
glBindFramebuffer(GL\_DRAW\_FRAMEBUFFER, 0);

glBlitFramebuffer(0, 0, width, height,  
0, 0, width, height, GL\_COLOR\_BUFFER\_BIT, GL\_NEAREST);

Having trouble getting it to do much. I can’t get the commands for the geometry that I want to draw anything but a blank frame, but even if I fill a command buffer with a single NOP command, then I see the screen clear to red for the first frame, and all subsequent frames are black (same thing happens with the ‘real’ commands I want to try, or commands that just set the uniform buffer addresses but without any draw commands). I’d expected that with a single NOP command, the glDraw() command would ‘do nothing’ and I’d always see the frame cleared to red, but that seems to only happen for the first frame only.

I’ve tried removing the glDrawCommands and things work as they should - every frame is cleared to red, so the clear and blit seems to be working.

Anyone know what might be going on? Does a command buffer always need an actual draw command or a terminate or something somewhere in it? I am only trying to use the glDrawCommandsStatesAddressNV() and not the compiled command lists (which really wouldn’t be appropriate for this application). I have added debugging callbacks with glDebugMessageCallback but that doesn’t tell my I’m doing anything wrong (it does tell me things about the buffers I’ve created for storing geometry, I and I can do incorrect things deliberately, like not setting a framebuffer when capturing the state, and the debug extension reports errors). The gl\_commandlist\_\* samples posted on github do work for me. I’m using SDL as the windowing environment.

– Alex

---

<div class="post-metadata">

**Author:** ![alexbetts](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/alexbetts/32/70453_2.png) [@alexbetts](https://forums.developer.nvidia.com/u/alexbetts)\
**Post date:** [March 28, 2015, 10:04pm UTC](https://forums.developer.nvidia.com/t/help-with-nv-command-list/37411/2 "2015-03-28T22:04:26Z")

</div>

So what I’ve discovered since posting this and hacking on the NV\_command\_list examples that were posted on github:

- If in, say, basic-nvcommandlist.cpp, I remove the code that renders the user interface (TwDraw()), I see behavior similar to what I posted about originally - the first frame of the sample renders correctly, the contents of all subsequent frames are whatever the default framebuffer had been cleared to (as if the blit didn’t happen at all).

- If I remove the call to TwDraw() and insert some old time OpenGL code before or after the blit:

```auto
{
      NV_PROFILE_SECTION("Blit");
      glBindFramebuffer(GL_READ_FRAMEBUFFER, fbos.scene);
      glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
 
      glUseProgram(0);
      glBegin(GL_POINTS);
      glVertex3f(0, 0, 0);
      glEnd();
 
      glBlitFramebuffer(0,0,width,height,
        0,0,width,height,GL_COLOR_BUFFER_BIT, GL_NEAREST);
    }

```

…then the example works fine (sans UI; and for that matter, my own program works correctly after inserting this hack)

---

<div class="post-metadata">

**Author:** ![TnL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tnl/32/12504_2.png) [@TnL](https://forums.developer.nvidia.com/u/TnL)\
**Post date:** [April 1, 2015, 10:37pm UTC](https://forums.developer.nvidia.com/t/help-with-nv-command-list/37411/3 "2015-04-01T22:37:20Z")

</div>

Hi,  
That is correct. I recently bumped into this issue while trying to make “gl\_commandlist\_bk3d\_models” work under Linux. I canceled additional UI/overlays for simplifying the tests, drawing command-lists only… which exposed this bug to me.

The good new is that I narrowed down the issue in the driver and filed a bug few days ago. The fix is in the driver source code as we speak.  
Next Beta versions and next official drivers will have the fix.

Sorry for the inconvenience!  
Tristan

---

<div class="post-metadata">

**Author:** ![alexbetts](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/alexbetts/32/70453_2.png) [@alexbetts](https://forums.developer.nvidia.com/u/alexbetts)\
**Post date:** [April 1, 2015, 11:48pm UTC](https://forums.developer.nvidia.com/t/help-with-nv-command-list/37411/4 "2015-04-01T23:48:55Z")

</div>

Ah great, thank you. I did take this up on a forum at [OpenGL.org](http://OpenGL.org), and someone there actually hadn’t had these problems with their Linux setup:

> **[NV\_command\_list](https://community.khronos.org/t/nv-command-list/72887)**
>
> So, it’s been about a month since SIGGRAPH Asia and the release of NV\_command\_list. Looks pretty interesting. Anyone taken it for a spin yet? Thoughts? Also, has anyone seen Linux drivers supporting this new extension out there yet? Or an...

– Alex

---

<div class="post-metadata">

**Author:** ![cpic](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@cpic](https://forums.developer.nvidia.com/u/cpic)\
**Post date:** [November 29, 2019, 12:29pm UTC](https://forums.developer.nvidia.com/t/help-with-nv-command-list/37411/5 "2019-11-29T12:29:33Z")

</div>

Hi,

We have a similar issue with one of our Maya plugin using NV\_command\_list.  
When we use the extension, the Maya UIs using OpenGL in different windows are not redrawn.

I am using Driver Version: 418.74 on linux centos 7.4.

Was the fix deployed in the driver ? How can we assess this is the same bug ?

Thanks,

Cyril
