1.Accessing it from .net:
If you want to use new Direct3D 11 features compute shader among them from a managed world (.net) you have only one option I'm aware of:
I think Managed DirectX has not been updated and not likely so.. now all managed efforts seems directed towards the XNA platform which by the way doesn't support Direct3D11(does it?)
Nor Windows API code pack samples include 11 support..
So right now the only option is to use SlimDX August 2009 SDK..
For OpenCL you have at least:
OpenTK..
OpenCL.net
http://www.hoopoe-cloud.com/Solutions/OpenCL.NET/Default.aspx
2.Code samples:
There are quite some codes of Compute Shader usage.
Currently the August 2009 SDK has these Compute samples:
1) Array A + Array B
2) BC6H BC7 encoding/decoding using CS 4.0
3) Bitonic sort using CS 4.0
4) NBody systems
5) Order Independent Transparency
6) Adaptive Tessellation using CS 4.0
7) HDR Tone Mapping
Nvidia DirectCompute samples part of GPU Computing SDK.. (includes perhaps the most complex code right now in Nvidia Ocean demo which includes a high perf FFT implementation as part of it, though remember you have csx library from Microsoft which is better for general usage..)
See video of it!
Also search web for:
NLM denoise CS in beyond3d forums
3.Tutorials
Of course be sure to read documentation in the SDK for theory and examples in that for practice :-)
Anyway you have at least:
http://openvidia.sourceforge.net/index.php/DirectCompute
more links of tutorial among them:
http://www.gamedev.net/community/forums/topic.asp?topic_id=516043
and also
Direct3D 11 Programming Tip #6: Compute Shader Addressing
In chronological order you have this conferences with some presentations:
Beyond programmable shading Siggraph course
Siggraph 2008
Siggraph Asia 2008
Siggraph 2009
GTCO9
DirectCompute (Pre-Conference Tutorial)
Length 90 min
View Streamed Recording
Download Video
Abstract
DirectCompute adds the new “Compute Shader” to its API, making possible GPU computing within the familiar programming environment. Compute shaders provide the programmer with greater flexibility and features such as thread cooperation, shared memory, and unordered data access. In this talk, we’ll introduce the DirectCompute API by way of building simple examples from the ground up to illustrate the new processing possibilities of DirectCompute.SC09
Speaker: James Fung Developer Technology
I don't know if there is something in:
http://www.nvidia.com/sc09
PDC09
http://www.directx11tutorials.com/pdc-2009-talks
Blog with info about it:
http://blogs.microsoft.co.il/blogs/sasha/archive/2009/11/19/pdc-2009-day-3-directcompute-capturing-the-teraflop.aspx
4. D3DCSX:
Think of it as similar to CUDPP+CUFFT (is high perf lib with FFTs and some parallel primitives)
In order to use D3DCSX you'll need to include d3dcsx.h, link against d3dcsx.lib, and include d3dcsx_42.dll in your redist.
If you get d3dcsx.h compilation errors because the keyword __range cannot be recognized update the Windows SDK..
can be necessary if using the VS 2005 compiler.
5.
As much as I have done a recopilation of current bugs and issues in current OpenCL implementations I proceed to do the same for DirectCompute (all bugs I can find are compiler bugs so no AMD driver bugs?)..
The brief resume is:
For bugs, I've reported two and seen others on this forum: double precision inside dynamic loops always crashes the compiler, texture sampling instructions dropped entirely when cached into groupshared memory, requiring literals when indexing arrays inside structured buffers (but not broken for UAVs).
all can be found in
http://forums.xna.com/forums/t/41015.aspx
where advanced user also reports how hard is to get working state of the art CUDA kernels (radix sort,etc..)
Bug #1fxc not emitting texture load instruction
We recently found a bug where writing to multiple components when indexing within an element of a group shared array can result in those writes disappearing due to an internal error in the compiler. In order to work around it you can do this..
0 comments:
Post a Comment