Edit

Share via


D1159: Invalid Commandlist Topology

A command list cannot reference effects which are part of effect graphs that consume the command list.

 

Possible Causes

While populating a command list, an application may include a call to ID2D1DeviceContext::DrawImage. ID2D1DeviceContext::DrawImage may be used to draw bitmaps, effects or command lists. As a consequence, it is syntactically possible for an ID2D1DeviceContext::DrawImage call to attempt to draw a command list while that same command list is set as a target. Self-referencing command lists in this manner, however, is not valid. Direct2D will identify cases in which this occurs and report an error, and the debug layer will output this message.

Possible Fixes

While populating a command list, ensure that a device context does not issue any operation which consumes that same command list. The most obvious way in which this can happen is to call ID2D1DeviceContext::DrawImage with the same command list which is set as the target. However, there are also less obvious ways in which this may occur: an ID2D1DeviceContext::DrawImage may refer to an effect graph, and one node in the effect graph may attempt to consume the target command list. Ensure that command lists are populated correctly before use, and that calls to ID2D1DeviceContext::SetTarget refer to the intended target.