summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-03-21 06:38:47 -0400
committerGitHub <noreply@github.com>2020-03-21 10:38:47 +0000
commit05c9a5c9dc23a716c7cbeae91f581bbc13f10ed2 (patch)
tree02d1f2a5ad0e59904efa2751e30ada81fda86ea0 /source
parent884a9bcafc5fb9ae47245fa3ea9a6e64cb65a482 (diff)
CPU Texture GetDimensions support (#1283)
* Added CPU support for GetDimensions on C++/CPU target. Added texture-get-dimension.slang test * Fix some typos. * Update CUDA docs. * Fix output of GetDimensions on glsl when has an array. Disabled VK - because VK renderer doesn't support createTextureView * Fix typo. * Fix typo. * Fix bad-operator-call diagnostics output.
Diffstat (limited to 'source')
-rw-r--r--source/slang/core.meta.slang7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/slang/core.meta.slang b/source/slang/core.meta.slang
index 6c1163adc..2b43206a3 100644
--- a/source/slang/core.meta.slang
+++ b/source/slang/core.meta.slang
@@ -707,7 +707,12 @@ for (int tt = 0; tt < kBaseTextureTypeCount; ++tt)
switch(baseShape)
{
case TextureFlavor::Shape::Shape1D:
- sb << "($" << aa++ << opStr << "))";
+ sb << "($" << aa++ << opStr << ")";
+ if (isArray)
+ {
+ sb << ".x";
+ }
+ sb << ")";
cc = 1;
break;