From 285eb9da25e834810d2bb003e15889ccd7f5d7f3 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Wed, 18 Nov 2020 11:55:14 -0800 Subject: [PATCH] Reword misleading type buffer atomic error message Saying that typed buffers are not supported is inaccurate. Scalar types are required for it to work though. --- lib/HLSL/HLOperationLower.cpp | 2 +- .../HLSLFileCheck/hlsl/operators/swizzle/swizzleAtomic2.hlsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/HLSL/HLOperationLower.cpp b/lib/HLSL/HLOperationLower.cpp index 52b7144138..583087519c 100644 --- a/lib/HLSL/HLOperationLower.cpp +++ b/lib/HLSL/HLOperationLower.cpp @@ -7304,7 +7304,7 @@ void TranslateDefaultSubscript(CallInst *CI, HLOperationLowerHelper &helper, HL // Invalid operations. Translated = false; dxilutil::EmitErrorOnInstruction( - userCall, "Atomic operation on typed buffer is not supported."); + userCall, "Typed resources used in atomic operations must have a scalar element type."); return; } break; default: diff --git a/tools/clang/test/HLSLFileCheck/hlsl/operators/swizzle/swizzleAtomic2.hlsl b/tools/clang/test/HLSLFileCheck/hlsl/operators/swizzle/swizzleAtomic2.hlsl index c7f112d9e6..11df30ecc9 100644 --- a/tools/clang/test/HLSLFileCheck/hlsl/operators/swizzle/swizzleAtomic2.hlsl +++ b/tools/clang/test/HLSLFileCheck/hlsl/operators/swizzle/swizzleAtomic2.hlsl @@ -1,6 +1,6 @@ // RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s -// CHECK: Atomic operation on typed buffer is not supported +// CHECK: Typed resources used in atomic operations must have a scalar element type RWBuffer bufA;