diff options
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; } }; |
