示例#1
0
		public static Sfi0Chunk Parse(BytecodeReader reader)
		{
			var flags = reader.ReadInt32();
			Debug.Assert(flags == 1 || flags == 2); // TODO: Unknown

			var result = new Sfi0Chunk();

			if (flags == 1)
				result.RequiresDoublePrecisionFloatingPoint = true;
			
			return result;
		}
示例#2
0
        public static Sfi0Chunk Parse(BytecodeReader reader)
        {
            var flags = reader.ReadInt32();

            Debug.Assert(flags == 1 || flags == 2);             // TODO: Unknown

            var result = new Sfi0Chunk();

            if (flags == 1)
            {
                result.RequiresDoublePrecisionFloatingPoint = true;
            }

            return(result);
        }
示例#3
0
        public static Sfi0Chunk Parse(BytecodeReader reader, ShaderVersion version, uint chunkSize)
        {
            var flags  = (ShaderRequiresFlags)reader.ReadInt32();
            var result = new Sfi0Chunk();

            result.Flags = flags;
            Debug.Assert(chunkSize == 8,
                         $"Unexpected Sfi0 Chunk Size");
            Debug.Assert((flags & (ShaderRequiresFlags.UavsAtEveryStage)) == 0,
                         $"Unexpected SfiFlags {Convert.ToString((int)flags, 2)} {flags.ToString()}");
            Debug.Assert(!int.TryParse(flags.ToString(), out _),
                         $"Unexpected SfiFlags {Convert.ToString((int)flags, 2)} {flags.ToString()}");
            var unknown0 = reader.ReadUInt32();

            Debug.Assert(unknown0 == 0, "Sfi0 unknown value");
            result._version = version;
            return(result);
        }