diff options
author | Drew Moseley <drew_moseley@mentor.com> | 2014-06-02 20:23:38 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-06 09:26:03 +0100 |
commit | c0a910b1b946ee871cb1bb8ce1797aff02cb9065 (patch) | |
tree | 98198a92d529007f5199ab1e60e1ad22713f671e /meta/recipes-graphics/mesa | |
parent | 65a8c4bb7c7b499a831e1016da3081d37764bcda (diff) | |
download | poky-c0a910b1b946ee871cb1bb8ce1797aff02cb9065.tar.gz |
mesa-demos: Use DEMOS_DATA_DIR.
Modify mesa demo apps to respect the DEMOS_DATA_DIR
configuration parameter for locating data files.
(From OE-Core rev: a6a6cd089352157d35a8730e37153ce9df62ec01)
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch | 234 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb | 3 |
2 files changed, 236 insertions, 1 deletions
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch b/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch new file mode 100644 index 0000000000..c89f87891b --- /dev/null +++ b/meta/recipes-graphics/mesa/mesa-demos/0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch | |||
@@ -0,0 +1,234 @@ | |||
1 | From bc7fa67d13e8032601df5cf04e15c53a7204dcd7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Drew Moseley <drew_moseley@mentor.com> | ||
3 | Date: Fri, 9 May 2014 11:50:24 -0400 | ||
4 | Subject: [PATCH] mesa-demos: Use DEMOS_DATA_DIR to locate data files | ||
5 | |||
6 | Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=78496] | ||
7 | Signed-off-by: Drew Moseley <drew_moseley@mentor.com> | ||
8 | --- | ||
9 | src/glsl/bezier.c | 2 +- | ||
10 | src/glsl/blinking-teapot.c | 4 ++-- | ||
11 | src/glsl/brick.c | 4 ++-- | ||
12 | src/glsl/bump.c | 6 +++--- | ||
13 | src/glsl/convolutions.c | 2 +- | ||
14 | src/glsl/mandelbrot.c | 4 ++-- | ||
15 | src/glsl/multitex.c | 4 ++-- | ||
16 | src/glsl/simplex-noise.c | 2 +- | ||
17 | src/glsl/skinning.c | 4 ++-- | ||
18 | src/glsl/texdemo1.c | 8 ++++---- | ||
19 | src/glsl/toyball.c | 4 ++-- | ||
20 | src/objviewer/objview.c | 12 ++++++------ | ||
21 | src/perf/glslstateschange.c | 8 ++++---- | ||
22 | 13 files changed, 32 insertions(+), 32 deletions(-) | ||
23 | |||
24 | diff --git a/src/glsl/bezier.c b/src/glsl/bezier.c | ||
25 | index 0b56bc1..e01603d 100644 | ||
26 | --- a/src/glsl/bezier.c | ||
27 | +++ b/src/glsl/bezier.c | ||
28 | @@ -13,7 +13,7 @@ | ||
29 | #include "glut_wrap.h" | ||
30 | #include "shaderutil.h" | ||
31 | |||
32 | -static const char *filename = "bezier.geom"; | ||
33 | +static const char *filename = DEMOS_DATA_DIR "bezier.geom"; | ||
34 | |||
35 | static GLuint fragShader; | ||
36 | static GLuint vertShader; | ||
37 | diff --git a/src/glsl/blinking-teapot.c b/src/glsl/blinking-teapot.c | ||
38 | index e3bf24d..7662b1f 100644 | ||
39 | --- a/src/glsl/blinking-teapot.c | ||
40 | +++ b/src/glsl/blinking-teapot.c | ||
41 | @@ -63,8 +63,8 @@ init_opengl (void) | ||
42 | exit(1); | ||
43 | } | ||
44 | |||
45 | - vshad_id = CompileShaderFile (GL_VERTEX_SHADER, "blinking-teapot.vert"); | ||
46 | - fshad_id = CompileShaderFile (GL_FRAGMENT_SHADER, "blinking-teapot.frag"); | ||
47 | + vshad_id = CompileShaderFile (GL_VERTEX_SHADER, DEMOS_DATA_DIR "blinking-teapot.vert"); | ||
48 | + fshad_id = CompileShaderFile (GL_FRAGMENT_SHADER, DEMOS_DATA_DIR "blinking-teapot.frag"); | ||
49 | prog_id = LinkShaders (vshad_id, fshad_id); | ||
50 | |||
51 | UseProgram (prog_id); | ||
52 | diff --git a/src/glsl/brick.c b/src/glsl/brick.c | ||
53 | index 3021856..fe5f190 100644 | ||
54 | --- a/src/glsl/brick.c | ||
55 | +++ b/src/glsl/brick.c | ||
56 | @@ -14,8 +14,8 @@ | ||
57 | #include "shaderutil.h" | ||
58 | |||
59 | |||
60 | -static char *FragProgFile = "CH06-brick.frag"; | ||
61 | -static char *VertProgFile = "CH06-brick.vert"; | ||
62 | +static char *FragProgFile = DEMOS_DATA_DIR "CH06-brick.frag"; | ||
63 | +static char *VertProgFile = DEMOS_DATA_DIR "CH06-brick.vert"; | ||
64 | |||
65 | /* program/shader objects */ | ||
66 | static GLuint fragShader; | ||
67 | diff --git a/src/glsl/bump.c b/src/glsl/bump.c | ||
68 | index 59f62cd..3a1b20a 100644 | ||
69 | --- a/src/glsl/bump.c | ||
70 | +++ b/src/glsl/bump.c | ||
71 | @@ -15,9 +15,9 @@ | ||
72 | #include "readtex.h" | ||
73 | |||
74 | |||
75 | -static char *FragProgFile = "CH11-bumpmap.frag"; | ||
76 | -static char *FragTexProgFile = "CH11-bumpmaptex.frag"; | ||
77 | -static char *VertProgFile = "CH11-bumpmap.vert"; | ||
78 | +static char *FragProgFile = DEMOS_DATA_DIR "CH11-bumpmap.frag"; | ||
79 | +static char *FragTexProgFile = DEMOS_DATA_DIR "CH11-bumpmaptex.frag"; | ||
80 | +static char *VertProgFile = DEMOS_DATA_DIR "CH11-bumpmap.vert"; | ||
81 | static char *TextureFile = DEMOS_DATA_DIR "tile.rgb"; | ||
82 | |||
83 | /* program/shader objects */ | ||
84 | diff --git a/src/glsl/convolutions.c b/src/glsl/convolutions.c | ||
85 | index a120cfe..9312f00 100644 | ||
86 | --- a/src/glsl/convolutions.c | ||
87 | +++ b/src/glsl/convolutions.c | ||
88 | @@ -340,7 +340,7 @@ static void init(void) | ||
89 | |||
90 | menuInit(); | ||
91 | readTexture(textureLocation); | ||
92 | - createProgram("convolution.vert", "convolution.frag"); | ||
93 | + createProgram(DEMOS_DATA_DIR "convolution.vert", DEMOS_DATA_DIR "convolution.frag"); | ||
94 | |||
95 | glEnable(GL_TEXTURE_2D); | ||
96 | glClearColor(1.0, 1.0, 1.0, 1.0); | ||
97 | diff --git a/src/glsl/mandelbrot.c b/src/glsl/mandelbrot.c | ||
98 | index 31ede1d..ab34a0f 100644 | ||
99 | --- a/src/glsl/mandelbrot.c | ||
100 | +++ b/src/glsl/mandelbrot.c | ||
101 | @@ -14,8 +14,8 @@ | ||
102 | #include "shaderutil.h" | ||
103 | |||
104 | |||
105 | -static char *FragProgFile = "CH18-mandel.frag"; | ||
106 | -static char *VertProgFile = "CH18-mandel.vert"; | ||
107 | +static char *FragProgFile = DEMOS_DATA_DIR "CH18-mandel.frag"; | ||
108 | +static char *VertProgFile = DEMOS_DATA_DIR "CH18-mandel.vert"; | ||
109 | |||
110 | /* program/shader objects */ | ||
111 | static GLuint fragShader; | ||
112 | diff --git a/src/glsl/multitex.c b/src/glsl/multitex.c | ||
113 | index 262ea50..546bd27 100644 | ||
114 | --- a/src/glsl/multitex.c | ||
115 | +++ b/src/glsl/multitex.c | ||
116 | @@ -35,8 +35,8 @@ | ||
117 | |||
118 | static const char *Demo = "multitex"; | ||
119 | |||
120 | -static const char *VertFile = "multitex.vert"; | ||
121 | -static const char *FragFile = "multitex.frag"; | ||
122 | +static const char *VertFile = DEMOS_DATA_DIR "multitex.vert"; | ||
123 | +static const char *FragFile = DEMOS_DATA_DIR "multitex.frag"; | ||
124 | |||
125 | static const char *TexFiles[2] = | ||
126 | { | ||
127 | diff --git a/src/glsl/simplex-noise.c b/src/glsl/simplex-noise.c | ||
128 | index 13fdd5d..885f01e 100644 | ||
129 | --- a/src/glsl/simplex-noise.c | ||
130 | +++ b/src/glsl/simplex-noise.c | ||
131 | @@ -169,7 +169,7 @@ SpecialKey(int key, int x, int y) | ||
132 | static void | ||
133 | Init(void) | ||
134 | { | ||
135 | - const char *filename = "simplex-noise.glsl"; | ||
136 | + const char *filename = DEMOS_DATA_DIR "simplex-noise.glsl"; | ||
137 | char noiseText[10000]; | ||
138 | FILE *f; | ||
139 | int len; | ||
140 | diff --git a/src/glsl/skinning.c b/src/glsl/skinning.c | ||
141 | index bf38d77..536d475 100644 | ||
142 | --- a/src/glsl/skinning.c | ||
143 | +++ b/src/glsl/skinning.c | ||
144 | @@ -20,8 +20,8 @@ | ||
145 | #define M_PI 3.1415926535 | ||
146 | #endif | ||
147 | |||
148 | -static char *FragProgFile = "skinning.frag"; | ||
149 | -static char *VertProgFile = "skinning.vert"; | ||
150 | +static char *FragProgFile = DEMOS_DATA_DIR "skinning.frag"; | ||
151 | +static char *VertProgFile = DEMOS_DATA_DIR "skinning.vert"; | ||
152 | |||
153 | /* program/shader objects */ | ||
154 | static GLuint fragShader; | ||
155 | diff --git a/src/glsl/texdemo1.c b/src/glsl/texdemo1.c | ||
156 | index 6cde239..a082342 100644 | ||
157 | --- a/src/glsl/texdemo1.c | ||
158 | +++ b/src/glsl/texdemo1.c | ||
159 | @@ -35,11 +35,11 @@ | ||
160 | |||
161 | static const char *Demo = "texdemo1"; | ||
162 | |||
163 | -static const char *ReflectVertFile = "reflect.vert"; | ||
164 | -static const char *CubeFragFile = "cubemap.frag"; | ||
165 | +static const char *ReflectVertFile = DEMOS_DATA_DIR "reflect.vert"; | ||
166 | +static const char *CubeFragFile = DEMOS_DATA_DIR "cubemap.frag"; | ||
167 | |||
168 | -static const char *SimpleVertFile = "simple.vert"; | ||
169 | -static const char *SimpleTexFragFile = "shadowtex.frag"; | ||
170 | +static const char *SimpleVertFile = DEMOS_DATA_DIR "simple.vert"; | ||
171 | +static const char *SimpleTexFragFile = DEMOS_DATA_DIR "shadowtex.frag"; | ||
172 | |||
173 | static const char *GroundImage = DEMOS_DATA_DIR "tile.rgb"; | ||
174 | |||
175 | diff --git a/src/glsl/toyball.c b/src/glsl/toyball.c | ||
176 | index 5f27951..4e7e832 100644 | ||
177 | --- a/src/glsl/toyball.c | ||
178 | +++ b/src/glsl/toyball.c | ||
179 | @@ -14,8 +14,8 @@ | ||
180 | #include "shaderutil.h" | ||
181 | |||
182 | |||
183 | -static char *FragProgFile = "CH11-toyball.frag"; | ||
184 | -static char *VertProgFile = "CH11-toyball.vert"; | ||
185 | +static char *FragProgFile = DEMOS_DATA_DIR "CH11-toyball.frag"; | ||
186 | +static char *VertProgFile = DEMOS_DATA_DIR "CH11-toyball.vert"; | ||
187 | |||
188 | /* program/shader objects */ | ||
189 | static GLuint fragShader; | ||
190 | diff --git a/src/objviewer/objview.c b/src/objviewer/objview.c | ||
191 | index 6def726..78a6acf 100644 | ||
192 | --- a/src/objviewer/objview.c | ||
193 | +++ b/src/objviewer/objview.c | ||
194 | @@ -162,12 +162,12 @@ init_model(void) | ||
195 | static void | ||
196 | init_skybox(void) | ||
197 | { | ||
198 | - SkyboxTex = LoadSkyBoxCubeTexture("alpine_east.rgb", | ||
199 | - "alpine_west.rgb", | ||
200 | - "alpine_up.rgb", | ||
201 | - "alpine_down.rgb", | ||
202 | - "alpine_south.rgb", | ||
203 | - "alpine_north.rgb"); | ||
204 | + SkyboxTex = LoadSkyBoxCubeTexture(DEMOS_DATA_DIR "alpine_east.rgb", | ||
205 | + DEMOS_DATA_DIR "alpine_west.rgb", | ||
206 | + DEMOS_DATA_DIR "alpine_up.rgb", | ||
207 | + DEMOS_DATA_DIR "alpine_down.rgb", | ||
208 | + DEMOS_DATA_DIR "alpine_south.rgb", | ||
209 | + DEMOS_DATA_DIR "alpine_north.rgb"); | ||
210 | glmSpecularTexture(Model, SkyboxTex); | ||
211 | } | ||
212 | |||
213 | diff --git a/src/perf/glslstateschange.c b/src/perf/glslstateschange.c | ||
214 | index 7422b78..dbf8332 100644 | ||
215 | --- a/src/perf/glslstateschange.c | ||
216 | +++ b/src/perf/glslstateschange.c | ||
217 | @@ -33,10 +33,10 @@ | ||
218 | #include "glmain.h" | ||
219 | #include "common.h" | ||
220 | |||
221 | -static const char *VertFile1 = "glslstateschange1.vert"; | ||
222 | -static const char *FragFile1 = "glslstateschange1.frag"; | ||
223 | -static const char *VertFile2 = "glslstateschange2.vert"; | ||
224 | -static const char *FragFile2 = "glslstateschange2.frag"; | ||
225 | +static const char *VertFile1 = DEMOS_DATA_DIR "glslstateschange1.vert"; | ||
226 | +static const char *FragFile1 = DEMOS_DATA_DIR "glslstateschange1.frag"; | ||
227 | +static const char *VertFile2 = DEMOS_DATA_DIR "glslstateschange2.vert"; | ||
228 | +static const char *FragFile2 = DEMOS_DATA_DIR "glslstateschange2.frag"; | ||
229 | static struct uniform_info Uniforms1[] = { | ||
230 | { "tex1", 1, GL_SAMPLER_2D, { 0, 0, 0, 0 }, -1 }, | ||
231 | { "tex2", 1, GL_SAMPLER_2D, { 1, 0, 0, 0 }, -1 }, | ||
232 | -- | ||
233 | 1.7.9.5 | ||
234 | |||
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb index 469b8caf08..f95b0a33a0 100644 --- a/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb +++ b/meta/recipes-graphics/mesa/mesa-demos_8.1.0.bb | |||
@@ -15,7 +15,8 @@ SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \ | |||
15 | file://glut.patch \ | 15 | file://glut.patch \ |
16 | file://egl-mesa-screen-surface-build-fix.patch \ | 16 | file://egl-mesa-screen-surface-build-fix.patch \ |
17 | file://egl-mesa-screen-surface-query.patch \ | 17 | file://egl-mesa-screen-surface-query.patch \ |
18 | file://0001-mesa-demos-Add-missing-data-files.patch" | 18 | file://0001-mesa-demos-Add-missing-data-files.patch \ |
19 | file://0001-mesa-demos-Use-DEMOS_DATA_DIR-to-locate-data-files.patch" | ||
19 | 20 | ||
20 | SRC_URI[md5sum] = "9df33ba69a26bbfbc7c8148602e59542" | 21 | SRC_URI[md5sum] = "9df33ba69a26bbfbc7c8148602e59542" |
21 | SRC_URI[sha256sum] = "9703fa0646b32a1e68d2abf5628f936f77bf97c69ffcaac90de380820a87a828" | 22 | SRC_URI[sha256sum] = "9703fa0646b32a1e68d2abf5628f936f77bf97c69ffcaac90de380820a87a828" |