summaryrefslogtreecommitdiffstats
path: root/source/slang/reflection.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-07-10 09:49:46 -0700
committerGitHub <noreply@github.com>2017-07-10 09:49:46 -0700
commit8abdf2dddd10feb9794c86cdf6b2159a2b6383e4 (patch)
treedf7d790f33f7e4c8adc1b9b747c7c908d8bab0d4 /source/slang/reflection.cpp
parent68df74b58a56b0a1fb19b9ec4ff0282969cd6a12 (diff)
parent5b7c254d24653fd1c19157e8d5ef68a7e787ff58 (diff)
Merge pull request #65 from tfoleyNV/falcor-work
Falcor work
Diffstat (limited to 'source/slang/reflection.cpp')
-rw-r--r--source/slang/reflection.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp
index d62da70c1..eb27df398 100644
--- a/source/slang/reflection.cpp
+++ b/source/slang/reflection.cpp
@@ -112,7 +112,7 @@ SLANG_API SlangTypeKind spReflectionType_GetKind(SlangReflectionType* inType)
{
return SLANG_TYPE_KIND_SAMPLER_STATE;
}
- else if (auto textureType = type->As<TextureType>())
+ else if (auto textureType = type->As<TextureTypeBase>())
{
return SLANG_TYPE_KIND_RESOURCE;
}
@@ -326,7 +326,7 @@ SLANG_API SlangResourceShape spReflectionType_GetResourceShape(SlangReflectionTy
type = arrayType->BaseType.Ptr();
}
- if(auto textureType = type->As<TextureType>())
+ if(auto textureType = type->As<TextureTypeBase>())
{
return textureType->getShape();
}
@@ -363,7 +363,7 @@ SLANG_API SlangResourceAccess spReflectionType_GetResourceAccess(SlangReflection
type = arrayType->BaseType.Ptr();
}
- if(auto textureType = type->As<TextureType>())
+ if(auto textureType = type->As<TextureTypeBase>())
{
return textureType->getAccess();
}
@@ -385,6 +385,9 @@ SLANG_API SlangResourceAccess spReflectionType_GetResourceAccess(SlangReflection
CASE(HLSLByteAddressBufferType, SLANG_BYTE_ADDRESS_BUFFER, SLANG_RESOURCE_ACCESS_READ);
CASE(HLSLRWByteAddressBufferType, SLANG_BYTE_ADDRESS_BUFFER, SLANG_RESOURCE_ACCESS_READ_WRITE);
CASE(UntypedBufferResourceType, SLANG_BYTE_ADDRESS_BUFFER, SLANG_RESOURCE_ACCESS_READ);
+
+ // This isn't entirely accurate, but I can live with it for now
+ CASE(GLSLShaderStorageBufferType, SLANG_STRUCTURED_BUFFER, SLANG_RESOURCE_ACCESS_READ_WRITE);
#undef CASE
return SLANG_RESOURCE_ACCESS_NONE;
@@ -400,7 +403,7 @@ SLANG_API SlangReflectionType* spReflectionType_GetResourceResultType(SlangRefle
type = arrayType->BaseType.Ptr();
}
- if (auto textureType = type->As<TextureType>())
+ if (auto textureType = type->As<TextureTypeBase>())
{
return convert(textureType->elementType.Ptr());
}