瀏覽代碼

Add an isAlwaysUniform property to instructions (#1168)

Add an isAlwaysUniform property to instructions
Shawn Farkas 7 年之前
父節點
當前提交
368aead044
共有 3 個文件被更改,包括 228 次插入0 次删除
  1. 224 0
      include/dxc/HLSL/DxilInstructions.h
  2. 2 0
      utils/hct/hctdb.py
  3. 2 0
      utils/hct/hctdb_instrhelp.py

文件差異過大導致無法顯示
+ 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.
 ###############################################################################
 # DXIL information.                                                           #
@@ -47,6 +48,7 @@ class db_dxil_inst(object):
         self.is_deriv = False           # whether this is some kind of derivative
         self.is_gradient = False        # whether this requires a gradient calculation
         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_model = 6,0         # minimum shader model required
         self.inst_helper_prefix = None

+ 2 - 0
utils/hct/hctdb_instrhelp.py

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

部分文件因文件數量過多而無法顯示