| 232 | } |
| 233 | |
| 234 | static ReflectionResourceType::ShaderAccess getShaderAccess(TypeReflection* pSlangType) |
| 235 | { |
| 236 | // Compute access for an array using the underlying type... |
| 237 | pSlangType = pSlangType->unwrapArray(); |
| 238 | |
| 239 | switch (pSlangType->getKind()) |
| 240 | { |
| 241 | case TypeReflection::Kind::SamplerState: |
| 242 | case TypeReflection::Kind::ConstantBuffer: |
| 243 | return ReflectionResourceType::ShaderAccess::Read; |
| 244 | break; |
| 245 | |
| 246 | case TypeReflection::Kind::Resource: |
| 247 | case TypeReflection::Kind::ShaderStorageBuffer: |
| 248 | switch (pSlangType->getResourceAccess()) |
| 249 | { |
| 250 | case SLANG_RESOURCE_ACCESS_NONE: |
| 251 | return ReflectionResourceType::ShaderAccess::Undefined; |
| 252 | |
| 253 | case SLANG_RESOURCE_ACCESS_READ: |
| 254 | return ReflectionResourceType::ShaderAccess::Read; |
| 255 | |
| 256 | default: |
| 257 | return ReflectionResourceType::ShaderAccess::ReadWrite; |
| 258 | } |
| 259 | break; |
| 260 | |
| 261 | default: |
| 262 | return ReflectionResourceType::ShaderAccess::Undefined; |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | static ReflectionResourceType::ReturnType getReturnType(TypeReflection* pType) |
| 267 | { |
no test coverage detected