HIP: Heterogenous-computing Interface for Portability
external
hip-on-vdi
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
struct
__hip_texture;
49
typedef
struct
__hip_texture* hipTextureObject_t;
50
54
enum
hipTextureAddressMode {
55
hipAddressModeWrap = 0,
56
hipAddressModeClamp = 1,
57
hipAddressModeMirror = 2,
58
hipAddressModeBorder = 3
59
};
60
64
enum
hipTextureFilterMode { hipFilterModePoint = 0, hipFilterModeLinear = 1 };
65
69
enum
hipTextureReadMode { hipReadModeElementType = 0, hipReadModeNormalizedFloat = 1 };
70
74
typedef
struct
textureReference
{
75
int
normalized;
76
enum
hipTextureReadMode readMode;
// used only for driver API's
77
enum
hipTextureFilterMode filterMode;
78
enum
hipTextureAddressMode addressMode[3];
// Texture address mode for up to 3 dimensions
79
struct
hipChannelFormatDesc
channelDesc;
80
int
sRGB;
// Perform sRGB->linear conversion during texture read
81
unsigned
int
maxAnisotropy;
// Limit to the anisotropy ratio
82
enum
hipTextureFilterMode mipmapFilterMode;
83
float
mipmapLevelBias;
84
float
minMipmapLevelClamp;
85
float
maxMipmapLevelClamp;
86
87
hipTextureObject_t textureObject;
88
int
numChannels;
89
enum
hipArray_Format format;
90
}
textureReference
;
91
95
typedef
struct
hipTextureDesc
{
96
enum
hipTextureAddressMode addressMode[3];
// Texture address mode for up to 3 dimensions
97
enum
hipTextureFilterMode filterMode;
98
enum
hipTextureReadMode readMode;
99
int
sRGB;
// Perform sRGB->linear conversion during texture read
100
float
borderColor[4];
101
int
normalizedCoords;
102
unsigned
int
maxAnisotropy;
103
enum
hipTextureFilterMode mipmapFilterMode;
104
float
mipmapLevelBias;
105
float
minMipmapLevelClamp;
106
float
maxMipmapLevelClamp;
107
}
hipTextureDesc
;
108
109
#endif
textureReference
Definition:
texture_types.h:74
hipTextureDesc
Definition:
texture_types.h:95
hipChannelFormatDesc
Definition:
driver_types.h:38
Generated on Wed Nov 11 2020 06:29:20 for HIP: Heterogenous-computing Interface for Portability by
1.8.18