Compare commits
No commits in common. 'c9' and 'cs10' have entirely different histories.
@ -1,2 +1 @@
|
||||
SOURCES/mesa-demos-20210504.tar.bz2
|
||||
SOURCES/xdriinfo-1.0.4.tar.bz2
|
||||
SOURCES/mesa-demos-9.0.0.tar.xz
|
||||
|
@ -1,2 +1 @@
|
||||
1fc5c1a035d1adf024c1371de2709748074786d2 SOURCES/mesa-demos-20210504.tar.bz2
|
||||
723482b3fc627d7cc6124fec43dd1c21d102daaa SOURCES/xdriinfo-1.0.4.tar.bz2
|
||||
fad7fab5acae45312fccbe19f33218ce34980654 SOURCES/mesa-demos-9.0.0.tar.xz
|
||||
|
@ -1,19 +0,0 @@
|
||||
diff -up mesa-demos-6eef979a5488dab01088412f88374b2ea9d615cd/src/demos/Makefile.am.legal mesa-demos-6eef979a5488dab01088412f88374b2ea9d615cd/src/demos/Makefile.am
|
||||
--- mesa-demos-6eef979a5488dab01088412f88374b2ea9d615cd/src/demos/Makefile.am.legal 2013-01-08 11:24:38.805867866 -0500
|
||||
+++ mesa-demos-6eef979a5488dab01088412f88374b2ea9d615cd/src/demos/Makefile.am 2013-01-08 11:24:44.975870107 -0500
|
||||
@@ -65,7 +65,6 @@ bin_PROGRAMS = \
|
||||
multiarb \
|
||||
paltex \
|
||||
pixeltest \
|
||||
- pointblast \
|
||||
projtex \
|
||||
ray \
|
||||
readpix \
|
||||
@@ -74,7 +73,6 @@ bin_PROGRAMS = \
|
||||
shadowtex \
|
||||
singlebuffer \
|
||||
spectex \
|
||||
- spriteblast \
|
||||
stex3d \
|
||||
teapot \
|
||||
terrain \
|
@ -0,0 +1,28 @@
|
||||
diff --git a/src/demos/meson.build b/src/demos/meson.build
|
||||
index 8f01036b..929f5405 100644
|
||||
--- a/src/demos/meson.build
|
||||
+++ b/src/demos/meson.build
|
||||
@@ -28,7 +28,6 @@ progs = [
|
||||
'copypix',
|
||||
'cubemap',
|
||||
'cuberender',
|
||||
- 'dinoshade',
|
||||
'dissolve',
|
||||
'drawpix',
|
||||
'engine',
|
||||
@@ -52,7 +51,6 @@ progs = [
|
||||
'multiarb',
|
||||
'paltex',
|
||||
'pixeltest',
|
||||
- 'pointblast',
|
||||
'projtex',
|
||||
'ray',
|
||||
'readpix',
|
||||
@@ -61,7 +59,6 @@ progs = [
|
||||
'shadowtex',
|
||||
'singlebuffer',
|
||||
'spectex',
|
||||
- 'spriteblast',
|
||||
'stex3d',
|
||||
'teapot',
|
||||
'terrain',
|
@ -1,13 +0,0 @@
|
||||
diff -up mesa-demos-8.1.0/configure.ac.jx mesa-demos-8.1.0/configure.ac
|
||||
--- mesa-demos-8.1.0/configure.ac.jx 2013-02-24 05:49:47.000000000 -0500
|
||||
+++ mesa-demos-8.1.0/configure.ac 2013-03-27 14:41:42.493936005 -0400
|
||||
@@ -267,6 +267,9 @@ cygwin*)
|
||||
;;
|
||||
esac
|
||||
|
||||
+dnl i am somewhat surprised this works
|
||||
+DEMO_LIBS="-Wl,--as-needed $DEMO_LIBS"
|
||||
+
|
||||
AC_SUBST([DEMO_CFLAGS])
|
||||
AC_SUBST([DEMO_LIBS])
|
||||
AC_SUBST([EGL_CFLAGS])
|
@ -0,0 +1,209 @@
|
||||
diff --git a/src/glsl/bezier.c b/src/glsl/bezier.c
|
||||
index 84e0367..62996fb 100644
|
||||
--- a/src/glsl/bezier.c
|
||||
+++ b/src/glsl/bezier.c
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "glut_wrap.h"
|
||||
#include "shaderutil.h"
|
||||
|
||||
-static const char *filename = "bezier.geom";
|
||||
+static const char *filename = DEMOS_DATA_DIR "bezier.geom";
|
||||
|
||||
static GLuint fragShader;
|
||||
static GLuint vertShader;
|
||||
diff --git a/src/glsl/blinking-teapot.c b/src/glsl/blinking-teapot.c
|
||||
index 62451e9..3420066 100644
|
||||
--- a/src/glsl/blinking-teapot.c
|
||||
+++ b/src/glsl/blinking-teapot.c
|
||||
@@ -63,8 +63,8 @@ init_opengl (void)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
- vshad_id = CompileShaderFile (GL_VERTEX_SHADER, "blinking-teapot.vert");
|
||||
- fshad_id = CompileShaderFile (GL_FRAGMENT_SHADER, "blinking-teapot.frag");
|
||||
+ vshad_id = CompileShaderFile (GL_VERTEX_SHADER, DEMOS_DATA_DIR "blinking-teapot.vert");
|
||||
+ fshad_id = CompileShaderFile (GL_FRAGMENT_SHADER, DEMOS_DATA_DIR "blinking-teapot.frag");
|
||||
prog_id = LinkShaders (vshad_id, fshad_id);
|
||||
|
||||
glUseProgram (prog_id);
|
||||
diff --git a/src/glsl/brick.c b/src/glsl/brick.c
|
||||
index 00d8349..f9f0ec7 100644
|
||||
--- a/src/glsl/brick.c
|
||||
+++ b/src/glsl/brick.c
|
||||
@@ -14,8 +14,8 @@
|
||||
#include "shaderutil.h"
|
||||
|
||||
|
||||
-static char *FragProgFile = "CH06-brick.frag";
|
||||
-static char *VertProgFile = "CH06-brick.vert";
|
||||
+static char *FragProgFile = DEMOS_DATA_DIR "CH06-brick.frag";
|
||||
+static char *VertProgFile = DEMOS_DATA_DIR "CH06-brick.vert";
|
||||
|
||||
/* program/shader objects */
|
||||
static GLuint fragShader;
|
||||
diff --git a/src/glsl/bump.c b/src/glsl/bump.c
|
||||
index 95ad19f..f40cba0 100644
|
||||
--- a/src/glsl/bump.c
|
||||
+++ b/src/glsl/bump.c
|
||||
@@ -15,9 +15,9 @@
|
||||
#include "readtex.h"
|
||||
|
||||
|
||||
-static char *FragProgFile = "CH11-bumpmap.frag";
|
||||
-static char *FragTexProgFile = "CH11-bumpmaptex.frag";
|
||||
-static char *VertProgFile = "CH11-bumpmap.vert";
|
||||
+static char *FragProgFile = DEMOS_DATA_DIR "CH11-bumpmap.frag";
|
||||
+static char *FragTexProgFile = DEMOS_DATA_DIR "CH11-bumpmaptex.frag";
|
||||
+static char *VertProgFile = DEMOS_DATA_DIR "CH11-bumpmap.vert";
|
||||
static char *TextureFile = DEMOS_DATA_DIR "tile.rgb";
|
||||
|
||||
/* program/shader objects */
|
||||
diff --git a/src/glsl/convolutions.c b/src/glsl/convolutions.c
|
||||
index 567b358..4c681dd 100644
|
||||
--- a/src/glsl/convolutions.c
|
||||
+++ b/src/glsl/convolutions.c
|
||||
@@ -340,7 +340,7 @@ static void init(void)
|
||||
|
||||
menuInit();
|
||||
readTexture(textureLocation);
|
||||
- createProgram("convolution.vert", "convolution.frag");
|
||||
+ createProgram(DEMOS_DATA_DIR "convolution.vert", DEMOS_DATA_DIR "convolution.frag");
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glClearColor(1.0, 1.0, 1.0, 1.0);
|
||||
diff --git a/src/glsl/mandelbrot.c b/src/glsl/mandelbrot.c
|
||||
index 18b817c..6bbeffd 100644
|
||||
--- a/src/glsl/mandelbrot.c
|
||||
+++ b/src/glsl/mandelbrot.c
|
||||
@@ -14,8 +14,8 @@
|
||||
#include "shaderutil.h"
|
||||
|
||||
|
||||
-static char *FragProgFile = "CH18-mandel.frag";
|
||||
-static char *VertProgFile = "CH18-mandel.vert";
|
||||
+static char *FragProgFile = DEMOS_DATA_DIR "CH18-mandel.frag";
|
||||
+static char *VertProgFile = DEMOS_DATA_DIR "CH18-mandel.vert";
|
||||
|
||||
/* program/shader objects */
|
||||
static GLuint fragShader;
|
||||
diff --git a/src/glsl/meson.build b/src/glsl/meson.build
|
||||
index db8c613..13564a4 100644
|
||||
--- a/src/glsl/meson.build
|
||||
+++ b/src/glsl/meson.build
|
||||
@@ -83,3 +83,38 @@ executable(
|
||||
],
|
||||
install: true
|
||||
)
|
||||
+
|
||||
+glsl_data = [
|
||||
+ 'bezier.geom',
|
||||
+ 'blinking-teapot.frag',
|
||||
+ 'blinking-teapot.vert',
|
||||
+ 'brick.shtest',
|
||||
+ 'CH06-brick.frag',
|
||||
+ 'CH06-brick.vert',
|
||||
+ 'CH11-bumpmap.frag',
|
||||
+ 'CH11-bumpmaptex.frag',
|
||||
+ 'CH11-bumpmap.vert',
|
||||
+ 'CH11-toyball.frag',
|
||||
+ 'CH11-toyball.vert',
|
||||
+ 'CH18-mandel.frag',
|
||||
+ 'CH18-mandel.vert',
|
||||
+ 'convolution.frag',
|
||||
+ 'convolution.vert',
|
||||
+ 'cubemap.frag',
|
||||
+ 'mandelbrot.shtest',
|
||||
+ 'multitex.frag',
|
||||
+ 'multitex.shtest',
|
||||
+ 'multitex.vert',
|
||||
+ 'reflect.vert',
|
||||
+ 'shadowtex.frag',
|
||||
+ 'simple.vert',
|
||||
+ 'simplex-noise.glsl',
|
||||
+ 'skinning.frag',
|
||||
+ 'skinning.vert',
|
||||
+ 'toyball.shtest',
|
||||
+]
|
||||
+
|
||||
+install_data(
|
||||
+ glsl_data,
|
||||
+ install_dir: get_option('datadir') / 'mesa-demos'
|
||||
+)
|
||||
diff --git a/src/glsl/multitex.c b/src/glsl/multitex.c
|
||||
index 2f9a2fa..b51aba3 100644
|
||||
--- a/src/glsl/multitex.c
|
||||
+++ b/src/glsl/multitex.c
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
static const char *Demo = "multitex";
|
||||
|
||||
-static const char *VertFile = "multitex.vert";
|
||||
-static const char *FragFile = "multitex.frag";
|
||||
+static const char *VertFile = DEMOS_DATA_DIR "multitex.vert";
|
||||
+static const char *FragFile = DEMOS_DATA_DIR "multitex.frag";
|
||||
|
||||
static const char *TexFiles[2] =
|
||||
{
|
||||
diff --git a/src/glsl/simplex-noise.c b/src/glsl/simplex-noise.c
|
||||
index a687508..9a2a029 100644
|
||||
--- a/src/glsl/simplex-noise.c
|
||||
+++ b/src/glsl/simplex-noise.c
|
||||
@@ -169,7 +169,7 @@ SpecialKey(int key, int x, int y)
|
||||
static void
|
||||
Init(void)
|
||||
{
|
||||
- const char *filename = "simplex-noise.glsl";
|
||||
+ const char *filename = DEMOS_DATA_DIR "simplex-noise.glsl";
|
||||
char noiseText[10000];
|
||||
FILE *f;
|
||||
int len;
|
||||
diff --git a/src/glsl/skinning.c b/src/glsl/skinning.c
|
||||
index b451d13..0f4e943 100644
|
||||
--- a/src/glsl/skinning.c
|
||||
+++ b/src/glsl/skinning.c
|
||||
@@ -20,8 +20,8 @@
|
||||
#define M_PI 3.1415926535
|
||||
#endif
|
||||
|
||||
-static char *FragProgFile = "skinning.frag";
|
||||
-static char *VertProgFile = "skinning.vert";
|
||||
+static char *FragProgFile = DEMOS_DATA_DIR "skinning.frag";
|
||||
+static char *VertProgFile = DEMOS_DATA_DIR "skinning.vert";
|
||||
|
||||
/* program/shader objects */
|
||||
static GLuint fragShader;
|
||||
diff --git a/src/glsl/texdemo1.c b/src/glsl/texdemo1.c
|
||||
index 861d696..42308d1 100644
|
||||
--- a/src/glsl/texdemo1.c
|
||||
+++ b/src/glsl/texdemo1.c
|
||||
@@ -35,11 +35,11 @@
|
||||
|
||||
static const char *Demo = "texdemo1";
|
||||
|
||||
-static const char *ReflectVertFile = "reflect.vert";
|
||||
-static const char *CubeFragFile = "cubemap.frag";
|
||||
+static const char *ReflectVertFile = DEMOS_DATA_DIR "reflect.vert";
|
||||
+static const char *CubeFragFile = DEMOS_DATA_DIR "cubemap.frag";
|
||||
|
||||
-static const char *SimpleVertFile = "simple.vert";
|
||||
-static const char *SimpleTexFragFile = "shadowtex.frag";
|
||||
+static const char *SimpleVertFile = DEMOS_DATA_DIR "simple.vert";
|
||||
+static const char *SimpleTexFragFile = DEMOS_DATA_DIR "shadowtex.frag";
|
||||
|
||||
static const char *GroundImage = DEMOS_DATA_DIR "tile.rgb";
|
||||
|
||||
diff --git a/src/glsl/toyball.c b/src/glsl/toyball.c
|
||||
index 17aa765..5b1f7d3 100644
|
||||
--- a/src/glsl/toyball.c
|
||||
+++ b/src/glsl/toyball.c
|
||||
@@ -14,8 +14,8 @@
|
||||
#include "shaderutil.h"
|
||||
|
||||
|
||||
-static char *FragProgFile = "CH11-toyball.frag";
|
||||
-static char *VertProgFile = "CH11-toyball.vert";
|
||||
+static char *FragProgFile = DEMOS_DATA_DIR "CH11-toyball.frag";
|
||||
+static char *VertProgFile = DEMOS_DATA_DIR "CH11-toyball.vert";
|
||||
|
||||
/* program/shader objects */
|
||||
static GLuint fragShader;
|
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Usage: ./make-git-snapshot.sh [COMMIT]
|
||||
#
|
||||
# to make a snapshot of the given tag/branch. Defaults to HEAD.
|
||||
# Point env var REF to a local mesa repo to reduce clone time.
|
||||
|
||||
DIRNAME=mesa-demos-$( date +%Y%m%d )
|
||||
|
||||
echo REF ${REF:+--reference $REF}
|
||||
echo DIRNAME $DIRNAME
|
||||
echo HEAD ${1:-HEAD}
|
||||
|
||||
rm -rf $DIRNAME
|
||||
|
||||
git clone ${REF:+--reference $REF} \
|
||||
git://git.freedesktop.org/git/mesa/demos $DIRNAME
|
||||
|
||||
GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \
|
||||
| bzip2 > $DIRNAME.tar.bz2
|
||||
|
||||
# rm -rf $DIRNAME
|
@ -1,54 +0,0 @@
|
||||
diff -up xdriinfo-1.0.4/xdriinfo.c~ xdriinfo-1.0.4/xdriinfo.c
|
||||
--- xdriinfo-1.0.4/xdriinfo.c~ 2009-10-16 23:39:10.000000000 +0200
|
||||
+++ xdriinfo-1.0.4/xdriinfo.c 2017-03-13 12:01:53.419636100 +0100
|
||||
@@ -101,23 +101,9 @@ int main (int argc, char *argv[]) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
- /* if the argument to the options command is a driver name, we can handle
|
||||
- * it without opening an X connection */
|
||||
- if (func == OPTIONS && screenNum == -1) {
|
||||
- const char *options = (*GetDriverConfig) (funcArg);
|
||||
- if (!options) {
|
||||
- fprintf (stderr,
|
||||
- "Driver \"%s\" is not installed or does not support configuration.\n",
|
||||
- funcArg);
|
||||
- return 1;
|
||||
- }
|
||||
- printf ("%s", options);
|
||||
- if (isatty (STDOUT_FILENO))
|
||||
- printf ("\n");
|
||||
- return 0;
|
||||
- }
|
||||
+
|
||||
/* driver command needs a valid screen number */
|
||||
- else if (func == DRIVER && screenNum == -1) {
|
||||
+ if (func == DRIVER && screenNum == -1) {
|
||||
fprintf (stderr, "Invalid screen number \"%s\".\n", funcArg);
|
||||
return 1;
|
||||
}
|
||||
@@ -135,6 +121,9 @@ int main (int argc, char *argv[]) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ /* Call glXGetClientString to load vendor libs on glvnd enabled systems */
|
||||
+ glXGetClientString (dpy, GLX_EXTENSIONS);
|
||||
+
|
||||
switch (func) {
|
||||
case NSCREENS:
|
||||
printf ("%d", nScreens);
|
||||
@@ -154,7 +143,13 @@ int main (int argc, char *argv[]) {
|
||||
break;
|
||||
}
|
||||
case OPTIONS: {
|
||||
- const char *name = (*GetScreenDriver) (dpy, screenNum), *options;
|
||||
+ const char *name, *options;
|
||||
+
|
||||
+ if (screenNum == -1) {
|
||||
+ name = funcArg;
|
||||
+ } else {
|
||||
+ name = (*GetScreenDriver) (dpy, screenNum);
|
||||
+ }
|
||||
if (!name) {
|
||||
fprintf (stderr, "Screen \"%d\" is not direct rendering capable.\n",
|
||||
screenNum);
|
Loading…
Reference in new issue