Browse Source

Misc cleanup

Tex Riddell 6 years ago
parent
commit
7d29e947b5

+ 2 - 2
lib/HLSL/HLSignatureLower.cpp

@@ -914,7 +914,7 @@ void GenerateInputOutputUserCall(InputOutputAccessInfo &info, Value *undefVertex
           if (ColIdx->getType()->getBitWidth() != 8) {
             ColIdx = Builder.getInt8(ColIdx->getValue().getLimitedValue());
           }
-          SmallVector<Value *, 4> args = {OpArg, ID, idxVal, ColIdx, V};
+          SmallVector<Value *, 6> args = {OpArg, ID, idxVal, ColIdx, V};
           if (vertexOrPrimID)
             args.emplace_back(vertexOrPrimID);
           GenerateStOutput(ldStFunc, args, Builder, bI1Cast);
@@ -937,7 +937,7 @@ void GenerateInputOutputUserCall(InputOutputAccessInfo &info, Value *undefVertex
 
             ConstantInt *CaseIdx = SwitchBuilder.getInt8(i);
 
-            SmallVector<Value *, 4> args = {OpArg, ID, idxVal, CaseIdx, V};
+            SmallVector<Value *, 6> args = {OpArg, ID, idxVal, CaseIdx, V};
             if (vertexOrPrimID)
               args.emplace_back(vertexOrPrimID);
             GenerateStOutput(ldStFunc, args, CaseBuilder, bI1Cast);

+ 0 - 3
tools/clang/lib/CodeGen/CGHLSLMS.cpp

@@ -238,9 +238,6 @@ private:
 
   std::unordered_map<Constant*, DxilFieldAnnotation> m_ConstVarAnnotationMap;
 
-  // Insert AllocateRayQuery to initialize each RayQuery alloca
-  void AllocateRayQueryObjects();
-
 public:
   CGMSHLSLRuntime(CodeGenModule &CGM);
 

+ 0 - 8
tools/clang/lib/Sema/SemaHLSL.cpp

@@ -6837,14 +6837,6 @@ void HLSLExternalSource::InitializeInitSequenceForHLSL(
 
   // In HLSL there are no default initializers, eg float4x4 m();
   if (Kind.getKind() == InitializationKind::IK_Default) {
-    // Except for RayQuery.
-    if (GetTypeElementKind(Entity.getType()) == AR_OBJECT_RAY_QUERY) {
-      // RayQuery handle initialization
-      // TODO: Try generating an intrinsic method call for AllocateRayQuery
-      // - pass the flags from the intrinsic argument.
-      // Lower to intrinsic that takes flags and returns i32 value,
-      // which is then stored in the RayQuery alloca as the handle.
-    }
     return;
   }