Exemple #1
0
        public static ExecutionMode Parse(WordReader reader, uint wordCount)
        {
            var id = (Enumerant)reader.ReadWord();

            switch (id)
            {
            case Enumerant.Invocations:
                return(Invocations.Parse(reader, wordCount - 1));

            case Enumerant.LocalSize:
                return(LocalSize.Parse(reader, wordCount - 1));

            case Enumerant.LocalSizeHint:
                return(LocalSizeHint.Parse(reader, wordCount - 1));

            case Enumerant.OutputVertices:
                return(OutputVertices.Parse(reader, wordCount - 1));

            case Enumerant.VecTypeHint:
                return(VecTypeHint.Parse(reader, wordCount - 1));

            default:
                return(new ExecutionMode(id));
            }
        }
Exemple #2
0
            public new static LocalSizeHint Parse(WordReader reader, uint wordCount)
            {
                var end = reader.Position + wordCount;
                var res = new LocalSizeHint();

                res.xsize = Spv.LiteralInteger.Parse(reader, end - reader.Position);
                res.ysize = Spv.LiteralInteger.Parse(reader, end - reader.Position);
                res.zsize = Spv.LiteralInteger.Parse(reader, end - reader.Position);
                return(res);
            }