Does DirectX 12 eliminate the need for texture atlasing? -


i remember when saw initial talks on directx 12, thought eliminated need texture atlasing. doesn't seem obvious conclusion i'm going through documentation.

one feature have seen replace dynamic non-uniform indexing of resource arrays in hlsl:

texture2d<float4> textures[128]; samplerstate sampler;  textures[nonuniformresourceindex(textureindex)].sample(sampler, uv); 

another potential feature executeindirect, encodes still bunch of separate draw , resource changes calls buffer , submits gpu @ once, in single cpu call.

both of these address limitations of texture atlases (inability use border modes on atlas regions, problematic mipmapping), i'm wondering if performance characteristics or expected similar texture atlasing or if technique still justified.

i'm curious know if answer generalizes mantle, vulkan , metal.

the short answer yes, long answer maybe there cases atlas have slight performance advantage.

with dx12 , vulkan, can forget mantle. current representation of texture descriptors close metal, using bindless not involve performance penalty , texture fetch of regular texture or bindless 1 same on current hardware, , better in future way go.

on nvidia, there absolutely no penalty, , nonuniformresourceindex not requirement architecture, bindless work.

on amd, nonuniformresourceindex has shader code generation implication may have cost if multiply them , better avoid them. ideally, not use draw calls using more 1 index @ time (in 1 instance or cross instance). because gpu use combination of vector , scalar registers. texture , sampler descriptors loaded in scalar registers. if have divergent index texture, can't work properly. nonuniformresourceindex thing generating loop on active threads, consuming indices, masking thread , fetch, looping until has proceed threads. disregarding these consideration, bindless texture use same system regular binding.

executeindirect deal, not optimize in drivers, more games coming dx12 engines, improve. api open door gpu culling , many solutions reduce more cpu work. on xbox one, possible change pipelinestateobject it.


Comments