public static GalTextureSampler MakeSampler(NvGpu Gpu, NvGpuVmm Vmm, long TscPosition) { int[] Tsc = ReadWords(Vmm, TscPosition, 8); GalTextureWrap AddressU = (GalTextureWrap)((Tsc[0] >> 0) & 7); GalTextureWrap AddressV = (GalTextureWrap)((Tsc[0] >> 3) & 7); GalTextureWrap AddressP = (GalTextureWrap)((Tsc[0] >> 6) & 7); GalTextureFilter MagFilter = (GalTextureFilter)((Tsc[1] >> 0) & 3); GalTextureFilter MinFilter = (GalTextureFilter)((Tsc[1] >> 4) & 3); GalTextureMipFilter MipFilter = (GalTextureMipFilter)((Tsc[1] >> 6) & 3); GalColorF BorderColor = new GalColorF( BitConverter.Int32BitsToSingle(Tsc[4]), BitConverter.Int32BitsToSingle(Tsc[5]), BitConverter.Int32BitsToSingle(Tsc[6]), BitConverter.Int32BitsToSingle(Tsc[7])); return(new GalTextureSampler( AddressU, AddressV, AddressP, MinFilter, MagFilter, MipFilter, BorderColor)); }
public static GalTextureSampler MakeSampler(NvGpu gpu, NvGpuVmm vmm, long tscPosition) { int[] tsc = ReadWords(vmm, tscPosition, 8); GalTextureWrap addressU = (GalTextureWrap)((tsc[0] >> 0) & 7); GalTextureWrap addressV = (GalTextureWrap)((tsc[0] >> 3) & 7); GalTextureWrap addressP = (GalTextureWrap)((tsc[0] >> 6) & 7); bool depthCompare = ((tsc[0] >> 9) & 1) == 1; DepthCompareFunc depthCompareFunc = (DepthCompareFunc)((tsc[0] >> 10) & 7); GalTextureFilter magFilter = (GalTextureFilter)((tsc[1] >> 0) & 3); GalTextureFilter minFilter = (GalTextureFilter)((tsc[1] >> 4) & 3); GalTextureMipFilter mipFilter = (GalTextureMipFilter)((tsc[1] >> 6) & 3); GalColorF borderColor = new GalColorF( BitConverter.Int32BitsToSingle(tsc[4]), BitConverter.Int32BitsToSingle(tsc[5]), BitConverter.Int32BitsToSingle(tsc[6]), BitConverter.Int32BitsToSingle(tsc[7])); return(new GalTextureSampler( addressU, addressV, addressP, minFilter, magFilter, mipFilter, borderColor, depthCompare, depthCompareFunc)); }
public GalTextureSampler( GalTextureWrap AddressU, GalTextureWrap AddressV, GalTextureWrap AddressP, GalTextureFilter MinFilter, GalTextureFilter MagFilter, GalTextureMipFilter MipFilter, GalColorF BorderColor) { this.AddressU = AddressU; this.AddressV = AddressV; this.AddressP = AddressP; this.MinFilter = MinFilter; this.MagFilter = MagFilter; this.MipFilter = MipFilter; this.BorderColor = BorderColor; }
public GalTextureSampler( GalTextureWrap addressU, GalTextureWrap addressV, GalTextureWrap addressP, GalTextureFilter minFilter, GalTextureFilter magFilter, GalTextureMipFilter mipFilter, GalColorF borderColor, bool depthCompare, DepthCompareFunc depthCompareFunc) { AddressU = addressU; AddressV = addressV; AddressP = addressP; MinFilter = minFilter; MagFilter = magFilter; MipFilter = mipFilter; BorderColor = borderColor; DepthCompare = depthCompare; DepthCompareFunc = depthCompareFunc; }