diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-07-07 08:50:00 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-07 08:50:00 -0700 |
| commit | c47f23c2e61538c55819363f9db47ce946649027 (patch) | |
| tree | 00c8e2aaf83735f86ce6bf71e6781ac579a55f64 /source | |
| parent | af8c0eae90c76d2c8f745badf6f743cefe15f777 (diff) | |
| parent | 54519ed70fbe154e196d04a8b62f6ea6aeded52a (diff) | |
Merge pull request #56 from tfoleyNV/bug-55
Bug 55
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/emit.cpp | 2 | ||||
| -rw-r--r-- | source/slang/reflection.cpp | 4 | ||||
| -rw-r--r-- | source/slang/type-layout.cpp | 5 |
3 files changed, 8 insertions, 3 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 79a8277bf..08d2218dc 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -755,7 +755,7 @@ static void emitCallExpr( char d = *cursor++; assert(('0' <= d) && (d <= '9')); - int argIndex = d - '0'; + UInt argIndex = d - '0'; assert((0 <= argIndex) && (argIndex < argCount)); Emit(context, "("); EmitExpr(context, callExpr->Arguments[argIndex]); diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp index f71435c6f..b27cc0696 100644 --- a/source/slang/reflection.cpp +++ b/source/slang/reflection.cpp @@ -842,6 +842,10 @@ static void emitReflectionVarBindingInfoJSON( CASE(VERTEX_INPUT, vertexInput); CASE(FRAGMENT_OUTPUT, fragmentOutput); CASE(SAMPLER_STATE, samplerState); + CASE(UNIFORM, uniform); + CASE(DESCRIPTOR_TABLE_SLOT, descriptorTableSlot); + CASE(SPECIALIZATION_CONSTANT, specializationConstant); + CASE(MIXED, mixed); #undef CASE default: diff --git a/source/slang/type-layout.cpp b/source/slang/type-layout.cpp index 2fcf64226..fbaec3736 100644 --- a/source/slang/type-layout.cpp +++ b/source/slang/type-layout.cpp @@ -163,10 +163,11 @@ struct Std140LayoutRulesImpl : GLSLConstantBufferLayoutRulesImpl SimpleLayoutInfo GetVectorLayout(SimpleLayoutInfo elementInfo, size_t elementCount) override { assert(elementInfo.kind == LayoutResourceKind::Uniform); + auto size = elementInfo.size * elementCount; SimpleLayoutInfo vectorInfo( LayoutResourceKind::Uniform, - elementInfo.size * elementCount, - RoundUpToPowerOfTwo(elementInfo.size * elementInfo.alignment)); + size, + RoundUpToPowerOfTwo(size)); return vectorInfo; } }; |
