23 #ifndef HIP_INCLUDE_HIP_TEXTURE_TYPES_H
24 #define HIP_INCLUDE_HIP_TEXTURE_TYPES_H
28 #if !(defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && (defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__))
30 #elif (defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__))
36 #if !defined(__HIPCC_RTC__)
43 #define hipTextureType1D 0x01
44 #define hipTextureType2D 0x02
45 #define hipTextureType3D 0x03
46 #define hipTextureTypeCubemap 0x0C
47 #define hipTextureType1DLayered 0xF1
48 #define hipTextureType2DLayered 0xF2
49 #define hipTextureTypeCubemapLayered 0xFC
54 #define HIP_IMAGE_OBJECT_SIZE_DWORD 12
55 #define HIP_SAMPLER_OBJECT_SIZE_DWORD 8
56 #define HIP_SAMPLER_OBJECT_OFFSET_DWORD HIP_IMAGE_OBJECT_SIZE_DWORD
57 #define HIP_TEXTURE_OBJECT_SIZE_DWORD (HIP_IMAGE_OBJECT_SIZE_DWORD + HIP_SAMPLER_OBJECT_SIZE_DWORD)
131 #define __HIP_TEXTURE_ATTRIB __attribute__((device_builtin_texture_type))
133 #define __HIP_TEXTURE_ATTRIB
146 addressMode[0] = aMode;
147 addressMode[1] = aMode;
148 addressMode[2] = aMode;
149 channelDesc = hipCreateChannelDesc<T>();
151 textureObject =
nullptr;
154 minMipmapLevelClamp = 0;
155 maxMipmapLevelClamp = 0;
163 addressMode[0] = aMode;
164 addressMode[1] = aMode;
165 addressMode[2] = aMode;
168 textureObject =
nullptr;
171 minMipmapLevelClamp = 0;
172 maxMipmapLevelClamp = 0;
179 #error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
hipArray_Format
Definition: driver_types.h:58
Definition: texture_types.h:109
float minMipmapLevelClamp
Definition: texture_types.h:119
float mipmapLevelBias
Definition: texture_types.h:118
float maxMipmapLevelClamp
Definition: texture_types.h:120
enum hipTextureFilterMode filterMode
Definition: texture_types.h:111
enum hipTextureReadMode readMode
Definition: texture_types.h:112
float borderColor[4]
Definition: texture_types.h:114
enum hipTextureFilterMode mipmapFilterMode
Definition: texture_types.h:117
int sRGB
Definition: texture_types.h:113
int normalizedCoords
Definition: texture_types.h:115
unsigned int maxAnisotropy
Definition: texture_types.h:116
enum hipTextureAddressMode addressMode[3]
Definition: texture_types.h:110
Definition: texture_types.h:88
int sRGB
Definition: texture_types.h:94
hipTextureObject_t textureObject
Definition: texture_types.h:101
float minMipmapLevelClamp
Definition: texture_types.h:98
enum hipTextureFilterMode mipmapFilterMode
Definition: texture_types.h:96
enum hipTextureReadMode readMode
Definition: texture_types.h:90
enum hipTextureAddressMode addressMode[3]
Definition: texture_types.h:92
enum hipTextureFilterMode filterMode
Definition: texture_types.h:91
int normalized
Definition: texture_types.h:89
unsigned int maxAnisotropy
Definition: texture_types.h:95
int numChannels
Definition: texture_types.h:102
float maxMipmapLevelClamp
Definition: texture_types.h:99
enum hipArray_Format format
Definition: texture_types.h:103
float mipmapLevelBias
Definition: texture_types.h:97
struct hipChannelFormatDesc channelDesc
Definition: texture_types.h:93
struct __hip_texture * hipTextureObject_t
Definition: texture_types.h:63
hipTextureReadMode
Definition: texture_types.h:83
@ hipReadModeElementType
Definition: texture_types.h:83
@ hipReadModeNormalizedFloat
Definition: texture_types.h:83
#define hipTextureType1D
Definition: texture_types.h:43
hipTextureAddressMode
Definition: texture_types.h:68
@ hipAddressModeMirror
Definition: texture_types.h:71
@ hipAddressModeBorder
Definition: texture_types.h:72
@ hipAddressModeWrap
Definition: texture_types.h:69
@ hipAddressModeClamp
Definition: texture_types.h:70
hipTextureFilterMode
Definition: texture_types.h:78
@ hipFilterModePoint
Definition: texture_types.h:78
@ hipFilterModeLinear
Definition: texture_types.h:78