Hash :
e58e77f5
Author :
Date :
2022-11-10T12:49:03
Support timestamp behind flag enableTimestampQueries All timestamp queries happen in the same disjoint query in one Context11. The whole design is that we start a disjoint query in D3D11 at the first timestamp request and keep it continuously running in current context. Only end it and read it back when the user queries if there is a disjoint. We cache the frequency and assume it doesn't change. For the first timestamp, we create a temporary D3D disjoint query and end it so we have a frequency to convert the ticks to nanoseconds. This task is taken over from https://chromium-review.googlesource.com/c/angle/angle/+/3694732 Bug: angleproject:7367 Change-Id: I747c9b00e10ac58362df66332efd01a24aa395f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4021139 Commit-Queue: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_features.py using data from d3d_features.json.
//
// Copyright 2022 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// FeaturesD3D_autogen.h: Features and workarounds for D3D driver bugs and other issues.
#ifndef ANGLE_PLATFORM_FEATURESD3D_H_
#define ANGLE_PLATFORM_FEATURESD3D_H_
#include "platform/Feature.h"
namespace angle
{
struct FeaturesD3D : FeatureSetBase
{
FeaturesD3D();
~FeaturesD3D();
FeatureInfo mrtPerfWorkaround = {
"mrtPerfWorkaround",
FeatureCategory::D3DWorkarounds,
"Some drivers have a bug where they ignore null render targets",
&members,
};
FeatureInfo setDataFasterThanImageUpload = {
"setDataFasterThanImageUpload",
FeatureCategory::D3DWorkarounds,
"Set data faster than image upload",
&members,
};
FeatureInfo zeroMaxLodWorkaround = {
"zeroMaxLodWorkaround",
FeatureCategory::D3DWorkarounds,
"Missing an option to disable mipmaps on a mipmapped texture",
&members,
};
FeatureInfo useInstancedPointSpriteEmulation = {
"useInstancedPointSpriteEmulation",
FeatureCategory::D3DWorkarounds,
"Some D3D11 renderers do not support geometry shaders for pointsprite emulation",
&members,
};
FeatureInfo depthStencilBlitExtraCopy = {
"depthStencilBlitExtraCopy", FeatureCategory::D3DWorkarounds,
"Bug in some drivers triggers a TDR when using CopySubresourceRegion from a staging "
"texture to a depth/stencil",
&members, "http://anglebug.com/1452"};
FeatureInfo expandIntegerPowExpressions = {
"expandIntegerPowExpressions",
FeatureCategory::D3DWorkarounds,
"The HLSL optimizer has a bug with optimizing 'pow' in certain integer-valued expressions",
&members,
};
FeatureInfo flushAfterEndingTransformFeedback = {
"flushAfterEndingTransformFeedback",
FeatureCategory::D3DWorkarounds,
"Some drivers sometimes write out-of-order results to StreamOut buffers when transform "
"feedback is used to repeatedly write to the same buffer positions",
&members,
};
FeatureInfo getDimensionsIgnoresBaseLevel = {
"getDimensionsIgnoresBaseLevel",
FeatureCategory::D3DWorkarounds,
"Some drivers do not take into account the base level of the "
"texture in the results of the HLSL GetDimensions builtin",
&members,
};
FeatureInfo preAddTexelFetchOffsets = {
"preAddTexelFetchOffsets",
FeatureCategory::D3DWorkarounds,
"HLSL's function texture.Load returns 0 when the parameter Location is negative, even if "
"the sum of Offset and Location is in range",
&members,
};
FeatureInfo emulateTinyStencilTextures = {
"emulateTinyStencilTextures",
FeatureCategory::D3DWorkarounds,
"1x1 and 2x2 mips of depth/stencil textures aren't sampled correctly",
&members,
};
FeatureInfo disableB5G6R5Support = {
"disableB5G6R5Support",
FeatureCategory::D3DWorkarounds,
"Textures with the format "
"DXGI_FORMAT_B5G6R5_UNORM have incorrect data",
&members,
};
FeatureInfo rewriteUnaryMinusOperator = {
"rewriteUnaryMinusOperator",
FeatureCategory::D3DWorkarounds,
"Evaluating unary minus operator on integer may get wrong answer in vertex shaders",
&members,
};
FeatureInfo emulateIsnanFloat = {"emulateIsnanFloat", FeatureCategory::D3DWorkarounds,
"Using isnan() on highp float will get wrong answer", &members,
"https://crbug.com/650547"};
FeatureInfo callClearTwice = {"callClearTwice", FeatureCategory::D3DWorkarounds,
"Using clear() may not take effect", &members,
"https://crbug.com/655534"};
FeatureInfo useSystemMemoryForConstantBuffers = {
"useSystemMemoryForConstantBuffers", FeatureCategory::D3DWorkarounds,
"Copying from staging storage to constant buffer "
"storage does not work",
&members, "https://crbug.com/593024"};
FeatureInfo selectViewInGeometryShader = {
"selectViewInGeometryShader",
FeatureCategory::D3DWorkarounds,
"The viewport or render target slice will be selected in the geometry shader stage for "
"the ANGLE_multiview extension",
&members,
};
FeatureInfo addMockTextureNoRenderTarget = {
"addMockTextureNoRenderTarget", FeatureCategory::D3DWorkarounds,
"On some drivers when rendering with no render target, two bugs lead to incorrect behavior",
&members, "http://anglebug.com/2152"};
FeatureInfo skipVSConstantRegisterZero = {
"skipVSConstantRegisterZero",
FeatureCategory::D3DWorkarounds,
"In specific cases the driver doesn't handle constant register zero correctly",
&members,
};
FeatureInfo forceAtomicValueResolution = {
"forceAtomicValueResolution", FeatureCategory::D3DWorkarounds,
"On some drivers the return value from RWByteAddressBuffer.InterlockedAdd does not resolve "
"when used in the .yzw components of a RWByteAddressBuffer.Store operation",
&members, "http://anglebug.com/3246"};
FeatureInfo allowClearForRobustResourceInit = {
"allowClearForRobustResourceInit", FeatureCategory::D3DWorkarounds,
"Some drivers corrupt texture data when clearing for robust resource initialization.",
&members, "http://crbug.com/941620"};
FeatureInfo allowTranslateUniformBlockToStructuredBuffer = {
"allowTranslateUniformBlockToStructuredBuffer", FeatureCategory::D3DWorkarounds,
"There is a slow fxc compile performance issue with dynamic uniform indexing if "
"translating a uniform block with a large array member to cbuffer.",
&members, "http://anglebug.com/3682"};
FeatureInfo allowES3OnFL100 = {
"allowES3OnFL100",
FeatureCategory::D3DWorkarounds,
"Allow ES3 on 10.0 devices",
&members,
};
FeatureInfo disableRasterizerOrderViews = {
"disableRasterizerOrderViews", FeatureCategory::D3DWorkarounds, "Disable ROVs for testing",
&members, "http://anglebug.com/7279"};
FeatureInfo enableTimestampQueries = {
"enableTimestampQueries",
FeatureCategory::D3DWorkarounds,
"Enable timestamp on GL_EXT_disjoint_timer_query extension",
&members,
};
};
inline FeaturesD3D::FeaturesD3D() = default;
inline FeaturesD3D::~FeaturesD3D() = default;
} // namespace angle
#endif // ANGLE_PLATFORM_FEATURESD3D_H_