Advertisement

Optimizing compute shader, many textures

Started by June 23, 2018 03:54 AM
2 comments, last by MikhailGorobets 6 years, 7 months ago

I can't find this information anywhere on the web and I'm wondering about specific optimization... Let's say I have hundreds of 3D textures which I need to process separately in compute shader. Each invocation needs different data in constant buffer BUT many of the 3d textures don't need to update their CB contents every frame. Would it be better to create just one CB resource, bind just once at startup and in loop map the data for each consecutive shader invocation or would it be better to create like hundreds of separate CB resources, map them only when needed and just bind appropriate CB before each shader invocation? This depends on how exacly are those resources managed internally in DirectX and what does binding actually do... I would be very grateful if somebody shared their experience!

Not a Music & Sound question, moving you to the Graphics forum. :)

In addition, I'm going to edit your title to reflect the question.

- Jason Astle-Adams

Advertisement

 

I think it's better to create one buffer and update it. This take less time for synchronizing between CPU and GPU

This topic is closed to new replies.

Advertisement