diff options
Diffstat (limited to 'progs/fp')
-rw-r--r-- | progs/fp/.gitignore | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | progs/fp/Makefile | 10 | ||||
-rw-r--r-- | progs/fp/add-swz.txt | 5 | ||||
-rw-r--r-- | progs/fp/fp-tri.c | 2 | ||||
-rw-r--r-- | progs/fp/local.txt | 11 | ||||
-rw-r--r-- | progs/fp/mul-swz.txt | 3 | ||||
-rw-r--r-- | progs/fp/negate.txt | 6 |
7 files changed, 30 insertions, 8 deletions
diff --git a/progs/fp/.gitignore b/progs/fp/.gitignore index b265f1fed7..aa51f76c9b 100644 --- a/progs/fp/.gitignore +++ b/progs/fp/.gitignore @@ -40,3 +40,4 @@ tri-swz tri-swz2 tri-tex tri-xpd +fp-tri diff --git a/progs/fp/Makefile b/progs/fp/Makefile index ab43cde4f3..ef6644cce2 100644..100755 --- a/progs/fp/Makefile +++ b/progs/fp/Makefile @@ -67,21 +67,15 @@ getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress. texrect: texrect.o readtex.o -<<<<<<< HEAD:progs/fp/Makefile $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@ -======= - $(APP_CC) texrect.o readtex.o $(LIBS) -o $@ ->>>>>>> origin/gallium-0.1:progs/fp/Makefile +# $(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 -<<<<<<< HEAD:progs/fp/Makefile $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@ -======= - $(APP_CC) invert.o readtex.o $(LIBS) -o $@ ->>>>>>> origin/gallium-0.1:progs/fp/Makefile +# $(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 c07cfa2076..843f897871 100644 --- a/progs/fp/fp-tri.c +++ b/progs/fp/fp-tri.c @@ -130,6 +130,8 @@ static void Display(void) { glClear(GL_COLOR_BUFFER_BIT); + glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 0, 1.0, 1.0, 0.0, 0.0); + glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 1, 0.0, 0.0, 1.0, 1.0); glBegin(GL_TRIANGLES); glColor3f(0,0,1); glVertex3f( 0.9, -0.9, -30.0); diff --git a/progs/fp/local.txt b/progs/fp/local.txt new file mode 100644 index 0000000000..6cb2a2f13c --- /dev/null +++ b/progs/fp/local.txt @@ -0,0 +1,11 @@ +!!ARBfp1.0 +TEMP R0; +PARAM c[4] = { { 0, 0, 0, 0 }, + program.local[0..1], + { 1, 1, 1, 1 } }; +MOV R0, c[1]; +SUB R0, R0, c[0]; +ADD R0, R0, c[2]; +MUL R0, R0, c[3]; +MOV result.color, R0; +END 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 |