mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
util: allow for overriding u_stub tail
This commit allows for overriding the normal u_stub's TAIL implementation (returning -1) with a custom implementation, allowing for different TAIL implementations to be added without having to create a new TAIL+ in u_stub.h. Signed-off-by: Thong Thai <thong.thai@amd.com> Reviewed-by: David Rosca <david.rosca@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40493>
This commit is contained in:
parent
f9df50eb31
commit
e9fe2aeba2
1 changed files with 13 additions and 0 deletions
|
|
@ -11,6 +11,14 @@
|
|||
* #define __U_STUB__
|
||||
* #endif
|
||||
* #include "u_stub.h"
|
||||
*
|
||||
* To override TAIL, define __U_STUB__TAIL before including u_stub.h, for example:
|
||||
*
|
||||
* #define __U_STUB__TAIL { return VA_STATUS_ERROR_UNIMPLEMENTED; }
|
||||
* #ifndef HAVE_XXXX
|
||||
* #define __U_STUB__
|
||||
* #endif
|
||||
* #include "u_stub.h"
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -24,10 +32,15 @@
|
|||
|
||||
#ifdef __U_STUB__
|
||||
#define MESAPROC static inline
|
||||
|
||||
#ifdef __U_STUB__TAIL
|
||||
#define TAIL __U_STUB__TAIL
|
||||
#else
|
||||
#define TAIL \
|
||||
{ \
|
||||
return -1; \
|
||||
}
|
||||
#endif
|
||||
#define TAILZ \
|
||||
{ \
|
||||
return 0; \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue