beanz added inline comments.

================
Comment at: clang/test/CodeGenHLSL/buffer-array-operator.hlsl:3
+
+const RWBuffer<float> In;
+RWBuffer<float> Out;
----------------
python3kgae wrote:
> beanz wrote:
> > python3kgae wrote:
> > > Why add const instead of using Buffer directly?
> > > 
> > Making this const forces the const methods to be used. It is just to drive 
> > the correct validation and code generation.
> So maybe we don't need Buffer at all, just use const RWBuffer for read-only 
> usage?
I think there would likely be some code incompatibilities if we alias `Buffer` 
to `const RWBuffer`, but that would be interesting to consider.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131268/new/

https://reviews.llvm.org/D131268

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to