summaryrefslogtreecommitdiff
path: root/progs/fp
diff options
context:
space:
mode:
Diffstat (limited to 'progs/fp')
-rwxr-xr-x[-rw-r--r--]progs/fp/Makefile16
-rw-r--r--progs/fp/add-swz.txt5
-rw-r--r--progs/fp/fp-tri.c4
-rw-r--r--progs/fp/mul-swz.txt3
-rw-r--r--progs/fp/negate.txt6
-rwxr-xr-xprogs/fp/run.sh7
6 files changed, 32 insertions, 9 deletions
diff --git a/progs/fp/Makefile b/progs/fp/Makefile
index 65b2cc118a..ef6644cce2 100644..100755
--- a/progs/fp/Makefile
+++ b/progs/fp/Makefile
@@ -8,7 +8,7 @@ TOP = ../..
include $(TOP)/configs/current
-LIBS = $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
SOURCES = \
tri-tex.c \
@@ -40,7 +40,7 @@ UTIL_FILES = readtex.h readtex.c
.SUFFIXES: .c
.c:
- $(APP_CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
+ $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
.c.o:
$(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
@@ -54,9 +54,9 @@ UTIL_FILES = readtex.h readtex.c
default: $(UTIL_FILES) $(PROGS)
clean:
- rm -f $(PROGS)
- rm -f *.o
- rm -f getproclist.h
+ -rm -f $(PROGS)
+ -rm -f *.o
+ -rm -f getproclist.h
# auto code generation
@@ -67,13 +67,15 @@ getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.
texrect: texrect.o readtex.o
- $(APP_CC) texrect.o readtex.o $(LIBS) -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
+# $(APP_CC) texrect.o readtex.o $(LIBS) -o $@
texrect.o: texrect.c readtex.h
$(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
invert: invert.o readtex.o
- $(APP_CC) invert.o readtex.o $(LIBS) -o $@
+ $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
+# $(APP_CC) invert.o readtex.o $(LIBS) -o $@
invert.o: invert.c readtex.h
$(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
diff --git a/progs/fp/add-swz.txt b/progs/fp/add-swz.txt
new file mode 100644
index 0000000000..5ec51bcb84
--- /dev/null
+++ b/progs/fp/add-swz.txt
@@ -0,0 +1,5 @@
+!!ARBfp1.0
+TEMP R0;
+ADD R0, fragment.color, fragment.color;
+ADD result.color, R0.xxxx, R0;
+END
diff --git a/progs/fp/fp-tri.c b/progs/fp/fp-tri.c
index 2512e824ee..843f897871 100644
--- a/progs/fp/fp-tri.c
+++ b/progs/fp/fp-tri.c
@@ -156,11 +156,11 @@ int main(int argc, char **argv)
glutInitWindowPosition(0, 0);
glutInitWindowSize(250, 250);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH);
- glutCreateWindow(argv[0]);
+ args(argc, argv);
+ glutCreateWindow(filename);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);
- args(argc, argv);
Init();
if (show_fps) {
signal(SIGALRM, alarmhandler);
diff --git a/progs/fp/mul-swz.txt b/progs/fp/mul-swz.txt
new file mode 100644
index 0000000000..7ef2f58633
--- /dev/null
+++ b/progs/fp/mul-swz.txt
@@ -0,0 +1,3 @@
+!!ARBfp1.0
+MUL result.color, fragment.color.zyxw, fragment.color;
+END
diff --git a/progs/fp/negate.txt b/progs/fp/negate.txt
new file mode 100644
index 0000000000..3d00a04a58
--- /dev/null
+++ b/progs/fp/negate.txt
@@ -0,0 +1,6 @@
+!!ARBfp1.0
+# this should result in fragment color passing through unchanged
+TEMP R0;
+ADD R0, fragment.color, fragment.color;
+ADD result.color, R0, -fragment.color;
+END
diff --git a/progs/fp/run.sh b/progs/fp/run.sh
new file mode 100755
index 0000000000..480f8108a3
--- /dev/null
+++ b/progs/fp/run.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i in *.txt ; do
+echo $i
+./fp-tri $i
+done
+