gallium/swr: fix corruptions in Unigine Heaven
[mesa.git] / src / gallium / drivers / swr / swr_screen.h
index a96dc44cf664849193bee48871310bdb1a8a4450..e66f5443357b40f75220ba96244754d557d2bac3 100644 (file)
 #ifndef SWR_SCREEN_H
 #define SWR_SCREEN_H
 
+#include "swr_resource.h"
+
 #include "pipe/p_screen.h"
 #include "pipe/p_defines.h"
+#include "util/u_dl.h"
+#include "util/format/u_format.h"
 #include "api.h"
 
+#include "memory/TilingFunctions.h"
+#include "memory/InitMemory.h"
+#include <stdio.h>
+#include <stdarg.h>
+
 struct sw_winsys;
 
 struct swr_screen {
    struct pipe_screen base;
+   struct pipe_context *pipe;
 
    struct pipe_fence_handle *flush_fence;
 
    struct sw_winsys *winsys;
 
+   /* Configurable environment settings */
+   bool msaa_force_enable;
+   uint8_t msaa_max_count;
+   uint32_t client_copy_limit;
+
    HANDLE hJitMgr;
+
+   /* Dynamic backend implementations */
+   util_dl_library *pLibrary;
+   PFNSwrGetInterface pfnSwrGetInterface;
+   PFNSwrGetTileInterface pfnSwrGetTileInterface;
+
+   /* Do we run on Xeon Phi? */
+   bool is_knl;
 };
 
 static INLINE struct swr_screen *
@@ -49,4 +72,15 @@ swr_screen(struct pipe_screen *pipe)
 SWR_FORMAT
 mesa_to_swr_format(enum pipe_format format);
 
+INLINE void swr_print_info(const char *format, ...)
+{
+   static bool print_info = debug_get_bool_option("SWR_PRINT_INFO", false);
+   if(print_info) {
+      va_list args;
+      va_start(args, format);
+      vfprintf(stderr, format, args);
+      va_end(args);
+   }
+}
+
 #endif