I wanted to see how others are currently handling descriptor heap updates and management.
I've read a few articles and there tends to be three major strategies :
1 ) You split up descriptor heaps per shader stage ( i.e one for vertex shader , pixel , hull, etc)
2) You have one descriptor heap for an entire pipeline
3) You split up descriptor heaps for update each update frequency (i.e EResourceSet_PerInstance , EResourceSet_PerPass , EResourceSet_PerMaterial, etc)
The benefits of the first two approaches is that it makes it easier to port current code, and descriptor / resource descriptor management and updating tends to be easier to manage, but it seems to be not as efficient.
The benefits of the third approach seems to be that it's the most efficient because you only manage and update objects when they change.
I want to copy just 1 mipmap level of a texture and I am doing like this:
0, 0, 0,
- pDstData : is DEFAULT_HEAP, pSrcData is UPLOAD_HEAP(buffer size was get by GetCopyableFootprints from pDstData with highest miplevel), pLayout is D3D12_PLACED_SUBRESOURCE_FOOTPRINT
- I think the mipmapIndex will point the exact location data of Dest texture, but does it know where to get data location from Src texture because pLayout just contain info of this mipmap(Offset and Footprint). (???)
- pLayout has a member name Offset, and I try to modify it but it(Offset) need 512 Alignment but real offset in Src texture does not.
So what I need to do to match the location of mip texture in Src Texture ?
I am wondering if there is a way to find out how many resources you could bind to the command list directly without putting them in a descriptor table.
Specifically, I am referring to these guys:
I remember from early presentations on D3D12 that the count of allowed resources is hardware dependent and quite small. But I would like to learn some more concrete figures.
I am trying to set up my sampler correctly so that textures are filtered the way I want. I want to use linear filtering for both min and mag, and I don't want to use any mipmap at all.
To make sure that mipmap is turned off I set the MipLevels to 1 for my textures.
For the sampler filter I have tried all kind of combinations, but somehow the mag filter works fine while the min filter doesn't seem to work at all. As I zoom out there seems to be a nearest point filter.
Is there a catch in Dx12 that makes my min filter not working?
Do I need to filter manually in my shader? I don't think so since the mag filter works correctly.
My pixel shader is just a simple texture lookup:
My sampler setup looks like this (SharpDX):
sampler = new StaticSamplerDescription()
Filter = Filter.MinMagLinearMipPoint,
AddressU = TextureAddressMode.Wrap,
AddressV = TextureAddressMode.Wrap,
AddressW = TextureAddressMode.Wrap,
ComparisonFunc = Comparison.Never,
BorderColor = StaticBorderColor.TransparentBlack,
ShaderRegister = 0,
RegisterSpace = 0,
ShaderVisibility = ShaderVisibility.Pixel,
Does anyone have a working example of how to implement MSAA in DX12? I have read short descriptions and I have seen code fragments on how to do it with DirectX Tool Kit.
I get the idea, but with all the pipeline states, root descriptions etc I somehow get lost on the way.
Could someone help me with a link pointing to a small implementation in DirectX 12 (or SharpDX with DX12)?