/src/VBox/GuestHost/OpenGL/error/errorspu_init.c

https://gitlab.com/ufo/virtualbox-ose-3-1-8 · C · 62 lines · 47 code · 10 blank · 5 comment · 0 complexity · 4757c55b1a79a7e8b900183105b5ee45 MD5 · raw file

  1. /* Copyright (c) 2001, Stanford University
  2. * All rights reserved
  3. *
  4. * See the file LICENSE.txt for information on redistributing this software.
  5. */
  6. #include <stdio.h>
  7. #include "cr_spu.h"
  8. extern SPUNamedFunctionTable _cr_error_table[];
  9. static SPUFunctions error_functions = {
  10. NULL, /* CHILD COPY */
  11. NULL, /* DATA */
  12. _cr_error_table /* THE ACTUAL FUNCTIONS */
  13. };
  14. static SPUFunctions *errorSPUInit( int id, SPU *child, SPU *self,
  15. unsigned int context_id,
  16. unsigned int num_contexts )
  17. {
  18. (void) id;
  19. (void) context_id;
  20. (void) num_contexts;
  21. (void) child;
  22. (void) self;
  23. return &error_functions;
  24. }
  25. static void errorSPUSelfDispatch(SPUDispatchTable *parent)
  26. {
  27. (void)parent;
  28. }
  29. static int errorSPUCleanup(void)
  30. {
  31. return 1;
  32. }
  33. static SPUOptions errorSPUOptions[] = {
  34. { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
  35. };
  36. int SPULoad( char **name, char **super, SPUInitFuncPtr *init,
  37. SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup,
  38. SPUOptionsPtr *options, int *flags )
  39. {
  40. #ifdef IN_GUEST
  41. *name = "error";
  42. #else
  43. *name = "hosterror";
  44. #endif
  45. *super = NULL;
  46. *init = errorSPUInit;
  47. *self = errorSPUSelfDispatch;
  48. *cleanup = errorSPUCleanup;
  49. *options = errorSPUOptions;
  50. *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
  51. return 1;
  52. }