|
|
dd89bb |
#ifndef _NT_BLITTER_H_
|
|
|
dd89bb |
#define _NT_BLITTER_H_
|
|
|
dd89bb |
|
|
|
414ad3 |
#include "nt_abi.h"
|
|
|
dd89bb |
#include "nt_object.h"
|
|
|
dd89bb |
|
|
|
dd89bb |
/* blt_alloc flag bits */
|
|
|
dd89bb |
#define NT_BLITTER_ENABLE_BLOCK_ARRAY 0x01
|
|
|
dd89bb |
#define NT_BLITTER_ENABLE_BLOCK_SECTIONS 0x02
|
|
|
dd89bb |
#define NT_BLITTER_ENABLE_CACHE 0x04
|
|
|
dd89bb |
#define NT_BLITTER_PRESERVE_BITS 0x08
|
|
|
dd89bb |
|
|
|
dd89bb |
/* blitter query type bits */
|
|
|
dd89bb |
#define NT_BLITTER_QUERY_INFO 0x01
|
|
|
dd89bb |
#define NT_BLITTER_QUERY_PARAMS 0x02
|
|
|
dd89bb |
|
|
|
dd89bb |
/* blitter context (opaque) */
|
|
|
dd89bb |
typedef struct nt_blitter_context nt_blitter;
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_blitter_params {
|
|
|
dd89bb |
size_t params_size;
|
|
|
dd89bb |
size_t block_size;
|
|
|
dd89bb |
intptr_t block_count;
|
|
|
dd89bb |
intptr_t cache_blocks_min; __optional
|
|
|
dd89bb |
intptr_t cache_blocks_max; __optional
|
|
|
dd89bb |
size_t zero_bits; __optional
|
|
|
dd89bb |
uint32_t srvtid; __optional
|
|
|
dd89bb |
uint32_t flags; __optional
|
|
|
dd89bb |
int32_t lock_tries; __optional
|
|
|
44c078 |
uint32_t round_trips; __optional
|
|
|
dd89bb |
void * hsignal_blt; __optional
|
|
|
dd89bb |
void * hsignal_app; __optional
|
|
|
dd89bb |
void * bitmap; __optional
|
|
|
dd89bb |
void * region; __optional
|
|
|
dd89bb |
} nt_blitter_params;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_blitter_info {
|
|
|
dd89bb |
size_t info_size;
|
|
|
dd89bb |
void * region_addr;
|
|
|
dd89bb |
size_t region_size;
|
|
|
dd89bb |
size_t block_size;
|
|
|
dd89bb |
intptr_t block_count;
|
|
|
dd89bb |
intptr_t blocks_used;
|
|
|
dd89bb |
intptr_t blocks_avail;
|
|
|
dd89bb |
intptr_t blocks_cached;
|
|
|
dd89bb |
intptr_t lock_tries;
|
|
|
dd89bb |
intptr_t busy;
|
|
|
dd89bb |
} nt_blitter_info;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_blitter_query {
|
|
|
dd89bb |
size_t size;
|
|
|
dd89bb |
int32_t type;
|
|
|
dd89bb |
uint32_t flags;
|
|
|
dd89bb |
nt_blitter_params * params;
|
|
|
dd89bb |
nt_blitter_info * info;
|
|
|
dd89bb |
} nt_blitter_query;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef struct _nt_blitter_config {
|
|
|
dd89bb |
size_t size;
|
|
|
dd89bb |
int32_t type;
|
|
|
dd89bb |
uint32_t flags;
|
|
|
dd89bb |
nt_blitter_params * params;
|
|
|
dd89bb |
} nt_blitter_config;
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/* blitter functions */
|
|
|
dd89bb |
typedef int32_t __fastcall ntapi_blt_alloc(
|
|
|
dd89bb |
__out nt_blitter ** blitter,
|
|
|
dd89bb |
__in nt_blitter_params * params);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __fastcall ntapi_blt_free(
|
|
|
dd89bb |
__in nt_blitter * blitter);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __fastcall ntapi_blt_query(
|
|
|
dd89bb |
__in nt_blitter * blitter,
|
|
|
dd89bb |
__in nt_blitter_query * blt_query);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __fastcall ntapi_blt_config(
|
|
|
dd89bb |
__in nt_blitter * blitter,
|
|
|
dd89bb |
__in nt_blitter_config * blt_config);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __fastcall ntapi_blt_acquire(
|
|
|
dd89bb |
__in nt_blitter * blitter,
|
|
|
dd89bb |
__out intptr_t * block_id);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __fastcall ntapi_blt_obtain(
|
|
|
dd89bb |
__in nt_blitter * blitter,
|
|
|
dd89bb |
__out intptr_t * block_id);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __fastcall ntapi_blt_possess(
|
|
|
dd89bb |
__in nt_blitter * blitter,
|
|
|
dd89bb |
__out intptr_t * block_id);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef int32_t __fastcall ntapi_blt_release(
|
|
|
dd89bb |
__in nt_blitter * blitter,
|
|
|
dd89bb |
__in intptr_t block_id);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef void * __fastcall ntapi_blt_region(
|
|
|
dd89bb |
__in const nt_blitter * blitter);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
/**
|
|
|
dd89bb |
* blt_get,blt_set:
|
|
|
dd89bb |
* clients might prefr to write inlined
|
|
|
dd89bb |
* alternatives that use a cached blt_region.
|
|
|
dd89bb |
**/
|
|
|
dd89bb |
typedef void * __fastcall ntapi_blt_get(
|
|
|
dd89bb |
__in const nt_blitter * blitter,
|
|
|
dd89bb |
__in intptr_t block_id);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
typedef void __fastcall ntapi_blt_set(
|
|
|
dd89bb |
__in const nt_blitter * blitter,
|
|
|
dd89bb |
__in intptr_t block_id,
|
|
|
dd89bb |
__in void * val);
|
|
|
dd89bb |
|
|
|
dd89bb |
|
|
|
dd89bb |
#endif
|