[llvm-branch-commits] [clang] [llvm] [HLSL] Define RasterizerOrderedBuffer resource (PR #74897)

David Peixotto via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 8 16:40:48 PST 2023


================
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
----------------
dmpots wrote:

I think this is fine for testing this change, but ROVs are not allowed to be used in CS (only PS).

This shader does compile successfully because they buffers are not used, but a use here will cause a validation error

https://godbolt.org/z/zEWr7bdsP

```
error: validation errors
error: RasterizerOrdered objects are only allowed in 5.0+ pixel shaders. 'Buffer1'
Validation failed.
```

Probably worth a comment in the test for this.


https://github.com/llvm/llvm-project/pull/74897


More information about the llvm-branch-commits mailing list