Copyright | [2009..2018] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | None |
Language | Haskell98 |
Texture references
Synopsis
- data Texture = Texture {
- normalised :: !Bool
- filtering :: !FilterMode
- addressing :: !(AddressMode, AddressMode, AddressMode)
- format :: !FormatDesc
- data FormatKind
- data AddressMode
- data FilterMode
- data FormatDesc = FormatDesc {}
- bind :: String -> Texture -> DevicePtr a -> Int64 -> IO ()
- bind2D :: String -> Texture -> DevicePtr a -> (Int, Int) -> Int64 -> IO ()
Texture Reference Management
Texture | |
|
Instances
Eq Texture Source # | |
Show Texture Source # | |
Storable Texture Source # | |
data FormatKind Source #
Texture channel format kind
Instances
Enum FormatKind Source # | Texture addressing mode |
Defined in Foreign.CUDA.Runtime.Texture succ :: FormatKind -> FormatKind # pred :: FormatKind -> FormatKind # toEnum :: Int -> FormatKind # fromEnum :: FormatKind -> Int # enumFrom :: FormatKind -> [FormatKind] # enumFromThen :: FormatKind -> FormatKind -> [FormatKind] # enumFromTo :: FormatKind -> FormatKind -> [FormatKind] # enumFromThenTo :: FormatKind -> FormatKind -> FormatKind -> [FormatKind] # | |
Eq FormatKind Source # | |
Defined in Foreign.CUDA.Runtime.Texture (==) :: FormatKind -> FormatKind -> Bool # (/=) :: FormatKind -> FormatKind -> Bool # | |
Show FormatKind Source # | |
Defined in Foreign.CUDA.Runtime.Texture showsPrec :: Int -> FormatKind -> ShowS # show :: FormatKind -> String # showList :: [FormatKind] -> ShowS # |
data AddressMode Source #
Instances
Enum AddressMode Source # | Texture filtering mode |
Defined in Foreign.CUDA.Runtime.Texture succ :: AddressMode -> AddressMode # pred :: AddressMode -> AddressMode # toEnum :: Int -> AddressMode # fromEnum :: AddressMode -> Int # enumFrom :: AddressMode -> [AddressMode] # enumFromThen :: AddressMode -> AddressMode -> [AddressMode] # enumFromTo :: AddressMode -> AddressMode -> [AddressMode] # enumFromThenTo :: AddressMode -> AddressMode -> AddressMode -> [AddressMode] # | |
Eq AddressMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture (==) :: AddressMode -> AddressMode -> Bool # (/=) :: AddressMode -> AddressMode -> Bool # | |
Show AddressMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture showsPrec :: Int -> AddressMode -> ShowS # show :: AddressMode -> String # showList :: [AddressMode] -> ShowS # |
data FilterMode Source #
Instances
Enum FilterMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture succ :: FilterMode -> FilterMode # pred :: FilterMode -> FilterMode # toEnum :: Int -> FilterMode # fromEnum :: FilterMode -> Int # enumFrom :: FilterMode -> [FilterMode] # enumFromThen :: FilterMode -> FilterMode -> [FilterMode] # enumFromTo :: FilterMode -> FilterMode -> [FilterMode] # enumFromThenTo :: FilterMode -> FilterMode -> FilterMode -> [FilterMode] # | |
Eq FilterMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture (==) :: FilterMode -> FilterMode -> Bool # (/=) :: FilterMode -> FilterMode -> Bool # | |
Show FilterMode Source # | |
Defined in Foreign.CUDA.Runtime.Texture showsPrec :: Int -> FilterMode -> ShowS # show :: FilterMode -> String # showList :: [FilterMode] -> ShowS # |
data FormatDesc Source #
A description of how memory read through the texture cache should be interpreted, including the kind of data and the number of bits of each component (x,y,z and w, respectively).
Instances
Eq FormatDesc Source # | |
Defined in Foreign.CUDA.Runtime.Texture (==) :: FormatDesc -> FormatDesc -> Bool # (/=) :: FormatDesc -> FormatDesc -> Bool # | |
Show FormatDesc Source # | |
Defined in Foreign.CUDA.Runtime.Texture showsPrec :: Int -> FormatDesc -> ShowS # show :: FormatDesc -> String # showList :: [FormatDesc] -> ShowS # | |
Storable FormatDesc Source # | |
Defined in Foreign.CUDA.Runtime.Texture sizeOf :: FormatDesc -> Int # alignment :: FormatDesc -> Int # peekElemOff :: Ptr FormatDesc -> Int -> IO FormatDesc # pokeElemOff :: Ptr FormatDesc -> Int -> FormatDesc -> IO () # peekByteOff :: Ptr b -> Int -> IO FormatDesc # pokeByteOff :: Ptr b -> Int -> FormatDesc -> IO () # peek :: Ptr FormatDesc -> IO FormatDesc # poke :: Ptr FormatDesc -> FormatDesc -> IO () # |
bind :: String -> Texture -> DevicePtr a -> Int64 -> IO () Source #
Bind the memory area associated with the device pointer to a texture reference given by the named symbol. Any previously bound references are unbound.
bind2D :: String -> Texture -> DevicePtr a -> (Int, Int) -> Int64 -> IO () Source #
Bind the two-dimensional memory area to the texture reference associated with the given symbol. The size of the area is constrained by (width,height) in texel units, and the row pitch in bytes. Any previously bound references are unbound.