diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-07-17 15:13:37 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-07-17 15:13:37 -0700 |
| commit | ff4621460a98f34d74e4275841c313400cbda0dd (patch) | |
| tree | a8f6a2334397ade3981f35d1ee764a4c325e0927 /source/slang/type-layout.cpp | |
| parent | 0059ccb3997c2af87bc3f76524d8cd4787c20b7e (diff) | |
Handle `Buffer` types more like textures
Fixes #94
We'd been handling HLSL `Buffer` and `RWBuffer` in a one-off fashion, and that led to a lot of code duplication, and also to the issue that we weren't handling `RasterizerOrderedBuffer` at all.
This change basically folds `Buffer` in so that it is conceptually a texture type (just with a unique shape). Hopefully all the other logic still works.
Diffstat (limited to 'source/slang/type-layout.cpp')
| -rw-r--r-- | source/slang/type-layout.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/source/slang/type-layout.cpp b/source/slang/type-layout.cpp index 6ca2d68fb..b4bf8949f 100644 --- a/source/slang/type-layout.cpp +++ b/source/slang/type-layout.cpp @@ -361,14 +361,12 @@ struct HLSLObjectLayoutRulesImpl : ObjectLayoutRulesImpl case ShaderParameterKind::TextureUniformBuffer: case ShaderParameterKind::StructuredBuffer: - case ShaderParameterKind::SampledBuffer: case ShaderParameterKind::RawBuffer: case ShaderParameterKind::Buffer: case ShaderParameterKind::Texture: return SimpleLayoutInfo(LayoutResourceKind::ShaderResource, 1); case ShaderParameterKind::MutableStructuredBuffer: - case ShaderParameterKind::MutableSampledBuffer: case ShaderParameterKind::MutableRawBuffer: case ShaderParameterKind::MutableBuffer: case ShaderParameterKind::MutableTexture: @@ -1041,8 +1039,6 @@ SimpleLayoutInfo GetLayoutImpl( type, rules, outTypeLayout); \ } while(0) - CASE(HLSLBufferType, SampledBuffer); - CASE(HLSLRWBufferType, MutableSampledBuffer); CASE(HLSLByteAddressBufferType, RawBuffer); CASE(HLSLRWByteAddressBufferType, MutableRawBuffer); |
