From ff4621460a98f34d74e4275841c313400cbda0dd Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Mon, 17 Jul 2017 15:13:37 -0700 Subject: 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. --- source/slang/emit.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'source/slang/emit.cpp') diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index c6efa88dc..ef922c418 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -771,6 +771,7 @@ struct EmitVisitor case TextureType::Shape2D: Emit("Texture2D"); break; case TextureType::Shape3D: Emit("Texture3D"); break; case TextureType::ShapeCube: Emit("TextureCube"); break; + case TextureType::ShapeBuffer: Emit("Buffer"); break; default: assert(!"unreachable"); break; -- cgit v1.2.3