diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-07-07 08:16:09 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-07-07 08:16:09 -0700 |
| commit | 54519ed70fbe154e196d04a8b62f6ea6aeded52a (patch) | |
| tree | 00c8e2aaf83735f86ce6bf71e6781ac579a55f64 /tests/reflection/gh-55.glsl.expected | |
| parent | b6c299ee58e397898e09c9a4168627a26ed7b72f (diff) | |
Fix alignment computation for `std140` uniforms
Fixes #55
I was incorrectly computing alignment as `elementSize * elementAlignment`, rounded up to a power of two (which works out to be `elementSize` squared), when I should have been using `elementSize * elementCount`, rounded up to a power of two.
Diffstat (limited to 'tests/reflection/gh-55.glsl.expected')
| -rw-r--r-- | tests/reflection/gh-55.glsl.expected | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/reflection/gh-55.glsl.expected b/tests/reflection/gh-55.glsl.expected new file mode 100644 index 000000000..8cdebdcd8 --- /dev/null +++ b/tests/reflection/gh-55.glsl.expected @@ -0,0 +1,45 @@ +result code = 0 +standard error = { +} +standard output = { +{ + "parameters": [ + { + "name": "PerFrameCB", + "binding": {"kind": "descriptorTableSlot", "index": 0}, + "type": { + "kind": "constantBuffer", + "elementType": { + "kind": "struct", + "fields": [ + { + "name": "offset", + "type": { + "kind": "vector", + "elementCount": 2, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + }, + "binding": {"kind": "uniform", "offset": 0, "size": 8} + }, + { + "name": "scale", + "type": { + "kind": "vector", + "elementCount": 2, + "elementType": { + "kind": "scalar", + "scalarType": "float32" + } + }, + "binding": {"kind": "uniform", "offset": 8, "size": 8} + } + ] + } + } + } + ] +} +} |
