Преглед изворни кода

allows Texture2DMS(Array).Load() to have offsets (#1254)

John Porto пре 7 година
родитељ
комит
94249fbc07
2 измењених фајлова са 5 додато и 3 уклоњено
  1. 2 2
      lib/HLSL/DxilResource.cpp
  2. 3 1
      tools/clang/test/CodeGenHLSL/srv_ms_load1.hlsl

+ 2 - 2
lib/HLSL/DxilResource.cpp

@@ -200,12 +200,12 @@ unsigned DxilResource::GetNumOffsets(Kind ResourceKind) {
       0, // Invalid = 0,
       0, // Invalid = 0,
       1, // Texture1D,
       1, // Texture1D,
       2, // Texture2D,
       2, // Texture2D,
-      0, // Texture2DMS,
+      2, // Texture2DMS,
       3, // Texture3D,
       3, // Texture3D,
       0, // TextureCube,
       0, // TextureCube,
       1, // Texture1DArray,
       1, // Texture1DArray,
       2, // Texture2DArray,
       2, // Texture2DArray,
-      0, // Texture2DMSArray,
+      2, // Texture2DMSArray,
       0, // TextureCubeArray,
       0, // TextureCubeArray,
       0, // TypedBuffer,
       0, // TypedBuffer,
       0, // RawBuffer,
       0, // RawBuffer,

+ 3 - 1
tools/clang/test/CodeGenHLSL/srv_ms_load1.hlsl

@@ -1,6 +1,8 @@
 // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
 // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
 
 
-// CHECK: textureLoad
+// CHECK-DAG: textureLoad.f32({{.*}}, i32 undef, i32 undef, i32 undef)
+// CHECK-DAG: textureLoad.f32({{.*}}, i32 -5, i32 7, i32 undef)
+// CHECK-DAG: textureLoad.f32({{.*}}, i32 0, i32 0, i32 undef)
 
 
 Texture2DMS<float3> srv1 : register(t3);
 Texture2DMS<float3> srv1 : register(t3);