Compare commits

..

497 Commits

Author SHA1 Message Date
Jeremy Huddleston
5078cb6858 apple: Dead code removal
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit e903cc17bb)
2011-06-13 23:14:32 -07:00
Jeremy Huddleston
025d348dc1 apple: applegl_destroy_context: Pass along the correct display
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit c6cf82fb55)
2011-06-13 23:14:09 -07:00
Jeremy Huddleston
2bf24ffaff osmesa: Fix missing symbols when GLX_INDIRECT_RENDERING is defined.
When GLX_INDIRECT_RENDERING is defined, some symbols are used in
libglapi.a but are not defined.  Define them through the help of
glapitemp.h.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
(cherry picked from commit 0e8d045bf8)
2011-06-13 23:10:42 -07:00
Jeremy Huddleston
02e7aa6cea darwin: Don't link against libGL when building libOSMesa
Everything should be resolved through glapi.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit cebdffaa2a)
2011-06-13 23:10:42 -07:00
Jeremy Huddleston
55bf1244e3 darwin: Set VG_LIB_{NAME,GLOB} to fix make install
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 22c320aa2c)
(cherry picked from commit 6ea70600b9)
2011-06-13 23:10:42 -07:00
Jeremy Huddleston
70d5758479 apple: Package applegl source into MesaLib tarball
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit e5d241ddb2)
2011-06-13 23:10:41 -07:00
Jeremy Huddleston
72b8f19fa6 darwin: Define GALLIUM_DRIVERS_DIRS in darwin config
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit d563009cd1)
2011-06-13 23:10:41 -07:00
Jeremy Huddleston
e004ac273d apple: Fix build failures in applegl_glx.c
See https://bugs.freedesktop.org/show_bug.cgi?id=29162

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

This commit squashes three cherry-picks:
(cherry picked from commit 5d35343d12)
(cherry picked from commit 7c5f37c032)
(cherry picked from commit 2ee5272e16)
2011-06-13 23:10:41 -07:00
Jeremy Huddleston
9cbc705e83 apple: Build darwin using applegl rather than indirect
This reverts portions of 6849916170 that caused
the darwin config to fail to build due to missing implementations in that
commit.

See https://bugs.freedesktop.org/show_bug.cgi?id=29162

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 1885cf27c9)
2011-06-13 23:10:41 -07:00
Jeremy Huddleston
858db8cd4e glx: Dead code removal
Remove a redundant ifndef GLX_USE_APPLEGL

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 3843bbcb4c)
2011-06-13 23:10:40 -07:00
Jeremy Huddleston
d8802cd242 apple: ifdef out come glapi-foo on darwin
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 8593bb32ea)
2011-06-13 23:10:40 -07:00
Jeremy Huddleston
7c4cc8d2b9 apple: Change from XExtDisplayInfo to struct glx_display
Fixes regression introduced by: ab434f6b76 and
                                c356f5867f

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 7cdf969527)
2011-06-13 23:10:40 -07:00
Jeremy Huddleston
a6a5772250 apple: Rename GLXcontext
Fixes regression introduced by: c356f5867f

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 279e471750)
2011-06-13 23:10:40 -07:00
Jeremy Huddleston
9bcc214159 apple: Rename _gl_context_modes_find_visual to glx_config_find_visual
Fixes regression introduced by: 6ddf66e923

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit b7f0ed8444)
2011-06-13 23:10:39 -07:00
Jeremy Huddleston
e03abf70cd apple: Re-add driContext and do_destroy
Fixes regression introduced by: c491e585e4

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 488d6c739f)
2011-06-13 23:10:39 -07:00
Jeremy Huddleston
0c6fbf66cd apple: Rename GLXcontext
Fixes regression introduced by: c356f5867f

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 22613d1670)
2011-06-13 23:10:39 -07:00
Jeremy Huddleston
14b9e91d01 apple: Rename __GLcontextModes to struct glx_config
Fixes regression introduced by: 6ddf66e923

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit bb621cb61e)
2011-06-13 23:10:38 -07:00
Jeremy Huddleston
ff7e6622fc apple: Rename glcontextmodes.[ch] to glxconfig.[ch]
Fixes regression introduced by: 65d98e2577

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 4c9bab78a1)
2011-06-13 23:10:38 -07:00
Jeremy Huddleston
bde5310339 apple: Manually edit gl.spec to match mesa 7.9 ProgramParameters4dvNV
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-13 23:10:37 -07:00
Jeremy Huddleston
4f362e0494 apple: Update GL specs
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 8e89d0bea7)
2011-06-13 22:59:04 -07:00
Kenneth Graunke
5408ccb09f glsl: Accept precision qualifiers on sampler types, but only in ES.
GLSL 1.30 states clearly that only float and int are allowed, while the
GLSL ES specification's issues section states that sampler types may
take precision qualifiers.

Fixes compilation failures in 3DMarkMobileES 2.0 and GLBenchmark 2.0,
as well as a regression in the Meego Tablet UX.

(cherry-picked from 45e8e6c6b1)
2011-05-25 11:17:41 -07:00
José Fonseca
203624128c mesa: Fix GetVertexAttrib* inside display lists.
GetVertexAttrib*{,ARB} is no longer aliased to the NV calls.

This fixes tracing yofrankie with apitrace, given it requires accurate
results from GetVertexAttribiv*.

NOTE: This is a candidate for the stable branches.
2011-05-12 14:19:15 +01:00
Tom Stellard
ea95bf7d89 r300/compiler: Fix incorrect presubtract conversion
ADD instructions with constant swizzles can't be converted to
presubtract operations.

(cherry picked from commit 0fa81d6d05)
2011-04-16 14:23:04 -07:00
Tom Stellard
b8050add56 r300/compiler: Fix vertex shader MAD instructions with constant swizzles
(cherry picked from commit d8361400b7)
2011-04-05 09:37:20 -07:00
Marek Olšák
4633054b8b r300/compiler: apply the texture swizzle to shadow pass and fail values too
Piglit tests:
- glsl-fs-shadow2d-01
- glsl-fs-shadow2d-02
- glsl-fs-shadow2d-03
- fs-shadow2d-red-01
- fs-shadow2d-red-02
- fs-shadow2d-red-03

NOTE: This is a candidate for the stable branches.
(cherry picked from commit 0d96ae8fc7)
2011-04-04 19:14:35 +02:00
Marek Olšák
897e464a5d r300/compiler: propagate SaturateMode down to the result of shadow comparison
NOTE: This is a candidate for the stable branches.
(cherry picked from commit 2679760834)
2011-04-04 19:14:15 +02:00
Marek Olšák
0140b830af r300g: tell the GLSL compiler to lower the continue opcode
NOTE: This is a candidate for the stable branches.
(cherry picked from commit f814dd7a81)

Conflicts:

	src/gallium/drivers/r300/r300_screen.c
2011-04-03 19:43:36 +02:00
Tom Stellard
9e2c9cdf48 prog_optimize: Fix reallocating registers for shaders with loops
Registers that are used inside of loops need to be considered live
starting with the first instruction of the outermost loop.

https://bugs.freedesktop.org/show_bug.cgi?id=34370

(cherry picked from commit 18dcbd358f)

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-03-31 21:39:57 -07:00
Marek Olšák
e3dcb53e6e u_blitter: remove invalid assertion 2011-03-30 02:19:32 +02:00
Henri Verbeet
6b46754bc0 st/mesa: Validate state before doing blits.
Specifically, this ensures things like the front buffer actually exist. This
fixes piglt fbo/fbo-sys-blit and fd.o bug 35483.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
(cherry picked from commit 5d7c27f5ec)
2011-03-30 00:53:18 +02:00
Marek Olšák
7397c034ac r300g: fix alpha-test with no colorbuffer
Piglit:
- fbo-alphatest-nocolor

NOTE: This is a candidate for the stable branches.
(cherry picked from commit 226ae9d6c8)
2011-03-24 23:39:43 +01:00
José Fonseca
39149172c8 mesa: More glGet* fixes.
glGet(GL_NORMAL_ARRAY) giving potentially wrong results.

Most of glGet(GL_XXX_ARRAY_BUFFER_BINDING) giving totally bogus results.
2011-03-23 17:19:30 +00:00
José Fonseca
c8bd053d3a mesa: Fix typo glGet*v(GL_TEXTURE_COORD_ARRAY_*). 2011-03-22 23:01:01 +00:00
Marek Olšák
7272f8fb18 st/mesa: fix crash when using both user and vbo buffers with the same stride
If two buffers had the same stride where one buffer is a user one and
the other is a vbo, it was considered to be one interleaved buffer,
resulting in incorrect rendering and crashes.

This patch makes sure that the interleaved buffer is either user or vbo,
not both.
(cherry picked from commit 695cdee678)
2011-03-12 22:11:52 +01:00
Marek Olšák
c91d217ff7 r300/compiler: remove unused variables
(cherry picked from commit ff8baec5bc)
2011-03-12 22:04:20 +01:00
Marek Olšák
e2baddb653 r300/compiler: fix equal and notequal shadow compare functions
(cherry picked from commit 4dfcf3c4fe)
2011-03-12 22:03:59 +01:00
Marek Olšák
20c7067257 r300/compiler: saturate Z before the shadow comparison
This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=31159

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit eb1acd1613)
2011-03-12 22:03:46 +01:00
Marek Olšák
ca76f4f6aa r300/compiler: do not set TEX_IGNORE_UNCOVERED on r500
The docs say it can be set for direct texture lookups, but even that
causes problems.

This fixes the wireframe bug:
https://bugs.freedesktop.org/show_bug.cgi?id=32688

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 6da4866ffd)
2011-03-12 21:51:34 +01:00
Marek Olšák
c7305375d1 r300/compiler: TEX instructions don't support negation on source arguments
This fixes piglit:
- glsl-fs-texture2d-dependent-4

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 1e97b4dd10)
2011-03-12 21:51:21 +01:00
Marek Olšák
dea5e972ff r300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)
NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 589d835dfd)
2011-03-12 21:51:10 +01:00
Marek Olšák
c198d29fbe r300/compiler: fix translating the src negate bits in pair_translate
(1, -_, ...) was converted to (-1, ...) because of the negation
in the second component.
Masking out the unused bits fixes this.

Piglit:
- glsl-fs-texture2d-branching

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit d96305e4fc)
2011-03-12 21:50:59 +01:00
Marek Olšák
90292b8001 r300/compiler: fix the saturate modifier when applied to TEX instructions
This bug can only be triggered if the source texture is either signed or float.
(cherry picked from commit e4707604ab)
2011-03-12 21:50:42 +01:00
Marek Olšák
6ea13078fb st/mesa: fail to alloc a renderbuffer if st_choose_renderbuffer_format fails
This fixes:
  state_tracker/st_format.c:401:st_pipe_format_to_mesa_format:
  Assertion `0' failed.
(cherry picked from commit fb5d9e1199)

Conflicts:

	src/mesa/state_tracker/st_cb_fbo.c
2011-03-12 21:46:18 +01:00
Marek Olšák
48d44713f9 st/mesa: fix crash when DrawBuffer->_ColorDrawBuffers[0] is NULL
This fixes the game Tiny and Big.
(cherry picked from commit 7942e6a5ae)
2011-03-12 21:40:52 +01:00
Brian Paul
351814a21c docs: fill in 7.9.2 release date 2011-03-08 09:19:13 -07:00
Ian Romanick
a6909b6bd3 docs: Add 7.9.2 md5sums 2011-03-02 14:20:27 -08:00
Ian Romanick
7e9d853665 docs: Add change log to 7.9.2 release notes 2011-03-02 14:18:05 -08:00
Ian Romanick
ca5cf9bf66 mesa: set version string to 7.9.2 (final) 2011-03-02 13:48:22 -08:00
Ian Romanick
dfae3ffa0f intel: Remove driver date and related bits from renderer string
Not only did this contain lies, it contained lies that wouldn't be
useful even if true.
(cherry picked from commit b0a7492aeb)
2011-03-02 13:47:41 -08:00
Ian Romanick
2b41289691 docs: Clean up bug fixes list
All the unnumbered bugs are first.  These are followed by numbered
bugs sorted by bug number.  This is analogous to 8aabb1bc on the 7.10
branch.
2011-03-01 13:22:02 -08:00
Ian Romanick
42c3e00bdb docs: Update 7.9.2 release notes for recent cherry picks 2011-03-01 13:16:53 -08:00
Cyril Brulebois
0ebbfa4335 Point to bugs.freedesktop.org rather than bugzilla.freedesktop.org
Suggested by a freedesktop.org admin.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
(cherry picked from commit d252db7af1)
2011-03-01 12:57:23 -08:00
Brian Paul
fc5889a528 docs: updated environment variable list
(cherry picked from commit 1bf9954bb4)

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2011-03-01 12:57:07 -08:00
Sam Hocevar
a5b6d8ec4d docs: fix glsl_compiler name
(cherry picked from commit fde4943688)
2011-03-01 12:54:21 -08:00
Sam Hocevar
6eb1f39b55 docs: add glsl info
(cherry picked from commit 3e8fb54fb8)
2011-03-01 12:54:05 -08:00
Chad Versace
5e987d0849 tnl: Add support for datatype GL_FIXED in vertex arrays
Before populating the vertex buffer attribute pointer (VB->AttribPtr[]),
convert vertex data in GL_FIXED format to GL_FLOAT.

Fixes bug: http://bugs.freedesktop.org/show_bug.cgi?id=34047

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit a231ac23f4)
2011-03-01 11:53:26 -08:00
Ian Romanick
9fe29f34f3 i915: Force lowering of all types of indirect array accesses in the FS
NOTE: This is a candidate for the 7.9 and 7.10 branches.

(cherry picked from commit 4c1dc1c4d7)
2011-03-01 11:53:06 -08:00
Ian Romanick
24a9d95ec7 i915: Calculate partial result to temp register first
Previously the SNE and SEQ instructions would calculate the partial
result to the destination register.  This would cause problems if the
destination register was also one of the source registers.

Fixes piglit tests glsl-fs-any, glsl-fs-struct-equal,
glsl-fs-struct-notequal, glsl-fs-vec4-operator-equal,
glsl-fs-vec4-operator-notequal.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 53b8b68843)
2011-03-01 10:49:56 -08:00
Ian Romanick
38c93ba921 i915: Only mark a register as available if all components are written
Previously a register would be marked as available if any component
was written.  This caused shaders such as this:

  0: TEX TEMP[0].xyz, INPUT[14].xyyy, texture[0], 2D;
  1: MUL TEMP[1], UNIFORM[0], TEMP[0].xxxx;
  2: MAD TEMP[2], UNIFORM[1], TEMP[0].yyyy, TEMP[1];
  3: MAD TEMP[1], UNIFORM[2], TEMP[0].zzzz, TEMP[2];
  4: ADD TEMP[0].xyz, TEMP[1].xyzx, UNIFORM[3].xyzx;
  5: TEX TEMP[1].w, INPUT[14].xyyy, texture[0], 2D;
  6: MOV TEMP[0].w, TEMP[1].wwww;
  7: MOV OUTPUT[2], TEMP[0];
  8: END

to produce incorrect code such as this:

  BEGIN
  DCL S[0]
  DCL T_TEX0
  R[0] = MOV T_TEX0.xyyy
  U[0] = TEXLD S[0],R[0]
  R[0].xyz = MOV U[0]
  R[1] = MUL CONST[0], R[0].xxxx
  R[2] = MAD CONST[1], R[0].yyyy, R[1]
  R[1] = MAD CONST[2], R[0].zzzz, R[2]
  R[0].xyz = ADD R[1].xyzx, CONST[3].xyzx
  R[0] = MOV T_TEX0.xyyy
  U[0] = TEXLD S[0],R[0]
  R[1].w = MOV U[0]
  R[0].w = MOV R[1].wwww
  oC = MOV R[0]
  END

Note that T_TEX0 is copied to R[0], but the xyz components of R[0] are
still expected to hold a calculated value.

Fixes piglit tests draw-elements-vs-inputs, fp-kill, and
glsl-fs-color-matrix.  It also fixes Meego bugzilla #13005.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit a04582739e)
2011-03-01 10:49:49 -08:00
Kenneth Graunke
1156006e4a glsl: Use reralloc instead of plain realloc.
Plugs a memory leak when compiling shaders with user defined structures.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit eb639349e2)
2011-02-28 16:33:09 -08:00
Ian Romanick
7be5744b5b linker: Fix off-by-one error implicit array sizing
Arrays are zero based.  If the highest element accessed is 6, the
array needs to have 7 elements.

Fixes piglit test glsl-fs-implicit-array-size-03 and bugzilla #34198.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 25b36e8ff8)
2011-02-28 16:01:08 -08:00
nobled
c73bedd191 glx: Put null check before use
'dpy' was being checked for null *after* it was already used once.

Also add a null check for psc, and drop gc's redundant initialization.
(cherry picked from commit b5dc40710d)
2011-02-28 16:01:08 -08:00
Ian Romanick
bf66888a81 glsl: Regenerate compiler files from cherry picks 2011-02-28 16:01:08 -08:00
Ian Romanick
808ba96f3e glsl: Finish out the reduce/reduce error fixes
Track variables, functions, and types during parsing.  Use this
information in the lexer to return the currect "type" for identifiers.

Change the handling of structure constructors.  They will now show up
in the AST as constructors (instead of plain function calls).

Fixes piglit tests constructor-18.vert, constructor-19.vert, and
constructor-20.vert.  Also fixes bugzilla #29926.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

(cherry picked from commit 8842158944)
2011-02-28 16:01:08 -08:00
Keith Packard
cf2076f89d glsl: Eliminate reduce/reduce conflicts in glsl grammar
This requires lexical disambiguation between variable and type
identifiers (as most C compilers do).

Signed-off-by: Keith Packard <keithp@keithp.com>

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit f4b812e1a6)
2011-02-28 16:01:08 -08:00
Chad Versace
e1e829689d glsl: Reinstate constant-folding for division by zero
Fixes regression: https://bugs.freedesktop.org/show_bug.cgi?id=34160

Commit e7c1f058d1 disabled constant-folding
when division-by-zero occured. This was a mistake, because the spec does
allow division by zero. (From section 5.9 of the GLSL 1.20 spec: Dividing
by zero does not cause an exception but does result in an unspecified
value.)

For floating-point division, the original pre-e7c1f05 behavior is
reinstated.

For integer division, constant-fold 1/0 to 0.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>

(cherry picked from commit 62c8c77333)
2011-02-28 15:27:41 -08:00
Chad Versace
3df97ee70c glsl: Set operators '%' and '%=' to be reserved when GLSL < 1.30
From section 5.9 of the GLSL 1.20 spec:
   The operator modulus (%) is reserved for future use.

From section 5.8 of the GLSL 1.20 spec:
   The assignments modulus into (%=), left shift by (<<=), right shift by
   (>>=), inclusive or into ( |=), and exclusive or into ( ^=). These
   operators are reserved for future use.

The GLSL ES 1.00 spec and GLSL 1.10 spec have similiar language.

Fixes bug:
https://bugs.freedesktop.org//show_bug.cgi?id=33916

Fixes Piglit tests:
spec/glsl-1.00/compiler/arithmetic-operators/modulus-00.frag
spec/glsl-1.00/compiler/assignment-operators/modulus-assign-00.frag
spec/glsl-1.10/compiler/arithmetic-operators/modulus-00.frag
spec/glsl-1.10/compiler/assignment-operators/modulus-assign-00.frag
spec/glsl-1.20/compiler/arithmetic-operators/modulus-00.frag
spec/glsl-1.20/compiler/assignment-operators/modulus-assign-00.frag
(cherry picked from commit 82f994f386)
2011-02-28 15:27:40 -08:00
Ian Romanick
7d6d3d6133 glcpp: Regenerate files from recent cherry picks 2011-02-28 15:27:40 -08:00
Chad Versace
a068f7a2df glcpp: Raise error when modulus is zero
For example, this now raises an error:
   #define XXX 1 / 0

Fixes bug: https://bugs.freedesktop.org//show_bug.cgi?id=33507
Fixes Piglit test: spec/glsl-1.10/preprocessor/modulus-by-zero.vert

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit fd1252ab67)
2011-02-28 14:47:33 -08:00
Ian Romanick
d72c16a0d3 mesa: Initial size for secondary color array is 3
See table 6.7 on page 347 of the OpenGL 3.0 specification.
(cherry picked from commit 09e15ac76a)
2011-02-28 14:47:05 -08:00
Kenneth Graunke
2eb4816939 glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.
This has probably existed since e5e34ab18e or so.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit dfdb9fda82)
2011-02-28 14:33:59 -08:00
Ian Romanick
8cf57be878 glsl: Reject shader versions not supported by the implementation
Previously we'd happily compile GLSL 1.30 shaders on any driver.  We'd
also happily compile GLSL 1.10 and 1.20 shaders in an ES2 context.
This has been a long standing FINISHME in the compiler.

NOTE: This is a candidate for the 7.9 and 7.10 branches
(cherry picked from commit 14880a510a)
2011-02-28 14:33:31 -08:00
Ian Romanick
bf50184f42 glsl: Ensure that all GLSL versions are supported in the stand-alone compiler
NOTE: This is a candidate for the 7.9 and 7.10 branches
(cherry picked from commit e5e34ab18e)
2011-02-28 14:33:22 -08:00
Ian Romanick
4d2a725196 intel: Fix typeos from 3d028024 and 790ff232
...and remove egg from face.
(cherry picked from commit 2fb0aebd4a)
2011-02-28 14:27:36 -08:00
Ian Romanick
bcfa054b29 i915: Set correct values for range/precision of fragment shader types
(cherry picked from commit 790ff232e2)
2011-02-28 14:27:36 -08:00
Ian Romanick
499936406b i965: Set correct values for range/precision of fragment shader types
(cherry picked from commit 3d028024e5)
2011-02-28 14:27:36 -08:00
Ian Romanick
56c63dba48 mesa: Connect glGetShaderPrecisionFormat into the dispatch table
(cherry picked from commit dde3270c19)
2011-02-28 14:27:35 -08:00
Brian Paul
9c8d677a16 mesa: implement glGetShaderPrecisionFormat()
Drivers should override the default range/precision info as needed.
No drivers do this yet.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>

(cherry picked from commit 3ee60a3558)
2011-02-28 14:27:35 -08:00
Chia-I Wu
f8d1b4fd26 mesa: Add glDepthRangef and glClearDepthf to APIspec.xml.
Core mesa has gained support for GL_ARB_ES2_compatibility.  Make GLES
generated dispatch table use them.
(cherry picked from commit a4a5a9a5ce)
2011-02-28 14:27:35 -08:00
Eric Anholt
3eda10aebf mesa: Add getter for GL_SHADER_COMPILER with ARB_ES2_compatibility.
Fixes piglit arb_es2_compatibility-shadercompiler
(cherry picked from commit 4620de7eea)
2011-02-28 14:27:35 -08:00
Eric Anholt
215ec57e69 mesa: Add getters for ARB_ES2_compatibility MAX_*_VECTORS.
Fixes piglit arb_es2_compatibility-maxvectors.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>

(cherry picked from commit 8395f206a8)
2011-02-28 14:27:35 -08:00
Eric Anholt
33aee8177e mesa: Add support for glDepthRangef and glClearDepthf.
These are ARB_ES2_compatibility float variants of the core double
entrypoints.  Fixes arb_es2_compatibility-depthrangef.
(cherry picked from commit e12c4faf7e)
2011-02-28 14:27:35 -08:00
Eric Anholt
c9d5d6ebc6 mesa: Add actual support for glReleaseShaderCompiler from ES2.
Fixes no-op dispatch warning in piglit
arb_es2_compatibility-releaseshadercompiler.c.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>

(cherry picked from commit 7b987578a9)
2011-02-28 14:27:34 -08:00
Eric Anholt
e63f8638cd mesa: Add extension enable bit for GL_ARB_ES2_compatibility.
(cherry picked from commit 9c6954fc9d)

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2011-02-28 14:27:34 -08:00
Ian Romanick
ae775f3f37 glapi: Regenerate for GL_ARB_ES2_compatibility.
This is not a cherry pick, but it matches 841ad6bf (and ac06d610).
2011-02-28 14:27:34 -08:00
Eric Anholt
bd0457346f glapi: Add entrypoints and enums for GL_ARB_ES2_compatibility.
(cherry picked from commit 8560cb939b)
2011-02-28 13:56:06 -08:00
Ian Romanick
161e36c0f7 mesa: Remove unsupported OES extensions
Based commit 19418e921 from master.  Chad's extension rework series,
of which 19418e921 is part, wasn't cherry picked to 7.9 because there
were too many conflicts.  Most of the conflicts were caused by
extensions that were removed in 7.10.
2011-02-25 17:34:02 -08:00
Paulo Zanoni
4996e4a845 dri_util: fail driCreateNewScreen if InitScreen is NULL
Without this, X doesn't start with UMS on r300g.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

Signed-off-by: Paulo Zanoni <pzanoni@mandriva.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-02-22 15:20:35 -05:00
Dave Airlie
b093c9939e radeon: avoid segfault on 3D textures.
This is a candidate for 7.9 and 7.10
2011-02-22 15:11:09 -05:00
Dave Airlie
87a02b952b radeon/r200: fix fbo-clearmipmap + gen-teximage
sw clears were being used and not getting the correct offsets in the span
code.

also not emitting correct offsets for CB draws to texture levels.

(I've no idea why I'm playing with r100).

This is a candidate for 7.9 and 7.10
2011-02-22 15:07:45 -05:00
Brian Paul
1bac4815a8 glsl2: fix signed/unsigned comparison warning
(cherry picked from commit 3633e1f538)
2011-02-22 08:17:27 -07:00
Brian Paul
ffd9033227 glsl: add ir_shader case in switch stmt to silence warning 2011-02-22 08:17:21 -07:00
Brian Paul
439c298595 mesa: include compiler.h for ASSERT macro
This was already done in the 7.10 branch and master.
2011-02-22 07:20:12 -07:00
Marek Olšák
cd42dda3a5 st/dri: Track drawable context bindings
Needs to track this ourself since because we get into a race condition with
the dri_util.c code on make current when rendering to the front buffer.

This is what happens:
Old context is rendering to the front buffer.

App calls MakeCurrent with a new context. dri_util.c sets
drawable->driContextPriv to the new context and then calls the driver make
current. st/dri make current flushes the old context, which calls back into
st/dri via the flush frontbuffer hook. st/dri calls dri loader flush
frontbuffer, which calls invalidate buffer on the drawable into st/dri.

This is where things gets wrong. st/dri grabs the context from the dri
drawable (which now points to the new context) and calls invalidate
framebuffer to the new context which has not yet set the new drawable as its
framebuffers since we have not called make current yet, it asserts.
(cherry picked from commit 94ccc31ba4)

Conflicts:

	src/gallium/state_trackers/dri/common/dri_context.c
2011-02-20 17:08:20 +01:00
Brian Paul
c2b76d966e docs: add links to 7.9.1 and 7.9.2 release notes 2011-02-21 18:05:18 -07:00
Brian Paul
a28050de4f docs: update 7.9.2 release notes with Brian's cherry-picks 2011-02-21 18:05:01 -07:00
Brian Paul
9c122ce963 st/mesa: need to translate clear color according to surface's base format
When clearing a GL_LUMINANCE_ALPHA buffer, for example, we need to convert
the clear color (R,G,B,A) to (R,R,R,A).  We were doing this for texture border
colors but not renderbuffers.  Move the translation function to st_format.c
and share it.

This fixes the piglit fbo-clear-formats test.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit e2d108ec82)

Conflicts:

	src/mesa/state_tracker/st_atom_sampler.c
2011-02-21 17:40:06 -07:00
Brian Paul
f0eff3061c st/mesa: fix the default case in st_format_datatype()
Part of the fix for piglit fbo-clear-formats

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit c966c6980c)
2011-02-21 17:39:03 -07:00
Brian Paul
5a79a6dc04 st/mesa: set renderbuffer _BaseFormat in a few places
NOTE: This is a candidate for the 7.9 and 7.10 branches
(cherry picked from commit 633c9fcf78)
2011-02-21 17:38:32 -07:00
Brian Paul
652ceece0e cso: fix loop bound in cso_set_vertex_samplers()
Before we were looping to nr_samplers, which is the number of fragment
samplers, not vertex samplers.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit d087cfaabf)
2011-02-21 17:31:48 -07:00
Julien Cristau
e39aa1966b glx: fix length of GLXGetFBConfigsSGIX
The extra length is the size of the request *minus* the size of the
VendorPrivate header, not the addition.

NOTE: This is a candidate for the 7.9 and 7.10 branches

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit cbe9fc12a6)
2011-02-21 17:30:44 -07:00
Julien Cristau
ba764ae5b1 glx: fix GLXChangeDrawableAttributesSGIX request
xGLXChangeDrawableAttributesSGIXReq follows the GLXVendorPrivate header
with a drawable, number of attributes, and list of (type, value)
attribute pairs.  Don't forget to put the number of attributes in there.
I don't think this can ever have worked.

NOTE: This is a candidate for the 7.9 and 7.10 branches

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit e27913f805)
2011-02-21 17:30:32 -07:00
Dimitry Andric
3959f9f7c8 glapi: add @GOTPCREL relocation type
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33440
This replaces commit 731ec60da3

NOTE: This is a candidate for the 7.9 and 7.10 branches

Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit cfb9aae3ec)
2011-02-21 17:30:01 -07:00
Brian Paul
fa5c4b988a softpipe: fix off-by-one error in setup_fragcoord_coeff()
If we invert Y, need to subtract one from the surface height.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=26795
for softpipe.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 40ac24e631)
2011-02-21 17:29:18 -07:00
Brian Paul
0a218b00e7 st/mesa: fix incorrect fragcoord.x translation
emit_adjusted_wpos() needs separate x,y translation values.  If we
invert Y, we don't want to effect X.

Part of the fix for http://bugs.freedesktop.org/show_bug.cgi?id=26795

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit bb56631f0c)
2011-02-21 17:28:53 -07:00
Dimitry Andric
8198e26969 glapi: adding @ char before type specifier in glapi_x86.S
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33433
NOTE: This is a candidate for the 7.9 and 7.10 branches.

Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 37bffe8d12)
2011-02-21 17:28:36 -07:00
Julien Cristau
1b641f1b32 glx: fix request lengths
We were sending too long requests for GLXChangeDrawableAttributes,
GLXGetDrawableAttributes, GLXDestroyPixmap and GLXDestroyWindow.

NOTE: This is a candidate for the 7.9 and 7.10 branches

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 4324d6fdfb)
2011-02-21 17:26:10 -07:00
Dimitry Andric
8a9e6a57d0 mesa: s/movzxw/movzwl/ in read_rgba_span_x86.S
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33386
NOTE: This is a candidate for the 7.9 and 7.10 branches

Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 811ee32a9e)
2011-02-21 17:25:17 -07:00
Dimitry Andric
279c03b98f mesa: s/movzx/movzbl/
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33388
NOTE: This is a candidate for the 7.9 and 7.10 branches.

Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 3fda80246f)
2011-02-21 17:23:58 -07:00
Brian Paul
edfe056747 llvmpipe: make sure binning is active when we begin/end a query
This fixes a potential failure when a begin/end_query is the first
thing to happen after flushing the scene.

NOTE: This is a candidate for the 7.10 and 7.9 branches.
(cherry picked from commit 42dbc2530b)
2011-02-21 17:23:13 -07:00
Brian Paul
8ad9670866 mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()
Fixes a failed assertion when a renderbuffer ID that was gen'd but not
previously bound was passed to glFramebufferRenderbuffer().  Generate
the same error that NVIDIA does.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit dd973cd9e8)
2011-02-21 17:21:59 -07:00
Brian Paul
09cb5815ae mesa: don't assert in GetIntegerIndexed, etc
We were getting an assertion upon invalid pname.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 67722ae403)
2011-02-21 17:21:34 -07:00
Brian Paul
d1424f0185 mesa: fix num_draw_buffers==0 in fixed-function fragment program generation
This fixes a problem when glDrawBuffers(GL_NONE).  The fragment program
was writing to color output[0] but OutputsWritten was 0.  That led to a
failed assertion in the Mesa->TGSI translation code.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 2fa6012f6a)
2011-02-21 17:20:54 -07:00
Brian Paul
7e43495053 mesa: fix a few format table mistakes, assertions
The BaseFormat field was incorrect for a few R and RG formats.
Fix a couple assertions too.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 0073f50cd4)
2011-02-21 17:19:47 -07:00
Ian Romanick
246716c8f6 docs: Update 7.9.2 release notes
Add recent cherry picks
2011-02-21 14:47:43 -08:00
Ian Romanick
8159bef77f mesa: Fix error checks in GetVertexAttrib functions
Querying index zero is not an error in OpenGL ES 2.0.

Querying an index larger than the value returned by
GL_MAX_VERTEX_ATTRIBS is an error in all APIs.

Fixes bugzilla #32375.
(cherry picked from commit 5c3f1cdbbe)
2011-02-21 14:47:38 -08:00
Ian Romanick
d8392a2ca8 linker: Generate link errors when ES shaders are missing stages
ES requires that a vertex shader and a fragment shader be present.

Fixes bugzilla #32214.
(cherry picked from commit ce9171f9d8)
2011-02-21 13:50:35 -08:00
Ian Romanick
ac270e43e6 mesa: glGetUniform only returns a single element of an array
Also return it as the correct type.  Previously the whole array would
be returned and each element would be expanded to a vec4.

Fixes piglit test getuniform-01 and bugzilla #29823.

(cherry picked from commit 20d278a7ff)
2011-02-21 13:50:03 -08:00
Eric Anholt
fc09445c87 intel: Make renderbuffer tiling choice match texture tiling choice.
There really shouldn't be any difference between the two for us.
Fixes a bug where Z16 renderbuffers would be untiled on gen6, likely
leading to hangs.
(cherry picked from commit 29c4f95cbc)
(cherry picked from commit 4e0d6cf7ba)
2011-02-21 13:48:46 -08:00
Ian Romanick
0f3a9643c6 Use C-style system headers in C++ code to avoid issues with std:: namespace
Based on commit 497baf4e4a from master.
2011-02-21 13:19:05 -08:00
Eric Anholt
59422a1716 glsl: Fix the lowering of variable array indexing to not lose write_masks.
Fixes glsl-complex-subscript on 965.
(cherry picked from commit c00bc13564)
2011-02-21 13:19:05 -08:00
Marek Olšák
231e72cdbd mesa: fix texture3D mipmap generation for UNSIGNED_BYTE_3_3_2
(cherry picked from commit d5a1325f81)
2011-02-16 20:53:39 +01:00
Bryce Harrington
da623c9c44 r300g: Null pointer check for buffer deref in gallium winsys
radeon_drm_bufmgr_create_buffer_from_handle() can return NULL buffers
sometimes (seen when alt-tabbing in compiz).  Avoid dereferencing the
buffer pointer in this case.

Ref.: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/691653
Also: https://bugzilla.redhat.com/show_bug.cgi?id=660143

Signed-off-by: Bryce Harrington <bryce@canonical.com>
2011-02-11 02:32:48 +01:00
Vinson Lee
175f3c9674 ralloc: Add missing va_end following va_copy.
(cherry picked from commit cde443e0b9)
2011-02-07 15:03:10 -08:00
Kenneth Graunke
4e4a9d4050 Remove the talloc sources from the Mesa repository.
(cherry picked from commit 1568b19e3b)
2011-02-07 15:02:30 -08:00
Kenneth Graunke
f7993b66a6 Remove talloc from the SCons build system.
(cherry picked from commit 1f4fbc56e52ff2215f7eac7fc84ef8d8a8ec3c2f)

Conflicts:
	src/gallium/targets/libgl-gdi/SConscript
	src/mesa/SConscript
2011-02-07 15:02:30 -08:00
Kenneth Graunke
7f1a7a26e0 Remove talloc from the make and automake build systems.
(cherry picked from commit d610a57c8c69a0197ac7c3d0b22be1b8f0dc446f)
2011-02-07 15:02:30 -08:00
Kenneth Graunke
cdcc5da9fe ralloc: a new MIT-licensed recursive memory allocator.
(cherry picked from commit 42fd9c2ebb)
2011-02-07 15:02:30 -08:00
Kenneth Graunke
5afd1d6ac2 Convert everything from the talloc API to the ralloc API.
(cherry-picked from 2ac83dba30dfe6f61b2c9639100acbb329ac4543)

Conflicts:
	src/glsl/ast_function.cpp
	src/glsl/glcpp/glcpp.c
	src/glsl/glsl_parser_extras.cpp
	src/glsl/ir.cpp
	src/glsl/ir.h
	src/glsl/ir_explog_to_explog2.cpp
	src/glsl/ir_mat_op_to_vec.cpp
	src/glsl/ir_sub_to_add_neg.cpp
	src/glsl/lower_texture_projection.cpp
	src/glsl/lower_variable_index_to_cond_assign.cpp
	src/glsl/lower_vector.cpp
	src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
	src/mesa/drivers/dri/i965/brw_fs.cpp
	src/mesa/drivers/dri/i965/brw_fs.h
	src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
	src/mesa/main/shaderapi.c
	src/mesa/main/shaderobj.h
	src/mesa/program/ir_to_mesa.cpp
	src/mesa/program/register_allocate.c
	src/mesa/program/sampler.cpp
2011-02-07 15:02:30 -08:00
Kenneth Graunke
c9954dab04 ralloc: Add a fake implementation of ralloc based on talloc.
(cherry picked from commit dc55254f5b)

Conflicts:
	src/glsl/SConscript
2011-02-07 15:02:30 -08:00
Kenneth Graunke
e33d9b48c4 glcpp: Remove use of talloc reference counting.
We almost always want to simply steal; we only need to copy when copying
a token list (in which case we're already cloning stuff anyway).

(cherry picked from commit 6ecee54a9a)
2011-02-07 15:02:30 -08:00
Kenneth Graunke
f5bef74066 glsl, i965: Remove unnecessary talloc includes.
These are already picked up by ir.h or glsl_types.h.

(cherry picked from commit e256e4743c)
2011-02-07 15:02:30 -08:00
Kenneth Graunke
5e8523895a glsl: Don't bother unsetting a destructor that was never set.
This was totally copied and pasted from glsl_symbol_table.

(cherry picked from commit 21031b4e88)
2011-02-07 15:02:29 -08:00
Ian Romanick
ccc11aacbb docs: Update 7.9.2 release notes
Add recent cherry picks for precision qualifers, linker bugs, and other issues.
2011-02-04 16:53:25 -08:00
Eric Anholt
9acbde11f5 i965/vs: When MOVing to produce ABS, strip negate of the operand.
We were returning the negative absolute value, instead of the absolute
value.  Fixes glsl-vs-abs-neg.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>

(cherry picked from commit 9351ef7a44)
2011-02-04 16:53:25 -08:00
Eric Anholt
6c6894eac7 docs: Add a relnote for the Civ IV on i965. 2011-02-04 16:53:24 -08:00
Eric Anholt
41d4af17a1 i965: Avoid double-negation of immediate values in the VS.
In general, we have to negate in immediate values we pass in because
the src1 negate field in the register description is in the bits3 slot
that the 32-bit value is loaded into, so it's ignored by the hardware.
However, the src0 negate field is in bits1, so after we'd negated the
immediate value loaded in, it would also get negated through the
register description.  This broke this VP instruction in the position
calculation in civ4:

MAD TEMP[1], TEMP[1], CONST[256].zzzz, CONST[256].-y-y-y-y;

Bug #30156
(cherry picked from commit 1d1ad6306d)
2011-02-04 16:53:24 -08:00
Chris Wilson
bf3932aad6 intel: Check for unsupported texture when finishing using as a render target
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32541
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit 8b9570e685)
2011-02-04 18:17:46 -06:00
Ian Romanick
2b1150170a linker: Propagate max_array_access while linking functions
Update the max_array_access of a global as functions that use that
global are pulled into the linked shader.

Fixes piglit test glsl-fs-implicit-array-size-01 and bugzilla #33219.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 0f4b2a0a23)
2011-02-04 15:18:20 -08:00
Ian Romanick
a46bc59b27 linker: Set sizes for non-global arrays as well
Previously only global arrays with implicit sizes would be patched.
This causes all arrays that are actually accessed to be sized.

Fixes piglit test glsl-fs-implicit-array-size-02.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit c87e9ef4d2)
2011-02-04 15:18:15 -08:00
Ian Romanick
1f34edbbde glsl: Don't assert when the value returned by a function has no rvalue
The rvalue of the returned value can be NULL if the shader says
'return foo();' and foo() is a function that returns void.

Existing GLSL specs do *NOT* say that this is an error.  The type of
the return value is void.  If the return type of the function is also
void, then this should compile without error.  I expect that future
versions of the GLSL spec will fix this (wink, wink, nudge, nudge).

Fixes piglit test glsl-1.10/compiler/expressions/return-01.vert and
bugzilla #33308.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 2db46fe5f0)
2011-02-04 15:18:06 -08:00
Kenneth Graunke
427d574920 glsl: Expose a public glsl_type::void_type const pointer.
This is analogous to glsl_type::int_type and all the others.
(cherry picked from commit 5c229e5fbd)
2011-02-04 15:18:00 -08:00
Chad Versace
13711c8a5a glsl: Mark 'in' variables at global scope as read-only
Fixes Piglit tests:
spec/glsl-1.30/compiler/storage-qualifiers/static-write-centroid-in-01.frag
spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-01.frag
spec/glsl-1.30/compiler/storage-qualifiers/static-write-in-02.frag

(cherry picked from commit 01a584d093)

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2011-02-04 15:16:56 -08:00
Chad Versace
3ddf406530 glsl: Fix segfault due to missing printf argument
Fixes the following Piglit tests:
glslparsertest/shaders/array2.frag
glslparsertest/shaders/dataType6.frag

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 46f7105df4)
2011-02-04 14:37:06 -08:00
Chad Versace
a246791c20 glsl: Fix semantic checks on precision qualifiers
The check for
   Precision qualifiers only apply to floating point and integer types.
was incomplete. It rejected only type 'bool' and structures.
(cherry picked from commit 45e8e6c6b1)
2011-02-04 14:36:23 -08:00
Ian Romanick
b481b8059d glsl: Refresh autogenerated lexer and parser files.
For the previous few commits.
2011-02-04 14:35:59 -08:00
Chad Versace
6fc2c15dbd glsl: Remove redundant semantic check in parser
The removed semantic check also exists in ast_type_specifier::hir(), which
is a more natural location for it.

The check verified that precision statements are applied only to types
float and int.
(cherry picked from commit a9bf8c12ee)
2011-02-04 14:33:50 -08:00
Chad Versace
f5819379ed glsl: Add support for default precision statements
* Add new field ast_type_specifier::is_precision_statement.
* Add semantic checks in ast_type_specifier::hir().
* Alter parser rules accordingly.
(cherry picked from commit 08a286c9cc)
2011-02-04 14:33:37 -08:00
Chad Versace
dbc19fe94c glsl: Add semantic checks for precision qualifiers
* Check that precision qualifiers only appear in language versions 1.00,
  1.30, and later.
* Check that precision qualifiers do not apply to bools and structs.

Fixes the following Piglit tests:
* spec/glsl-1.30/precision-qualifiers/precision-bool-01.frag
* spec/glsl-1.30/precision-qualifiers/precision-struct-01.frag
* spec/glsl-1.30/precision-qualifiers/precision-struct-02.frag

(cherry picked from commit 889e1a5b6c)

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2011-02-04 14:33:12 -08:00
Chad Versace
6292060193 glsl: Change default value of ast_type_specifier::precision
Change default value to ast_precision_none, which denotes the absence of
a precision of a qualifier.

Previously, the default value was ast_precision_high. This made it
impossible to detect if a precision qualifier was present or not.
(cherry picked from commit aaa31bf8f4)
2011-02-04 14:31:36 -08:00
Chad Versace
378910ab97 glsl: Fix parser rule for type_specifier
Do not assign a value to ast_type_specifier::precision when no precision
qualifier is present.
(cherry picked from commit 33279cd2d3)
2011-02-04 14:31:30 -08:00
Ian Romanick
2925a5a1f5 i965: Make OPCODE_KIL_NV do its work in a temp, not the null reg!
This is similar to commit 0efea25c in 7.10.  The change was made
directly in the 7.9 branch because the affected code does not exist in
Mesa 7.10 or later.  It was removed with the change to the new
fragment shader back-end.

Fixes the GPU hang in piglit test glsl-fs-discard-03.
2011-02-04 10:05:56 -08:00
Ian Romanick
b632543289 docs: Update 7.9.2 release notes
Replace "Fix an error in uniform arrays in row calculating" with the
actual bugzilla that was fixed.
2011-01-26 10:16:19 -08:00
Ian Romanick
9e15c878bb mesa: bump version to 7.9.2-devel 2011-01-25 16:27:22 -08:00
Ian Romanick
ab6c7bbf4e docs: Initial set of release notes for 7.9.2 2011-01-25 16:22:26 -08:00
Jian Zhao
e4c1bcacef mesa: fix an error in uniform arrays in row calculating.
Fix the error in uniform row calculating, it may alloc one line
more which may cause out of range on memory usage, sometimes program
aborted when free the memory.

NOTE: This is a candidate for 7.9 and 7.10 branches.

Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 2a7380e9c3)
2011-01-19 10:58:06 -08:00
Ian Romanick
179edc673b glsl: Allow 'in' and 'out' when 'layout' is also available
All of the extensions that add the 'layout' keyword also enable (and
required) the use of 'in' and 'out' with shader globals.

This is related to (piglit) bugzilla #31804.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

(cherry picked from commit 82c4b4f88a)
2011-01-19 10:50:35 -08:00
Ian Romanick
48e81e3b9e glsl: Track variable usage, use that to enforce semantics
In particular, variables cannot be redeclared invariant after being
used.

Fixes piglit test invariant-05.vert and bugzilla #29164.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

(cherry picked from commit bd33055ef4)
2011-01-19 10:48:39 -08:00
Ian Romanick
1785904c5c glsl: Disallow 'in' and 'out' on globals in GLSL 1.20
Fixes piglit tests glsl-1.20/compiler/qualifiers/in-01.vert and
glsl-1.20/compiler/qualifiers/out-01.vert and bugzilla #32910.

NOTE: This is a candidate for the 7.9 and 7.10 branches.  This patch
also depends on the previous two commits.

(cherry picked from commit 469ea695bb)
2011-01-19 10:47:32 -08:00
Ian Romanick
28d47fed61 glsl & glcpp: Refresh autogenerated lexer and parser files.
For the previous few commits.
2011-01-19 10:46:15 -08:00
Ian Romanick
df033be3f7 glsl: Add version_string containing properly formatted GLSL version
(cherry picked from commit eebdfdfbcf)
2011-01-19 10:43:03 -08:00
Ian Romanick
ef2f4b5469 glcpp: Generate an error for division by zero
When GCC encounters a division by zero in a preprocessor directive, it
generates an error.  Since the GLSL spec says that the GLSL
preprocessor behaves like the C preprocessor, we should generate that
same error.

It's worth noting that I cannot find any text in the C99 spec that
says this should be an error.  The only text that I can find is line 5
on page 82 (section 6.5.5 Multiplicative Opertors), which says,

    "The result of the / operator is the quotient from the division of
    the first operand by the second; the result of the % operator is
    the remainder. In both operations, if the value of the second
    operand is zero, the behavior is undefined."

Fixes 093-divide-by-zero.c test and bugzilla #32831.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 9ca5300b6e)
2011-01-19 10:42:55 -08:00
Chad Versace
8d1e0de5f7 glcpp: Fix segfault when validating macro redefinitions
In _token_list_equal_ignoring_space(token_list_t*, token_list_t*), add
a guard that prevents dereferncing a null token list.

This fixes test src/glsl/glcpp/tests/092-redefine-macro-error-2.c and
Bugzilla #32695.
(cherry picked from commit 4fff52f1c9)
2011-01-19 10:42:45 -08:00
Chad Versace
5f9c50053c glsl: At link-time, check that globals have matching centroid qualifiers
Fixes bug 31923: http://bugs.freedesktop.org/show_bug.cgi?id=31923
(cherry picked from commit 61428dd2ab)
2011-01-19 10:42:38 -08:00
Ian Romanick
7757980139 glsl: Support the 'invariant(all)' pragma
Previously the 'STDGL invariant(all)' pragma added in GLSL 1.20 was
simply ignored by the compiler.  This adds support for setting all
variable invariant.

In GLSL 1.10 and GLSL ES 1.00 the pragma is ignored, per the specs,
but a warning is generated.

Fixes piglit test glsl-invariant-pragma and bugzilla #31925.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

(cherry-picked from commit 86b4398cd1)
2011-01-19 10:42:00 -08:00
Brian Paul
dab59f70e6 draw: Fix an off-by-one bug in a vsplit assertion.
When use_spoken is true, istart (the first vertex of this segment) is
replaced by i0 (the spoken vertex of the fan).  There are still icount
vertices.

Thanks to Brian Paul for spotting this.
(cherry picked from commit abbb1c8f08)
2011-01-13 11:35:24 -07:00
Alberto Milone
4200c6bae4 r600c: add evergreen ARL support.
Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
2011-01-11 14:49:30 -05:00
Marek Olšák
67aeab0b77 docs: fix messed up names with special characters in relnotes-7.9.1 2011-01-08 02:54:51 +01:00
Ian Romanick
f912245ed1 docs: Add 7.9.1 md5sums 2011-01-07 13:31:30 -08:00
Ian Romanick
42a9472dc6 docs: Add change log to 7.9.1 release notes 2011-01-07 13:28:22 -08:00
Ian Romanick
234144b48d mesa: set version string to 7.9.1 2011-01-07 12:16:29 -08:00
Ian Romanick
3d90628138 docs: Initial set of release notes for 7.9.1 2011-01-07 12:12:55 -08:00
Marek Olšák
d0f0a6920b r300/compiler: disable the rename_regs pass for loops
This workaround fixes rendering of kwin thumbnails.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 8543902bfb)

Conflicts:

	src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
2011-01-07 07:25:12 +01:00
Chia-I Wu
110c49fddd egl: Check extensions.
Do not call into the driver if the extension for the called function is
not enabled.
(cherry picked from commit 6b2f1561ad)
2011-01-07 12:43:38 +08:00
Chia-I Wu
c438a09b4c egl_glx: Fix borken driver.
The driver was broken since 6eda3f311b.
All configs fail to pass _eglValidateConfig.  This fix might not be
complete, but at least EGL demos run.

This fixes bug #32825.
2011-01-05 18:54:44 +08:00
Brian Paul
0ab166d556 mesa: Bump the number of bits in the register index.
More than 1023 temporaries were being used for a Cinebench shader before
doing temporary optimization, causing the index value to wrap around to
-1024.
(cherry picked from commit a9fa0f3a2f)
2011-01-04 11:10:19 -07:00
Kenneth Graunke
b50658c804 i965: Internally enable GL_NV_blend_square on ES2.
Hopefully should fix bug #32520.
(cherry picked from commit 6bb1e4541e)
2011-01-04 09:50:14 -08:00
Kenneth Graunke
3c8dd6a8de Fix build on systems where "python" is python 3.
First, it changes autoconf to use a "python2" binary when available,
rather than plain "python" (which is ambiguous).  Secondly, it changes
the Makefiles to use $(PYTHON) $(PYTHON_FLAGS) rather than calling
python directly.

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: Matthew William Cox <matt@mattcox.ca>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 3acc826520)
2011-01-04 09:50:14 -08:00
Marek Olšák
801e26a02a mesa: fix texel store functions for some float formats
These are copy-paste errors obviously.
(cherry picked from commit bf7b6f60ae)
2011-01-04 09:50:14 -08:00
Ian Romanick
247774085c Refresh autogenerated file builtin_function.cpp.
See also a954dbeb.
2011-01-04 09:50:14 -08:00
Kenneth Graunke
d5d573b592 glsl/builtins: Compute the correct value for smoothstep(vec, vec, vec).
These mistakenly computed 't' instead of t * t * (3.0 - 2.0 * t).

Also, properly vectorize the smoothstep(float, float, vec) variants.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit d7423a6531)
2011-01-04 09:50:14 -08:00
Brian Paul
54c2846f23 st/mesa: fix renderbuffer pointer check in st_Clear()
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=30694

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit efbd33aff9)
2011-01-04 08:00:25 -07:00
Brian Paul
8941450010 tdfx: s/Format/_BaseFormat/
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31560
(cherry picked from commit d18df9e336)
2011-01-04 07:53:44 -07:00
Brian Paul
0ff45dd5d7 mesa: no-op glBufferSubData() on size==0
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31439

NOTE: this is a candidate for the 7.9 branch
(cherry picked from commit 6e2e136428)
2011-01-03 17:05:24 -08:00
Kenneth Graunke
4e7cdca57a Remove OES_compressed_paletted_texture from the ES2 extension list.
We don't support it.
(cherry picked from commit d0f8eea9a0)
2011-01-03 17:05:24 -08:00
Brian Paul
69cc356832 glsl: new glsl_strtod() wrapper to fix decimal point interpretation
We always want to use '.' as the decimal point.

See http://bugs.freedesktop.org/show_bug.cgi?id=24531

NOTE: this is a candidate for the 7.10 branch.

(cherry picked from commit bb10e081c8)
2011-01-03 17:05:24 -08:00
Ian Romanick
0d98ceb4bf ir_to_mesa: Don't generate swizzles for record derefs of non-scalar/vectors
This is the same as what the array dereference handler does.

Fixes piglit test glsl-link-struct-array (bugzilla #31648).

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit 2d577ee730)
2011-01-03 17:05:24 -08:00
Ian Romanick
40390b80e9 linker: Allow built-in arrays to have different sizes between shader stages
Fixes pitlit test glsl-link-varying-TexCoord (bugzilla #31650).
(cherry picked from commit cb2b547a47)
2011-01-03 17:05:24 -08:00
Henri Verbeet
7ffeced927 st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().
(cherry picked from commit 59051ad443)
2010-12-31 07:51:53 +01:00
Henri Verbeet
b8c16ee7b1 r600: Evergreen has two extra frac_bits for the sampler LOD state.
Note: this is a candidate for the 7.9 branch.
(cherry picked from commit 228d0d1153)
2010-12-31 07:51:49 +01:00
Brian Paul
f5435ec3a9 st/mesa: fix mipmap generation bug
In st_finalize_texture() we were looking at the st_texture_object::
lastLevel field instead of the pipe_resource::last_level field to
determine which resource to store the mipmap in.

Then, in st_generate_mipmap() we need to call st_finalize_texture() to
make sure the destination resource is properly allocated.

These changes fix the broken piglit fbo-generatemipmap-formats test.
(cherry picked from commit cae2bb76c1)
2010-12-30 17:40:07 +01:00
richard
a3740ba31e r600c : inline vertex format is not updated in an app, switch to use vfetch constants. For the 7.9 and 7.10 branches as well. 2010-12-29 10:54:44 -05:00
Alex Deucher
166da97889 r600c: fix some opcodes on evergreen
There were a few places where we were using the wrong opcodes
on evergreen.  arl still needs to be fixed on evergreen; see
r600g for reference.

NOTE: This is a candidate for the 7.9 branch.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-12-29 10:54:14 -05:00
Luca Barbieri
2fb170c90f glsl: Unroll loops with conditional breaks anywhere (not just the end)
Currently we only unroll loops with conditional breaks at the end, which is
the form that lower_jumps generates.

However, if breaks are not lowered, they tend to appear at the beginning, so
add support for a conditional break anywhere.

Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 0e50c21e24)
2010-12-27 13:12:20 -08:00
Kenneth Graunke
4f2f3440d0 glsl: Consider the "else" branch when looking for loop breaks.
Found this bug by code inspection.  Based off the comments just before
this code, the intent is to find whether the break exists in the "then"
branch or the "else" branch.  However, the code actually looked at the
last instruction in the "then" branch twice.
(cherry picked from commit 13c45c590b)
2010-12-27 13:12:12 -08:00
Kenneth Graunke
760288bec1 glsl: Clean up code by adding a new is_break() function.
(cherry picked from commit 528fa8ce32)
2010-12-27 13:12:04 -08:00
Eric Anholt
84e7dd0114 glsl: Correct the marking of InputsRead/OutputsWritten on in/out matrices.
If you used a constant array index to access the matrix, we'd flag a
bunch of wrong inputs/outputs as being used because the index was
multiplied by matrix columns and the actual used index was left out.

Fixes glsl-mat-attribute.
(cherry picked from commit b13a2e640f)
2010-12-27 13:11:54 -08:00
Fabian Bieler
9d1c6dd79b glsl: fix lowering conditional returns in subroutines
this fix applies to the lower_sub_return 'branch' of the lower_jumps pass

Fixes piglit tests glsl-functions-5 and glsl-functions-6.
(cherry picked from commit ef534f3838)
2010-12-27 13:11:26 -08:00
Chia-I Wu
47552b2c66 mesa: Do not advertise GL_OES_texture_3D.
GL_OES_texture_3D has a GLSL counterpart.  Since it is not implemented,
GL_OES_texture_3D should not be advertised.
(cherry picked from commit d2028ba339)
2010-12-27 13:11:26 -08:00
Ian Romanick
edfe057f94 linker: Fix regressions caused by previous commit
That's what I get for not running piglit before pushing.

Don't try to patch types of unsized arrays when linking fails.

Don't try to patch types of unsized arrays that are shared between
shader stages.
(cherry picked from commit 002cd2c8d4)
2010-12-27 13:11:26 -08:00
Ian Romanick
a4cda571f0 linker: Ensure that unsized arrays have a size after linking
Fixes piglit test case glsl-vec-array (bugzilla #31908).

NOTE: This bug does not affect 7.9, but I think this patch is a
candiate for the 7.9 branch anyway.
(cherry picked from commit 6f53921c4b)
2010-12-27 13:09:26 -08:00
Eric Anholt
ecb68d51aa i965: Correct the dp_read message descriptor setup on g4x.
It's mostly like gen4 message descriptor setup, except that the sizes
of type/control changed to be like gen5.  Fixes 21 piglit cases on
gm45, including the regressions in bug #32311 from increased VS
constant buffer usage.
(cherry picked from commit 5dc53444c8)
2010-12-23 14:27:11 -08:00
Marek Olšák
be1f4cfd96 r300g: finally fix the texture corruption on r3xx-r4xx
Even though a bound texture stays bound when calling set_fragment_sampler_views,
it must be assigned a new cache region depending on the occupancy of other
texture units.

This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=28800

Thanks to Álmos <aaalmosss@gmail.com> for finding the bug in the code.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.
(cherry picked from commit daffaca53e)

Conflicts:

	src/gallium/drivers/r300/r300_state.c
2010-12-18 10:17:52 +01:00
Ian Romanick
7b6b66d617 glsl: Inherrit type of declared variable from initializer after processing assignment
do_assignment may apply implicit conversions to coerce the base type
of initializer to the base type of the variable being declared.  Fixes
piglit test glsl-implicit-conversion-02 (bugzilla #32287).  This
probably also fixes bugzilla #32273.

NOTE: This is a candidate for the 7.9 branch and the 7.10 branch.
(cherry picked from commit d7f27e2e76)

Conflicts:

	src/glsl/ast_to_hir.cpp
2010-12-17 13:51:46 -08:00
Ian Romanick
2b4277dcf3 glsl: Inherrit type of declared variable from initializer
Types of declared variables and their initializer must match excatly
except for unsized arrays.  Previously the type inherritance for
unsized arrays happened implicitly in the emitted assignment.
However, this assignment is never emitted for uniforms.  Now that type
is explicitly copied unconditionally.

Fixes piglit test array-compare-04.vert (bugzilla #32035) and
glsl-array-uniform-length (bugzilla #31985).

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit b0fc5103cb)
2010-12-17 13:51:46 -08:00
Ian Romanick
585fa612c9 glcpp: Commit changes in generated files cause by previous commit 2010-12-17 13:51:45 -08:00
Kenneth Graunke
b8e73354d9 glcpp: Don't emit SPACE tokens in conditional_tokens production.
Fixes glslparsertest defined-01.vert.

Reported-by: José Fonseca <jfonseca@vmware.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Carl Worth <cworth@cworth.org>
(cherry picked from commit 800eed6765)
2010-12-17 13:14:25 -08:00
Eric Anholt
154d0a3e7e mesa: Add getters for ARB_copy_buffer's attachment points.
Fixes more complaints by oglconform.
(cherry picked from commit 43491adc44)
2010-12-17 12:58:15 -08:00
Eric Anholt
7c0ff4a5df mesa: Add getters for the rest of the supported draw buffers.
MAX_DRAW_BUFFERS is 8, so allow all 8 GL_DRAW_BUFFER# to be retrieved.
Fixes complaints by oglconform.
(cherry picked from commit 7cba339375)
2010-12-17 12:57:57 -08:00
Eric Anholt
d192179605 glsl: Fix flipped return of has_value() for array constants.
Fixes glsl-array-uniform.
(cherry picked from commit b381eff141)
2010-12-17 12:57:35 -08:00
Chad Versace
b2cd388b79 glsl: Fix linker bug in cross_validate_globals()
Cause linking to fail if a global has mismatching invariant qualifiers.

See https://bugs.freedesktop.org/show_bug.cgi?id=30261
(cherry picked from commit 7528f143df)
2010-12-17 12:56:40 -08:00
Aras Pranckevicius
bb2cd98e51 glsl: fix matrix type check in ir_algebraic
Fixes glsl-mat-mul-1.
(cherry picked from commit 4ce084c707)
2010-12-16 17:11:50 -08:00
Ian Romanick
d9d4f22e65 glsl: Ensure that equality comparisons don't return a NULL IR tree
This fixes bugzilla #32035 and piglit test case array-compare-01 and
array-compare-02.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 6d36be508f)
2010-12-16 17:11:50 -08:00
Eric Anholt
d347b90b94 glsl: Mark the array access for whole-array comparisons.
By not doing so, the uniform contents of
glsl-uniform-non-uniform-array-compare.shader_test was getting thrown
out since nobody was recorded as dereferencing the array.
(cherry picked from commit b4f585665c)
2010-12-16 17:11:50 -08:00
Eric Anholt
23a868930c glsl: Quiet unreachable no-return-from-function warning.
(cherry picked from commit d56c97413e)
2010-12-16 16:56:51 -08:00
Eric Anholt
1e88b3461a glsl: Fix structure and array comparisions.
We were trying to emit a single ir_expression to compare the whole
thing.  The backends (ir_to_mesa.cpp and brw_fs.cpp so far) expected
ir_binop_any_nequal or ir_binop_all_equal to apply to at most a vector
(with matrices broken down by the lowering pass).  Break them down to
a bunch of ORed or ANDed any_nequals/all_equals.

Fixes:
glsl-array-compare
glsl-array-compare-02
glsl-fs-struct-equal
glsl-fs-struct-notequal
Bug #31909
(cherry picked from commit ff79633d9f)
2010-12-16 16:56:51 -08:00
Eric Anholt
573c78803d glsl: Add a helper constructor for expressions that works out result type.
This doesn't cover all expressions or all operand types, but it will
complain if you overreach and it allows for much greater slack on the
programmer's part.
(cherry picked from commit 6b937465d4)

The new constructors required some changes because the
ir_quadop_vector changes were not cherry picked over from master.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-12-16 16:56:51 -08:00
Ian Romanick
5650cc462d glsl: Add unary ir_expression constructor
(cherry picked from commit 13f57d42b6)
2010-12-16 16:56:51 -08:00
Vinson Lee
54a596e34a glsl: Fix 'control reaches end of non-void function' warning.
Fix this GCC warning.
ir.cpp: In static member function
'static unsigned int ir_expression::get_num_operands(ir_expression_operation)':
ir.cpp:199: warning: control reaches end of non-void function
(cherry picked from commit 855c66bde7)
2010-12-16 16:56:51 -08:00
Kenneth Graunke
2127692542 glsl: Refactor get_num_operands.
This adds sentinel values to the ir_expression_operation enum type:
ir_last_unop, ir_last_binop, and ir_last_opcode.  They are set to the
previous one so they don't trigger "unhandled case in switch statement"
warnings, but should never be handled directly.

This allows us to remove the huge array of 1s and 2s in
ir_expression::get_num_operands().
(cherry picked from commit 007f488150)
2010-12-16 16:56:40 -08:00
Ian Romanick
0795cb71fc i915: Correctly generate unconditional KIL instructions
Fixes piglit test glsl-fs-discard-03.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit c92550be64)
2010-12-16 10:34:59 -08:00
Kenneth Graunke
cefccebd89 glsl: Remove "discard" support from lower_jumps.
The new lower_discard and opt_discard_simplification passes should
handle all the necessary transformations, so lower_jumps doesn't need to
support it.

Also, lower_jumps incorrectly handled conditional discards - it would
unconditionally truncate all code after the discard.  Rather than fixing
the bug, simply remove the code.

NOTE: This is a candidate for the 7.9 branch.
2010-12-16 10:34:59 -08:00
Ian Romanick
927c752dd6 glsl: Add a lowering pass to move discards out of if-statements.
This should allow lower_if_to_cond_assign to work in the presence of
discards, fixing bug #31690 and likely #31983.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 940df10100)
2010-12-16 10:34:59 -08:00
Marek Olšák
0b4287a687 ir_to_mesa: Add support for conditional discards.
NOTE: This is a candidate for the 7.9 branch.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit ead2ea89f4)
2010-12-16 10:34:59 -08:00
Ian Romanick
69d19cb84b glsl: Add an optimization pass to simplify discards.
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 9a1d063c6d)
2010-12-16 10:34:59 -08:00
Ian Romanick
0ab2bb8270 glsl/linker: Free any IR discarded by optimization passes.
Previously, IR for a linked shader was allocated directly out of the
gl_shader object - meaning all of it lived as long as the shader.

Now, IR is allocated out of a temporary context, and any -live- IR is
reparented/stolen to (effectively) the gl_shader.  Any remaining IR can
be freed.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 2da02e75b1)
2010-12-16 10:34:59 -08:00
Kenneth Graunke
1e2e387a15 glsl: Add a virtual as_discard() method.
NOTE: This is candidate for the 7.9 branch.
(cherry picked from commit 1eb7a81f2e)
2010-12-16 10:34:59 -08:00
Marek Olšák
dcc7a8a80a r300g: fix rendering with a vertex attrib having a zero stride
The hardware apparently does support a zero stride, so let's use it.

This fixes missing objects in ETQW, but might also fix a ton of other
similar-looking bugs.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.
(cherry picked from commit 2af8a19831)
2010-12-16 16:55:59 +01:00
Marek Olšák
0a8ad737e7 r300/compiler: fix swizzle lowering with a presubtract source operand
If a source operand has a non-native swizzle (e.g. the KIL instruction
cannot have a swizzle other than .xyzw), the lowering pass uses one or more
MOV instructions to move the operand to an intermediate temporary with
native swizzles.

This commit fixes that the presubtract information was lost during
the lowering.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.
(cherry picked from commit d0990db6bd)
2010-12-16 16:55:16 +01:00
Dave Airlie
4b19941399 r300g: fixup rs690 tiling stride alignment calculations.
The RS690 memory controller prefers things to be on a different
boundary than the discrete GPUs, we had an attempt to fix this,
but it still failed, this consolidates the stride calculation
into one place and removes the really special case check.

This fixes gnome-shell and 16 piglit tests on my rs690 system.

NOTE: This is a candidate for both the 7.9 and 7.10 branches.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 32218e4cc8)
2010-12-16 18:15:25 +10:00
Ian Romanick
1cfd517b15 i915: Disallow alpha, red, RG, and sRGB as render targets
Fixes bugzilla #31832

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 78a340fd48)
2010-12-15 15:11:01 -08:00
Eric Anholt
a0d5da96b5 i965: Add support for rendering to SARGB8 FBOs.
Tested with fbo-generatemipmap-formats GL_EXT_texture_srgb.  The test
still fails on SLA8, though.
(cherry picked from commit 1946b81e70)
2010-12-15 14:39:58 -08:00
Kenneth Graunke
50ec3c74e3 glsl: Don't inline function prototypes.
Currently, the standalone compiler tries to do function inlining before
linking shaders (including linking against the built-in functions).
This resulted in the built-in function _prototypes_ being inlined rather
than the actual function definition.

This is only known to fix a bug in the standalone compiler; most
programs should be unaffected.  Still, it seems like a good idea.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit e8a24c65bc)
2010-12-15 14:38:37 -08:00
Kenneth Graunke
d595657e5a glsl: Use do_common_optimization in the standalone compiler.
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit a82592de92)
2010-12-15 14:38:37 -08:00
Ian Romanick
c055239bae mesa: Fix glGet of ES2's GL_MAX_*_VECTORS properties.
Previously, the get table listed all three as having custom locations,
yet find_custom_value did not have cases to handle them.

MAX_VARYING_VECTORS does not need a custom location since MaxVaryings is
already stored as float[4] (or vec4).  MaxUniformComponents is stored as
the number of floats, however, so a custom implementation that divides
by 4 is necessary.

Fixes bugs.freedesktop.org #31495.
(cherry picked from commit 1197393faa)

Conflicts:

	src/mesa/main/get.c

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-12-15 14:38:37 -08:00
Kristian Høgsberg
6b96b002c8 i965: Don't write mrf assignment for pointsize output
https://bugs.freedesktop.org/show_bug.cgi?id=31894
(cherry picked from commit a889f9ee5c)
2010-12-15 14:38:37 -08:00
Ian Romanick
ce8f4f266e glsl: better handling of linker failures
Upon link error, exit translation loop, free program instructions.
Check for null pointers in calling code.
(cherry picked from commit 6162773ea4)
2010-12-15 14:25:42 -08:00
Brian Paul
e0dbd44a00 glsl: fix off by one in register index assertion
(cherry picked from commit 50fd99d172)
2010-12-15 14:24:09 -08:00
Kenneth Graunke
67b7a3844a glsl: Fix constant expression handling for <, >, <=, >= on vectors.
ir_binop_less, ir_binop_greater, ir_binop_lequal, and ir_binop_gequal
are defined to work on vectors as well as scalars, as long as the two
operands have the same type.

This is evident from both ir_validate.cpp and our use of these opcodes
in the GLSL lessThan, greaterThan, lessThanEqual, greaterThanEqual
built-in functions.

Found by code inspection.  Not known to fix any bugs.  Presumably, our
tests for the built-in comparison functions must pass because C.E.
handling is done on the ir_call of "greaterThan" rather than the inlined
opcode.  The C.E. handling of the built-in function calls is correct.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit e16c9d5d03)
2010-12-15 14:19:16 -08:00
Chad Versace
69cc62b907 glsl: Fix erroneous cast in ast_jump_statement::hir()
Return values were erroneously cast from (ir_rvalue*) to (ir_expression*).

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit b4cdba687c)
2010-12-15 14:19:07 -08:00
Kenneth Graunke
8c8c1b2c99 glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.
This is really supposed to be defined only if the driver supports highp
in the fragment shader - but all of our current ES2 implementations do.
So, just define it.  In the future, we'll need to add a flag to
gl_context and only define the macro if the flag is set.

"Fixes" freedesktop.org bug #31673.
(cherry picked from commit d719bf8fb4)
2010-12-15 14:18:01 -08:00
Kenneth Graunke
9b8e56a502 glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30.
Per section 4.5.4 of the GLSL 1.30 specification.
(cherry picked from commit 3fb83038a0)
2010-12-15 14:17:51 -08:00
Robert Hooker
5a8d1d5b72 egl_dri2: Add missing intel chip ids.
Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
(cherry picked from commit 778917069c)
2010-12-15 14:17:29 -08:00
Robert Hooker
029252a448 intel: Add a new B43 pci id.
Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
(cherry picked from commit e8b2d36723)
2010-12-15 14:17:11 -08:00
Peter Clifton
4b30da86a7 intel: Fix emit_linear_blit to use DWORD aligned width blits
The width of the 2D blits used to copy the data is defined as a 16-bit
signed integer, but the pitch must be DWORD aligned. Limit to an integral
number of DWORDs, (1 << 15 - 4) rather than (1 << 15 -1).

Fixes corruption to data uploaded with glBufferSubData.

Signed-off-by: Peter Clifton <pcjc2@cam.ac.uk>
(cherry picked from commit 10b9e018ca)
2010-12-15 12:39:53 -08:00
Eric Anholt
da5d6c42c0 i965: Allow OPCODE_SWZ to put immediates in the first arg.
Fixes assertion failure with texture swizzling in the GLSL path when
it's triggered (such as gen6 FF or ARB_fp shadow comparisons).

Fixes:
texdepth
texSwizzle
fp1-DST test
fp1-LIT test 3
(cherry picked from commit f00929cbdd)
2010-12-15 12:36:01 -08:00
Eric Anholt
0c56721cfc glsl: Free the loop state context when we free the loop state.
Since this was talloced off of NULL instead of the compile state, it
was a real leak over the course of the program.  Noticed with
valgrind --leak-check=full --show-reachable=yes.  We should really
change these passes to generally get the compile context as an argument
so simple mistakes like this stop mattering.
(cherry picked from commit 6929cdd14b)
2010-12-15 12:26:59 -08:00
Aras Pranckevicius
6333f1d224 glsl: fix crash in loop analysis when some controls can't be determined
Fixes loop-07.frag.
(cherry picked from commit d67df5dd9d)
2010-12-15 12:26:34 -08:00
Ian Romanick
639e65e054 mesa: Allow query of MAX_SAMPLES with EXT_framebuffer_multisample
Previously queries of MAX_SAMPLES were only allowed with
ARB_framebuffer_object, but EXT_framebuffer_multisample also enables
this query.  This seems to only effect the i915.  All other drivers
support both extensions or neither extension.

This patch is based on a patch that Kenneth sent along with the report.

NOTE: this is a candidate for the 7.9 branch.

Reported-by: Kenneth Waters <kwaters@chromium.org>
(cherry picked from commit bcef51c3b8)
2010-12-15 12:26:19 -08:00
Ian Romanick
8454f931d6 glsl: Fix incorrect gl_type of sampler2DArray and sampler1DArrayShadow
NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit 956ae44dcf)
2010-12-15 12:24:45 -08:00
Chad Versace
0da1c7b90f glsl: Fix ir_expression::constant_expression_value()
When the type of the ir_expression is error_type, return NULL.
This fixes bug 31371.
(cherry picked from commit b62c1c4595)
2010-12-15 12:24:25 -08:00
Kenneth Graunke
6e5907c390 ir_dead_functions: Actually free dead functions and signatures.
This makes linked shaders use around 36k less memory since the
built-in prototypes are now freed.
(cherry picked from commit a457ca7844)
2010-12-15 12:24:15 -08:00
Francisco Jerez
4c1db8c7a4 meta: Don't try to disable cube maps if the driver doesn't expose the extension.
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 8eaa97592a)
2010-12-15 12:20:20 -08:00
Francisco Jerez
edd9b9350e meta: Fix incorrect rendering of the bitmap alpha component.
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 7831994868)
2010-12-15 12:19:02 -08:00
Francisco Jerez
5c71690096 meta: Don't leak alpha function/reference value changes.
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit d846362389)
2010-12-15 12:18:44 -08:00
Ian Romanick
44df2b0844 mesa: Make metaops use program refcounts instead of names.
Fixes failure on restoring state when the program was active but
deleted, and the name no longer exists.

Bug #31194
(cherry picked from commit a974949f3b)

Conflicts:

	src/mesa/drivers/common/meta.c
	src/mesa/main/shaderapi.c
	src/mesa/main/shaderapi.h

This required substantial edits because the 7.9 branch doesn't have
the EXT_separate_shader_objects changes.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-12-15 12:17:00 -08:00
Brian Paul
5b28db24ff mesa, st/mesa: disable GL_ARB_geometry_shader4
The new GLSL compiler doesn't support geom shaders yet so disable the
GL_ARB_geometry_shader4 extension.  Undo this when geom shaders work again.

NOTE: This is a candidate for the 7.10 branch.

(cherry picked from commit bb7c2691d2)
2010-12-14 16:29:52 -07:00
Brian Paul
2f4af9e37b tnl: a better way to initialize the gl_program_machine memory
This improves commit ef3f7e61b3

NOTE: This is a candidate for the 7.9 and 7.10 branches.

(cherry picked from commit 6577f753b2)
2010-12-14 16:29:39 -07:00
Brian Paul
34e0da8e73 tnl: Initialize gl_program_machine memory in run_vp.
Fixes piglit valgrind glsl-array-bounds-04 failure (FDO bug 29946).

NOTE:
This is a candidate for the 7.10 branch.
This is a candidate for the 7.9 branch.

(cherry picked from commit ef3f7e61b3)
2010-12-14 16:29:06 -07:00
Brian Paul
1ee289960f mesa: test for cube map completeness in glGenerateMipmap()
The texture is not cube complete if the base level images aren't of
the same size and format.

NOTE: This is a candidate for the 7.9 branch.

(cherry picked from commit ecb7cc3319)
2010-12-14 16:28:14 -07:00
Brian Paul
22ba37aae2 mesa: make glGet*(GL_NONE) generate GL_INVALID_ENUM
In find_value() check if we've hit the 0th/invalid entry before checking
if the pname matches.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31987

NOTE: This is a candidate for the 7.9 branch.

(cherry picked from commit 503983b09e)
2010-12-14 16:27:35 -07:00
Brian Paul
3b200dd3c5 mesa: return GL_FRAMEBUFFER_DEFAULT as FBO attachment type
If querying the default/window-system FBO's attachment type, return
GL_FRAMEBUFFER_DEFAULT (per the GL_ARB_framebuffer_object spec).

See http://bugs.freedesktop.org/show_bug.cgi?id=31947

NOTE: This is a candidate for the 7.9 branch.

(cherry picked from commit 6d13ec7dc0)
2010-12-14 16:26:30 -07:00
Brian Paul
5f05ade503 mesa: fix GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query
Return 0 instead of generating an error.

See http://bugs.freedesktop.org/show_bug.cgi?id=30993

Note that piglit fbo-getframebufferattachmentparameter-01 still does
not pass.  But Mesa behaves the same as the NVIDIA driver in this case.
Perhaps the test is incorrect.

NOTE: This is a candidate for the 7.9 branch.

(cherry picked from commit 20cf1851d8)
2010-12-14 16:26:14 -07:00
Ian Romanick
9ef05d27a6 glsl: Commit lexer files changed by previous cherry picking 2010-12-14 13:10:14 -08:00
Kenneth Graunke
1d63a77177 glsl: Fix constant component count in vector constructor emitting.
Fixes freedesktop.org bug #31101 as well as piglit test cases
assignment-type-mismatch.vert and constructor-28.vert.
(cherry picked from commit ba2382f50d)
2010-12-14 11:55:55 -08:00
Chad Versace
554dbaa8a0 glsl: Fix ast-to-hir for ARB_fragment_coord_conventions
Function ast_declarator_list::hir(), when processing keywords added by
extension ARB_fragment_coord_conventions, made the mistake of checking only if
the extension was __supported by the driver__. The correct behavior is to check
if the extensi0n is __enabled in the parse state__.

NOTE: this is a candidate for the 7.9 branch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 6e00627384)
2010-12-14 11:55:55 -08:00
Kenneth Graunke
1c089271fd generate_builtins.py: Output large strings as arrays of characters.
This works around MSVC's 65535 byte limit, unfortunately at the expense
of any semblance of readability and much larger file size.  Hopefully I
can implement a better solution later, but for now this fixes the build.
(cherry picked from commit 2cacaf6e7b)
2010-12-14 11:55:54 -08:00
Kenneth Graunke
2c57c020a3 glcpp: Return NEWLINE token for newlines inside multi-line comments.
This is necessary for the main compiler to get correct line numbers.
(cherry picked from commit bd55ba568b)
2010-12-14 11:55:54 -08:00
Ian Romanick
2f398485f2 linker: Improve handling of unread/unwritten shader inputs/outputs
Previously some shader input or outputs that hadn't received location
assignments could slip through.  This could happen when a shader
contained user-defined varyings and was used with either
fixed-function or assembly shaders.

See the piglit tests glsl-[fv]s-user-varying-ff and
sso-user-varying-0[12].

NOTE: this is a candidate for the 7.9 branch.

(cherry picked from commit cc90e62d70)
2010-12-14 11:55:54 -08:00
Ian Romanick
e5ad6c3366 glsl: Slightly change the semantic of _LinkedShaders
Previously _LinkedShaders was a compact array of the linked shaders
for each shader stage.  Now it is arranged such that each slot,
indexed by the MESA_SHADER_* defines, refers to a specific shader
stage.  As a result, some slots will be NULL.  This makes things a
little more complex in the linker, but it simplifies things in other
places.

As a side effect _NumLinkedShaders is removed.

NOTE: This may be a candidate for the 7.9 branch.  If there are other
patches that get backported to 7.9 that use _LinkedShader, this patch
should be cherry picked also.

(cherry picked from commit 3322fbaf3b)
2010-12-14 11:55:54 -08:00
Chad Versace
1c15fb4414 glsl: Fix lexer rule for ^=
The caret is a special character, and needs to be quoted or escaped.
(cherry picked from commit cba9062d58)
2010-12-14 11:55:54 -08:00
Ian Romanick
a138a59966 mesa: Refactor validation of shader targets
Actually validate that the implementation supports the particular
shader target as well.  Previously if a driver only supported vertex
shaders, for example, glCreateShaderObjectARB would gladly create a
fragment shader.

NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit 5cb24c4a75)
2010-12-14 11:55:54 -08:00
Ian Romanick
6fc544dd50 linker: Reject shaders that have unresolved function calls
This really amounts to just using the return value from
link_function_calls.  All the work was being done, but the result was
being ignored.

Fixes piglit test link-unresolved-funciton.

NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit 4a45595cf3)
2010-12-14 11:55:54 -08:00
Eric Anholt
42e9750975 intel: Allow CopyTexSubImage to InternalFormat 3/4 textures, like RGB/RGBA.
The format selection of the CopyTexSubImage is pretty bogus still, but
this at least avoids software fallbacks in nexuiz, bringing
performance from 7.5fps to 12.8fps on my machine.
(cherry picked from commit 3316a54205)
2010-12-14 11:55:54 -08:00
Ian Romanick
72a3bddb24 mesa: Validate assembly shaders when GLSL shaders are used
If an GLSL shader is used that does not provide all stages and
assembly shaders are provided for the missing stages, validate the
assembly shaders.

Fixes bugzilla #30787 and piglit tests glsl-invalid-asm0[12].

NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit b2b9b22c10)
2010-12-14 11:55:54 -08:00
Tom Stellard
e8bc8d6a5c r300/compiler: Don't allow presubtract sources to be remapped twice
https://bugs.freedesktop.org/show_bug.cgi?id=31193

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 4265c2f819)
2010-12-10 11:07:24 -08:00
Alex Deucher
dc4956922d gallium/egl: fix r300 vs r600 loading
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=31841
2010-12-07 10:59:20 +10:00
Marek Olšák
b486197013 st/mesa: initialize key in st_vp_varient
This fixes endless vertex shader recompilations in find_translated_vp
if the shader contains an edge flag output.

NOTE: This is a candidate for the 7.9 branch.

Signed-off-by Brian Paul <brianp@vmware.com>
(cherry picked from commit c0c929cdac)
2010-12-06 22:44:04 +01:00
Marek Olšák
2cb8522523 mesa, st/mesa: fix gl_FragCoord with FBOs in Gallium
gl_FragCoord.y needs to be flipped upside down if a FBO is bound.

This fixes:
- piglit/fbo-fragcoord
- https://bugs.freedesktop.org/show_bug.cgi?id=29420

Here I add a new program state STATE_FB_WPOS_Y_TRANSFORM, which is set based
on whether a FBO is bound. The state contains a pair of transformations.
It can be either (XY=identity, ZW=transformY) if a FBO is bound,
or (XY=transformY, ZW=identity) otherwise, where identity = (1, 0),
transformY = (-1, height-1).

A classic driver (or st/mesa) may, based on some other state, choose whether
to use XY or ZW, thus negate the conditional "if (is a FBO bound) ...".
The reason for this is that a Gallium driver is allowed to only support WPOS
relative to either the lower left or the upper left corner, so we must flip
the Y axis accordingly again. (the "invert" parameter in emit_wpos_inversion)

NOTE: This is a candidate for the 7.9 branch.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit d531f9c2f5)
2010-12-06 22:43:15 +01:00
Brian Paul
564a6a15fe llvmpipe: fix broken stencil writemask
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32070
(cherry picked from commit dbf996f308)

Conflicts:

	src/gallium/drivers/llvmpipe/lp_bld_depth.c
2010-12-03 09:47:23 -07:00
Marek Olšák
7d280a3bbe r300g: disable ARB_texture_swizzle if S3TC is enabled on r3xx-only
r3xx cannot swizzle compressed textures. r4xx+ is unaffected.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit fcf6b353bf)
2010-12-01 23:56:56 +01:00
Marek Olšák
988a35c7f7 r300g: fix texture swizzling with compressed textures on r400-r500
This fixes all S3TC piglit/texwrap tests.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 6478a4de14)
2010-12-01 23:56:56 +01:00
Marek Olšák
4e7548aafc r300g: fix texture border color once again
I made the texwrap test be more thorough and realized that this driver code
had not been quite right. This commit fixes the border color for depth
textures, compressed textures, and 16-bits-per-channel textures
with up to 2 channels (R16, RG16).

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 1f1375d4d8)
2010-12-01 23:56:55 +01:00
Marek Olšák
277655d7fa r300/compiler: fix rc_rewrite_depth_out for it to work with any instruction
It looks like the function was originally written for ARB_fragment_program.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit ae3e58d973)
2010-12-01 23:56:55 +01:00
Marek Olšák
d42db5b738 r300g: fix rendering with no vertex elements
Fixes glsl-vs-point-size, although I meant to fix glsl-novertexdata.
Since swrast fails glsl-novertexdata too, I guess it's a core issue.
(cherry picked from commit ffb732d8bd)
2010-12-01 23:56:51 +01:00
Marek Olšák
62f2b7e759 r300g: fix texture border color for all texture formats
This fixes 8 texwrap format tests.
The code should handle arbitrary formats now and is cleaner.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 7e2256688a)
2010-12-01 23:38:52 +01:00
Marek Olšák
44ba61c518 r300g: add a default channel ordering of texture border for unhandled formats
It should fix the texture border for compressed textures.
Broken since 8449a4772a.
(cherry picked from commit 676c3f08bd)

Conflicts:

	src/gallium/drivers/r300/r300_state_derived.c
2010-12-01 23:38:36 +01:00
Marek Olšák
1c746ba9d4 r300g: fix texture border for 16-bits-per-channel formats
This is kinda hacky, but it's hard to come up with a generic solution for
all formats when only a few are used in practice (I mostly get B8G8R8*8).
(cherry picked from commit 8449a4772a)
2010-12-01 23:34:59 +01:00
Marek Olšák
c9661d695b r300g: fix microtiling for 16-bits-per-channel formats
(cherry picked from commit d0408cf55d)
2010-12-01 23:33:33 +01:00
Brian Paul
aa7bf2d88e mesa: check for posix_memalign() errors
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit b1097607db)
2010-11-29 09:21:26 -07:00
Brian Paul
9d644e7b95 st/mesa: fix mapping of zero-sized buffer objects
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31934

(cherry picked from commit 97ae4dad1c)
2010-11-26 13:53:33 -07:00
Brian Paul
54047fcd8d meta: Mask Stencil.Clear against stencilMax in _mesa_meta_Clear
This fixes incorrect behaviour when the stencil clear value exceeds
the size of the stencil buffer, for example, when set with:

glClearStencil (~1); /* Set a bit pattern of 111...11111110 */
glClear (GL_STENCIL_BUFFER_BIT);

The clear value needs to be masked by the value 2^m - 1, where m is the
number of bits in the stencil buffer. Previously, we passed the value
masked with 0x7fffffff to _mesa_StencilFuncSeparate which then clamps,
NOT masks the value to the range 0 to 2^m - 1.

The result would be clearing the stencil buffer to 0xff, rather than 0xfe.

Signed-off-by: Peter Clifton <pcjc2@cam.ac.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit ee88727df8)
2010-11-24 12:16:44 -07:00
Thomas Hellstrom
bcdd93e3a7 gallium/targets: Trivial crosscompiling fix
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-23 11:43:52 +01:00
Thomas Hellstrom
75065b0b55 svga/drm: Optionally resolve calls to powf during link-time
When linked with certain builds of libstdc++, it appears like powf is resolved
by a symbol in that library. Other builds of libstdc++ doesn't contain that
symbol resulting in a linker / loader error. Optionally
resolve that symbol and replace it with calls to logf and expf.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-23 11:43:45 +01:00
Thomas Hellstrom
8ae23176d6 st/egl: Fix build for include files in nonstandard places
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-23 11:43:34 +01:00
Thomas Hellstrom
7d0c0d32b5 mesa: Add talloc includes for gles
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-23 11:43:26 +01:00
Thomas Hellstrom
e5c78c2003 egl: Add an include for size_t
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-11-23 11:43:17 +01:00
Tom Stellard
930c168df6 r300/compiler: Use correct swizzles for all presubtract sources 2010-11-22 12:00:10 -08:00
Tom Stellard
5551faf649 r300/compiler: Ignore alpha dest register when replicating the result
When the result of the alpha instruction is being replicated to the RGB
destination register, we do not need to use alpha's destination register.
This fixes an invalid "Too many hardware temporaries used" error in
the case where a transcendent operation writes to a temporary register
greater than max_temp_regs.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 23f577dbd4)
2010-11-22 11:21:53 -08:00
Tom Stellard
80ff25b628 r300/compiler: Use zero as the register index for unused sources
This fixes an invalid "Too many hardware temporaries used" error in the
case where a source reads from a temporary register with an index greater
than max_temp_regs and then the source is marked as unused before the
register allocation pass.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit d668659003)
2010-11-22 11:21:53 -08:00
Tom Stellard
7c8715ef0a r300/compiler: Fix instruction scheduling within IF blocks
Reads of registers that where not written to within the same block were
not being tracked.  So in a situations like this:
0: IF
1: ADD t0, t1, t2
2: MOV t2, t1

Instruction 2 didn't know that instruction 1 read from t2, so
in some cases instruction 2 was being scheduled before instruction 1.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 3e5f9789d6)
2010-11-22 11:21:48 -08:00
Tom Stellard
06fa5d81da r300/compiler: Fix register allocator's handling of loops
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit e2301b45c2)
2010-11-22 11:15:33 -08:00
Tom Stellard
b86bf31b05 r300/compiler: Make sure presubtract sources use supported swizzles
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 412803b5cd)
2010-11-22 11:04:07 -08:00
Brian Paul
68afe8f685 swrast: init alpha value to 1.0 in opt_sample_rgb_2d()
(cherry picked from commit 6a0255122a)
2010-11-22 09:05:31 -07:00
Chia-I Wu
0d060d9933 st/vega: Do not wait NULL fences.
(cherry picked from commit cc5c908d7d)
2010-11-20 15:59:58 +08:00
Chia-I Wu
aa5574e78f egl_dri2: Fix __DRI_DRI2 version 1 support.
Correctly set __DRI_API_OPENGL flag.
(cherry picked from commit aa139a14ba)
2010-11-20 15:59:58 +08:00
Chia-I Wu
5105e3d415 st/mesa: Unreference the sampler view in st_bind_surface.
Without this, update_textures may not pick up the new pipe_resource.

It is actually update_textures that should check
stObj->sampler_view->texture != stObj->pt, but let's follow st_TexImage
and others for now.
(cherry picked from commit cfc81d93f7)
2010-11-20 15:59:58 +08:00
Chia-I Wu
feacfc4a93 egl: Fix a false negative check in _eglCheckMakeCurrent.
This call sequence

  eglMakeCurrent(dpy, surf, surf, ctx1);
  eglMakeCurrent(dpy, surf, surf, ctx2);

should be valid if ctx1 and ctx2 have the same client API and are not
current in another thread.
(cherry picked from commit 0d43cbed2f)
2010-11-20 15:59:57 +08:00
Julien Cristau
b6ae3d7b23 Makefile: don't include the same files twice in the tarball
src/mesa/drivers/dri/*/*/*.[chS] is a superset of
src/mesa/drivers/dri/*/server/*.[ch] and
src/mesa/drivers/dri/common/xmlpool/*.[ch].
include/GL/internal/glcore.h is already in MAIN_FILES, no need for it in
DRI_FILES too.  src/glx/Makefile was listed twice.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-11-15 08:53:12 -07:00
Brian Paul
3db8f85446 mesa: fix glDeleteBuffers() regression
This fixes a regression (failed assertion) from commit
c552f273f5 which was hit if glDeleteBuffers()
was called on a buffer that was never bound.

NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit 78587ea012)
2010-11-15 08:53:12 -07:00
Brian Paul
3e4ed38791 mesa: make glIsBuffer() return false for never bound buffers
Use a dummy buffer object as we do for frame/renderbuffer objects.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31514

Note: this is a candidate for the 7.9 branch.
(cherry picked from commit c552f273f5)
2010-11-15 08:53:12 -07:00
Brian Paul
acee46d9a1 mesa: handle more pixel types in mipmap generation code
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit b3b6476695)
2010-11-15 08:53:11 -07:00
Brian Paul
97805cfedd mesa: add missing formats in _mesa_format_to_type_and_comps()
NOTE: this is a candidate for the 7.9 branch
(cherry picked from commit 79c65410c1)

Conflicts:

	src/mesa/main/formats.c
2010-11-15 08:53:04 -07:00
Daniel Lichtenberger
9b1ac4d127 radeon: fix potential segfault in renderbuffer update
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=31617

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-11-15 01:36:02 -05:00
Roland Scheidegger
78ccca5a69 r200: fix r200 large points
DD_POINT_SIZE got never set for some time now (as it was set only in ifdefed
out code), which caused the r200 driver to use the point primitive mistakenly
in some cases which can only do size 1 instead of point sprite. Since the
logic to use point instead of point sprite prim is flaky at best anyway (can't
work correctly for per-vertex point size), just drop this and always emit point
sprites (except for AA points) - reasons why the driver tried to use points for
size 1.0 are unknown though it is possible they are faster or more conformant.
Note that we can't emit point sprites without point sprite cntl as that might
result in undefined point sizes, hence need drm version check (which was
unnecessary before as it should always have selected points). An
alternative would be to rely on the RE point size clamp controls which could
clamp the size to 1.0 min/max even if the SE point size is undefined, but currently
always use 0 for min clamp. (As a side note, this also means the driver does
not honor the gl spec which mandates points, but not point sprites, with zero size
to be rendered as size 1.)
This should fix recent reports of https://bugs.freedesktop.org/show_bug.cgi?id=702.
This is a candidate for the mesa 7.9 branch.
2010-11-11 01:14:10 +01:00
Mario Kleiner
2fe82c281d mesa/r300classic: Fix dri2Invalidate/radeon_prepare_render for page flipping.
A call to radeon_prepare_render() at the beginning of draw
operations was placed too deep in the call chain,
inside r300RunRenderPrimitive(), instead of
r300DrawPrims() where it belongs. This leads to
emission of stale target color renderbuffer into the cs if
bufferswaps via page-flipping are used, and thereby causes
massive rendering corruption due to unsynchronized
rendering into the active frontbuffer.

This patch fixes such problems for use with the
upcoming radeon page-flipping patches.

Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-11-08 13:54:10 -05:00
Alex Deucher
773e8fadc8 r600c: properly align mipmaps to group size
fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=31400
2010-11-08 12:11:14 -05:00
Alex Deucher
7f2d1280e7 r600c: add missing radeon_prepare_render() call on evergreen 2010-10-27 14:32:02 -04:00
Alex Deucher
075640e37e r100: revalidate after radeon_update_renderbuffers
This is a port of 603741a86d
to r100.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-10-27 13:58:54 -04:00
Thomas Hellstrom
fb7a095785 mesa: Make sure we have the talloc cflags when using the talloc headers
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 14:21:13 +02:00
Thomas Hellstrom
f245bb4c9c st/xorg: Fix compilation for Xservers >= 1.10
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 12:11:44 +02:00
Thomas Hellstrom
cc71f76be2 xorg/vmwgfx: Don't use deprecated x*alloc / xfree functions
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 12:11:31 +02:00
Thomas Hellstrom
47887b1efe st/xorg: Don't use deprecated x*alloc / xfree functions
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 12:11:21 +02:00
Thomas Hellstrom
764f9974e5 st/xorg: Fix compilation errors for Xservers compiled without Composite
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 12:11:13 +02:00
Thomas Hellstrom
aa2b751abb st/xorg, xorg/vmwgfx: Be a bit more frendly towards cross-compiling environments
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-19 12:11:02 +02:00
Brian Paul
6f5c6e5cc5 mesa: Add missing else in do_row_3D
This fixes erroneous "bad format in do_row()" messages

Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 746b602fbd)
2010-10-18 08:11:45 -06:00
Brian Paul
e5b2a8d350 egl/i965: include inline_wrapper_sw_helper.h
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit e19187e1be)
2010-10-18 08:02:42 -06:00
Chia-I Wu
da580c734f st/egl: Do not finish a fence that is NULL.
i915g would dereference the NULL pointer.
(cherry picked from commit d6de1f44a0)
2010-10-15 11:20:39 +08:00
Chia-I Wu
db7de707a3 st/vega: Fix version check in context creation.
This fixes a regression since 4531356817.
(cherry picked from commit b2c0ef8b51)
2010-10-15 11:20:39 +08:00
Chia-I Wu
bce3917192 targets/egl: Fix linking with libdrm.
(cherry picked from commit da495ee870)
2010-10-15 11:20:39 +08:00
Thomas Hellstrom
2eac388bfe st/xorg: Fix typo
Pointed out by Jakob Bornecrantz.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-12 18:26:56 +02:00
Thomas Hellstrom
6730630804 st/xorg: Don't try to remove invalid fbs
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-12 14:20:27 +02:00
Thomas Hellstrom
d5618c55ec xorg/vmwgfx: Don't hide HW cursors when updating them
Gets rid of annoying cursor flicker

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-12 14:12:36 +02:00
Thomas Hellstrom
ee6417f97f st/xorg: Add a customizer option to get rid of annoying cursor update flicker
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-12 14:09:09 +02:00
Thomas Hellstrom
14bae5cdf2 xorg/vmwgfx: Make vmwarectrl work also on 64-bit servers
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-12 11:08:39 +02:00
Thomas Hellstrom
799e6d4d15 st/xorg: Don't try to use option values before processing options
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2010-10-12 10:28:57 +02:00
Daniel Vetter
6936fbc039 r200: revalidate after radeon_update_renderbuffers
By calling radeon_draw_buffers (which sets the necessary flags
in radeon->NewGLState) and revalidating if NewGLState is non-zero
in r200TclPrimitive. This fixes an assert in libdrm (the color-/
depthbuffer was changed but not yet validated) and and stops the
kernel cs checker from complaining about them (when they're too
small).

Thanks to Mario Kleiner for the hint to call radeon_draw_buffer
(instead of my half-broken hack).

v2: Also fix the swtcl r200 path.

Cc: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-10-11 15:17:44 -04:00
Brian Paul
0a060c8fb0 st/mesa: replace assertion w/ conditional in framebuffer invalidation
https://bugs.freedesktop.org/show_bug.cgi?id=30632

NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit 3d6eec0a87)
2010-10-06 08:41:44 -06:00
Brian Paul
34c518be52 swrast: fix choose_depth_texture_level() to respect mipmap filtering state
NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit fb5e6f88fc)
2010-10-05 14:34:58 -06:00
Ian Romanick
2b4a05e74a docs: added news item for 7.9 release
Also fix link to release notes in 7.9-rc1 news item.
2010-10-05 10:08:28 -07:00
Ian Romanick
7afce798ee docs: Update mailing lines from sf.net to freedesktop.org
(cherry picked from commit c19bc5de96)
2010-10-05 10:08:21 -07:00
Ian Romanick
ab502d0d6b docs: download.html does not need to be updated for each release
(cherry picked from commit 41e371e351)
2010-10-05 10:08:14 -07:00
Ian Romanick
548a50caae docs: Import 7.8.x release notes from 7.8 branch. 2010-10-05 10:08:06 -07:00
Ian Romanick
11e290daa4 Add 7.9 md5sums 2010-10-04 18:59:34 -07:00
Ian Romanick
889cb2539b docs: Add 7.9 release date 2010-10-04 18:56:21 -07:00
Ian Romanick
242facde45 mesa: set version string to 7.9 (final) 2010-10-04 18:55:57 -07:00
Alex Deucher
73be0dfe03 Add evergreen support to release notes 2010-10-04 21:46:57 -04:00
Ian Romanick
0b300a4e3d docs: Update 7.9 release notes with one more bug fix 2010-10-04 17:43:52 -07:00
Eric Anholt
586797d7a8 i965: Fix glean/texSwizzle regression in previous commit.
Easy enough patch, who needs a full test run.  Oh, that's right.  Me.
(cherry picked from commit 14bf92ba19)
2010-10-04 17:41:56 -07:00
Eric Anholt
9b646b1fd3 i965: Set up swizzling of shadow compare results for GL_DEPTH_TEXTURE_MODE.
The brw_wm_surface_state.c handling of GL_DEPTH_TEXTURE_MODE doesn't
apply to shadow compares, which always return an intensity value.  The
texture swizzles can do the job for us.

Fixes:
glsl1-shadow2D(): 1
glsl1-shadow2D(): 3
(cherry picked from commit a7fa00dfc5)
2010-10-04 17:41:45 -07:00
Kenneth Graunke
dc8e22e4f0 i965: Fix incorrect batchbuffer size in gen6 clip state command.
FORCE_ZERO_RTAINDEX should be in the fourth (and final) dword.
(cherry picked from commit f317713432)
2010-10-04 17:41:33 -07:00
Ian Romanick
21078eef10 docs: Add list of bugs fixed in 7.9
(cherry picked from commit 7f440b3f9d76fa3a02877074d9701ab499d5de34)
2010-10-04 17:38:54 -07:00
Marek Olšák
968a9ec76e update release notes for Gallium
I am trying to be exhaustive, but still I might have missed tons of other
changes to Gallium.
2010-10-05 02:24:50 +02:00
Vinson Lee
2cdfda8851 tgsi: Remove duplicate case value.
Cherry-picked from master commit 2491258436
2010-10-04 17:31:33 +02:00
Jakob Bornecrantz
09d89dc95b tgsi: Actually care what check_soa_dependencies says
Thanks to José for the more complete list of supported opcodes.

Cherry-picked from master commit d21301675c
Also includes fix commit 4bb42a4f7e
2010-10-04 17:30:34 +02:00
José Fonseca
15ad34f012 tgsi: Don't ignore indirect registers in tgsi_check_soa_dependencies
Cherry-picked from master commit c66f0c4629
2010-10-04 17:30:00 +02:00
Alex Deucher
094fe2aa23 r600c: fix segfault in evergreen stencil code
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=30551
2010-10-01 20:15:17 -04:00
Tom Fogal
ba889a2b3e Implement x86_64 atomics for compilers w/o intrinsics.
Really old gcc's (3.3, at least) don't have support for the
intrinsics we need.  This implements a fallback for that case.
2010-10-01 17:56:02 -06:00
richard
71cc467f4c evergreen : fix z format setting, enable stencil. 2010-10-01 16:18:16 -04:00
Alex Deucher
d6e2b707ba r600c: pull over 6xx/7xx vertex fixes for evergreen 2010-10-01 00:52:36 -04:00
Alex Deucher
0ab9d8d94b r600c: add reloc for CB_COLOR0_ATTRIB
We'll need a reloc for tiling eventually,
so add it now.
2010-09-30 20:57:38 -04:00
Adam Jackson
759e9fb737 i965: Update renderer strings for sandybridge
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 0c86e1f294)
2010-09-30 13:32:42 -07:00
Zhenyu Wang
4af00f1a5e i965: always set tiling for fbo depth buffer on sandybridge
Sandybridge requires depth buffer must be tiling.

Fix 'fbo_firecube' demo.
(cherry picked from commit 72b368ae69)
2010-09-30 13:23:38 -07:00
Zhenyu Wang
1c8795075f i965: fallback lineloop on sandybridge for now
Until we fixed GS hang issue.
(cherry picked from commit 73dab75b41)
2010-09-30 13:23:37 -07:00
Kenneth Graunke
5d43c78d03 glsl: "Copyright", not "Constantright"
Clearly this started out as ir_copy_propagation.cpp, but the search and
replace was a bit overzealous.
(cherry picked from commit 565ff67688)
2010-09-30 13:23:37 -07:00
Marek Olšák
9f076a0848 r300g: fix conditional rendering in non-wait path
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 83278d384e)
2010-09-30 22:17:15 +02:00
Chia-I Wu
9bab8ca4f8 st/egl: Drop context argument from egl_g3d_get_egl_image.
Fix a regression since 17eace581d.
(cherry picked from commit e2b51b7c5b)
2010-09-30 23:48:34 +08:00
Chia-I Wu
f6eb5d991c mapi: Fix compiler warnings.
Do not use "void *" in arithmetics.
(cherry picked from commit ebeb4a7e8a)
2010-09-30 17:12:30 +08:00
Tom Stellard
f282d72678 r300/compiler: Don't merge instructions that write output regs and ALU result
https://bugs.freedesktop.org/show_bug.cgi?id=30415

(cherry picked from commit b27a809266)
2010-09-29 11:05:01 -07:00
Tom Stellard
e1918fd5d5 r300/compiler: Don't use rc_error() unless the error is unrecoverable
https://bugs.freedesktop.org/show_bug.cgi?id=30416

(cherry picked from commit 1b76dde0cd)
2010-09-29 11:04:12 -07:00
Tom Stellard
fcf5819945 r300/compiler: Fix segfault in error path
https://bugs.freedesktop.org/show_bug.cgi?id=30415

(cherry picked from commit d40ff5510c)
2010-09-29 11:03:02 -07:00
Brian Paul
c584318a21 Makefile: ensure Gallium's Makefile.xorg and SConscript.dri are in the tarball
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 698893889a)
2010-09-29 09:53:02 -06:00
Kristian Høgsberg
b24238c49a glx: Only remove drawables from the hash when we actually delete them
https://bugs.freedesktop.org/show_bug.cgi?id=30457
2010-09-29 09:10:05 -04:00
Ian Romanick
5d3a4317e8 mesa: set version string to 7.9-rc2 2010-09-28 19:22:55 -07:00
Eric Anholt
836b44b2c8 glsl: Also update implicit sizes of varyings at link time.
Otherwise, we'll often end up with gl_TexCoord being 0 length, for
example.  With ir_to_mesa, things ended up working out anyway, as long
as multiple implicitly-sized arrays weren't involved.
(cherry picked from commit 586b4b500f)
2010-09-28 18:41:05 -07:00
Eric Anholt
83854a9c84 i965: Fix up part of my Sandybridge attributes support patch.
I confused the array sizing for number of files for the number of regs
in a file.
(cherry picked from commit ef8e002c75)
2010-09-28 18:40:32 -07:00
Eric Anholt
b4824096b0 i965: Fix all non-snb regression in the snb attribute interpolation commit.
This apparently had never been tested elsewhere before being merged to
master.
(cherry picked from commit f1dba03056)
2010-09-28 18:40:24 -07:00
Zhenyu Wang
71bdc82c19 i965: fallback bitmap operation on sandybridge
Need to bring back correct fb write with header to set pixel
write mask. Fallback for now.

Note: Conflicts in intel_pixel_bitmap.c due to the removal of
intel_texture_bitmap from master.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-09-28 18:37:20 -07:00
Zhenyu Wang
aaf7f78dfa i965: fix occlusion query on sandybridge
Fix pipe control command for depth stall and PS_DEPTH_COUNT write.
(cherry picked from commit 3074b61f64)
2010-09-28 18:36:05 -07:00
Zhenyu Wang
5c7a7d0b09 i965: fix point sprite on sandybridge
Need to set point sprite function in fixed SF state now on sandybridge.
(cherry picked from commit ec99833e92)
2010-09-28 18:36:01 -07:00
Zhenyu Wang
f736d85a5a i965: fix scissor state on sandybridge
Fix incorrect scissor rect struct and missed scissor state pointer
setting for sandybridge.
(cherry picked from commit 4b6b0bf24a)
2010-09-28 18:35:57 -07:00
Zhenyu Wang
40dc275431 i965: enable polygon offset on sandybridge
Depth offset function is moved to SF stage on sandybridge.
(cherry picked from commit 3f3059fcc0)
2010-09-28 18:35:41 -07:00
Zhenyu Wang
3dd52d51ce i965: fix pixel w interpolation on sandybridge
(cherry picked from commit 15a8e7ec90)
2010-09-28 18:35:35 -07:00
Zhenyu Wang
e00bb8732c i965: don't do calculation for delta_xy on sandybridge
Sandybridge doesn't have Xstart/Ystart in payload header.
(cherry picked from commit 85fa900b93)
2010-09-28 18:35:30 -07:00
Zhenyu Wang
11215cd535 i965: only allow SIMD8 kernel on sandybridge now
Until we fixed SIMD16 kernel, force to SIMD8 on sandybridge now.
(cherry picked from commit c58bf2cee5)
2010-09-28 18:35:26 -07:00
Zhenyu Wang
6831cf67d1 i965: sandybridge pipe control workaround before write cache flush
Must issue a pipe control with any non-zero post sync op before
write cache flush = 1 pipe control.
(cherry picked from commit 18c3b754f9)
2010-09-28 18:35:21 -07:00
Zhenyu Wang
ece465219f i965: Add all device ids for sandybridge
(cherry picked from commit c8033f1b1e)
2010-09-28 18:35:16 -07:00
Zhenyu Wang
0dc83cc437 i965: fix const register count for sandybridge
Sandybridge's PS constant buffer payload size is decided from
push const buffer command, incorrect size would cause wrong data
in payload for position and vertex attributes. This fixes coefficients
for tex2d/tex3d.
(cherry picked from commit 81aae67e58)
2010-09-28 18:35:11 -07:00
Zhenyu Wang
922d7e1025 i965: Fix sampler on sandybridge
Sandybridge has not much change on texture sampler with Ironlake.
(cherry picked from commit 956f866030)
2010-09-28 18:35:04 -07:00
Zhenyu Wang
4afb1c8451 i965: fix jump count on sandybridge
Jump count is for 64bit long each, so one instruction requires 2
like on Ironlake.
(cherry picked from commit c5a3b25bb9)
2010-09-28 18:34:58 -07:00
Zhenyu Wang
ad52c2b773 i965: VS use SPF mode on sandybridge for now
Until conditional instructions were fixed, use SPF mode instead for now.
(cherry picked from commit 9c39a9fcb2)
2010-09-28 18:34:53 -07:00
Zhenyu Wang
364b6e0709 i965: add sandybridge viewport state bo into validation list
(cherry picked from commit 7401a98e29)
2010-09-28 18:34:47 -07:00
Zhenyu Wang
32c1dc76af i965: ignore quads for GS kernel on sandybridge
Sandybridge's VF would convert quads to polygon which not required
for GS then. Current GS state still would cause hang on lineloop.
(cherry picked from commit a0b1d7b2b8)
2010-09-28 18:34:43 -07:00
Zhenyu Wang
f9ad343cf7 i965: ff sync message change for sandybridge
(cherry picked from commit 67dafa4b56)
2010-09-28 18:34:39 -07:00
Zhenyu Wang
76469d710c i965: fix point size setting in header on sandybridge
(cherry picked from commit fa589770e8)
2010-09-28 18:34:33 -07:00
Zhenyu Wang
6eec2dbfc8 i965: force zero in clipper to ignore RTAIndex on sandybridge
(cherry picked from commit 03218a0093)
2010-09-28 18:34:27 -07:00
Zhenyu Wang
a4f126beaf i965: Fix color interpolation on sandybridge
Don't double store position in vertex attribute. This makes color
interpolation right by using barycentric coordinates.
(cherry picked from commit 41c31c2ebd)
2010-09-28 18:34:22 -07:00
Zhenyu Wang
0d5400519e i965: enable accumulator update in PS kernel too on sandybridge
Accumulator update flag must be set for implicit update on sandybridge.
(cherry picked from commit 8c31a4c3cf)
2010-09-28 18:34:16 -07:00
Zhenyu Wang
36722d7673 i965: new state dump for sandybridge
Dump new state object on sandybridge for cc viewport, clip viewport,
depth stencil, cc and blend state.
(cherry picked from commit b016a78b98)
2010-09-28 18:34:11 -07:00
Zhenyu Wang
3c26f3883a i965: disasm quarter and write enable instruction control on sandybridge
(cherry picked from commit bf60f35934)
2010-09-28 18:34:01 -07:00
Eric Anholt
1975d851e8 i965: Add support for POW in gen6 FS.
Fixes glsl-algebraic-pow-2 in brw_wm_glsl.c mode.
(cherry picked from commit fe2d4a5ea0)
2010-09-28 18:33:49 -07:00
Eric Anholt
f4f1e0d108 i965: Set up inputs to the fragment shader according to FP InputsRead.
Sending down data that doesn't get read doesn't make any sense, and
would make handling things like gl_FrontFacing and gl_PointCoord
harder.
(cherry picked from commit 2f914053bc)
2010-09-28 18:33:34 -07:00
Eric Anholt
cda661fd1c i965: Add support for attribute interpolation on Sandybridge.
Things are simpler these days thanks to barycentric interpolation
parameters being handed in in the payload.
(cherry picked from commit a66e9a4d86)
2010-09-28 18:33:10 -07:00
Eric Anholt
1ab0d45c9f glsl: Fix broadcast_index of lower_variable_index_to_cond_assign.
It's trying to get an int smeared across all channels, not trying to
get a 1:1 mapping of a subset of a vector's channels.  This usually
ended up not mattering with ir_to_mesa, since it just smears floats
into every chan of a vec4.

Fixes:
glsl1-temp array with swizzled variable indexing
(cherry picked from commit 668cdbe129)
2010-09-28 18:31:05 -07:00
Dave Airlie
269dd51162 mesa/mipmap: fix warning since 1acadebd62
1acadebd62 fixed the pointer but not the cast.
(cherry picked from commit 865cf77503)
2010-09-28 18:29:17 -07:00
Eric Anholt
f60c28e083 mesa: Fix type typo in glGenerateMipmap handling of GL_UNSIGNED_INT data.
Fixes ARB_depth_texture/fbo-generatemipmap-formats.
(cherry picked from commit 1acadebd62)
2010-09-28 18:29:10 -07:00
Eric Anholt
aebd78f607 glsl: Fix copy'n'wasted ir_noop_swizzle conditions.
It considered .xyyy a noop for vec4 instead of .xyzw, and similar for vec3.
(cherry picked from commit 3ffab36768)
2010-09-28 18:26:25 -07:00
Eric Anholt
0391eaf088 glsl: Rework assignments with write_masks to have LHS chan count match RHS.
It turns out that most people new to this IR are surprised when an
assignment to (say) 3 components on the LHS takes 4 components on the
RHS.  It also makes for quite strange IR output:

(assign (constant bool (1)) (x) (var_ref color) (swiz x (var_ref v) ))
(assign (constant bool (1)) (y) (var_ref color) (swiz yy (var_ref v) ))
(assign (constant bool (1)) (z) (var_ref color) (swiz zzz (var_ref v) ))

But even worse, even we get it wrong, as shown by this line of our
current step(float, vec4):

(assign (constant bool (1)) (w)
	(var_ref t)
	(expression float b2f (expression bool >=
		    (swiz w (var_ref x))(var_ref edge))))

where we try to assign a float to the writemasked-out x channel and
don't supply anything for the actual w channel we're writing.  Drivers
right now just get lucky since ir_to_mesa spams the float value across
all the source channels of a vec4.

Instead, the RHS will now have a number of components equal to the
number of components actually being written.  Hopefully this confuses
everyone less, and it also makes codegen for a scalar target simpler.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit b39e6f33b6)
2010-09-28 18:25:57 -07:00
Marek Olšák
7436872dce configure.ac: do not build xorg-r300g by default
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 11eb422a16)
2010-09-28 19:52:22 +02:00
Marek Olšák
7a297bd926 configure.ac: look for libdrm_radeon before building gallium/r300,r600
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit a1aec2e2be)
2010-09-28 19:52:16 +02:00
Marek Olšák
6c3a8aeb27 r300g: fix swizzling of texture border color
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit e4fd65e9d7)
2010-09-28 19:51:38 +02:00
Marek Olšák
5c3be43cd2 r300/compiler: fix shadow sampling with swizzled coords
Taking the W component from coords directly ignores swizzling. Instead,
take the component which is mapped to W in the TEX instruction parameter.
The same for Z.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 7128e1625b)

Conflicts:

	src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c
2010-09-28 19:51:19 +02:00
Marek Olšák
5906b9ac51 r300/compiler: do not use copy propagation if SaturateMode is used
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit c2ea7ffb0a)
2010-09-28 19:48:31 +02:00
Marek Olšák
89ed679a9e r300/compiler: fix projective mapping of 2D NPOT textures
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 6f747567ec)

Conflicts:

	src/mesa/drivers/dri/r300/compiler/radeon_program_tex.c
2010-09-28 19:48:00 +02:00
Kristian Høgsberg
7d154de048 glx: Invalidate buffers after binding a drawable
If the server doesn't send invalidate events, we may miss a
resize before the rendering starts.  Invalidate the buffers now
so the driver will recheck before rendering starts.

https://bugs.freedesktop.org/show_bug.cgi?id=29984
https://bugs.freedesktop.org/show_bug.cgi?id=30155
2010-09-28 08:32:45 -04:00
Ian Romanick
2a7ed4ba96 dri: Ensure that DRI driver cpp files are in tarballs
(cherry picked from commit 5717093f15fd7259441b2ee5583432fb9833c9a1)
2010-09-27 14:13:46 -07:00
Ian Romanick
8ad0396108 Add 7.9-rc1 md5sums 2010-09-27 10:20:25 -07:00
Ian Romanick
61653b488d mesa: set version string to 7.9-rc1 2010-09-27 10:17:11 -07:00
Marek Olšák
7e62335f35 r300g: fix macrotiling on R350
MACRO_SWITCH on R350 appears to use the RV350 mode by default. Who knew?

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 311ab3d468)

https://bugs.freedesktop.org/show_bug.cgi?id=30313
2010-09-26 23:00:16 +02:00
Joakim Sindholt
b8a60c84aa radeong: fix leaks
(cherry picked from commit 16baa465a2)
2010-09-26 19:59:11 +02:00
Joakim Sindholt
9f221e738d util/u_blitter: fix leak
(cherry picked from commit b51f6e7c23)
2010-09-26 19:53:47 +02:00
Tom Stellard
5c78e931c2 r300/compiler: Fix two mistakes in the presubtract optimization pass.
1. We can't turn an instruction into a presubtract operation if it
writes to one of the registers it reads from.
2. If we turn an instruction into a presubtract operation, we can't
remove that intruction unless all readers can use the presubtract
operation.

This fixes fdo bug 30337.
This is a candidate for the 7.9 branch.
(cherry picked from commit 522e994a22)
2010-09-25 15:53:20 -07:00
Marek Olšák
361084ac4b util: fix util_pack_color for B4G4R4A4
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 8619495790)
2010-09-25 01:54:12 +02:00
Marek Olšák
9409b544cc Build r300g by default
NOTE: This will go to 7.9 as well.
(cherry picked from commit 85a45dcd5d)
2010-09-25 01:54:12 +02:00
Marek Olšák
7261c3973d r300g: fix the border color for every format other than PIPE_FORMAT_B8G8R8A8
TX_BORDER_COLOR should be formatted according to the texture format.
Also the interaction with ARB_texture_swizzle should be fixed too.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 9f35dcd24c)
2010-09-25 01:54:12 +02:00
Marek Olšák
bb4c9e0969 r300g: make accessing map_list and buffer_handles thread-safe
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit a333485386)
2010-09-25 01:54:12 +02:00
Marek Olšák
aa05753059 r300g: fixup long-lived BO maps being incorrectly unmapped when flushing
Based on commit 3ddc714b20 by Dave Airlie.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 206d92912c)
2010-09-25 01:54:12 +02:00
Marek Olšák
09085ada5d util: make calling remove_from_list multiple times in a row safe
This commit fixes an infinite loop in foreach_s if remove_from_list is used
more than once on the same item with other list operations in between.

NOTE: This is a candidate for the 7.9 branch because the commit
"r300g: fixup long-lived BO maps being incorrectly unmapped when flushing"
depends on it.
(cherry picked from commit 68afbe89c7)
2010-09-25 01:54:11 +02:00
Alex Deucher
77cc2a4e17 r600c: fix mipmap stride on evergreen
taken from Dave's r600g fix
2010-09-24 13:27:21 -04:00
Brian Paul
96085dc41a st/mesa: use the wrapped renderbuffer in CopyPixels()
Fixes assertion failures when copying stencil pixels.

NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit f5c810c42f)
2010-09-24 10:18:12 -06:00
Brian Paul
a128b62a35 st/mesa: add missing MESA_FORMAT_S8 case in st_mesa_format_to_pipe_format()
NOTE: this is a candidate for the 7.9 branch.
(cherry picked from commit 10dcc989ab)
2010-09-24 10:17:40 -06:00
Brian Paul
b756100892 mesa: fix assertions to handle srgb formats
http://bugs.freedesktop.org/show_bug.cgi?id=30333

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 9f7c8053e0)
2010-09-24 10:16:52 -06:00
Tom Stellard
3ad0279344 r300g: Always try to build libr300compiler.a
Make libr300compiler.a a PHONY target so that this library will always be
built.  This fixes the problem of libr300compiler.a not being updated
when r300g is being built and r300c is not.

(cherry picked from commit 92762842a0)
2010-09-23 15:42:40 -07:00
Kristian Høgsberg
97cfa1240c intel: Fix GL_ARB_shading_language_120 commit
Fix commit e7087175f8.  Move the reference to
GL_VERSION_2_1_functions to intel_extensions.c where it's available,
don't try to enable a non-existing extension and advertise 1.20 for all
intel chipsets, not just GEN4 and up.
(cherry picked from commit b91dba49e0)
2010-09-23 08:47:01 -07:00
Brian Paul
6b0c280660 mesa: don't advertise bogus GL_ARB_shading_language_120 extension
Instead of using the invalid GL_ARB_shading_language_120 extension to
determine the GLSL version, use a new ctx->Const.GLSLVersion field.
Updated the intel and r600 drivers, but untested.

See fd.o bug 29910

NOTE: This is a candidate for the 7.9 branch (but let's wait and see if
there's any regressions).
(cherry picked from commit e7087175f8)
2010-09-23 08:47:01 -07:00
Eric Anholt
b437c9102f i965: Share the KIL_NV implementation between glsl and non-glsl.
(cherry picked from commit 23c507f135)
2010-09-23 08:47:01 -07:00
Kenneth Graunke
4ec818ea4a glsl: Fix broken handling of ir_binop_equal and ir_binop_nequal.
When ir_binop_all_equal and ir_binop_any_nequal were introduced, the
meaning of these two opcodes changed to return vectors rather than a
single scalar, but the constant expression handling code was incorrectly
written and only worked for scalars.  As a result, only the first
component of the returned vector would be properly initialized.
(cherry picked from commit 6ea16b6c51)
2010-09-23 08:47:01 -07:00
Kenneth Graunke
80a6cbfea3 glsl: Add comments to clarify the types of comparison binops.
(cherry picked from commit 14eea26828)
2010-09-23 08:47:01 -07:00
Brian Paul
ec2031563a glsl2: silence compiler warnings in printf() calls
Such as: "ir_validate.cpp:143: warning: format ‘%p’ expects type ‘void*’,
but argument 2 has type ‘ir_variable*’"
(cherry picked from commit 1739124159)
2010-09-23 08:47:01 -07:00
Ian Romanick
b7d4f08f4e glsl: Add doxygen comments
(cherry picked from commit e053d62aa5)
2010-09-23 08:47:01 -07:00
Kenneth Graunke
2fc2b89680 glsl/builtins: Switch comparison functions to just return an expression.
(cherry picked from commit dbd2480507)
2010-09-23 08:47:01 -07:00
Kenneth Graunke
b29289a61c glsl/builtins: Fix equal and notEqual builtins.
Commit 309cd4115b incorrectly converted
these to all_equal and any_nequal, which is the wrong operation.
(cherry picked from commit 52f9156e88)
2010-09-23 08:47:01 -07:00
Kenneth Graunke
728829ab63 glsl: Properly handle nested structure types.
Fixes piglit test CorrectFull.frag.
(cherry picked from commit ca92ae2699)
2010-09-23 08:47:01 -07:00
Tilman Sauerbeck
9753ee3f3e glsl2: Fixed cloning of ir_call error instructions.
Those have the callee field set to the null pointer, so
calling the public constructor will segfault.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
(cherry picked from commit 3894fddccc)
2010-09-23 08:47:01 -07:00
Vinson Lee
2db5398449 glsl: Fix 'control reaches end of non-void function' warning.
Fixes this GCC warning.

lower_variable_index_to_cond_assign.cpp:
In member function
'bool variable_index_to_cond_assign_visitor::needs_lowering(ir_dereference_array*) const':

lower_variable_index_to_cond_assign.cpp:261:
warning: control reaches end of non-void function
(cherry picked from commit a822ae3f1a)
2010-09-23 08:47:01 -07:00
Vinson Lee
ee8a96707a ir_to_mesa: Remove unused member array_indexed from struct statevar_element.
Fixes this GCC warning.
warning: missing initializer for member 'statevar_element::array_indexed'
(cherry picked from commit ff78d6dcc0)
2010-09-23 08:47:01 -07:00
Tilman Sauerbeck
22dcee8da2 glsl2: Empty functions can be inlined.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 19f8f32a96)
2010-09-23 08:47:00 -07:00
Ian Romanick
1b622bfbee glsl2: Add flags to enable variable index lowering
(cherry picked from commit a6ecd1c372)
2010-09-23 08:47:00 -07:00
Ian Romanick
2bb2efd7b2 glsl2: Refactor testing for whether a deref is of a matrix or array
(cherry picked from commit 6e4fe39da2)
2010-09-23 08:47:00 -07:00
Luca Barbieri
a19f0fb50b glsl: add pass to lower variable array indexing to conditional assignments
Currenly GLSL happily generates indirect addressing of any kind of
arrays.

Unfortunately DirectX 9 GPUs are not guaranteed to support any of them in
general.

This pass fixes that by lowering such constructs to a binary search on the
values, followed at the end by vectorized generation of equality masks, and
4 conditional assignments for each mask generation.

Note that this requires the ir_binop_equal change so that we can emit SEQ
to generate the boolean masks.

Unfortunately, ir_structure_splitting is too dumb to turn the resulting
constant array references to individual variables, so this will need to
be added too before this pass can actually be effective for temps.

Several patches in the glsl2-lower-variable-indexing were squashed
into this commit.  These patches fix bugs in Luca's original
implementation, and the individual patches can be seen in that branch.
This was done to aid bisecting in the future.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit a47539c7a1)
2010-09-23 08:47:00 -07:00
Kenneth Graunke
8df8bb43c7 glsl: Don't print blank (function ...) headers for built-ins.
Fixes a regression caused when I added my GLSL ES support.
(cherry picked from commit 8fbe968a62)
2010-09-23 08:47:00 -07:00
Kenneth Graunke
d2b6502c93 glsl: Change from has_builtin_signature to has_user_signature.
The print visitor needs this, and the only existing user can work with
has_user_signature just as well.
(cherry picked from commit 81f0339398)
2010-09-23 08:47:00 -07:00
Brian Paul
e68ec2212f glsl2: fix signed/unsigned comparison warning
(cherry picked from commit 7545514fb6)
2010-09-23 08:47:00 -07:00
Vinson Lee
c0f82e619c glsl: Fix 'format not a string literal and no format arguments' warning.
Fix the following GCC warning.
loop_controls.cpp: In function 'int calculate_iterations(ir_rvalue*, ir_rvalue*, ir_rvalue*, ir_expression_operation)':
loop_controls.cpp:88: warning: format not a string literal and no format arguments
(cherry picked from commit f20f2cc330)
2010-09-23 08:47:00 -07:00
José Fonseca
7f95c59509 draw: Prevent clipped vertices overflow.
Some pathological triangles cause a theoritically impossible number of
clipped vertices.

The clipper will still assert, but at least release builds will not
crash, while this problem is further investigated.
2010-09-23 16:48:59 +01:00
Keith Whitwell
6f310f379b draw: don't apply flatshading to clipped tris with <3 verts
If a triangle was completely culled by clipping, we would still try to
fix up its provoking vertex.
2010-09-23 16:28:27 +01:00
Dave Airlie
f279480df2 egl: fix build since 17eace581d
looks like mesa st didn't get updated.
2010-09-23 07:41:05 -04:00
Kristian Høgsberg
d382c51a23 dri: Pass the __DRIscreen and the __DRIscreen private back to image lookup
We will typically have a current context when we need to lookup the image,
but the lookup implementation don't need it so drop it.
2010-09-23 07:40:59 -04:00
Kristian Høgsberg
cdb3f23d8a glx: Hold on to drawables if we're just switching to another context
https://bugs.freedesktop.org/show_bug.cgi?id=30234
2010-09-23 07:40:27 -04:00
Eric Anholt
8f4c99a9af i965: Also enable CC statistics when doing OQs.
This is required by the spec, so respect that.

(oh, and it was required to actually fix occlusion-query-discard,
though I didn't know at the time of the commit since o-q-discard was
hanging the GPU)

(cherry picked from commit 4a0bc4716d)
2010-09-22 13:45:50 -07:00
Eric Anholt
5285100502 ir_to_mesa: Only compare vector_elements present for any_nequal/all_equal
Fixes: glsl-mat-from-int-ctor-03
(cherry picked from commit eaa6bf59db)
2010-09-22 13:43:10 -07:00
Eric Anholt
56dc7ca916 i965: Track the windowizer's dispatch for kill pixel, promoted, and OQ
Looks like the problem was we weren't passing the depth to the render
target as expected, so the chip would wedge.  Fixes GPU hang in
occlusion-query-discard.

Bug #30097
(cherry picked from commit dd9a88f4dd)
2010-09-22 13:15:59 -07:00
Eric Anholt
902dfdaa86 glsl: Add definition of gl_TextureMatrix inverse/transpose builtins.
Fixes glsl2/builtin-texturematrix.
Bug #30196.
(cherry picked from commit b5bb215629)
2010-09-22 13:15:59 -07:00
Kristian Høgsberg
c98ce41de3 dri2: Make createImageFromName() take a __DRIscreen instead of __DRIcontext
We can't expect to have a context when this is called, and we don't need one
so just require a __DRIscreen instead.

Reported by Yu Dai <yu.dai@intel.com>
2010-09-22 15:27:04 -04:00
Brian Paul
3cdfc62523 llvmpipe: use draw module to draw sprites
For the 7.9 branch, this is simpler than merging the sprite-coord branch
and less likely to break other drivers.

Fixes fd.o bug 29849.
2010-09-22 08:22:36 -06:00
Brian Paul
2606105cc5 glsl2: fix typo in error msg
(cherry picked from commit 2b95525429)
2010-09-21 14:58:24 -06:00
Keith Whitwell
141dbbfc78 llvmpipe: fix flatshading in new line code
Calculate interpolants before rearranging the vertices.
2010-09-21 14:40:22 +01:00
Brian Paul
e678c3f4e1 docs: mark as obsolete, remove dead links
(cherry picked from commit 0bc3e1f4f4)
2010-09-20 10:56:53 -06:00
Brian Paul
1b90889eb4 docs: remove old broken link
(cherry picked from commit a8fde1ba4d)
2010-09-20 10:56:41 -06:00
Brian Paul
a9fceb6979 llvmpipe: fix query bug when no there's no scene
(cherry picked from commit 7888a2f822)
2010-09-20 10:56:10 -06:00
Brian Paul
febd353bcd gallivm: fix incorrect vector shuffle datatype
The permutation vector must always be a vector of int32 values.

(cherry picked from commit 3c9f4c7b75)
2010-09-20 10:55:35 -06:00
Marek Olšák
0f1faa9c7b st/mesa: fix assertion failure in GetTexImage for cubemaps
Can be reproduced with mesa/demos/src/tests/blitfb.

NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 168554904b)
2010-09-20 18:21:24 +02:00
Jakob Bornecrantz
b247620854 i915g: Link with wrapper sw winsys with scons
cherry picked from commit 208f1f3810
2010-09-20 15:45:35 +02:00
Michal Krol
d36344f900 svga: Integer constant register file has a separate namespace.
Count int and float constants independently. Since there are only
few i# constants available and hundreds of c# constants, it would
be too easy to end up with an i# declaration out of its range.
2010-09-20 09:29:26 +01:00
Michal Krol
202c1279c6 svga: Fix relative addressing translation for pixel shaders.
Pixel shaders do not have address registers a#, only one
loop register aL. Our only hope is to assume the address
register is in fact a loop counter and replace it with aL.

Do not translate ARL instruction for pixel shaders -- MOVA
instruction is only valid for vertex saders.

Make it more explicit relative addressing of inputs is only valid
for pixel shaders and constants for vertex shaders.
2010-09-20 09:29:24 +01:00
Jakob Bornecrantz
f6e811a7d0 scons: Link against talloc in the Gallium DRI drivers
cherry picked from commit b83156d42f
2010-09-20 00:08:06 +02:00
Luca Barbieri
bd009df1cc auxiliary: fix depth-only and stencil-only clears
Depth-only and stencil-only clears should mask out depth/stencil from the
output, mask out stencil/input from input, and OR or ADD them together.

However, due to a typo they were being ANDed, resulting in zeroing the buffer.
2010-09-19 21:51:25 +02:00
Chia-I Wu
d6df0cdcca egl: Enable drm platform by default.
This enables EGL_MESA_drm_display for st/egl in the default setup.
(cherry picked from commit 2a910b3396)
2010-09-19 17:37:00 +08:00
Chia-I Wu
52f6be0688 st/egl: s/kms/drm/ on the drm backend.
s/kms/drm/, s/kdpy/drmdpy/, and so forth.
(cherry picked from commit e4513e7fb9)
2010-09-19 17:30:00 +08:00
Chia-I Wu
b73cfde5ce st/egl: Rename kms backend to drm.
The main use of the backend is to support EGL_MESA_drm_display.  drm
should be a better name.
(cherry picked from commit e7424d7240)
2010-09-19 17:29:55 +08:00
Chia-I Wu
d7500ac4df st/egl: Split modeset code support to modeset.c.
The modeset code supports now obsolete EGL_MESA_screen_surface.  Move it
to a file of its own.
(cherry picked from commit c7c2e7d0ce)
2010-09-19 17:29:50 +08:00
Brian Paul
83917660f1 tgsi/sse: fix aos_to_soa() loop to handle num_inputs==0
Basically, change the loop from:
  do {...} while (--num_inputs != 0)
into:
  while (num_inputs != 0) { ... --num_inputs; }

Fixes fd.o bug 29987.
(cherry picked from commit 4b27c614cf)
2010-09-17 10:51:50 -07:00
Chia-I Wu
69f67f5ded libgl-xlib: Remove unused st_api_create_OpenGL.
st/egl no longer relies on libGL for OpenGL support.
2010-09-17 12:57:15 +08:00
Chia-I Wu
a42527be33 targets/egl: Use C++ compiler to link GL/ES state trackers.
Otherwise, applications compiled with C compiler might have trouble
using them.
2010-09-17 12:57:06 +08:00
Brian Paul
d169a67ad1 mesa: include mfeatures.h in formats.c
Otherwise, FEATURE_EXT_texture_sRGB was undefined.
This is (part of?) the fix for fd.o bug 30177.

(cherry picked from commit 3a6f9d0f47)
2010-09-16 12:42:53 -06:00
Marek Olšák
be16a35438 r300g/swtcl: fix CS overrun
https://bugs.freedesktop.org/show_bug.cgi?id=29901
(cherry picked from commit d4b2de13bc)
2010-09-16 20:35:39 +02:00
Brian Paul
d46b7c9f6f glx: add const qualifiers to __indirect_glMultiDrawArraysEXT()
(cherry picked from commit 4cd751bcc4)
2010-09-16 14:34:06 +08:00
Chia-I Wu
5d02503467 st/xlib: Notify the context when the front/back buffers are swapped.
The current context should be notified when the the front/back buffers
of the current drawable are swapped.  The notification was skipped when
xmesa_strict_invalidate is false (the default).

This fixes fdo bug #29774.
(cherry picked from commit 03224f492d)
2010-09-16 14:24:46 +08:00
Chia-I Wu
e3b89388ff mesa: Update ES APIspec.xml.
Enable some extensions now that the needed tokens are defined in
GLES/glext.h and GLES2/glext.h.  Update the prototype of MultiDrawArrays
now that the prototype of _mesa_MultiDrawArraysEXT has been updated.
(cherry picked from commit 9ca59b2427)
2010-09-16 14:24:45 +08:00
Chia-I Wu
d6538baa3b glapi: Fix ES build errors again.
This fixes an error in GLAPI ES.  My build is ok with or without this
patch, and the error affects others' setups.

[Patch from Francesco Marella]
(cherry picked from commit e3c46cf586)
2010-09-16 14:24:45 +08:00
Chia-I Wu
16a023ad7d glapi: Fix build errors for ES.
The latest glext.h defines GL_FIXED.  Test GL_OES_fixed_point instead to
decide whether to define GLfixed and GLclampx.

This fixes fdo bug #30205.
(cherry picked from commit cad87ebc3a)
2010-09-16 14:24:45 +08:00
Andre Maasikas
029eb8e764 r600c: fix buffer height setting in dri2 case
fbHeight is 0 in this case

uncovered by changes in b0bc026c and should fix kernel rejecting command
streams after that commit
2010-09-16 09:09:43 +03:00
Brian Paul
71b4054a6c tgsi: fix incorrect usage_mask for shadow tex instructions
The shadow versions of the texture targets use an extra component
(Z) to express distance from light source to the fragment.
Fixes the shadowtex demo with llvmpipe.

(cherry picked from commit 95254bbd2d)
2010-09-15 13:57:50 -06:00
Keith Whitwell
8e8a42ffc5 llvmpipe: return zero from floor_pot(zero) 2010-09-15 16:41:59 +01:00
Dave Airlie
fd4c6bd135 r300g: fix buffer reuse issue caused by previous commit
caused by 0b9eb5c9bb

test run glxgears, resize.
(cherry picked from commit 09ef8e9283)
2010-09-15 13:32:29 +02:00
Marek Olšák
5d4409e0e5 r300g: prevent creating multiple winsys BOs for the same handle
This fixes a DRM deadlock in the cubestorm xscreensaver, because somehow
there must not be 2 different BOs relocated in one CS if both BOs back
the same handle. I was told it is impossible to happen, but apparently
it is not, or there is something else wrong.
(cherry picked from commit 0b9eb5c9bb)
2010-09-15 04:34:36 +02:00
Luca Barbieri
26e63a431d auxiliary: fix unintended fallthrough 2010-09-14 23:22:16 +02:00
8518 changed files with 1060565 additions and 2104923 deletions

View File

@@ -1,18 +0,0 @@
((nil . ((show-trailing-whitespace . t)))
(prog-mode
(indent-tabs-mode . nil)
(tab-width . 8)
(c-basic-offset . 3)
(c-file-style . "stroustrup")
(fill-column . 78)
(eval . (progn
(c-set-offset 'case-label '0)
(c-set-offset 'innamespace '0)
(c-set-offset 'inline-open '0)))
(whitespace-style face indentation)
(whitespace-line-column . 79)
(eval ignore-errors
(require 'whitespace)
(whitespace-mode 1)))
(makefile-mode (indent-tabs-mode . t))
)

View File

@@ -1,40 +0,0 @@
# To use this config on you editor, follow the instructions at:
# http://editorconfig.org
root = true
[*]
charset = utf-8
insert_final_newline = true
tab_width = 8
[*.{c,h,cpp,hpp,cc,hh}]
indent_style = space
indent_size = 3
max_line_length = 78
[{Makefile*,*.mk}]
indent_style = tab
[{*.py,SCons*}]
indent_style = space
indent_size = 4
[*.pl]
indent_style = space
indent_size = 4
[*.m4]
indent_style = space
indent_size = 2
[*.yml]
indent_style = space
indent_size = 2
[*.patch]
trim_trailing_whitespace = false
[meson.build,meson_options.txt]
indent_style = space
indent_size = 2

10
.emacs-dirvars Normal file
View File

@@ -0,0 +1,10 @@
;; -*- emacs-lisp -*-
;;
;; This file is processed by the dirvars emacs package. Each variable
;; setting below is performed when this dirvars file is loaded.
;;
indent-tabs-mode: nil
tab-width: 8
c-basic-offset: 3
kde-emacs-after-parent-string: ""
evaluate: (c-set-offset 'inline-open '0)

26
.gitignore vendored
View File

@@ -2,53 +2,27 @@
*.dll
*.exe
*.ilk
*.la
*.lo
*.log
*.o
*.obj
*.orig
*.os
*.pc
*.pdb
*.pyc
*.pyo
*.rej
*.so
*.so.*
*.sw[a-z]
*.tar
*.tar.bz2
*.tar.gz
*.tar.xz
*.trs
*.zip
*~
depend
depend.bak
bin/ltmain.sh
lib
lib64
configure
configure.lineno
autom4te.cache
aclocal.m4
config.log
config.status
cscope*
tags
.scon*
config.py
build
libtool
manifest.txt
.dir-locals.el
.deps/
.dirstamp
.libs/
Makefile
Makefile.in
.install-mesa-links
.install-gallium-links
/src/git_sha1.h
TAGS

471
.mailmap
View File

@@ -1,471 +0,0 @@
Aapo Tahkola <aet@rasterburn.org> <aapo@aapo-desktop.(none)>
Adam Jackson <ajax@redhat.com> <ajax@benzedrine.nwnk.net>
Adam Jackson <ajax@redhat.com> <ajax@freedesktop.org>
Adrian Marius Negreanu <adrian.m.negreanu@intel.com> Adrian Negreanu <adrian.m.negreanu@intel.com>
Adrian Marius Negreanu <adrian.m.negreanu@intel.com> Negreanu Marius Adrian <adrian.m.negreanu@intel.com>
Dave Airlie <airlied@redhat.com> <airliedfreedesktop.org>
Dave Airlie <airlied@redhat.com> airlied <airlied@unused-12-215.bne.redhat.com>
Dave Airlie <airlied@redhat.com> <airlied@dhcp-1-203.bne.redhat.com>
Dave Airlie <airlied@redhat.com> <airlied@gmail.com>
Dave Airlie <airlied@redhat.com> <airlied@itt42.(none)>
Dave Airlie <airlied@redhat.com> <airlied@linux.ie>
Dave Airlie <airlied@redhat.com> <airlied@nx6125b.(none)>
Dave Airlie <airlied@redhat.com> <airlied@panoply-rh.(none)>
Dave Airlie <airlied@redhat.com> <airlied@ppcg5.localdomain>
Alan Coopersmith <alan.coopersmith@oracle.com> <alan.coopersmith@sun.com>
Alan Hourihane <alanh@vmware.com> <alanh@tungstengraphics.com>
Alan Hourihane <alanh@vmware.com> <alanh@fairlite.demon.co.uk>
Alan Hourihane <alanh@vmware.com> <alanh@jetpack.(none)>
Alexander Monakov <amonakov@gmail.com> <amonakov@ispras.ru>
Alexander von Gluck IV <kallisti5@unixzen.com> Alexander von Gluck <kallisti5@unixzen.com>
Alex Corscadden <alexc@vmware.com> <alexc@alexc-dev1.prom.eng.vmware.com>
Alex Corscadden <alexc@vmware.com> <alexc@alexc-dev1.vmware.com>
Alex Deucher <alexdeucher@gmail.com> <alexander.deucher@amd.com>
Alex Deucher <alexdeucher@gmail.com> <agd5f@yahoo.com>
Alex Deucher <alexdeucher@gmail.com> <alex@botch2.com>
Alex Deucher <alexdeucher@gmail.com> <alex@botch2.(none)>
Alex Deucher <alexdeucher@gmail.com> <alex@cube.(none)>
Alex Deucher <alexdeucher@gmail.com> <alex@samba.(none)>
Andreas Fänger <a.faenger@e-sign.com> <a.faenger@e-sign.com>
Andreas Hartmetz <ahartmetz@gmail.com> <andreas.hartmetz@kdab.com>
Andre Heider <a.heider@gmail.com>
Andreas Heider <andreas@heider.io>
Andreas Pokorny <andreas.pokorny@canonical.com> <andreas.pokorny@elektrobit.com>
Andrew Randrianasulu <randrianasulu@gmail.com> <randrik_a@yahoo.com>
Andrew Randrianasulu <randrianasulu@gmail.com> <randrik@mail.ru>
Arthur Huillet <arthur.huillet@free.fr> Arthur HUILLET <arthur.huillet@free.fr>
Benjamin Franzke <benjaminfranzke@googlemail.com> ben <benjaminfranzke@googlemail.com>
Ben Skeggs <bskeggs@redhat.com> <darktama@beleth.(none)>
Ben Skeggs <bskeggs@redhat.com> <darktama@iinet.net.au>
Ben Skeggs <bskeggs@redhat.com> <darktama@nisroch.keine.ath.cx>
Ben Skeggs <bskeggs@redhat.com> <skeggsb-at-gmail.com>
Ben Skeggs <bskeggs@redhat.com> <skeggsb@gmail.com>
Ben Skeggs <bskeggs@redhat.com> <skeggsb@localhost.localdomain>
Ben Skeggs <bskeggs@redhat.com> <skeggsb@nisroch.keine.ath.cx>
Ben Widawsky <benjamin.widawsky@intel.com> Ben Widawsky <ben@bwidawsk.net>
Blair Sadewitz <blair.sadewitz@gmail.com> Blair Sadewitz <blair.sadewitz.gmail.com>
Boris Peterbarg <reist@users.sourceforge.net> reist <reist>
Brian Paul <brianp@vmware.com> Brian <brian.paul@tungstengraphics.com>
Brian Paul <brianp@vmware.com> <brian.paul@tungstengraphics.com>
Brian Paul <brianp@vmware.com> <brian.e.paul@gmail.com>
Brian Paul <brianp@vmware.com> <brianp@kemper.freedesktop.org>
Brian Paul <brianp@vmware.com> brian <brian@cvp965.(none)>
Brian Paul <brianp@vmware.com> Brian <brian@i915.localnet.net>
Brian Paul <brianp@vmware.com> Brian <brian@nostromo.localnet.net>
Brian Paul <brianp@vmware.com> Brian <brian@poulsbo.localnet.net>
Brian Paul <brianp@vmware.com> Brian <brian@ps3.localnet.net>
Brian Paul <brianp@vmware.com> Brian <brianp@vmware.com>
Brian Paul <brianp@vmware.com> Brian <brian@yutani.localnet.net>
Brian Paul <brianp@vmware.com> root <brian.paul@tungstengraphics.com>
Brian Paul <brianp@vmware.com> root <root@i915.localnet.net>
Brian Paul <brianp@vmware.com> root <root@nostromo.localnet.net>
Brian Paul <brianp@vmware.com> root <root@i965.localnet.net>
Bruce Merry <bmerry@users.sourceforge.net> <bmerry@gmail.com>
Carl-Philip Hänsch <cphaensch@googlemail.com> Carl-Philip Haensch <s3734770@mail.zih.tu-dresden.de>
Carl-Philip Hänsch <cphaensch@googlemail.com> Carl-Philip Haensch <carli@carli-laptop.(none)>
Carl-Philip Hänsch <cphaensch@googlemail.com> Carl-Philip Haensch <Carl-Philip.Haensch@mailbox.tu-dresden.de>
Chad Versace <chadversary@chromium.org> <chad@kiwitree.net>
Chad Versace <chadversary@chromium.org> <chad@chad-versace.us>
Chad Versace <chadversary@chromium.org> <Chad Versace chad@chad-versace.us>
Chad Versace <chadversary@chromium.org> <chad.versace@intel.com>
Chad Versace <chadversary@chromium.org> <chad.versace@linux.intel.com>
Chia-I Wu <olvaffe@gmail.com> <olv@lunarg.com>
Chia-I Wu <olvaffe@gmail.com> Chia-Wu <olvaffe@gmail.com>
Chih-Wei Huang <cwhuang@linux.org.tw> Chih-Wei Huang <cwhuang@android-x86.org>
Christian König <christian.koenig@amd.com> Christian Koenig <christian.koenig@amd.com>
Christian König <christian.koenig@amd.com> Christian König <christian.koenig at amd.com>
Christian König <christian.koenig@amd.com> Christian König <deathsimple@vodafone.de>
Christoph Brill <egore911@egore911.de> Christoph Bill <egore@gmx.de>
Christoph Brill <egore911@egore911.de> <egore@gmx.de>
Christoph Bumiller <christoph.bumiller@speed.at> <e0425955@student.tuwien.ac.at>
Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Christopher James Halse Rogers <raof@ubuntu.com>
Claudio Ciccani <klan@directfb.org> <klan@users.sf.net>
Claudio Ciccani <klan@directfb.org> <klan@users.sourceforge.net>
Connor Abbott <cwabbott0@gmail.com> <connor.w.abbott@intel.com>
Connor Abbott <cwabbott0@gmail.com> <connor.abbott@intel.com>
Corbin Simpson <MostAwesomeDude@gmail.com> <mostawesomed...@gmail.com>
Corbin Simpson <MostAwesomeDude@gmail.com> <mostawesomedude@gmail.com>
Courtney Goeltzenleuchter <courtney@lunarg.com> <courtney@LunarG.com>
Daniel Skinner <sio@users.sourceforge.net> sio <sio>
Daniel Stone <daniels@collabora.com> <daniel@fooishbar.org>
David Miller <davem@davemloft.net> David S. Miller <davem@davemloft.net>
David Miller <davem@davemloft.net> Dave Miller <davem@davemloft.net>
David Miller <davem@davemloft.net> davem69 <davem69>
David Heidelberger <david.heidelberger@ixit.cz> David Heidelberg <david@ixit.cz>
David Heidelberger <david.heidelberger@ixit.cz> <d.okias@gmail.com>
David Reveman <reveman@chromium.org> <c99drn@cs.umu.se>
Dieter Nützel <Dieter@nuetzel-hh.de> Dieter Nützel <dieter@nuetzel-hh.de>
Dmitry Cherkassov <dcherkassov@gmail.com> Dmitry Cherkasov <dcherkassov@gmail.com>
Dylan Baker <dylanx.c.baker@intel.com> <baker.dylan.c@gmail.com>
Edward O'Callaghan <funfunctor@folklore1984.net> <eocallaghan@alterapraxis.com>
Emeric Grange <emeric.grange@gmail.com> Emeric <emeric.grange@gmail.com>
Emil Velikov <emil.l.velikov@gmail.com> <emil.velikov@collabora.com>
Emil Velikov <emil.l.velikov@gmail.com> <emil.veliko@collabora.com>
Emil Velikov <emil.l.velikov@gmail.com> <emil.velikov@collabora.co.uk>
Emil Velikov <emil.l.velikov@gmail.com> <emil.veliikov@collabora.com>
Emil Velikov <emil.l.velikov@gmail.com> <emil.velikov@gmail.com>
Emil Velikov <emil.l.velikov@gmail.com> <emmil.velikov@collabora.com>
Eric Anholt <eric@anholt.net> Eric Anholt <anholt@FreeBSD.org>
Eric Engestrom <eric@engestrom.ch> <eric.engestrom@imgtec.com>
Eugeni Dodonov <eugeni.dodonov@intel.com> <eugeni@mandriva.com>
Fabian Bieler <der.fabe@gmx.net> <fabianbieler@fastmail.fm>
Fabian Bieler <der.fabe@gmx.net> <&lt;der.fabe@gmx.net&gt>
Feng, Haitao <haitao.feng@intel.com> Haitao Feng <haitao.feng@intel.com>
Frank Henigman <fjhenigman@google.com> <fjhenigman@chromium.org>
George Sapountzis <gsapountzis@gmail.com> George Sapountzis <gsap7@yahoo.gr>
Gwenole Beauchesne <gwenole.beauchesne@intel.com> <gb.devel@gmail.com>
Hamish Marson <hmarson@users.sourceforge.net> hmarson <hmarson>
Hans de Goede <hdegoede@redhat.com> Hans de Goede <j.w..r..degoede@hhs.nl>
Homer Hsing <dongsheng.xing@intel.com> <homer.hsing@gmail.com>
Hui Qi Tay <hqtay@vmware.com> <tayhuiqithq@gmail.com>
Ian Romanick <ian.d.romanick@intel.com> <idr@freedesktop.org>
Ian Romanick <ian.d.romanick@intel.com> <idr@us.ibm.com>
Jakob Bornecrantz <wallbraker@gmail.com> <jakob@vmware.com>
Jakob Bornecrantz <wallbraker@gmail.com> <jakob@aurora.(none)>
Jakob Bornecrantz <wallbraker@gmail.com> <jakob@aurora.walkyrie.se>
Jakob Bornecrantz <wallbraker@gmail.com> <jakob@tungstengraphics.com>
Jakob Bornecrantz <wallbraker@gmail.com> <wallbraker 'at' gmail 'dot' com>
Jakub Bogusz <qboosh@pld-linux.org> <gboosh@pld-linux.org>
James Legg <jlegg@feralinteractive.com> <lankyleggy@gmail.com>
Jan Vesely <jano.vesely@gmail.com> Jan Vesely <jan.vesely@rutgers.edu>
Jason Ekstrand <jason@jlekstrand.net> <jason.ekstrand@intel.com>
Jeremy Huddleston <jeremyhu@apple.com> <jeremyhu@freedesktop.org>
Jeremy Huddleston <jeremyhu@apple.com> <jeremy@tifa.local>
Jeremy Huddleston <jeremyhu@apple.com> <jeremy@vincent.local>
Jeremy Huddleston <jeremyhu@apple.com> <jeremy@yuffie.local>
Jeremy Huddleston <jeremyhu@apple.com> Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Jeremy Kolb <jkolb@freedesktop.org> <jkolb@brandeis.edu>
Jerome Glisse <jglisse@redhat.com> <glisse@freedesktop.org>
Jerome Glisse <jglisse@redhat.com> <glisse@kemper.freedesktop.org>
Jerome Glisse <jglisse@redhat.com> John Doe <glisse@barney.(none)>
Jerome Glisse <jglisse@redhat.com> John Doe <glisse@localhost.localdomain>
Jesse Barnes <jesse.barnes@intel.com> <jbarnes@hobbes.lan>
Jesse Barnes <jesse.barnes@intel.com> <jbarnes@hobbes.(none)>
Jesse Barnes <jesse.barnes@intel.com> <jbarnes@jbarnes-desktop.localdomain>
Jesse Barnes <jesse.barnes@intel.com> <jbarnes@jbarnes-t61.(none)>
Jesse Barnes <jesse.barnes@intel.com> <jbarnes@virtuousgeek.org>
Joakim Sindholt <bacn@zhasha.com> <opensource@zhasha.com>
Joakim Sindholt <bacn@zhasha.com> <zhasha@gallium-dev.(none)>
Jochen Gerlach <jtg@users.sourceforge.net> jtg <jtg>
Joel Bosveld <joel.bosveld@gmail.com> <Joel.Bosveld@gmail.com>
Jonathan Adamczewski <jadamcze@utas.edu.au> <jadamcze@utas.edu.a>
Jon Turney <jon.turney@dronecode.org.uk> Jon TURNEY <jon.turney@dronecode.org.uk>
José Fonseca <jfonseca@vmware.com> Jose Fonseca <jfonseca@vmware.com>
José Fonseca <jfonseca@vmware.com> Jose Fonseca <jrfonseca@tungstengraphics.com>
José Fonseca <jfonseca@vmware.com> <jfonseca@pegasus.(none)>
José Fonseca <jfonseca@vmware.com> <jfonseca@titan.(none)>
José Fonseca <jfonseca@vmware.com> <jose.r.fonseca@gmail.com>
José Fonseca <jfonseca@vmware.com> <jrfonseca@tungstengraphics.com>
José Fonseca <jfonseca@vmware.com> <j_r_fonseca@yahoo.co.uk>
Jouk Jansen <joukj@hrem.nano.tudelft.nl> Jouk Jansen <jouk@hrem.nano.tudelft.nl>
Jouk Jansen <joukj@hrem.nano.tudelft.nl> Jouk Jansen <joukj@hrem.stm.tudelft.nl>
Jouk Jansen <joukj@hrem.nano.tudelft.nl> joukj <joukj@tarantella.(none)>
Jouk Jansen <joukj@hrem.nano.tudelft.nl> Jouk <joukj@tarantella.nano.tudelft.nl>
Jouk Jansen <joukj@hrem.nano.tudelft.nl> Jouk <joukj@tarantella.(none)>
Jouk Jansen <joukj@hrem.nano.tudelft.nl> J.Jansen <joukj@tarantella.nano.tudelft.nl>
Juan Zhao <juan.j.zhao@intel.com> <juan.j.zhao@linux.intel.com>
Julien Cristau <jcristau@debian.org> <julien.cristau@logilab.fr>
Julien Isorce <j.isorce@samsung.com> <julien.isorce@gmail.com>
Kalyan Kondapally <kalyan.kondapally@intel.com> <kondapallykalyancontribute@gmail.com>
Karl Schultz <karl.w.schultz@gmail.com> Karl Schultze <k.w.schultz@comcast.net>
Karl Schultz <karl.w.schultz@gmail.com> unknown <kwschult@.na.qualcomm.com>
Karl Schultz <karl.w.schultz@gmail.com> <k.w.schultz@comcast.net>
Karl Schultz <karl.w.schultz@gmail.com> <Karl.W.Schultz@gmail.com>
Karl Schultz <karl.w.schultz@gmail.com> <kschultz@freedesktop.org>
Keith Harrison <sio2@users.sourceforge.net> sio2 <sio2>
Keith Packard <keithp@keithp.com> <keithp@koto.keithp.com>
Keith Packard <keithp@keithp.com> <keithp@neko.keithp.com>
Keith Whitwell <keithw@vmware.com> <keith@tungstengraphics.com>
Keith Whitwell <keithw@vmware.com> keithw <keithw@keithw-laptop.(none)>
Kristian Høgsberg <krh@bitplanet.net> <krh@redhat.com>
Kristian Høgsberg <krh@bitplanet.net> <krh@hinata.boston.redhat.com>
Kristian Høgsberg <krh@bitplanet.net> <krh@sasori.boston.redhat.com>
Kristian Høgsberg <krh@bitplanet.net> <krh@temari.boston.redhat.com>
Kristian Høgsberg <krh@bitplanet.net> <kristian.h.kristensen@intel.com>
Krzesimir Nowak <qdlacz@gmail.com> <krzesimir@kinvolk.io>
Li Peng <peng.li@intel.com> <peng.li@linux.intel.com>
Lucas Stach <dev@lynxeye.de> <l.stach@pengutronix.de>
Maarten Lankhorst <maarten.lankhorst@ubuntu.com> <dev@mblankhorst.nl>
Maarten Lankhorst <maarten.lankhorst@ubuntu.com> <m.b.lankhorst@gmail.com>
Maarten Lankhorst <maarten.lankhorst@ubuntu.com> <maarten.lankhorst@canonical.com>
Maciej Cencora <m.cencora@gmail.com> <maciej@osiris.(none)>
Marc-André Lureau <marcandre.lureau@gmail.com> Marc-Andre Lureau <marcandre.lureau@gmail.com>
Marc Dietrich <marvin24@gmx.de> Marc <marvin24@gmx.de>
Marc Dietrich <marvin24@gmx.de> marvin24 <marvin24@gmx.de>
Marcin Ślusarz <marcin.slusarz@gmail.com> Marcin Slusarz <marcin.slusarz@gmail.com>
Marek Olšák <maraeo@gmail.com> <marek.olsak@amd.com>
Mario Kleiner <mario.kleiner.de@gmail.com> kleinerm <mario.kleiner@tuebingen.mpg.de>
Mario Kleiner <mario.kleiner.de@gmail.com> <mario.kleiner@tuebingen.mpg.de>
Mark Mueller <markkmueller@gmail.com> <MarkKMueller@gmail.com>
Marta Lofstedt <marta.lofstedt@intel.com> <marta.lofstedt@linux.intel.com>
Martin Peres <martin.peres@linux.intel.com> <martin.peres@labri.fr>
Mathias Fröhlich <mathias.froehlich@gmx.net> Mathias Froehlich <Mathias.Froehlich@gmx.net>
Mathias Fröhlich <mathias.froehlich@gmx.net> Mathias Froehlich <Mathias.Froehlich@web.de>
Mathias Fröhlich <mathias.froehlich@gmx.net> Mathias Frohlich <M.Froehlich@science-computing.de>
Mathias Fröhlich <mathias.froehlich@gmx.net> <frohlich8@users.sourceforge.net>
Mathias Fröhlich <mathias.froehlich@gmx.net> <Mathias.Froehlich@gmx.net>
Mathias Fröhlich <mathias.froehlich@gmx.net> <Mathias.Froehlich@web.de>
Mathias Fröhlich <mathias.froehlich@gmx.net> M.Froehlich@science-computing.de <M.Froehlich@science-computing.de>
Matthew W. S. Bell <matthew@bells23.org.uk> Matthew Bell <matthew@bells23.org.uk>
Maxence Le Doré <maxence.ledore@gmail.com> Maxence Le Dore <maxence.ledore@gmail.com>
Micah Fedke <micah.fedke@collabora.co.uk> <M.Fedke@Astronautics.com>
Michal Krol <michal@vmware.com> <michal@tungstengraphics.com>
Michal Krol <michal@vmware.com> Michal Krol <michal@ubuntu-vbox.(none)>
Michal Krol <michal@vmware.com> Michal Krol <mjkrol@gmail.org>
Michal Krol <michal@vmware.com> michal <michal@capacitor.(none)>
Michal Krol <michal@vmware.com> michal <michal@michal-laptop.(none)>
Michal Krol <michal@vmware.com> michal <michal@quad.(none)>
Michal Krol <michal@vmware.com> michal <michal@transistor.(none)>
Michal Krol <michal@vmware.com> Michal <michal@tungstengraphics.com>
Michal Krol <michal@vmware.com> michal <michal@wmvare.com>
Michel Dänzer <michel@daenzer.net> <michel.daenzer@amd.com>
Michel Dänzer <michel@daenzer.net> <daenzer@vmware.com>
Michel Dänzer <michel@daenzer.net> <michel@tungstengraphics.com>
Michel Dänzer <michel@daenzer.net> Michel Daenzer <michel.daenzer@amd.com>
Michel Dänzer <michel@daenzer.net> Michel Daenzer <daenzer@localhost.(none)>
Mike Kaplinskiy <mike.kaplinskiy@gmail.com> Mike Kaplinksiy <mike.kaplinskiy@gmail.com>
Mike Kaplinskiy <mike.kaplinskiy@gmail.com> <mike.kaplinskiy@gmai.com>
Mike Stroyan <mike@lunarg.com> <mike@LunarG.com>
Nian Wu <nian.wu@intel.com> <nian@graphics.(none)>
Nian Wu <nian.wu@intel.com> <nian@tinderbox.sh.intel.com>
Nick Bowler <nbowler@draconx.ca>
Nick Sarnie <commendsarnex@gmail.com>
Nicolai Hähnle <nicolai.haehnle@amd.com> <nhaehnle@gmail.com>
Nicolai Hähnle <nicolai.haehnle@amd.com> Nicolai Haehnle <nhaehnle@gmail.com>
Nicolai Hähnle <nicolai.haehnle@amd.com> Nicolai Haehnle <prefect_@gmx.net>
Nicolai Hähnle <nicolai.haehnle@amd.com> Nicolai Haehnle <prefect@upb.de>
Nigel Stewart <nigels@users.sourceforge.net> <nigels@sourceforge.net>
Nigel Stewart <nigels@users.sourceforge.net> <nstewart@nvidia.com>
nobled <nobled@dreamwidth.org> <nobled2@nobled2-karmic.(none)>
Oliver McFadden <oliver.mcfadden@linux.intel.com> <z3ro.geek@gmail.com>
Owain Ainsworth <zerooa@googlemail.com> Owain G. Ainsworth <oga@openbsd.org>
Owen W. Taylor <otaylor@fishsoup.net> Owen Taylor <otaylor@snell.localdomain>
Patrice Mandin <patmandin@gmail.com> <patrice@manoir.racoon.city>
Patrice Mandin <patmandin@gmail.com> <pmandin@caramail.com>
Patrice Mandin <patmandin@gmail.com> <pmandin@freedesktop.org>
Pauli Nieminen <pauli.nieminen@linux.intel.com> <suokkos@gmail.com>
Paulo Zanoni <paulo.r.zanoni@intel.com> Paulo Zanoni <pzanoni@mandriva.com>
Paul Seidler <sepek@exherbo.org> Paul Seidler <pl.seidler@googlemail.com>
Pekka Paalanen <pekka.paalanen@collabora.co.uk> <ppaalanen@gmail.com>
Pekka Paalanen <pekka.paalanen@collabora.co.uk> <pq@iki.fi>
Peter Hutterer <peter.hutterer@who-t.net> <peter@cs.unisa.edu.au>
Pierre-Eric Pelloux-Prayer <pelloux@gmail.com> pepp <pelloux@gmail.com>
Pierre Willenbrock <pierre@pirsoft.de> Pierre Willenbrok <pierre@pirsoft.de>
Quentin Glidic <sardemff7+git@sardemff7.net> <sardemff7@sardemff7.net>
RALOVICH, Kristóf <tade60@freemail.hu> <kristof.ralovich@gmail.com>
Richard Li <richardradeon@gmail.com> <RichardZ.Li@amd.com>
# The next ones are not 100% sure
Richard Li <richardradeon@gmail.com> richard <richard@richard-desktop3.(none)>
Richard Li <richardradeon@gmail.com> richard <richard@richard-desktop.(none)>
Richard Li <richardradeon@gmail.com> root <root@richard-desktop.(none)>
Richard Sandiford <rsandifo@linux.vnet.ibm.com> <r.sandiford@uk.ibm.com>
Rob Clark <robclark@freedesktop.org> <Rob Clark robdclark@freedesktop.org>
Rob Clark <robclark@freedesktop.org> <robdclark@gmail.com>
Robert Bragg <robert@sixbynine.org> <robert@linux.intel.com>
Robert Ellison <papillo@vmware.com> <papillo@i965-laptop.(none)>
Robert Ellison <papillo@vmware.com> <papillo@tungstengraphics.com>
Robert Hooker <sarvatt@ubuntu.com> <robert.hooker@canonical.com>
Roland Scheidegger <sroland@vmware.com> <rscheidegger@gmx.ch>
Roland Scheidegger <sroland@vmware.com> <sroland@tungstengraphics.com>
Roy Spliet <rspliet@eclipso.eu> <r.spliet@student.tudelft.nl>
Rune Petersen <rune@megahurts.dk> Rune Peterson <rune@megahurts.dk>
Ryan Houdek <sonicadvance1@gmail.com> <Sonicadvance1@gmail.com>
Sam Hocevar <sam@hocevar.net> Sam Hocevar <sam@zoy.org>
Samuel Iglesias Gonsálvez <siglesias@igalia.com> Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Sean D'Epagnier <sean@depagnier.com> <geckosenator@freedesktop.org>
Serge Martin <edb+mesa@sigluy.net> Serge Martin (EdB) <edb+mesa@sigluy.net>
Serge Martin <edb+mesa@sigluy.net> EdB <edb+mesa@sigluy.net>
Sinclair Yeh <syeh@vmware.com> <sinclair.yeh@intel.com>
Stefan Brüns <stefan.bruens@rwth-aachen.de> <Stefan.Bruens@rwth-aachen.de>
Stéphane Marchesin <marcheu@chromium.org> Stephane Marchesin <marchesin@icps.u-strasbg.fr>
Stéphane Marchesin <marcheu@chromium.org> Stephane Marchesin <stephane.marchesin@gmail.com>
Sven M. Hallberg <pesco@users.sourceforge.net> pesco <pesco>
Tapani Pälli <tapani.palli@intel.com> <tapani.palli@gmail.com>
Tapani Pälli <tapani.palli@intel.com> Tapani <tapani.palli@intel.com>
Thierry Reding <treding@nvidia.com> <thierry@gilfi.de>
Thierry Reding <treding@nvidia.com> <thierry.reding@avionic-design.de>
Thierry Vignaud <thierry.vignaud@gmail.com> <tvignaud@mandriva.com>
Thomas Balling Sørensen <tball@io.dk> <tball@tball-laptop.(none)>
Thomas Hellstrom <thellstrom@vmware.com> Thomas <thellstrom@vmware.com>
Thomas Hellstrom <thellstrom@vmware.com> Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Thomas Hellstrom <thellstrom@vmware.com> Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Thomas Hellstrom <thellstrom@vmware.com> Thomas Hellstrom <thomas@tungstengraphics.com>
Thomas Hellstrom <thellstrom@vmware.com> Thomas Hellström <thomas@tungstengraphics.com>
Thomas Tanner <tanner@gmx.net> tanner <tanner>
Tilman Sauerbeck <tilman@code-monkey.de> <tilman@freedesktop.org>
Timothy Arceri <timothy.arceri@collabora.com> <t_arceri@yahoo.com.au>
Timothy Arceri <timothy.arceri@collabora.com> Timothy <t_arceri@yahoo.com.au>
Tom Fogal <tfogal@alumni.unh.edu> <tfogal@sci.utah.edu>
Tom Stellard <thomas.stellard@amd.com> <tstellar@gmail.com>
Tom Stellard <thomas.stellard@amd.com> Thomas Stellard <tom.stellard@amd.com>
Tormod Volden <debian.tormod@gmail.com> <lists.tormod@gmail.com>
Török Edwin <edwin+mesa@etorok.net> Török Edvin <edwintorok@gmail.com>
Török Edwin <edwin+mesa@etorok.net> <edwintorok@gmail.com>
Ville Syrjälä <ville.syrjala@linux.intel.com> Ville Syrjala <syrjala@freedesktop.org>
Ville Syrjälä <ville.syrjala@linux.intel.com> Ville Syrjala <syrjala@sci.fi>
Vincent Lejeune <vljn@ovi.com> <peluche.canard@gmail.com>
Vinson Lee <vlee@freedesktop.org> <vlee@vmware.com>
Zhenyu Wang <zhenyuw@linux.intel.com> Wang Zhenyu <zhenyu.z.wang@intel.com>
Zack Rusin <zackr@vmware.com> <zack@kde.org>
Zack Rusin <zackr@vmware.com> <zack@pixel.(none)>
Zack Rusin <zackr@vmware.com> <zack@tungstengraphics.com>
Zhang <zxpmyth@yahoo.com.cn> zhang <zxpmyth@yahoo.com.cn>

View File

@@ -1,852 +0,0 @@
language: c
dist: xenial
cache:
apt: true
ccache: true
env:
global:
- XORG_RELEASES=https://xorg.freedesktop.org/releases/individual
- XCB_RELEASES=https://xcb.freedesktop.org/dist
- WAYLAND_RELEASES=https://wayland.freedesktop.org/releases
- XORGMACROS_VERSION=util-macros-1.19.0
- GLPROTO_VERSION=glproto-1.4.17
- DRI2PROTO_VERSION=dri2proto-2.8
- LIBPCIACCESS_VERSION=libpciaccess-0.13.4
- LIBDRM_VERSION=libdrm-2.4.97
- XCBPROTO_VERSION=xcb-proto-1.13
- RANDRPROTO_VERSION=randrproto-1.3.0
- LIBXRANDR_VERSION=libXrandr-1.3.0
- LIBXCB_VERSION=libxcb-1.13
- LIBXSHMFENCE_VERSION=libxshmfence-1.2
- LIBVDPAU_VERSION=libvdpau-1.1
- LIBVA_VERSION=libva-1.7.0
- LIBWAYLAND_VERSION=wayland-1.15.0
- WAYLAND_PROTOCOLS_VERSION=wayland-protocols-1.8
- PKG_CONFIG_PATH=$HOME/prefix/lib/pkgconfig:$HOME/prefix/share/pkgconfig
- LD_LIBRARY_PATH="$HOME/prefix/lib:$LD_LIBRARY_PATH"
- PATH="$HOME/prefix/bin:$PATH"
matrix:
include:
- env:
- LABEL="meson Vulkan"
- BUILD=meson
- UNWIND="false"
- DRI_LOADERS="-Dglx=disabled -Dgbm=false -Degl=false -Dplatforms=x11,wayland,drm -Dosmesa=none"
- GALLIUM_ST="-Ddri3=true -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
- VULKAN_DRIVERS="intel,amd"
- LLVM_VERSION=7
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
packages:
- llvm-7-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- python3.5
- python3-pip
- python3-setuptools
- env:
- LABEL="meson loaders/classic DRI"
- BUILD=meson
- UNWIND="false"
- DRI_LOADERS="-Dglx=dri -Dgbm=true -Degl=true -Dplatforms=x11,wayland,drm,surfaceless -Dosmesa=classic"
- DRI_DRIVERS="i915,i965,r100,r200,swrast,nouveau"
- GALLIUM_ST="-Ddri3=true -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
addons:
apt:
packages:
- xz-utils
- x11proto-xf86vidmode-dev
- libxxf86vm-dev
- libexpat1-dev
- libx11-xcb-dev
- libxdamage-dev
- libxfixes-dev
- python3.5
- python3-pip
- python3-setuptools
- env:
- LABEL="make loaders/classic DRI"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="make check"
- DRI_LOADERS="--enable-glx --enable-gbm --enable-egl --with-platforms=x11,drm,surfaceless,wayland --enable-osmesa"
- DRI_DRIVERS="i915,i965,radeon,r200,swrast,nouveau"
- GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS=""
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--disable-libunwind"
addons:
apt:
packages:
- xz-utils
- x11proto-xf86vidmode-dev
- libxxf86vm-dev
- libexpat1-dev
- libx11-xcb-dev
- libxdamage-dev
- libxfixes-dev
- python3-pip
- python3-setuptools
- env:
# NOTE: Building SWR is 2x (yes two) times slower than all the other
# gallium drivers combined.
# Start this early so that it doesn't hunder the run time.
- LABEL="meson Gallium Drivers SWR"
- BUILD=meson
- UNWIND="true"
- DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
- GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
- GALLIUM_DRIVERS="swr"
- LLVM_VERSION=6.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
addons:
apt:
packages:
- llvm-6.0-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3.5
- python3-pip
- python3-setuptools
- env:
- LABEL="meson Gallium Drivers RadeonSI"
- BUILD=meson
- UNWIND="true"
- DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
- GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
- GALLIUM_DRIVERS="radeonsi"
- LLVM_VERSION=7
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
packages:
# From sources above
- llvm-7-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3.5
- python3-pip
- python3-setuptools
- env:
- LABEL="meson Gallium Drivers Other"
- BUILD=meson
- UNWIND="true"
- DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
- GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
- GALLIUM_DRIVERS="i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
- LLVM_VERSION=5.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
addons:
apt:
packages:
# LLVM packaging is broken and misses these dependencies
- libedit-dev
- llvm-5.0-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3.5
- python3-pip
- python3-setuptools
- env:
- LABEL="meson Gallium ST Clover LLVM-5.0"
- BUILD=meson
- UNWIND="true"
- DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
- GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=icd"
- GALLIUM_DRIVERS="r600"
- LLVM_VERSION=5.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
addons:
apt:
packages:
- libclc-dev
# LLVM packaging is broken and misses these dependencies
- libedit-dev
- llvm-5.0-dev
- clang-5.0
- libclang-5.0-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="meson Gallium ST Clover LLVM-6.0"
- BUILD=meson
- UNWIND="true"
- DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
- GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=icd"
- GALLIUM_DRIVERS="r600"
- LLVM_VERSION=6.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
addons:
apt:
packages:
- libclc-dev
- llvm-6.0-dev
- clang-6.0
- libclang-6.0-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3.5
- python3-pip
- python3-setuptools
- env:
- LABEL="meson Gallium ST Clover LLVM-7"
- BUILD=meson
- UNWIND="true"
- DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
- GALLIUM_ST="-Ddri3=false -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=icd"
- GALLIUM_DRIVERS="r600,radeonsi"
- LLVM_VERSION=7
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
packages:
- libclc-dev
# From sources above
- llvm-7-dev
- clang-7
- libclang-7-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3.5
- python3-pip
- python3-setuptools
- env:
- LABEL="meson Gallium ST Other"
- BUILD=meson
- UNWIND="true"
- DRI_LOADERS="-Dglx=disabled -Degl=false -Dgbm=false"
- GALLIUM_ST="-Ddri3=true -Dgallium-vdpau=true -Dgallium-xvmc=true -Dgallium-omx=bellagio -Dgallium-va=true -Dgallium-xa=true -Dgallium-nine=true -Dgallium-opencl=disabled -Dosmesa=gallium"
# We need swrast for osmesa and nine.
# Nouveau supports, or builds at least against all ST.
- GALLIUM_DRIVERS="nouveau,swrast"
- LLVM_VERSION=5.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
addons:
apt:
packages:
- llvm-5.0-dev
# LLVM packaging is broken and misses these dependencies
- libedit-dev
# Nine requires gcc 4.6... which is the one we have right ?
- libxvmc-dev
# Build locally, for now.
#- libvdpau-dev
#- libva-dev
- libomxil-bellagio-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3.5
- python3-pip
- python3-setuptools
- env:
# NOTE: Building SWR is 2x (yes two) times slower than all the other
# gallium drivers combined.
# Start this early so that it doesn't hunder the run time.
- LABEL="make Gallium Drivers SWR"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="true"
- LLVM_VERSION=6.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
- DRI_DRIVERS=""
- GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS="swr"
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--enable-libunwind"
addons:
apt:
packages:
- llvm-6.0-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="make Gallium Drivers RadeonSI"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="true"
- LLVM_VERSION=7
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
- DRI_DRIVERS=""
- GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS="radeonsi"
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--enable-libunwind"
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
packages:
# From sources above
- llvm-7-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="make Gallium Drivers Other"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="true"
- LLVM_VERSION=3.9
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
- DRI_DRIVERS=""
- GALLIUM_ST="--enable-dri --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS="i915,nouveau,kmsro,r300,r600,freedreno,svga,swrast,v3d,vc4,virgl,etnaviv"
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--enable-libunwind"
addons:
apt:
packages:
# LLVM packaging is broken and misses these dependencies
- libedit-dev
- llvm-3.9-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="make Gallium ST Clover LLVM-3.9"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="true"
- LLVM_VERSION=3.9
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
- DRI_DRIVERS=""
- GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS="r600"
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--enable-libunwind"
addons:
apt:
packages:
- libclc-dev
# LLVM packaging is broken and misses these dependencies
- libedit-dev
- llvm-3.9-dev
- clang-3.9
- libclang-3.9-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="make Gallium ST Clover LLVM-4.0"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="true"
- LLVM_VERSION=4.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
- DRI_DRIVERS=""
- GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS="r600"
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--enable-libunwind"
addons:
apt:
packages:
- libclc-dev
# LLVM packaging is broken and misses these dependencies
- libedit-dev
- llvm-4.0-dev
- clang-4.0
- libclang-4.0-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="make Gallium ST Clover LLVM-5.0"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="true"
- LLVM_VERSION=5.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
- DRI_DRIVERS=""
- GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS="r600"
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--enable-libunwind"
addons:
apt:
packages:
- libclc-dev
# LLVM packaging is broken and misses these dependencies
- libedit-dev
- llvm-5.0-dev
- clang-5.0
- libclang-5.0-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="make Gallium ST Clover LLVM-6.0"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="true"
- LLVM_VERSION=6.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
- DRI_DRIVERS=""
- GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS="r600"
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--enable-libunwind"
addons:
apt:
packages:
- libclc-dev
- llvm-6.0-dev
- clang-6.0
- libclang-6.0-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="make Gallium ST Clover LLVM-7"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="true"
- LLVM_VERSION=7
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
- DRI_DRIVERS=""
- GALLIUM_ST="--disable-dri --enable-opencl --enable-opencl-icd --enable-llvm --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS="r600,radeonsi"
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--enable-libunwind"
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
packages:
- libclc-dev
# From sources above
- llvm-7-dev
- clang-7
- libclang-7-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- env:
- LABEL="make Gallium ST Other"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="true"
- LLVM_VERSION=3.5
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl"
- DRI_DRIVERS=""
- GALLIUM_ST="--enable-dri --disable-opencl --enable-xa --enable-nine --enable-xvmc --enable-vdpau --enable-va --enable-omx-bellagio --enable-gallium-osmesa"
# We need swrast for osmesa and nine.
# i915 most likely doesn't work with most ST.
# Regardless - we're doing a quick build test here.
- GALLIUM_DRIVERS="i915,swrast"
- VULKAN_DRIVERS=""
- LIBUNWIND_FLAGS="--enable-libunwind"
addons:
apt:
packages:
# We actually want to test against llvm-3.3, yet 3.5 is available
- llvm-3.5-dev
# Nine requires gcc 4.6... which is the one we have right ?
- libxvmc-dev
# Build locally, for now.
#- libvdpau-dev
#- libva-dev
- libomxil-bellagio-dev
# LLVM packaging is broken and misses these dependencies
- libedit-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- libunwind8-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="make Vulkan"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="make -C src/gtest check && make -C src/intel check"
- LLVM_VERSION=7
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
- DRI_LOADERS="--disable-glx --disable-gbm --disable-egl --with-platforms=x11,wayland"
- DRI_DRIVERS=""
- GALLIUM_ST="--enable-dri --enable-dri3 --disable-opencl --disable-xa --disable-nine --disable-xvmc --disable-vdpau --disable-va --disable-omx-bellagio --disable-gallium-osmesa"
- GALLIUM_DRIVERS=""
- VULKAN_DRIVERS="intel,radeon"
- LIBUNWIND_FLAGS="--disable-libunwind"
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
key_url: https://apt.llvm.org/llvm-snapshot.gpg.key
packages:
# From sources above
- llvm-7-dev
# Common
- xz-utils
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- python3-pip
- python3-setuptools
- env:
- LABEL="scons"
- BUILD=scons
- SCONSFLAGS="-j4"
# Explicitly disable.
- SCONS_TARGET="llvm=0"
# Keep it symmetrical to the make build.
- SCONS_CHECK_COMMAND="scons llvm=0 check"
addons:
apt:
packages:
# Common
- xz-utils
- x11proto-xf86vidmode-dev
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- env:
- LABEL="scons LLVM"
- BUILD=scons
- SCONSFLAGS="-j4"
- SCONS_TARGET="llvm=1"
# Keep it symmetrical to the make build.
- SCONS_CHECK_COMMAND="scons llvm=1 check"
- LLVM_VERSION=3.5
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
addons:
apt:
packages:
# LLVM packaging is broken and misses these dependencies
- libedit-dev
# We actually want to test against llvm-3.3, yet 3.5 is available
- llvm-3.5-dev
# Common
- xz-utils
- x11proto-xf86vidmode-dev
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- env:
- LABEL="scons SWR"
- BUILD=scons
- SCONSFLAGS="-j4"
- SCONS_TARGET="swr=1"
- LLVM_VERSION=6.0
- LLVM_CONFIG="llvm-config-${LLVM_VERSION}"
# Keep it symmetrical to the make build. There's no actual SWR, yet.
- SCONS_CHECK_COMMAND="true"
addons:
apt:
packages:
- llvm-6.0-dev
# Common
- xz-utils
- x11proto-xf86vidmode-dev
- libexpat1-dev
- libx11-xcb-dev
- libelf-dev
- env:
- LABEL="macOS make"
- BUILD=make
- MAKEFLAGS="-j4"
- MAKE_CHECK_COMMAND="make check"
- DRI_LOADERS="--with-platforms=x11 --disable-egl"
os: osx
- env:
- LABEL="macOS meson"
- BUILD=meson
- UNWIND="false"
- DRI_LOADERS="-Dglx=dri -Dgbm=false -Degl=false -Dplatforms=x11 -Dosmesa=none"
- GALLIUM_ST="-Ddri3=true -Dgallium-vdpau=false -Dgallium-xvmc=false -Dgallium-omx=disabled -Dgallium-va=false -Dgallium-xa=false -Dgallium-nine=false -Dgallium-opencl=disabled"
os: osx
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install python3 ninja expat gettext
# Set PATH for homebrew pip3 installs
PATH="$HOME/Library/Python/3.6/bin:${PATH}"
# Set PKG_CONFIG_PATH for keg-only expat
PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:${PKG_CONFIG_PATH}"
# Set PATH for keg-only gettext
PATH="/usr/local/opt/gettext/bin:${PATH}"
# Install xquartz for prereqs ...
XQUARTZ_VERSION="2.7.11"
wget -nv https://dl.bintray.com/xquartz/downloads/XQuartz-${XQUARTZ_VERSION}.dmg
hdiutil attach XQuartz-${XQUARTZ_VERSION}.dmg
sudo installer -pkg /Volumes/XQuartz-${XQUARTZ_VERSION}/XQuartz.pkg -target /
hdiutil detach /Volumes/XQuartz-${XQUARTZ_VERSION}
# ... and set paths
PATH="/opt/X11/bin:${PATH}"
PKG_CONFIG_PATH="/opt/X11/share/pkgconfig:/opt/X11/lib/pkgconfig:${PKG_CONFIG_PATH}"
ACLOCAL="aclocal -I /opt/X11/share/aclocal -I /usr/local/share/aclocal"
fi
install:
# Install a more modern meson from pip, since the version in the
# ubuntu repos is often quite old.
- if test "x$BUILD" = xmeson; then
pip3 install --user meson;
pip3 install --user mako;
fi
# Install autotools build dependencies
- if test "x$BUILD" = xmake; then
pip2 install --user mako;
fi
# Install a more modern scons from pip.
- if test "x$BUILD" = xscons; then
pip2 install --user "scons>=2.4";
pip2 install --user mako;
fi
# Install dependencies where we require specific versions (or where
# disallowed by Travis CI's package whitelisting).
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget $XORG_RELEASES/util/$XORGMACROS_VERSION.tar.bz2
tar -jxvf $XORGMACROS_VERSION.tar.bz2
(cd $XORGMACROS_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget $XORG_RELEASES/proto/$GLPROTO_VERSION.tar.bz2
tar -jxvf $GLPROTO_VERSION.tar.bz2
(cd $GLPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget $XORG_RELEASES/proto/$DRI2PROTO_VERSION.tar.bz2
tar -jxvf $DRI2PROTO_VERSION.tar.bz2
(cd $DRI2PROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget $XCB_RELEASES/$XCBPROTO_VERSION.tar.bz2
tar -jxvf $XCBPROTO_VERSION.tar.bz2
(cd $XCBPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget $XCB_RELEASES/$LIBXCB_VERSION.tar.bz2
tar -jxvf $LIBXCB_VERSION.tar.bz2
(cd $LIBXCB_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget $XORG_RELEASES/lib/$LIBPCIACCESS_VERSION.tar.bz2
tar -jxvf $LIBPCIACCESS_VERSION.tar.bz2
(cd $LIBPCIACCESS_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget https://dri.freedesktop.org/libdrm/$LIBDRM_VERSION.tar.bz2
tar -jxvf $LIBDRM_VERSION.tar.bz2
(cd $LIBDRM_VERSION && ./configure --prefix=$HOME/prefix --enable-vc4 --enable-freedreno --enable-etnaviv-experimental-api && make install)
wget $XORG_RELEASES/proto/$RANDRPROTO_VERSION.tar.bz2
tar -jxvf $RANDRPROTO_VERSION.tar.bz2
(cd $RANDRPROTO_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget $XORG_RELEASES/lib/$LIBXRANDR_VERSION.tar.bz2
tar -jxvf $LIBXRANDR_VERSION.tar.bz2
(cd $LIBXRANDR_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget $XORG_RELEASES/lib/$LIBXSHMFENCE_VERSION.tar.bz2
tar -jxvf $LIBXSHMFENCE_VERSION.tar.bz2
(cd $LIBXSHMFENCE_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget https://people.freedesktop.org/~aplattner/vdpau/$LIBVDPAU_VERSION.tar.bz2
tar -jxvf $LIBVDPAU_VERSION.tar.bz2
(cd $LIBVDPAU_VERSION && ./configure --prefix=$HOME/prefix && make install)
wget https://www.freedesktop.org/software/vaapi/releases/libva/$LIBVA_VERSION.tar.bz2
tar -jxvf $LIBVA_VERSION.tar.bz2
(cd $LIBVA_VERSION && ./configure --prefix=$HOME/prefix --disable-wayland --disable-dummy-driver && make install)
wget $WAYLAND_RELEASES/$LIBWAYLAND_VERSION.tar.xz
tar -axvf $LIBWAYLAND_VERSION.tar.xz
(cd $LIBWAYLAND_VERSION && ./configure --prefix=$HOME/prefix --enable-libraries --without-host-scanner --disable-documentation --disable-dtd-validation && make install)
wget $WAYLAND_RELEASES/$WAYLAND_PROTOCOLS_VERSION.tar.xz
tar -axvf $WAYLAND_PROTOCOLS_VERSION.tar.xz
(cd $WAYLAND_PROTOCOLS_VERSION && ./configure --prefix=$HOME/prefix && make install)
# Meson requires ninja >= 1.6, but xenial has 1.3.x
wget https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-linux.zip
unzip ninja-linux.zip
mv ninja $HOME/prefix/bin/
# Generate this header since one is missing on the Travis instance
mkdir -p linux
printf "%s\n" \
"#ifndef _LINUX_MEMFD_H" \
"#define _LINUX_MEMFD_H" \
"" \
"#define MFD_CLOEXEC 0x0001U" \
"#define MFD_ALLOW_SEALING 0x0002U" \
"" \
"#endif /* _LINUX_MEMFD_H */" > linux/memfd.h
# Generate this header, including the missing SYS_memfd_create
# macro, which is not provided by the header in the Travis
# instance
mkdir -p sys
printf "%s\n" \
"#ifndef _SYSCALL_H" \
"#define _SYSCALL_H 1" \
"" \
"#include <asm/unistd.h>" \
"" \
"#ifndef _LIBC" \
"# include <bits/syscall.h>" \
"#endif" \
"" \
"#ifndef __NR_memfd_create" \
"# define __NR_memfd_create 319 /* Taken from <asm/unistd_64.h> */" \
"#endif" \
"" \
"#ifndef SYS_memfd_create" \
"# define SYS_memfd_create __NR_memfd_create" \
"#endif" \
"" \
"#endif" > sys/syscall.h
fi
script:
- if test "x$BUILD" = xmake; then
export CFLAGS="$CFLAGS -isystem`pwd`";
mkdir build &&
cd build &&
../autogen.sh
--enable-autotools
--enable-debug
$LIBUNWIND_FLAGS
$DRI_LOADERS
--with-dri-drivers=$DRI_DRIVERS
$GALLIUM_ST
--with-gallium-drivers=$GALLIUM_DRIVERS
--with-vulkan-drivers=$VULKAN_DRIVERS
--disable-llvm-shared-libs
&&
make && eval $MAKE_CHECK_COMMAND;
fi
- if test "x$BUILD" = xscons; then
scons $SCONS_TARGET && eval $SCONS_CHECK_COMMAND;
fi
- |
if test "x$BUILD" = xmeson; then
if test -n "$LLVM_CONFIG"; then
# We need to control the version of llvm-config we're using, so we'll
# generate a native file to do so. This requires meson >=0.49
#
echo -e "[binaries]\nllvm-config = '`which $LLVM_CONFIG`'" > native.file
$LLVM_CONFIG --version
else
: > native.file
fi
export CFLAGS="$CFLAGS -isystem`pwd`"
meson _build \
--native-file=native.file \
-Dbuild-tests=true \
-Dlibunwind=${UNWIND} \
${DRI_LOADERS} \
-Ddri-drivers=${DRI_DRIVERS:-[]} \
${GALLIUM_ST} \
-Dgallium-drivers=${GALLIUM_DRIVERS:-[]} \
-Dvulkan-drivers=${VULKAN_DRIVERS:-[]}
meson configure _build
ninja -C _build
ninja -C _build test
fi

View File

@@ -1,129 +0,0 @@
# Mesa 3-D graphics library
#
# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
# Copyright (C) 2010-2011 LunarG Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
ifeq ($(LOCAL_IS_HOST_MODULE),true)
LOCAL_CFLAGS += -D_GNU_SOURCE
endif
LOCAL_C_INCLUDES += \
$(MESA_TOP)/src \
$(MESA_TOP)/include
MESA_VERSION := $(shell cat $(MESA_TOP)/VERSION)
LOCAL_CFLAGS += \
-Wno-error \
-Wno-unused-parameter \
-Wno-pointer-arith \
-Wno-missing-field-initializers \
-Wno-initializer-overrides \
-Wno-mismatched-tags \
-DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"
# XXX: The following __STDC_*_MACROS defines should not be needed.
# It's likely due to a bug elsewhere, but let's temporarily add them
# here to fix the radeonsi build.
LOCAL_CFLAGS += \
-DANDROID_API_LEVEL=$(PLATFORM_SDK_VERSION) \
-DENABLE_SHADER_CACHE \
-D__STDC_CONSTANT_MACROS \
-D__STDC_LIMIT_MACROS \
-DHAVE___BUILTIN_EXPECT \
-DHAVE___BUILTIN_FFS \
-DHAVE___BUILTIN_FFSLL \
-DHAVE_DLFCN_H \
-DHAVE_FUNC_ATTRIBUTE_FLATTEN \
-DHAVE_FUNC_ATTRIBUTE_UNUSED \
-DHAVE_FUNC_ATTRIBUTE_FORMAT \
-DHAVE_FUNC_ATTRIBUTE_PACKED \
-DHAVE_FUNC_ATTRIBUTE_ALIAS \
-DHAVE_FUNC_ATTRIBUTE_NORETURN \
-DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL \
-DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT \
-DHAVE___BUILTIN_CTZ \
-DHAVE___BUILTIN_POPCOUNT \
-DHAVE___BUILTIN_POPCOUNTLL \
-DHAVE___BUILTIN_CLZ \
-DHAVE___BUILTIN_CLZLL \
-DHAVE___BUILTIN_UNREACHABLE \
-DHAVE_PTHREAD=1 \
-DHAVE_DLADDR \
-DHAVE_DL_ITERATE_PHDR \
-DHAVE_LINUX_FUTEX_H \
-DHAVE_ENDIAN_H \
-DHAVE_ZLIB \
-DMAJOR_IN_SYSMACROS \
-DVK_USE_PLATFORM_ANDROID_KHR \
-fvisibility=hidden \
-fno-math-errno \
-fno-trapping-math \
-Wno-sign-compare
LOCAL_CPPFLAGS += \
-D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS \
-D__STDC_LIMIT_MACROS \
-Wno-error=non-virtual-dtor \
-Wno-non-virtual-dtor
# mesa requires at least c99 compiler
LOCAL_CONLYFLAGS += \
-std=c99
# c11 timespec_get is part of bionic as well
# https://android-review.googlesource.com/c/718518
# This means releases from P and earlier won't need this
ifeq ($(filter 5 6 7 8 9, $(MESA_ANDROID_MAJOR_VERSION)),)
LOCAL_CFLAGS += -DHAVE_TIMESPEC_GET
endif
ifeq ($(strip $(MESA_ENABLE_ASM)),true)
ifeq ($(TARGET_ARCH),x86)
LOCAL_CFLAGS += \
-DUSE_X86_ASM
endif
endif
ifeq ($(ARCH_ARM_HAVE_NEON),true)
LOCAL_CFLAGS_arm += -DUSE_ARM_ASM
endif
LOCAL_CFLAGS_arm64 += -DUSE_AARCH64_ASM
ifneq ($(LOCAL_IS_HOST_MODULE),true)
LOCAL_CFLAGS += -DHAVE_LIBDRM
LOCAL_SHARED_LIBRARIES += libdrm
endif
LOCAL_CFLAGS_32 += -DDEFAULT_DRIVER_DIR=\"/vendor/lib/$(MESA_DRI_MODULE_REL_PATH)\"
LOCAL_CFLAGS_64 += -DDEFAULT_DRIVER_DIR=\"/vendor/lib64/$(MESA_DRI_MODULE_REL_PATH)\"
LOCAL_PROPRIETARY_MODULE := true
# uncomment to keep the debug symbols
#LOCAL_STRIP_MODULE := false
ifeq ($(strip $(LOCAL_MODULE_TAGS)),)
LOCAL_MODULE_TAGS := optional
endif
# Quiet down the build system and remove any .h files from the sources
LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES))

View File

@@ -1,126 +0,0 @@
# Mesa 3-D graphics library
#
# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
# Copyright (C) 2010-2011 LunarG Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# BOARD_GPU_DRIVERS should be defined. The valid values are
#
# classic drivers: i915 i965
# gallium drivers: swrast freedreno i915g nouveau kmsro r300g r600g radeonsi vc4 virgl vmwgfx etnaviv
#
# The main target is libGLES_mesa. For each classic driver enabled, a DRI
# module will also be built. DRI modules will be loaded by libGLES_mesa.
MESA_TOP := $(call my-dir)
MESA_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
ifneq ($(filter 2 4, $(MESA_ANDROID_MAJOR_VERSION)),)
$(error "Android 4.4 and earlier not supported")
endif
MESA_DRI_MODULE_REL_PATH := dri
MESA_DRI_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/$(MESA_DRI_MODULE_REL_PATH)
MESA_DRI_MODULE_UNSTRIPPED_PATH := $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/$(MESA_DRI_MODULE_REL_PATH)
MESA_DRI_LDFLAGS := -Wl,--build-id=sha1
MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
MESA_PYTHON2 := python
# Lists to convert driver names to boolean variables
# in form of <driver name>.<boolean make variable>
classic_drivers := i915.HAVE_I915_DRI i965.HAVE_I965_DRI
gallium_drivers := \
swrast.HAVE_GALLIUM_SOFTPIPE \
freedreno.HAVE_GALLIUM_FREEDRENO \
i915g.HAVE_GALLIUM_I915 \
nouveau.HAVE_GALLIUM_NOUVEAU \
kmsro.HAVE_GALLIUM_KMSRO \
r300g.HAVE_GALLIUM_R300 \
r600g.HAVE_GALLIUM_R600 \
radeonsi.HAVE_GALLIUM_RADEONSI \
vmwgfx.HAVE_GALLIUM_VMWGFX \
vc4.HAVE_GALLIUM_VC4 \
virgl.HAVE_GALLIUM_VIRGL \
etnaviv.HAVE_GALLIUM_ETNAVIV
ifeq ($(BOARD_GPU_DRIVERS),all)
MESA_BUILD_CLASSIC := $(filter HAVE_%, $(subst ., , $(classic_drivers)))
MESA_BUILD_GALLIUM := $(filter HAVE_%, $(subst ., , $(gallium_drivers)))
else
# Warn if we have any invalid driver names
$(foreach d, $(BOARD_GPU_DRIVERS), \
$(if $(findstring $(d).,$(classic_drivers) $(gallium_drivers)), \
, \
$(warning invalid GPU driver: $(d)) \
) \
)
MESA_BUILD_CLASSIC := $(strip $(foreach d, $(BOARD_GPU_DRIVERS), $(patsubst $(d).%,%, $(filter $(d).%, $(classic_drivers)))))
MESA_BUILD_GALLIUM := $(strip $(foreach d, $(BOARD_GPU_DRIVERS), $(patsubst $(d).%,%, $(filter $(d).%, $(gallium_drivers)))))
endif
ifeq ($(filter x86%,$(TARGET_ARCH)),)
MESA_BUILD_CLASSIC :=
endif
$(foreach d, $(MESA_BUILD_CLASSIC) $(MESA_BUILD_GALLIUM), $(eval $(d) := true))
# host and target must be the same arch to generate matypes.h
ifeq ($(TARGET_ARCH),$(HOST_ARCH))
MESA_ENABLE_ASM := true
else
MESA_ENABLE_ASM := false
endif
ifneq ($(filter true, $(HAVE_GALLIUM_RADEONSI)),)
MESA_ENABLE_LLVM := true
endif
define mesa-build-with-llvm
$(if $(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5), \
$(warning Unsupported LLVM version in Android $(MESA_ANDROID_MAJOR_VERSION)),) \
$(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)), \
$(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0)) \
$(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \
$(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0)) \
$(if $(filter 8,$(MESA_ANDROID_MAJOR_VERSION)), \
$(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_PATCH=0)) \
$(if $(filter P,$(MESA_ANDROID_MAJOR_VERSION)), \
$(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_PATCH=0)) \
$(eval LOCAL_SHARED_LIBRARIES += libLLVM)
endef
# add subdirectories
SUBDIRS := \
src/gbm \
src/loader \
src/mapi \
src/compiler \
src/mesa \
src/util \
src/egl \
src/amd \
src/broadcom \
src/intel \
src/mesa/drivers/dri \
src/vulkan
INC_DIRS := $(call all-named-subdir-makefiles,$(SUBDIRS))
INC_DIRS += $(call all-named-subdir-makefiles,src/gallium)
include $(INC_DIRS)

View File

@@ -1,16 +0,0 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libmesa_*_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/i9*5_dri_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libglapi_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libGLES_mesa_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/obj/EXECUTABLES/mesa_*_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/obj/EXECUTABLES/glsl_compiler_intermediates)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/$(HOST_OS)-$(HOST_ARCH)/obj/STATIC_LIBRARIES/libmesa_glsl_utils_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/STATIC_LIBRARIES/libmesa_*_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/i9?5_dri_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/libglapi_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/libGLES_mesa_intermediates)
$(call add-clean-step, rm -rf $(HOST_OUT)/*/EXECUTABLES/mesa_*_intermediates)
$(call add-clean-step, rm -rf $(HOST_OUT)/*/EXECUTABLES/glsl_compiler_intermediates)
$(call add-clean-step, rm -rf $(HOST_OUT)/*/STATIC_LIBRARIES/libmesa_*_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/*/SHARED_LIBRARIES/*_dri_intermediates)

509
Makefile Normal file
View File

@@ -0,0 +1,509 @@
# Top-level Mesa makefile
TOP = .
SUBDIRS = src
default: $(TOP)/configs/current
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE)) || exit 1 ; \
fi \
done
all: default
doxygen:
cd doxygen && $(MAKE)
clean:
-@touch $(TOP)/configs/current
-@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) clean) ; \
fi \
done
-@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
realclean: clean
-rm -rf lib*
-rm -f $(TOP)/configs/current
-rm -f $(TOP)/configs/autoconf
-rm -rf autom4te.cache
-find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
-name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
distclean: realclean
install:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) install) || exit 1 ; \
fi \
done
.PHONY: default doxygen clean realclean distclean install
# If there's no current configuration file
$(TOP)/configs/current:
@echo
@echo
@echo "Please choose a configuration from the following list:"
@ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
@echo
@echo "Then type 'make <config>' (ex: 'make linux-x86')"
@echo
@echo "Or, run './configure' then 'make'"
@echo "See './configure --help' for details"
@echo
@echo "(ignore the following error message)"
@exit 1
# Rules to set/install a specific build configuration
aix \
aix-64 \
aix-64-static \
aix-gcc \
aix-static \
autoconf \
bluegene-osmesa \
bluegene-xlc-osmesa \
beos \
catamount-osmesa-pgi \
darwin \
darwin-fat-32bit \
darwin-fat-all \
freebsd \
freebsd-dri \
freebsd-dri-amd64 \
freebsd-dri-x86 \
hpux10 \
hpux10-gcc \
hpux10-static \
hpux11-32 \
hpux11-32-static \
hpux11-32-static-nothreads \
hpux11-64 \
hpux11-64-static \
hpux11-ia64 \
hpux11-ia64-static \
hpux9 \
hpux9-gcc \
irix6-64 \
irix6-64-static \
irix6-n32 \
irix6-n32-static \
irix6-o32 \
irix6-o32-static \
linux \
linux-i965 \
linux-alpha \
linux-alpha-static \
linux-cell \
linux-cell-debug \
linux-debug \
linux-dri \
linux-dri-debug \
linux-dri-x86 \
linux-dri-x86-64 \
linux-dri-ppc \
linux-dri-xcb \
linux-egl \
linux-indirect \
linux-fbdev \
linux-ia64-icc \
linux-ia64-icc-static \
linux-icc \
linux-icc-static \
linux-llvm \
linux-llvm-debug \
linux-opengl-es \
linux-osmesa \
linux-osmesa-static \
linux-osmesa16 \
linux-osmesa16-static \
linux-osmesa32 \
linux-ppc \
linux-ppc-static \
linux-profile \
linux-sparc \
linux-sparc5 \
linux-static \
linux-ultrasparc \
linux-tcc \
linux-x86 \
linux-x86-debug \
linux-x86-32 \
linux-x86-64 \
linux-x86-64-debug \
linux-x86-64-profile \
linux-x86-64-static \
linux-x86-profile \
linux-x86-static \
netbsd \
openbsd \
osf1 \
osf1-static \
solaris-x86 \
solaris-x86-gcc \
solaris-x86-gcc-static \
sunos4 \
sunos4-gcc \
sunos4-static \
sunos5 \
sunos5-gcc \
sunos5-64-gcc \
sunos5-smp \
sunos5-v8 \
sunos5-v8-static \
sunos5-v9 \
sunos5-v9-static \
sunos5-v9-cc-g++ \
ultrix-gcc:
@ if test -f configs/current -o -L configs/current; then \
if ! cmp configs/$@ configs/current > /dev/null; then \
echo "Please run 'make realclean' before changing configs" ; \
exit 1 ; \
fi ; \
else \
cd configs && rm -f current && ln -s $@ current ; \
fi
$(MAKE) default
# Rules for making release tarballs
VERSION=7.9.2
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
GLUT_NAME = MesaGLUT-$(VERSION)
# This is part of MAIN_FILES
MAIN_ES_FILES = \
$(DIRECTORY)/src/mesa/main/*.xml \
$(DIRECTORY)/src/mesa/main/*.py \
$(DIRECTORY)/src/mesa/main/*.dtd
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/configure \
$(DIRECTORY)/configure.ac \
$(DIRECTORY)/acinclude.m4 \
$(DIRECTORY)/aclocal.m4 \
$(DIRECTORY)/bin/config.guess \
$(DIRECTORY)/bin/config.sub \
$(DIRECTORY)/bin/install-sh \
$(DIRECTORY)/bin/mklib \
$(DIRECTORY)/bin/minstall \
$(DIRECTORY)/bin/version.mk \
$(DIRECTORY)/configs/[a-z]* \
$(DIRECTORY)/docs/*.html \
$(DIRECTORY)/docs/COPYING \
$(DIRECTORY)/docs/README.* \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/gl.h \
$(DIRECTORY)/include/GL/glext.h \
$(DIRECTORY)/include/GL/gl_mangle.h \
$(DIRECTORY)/include/GL/glu.h \
$(DIRECTORY)/include/GL/glu_mangle.h \
$(DIRECTORY)/include/GL/glx.h \
$(DIRECTORY)/include/GL/glxext.h \
$(DIRECTORY)/include/GL/glx_mangle.h \
$(DIRECTORY)/include/GL/glfbdev.h \
$(DIRECTORY)/include/GL/mesa_wgl.h \
$(DIRECTORY)/include/GL/osmesa.h \
$(DIRECTORY)/include/GL/vms_x_fix.h \
$(DIRECTORY)/include/GL/wglext.h \
$(DIRECTORY)/include/GL/wmesa.h \
$(DIRECTORY)/src/glsl/Makefile \
$(DIRECTORY)/src/glsl/Makefile.template \
$(DIRECTORY)/src/glsl/SConscript \
$(DIRECTORY)/src/glsl/*.[ch] \
$(DIRECTORY)/src/glsl/*.[cly]pp \
$(DIRECTORY)/src/glsl/README \
$(DIRECTORY)/src/glsl/glcpp/*.[chly] \
$(DIRECTORY)/src/glsl/glcpp/README \
$(DIRECTORY)/src/Makefile \
$(DIRECTORY)/src/mesa/Makefile* \
$(DIRECTORY)/src/mesa/sources.mak \
$(DIRECTORY)/src/mesa/descrip.mms \
$(DIRECTORY)/src/mesa/gl.pc.in \
$(DIRECTORY)/src/mesa/osmesa.pc.in \
$(DIRECTORY)/src/mesa/depend \
$(MAIN_ES_FILES) \
$(DIRECTORY)/src/mesa/main/*.[chS] \
$(DIRECTORY)/src/mesa/main/descrip.mms \
$(DIRECTORY)/src/mesa/math/*.[ch] \
$(DIRECTORY)/src/mesa/math/descrip.mms \
$(DIRECTORY)/src/mesa/program/*.[chly] \
$(DIRECTORY)/src/mesa/program/*.cpp \
$(DIRECTORY)/src/mesa/program/Makefile \
$(DIRECTORY)/src/mesa/program/descrip.mms \
$(DIRECTORY)/src/mesa/swrast/*.[ch] \
$(DIRECTORY)/src/mesa/swrast/descrip.mms \
$(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
$(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
$(DIRECTORY)/src/mesa/vbo/*.[chS] \
$(DIRECTORY)/src/mesa/vbo/descrip.mms \
$(DIRECTORY)/src/mesa/tnl/*.[chS] \
$(DIRECTORY)/src/mesa/tnl/descrip.mms \
$(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
$(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
$(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
$(DIRECTORY)/src/mesa/drivers/Makefile \
$(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
$(DIRECTORY)/src/mesa/drivers/beos/Makefile \
$(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
$(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
$(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
$(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
$(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
$(DIRECTORY)/src/mesa/drivers/x11/Makefile \
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
$(DIRECTORY)/src/mesa/x86/Makefile \
$(DIRECTORY)/src/mesa/x86/*.[ch] \
$(DIRECTORY)/src/mesa/x86/*.S \
$(DIRECTORY)/src/mesa/x86/rtasm/*.[ch] \
$(DIRECTORY)/src/mesa/x86-64/*.[chS] \
$(DIRECTORY)/src/mesa/x86-64/Makefile \
$(DIRECTORY)/windows/VC8/
MAPI_FILES = \
$(DIRECTORY)/include/GLES/*.h \
$(DIRECTORY)/include/GLES2/*.h \
$(DIRECTORY)/include/VG/*.h \
$(DIRECTORY)/src/mapi/es?api/Makefile \
$(DIRECTORY)/src/mapi/es?api/*.pc.in \
$(DIRECTORY)/src/mapi/glapi/gen/Makefile \
$(DIRECTORY)/src/mapi/glapi/gen/*.xml \
$(DIRECTORY)/src/mapi/glapi/gen/*.py \
$(DIRECTORY)/src/mapi/glapi/gen/*.dtd \
$(DIRECTORY)/src/mapi/glapi/gen-es/Makefile \
$(DIRECTORY)/src/mapi/glapi/gen-es/*.xml \
$(DIRECTORY)/src/mapi/glapi/gen-es/*.py \
$(DIRECTORY)/src/mapi/glapi/Makefile \
$(DIRECTORY)/src/mapi/glapi/SConscript \
$(DIRECTORY)/src/mapi/glapi/sources.mak \
$(DIRECTORY)/src/mapi/glapi/*.[chS] \
$(DIRECTORY)/src/mapi/mapi/mapi_abi.py \
$(DIRECTORY)/src/mapi/mapi/sources.mak \
$(DIRECTORY)/src/mapi/mapi/*.[ch] \
$(DIRECTORY)/src/mapi/vgapi/Makefile \
$(DIRECTORY)/src/mapi/vgapi/vgapi.csv \
$(DIRECTORY)/src/mapi/vgapi/vg.pc.in \
$(DIRECTORY)/src/mapi/vgapi/*.h
EGL_FILES = \
$(DIRECTORY)/include/KHR/*.h \
$(DIRECTORY)/include/EGL/*.h \
$(DIRECTORY)/src/egl/Makefile \
$(DIRECTORY)/src/egl/*/Makefile \
$(DIRECTORY)/src/egl/*/Makefile.template \
$(DIRECTORY)/src/egl/*/*.[ch] \
$(DIRECTORY)/src/egl/*/*/Makefile \
$(DIRECTORY)/src/egl/*/*/*.[ch] \
$(DIRECTORY)/src/egl/main/*.pc.in \
$(DIRECTORY)/src/egl/main/*.def
GALLIUM_FILES = \
$(DIRECTORY)/src/mesa/state_tracker/*[ch] \
$(DIRECTORY)/src/gallium/Makefile \
$(DIRECTORY)/src/gallium/Makefile.template \
$(DIRECTORY)/src/gallium/SConscript \
$(DIRECTORY)/src/gallium/targets/Makefile.dri \
$(DIRECTORY)/src/gallium/targets/Makefile.xorg \
$(DIRECTORY)/src/gallium/targets/SConscript.dri \
$(DIRECTORY)/src/gallium/*/Makefile \
$(DIRECTORY)/src/gallium/*/SConscript \
$(DIRECTORY)/src/gallium/*/*/Makefile \
$(DIRECTORY)/src/gallium/*/*/SConscript \
$(DIRECTORY)/src/gallium/*/*/*.[ch] \
$(DIRECTORY)/src/gallium/auxiliary/gallivm/*.cpp \
$(DIRECTORY)/src/gallium/*/*/*.py \
$(DIRECTORY)/src/gallium/*/*/*.csv \
$(DIRECTORY)/src/gallium/*/*/*/Makefile \
$(DIRECTORY)/src/gallium/*/*/*/SConscript \
$(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
$(DIRECTORY)/src/gallium/*/*/*/*.py
APPLE_DRI_FILES = \
$(DIRECTORY)/src/glx/apple/Makefile \
$(DIRECTORY)/src/glx/apple/*.[ch] \
$(DIRECTORY)/src/glx/apple/*.tcl \
$(DIRECTORY)/src/glx/apple/apple_exports.list \
$(DIRECTORY)/src/glx/apple/GL_aliases \
$(DIRECTORY)/src/glx/apple/GL_extensions \
$(DIRECTORY)/src/glx/apple/GL_noop \
$(DIRECTORY)/src/glx/apple/GL_promoted \
$(DIRECTORY)/src/glx/apple/specs/*.spec \
$(DIRECTORY)/src/glx/apple/specs/*.tm
DRI_FILES = \
$(DIRECTORY)/include/GL/internal/dri_interface.h \
$(DIRECTORY)/include/GL/internal/sarea.h \
$(DIRECTORY)/src/glx/Makefile \
$(DIRECTORY)/src/glx/*.[ch] \
$(APPLE_DRI_FILES) \
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
$(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
$(DIRECTORY)/src/mesa/drivers/dri/*/*.cpp \
$(DIRECTORY)/src/mesa/drivers/dri/*/*/*.[chS] \
$(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
$(DIRECTORY)/src/mesa/drivers/dri/*/*/Makefile \
$(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile
SGI_GLU_FILES = \
$(DIRECTORY)/src/glu/Makefile \
$(DIRECTORY)/src/glu/glu.pc.in \
$(DIRECTORY)/src/glu/sgi/Makefile \
$(DIRECTORY)/src/glu/sgi/Makefile.mgw \
$(DIRECTORY)/src/glu/sgi/Makefile.win \
$(DIRECTORY)/src/glu/sgi/glu.def \
$(DIRECTORY)/src/glu/sgi/dummy.cc \
$(DIRECTORY)/src/glu/sgi/glu.exports \
$(DIRECTORY)/src/glu/sgi/glu.exports.darwin \
$(DIRECTORY)/src/glu/sgi/mesaglu.opt \
$(DIRECTORY)/src/glu/sgi/include/gluos.h \
$(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
$(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
$(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
$(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
$(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
$(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
$(DIRECTORY)/src/glu/sgi/libtess/README \
$(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
$(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
$(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
GLW_FILES = \
$(DIRECTORY)/src/glw/*.[ch] \
$(DIRECTORY)/src/glw/Makefile* \
$(DIRECTORY)/src/glw/README \
$(DIRECTORY)/src/glw/glw.pc.in \
$(DIRECTORY)/src/glw/depend
GLUT_FILES = \
$(DIRECTORY)/include/GL/glut.h \
$(DIRECTORY)/include/GL/glutf90.h \
$(DIRECTORY)/src/glut/glx/Makefile* \
$(DIRECTORY)/src/glut/glx/depend \
$(DIRECTORY)/src/glut/glx/glut.pc.in \
$(DIRECTORY)/src/glut/glx/*def \
$(DIRECTORY)/src/glut/glx/*.[ch] \
$(DIRECTORY)/src/glut/beos/*.[ch] \
$(DIRECTORY)/src/glut/beos/*.cpp \
$(DIRECTORY)/src/glut/beos/Makefile
DEPEND_FILES = \
$(TOP)/src/mesa/depend \
$(TOP)/src/glx/depend \
$(TOP)/src/glw/depend \
$(TOP)/src/glut/glx/depend \
$(TOP)/src/glu/sgi/depend
LIB_FILES = \
$(MAIN_FILES) \
$(MAPI_FILES) \
$(ES_FILES) \
$(EGL_FILES) \
$(GALLIUM_FILES) \
$(DRI_FILES) \
$(SGI_GLU_FILES) \
$(GLW_FILES)
# Everything for new a Mesa release:
tarballs: rm_depend configure aclocal.m4 lib_gz glut_gz \
lib_bz2 glut_bz2 lib_zip glut_zip md5
# Helper for autoconf builds
ACLOCAL = aclocal
ACLOCAL_FLAGS =
AUTOCONF = autoconf
AC_FLAGS =
aclocal.m4: configure.ac acinclude.m4
$(ACLOCAL) $(ACLOCAL_FLAGS)
configure: configure.ac aclocal.m4 acinclude.m4
$(AUTOCONF) $(AC_FLAGS)
rm_depend:
@for dep in $(DEPEND_FILES) ; do \
rm -f $$dep ; \
touch $$dep ; \
done
rm_config:
rm -f configs/current
rm -f configs/autoconf
lib_gz: rm_config
cd .. ; \
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
gzip $(LIB_NAME).tar ; \
mv $(LIB_NAME).tar.gz $(DIRECTORY)
glut_gz:
cd .. ; \
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
gzip $(GLUT_NAME).tar ; \
mv $(GLUT_NAME).tar.gz $(DIRECTORY)
lib_bz2: rm_config
cd .. ; \
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
bzip2 $(LIB_NAME).tar ; \
mv $(LIB_NAME).tar.bz2 $(DIRECTORY)
glut_bz2:
cd .. ; \
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
bzip2 $(GLUT_NAME).tar ; \
mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
lib_zip: rm_config
rm -f $(LIB_NAME).zip ; \
cd .. ; \
zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
mv $(LIB_NAME).zip $(DIRECTORY)
glut_zip:
rm -f $(GLUT_NAME).zip ; \
cd .. ; \
zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
mv $(GLUT_NAME).zip $(DIRECTORY)
md5:
@-md5sum $(LIB_NAME).tar.gz
@-md5sum $(LIB_NAME).tar.bz2
@-md5sum $(LIB_NAME).zip
@-md5sum $(GLUT_NAME).tar.gz
@-md5sum $(GLUT_NAME).tar.bz2
@-md5sum $(GLUT_NAME).zip
.PHONY: tarballs rm_depend rm_config md5 \
lib_gz glut_gz \
lib_bz2 glut_bz2 \
lib_zip glut_zip

View File

@@ -1,93 +0,0 @@
# Copyright © 2012 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
SUBDIRS = src
AM_DISTCHECK_CONFIGURE_FLAGS = \
--enable-autotools \
--enable-dri \
--enable-dri3 \
--enable-egl \
--enable-gallium-tests \
--enable-gallium-osmesa \
--enable-llvm \
--enable-gbm \
--enable-gles1 \
--enable-gles2 \
--enable-glx \
--enable-glx-tls \
--enable-nine \
--enable-opencl \
--enable-opencl-icd \
--enable-opengl \
--enable-va \
--enable-vdpau \
--enable-xa \
--enable-xvmc \
--enable-llvm-shared-libs \
--enable-libunwind \
--with-platforms=x11,wayland,drm,surfaceless \
--with-dri-drivers=i915,i965,nouveau,radeon,r200,swrast \
--with-gallium-drivers=i915,nouveau,r300,kmsro,r600,radeonsi,freedreno,svga,swrast,vc4,tegra,virgl,swr,etnaviv \
--with-vulkan-drivers=intel,radeon
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
autogen.sh \
common.py \
docs \
doxygen \
bin/git_sha1_gen.py \
scons \
SConstruct \
build-support/conftest.dyn \
build-support/conftest.map \
meson.build \
meson_options.txt \
bin/meson.build \
include/meson.build \
bin/install_megadrivers.py \
bin/meson_get_version.py
noinst_HEADERS = \
include/c99_alloca.h \
include/c99_compat.h \
include/c99_math.h \
include/c11 \
include/drm-uapi/drm.h \
include/drm-uapi/drm_fourcc.h \
include/drm-uapi/drm_mode.h \
include/drm-uapi/i915_drm.h \
include/drm-uapi/tegra_drm.h \
include/drm-uapi/v3d_drm.h \
include/drm-uapi/vc4_drm.h \
include/D3D9 \
include/GL/wglext.h \
include/HaikuGL \
include/no_extern_c.h \
include/pci_ids \
include/vulkan
# We list some directories in EXTRA_DIST, but don't actually want to include
# the .gitignore files in the tarball.
dist-hook:
find $(distdir) -name .gitignore -exec $(RM) {} +

View File

@@ -1,79 +0,0 @@
`Mesa <https://mesa3d.org>`_ - The 3D Graphics Library
======================================================
Source
------
This repository lives at https://gitlab.freedesktop.org/mesa/mesa.
Other repositories are likely forks, and code found there is not supported.
Build status
------------
Travis:
.. image:: https://travis-ci.org/mesa3d/mesa.svg?branch=master
:target: https://travis-ci.org/mesa3d/mesa
Appveyor:
.. image:: https://img.shields.io/appveyor/ci/mesa3d/mesa.svg
:target: https://ci.appveyor.com/project/mesa3d/mesa
Coverity:
.. image:: https://scan.coverity.com/projects/139/badge.svg?flat=1
:target: https://scan.coverity.com/projects/mesa
Build & install
---------------
You can find more information in our documentation (`docs/install.html
<https://mesa3d.org/install.html>`_), but the recommended way is to use
Meson (`docs/meson.html <https://mesa3d.org/meson.html>`_):
.. code-block:: sh
$ mkdir build
$ cd build
$ meson ..
$ sudo ninja install
Support
-------
Many Mesa devs hang on IRC; if you're not sure which channel is
appropriate, you should ask your question on `Freenode's #dri-devel
<irc://chat.freenode.net#dri-devel>`_, someone will redirect you if
necessary.
Remember that not everyone is in the same timezone as you, so it might
take a while before someone qualified sees your question.
To figure out who you're talking to, or which nick to ping for your
question, check out `Who's Who on IRC
<https://dri.freedesktop.org/wiki/WhosWho/>`_.
The next best option is to ask your question in an email to the
mailing lists: `mesa-dev\@lists.freedesktop.org
<https://lists.freedesktop.org/mailman/listinfo/mesa-dev>`_
Bug reports
-----------
If you think something isn't working properly, please file a bug report
(`docs/bugs.html <https://mesa3d.org/bugs.html>`_).
Contributing
------------
Contributions are welcome, and step-by-step instructions can be found in our
documentation (`docs/submittingpatches.html
<https://mesa3d.org/submittingpatches.html>`_).
Note that Mesa uses email mailing-lists for patches submission, review and
discussions.

145
REVIEWERS
View File

@@ -1,145 +0,0 @@
Overview:
This file is similar in syntax (or more precisly a subset) of what is
used by the MAINTAINERS file in the linux kernel. Some fields do not
apply, for example, in all cases, send patches to:
mesa-dev@lists.freedesktop.org
and in all cases the patchwork instance is:
https://patchwork.freedesktop.org/project/mesa/
The purpose is not exactly the same the MAINTAINERS file in the linux
kernel, as there are not official/formal maintainers of different
subsystems in mesa, but is meant to give an idea of who to CC for
various patches for review, and to allow the use of
scripts/get_reviewer.pl as git --cc-cmd.
Usage:
When sending patches:
git send-email --cc-cmd ./scripts/get_reviewer.pl ...
Or to configure as default:
git config sendemail.cccmd ./scripts/get_reviewer.pl
Descriptions of section entries:
R: Designated reviewer: FullName <address@domain>
These reviewers should be CCed on patches.
F: Files and directories with wildcard patterns.
A trailing slash includes all files and subdirectory files.
F: drivers/net/ all files in and below drivers/net
F: drivers/net/* all files in drivers/net, but not below
F: */net/* all files in "any top level directory"/net
One pattern per line. Multiple F: lines acceptable.
N: Files and directories with regex patterns.
N: [^a-z]tegra all files whose path contains the word tegra
One pattern per line. Multiple N: lines acceptable.
scripts/get_maintainer.pl has different behavior for files that
match F: pattern and matches of N: patterns. By default,
get_maintainer will not look at git log history when an F: pattern
match occurs. When an N: match occurs, git log history is used
to also notify the people that have git commit signatures.
Maintainers List (try to look for most precise areas first)
Note: this is an opt-in system, I have not tried to add anyone who hasn't
either asked me or sent a patch to add themselves.
-----------------------------------
NIR
R: Jason Ekstrand <jason@jlekstrand.net>
F: src/compiler/nir/
DOCUMENTATION
R: Emil Velikov <emil.l.velikov@gmail.com>
R: Eric Engestrom <eric@engestrom.ch>
F: docs/
F: doxygen/
COMPATIBILITY HEADERS
R: Emil Velikov <emil.l.velikov@gmail.com>
F: include/c99*
DRI LOADER
R: Emil Velikov <emil.l.velikov@gmail.com>
F: src/loader/
EGL
R: Eric Engestrom <eric@engestrom.ch>
R: Emil Velikov <emil.l.velikov@gmail.com>
F: src/egl/
F: include/EGL/
HAIKU
R: Alexander von Gluck IV <kallisti5@unixzen.com>
F: include/HaikuGL/
F: src/egl/drivers/haiku/
F: src/gallium/state_trackers/hgl/
F: src/gallium/targets/haiku-softpipe/
F: src/gallium/winsys/sw/hgl/
F: src/hgl/
GALLIUM LOADER
R: Emil Velikov <emil.l.velikov@gmail.com>
F: src/gallium/auxiliary/pipe-loader/
F: src/gallium/auxiliary/target-helpers/
GALLIUM TARGETS
R: Emil Velikov <emil.l.velikov@gmail.com>
F: src/gallium/targets/
AUTOCONF BUILD
R: Emil Velikov <emil.l.velikov@gmail.com>
F: autogen.sh
F: configure.ac
F: */Automake.inc
F: */Makefile.*am
F: */Makefile.sources
SCONS BUILD
F: scons/
F: */SConscript*
F: */Makefile.sources
ANDROID BUILD
R: Emil Velikov <emil.l.velikov@gmail.com>
R: Rob Herring <robh@kernel.org>
F: CleanSpec.mk
F: */Android.*mk
F: */Makefile.sources
MESON BUILD
R: Dylan Baker <dylan@pnwbakers.com>
R: Eric Engestrom <eric@engestrom.ch>
F: */meson.build
F: meson.build
F: meson_options.txt
ANDROID EGL SUPPORT
R: Rob Herring <robh@kernel.org>
R: Tomasz Figa <tfiga@chromium.org>
F: src/egl/drivers/dri2/platform_android.c
WAYLAND EGL SUPPORT
R: Daniel Stone <daniels@collabora.com>
F: src/egl/wayland/*
F: src/egl/drivers/dri2/platform_wayland.c
FREEDRENO
R: Rob Clark <robclark@freedesktop.org>
F: src/gallium/drivers/freedreno/
GLX
R: Adam Jackson <ajax@redhat.com>
F: src/glx/
VULKAN
R: Eric Engestrom <eric@engestrom.ch>
F: src/vulkan/
F: include/vulkan/

View File

@@ -1,24 +1,24 @@
#######################################################################
# Top-level SConstruct
#
# For example, invoke scons as
# For example, invoke scons as
#
# scons build=debug llvm=yes machine=x86
# scons debug=1 dri=0 machine=x86
#
# to set configuration variables. Or you can write those options to a file
# named config.py:
#
# # config.py
# build='debug'
# llvm=True
# debug=1
# dri=0
# machine='x86'
#
#
# Invoke
#
# scons -h
#
# to get the full list of options. See scons manpage for more info.
#
#
import os
import os.path
@@ -27,54 +27,120 @@ import SCons.Util
import common
#######################################################################
# Minimal scons version
EnsureSConsVersion(2, 4)
EnsurePythonVersion(2, 7)
#######################################################################
# Configuration options
default_statetrackers = 'mesa'
default_targets = 'graw-null'
if common.default_platform in ('linux', 'freebsd', 'darwin'):
default_drivers = 'softpipe,galahad,failover,svga,i915,i965,trace,identity,llvmpipe'
default_winsys = 'xlib'
elif common.default_platform in ('winddk',):
default_drivers = 'softpipe,svga,i915,i965,trace,identity'
default_winsys = 'all'
elif common.default_platform in ('embedded',):
default_drivers = 'softpipe,llvmpipe'
default_winsys = 'xlib'
else:
default_drivers = 'all'
default_winsys = 'all'
opts = Variables('config.py')
common.AddOptions(opts)
opts.Add(ListVariable('statetrackers', 'state trackers to build', default_statetrackers,
['mesa', 'python', 'xorg', 'egl']))
opts.Add(ListVariable('drivers', 'pipe drivers to build', default_drivers,
['softpipe', 'galahad', 'failover', 'svga', 'i915', 'i965', 'trace', 'r300', 'r600', 'identity', 'llvmpipe', 'nouveau', 'nv50', 'nvfx']))
opts.Add(ListVariable('winsys', 'winsys drivers to build', default_winsys,
['xlib', 'vmware', 'i915', 'i965', 'gdi', 'radeon', 'r600', 'graw-xlib']))
opts.Add(ListVariable('targets', 'driver targets to build', default_targets,
['dri-i915',
'dri-i965',
'dri-nouveau',
'dri-radeong',
'dri-swrast',
'dri-vmwgfx',
'egl-i915',
'egl-i965',
'egl-nouveau',
'egl-radeon',
'egl-swrast',
'egl-vmwgfx',
'graw-xlib',
'graw-null',
'libgl-gdi',
'libgl-xlib',
'xorg-i915',
'xorg-i965',
'xorg-nouveau',
'xorg-radeon',
'xorg-vmwgfx']))
opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
env = Environment(
options = opts,
tools = ['gallium'],
toolpath = ['#scons'],
toolpath = ['#scons'],
ENV = os.environ,
)
# XXX: This creates a many problems as it saves...
#opts.Save('config.py', env)
# Backwards compatability with old target configuration variable
try:
targets = ARGUMENTS['targets']
except KeyError:
pass
else:
targets = targets.split(',')
print('scons: warning: targets option is deprecated; pass the targets on their own such as')
print()
print(' scons %s' % ' '.join(targets))
print()
COMMAND_LINE_TARGETS.append(targets)
if os.environ.has_key('CC'):
env['CC'] = os.environ['CC']
if os.environ.has_key('CFLAGS'):
env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
if os.environ.has_key('CXX'):
env['CXX'] = os.environ['CXX']
if os.environ.has_key('CXXFLAGS'):
env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
if os.environ.has_key('LDFLAGS'):
env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
Help(opts.GenerateHelpText(env))
# replicate options values in local variables
debug = env['debug']
dri = env['dri']
machine = env['machine']
platform = env['platform']
# derived options
x86 = machine == 'x86'
ppc = machine == 'ppc'
gcc = platform in ('linux', 'freebsd', 'darwin', 'embedded')
msvc = platform in ('windows', 'winddk')
Export([
'debug',
'x86',
'ppc',
'dri',
'platform',
'gcc',
'msvc',
])
#######################################################################
# Environment setup
with open("VERSION") as f:
mesa_version = f.read().strip()
env.Append(CPPDEFINES = [
('PACKAGE_VERSION', '\\"%s\\"' % mesa_version),
('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
])
# Always build trace, rbug, identity, softpipe, and llvmpipe (where possible)
if 'trace' not in env['drivers']:
env['drivers'].append('trace')
if 'rbug' not in env['drivers']:
env['drivers'].append('rbug')
if 'galahad' not in env['drivers']:
env['drivers'].append('galahad')
if 'identity' not in env['drivers']:
env['drivers'].append('identity')
if 'softpipe' not in env['drivers']:
env['drivers'].append('softpipe')
if env['llvm'] and 'llvmpipe' not in env['drivers']:
env['drivers'].append('llvmpipe')
if 'sw' not in env['drivers']:
env['drivers'].append('sw')
# Includes
env.Prepend(CPPPATH = [
@@ -87,57 +153,53 @@ env.Append(CPPPATH = [
'#/src/gallium/winsys',
])
if env['msvc']:
env.Append(CPPPATH = ['#include/c99'])
# Embedded
if platform == 'embedded':
env.Append(CPPDEFINES = [
'_POSIX_SOURCE',
('_POSIX_C_SOURCE', '199309L'),
'_SVID_SOURCE',
'_BSD_SOURCE',
'_GNU_SOURCE',
'PTHREADS',
])
env.Append(LIBS = [
'm',
'pthread',
'dl',
])
# Posix
if platform in ('posix', 'linux', 'freebsd', 'darwin'):
env.Append(CPPDEFINES = [
'_POSIX_SOURCE',
('_POSIX_C_SOURCE', '199309L'),
'_SVID_SOURCE',
'_BSD_SOURCE',
'_GNU_SOURCE',
'PTHREADS',
'HAVE_POSIX_MEMALIGN',
])
if gcc:
env.Append(CFLAGS = ['-fvisibility=hidden'])
if platform == 'darwin':
env.Append(CPPDEFINES = ['_DARWIN_C_SOURCE'])
env.Append(LIBS = [
'm',
'pthread',
'dl',
])
# for debugging
#print env.Dump()
# Add a check target for running tests
check = env.Alias('check')
env.AlwaysBuild(check)
#######################################################################
# Invoke host SConscripts
#
# For things that are meant to be run on the native host build machine, instead
# of the target machine.
#
# Create host environent
if env['crosscompile'] and not env['embedded']:
host_env = Environment(
options = opts,
# no tool used
tools = [],
toolpath = ['#scons'],
ENV = os.environ,
)
# Override options
host_env['platform'] = common.host_platform
host_env['machine'] = common.host_machine
host_env['toolchain'] = 'default'
host_env['llvm'] = False
host_env.Tool('gallium')
host_env['hostonly'] = True
assert host_env['crosscompile'] == False
target_env = env
env = host_env
Export('env')
SConscript(
'src/SConscript',
variant_dir = host_env['build_dir'],
duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
)
env = target_env
Export('env')
#######################################################################
# Invoke SConscripts
@@ -146,21 +208,9 @@ Export('env')
SConscript(
'src/SConscript',
variant_dir = env['build_dir'],
variant_dir = env['build'],
duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
)
env.Default('src')
########################################################################
# List all aliases
try:
from SCons.Node.Alias import default_ans
except ImportError:
pass
else:
aliases = sorted(default_ans.keys())
env.Help('\n')
env.Help('Recognized targets:\n')
for alias in aliases:
env.Help(' %s\n' % alias)

View File

@@ -1 +0,0 @@
19.0.2

119
acinclude.m4 Normal file
View File

@@ -0,0 +1,119 @@
# A few convenience macros for Mesa, mostly to keep all the platform
# specifics out of configure.ac.
# MESA_PIC_FLAGS()
#
# Find out whether to build PIC code using the option --enable-pic and
# the configure enable_static/enable_shared settings. If PIC is needed,
# figure out the necessary flags for the platform and compiler.
#
# The platform checks have been shamelessly taken from libtool and
# stripped down to just what's needed for Mesa. See _LT_COMPILER_PIC in
# /usr/share/aclocal/libtool.m4 or
# http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=blob;f=libltdl/m4/libtool.m4;hb=HEAD
#
AC_DEFUN([MESA_PIC_FLAGS],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_ARG_VAR([PIC_FLAGS], [compiler flags for PIC code])
AC_ARG_ENABLE([pic],
[AS_HELP_STRING([--disable-pic],
[compile PIC objects @<:@default=enabled for shared builds
on supported platforms@:>@])],
[enable_pic="$enableval"
test "x$enable_pic" = x && enable_pic=auto],
[enable_pic=auto])
# disable PIC by default for static builds
if test "$enable_pic" = auto && test "$enable_static" = yes; then
enable_pic=no
fi
# if PIC hasn't been explicitly disabled, try to figure out the flags
if test "$enable_pic" != no; then
AC_MSG_CHECKING([for $CC option to produce PIC])
# allow the user's flags to override
if test "x$PIC_FLAGS" = x; then
# see if we're using GCC
if test "x$GCC" = xyes; then
case "$host_os" in
aix*|beos*|cygwin*|irix5*|irix6*|osf3*|osf4*|osf5*)
# PIC is the default for these OSes.
;;
mingw*|os2*|pw32*)
# This hack is so that the source file can tell whether
# it is being built for inclusion in a dll (and should
# export symbols for example).
PIC_FLAGS="-DDLL_EXPORT"
;;
darwin*|rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
PIC_FLAGS="-fno-common"
;;
hpux*)
# PIC is the default for IA64 HP-UX and 64-bit HP-UX,
# but not for PA HP-UX.
case $host_cpu in
hppa*64*|ia64*)
;;
*)
PIC_FLAGS="-fPIC"
;;
esac
;;
*)
# Everyone else on GCC uses -fPIC
PIC_FLAGS="-fPIC"
;;
esac
else # !GCC
case "$host_os" in
hpux9*|hpux10*|hpux11*)
# PIC is the default for IA64 HP-UX and 64-bit HP-UX,
# but not for PA HP-UX.
case "$host_cpu" in
hppa*64*|ia64*)
# +Z the default
;;
*)
PIC_FLAGS="+Z"
;;
esac
;;
linux*|k*bsd*-gnu)
case `basename "$CC"` in
icc*|ecc*|ifort*)
PIC_FLAGS="-KPIC"
;;
pgcc*|pgf77*|pgf90*|pgf95*)
# Portland Group compilers (*not* the Pentium gcc
# compiler, which looks to be a dead project)
PIC_FLAGS="-fpic"
;;
ccc*)
# All Alpha code is PIC.
;;
xl*)
# IBM XL C 8.0/Fortran 10.1 on PPC
PIC_FLAGS="-qpic"
;;
*)
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*|*Sun\ F*)
# Sun C 5.9 or Sun Fortran
PIC_FLAGS="-KPIC"
;;
esac
esac
;;
solaris*)
PIC_FLAGS="-KPIC"
;;
sunos4*)
PIC_FLAGS="-PIC"
;;
esac
fi # GCC
fi # PIC_FLAGS
AC_MSG_RESULT([$PIC_FLAGS])
fi
AC_SUBST([PIC_FLAGS])
])# MESA_PIC_FLAGS

View File

@@ -1,92 +0,0 @@
# http://www.appveyor.com/docs/appveyor-yml
#
# To setup AppVeyor for your own personal repositories do the following:
# - Sign up
# - Add a new project
# - Select Git and fill in the Git clone URL
# - Setup a Git hook as explained in
# https://github.com/appveyor/webhooks#installing-git-hook
# - Check 'Settings > General > Skip branches without appveyor.yml'
# - Check 'Settings > General > Rolling builds'
# - Setup the global or project notifications to your liking
#
# Note that kicking (or restarting) a build via the web UI will not work, as it
# will fail to find appveyor.yml . The Git hook is the most practical way to
# kick a build.
#
# See also:
# - http://help.appveyor.com/discussions/problems/2209-node-grunt-build-specify-a-project-or-solution-file-the-directory-does-not-contain-a-project-or-solution-file
# - http://help.appveyor.com/discussions/questions/1184-build-config-vs-appveyoryaml
version: '{build}'
branches:
except:
- /^travis.*$/
# Don't download the full Mesa history to speed up cloning. However the clone
# depth must not be too small, otherwise builds might fail when lots of patches
# are committed in succession, because the desired commit is not found on the
# truncated history.
#
# See also:
# - https://www.appveyor.com/blog/2014/06/04/shallow-clone-for-git-repositories
clone_depth: 100
# https://www.appveyor.com/docs/build-cache/
cache:
- '%LOCALAPPDATA%\pip\Cache -> appveyor.yml'
- win_flex_bison-2.5.15.zip
- llvm-5.0.1-msvc2017-mtd.7z
os: Visual Studio 2017
init:
# Appveyor defaults core.autocrlf to input instead of the default (true), but
# that can hide problems processing CRLF text on Windows
- git config --global core.autocrlf true
environment:
WINFLEXBISON_VERSION: 2.5.15
LLVM_ARCHIVE: llvm-5.0.1-msvc2017-mtd.7z
install:
# Check git config
- git config core.autocrlf
# Check pip
- python --version
- python -m pip --version
# Install Mako
- python -m pip install Mako==1.0.7
# Install pywin32 extensions, needed by SCons
- python -m pip install pypiwin32
# Install python wheels, necessary to install SCons via pip
- python -m pip install wheel
# Install SCons
- python -m pip install scons==3.0.1
- scons --version
# Install flex/bison
- set WINFLEXBISON_ARCHIVE=win_flex_bison-%WINFLEXBISON_VERSION%.zip
- if not exist "%WINFLEXBISON_ARCHIVE%" appveyor DownloadFile "https://github.com/lexxmark/winflexbison/releases/download/v%WINFLEXBISON_VERSION%/%WINFLEXBISON_ARCHIVE%"
- 7z x -y -owinflexbison\ "%WINFLEXBISON_ARCHIVE%" > nul
- set Path=%CD%\winflexbison;%Path%
- win_flex --version
- win_bison --version
# Download and extract LLVM
- if not exist "%LLVM_ARCHIVE%" appveyor DownloadFile "https://people.freedesktop.org/~jrfonseca/llvm/%LLVM_ARCHIVE%"
- 7z x -y "%LLVM_ARCHIVE%" > nul
- mkdir llvm\bin
- set LLVM=%CD%\llvm
build_script:
- scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=14.1 llvm=1
after_build:
- scons -j%NUMBER_OF_PROCESSORS% MSVC_VERSION=14.1 llvm=1 check
# It's possible to setup notification here, as described in
# http://www.appveyor.com/docs/notifications#appveyor-yml-configuration , but
# doing so would cause the notification settings to be replicated across all
# repos, which is most likely undesired. So it's better to rely on the
# Appveyor global/project notification settings.

View File

@@ -3,12 +3,16 @@
srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.
SRCDIR=`(cd "$srcdir" && pwd)`
ORIGDIR=`pwd`
cd "$srcdir"
autoreconf --force --verbose --install || exit 1
cd "$ORIGDIR" || exit $?
if test -z "$NOCONFIGURE"; then
"$srcdir"/configure "$@"
if test "x$SRCDIR" != "x$ORIGDIR"; then
echo "Mesa cannot be built when srcdir != builddir" 1>&2
exit 1
fi
MAKEFLAGS=""
autoreconf -v --install || exit 1
"$srcdir"/configure "$@"

View File

@@ -1,17 +0,0 @@
# Both of these were already merged with different shas
da48cba61ef6fefb799bf96e6364b70dbf4ec712
c812c740e60c14060eb89db66039111881a0f42f
# The commit these fix was reverted from 19.0, but fixed for 19.1 due
# to the number of fixes required to make that commit work
8d8f80af3a17354508f2ec9d6559c915d5be351d
0c0c69729b6d72a5297122856c8fe48510e90764
0881e90c09965818b02e359474a6f7446b41d647
b031c643491a92a5574c7a4bd659df33f2d89bb6
# These were manually rebased by Jason, thanks!
8ab95b849e66f3221d80a67eef2ec6e3730901a8
5c30fffeec1732c21d600c036f95f8cdb1bb5487
# This doesn't actually appliy to 19.0
29179f58c6ba8099859ea25900214dbbd3814a92

View File

@@ -1,2 +0,0 @@
[*.sh]
indent_style = tab

9
bin/.gitignore vendored
View File

@@ -1,9 +0,0 @@
config.guess
config.sub
install-sh
/depcomp
/missing
ylwrap
compile
ar-lib
/test-driver

View File

@@ -1,35 +0,0 @@
#!/bin/sh
# This script is used to generate the list of fixed bugs that
# appears in the release notes files, with HTML formatting.
#
# Note: This script could take a while until all details have
# been fetched from bugzilla.
#
# Usage examples:
#
# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3
# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 > bugfixes
# $ bin/bugzilla_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee bugfixes
# regex pattern: trim before bug number
trim_before='s/.*show_bug.cgi?id=\([0-9]*\).*/\1/'
# regex pattern: reconstruct the url
use_after='s,^,https://bugs.freedesktop.org/show_bug.cgi?id=,'
echo "<ul>"
echo ""
# extract fdo urls from commit log
git log --pretty=medium $* | grep 'bugs.freedesktop.org/show_bug' | sed -e $trim_before | sort -n -u | sed -e $use_after |\
while read url
do
id=$(echo $url | cut -d'=' -f2)
summary=$(wget --quiet -O - $url | grep -e '<title>.*</title>' | sed -e 's/ *<title>[0-9]\+ &ndash; \(.*\)<\/title>/\1/')
echo "<li><a href=\"$url\">Bug $id</a> - $summary</li>"
echo ""
done
echo "</ul>"

48
bin/confdiff.sh Executable file
View File

@@ -0,0 +1,48 @@
#!/bin/bash -e
usage()
{
echo "Usage: $0 <target1> <target2>"
echo "Highlight differences between Mesa configs"
echo "Example:"
echo " $0 linux linux-x86"
}
die()
{
echo "$@" >&2
return 1
}
case "$1" in
-h|--help) usage; exit 0;;
esac
[ $# -lt 2 ] && die 2 targets needed. See $0 --help
target1=$1
target2=$2
topdir=$(cd "`dirname $0`"/..; pwd)
cd "$topdir"
[ -f "./configs/$target1" ] || die Missing configs/$target1
[ -f "./configs/$target2" ] || die Missing configs/$target2
trap 'rm -f "$t1" "$t2"' 0
t1=$(mktemp)
t2=$(mktemp)
make -f- -n -p <<EOF | sed '/^# Not a target/,/^$/d' > $t1
TOP = .
include \$(TOP)/configs/$target1
default:
EOF
make -f- -n -p <<EOF | sed '/^# Not a target/,/^$/d' > $t2
TOP = .
include \$(TOP)/configs/$target2
default:
EOF
diff -pu -I'^#' $t1 $t2

1555
bin/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1685
bin/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -1,45 +0,0 @@
#!/bin/sh
# Script for generating a list of candidates which fix commits that have been
# previously cherry-picked to a stable branch.
#
# Usage examples:
#
# $ bin/get-extra-pick-list.sh
# $ bin/get-extra-pick-list.sh > picklist
# $ bin/get-extra-pick-list.sh | tee picklist
# Use the last branchpoint as our limit for the search
latest_branchpoint=`git merge-base origin/master HEAD`
# Grep for commits with "cherry picked from commit" in the commit message.
git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
grep "cherry picked from commit" |\
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
# For each cherry-picked commit...
cat already_picked | cut -c -8 |\
while read sha
do
# ... check if it's referenced (fixed by another) patch
git log -n1 --pretty=oneline --grep=$sha $latest_branchpoint..origin/master |\
cut -c -8 |\
while read candidate
do
# And flag up if it hasn't landed in branch yet.
if grep -q ^$candidate already_picked ; then
continue
fi
# Or if it isn't in the ignore list.
if [ -f bin/.cherry-ignore ] ; then
if grep -q ^$candidate bin/.cherry-ignore ; then
continue
fi
fi
printf "Commit \"%s\" references %s\n" \
"`git log -n1 --pretty=oneline $candidate`" \
"$sha"
done
done
rm -f already_picked

View File

@@ -1,150 +0,0 @@
#!/bin/sh
# Script for generating a list of candidates for cherry-picking to a stable branch
#
# Usage examples:
#
# $ bin/get-pick-list.sh
# $ bin/get-pick-list.sh > picklist
# $ bin/get-pick-list.sh | tee picklist
#
# The output is as follows:
# [nomination_type] commit_sha commit summary
is_stable_nomination()
{
git show --pretty=medium --summary "$1" | grep -q -i -o "CC:.*mesa-stable"
}
is_typod_nomination()
{
git show --pretty=medium --summary "$1" | grep -q -i -o "CC:.*mesa-dev"
}
fixes=
# Helper to handle various mistypos of the fixes tag.
# The tag string itself is passed as argument and normalised within.
#
# Resulting string in the global variable "fixes" and contains entries
# in the form "fixes:$sha"
is_sha_nomination()
{
fixes=`git show --pretty=medium -s $1 | tr -d "\n" | \
sed -e 's/'"$2"'/\nfixes:/Ig' | \
grep -Eo 'fixes:[a-f0-9]{8,40}'`
fixes_count=`echo "$fixes" | grep "fixes:" | wc -l`
if test $fixes_count -eq 0; then
return 1
fi
# Throw a warning for each invalid sha
while test $fixes_count -gt 0; do
# Treat only the current line
id=`echo "$fixes" | tail -n $fixes_count | head -n 1 | cut -d : -f 2`
fixes_count=$(($fixes_count-1))
if ! git show $id >/dev/null 2>&1; then
echo WARNING: Commit $1 lists invalid sha $id
fi
done
return 0
}
# Checks if at least one of offending commits, listed in the global
# "fixes", is in branch.
sha_in_range()
{
fixes_count=`echo "$fixes" | grep "fixes:" | wc -l`
while test $fixes_count -gt 0; do
# Treat only the current line
id=`echo "$fixes" | tail -n $fixes_count | head -n 1 | cut -d : -f 2`
fixes_count=$(($fixes_count-1))
# Be that cherry-picked ...
# ... or landed before the branchpoint.
if grep -q ^$id already_picked ||
grep -q ^$id already_landed ; then
return 0
fi
done
return 1
}
is_fixes_nomination()
{
is_sha_nomination "$1" "fixes:[[:space:]]*"
if test $? -eq 0; then
return 0
fi
is_sha_nomination "$1" "fixes[[:space:]]\+"
}
is_brokenby_nomination()
{
is_sha_nomination "$1" "broken by"
}
is_revert_nomination()
{
is_sha_nomination "$1" "This reverts commit "
}
# Use the last branchpoint as our limit for the search
latest_branchpoint=`git merge-base origin/master HEAD`
# List all the commits between day 1 and the branch point...
git log --reverse --pretty=%H $latest_branchpoint > already_landed
# ... and the ones cherry-picked.
git log --reverse --pretty=medium --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
grep "cherry picked from commit" |\
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
# Grep for potential candidates
git log --reverse --pretty=%H -i --grep='^CC:.*mesa-stable\|^CC:.*mesa-dev\|\<fixes\>\|\<broken by\>\|This reverts commit' $latest_branchpoint..origin/master |\
while read sha
do
# Check to see whether the patch is on the ignore list.
if test -f bin/.cherry-ignore; then
if grep -q ^$sha bin/.cherry-ignore ; then
continue
fi
fi
# Check to see if it has already been picked over.
if grep -q ^$sha already_picked ; then
continue
fi
if is_fixes_nomination "$sha"; then
tag=fixes
elif is_brokenby_nomination "$sha"; then
tag=brokenby
elif is_revert_nomination "$sha"; then
tag=revert
elif is_stable_nomination "$sha"; then
tag=stable
elif is_typod_nomination "$sha"; then
tag=typod
else
continue
fi
case "$tag" in
fixes | brokenby | revert )
if ! sha_in_range; then
continue
fi
;;
* )
;;
esac
printf "[ %8s ] " "$tag"
git --no-pager show --no-patch --oneline $sha
done
rm -f already_picked
rm -f already_landed

View File

@@ -1,50 +0,0 @@
"""
Generate the contents of the git_sha1.h file.
The output of this script goes to stdout.
"""
import argparse
import os
import os.path
import subprocess
import sys
def get_git_sha1():
"""Try to get the git SHA1 with git rev-parse."""
git_dir = os.path.join(os.path.dirname(sys.argv[0]), '..', '.git')
try:
git_sha1 = subprocess.check_output([
'git',
'--git-dir=' + git_dir,
'rev-parse',
'HEAD',
], stderr=open(os.devnull, 'w')).decode("ascii")
except:
# don't print anything if it fails
git_sha1 = ''
return git_sha1
def write_if_different(contents):
"""
Avoid touching the output file if it doesn't need modifications
Useful to avoid triggering rebuilds when nothing has changed.
"""
if os.path.isfile(args.output):
with open(args.output, 'r') as file:
if file.read() == contents:
return
with open(args.output, 'w') as file:
file.write(contents)
parser = argparse.ArgumentParser()
parser.add_argument('--output', help='File to write the #define in',
required=True)
args = parser.parse_args()
git_sha1 = os.environ.get('MESA_GIT_SHA1_OVERRIDE', get_git_sha1())[:10]
if git_sha1:
write_if_different('#define MESA_GIT_SHA1 " (git-' + git_sha1 + ')"')
else:
write_if_different('#define MESA_GIT_SHA1 ""')

1
bin/install-sh Symbolic link
View File

@@ -0,0 +1 @@
minstall

View File

@@ -1,77 +0,0 @@
# encoding=utf-8
# Copyright © 2017-2018 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""Script to install megadriver symlinks for meson."""
from __future__ import print_function
import argparse
import os
import shutil
def main():
parser = argparse.ArgumentParser()
parser.add_argument('megadriver')
parser.add_argument('libdir')
parser.add_argument('drivers', nargs='+')
args = parser.parse_args()
if os.path.isabs(args.libdir):
destdir = os.environ.get('DESTDIR')
if destdir:
to = os.path.join(destdir, args.libdir[1:])
else:
to = args.libdir
else:
to = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.libdir)
master = os.path.join(to, os.path.basename(args.megadriver))
if not os.path.exists(to):
if os.path.lexists(to):
os.unlink(to)
os.makedirs(to)
for driver in args.drivers:
abs_driver = os.path.join(to, driver)
if os.path.lexists(abs_driver):
os.unlink(abs_driver)
print('installing {} to {}'.format(args.megadriver, abs_driver))
os.link(master, abs_driver)
try:
ret = os.getcwd()
os.chdir(to)
name, ext = os.path.splitext(driver)
while ext != '.so':
if os.path.lexists(name):
os.unlink(name)
os.symlink(driver, name)
name, ext = os.path.splitext(name)
finally:
os.chdir(ret)
os.unlink(master)
if __name__ == '__main__':
main()

74
bin/installmesa Executable file
View File

@@ -0,0 +1,74 @@
#!/bin/sh
#
# Simple shell script for installing Mesa's header and library files.
# If the copy commands below don't work on a particular system (i.e. the
# -f or -d flags), we may need to branch on `uname` to do the right thing.
#
TOP=.
INCLUDE_DIR="/usr/local/include"
LIB_DIR="/usr/local/lib"
if [ "x$#" = "x0" ] ; then
echo
echo "***** Mesa installation - You may need root privileges to do this *****"
echo
echo "Default directory for header files is:" ${INCLUDE_DIR}
echo "Enter new directory or press <Enter> to accept this default."
read INPUT
if [ "x${INPUT}" != "x" ] ; then
INCLUDE_DIR=${INPUT}
fi
echo
echo "Default directory for library files is:" ${LIB_DIR}
echo "Enter new directory or press <Enter> to accept this default."
read INPUT
if [ "x${INPUT}" != "x" ] ; then
LIB_DIR=${INPUT}
fi
echo
echo "About to install Mesa header files (GL/*.h) in: " ${INCLUDE_DIR}/GL
echo "and Mesa library files (libGL.*, etc) in: " ${LIB_DIR}
echo "Press <Enter> to continue, or <ctrl>-C to abort."
read INPUT
else
INCLUDE_DIR=$1/include
LIB_DIR=$1/lib
fi
# flags:
# -f = force
# -d = preserve symlinks (does not work on BSD)
if [ `uname` = "FreeBSD" ] ; then
CP_FLAGS="-f"
elif [ `uname` = "Darwin" ] ; then
CP_FLAGS="-f"
elif [ `uname` = "AIX" ] ; then
CP_FLAGS="-fh"
else
CP_FLAGS="-fd"
fi
set -v
mkdir -p ${INCLUDE_DIR}
mkdir -p ${INCLUDE_DIR}/GL
# NOT YET: mkdir -p ${INCLUDE_DIR}/GLES
mkdir -p ${LIB_DIR}
cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
cp -f ${TOP}/src/glw/*.h ${INCLUDE_DIR}/GL
# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
cp ${CP_FLAGS} ${TOP}/lib*/lib* ${LIB_DIR}
echo "Done."

View File

@@ -1,88 +0,0 @@
#!/usr/bin/env python3
# Copyright © 2019 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""This script reads a meson build directory and gives back the command line it
was configured with.
This only works for meson 0.49.0 and newer.
"""
import argparse
import ast
import configparser
import pathlib
import sys
def parse_args() -> argparse.Namespace:
"""Parse arguments."""
parser = argparse.ArgumentParser()
parser.add_argument(
'build_dir',
help='Path the meson build directory')
args = parser.parse_args()
return args
def load_config(path: pathlib.Path) -> configparser.ConfigParser:
"""Load config file."""
conf = configparser.ConfigParser()
with path.open() as f:
conf.read_file(f)
return conf
def build_cmd(conf: configparser.ConfigParser) -> str:
"""Rebuild the command line."""
args = []
for k, v in conf['options'].items():
if ' ' in v:
args.append(f'-D{k}="{v}"')
else:
args.append(f'-D{k}={v}')
cf = conf['properties'].get('cross_file')
if cf:
args.append('--cross-file={}'.format(cf))
nf = conf['properties'].get('native_file')
if nf:
# this will be in the form "['str', 'str']", so use ast.literal_eval to
# convert it to a list of strings.
nf = ast.literal_eval(nf)
args.extend(['--native-file={}'.format(f) for f in nf])
return ' '.join(args)
def main():
args = parse_args()
path = pathlib.Path(args.build_dir, 'meson-private', 'cmd_line.txt')
if not path.exists():
print('Cannot find the necessary file to rebuild command line. '
'Is your meson version >= 0.49.0?', file=sys.stderr)
sys.exit(1)
conf = load_config(path)
cmd = build_cmd(conf)
print(cmd)
if __name__ == '__main__':
main()

View File

@@ -1,21 +0,0 @@
# Copyright © 2017 Eric Engestrom
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
git_sha1_gen_py = files('git_sha1_gen.py')

View File

@@ -1,35 +0,0 @@
#!/usr/bin/env python
# encoding=utf-8
# Copyright © 2017 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from __future__ import print_function
import os
def main():
filename = os.path.join(os.environ['MESON_SOURCE_ROOT'], 'VERSION')
with open(filename) as f:
version = f.read().strip()
print(version, end='')
if __name__ == '__main__':
main()

112
bin/minstall Executable file
View File

@@ -0,0 +1,112 @@
#!/bin/sh
# A minimal replacement for 'install' that supports installing symbolic links.
# Only a limited number of options are supported:
# -d dir Create a directory
# -m mode Sets a file's mode when installing
# If these commands aren't portable, we'll need some "if (arch)" type stuff
SYMLINK="ln -s"
MKDIR="mkdir -p"
RM="rm -f"
MODE=""
if [ "$1" = "-d" ] ; then
# make a directory path
$MKDIR "$2"
exit 0
fi
if [ "$1" = "-m" ] ; then
# set file mode
MODE=$2
shift 2
fi
# install file(s) into destination
if [ $# -ge 2 ] ; then
# Last cmd line arg is the dest dir
for FILE in $@ ; do
DESTDIR="$FILE"
done
# Loop over args, moving them to DEST directory
I=1
for FILE in $@ ; do
if [ $I = $# ] ; then
# stop, don't want to install $DEST into $DEST
exit 0
fi
DEST=$DESTDIR
# On CYGWIN, because DLLs are loaded by the native Win32 loader,
# they are installed in the executable path. Stub libraries used
# only for linking are installed in the library path
case `uname` in
CYGWIN*)
case $FILE in
*.dll)
DEST="$DEST/../bin"
;;
*)
;;
esac
;;
*)
;;
esac
PWDSAVE=`pwd`
# determine file's type
if [ -h "$FILE" ] ; then
#echo $FILE is a symlink
# Unfortunately, cp -d isn't universal so we have to
# use a work-around.
# Use ls -l to find the target that the link points to
LL=`ls -l "$FILE"`
for L in $LL ; do
TARGET=$L
done
#echo $FILE is a symlink pointing to $TARGET
FILE=`basename "$FILE"`
# Go to $DEST and make the link
cd "$DEST" # pushd
$RM "$FILE"
$SYMLINK "$TARGET" "$FILE"
cd "$PWDSAVE" # popd
elif [ -f "$FILE" ] ; then
#echo "$FILE" is a regular file
# Only copy if the files differ
if ! cmp -s $FILE $DEST/`basename $FILE`; then
$RM "$DEST/`basename $FILE`"
cp "$FILE" "$DEST"
fi
if [ $MODE ] ; then
FILE=`basename "$FILE"`
chmod $MODE "$DEST/$FILE"
fi
else
echo "Unknown type of argument: " "$FILE"
exit 1
fi
I=`expr $I + 1`
done
exit 0
fi
# If we get here, we didn't find anything to do
echo "Usage:"
echo " install -d dir Create named directory"
echo " install [-m mode] file [...] dest Install files in destination"

1031
bin/mklib Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -1,251 +0,0 @@
#!/usr/bin/env python
#
# Copyright 2012 VMware Inc
# Copyright 2008-2009 Jose Fonseca
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
"""Perf annotate for JIT code.
Linux `perf annotate` does not work with JIT code. This script takes the data
produced by `perf script` command, plus the diassemblies outputed by gallivm
into /tmp/perf-XXXXX.map.asm and produces output similar to `perf annotate`.
See docs/llvmpipe.html for usage instructions.
The `perf script` output parser was derived from the gprof2dot.py script.
"""
import sys
import os.path
import re
import optparse
import subprocess
class Parser:
"""Parser interface."""
def __init__(self):
pass
def parse(self):
raise NotImplementedError
class LineParser(Parser):
"""Base class for parsers that read line-based formats."""
def __init__(self, file):
Parser.__init__(self)
self._file = file
self.__line = None
self.__eof = False
self.line_no = 0
def readline(self):
line = self._file.readline()
if not line:
self.__line = ''
self.__eof = True
else:
self.line_no += 1
self.__line = line.rstrip('\r\n')
def lookahead(self):
assert self.__line is not None
return self.__line
def consume(self):
assert self.__line is not None
line = self.__line
self.readline()
return line
def eof(self):
assert self.__line is not None
return self.__eof
mapFile = None
def lookupMap(filename, matchSymbol):
global mapFile
mapFile = filename
stream = open(filename, 'rt')
for line in stream:
start, length, symbol = line.split()
start = int(start, 16)
length = int(length,16)
if symbol == matchSymbol:
return start
return None
def lookupAsm(filename, desiredFunction):
stream = open(filename + '.asm', 'rt')
while stream.readline() != desiredFunction + ':\n':
pass
asm = []
line = stream.readline().strip()
while line:
addr, instr = line.split(':', 1)
addr = int(addr)
asm.append((addr, instr))
line = stream.readline().strip()
return asm
samples = {}
class PerfParser(LineParser):
"""Parser for linux perf callgraph output.
It expects output generated with
perf record -g
perf script
"""
def __init__(self, infile, symbol):
LineParser.__init__(self, infile)
self.symbol = symbol
def readline(self):
# Override LineParser.readline to ignore comment lines
while True:
LineParser.readline(self)
if self.eof() or not self.lookahead().startswith('#'):
break
def parse(self):
# read lookahead
self.readline()
while not self.eof():
self.parse_event()
asm = lookupAsm(mapFile, self.symbol)
addresses = samples.keys()
addresses.sort()
total_samples = 0
sys.stdout.write('%s:\n' % self.symbol)
for address, instr in asm:
try:
sample = samples.pop(address)
except KeyError:
sys.stdout.write(6*' ')
else:
sys.stdout.write('%6u' % (sample))
total_samples += sample
sys.stdout.write('%6u: %s\n' % (address, instr))
print 'total:', total_samples
assert len(samples) == 0
sys.exit(0)
def parse_event(self):
if self.eof():
return
line = self.consume()
assert line
callchain = self.parse_callchain()
if not callchain:
return
def parse_callchain(self):
callchain = []
while self.lookahead():
function = self.parse_call(len(callchain) == 0)
if function is None:
break
callchain.append(function)
if self.lookahead() == '':
self.consume()
return callchain
call_re = re.compile(r'^\s+(?P<address>[0-9a-fA-F]+)\s+(?P<symbol>.*)\s+\((?P<module>[^)]*)\)$')
def parse_call(self, first):
line = self.consume()
mo = self.call_re.match(line)
assert mo
if not mo:
return None
if not first:
return None
function_name = mo.group('symbol')
if not function_name:
function_name = mo.group('address')
module = mo.group('module')
function_id = function_name + ':' + module
address = mo.group('address')
address = int(address, 16)
if function_name != self.symbol:
return None
start_address = lookupMap(module, function_name)
address -= start_address
#print function_name, module, address
samples[address] = samples.get(address, 0) + 1
return True
def main():
"""Main program."""
optparser = optparse.OptionParser(
usage="\n\t%prog [options] symbol_name")
(options, args) = optparser.parse_args(sys.argv[1:])
if len(args) != 1:
optparser.error('wrong number of arguments')
symbol = args[0]
p = subprocess.Popen(['perf', 'script'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
parser = PerfParser(p.stdout, symbol)
parser.parse()
if __name__ == '__main__':
main()
# vim: set sw=4 et:

View File

@@ -1,29 +0,0 @@
#!/bin/sh
# This script is used to generate the list of changes that
# appears in the release notes files, with HTML formatting.
#
# Usage examples:
#
# $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3
# $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3 > changes
# $ bin/shortlog_mesa.sh mesa-9.0.2..mesa-9.0.3 | tee changes
in_log=0
git shortlog $* | while read l
do
if [ $in_log -eq 0 ]; then
echo '<p>'$l'</p>'
echo '<ul>'
in_log=1
elif echo "$l" | egrep -q '^$' ; then
echo '</ul>'
echo
in_log=0
else
mesg=$(echo $l | sed 's/ (cherry picked from commit [0-9a-f]\+)//;s/\&/&amp;/g;s/</\&lt;/g;s/>/\&gt;/g')
echo ' <li>'${mesg}'</li>'
fi
done

17
bin/version.mk Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/make -sf
# Print the various Mesa version fields. This is mostly used to add the
# version to configure.
# This reflects that this script is usually called from the toplevel
TOP = .
include $(TOP)/configs/default
version:
@echo $(MESA_VERSION)
major:
@echo $(MESA_MAJOR)
minor:
@echo $(MESA_MINOR)
tiny:
@echo $(MESA_TINY)

View File

@@ -1,3 +0,0 @@
{
radeon_drm_winsys_create;
};

View File

@@ -1,6 +0,0 @@
VERSION_1 {
global:
main;
local:
*;
};

128
common.py
View File

@@ -8,104 +8,86 @@ import subprocess
import sys
import platform as _platform
import SCons.Script.SConscript
#######################################################################
# Defaults
host_platform = _platform.system().lower()
if host_platform.startswith('cygwin'):
host_platform = 'cygwin'
_platform_map = {
'linux2': 'linux',
'win32': 'windows',
}
# Search sys.argv[] for a "platform=foo" argument since we don't have
# an 'env' variable at this point.
if 'platform' in SCons.Script.ARGUMENTS:
target_platform = SCons.Script.ARGUMENTS['platform']
else:
target_platform = host_platform
default_platform = sys.platform
default_platform = _platform_map.get(default_platform, default_platform)
_machine_map = {
'x86': 'x86',
'i386': 'x86',
'i486': 'x86',
'i586': 'x86',
'i686': 'x86',
'BePC': 'x86',
'Intel': 'x86',
'ppc': 'ppc',
'BeBox': 'ppc',
'BeMac': 'ppc',
'AMD64': 'x86_64',
'x86_64': 'x86_64',
'sparc': 'sparc',
'sun4u': 'sparc',
'x86': 'x86',
'i386': 'x86',
'i486': 'x86',
'i586': 'x86',
'i686': 'x86',
'ppc' : 'ppc',
'x86_64': 'x86_64',
}
# find host_machine value
# find default_machine value
if 'PROCESSOR_ARCHITECTURE' in os.environ:
host_machine = os.environ['PROCESSOR_ARCHITECTURE']
default_machine = os.environ['PROCESSOR_ARCHITECTURE']
else:
host_machine = _platform.machine()
host_machine = _machine_map.get(host_machine, 'generic')
default_machine = host_machine
default_toolchain = 'default'
if target_platform == 'windows' and host_platform != 'windows':
default_machine = 'x86'
default_toolchain = 'crossmingw'
default_machine = _platform.machine()
default_machine = _machine_map.get(default_machine, 'generic')
# find default_llvm value
if 'LLVM' in os.environ or 'LLVM_CONFIG' in os.environ:
if 'LLVM' in os.environ:
default_llvm = 'yes'
else:
# Search sys.argv[] for a "platform=foo" argument since we don't have
# an 'env' variable at this point.
platform = default_platform
pattern = re.compile("(platform=)(.*)")
for arg in sys.argv:
m = pattern.match(arg)
if m:
platform = m.group(2)
default_llvm = 'no'
try:
if target_platform != 'windows' and \
subprocess.call(['llvm-config', '--version'],
stdout=subprocess.PIPE) == 0:
if platform != 'windows' and subprocess.call(['llvm-config', '--version'], stdout=subprocess.PIPE) == 0:
default_llvm = 'yes'
except:
pass
# find default_dri value
if default_platform in ('linux', 'freebsd'):
default_dri = 'yes'
elif default_platform in ('winddk', 'windows', 'wince', 'darwin'):
default_dri = 'no'
else:
default_dri = 'no'
#######################################################################
# Common options
def AddOptions(opts):
try:
from SCons.Variables.BoolVariable import BoolVariable as BoolOption
except ImportError:
from SCons.Options.BoolOption import BoolOption
try:
from SCons.Variables.EnumVariable import EnumVariable as EnumOption
except ImportError:
from SCons.Options.EnumOption import EnumOption
opts.Add(EnumOption('build', 'build type', 'debug',
allowed_values=('debug', 'checked', 'profile',
'release')))
opts.Add(BoolOption('verbose', 'verbose output', 'no'))
opts.Add(EnumOption('machine', 'use machine-specific assembly code',
default_machine,
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
opts.Add(EnumOption('platform', 'target platform', host_platform,
allowed_values=('cygwin', 'darwin', 'freebsd', 'haiku',
'linux', 'sunos', 'windows')))
opts.Add(BoolOption('embedded', 'embedded build', 'no'))
opts.Add(BoolOption('analyze',
'enable static code analysis where available', 'no'))
opts.Add(BoolOption('asan', 'enable Address Sanitizer', 'no'))
opts.Add('toolchain', 'compiler toolchain', default_toolchain)
opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
opts.Add(BoolOption('openmp', 'EXPERIMENTAL: compile with openmp (swrast)',
'no'))
opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes'))
opts.Add(BoolOption('profile', 'DEPRECATED: profile build', 'no'))
opts.Add(BoolOption('quiet', 'DEPRECATED: profile build', 'yes'))
opts.Add(BoolOption('swr', 'Build OpenSWR', 'no'))
if host_platform == 'windows':
opts.Add('MSVC_VERSION', 'Microsoft Visual C/C++ version')
opts.Add('MSVC_USE_SCRIPT', 'Microsoft Visual C/C++ vcvarsall script', True)
try:
from SCons.Variables.BoolVariable import BoolVariable as BoolOption
except ImportError:
from SCons.Options.BoolOption import BoolOption
try:
from SCons.Variables.EnumVariable import EnumVariable as EnumOption
except ImportError:
from SCons.Options.EnumOption import EnumOption
opts.Add(BoolOption('debug', 'debug build', 'yes'))
opts.Add(BoolOption('profile', 'profile build', 'no'))
opts.Add(BoolOption('quiet', 'quiet command lines', 'yes'))
opts.Add(EnumOption('machine', 'use machine-specific assembly code', default_machine,
allowed_values=('generic', 'ppc', 'x86', 'x86_64')))
opts.Add(EnumOption('platform', 'target platform', default_platform,
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded', 'cygwin', 'sunos5', 'freebsd8')))
opts.Add('toolchain', 'compiler toolchain', 'default')
opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))

2
configs/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
current
autoconf

30
configs/aix Normal file
View File

@@ -0,0 +1,30 @@
# Configuration for AIX, dynamic libs
include $(TOP)/configs/default
CONFIG_NAME = aix
# Compiler and flags
CC = cc
CXX = xlC
CFLAGS = -O -DAIXV3 -DPTHREADS
CXXFLAGS = -O -DAIXV3 -DPTHREADS
# Misc tools and flags
MKLIB_OPTIONS =
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -lX11 -lXext -lpthread -lm
GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC
GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXm -lXt -lX11
OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB)
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC

27
configs/aix-64 Normal file
View File

@@ -0,0 +1,27 @@
# Configuration for AIX 64-bit, dynamic libs
include $(TOP)/configs/default
CONFIG_NAME = aix-64
# Compiler and flags
CC = xlc
CXX = xlC
CFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 -DPTHREADS
CXXFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 -DPTHREADS
LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lC
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXm -lXt -lX11
APP_LIB_DEPS = -L$(TOP)/lib64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lpthread -lC

25
configs/aix-64-static Normal file
View File

@@ -0,0 +1,25 @@
# Configuration for AIX, static libs
include $(TOP)/configs/default
CONFIG_NAME = aix-64-static
# Compiler and flags
CC = cc
CXX = xlC
CFLAGS = -q64 -O -DAIXV3 -DPTHREADS
CXXFLAGS = -q64 -O -DAIXV3 -DPTHREADS
MKLIB_OPTIONS = -static
LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
APP_LIB_DEPS = -q64 -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
-lX11 -lXext -lXmu -lXi -lm -lpthread -lC

23
configs/aix-gcc Normal file
View File

@@ -0,0 +1,23 @@
# Configuration for AIX with gcc
include $(TOP)/configs/default
CONFIG_NAME = aix-gcc
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O2 -DAIXV3
CXXFLAGS = -O2 -DAIXV3
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
MKLIB_OPTIONS = -arch aix-gcc
GL_LIB_DEPS = -lX11 -lXext -lm
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -Wl,-brtl -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXmu -lXi

25
configs/aix-static Normal file
View File

@@ -0,0 +1,25 @@
# Configuration for AIX, static libs
include $(TOP)/configs/default
CONFIG_NAME = aix-static
# Compiler and flags
CC = cc
CXX = xlC
CFLAGS = -O -DAIXV3 -DPTHREADS
CXXFLAGS = -O -DAIXV3 -DPTHREADS
MKLIB_OPTIONS = -static
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
-lX11 -lXext -lXmu -lXi -lm -lpthread -lC

196
configs/autoconf.in Normal file
View File

@@ -0,0 +1,196 @@
# Autoconf configuration
# Pull in the defaults
include $(TOP)/configs/default
# This is generated by configure
CONFIG_NAME = autoconf
# Compiler and flags
CC = @CC@
CXX = @CXX@
OPT_FLAGS = @OPT_FLAGS@
ARCH_FLAGS = @ARCH_FLAGS@
ASM_FLAGS = @ASM_FLAGS@
PIC_FLAGS = @PIC_FLAGS@
DEFINES = @DEFINES@
API_DEFINES = @API_DEFINES@
GLES_OVERLAY = @GLES_OVERLAY@
CFLAGS = @CPPFLAGS@ @CFLAGS@ \
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
LDFLAGS = @LDFLAGS@
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
RADEON_CFLAGS = @RADEON_CFLAGS@
RADEON_LDFLAGS = @RADEON_LDFLAGS@
INTEL_LIBS = @INTEL_LIBS@
INTEL_CFLAGS = @INTEL_CFLAGS@
X11_LIBS = @X11_LIBS@
X11_CFLAGS = @X11_CFLAGS@
LLVM_CFLAGS = @LLVM_CFLAGS@
LLVM_LDFLAGS = @LLVM_LDFLAGS@
LLVM_LIBS = @LLVM_LIBS@
GLW_CFLAGS = @GLW_CFLAGS@
GLUT_CFLAGS = @GLUT_CFLAGS@
# dlopen
DLOPEN_LIBS = @DLOPEN_LIBS@
# Source selection
MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@
# Misc tools and flags
MAKE = @MAKE@
SHELL = @SHELL@
MKLIB_OPTIONS = @MKLIB_OPTIONS@
MKDEP = @MKDEP@
MKDEP_OPTIONS = @MKDEP_OPTIONS@
INSTALL = @INSTALL@
# Python and flags (generally only needed by the developers)
PYTHON2 = @PYTHON2@
PYTHON_FLAGS = -t -O -O
# Library names (base name)
GL_LIB = GL
GLU_LIB = GLU
GLUT_LIB = glut
GLW_LIB = GLw
OSMESA_LIB = @OSMESA_LIB@
GLESv1_CM_LIB = GLESv1_CM
GLESv2_LIB = GLESv2
VG_LIB = OpenVG
# Library names (actual file names)
GL_LIB_NAME = @GL_LIB_NAME@
GLU_LIB_NAME = @GLU_LIB_NAME@
GLUT_LIB_NAME = @GLUT_LIB_NAME@
GLW_LIB_NAME = @GLW_LIB_NAME@
OSMESA_LIB_NAME = @OSMESA_LIB_NAME@
EGL_LIB_NAME = @EGL_LIB_NAME@
GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@
GLESv2_LIB_NAME = @GLESv2_LIB_NAME@
VG_LIB_NAME = @VG_LIB_NAME@
# Globs used to install the lib and all symlinks
GL_LIB_GLOB = @GL_LIB_GLOB@
GLU_LIB_GLOB = @GLU_LIB_GLOB@
GLUT_LIB_GLOB = @GLUT_LIB_GLOB@
GLW_LIB_GLOB = @GLW_LIB_GLOB@
OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@
EGL_LIB_GLOB = @EGL_LIB_GLOB@
GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@
GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@
VG_LIB_GLOB = @VG_LIB_GLOB@
# Directories to build
LIB_DIR = @LIB_DIR@
SRC_DIRS = @SRC_DIRS@
GLU_DIRS = @GLU_DIRS@
DRIVER_DIRS = @DRIVER_DIRS@
EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@
GALLIUM_DIRS = @GALLIUM_DIRS@
GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@
GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@
GALLIUM_TARGET_DIRS = @GALLIUM_TARGET_DIRS@
GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
# Driver specific build vars
DRI_DIRS = @DRI_DIRS@
EGL_PLATFORMS = @EGL_PLATFORMS@
EGL_CLIENT_APIS = @EGL_CLIENT_APIS@
# Dependencies
X11_INCLUDES = @X11_INCLUDES@
# GLw motif setup
GLW_SOURCES = @GLW_SOURCES@
MOTIF_CFLAGS = @MOTIF_CFLAGS@
# Library/program dependencies
GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \
$(EXTRA_LIB_PATH) @OSMESA_LIB_DEPS@
EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @EGL_LIB_DEPS@
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLU_MESA_DEPS@ \
$(EXTRA_LIB_PATH) @GLU_LIB_DEPS@
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLUT_MESA_DEPS@ \
$(EXTRA_LIB_PATH) @GLUT_LIB_DEPS@
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \
$(EXTRA_LIB_PATH) @GLW_LIB_DEPS@
APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@
GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@
VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@
# DRI dependencies
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
LIBDRM_LIB = @LIBDRM_LIBS@
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
EXPAT_INCLUDES = @EXPAT_INCLUDES@
# Autoconf directories
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
# Installation directories (for make install)
INSTALL_DIR = $(prefix)
INSTALL_LIB_DIR = $(libdir)
INSTALL_INC_DIR = $(includedir)
# DRI installation directories
DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@
# EGL driver install directory
EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@
# Xorg driver install directory (for xorg state-tracker)
XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@
# pkg-config substitutions
GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
GL_PC_CFLAGS = @GL_PC_CFLAGS@
DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@
GLU_PC_REQ = @GLU_PC_REQ@
GLU_PC_REQ_PRIV = @GLU_PC_REQ_PRIV@
GLU_PC_LIB_PRIV = @GLU_PC_LIB_PRIV@
GLU_PC_CFLAGS = @GLU_PC_CFLAGS@
GLUT_PC_REQ_PRIV = @GLUT_PC_REQ_PRIV@
GLUT_PC_LIB_PRIV = @GLUT_PC_LIB_PRIV@
GLUT_PC_CFLAGS = @GLUT_PC_CFLAGS@
GLW_PC_REQ_PRIV = @GLW_PC_REQ_PRIV@
GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@
GLW_PC_CFLAGS = @GLW_PC_CFLAGS@
OSMESA_PC_REQ = @OSMESA_PC_REQ@
OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
GLESv1_CM_PC_LIB_PRIV = @GLESv1_CM_PC_LIB_PRIV@
GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@
EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
EGL_PC_CFLAGS = @GL_PC_CFLAGS@
XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@
XCB_DRI2_LIBS = @XCB_DRI2_LIBS@
LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@
LIBUDEV_LIBS = @LIBUDEV_LIBS@
MESA_LLVM = @MESA_LLVM@
LLVM_VERSION = @LLVM_VERSION@
ifneq ($(LLVM_VERSION),)
HAVE_LLVM := 0x0$(subst .,0,$(LLVM_VERSION:svn=))
DEFINES += -DHAVE_LLVM=$(HAVE_LLVM)
endif
HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@

103
configs/beos Normal file
View File

@@ -0,0 +1,103 @@
# Configuration for BeOS
# Written by Philippe Houdoin
include $(TOP)/configs/default
CONFIG_NAME = beos
DEFINES = \
-DBEOS_THREADS
MACHINE=$(shell uname -m)
ifeq ($(MACHINE), BePC)
CPU = x86
else
CPU = ppc
endif
ifeq ($(CPU), x86)
# BeOS x86 settings
DEFINES += \
-DGNU_ASSEMBLER \
-DUSE_X86_ASM \
-DUSE_MMX_ASM \
-DUSE_3DNOW_ASM \
-DUSE_SSE_ASM
MESA_ASM_SOURCES = $(X86_SOURCES)
GLAPI_ASM_SOURCES = $(X86_API)
CC = gcc
CXX = g++
LD = gcc
CFLAGS = \
-Wall -Wno-multichar -Wno-ctor-dtor-privacy \
$(DEFINES)
CXXFLAGS = $(CFLAGS)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
LDFLAGS += -Xlinker
ifdef DEBUG
CFLAGS += -g -O0
LDFLAGS += -g
DEFINES += -DDEBUG
else
CFLAGS += -O3
endif
GLUT_CFLAGS = -fexceptions
else
# BeOS PPC settings
CC = mwcc
CXX = $(CC)
LD = mwldppc
CFLAGS = \
-w on -requireprotos \
$(DEFINES)
CXXFLAGS = $(CFLAGS)
LDFLAGS += \
-export pragma \
-init _init_routine_ \
-term _term_routine_ \
-lroot \
/boot/develop/lib/ppc/glue-noinit.a \
/boot/develop/lib/ppc/init_term_dyn.o \
/boot/develop/lib/ppc/start_dyn.o
ifdef DEBUG
CFLAGS += -g -O0
CXXFLAGS += -g -O0
LDFLAGS += -g
else
CFLAGS += -O7
CXXFLAGS += -O7
endif
GLUT_CFLAGS = -fexceptions
endif
# Directories
SRC_DIRS = gallium mesa glu glut/beos
GLU_DIRS = sgi
DRIVER_DIRS = beos
# Library/program dependencies
GL_LIB_DEPS =
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS =
GLUT_LIB_DEPS = -lgame -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
APP_LIB_DEPS = -lbe -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)

32
configs/bluegene-osmesa Normal file
View File

@@ -0,0 +1,32 @@
# Configuration for building only libOSMesa on BlueGene, no Xlib driver
# This doesn't really have a lot of dependencies, so it should be usable
# on other (gcc-based) systems too.
# It uses static linking and disables multithreading.
include $(TOP)/configs/default
CONFIG_NAME = bluegene-osmesa
# Compiler and flags
CC = /bgl/BlueLight/ppcfloor/blrts-gnu/bin/powerpc-bgl-blrts-gnu-gcc
CXX = /bgl/BlueLight/ppcfloor/blrts-gnu/bin/powerpc-bgl-blrts-gnu-g++
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURC
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
MKLIB_OPTIONS = -static
OSMESA_LIB_NAME = libOSMesa.a
# Directories
SRC_DIRS = mesa glu
DRIVER_DIRS = osmesa
# Dependencies
OSMESA_LIB_DEPS = -lm
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU -lm

View File

@@ -0,0 +1,28 @@
# Configuration for building only libOSMesa on BlueGene using the IBM xlc compiler
# This doesn't really have a lot of dependencies, so it should be usable
# on similar systems too.
# It uses static linking and disables multithreading.
include $(TOP)/configs/default
CONFIG_NAME = bluegene-osmesa
# Compiler and flags
CC = /opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlc
CXX = /opt/ibmcmp/vacpp/bg/8.0/bin/blrts_xlC
CFLAGS = -O3 -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
CXXFLAGS = -O3 -pedantic -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
MKLIB_OPTIONS = -static
OSMESA_LIB_NAME = libOSMesa.a
# Directories
SRC_DIRS = mesa glu
DRIVER_DIRS = osmesa
# Dependencies
OSMESA_LIB_DEPS = -lm
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU -lm

View File

@@ -0,0 +1,31 @@
# Configuration for building only libOSMesa on Cray Xt3
# for the compute nodes running Catamount using the
# Portland Group compiler. The Portland Group toolchain has to be
# enabled before using "module switch PrgEnv-gnu PrgEnv-pgi" .
# This doesn't really have a lot of dependencies, so it should be usable
# on other similar systems too.
# It uses static linking and disables multithreading.
include $(TOP)/configs/default
CONFIG_NAME = catamount-osmesa-pgi
# Compiler and flags
CC = cc
CXX = CC
CFLAGS = -target=catamount -fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
CXXFLAGS = -target=catamount -fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
MKLIB_OPTIONS = -static
OSMESA_LIB_NAME = libOSMesa.a
# Directories
SRC_DIRS = mesa glu
DRIVER_DIRS = osmesa
# Dependencies
OSMESA_LIB_DEPS = -lm
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU -lm

42
configs/config.mgw Normal file
View File

@@ -0,0 +1,42 @@
# MinGW config include file updated for Mesa 7.0
#
# Updated : by Heromyth, on 2007-7-21
# Email : zxpmyth@yahoo.com.cn
# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
# The others havn't been tested yet.
# 2) The generated DLLs are *not* compatible with the ones built
# with the other compilers like VC8, especially for GLUT.
# 3) Although more tests are needed, it can be used individually!
# The generated DLLs by MingW with STDCALL are not totally compatible
# with the ones linked by Microsoft's compilers.
#
# xxx_USING_STDCALL = 1 Compiling MESA with __stdcall. This is default!
#
# xxx_USING_STDCALL = 0 Compiling MESA without __stdcall. I like this:)
#
# In fact, GL_USING_STDCALL and GLUT_USING_STDCALL can be
# different. For example:
#
# GL_USING_STDCALL = 0
# GLUT_USING_STDCALL = 1
#
# Suggested setting:
#
# ALL_USING_STDCALL = 1
#
# That's default!
#
ALL_USING_STDCALL = 1
ifeq ($(ALL_USING_STDCALL),1)
GL_USING_STDCALL = 1
GLUT_USING_STDCALL = 1
else
GL_USING_STDCALL = 0
GLUT_USING_STDCALL = 0
endif

63
configs/darwin Normal file
View File

@@ -0,0 +1,63 @@
# Configuration for Darwin / MacOS X, making dynamic libs
include $(TOP)/configs/default
CONFIG_NAME = darwin
INSTALL_DIR = /usr/X11
X11_DIR = $(INSTALL_DIR)
# Compiler and flags
CC = gcc
CXX = g++
PIC_FLAGS = -fPIC
DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
-DGLX_ALIAS_UNSUPPORTED \
-DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL
# -DGLX_INDIRECT_RENDERING \
# -D_GNU_SOURCE - for src/mesa/main ...
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx
# -DGLX_USE_APPLEGL - supposed to be used with GLX_DIRECT_RENDERING to use AGL rather than DRM, but doesn't compile
# -DIN_DRI_DRIVER
ARCH_FLAGS += $(RC_CFLAGS)
CFLAGS = -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
CXXFLAGS = -ggdb3 -Os -Wall -fno-strict-aliasing \
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
# Library names (actual file names)
GL_LIB_NAME = lib$(GL_LIB).dylib
GLU_LIB_NAME = lib$(GLU_LIB).dylib
GLUT_LIB_NAME = lib$(GLUT_LIB).dylib
GLW_LIB_NAME = lib$(GLW_LIB).dylib
OSMESA_LIB_NAME = lib$(OSMESA_LIB).dylib
VG_LIB_NAME = lib$(VG_LIB).dylib
# globs used to install the lib and all symlinks
GL_LIB_GLOB = lib$(GL_LIB).*dylib
GLU_LIB_GLOB = lib$(GLU_LIB).*dylib
GLUT_LIB_GLOB = lib$(GLUT_LIB).*dylib
GLW_LIB_GLOB = lib$(GLW_LIB).*dylib
OSMESA_LIB_GLOB = lib$(OSMESA_LIB).*dylib
VG_LIB_GLOB = lib$(VG_LIB).*dylib
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS =
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
SRC_DIRS = glsl mapi/glapi mapi/vgapi glx/apple mesa gallium glu glut/glx
GLU_DIRS = sgi
DRIVER_DIRS = osmesa
#DRIVER_DIRS = dri
DRI_DIRS = swrast
GALLIUM_DRIVERS_DIRS = softpipe trace rbug noop identity galahad failover
#GALLIUM_DRIVERS_DIRS += llvmpipe

7
configs/darwin-fat-32bit Normal file
View File

@@ -0,0 +1,7 @@
# Configuration for Darwin / MacOS X, making 32bit fat dynamic libs
RC_CFLAGS=-arch ppc -arch i386
include $(TOP)/configs/darwin
CONFIG_NAME = darwin-fat-32bit

7
configs/darwin-fat-all Normal file
View File

@@ -0,0 +1,7 @@
# Configuration for Darwin / MacOS X, making 32bit and 64bit fat dynamic libs
RC_CFLAGS=-arch ppc -arch i386 -arch ppc64 -arch x86_64
include $(TOP)/configs/darwin
CONFIG_NAME = darwin-fat-all

176
configs/default Normal file
View File

@@ -0,0 +1,176 @@
# Default/template configuration
# This is included by other config files which may override some
# of these variables.
# Think of this as a base class from which configs are derived.
CONFIG_NAME = default
# Version info
MESA_MAJOR=7
MESA_MINOR=9
MESA_TINY=0
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
# Compiler and flags
CC = cc
CXX = CC
HOST_CC = $(CC)
CFLAGS = -O
CXXFLAGS = -O
LDFLAGS =
HOST_CFLAGS = $(CFLAGS)
GLU_CFLAGS =
# Compiler for building demos/tests/etc
APP_CC = $(CC)
APP_CXX = $(CXX)
# Misc tools and flags
SHELL = /bin/sh
MKLIB = $(SHELL) $(TOP)/bin/mklib
MKLIB_OPTIONS =
MKDEP = makedepend
MKDEP_OPTIONS = -fdepend
MAKE = make
# Use MINSTALL for installing libraries, INSTALL for everything else
MINSTALL = $(SHELL) $(TOP)/bin/minstall
INSTALL = $(MINSTALL)
# Tools for regenerating glapi (generally only needed by the developers)
PYTHON2 = python
PYTHON_FLAGS = -t -O -O
INDENT = indent
INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool
# Library names (base name)
GL_LIB = GL
GLU_LIB = GLU
GLUT_LIB = glut
GLW_LIB = GLw
OSMESA_LIB = OSMesa
EGL_LIB = EGL
GLESv1_CM_LIB = GLESv1_CM
GLESv2_LIB = GLESv2
VG_LIB = OpenVG
# Library names (actual file names)
GL_LIB_NAME = lib$(GL_LIB).so
GLU_LIB_NAME = lib$(GLU_LIB).so
GLUT_LIB_NAME = lib$(GLUT_LIB).so
GLW_LIB_NAME = lib$(GLW_LIB).so
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
EGL_LIB_NAME = lib$(EGL_LIB).so
GLESv1_CM_LIB_NAME = lib$(GLESv1_CM_LIB).so
GLESv2_LIB_NAME = lib$(GLESv2_LIB).so
VG_LIB_NAME = lib$(VG_LIB).so
# globs used to install the lib and all symlinks
GL_LIB_GLOB = $(GL_LIB_NAME)*
GLU_LIB_GLOB = $(GLU_LIB_NAME)*
GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
GLW_LIB_GLOB = $(GLW_LIB_NAME)*
OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
EGL_LIB_GLOB = $(EGL_LIB_NAME)*
GLESv1_CM_LIB_GLOB = $(GLESv1_CM_LIB_NAME)*
GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)*
VG_LIB_GLOB = $(VG_LIB_NAME)*
# Optional assembly language optimization files for libGL
MESA_ASM_SOURCES =
# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
# order to build the Motif widget too)
GLW_SOURCES = GLwDrawA.c
MOTIF_CFLAGS = -I/usr/include/Motif1.2
# Directories to build
LIB_DIR = lib
SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
gallium egl gallium/winsys gallium/targets glu glut/glx glw
GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa
# EGL drivers to build
EGL_DRIVERS_DIRS = glx
# Gallium directories and
GALLIUM_DIRS = auxiliary drivers state_trackers
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
GALLIUM_DRIVERS_DIRS = softpipe trace rbug identity galahad i915 i965 svga r300 nvfx nv50 failover
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
GALLIUM_WINSYS_DIRS = sw sw/xlib
GALLIUM_TARGET_DIRS = libgl-xlib
GALLIUM_STATE_TRACKERS_DIRS = glx vega
# native platforms EGL should support
EGL_PLATFORMS = x11
EGL_CLIENT_APIS = $(GL_LIB)
# Library dependencies
#EXTRA_LIB_PATH ?=
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -ldl -lpthread
OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
VG_LIB_DEPS = $(EXTRA_LIB_PATH) -lpthread
# Program dependencies - specific GL/glut libraries added in Makefiles
APP_LIB_DEPS = -lm
X11_LIBS = -lX11
DLOPEN_LIBS = -ldl
# Installation directories (for make install)
INSTALL_DIR = /usr/local
INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
INSTALL_INC_DIR = $(INSTALL_DIR)/include
DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
# EGL driver install directory
EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl
# Xorg driver install directory (for xorg state-tracker)
XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
# pkg-config substitutions
GL_PC_REQ_PRIV =
GL_PC_LIB_PRIV =
GL_PC_CFLAGS =
DRI_PC_REQ_PRIV =
GLU_PC_REQ = gl
GLU_PC_REQ_PRIV =
GLU_PC_LIB_PRIV =
GLU_PC_CFLAGS =
GLUT_PC_REQ_PRIV =
GLUT_PC_LIB_PRIV =
GLUT_PC_CFLAGS =
GLW_PC_REQ_PRIV =
GLW_PC_LIB_PRIV =
GLW_PC_CFLAGS =
OSMESA_PC_REQ =
OSMESA_PC_LIB_PRIV =
GLESv1_CM_PC_REQ_PRIV =
GLESv1_CM_PC_LIB_PRIV =
GLESv1_CM_PC_CFLAGS =
GLESv2_PC_REQ_PRIV =
GLESv2_PC_LIB_PRIV =
GLESv2_PC_CFLAGS =
VG_PC_REQ_PRIV =
VG_PC_LIB_PRIV =
VG_PC_CFLAGS =

31
configs/freebsd Normal file
View File

@@ -0,0 +1,31 @@
# Configuration for FreeBSD
include $(TOP)/configs/default
CONFIG_NAME = FreeBSD
# Compiler and flags
CC = cc
CXX = c++
MAKE = gmake
OPT_FLAGS = -O2
PIC_FLAGS = -fPIC
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \
-DHZ=100
X11_INCLUDES = -I/usr/local/include
CFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES) -ffast-math -pedantic
CXXFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES)
GLUT_CFLAGS = -fexceptions
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
EXTRA_LIB_PATH = -L/usr/local/lib
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm

51
configs/freebsd-dri Normal file
View File

@@ -0,0 +1,51 @@
# -*-makefile-*-
# Configuration for freebsd-dri: FreeBSD DRI hardware drivers
include $(TOP)/configs/freebsd
CONFIG_NAME = freebsd-dri
# Compiler and flags
CC = gcc
CXX = g++
WARN_FLAGS = -Wall
OPT_FLAGS = -O -g
EXPAT_INCLUDES = -I/usr/local/include
X11_INCLUDES = -I/usr/local/include
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 -Wundef -ffast-math \
$(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
ASM_SOURCES =
MESA_ASM_SOURCES =
# Library/program dependencies
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
LIBDRM_LIB = `pkg-config --libs libdrm`
DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -pthread $(LIBDRM_LIB)
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
# Directories
SRC_DIRS = glx gallium mesa glu glut/glx glw
DRIVER_DIRS = dri
DRM_SOURCE_PATH=$(TOP)/../drm
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
unichrome savage sis

10
configs/freebsd-dri-amd64 Normal file
View File

@@ -0,0 +1,10 @@
# -*-makefile-*-
# Configuration for freebsd-dri-amd64: FreeBSD DRI hardware drivers
include $(TOP)/configs/freebsd-dri
CONFIG_NAME = freebsd-dri-x86-64
ASM_FLAGS = -DUSE_X86_64_ASM
MESA_ASM_SOURCES = $(X86-64_SOURCES)
GLAPI_ASM_SOURCES = $(X86-64_API)

13
configs/freebsd-dri-x86 Normal file
View File

@@ -0,0 +1,13 @@
# -*-makefile-*-
# Configuration for freebsd-dri: FreeBSD DRI hardware drivers
include $(TOP)/configs/freebsd-dri
CONFIG_NAME = freebsd-dri-x86
# Unnecessary on x86, generally.
PIC_FLAGS =
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
MESA_ASM_SOURCES = $(X86_SOURCES)
GLAPI_ASM_SOURCES = $(X86_API)

14
configs/hpux10 Normal file
View File

@@ -0,0 +1,14 @@
# Configuration for HPUX v10, shared libs
include $(TOP)/configs/default
CONFIG_NAME = hpux10
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
APP_LIB_DEPS = -$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm

20
configs/hpux10-gcc Normal file
View File

@@ -0,0 +1,20 @@
# Configuration for HPUX v10, with gcc
include $(TOP)/configs/default
CONFIG_NAME = hpux10-gcc
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -ansi -O3 -D_HPUX_SOURCE
GLUT_CFLAGS = -fexceptions
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm

30
configs/hpux10-static Normal file
View File

@@ -0,0 +1,30 @@
# Configuration for HPUX v10, static libs
include $(TOP)/configs/default
CONFIG_NAME = hpux10-static
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
MKLIB_OPTIONS = -static
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies (static libs don't have dependencies)
GL_LIB_DEPS =
OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm -lstdc++

30
configs/hpux11-32 Normal file
View File

@@ -0,0 +1,30 @@
# Configuration for HPUX v11
include $(TOP)/configs/default
CONFIG_NAME = hpux11-32
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = +z -Ae -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +z -Ae -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS =
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
GL_LIB_DEPS = -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXt -lXi -lX11 -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)

27
configs/hpux11-32-static Normal file
View File

@@ -0,0 +1,27 @@
# Configuration for HPUX v11, static libs
include $(TOP)/configs/default
CONFIG_NAME = hpux11-32-static
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS = -static
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread -lCsup -lcl

View File

@@ -0,0 +1,26 @@
# Configuration for HPUX v11, static libs
include $(TOP)/configs/default
CONFIG_NAME = hpux11-32-static
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
MKLIB_OPTIONS = -static
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm

31
configs/hpux11-64 Normal file
View File

@@ -0,0 +1,31 @@
# Configuration for HPUX v11, 64-bit
include $(TOP)/configs/default
CONFIG_NAME = hpux11-64
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = +z -Ae +DD64 -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +z -Ae +DD64 -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS =
LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
GL_LIB_DEPS = -L/usr/lib/X11R6/pa20_64 -L/usr/contrib/X11R6/lib/pa20_64 -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)

27
configs/hpux11-64-static Normal file
View File

@@ -0,0 +1,27 @@
# Configuration for HPUX v11, 64-bit, static libs
include $(TOP)/configs/default
CONFIG_NAME = hpux11-64-static
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = -O +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = -O +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS = -static
LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6/pa20_64 -L/usr/contrib/X11R6/lib/pa20_64 -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread -lCsup -lcl

30
configs/hpux11-ia64 Normal file
View File

@@ -0,0 +1,30 @@
# Configuration for HPUX IA64 v11, 64-bit
include $(TOP)/configs/default
CONFIG_NAME = hpux11-ia64
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = +z -Ae +DD64 -O +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = +z -Ae +DD64 -O +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS =
LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.so
GLU_LIB_NAME = libGLU.so
GLUT_LIB_NAME = libglut.so
GLW_LIB_NAME = libGLw.so
OSMESA_LIB_NAME = libOSMesa.so
# Library/program dependencies
GL_LIB_DEPS = -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)

View File

@@ -0,0 +1,27 @@
# Configuration for HPUX v11, 64-bit, static libs
include $(TOP)/configs/default
CONFIG_NAME = hpux11-ia64-static
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = -O +DD64 -Ae -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
CXXFLAGS = -O +DD64 -Ae -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
MKLIB_OPTIONS = -static
LIB_DIR = lib64
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lXt -lX11 -lpthread -lm -lCsup -lcl

16
configs/hpux9 Normal file
View File

@@ -0,0 +1,16 @@
# Configuration for HPUX v9, shared libs
include $(TOP)/configs/default
CONFIG_NAME = hpux9
# Compiler and flags
CC = cc
# XXX fix this
CXX = c++
CFLAGS = +z -O +Olibcalls +ESlit -Ae +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
CXXFLAGS = +z -O +Olibcalls +ESlit -Ae +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm

14
configs/hpux9-gcc Normal file
View File

@@ -0,0 +1,14 @@
# Configuration for HPUX v10, shared libs
include $(TOP)/configs/default
CONFIG_NAME = hpux9-gcc
# Compiler and flags
CC = cc
CXX = aCC
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm

17
configs/irix6-64 Normal file
View File

@@ -0,0 +1,17 @@
# Configuration for IRIX 6.x, make n64 DSOs
include $(TOP)/configs/default
CONFIG_NAME = irix6-64
# Compiler and flags
CC = cc
CXX = CC
CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM -DPTHREADS
CXXFLAGS = -64 -O3 -ansi -woff 1174 -DPTHREADS
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = lib64
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -64 -rpath $(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lpthread -lm

26
configs/irix6-64-static Normal file
View File

@@ -0,0 +1,26 @@
# Configuration for IRIX 6.x, make n64 static libs
include $(TOP)/configs/default
CONFIG_NAME = irix6-64-static
# Compiler and flags
CC = cc
CXX = CC
CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM -DPTHREADS
CXXFLAGS = -64 -O3 -ansi -woff 1174 -DPTHREADS
MKLIB_OPTIONS = -static
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = lib64
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a

17
configs/irix6-n32 Normal file
View File

@@ -0,0 +1,17 @@
# Configuration for IRIX 6.x, make n32 DSOs
include $(TOP)/configs/default
CONFIG_NAME = irix6-n32
# Compiler and flags
CC = cc
CXX = CC
CFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1521,1552 -DUSE_XSHM -DPTHREADS
CXXFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1552 -DPTHREADS
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = lib32
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -n32 -rpath $(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lfpe -lpthread -lm

25
configs/irix6-n32-static Normal file
View File

@@ -0,0 +1,25 @@
# Configuration for IRIX 6.x, make n32 static libs
include $(TOP)/configs/default
CONFIG_NAME = irix6-n32-static
# Compiler and flags
CC = cc
CXX = CC
CFLAGS = -n32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM -DPTHREADS
CXXFLAGS = -n32 -mips2 -O2 -ansi -woff 3262,3666 -DPTHREADS
MKLIB_OPTIONS = -static
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = lib32
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -n32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a

18
configs/irix6-o32 Normal file
View File

@@ -0,0 +1,18 @@
# Configuration for IRIX 6.x, make o32 DSOs
include $(TOP)/configs/default
CONFIG_NAME = irix6-o32
# Compiler and flags
CC = cc
CXX = CC
CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = lib32
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -32 -rpath $(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm

25
configs/irix6-o32-static Normal file
View File

@@ -0,0 +1,25 @@
# Configuration for IRIX 6.x, make o32 static libs
include $(TOP)/configs/default
CONFIG_NAME = irix6-o32-static
# Compiler and flags
CC = cc
CXX = CC
CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666
MKLIB_OPTIONS = -static
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
LIB_DIR = lib32
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a

38
configs/linux Normal file
View File

@@ -0,0 +1,38 @@
# Configuration for generic Linux
include $(TOP)/configs/default
CONFIG_NAME = linux
# Compiler and flags
CC = gcc
CXX = g++
OPT_FLAGS = -O3 -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. Add -m32
# to build properly on 64-bit platforms.
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = -Wall -Wmissing-prototypes -Wdeclaration-after-statement \
-Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
$(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
CXXFLAGS = -Wall -Wpointer-arith $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
$(DEFINES) $(X11_INCLUDES)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
GLUT_CFLAGS = -fexceptions
EXTRA_LIB_PATH = -L/usr/X11R6/lib

22
configs/linux-alpha Normal file
View File

@@ -0,0 +1,22 @@
# Configuration for Linux on Alpha
include $(TOP)/configs/default
CONFIG_NAME = linux-alpha
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE -DUSE_XSHM
CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -fPIC -D_XOPEN_SOURCE
GLUT_CFLAGS = -fexceptions
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm

View File

@@ -0,0 +1,31 @@
# Configuration for Linux on Alpha, static libs
include $(TOP)/configs/default
CONFIG_NAME = linux-alpha-static
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE -DUSE_XSHM
CXXFLAGS = -O3 -mcpu=ev5 -ansi -mieee -pedantic -D_XOPEN_SOURCE
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static
PIC_FLAGS =
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -L/usr/X11R6/lib -lX11 -lm

72
configs/linux-cell Normal file
View File

@@ -0,0 +1,72 @@
# linux-cell (non-debug build)
include $(TOP)/configs/linux
CONFIG_NAME = linux-cell
# Omiting other gallium drivers:
GALLIUM_DRIVERS_DIRS = cell softpipe trace rbug identity
# Compiler and flags
CC = ppu32-gcc
CXX = ppu32-g++
HOST_CC = gcc
APP_CC = gcc
APP_CXX = g++
OPT_FLAGS = -O3
# Cell SDK location
## For SDK 2.1: (plus, remove -DSPU_MAIN_PARAM_LONG_LONG below)
#SDK = /opt/ibm/cell-sdk/prototype/sysroot/usr
## For SDK 3.0:
SDK = /opt/cell/sdk/usr
COMMON_C_CPP_FLAGS = $(OPT_FLAGS) -Wall -Winline \
-fPIC -m32 -mabi=altivec -maltivec \
-I. -I$(SDK)/include \
-DGALLIUM_CELL $(DEFINES)
CFLAGS = $(COMMON_C_CPP_FLAGS) -Wmissing-prototypes -std=c99
CXXFLAGS = $(COMMON_C_CPP_FLAGS)
# Omitting glw here:
SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
gallium gallium/winsys gallium/targets glu glut/glx
# Build no traditional Mesa drivers:
DRIVER_DIRS =
MKDEP_OPTIONS = -fdepend -Y
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread \
-L$(SDK)/lib -m32 -Wl,-m,elf32ppc -R$(SDK)/lib -lspe2
CELL_SPU_LIB = $(TOP)/src/gallium/drivers/cell/spu/g3d_spu.a
### SPU stuff
SPU_CC = spu-gcc
SPU_CFLAGS = $(OPT_FLAGS) -W -Wall -Winline -Wmissing-prototypes -Wno-main \
-I. -I$(SDK)/spu/include -I$(TOP)/src/mesa/ $(INCLUDE_DIRS) \
-DSPU_MAIN_PARAM_LONG_LONG \
-include spu_intrinsics.h
SPU_LFLAGS = -L$(SDK)/spu/lib -Wl,-N -lmisc -lm
SPU_AR = ppu-ar
SPU_AR_FLAGS = -qcs
SPU_EMBED = ppu32-embedspu
SPU_EMBED_FLAGS = -m32

10
configs/linux-cell-debug Normal file
View File

@@ -0,0 +1,10 @@
# linux-cell-debug
include $(TOP)/configs/linux-cell
# just override name and OPT_FLAGS here:
CONFIG_NAME = linux-cell-debug
OPT_FLAGS = -g -DDEBUG

9
configs/linux-debug Normal file
View File

@@ -0,0 +1,9 @@
# Configuration for debugging on Linux
include $(TOP)/configs/linux
CONFIG_NAME = linux-debug
OPT_FLAGS = -g
#CFLAGS += -pedantic
DEFINES += -DDEBUG -DDEBUG_MATH

71
configs/linux-dri Normal file
View File

@@ -0,0 +1,71 @@
# -*-makefile-*-
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
include $(TOP)/configs/default
CONFIG_NAME = linux-dri
# Compiler and flags
CC = gcc
CXX = g++
#MKDEP = /usr/X11R6/bin/makedepend
#MKDEP = gcc -M
#MKDEP_OPTIONS = -MF depend
OPT_FLAGS = -O2 -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
GLUT_CFLAGS = -fexceptions
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread -ldl $(LIBDRM_LIB)
# Directories
SRC_DIRS := glx egl $(SRC_DIRS)
# EGL directories
EGL_DRIVERS_DIRS = glx
DRIVER_DIRS = dri
GALLIUM_WINSYS_DIRS = sw sw/xlib drm/vmware drm/intel drm/i965
GALLIUM_TARGET_DIRS = egl-swrast
GALLIUM_STATE_TRACKERS_DIRS = egl
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \
savage sis tdfx unichrome swrast
INTEL_LIBS = `pkg-config --libs libdrm_intel`
INTEL_CFLAGS = `pkg-config --cflags libdrm_intel`
RADEON_LIBS = `pkg-config --libs libdrm_radeon`
RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon`

16
configs/linux-dri-debug Normal file
View File

@@ -0,0 +1,16 @@
# -*-makefile-*-
# Configuration for linux-dri-debug: Linux DRI hardware drivers for XFree86 & others
include $(TOP)/configs/linux-dri
CONFIG_NAME = linux-dri-debug
OPT_FLAGS = -O0 -g
ARCH_FLAGS = -DDEBUG
# Helpful to reduce the amount of stuff that gets built sometimes:
#DRI_DIRS = i915tex i915
#DRI_DIRS = i965
#DRI_DIRS = radeon r200 r300
#DRI_DIRS = unichrome sis
#DRI_DIRS = i810 mga r128 tdfx

17
configs/linux-dri-ppc Normal file
View File

@@ -0,0 +1,17 @@
# -*-makefile-*-
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
include $(TOP)/configs/linux-dri
CONFIG_NAME = linux-dri-ppc
OPT_FLAGS = -Os -mcpu=603
PIC_FLAGS = -fPIC
ASM_FLAGS = -DUSE_PPC_ASM -DUSE_VMX_ASM
MESA_ASM_SOURCES = $(PPC_SOURCES)
# Build only the drivers for cards that exist on PowerPC. At some point MGA
# will be added, but not yet.
DRI_DIRS = mach64 r128 r200 r300 radeon tdfx

13
configs/linux-dri-x86 Normal file
View File

@@ -0,0 +1,13 @@
# -*-makefile-*-
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
include $(TOP)/configs/linux-dri
CONFIG_NAME = linux-dri-x86
ARCH_FLAGS = -m32 -mmmx -msse -msse2
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
MESA_ASM_SOURCES = $(X86_SOURCES)
GLAPI_ASM_SOURCES = $(X86_API)

24
configs/linux-dri-x86-64 Normal file
View File

@@ -0,0 +1,24 @@
# -*-makefile-*-
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
include $(TOP)/configs/linux-dri
CONFIG_NAME = linux-dri-x86-64
ARCH_FLAGS = -m64
ASM_FLAGS = -DUSE_X86_64_ASM
MESA_ASM_SOURCES = $(X86-64_SOURCES)
GLAPI_ASM_SOURCES = $(X86-64_API)
LIB_DIR = lib64
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib64
# sis is missing because it has not been converted to use
# the new interface. i810 are missing because there is no x86-64
# system where they could *ever* be used.
#
DRI_DIRS = i915 i965 mach64 mga r128 r200 r300 radeon savage tdfx unichrome

54
configs/linux-dri-xcb Normal file
View File

@@ -0,0 +1,54 @@
# -*-makefile-*-
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
include $(TOP)/configs/default
CONFIG_NAME = linux-dri-xcb
# Compiler and flags
CC = gcc
CXX = g++
#MKDEP = /usr/X11R6/bin/makedepend
#MKDEP = gcc -M
#MKDEP_OPTIONS = -MF depend
OPT_FLAGS = -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = $(shell pkg-config --cflags-only-I x11) $(shell pkg-config --cflags-only-I xcb) $(shell pkg-config --cflags-only-I x11-xcb) $(shell pkg-config --cflags-only-I xcb-glx)
CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
$(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11)
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
$(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx)
SRC_DIRS = glx gallium mesa glu glut/glx glw
DRIVER_DIRS = dri
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon \
savage sis tdfx unichrome

56
configs/linux-egl Normal file
View File

@@ -0,0 +1,56 @@
# -*-makefile-*-
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
include $(TOP)/configs/default
CONFIG_NAME = linux-dri
# Compiler and flags
CC = gcc
CXX = g++
#MKDEP = /usr/X11R6/bin/makedepend
#MKDEP = gcc -M
#MKDEP_OPTIONS = -MF depend
OPT_FLAGS = -O -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
LIBDRM_LIB = $(shell pkg-config --libs libdrm)
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread -ldl \
$(LIBDRM_LIB)
# Directories
SRC_DIRS = gallium mesa gallium/winsys gallium/targets glu egl
DRIVER_DIRS = dri
GALLIUM_WINSYS_DIRS = egl_drm
GALLIUM_TARGET_DIRS =
DRI_DIRS = intel

18
configs/linux-fbdev Normal file
View File

@@ -0,0 +1,18 @@
# Configuration for Linux fbdev interface
include $(TOP)/configs/linux
CONFIG_NAME = linux-fbdev
CFLAGS += -DUSE_GLFBDEV_DRIVER
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
SRC_DIRS += glut/fbdev
DRIVER_DIRS = fbdev osmesa
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread
OSMESA_LIB_DEPS = -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lgpm -lm

9
configs/linux-i965 Normal file
View File

@@ -0,0 +1,9 @@
# Configuration for standalone mode i965 debug
include $(TOP)/configs/linux-debug
CONFIG_NAME = linux-i965
GALLIUM_DRIVER_DIRS = i965
GALLIUM_WINSYS_DIRS = drm/i965/xlib
GALLIUM_TARGET_DIRS =

21
configs/linux-ia64-icc Normal file
View File

@@ -0,0 +1,21 @@
# Configuration for Linux with Intel C compiler
include $(TOP)/configs/default
CONFIG_NAME = linux-icc
# Compiler and flags
CC = icc
CXX = icpc
CFLAGS = -O3 -ansi -KPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -O3 -ansi -KPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -arch icc-istatic
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)

View File

@@ -0,0 +1,27 @@
# Configuration for Linux with Intel C compiler, static libs
include $(TOP)/configs/default
CONFIG_NAME = linux-icc-static
# Compiler and flags
CC = icc
CXX = icpc
CFLAGS = -O3 -ansi -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -O3 -ansi -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static -arch icc-istatic
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
APP_LIB_DEPS = -i-static -cxxlib-icc -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lpthread -lm -lcxa -lunwind

22
configs/linux-icc Normal file
View File

@@ -0,0 +1,22 @@
# Configuration for Linux with Intel C compiler
include $(TOP)/configs/default
CONFIG_NAME = linux-icc
# Compiler and flags
CC = icc
CXX = g++
CFLAGS = -O3 -tpp6 -axK -KPIC -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -O3
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -arch icc
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
MESA_ASM_SOURCES = $(X86_SOURCES)
GLAPI_ASM_SOURCES = $(X86_API)

27
configs/linux-icc-static Normal file
View File

@@ -0,0 +1,27 @@
# Configuration for Linux with Intel C compiler, static libs
include $(TOP)/configs/default
CONFIG_NAME = linux-icc-static
# Compiler and flags
CC = icc
CXX = icpc
CFLAGS = -O3 -tpp6 -axK -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
CXXFLAGS = -O3 -tpp6 -axK -DPTHREADS
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static -arch icc
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
GL_LIB_DEPS =
GLUT_LIB_DEPS =
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -lpthread -lcxa -lunwind
MESA_ASM_SOURCES = $(X86_SOURCES)
GLAPI_ASM_SOURCES = $(X86_API)

51
configs/linux-indirect Normal file
View File

@@ -0,0 +1,51 @@
# -*-makefile-*-
# Configuration for linux-indirect: Builds a libGL capable of indirect
# rendering, but *NOT* capable of direct rendering.
include $(TOP)/configs/default
CONFIG_NAME = linux-dri
# Compiler and flags
CC = gcc
CXX = g++
#MKDEP = /usr/X11R6/bin/makedepend
#MKDEP = gcc -M
#MKDEP_OPTIONS = -MF depend
WARN_FLAGS = -Wall
OPT_FLAGS = -O -g
PIC_FLAGS = -fPIC
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
ARCH_FLAGS ?=
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DGLX_INDIRECT_RENDERING \
-DPTHREADS -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
# Directories
SRC_DIRS = glx glu glut/glx glw
DRIVER_DIRS =

Some files were not shown because too many files have changed in this diff Show More