Graphics hardware diversity A unified 3D API • HLSL shader programming • Low-precision and high-precision ops • Consistent implementation on all devices.

Download Report

Transcript Graphics hardware diversity A unified 3D API • HLSL shader programming • Low-precision and high-precision ops • Consistent implementation on all devices.

Graphics hardware diversity
A unified 3D API
• HLSL shader programming
• Low-precision and high-precision ops
• Consistent implementation on all devices
•
•
•
•
•
•
•
•
•
•
Vertex Shaders
Pixel Shaders
8 Textures
4 RenderTargets
Cube Maps
Volume textures
Anisotropic filtering
Anti-Aliasing
HDR rendering
Texture Compression
•
•
•
•
•
•
•
•
•
•
Vertex Shaders
Pixel Shaders
8 Textures
4 RenderTargets
Cube Maps
Volume textures
Anisotropic filtering
Anti-Aliasing
HDR rendering
Texture Compression
•
•
•
•
•
•
•
•
•
•
•
Geometry Shaders
Stream-Out
128 Textures per shader
8 RenderTargets
Integers in shaders
Vertex textures
Shader sampling
Constant Buffers
Alpha-to-Coverage
Basic DirectCompute
Asynch Resource Creation
Feature level 11
(Available on DX11 and above hardware)
•
•
•
•
•
•
•
•
•
•
Vertex Shaders
Pixel Shaders
8 Textures
4 RenderTargets
Cube Maps
Volume textures
Anisotropic filtering
Anti-Aliasing
HDR rendering
Texture Compression
•
•
•
•
•
•
•
•
•
•
•
Geometry Shaders
•
Stream-Out
•
128 Textures per shader •
8 RenderTargets
•
Integers in shaders
•
Vertex textures
Shader sampling
Constant Buffers
Alpha-to-Coverage
Basic DirectCompute
Asynch Resource Creation
Full DirectCompute
Random Access Writes
Tessellation Shaders
New compression formats
Shader Linkage
ComPtr<ID3D11Device>
ComPtr<ID3D11DeviceContext>
nullptr
// use the default adapter
// use 0 unless a software device
// defined above
// what app will support
//
//
//
//
should always be D3D11_SDK_VERSION
created device
feature level of the device
corresponding immediate context
Tuning for broadest reach
DX 9
DX 10
DX 10.1
DX 11
DX 11.1
static const
Texture2D
float4
register
// Gather 16 adjacent pixels (each bilinear sample reads a 2x2 region)
// Brightness thresholding
static const
Texture2D
float4
register
// Gather 16 adjacent pixels (each bilinear sample reads a 2x2 region)
// Brightness thresholding
CommandBuffer1
Command1
Command2
Command3
Command4
Command5
Command6
CommandBuffer2
Command1
Command2
Command3
Command4
Command5
Command6
CommandBuffer3
Command1
Command2
Command3
Command4
Command5
Command6
CommandBuffer1
Command1
Command2
Command3
Command4
Command5
Command6
CommandBuffer2
Command1
Command2
Command3
Command4
Command5
Command6
CommandBuffer3
Command1
Command2
Command3
Command4
Command5
Command6
• GPUs with a tile based rendering architecture can get a
performance boost with a special flag
m_swapChain->Present(1, 0);
// present the image on the display
ComPtr<ID3D11View> view;
m_renderTargetView.As(&view)
// get the view on the RT
m_d3dContext->DiscardView(view.Get());
// release the view
Conclusion
Direct3D 11.1 Features
D3D11_FEATURE_DATA_D3D11_OPTIONS structure
DXGIAdapter2::GetDesc2 method
DXGI 1.2 Improvements
Creating a DirectX Game
•
•
•
•
•
Unlocking the GPU with Direct3D (PDC 2008)
Direct3D on Downlevel Hardware (MSDN)
10Level9 ID3D11Device Methods (MSDN)
10Level9 ID3D11DeviceContext Methods (MSDN)
Hardware Support for Direct3D 10Level9 Formats (MSDN)
http://forums.dev.windows.com
http://forums.dev.windows.com
http://bldw.in/SessionFeedback