Web: Tighten up sampling code and interfaces.

Saves about 9K.
This commit is contained in:
John Kessenich 2019-08-08 01:15:24 -06:00
parent eaf4496312
commit 3e4b6ff76a
8 changed files with 217 additions and 139 deletions

View file

@ -1975,7 +1975,7 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const
op = EOpConstructStruct;
break;
case EbtSampler:
if (type.getSampler().combined)
if (type.getSampler().isCombined())
op = EOpConstructTextureSampler;
break;
case EbtFloat:
@ -3835,7 +3835,7 @@ bool TIntermediate::specConstantPropagates(const TIntermTyped& node1, const TInt
struct TextureUpgradeAndSamplerRemovalTransform : public TIntermTraverser {
void visitSymbol(TIntermSymbol* symbol) override {
if (symbol->getBasicType() == EbtSampler && symbol->getType().getSampler().isTexture()) {
symbol->getWritableType().getSampler().combined = true;
symbol->getWritableType().getSampler().setCombined(true);
}
}
bool visitAggregate(TVisit, TIntermAggregate* ag) override {