summaryrefslogtreecommitdiffstats
path: root/src/VBox/GuestHost/OpenGL/error
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/GuestHost/OpenGL/error')
-rw-r--r--src/VBox/GuestHost/OpenGL/error/Makefile.kup0
-rw-r--r--src/VBox/GuestHost/OpenGL/error/VBoxOGLerrorspu.rc81
-rw-r--r--src/VBox/GuestHost/OpenGL/error/error.def6
-rwxr-xr-xsrc/VBox/GuestHost/OpenGL/error/error.py49
-rw-r--r--src/VBox/GuestHost/OpenGL/error/errorspu.rc69
-rw-r--r--src/VBox/GuestHost/OpenGL/error/errorspu_init.c62
6 files changed, 267 insertions, 0 deletions
diff --git a/src/VBox/GuestHost/OpenGL/error/Makefile.kup b/src/VBox/GuestHost/OpenGL/error/Makefile.kup
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/VBox/GuestHost/OpenGL/error/Makefile.kup
diff --git a/src/VBox/GuestHost/OpenGL/error/VBoxOGLerrorspu.rc b/src/VBox/GuestHost/OpenGL/error/VBoxOGLerrorspu.rc
new file mode 100644
index 00000000..454ac8e1
--- /dev/null
+++ b/src/VBox/GuestHost/OpenGL/error/VBoxOGLerrorspu.rc
@@ -0,0 +1,81 @@
+/* $Id: VBoxOGLerrorspu.rc $ */
+/** @file
+ * VBoxOGLerrorspu.rc - Resource file containing version info and icon.
+ */
+
+/*
+ * Copyright (C) 2015-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#include <windows.h>
+#include <VBox/version.h>
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION VBOX_RC_FILE_VERSION
+ PRODUCTVERSION VBOX_RC_FILE_VERSION
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS VBOX_RC_FILE_FLAGS
+ FILEOS VBOX_RC_FILE_OS
+ FILETYPE VBOX_RC_TYPE_DLL
+ FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0" // Lang=US English, CharSet=Unicode
+ BEGIN
+#ifdef IN_GUEST
+ VALUE "FileDescription", "VirtualBox crOpenGL ICD\0"
+# ifdef VBOX_WDDM_WOW64
+ VALUE "InternalName", "VBoxOGLerrorspu-x86\0"
+ VALUE "OriginalFilename", "VBoxOGLerrorspu-x86.dll\0"
+# else
+ VALUE "InternalName", "VBoxOGLerrorspu\0"
+ VALUE "OriginalFilename", "VBoxOGLerrorspu.dll\0"
+# endif
+ VALUE "ProductName", VBOX_RC_PRODUCT_NAME_GA_STR
+#else
+ VALUE "FileDescription", "VirtualBox crOpenGL ICD\0"
+ VALUE "InternalName", "VBoxOGLhosterrorspu\0"
+ VALUE "InternalFilename", "VBoxOGLhosterrorspu.dll\0"
+ VALUE "ProductName", VBOX_RC_PRODUCT_NAME_STR
+#endif
+
+ VALUE "CompanyName", VBOX_RC_COMPANY_NAME
+ VALUE "FileVersion", VBOX_RC_FILE_VERSION_STR
+ VALUE "LegalCopyright", VBOX_RC_LEGAL_COPYRIGHT
+ VALUE "ProductVersion", VBOX_RC_PRODUCT_VERSION_STR
+ VBOX_RC_MORE_STRINGS
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+// XXX is this really required?
+#if defined(VBOX_WDDM_WOW64) && defined(IN_GUEST)
+1 RCDATA
+BEGIN
+// Machine dependent parameters
+ 17, // Height of vertical thumb
+ 17, // Width of horizontal thumb
+ 2, // Icon horiz compression factor
+ 2, // Icon vert compression factor
+ 1, // Cursor horz compression factor
+ 1, // Cursor vert compression factor
+ 0, // Kanji window height
+ 1, // cxBorder (thickness of vertical lines)
+ 1 // cyBorder (thickness of horizontal lines)
+END
+#endif
diff --git a/src/VBox/GuestHost/OpenGL/error/error.def b/src/VBox/GuestHost/OpenGL/error/error.def
new file mode 100644
index 00000000..9edc7163
--- /dev/null
+++ b/src/VBox/GuestHost/OpenGL/error/error.def
@@ -0,0 +1,6 @@
+; Copyright (c) 2001, Stanford University
+; All rights reserved.
+;
+; See the file LICENSE.txt for information on redistributing this software.
+EXPORTS
+SPULoad
diff --git a/src/VBox/GuestHost/OpenGL/error/error.py b/src/VBox/GuestHost/OpenGL/error/error.py
new file mode 100755
index 00000000..7f3da03a
--- /dev/null
+++ b/src/VBox/GuestHost/OpenGL/error/error.py
@@ -0,0 +1,49 @@
+# Copyright (c) 2001, Stanford University
+# All rights reserved.
+#
+# See the file LICENSE.txt for information on redistributing this software.
+
+
+from __future__ import print_function
+import sys
+
+import apiutil
+
+apiutil.CopyrightC()
+
+
+print("""#include <stdio.h>
+#include "cr_error.h"
+#include "cr_spu.h"
+#include "state/cr_statetypes.h"
+
+#if defined(WINDOWS)
+#define ERROR_APIENTRY __stdcall
+#else
+#define ERROR_APIENTRY
+#endif
+
+#define ERROR_UNUSED(x) ((void)x)""")
+
+
+keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
+
+for func_name in keys:
+ return_type = apiutil.ReturnType(func_name)
+ params = apiutil.Parameters(func_name)
+ print('\nstatic %s ERROR_APIENTRY error%s(%s)' % (return_type, func_name, apiutil.MakeDeclarationString(params )))
+ print('{')
+ # Handle the void parameter list
+ for (name, type, vecSize) in params:
+ print('\tERROR_UNUSED(%s);' % name)
+ print('\tcrError("ERROR SPU: Unsupported function gl%s called!");' % func_name)
+ if return_type != "void":
+ print('\treturn (%s)0;' % return_type)
+ print('}')
+
+print('SPUNamedFunctionTable _cr_error_table[] = {')
+for index in range(len(keys)):
+ func_name = keys[index]
+ print('\t{ "%s", (SPUGenericFunction) error%s },' % (func_name, func_name ))
+print('\t{ NULL, NULL }')
+print('};')
diff --git a/src/VBox/GuestHost/OpenGL/error/errorspu.rc b/src/VBox/GuestHost/OpenGL/error/errorspu.rc
new file mode 100644
index 00000000..390222c2
--- /dev/null
+++ b/src/VBox/GuestHost/OpenGL/error/errorspu.rc
@@ -0,0 +1,69 @@
+/* $Id: errorspu.rc $ */
+/** @file
+ * VBoxOGLerrorspu - Resource file containing version info and icon.
+ */
+
+/*
+ * Copyright (C) 2009-2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#include <windows.h>
+#include <VBox/version.h>
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION VBOX_RC_FILE_VERSION
+ PRODUCTVERSION VBOX_RC_FILE_VERSION
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS VBOX_RC_FILE_FLAGS
+ FILEOS VBOX_RC_FILE_OS
+ FILETYPE VBOX_RC_TYPE_DRV
+ FILESUBTYPE VFT2_DRV_DISPLAY
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "VirtualBox crOpenGL ICD\0"
+ VALUE "InternalName", "VBoxOGLerrorspu\0"
+#ifdef VBOX_WDDM_WOW64
+ VALUE "OriginalFilename", "VBoxOGLerrorspu-x86.dll\0"
+#else
+ VALUE "OriginalFilename", "VBoxOGLerrorspu.dll\0"
+#endif
+ VALUE "CompanyName", VBOX_RC_COMPANY_NAME
+ VALUE "FileVersion", VBOX_RC_FILE_VERSION_STR
+ VALUE "LegalCopyright", VBOX_RC_LEGAL_COPYRIGHT
+ VALUE "ProductName", VBOX_RC_PRODUCT_NAME_GA_STR
+ VALUE "ProductVersion", VBOX_RC_PRODUCT_VERSION_STR
+ VBOX_RC_MORE_STRINGS
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+1 RCDATA
+BEGIN
+// Machine dependent parameters
+ 17, // Height of vertical thumb
+ 17, // Width of horizontal thumb
+ 2, // Icon horiz compression factor
+ 2, // Icon vert compression factor
+ 1, // Cursor horz compression factor
+ 1, // Cursor vert compression factor
+ 0, // Kanji window height
+ 1, // cxBorder (thickness of vertical lines)
+ 1 // cyBorder (thickness of horizontal lines)
+END
diff --git a/src/VBox/GuestHost/OpenGL/error/errorspu_init.c b/src/VBox/GuestHost/OpenGL/error/errorspu_init.c
new file mode 100644
index 00000000..d2b04fdf
--- /dev/null
+++ b/src/VBox/GuestHost/OpenGL/error/errorspu_init.c
@@ -0,0 +1,62 @@
+/* Copyright (c) 2001, Stanford University
+ * All rights reserved
+ *
+ * See the file LICENSE.txt for information on redistributing this software.
+ */
+
+#include <stdio.h>
+#include "cr_spu.h"
+
+extern SPUNamedFunctionTable _cr_error_table[];
+
+static SPUFunctions error_functions = {
+ NULL, /* CHILD COPY */
+ NULL, /* DATA */
+ _cr_error_table /* THE ACTUAL FUNCTIONS */
+};
+
+static SPUFunctions *errorSPUInit( int id, SPU *child, SPU *self,
+ unsigned int context_id,
+ unsigned int num_contexts )
+{
+ (void) id;
+ (void) context_id;
+ (void) num_contexts;
+ (void) child;
+ (void) self;
+ return &error_functions;
+}
+
+static void errorSPUSelfDispatch(SPUDispatchTable *parent)
+{
+ (void)parent;
+}
+
+static int errorSPUCleanup(void)
+{
+ return 1;
+}
+
+static SPUOptions errorSPUOptions[] = {
+ { NULL, CR_BOOL, 0, NULL, NULL, NULL, NULL, NULL },
+};
+
+
+int SPULoad( char **name, char **super, SPUInitFuncPtr *init,
+ SPUSelfDispatchFuncPtr *self, SPUCleanupFuncPtr *cleanup,
+ SPUOptionsPtr *options, int *flags )
+{
+#ifdef IN_GUEST
+ *name = "error";
+#else
+ *name = "hosterror";
+#endif
+ *super = NULL;
+ *init = errorSPUInit;
+ *self = errorSPUSelfDispatch;
+ *cleanup = errorSPUCleanup;
+ *options = errorSPUOptions;
+ *flags = (SPU_NO_PACKER|SPU_NOT_TERMINAL|SPU_MAX_SERVERS_ZERO);
+
+ return 1;
+}