| 1 |
/* |
| 2 |
* Copyright (c) 2009-2025, Intel Corporation |
| 3 |
* |
| 4 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 5 |
* copy of this software and associated documentation files (the "Software"), |
| 6 |
* to deal in the Software without restriction, including without limitation |
| 7 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 |
* and/or sell copies of the Software, and to permit persons to whom the |
| 9 |
* Software is furnished to do so, subject to the following conditions: |
| 10 |
* |
| 11 |
* The above copyright notice and this permission notice shall be included |
| 12 |
* in all copies or substantial portions of the Software. |
| 13 |
* |
| 14 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 15 |
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 18 |
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 |
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 |
* OTHER DEALINGS IN THE SOFTWARE. |
| 21 |
*/ |
| 22 |
//! |
| 23 |
//! \file renderhal.h |
| 24 |
//! \brief |
| 25 |
//! |
| 26 |
//! |
| 27 |
//! \file renderhal.h |
| 28 |
//! \brief Render Engine Interfaces shared across platforms |
| 29 |
//! \details Platform Independent Hardware Interfaces |
| 30 |
//! |
| 31 |
#ifndef __RENDERHAL_H__ |
| 32 |
#define __RENDERHAL_H__ |
| 33 |
|
| 34 |
#include "mos_os.h" // Interface to OS functions |
| 35 |
#include "mhw_state_heap.h" |
| 36 |
#include "mhw_render.h" |
| 37 |
#include "mhw_memory_pool.h" |
| 38 |
#include "media_perf_profiler.h" |
| 39 |
#include "frame_tracker.h" |
| 40 |
#include "media_common_defs.h" |
| 41 |
#include "surface_state_heap_mgr.h" |
| 42 |
|
| 43 |
class XRenderHal_Platform_Interface; |
| 44 |
|
| 45 |
//------------------------------------------------------------------------------ |
| 46 |
// Macros specific to RenderHal sub-comp |
| 47 |
//------------------------------------------------------------------------------ |
| 48 |
#define MHW_RENDERHAL_ASSERT(_expr) \ |
| 49 |
MOS_ASSERT(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _expr) |
| 50 |
|
| 51 |
#define MHW_RENDERHAL_ASSERTMESSAGE(_message, ...) \ |
| 52 |
MOS_ASSERTMESSAGE(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _message, ##__VA_ARGS__) |
| 53 |
|
| 54 |
#define MHW_RENDERHAL_WARNINGMESSAGE(_message, ...) \ |
| 55 |
MOS_WARNINGMESSAGE(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _message, ##__VA_ARGS__) |
| 56 |
|
| 57 |
#define MHW_RENDERHAL_NORMALMESSAGE(_message, ...) \ |
| 58 |
MOS_NORMALMESSAGE(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _message, ##__VA_ARGS__) |
| 59 |
|
| 60 |
#define MHW_RENDERHAL_VERBOSEMESSAGE(_message, ...) \ |
| 61 |
MOS_VERBOSEMESSAGE(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _message, ##__VA_ARGS__) |
| 62 |
|
| 63 |
#define MHW_RENDERHAL_FUNCTION_ENTER \ |
| 64 |
MOS_FUNCTION_ENTER(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL) |
| 65 |
|
| 66 |
#define MHW_RENDERHAL_FUNCTION_EXIT \ |
| 67 |
MOS_FUNCTION_EXIT(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, eStatus) |
| 68 |
|
| 69 |
#define MHW_RENDERHAL_CHK_STATUS(_stmt) \ |
| 70 |
MOS_CHK_STATUS(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _stmt) |
| 71 |
|
| 72 |
#define MHW_RENDERHAL_CHK_STATUS_RETURN(_stmt) \ |
| 73 |
MOS_CHK_STATUS_RETURN(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, _stmt) |
| 74 |
|
| 75 |
#define MHW_RENDERHAL_CHK_STATUS_MESSAGE(_stmt, _message, ...) \ |
| 76 |
MOS_CHK_STATUS_MESSAGE(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _stmt, _message, ##__VA_ARGS__) |
| 77 |
|
| 78 |
#define MHW_RENDERHAL_CHK_NULL(_ptr) \ |
| 79 |
MOS_CHK_NULL(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _ptr) |
| 80 |
|
| 81 |
#define MHW_RENDERHAL_CHK_NULL_NO_STATUS(_ptr) \ |
| 82 |
MOS_CHK_NULL_NO_STATUS(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _ptr) |
| 83 |
|
| 84 |
#define MHW_RENDERHAL_CHK_NULL_NO_STATUS_RETURN(_ptr) \ |
| 85 |
MOS_CHK_NULL_NO_STATUS_RETURN(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _ptr) |
| 86 |
|
| 87 |
#define MHW_RENDERHAL_CHK_NULL_RETURN(_ptr) \ |
| 88 |
MOS_CHK_NULL_RETURN(MOS_COMPONENT_CM, MOS_CM_SUBCOMP_RENDERHAL, _ptr) |
| 89 |
|
| 90 |
#define MHW_RENDERHAL_CHK_VALUE_RETURN(_value, _expect_value) \ |
| 91 |
MOS_CHK_STATUS_RETURN(MOS_COMPONENT_VP, MOS_VP_SUBCOMP_PUBLIC, ((_value) == (_expect_value)) ? MOS_STATUS_SUCCESS : MOS_STATUS_INVALID_PARAMETER) |
| 92 |
|
| 93 |
#define MHW_RENDERHAL_UNUSED(x) \ |
| 94 |
MOS_UNUSED(x) |
| 95 |
|
| 96 |
//! |
| 97 |
//! \brief Kernel allocation control |
| 98 |
//! |
| 99 |
#define RENDERHAL_KERNEL_LOAD_FAIL -1 |
| 100 |
#define RENDERHAL_KERNEL_ALLOCATION_FREE 0 // Kernel entry free |
| 101 |
#define RENDERHAL_KERNEL_ALLOCATION_USED 1 // Kernel entry in use |
| 102 |
#define RENDERHAL_KERNEL_ALLOCATION_LOCKED 2 // Kernel entry locked (no garbage collection) |
| 103 |
#define RENDERHAL_KERNEL_ALLOCATION_REMOVED 3 // Kernel entry in use, but no longer loaded in ISH to make room for others |
| 104 |
#define RENDERHAL_KERNEL_ALLOCATION_LOADING 4 // Kernel selected to be loaded (was stale or used) |
| 105 |
#define RENDERHAL_KERNEL_ALLOCATION_STALE 5 // Kernel memory block became invalid, needs to be reloaded |
| 106 |
|
| 107 |
//! |
| 108 |
//! \brief SSH defaults and limits |
| 109 |
//! |
| 110 |
#define RENDERHAL_SSH_INSTANCES 16 |
| 111 |
#define RENDERHAL_SSH_INSTANCES_MAX 64 |
| 112 |
|
| 113 |
#define RENDERHAL_SSH_BINDING_TABLES 1 |
| 114 |
#define RENDERHAL_SSH_BINDING_TABLES_MIN 1 |
| 115 |
#define RENDERHAL_SSH_BINDING_TABLES_MAX 32 |
| 116 |
#define RENDERHAL_SSH_BINDING_TABLE_ALIGN 64 |
| 117 |
|
| 118 |
#define RENDERHAL_SSH_SURFACE_STATES 40 |
| 119 |
#define RENDERHAL_SSH_SURFACE_STATES_MIN 16 |
| 120 |
#define RENDERHAL_SSH_SURFACE_STATES_MAX 256 |
| 121 |
|
| 122 |
#define RENDERHAL_SSH_SURFACES_PER_BT 64 |
| 123 |
#define RENDERHAL_SSH_SURFACES_PER_BT_MIN 4 |
| 124 |
#define RENDERHAL_SSH_SURFACES_PER_BT_MAX 256 |
| 125 |
|
| 126 |
//! |
| 127 |
//! \brief Default size of area for sync, debugging, performance collecting |
| 128 |
//! |
| 129 |
#define RENDERHAL_SYNC_SIZE_MIN 128 |
| 130 |
#define RENDERHAL_SYNC_SIZE_MAX 4096 |
| 131 |
#define RENDERHAL_SYNC_SIZE 128 |
| 132 |
|
| 133 |
//! |
| 134 |
//! \brief Default number of media states (Dynamic GSH mode) |
| 135 |
//! |
| 136 |
#define RENDERHAL_MEDIA_STATES 16 |
| 137 |
|
| 138 |
//! |
| 139 |
//! \brief Default number of media IDs |
| 140 |
//! |
| 141 |
#define RENDERHAL_MEDIA_IDS 16 |
| 142 |
|
| 143 |
//! |
| 144 |
//! \brief Max URB Size |
| 145 |
//! |
| 146 |
#define RENDERHAL_URB_SIZE_MAX 2048 |
| 147 |
|
| 148 |
//! |
| 149 |
//! \brief Interface Descriptor Entries |
| 150 |
//! |
| 151 |
#define RENDERHAL_INTERFACE_DESCRIPTOR_ENTRIES_MAX 64 |
| 152 |
|
| 153 |
//! |
| 154 |
//! \brief Max URB Entry Size |
| 155 |
//! |
| 156 |
#define RENDERHAL_URB_ENTRY_SIZE_MAX (RENDERHAL_URB_SIZE_MAX - RENDERHAL_INTERFACE_DESCRIPTOR_ENTRIES_MAX) |
| 157 |
|
| 158 |
//! |
| 159 |
//! \brief Max CURBE Allocation Size |
| 160 |
//! |
| 161 |
#define RENDERHAL_CURBE_SIZE_MAX (RENDERHAL_URB_SIZE_MAX - RENDERHAL_INTERFACE_DESCRIPTOR_ENTRIES_MAX) |
| 162 |
|
| 163 |
//! |
| 164 |
//! \brief Max Samplers |
| 165 |
//! |
| 166 |
#define RENDERHAL_SAMPLERS_AVS_MAX 8 |
| 167 |
|
| 168 |
//! |
| 169 |
//! \brief Default Samplers |
| 170 |
//! |
| 171 |
#define RENDERHAL_SAMPLERS 16 |
| 172 |
#define RENDERHAL_SAMPLERS_VA 8 |
| 173 |
|
| 174 |
//! |
| 175 |
//! \brief Default CURBE size in GSH |
| 176 |
//! Use the size of composition kernel static param since it's the largest of all |
| 177 |
//! |
| 178 |
#define RENDERHAL_CURBE_SIZE 832 // MOS ALIGN CEIL(sizeof(GPGPU_WALKER_ISTAB_GMC_STATIC_DATA_G8), RENDERHAL_URB_BLOCK_ALIGN) |
| 179 |
|
| 180 |
//! |
| 181 |
//! \brief Default number of kernels that may be cached in GSH |
| 182 |
//! |
| 183 |
#define RENDERHAL_KERNEL_COUNT 32 |
| 184 |
|
| 185 |
//! |
| 186 |
//! \brief Max number of kernels cached in GSH |
| 187 |
//! |
| 188 |
#define RENDERHAL_KERNEL_COUNT_MIN 2 |
| 189 |
|
| 190 |
//! |
| 191 |
//! \brief Default kernel heap size |
| 192 |
//! |
| 193 |
#define RENDERHAL_KERNEL_HEAP 2097152 |
| 194 |
|
| 195 |
//! |
| 196 |
//! \brief Min kernel heap size |
| 197 |
//! |
| 198 |
#define RENDERHAL_KERNEL_HEAP_MIN 65536 |
| 199 |
#define RENDERHAL_KERNEL_HEAP_MAX 2097152 |
| 200 |
|
| 201 |
//! |
| 202 |
//! \brief Default kernel block size (granularity for kernel allocation) |
| 203 |
//! |
| 204 |
#define RENDERHAL_KERNEL_BLOCK_SIZE 65536 |
| 205 |
|
| 206 |
//! |
| 207 |
//! \brief Default ISA ASM Debug Surface BTI |
| 208 |
//! |
| 209 |
#define RENDERHAL_ISA_ASM_SURFACE_BTI_DEFAULT 39 |
| 210 |
|
| 211 |
//! |
| 212 |
//! \brief Min kernel block size |
| 213 |
//! |
| 214 |
#define RENDERHAL_KERNEL_BLOCK_MIN 1024 |
| 215 |
#define RENDERHAL_KERNEL_BLOCK_MAX 65536 |
| 216 |
|
| 217 |
//! |
| 218 |
//! \brief Max number of Media Threads |
| 219 |
//! |
| 220 |
#define RENDERHAL_USE_MEDIA_THREADS_MAX 0 |
| 221 |
|
| 222 |
//! |
| 223 |
//! \brief Number and size of palettes |
| 224 |
//! |
| 225 |
#define RENDERHAL_PALETTE_COUNT 2 |
| 226 |
#define RENDERHAL_PALETTE_MAX 2 |
| 227 |
|
| 228 |
#define RENDERHAL_PALETTE_ENTRIES 256 |
| 229 |
#define RENDERHAL_PALETTE_ENTRIES_MAX 256 |
| 230 |
|
| 231 |
//! |
| 232 |
//! \brief SIP Size |
| 233 |
//! |
| 234 |
#define RENDERHAL_MAX_SIP_SIZE 0x4000 |
| 235 |
|
| 236 |
//! |
| 237 |
//! \brief Number of chroma keys |
| 238 |
//! |
| 239 |
#define RENDERHAL_CHROMA_KEY_COUNT 4 |
| 240 |
#define RENDERHAL_CHROMA_KEY_MAX 4 |
| 241 |
|
| 242 |
//! |
| 243 |
//! \brief Alignment |
| 244 |
//! |
| 245 |
#define RENDERHAL_KERNEL_BLOCK_ALIGN 64 |
| 246 |
#define RENDERHAL_URB_BLOCK_ALIGN 64 |
| 247 |
#define RENDERHAL_SYNC_BLOCK_ALIGN 128 |
| 248 |
#define RENDERHAL_CURBE_BLOCK_ALIGN 64 |
| 249 |
|
| 250 |
//! |
| 251 |
//! \brief Max number of Y_Uoffset size |
| 252 |
//! |
| 253 |
#define RENDERHAL_MAX_YV12_PLANE_Y_U_OFFSET_G9 16383 |
| 254 |
|
| 255 |
//! |
| 256 |
//! \brief Palette allocation id |
| 257 |
//! |
| 258 |
#define RENDERHAL_PALETTE_ID_ALLOCATE_ONLY -2 // Allocate but don't load palette |
| 259 |
#define RENDERHAL_PALETTE_ID_ALLOCATE_LOAD -1 // Allocate and load palette |
| 260 |
|
| 261 |
//! |
| 262 |
//! \brief Hw Interface defaults |
| 263 |
//! |
| 264 |
#define RENDERHAL_TIMEOUT_MS_DEFAULT 100 |
| 265 |
#define RENDERHAL_EVENT_TIMEOUT_MS 5 |
| 266 |
|
| 267 |
//! |
| 268 |
//! \brief Sampler State Indices |
| 269 |
//! |
| 270 |
#define RENDERHAL_SAMPLER_Y 1 |
| 271 |
#define RENDERHAL_SAMPLER_U 2 |
| 272 |
#define RENDERHAL_SAMPLER_V 3 |
| 273 |
#define RENDERHAL_SAMPLER_8x8_AVS_Y 4 |
| 274 |
#define RENDERHAL_SAMPLER_8x8_AVS_U 8 |
| 275 |
#define RENDERHAL_SAMPLER_8x8_AVS_V 12 |
| 276 |
|
| 277 |
//*----------------------------------------------------------------------------- |
| 278 |
//| MMIO register offsets used for the EU debug support |
| 279 |
//*----------------------------------------------------------------------------- |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
#define MEDIASTATE_AVS_MAX_DERIVATIVE_4_PIXELS 7 |
| 284 |
#define MEDIASTATE_AVS_MAX_DERIVATIVE_8_PIXELS 20 |
| 285 |
#define MEDIASTATE_AVS_TRANSITION_AREA_4_PIXELS 4 |
| 286 |
#define MEDIASTATE_AVS_TRANSITION_AREA_8_PIXELS 5 |
| 287 |
|
| 288 |
enum GFX_COMMON_TOKEN_SUBOPCODE |
| 289 |
{ |
| 290 |
GFXSUBOP_BINDING_TABLE_STATE_TOKEN = 0xFE, |
| 291 |
GFXSUBOP_SURFACE_STATE_TOKEN = 0xFF |
| 292 |
}; |
| 293 |
|
| 294 |
enum MEDIASTATE_AVS_SHARPNESS_LEVEL |
| 295 |
{ |
| 296 |
MEDIASTATE_AVS_SHARPNESS_LEVEL_SMOOTH = 0, |
| 297 |
MEDIASTATE_AVS_SHARPNESS_LEVEL_SHARP = 255 |
| 298 |
}; |
| 299 |
|
| 300 |
// Render chroma siting vertical value |
| 301 |
enum CHROMA_SITING_VDIRECTION |
| 302 |
{ |
| 303 |
CHROMA_SITING_VDIRECTION_0 = 0x0, |
| 304 |
CHROMA_SITING_VDIRECTION_1_4 = 0x1, |
| 305 |
CHROMA_SITING_VDIRECTION_1_2 = 0x2, |
| 306 |
CHROMA_SITING_VDIRECTION_3_4 = 0x3, |
| 307 |
CHROMA_SITING_VDIRECTION_1 = 0x4 |
| 308 |
}; |
| 309 |
|
| 310 |
// Render chroma siting horizontal value |
| 311 |
enum CHROMA_SITING_UDIRECTION |
| 312 |
{ |
| 313 |
CHROMA_SITING_UDIRECTION_LEFT = 0x0, |
| 314 |
CHROMA_SITING_UDIRECTION_CENTER = 0x1 |
| 315 |
}; |
| 316 |
|
| 317 |
enum GFX3DSTATE_TILEWALK |
| 318 |
{ |
| 319 |
GFX3DSTATE_TILEWALK_XMAJOR = 0, |
| 320 |
GFX3DSTATE_TILEWALK_YMAJOR = 1 |
| 321 |
}; |
| 322 |
|
| 323 |
enum MEDIA_STATE_DEBUG_COUNTER_CONTROL |
| 324 |
{ |
| 325 |
MEDIASTATE_DEBUG_COUNTER_FREE_RUNNING = 0, |
| 326 |
MEDIASTATE_DEBUG_COUNTER_FROZEN = 1, |
| 327 |
MEDIASTATE_DEBUG_COUNTER_INITIALIZED_ONCE = 2, |
| 328 |
MEDIASTATE_DEBUG_COUNTER_INITIALIZED_ALWAYS = 3 |
| 329 |
}; |
| 330 |
|
| 331 |
enum MEDIASTATE_BINDING_TABLE_STATE_TYPE |
| 332 |
{ |
| 333 |
MEDIASTATE_BTS_DEFAULT_TYPE = 0, |
| 334 |
MEDIASTATE_BTS_DI_SAMPLE8x8_VME_TYPE = 1 |
| 335 |
}; |
| 336 |
|
| 337 |
struct SURFACE_STATE_TOKEN_COMMON |
| 338 |
{ |
| 339 |
// DWORD 0 |
| 340 |
union |
| 341 |
{ |
| 342 |
struct |
| 343 |
{ |
| 344 |
uint32_t Length : 8; // OP_LENGTH |
| 345 |
uint32_t : 8; |
| 346 |
uint32_t InstructionSubOpcode : 8; // GFX3DSTATE_PIPELINED_SUBOPCODE |
| 347 |
uint32_t InstructionOpcode : 3; // GFX_OPCODE |
| 348 |
uint32_t InstructionPipeLine : 2; // INSTRUCTION_PIPELINE |
| 349 |
uint32_t InstructionType : 2; // INSTRUCTION_TYPE |
| 350 |
uint32_t Token : 1; // bool |
| 351 |
}; |
| 352 |
|
| 353 |
// DriverID for IMOLA patching |
| 354 |
struct |
| 355 |
{ |
| 356 |
uint32_t DriverID; |
| 357 |
}; |
| 358 |
|
| 359 |
struct |
| 360 |
{ |
| 361 |
uint32_t Value; |
| 362 |
}; |
| 363 |
} DW0; |
| 364 |
|
| 365 |
// DWORD 1 |
| 366 |
union |
| 367 |
{ |
| 368 |
struct |
| 369 |
{ |
| 370 |
uint32_t SurfaceStateHeapOffset : 16; // U16 32-byte aligned |
| 371 |
uint32_t SurfaceAllocationIndex : 16; // U16 |
| 372 |
}; |
| 373 |
struct |
| 374 |
{ |
| 375 |
uint32_t Value; |
| 376 |
}; |
| 377 |
} DW1; |
| 378 |
|
| 379 |
// DWORD 2 |
| 380 |
union |
| 381 |
{ |
| 382 |
struct |
| 383 |
{ |
| 384 |
uint32_t SurfaceOffset : 32; |
| 385 |
}; |
| 386 |
struct |
| 387 |
{ |
| 388 |
uint32_t Value; |
| 389 |
}; |
| 390 |
} DW2; |
| 391 |
|
| 392 |
// DWORD 3 |
| 393 |
union |
| 394 |
{ |
| 395 |
struct |
| 396 |
{ |
| 397 |
uint32_t RenderTargetEnable : 1; // bool |
| 398 |
uint32_t YUVPlane : 2; // U2 |
| 399 |
uint32_t SurfaceStateType : 1; // U1 |
| 400 |
uint32_t: 28; |
| 401 |
}; |
| 402 |
struct |
| 403 |
{ |
| 404 |
uint32_t Value; |
| 405 |
}; |
| 406 |
} DW3; |
| 407 |
|
| 408 |
// DWORD 4 |
| 409 |
union |
| 410 |
{ |
| 411 |
struct |
| 412 |
{ |
| 413 |
uint32_t SurfaceBaseAddress; // SurfaceBaseAddress[31:12] |
| 414 |
}; |
| 415 |
struct |
| 416 |
{ |
| 417 |
uint32_t Value; |
| 418 |
}; |
| 419 |
} DW4; |
| 420 |
|
| 421 |
// DWORD 5 |
| 422 |
union |
| 423 |
{ |
| 424 |
struct |
| 425 |
{ |
| 426 |
uint32_t SurfaceBaseAddress64 : BITFIELD_RANGE(0, 15); // SurfaceBaseAddress[47:32] |
| 427 |
uint32_t : BITFIELD_RANGE(16, 31); |
| 428 |
}; |
| 429 |
struct |
| 430 |
{ |
| 431 |
uint32_t Value; |
| 432 |
}; |
| 433 |
} DW5; |
| 434 |
|
| 435 |
void* pResourceInfo; |
| 436 |
|
| 437 |
}; |
| 438 |
|
| 439 |
// Forward declarations |
| 440 |
typedef struct _RENDERHAL_SURFACE RENDERHAL_SURFACE, *PRENDERHAL_SURFACE; |
| 441 |
typedef struct _RENDERHAL_INTERFACE RENDERHAL_INTERFACE, *PRENDERHAL_INTERFACE; |
| 442 |
typedef struct _RENDERHAL_SURFACE_STATE_ENTRY *PRENDERHAL_SURFACE_STATE_ENTRY; |
| 443 |
typedef const struct _RENDERHAL_KERNEL_PARAM CRENDERHAL_KERNEL_PARAM, *PCRENDERHAL_KERNEL_PARAM; |
| 444 |
|
| 445 |
//! |
| 446 |
//! Structure RENDERHAL_SETTINGS |
| 447 |
//! \brief RenderHal Settings - creation parameters for RenderHal |
| 448 |
//! |
| 449 |
typedef struct _RENDERHAL_SETTINGS |
| 450 |
{ |
| 451 |
int32_t iMediaStates; |
| 452 |
} RENDERHAL_SETTINGS, *PRENDERHAL_SETTINGS; |
| 453 |
|
| 454 |
//! |
| 455 |
//! Enum RENDERHAL_COMPONENT |
| 456 |
//! \brief RenderHal client component ID (for debugging/timing) |
| 457 |
//! |
| 458 |
typedef enum _RENDERHAL_COMPONENT |
| 459 |
{ |
| 460 |
RENDERHAL_COMPONENT_UNKNOWN = 0, |
| 461 |
RENDERHAL_COMPONENT_COMP, |
| 462 |
RENDERHAL_COMPONENT_DNDI, |
| 463 |
RENDERHAL_COMPONENT_VEBOX, |
| 464 |
RENDERHAL_COMPONENT_CM, |
| 465 |
RENDERHAL_COMPONENT_PACKET, |
| 466 |
RENDERHAL_COMPONENT_16ALIGN, |
| 467 |
RENDERHAL_COMPONENT_FAST1TON, |
| 468 |
RENDERHAL_COMPONENT_HDR, |
| 469 |
RENDERHAL_COMPONENT_COUNT_BASE, |
| 470 |
RENDERHAL_COMPONENT_RENDER_COPY, |
| 471 |
RENDERHAL_COMPONENT_RESERVED_NUM = 16, |
| 472 |
RENDERHAL_COMPONENT_COUNT |
| 473 |
} RENDERHAL_COMPONENT; |
| 474 |
|
| 475 |
//! |
| 476 |
//! \brief Scaling Mode enum |
| 477 |
//! |
| 478 |
typedef enum _RENDERHAL_SCALING_MODE |
| 479 |
{ |
| 480 |
RENDERHAL_SCALING_NEAREST, |
| 481 |
RENDERHAL_SCALING_BILINEAR, |
| 482 |
RENDERHAL_SCALING_AVS |
| 483 |
} RENDERHAL_SCALING_MODE; |
| 484 |
|
| 485 |
//! |
| 486 |
//! \brief Surface types enum |
| 487 |
//! IMPORTANT : SurfaceType_Layer[] must be updated to match this enum type |
| 488 |
//! |
| 489 |
typedef enum _RENDERHAL_SURFACE_TYPE |
| 490 |
{ |
| 491 |
RENDERHAL_SURF_NONE = 0, |
| 492 |
RENDERHAL_SURF_IN_BACKGROUND, |
| 493 |
RENDERHAL_SURF_IN_PRIMARY, |
| 494 |
RENDERHAL_SURF_IN_SUBSTREAM, |
| 495 |
RENDERHAL_SURF_IN_REFERENCE, |
| 496 |
RENDERHAL_SURF_OUT_RENDERTARGET, |
| 497 |
RENDERHAL_SURF_TYPE_COUNT //!< Keep this line at the end |
| 498 |
} RENDERHAL_SURFACE_TYPE; |
| 499 |
|
| 500 |
//! |
| 501 |
//! \brief Batch buffer types enum |
| 502 |
//! |
| 503 |
typedef enum _RENDERHAL_BB_TYPE |
| 504 |
{ |
| 505 |
RENDERHAL_BB_TYPE_UNKNOWN = 0, // Batch Buffer created by unknown client |
| 506 |
RENDERHAL_BB_TYPE_CM = 6, // Batch Buffer created by Media Development Framework (CM) component |
| 507 |
RENDERHAL_BB_TYPE_COUNT |
| 508 |
} RENDERHAL_BB_TYPE; |
| 509 |
|
| 510 |
//! |
| 511 |
//! \brief Sample Type enum |
| 512 |
//! |
| 513 |
typedef enum _RENDERHAL_SAMPLE_TYPE |
| 514 |
{ |
| 515 |
RENDERHAL_SAMPLE_PROGRESSIVE, |
| 516 |
RENDERHAL_SAMPLE_SINGLE_TOP_FIELD, |
| 517 |
RENDERHAL_SAMPLE_SINGLE_BOTTOM_FIELD, |
| 518 |
RENDERHAL_SAMPLE_INTERLEAVED_EVEN_FIRST_TOP_FIELD, |
| 519 |
RENDERHAL_SAMPLE_INTERLEAVED_EVEN_FIRST_BOTTOM_FIELD, |
| 520 |
RENDERHAL_SAMPLE_INTERLEAVED_ODD_FIRST_TOP_FIELD, |
| 521 |
RENDERHAL_SAMPLE_INTERLEAVED_ODD_FIRST_BOTTOM_FIELD, |
| 522 |
RENDERHAL_SAMPLE_INVALID //!< Keep this line at the end |
| 523 |
} RENDERHAL_SAMPLE_TYPE; |
| 524 |
|
| 525 |
//! |
| 526 |
//! Structure RENDERHAL_GET_SURFACE_INFO |
| 527 |
//! \brief Structure to retrieve Surface Infomation Parameters |
| 528 |
//! |
| 529 |
typedef struct _RENDERHAL_GET_SURFACE_INFO |
| 530 |
{ |
| 531 |
uint32_t ArraySlice; |
| 532 |
uint32_t MipSlice; |
| 533 |
MOS_S3D_CHANNEL S3dChannel; |
| 534 |
} RENDERHAL_GET_SURFACE_INFO, *PRENDERHAL_GET_SURFACE_INFO; |
| 535 |
|
| 536 |
//! |
| 537 |
//! \brief Structure of power control info |
| 538 |
//! |
| 539 |
typedef struct _RENDERHAL_POWEROPTION |
| 540 |
{ |
| 541 |
uint16_t nSlice; //!< Number of slices to use: 0 (default), 1, 2... |
| 542 |
uint16_t nSubSlice; //!< Number of subslices to use: 0 (default), 1, 2... |
| 543 |
uint16_t nEU; //!< Number of EUs to use: 0 (default), 1, 2... |
| 544 |
} RENDERHAL_POWEROPTION, *PRENDERHAL_POWEROPTION; |
| 545 |
|
| 546 |
//! |
| 547 |
//! Structure RENDERHAL_SURFACE |
| 548 |
//! \brief RENDERHAL surface definition |
| 549 |
//! |
| 550 |
typedef struct _RENDERHAL_SURFACE |
| 551 |
{ |
| 552 |
MOS_SURFACE OsSurface; //!< Surface provided by the client |
| 553 |
|
| 554 |
// Auxiliary rendering parameters |
| 555 |
RENDERHAL_SURFACE_TYPE SurfType; //!< Surface Type (context) |
| 556 |
RENDERHAL_SCALING_MODE ScalingMode; //!< Scaling Mode |
| 557 |
MHW_ROTATION Rotation; //!< Rotation Mode |
| 558 |
uint32_t ChromaSiting; //!< Chroma Siting |
| 559 |
|
| 560 |
// Src/Dst rectangles |
| 561 |
RECT rcSrc; //!< Source rectangle |
| 562 |
RECT rcDst; //!< Destination rectangle |
| 563 |
RECT rcMaxSrc; //!< Max source rectangle |
| 564 |
|
| 565 |
// Auxiliary VP parameters provided by client |
| 566 |
bool bDeinterlaceEnable; //!< Active Deinterlace messages |
| 567 |
bool bQueryVariance; //!< enable variance query |
| 568 |
bool bInterlacedScaling; //!< Interlaced scaling |
| 569 |
void *pDeinterlaceParams; //!< Pointer to Deinterlacing parameters |
| 570 |
RENDERHAL_SAMPLE_TYPE SampleType; //!< Interlaced/Progressive sample type |
| 571 |
int32_t iPaletteID; //!<Palette ID |
| 572 |
|
| 573 |
uint32_t dwWidthInUse; //!< the actual width in use |
| 574 |
uint32_t dwHeightInUse; //!< the actual height in use |
| 575 |
} RENDERHAL_SURFACE , *PRENDERHAL_SURFACE; |
| 576 |
|
| 577 |
//! |
| 578 |
//! Structure RENDERHAL_OFFSET_OVERRIDE |
| 579 |
//! \brief structure used to alloce Surface State overrides for Kernel |
| 580 |
//! |
| 581 |
typedef struct _RENDERHAL_OFFSET_OVERRIDE |
| 582 |
{ |
| 583 |
// Y plane adjustment |
| 584 |
int32_t iYOffsetAdjust; //!< Surface Offset adjustment for Y plane |
| 585 |
int32_t iYOffsetX; //!< X-Offset override for Y plane |
| 586 |
int32_t iYOffsetY; //!< Y-Offset override for Y plane |
| 587 |
|
| 588 |
// UV plane overrides/adjustmenty |
| 589 |
int32_t iUVOffsetAdjust; //!< Surface Offset adjustment for UV plane |
| 590 |
int32_t iUVOffsetX; //!< X-Offset override for UV plane |
| 591 |
int32_t iUVOffsetY; //!< Y-Offset override for UV plane |
| 592 |
} RENDERHAL_OFFSET_OVERRIDE, *PRENDERHAL_OFFSET_OVERRIDE; |
| 593 |
|
| 594 |
typedef enum _RENDERHAL_SURFACE_STATE_TYPE |
| 595 |
{ |
| 596 |
RENDERHAL_SURFACE_TYPE_INVALID = 0, |
| 597 |
RENDERHAL_SURFACE_TYPE_G8 , |
| 598 |
RENDERHAL_SURFACE_TYPE_G9 , |
| 599 |
RENDERHAL_SURFACE_TYPE_G10 , |
| 600 |
RENDERHAL_SURFACE_TYPE_ADV_G8 , |
| 601 |
RENDERHAL_SURFACE_TYPE_ADV_G9 , |
| 602 |
RENDERHAL_SURFACE_TYPE_ADV_G10 |
| 603 |
} RENDERHAL_SURFACE_STATE_TYPE, *PRENDERHAL_SURFACE_STATE_TYPE; |
| 604 |
|
| 605 |
typedef enum _RENDERHAL_PLANE_DEFINITION |
| 606 |
{ |
| 607 |
RENDERHAL_PLANES_PL3 = 0, |
| 608 |
RENDERHAL_PLANES_NV12 , |
| 609 |
RENDERHAL_PLANES_YUY2 , |
| 610 |
RENDERHAL_PLANES_UYVY , |
| 611 |
RENDERHAL_PLANES_YVYU , |
| 612 |
RENDERHAL_PLANES_VYUY , |
| 613 |
RENDERHAL_PLANES_ARGB , |
| 614 |
RENDERHAL_PLANES_XRGB , |
| 615 |
RENDERHAL_PLANES_ABGR , |
| 616 |
RENDERHAL_PLANES_XBGR , |
| 617 |
RENDERHAL_PLANES_RGB16 , |
| 618 |
RENDERHAL_PLANES_RGB24 , |
| 619 |
RENDERHAL_PLANES_R16U , |
| 620 |
RENDERHAL_PLANES_R16S , |
| 621 |
RENDERHAL_PLANES_R32U , |
| 622 |
RENDERHAL_PLANES_R32S , |
| 623 |
RENDERHAL_PLANES_R32F , |
| 624 |
RENDERHAL_PLANES_V8U8 , |
| 625 |
RENDERHAL_PLANES_R8G8_UNORM , |
| 626 |
RENDERHAL_PLANES_411P , |
| 627 |
RENDERHAL_PLANES_411R , |
| 628 |
RENDERHAL_PLANES_422H , |
| 629 |
RENDERHAL_PLANES_422V , |
| 630 |
RENDERHAL_PLANES_444P , |
| 631 |
RENDERHAL_PLANES_RGBP , |
| 632 |
RENDERHAL_PLANES_BGRP , |
| 633 |
|
| 634 |
RENDERHAL_PLANES_AI44_PALLETE_0 , |
| 635 |
RENDERHAL_PLANES_IA44_PALLETE_0 , |
| 636 |
RENDERHAL_PLANES_P8_PALLETE_0 , |
| 637 |
RENDERHAL_PLANES_A8P8_PALLETE_0 , |
| 638 |
RENDERHAL_PLANES_AI44_PALLETE_1 , |
| 639 |
RENDERHAL_PLANES_IA44_PALLETE_1 , |
| 640 |
RENDERHAL_PLANES_P8_PALLETE_1 , |
| 641 |
RENDERHAL_PLANES_A8P8_PALLETE_1 , |
| 642 |
|
| 643 |
RENDERHAL_PLANES_AYUV , |
| 644 |
RENDERHAL_PLANES_STMM , |
| 645 |
RENDERHAL_PLANES_L8 , |
| 646 |
|
| 647 |
RENDERHAL_PLANES_PL3_ADV , |
| 648 |
RENDERHAL_PLANES_NV12_ADV , |
| 649 |
RENDERHAL_PLANES_YUY2_ADV , |
| 650 |
RENDERHAL_PLANES_UYVY_ADV , |
| 651 |
RENDERHAL_PLANES_YVYU_ADV , |
| 652 |
RENDERHAL_PLANES_VYUY_ADV , |
| 653 |
RENDERHAL_PLANES_ARGB_ADV , |
| 654 |
RENDERHAL_PLANES_ABGR_ADV , |
| 655 |
RENDERHAL_PLANES_AYUV_ADV , |
| 656 |
RENDERHAL_PLANES_STMM_ADV , |
| 657 |
RENDERHAL_PLANES_L8_ADV , |
| 658 |
RENDERHAL_PLANES_A8_ADV , |
| 659 |
RENDERHAL_PLANES_A8 , |
| 660 |
RENDERHAL_PLANES_R8 , |
| 661 |
RENDERHAL_PLANES_NV12_2PLANES , |
| 662 |
RENDERHAL_PLANES_NV12_2PLANES_ADV , |
| 663 |
RENDERHAL_PLANES_411P_ADV , |
| 664 |
RENDERHAL_PLANES_411R_ADV , |
| 665 |
RENDERHAL_PLANES_422H_ADV , |
| 666 |
RENDERHAL_PLANES_422V_ADV , |
| 667 |
RENDERHAL_PLANES_444P_ADV , |
| 668 |
RENDERHAL_PLANES_RGBP_ADV , |
| 669 |
RENDERHAL_PLANES_BGRP_ADV , |
| 670 |
RENDERHAL_PLANES_R16_UNORM , |
| 671 |
RENDERHAL_PLANES_Y8 , |
| 672 |
RENDERHAL_PLANES_Y1 , |
| 673 |
RENDERHAL_PLANES_Y16U , |
| 674 |
RENDERHAL_PLANES_Y16S , |
| 675 |
RENDERHAL_PLANES_A16B16G16R16 , |
| 676 |
RENDERHAL_PLANES_A16B16G16R16_ADV , |
| 677 |
RENDERHAL_PLANES_R10G10B10A2 , |
| 678 |
RENDERHAL_PLANES_R10G10B10A2_ADV , |
| 679 |
RENDERHAL_PLANES_B10G10R10A2 , |
| 680 |
RENDERHAL_PLANES_L16 , |
| 681 |
RENDERHAL_PLANES_NV21 , |
| 682 |
RENDERHAL_PLANES_YV12 , |
| 683 |
RENDERHAL_PLANES_P016 , |
| 684 |
RENDERHAL_PLANES_P016_2PLANES_ADV , |
| 685 |
RENDERHAL_PLANES_P010 , |
| 686 |
RENDERHAL_PLANES_P010_1PLANE , |
| 687 |
RENDERHAL_PLANES_P010_1PLANE_ADV , |
| 688 |
RENDERHAL_PLANES_IRW0 , |
| 689 |
RENDERHAL_PLANES_IRW1 , |
| 690 |
RENDERHAL_PLANES_IRW2 , |
| 691 |
RENDERHAL_PLANES_IRW3 , |
| 692 |
RENDERHAL_PLANES_A16B16G16R16F , |
| 693 |
RENDERHAL_PLANES_R16G16_UNORM , |
| 694 |
RENDERHAL_PLANES_R16_FLOAT , |
| 695 |
RENDERHAL_PLANES_A16R16G16B16F , |
| 696 |
RENDERHAL_PLANES_YUY2_2PLANES , |
| 697 |
RENDERHAL_PLANES_Y210_ADV , |
| 698 |
RENDERHAL_PLANES_Y210_RT , |
| 699 |
RENDERHAL_PLANES_Y210 , |
| 700 |
RENDERHAL_PLANES_Y210_1PLANE_ADV , |
| 701 |
RENDERHAL_PLANES_R16G16_SINT , |
| 702 |
RENDERHAL_PLANES_R24_UNORM_X8_TYPELESS, |
| 703 |
RENDERHAL_PLANES_R32_FLOAT_X8X24_TYPELESS, |
| 704 |
RENDERHAL_PLANES_P208, |
| 705 |
RENDERHAL_PLANES_P208_1PLANE_ADV, |
| 706 |
RENDERHAL_PLANES_Y416_RT, |
| 707 |
RENDERHAL_PLANES_R32G32B32A32F, |
| 708 |
RENDERHAL_PLANES_Y8_ADV, |
| 709 |
RENDERHAL_PLANES_G32R32F, |
| 710 |
RENDERHAL_PLANES_NV12_2PLANES_COMBINED, |
| 711 |
RENDERHAL_PLANES_P016_2PLANES_COMBINED, |
| 712 |
RENDERHAL_PLANES_YUY2_2PLANES_WIDTH_UNALIGNED, |
| 713 |
RENDERHAL_PLANES_R16G16_FLOAT, |
| 714 |
|
| 715 |
RENDERHAL_PLANES_DEFINITION_COUNT |
| 716 |
} RENDERHAL_PLANE_DEFINITION, *PRENDERHAL_PLANE_DEFINITION; |
| 717 |
|
| 718 |
typedef enum _RENDERHAL_SS_BOUNDARY |
| 719 |
{ |
| 720 |
RENDERHAL_SS_BOUNDARY_SRCRECT = 0, // use for sources read via sampler |
| 721 |
RENDERHAL_SS_BOUNDARY_DSTRECT , // use for RT by default |
| 722 |
RENDERHAL_SS_BOUNDARY_MAXSRCRECT, // use max source rect |
| 723 |
RENDERHAL_SS_BOUNDARY_ORIGINAL, // use for surfs that are not source or RT |
| 724 |
} RENDERHAL_SS_BOUNDARY; |
| 725 |
|
| 726 |
//! |
| 727 |
//! \brief Surface cache attributes |
| 728 |
//! |
| 729 |
#define RENDERHAL_MEMORY_OBJECT_CONTROL uint32_t |
| 730 |
|
| 731 |
typedef struct _RENDERHAL_KERNEL_PARAM |
| 732 |
{ |
| 733 |
int32_t GRF_Count; // Number of registers |
| 734 |
int32_t BT_Count; // Number of BT entries |
| 735 |
int32_t Sampler_Count; // Number of samplers |
| 736 |
int32_t Thread_Count; // Number of threads (max) |
| 737 |
int32_t GRF_Start_Register; // Start register |
| 738 |
int32_t CURBE_Length; // Constant URB length (in 256-bits) |
| 739 |
int32_t block_width; // Block width |
| 740 |
int32_t block_height; // Block height |
| 741 |
int32_t blocks_x; // Blocks in x |
| 742 |
int32_t blocks_y; // Blocks in y |
| 743 |
} RENDERHAL_KERNEL_PARAM, *PRENDERHAL_KERNEL_PARAM; |
| 744 |
|
| 745 |
typedef struct _RENDERHAL_CLONE_KERNEL_PARAM |
| 746 |
{ |
| 747 |
bool isClone; // If kernel has been cloned from another kernel (i.e. share same kernel binary) |
| 748 |
bool isHeadKernel; // If kernel is the "head" kernel (i.e. this allocation contains the kernel binary) |
| 749 |
int32_t referenceCount; // Number of cloned kernels currently pointing to the head kernel |
| 750 |
int32_t cloneKernelID; // Kernel ID of source kernel (i.e. kernel used to clone) |
| 751 |
int32_t kernelBinaryAllocID; // Allocation ID of the head kernel that contains the actual kernel binary |
| 752 |
uint32_t dwOffsetForAllocID; // Save the offset for this allocation ID, if clone using a different offset to point to head kernel binary |
| 753 |
}RENDERHAL_CLONE_KERNEL_PARAM, *PRENDERHAL_CLONE_KERNEL_PARAM; |
| 754 |
|
| 755 |
typedef struct tagKdll_CacheEntry Kdll_CacheEntry; |
| 756 |
typedef struct _RENDERHAL_KRN_ALLOCATION *PRENDERHAL_KRN_ALLOCATION; |
| 757 |
typedef struct _RENDERHAL_KRN_ALLOC_LIST *PRENDERHAL_KRN_ALLOC_LIST; |
| 758 |
|
| 759 |
typedef struct _RENDERHAL_KRN_ALLOCATION |
| 760 |
{ |
| 761 |
int32_t iKID; // Interface descriptor ID for the kernel (for 2nd level buffer) |
| 762 |
int32_t iKUID; // Kernel Unique ID |
| 763 |
int32_t iKCID; // Kernel Cache ID |
| 764 |
uint32_t dwSync; // Kernel last sync (used to determine whether the kernel may be unloaded) |
| 765 |
FrameTrackerTokenFlat trackerToken; // Kernel last sync with multiple trackers |
| 766 |
uint32_t dwOffset; // Kernel offset in GSH (from GSH base, 0 is KAC entry is available) |
| 767 |
int32_t iSize; // Kernel block size in GSH (0 if not loaded) |
| 768 |
uint32_t dwFlags : 4; // Kernel allocation flag |
| 769 |
uint32_t dwCount : 28; // Kernel refresh counter |
| 770 |
RENDERHAL_KERNEL_PARAM Params; // Kernel parameters for RenderHal (states, rendering, etc) |
| 771 |
PMHW_KERNEL_PARAM pMhwKernelParam; // Pointer to Kernel parameters for MHW |
| 772 |
Kdll_CacheEntry *pKernelEntry; // Pointer to Kernel entry for VP/KDLL |
| 773 |
RENDERHAL_CLONE_KERNEL_PARAM cloneKernelParams; // CM - Clone kernel information |
| 774 |
int32_t iAllocIndex; // Kernel allocation index (index in kernel allocation table) |
| 775 |
|
| 776 |
// DSH - Dynamic list of kernel allocations |
| 777 |
PMHW_STATE_HEAP_MEMORY_BLOCK pMemoryBlock; // Memory block in ISH |
| 778 |
PRENDERHAL_KRN_ALLOCATION pNext; // Next kernel in list |
| 779 |
PRENDERHAL_KRN_ALLOCATION pPrev; // Prev kernel in list |
| 780 |
PRENDERHAL_KRN_ALLOC_LIST pList; // Points to current list, regardless of flag |
| 781 |
uint32_t Reserved : 16; // Reserved - used for debugging |
| 782 |
uint32_t : 16; // |
| 783 |
char *szKernelName; // Kernel name - used for debugging |
| 784 |
} RENDERHAL_KRN_ALLOCATION, *PRENDERHAL_KRN_ALLOCATION; |
| 785 |
|
| 786 |
typedef struct _RENDERHAL_KRN_ALLOC_LIST |
| 787 |
{ |
| 788 |
PRENDERHAL_KRN_ALLOCATION pHead; // Head of the list |
| 789 |
PRENDERHAL_KRN_ALLOCATION pTail; // Tail of the list |
| 790 |
int32_t iCount; // Number of objects |
| 791 |
} RENDERHAL_KRN_ALLOC_LIST, *PRENDERHAL_KRN_ALLOC_LIST; |
| 792 |
|
| 793 |
typedef struct _RENDERHAL_MEDIA_STATE *PRENDERHAL_MEDIA_STATE; |
| 794 |
|
| 795 |
typedef struct _RENDERHAL_MEDIA_STATE |
| 796 |
{ |
| 797 |
// set at creation time |
| 798 |
uint32_t dwOffset; // Media State Base Address (from GSH base) - VFE |
| 799 |
int32_t *piAllocation; // Kernel allocation table |
| 800 |
|
| 801 |
// set at runtime |
| 802 |
uint32_t dwSyncTag; // Sync Tag |
| 803 |
FrameTrackerTokenFlat trackerToken; |
| 804 |
uint32_t dwSyncCount; // Number of sync tags |
| 805 |
int32_t iCurbeOffset; // Current CURBE Offset |
| 806 |
uint32_t bBusy : 1; // 1 if the state is in use (must sync before use) |
| 807 |
uint32_t : 15; |
| 808 |
uint32_t Reserved: 16; |
| 809 |
|
| 810 |
PRENDERHAL_MEDIA_STATE pPrev; // Next Media State |
| 811 |
PRENDERHAL_MEDIA_STATE pNext; // Previous Media State |
| 812 |
} RENDERHAL_MEDIA_STATE, *PRENDERHAL_MEDIA_STATE; |
| 813 |
|
| 814 |
typedef struct _RENDERHAL_MEDIA_STATE_LIST |
| 815 |
{ |
| 816 |
PRENDERHAL_MEDIA_STATE pHead; // Head of the list |
| 817 |
PRENDERHAL_MEDIA_STATE pTail; // Tail of the list |
| 818 |
int32_t iCount; // Number of objects |
| 819 |
} RENDERHAL_MEDIA_STATE_LIST, *PRENDERHAL_MEDIA_STATE_LIST; |
| 820 |
|
| 821 |
struct RENDERHAL_TR_RESOURCE { |
| 822 |
MOS_RESOURCE osResource; |
| 823 |
bool locked; |
| 824 |
uint32_t *data; |
| 825 |
uint32_t currentTrackerId; |
| 826 |
}; |
| 827 |
|
| 828 |
typedef struct _RENDERHAL_STATE_HEAP_SETTINGS |
| 829 |
{ |
| 830 |
// Global GSH Allocation parameters |
| 831 |
int32_t iSyncSize; // Sync area for sync, perf, debug |
| 832 |
|
| 833 |
// Media State Allocation parameters |
| 834 |
int32_t iMediaStateHeaps; // Number of Media State heaps |
| 835 |
int32_t iMediaIDs; // Number of Media Interface Descriptors |
| 836 |
int32_t iCurbeSize; // Size of CURBE area |
| 837 |
int32_t iSamplers; // Number of Samplers/ID |
| 838 |
int32_t iSamplersAVS; // Number of AVS Samplers/ID |
| 839 |
int32_t iSamplersVA; // Number of Video Analytics Samplers/ID |
| 840 |
int32_t iKernelCount; // Number of Kernels that can be loaded |
| 841 |
int32_t iKernelHeapSize; // Size of GSH block for kernels |
| 842 |
int32_t iKernelBlockSize; // Kernel allocation block |
| 843 |
|
| 844 |
// Media VFE/ID configuration, limits |
| 845 |
int32_t iPerThreadScratchSize; // Size of the Scratch memory per Thread |
| 846 |
int32_t iSipSize; // SIP size |
| 847 |
|
| 848 |
// Surface State Heap Settings |
| 849 |
int32_t iSurfaceStateHeaps; // Number of SSH instances (same as iMediaStateHeaps) |
| 850 |
int32_t iBindingTables; // Number of BT per SSH instance |
| 851 |
int32_t iSurfaceStates; // Number of Surfaces per SSH |
| 852 |
int32_t iSurfacesPerBT; // Number of Surfaces per BT |
| 853 |
int32_t iBTAlignment; // BT Alignment size |
| 854 |
MOS_HW_RESOURCE_DEF heapUsageType; |
| 855 |
} RENDERHAL_STATE_HEAP_SETTINGS, *PRENDERHAL_STATE_HEAP_SETTINGS; |
| 856 |
|
| 857 |
typedef struct _RENDERHAL_STATE_HEAP |
| 858 |
{ |
| 859 |
//--------------------------- |
| 860 |
// General State Heap |
| 861 |
//--------------------------- |
| 862 |
uint32_t dwSizeGSH; // GSH size |
| 863 |
MOS_RESOURCE GshOsResource; // GSH OS Buffer |
| 864 |
bool bGshLocked; // GSH is locked |
| 865 |
uint8_t *pGshBuffer; // Pointer to GSH buffer data |
| 866 |
|
| 867 |
// Dynamic GSH sync |
| 868 |
uint32_t dwOffsetSync; // Offset of sync/perf data in GSH |
| 869 |
uint32_t dwSizeSync; // Size of sync data |
| 870 |
|
| 871 |
// Synchronization / Performance / Statistics |
| 872 |
volatile uint32_t *pSync; // Pointer to sync area (when locked) |
| 873 |
uint32_t dwNextTag; // Next sync tag value to use |
| 874 |
uint32_t dwSyncTag; // Last sync tag completed |
| 875 |
uint32_t dwFrameId; // Last frame id completed |
| 876 |
|
| 877 |
// Media states |
| 878 |
int32_t iCurMediaState; // Current Media State Index |
| 879 |
int32_t iNextMediaState; // Next Media State Index |
| 880 |
PRENDERHAL_MEDIA_STATE pCurMediaState; // Current Media state in use |
| 881 |
uint32_t dwSizeMediaState; // Size of Media state |
| 882 |
|
| 883 |
uint32_t dwOffsetMediaID; // Offset to Media IDs from Media State Base |
| 884 |
uint32_t dwSizeMediaID; // Size of each Media ID |
| 885 |
|
| 886 |
MHW_ID_ENTRY_PARAMS CurIDEntryParams = {}; // Parameters for current Interface Descriptor Entry |
| 887 |
|
| 888 |
// Performance capture |
| 889 |
uint32_t dwOffsetStartTime; // Offset to the start time of the media state |
| 890 |
uint32_t dwStartTimeSize; // Size of Start time |
| 891 |
uint32_t dwOffsetEndTime; // Offset to the end time of the media state |
| 892 |
uint32_t dwEndTimeSize; // Size of end time |
| 893 |
uint32_t dwOffsetComponentID; // Render Component |
| 894 |
uint32_t dwComponentIDSize; // Render ComponentID size |
| 895 |
uint32_t dwOffsetReserved; // Reserved (Curbe should be 64 aligned) |
| 896 |
uint32_t dwReservedSize; // 64 - (start time + end time + component) |
| 897 |
|
| 898 |
uint32_t dwOffsetCurbe; // Offset to Media CURBE data from Media State Base |
| 899 |
uint32_t dwSizeCurbe; // Size of CURBE area |
| 900 |
|
| 901 |
uint32_t dwOffsetSampler; // Offset to Media Samplers from Media State Base |
| 902 |
uint32_t dwSizeSampler; // Size of Samplers |
| 903 |
|
| 904 |
uint32_t dwOffsetSamplerIndirect; // Offset to Media Samplers Indirect State from Media State Base |
| 905 |
uint32_t dwSizeSamplerIndirect; // Size of Samplers Indirect State |
| 906 |
|
| 907 |
uint32_t dwOffsetSampler8x8Table; // Offset to Media Sampler State Table for AVS from Media State Base |
| 908 |
uint32_t dwSizeSampler8x8Table; // Size of Sampler State Table for AVS |
| 909 |
|
| 910 |
uint32_t dwOffsetSamplerVA; // Offset to Video Analytics Samplers from Media State Base |
| 911 |
uint32_t dwSizeSamplerVA; // Size of VA Samplers |
| 912 |
|
| 913 |
uint32_t dwOffsetSamplerAVS; // Offset to 8x8 Samplers from Media State Base |
| 914 |
uint32_t dwSizeSamplerAVS; // Size of 8x8 Samplers |
| 915 |
|
| 916 |
uint32_t dwSizeSamplers; // Size of All Samplers |
| 917 |
|
| 918 |
PRENDERHAL_MEDIA_STATE pMediaStates; // Media state table |
| 919 |
|
| 920 |
// Dynamic Media states |
| 921 |
PMHW_MEMORY_POOL pMediaStatesMemPool; // Media state memory allocations |
| 922 |
RENDERHAL_MEDIA_STATE_LIST FreeStates; // Free media state objects (pool) |
| 923 |
RENDERHAL_MEDIA_STATE_LIST ReservedStates; // Reserved media states |
| 924 |
RENDERHAL_MEDIA_STATE_LIST SubmittedStates; // Submitted media states |
| 925 |
|
| 926 |
//--------------------------- |
| 927 |
// Surface State Heap |
| 928 |
//--------------------------- |
| 929 |
uint32_t dwSizeSSH; // SSH size |
| 930 |
MOS_RESOURCE SshOsResource; // SSH OS Buffer |
| 931 |
bool bSshLocked; // SSH is locked |
| 932 |
uint8_t *pSshBuffer; // Pointer to SSH buffer base |
| 933 |
uint32_t dwSshIntanceSize; // SSH instance size |
| 934 |
|
| 935 |
// BT size, offsets to BT/SS entries in SSH |
| 936 |
int32_t iBindingTableSize; // Size of each BT (in bytes) |
| 937 |
int32_t iBindingTableOffset; // First BT offset in SSH buffer |
| 938 |
int32_t iSurfaceStateOffset; // First SS offset in SSH buffer |
| 939 |
|
| 940 |
// Array of Surface State control structures |
| 941 |
PRENDERHAL_SURFACE_STATE_ENTRY pSurfaceEntry; |
| 942 |
|
| 943 |
// Current allocations |
| 944 |
int32_t iCurSshBufferIndex; // Current SSH Buffer instance in the SSH heap |
| 945 |
int32_t iCurrentBindingTable; // Current BT |
| 946 |
int32_t iCurrentSurfaceState; // Current SS. When bindlessInUse is true, this means state entry index |
| 947 |
|
| 948 |
//--------------------------- |
| 949 |
// Instruction State Heap |
| 950 |
//--------------------------- |
| 951 |
uint32_t dwSizeISH; // ISH size |
| 952 |
MOS_RESOURCE IshOsResource; // ISH OS Buffer |
| 953 |
bool bIshLocked; // ISH is locked |
| 954 |
uint8_t *pIshBuffer; // Pointer to ISH buffer data |
| 955 |
uint32_t dwKernelBase; // Offset of kernels in ISH |
| 956 |
|
| 957 |
// Kernel Allocation |
| 958 |
int32_t iKernelSize; // Kernel heap size |
| 959 |
int32_t iKernelUsed; // Kernel heap used size |
| 960 |
uint8_t *pKernelLoadMap; // Kernel load map |
| 961 |
uint32_t dwAccessCounter; // Incremented when a kernel is loaded/used, for dynamic allocation |
| 962 |
int32_t iKernelUsedForDump; // The kernel size to be dumped in oca buffer. |
| 963 |
|
| 964 |
// Kernel Spill Area |
| 965 |
uint32_t dwScratchSpaceSize; // Size of the Scratch Area |
| 966 |
uint32_t dwScratchSpaceBase; // Base of the Scratch area |
| 967 |
|
| 968 |
// System Routine |
| 969 |
uint32_t dwSipBase; // Base of the System Routine |
| 970 |
|
| 971 |
// Arrays created dynamically |
| 972 |
PRENDERHAL_KRN_ALLOCATION pKernelAllocation; // Kernel allocation table (or linked list) |
| 973 |
|
| 974 |
// Dynamic Kernel States |
| 975 |
PMHW_MEMORY_POOL pKernelAllocMemPool; // Kernel states memory pool (mallocs) |
| 976 |
RENDERHAL_KRN_ALLOC_LIST KernelAllocationPool; // Pool of kernel allocation objects |
| 977 |
RENDERHAL_KRN_ALLOC_LIST KernelsSubmitted; // Kernel submission list |
| 978 |
RENDERHAL_KRN_ALLOC_LIST KernelsAllocated; // kernel allocation list (kernels in ISH not currently being executed) |
| 979 |
SurfaceStateHeapManager *surfaceStateMgr; // Surface state manager |
| 980 |
} RENDERHAL_STATE_HEAP, *PRENDERHAL_STATE_HEAP; |
| 981 |
|
| 982 |
typedef struct _RENDERHAL_DYNAMIC_MEDIA_STATE_PARAMS |
| 983 |
{ |
| 984 |
int32_t iMaxMediaIDs; // Maximum number of media interface descriptors |
| 985 |
int32_t iMaxThreads; // Maximum number of threads to be executed (0 = limited to HW threads) - for scratch space allocation |
| 986 |
int32_t iMaxSpillSize; // Maximum spill sizes among all kernels to be executed - used for scratch space allocation |
| 987 |
int32_t iMaxCurbeOffset; // Maximum offset reserved for CURBE |
| 988 |
int32_t iMaxCurbeSize; // Maximum size reserved for CURBE |
| 989 |
int32_t iMaxSamplerIndex3D; // Maximum 3D sampler index |
| 990 |
int32_t iMaxSamplerIndexAVS; // Maximum AVS sampler index |
| 991 |
int32_t iMaxSamplerIndexConv; // Maximum Conv sampler index |
| 992 |
int32_t iMaxSamplerIndexMisc; // Maximum Misc (VA) sampler index |
| 993 |
int32_t iMax8x8Tables; // Maximum Number of 8x8 tables per MediaID |
| 994 |
} RENDERHAL_DYNAMIC_MEDIA_STATE_PARAMS, *PRENDERHAL_DYNAMIC_MEDIA_STATE_PARAMS; |
| 995 |
|
| 996 |
typedef struct _RENDERHAL_INTERFACE_DESCRIPTOR_PARAMS |
| 997 |
{ |
| 998 |
int32_t iMediaID; |
| 999 |
int32_t iBindingTableID; |
| 1000 |
int32_t iCurbeOffset; |
| 1001 |
int32_t iCurbeLength; |
| 1002 |
int32_t iCrsThrdConstDataLn; |
| 1003 |
int32_t iNumberThreadsInGroup; |
| 1004 |
bool blGlobalBarrierEnable; |
| 1005 |
bool blBarrierEnable; |
| 1006 |
int32_t iSLMSize; |
| 1007 |
} RENDERHAL_INTERFACE_DESCRIPTOR_PARAMS, *PRENDERHAL_INTERFACE_DESCRIPTOR_PARAMS; |
| 1008 |
|
| 1009 |
//! |
| 1010 |
//! \brief ======== HW Abstraction Params =================================== |
| 1011 |
//! |
| 1012 |
|
| 1013 |
struct RENDERHAL_STATE_LOCATION |
| 1014 |
{ |
| 1015 |
PMOS_RESOURCE stateHeap = 0; |
| 1016 |
uint32_t offset = 0; |
| 1017 |
uint32_t size = 0; |
| 1018 |
uint8_t *statePtr = nullptr; |
| 1019 |
}; |
| 1020 |
using PRENDERHAL_STATE_LOCATION = RENDERHAL_STATE_LOCATION*; |
| 1021 |
|
| 1022 |
typedef struct _RENDERHAL_SURFACE_STATE_PARAMS |
| 1023 |
{ |
| 1024 |
RENDERHAL_SURFACE_STATE_TYPE Type : 5; // Type of surface state |
| 1025 |
uint32_t isOutput : 1; // Render output flag |
| 1026 |
uint32_t bVertStride : 1; // VL Stride |
| 1027 |
uint32_t bVertStrideOffs : 1; // VL Stride Offset |
| 1028 |
uint32_t bWidthInDword_Y : 1; // Width in dwords |
| 1029 |
uint32_t bWidthInDword_UV : 1; |
| 1030 |
uint32_t bAVS : 1; // AVS scaling |
| 1031 |
RENDERHAL_SS_BOUNDARY Boundary : 3; // boundary to be aligned to rcSrc/rcDst/actual wd/ht |
| 1032 |
uint32_t bWidth16Align : 1; // When VDI Walker is enabled, input surface width must be 16 aligned |
| 1033 |
uint32_t b2PlaneNV12NeededByKernel : 1; // Kernel needs surface state for both Y and UV |
| 1034 |
uint32_t bForceNV12 : 1; // Forces format to be treated as NV12. Only used in FRC. |
| 1035 |
uint32_t bUseSinglePlane : 1; // 1 indicates using one plane only |
| 1036 |
uint32_t b32MWColorFillKern : 1; // Flag for 32x32 Media walker + ColorFill kernel case |
| 1037 |
uint32_t bVASurface : 1; // Value is 1 if VA surface, 0 if AVS surface |
| 1038 |
uint32_t AddressControl : 2; // 0 clamp, 1 mirror, 2, 3 reserved |
| 1039 |
uint32_t bWAUseSrcHeight : 1; // Surface state height use src height or surface height |
| 1040 |
uint32_t bWAUseSrcWidth : 1; // Surface state width use src width or surface width |
| 1041 |
uint32_t bForce3DLUTR16G16 : 1; // Flag for 3D LUT source and targetsurface |
| 1042 |
uint32_t bChromasiting : 1; // Flag for chromasiting use |
| 1043 |
uint32_t bVmeUse : 1; // Flag for VME use |
| 1044 |
uint32_t bBufferUse : 1; // Flags for 1D buffer use |
| 1045 |
uint32_t bSurfaceTypeDefined : 1; |
| 1046 |
uint32_t forceCommonSurfaceMessage : 1; |
| 1047 |
uint32_t surfaceType : 11; |
| 1048 |
MOS_COMPONENT Component : 4; |
| 1049 |
uint32_t combineChannelY : 1; // Combine 2 Luma Channel pixels into 1 pixel, so that kernel can reduce write times |
| 1050 |
uint32_t usePackedPlanar : 1; // Force using packed planr |
| 1051 |
RENDERHAL_MEMORY_OBJECT_CONTROL MemObjCtl; // Caching attributes |
| 1052 |
} RENDERHAL_SURFACE_STATE_PARAMS, *PRENDERHAL_SURFACE_STATE_PARAMS; |
| 1053 |
|
| 1054 |
typedef struct _RENDERHAL_SURFACE_STATE_ENTRY |
| 1055 |
{ |
| 1056 |
RENDERHAL_SURFACE_STATE_TYPE Type; // Type of surface state |
| 1057 |
PMOS_SURFACE pSurface; // Pointer to OS surface |
| 1058 |
uint8_t *pSurfaceState; // Pointer to Surface State |
| 1059 |
SURFACE_STATE_TOKEN_COMMON SurfaceToken; // SurfaceS Token |
| 1060 |
int32_t iSurfStateID; // Surface state ID |
| 1061 |
uint32_t dwSurfStateOffset; // Surface state offset (SSH) |
| 1062 |
uint32_t dwFormat; // Surface format |
| 1063 |
uint32_t dwWidth; // Surface width |
| 1064 |
uint32_t dwHeight; // Surface heigth |
| 1065 |
uint32_t dwPitch; // Surface pitch |
| 1066 |
uint32_t dwQPitch; // Surface qpitch |
| 1067 |
uint32_t YUVPlane : 2; // Plane |
| 1068 |
uint32_t bAVS : 1; // AVS scaling |
| 1069 |
uint32_t isOutput : 1; // Render output flag |
| 1070 |
uint32_t bVertStride : 1; // VL Stride |
| 1071 |
uint32_t bVertStrideOffs : 1; // VL Stride Offset |
| 1072 |
uint32_t bWidthInDword : 1; // Width in dwords |
| 1073 |
uint32_t bTiledSurface : 1; // Tiled surface |
| 1074 |
uint32_t bTileWalk : 1; // Walk 0-X; 1-Y |
| 1075 |
uint32_t bHalfPitchChroma : 1; // Half pitch for choma (AVS) |
| 1076 |
uint32_t bInterleaveChroma: 1; // Interleaved chroma (AVS) |
| 1077 |
uint32_t DirectionV : 3; // UV direction (AVS) |
| 1078 |
uint32_t DirectionU : 1; // UV direction (AVS) |
| 1079 |
uint32_t AddressControl : 2; // 0 Clamp, 1 Mirror, 2, 3 resserved |
| 1080 |
uint32_t : 15; // RESERVED |
| 1081 |
uint16_t wUXOffset; // (X,Y) offset U (AVS/ADI) |
| 1082 |
uint16_t wUYOffset; // |
| 1083 |
uint16_t wVXOffset; // (X,Y) offset V (AVS/ADI) |
| 1084 |
uint16_t wVYOffset; // |
| 1085 |
RENDERHAL_STATE_LOCATION stateLocation; // Gfx Location of Surface State |
| 1086 |
} RENDERHAL_SURFACE_STATE_ENTRY, *PRENDERHAL_SURFACE_STATE_ENTRY; |
| 1087 |
|
| 1088 |
//! |
| 1089 |
// \brief Helper parameters used by Mhw_SendGenericPrologCmd and to initiate command buffer attributes |
| 1090 |
//! |
| 1091 |
typedef struct _RENDERHAL_GENERIC_PROLOG_PARAMS |
| 1092 |
{ |
| 1093 |
bool bMmcEnabled = 0; |
| 1094 |
bool bEnableMediaFrameTracking = 0; |
| 1095 |
uint32_t dwMediaFrameTrackingTag = 0; |
| 1096 |
uint32_t dwMediaFrameTrackingAddrOffset = 0; |
| 1097 |
PMOS_RESOURCE presMediaFrameTrackingSurface = nullptr; |
| 1098 |
virtual ~_RENDERHAL_GENERIC_PROLOG_PARAMS() {} |
| 1099 |
} RENDERHAL_GENERIC_PROLOG_PARAMS, *PRENDERHAL_GENERIC_PROLOG_PARAMS; |
| 1100 |
|
| 1101 |
//! |
| 1102 |
// \brief Settings help to decide the value of L3 cache enabling register used for renderhal |
| 1103 |
//! |
| 1104 |
typedef struct _RENDERHAL_L3_CACHE_SETTINGS |
| 1105 |
{ |
| 1106 |
bool bEnableSLM; // Enable SLM cache configuration |
| 1107 |
bool bOverride; // Override cache settings |
| 1108 |
|
| 1109 |
// Override values |
| 1110 |
bool bL3CachingEnabled; |
| 1111 |
|
| 1112 |
bool bCntlRegOverride; |
| 1113 |
bool bCntlReg2Override; |
| 1114 |
bool bCntlReg3Override; |
| 1115 |
bool bSqcReg1Override; |
| 1116 |
bool bSqcReg4Override; |
| 1117 |
bool bLra1RegOverride; |
| 1118 |
|
| 1119 |
uint32_t dwCntlReg; |
| 1120 |
uint32_t dwCntlReg2; |
| 1121 |
uint32_t dwCntlReg3; |
| 1122 |
uint32_t dwSqcReg1; |
| 1123 |
uint32_t dwSqcReg4; |
| 1124 |
uint32_t dwLra1Reg; |
| 1125 |
} RENDERHAL_L3_CACHE_SETTINGS, *PRENDERHAL_L3_CACHE_SETTINGS; |
| 1126 |
|
| 1127 |
//! |
| 1128 |
// \brief Settings of Predication |
| 1129 |
//! |
| 1130 |
typedef struct _RENDERHAL_PREDICATION_SETTINGS |
| 1131 |
{ |
| 1132 |
MOS_RESOURCE *pPredicationResource; // Resource for predication |
| 1133 |
MOS_RESOURCE *ptempPredicationBuffer; // Additional temp buffer for Predication due to the limitation of Cond_BB_End |
| 1134 |
uint64_t predicationResOffset; // Offset for Predication resource |
| 1135 |
bool predicationNotEqualZero; // Predication mode |
| 1136 |
bool predicationEnabled; // Indicates whether or not Predication is enabled |
| 1137 |
} RENDERHAL_PREDICATION_SETTINGS; |
| 1138 |
|
| 1139 |
//! |
| 1140 |
// \brief Settings of SetMarker |
| 1141 |
//! |
| 1142 |
typedef struct _RENDERHAL_SETMARKER_SETTINGS |
| 1143 |
{ |
| 1144 |
MOS_RESOURCE *pSetMarkerResource; // Resource for SetMarker |
| 1145 |
bool setMarkerEnabled; // Indicates whether or not SetMarker is enabled |
| 1146 |
uint32_t setMarkerNumTs; // Number Timestamp for SetMarker |
| 1147 |
} RENDERHAL_SETMARKER_SETTINGS; |
| 1148 |
|
| 1149 |
typedef MhwMiInterface *PMHW_MI_INTERFACE; |
| 1150 |
|
| 1151 |
typedef struct _RENDERHAL_ENLARGE_PARAMS |
| 1152 |
{ |
| 1153 |
//for ReAllocateStateHeapsforAdvFeatureWithSshResize and ReAllocateStateHeapsforAdvFeatureWithAllHeapsEnlarged |
| 1154 |
int32_t iBindingTables; // Number of BT per SSH instance |
| 1155 |
int32_t iSurfaceStates; // Number of Surfaces per SSH |
| 1156 |
int32_t iSurfacesPerBT; // Size of BT |
| 1157 |
//for ReAllocateStateHeapsforAdvFeatureWithAllHeapsEnlarged only |
| 1158 |
int32_t iKernelCount; // Number of Kernels that can be loaded |
| 1159 |
int32_t iKernelHeapSize; // Size of GSH block for kernels |
| 1160 |
int32_t iCurbeSize; // Size of CURBE area |
| 1161 |
int32_t iMediaIDs; // Number of Media Interface Descriptors |
| 1162 |
} RENDERHAL_ENLARGE_PARAMS, *PRENDERHAL_ENLARGE_PARAMS; |
| 1163 |
|
| 1164 |
//! |
| 1165 |
// \brief Hardware dependent render engine interface |
| 1166 |
//! |
| 1167 |
typedef struct _RENDERHAL_INTERFACE |
| 1168 |
{ |
| 1169 |
// MOS/MHW Interfaces |
| 1170 |
PMOS_INTERFACE pOsInterface; |
| 1171 |
MhwCpInterface *pCpInterface; |
| 1172 |
PXMHW_STATE_HEAP_INTERFACE pMhwStateHeap; |
| 1173 |
PMHW_MI_INTERFACE pMhwMiInterface; |
| 1174 |
|
| 1175 |
// RenderHal State Heap |
| 1176 |
PRENDERHAL_STATE_HEAP pStateHeap; |
| 1177 |
uint32_t dwStateHeapSize; |
| 1178 |
|
| 1179 |
// Linked list of batch buffers for synchronization |
| 1180 |
PMHW_BATCH_BUFFER pBatchBufferList; // List of BB submitted |
| 1181 |
|
| 1182 |
PMHW_MEMORY_POOL pBatchBufferMemPool; // Batch Buffer memory allocations (malloc) |
| 1183 |
PMHW_BATCH_BUFFER_LIST BatchBufferPool; // Pool of BB objects (no GFX buffer) |
| 1184 |
PMHW_BATCH_BUFFER_LIST BatchBuffersAllocated; // List of BB allocated (not executing, backed by GFX buffer) |
| 1185 |
|
| 1186 |
// Auxiliary |
| 1187 |
PLATFORM Platform; |
| 1188 |
MEDIA_FEATURE_TABLE *pSkuTable; |
| 1189 |
MEDIA_WA_TABLE *pWaTable; |
| 1190 |
|
| 1191 |
// Hardware dependent parameters |
| 1192 |
MHW_VFE_SCOREBOARD VfeScoreboard; |
| 1193 |
PCMHW_SURFACE_PLANES pPlaneDefinitions; |
| 1194 |
|
| 1195 |
// Settings and capabilities |
| 1196 |
PMHW_RENDER_ENGINE_CAPS pHwCaps; // HW Capabilities |
| 1197 |
PMHW_RENDER_STATE_SIZES pHwSizes; // Sizes of HW commands/states |
| 1198 |
RENDERHAL_STATE_HEAP_SETTINGS StateHeapSettings; // State Heap Settings |
| 1199 |
RENDERHAL_STATE_HEAP_SETTINGS defaultStateHeapSettings; // Default State Heap Settings |
| 1200 |
RENDERHAL_ENLARGE_PARAMS enlargeStateHeapSettingsForAdv; // State Heap Settings for Adv Feature |
| 1201 |
|
| 1202 |
// MHW parameters |
| 1203 |
MHW_STATE_BASE_ADDR_PARAMS StateBaseAddressParams; |
| 1204 |
MHW_SIP_STATE_PARAMS SipStateParams; |
| 1205 |
MHW_WALKER_MODE MediaWalkerMode; // Media object walker mode from Regkey: repel, dual mode, quad mode |
| 1206 |
uint32_t euThreadSchedulingMode; |
| 1207 |
uint32_t largeGrfMode; |
| 1208 |
uint32_t enableVariableRegisterSizeAllocationVrt; |
| 1209 |
|
| 1210 |
RENDERHAL_SURFACE_STATE_TYPE SurfaceTypeDefault; // Surface State type default |
| 1211 |
RENDERHAL_SURFACE_STATE_TYPE SurfaceTypeAdvanced; // Surface State type advanced |
| 1212 |
|
| 1213 |
RENDERHAL_L3_CACHE_SETTINGS L3CacheSettings; // L3 Cache settings |
| 1214 |
|
| 1215 |
bool bEnableYV12SinglePass; // Enabled YV12 single pass in 3D sampler |
| 1216 |
bool bEnableP010SinglePass; // Enabled P010 single pass in sampler |
| 1217 |
bool bSIPKernel; // SIP loaded |
| 1218 |
bool bCSRKernel; // CSR loaded |
| 1219 |
bool bTurboMode; // Turbo mode info to pass in cmdBuf |
| 1220 |
bool bVDIWalker; // VDI Walker info from Regkey |
| 1221 |
bool bRequestSingleSlice; // Single Slice Request flag |
| 1222 |
bool bEUSaturationNoSSD; // No slice shutdown, must request 2 slices [CM EU saturation on] |
| 1223 |
bool bEnableGpgpuMidBatchPreEmption; // Middle Batch Buffer Preemption |
| 1224 |
bool bEnableGpgpuMidThreadPreEmption; // Middle Thread Preemption |
| 1225 |
bool bComputeContextInUse; // Compute Context use for media |
| 1226 |
bool isBindlessHeapInUse; // Bindless Heap Mode use |
| 1227 |
|
| 1228 |
uint32_t grfSize; // The size of GRF registers, which can be get from GRF Registers from Spec |
| 1229 |
uint32_t dwMaskCrsThdConDataRdLn; // Unifies pfnSetupInterfaceDescriptor for g75,g8,... |
| 1230 |
uint32_t dwMinNumberThreadsInGroup; // Unifies pfnSetupInterfaceDescriptor for g75,g8,... |
| 1231 |
uint32_t dwCurbeBlockAlign; // Unifies pfnLoadCurbeData - Curbe Block Alignment |
| 1232 |
uint32_t dwScratchSpaceMaxThreads; // Unifies pfnGetScratchSpaceSize - Threads used for scratch space calculation |
| 1233 |
uint32_t dwSamplerAvsIncrement; // Unifies pfnSetSamplerStates |
| 1234 |
|
| 1235 |
const void *sseuTable; // pointer of const VphalSseuSetting table on a platform |
| 1236 |
|
| 1237 |
uint32_t dwIndirectHeapSize; |
| 1238 |
uint32_t dwTimeoutMs; |
| 1239 |
int32_t iMaxPalettes; |
| 1240 |
int32_t iMaxPaletteEntries; |
| 1241 |
MHW_PALETTE_PARAMS Palette[RENDERHAL_PALETTE_MAX]; |
| 1242 |
|
| 1243 |
int32_t iMaxChromaKeys; |
| 1244 |
int32_t iChromaKeyCount; |
| 1245 |
MHW_CHROMAKEY_PARAMS ChromaKey[RENDERHAL_CHROMA_KEY_MAX]; |
| 1246 |
|
| 1247 |
bool bHasCombinedAVSSamplerState; |
| 1248 |
|
| 1249 |
// GD2 kernel debugging |
| 1250 |
bool bIsaAsmDebugEnable; |
| 1251 |
uint8_t cIsaAsmDebugSurfaceBTI; |
| 1252 |
RENDERHAL_SURFACE IsaAsmDebugSurface; |
| 1253 |
|
| 1254 |
// Performance collection |
| 1255 |
bool bKerneltimeDump; |
| 1256 |
double kernelTime[RENDERHAL_COMPONENT_COUNT]; |
| 1257 |
|
| 1258 |
// Auxiliary data - for debugging purposes |
| 1259 |
int32_t iMediaStatesInUse; // Media states in use |
| 1260 |
int32_t iKernelsInUse; // Kernels in use |
| 1261 |
int32_t iBuffersInUse; // BB in use |
| 1262 |
|
| 1263 |
// Power option to control slice/subslice/EU shutdown |
| 1264 |
RENDERHAL_POWEROPTION PowerOption; |
| 1265 |
|
| 1266 |
// Indicates whether it's MDF load or not |
| 1267 |
bool IsMDFLoad; |
| 1268 |
|
| 1269 |
bool bDynamicStateHeap; //!< Indicates that DSH is in use |
| 1270 |
|
| 1271 |
|
| 1272 |
FrameTrackerProducer trackerProducer; // Resource to mark command buffer completion |
| 1273 |
RENDERHAL_TR_RESOURCE veBoxTrackerRes; // Resource to mark command buffer completion |
| 1274 |
uint32_t currentTrackerIndex; // Record the tracker index |
| 1275 |
|
| 1276 |
HeapManager *dgsheapManager; // Dynamic general state heap manager |
| 1277 |
|
| 1278 |
#if (_DEBUG || _RELEASE_INTERNAL) |
| 1279 |
// Dump state for VP debugging |
| 1280 |
void *pStateDumper; |
| 1281 |
#endif |
| 1282 |
|
| 1283 |
// Pointer to vphal oca dumper object to dump vphal parameters. |
| 1284 |
void *pVphalOcaDumper; |
| 1285 |
|
| 1286 |
// Predication |
| 1287 |
RENDERHAL_PREDICATION_SETTINGS PredicationParams; //!< Predication |
| 1288 |
MOS_RESOURCE PredicationBuffer; //!< Predication buffer |
| 1289 |
|
| 1290 |
// CSC Coefficient |
| 1291 |
bool bCmfcCoeffUpdate; //!< CMFC CSC Coefficient Surface update flag |
| 1292 |
int32_t iKernelAllocationID; //!< CMFC CSC Kernel Allocation ID |
| 1293 |
PMOS_RESOURCE pCmfcCoeffSurface; //!< CMFC CSC Coefficient Surface |
| 1294 |
|
| 1295 |
// SetMarker |
| 1296 |
RENDERHAL_SETMARKER_SETTINGS SetMarkerParams; //!< SetMarker |
| 1297 |
|
| 1298 |
// Indicates whether it's AVS or not |
| 1299 |
bool bIsAVS; |
| 1300 |
|
| 1301 |
bool isMMCEnabled; |
| 1302 |
#if (_DEBUG || _RELEASE_INTERNAL) |
| 1303 |
// RT Old cacheSetting |
| 1304 |
uint32_t oldCacheSettingForTargetSurface = 0; |
| 1305 |
#endif |
| 1306 |
|
| 1307 |
MediaPerfProfiler *pPerfProfiler = nullptr; //!< Performance data profiler |
| 1308 |
bool eufusionBypass = false; |
| 1309 |
MediaUserSettingSharedPtr userSettingPtr = nullptr; //!< Shared pointer to User Setting instance |
| 1310 |
|
| 1311 |
// if it's true, will disable preemption by setting NeedsMidBatchPreEmptionSupport flag in command buffer attribute as false; |
| 1312 |
// will also skip preemption control bits configure. |
| 1313 |
bool forceDisablePreemption = false; |
| 1314 |
//--------------------------- |
| 1315 |
// HW interface functions |
| 1316 |
//--------------------------- |
| 1317 |
MOS_STATUS (* pfnInitialize)( |
| 1318 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1319 |
PRENDERHAL_SETTINGS pSettings); |
| 1320 |
|
| 1321 |
MOS_STATUS (* pfnDestroy) ( |
| 1322 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1323 |
|
| 1324 |
MOS_STATUS (* pfnReset) ( |
| 1325 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1326 |
|
| 1327 |
//--------------------------- |
| 1328 |
// State Heap Functions |
| 1329 |
//--------------------------- |
| 1330 |
MOS_STATUS (* pfnAllocateStateHeaps) ( |
| 1331 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1332 |
PRENDERHAL_STATE_HEAP_SETTINGS pSettings); |
| 1333 |
|
| 1334 |
MOS_STATUS (* pfnReAllocateStateHeapsforAdvFeatureWithSshResize)( |
| 1335 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1336 |
bool enlarged, |
| 1337 |
bool &bAllocated); |
| 1338 |
|
| 1339 |
MOS_STATUS (*pfnReAllocateStateHeapsforAdvFeatureWithAllHeapsEnlarged)( |
| 1340 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1341 |
bool &bAllocated); |
| 1342 |
|
| 1343 |
MOS_STATUS (* pfnFreeStateHeaps) ( |
| 1344 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1345 |
|
| 1346 |
MOS_STATUS (* pfnRefreshSync) ( |
| 1347 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1348 |
|
| 1349 |
MOS_STATUS (*pfnOverwriteEnlargedHeapParams)( |
| 1350 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1351 |
RENDERHAL_ENLARGE_PARAMS ¶ms); |
| 1352 |
|
| 1353 |
//--------------------------- |
| 1354 |
// SSH, surface states |
| 1355 |
//--------------------------- |
| 1356 |
MOS_STATUS (* pfnAssignSshInstance) ( |
| 1357 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1358 |
|
| 1359 |
MOS_STATUS (* pfnGetSurfaceStateEntries) ( |
| 1360 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1361 |
PRENDERHAL_SURFACE pRenderHalSurface, |
| 1362 |
PRENDERHAL_SURFACE_STATE_PARAMS pParams, |
| 1363 |
int32_t *piNumEntries, |
| 1364 |
PRENDERHAL_SURFACE_STATE_ENTRY *ppSurfaceEntries); |
| 1365 |
|
| 1366 |
MOS_STATUS (* pfnSetupSurfaceState) ( |
| 1367 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1368 |
PRENDERHAL_SURFACE pRenderHalSurface, |
| 1369 |
PRENDERHAL_SURFACE_STATE_PARAMS pParams, |
| 1370 |
int32_t *piNumEntries, |
| 1371 |
PRENDERHAL_SURFACE_STATE_ENTRY *ppSurfaceEntries, |
| 1372 |
PRENDERHAL_OFFSET_OVERRIDE pOffsetOverride); |
| 1373 |
|
| 1374 |
MOS_STATUS (*pfnSetupBufferSurfaceState) ( |
| 1375 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1376 |
PRENDERHAL_SURFACE pRenderHalSurface, |
| 1377 |
PRENDERHAL_SURFACE_STATE_PARAMS pParams, |
| 1378 |
PRENDERHAL_SURFACE_STATE_ENTRY *ppSurfaceEntry); |
| 1379 |
|
| 1380 |
MOS_STATUS (* pfnAssignSurfaceState) ( |
| 1381 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1382 |
RENDERHAL_SURFACE_STATE_TYPE Type, |
| 1383 |
PRENDERHAL_SURFACE_STATE_ENTRY *ppSurfaceEntry); |
| 1384 |
|
| 1385 |
void (* pfnGetAlignUnit) ( |
| 1386 |
uint16_t *pwWidthAlignUnit, |
| 1387 |
uint16_t *pwHeightAlignUnit, |
| 1388 |
PRENDERHAL_SURFACE pRenderHalSurface); |
| 1389 |
|
| 1390 |
void (* pfnAdjustBoundary) ( |
| 1391 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1392 |
PRENDERHAL_SURFACE pRenderHalSurface, |
| 1393 |
RENDERHAL_SS_BOUNDARY Boundary, |
| 1394 |
uint32_t *pdwSurfaceWidth, |
| 1395 |
uint32_t *pdwSurfaceHeight); |
| 1396 |
|
| 1397 |
uint32_t (* pfnSetSurfacesPerBT) ( |
| 1398 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1399 |
uint32_t dwSurfacesPerBT); |
| 1400 |
|
| 1401 |
uint16_t (* pfnCalculateYOffset) ( |
| 1402 |
PMOS_INTERFACE pOsInterface, |
| 1403 |
PMOS_RESOURCE pOsResource); |
| 1404 |
|
| 1405 |
MOS_STATUS (* pfnAssignBindingTable) ( |
| 1406 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1407 |
int32_t *piBindingTable); |
| 1408 |
|
| 1409 |
MOS_STATUS (* pfnAssignBindlessSurfaceStates) ( |
| 1410 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1411 |
|
| 1412 |
MOS_STATUS (*pfnSendBindlessSurfaceStates) ( |
| 1413 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1414 |
PMOS_COMMAND_BUFFER pCmdBuffer, |
| 1415 |
bool bNeedNullPatch); |
| 1416 |
|
| 1417 |
MOS_STATUS (* pfnBindSurfaceState) ( |
| 1418 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1419 |
int32_t iBindingTableIndex, |
| 1420 |
int32_t iBindingTableEntry, |
| 1421 |
PRENDERHAL_SURFACE_STATE_ENTRY pSurfaceEntry); |
| 1422 |
|
| 1423 |
uint32_t (* pfnGetSurfaceMemoryObjectControl) ( |
| 1424 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1425 |
PRENDERHAL_SURFACE_STATE_PARAMS pParams); |
| 1426 |
|
| 1427 |
MOS_STATUS (*pfnGetPlaneDefinitionForCommonMessage) ( |
| 1428 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1429 |
MOS_FORMAT format, |
| 1430 |
PRENDERHAL_SURFACE_STATE_PARAMS &pParam, |
| 1431 |
bool isRenderTarget, |
| 1432 |
RENDERHAL_PLANE_DEFINITION &planeDefinition); |
| 1433 |
|
| 1434 |
//--------------------------- |
| 1435 |
// State Setup - HW + OS Specific |
| 1436 |
//--------------------------- |
| 1437 |
MOS_STATUS (* pfnSetupSurfaceStatesOs) ( |
| 1438 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1439 |
PRENDERHAL_SURFACE_STATE_PARAMS pParams, |
| 1440 |
PRENDERHAL_SURFACE_STATE_ENTRY pSurfaceStateEntry); |
| 1441 |
|
| 1442 |
//--------------------------- |
| 1443 |
// Batch Buffer |
| 1444 |
//--------------------------- |
| 1445 |
MOS_STATUS (* pfnAllocateBB) ( |
| 1446 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1447 |
PMHW_BATCH_BUFFER pBatchBuffer, |
| 1448 |
int32_t iSize); |
| 1449 |
|
| 1450 |
MOS_STATUS (* pfnFreeBB) ( |
| 1451 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1452 |
PMHW_BATCH_BUFFER pBatchBuffer); |
| 1453 |
|
| 1454 |
MOS_STATUS (* pfnLockBB) ( |
| 1455 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1456 |
PMHW_BATCH_BUFFER pBatchBuffer); |
| 1457 |
|
| 1458 |
MOS_STATUS (* pfnUnlockBB) ( |
| 1459 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1460 |
PMHW_BATCH_BUFFER pBatchBuffer); |
| 1461 |
|
| 1462 |
//--------------------------- |
| 1463 |
// Media State |
| 1464 |
//--------------------------- |
| 1465 |
PRENDERHAL_MEDIA_STATE (* pfnAssignMediaState) ( |
| 1466 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1467 |
RENDERHAL_COMPONENT componentID); |
| 1468 |
|
| 1469 |
//--------------------------- |
| 1470 |
// Allocation |
| 1471 |
//--------------------------- |
| 1472 |
MOS_STATUS (* pfnEnablePalette) ( |
| 1473 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1474 |
int32_t iPaletteID, |
| 1475 |
int32_t iPaletteSize); |
| 1476 |
|
| 1477 |
MOS_STATUS (* pfnAllocatePaletteID) ( |
| 1478 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1479 |
int32_t *pPaletteID); |
| 1480 |
|
| 1481 |
MOS_STATUS (* pfnFreePaletteID) ( |
| 1482 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1483 |
int32_t *pPaletteID); |
| 1484 |
|
| 1485 |
MOS_STATUS (* pfnGetPaletteEntry) ( |
| 1486 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1487 |
int32_t iPaletteID, |
| 1488 |
int32_t iInNumEntries, |
| 1489 |
int32_t *piOutNumEntries, |
| 1490 |
void **pPaletteData); |
| 1491 |
|
| 1492 |
int32_t (* pfnAllocateChromaKey) ( |
| 1493 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1494 |
uint32_t dwLow, |
| 1495 |
uint32_t dwHigh); |
| 1496 |
|
| 1497 |
int32_t (* pfnLoadCurbeData) ( |
| 1498 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1499 |
PRENDERHAL_MEDIA_STATE pMediaState, |
| 1500 |
void *pData, |
| 1501 |
int32_t iSize); |
| 1502 |
|
| 1503 |
MOS_STATUS (* pfnSetSamplerStates) ( |
| 1504 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1505 |
int32_t iMediaID, |
| 1506 |
PMHW_SAMPLER_STATE_PARAM pSamplerParams, |
| 1507 |
int32_t iSamplers); |
| 1508 |
|
| 1509 |
MOS_STATUS (*pfnSetAndGetSamplerStates)( |
| 1510 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1511 |
int32_t iMediaID, |
| 1512 |
PMHW_SAMPLER_STATE_PARAM pSamplerParams, |
| 1513 |
int32_t iSamplers, |
| 1514 |
std::map<uint32_t, RENDERHAL_STATE_LOCATION> &samplerMap); |
| 1515 |
|
| 1516 |
int32_t (* pfnAllocateMediaID) ( |
| 1517 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1518 |
int32_t iKernelAllocationID, |
| 1519 |
int32_t iBindingTableID, |
| 1520 |
int32_t iCurbeOffset, |
| 1521 |
int32_t iCurbeLength, |
| 1522 |
int32_t iCrsThrdConstDataLn, |
| 1523 |
PMHW_GPGPU_WALKER_PARAMS pGpGpuWalkerParams); |
| 1524 |
|
| 1525 |
int32_t (* pfnGetMediaID) ( |
| 1526 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1527 |
PRENDERHAL_MEDIA_STATE pMediaState, |
| 1528 |
PRENDERHAL_KRN_ALLOCATION pKernelAllocation); |
| 1529 |
|
| 1530 |
MOS_STATUS (* pfnSetupInterfaceDescriptor) ( |
| 1531 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1532 |
PRENDERHAL_MEDIA_STATE pMediaState, |
| 1533 |
PRENDERHAL_KRN_ALLOCATION pKernelAllocation, |
| 1534 |
PRENDERHAL_INTERFACE_DESCRIPTOR_PARAMS pInterfaceDescriptorParams); |
| 1535 |
|
| 1536 |
uint32_t (* pfnEncodeSLMSize)(PRENDERHAL_INTERFACE pRenderHal, uint32_t SLMSize); |
| 1537 |
|
| 1538 |
//--------------------------- |
| 1539 |
// Kernels |
| 1540 |
//--------------------------- |
| 1541 |
int32_t (* pfnLoadKernel) ( |
| 1542 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1543 |
PCRENDERHAL_KERNEL_PARAM pParameters, |
| 1544 |
PMHW_KERNEL_PARAM pKernel, |
| 1545 |
Kdll_CacheEntry *pKernelEntry); |
| 1546 |
|
| 1547 |
MOS_STATUS (* pfnUnloadKernel) ( |
| 1548 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1549 |
int32_t iKernelAllocationID); |
| 1550 |
|
| 1551 |
void (* pfnResetKernels) ( |
| 1552 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1553 |
|
| 1554 |
void (* pfnTouchKernel) ( |
| 1555 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1556 |
int32_t iKernelAllocationID); |
| 1557 |
|
| 1558 |
int32_t (* pfnGetKernelOffset) ( |
| 1559 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1560 |
int32_t iKernelAllocationIndex); |
| 1561 |
|
| 1562 |
MOS_STATUS (* pfnUnregisterKernel) ( |
| 1563 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1564 |
PRENDERHAL_KRN_ALLOCATION pKernelAllocation); |
| 1565 |
|
| 1566 |
//--------------------------- |
| 1567 |
// New Dynamic State Heap interfaces |
| 1568 |
//--------------------------- |
| 1569 |
MOS_STATUS(*pfnAssignSpaceInStateHeap)( |
| 1570 |
uint32_t trackerIndex, |
| 1571 |
FrameTrackerProducer *trackerProducer, |
| 1572 |
HeapManager *heapManager, |
| 1573 |
MemoryBlock *block, |
| 1574 |
uint32_t size); |
| 1575 |
|
| 1576 |
PRENDERHAL_MEDIA_STATE (* pfnAssignDynamicState) ( |
| 1577 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1578 |
PRENDERHAL_DYNAMIC_MEDIA_STATE_PARAMS pParams, |
| 1579 |
RENDERHAL_COMPONENT componentID); |
| 1580 |
|
| 1581 |
MOS_STATUS (* pfnReleaseDynamicState) ( |
| 1582 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1583 |
PRENDERHAL_MEDIA_STATE pMediaState); |
| 1584 |
|
| 1585 |
MOS_STATUS (* pfnSubmitDynamicState) ( |
| 1586 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1587 |
PRENDERHAL_MEDIA_STATE pMediaState); |
| 1588 |
|
| 1589 |
int32_t (* pfnAllocateDynamicMediaID) ( |
| 1590 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1591 |
PRENDERHAL_KRN_ALLOCATION pKernelAllocation, |
| 1592 |
int32_t iBindingTableID, |
| 1593 |
int32_t iCurbeOffset, |
| 1594 |
int32_t iCurbeLength, |
| 1595 |
int32_t iCrsThrdConstDataLn, |
| 1596 |
PMHW_GPGPU_WALKER_PARAMS pGpGpuWalkerParams); |
| 1597 |
|
| 1598 |
PRENDERHAL_KRN_ALLOCATION (* pfnLoadDynamicKernel) ( |
| 1599 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1600 |
PCRENDERHAL_KERNEL_PARAM pParameters, |
| 1601 |
PMHW_KERNEL_PARAM pKernel, |
| 1602 |
uint32_t *pdwLoaded); |
| 1603 |
|
| 1604 |
PRENDERHAL_KRN_ALLOCATION (* pfnSearchDynamicKernel) ( |
| 1605 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1606 |
int32_t iKernelUniqueID, |
| 1607 |
int32_t iCacheID); |
| 1608 |
|
| 1609 |
PRENDERHAL_KRN_ALLOCATION (* pfnAllocateDynamicKernel) ( |
| 1610 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1611 |
int32_t iKernelUniqueID, |
| 1612 |
int32_t iCacheID); |
| 1613 |
|
| 1614 |
MOS_STATUS (* pfnUnloadDynamicKernel) ( |
| 1615 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1616 |
PRENDERHAL_KRN_ALLOCATION pKernelAllocation); |
| 1617 |
|
| 1618 |
MOS_STATUS (* pfnRefreshDynamicKernels) ( |
| 1619 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1620 |
uint32_t dwSpaceNeeded, |
| 1621 |
uint32_t *pdwSizes, |
| 1622 |
int32_t iCount); |
| 1623 |
|
| 1624 |
void (* pfnResetDynamicKernels) ( |
| 1625 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1626 |
|
| 1627 |
void (* pfnTouchDynamicKernel) ( |
| 1628 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1629 |
PRENDERHAL_KRN_ALLOCATION pKernelAllocation); |
| 1630 |
|
| 1631 |
MOS_STATUS (* pfnExpandKernelStateHeap)( |
| 1632 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1633 |
uint32_t dwAdditionalKernelSpaceNeeded); |
| 1634 |
|
| 1635 |
//--------------------------- |
| 1636 |
// HW interface configuration functions |
| 1637 |
//--------------------------- |
| 1638 |
MOS_STATUS (* pfnSetVfeStateParams) ( |
| 1639 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1640 |
uint32_t dwDebugCounterControl, |
| 1641 |
uint32_t dwMaximumNumberofThreads, |
| 1642 |
uint32_t dwCURBEAllocationSize, |
| 1643 |
uint32_t dwURBEntryAllocationSize, |
| 1644 |
PMHW_VFE_SCOREBOARD pScoreboardParams); |
| 1645 |
|
| 1646 |
bool (* pfnGetMediaWalkerStatus) ( |
| 1647 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1648 |
|
| 1649 |
//--------------------------- |
| 1650 |
// Command buffer programming functions |
| 1651 |
//--------------------------- |
| 1652 |
MOS_STATUS (* pfnSendStateBaseAddress) ( |
| 1653 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1654 |
PMOS_COMMAND_BUFFER pCmdBuffer); |
| 1655 |
|
| 1656 |
MOS_STATUS (* pfnSendMediaStates) ( |
| 1657 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1658 |
PMOS_COMMAND_BUFFER pCmdBuffer, |
| 1659 |
PMHW_WALKER_PARAMS pWalkerParams, |
| 1660 |
PMHW_GPGPU_WALKER_PARAMS pGpGpuWalkerParams); |
| 1661 |
|
| 1662 |
MOS_STATUS (* pfnInitCommandBuffer) ( |
| 1663 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1664 |
PMOS_COMMAND_BUFFER pCmdBuffer, |
| 1665 |
PRENDERHAL_GENERIC_PROLOG_PARAMS pGenericPrologParams); |
| 1666 |
|
| 1667 |
MOS_STATUS (* pfnSendSurfaces) ( |
| 1668 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1669 |
PMOS_COMMAND_BUFFER pCmdBuffer); |
| 1670 |
|
| 1671 |
MOS_STATUS (* pfnSendSyncTag) ( |
| 1672 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1673 |
PMOS_COMMAND_BUFFER pCmdBuffer); |
| 1674 |
|
| 1675 |
MOS_STATUS (*pfnSendCscCoeffSurface) ( |
| 1676 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1677 |
PMOS_COMMAND_BUFFER pCmdBuffer, |
| 1678 |
PMOS_RESOURCE presCscCoeff, |
| 1679 |
Kdll_CacheEntry *pKernelEntry); |
| 1680 |
|
| 1681 |
// Samplers and other states |
| 1682 |
MOS_STATUS (*pfnGetSamplerOffsetAndPtr) ( |
| 1683 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1684 |
int32_t iMediaID, |
| 1685 |
int32_t iSamplerID, |
| 1686 |
PMHW_SAMPLER_STATE_PARAM pSamplerParams, |
| 1687 |
uint32_t *pdwSamplerOffset, |
| 1688 |
void **ppSampler); |
| 1689 |
|
| 1690 |
MOS_STATUS (* pfnSendCurbeLoad) ( |
| 1691 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1692 |
PMOS_COMMAND_BUFFER pCmdBuffer); |
| 1693 |
|
| 1694 |
MOS_STATUS (* pfnSendMediaIdLoad) ( |
| 1695 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1696 |
PMOS_COMMAND_BUFFER pCmdBuffer); |
| 1697 |
|
| 1698 |
MOS_STATUS (* pfnSendChromaKey) ( |
| 1699 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1700 |
PMOS_COMMAND_BUFFER pCmdBuffer); |
| 1701 |
|
| 1702 |
MOS_STATUS (* pfnSendPalette) ( |
| 1703 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1704 |
PMOS_COMMAND_BUFFER pCmdBuffer); |
| 1705 |
|
| 1706 |
MOS_STATUS (* pfnSendSurfaceStateEntry) ( |
| 1707 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1708 |
PMOS_COMMAND_BUFFER pCmdBuffer, |
| 1709 |
PMHW_SURFACE_STATE_SEND_PARAMS pParams); |
| 1710 |
|
| 1711 |
MOS_STATUS (* pfnSetSurfaceStateToken)( |
| 1712 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1713 |
PMHW_SURFACE_TOKEN_PARAMS pParams, |
| 1714 |
void *pSurfaceStateToken); |
| 1715 |
|
| 1716 |
MOS_STATUS (* pfnSetSurfaceStateBuffer)( |
| 1717 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1718 |
PMHW_RCS_SURFACE_PARAMS pParams, |
| 1719 |
void *pSurfaceState); |
| 1720 |
|
| 1721 |
//----------------------------- |
| 1722 |
// Slice Shutdown Mode function |
| 1723 |
//----------------------------- |
| 1724 |
void (* pfnSetSliceShutdownMode) ( |
| 1725 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1726 |
bool bMode); |
| 1727 |
|
| 1728 |
//----------------------------- |
| 1729 |
// General Slice Shut Down Mode function |
| 1730 |
//----------------------------- |
| 1731 |
void( *pfnSetPowerOptionMode ) ( |
| 1732 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1733 |
PRENDERHAL_POWEROPTION pMode); |
| 1734 |
|
| 1735 |
//----------------------------- |
| 1736 |
// Enable Middle Batch Buffer Preemption |
| 1737 |
//----------------------------- |
| 1738 |
void (* pfnEnableGpgpuMiddleBatchBufferPreemption) ( |
| 1739 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1740 |
|
| 1741 |
//----------------------------- |
| 1742 |
// Enable Middle Thread Preemption |
| 1743 |
//----------------------------- |
| 1744 |
void (* pfnEnableGpgpuMiddleThreadPreemption) ( |
| 1745 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1746 |
|
| 1747 |
//--------------------------- |
| 1748 |
// Generic HAL Layer Commands and State Functions |
| 1749 |
//--------------------------- |
| 1750 |
void (* pfnConvertToNanoSeconds) ( |
| 1751 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1752 |
uint64_t iTicks, |
| 1753 |
uint64_t *piNs); |
| 1754 |
|
| 1755 |
MOS_STATUS (* pfnSendRcsStatusTag) ( |
| 1756 |
PRENDERHAL_INTERFACE pRenderHal, // [in] Hardware interface |
| 1757 |
PMOS_COMMAND_BUFFER pCmdBuffer); // [in] Command Buffer |
| 1758 |
|
| 1759 |
MOS_STATUS (* pfnSendTimingData) ( |
| 1760 |
PRENDERHAL_INTERFACE pRenderHal, // [in] Hardware interface |
| 1761 |
PMOS_COMMAND_BUFFER pCmdBuffer, // [in] Command Buffer |
| 1762 |
bool bStartTime); // [in] Start Timestamp flag |
| 1763 |
|
| 1764 |
uint32_t (* pfnGetScratchSpaceSize)( |
| 1765 |
PRENDERHAL_INTERFACE pRenderHal, // [in] Hardware interface |
| 1766 |
uint32_t iPerThreadScratchSpaceSize); // [in] Per thread scrach space size |
| 1767 |
|
| 1768 |
bool (* pfnIs2PlaneNV12Needed) ( |
| 1769 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1770 |
PRENDERHAL_SURFACE pRenderHalSurface, |
| 1771 |
RENDERHAL_SS_BOUNDARY Boundary); |
| 1772 |
|
| 1773 |
uint8_t (* pfnSetChromaDirection) ( |
| 1774 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1775 |
PRENDERHAL_SURFACE pRenderHalSurface); |
| 1776 |
|
| 1777 |
bool(*pfnPerThreadScratchSpaceStart2K) ( |
| 1778 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1779 |
|
| 1780 |
//--------------------------- |
| 1781 |
// Overwrite L3 Cache control register |
| 1782 |
//--------------------------- |
| 1783 |
MOS_STATUS (* pfnEnableL3Caching) ( |
| 1784 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1785 |
PRENDERHAL_L3_CACHE_SETTINGS pCacheSettings); |
| 1786 |
|
| 1787 |
MOS_STATUS(*pfnSetCacheOverrideParams) ( |
| 1788 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1789 |
PRENDERHAL_L3_CACHE_SETTINGS pCacheSettings, |
| 1790 |
bool bEnableSLM); |
| 1791 |
|
| 1792 |
//! |
| 1793 |
//! \brief Get mmio registers address |
| 1794 |
//! \details Get mmio registers address |
| 1795 |
//! \return [out] PMHW_MI_MMIOREGISTERS* |
| 1796 |
//! mmio registers got. |
| 1797 |
//! |
| 1798 |
PMHW_MI_MMIOREGISTERS GetMmioRegisters(); |
| 1799 |
|
| 1800 |
//----------------------------- |
| 1801 |
//Platform related interface |
| 1802 |
XRenderHal_Platform_Interface *pRenderHalPltInterface; |
| 1803 |
} RENDERHAL_INTERFACE; |
| 1804 |
|
| 1805 |
//! |
| 1806 |
//! \brief Functions |
| 1807 |
//! |
| 1808 |
|
| 1809 |
//! |
| 1810 |
//! \brief Init Interface |
| 1811 |
//! \details Initializes Render Hal Interface structure, responsible for HW |
| 1812 |
//! abstraction of Render Engine for MDF/VP |
| 1813 |
//! \param PRENDERHAL_INTERFACE pRenderHal |
| 1814 |
//! [in] Pointer to Hardware Interface Structure |
| 1815 |
//! \param MhwCpInterface** ppCpInterface |
| 1816 |
//! [in/out] Pointer of pointer to MHW CP Interface Structure, which |
| 1817 |
//! is created during renderhal initialization |
| 1818 |
//! \param PMOS_INTERFACE pOsInterface |
| 1819 |
//! [in] Pointer to OS Interface Structure |
| 1820 |
//! \return MOS_STATUS |
| 1821 |
//! MOS_STATUS_UNKNOWN : Invalid parameters |
| 1822 |
//! |
| 1823 |
MOS_STATUS RenderHal_InitInterface( |
| 1824 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1825 |
MhwCpInterface **ppCpInterface, |
| 1826 |
PMOS_INTERFACE pOsInterface); |
| 1827 |
|
| 1828 |
//! |
| 1829 |
//! \brief Get Pixels Per Sample |
| 1830 |
//! \details Get Number of Pixels per Dataport Sample |
| 1831 |
//! \param MOS_FORMAT format |
| 1832 |
//! [in] Surface Format |
| 1833 |
//! \param uint32_t *pdwPixelsPerSampleUV |
| 1834 |
//! [in] Pointer to dwPixelsPerSampleUV |
| 1835 |
//! \return void |
| 1836 |
//! |
| 1837 |
void RenderHal_GetPixelsPerSample( |
| 1838 |
MOS_FORMAT format, |
| 1839 |
uint32_t *pdwPixelsPerSampleUV); |
| 1840 |
|
| 1841 |
//! |
| 1842 |
//! \brief Set Surface for HW Access |
| 1843 |
//! \details Common Function for setting up surface state |
| 1844 |
//! \param PRENDERHAL_INTERFACE pRenderHal |
| 1845 |
//! [in] Pointer to Hardware Interface Structure |
| 1846 |
//! \param PRENDERHAL_SURFACE pRenderHalSurface |
| 1847 |
//! [in] Pointer to Render Hal Surface |
| 1848 |
//! \param PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams |
| 1849 |
//! [in] Pointer to Surface Params |
| 1850 |
//! \param int32_t iBindingTable |
| 1851 |
//! [in] Binding Table to bind surface |
| 1852 |
//! \param int32_t iBTEntry |
| 1853 |
//! [in] Binding Table Entry index |
| 1854 |
//! \param bool bWrite |
| 1855 |
//! [in] Write mode flag |
| 1856 |
//! \return MOS_STATUS |
| 1857 |
//! MOS_STATUS_SUCCESS if success. Error code otherwise |
| 1858 |
//! |
| 1859 |
MOS_STATUS RenderHal_SetSurfaceForHwAccess( |
| 1860 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1861 |
PRENDERHAL_SURFACE pRenderHalSurface, |
| 1862 |
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams, |
| 1863 |
int32_t iBindingTable, |
| 1864 |
int32_t iBTEntry, |
| 1865 |
bool bWrite); |
| 1866 |
|
| 1867 |
//! |
| 1868 |
//! \brief Set Buffer Surface for HW Access |
| 1869 |
//! \details Common Function for setting up buffer surface state |
| 1870 |
//! \param PRENDERHAL_INTERFACE pRenderHal |
| 1871 |
//! [in] Pointer to Hardware Interface Structure |
| 1872 |
//! \param PRENDERHAL_SURFACE pRenderHalSurface |
| 1873 |
//! [in] Pointer to Render Hal Surface |
| 1874 |
//! \param PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams |
| 1875 |
//! [in] Pointer to Surface Params |
| 1876 |
//! \param int32_t iBindingTable |
| 1877 |
//! [in] Binding Table to Bind Surface |
| 1878 |
//! \param int32_t iBTEntry |
| 1879 |
//! [in] Binding Table Entry index |
| 1880 |
//! \param bool bWrite |
| 1881 |
//! Write mode flag |
| 1882 |
//! \return MOS_STATUS |
| 1883 |
//! MOS_STATUS_SUCCESS if success. Error code otherwise |
| 1884 |
//! |
| 1885 |
MOS_STATUS RenderHal_SetBufferSurfaceForHwAccess( |
| 1886 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1887 |
PRENDERHAL_SURFACE pRenderHalSurface, |
| 1888 |
PRENDERHAL_SURFACE_STATE_PARAMS pSurfaceParams, |
| 1889 |
int32_t iBindingTable, |
| 1890 |
int32_t iBTEntry, |
| 1891 |
bool bWrite); |
| 1892 |
|
| 1893 |
//! |
| 1894 |
//! \brief Get Surface Info from OsResource |
| 1895 |
//! \details Update surface info in PRENDERHAL_SURFACE based on allocated OsResource |
| 1896 |
//! \param PMOS_INTERFACE pOsInterface |
| 1897 |
//! [in] Pointer to MOS_INTERFACE |
| 1898 |
//! \param PRENDERHAL_GET_SURFACE_INFO pInfo |
| 1899 |
//! [in] Pointer to RENDERHAL_GET_SURFACE_INFO |
| 1900 |
//! \param PMOS_SURFACE pSurface |
| 1901 |
//! [in/out] Pointer to PMOS_SURFACE |
| 1902 |
//! \return MOS_STATUS |
| 1903 |
//! Return MOS_STATUS_SUCCESS if successful, otherwise failed |
| 1904 |
//! |
| 1905 |
MOS_STATUS RenderHal_GetSurfaceInfo( |
| 1906 |
PMOS_INTERFACE pOsInterface, |
| 1907 |
PRENDERHAL_GET_SURFACE_INFO pInfo, |
| 1908 |
PMOS_SURFACE pSurface); |
| 1909 |
|
| 1910 |
//! |
| 1911 |
//! \brief Send Media States |
| 1912 |
//! \details Send Media States |
| 1913 |
//! \param PRENDERHAL_INTERFACE pRenderHal |
| 1914 |
//! [in] Pointer to Hardware Interface Structure |
| 1915 |
//! \param PMOS_COMMAND_BUFFER pCmdBuffer |
| 1916 |
//! [in] Pointer to Command Buffer |
| 1917 |
//! \param PRENDERHAL_GPGPU_WALKER_PARAMS pGpGpuWalkerParams |
| 1918 |
//! [in] Pointer to GPGPU walker parameters |
| 1919 |
//! \return MOS_STATUS |
| 1920 |
//! |
| 1921 |
MOS_STATUS RenderHal_SendMediaStates( |
| 1922 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1923 |
PMOS_COMMAND_BUFFER pCmdBuffer, |
| 1924 |
PMHW_WALKER_PARAMS pWalkerParams, |
| 1925 |
PMHW_GPGPU_WALKER_PARAMS pGpGpuWalkerParams); |
| 1926 |
|
| 1927 |
//! |
| 1928 |
//! \brief Issue command to write timestamp |
| 1929 |
//! \param [in] pRenderHal |
| 1930 |
//! \param [in] pCmdBuffer |
| 1931 |
//! \param [in] bStartTime |
| 1932 |
//! \return MOS_STATUS |
| 1933 |
//! |
| 1934 |
MOS_STATUS RenderHal_SendTimingData( |
| 1935 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1936 |
PMOS_COMMAND_BUFFER pCmdBuffer, |
| 1937 |
bool bStartTime); |
| 1938 |
|
| 1939 |
//! |
| 1940 |
//! \brief Get Y Offset according to the planeOffset struct and surface pitch |
| 1941 |
//! \details Get Y Offset according to the planeOffset struct and surface pitch |
| 1942 |
//! \param pOsInterface |
| 1943 |
//! [in] pointer to OS Interface |
| 1944 |
//! \param pOsResource |
| 1945 |
//! [in] Pointers to Surface OsResource |
| 1946 |
//! \return uint16_t |
| 1947 |
//! [out] the plane Y offset |
| 1948 |
//! |
| 1949 |
uint16_t RenderHal_CalculateYOffset( |
| 1950 |
PMOS_INTERFACE pOsInterface, |
| 1951 |
PMOS_RESOURCE pOsResource); |
| 1952 |
|
| 1953 |
MOS_STATUS RenderHal_AllocateDebugSurface( |
| 1954 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1955 |
|
| 1956 |
MOS_STATUS RenderHal_SetupDebugSurfaceState( |
| 1957 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1958 |
|
| 1959 |
void RenderHal_FreeDebugSurface( |
| 1960 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1961 |
|
| 1962 |
MOS_STATUS RenderHal_AddDebugControl( |
| 1963 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1964 |
PMOS_COMMAND_BUFFER pCmdBuffer); |
| 1965 |
|
| 1966 |
|
| 1967 |
MOS_STATUS RenderHal_SetSurfaceStateToken( |
| 1968 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1969 |
PMHW_SURFACE_TOKEN_PARAMS pParams, |
| 1970 |
void *pSurfaceStateToken); |
| 1971 |
|
| 1972 |
//! |
| 1973 |
//! \brief Send Surfaces PatchList |
| 1974 |
//! \details Send Surface State commands |
| 1975 |
//! \param PRENDERHAL_INTERFACE pRenderHal |
| 1976 |
//! [in] Pointer to Hardware Interface Structure |
| 1977 |
//! \param PMOS_COMMAND_BUFFER pCmdBuffer |
| 1978 |
//! [in] Pointer to Command Buffer |
| 1979 |
//! \return MOS_STATUS |
| 1980 |
//! |
| 1981 |
MOS_STATUS RenderHal_SendSurfaces_PatchList( |
| 1982 |
PRENDERHAL_INTERFACE pRenderHal, |
| 1983 |
PMOS_COMMAND_BUFFER pCmdBuffer); |
| 1984 |
|
| 1985 |
//! |
| 1986 |
//! \brief Init Special Interface |
| 1987 |
//! \details Initializes RenderHal Interface structure, responsible for HW |
| 1988 |
//! abstraction of HW Rendering Engine for CM(MDF) and VP. |
| 1989 |
//! \param PRENDERHAL_INTERFACE pRenderHal |
| 1990 |
//! [in] Pointer to RenderHal Interface Structure |
| 1991 |
//! |
| 1992 |
void RenderHal_InitInterfaceEx( |
| 1993 |
PRENDERHAL_INTERFACE pRenderHal); |
| 1994 |
|
| 1995 |
// Constants defined in RenderHal interface |
| 1996 |
extern const SURFACE_STATE_TOKEN_COMMON g_cInit_SURFACE_STATE_TOKEN_COMMON; |
| 1997 |
extern const MHW_PIPE_CONTROL_PARAMS g_cRenderHal_InitPipeControlParams; |
| 1998 |
extern const MHW_VFE_PARAMS g_cRenderHal_InitVfeParams; |
| 1999 |
extern const MHW_MEDIA_STATE_FLUSH_PARAM g_cRenderHal_InitMediaStateFlushParams; |
| 2000 |
extern const RENDERHAL_KERNEL_PARAM g_cRenderHal_InitKernelParams; |
| 2001 |
|
| 2002 |
#endif // __RENDERHAL_H__ |