| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
#ifndef CMRTLIB_AGNOSTIC_HARDWARE_CM_DEF_HW_H_ |
| 23 |
#define CMRTLIB_AGNOSTIC_HARDWARE_CM_DEF_HW_H_ |
| 24 |
|
| 25 |
#include "cm_def.h" |
| 26 |
#include "cm_device_base.h" |
| 27 |
#include "cm_l3_cache_config.h" |
| 28 |
|
| 29 |
class SamplerIndex; |
| 30 |
|
| 31 |
struct CM_CONFIGVMESURFACEDIMENSION_PARAM |
| 32 |
{ |
| 33 |
void *cmVmeSurfHandle; |
| 34 |
CM_VME_SURFACE_STATE_PARAM *surfDimPara; |
| 35 |
int32_t returnValue; |
| 36 |
}; |
| 37 |
|
| 38 |
struct CM_CREATESAMPLER_PARAM |
| 39 |
{ |
| 40 |
CM_SAMPLER_STATE samplerState; |
| 41 |
void *cmSamplerHandle; |
| 42 |
SamplerIndex *cmSamplerIndexHandle; |
| 43 |
int32_t returnValue; |
| 44 |
}; |
| 45 |
|
| 46 |
struct CM_CREATESAMPLER_PARAM_EX |
| 47 |
{ |
| 48 |
CM_SAMPLER_STATE_EX samplerState; |
| 49 |
void *cmSamplerHandle; |
| 50 |
SamplerIndex *cmSamplerIndexHandle; |
| 51 |
int32_t returnValue; |
| 52 |
}; |
| 53 |
|
| 54 |
struct CM_GETCAPS_PARAM |
| 55 |
{ |
| 56 |
CM_DEVICE_CAP_NAME capName; |
| 57 |
uint32_t capValueSize; |
| 58 |
void *capValue; |
| 59 |
uint32_t returnValue; |
| 60 |
}; |
| 61 |
|
| 62 |
struct CM_CREATESAMPLER8x8_PARAM |
| 63 |
{ |
| 64 |
CM_SAMPLER_8X8_DESCR sampler8x8Desc; |
| 65 |
void *cmSampler8x8Handle; |
| 66 |
SamplerIndex *cmSamplerIndexHandle; |
| 67 |
int32_t returnValue; |
| 68 |
}; |
| 69 |
|
| 70 |
struct CM_DESTROYSAMPLER8x8_PARAM |
| 71 |
{ |
| 72 |
void *cmSampler8x8Handle; |
| 73 |
int32_t returnValue; |
| 74 |
}; |
| 75 |
|
| 76 |
struct CM_CREATESAMPLER8x8SURF_PARAM |
| 77 |
{ |
| 78 |
void *cmSurf2DHandle; |
| 79 |
CM_SAMPLER8x8_SURFACE cmSampler8x8Type; |
| 80 |
CM_SURFACE_ADDRESS_CONTROL_MODE sampler8x8Mode; |
| 81 |
SurfaceIndex *cmSurfIndexHandle; |
| 82 |
int32_t returnValue; |
| 83 |
}; |
| 84 |
|
| 85 |
struct CM_CREATESAMPLER8x8SURFEX_PARAM |
| 86 |
{ |
| 87 |
void *cmSurf2DHandle; |
| 88 |
CM_SAMPLER8x8_SURFACE cmSampler8x8Type; |
| 89 |
CM_SURFACE_ADDRESS_CONTROL_MODE sampler8x8Mode; |
| 90 |
CM_FLAG* flag; |
| 91 |
SurfaceIndex* cmSurfIndexHandle; |
| 92 |
int32_t returnValue; |
| 93 |
}; |
| 94 |
|
| 95 |
struct CM_CREATESAMPLER2DEX_PARAM |
| 96 |
{ |
| 97 |
void *cmSurface2DHandle; |
| 98 |
CM_FLAG *flag; |
| 99 |
void *samplerSurfIndexHandle; |
| 100 |
int32_t returnValue; |
| 101 |
}; |
| 102 |
|
| 103 |
struct CM_DESTROYSAMPLER8x8SURF_PARAM |
| 104 |
{ |
| 105 |
SurfaceIndex *cmSurfIndexHandle; |
| 106 |
int32_t returnValue; |
| 107 |
}; |
| 108 |
|
| 109 |
struct CM_DEVICE_SETSUGGESTEDL3_PARAM |
| 110 |
{ |
| 111 |
L3_SUGGEST_CONFIG l3SuggestConfig; |
| 112 |
int32_t returnValue; |
| 113 |
}; |
| 114 |
|
| 115 |
struct CM_DEVICE_SETCAP_PARAM |
| 116 |
{ |
| 117 |
CM_DEVICE_CAP_NAME capName; |
| 118 |
size_t capValueSize; |
| 119 |
void *capValue; |
| 120 |
int32_t returnValue; |
| 121 |
}; |
| 122 |
|
| 123 |
struct CM_DEVICE_GET_VISA_VERSION_PARAM |
| 124 |
{ |
| 125 |
uint32_t majorVersion; |
| 126 |
uint32_t minorVersion; |
| 127 |
int32_t returnValue; |
| 128 |
}; |
| 129 |
|
| 130 |
enum CM_BUFFER_TYPE |
| 131 |
{ |
| 132 |
CM_BUFFER_N = 0, |
| 133 |
CM_BUFFER_UP = 1, |
| 134 |
CM_BUFFER_SVM = 2, |
| 135 |
CM_BUFFER_STATELESS = 5 |
| 136 |
}; |
| 137 |
|
| 138 |
struct CM_CREATEBUFFER_PARAM |
| 139 |
{ |
| 140 |
size_t size; |
| 141 |
CM_BUFFER_TYPE bufferType; |
| 142 |
void *sysMem; |
| 143 |
void *cmBufferHandle; |
| 144 |
int32_t returnValue; |
| 145 |
uint32_t option; |
| 146 |
}; |
| 147 |
|
| 148 |
struct CM_DESTROYCMDEVICE_PARAM |
| 149 |
{ |
| 150 |
void *cmDeviceHandle; |
| 151 |
int32_t returnValue; |
| 152 |
}; |
| 153 |
|
| 154 |
struct CM_LOADPROGRAM_PARAM |
| 155 |
{ |
| 156 |
void *cisaCode; |
| 157 |
uint32_t cisaCodeSize; |
| 158 |
char *options; |
| 159 |
void *cmProgramHandle; |
| 160 |
uint32_t indexInArray; |
| 161 |
int32_t returnValue; |
| 162 |
}; |
| 163 |
|
| 164 |
struct CM_DESTROYPROGRAM_PARAM |
| 165 |
{ |
| 166 |
void *cmProgramHandle; |
| 167 |
int32_t returnValue; |
| 168 |
}; |
| 169 |
|
| 170 |
struct CM_CREATEKERNEL_PARAM |
| 171 |
{ |
| 172 |
void *cmProgramHandle; |
| 173 |
char *kernelName; |
| 174 |
char *options; |
| 175 |
void *cmKernelHandle; |
| 176 |
uint32_t indexKernelArray; |
| 177 |
int32_t returnValue; |
| 178 |
}; |
| 179 |
|
| 180 |
struct CM_DESTROYKERNEL_PARAM |
| 181 |
{ |
| 182 |
void *cmKernelHandle; |
| 183 |
int32_t returnValue; |
| 184 |
}; |
| 185 |
|
| 186 |
struct CM_CREATETASK_PARAM |
| 187 |
{ |
| 188 |
void *cmTaskHandle; |
| 189 |
uint32_t taskIndex; |
| 190 |
int32_t returnValue; |
| 191 |
}; |
| 192 |
|
| 193 |
struct CM_DESTROYTASK_PARAM |
| 194 |
{ |
| 195 |
void *cmTaskHandle; |
| 196 |
int32_t returnValue; |
| 197 |
}; |
| 198 |
|
| 199 |
struct CM_CREATETHREADSPACE_PARAM |
| 200 |
{ |
| 201 |
uint32_t tsWidth; |
| 202 |
uint32_t tsHeight; |
| 203 |
void *cmTsHandle; |
| 204 |
uint32_t indexInTSArray; |
| 205 |
int32_t returnValue; |
| 206 |
}; |
| 207 |
|
| 208 |
struct CM_DESTROYTHREADSPACE_PARAM |
| 209 |
{ |
| 210 |
void *cmTsHandle; |
| 211 |
int32_t returnValue; |
| 212 |
}; |
| 213 |
|
| 214 |
struct CM_DESTROYVMESURFACE_PARAM |
| 215 |
{ |
| 216 |
void *cmVmeSurfIndexHandle; |
| 217 |
int32_t returnValue; |
| 218 |
}; |
| 219 |
|
| 220 |
struct CM_CREATEVMESURFACE_PARAM |
| 221 |
{ |
| 222 |
void *cmCurSurfHandle; |
| 223 |
void *cmForwardSurfArray; |
| 224 |
void *cmBackwardSurfArray; |
| 225 |
uint32_t forwardSurfCount; |
| 226 |
uint32_t backwardSurfCount; |
| 227 |
void *cmVmeSurfIndexHandle; |
| 228 |
int32_t returnValue; |
| 229 |
}; |
| 230 |
|
| 231 |
struct CM_DESTROYSAMPLER_PARAM |
| 232 |
{ |
| 233 |
void *cmSamplerHandle; |
| 234 |
int32_t returnValue; |
| 235 |
}; |
| 236 |
|
| 237 |
struct CM_CREATETGROUPSPACE_PARAM |
| 238 |
{ |
| 239 |
uint32_t thrdSpaceWidth; |
| 240 |
uint32_t thrdSpaceHeight; |
| 241 |
uint32_t thrdSpaceDepth; |
| 242 |
uint32_t grpSpaceWidth; |
| 243 |
uint32_t grpSpaceHeight; |
| 244 |
uint32_t grpSpaceDepth; |
| 245 |
void *cmGrpSpaceHandle; |
| 246 |
uint32_t tgsIndex; |
| 247 |
int32_t returnValue; |
| 248 |
}; |
| 249 |
|
| 250 |
struct CM_DESTROYTGROPUSPACE_PARAM |
| 251 |
{ |
| 252 |
void *cmGrpSpaceHandle; |
| 253 |
int32_t returnValue; |
| 254 |
}; |
| 255 |
|
| 256 |
struct CM_GETSURFACE2DINFO_PARAM |
| 257 |
{ |
| 258 |
uint32_t width; |
| 259 |
uint32_t height; |
| 260 |
CM_SURFACE_FORMAT format; |
| 261 |
uint32_t pitch; |
| 262 |
uint32_t physicalSize; |
| 263 |
uint32_t returnValue; |
| 264 |
}; |
| 265 |
|
| 266 |
struct CM_CREATESAMPLER2D_PARAM |
| 267 |
{ |
| 268 |
void *cmSurface2DHandle; |
| 269 |
void *samplerSurfIndexHandle; |
| 270 |
int32_t returnValue; |
| 271 |
}; |
| 272 |
|
| 273 |
struct CM_CREATESAMPLER2DUP_PARAM |
| 274 |
{ |
| 275 |
void *cmSurface2DHandle; |
| 276 |
void *samplerSurfIndexHandle; |
| 277 |
int32_t returnValue; |
| 278 |
}; |
| 279 |
|
| 280 |
struct CM_CREATESAMPLER3D_PARAM |
| 281 |
{ |
| 282 |
void *cmSurface3DHandle; |
| 283 |
void *samplerSurfIndexHandle; |
| 284 |
int32_t returnValue; |
| 285 |
}; |
| 286 |
|
| 287 |
struct CM_DESTROYSAMPLERSURF_PARAM |
| 288 |
{ |
| 289 |
void *samplerSurfIndexHandle; |
| 290 |
int32_t returnValue; |
| 291 |
}; |
| 292 |
|
| 293 |
struct CM_DEVICE_INIT_PRINT_BUFFER_PARAM |
| 294 |
{ |
| 295 |
uint32_t printBufferSize; |
| 296 |
void *printBufferMem; |
| 297 |
int32_t returnValue; |
| 298 |
}; |
| 299 |
|
| 300 |
struct CM_DEVICE_FLUSH_PRINT_BUFFER_PARAM |
| 301 |
{ |
| 302 |
const char *fileName; |
| 303 |
int32_t returnValue; |
| 304 |
}; |
| 305 |
|
| 306 |
struct CM_CREATEVEBOX_PARAM |
| 307 |
{ |
| 308 |
void *cmVeboxHandle; |
| 309 |
uint32_t indexInVeboxArray; |
| 310 |
int32_t returnValue; |
| 311 |
}; |
| 312 |
|
| 313 |
struct CM_DESTROYVEBOX_PARAM |
| 314 |
{ |
| 315 |
void *cmVeboxHandle; |
| 316 |
int32_t returnValue; |
| 317 |
}; |
| 318 |
|
| 319 |
struct CM_CLONE_KERNEL_PARAM |
| 320 |
{ |
| 321 |
void *cmKernelHandleSrc; |
| 322 |
void *cmKernelHandleDest; |
| 323 |
int32_t returnValue; |
| 324 |
}; |
| 325 |
|
| 326 |
struct CM_DEVICE_CREATE_SURF2D_ALIAS_PARAM |
| 327 |
{ |
| 328 |
void *cmSurface2DHandle; |
| 329 |
void *surfaceIndexHandle; |
| 330 |
int32_t returnValue; |
| 331 |
}; |
| 332 |
|
| 333 |
struct CM_DEVICE_CREATE_BUFFER_ALIAS_PARAM |
| 334 |
{ |
| 335 |
void *cmBufferHandle; |
| 336 |
void *surfaceIndexHandle; |
| 337 |
int32_t returnValue; |
| 338 |
}; |
| 339 |
|
| 340 |
#ifdef _DEBUG |
| 341 |
#define MDF_PROFILER_ENABLED 1 |
| 342 |
#endif |
| 343 |
|
| 344 |
#if MDF_PROFILER_ENABLED |
| 345 |
#define INSERT_PROFILER_RECORD() CmTimer Time(__FUNCTION__ ) |
| 346 |
#else |
| 347 |
#define INSERT_PROFILER_RECORD() |
| 348 |
#endif |
| 349 |
|
| 350 |
#endif |