public override void Parse(WordReader reader, uint wordCount) { var end = reader.Position + wordCount - 1; IdResultType = Spv.IdResultType.Parse(reader, end - reader.Position); IdResult = Spv.IdResult.Parse(reader, end - reader.Position); reader.Instructions.Add(this); SamplerAddressingMode = Spv.SamplerAddressingMode.Parse(reader, end - reader.Position); Param = Spv.LiteralInteger.Parse(reader, end - reader.Position); SamplerFilterMode = Spv.SamplerFilterMode.Parse(reader, end - reader.Position); }
public ConstantSampler(SpirvTypeBase resultType, Spv.SamplerAddressingMode samplerAddressingMode, uint param, Spv.SamplerFilterMode samplerFilterMode, string debugName = null) { this.ResultType = resultType; this.SamplerAddressingMode = samplerAddressingMode; this.Param = param; this.SamplerFilterMode = samplerFilterMode; DebugName = debugName; }
/// <summary> /// Read instruction operands from the bytecode source. /// </summary> /// <param name="reader">Bytecode source.</param> /// <param name="end">Index of a next word right after this instruction.</param> public override void ParseOperands(WordReader reader, uint end) { SamplerAddressingMode = Spv.SamplerAddressingMode.Parse(reader, end - reader.Position); Param = Spv.LiteralInteger.Parse(reader, end - reader.Position); SamplerFilterMode = Spv.SamplerFilterMode.Parse(reader, end - reader.Position); }