Skip to content

Commit 1f20688

Browse files
committed
[NFC] Edit shader flag comments for clarity
1 parent 5ff9cbc commit 1f20688

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

include/dxc/DXIL/DxilConstants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ inline bool UpdateToMaxOfVersions(unsigned &major, unsigned &minor,
7676
return false;
7777
}
7878

79-
// Shader flags.
79+
// Global shader flags
8080
const unsigned kDisableOptimizations =
8181
0x00000001; // D3D11_1_SB_GLOBAL_FLAG_SKIP_OPTIMIZATION
8282
const unsigned kDisableMathRefactoring =

include/dxc/DXIL/DxilShaderFlags.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,22 @@ class ShaderFlags {
227227
m_bDisableMathRefactoring : 1; //~D3D10_SB_GLOBAL_FLAG_REFACTORING_ALLOWED
228228
unsigned
229229
m_bEnableDoublePrecision : 1; // D3D11_SB_GLOBAL_FLAG_ENABLE_DOUBLE_PRECISION_FLOAT_OPS
230+
// SHADER_FEATURE_DOUBLES
230231
unsigned
231232
m_bForceEarlyDepthStencil : 1; // D3D11_SB_GLOBAL_FLAG_FORCE_EARLY_DEPTH_STENCIL
232233

233234
// Bit: 4
234235
unsigned
235236
m_bEnableRawAndStructuredBuffers : 1; // D3D11_SB_GLOBAL_FLAG_ENABLE_RAW_AND_STRUCTURED_BUFFERS
236237
unsigned
237-
m_bLowPrecisionPresent : 1; // D3D11_1_SB_GLOBAL_FLAG_ENABLE_MINIMUM_PRECISION
238+
m_bLowPrecisionPresent : 1; // AND ~m_bUseNativeLowPrecision => D3D11_1_SB_GLOBAL_FLAG_ENABLE_MINIMUM_PRECISION
239+
// AND ~m_bUseNativeLowPrecision => SHADER_FEATURE_MINIMUM_PRECISION
240+
// AND m_bUseNativeLowPrecision => SHADER_FEATURE_NATIVE_LOW_PRECISION
238241
unsigned
239242
m_bEnableDoubleExtensions : 1; // D3D11_1_SB_GLOBAL_FLAG_ENABLE_DOUBLE_EXTENSIONS
243+
// SHADER_FEATURE_11_1_DOUBLE_EXTENSIONS
240244
unsigned m_bEnableMSAD : 1; // D3D11_1_SB_GLOBAL_FLAG_ENABLE_SHADER_EXTENSIONS
245+
// SHADER_FEATURE_11_1_SHADER_EXTENSIONS
241246

242247
// Bit: 8
243248
unsigned m_bAllResourcesBound : 1; // D3D12_SB_GLOBAL_FLAG_ALL_RESOURCES_BOUND
@@ -253,8 +258,6 @@ class ShaderFlags {
253258
m_bUAVLoadAdditionalFormats : 1; // SHADER_FEATURE_TYPED_UAV_LOAD_ADDITIONAL_FORMATS
254259
unsigned
255260
m_bLevel9ComparisonFiltering : 1; // SHADER_FEATURE_LEVEL_9_COMPARISON_FILTERING
256-
// SHADER_FEATURE_11_1_SHADER_EXTENSIONS
257-
// shared with EnableMSAD
258261
unsigned m_b64UAVs : 1; // SHADER_FEATURE_64_UAVS
259262

260263
// Bit: 16
@@ -277,7 +280,7 @@ class ShaderFlags {
277280
unsigned m_bBarycentrics : 1; // SHADER_FEATURE_BARYCENTRICS
278281

279282
// SM 6.2+
280-
unsigned m_bUseNativeLowPrecision : 1;
283+
unsigned m_bUseNativeLowPrecision : 1; // see m_bLowPrecisionPresent for uses
281284

282285
// SM 6.4+
283286
// Bit: 24

0 commit comments

Comments
 (0)