Copyright | (c) [2009..2012] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | None |
Language | Haskell98 |
Foreign.CUDA.Driver.Texture
Contents
Description
Texture management for low-level driver interface
- newtype Texture = Texture {
- useTexture :: Ptr ()
- data Format
- data AddressMode
- data FilterMode
- data ReadMode
- create :: IO Texture
- destroy :: Texture -> IO ()
- bind :: Texture -> DevicePtr a -> Int64 -> IO ()
- bind2D :: Texture -> Format -> Int -> DevicePtr a -> (Int, Int) -> Int64 -> IO ()
- getAddressMode :: Texture -> Int -> IO AddressMode
- getFilterMode :: Texture -> IO FilterMode
- getFormat :: Texture -> IO (Format, Int)
- setAddressMode :: Texture -> Int -> AddressMode -> IO ()
- setFilterMode :: Texture -> FilterMode -> IO ()
- setFormat :: Texture -> Format -> Int -> IO ()
- setReadMode :: Texture -> ReadMode -> IO ()
Texture Reference Management
A texture reference
Constructors
Texture | |
Fields
|
Texture data formats
Texture read mode options
Constructors
ReadAsInteger | |
NormalizedCoordinates |
Deprecated: as of CUDA version 3.2
Create a new texture reference. Once created, the application must call
setPtr
to associate the reference with allocated memory. Other texture
reference functions are used to specify the format and interpretation to be
used when the memory is read through this reference.
bind :: Texture -> DevicePtr a -> Int64 -> IO () Source
Bind a linear array address of the given size (bytes) as a texture reference. Any previously bound references are unbound.
getAddressMode :: Texture -> Int -> IO AddressMode Source
Get the addressing mode used by a texture reference, corresponding to the given dimension (currently the only supported dimension values are 0 or 1).
getFilterMode :: Texture -> IO FilterMode Source
Get the filtering mode used by a texture reference
getFormat :: Texture -> IO (Format, Int) Source
Get the data format and number of channel components of the bound texture
setAddressMode :: Texture -> Int -> AddressMode -> IO () Source
Specify the addressing mode for the given dimension of a texture reference
setFilterMode :: Texture -> FilterMode -> IO () Source
Specify the filtering mode to be used when reading memory through a texture reference
setFormat :: Texture -> Format -> Int -> IO () Source
Specify the format of the data and number of packed components per element to be read by the texture reference
setReadMode :: Texture -> ReadMode -> IO () Source
Specify additional characteristics for reading and indexing the texture reference