From ef6940f17220f1149dce6daf548bd0103d91a281 Mon Sep 17 00:00:00 2001 From: Brian Date: Sat, 27 Oct 2007 09:03:15 -0600 Subject: Move mesa_to_tgsi.[ch] to state_tracker --- src/mesa/sources | 4 +--- src/mesa/state_tracker/st_atom_shader.c | 2 +- src/mesa/state_tracker/st_cb_clear.c | 2 +- src/mesa/state_tracker/st_cb_drawpixels.c | 2 +- src/mesa/state_tracker/st_cb_program.c | 1 - src/mesa/state_tracker/st_mesa_to_tgsi.c | 37 ++++++++++++++++++++++++++-- src/mesa/state_tracker/st_mesa_to_tgsi.h | 40 ++++++++++++++++++++++++++----- src/mesa/state_tracker/st_program.c | 2 +- 8 files changed, 74 insertions(+), 16 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/sources b/src/mesa/sources index 6d1ba9b9bdc..30d3c32b836 100644 --- a/src/mesa/sources +++ b/src/mesa/sources @@ -186,8 +186,6 @@ TGSIEXEC_SOURCES = \ TGSIDECO_SOURCES = \ pipe/tgsi/deco/deco_caps.c -TGSIMESA_SOURCES = \ - pipe/tgsi/mesa/mesa_to_tgsi.c ifeq ($(MESA_LLVM),1) LLVMTGSI_SOURCES = \ @@ -235,6 +233,7 @@ STATETRACKER_SOURCES = \ state_tracker/st_debug.c \ state_tracker/st_draw.c \ state_tracker/st_format.c \ + state_tracker/st_mesa_to_tgsi.c \ state_tracker/st_program.c \ state_tracker/st_mipmap_tree.c @@ -389,7 +388,6 @@ SOLO_SOURCES = \ $(DRAW_SOURCES) \ $(TGSIEXEC_SOURCES) \ $(TGSIDECO_SOURCES) \ - $(TGSIMESA_SOURCES) \ $(STATECACHE_SOURCES) \ $(STATETRACKER_SOURCES) \ $(TNL_SOURCES) \ diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index 919461bcb8b..92ca22851ed 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -41,7 +41,6 @@ #include "main/mtypes.h" #include "pipe/p_context.h" -#include "pipe/tgsi/mesa/mesa_to_tgsi.h" #include "pipe/tgsi/exec/tgsi_core.h" #include "st_context.h" @@ -49,6 +48,7 @@ #include "st_atom.h" #include "st_program.h" #include "st_atom_shader.h" +#include "st_mesa_to_tgsi.h" /** diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 30672e0dd43..2c79e2890d1 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -43,13 +43,13 @@ #include "st_draw.h" #include "st_program.h" #include "st_public.h" +#include "st_mesa_to_tgsi.h" #include "pipe/p_context.h" #include "pipe/p_state.h" #include "pipe/p_defines.h" #include "pipe/p_winsys.h" -#include "pipe/tgsi/mesa/mesa_to_tgsi.h" diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 5d8890e0225..896ba2b905e 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -45,10 +45,10 @@ #include "st_cb_texture.h" #include "st_draw.h" #include "st_format.h" +#include "st_mesa_to_tgsi.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_winsys.h" -#include "pipe/tgsi/mesa/mesa_to_tgsi.h" #include "shader/prog_instruction.h" diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index 26609e96454..a330c1c9227 100644 --- a/src/mesa/state_tracker/st_cb_program.c +++ b/src/mesa/state_tracker/st_cb_program.c @@ -43,7 +43,6 @@ #include "st_program.h" #include "st_atom_shader.h" -#include "pipe/tgsi/mesa/tgsi_mesa.h" /** diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 2c33f26d480..131e50becea 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -1,6 +1,39 @@ +/************************************************************************** + * + * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +/* + * \author + * Michal Krol + */ + + #include "tgsi_platform.h" -#include "tgsi_mesa.h" -#include "pipe/tgsi/mesa/mesa_to_tgsi.h" +#include "pipe/tgsi/exec/tgsi_core.h" +#include "st_mesa_to_tgsi.h" #include "shader/prog_parameter.h" #define TGSI_DEBUG 0 diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h index 13372d75fd3..941a75ab058 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.h +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h @@ -1,9 +1,37 @@ -#if !defined MESA_TO_TGSI_H -#define MESA_TO_TGSI_H +/************************************************************************** + * + * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + + +#ifndef ST_MESA_TO_TGSI_H +#define ST_MESA_TO_TGSI_H #if defined __cplusplus extern "C" { -#endif // defined __cplusplus +#endif struct tgsi_token; @@ -25,8 +53,8 @@ tgsi_translate_mesa_program( #if defined __cplusplus -} // extern "C" -#endif // defined __cplusplus +} /* extern "C" */ +#endif -#endif // !defined MESA_TO_TGSI_H +#endif /* ST_MESA_TO_TGSI_H */ diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 9fc0798ec58..8c61815b9b6 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -37,7 +37,6 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/draw/draw_context.h" -#include "pipe/tgsi/mesa/mesa_to_tgsi.h" #include "pipe/tgsi/exec/tgsi_core.h" #include "pipe/llvm/llvmtgsi.h" @@ -45,6 +44,7 @@ #include "st_cache.h" #include "st_atom.h" #include "st_program.h" +#include "st_mesa_to_tgsi.h" #define TGSI_DEBUG 0 -- cgit v1.2.3