예제 #1
0
        public SwizzleOperation(SwizzleMask mask)
        {
            this.mask = mask;

            inputDesc = new PinsDescriptor(
                new PinDescriptor(PinFormatHelper.ContainsComponents(mask.MinimumSwizzleInFormat), "Data to be swizzled."));
        }
예제 #2
0
        static CompareOperation()
        {
            PinDescriptor in1 = new PinDescriptor(ComparableFormat, "First operand of compare.");
            PinDescriptor in2 = new PinDescriptor(ComparableFormat, "Second operand of compare.");

            inputDesc = new PinsDescriptor(
                new PinEqual(in1, in2), in1, in2);
        }
예제 #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        static MultiplyOperation()
        {
            PinDescriptor src1 = new PinDescriptor(BinaryMathOperation.AllFormats, "Operand 1 (Left)");
            PinDescriptor src2 = new PinDescriptor(BinaryMathOperation.AllFormats, "Operand 2 (Right)");
            IPinRelation  req  = new PinMultipliable(src1, src2);

            inputDesc = new PinsDescriptor(req, src1, src2);
        }
예제 #4
0
        /// <summary>
        /// Creates an expand operation.
        /// </summary>
        public ExpandOperation(PinFormat expandTo, ExpandType type)
        {
            this.type     = type;
            this.expandTo = expandTo;

            inputDesc = new PinsDescriptor(
                new PinDescriptor(PinFormatHelper.ExpandableTo(expandTo), "Data to be expanded."));
        }
예제 #5
0
        static BranchOperation()
        {
            PinDescriptor b   = new PinDescriptor(PinFormat.Bool, "Branch value.");
            PinDescriptor in1 = new PinDescriptor(AllFormats, "True branch value.");
            PinDescriptor in2 = new PinDescriptor(AllFormats, "False branch value.");

            inputDesc = new PinsDescriptor(
                new PinEqual(in1, in2), in1, in2);
        }
예제 #6
0
        /// <summary>
        /// A static constructor.
        /// </summary>
        static BinaryMathOperation()
        {
            // Input descriptor.
            PinDescriptor in1 = new PinDescriptor(BinaryMathOperation.AllFormats, "Source 1");
            PinDescriptor in2 = new PinDescriptor(BinaryMathOperation.AllFormats, "Source 2");
            IPinRelation  req = new PinEqual(in1, in2);

            InputDesc = new PinsDescriptor(req, in1, in2);
        }
예제 #7
0
        /// <summary>
        /// A static constructor.
        /// </summary>
        static DotProductOperation()
        {
            // Input descriptor.
            PinDescriptor in1 = new PinDescriptor(DotProductOperation.InputFormats, "Source 1");
            PinDescriptor in2 = new PinDescriptor(DotProductOperation.InputFormats, "Source 2");
            IPinRelation  req = new PinEqual(in1, in2);

            InputDesc = new PinsDescriptor(req, in1, in2);
        }
예제 #8
0
        void UpdateDesc()
        {
            // We create output desc.
            List <PinDescriptor> descs = new List <PinDescriptor>();

            foreach (KeyValuePair <PinComponent, Pin> pair in inputs)
            {
                descs.Add(new PinDescriptor(pair.Value.Format, string.Empty, pair.Key));
            }

            inputDesc = new PinsDescriptor(descs.ToArray());
        }
예제 #9
0
        static LoadOperation()
        {
            PinDescriptor texture = new PinDescriptor(new PinFormat[] {
                PinFormat.Texture1D, PinFormat.BufferTexture, PinFormat.Texture1DArray, PinFormat.Texture2D,
                PinFormat.Texture2DArray, PinFormat.Texture3D
            }, "Texture");
            PinDescriptor addr = new PinDescriptor(new PinFormat[] {
                PinFormat.Integerx2, PinFormat.Integerx3, PinFormat.Integerx4
            }, "Address");

            PinDescriptor offset = new PinDescriptor(new PinFormat[]
                                                     { PinFormat.Integer, PinFormat.Integerx2, PinFormat.Integerx3 }, true, "Offset");


            inputDesc = new PinsDescriptor(new IPinRelation[] {
                new PinTextureMipmappedAddressable(texture, addr),
                new PinTextureAddressable(texture, offset),
            },
                                           texture, addr, offset);
        }
예제 #10
0
        static SampleOperation()
        {
            PinDescriptor sampler = new PinDescriptor(PinFormat.Sampler, "Sampler");
            PinDescriptor texture = new PinDescriptor(new PinFormat[] {
                PinFormat.Texture1D, PinFormat.BufferTexture, PinFormat.Texture1DArray, PinFormat.Texture2D,
                PinFormat.Texture2DArray, PinFormat.Texture3D
            }, "Texture");
            PinDescriptor addr = new PinDescriptor(new PinFormat[] {
                PinFormat.Float, PinFormat.Floatx2, PinFormat.Floatx3
            }, "Address");

            PinDescriptor offset = new PinDescriptor(new PinFormat[] { PinFormat.Integer, PinFormat.Integerx2, PinFormat.Integerx3 }, true, "Offset");


            inputDesc = new PinsDescriptor(new IPinRelation[] {
                new PinTextureAddressable(texture, addr),
                new PinTextureAddressable(texture, offset),
            },
                                           sampler, texture, addr, offset);
        }