summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/Makefile.template4
-rw-r--r--src/mesa/drivers/dri/i915pipe/Makefile3
-rw-r--r--src/mesa/pipe/Makefile4
-rw-r--r--src/mesa/pipe/Makefile.template58
-rw-r--r--src/mesa/pipe/softpipe/Makefile45
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c1
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_setup.h2
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_fs.c2
-rw-r--r--src/mesa/sources26
-rw-r--r--src/mesa/vf/vf.h2
10 files changed, 114 insertions, 33 deletions
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index 43c0e912bf2..00b09613ec2 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -73,9 +73,9 @@ SHARED_INCLUDES = \
default: depend symlinks $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
-$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
+$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
$(TOP)/bin/mklib -noprefix -o $@ \
- $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
+ $(OBJECTS) $(PIPE_DRIVERS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
diff --git a/src/mesa/drivers/dri/i915pipe/Makefile b/src/mesa/drivers/dri/i915pipe/Makefile
index bf801f4bddd..8cc8d912644 100644
--- a/src/mesa/drivers/dri/i915pipe/Makefile
+++ b/src/mesa/drivers/dri/i915pipe/Makefile
@@ -6,6 +6,9 @@ LIBNAME = i915tex_dri.so
MINIGLX_SOURCES = server/intel_dri.c
+PIPE_DRIVERS = \
+ $(TOP)/src/mesa/pipe/softpipe/libsoftpipe.a
+
DRIVER_SOURCES = \
intel_regions.c \
intel_buffer_objects.c \
diff --git a/src/mesa/pipe/Makefile b/src/mesa/pipe/Makefile
index 451911a3545..ab7e09c9918 100644
--- a/src/mesa/pipe/Makefile
+++ b/src/mesa/pipe/Makefile
@@ -1,2 +1,6 @@
default:
cd .. ; make
+ cd softpipe ; make
+
+clean:
+ rm -f `find . -name \*.[oa]` \ No newline at end of file
diff --git a/src/mesa/pipe/Makefile.template b/src/mesa/pipe/Makefile.template
new file mode 100644
index 00000000000..7c64981d7b0
--- /dev/null
+++ b/src/mesa/pipe/Makefile.template
@@ -0,0 +1,58 @@
+# -*-makefile-*-
+
+
+# We still have a dependency on the "dri" buffer manager. Most likely
+# the interface can be reused in non-dri environments, and also as a
+# frontend to simpler memory managers.
+#
+COMMON_SOURCES =
+
+OBJECTS = $(C_SOURCES:.c=.o) \
+ $(ASM_SOURCES:.S=.o)
+
+
+### Include directories
+INCLUDES = \
+ -I. \
+ -I$(TOP)/src/mesa/drivers/dri/common \
+ -I$(TOP)/src/mesa/main \
+ -I$(TOP)/src/mesa/pipe \
+ -I$(TOP)/src/mesa
+
+
+##### RULES #####
+
+.c.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
+
+.S.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
+
+
+##### TARGETS #####
+
+default:: depend symlinks $(LIBNAME)
+
+
+$(LIBNAME): $(OBJECTS) Makefile $(TOP)/src/mesa/pipe/Makefile.template
+ $(TOP)/bin/mklib -o $@ -static $(OBJECTS)
+
+
+depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
+ touch depend
+ $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
+ $(ASM_SOURCES) 2> /dev/null
+
+
+# Emacs tags
+tags:
+ etags `find . -name \*.[ch]` `find ../include`
+
+
+# Remove .o and backup files
+clean:
+ -rm -f *.o */*.o *~ *.so *~ server/*.o $(SYMLINKS)
+ -rm -f depend depend.bak
+
+
+include depend
diff --git a/src/mesa/pipe/softpipe/Makefile b/src/mesa/pipe/softpipe/Makefile
index 12a8bd0409e..947983baf07 100644
--- a/src/mesa/pipe/softpipe/Makefile
+++ b/src/mesa/pipe/softpipe/Makefile
@@ -1,3 +1,44 @@
-default:
- cd ../.. ; make
+TOP = ../../../..
+include $(TOP)/configs/current
+
+LIBNAME = softpipe
+
+DRIVER_SOURCES = \
+ sp_clear.c \
+ sp_context.c \
+ sp_prim_setup.c \
+ sp_quad.c \
+ sp_quad_alpha_test.c \
+ sp_quad_blend.c \
+ sp_quad_bufloop.c \
+ sp_quad_colormask.c \
+ sp_quad_coverage.c \
+ sp_quad_depth_test.c \
+ sp_quad_fs.c \
+ sp_quad_occlusion.c \
+ sp_quad_output.c \
+ sp_quad_stencil.c \
+ sp_quad_stipple.c \
+ sp_region.c \
+ sp_state_blend.c \
+ sp_state_clip.c \
+ sp_state_derived.c \
+ sp_state_fs.c \
+ sp_state_sampler.c \
+ sp_state_setup.c \
+ sp_state_surface.c \
+ sp_surface.c
+
+C_SOURCES = \
+ $(COMMON_SOURCES) \
+ $(DRIVER_SOURCES)
+
+ASM_SOURCES =
+
+include ../Makefile.template
+
+symlinks:
+
+default::
+ cd ../.. ; make
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 002fe73b59d..434e18308ab 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -157,6 +157,7 @@ struct pipe_context *softpipe_create( void )
* Create drawing context and plug our rendering stage into it.
*/
softpipe->draw = draw_create();
+ assert(softpipe->draw);
draw_set_setup_stage(softpipe->draw, sp_draw_render_stage(softpipe));
sp_init_region_functions(softpipe);
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.h b/src/mesa/pipe/softpipe/sp_prim_setup.h
index e5abefcd499..0180454a8d2 100644
--- a/src/mesa/pipe/softpipe/sp_prim_setup.h
+++ b/src/mesa/pipe/softpipe/sp_prim_setup.h
@@ -41,8 +41,8 @@
#include "imports.h"
#if 0
#include "s_tri_public.h"
-#endif
#include "s_context.h"
+#endif
extern struct draw_stage *sp_draw_render_stage( struct softpipe_context *softpipe );
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c
index d4acf402ce7..1676d47d51b 100644
--- a/src/mesa/pipe/softpipe/sp_quad_fs.c
+++ b/src/mesa/pipe/softpipe/sp_quad_fs.c
@@ -37,7 +37,7 @@
#include "sp_context.h"
#include "sp_headers.h"
#include "sp_quad.h"
-#include "core/tgsi_core.h"
+#include "tgsi/core/tgsi_core.h"
#if defined __GNUC__
#define ALIGNED_ATTRIBS 1
diff --git a/src/mesa/sources b/src/mesa/sources
index 3b820b71f0e..d9ee7266e54 100644
--- a/src/mesa/sources
+++ b/src/mesa/sources
@@ -154,31 +154,6 @@ VF_SOURCES = \
vf/vf_generic.c \
vf/vf_sse.c
-SOFTPIPE_SOURCES = \
- pipe/softpipe/sp_clear.c \
- pipe/softpipe/sp_context.c \
- pipe/softpipe/sp_region.c \
- pipe/softpipe/sp_quad.c \
- pipe/softpipe/sp_quad_alpha_test.c \
- pipe/softpipe/sp_quad_blend.c \
- pipe/softpipe/sp_quad_bufloop.c \
- pipe/softpipe/sp_quad_colormask.c \
- pipe/softpipe/sp_quad_coverage.c \
- pipe/softpipe/sp_quad_depth_test.c \
- pipe/softpipe/sp_quad_fs.c \
- pipe/softpipe/sp_quad_occlusion.c \
- pipe/softpipe/sp_quad_output.c \
- pipe/softpipe/sp_quad_stipple.c \
- pipe/softpipe/sp_quad_stencil.c \
- pipe/softpipe/sp_state_blend.c \
- pipe/softpipe/sp_state_clip.c \
- pipe/softpipe/sp_state_derived.c \
- pipe/softpipe/sp_state_fs.c \
- pipe/softpipe/sp_state_sampler.c \
- pipe/softpipe/sp_state_setup.c \
- pipe/softpipe/sp_state_surface.c \
- pipe/softpipe/sp_surface.c \
- pipe/softpipe/sp_prim_setup.c
DRAW_SOURCES = \
pipe/draw/draw_clip.c \
@@ -367,7 +342,6 @@ SOLO_SOURCES = \
$(MATH_SOURCES) \
$(VBO_SOURCES) \
$(VF_SOURCES) \
- $(SOFTPIPE_SOURCES) \
$(DRAW_SOURCES) \
$(TGSICORE_SOURCES) \
$(TGSIMESA_SOURCES) \
diff --git a/src/mesa/vf/vf.h b/src/mesa/vf/vf.h
index fc988b9fb9a..8ca3ab6d4a6 100644
--- a/src/mesa/vf/vf.h
+++ b/src/mesa/vf/vf.h
@@ -29,7 +29,7 @@
#define VF_VERTEX_H
#include "mtypes.h"
-#include "m_vector.h"
+#include "math/m_vector.h"
enum {
VF_ATTRIB_POS = 0,