Quellcode durchsuchen

Add an isAlwaysUniform property to instructions (#1168)

Add an isAlwaysUniform property to instructions
Shawn Farkas vor 7 Jahren
Ursprung
Commit
368aead044
3 geänderte Dateien mit 228 neuen und 0 gelöschten Zeilen
  1. 224 0
      include/dxc/HLSL/DxilInstructions.h
  2. 2 0
      utils/hct/hctdb.py
  3. 2 0
      utils/hct/hctdb_instrhelp.py

Datei-Diff unterdrückt, da er zu groß ist
+ 224 - 0
include/dxc/HLSL/DxilInstructions.h


+ 2 - 0
utils/hct/hctdb.py

@@ -1,3 +1,4 @@
+# Copyright (C) Microsoft Corporation. All rights reserved.
 # This file is distributed under the University of Illinois Open Source License. See LICENSE.TXT for details.
 # This file is distributed under the University of Illinois Open Source License. See LICENSE.TXT for details.
 ###############################################################################
 ###############################################################################
 # DXIL information.                                                           #
 # DXIL information.                                                           #
@@ -47,6 +48,7 @@ class db_dxil_inst(object):
         self.is_deriv = False           # whether this is some kind of derivative
         self.is_deriv = False           # whether this is some kind of derivative
         self.is_gradient = False        # whether this requires a gradient calculation
         self.is_gradient = False        # whether this requires a gradient calculation
         self.is_wave = False            # whether this requires in-wave, cross-lane functionality
         self.is_wave = False            # whether this requires in-wave, cross-lane functionality
+        self.requires_uniform_inputs = False  # whether this operation requires that all of its inputs are uniform across the wave
         self.shader_stages = "*"        # shader stages to which this applies, * or one or more of cdghpv
         self.shader_stages = "*"        # shader stages to which this applies, * or one or more of cdghpv
         self.shader_model = 6,0         # minimum shader model required
         self.shader_model = 6,0         # minimum shader model required
         self.inst_helper_prefix = None
         self.inst_helper_prefix = None

+ 2 - 0
utils/hct/hctdb_instrhelp.py

@@ -260,6 +260,8 @@ class db_instrhelp_gen:
                 print("    return true;")
                 print("    return true;")
                 # TODO - check operand types
                 # TODO - check operand types
                 print("  }")
                 print("  }")
+                print("  // Metadata")
+                print("  bool requiresUniformInputs() const { return %s; }" % self.bool_lit(i.requires_uniform_inputs))
                 EnumWritten = False
                 EnumWritten = False
                 for o in i.ops:
                 for o in i.ops:
                     if o.pos > 1: # 0 is return type, 1 is DXIL OP id
                     if o.pos > 1: # 0 is return type, 1 is DXIL OP id

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.