MCPcopy Create free account
hub / github.com/KhronosGroup/glslang / improperStraddle

Method improperStraddle

glslang/MachineIndependent/linkValidate.cpp:2618–2625  ·  view source on GitHub ↗

To aid the basic HLSL rule about crossing vec4 boundaries.

Source from the content-addressed store, hash-verified

2616
2617// To aid the basic HLSL rule about crossing vec4 boundaries.
2618bool TIntermediate::improperStraddle(const TType& type, int size, int offset, bool vectorLike)
2619{
2620 if (! vectorLike || type.isArray())
2621 return false;
2622
2623 return size <= 16 ? offset / 16 != (offset + size - 1) / 16
2624 : offset % 16 != 0;
2625}
2626
2627int TIntermediate::getScalarAlignment(const TType& type, int& size, int& stride, bool rowMajor)
2628{

Callers 1

updateMemberOffsetMethod · 0.80

Calls 1

isArrayMethod · 0.45

Tested by

no test coverage detected