Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ShaderLinker.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
6 
7 using SiliconStudio.Core.Mathematics;
8 using SiliconStudio.Paradox.Shaders.Parser.Ast;
9 using SiliconStudio.Paradox.Shaders.Parser.Mixins;
10 using SiliconStudio.Paradox.Shaders.Parser.Utility;
11 using SiliconStudio.Shaders.Ast;
12 using SiliconStudio.Shaders.Ast.Hlsl;
13 using SiliconStudio.Shaders.Visitor;
14 using SiliconStudio.Paradox.Graphics;
15 
17 
18 namespace SiliconStudio.Paradox.Shaders.Parser
19 {
20  /// <summary>
21  /// This AST Visitor will look for any "Link" annotation in order to bind EffectVariable to their associated HLSL variables.
22  /// </summary>
23  internal class ShaderLinker : ShaderVisitor
24  {
25  private readonly Dictionary<string, SamplerStateDescription> samplers = new Dictionary<string, SamplerStateDescription>();
26  private readonly EffectReflection effectReflection;
27  private readonly Dictionary<ShaderConstantBufferDescription, List<EffectParameterValueData>> valueBindings = new Dictionary<ShaderConstantBufferDescription, List<EffectParameterValueData>>();
28  private readonly ShaderMixinParsingResult parsingResult;
29 
30  /// <summary>
31  /// Initializes a new instance of the <see cref="ShaderLinker" /> class.
32  /// </summary>
33  /// <param name="parsingResult">The parsing result.</param>
34  public ShaderLinker(ShaderMixinParsingResult parsingResult)
35  : base(true, false)
36  {
37  this.parsingResult = parsingResult;
38  this.effectReflection = parsingResult.Reflection;
39  }
40 
41  /// <summary>
42  /// Gets the samplers.
43  /// </summary>
45  {
46  get
47  {
48  return samplers;
49  }
50  }
51 
52  /// <summary>
53  /// Runs the linker on the specified Shader.
54  /// </summary>
55  /// <param name="shader">The shader.</param>
56  public void Run(Shader shader)
57  {
58  PrepareConstantBuffers(shader);
59  Visit(shader);
60  foreach (var valueBinding in valueBindings)
61  {
62  valueBinding.Key.Members = valueBinding.Value.ToArray();
63  }
64  }
65 
66  private void PrepareConstantBuffers(Shader shader)
67  {
68  // Recalculate constant buffers
69  // Order first all non-method declarations and then after method declarations
70  var declarations = shader.Declarations.Where(declaration => !(declaration is MethodDeclaration) && !(declaration is Variable)).ToList();
71  var variables = shader.Declarations.OfType<Variable>();
72  var methods = shader.Declarations.OfType<MethodDeclaration>();
73  var newVariables = new List<Node>();
74 
75  var constantBuffers = new Dictionary<string, ConstantBuffer>();
76 
77  foreach (var variableGroup in variables)
78  {
79  foreach (var variable in variableGroup.Instances())
80  {
81  var constantBufferName = (string)variable.GetTag(ParadoxTags.ConstantBuffer);
82 
83  var type = variable.Type;
84  if (type is ArrayType)
85  {
86  var arrayType = (ArrayType)type;
87  type = arrayType.Type;
88  }
89 
90  // Put variable which are not in a constant buffer into one named "Globals".
91  // static variables should stay out of this buffer
92  if (constantBufferName == null && !(type.ResolveType() is ObjectType)
93  && !variable.Qualifiers.Contains(StorageQualifier.Const)
94  && !variable.Qualifiers.Contains(SiliconStudio.Shaders.Ast.Hlsl.StorageQualifier.Static)
95  && !variable.Qualifiers.Contains(SiliconStudio.Shaders.Ast.Hlsl.StorageQualifier.Groupshared))
96  {
97  constantBufferName = "Globals";
98  }
99 
100  if (constantBufferName == null)
101  {
102  declarations.Insert(0, variable); // keep thes kinds of variable at the top of the declaration
103  }
104  else
105  {
106  // Remove initial value (it should be part of key definition)
107  if (!variable.Qualifiers.Contains(StorageQualifier.Const) && variable.InitialValue != null)
108  variable.InitialValue = null;
109 
110  ConstantBuffer constantBuffer;
111  if (!constantBuffers.TryGetValue(constantBufferName, out constantBuffer))
112  {
113  constantBuffer = new ConstantBuffer {Name = constantBufferName, Type = SiliconStudio.Shaders.Ast.Hlsl.ConstantBufferType.Constant};
114  constantBuffers.Add(constantBufferName, constantBuffer);
115  newVariables.Add(constantBuffer);
116  }
117 
118  constantBuffer.Members.Add(variable);
119  }
120  }
121  }
122 
123  declarations.AddRange(newVariables);
124  declarations.AddRange(methods);
125 
126  shader.Declarations = declarations;
127  }
128 
129 
130  /// <summary>
131  /// Visits the specified variable.
132  /// </summary>
133  /// <param name="variable">The variable.</param>
134  /// <returns>The variable visited</returns>
135  [Visit]
136  protected void Visit(Variable variable)
137  {
138  var parameterKey = GetLinkParameterKey(variable);
139  if (parameterKey == null) return;
140 
141  var resolvedType = variable.Type.ResolveType();
142  if (resolvedType is ArrayType)
143  {
144  resolvedType = ((ArrayType)resolvedType).Type;
145  }
146  if (resolvedType is StateType)
147  {
148  var samplerState = SamplerStateDescription.Default;
149 
150  var stateInitializer = variable.InitialValue as StateInitializer;
151  if (stateInitializer != null)
152  {
153  foreach (var samplerField in stateInitializer.Items.OfType<AssignmentExpression>())
154  {
155  string key = samplerField.Target.ToString();
156  string value = samplerField.Value.ToString();
157 
158  if (key == "Filter")
159  {
160  switch (value)
161  {
162  case "COMPARISON_MIN_MAG_LINEAR_MIP_POINT":
163  samplerState.Filter = TextureFilter.ComparisonMinMagLinearMipPoint;
164  break;
165  case "COMPARISON_MIN_MAG_MIP_POINT":
166  samplerState.Filter = TextureFilter.ComparisonPoint;
167  break;
168  case "MIN_MAG_LINEAR_MIP_POINT":
169  samplerState.Filter = TextureFilter.MinMagLinearMipPoint;
170  break;
171  case "MIN_MAG_MIP_LINEAR":
172  samplerState.Filter = TextureFilter.Linear;
173  break;
174  case "ANISOTROPIC":
175  samplerState.Filter = TextureFilter.Anisotropic;
176  break;
177  case "MIN_MAG_MIP_POINT":
178  samplerState.Filter = TextureFilter.Point;
179  break;
180  default:
181  parsingResult.Error(ParadoxMessageCode.SamplerFilterNotSupported, variable.Span, value);
182  break;
183  }
184  }
185  else if (key == "ComparisonFunc")
186  {
187  CompareFunction compareFunction;
188  Enum.TryParse(value, true, out compareFunction);
189  samplerState.CompareFunction = compareFunction;
190  }
191  else if (key == "AddressU" || key == "AddressV" || key == "AddressW")
192  {
193  TextureAddressMode textureAddressMode;
194  Enum.TryParse(value, true, out textureAddressMode);
195  switch (key)
196  {
197  case "AddressU":
198  samplerState.AddressU = textureAddressMode;
199  break;
200  case "AddressV":
201  samplerState.AddressV = textureAddressMode;
202  break;
203  case "AddressW":
204  samplerState.AddressW = textureAddressMode;
205  break;
206  default:
207  parsingResult.Error(ParadoxMessageCode.SamplerAddressModeNotSupported, variable.Span, key);
208  break;
209  }
210  }
211  else if (key == "BorderColor")
212  {
213  var borderColor = samplerField.Value as MethodInvocationExpression;
214  if (borderColor != null)
215  {
216  var targetType = borderColor.Target as TypeReferenceExpression;
217  if (targetType != null && targetType.Type.ResolveType() == VectorType.Float4 && borderColor.Arguments.Count == 4)
218  {
219  var values = new float[4];
220  for (int i = 0; i < 4; i++)
221  {
222  var argValue = borderColor.Arguments[i] as LiteralExpression;
223  if (argValue != null)
224  {
225  values[i] = (float)Convert.ChangeType(argValue.Value, typeof(float));
226  }
227  else
228  {
229  parsingResult.Error(ParadoxMessageCode.SamplerBorderColorNotSupported, variable.Span, borderColor.Arguments[i]);
230  }
231  }
232 
233  samplerState.BorderColor = new Color4(values);
234  }
235  else
236  {
237  parsingResult.Error(ParadoxMessageCode.SamplerBorderColorNotSupported, variable.Span, variable);
238  }
239  }
240  else
241  {
242  parsingResult.Error(ParadoxMessageCode.SamplerBorderColorNotSupported, variable.Span, variable);
243  }
244  }
245  else if (key == "MinLOD")
246  {
247  samplerState.MinMipLevel = float.Parse(value);
248  }
249  else if (key == "MaxLOD")
250  {
251  samplerState.MaxMipLevel = float.Parse(value);
252  }
253  else if (key == "MaxAnisotropy")
254  {
255  samplerState.MaxAnisotropy = int.Parse(value);
256  }
257  else
258  {
259  parsingResult.Error(ParadoxMessageCode.SamplerFieldNotSupported, variable.Span, variable);
260  }
261  }
262  }
263 
264  effectReflection.SamplerStates.Add(new EffectSamplerStateBinding(parameterKey.Name, samplerState));
265  LinkVariable(effectReflection, variable.Name, parameterKey);
266  }
267  else if (variable.Type is TextureType || variable.Type is GenericType)
268  {
269  LinkVariable(effectReflection, variable.Name, parameterKey);
270  }
271  else
272  {
273  ParseConstantBufferVariable("$Globals", variable);
274  }
275  }
276 
277  /// <summary>
278  /// Visits the specified constant buffer.
279  /// </summary>
280  /// <param name="constantBuffer">The constant buffer.</param>
281  /// <returns></returns>
282  [Visit]
283  protected void Visit(ConstantBuffer constantBuffer)
284  {
285  foreach (var variable in constantBuffer.Members.OfType<Variable>().SelectMany(x => x.Instances()))
286  {
287  ParseConstantBufferVariable(constantBuffer.Name, variable);
288  }
289  }
290 
291  [Visit]
292  protected void Visit(MethodDefinition method)
293  {
294  // Parse stream output declarations (if any)
295  // TODO: Currently done twice, one time in ShaderMixer, one time in ShaderLinker
296  var streamOutputAttribute = method.Attributes.OfType<AttributeDeclaration>().FirstOrDefault(x => x.Name == "StreamOutput");
297  if (streamOutputAttribute != null)
298  {
299  var rasterizedStream = streamOutputAttribute.Parameters.LastOrDefault();
300 
301  // Ignore last parameter if it's not an integer (it means there is no rasterized stream info)
302  // We should make a new StreamOutputRasterizedStream attribute instead maybe?
303  if (rasterizedStream != null && !(rasterizedStream.Value is int))
304  rasterizedStream = null;
305 
306  int[] streamOutputStrides;
307 
308  // Parse declarations
309  // Everything should be registered in GS_OUTPUT (previous pass in ShaderMixer).
310  StreamOutputParser.Parse(effectReflection.ShaderStreamOutputDeclarations, out streamOutputStrides, streamOutputAttribute, ((StructType)FindDeclaration("GS_OUTPUT")).Fields);
311 
312  effectReflection.StreamOutputStrides = streamOutputStrides;
313  effectReflection.StreamOutputRasterizedStream = rasterizedStream != null ? (int)rasterizedStream.Value : -1;
314  }
315  }
316 
317  /// <inheritdoc/>
318  [Visit]
319  protected override Node Visit(Node node)
320  {
321  if (node is IDeclaration)
322  {
323  var parameterKey = this.GetLinkParameterKey(node);
324  if (parameterKey != null)
325  LinkVariable(effectReflection, ((IDeclaration)node).Name, parameterKey);
326  }
327 
328  node.Childrens(OnProcessor);
329  return node;
330  }
331 
332  private Node OnProcessor(Node nodeArg, ref NodeProcessorContext explorer)
333  {
334  return VisitDynamic(nodeArg);
335  }
336 
337  private LocalParameterKey GetLinkParameterKey(Node node)
338  {
339  var qualifiers = node as IQualifiers;
340  var attributable = node as IAttributes;
341 
342  if ((qualifiers != null && (qualifiers.Qualifiers.Contains(SiliconStudio.Shaders.Ast.Hlsl.StorageQualifier.Static) ||
343  qualifiers.Qualifiers.Contains(StorageQualifier.Const) ||
344  qualifiers.Qualifiers.Contains(SiliconStudio.Shaders.Ast.Hlsl.StorageQualifier.Groupshared)
345  )) || attributable == null)
346  {
347  return null;
348  }
349 
350  bool isColor = attributable.Attributes.OfType<AttributeDeclaration>().Any(x => x.Name == "Color");
351 
352  foreach (var annotation in attributable.Attributes.OfType<AttributeDeclaration>())
353  {
354  if (annotation.Name != "Link" || annotation.Parameters.Count < 1)
355  {
356  continue;
357  }
358 
359  var variableName = (string)annotation.Parameters[0].Value;
360  var parameterKey = new LocalParameterKey() {Name = variableName};
361  var variable = node as Variable;
362  if (variable != null)
363  {
364  var variableType = variable.Type;
365 
366  if (variableType.TypeInference.TargetType != null)
367  variableType = variableType.TypeInference.TargetType;
368 
369  if (variableType is ArrayType)
370  {
371  var arrayType = (ArrayType)variableType;
372  variableType = arrayType.Type;
373  parameterKey.Count = (int)((LiteralExpression)arrayType.Dimensions[0]).Literal.Value;
374 
375  if (variableType.TypeInference.TargetType != null)
376  variableType = variableType.TypeInference.TargetType;
377  }
378 
379  if (variableType.IsBuiltIn)
380  {
381  var variableTypeName = variableType.Name.Text.ToLower();
382 
383  switch (variableTypeName)
384  {
385  case "cbuffer":
386  parameterKey.Class = EffectParameterClass.ConstantBuffer;
387  parameterKey.Type = EffectParameterType.ConstantBuffer;
388  break;
389 
390  case "tbuffer":
391  parameterKey.Class = EffectParameterClass.TextureBuffer;
392  parameterKey.Type = EffectParameterType.TextureBuffer;
393  break;
394 
395  case "structuredbuffer":
396  parameterKey.Class = EffectParameterClass.ShaderResourceView;
397  parameterKey.Type = EffectParameterType.StructuredBuffer;
398  break;
399  case "rwstructuredbuffer":
400  parameterKey.Class = EffectParameterClass.UnorderedAccessView;
401  parameterKey.Type = EffectParameterType.RWStructuredBuffer;
402  break;
403  case "consumestructuredbuffer":
404  parameterKey.Class = EffectParameterClass.UnorderedAccessView;
405  parameterKey.Type = EffectParameterType.ConsumeStructuredBuffer;
406  break;
407  case "appendstructuredbuffer":
408  parameterKey.Class = EffectParameterClass.UnorderedAccessView;
409  parameterKey.Type = EffectParameterType.AppendStructuredBuffer;
410  break;
411  case "buffer":
412  parameterKey.Class = EffectParameterClass.ShaderResourceView;
413  parameterKey.Type = EffectParameterType.Buffer;
414  break;
415  case "rwbuffer":
416  parameterKey.Class = EffectParameterClass.UnorderedAccessView;
417  parameterKey.Type = EffectParameterType.RWBuffer;
418  break;
419  case "byteaddressbuffer":
420  parameterKey.Class = EffectParameterClass.ShaderResourceView;
421  parameterKey.Type = EffectParameterType.ByteAddressBuffer;
422  break;
423  case "rwbyteaddressbuffer":
424  parameterKey.Class = EffectParameterClass.UnorderedAccessView;
425  parameterKey.Type = EffectParameterType.RWByteAddressBuffer;
426  break;
427 
428  case "texture1d":
429  parameterKey.Class = EffectParameterClass.ShaderResourceView;
430  parameterKey.Type = EffectParameterType.Texture1D;
431  break;
432 
433  case "texturecube":
434  parameterKey.Class = EffectParameterClass.ShaderResourceView;
435  parameterKey.Type = EffectParameterType.TextureCube;
436  break;
437 
438  case "texture2d":
439  parameterKey.Class = EffectParameterClass.ShaderResourceView;
440  parameterKey.Type = EffectParameterType.Texture2D;
441  break;
442 
443  case "texture3d":
444  parameterKey.Class = EffectParameterClass.ShaderResourceView;
445  parameterKey.Type = EffectParameterType.Texture3D;
446  break;
447 
448  case "rwtexture1d":
449  parameterKey.Class = EffectParameterClass.UnorderedAccessView;
450  parameterKey.Type = EffectParameterType.RWTexture1D;
451  break;
452 
453  case "rwtexture2d":
454  parameterKey.Class = EffectParameterClass.UnorderedAccessView;
455  parameterKey.Type = EffectParameterType.RWTexture2D;
456  break;
457 
458  case "rwtexture3d":
459  parameterKey.Class = EffectParameterClass.UnorderedAccessView;
460  parameterKey.Type = EffectParameterType.RWTexture3D;
461  break;
462 
463  case "samplerstate":
464  parameterKey.Class = EffectParameterClass.Sampler;
465  parameterKey.Type = EffectParameterType.Sampler;
466  break;
467  }
468  }
469  else if (variableType is ScalarType)
470  {
471  // Uint and int are collapsed to int
472  if (variableType == ScalarType.Int || variableType == ScalarType.UInt)
473  {
474  parameterKey.Class = EffectParameterClass.Scalar;
475  parameterKey.Type = variableType == ScalarType.Int ? EffectParameterType.Int : EffectParameterType.UInt;
476  }
477  else if (variableType == ScalarType.Float)
478  {
479  parameterKey.Class = EffectParameterClass.Scalar;
480  parameterKey.Type = EffectParameterType.Float;
481  }
482  else if (variableType == ScalarType.Bool)
483  {
484  parameterKey.Class = EffectParameterClass.Scalar;
485  parameterKey.Type = EffectParameterType.Bool;
486  }
487 
488  parameterKey.RowCount = 1;
489  parameterKey.ColumnCount = 1;
490  }
491  else if (variableType is VectorType)
492  {
493  if (variableType == VectorType.Float2 || variableType == VectorType.Float3 || variableType == VectorType.Float4)
494  {
495  parameterKey.Class = isColor ? EffectParameterClass.Color : EffectParameterClass.Vector;
496  parameterKey.Type = EffectParameterType.Float;
497  }
498  else if (variableType == VectorType.Int2 || variableType == VectorType.Int3 || variableType == VectorType.Int4)
499  {
500  parameterKey.Class = EffectParameterClass.Vector;
501  parameterKey.Type = EffectParameterType.Int;
502  }
503  else if (variableType == VectorType.UInt2 || variableType == VectorType.UInt3 || variableType == VectorType.UInt4)
504  {
505  parameterKey.Class = EffectParameterClass.Vector;
506  parameterKey.Type = EffectParameterType.UInt;
507  }
508 
509  parameterKey.RowCount = 1;
510  parameterKey.ColumnCount = (variableType as VectorType).Dimension;
511  }
512  else if (variableType is MatrixType)
513  {
514  parameterKey.Class = EffectParameterClass.MatrixColumns;
515  parameterKey.Type = EffectParameterType.Float;
516  parameterKey.RowCount = (variableType as MatrixType).RowCount;
517  parameterKey.ColumnCount = (variableType as MatrixType).ColumnCount;
518  }
519  else if (variableType is StructType)
520  {
521  parameterKey.Class = EffectParameterClass.Struct;
522  parameterKey.RowCount = 1;
523  parameterKey.ColumnCount = 1;
524  }
525  }
526 
527  return parameterKey;
528  }
529 
530  return null;
531  }
532 
533  private void ParseConstantBufferVariable(string cbName, Variable variable)
534  {
535  if (variable.Qualifiers.Contains(SiliconStudio.Shaders.Ast.Hlsl.StorageQualifier.Static) ||
536  variable.Qualifiers.Contains(StorageQualifier.Const) ||
537  variable.Qualifiers.Contains(SiliconStudio.Shaders.Ast.Hlsl.StorageQualifier.Groupshared)
538  )
539  return;
540 
542  {
543  parsingResult.Error(ParadoxMessageCode.StreamVariableWithoutPrefix, variable.Span, variable);
544  return;
545  }
546 
547  foreach (var attribute in variable.Attributes.OfType<AttributeDeclaration>())
548  {
549  if (attribute.Name == "Link")
550  {
551  if (attribute.Parameters.Count != 1)
552  {
553  parsingResult.Error(ParadoxMessageCode.LinkArgumentsError, variable.Span);
554  }
555  }
556  }
557 
558  //// Try to resolve key
559  var parameterKey = GetLinkParameterKey(variable);
560 
561  if (parameterKey != null)
562  {
563  LinkConstant(cbName, variable, parameterKey);
564  }
565  else
566  {
567  parsingResult.Error(ParadoxMessageCode.LinkError, variable.Span, variable);
568  }
569  }
570 
571  private static void LinkVariable(EffectReflection reflection, string variableName, LocalParameterKey parameterKey)
572  {
573  var binding = new EffectParameterResourceData {Param = {KeyName = parameterKey.Name, Class = parameterKey.Class, Type = parameterKey.Type, RawName = variableName}};
574  reflection.ResourceBindings.Add(binding);
575  }
576 
577  private void LinkConstant(string cbName, Variable variable, LocalParameterKey parameterKey)
578  {
579  // If the constant buffer is not present, add it
580  var constantBuffer = effectReflection.ConstantBuffers.FirstOrDefault(buffer => buffer.Name == cbName);
581  if (constantBuffer == null)
582  {
583  constantBuffer = new ShaderConstantBufferDescription() {Name = cbName};
584  effectReflection.ConstantBuffers.Add(constantBuffer);
585  var constantBufferBinding = new EffectParameterResourceData {Param = {KeyName = cbName, Class = EffectParameterClass.ConstantBuffer, Type = EffectParameterType.Buffer, RawName = cbName}};
586  effectReflection.ResourceBindings.Add(constantBufferBinding);
587  valueBindings.Add(constantBuffer, new List<EffectParameterValueData>());
588  }
589 
590  // Get the list of members of this constant buffer
591  var members = valueBindings[constantBuffer];
592 
593  var binding = new EffectParameterValueData
594  {
595  Param =
596  {
597  KeyName = parameterKey.Name,
598  Class = parameterKey.Class,
599  Type = parameterKey.Type,
600  RawName = variable.Name
601  },
602  RowCount = parameterKey.RowCount,
603  ColumnCount = parameterKey.ColumnCount,
604  Count = parameterKey.Count,
605  };
606 
607  members.Add(binding);
608  }
609 
610  private class LocalParameterKey
611  {
612  public string Name;
613 
614  public EffectParameterClass Class;
615 
616  public EffectParameterType Type;
617 
618  public int RowCount;
619 
620  public int ColumnCount;
621 
622  public int Count = 1;
623  }
624  }
625 }
Base class for all vector types
Definition: VectorType.cs:10
SiliconStudio.Shaders.Ast.Hlsl.ConstantBuffer ConstantBuffer
Identifier Name
Gets or sets the name.
Definition: Variable.cs:77
TypeBase Type
Gets or sets the type.
Definition: Variable.cs:61
SiliconStudio.Shaders.Ast.StorageQualifier StorageQualifier
Definition: ShaderLinker.cs:16
static readonly SiliconStudio.Shaders.Ast.StorageQualifier Stream
Stream keyword (stream).
Qualifier Qualifiers
Gets or sets the qualifiers.
Definition: Variable.cs:53
TextureAddressMode
Identify a technique for resolving texture coordinates that are outside of the boundaries of a textur...
Represents a color in the form of rgba.
Definition: Color4.cs:42
Base interface for all node providing qualifiers.
Definition: IQualifiers.cs:8
static readonly StorageQualifier Const
Const qualifier.
SiliconStudio.Paradox.Graphics.Buffer Buffer
Definition: BasicEffect.cs:15
A method definition with a body of statements.
Abstract node.
Definition: Node.cs:15
A variable declaration.
Definition: Variable.cs:11
Identifier Name
Gets or sets the name.
object Value
Gets or sets the value.
Definition: Literal.cs:57
CompareFunction
Comparison options.
HRESULT Convert(_In_ const Image &srcImage, _In_ DXGI_FORMAT format, _In_ DWORD filter, _In_ float threshold, _Out_ ScratchImage &image)
List< Node > Members
Gets or sets the members.
EffectParameterClass
Values that identify the class of a shader variable.
Base class for all generic types.
Definition: GenericType.cs:14
Declaration of a constant buffer.
Toplevel container of a shader parsing result.
Definition: Shader.cs:12
List< AttributeBase > Attributes
Definition: Variable.cs:45
bool Contains(CompositeEnum enumValue)
Determines whether [contains] [the specified enum value].
Toplevel interface for a declaration.
Definition: IDeclaration.cs:8
A field of a struct.
Definition: Literal.cs:13
object GetTag(object tagKey)
Gets a tag value associated to this node..
Definition: Node.cs:78
System.Windows.Point Point
Definition: ColorPicker.cs:15