HLSL: phase 3b: Texture methods remember and return vector size.

Also makes a (correct) test change for global -> temp vars.
This commit is contained in:
steve-lunarg
2016-10-14 16:40:32 -06:00
parent 4f2da27aec
commit 8b0227ced9
27 changed files with 800 additions and 541 deletions

View File

@@ -907,12 +907,6 @@ bool HlslGrammar::acceptTextureType(TType& type)
return false;
}
// if (txType.getVectorSize() != 1 && txType.getVectorSize() != 4 && !image) {
// // TODO: handle vec2/3 types
// expected("vector size not yet supported in texture type");
// return false;
// }
if (ms && acceptTokenClass(EHTokComma)) {
// read sample count for multisample types, if given
if (! peekTokenClass(EHTokIntConstant)) {
@@ -957,6 +951,9 @@ bool HlslGrammar::acceptTextureType(TType& type)
sampler.setTexture(txType.getBasicType(), dim, array, shadow, ms);
}
}
// Remember the declared vector size.
sampler.vectorSize = txType.getVectorSize();
type.shallowCopy(TType(sampler, EvqUniform, arraySizes));
type.getQualifier().layoutFormat = format;