swr: Handle windows.h and NOMINMAX
authorGeorge Kyriazis <george.kyriazis@intel.com>
Fri, 11 Nov 2016 17:44:05 +0000 (11:44 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Mon, 21 Nov 2016 18:44:46 +0000 (12:44 -0600)
Reorder header files so that we have a chance to defined NOMINMAX before
mesa include files include windows.h

v3: split from bigger patch

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/drivers/swr/swr_context.cpp
src/gallium/drivers/swr/swr_context.h
src/gallium/drivers/swr/swr_screen.cpp

index a5ab2362e55abaf228d6eeaf7a6922f9f1711b04..3f5771219f66354a0b071951d51dc9f449e823d5 100644 (file)
  * IN THE SOFTWARE.
  ***************************************************************************/
 
+#include "swr_context.h"
+#include "swr_memory.h"
+#include "swr_screen.h"
+#include "swr_resource.h"
+#include "swr_scratch.h"
+#include "swr_query.h"
+#include "swr_fence.h"
+
 #include "util/u_memory.h"
 #include "util/u_inlines.h"
 #include "util/u_format.h"
@@ -31,14 +39,6 @@ extern "C" {
 #include "util/u_surface.h"
 }
 
-#include "swr_context.h"
-#include "swr_memory.h"
-#include "swr_screen.h"
-#include "swr_resource.h"
-#include "swr_scratch.h"
-#include "swr_query.h"
-#include "swr_fence.h"
-
 #include "api.h"
 #include "backend.h"
 
index eecfe0d40def300d0f86dca6d129c1ffdf1c3d75..04e11fe78a8af9f5110d2edfbb96577dff39482c 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef SWR_CONTEXT_H
 #define SWR_CONTEXT_H
 
+#include "common/os.h"
+
 #include "pipe/p_context.h"
 #include "pipe/p_state.h"
 #include "util/u_blitter.h"
index 0c8f5dbd54bcdb103ccfdb37a9e0c4d00af0f2e2..cc79f28bad11bb3b6e8f7291b69b4099bb92842e 100644 (file)
  * IN THE SOFTWARE.
  ***************************************************************************/
 
+#include "swr_context.h"
+#include "swr_public.h"
+#include "swr_screen.h"
+#include "swr_resource.h"
+#include "swr_fence.h"
+#include "gen_knobs.h"
+
 #include "pipe/p_screen.h"
 #include "pipe/p_defines.h"
 #include "util/u_memory.h"
@@ -35,13 +42,6 @@ extern "C" {
 #include "gallivm/lp_bld_limits.h"
 }
 
-#include "swr_public.h"
-#include "swr_screen.h"
-#include "swr_context.h"
-#include "swr_resource.h"
-#include "swr_fence.h"
-#include "gen_knobs.h"
-
 #include "jit_api.h"
 
 #include <stdio.h>
@@ -1023,14 +1023,3 @@ swr_create_screen(struct sw_winsys *winsys)
    return &screen->base;
 }
 
-struct sw_winsys *
-swr_get_winsys(struct pipe_screen *pipe)
-{
-   return ((struct swr_screen *)pipe)->winsys;
-}
-
-struct sw_displaytarget *
-swr_get_displaytarget(struct pipe_resource *resource)
-{
-   return ((struct swr_resource *)resource)->display_target;
-}