HIP: Heterogenous-computing Interface for Portability
include
hip
hcc_detail
texture_types.h
1
/*
2
Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
3
4
Permission is hereby granted, free of charge, to any person obtaining a copy
5
of this software and associated documentation files (the "Software"), to deal
6
in the Software without restriction, including without limitation the rights
7
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
copies of the Software, and to permit persons to whom the Software is
9
furnished to do so, subject to the following conditions:
10
11
The above copyright notice and this permission notice shall be included in
12
all copies or substantial portions of the Software.
13
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
THE SOFTWARE.
21
*/
22
23
24
#ifndef HIP_INCLUDE_HIP_HCC_DETAIL_TEXTURE_TYPES_H
25
#define HIP_INCLUDE_HIP_HCC_DETAIL_TEXTURE_TYPES_H
26
27
#include <hip/hcc_detail/driver_types.h>
28
29
#define hipTextureType1D 0x01
30
#define hipTextureType2D 0x02
31
#define hipTextureType3D 0x03
32
#define hipTextureTypeCubemap 0x0C
33
#define hipTextureType1DLayered 0xF1
34
#define hipTextureType2DLayered 0xF2
35
#define hipTextureTypeCubemapLayered 0xFC
36
40
#define HIP_IMAGE_OBJECT_SIZE_DWORD 12
41
#define HIP_SAMPLER_OBJECT_SIZE_DWORD 8
42
#define HIP_SAMPLER_OBJECT_OFFSET_DWORD HIP_IMAGE_OBJECT_SIZE_DWORD
43
#define HIP_TEXTURE_OBJECT_SIZE_DWORD (HIP_IMAGE_OBJECT_SIZE_DWORD + HIP_SAMPLER_OBJECT_SIZE_DWORD)
44
48
typedef
unsigned
long
long
hipTextureObject_t;
49
53
enum
hipTextureAddressMode {
54
hipAddressModeWrap = 0,
55
hipAddressModeClamp = 1,
56
hipAddressModeMirror = 2,
57
hipAddressModeBorder = 3
58
};
59
63
enum
hipTextureFilterMode { hipFilterModePoint = 0, hipFilterModeLinear = 1 };
64
68
enum
hipTextureReadMode { hipReadModeElementType = 0, hipReadModeNormalizedFloat = 1 };
69
73
typedef
struct
textureReference
{
74
int
normalized;
75
enum
hipTextureFilterMode filterMode;
76
enum
hipTextureAddressMode addressMode[3];
// Texture address mode for up to 3 dimensions
77
struct
hipChannelFormatDesc
channelDesc;
78
int
sRGB;
// Perform sRGB->linear conversion during texture read
79
unsigned
int
maxAnisotropy;
// Limit to the anisotropy ratio
80
enum
hipTextureFilterMode mipmapFilterMode;
81
float
mipmapLevelBias;
82
float
minMipmapLevelClamp;
83
float
maxMipmapLevelClamp;
84
85
hipTextureObject_t textureObject;
86
int
numChannels;
87
enum
hipArray_Format format;
88
}
textureReference
;
89
93
typedef
struct
hipTextureDesc
{
94
enum
hipTextureAddressMode addressMode[3];
// Texture address mode for up to 3 dimensions
95
enum
hipTextureFilterMode filterMode;
96
enum
hipTextureReadMode readMode;
97
int
sRGB;
// Perform sRGB->linear conversion during texture read
98
float
borderColor[4];
99
int
normalizedCoords;
100
unsigned
int
maxAnisotropy;
101
enum
hipTextureFilterMode mipmapFilterMode;
102
float
mipmapLevelBias;
103
float
minMipmapLevelClamp;
104
float
maxMipmapLevelClamp;
105
}
hipTextureDesc
;
106
107
#endif
textureReference
Definition:
texture_types.h:73
hipChannelFormatDesc
Definition:
driver_types.h:38
hipTextureDesc
Definition:
texture_types.h:93
Generated on Tue Aug 27 2019 02:47:15 for HIP: Heterogenous-computing Interface for Portability by
1.8.13