Skip to content

Commit 9b332c2

Browse files
authored
Move graphics diagnostics docs to a new subdir (#264)
1 parent 708ace5 commit 9b332c2

File tree

174 files changed

+4591
-4446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+4591
-4446
lines changed
Lines changed: 2 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,3 @@
11
---
2-
title: "0x-2x-4x MSAA Variants | Microsoft Docs"
3-
ms.custom: ""
4-
ms.date: "11/04/2016"
5-
ms.reviewer: ""
6-
ms.suite: ""
7-
ms.technology:
8-
- "vs-ide-debug"
9-
ms.tgt_pltfrm: ""
10-
ms.topic: "article"
11-
ms.assetid: 668a6603-5082-4c78-98e6-f3dc871aa55b
12-
caps.latest.revision: 8
13-
author: "mikejo5000"
14-
ms.author: "mikejo"
15-
manager: "ghogen"
16-
translation.priority.ht:
17-
- "cs-cz"
18-
- "de-de"
19-
- "es-es"
20-
- "fr-fr"
21-
- "it-it"
22-
- "ja-jp"
23-
- "ko-kr"
24-
- "pl-pl"
25-
- "pt-br"
26-
- "ru-ru"
27-
- "tr-tr"
28-
- "zh-cn"
29-
- "zh-tw"
30-
---
31-
# 0x/2x/4x MSAA Variants
32-
Overrides multi-sample anti-aliasing (MSAA) settings on all render targets and swap chains.
33-
34-
## Interpretation
35-
Multi-sample anti-aliasing increases visual quality by taking samples at multiple locations in each pixel; greater levels of MSAA take more samples, and without MSAA, only one sample is taken from the pixel's center. Enabling MSAA in your app usually has a modest but noticeable cost in rendering performance, but under certain workloads or on certain GPUs, it can be had with almost no impact.
36-
37-
If your app already has MSAA enabled, then the lesser MSAA variants indicate the relative performance cost that the existing, higher-level MSAA incurs. In particular, the 0x MSAA variant indicates the relative performance of your app without MSAA.
38-
39-
If your app doesn't already have MSAA enabled, then the 2x MSAA and 4x MSAA variants indicate the relative performance cost of enabling them in your app. When the cost is acceptably low, consider enabling MSAA to enhance the image quality of your app.
40-
41-
> [!NOTE]
42-
> Your hardware might not fully support MSAA for all formats. If any of these variants encounter a hardware limitation that can't be worked around, its column in the performance summary table is blank and an error message is produced.
43-
44-
## Remarks
45-
These variants override the sample count and sample-quality arguments on calls to `ID3DDevice::CreateTexture2D` that create render targets. Specifically, these parameters are overridden when:
46-
47-
- The `D3D11_TEXTURE2D_DESC` object passed in `pDesc` describes a render target; that is:
48-
49-
- The BindFlags member has either the D3D11_BIND_TARGET flag or D3D11_BIND_DEPTH_STENCIL flag set.
50-
51-
- The Usage member is set to D3D11_USAGE_DEFAULT.
52-
53-
- The CPUAccessFlags member is set to 0.
54-
55-
- The MipLevels member is set to 1.
56-
57-
- The device supports the requested sample count (0, 2, or 4) and sample quality (0) for the requested render target format (D3D11_TEXTURE2D_DESC::Format member), as determined by `ID3D11Device::CheckMultisampleQualityLevels`.
58-
59-
If the D3D11_TEXTURE2D_DESC::BindFlags member has the D3D_BIND_SHADER_RESOUCE or D3D11_BIND_UNORDERED_ACCESS flags set, then two versions of the texture are created; the first has these flags cleared for use as the render target, and the other is a non-MSAA texture that has these flags left intact to act as a resolve buffer for the first version. This is necessary because using an MSAA texture as a shader resource or for unordered access is unlikely to be valid—for example, a shader acting on it would generate incorrect results because it would expect a non-MSAA texture. If the variant has created the secondary non-MSAA texture, then whenever the MSAA render target is unset from the device context, its contents are resolved into the non-MSAA texture. Likewise, whenever the MSAA render target should be bound as a shader resource, or is used in an unordered access view, the resolved non-MSAA texture is bound instead.
60-
61-
These variants also override MSAA settings on all swap chains created by using `IDXGIFactory::CreateSwapChain`, `IDXGIFactory2::CreateSwapChainForHwnd`, `IDXGIFactory2::CreateSwapChainForCoreWindow`, `IDXGIFactory2::CreateSwapChainForComposition`, and `ID3D11CreateDeviceAndSwapChain`.
62-
63-
The net effect of these changes is that all rendering is done to an MSAA render target, but if your application uses one of these render targets or swap-chain buffers as a shader resource view or unordered access view, then data is sampled from the resolved, non-MSAA copy of the render target.
64-
65-
## Restrictions and limitations
66-
In Direct3D11, MSAA textures are more restricted than non-MSAA textures. For example, you can't call `ID3D11DeviceContext::UpdateSubresource` on an MSAA texture, and calling `ID3D11DeviceContext::CopySubresourceRegion` fails if the sample count and sample quality of the source resource and destination resource don't match, which can occur when this variant overrides the MSAA settings of one resource but not the other.
67-
68-
When playback detects these kinds of conflicts, it makes a best effort to replicate the intended behavior, but it might not be possible to match its results exactly. Although it's uncommon for this to affect the performance of these variants in a way that misrepresents their impact, it is possible—for example, when flow control in a pixel shader is determined by the precise content of a texture—because the replicated texture might not have identical contents.
69-
70-
## Example
71-
These variants can be reproduced for render targets created by using `ID3D11Device::CreateTexture2D` by using code like this:
72-
73-
```
74-
D3D11_TEXTURE2D_DESC target_description;
75-
target_description.BindFlags = D3D11_BIND_RENDER_TARGET;
76-
target_description.SampleDesc.Count = 4; // 4x MSAA, can be 2 or 0 instead
77-
target_description.SampleDesc.Quality = 0;
78-
d3d_device->CreateTexture2D(&target_description, nullptr, &render_target);
79-
```
80-
81-
## Example
82-
Or for swap chains created by using IDXGISwapChain::CreateSwapChain or D3D11CreateDeviceAndSwapChain by using code like this:
83-
84-
```
85-
DXGI_SWAP_CHAIN_DESC chain_description;
86-
chain_description.SampleDesc.Count = 4; // 4x MSAA, can be 2 or 0 instead
87-
chain_description.SampleDesc.Quality = 0;
88-
89-
// Call IDXGISwapChain::CreateSwapChain or D3D11CreateDeviceAndSwapChain, etc.
90-
```
2+
redirect_url: /visualstudio/debugger/graphics/0x-2x-4x-msaa-variants
3+
---
Lines changed: 2 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,3 @@
11
---
2-
title: "16bpp Render Target Format Variant | Microsoft Docs"
3-
ms.custom: ""
4-
ms.date: "11/04/2016"
5-
ms.reviewer: ""
6-
ms.suite: ""
7-
ms.technology:
8-
- "vs-ide-debug"
9-
ms.tgt_pltfrm: ""
10-
ms.topic: "article"
11-
ms.assetid: 24b22ad9-5ad0-4161-809a-9b518eb924bf
12-
caps.latest.revision: 5
13-
author: "mikejo5000"
14-
ms.author: "mikejo"
15-
manager: "ghogen"
16-
translation.priority.ht:
17-
- "cs-cz"
18-
- "de-de"
19-
- "es-es"
20-
- "fr-fr"
21-
- "it-it"
22-
- "ja-jp"
23-
- "ko-kr"
24-
- "pl-pl"
25-
- "pt-br"
26-
- "ru-ru"
27-
- "tr-tr"
28-
- "zh-cn"
29-
- "zh-tw"
30-
---
31-
# 16bpp Render Target Format Variant
32-
Sets the pixel format to DXGI_FORMAT_B5G6R5_UNORM for all render targets and back buffers.
33-
34-
## Interpretation
35-
A render target or back buffer typically uses a 32bpp (32 bits per pixel) format such as B8G8R8A8_UNORM. 32bpp formats can consume a lot of memory bandwidth. Because the B5G6R5_UNORM format is a 16bpp format that's half the size of 32bpp formats, using it can relieve pressure on memory bandwidth, but at the cost of reduced color fidelity.
36-
37-
If this variant shows a large performance gain, it likely indicates that your app consumes too much memory bandwidth. Performance gains can be especially pronounced when the profiled frame suffers from a significant amount of overdraw or contains a lot of alpha-blending.
38-
39-
If the kinds of scenes that are rendered by your app don't require high-fidelity color reproduction, don't require the render target to have an alpha channel, and don't often contain smooth gradients—which are susceptible to banding artifacts under reduced color fidelity—consider using a 16bpp render target format to reduce memory bandwidth usage.
40-
41-
If the scenes that are rendered in your app require high-fidelity color reproduction or an alpha channel, or smooth gradients are common, consider other strategies to reduce memory bandwidth usage—for example, reducing the amount of overdraw or alpha-blending, reducing the dimensions of the framebuffer, or modifying texture resources to consume less memory bandwidth by enabling compression or reducing their dimensions. As usual, you have to consider the image quality trade-offs that come with any of these optimizations.
42-
43-
If your app would benefit from switching to a 16bpp back buffer but it's a part of your swap chain, you have to take additional steps because DXGI_FORMAT_B5G6R5_UNORM is not a supported back buffer format for swap chains created by using `D3D11CreateDeviceAndSwapChain` or `IDXGIFactory::CreateSwapChain`. Instead, you have to create a B5G6R5_UNORM format render target by using `CreateTexture2D` and render to that instead. Then, before you call Present on your swap chain, copy the render target onto the swap-chain backbuffer by drawing a full-screen quad with the render target as your source texture. Although this is an extra step that will consume some memory bandwidth, most rendering operations will consume less bandwidth because they affect the 16bpp render target; if this saves more bandwidth than is consumed by copying the render target to the swap-chain backbuffer, then rendering performance is improved.
44-
45-
GPU architectures that use tiled rendering techniques can see significant performance benefits by using a 16bpp framebuffer format because a larger portion of the framebuffer can fit in each tile's local framebuffer cache. Tiled rendering architectures are sometimes found in GPUs in mobile handsets and tablet computers; they rarely appear outside of this niche.
46-
47-
## Remarks
48-
The render target format is reset to DXGI_FORMAT_B5G6R5_UNORM on every call to `ID3D11Device::CreateTexture2D` that creates a render target. Specifically, the format is overridden when the D3D11_TEXTURE2D_DESC object passed in pDesc describes a render target; that is:
49-
50-
- The BindFlags member has the D3D11_BIND_REDNER_TARGET flag set.
51-
52-
- The BindFlags member has the D3D11_BIND_DEPTH_STENCIL flag cleared.
53-
54-
- The Usage member is set to D3D11_USAGE_DEFAULT.
55-
56-
## Restrictions and limitations
57-
Because the B5G6R5 format doesn't have an alpha channel, alpha content is not preserved by this variant. If your app's rendering requires an alpha channel in your render target, you can't just switch to the B5G6R5 format.
58-
59-
## Example
60-
The **16bpp Render Target Format** variant can be reproduced for render targets created by using `CreateTexture2D` by using code like this:
61-
62-
```
63-
D3D11_TEXTURE2D_DESC target_description;
64-
65-
target_description.BindFlags = D3D11_BIND_RENDER_TARGET;
66-
target_description.Format = DXGI_FORMAT_B5G6R5_UNORM;
67-
d3d_device->CreateTexture2D(&target_description, nullptr, &render_target);
68-
```
2+
redirect_url: /visualstudio/debugger/graphics/16bpp-render-target-format-variant
3+
---
Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,3 @@
11
---
2-
title: "1x1 Viewport Size Variant | Microsoft Docs"
3-
ms.custom: ""
4-
ms.date: "11/04/2016"
5-
ms.reviewer: ""
6-
ms.suite: ""
7-
ms.technology:
8-
- "vs-ide-debug"
9-
ms.tgt_pltfrm: ""
10-
ms.topic: "article"
11-
ms.assetid: 3dbc3247-00f5-4644-8ff9-72e9febcf09a
12-
caps.latest.revision: 6
13-
author: "mikejo5000"
14-
ms.author: "mikejo"
15-
manager: "ghogen"
16-
translation.priority.ht:
17-
- "cs-cz"
18-
- "de-de"
19-
- "es-es"
20-
- "fr-fr"
21-
- "it-it"
22-
- "ja-jp"
23-
- "ko-kr"
24-
- "pl-pl"
25-
- "pt-br"
26-
- "ru-ru"
27-
- "tr-tr"
28-
- "zh-cn"
29-
- "zh-tw"
30-
---
31-
# 1x1 Viewport Size Variant
32-
Reduces the viewport dimensions on all render targets to 1x1 pixels.
33-
34-
## Interpretation
35-
A smaller viewport reduces the number of pixels that must be shaded, but doesn't reduce the number of vertices that must be processed. Setting the viewport dimensions to 1x1 pixels effectively eliminates pixel-shading from your app.
36-
37-
If this variant shows a large performance gain, it might indicate that your app consumes too much fillrate. This can indicate that the resolution you have chosen is too high for the target platform or that your app spends significant time shading pixels that are later overwritten (overdraw). This result suggests that decreasing the size of your framebuffer or reducing the amount of overdraw will improve your app's performance.
38-
39-
## Remarks
40-
The viewport dimensions are reset to 1x1 pixels after every call to `ID3D11DeviceContext::OMSetRenderTargets` or `ID3D11DeviceContext::RSSetViewports`.
41-
42-
## Example
43-
This variant can be reproduced by using code like this:
44-
45-
```
46-
D3D11_VIEWPORT viewport;
47-
viewport.TopLeftX = 0;
48-
viewport.TopLeftY = 0;
49-
viewport.Width = 1;
50-
viewport.Height = 1;
51-
d3d_context->RSSetViewports(1, &viewport);
52-
```
2+
redirect_url: /visualstudio/debugger/graphics/1x1-viewport-size-variant
3+
---

docs/debugger/TOC.md

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -234,53 +234,7 @@
234234
### [How to: Debug Native DLLs](how-to-debug-native-dlls.md)
235235
### [How to: Debug Injected Code](how-to-debug-injected-code.md)
236236
## [Debugging GPU Code](debugging-gpu-code.md)
237-
## [Visual Studio Graphics Diagnostics](visual-studio-graphics-diagnostics.md)
238-
### [Overview of Visual Studio Graphics Diagnostics](overview-of-visual-studio-graphics-diagnostics.md)
239-
### [Getting Started with Visual Studio Graphics Diagnostics](getting-started-with-visual-studio-graphics-diagnostics.md)
240-
### [Capturing Graphics Information](capturing-graphics-information.md)
241-
### [GPU Usage](gpu-usage.md)
242-
### [Graphics Log Document](graphics-log-document.md)
243-
### [Graphics Frame Analysis](graphics-frame-analysis.md)
244-
#### [1x1 Viewport Size Variant](1x1-viewport-size-variant.md)
245-
#### [0x-2x-4x MSAA Variants](0x-2x-4x-msaa-variants.md)
246-
#### [Point, Bilinear, Trilinear, and Anisotropic Texture Filtering Variants](point-bilinear-trilinear-and-anisotropic-texture-filtering-variants.md)
247-
#### [16bpp Render Target Format Variant](16bpp-render-target-format-variant.md)
248-
#### [Mip-map Generation Variant](mip-map-generation-variant.md)
249-
#### [Half-Quarter Texture Dimensions Variant](half-quarter-texture-dimensions-variant.md)
250-
#### [BC Texture Compression Variant](bc-texture-compression-variant.md)
251-
### [Graphics Event List](graphics-event-list.md)
252-
### [Graphics State](graphics-state.md)
253-
### [Graphics Pipeline Stages](graphics-pipeline-stages.md)
254-
### [Graphics Event Call Stack](graphics-event-call-stack.md)
255-
### [Graphics Pixel History](graphics-pixel-history.md)
256-
### [Graphics Object Table](graphics-object-table.md)
257-
### [HLSL Shader Debugger](hlsl-shader-debugger.md)
258-
### [Command-Line Capture Tool](command-line-capture-tool.md)
259-
### [Graphics Diagnostics Examples](graphics-diagnostics-examples.md)
260-
#### [Walkthrough: Capturing Graphics Information](walkthrough-capturing-graphics-information.md)
261-
#### [Walkthrough: Capturing Graphics Information Programmatically](walkthrough-capturing-graphics-information-programmatically.md)
262-
#### [Walkthrough: Missing Objects Due to Device State](walkthrough-missing-objects-due-to-device-state.md)
263-
#### [Walkthrough: Missing Objects Due to Vertex Shading](walkthrough-missing-objects-due-to-vertex-shading.md)
264-
#### [Walkthrough: Missing Objects Due to Misconfigured Pipeline](walkthrough-missing-objects-due-to-misconfigured-pipeline.md)
265-
#### [Walkthrough: Debugging Rendering Errors Due to Shading](walkthrough-debugging-rendering-errors-due-to-shading.md)
266-
#### [Walkthrough: Using Graphics Diagnostics to Debug a Compute Shader](walkthrough-using-graphics-diagnostics-to-debug-a-compute-shader.md)
267-
#### [How to: Change the Graphics Diagnostics Playback Machine](how-to-change-the-graphics-diagnostics-playback-machine.md)
268-
#### [How to: Use Graphics Diagnostics with an ARM Device](how-to-use-graphics-diagnostics-with-an-arm-device.md)
269-
### [Reference (Programmatic Capture)](reference-programmatic-capture.md)
270-
#### [VsgDbg Class](vsgdbg-class.md)
271-
##### [VsgDbg::VsgDbg (Constructor)](vsgdbg-vsgdbg-constructor.md)
272-
##### [VsgDbg::~VsgDbg (Destructor)](vsgdbg-tilde-vsgdbg-destructor.md)
273-
##### [AddMessage](addmessage.md)
274-
##### [BeginCapture](begincapture.md)
275-
##### [CaptureCurrentFrame](capturecurrentframe.md)
276-
##### [Copy (Programmatic Capture)](copy-programmatic-capture.md)
277-
##### [EndCapture](endcapture.md)
278-
##### [Init](init.md)
279-
##### [ToggleHUD](togglehud.md)
280-
##### [UnInit](uninit.md)
281-
#### [DONT_SAVE_VSGLOG_TO_TEMP](dont-save-vsglog-to-temp.md)
282-
#### [VSG_DEFAULT_RUN_FILENAME](vsg-default-run-filename.md)
283-
#### [VSG_NODEFAULT_INSTANCE](vsg-nodefault-instance.md)
237+
## [Graphics Diagnostics](graphics/TOC.md)
284238
## [Debugging Web Applications and Script](debugging-web-applications-and-script.md)
285239
### [Debugging ASP.NET and AJAX Applications](debugging-aspnet-and-ajax-applications.md)
286240
#### [Preparing to Debug ASP.NET](preparing-to-debug-aspnet.md)

docs/debugger/addmessage.md

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,3 @@
11
---
2-
title: "AddMessage | Microsoft Docs"
3-
ms.custom: ""
4-
ms.date: "11/04/2016"
5-
ms.reviewer: ""
6-
ms.suite: ""
7-
ms.technology:
8-
- "vs-ide-debug"
9-
ms.tgt_pltfrm: ""
10-
ms.topic: "article"
11-
ms.assetid: 102a0404-a00c-4566-93f3-01bc8df63280
12-
caps.latest.revision: 5
13-
author: "mikejo5000"
14-
ms.author: "mikejo"
15-
manager: "ghogen"
16-
translation.priority.ht:
17-
- "de-de"
18-
- "es-es"
19-
- "fr-fr"
20-
- "it-it"
21-
- "ja-jp"
22-
- "ko-kr"
23-
- "ru-ru"
24-
- "zh-cn"
25-
- "zh-tw"
26-
translation.priority.mt:
27-
- "cs-cz"
28-
- "pl-pl"
29-
- "pt-br"
30-
- "tr-tr"
31-
---
32-
# AddMessage
33-
Adds a custom message to the graphics diagnostics *HUD* (Head-Up Display).
34-
35-
## Syntax
36-
37-
```C++
38-
void AddMessage(
39-
wchar_t const * szMessage
40-
);
41-
```
42-
43-
#### Parameters
44-
`szMessage`
45-
The message to be added to the HUD.
46-
47-
## Remarks
48-
The graphics diagnostics HUD is displayed in the upper-left corner of the app that's running under graphics diagnostics. It displays run-time information about the app and about graphics information capture, and messages that are added by calling this function.
49-
50-
To add a message to the HUD, you don't have to be actively capturing graphics information—that is, a message can be added through an instance of the `VsgDbg` class, but the [Init](../debugger/init.md) member function does not to be called first. Messages are only displayed in the HUD, they are not recorded in the graphics log file.
2+
redirect_url: /visualstudio/debugger/graphics/addmessage
3+
---

0 commit comments

Comments
 (0)