Пример #1
0
        public static void Isberd(EmitterContext context)
        {
            InstIsberd op = context.GetOp <InstIsberd>();

            // This instruction performs a load from ISBE memory,
            // however it seems to be only used to get some vertex
            // input data, so we instead propagate the offset so that
            // it can be used on the attribute load.
            context.Copy(GetDest(op.Dest), GetSrcReg(context, op.SrcA));
        }
Пример #2
0
        public static void Isberd(EmitterContext context)
        {
            InstIsberd op = context.GetOp <InstIsberd>();

            // This instruction performs a load from ISBE (Internal Stage Buffer Entry) memory.
            // Here, we just propagate the offset, as the result from this instruction is usually
            // used with ALD to perform vertex load on geometry or tessellation shaders.
            // The offset is calculated as (PrimitiveIndex * VerticesPerPrimitive) + VertexIndex.
            // Since we hardcode PrimitiveIndex to zero, then the offset will be just VertexIndex.
            context.Copy(GetDest(op.Dest), GetSrcReg(context, op.SrcA));
        }