23#ifndef HIP_INCLUDE_HIP_TEXTURE_TYPES_H
24#define HIP_INCLUDE_HIP_TEXTURE_TYPES_H
27#pragma clang diagnostic push
28#pragma clang diagnostic ignored "-Wreserved-identifier"
29#pragma clang diagnostic ignored "-Wreserved-macro-identifier"
30#pragma clang diagnostic ignored "-Wc++98-compat"
33#if !defined(__HIPCC_RTC__)
37#if !defined(__HIP_PLATFORM_AMD__) && defined(__HIP_PLATFORM_NVIDIA__)
39#elif defined(__HIP_PLATFORM_AMD__) && !defined(__HIP_PLATFORM_NVIDIA__)
45#if !defined(__HIPCC_RTC__)
51#define hipTextureType1D 0x01
52#define hipTextureType2D 0x02
53#define hipTextureType3D 0x03
54#define hipTextureTypeCubemap 0x0C
55#define hipTextureType1DLayered 0xF1
56#define hipTextureType2DLayered 0xF2
57#define hipTextureTypeCubemapLayered 0xFC
62#define HIP_IMAGE_OBJECT_SIZE_DWORD 12
63#define HIP_SAMPLER_OBJECT_SIZE_DWORD 8
64#define HIP_SAMPLER_OBJECT_OFFSET_DWORD HIP_IMAGE_OBJECT_SIZE_DWORD
65#define HIP_TEXTURE_OBJECT_SIZE_DWORD (HIP_IMAGE_OBJECT_SIZE_DWORD + HIP_SAMPLER_OBJECT_SIZE_DWORD)
139#define __HIP_TEXTURE_ATTRIB __attribute__((device_builtin_texture_type))
141#define __HIP_TEXTURE_ATTRIB
154 addressMode[0] = aMode;
155 addressMode[1] = aMode;
156 addressMode[2] = aMode;
157 channelDesc = hipCreateChannelDesc<T>();
159 textureObject =
nullptr;
162 minMipmapLevelClamp = 0;
163 maxMipmapLevelClamp = 0;
171 addressMode[0] = aMode;
172 addressMode[1] = aMode;
173 addressMode[2] = aMode;
176 textureObject =
nullptr;
179 minMipmapLevelClamp = 0;
180 maxMipmapLevelClamp = 0;
187#error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
190#if defined(__clang__)
191#pragma clang diagnostic pop
hipArray_Format
Definition driver_types.h:81
Definition texture_types.h:117
float minMipmapLevelClamp
Definition texture_types.h:127
float mipmapLevelBias
Definition texture_types.h:126
float maxMipmapLevelClamp
Definition texture_types.h:128
enum hipTextureFilterMode filterMode
Definition texture_types.h:119
enum hipTextureReadMode readMode
Definition texture_types.h:120
float borderColor[4]
Definition texture_types.h:122
enum hipTextureFilterMode mipmapFilterMode
Definition texture_types.h:125
int sRGB
Definition texture_types.h:121
int normalizedCoords
Definition texture_types.h:123
unsigned int maxAnisotropy
Definition texture_types.h:124
enum hipTextureAddressMode addressMode[3]
Definition texture_types.h:118
Definition texture_types.h:148
texture(int norm=0, enum hipTextureFilterMode fMode=hipFilterModePoint, enum hipTextureAddressMode aMode=hipAddressModeClamp)
Definition texture_types.h:149
texture(int norm, enum hipTextureFilterMode fMode, enum hipTextureAddressMode aMode, struct hipChannelFormatDesc desc)
Definition texture_types.h:166
Definition texture_types.h:96
int sRGB
Definition texture_types.h:102
hipTextureObject_t textureObject
Definition texture_types.h:109
float minMipmapLevelClamp
Definition texture_types.h:106
enum hipTextureFilterMode mipmapFilterMode
Definition texture_types.h:104
enum hipTextureReadMode readMode
Definition texture_types.h:98
enum hipTextureAddressMode addressMode[3]
Definition texture_types.h:100
enum hipTextureFilterMode filterMode
Definition texture_types.h:99
int normalized
Definition texture_types.h:97
unsigned int maxAnisotropy
Definition texture_types.h:103
int numChannels
Definition texture_types.h:110
float maxMipmapLevelClamp
Definition texture_types.h:107
enum hipArray_Format format
Definition texture_types.h:111
float mipmapLevelBias
Definition texture_types.h:105
struct hipChannelFormatDesc channelDesc
Definition texture_types.h:101
struct __hip_texture * hipTextureObject_t
Definition texture_types.h:71
hipTextureReadMode
Definition texture_types.h:91
@ hipReadModeElementType
Definition texture_types.h:91
@ hipReadModeNormalizedFloat
Definition texture_types.h:91
#define hipTextureType1D
Definition texture_types.h:51
textureReference * hipTexRef
Definition texture_types.h:144
#define __HIP_TEXTURE_ATTRIB
Definition texture_types.h:141
hipTextureAddressMode
Definition texture_types.h:76
@ hipAddressModeMirror
Definition texture_types.h:79
@ hipAddressModeBorder
Definition texture_types.h:80
@ hipAddressModeWrap
Definition texture_types.h:77
@ hipAddressModeClamp
Definition texture_types.h:78
hipTextureFilterMode
Definition texture_types.h:86
@ hipFilterModePoint
Definition texture_types.h:86
@ hipFilterModeLinear
Definition texture_types.h:86