Advertisement

DirectX12 : Synchronising Submitted Work

Started by October 02, 2020 04:11 PM
2 comments, last by advance-software 4 years, 4 months ago

Hi guys,

Have modified AMD's HelloD3D12 sample app to draw 2 quads next to each other using the same constant buffer with 2 different states. I'm aware I should instance the constant buffer for performance. The objective of the exercise is to understand synchronisation. Its not quite working as intended. Wondering if anyone can spot the error.

http://advance-software.com/misc/hellod3d12.zip

Specifics in void D3D12TexturedQuad::RenderImpl (ID3D12GraphicsCommandList * commandList)

Thanks in advance for any assistance.

I think the sync code looks alright (although could be better), but anyway, for what u r trying to achieve, a clear command is stored in the command list so the first quad is cleared.

Try to comment out this line of code:

void D3D12Sample::PrepareRender ()
{
....
//	commandList->ClearRenderTargetView (renderTargetHandle,
 clearColor, 0, nullptr);

and you'll see what happens.

I'll let you figure out how to improve the rest from here on.

That's it. All the best ?

Advertisement

Well spotted ?

Dropped a send/flush after the clear … result … blank screen ?

Sample code updated, same link.

Thanks.

This topic is closed to new replies.

Advertisement