diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-12-14 11:51:29 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-14 11:51:29 -0800 |
| commit | 4137f9d4a58462ed94ed658ac0d722c830c3eb89 (patch) | |
| tree | 74e89ad6deb13e23a4a2a72020e87219c9a1879e /source/slang/type-layout.h | |
| parent | 6d6142122b15461d6c8cabdb31292b0de688ba35 (diff) | |
More fixups for Vulkan parameter block bindings (#309)
I'm adding a small cross-compilation test to try to make sure that we are testing the binding generation for GLSL output. We probably still need a more complex test that uses multiple blocks, plus variables not in a block.
The big changes here are:
- Change the `containerTypeLayout` field to a `containerVarLayout` in the `ParameterGroupTypeLayout`, so that we can store the base offsets for the fields in a uniform fashion (even though these will all be zero).
- Switch the emit logic to carefully use either the container or element var layout depending on what they are emitting bindings for. This involved adding something akin to the "reflection path" notion that Falcor has to use, but only for the emit step.
Diffstat (limited to 'source/slang/type-layout.h')
| -rw-r--r-- | source/slang/type-layout.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/slang/type-layout.h b/source/slang/type-layout.h index fc2007437..6874fc460 100644 --- a/source/slang/type-layout.h +++ b/source/slang/type-layout.h @@ -307,11 +307,13 @@ public: class ParameterGroupTypeLayout : public TypeLayout { public: - // The layout of the "container" type itself. + // The layout of the "container" part itself. // E.g., for a constant buffer, this would reflect // the resource usage of the container, without - // the element type factored in. - RefPtr<TypeLayout> containerTypeLayout; + // the element type factored in. All of the offsets + // for this variable should be zero, but it is included + // for completeness. + RefPtr<VarLayout> containerVarLayout; // A variable layout for the element of the container. // The offsets of the variable layout will reflect |
