summaryrefslogtreecommitdiff
path: root/source/slang/syntax.h
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-12-08 14:23:12 -0800
committerGitHub <noreply@github.com>2017-12-08 14:23:12 -0800
commit0f55649cc1aa8ad3218b7f8ba7b1eabdd2ec6526 (patch)
tree0dc7fd5e88fbc530dc121946f4a20085aa5518d8 /source/slang/syntax.h
parent301cdf5ef42797b1073d9e6c741ef0ba98a38792 (diff)
Cleanups to `ParameterBlock<T>` behavior. (#304)
* Cleanups to `ParameterBlock<T>` behavior. These add some more realistic tests using the `ParameterBlock<T>` support, and show that it can work with the "rewriter" mode. Unfortunately, this code does *not* currently work with the rewriter + the IR at once. That will need to be fixed in a follow-on change, because I now see that the root problem is pretty ugly. * cleanup
Diffstat (limited to 'source/slang/syntax.h')
-rw-r--r--source/slang/syntax.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/syntax.h b/source/slang/syntax.h
index e6a010a4a..749c5ae32 100644
--- a/source/slang/syntax.h
+++ b/source/slang/syntax.h
@@ -38,6 +38,11 @@ namespace Slang
// No conversion at all
kConversionCost_None = 0,
+ // Conversion from a buffer to the type it carries needs to add a minimal
+ // extra cost, just so we can distinguish an overload on `ConstantBuffer<Foo>`
+ // from one on `Foo`
+ kConversionCost_ImplicitDereference = 10,
+
// Conversions based on explicit sub-typing relationships are the cheapest
//
// TODO(tfoley): We will eventually need a discipline for ranking