🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

DirectX12 : Synchronising Submitted Work

Started by
2 comments, last by advance-software 3 years, 9 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.

Advertisement

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 ?

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