[Mesa-dev] [PATCH v5 05/11] swr: Handle windows.h and NOMINMAX

George Kyriazis george.kyriazis at intel.com
Fri Nov 18 20:38:41 UTC 2016


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 at collabora.com>
---
 src/gallium/drivers/swr/swr_context.cpp | 16 ++++++++--------
 src/gallium/drivers/swr/swr_context.h   |  2 ++
 src/gallium/drivers/swr/swr_screen.cpp  | 25 +++++++------------------
 3 files changed, 17 insertions(+), 26 deletions(-)

diff --git a/src/gallium/drivers/swr/swr_context.cpp b/src/gallium/drivers/swr/swr_context.cpp
index a5ab236..3f57712 100644
--- a/src/gallium/drivers/swr/swr_context.cpp
+++ b/src/gallium/drivers/swr/swr_context.cpp
@@ -21,6 +21,14 @@
  * 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"
 
diff --git a/src/gallium/drivers/swr/swr_context.h b/src/gallium/drivers/swr/swr_context.h
index eecfe0d..04e11fe 100644
--- a/src/gallium/drivers/swr/swr_context.h
+++ b/src/gallium/drivers/swr/swr_context.h
@@ -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"
diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp
index 0c8f5db..cc79f28 100644
--- a/src/gallium/drivers/swr/swr_screen.cpp
+++ b/src/gallium/drivers/swr/swr_screen.cpp
@@ -21,6 +21,13 @@
  * 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;
-}
-- 
2.10.0.windows.1



More information about the mesa-dev mailing list