Compare commits

..

304 Commits

Author SHA1 Message Date
Brice Goglin
2b831e73f5 Prepare changelog for upload 2008-06-18 20:59:24 +02:00
Brice Goglin
6ec170290c Put all configs/ changes into the .diff.gz
Put back our configs/ changes into the .diff.gz since choose-configs
needs them before quilt is invoked. Put 04_cleanup-osmesa-configs.patch
there as well for #485161.
2008-06-18 20:59:09 +02:00
Brice Goglin
7c8ea0899a Revert "Move our configs/ changes from the .diff.gz into our quilt patches"
This reverts commit 03970183fc.

Conflicts:

	debian/changelog
2008-06-18 20:55:42 +02:00
Brice Goglin
f81070dbd5 Pull from mesa_7_0_branch 2008-06-18 20:55:00 +02:00
Brice Goglin
955c2ef48f Merge branch 'mesa_7_0_branch' of git://git.freedesktop.org/git/mesa/mesa into debian-unstable 2008-06-18 20:52:25 +02:00
Xiang, Haihao
2ac4919d24 i965: add support for Intel 4 series chipsets 2008-06-18 15:48:45 +08:00
Xiang, Haihao
3ed89025f3 i915: The pitch passed to intelEmitCopyBlitLocked should be in pixels,
not in bytes. Reported by Christopher Dissauer.
2008-06-18 13:52:04 +08:00
Xiang, Haihao
5b42bbce70 i915: fix data size in intelTryDrawPixels. Reported by Christopher Dissauer 2008-06-18 13:40:22 +08:00
Brian Paul
d2e0a11aab mesa: fix inconsistent use of GL_UNSIGNED_INT vs. GL_UNSIGNED_INT_24_8_EXT for Z unpacking 2008-06-17 16:44:00 -06:00
Brice Goglin
5033e5b36d Prepare changelog for upload 2008-06-17 20:01:01 +02:00
Brice Goglin
6a6a9c1c5a Pull from mesa_7_0_branch 2008-06-17 20:00:37 +02:00
Brice Goglin
3d6aa2e06f Merge branch 'mesa_7_0_branch' of git://git.freedesktop.org/git/mesa/mesa into debian-unstable 2008-06-17 19:54:47 +02:00
Brice Goglin
03970183fc Move our configs/ changes from the .diff.gz into our quilt patches
with 04_cleanup-osmesa-configs.patch renamed into 04_debian-configs.patch
2008-06-17 19:32:21 +02:00
Brian Paul
47d046c93f mesa: make mm.c use unsigned ints for offsets.
If you have a GPU using this code and it has the offsets up in this space,
this fails.

cherry-picked from master
2008-06-17 10:10:53 -06:00
Wilfried Holzke
718724deeb assorted glide driver fixes/updates 2008-06-17 10:03:03 -06:00
Brian Paul
85c325c36c add hyphen to rm command 2008-06-17 10:02:10 -06:00
Brian Paul
7e6d99f5ec glu: silence warnings 2008-06-17 09:01:40 -06:00
Brian Paul
6ce6dc961b bump version to 7.0.4 2008-06-16 10:19:29 -06:00
Brian Paul
186883611e fix glPixelZoom stack over flow on Windows 2008-06-16 10:19:28 -06:00
Brian Paul
48b3c59cb9 mesa: allocate pixel zoom arrays on heap, not stack
Fixes stack overflow on Windows.

cherry-picked from master
2008-06-16 10:19:28 -06:00
Brian Paul
04b9d5bc23 Fix _mesa_new_program() recursive call regression
This was introduced by the "i965 GLSL merge" from master (ce7a9efb09)
2008-06-16 10:19:28 -06:00
Brian Paul
91707e9020 fix GLSL generic vertex attrib linking bug 2008-06-16 10:19:28 -06:00
Xiang, Haihao
82a0e82232 i965: fix intel_batchbuffer_space. (bug#14709) 2008-06-13 13:53:46 +08:00
Brice Goglin
fe4264bf45 Prepare changelog for upload 2008-06-13 06:53:55 +02:00
Brice Goglin
2fa795a213 Pull from mesa_7_0_branch 2008-06-11 18:59:59 +02:00
Brice Goglin
e32aaf5da8 Merge branch 'mesa_7_0_branch' of git://git.freedesktop.org/git/mesa/mesa into debian-unstable 2008-06-11 18:58:59 +02:00
Brian
03447de338 disable ctx->Driver.NewProgram() call in _mesa_new_program()
This was causing infinite recursive calls w/ software drivers.
All vertex/fragment shaders should be allocated by calling
ctx->Driver.NewProgram(), not by calling _mesa_new_program().

(Cherry picked from commit 40133487db,
351a83163a).
2008-06-11 17:03:47 +08:00
Dave Airlie
ee5f4a4caf r300: disable the lowimpact fallbacks by default.
because really we should be able to just fix the driver.
(cherry picked from commit 7013eecf28)

There are actually even better reasons for this, the bottom line being that
enabling these fallbacks makes a lot of apps unusable mostly for no gain
whatsoever.
2008-06-11 10:42:16 +02:00
Xiang, Haihao
c04f3933ab i915: fix fd.o #14966 2008-06-11 11:36:01 +08:00
Xiang, Haihao
8f328c45e5 i915: Keith Whitwell's swizzling TEX patch. fix #8283
Cherry picked from commit 3369cd9a6f
2008-06-11 11:32:12 +08:00
Brice Goglin
9676f0cffc Pull from mesa_7_0_branch 2008-06-10 23:18:28 +02:00
Brice Goglin
2d0ca23319 Merge branch 'mesa_7_0_branch' of git://git.freedesktop.org/git/mesa/mesa into debian-unstable 2008-06-10 22:48:43 +02:00
Xiang, Haihao
6f4c8b5b50 i965: apply commit 6c1a98e97a to glsl
(cherry picked from commit a742bed99a)
2008-06-10 16:46:02 +08:00
Michal Wajdeczko
f8bd9cc30f Add support for ATI_separate_stencil in display lists.
(cherry picked from commit 7f747204ea)
2008-06-10 16:28:06 +08:00
Michal Wajdeczko
d9f9b1cd0b [965] Correctly set read mask for OPCODE_SWZ in pass1.
While OPCODE_SWZ has usually been optimized away in pass0, it may still
exist if a SWZ with dst saturate was emitted in pass_fp.  Fixes an error
in oglconform fpalu.c.
(cherry picked from commit 13a6f73a64)
2008-06-10 16:21:31 +08:00
Michal Wajdeczko
eca283976b [965] Avoid emitting dead code for DPx/math instructions.
The pass1 optimization stage clears out writemasks and registers, but the
instructions themselves are still being processed at this stage, and could
have resulted in them still being emitted.
(cherry picked from commit c60b5dfde8)
2008-06-10 16:18:48 +08:00
Michal Wajdeczko
2176259ca6 [965] Improve pinterp performance by delaying reads of just-written regs.
(cherry picked from commit bb419970ef)
2008-06-10 16:18:09 +08:00
Michal Wajdeczko
8fe6fcb900 [965] Fix negating of unsigned value in emit_wpos_xy.
(cherry picked from commit 6c1a98e97a)
2008-06-10 16:16:52 +08:00
Michal Wajdeczko
76d6edcc38 [965] Add MVP code for position invariant vertex programs.
This fixes the arbvptorus demo.
(cherry picked from commit 5f10438f2d)
2008-06-10 16:13:06 +08:00
Michal Wajdeczko
98d6c671f5 [win32] Use native aligned memory allocation functions.
(cherry picked from commit 31fe7cf5e3)
2008-06-10 16:12:18 +08:00
Andrzej Trznadel
f652811df4 [965] Fix fp temp reg release code to not usually release all temps.
Also, use wrapped ffs() instead of native.
(cherry picked from commit 3105bc1d88)
2008-06-10 15:45:11 +08:00
Andrzej Trznadel
e279f4601d Fix compat implementation of ffs() to return 1-based bit numbers.
(cherry picked from commit e9809a36aa)
2008-06-10 15:44:53 +08:00
Keith Packard
87a30337a1 [i965] short immediate values must be replicated to both halves of the dword
The 32-bit immediate value in the i965 instruction word must contain two
copies of any 16-bit constants. brw_imm_uw and brw_imm_w just needed to
copy the value into both halves of the immediate value instruction field.
(cherry picked from commit ca73488f48)
2008-06-10 15:37:11 +08:00
Eric Anholt
9c2047b275 [965] Don't let the negate flags of src0 affect 1 constants in precalc_dst/lit
This patch is a variant of a submission by Michal Wajdeczko to fix
oglconform fpalu failures.
(cherry picked from commit b4cbf6983e)
2008-06-10 15:32:53 +08:00
Zou Nan hai
1dcb0433a3 [i915] fix fragment.position 2008-06-10 15:28:07 +08:00
Zou Nan hai
5ff27e02b3 [i965] fix wpos height 1 pixel higher
(cherry picked from commit b0f681b458)
2008-06-10 15:25:20 +08:00
Eric Anholt
4beee58e57 [965] Bug #9151: make fragment.position return window coords not screen coords.
(cherry picked from commit 9c8f27ba13)
2008-06-10 15:22:08 +08:00
Eric Anholt
1f9de20719 [915] Fix COS function using same plan as SIN.
The previous COS function failed badly outside of [-pi/2, pi/2].
2008-06-10 14:55:52 +08:00
Eric Anholt
d05a8d9750 [915] Use a quartic term to improve the accuracy of SIN results.
This is described in the link in the comment, and is the same technique that
r300 uses.
2008-06-10 14:46:12 +08:00
Eric Anholt
db5f206c00 [915] Fix fp SIN function, and use a quadratic approximation instead of Taylor.
The Taylor series notably fails at producing sin(pi) == 0, which leads to
discontinuity every 2*pi.  The quadratic gets us sin(pi) == 0 behavior, at the
expense of going from 2.4% THD with working Taylor series to 3.8% THD (easily
seen on comparative graphs of the two).  However, our previous implementation
was producing sin(pi) < -1 and worse, so any reasonable approximation is an
improvement.  This also fixes the repeating behavior, where the previous
implementation would repeat sin(x) for x>pi as sin(x % pi) and the opposite
for x < -pi.
2008-06-10 14:22:36 +08:00
Eric Anholt
9dface8347 [965] Fix potential segfaults from bad realloc.
C has no order of evaluation restrictions on function arguments, so we
attempted to realloc from new-size to new-size.
(cherry picked from commit e747e9a072)
2008-06-10 13:54:01 +08:00
Eric Anholt
32f4940883 [965] Fix inversion of SLT/SGE results in vertex programs.
The WM code had this right, so copy its behavior.  This reverts a flipping
of the arguments to SLT in brw_vs_tnl which came in with the GLSL code that
probably occurred to work around the flipped results, and brings the code back
in line with t_vp_build.c.
(cherry picked from commit 9bae03a583)
2008-06-10 13:44:54 +08:00
Eric Anholt
a7969a9b93 [965] Fix and enable separate stencil.
Note that this does not enable GL_EXT_stencil_two_side, because Mesa's computed
_TestTwoSide ends up respecting only STENCIL_TEST_TWO_SIDE_EXT (defaults to
GL_FALSE), even if the application uses only GL 2.0 / ATI entrypoints.
(cherry picked from commit 9136e1f2c8)
2008-06-10 13:30:25 +08:00
Eric Anholt
ad88130df5 [965] Replace our own depth constants in intel context with GL context ones. 2008-06-10 13:08:09 +08:00
Eric Anholt
d1e71bc08b [965] Remove dead code in upload_wm_surfaces.
(cherry picked from commit 3ecdae82d7)
2008-06-10 11:19:53 +08:00
Roland Scheidegger
fa58fe247c i965: fix OPCODE_TEX when additional ops are needed 2008-06-08 14:04:39 +02:00
Brian Paul
4b71478326 Set the attribute as used.
Cherry-picked from gallium-0.1
2008-06-04 14:42:55 -06:00
Zou Nan hai
0989471fdb [i915] GL_DEPTH_TEXTURE_MODE fix
Cherry picked from commit 7233eabaf0
with manual changes.
2008-06-04 15:57:37 +08:00
Xiang, Haihao
696140bd1d i965: handle source depth to render target for glsl,
(cherry picked from commit d2540e6d4b)
2008-06-04 11:54:25 +08:00
Brian
380d15b7fe replace // comment with /* */ (bug 14916)
(cherry picked from commit eecb3ab7c6)
2008-06-04 11:52:38 +08:00
Xiang, Haihao
41261d64b2 i965: use _Current pointer instead of Current pointer.
Cherry picked from commit de1e9880f8
2008-06-04 11:51:19 +08:00
Zou Nan hai
ce7a9efb09 [i965] Add support for GL shading language in I965 driver.
Cherry picked from commit 6ef27b88e6,
d0ebdca4fa.
2008-06-04 11:47:08 +08:00
Zou Nan hai
8a38ebe328 [i965] This is to fix random crash in some maps of Ut2004 demo.
e.g. bridge of fate.
 	If vs output is big, driver may fall back to use 8 urb entries for vs,
	unfortunally, for some unknown reason, if vs is working at 4x2 mode,
	8 entries is not enough, may lead to gpu hang.

Cherry picked from commmit c9c64a100d
2008-06-03 11:30:41 +08:00
Zou Nan hai
dcc6671b85 [i915] don't use 4x4 filter for 1D shadowmap
Cherry picked from commit d24a5254c2
2008-06-03 11:23:44 +08:00
Zou Nan hai
b53b7581e4 [i965] fix fd.o bug #11471 and #11478
1. Follow EXT_texture_rectangle with YCbCr texture
	2. swap UV component for MESA_FORMAT_YCBCR

Cherry picked from commit 7676980d38.
2008-06-03 11:04:10 +08:00
Zou Nan hai
64a4a03c2a EXT_texture_sRGB support on i965
Cherry picked from commit 6bf81a5edf,
246d1d2522.
2008-06-03 10:09:33 +08:00
Brian Paul
b878c3f518 i915tex: fix fragment fog swizzle (from master) (bug 16195) 2008-06-02 09:29:22 -06:00
Brian Paul
6164163ca8 glDrawElement + VBO bug fix 2008-06-02 09:28:31 -06:00
Zou Nan hai
e92a53cd92 [i965] flip point sprite
Cherry picked from commit 1202c434d9
2008-06-02 17:05:57 +08:00
Zou Nan hai
2467af98b1 ARB sprite point support on i965
Cherry picked from commmit 60179434d1,
505453a04e with manual changes.
2008-06-02 17:01:31 +08:00
Xiang, Haihao
6f851d8875 _generic_read_RGBA_span_BGRA8888_REV_SSE2: It should adjust the source
and target pointers after do the first 2 pixels. fix bug #15850

Cherry-picked from commit 4b7d301c94
2008-06-02 14:28:42 +08:00
Xiang, Haihao
9b99bf89c4 i965: depth offset on glPolygonMode(GL_LINE/GL_POINT)
Cherry picked from 184cf464f4
2008-06-02 14:20:23 +08:00
Xiang, Haihao
7346fca083 965: use RGB565 to render a bitmap if Depth is 16
Cherry-picked from commit 5982d39799.
2008-06-02 14:15:24 +08:00
Xiang, Haihao
7facbb69c6 i965: don't swizzle fogcoord if FogOption is FOG_NONE.
fix #10788 issue on 965.

Cherry picked from commit 83068115e2
2008-06-02 14:08:26 +08:00
Xiang, Haihao
f59267d650 i915: set fogcoord to (f,0,0,1). fix #10788 issue on 915.
Cherry picked from commit 7eef52e975
2008-06-02 14:06:14 +08:00
Xiang, Haihao
71cb014195 mesa: fix a bad cast in put_values_z24.
The values passed to put_values_z24 are GLuint,
not GLubyte. fix #13543

Cherry picked from commit cf46aee14a
2008-06-02 13:59:51 +08:00
Xiang, Haihao
6c0f8db9c2 i965: The jump instruction count is added
to IP pre-increment, and should point to
the first instruction after the do instruction
of the do-while block of code

Cherry picked from commit 46e03d584a
2008-06-02 13:54:45 +08:00
Xiang, Haihao
49f1e2fc4c i965: fix an error in brw_vs_tnl.c
Update the tnl program if the state of TEXMAT is changed.
2008-06-02 13:46:31 +08:00
Eric Anholt
2d26e19535 [965] Clarify a bit of index buffer upload code.
Cherry picked from commit 5a49e84fcd
2008-06-02 13:18:00 +08:00
Xiang, Haihao
5b0c6cd49a i965: align the address of the first element within
the index buffer. (fix#11910)

Cherry picked from ea07a0df9a
2008-06-02 13:16:53 +08:00
Xiang, Haihao
c3ee8e46cc i965: fix projtex_mask
projtex_mask is only an 8bit field, and wm.input_size_masks includes
other attributes' information, therefore right shift is needed.

Cherry picked from 88451b04e9
2008-06-02 13:01:11 +08:00
Xiang, Haihao
46aac24261 i965: fix bad casts in do_blit_bitmap to support WindowPos correctly
Cherry picked from commit e66757c8ba
2008-06-02 11:54:35 +08:00
Xiang, Haihao
e1032ce718 i965: fix DEPTH_TEXTURE_MODE
Cherry picked from commit 6e620162a1 with
manual changes
2008-06-02 11:52:36 +08:00
Brian Paul
ce636f36f2 Fix segfault in _save_OBE_DrawElements() when using VBO and display list (bug 16156)
This was previously fixed in master by commit 982dcb74fd by Haihao Xiang.
2008-05-30 08:46:51 -06:00
Xiang, Haihao
93f2eec6b3 i965: roland's DXTn format texture patch(bug10347)
Cherry picked from commit db928291dc
2008-05-29 15:50:06 +08:00
Eric Anholt
46ef09d787 [965] Replace various alignment code with a shared ALIGN() macro.
In the process, fix some alignment issues:
- Scratch space allocation was aligned into units of 1KB, while the allocation
  wanted units of bytes, so we never allocated enough space for scratch.
- GRF register count was programmed as ALIGN(val - 1, 16) / 16 instead of
  ALIGN(val, 16) / 16 - 1, which overcounted for val != 16n+1.

Cherry picked from commit 77e0523fb7
2008-05-29 15:48:47 +08:00
Xiang, Haihao
7487ec0ff0 i965: align width/height for volume texture
Cherry picked from commit 00b86ecf6f
2008-05-29 15:45:12 +08:00
Xiang, Haihao
a25549866f intel: applying right alignment to compressed texture,
which make small textures(4x4,2x2,1x1) work well.

Cherry picked from commit 8ea66fa2ec
2008-05-29 15:43:31 +08:00
Xiang, Haihao
558cc6e38f i965: set mt->cpp differently with compressed texture
Cherry picked from commit 2cafd749b8
2008-05-29 15:40:44 +08:00
Xiang, Haihao
feb1fa1e83 i965: use BRW_TEXCOORDMODE_CLAMP instead of BRW_TEXCOORDMODE_CLAMP_BORDER
to implement GL_CLAMP

Cherry picked from commit ab99960858. fix #16005
2008-05-28 16:29:17 +08:00
Brian Paul
f32462343d allow GLX_SAMPLES_ARB==0 (bug 16073) 2008-05-27 09:49:44 -06:00
Brian Paul
08ef1b379a added sampler types to sizeof_glsl_type() 2008-05-27 08:50:15 -06:00
Karl Schultz
1e79831b56 dependency fixes (bug 13544) 2008-05-27 08:50:14 -06:00
Tormod Volden
7a29164f70 dri: vblank_mode warning
From what I can see the environment variables LIBGL_THROTTLE_REFRESH
and LIBGL_SYNC_REFRESH were taken out like 3 years ago, but this
warning was never updated.
2008-05-24 18:34:27 +02:00
Brian Paul
f2533e787e AA tri and glMaterial fixes 2008-05-16 15:35:19 -06:00
Brian Paul
b2ccd5c1ae fix memory access error in vbo_bind_vertex_list
Picked from master (commit 8fc1a6808d)
2008-05-16 15:35:19 -06:00
Brian Paul
6f63543dd7 fix an attr/src mix-up when setting-up/binding vertex arrays
This fixes problems with incorrect material coefficients when glMaterial
is called per-vertex.
2008-05-16 15:35:19 -06:00
Brian Paul
c966f1629b fix segfault in AA triangle code when using certain shaders 2008-05-16 15:35:19 -06:00
Xiang, Haihao
709f24adbb intel: Set right cliprects for the current draw region. fix #15057 2008-05-14 15:01:44 +08:00
Brian Paul
52fe7ea3d1 mesa: free shader program data before deleting shader objects.
Picked from master.
Fixes mem corruption seen when glean/api2 test exits.
2008-05-07 16:10:32 +01:00
Xiang, Haihao
44f6a6f9c4 i915: Add E7221 variant to i915.
Cherry picked from commit 39bcbe0921
2008-05-07 14:09:28 +08:00
Brian Paul
ac88b3dd16 Add support for GL_REPLACE_EXT texture env mode.
GL_REPLACE_EXT comes from the ancient GL_EXT_texture extension.  Found an old demo that
actually uses it.
The values of the GL_REPLACE and GL_REPLACE_EXT tokens is different, unfortunately.
2008-04-30 16:08:28 -06:00
Brian Paul
27b6fa5615 mesa: adjust glBitmap coords by a small epsilon
Fixes problem with bitmaps jumping around by one pixel depending on window
size.  The rasterpos is often X.9999 instead of X+1.
Run progs/redbook/drawf and resize window to check.

Cherry picked from gallium-0.1 branch
2008-04-29 18:38:26 -06:00
Brian Paul
68eb76dfb7 Enabled GL_EXT_multi_draw_arrays extension in R200/R300 drivers 2008-04-29 18:38:26 -06:00
Ove Kaaven
392760ee0c r200: fix state submission issue causing bogus textures (bug 15730) 2008-04-29 22:11:23 +02:00
Michel Dänzer
063b60a51f Change default of driconf "allow_large_textures" to announce hardware limits.
The previous default these days served mostly to cause artifical problems with
GLX compositing managers like compiz (see e.g.
http://bugs.freedesktop.org/show_bug.cgi?id=10501).

(cherry picked from commit acba9c1771)
2008-04-29 19:03:44 +02:00
Brian Paul
7b676192e9 enable GL_EXT_multi_draw_arrays (see bug 15670) 2008-04-24 16:31:28 -06:00
Brian Paul
138e0010eb added FreeBSD static config 2008-04-23 08:23:18 -06:00
Anatolij Shkodin
36bad2b478 added freebsd-static 2008-04-23 08:23:18 -06:00
Alan Hourihane
f6d6fc603e revert 2008-04-22 23:08:35 +01:00
Alan Hourihane
5545b46571 small cleanups 2008-04-22 20:29:42 +01:00
Alan Hourihane
06b0a7acce correct the return value 2008-04-22 20:29:00 +01:00
Alan Hourihane
534f30064d Fix error string 2008-04-22 20:28:35 +01:00
Brian Paul
6c9e1b2337 fix GL_ARB_texture_rectangle breakage 2008-04-14 13:44:05 -06:00
Brian Paul
62c67576e0 fixed WIN32 compile problem in libGLU 2008-04-14 13:41:17 -06:00
Brian Paul
91d59e4cb9 check for _WIN32 and __WIN32__ 2008-04-14 13:40:39 -06:00
Brian Paul
8de268bb3c add -Wl case (part of prev DragonFly patch) 2008-04-14 12:58:51 -06:00
Brian Paul
4fd7f6047c define #extension GL_ARB_texture_rectangle 2008-04-14 12:58:51 -06:00
David Flynn
ff3033e190 define #extension GL_ARB_texture_rectangle 2008-04-14 12:58:51 -06:00
Roland Scheidegger
18404076e3 r200: fix XPD vertex program instruction when using temps as inputs
due to the two read ports limit into temp memory may need the MAD_2 instruction
for the second instruction of the decomposed XPD.
While here, also try to avoid MAD_2 for MAD if all 3 inputs are temps but the
temps aren't actually distinct.
2008-04-12 02:40:44 +02:00
Brice Goglin
59c9c40c01 Prepare changelog for upload 2008-04-11 08:42:55 +02:00
Brice Goglin
666e0635da New upstream release 2008-04-11 08:41:32 +02:00
Brice Goglin
f9968a0346 Merge tag 'mesa_7_0_3' into debian-unstable 2008-04-11 08:38:26 +02:00
Hasso Tepper
39dca05d1d New dragonfly configs
A re-do commit, this time with the intended commit message.
2008-04-09 19:05:59 -06:00
Brian Paul
f51b76b670 Revert "Hasso Tepper <hasso@estpak.ee>"
This reverts commit 40ee989db5.
2008-04-09 19:04:36 -06:00
Brian Paul
40ee989db5 Hasso Tepper <hasso@estpak.ee> 2008-04-09 19:02:41 -06:00
Brian Paul
ef76dfc7a0 add link to 7.0.4 relnotes 2008-04-09 19:01:07 -06:00
Brian Paul
02ddc08353 initial 7.0.4 relnotes 2008-04-09 19:00:53 -06:00
Hasso Tepper
4b24d5261a patches for DragonFly OS 2008-04-09 18:59:19 -06:00
Brian
4b96a39c48 added MD5 sums for 7.0.3 2008-04-04 19:24:32 -06:00
Brian
48616e71d2 final prep/changes for 7.0.3 release 2008-04-04 19:06:30 -06:00
Brian
70d227ac62 7.0.3 release candidate 3 2008-04-01 18:04:13 -06:00
Eric Anholt
7f2c4f96f5 Bug #13492: Only call ProgramStringNotify if program parsing succeeded.
Wine intentionally tries some out-of-spec programs to test strictness, and
calling ProgramStringNotify on the results of a failed program parse resulted
in crashes in the 965 driver.
(cherry picked from commit 185320ae13)
2008-04-01 16:27:48 -07:00
Roland Scheidegger
667f0f60fc fix mistakenly set ATIFragmentShader._Enabled bit (bug 15269) 2008-04-01 23:25:04 +02:00
Brian
7592b8cc10 added some missing calls to _mesa_enable_x_y_extensions() 2008-04-01 08:41:24 -06:00
Brian
f55b831859 fix ARB f/v program comment parsing bug 2008-03-31 15:00:18 -06:00
Markus Amsler
217f7f7e5d fix parsing bug involving comments at the end of ARB v/f programs 2008-03-31 15:00:18 -06:00
Julien Cristau
2e5a63f365 Prepare changelog for upload 2008-03-31 16:47:34 +02:00
Julien Cristau
7c614b4666 Fix libgl1-mesa-swx11-i686's dependencies
Change libgl1-mesa-swx11-i686's pre-dependency on libgl1-mesa-swx11 to a
regular versioned dependency, and add ${shlibs:Depends}.
I'm not sure why this used Pre-Depends in the first place, I don't think
that's needed.
2008-03-31 16:47:17 +02:00
Julien Cristau
b23d908829 Update 02_use-ieee-fp-on-s390-and-m68k.patch. 2008-03-31 13:17:24 +02:00
Julien Cristau
5379b84e63 Update changelog and add bug closer 2008-03-31 13:11:59 +02:00
Julien Cristau
32c913308e Merge branch 'mesa_7_0_branch' of git.freedesktop.org:/git/mesa/mesa into debian-unstable 2008-03-31 13:00:20 +02:00
Xiang, Haihao
1e83d70b6d i965: Apply -ve rhw to 965. Fix the regression introduced by
commit da476ff02d. (bug#14940)
2008-03-31 09:37:55 +08:00
Brian
767dfa5b9c fix texture/renderbuffer mix-up in test_attachment_completeness() 2008-03-28 13:25:25 -06:00
Alan Hourihane
7ff5b38126 Fix build problems 2008-03-27 16:36:12 +00:00
Brian
e209f5300d updated glext.h to version 40 2008-03-25 08:11:47 -06:00
Brian
3c4b50c352 updated to version 40 2008-03-25 08:11:36 -06:00
Brian
4e7c2fcf18 add GL_READ_FRAMEBUFFER_BINDING_EXT case, regenerate get.c file 2008-03-24 19:55:46 -06:00
Brian
22534f94f5 fix wrong values for GL_READ/DRAW_FRAMEBUFFER_BINDING_EXT tokens 2008-03-24 19:55:04 -06:00
Brian
1a6928fdbe use ctx->Driver.DeleteProgram() in a few more places 2008-03-22 10:27:08 -06:00
Brian
325dbbac47 delete default programs with ctx->Driver.DeleteProgram() 2008-03-22 09:11:35 -06:00
Brian
39ac6b0481 Fix some PBO breakage.
In _mesa_Bitmap, can't early return if bitmap ptr is NULL, it may be an offset
into a PBO.  Similarly for _mesa_GetTexImage.
2008-03-21 12:32:29 -06:00
Brian
46cc4854e9 fix IEEE_ONE definition for ICC compiler (bug 15134) 2008-03-19 17:25:18 -06:00
Alan Hourihane
f93882512e set outputs_safe to 0 as it's possible for the code generation
to slip over the allocated memory for the vb.

pull in sse fixes from gallium-0.1
2008-03-19 01:03:48 +00:00
Markus Amsler
0dee2a4f6f only set InputsRead bit if input is really used 2008-03-17 08:35:34 -06:00
Brian
3cebc35669 init tmpNode to zeros 2008-03-14 14:16:00 -06:00
Brian Paul
e75a204fb9 mesa: fix emit_clamp() so that we don't use an output register as temporary
IR_CLAMP is decomposed into OPCODE_MIN+OPCODE_MAX.  Allocate a temporary
register for the intermediate value so we don't inadvertantly use an output
register (which are write-only on some GPUs).
2008-03-14 13:57:53 -06:00
Roland Scheidegger
ac06a5c16a fix state.lightprod ambient/specular w value (bug #14983) 2008-03-13 12:43:53 +01:00
Dan Nicholson
ed758fee0c Merge branch '7.0-glx' into mesa_7_0_branch 2008-03-10 16:45:49 -07:00
Jeremy Huddleston
a21c61ee8b Darwin: Fixed small error in darwin config files 2008-03-10 16:02:55 -07:00
Dan Nicholson
24697da20e glapi: Resync generated files with 7.0 branch
The previous commits pulled in the generated files from master. This
regenerates the files from the source on the 7.0 branch.
2008-03-10 15:17:59 -07:00
Jeremy Huddleston
7120c0089d Darwin: Config/source fixes to now build glxdemo apps and OSMesa
Also added darwin-fat-32bit darwin-fat-all configs and deleted old darwin-x86ppc config
2008-03-10 15:13:44 -07:00
Dan Nicholson
88a436a8f7 glapi: Generate xserver glapi sources in the mesa tree
Instead of generating the glapi sources for the xserver and commiting
them to the xserver tree, we can keep them in the mesa tree and change
the xserver build to use the files from the mesa tree.

This makes the xserver glx build more robust as it reduces the chances
for mismatches of the glX API used in the xserver vs. in mesa.
(cherry picked from commit 7688791fc5)
2008-03-10 15:03:13 -07:00
Dan Nicholson
2fdb5a245d glapi: Correct prerequisites for gl_and_glX_API.xml
The indirect_dispatch.h and indirect_table.c source files use
gl_and_glX_API.xml in their generation rather than glX_API.xml, but it
wasn't listed in their prerequisites. In turn, gl_and_glX_API.xml uses
glX_API.xml, but this is already listed in $(COMMON_GLX).
(cherry picked from commit 929b6d2ebf)
2008-03-10 15:03:01 -07:00
Dan Nicholson
8441b53538 glapi: Use make automatic variables to clean up the commands
Make use of the make automatic variables $@ (the target) and $< (first
prerequisite) to clean up the commands for the glapi generation. This
improves readability and guards against typos since words are repeated
less frequently.
(cherry picked from commit fc67d47708)
2008-03-10 15:02:51 -07:00
Dan Nicholson
d336df8b73 glapi: Use variable for indent and flags
Put the path to indent and the flags to call it with in configs/default
rather than in the Makefile. This makes it easier to change the values
globally.
(cherry picked from commit 817af9bec2)
2008-03-10 15:02:36 -07:00
Brian
8aaf805b8a fix parsing of state.texenv.color (bug 14931) 2008-03-10 07:41:31 -06:00
Markus Amsler
8161fd2785 Set normalized flag for GLubyte arrays in _mesa_VertexAttribPointerNV() 2008-03-09 17:53:00 -06:00
Markus Amsler
2f23025dfe init vertex weight attrib to (1,0,0,0) 2008-03-09 17:51:21 -06:00
Brian
1867eac230 fix __builtin_expect() definition test for IBM XLC (sf bug 1909832) 2008-03-09 10:54:50 -06:00
Roland Scheidegger
096e35d05f state.depth.range alpha value should be 1, not 0 (bug #14733) 2008-03-01 02:57:01 +01:00
Xiang, Haihao
8998f52b97 Don't Swap buffer if a DRIDrawable is entirely obscured by another window. 2008-02-28 11:43:54 +01:00
Brian
0fd38dcc83 Replace glut_fbc.c with glut_fcb.c (cb=callback) 2008-02-25 10:57:54 -07:00
Julien Cristau
d89cf0649e Add bug closer for #408679. 2008-02-24 10:23:17 +01:00
Julien Cristau
31e9d9d4f8 Prepare changelog for upload. 2008-02-23 18:18:42 +01:00
Julien Cristau
ea9c6d3d9e 03_optional-progs-and-install.patch: partly applied upstream, fixed up 2008-02-23 16:08:53 +01:00
Brian
ff63cf8068 bump libGL.so version number 2008-02-22 07:59:39 -07:00
Julien Cristau
eaac94c35a Update changelog. 2008-02-22 12:16:27 +01:00
Julien Cristau
9291506af0 Merge branch 'mesa_7_0_branch' of git.freedesktop.org:/git/mesa/mesa into debian-unstable
Conflicts:

	src/glx/mini/Makefile
2008-02-22 12:09:35 +01:00
Brian
4716670de9 prep for 7.0.3 rc-2 2008-02-21 16:59:20 -07:00
Brian
33c5b38034 latest bug fixes 2008-02-20 09:39:59 -07:00
Brian
5737d6c565 Fix point rasterization regression caused by commit 95a2eb9767
Even-sized, non-AA points need 0.5 bias in position to hit the right pixels.
Test program from bug report 11016 retested and is OK.
2008-02-20 09:38:16 -07:00
Brian
08a7f56c6a raise GL_INVALID_OPERATION if glProgramString compilation fails
cherry picked from master.
2008-02-20 09:00:49 -07:00
Brian
7916f2b4aa Fix glBegin-time test for invalid programs/shaders.
Cherry picked from master.
2008-02-20 08:56:20 -07:00
Brian
193d303ac7 Added <size name="Get" mode="get"/> lines for point parameter tokens.
Cherry picked from master
2008-02-19 08:46:39 -07:00
Jeremy Huddleston
e70609b7b8 Apple: Pulled in changes from Apple's patchset to allow mesa to build on darwin again 2008-02-19 00:54:35 -08:00
Xiang, Haihao
da476ff02d i965: new integrated graphics chipset support 2008-02-19 15:59:50 +08:00
Brian
77e3b5d28b Fix potential glDrawPixels(GL_DEPTH_COMPONENT) crashes (bug 13915)
Also, general clean-up of the Xlib-optimized glDraw/CopyPixels code.
2008-02-16 09:56:26 -07:00
Brian
bf97ca448c Fix glBindTexture crash (bug 14514) 2008-02-15 13:42:19 -07:00
Roland Scheidegger
c5f8ff8b32 fix bug with generated fragment programs if vertex shader is active
When generating a fragment program from fixed function, checking
texUnit->_ReallyEnabled is not sufficient, need texUnit->Enabled too
since the former also represents texture enables from an active vertex
shader.
2008-02-15 17:26:58 +01:00
caner
50465766d1 miniglx doc updates 2008-02-14 09:34:08 -07:00
Xiang, Haihao
7d8df58a63 _mesa_swizzle_ubyt_image: Don't use single swizzle_copy call
if components don't match. fix #13508
2008-02-13 07:07:47 -07:00
Andy Skinner
762c074012 added -altopts to allow overriding all other opts 2008-02-07 13:19:55 -07:00
Brian
51f2ee3bfb fix bug 9871 2008-02-06 07:55:26 -07:00
Brian
b5cd34aa21 Fix bug 9871: enable user-defined clip planes for R300
Patch provided by Erkin Bahceci <erkinbah@gmail.com>
2008-02-06 07:54:24 -07:00
Tony DeFeo
ae5c6dcd42 [965] Fix memory leak when deleting buffers with backing store. 2008-02-05 10:49:44 -08:00
Roland Scheidegger
97196d0c8c regenerate glsl library functions 2008-01-31 01:36:23 +01:00
Roland Scheidegger
f6de56b88a fix w component of glsl vec4 asin 2008-01-31 01:35:52 +01:00
Brian
d64ea43b76 fix bugs 13507, 14293 2008-01-30 08:12:06 -07:00
Brian
2deaf93d24 check if fb->Delete is null (bugs 13507,14293) 2008-01-30 08:12:06 -07:00
Alex Deucher
a107ec8300 Add new RV380 pci id
bug 14289
(cherry picked from commit 80efe27560)
2008-01-29 10:15:32 -05:00
Alex Deucher
120a1f9508 Merge branch 'mesa_7_0_branch' of git+ssh://agd5f@git.freedesktop.org/git/mesa/mesa into mesa_7_0_branch 2008-01-29 09:50:26 -05:00
Alex Deucher
bb84007a57 R300: RV410 SE chips have half the pipes of regular RV410
This fixes 3D rendering on x700 SE chips.  Reported
by Kano.
(cherry picked from commit 0b7e0f8159)
2008-01-29 09:46:48 -05:00
Alan Hourihane
86234e55a6 pull some more fixes for pbo access from trunk 2008-01-28 11:23:53 +00:00
Alan Hourihane
61972077cd fix some pbo path problems 2008-01-28 11:15:53 +00:00
Xiang, Haihao
5a7feb8ea2 i965: valid message length includes message header. 2008-01-25 17:23:55 +08:00
Xiang, Haihao
4b4c131cd0 i965: re-define the type of reg.loopcount.
avoid some issues such that 1 + (-2) gets a big
positive value.
2008-01-25 17:23:15 +08:00
Julien Cristau
67617c8f89 Drop -O0 workaround on hppa.
Stop building with -O0 on hppa. Bug #451047 should be fixed in recent gcc
versions.
2008-01-24 22:52:48 +01:00
Brian
0fd23f01c6 Assorted patches for miniglx/linux-solo (Gavin Li <codeview@gmail.com>) 2008-01-23 16:04:02 -07:00
Adam Jackson
557b0d9df7 glxinfo: Fix multisample visual reporting.
strstr() == 0 tests for the string _not_ being present.  Originally
Red Hat bug #351871.
2008-01-22 14:04:39 -07:00
Brian
888f4380cf fix GLX vertex array bug 14197 2008-01-22 08:41:22 -07:00
Brian
3266c5e95a fix pc vs. gc->ps usage (bug 14197) 2008-01-22 08:38:48 -07:00
Brian
834decdaae Don't build yuvrect_client by default
Added 'extra' rule to build optional yuvrect_client, shape, xdemo programs
2008-01-22 07:56:31 -07:00
Brian
18b2d83173 remove unused var 2008-01-22 07:54:37 -07:00
Alexey Sokolov
30c65c3c62 define M_PI if needed 2008-01-22 07:42:40 -07:00
Brian
04fcc4cf1e prep for 7.0.3 release 2008-01-21 16:21:39 -07:00
Julien Cristau
09504dde1f Update changelog; add Vcs-* and Homepage fields in debian/control. 2008-01-17 22:26:48 +01:00
Julien Cristau
c04885f072 Merge branch 'mesa_7_0_branch' of git://anongit.freedesktop.org/git/mesa/mesa into debian-unstable
Conflicts:

	progs/tests/.gitignore
	progs/tests/Makefile
2008-01-14 22:30:03 +01:00
Michel Dänzer
48ae5cf09d i965: Fix byte vs. pixel unit mixup for aligned texture pitch.
I sincerely hope I don't manage to mess this up yet again...

Thanks again to Todd Merrill for pointing out the problem and testing the fix
on IRC.
2008-01-14 16:30:58 +01:00
Michel Dänzer
45cdb6eb45 i965: Fix unresolved symbol intel_miptree_pitch_align.
For some reason, I thought that function was shared with i915tex... The good
news is that i965 gets to keep the lower pitch alignment requirements.

Thanks to Todd Merrill for pointing out the problem on IRC.
2008-01-11 16:32:39 +01:00
Keith Packard
b9f3f732aa i915tex: Centralize mipmap pitch computations.
mipmap pitches must account for the device alignment requirements, which
used to be fairly simple; just align to a 4-byte boundary. However, to allow
textures to be drawn to under TTM, they now need to be aligned to a 64-byte
boundary. Placing all of the alignment constraints in a single function
allows this new constraint to be applied uniformly.

There was some pitch constraining code in intel_miptree_create, but that was
modifying the pitch long after the miptree had been layed out, so it only
served to wreck the mipmap and cause rendering errors.

(cherry picked from commit a183efc132 with manual
changes for mesa_7_0_branch by Michel Dänzer. One side effect of this is that
i965 also aligns the pitch of 2D textures to multiples of 64 bytes, hopefully
that won't cause any issues)
2008-01-08 16:48:13 +01:00
Brian
17006ddd6b fix 3d proxy texture depth bug 2008-01-05 15:44:51 -07:00
Brian
b77a354df3 fix depth/1 typo in glTexImage3D proxy code 2008-01-05 15:44:51 -07:00
Brian
71d46beebf additional stub functions 2008-01-02 07:23:41 -07:00
Brian
454e296eb1 additional GL_COLOR_ATTACHMENTx_EXT cases (bug 13767) 2008-01-02 07:20:08 -07:00
Brian
f9b696be2b fix vbo display list memleak upon context destruction 2008-01-01 10:23:56 -07:00
Brian
c923edbc71 additional GL_COLOR_ATTACHMENTx_EXT cases (bug 13767) 2008-01-01 10:10:18 -07:00
Brian
e20c1d987f fix GLSL uniform/attrib bugs (13753) 2008-01-01 09:59:51 -07:00
Bruce Merry
cd354eb10f Convert to 0/1 when setting boolean uniforms
Also add some extra tests to the shader_api regression tests
2008-01-01 09:59:51 -07:00
Bruce Merry
e9ac27ee23 Make use of count in _mesa_uniform_matrix 2008-01-01 09:59:50 -07:00
Bruce Merry
3f9dc9f5b6 Add a test program to test for assorted bugs in shader_api.c 2008-01-01 09:59:50 -07:00
Bruce Merry
ba709875ae More fixes to shader_api
- return GL_INVALID_OPERATION instead of GL_INVALID_VALUE if location is bad
- correct the type-checking of uniforms from my previous commit
- accept location of -1 in _mesa_uniform_matrix
2008-01-01 09:59:50 -07:00
Bruce Merry
80f8397b35 Fix several bugs relating to uniforms and attributes in GLSL API
- fix sizes for GL_FLOAT_MAT2x3 and GL_FLOAT_MAT4x3 in sizeof_glsl_type
- fix size returns in _mesa_get_active_attrib
- fix out-of-bounds array access to vec_types in _mesa_get_active_attrib
- fix queries of matrix uniforms in _mesa_get_uniformfv
- fix _mesa_get_uniformfv to only return one base, even from an array
- allow location == -1 in _mesa_uniform
- validate types in _mesa_uniform
- allow array overruns in _mesa_uniform
2008-01-01 09:59:50 -07:00
Brian
b45fa27fa1 added 'get' info for framebuffer object tokens 2008-01-01 09:26:30 -07:00
Brian
b59480645d add 'Get' info for MAX_3D_TEXTURE_SIZE (for bug 13811) 2008-01-01 09:04:13 -07:00
Brian
148cb36979 add missing double quote (bug 13878) 2008-01-01 07:59:58 -07:00
Roland Scheidegger
c1eb78f7ff fix GL_LINE_LOOP with drivers using own render pipeline stage (#12410, #13527)
primitive needs to include the begin/end flags (broken since vbo-0.2). Should
fix missing first/last line segment on gamma, i810, i915, mga, r200, radeon,
s3v, savage, unichrome (r300 already correct). Tested on r200, fixes #13527.
2007-12-22 18:49:42 +01:00
Brian
8aa0fd6b20 glGetActiveUniform fix 2007-12-20 09:08:12 -07:00
Brian
a1b3a908f5 return correct size from glGetActiveUniform (bug 13751) 2007-12-20 09:08:12 -07:00
Xiang, Haihao
f9e70d951a i965: allocate GRF registers before building subroutines,
it ensures there are sufficient registers for all subroutines.
2007-12-19 10:44:00 +08:00
Xiang, Haihao
41ed6be1da i965: restore the flag after building the subroutine of the
GS thread. fix #13240
2007-12-19 10:36:56 +08:00
Brian
27de28fc3e Remove -I$(TOP)/src/mesa/transform 2007-12-18 17:07:11 -07:00
Brian
dd2f01c229 simplify update two-side lighting test (follow-on to previous front/back-face changes) 2007-12-18 16:28:36 -07:00
Brian
deb5c56c77 fix NEED_SECONDARY_COLOR for vert/frag progs 2007-12-18 16:28:36 -07:00
Julien Cristau
9fd22f0e3f Prepare changelog for upload. 2007-12-18 19:13:27 +01:00
Julien Cristau
942372dcdf debian/control fixups
* Bump Standards-Version to 3.7.3.
* Move libgl1-mesa-swx11-dbg, mesa-common-dev and libosmesa6-dev to section
  libdevel.
* libgl1-mesa-swx11 conflicts with libgl1-mesa-glx.  Move it and
  libgl1-mesa-swx11-dev to priority extra.
* Fix typo in mesa-common-dev's long description.
2007-12-18 13:57:06 +01:00
Julien Cristau
b7f901088b Update changelog. 2007-12-18 13:32:01 +01:00
Julien Cristau
c02990525c Merge branch 'mesa_7_0_branch' of git.freedesktop.org:/git/mesa/mesa into debian-unstable
Conflicts:

	progs/trivial/quad-clip-nearplane.c
2007-12-18 12:28:29 +01:00
Michel Dänzer
0107acded0 i915tex: Fix issues with glDrawBuffer(GL_NONE).
Don't dereference NULL renderbuffer pointer, and make sure the software
fallback sticks.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=13694 .
2007-12-17 12:32:26 +01:00
Brian
2ac5e08d1d fix polygon cull regression 2007-12-14 14:36:23 -07:00
Dan Nicholson
1837b8c214 configs: Fix linking with static libGL and --as-needed
Linking of the programs breaks when using a static libGL and the GNU ld
option --as-needed. This is because libXext is needed for the XShm
functions.
(cherry picked from commit 6aaf9bdd41)
2007-12-07 11:51:18 -08:00
Brian
03d2bc1774 fix gl_FrontFacing 2007-12-04 14:07:15 -07:00
Brian
385bddbde0 fix span->facing computation and gl_FrontFacing initialization 2007-12-04 14:07:15 -07:00
Brian
c135426267 Fix gl_FrontFacing compilation problem 2007-12-04 14:07:15 -07:00
Michel Dänzer
4be0c98120 Use -Bsymbolic for linking all shared objects.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=10132 .

Also remove comment about SONAME, as SONAME only applies to shared libraries.
(cherry picked from commit fc7ddea853)
2007-12-04 18:33:07 +01:00
Brian
e760aebd5a fix two-side lighting bug/crash 2007-12-03 14:13:08 -07:00
Brian
1f6e7d9c29 fix DD_TRI_LIGHT_TWOSIDE bug (#13368) 2007-12-03 14:12:34 -07:00
Dan Nicholson
c6d421af05 Fix the library name in glw.pc
Fix a copy and paste error s/GLU/GLw/ in glw.pc.
(cherry picked from commit 2dc85e8078)
2007-12-03 12:08:03 -08:00
Brian
952df5e493 fix two-sided stencil 2007-12-03 12:00:21 -07:00
Brian
45acb8b058 added missing quote char 2007-12-03 12:00:21 -07:00
Michel Dänzer
e8997c0183 i915tex: Fix up state changes for i8xx.
(cherry picked from commit 2af613e0b8)
2007-12-03 09:38:13 +01:00
Brian
169e62f563 fix-build: remove ctx->_Facing assignment 2007-11-30 15:52:41 -07:00
Brian
1b43babfb1 fix broken two-sided stencil 2007-11-30 13:01:42 -07:00
Brian
43e902f774 better front-plane clip test 2007-11-30 09:09:12 -07:00
Xiang, Haihao
b0a800e249 i965: use uncompressed instruction to ensure only
Pixel Mask Copy is modified as the pixel shader thread
turns off pixels based on kill instructions.
2007-11-30 12:36:07 +08:00
Brian
73d5f232ad New ctx->Driver.Map/UnmapTexture() functions for accessing textures from t_vb_program.c 2007-11-29 08:18:11 -07:00
Brian
f7209541e4 cleanups, comments
Conflicts:

	src/mesa/tnl/t_vb_program.c
2007-11-29 08:18:11 -07:00
Brian
397a32dca7 Move _mesa_load_tracked_matrices() from TNL module to prog_statevars.c 2007-11-29 08:18:11 -07:00
Roland Scheidegger
e0719d7122 make sure state token values are fully initialized 2007-11-29 03:08:48 +01:00
Michel Dänzer
3f18c0a9f2 r200: Fix texture format regression on big endian systems.
See https://bugs.freedesktop.org/show_bug.cgi?id=13324 .

Also use tx_table_be for VALID_FORMAT, in case r200SetTexImages ever gets
called for MESA_FORMAT_RGB888.
(cherry picked from commit dc88a96631)
2007-11-28 10:25:01 +01:00
Delle
b14be61938 use DEFAULT_SOFTWARE_DEPTH_BITS 2007-11-27 18:18:48 -07:00
Brian
440d620308 minor additions to avoid FAQs 2007-11-27 10:32:39 -07:00
Brian
8dd9df0f3e document GLSL float f/F suffix bug 2007-11-27 10:32:39 -07:00
Brian
6b9534eaf5 set fp->UsesKill when emitting OPCODE_KIL 2007-11-27 10:32:39 -07:00
Brian
c91d374ad7 improve 24-bit Z to 32-bit Z conversion 2007-11-27 10:32:39 -07:00
Keith Whitwell
1cab4160bc i915tex: Fix some minor batchbuffer errors. 2007-11-26 17:12:15 +01:00
Keith Whitwell
718d2dfbbd i915tex: Catch cases where not all state is emitted for a new batchbuffer.
This could lead to incorrect rendering or even lockups.
2007-11-26 17:10:26 +01:00
Michel Dänzer
0967e1270d i915tex: Some additional blit fixes and assertions. 2007-11-26 16:59:41 +01:00
Michel Dänzer
a08c02f1a8 i915tex: Actually wait for previous commands to complete for glFinish(). 2007-11-26 16:59:00 +01:00
Brian
bdfd9afead Consolidate texture fetch code and use partial derivatives when possible. 2007-11-23 12:01:39 -07:00
Brian
1c91a590d6 fix a few GLSL bugs 2007-11-23 10:28:33 -07:00
Brian
65bd7968bf Fix parsing of gl_FrontLightModelProduct.sceneColor, don't segfault on variable
array indexes.
2007-11-23 10:26:02 -07:00
Brian
6ccd23b87b need to check border width in sample_linear_2d() - fixes failed assertion in texwrap.c test 2007-11-23 09:14:27 -07:00
Brian
823409b7d0 Bump version numbers to 7.0.3 for next release 2007-11-22 09:36:35 -07:00
Brian
c85d31f4a0 Recompute ctx->Point._Size if GL_POINT_SIZE_MIN/MAX changes.
Note that all the point size clamping stuff has been redone in Mesa/master.
2007-11-22 09:36:35 -07:00
Roland Scheidegger
24af5c44da fix z buffer read/write issue with rv100-like chips and old ddx 2007-11-22 02:55:25 +01:00
Brian
75efacf8eb Initial 7.0.3 relnotes 2007-11-20 08:16:25 -07:00
Brian
825e810247 bring over Fortran fixes from master 2007-11-20 08:15:19 -07:00
Brian
e20723cfc1 Obsolete 2007-11-20 08:13:14 -07:00
Brian
9f39a67c1d Rename glut_fbc.c -> glut_fcb.c (cb=callback) 2007-11-20 08:13:03 -07:00
Brian
2044f3f791 clamp lambda to Min/MaxLod 2007-11-19 13:05:10 -07:00
Brian
30d4e8c422 fix some texture format assertions, etc 2007-11-19 10:37:41 -07:00
Brian
92d552f6a2 fix out-of-bounds array index (ix=-1) 2007-11-19 09:54:41 -07:00
Brian
5adfcbbc4f added gl_dispatch_stub_772() 2007-11-16 10:03:57 -07:00
Roland Scheidegger
69969b3819 fix position invariant vertex programs for sw-tnl
do the same math as for fixed function pipe, including
user clip planes.
(mostly resurrected from the dead t_vb_arbprogram.c code)
2007-11-15 02:06:15 +01:00
Roland Scheidegger
edfee04fcb fix bogus assumption if ddx has set up surface reg for z buffer
this is wrong since even if ddx has not set up a surface reg to cover the z
buffer we should pretend it has on those rv100 chips since they presumably do
not do z buffer tiling if not using hyperz, so we can use linear addressing
just the same. Doesn't seem to fix #13080, but it's wrong anyway and the bug
almost certainly broke newer non-tcl chips.
2007-11-15 01:16:27 +01:00
Brice Goglin
ae0bf74db9 Prepare changelog for upload 2007-11-13 21:44:00 +01:00
Julien Cristau
1bf7ce97c0 * Add build-dep on libxext-dev. Thanks, Timo Aaltonen! 2007-11-13 21:40:49 +01:00
Julien Cristau
4971a009e0 * Workaround gcc ICE on hppa: build libOSMesa with -O0 (see bug#451047). 2007-11-13 20:59:08 +01:00
Julien Cristau
e1613ab80d Don't set -fno-strict-aliasing in configs/debian-default.
Upstream uses that since 7.0.2.
2007-11-13 20:57:58 +01:00
Brian
28c9930888 add pointer to Gallium3D info 2007-11-13 09:51:14 -07:00
Brian
e3a35a123e DRI memory manager info (fixes dangling link) 2007-11-13 09:50:42 -07:00
Brian
412168f2e8 remove dependency on libGLU 2007-11-12 08:21:21 -07:00
Brian
fc0fa0d636 add glw.pc.in to tarball list, remove from DEPEND_FILES 2007-11-12 07:52:20 -07:00
286 changed files with 22763 additions and 2033 deletions

View File

@@ -71,13 +71,19 @@ bluegene-osmesa \
bluegene-xlc-osmesa \
catamount-osmesa-pgi \
darwin \
darwin-fat-32bit \
darwin-fat-all \
darwin-static \
darwin-static-x86ppc \
darwin-x86ppc \
dragonfly \
dragonfly-dri \
dragonfly-dri-amd64 \
dragonfly-dri-x86 \
freebsd \
freebsd-dri \
freebsd-dri-amd64 \
freebsd-dri-x86 \
freebsd-static \
hpux10 \
hpux10-gcc \
hpux10-static \
@@ -166,10 +172,10 @@ ultrix-gcc:
# Rules for making release tarballs
DIRECTORY = Mesa-7.0.2
LIB_NAME = MesaLib-7.0.2
DEMO_NAME = MesaDemos-7.0.2
GLUT_NAME = MesaGLUT-7.0.2
DIRECTORY = Mesa-7.0.4
LIB_NAME = MesaLib-7.0.4
DEMO_NAME = MesaDemos-7.0.4
GLUT_NAME = MesaGLUT-7.0.4
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
@@ -355,6 +361,7 @@ GLW_FILES = \
$(DIRECTORY)/src/glw/*.[ch] \
$(DIRECTORY)/src/glw/Makefile* \
$(DIRECTORY)/src/glw/README \
$(DIRECTORY)/src/glw/glw.pc.in \
$(DIRECTORY)/src/glw/depend
DEMO_FILES = \
@@ -414,6 +421,7 @@ GLUT_FILES = \
$(DIRECTORY)/src/glut/fbdev/Makefile \
$(DIRECTORY)/src/glut/fbdev/*[ch] \
$(DIRECTORY)/src/glut/mini/*[ch] \
$(DIRECTORY)/src/glut/mini/glut.pc.in \
$(DIRECTORY)/src/glut/directfb/Makefile \
$(DIRECTORY)/src/glut/directfb/NOTES \
$(DIRECTORY)/src/glut/directfb/*[ch] \
@@ -424,7 +432,6 @@ DEPEND_FILES = \
$(TOP)/src/mesa/depend \
$(TOP)/src/glx/x11/depend \
$(TOP)/src/glw/depend \
$(TOP)/src/glw/glw.pc.in \
$(TOP)/src/glut/glx/depend \
$(TOP)/src/glu/sgi/depend

109
bin/mklib
View File

@@ -71,6 +71,7 @@ do
echo ' -install DIR put resulting library file(s) in DIR'
echo ' -arch ARCH override using `uname` to determine host system'
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
echo ' -altopts OPTS alternate options to override all others'
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
echo ' -exports FILE only export the symbols listed in FILE'
echo ' -h, --help display this information and exit'
@@ -110,8 +111,14 @@ do
# this is a special case (see bugzilla 10876)
DEPS="$DEPS $1"
;;
-Wl*)
# Another special case for DragonFly
DEPS="$DEPS $1"
;;
-Wl*)
DEPS="$DEPS $1"
;;
'-pthread')
# for FreeBSD
DEPS="$DEPS -pthread"
;;
'-cplusplus')
@@ -135,6 +142,10 @@ do
shift 1;
ARCHOPT=$1
;;
'-altopts')
shift 1;
ALTOPTS=$1
;;
'-noprefix')
NOPREFIX=1
;;
@@ -194,7 +205,7 @@ fi
#
case $ARCH in
'Linux' | 'OpenBSD' | 'GNU' | GNU/*)
'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/*)
# we assume gcc
if [ "x$LINK" = "x" ] ; then
@@ -209,8 +220,13 @@ case $ARCH in
if [ $NOPREFIX = 1 ] ; then
# No "lib" or ".so" part
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}
#OPTS="-shared -Wl,-soname,${LIBNAME}" # soname???
OPTS="-shared"
case $ARCH in 'Linux' | 'GNU' | GNU/*)
OPTS="-Xlinker -Bsymbolic -shared"
;;
*)
OPTS="-shared"
;;
esac
# Check if objects are 32-bit and we're running in 64-bit
# environment. If so, pass -m32 flag to linker.
@@ -220,6 +236,10 @@ case $ARCH in
OPTS="-m32 ${OPTS}"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
# make lib
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
@@ -230,6 +250,9 @@ case $ARCH in
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}
LINK="ar"
OPTS="-ru"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
# make lib
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
@@ -265,6 +288,9 @@ case $ARCH in
if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
OPTS="-m32 ${OPTS}"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
if [ x${PATCH} = "x" ] ; then
VERSION="${MAJOR}.${MINOR}"
@@ -347,7 +373,9 @@ case $ARCH in
if [ "${SPARCV9}" ] ; then
OPTS="${OPTS} -xarch=v9"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# for debug:
#echo "mklib: linker is" ${LINK} ${OPTS}
if [ $NOPREFIX = 1 ] ; then
@@ -378,6 +406,9 @@ case $ARCH in
# No "lib" or ".so" part
echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
OPTS="-shared"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
@@ -391,6 +422,9 @@ case $ARCH in
else
SHLIB="lib${LIBNAME}.so.${MAJOR}"
OPTS="-shared -Wl,-soname,${SHLIB}"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
echo "mklib: Making FreeBSD shared library: " ${SHLIB}
rm -f ${SHLIB}
${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
@@ -444,6 +478,10 @@ case $ARCH in
exit 1
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
if [ $CPLUSPLUS = 1 ] ; then
LINK="CC"
else
@@ -524,6 +562,10 @@ case $ARCH in
}
}' | sort -u >> ${EXPFILE}
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# On AIX a shared library is linked differently when
# you want to dlopen the file
if [ $DLOPEN = "1" ] ; then
@@ -575,6 +617,9 @@ case $ARCH in
echo "mklib: Making Darwin static library: " ${LIBNAME}
LINK="ar"
OPTS="-ruvs"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
FINAL_LIBS=${LIBNAME}
else
@@ -586,19 +631,37 @@ case $ARCH in
LIBSUFFIX="dylib"
OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
fi
LINKNAME="lib${LIBNAME}.${LIBSUFFIX}"
LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
if [ ${EXPORTS} ] ; then
OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
fi
LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
LIBNAME="lib${LIBNAME}.${MAJOR}.${MINOR}.${LIBSUFFIX}"
# examine first object to determine ABI
set ${OBJECTS}
ABI_PPC=`file $1 | grep 'object ppc'`
ABI_I386=`file $1 | grep 'object i386'`
if [ "${ABI_PPC}" ] ; then
OPTS="${OPTS} -arch ppc"
fi
if [ "${ABI_I386}" ] ; then
OPTS="${OPTS} -arch i386"
fi
ABI_PPC=`file $1 | grep ' ppc'`
ABI_I386=`file $1 | grep ' i386'`
ABI_PPC64=`file $1 | grep ' ppc64'`
ABI_X86_64=`file $1 | grep ' x86_64'`
if [ "${ABI_PPC}" ] ; then
OPTS="${OPTS} -arch ppc"
fi
if [ "${ABI_I386}" ] ; then
OPTS="${OPTS} -arch i386"
fi
if [ "${ABI_PPC64}" ] ; then
OPTS="${OPTS} -arch ppc64"
fi
if [ "${ABI_X86_64}" ] ; then
OPTS="${OPTS} -arch x86_64"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk
# to OPTS here?
@@ -611,9 +674,11 @@ case $ARCH in
fi
echo "mklib: Making Darwin shared library: " ${LIBNAME}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME} ${LINKNAME}
FINAL_LIBS="${LIBNAME} ${LINKNAME}"
ln -s ${LIBNAME} ${LINKNAME2}
FINAL_LIBS="${LIBNAME} ${LINKNAME} ${LINKNAME2}"
fi
;;
@@ -665,6 +730,9 @@ case $ARCH in
echo "mklib: Making Intel ICC static library: " ${LIBNAME}.a
LINK="ar"
OPTS="-ruv"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# make lib
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
# finish up
@@ -675,6 +743,9 @@ case $ARCH in
else
OPTS="-shared"
fi
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
VERSION="${MAJOR}.${MINOR}.${PATCH}"
echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION}
@@ -739,6 +810,9 @@ case $ARCH in
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
LINK="ar"
OPTS="-ru"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# make lib
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
ranlib ${LIBNAME}.a
@@ -746,6 +820,9 @@ case $ARCH in
FINAL_LIBS=${LIBNAME}.a
else
OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll
if [ $CPLUSPLUS = 1 ] ; then

View File

@@ -4,11 +4,18 @@ include $(TOP)/configs/default
CONFIG_NAME = darwin
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
-D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
# Compiler and flags
CC = cc
CXX = cc
CFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
CXXFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
CC = gcc
CXX = gcc
CFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
CXXFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
CFLAGS += $(RC_CFLAGS)
CXXFLAGS += $(RC_CFLAGS)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
@@ -21,13 +28,13 @@ GLUT_LIB_NAME = libglut.dylib
GLW_LIB_NAME = libGLw.dylib
OSMESA_LIB_NAME = libOSMesa.dylib
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
GL_LIB_DEPS = -L/usr/X11/lib -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11/lib -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
SRC_DIRS = mesa glu glut/glx
SRC_DIRS = glx/x11 glu glut/glx mesa
DRIVER_DIRS = osmesa

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

View File

@@ -1,37 +0,0 @@
# Configuration for Darwin / MacOS X, making dynamic libs
include $(TOP)/configs/default
CONFIG_NAME = darwin
# Compiler and flags
CC = cc
CXX = cc
CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
-I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
MKLIB_OPTIONS = -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
# 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.dylib
GLU_LIB_NAME = libGLU.dylib
GLUT_LIB_NAME = libglut.dylib
GLW_LIB_NAME = libGLw.dylib
OSMESA_LIB_NAME = libOSMesa.dylib
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
SRC_DIRS = mesa glu glut/glx

View File

@@ -3,7 +3,6 @@
CONFIG_NAME = debian-default
OPT_FLAGS = -O2 -g
CFLAGS += -fno-strict-aliasing
# override settings in configs/linux-x86-64
LIB_DIR = lib

View File

@@ -10,7 +10,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
MESA_MINOR=0
MESA_TINY=2
MESA_TINY=4
# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
@@ -30,9 +30,11 @@ MKDEP_OPTIONS = -fdepend
MAKE = make
INSTALL = $(TOP)/bin/minstall
# Python and flags (generally only needed by the developers)
# 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

38
configs/dragonfly Normal file
View File

@@ -0,0 +1,38 @@
# Configuration for DragonFly
include $(TOP)/configs/default
CONFIG_NAME = DragonFly
# 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/pkg/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/pkg/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
# Installation directories (for make install)
INSTALL_DIR = /usr/pkg
DRI_DRIVER_INSTALL_DIR = /usr/pkg/lib/modules/dri/

56
configs/dragonfly-dri Normal file
View File

@@ -0,0 +1,56 @@
# -*-makefile-*-
# Configuration for dragonfly-dri: DragonFly DRI hardware drivers
include $(TOP)/configs/dragonfly
CONFIG_NAME = dragonfly-dri
# Compiler and flags
CC = gcc
CXX = g++
WARN_FLAGS = -Wall
OPT_FLAGS = -O -g
EXPAT_INCLUDES = -I/usr/pkg/include
X11_INCLUDES = -I/usr/pkg/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 =
# Library/program dependencies
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
LIBDRM_LIB = `pkg-config --libs libdrm`
DRI_LIB_DEPS = -L/usr/pkg/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
GL_LIB_DEPS = -L/usr/pkg/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread $(LIBDRM_LIB)
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/pkg/lib -lGLU -lGL -lX11 -lXmu \
-lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/pkg/lib -lGL -lXt -lX11
# Directories
SRC_DIRS = glx/x11 mesa glu glut/glx glw
DRIVER_DIRS = dri
PROGRAM_DIRS =
WINDOW_SYSTEM = dri
DRM_SOURCE_PATH = $(TOP)/../drm
# ffb and gamma are missing because they have not been converted to use the new
# interface.
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
unichrome savage sis

View File

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

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

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

27
configs/freebsd-static Normal file
View File

@@ -0,0 +1,27 @@
# Configuration for generic FreeBSD, making static libs
# Written by cy on 2008-04-23.
include $(TOP)/configs/freebsd
CONFIG_NAME = freebsd-static
MKLIB_OPTIONS = -static
PIC_FLAGS =
# 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 =
# Need to specify all libraries we may need
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread \
-lstdc++ -lm

View File

@@ -9,8 +9,17 @@ CONFIG_NAME = linux-osmesa
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
PIC_FLAGS = -fPIC
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
-D_BSD_SOURCE -D_GNU_SOURCE \
-DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
CFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
$(ASM_FLAGS) -ffast-math
CXXFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
@@ -26,3 +35,4 @@ PROGRAM_DIRS = osdemos
OSMESA_LIB_DEPS = -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU

View File

@@ -8,7 +8,8 @@ CONFIG_NAME = linux-osmesa-static
# Compiler and flags
MKLIB_OPTIONS = -static
PIC_FLAGS =
# Library names
OSMESA_LIB_NAME = libOSMesa.a
OSMESA_LIB_NAME = lib$(OSMESA_LIB).a

View File

@@ -1,31 +1,19 @@
# Configuration for 16 bits/channel OSMesa library on Linux
include $(TOP)/configs/default
include $(TOP)/configs/linux-osmesa
CONFIG_NAME = linux-osmesa16
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
DEFINES += -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=32
# Library names
OSMESA_LIB = OSMesa16
OSMESA_LIB_NAME = libOSMesa16.so
# Directories
SRC_DIRS = mesa glu
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
# Dependencies
OSMESA_LIB_DEPS = -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa16
APP_LIB_DEPS = -l$(OSMESA_LIB)

View File

@@ -1,14 +1,10 @@
# Configuration for 16 bits/channel OSMesa library on Linux
include $(TOP)/configs/default
include $(TOP)/configs/linux-osmesa16
CONFIG_NAME = linux-osmesa16-static
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
MKLIB_OPTIONS = -static
PIC_FLAGS =
@@ -17,16 +13,5 @@ CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
# Library names
OSMESA_LIB = OSMesa16
OSMESA_LIB_NAME = libOSMesa16.a
OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
# Directories
SRC_DIRS = mesa glu
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
# Dependencies
OSMESA_LIB_DEPS = -lm -lpthread
APP_LIB_DEPS = -lOSMesa16

View File

@@ -1,31 +1,22 @@
# Configuration for 32 bits/channel OSMesa library on Linux
include $(TOP)/configs/default
include $(TOP)/configs/linux-osmesa
CONFIG_NAME = linux-osmesa32
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
DEFINES += -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
# Library names
OSMESA_LIB = OSMesa32
OSMESA_LIB_NAME = libOSMesa32.so
# Directories
SRC_DIRS = mesa glu
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
# Dependencies
OSMESA_LIB_DEPS = -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa32
APP_LIB_DEPS = -l$(OSMESA_LIB)

View File

@@ -1,28 +1,13 @@
# Configuration for 32 bits/channel OSMesa library on Linux
include $(TOP)/configs/default
include $(TOP)/configs/linux-osmesa32
CONFIG_NAME = linux-osmesa32-static
# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
MKLIB_OPTIONS = -static
PIC_FLAGS =
# Library names
OSMESA_LIB = OSMesa32
OSMESA_LIB_NAME = libOSMesa32.a
OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
# Directories
SRC_DIRS = mesa glu
DRIVER_DIRS = osmesa
PROGRAM_DIRS =
# Dependencies
OSMESA_LIB_DEPS = -lm -lpthread
APP_LIB_DEPS = -lOSMesa32

View File

@@ -22,4 +22,5 @@ GLUT_LIB_DEPS =
GLW_LIB_DEPS =
# Need to specify all libraries we may need
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread \
-lstdc++ -lm

View File

@@ -20,4 +20,5 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread \
-lstdc++ -lm

View File

@@ -20,4 +20,5 @@ OSMESA_LIB_DEPS =
GLU_LIB_DEPS =
GLUT_LIB_DEPS =
GLW_LIB_DEPS =
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread \
-lstdc++ -lm

89
debian/changelog vendored
View File

@@ -1,3 +1,92 @@
mesa (7.0.3-4) unstable; urgency=low
* Pull from mesa_7_0_branch (2ac4919d).
* Put back our configs/ changes into the .diff.gz since choose-configs
needs them before quilt is invoked. Put 04_cleanup-osmesa-configs.patch
there as well for #485161.
-- Brice Goglin <bgoglin@debian.org> Wed, 18 Jun 2008 20:59:14 +0200
mesa (7.0.3-3) unstable; urgency=low
* Pull from mesa_7_0_branch (718724de).
+ Fix intel_batchbuffer_space on i965, closes: #455817.
+ Fix busy error in i915_wait_irq for real now, closes: #467319.
* Move our configs/ changes from the .diff.gz into our quilt patches,
with 04_cleanup-osmesa-configs.patch renamed into 04_debian-configs.patch,
closes: #485161.
-- Brice Goglin <bgoglin@debian.org> Tue, 17 Jun 2008 20:00:51 +0200
mesa (7.0.3-2) unstable; urgency=low
* Pull from mesa_7_0_branch (03447de3).
* Set right cliprects for the current draw region on Intel, closes: #467319.
* Use BRW_TEXCOORDMODE_CLAMP instead of BRW_TEXCOORDMODE_CLAMP_BORDER
to implement GL_CLAMP on i965, closes: #478880.
* Fix segment fault with BASE_LEVEL set to 5 for MipMap on i915,
closes: #451339.
* Disable low impact fallback on r300 by default, closes: #440868.
-- Brice Goglin <bgoglin@debian.org> Fri, 13 Jun 2008 06:53:29 +0200
mesa (7.0.3-1) unstable; urgency=low
* New upstream release.
* Only call ProgramStringNotify if program parsing succeeded,
closes: #473551.
-- Brice Goglin <bgoglin@debian.org> Fri, 11 Apr 2008 08:42:37 +0200
mesa (7.0.3~rc2-2) unstable; urgency=low
* Pull from mesa_7_0_branch (1e83d70b).
* Fixes regression in the i965 dri driver (closes: #470984, #470084)
* Update 02_use-ieee-fp-on-s390-and-m68k.patch.
* Change libgl1-mesa-swx11-i686's pre-dependency on libgl1-mesa-swx11 to a
regular versioned dependency, and add ${shlibs:Depends}.
-- Julien Cristau <jcristau@debian.org> Mon, 31 Mar 2008 16:47:31 +0200
mesa (7.0.3~rc2-1) unstable; urgency=low
* New upstream release candidate.
+ enable user-defined clip planes for R300 (closes: #408679)
+ 03_optional-progs-and-install.patch: partly applied upstream, fixed up
* Stop building with -O0 on hppa. Bug #451047 should be fixed in recent gcc
versions.
-- Julien Cristau <jcristau@debian.org> Sun, 24 Feb 2008 10:22:54 +0100
mesa (7.0.2-4) unstable; urgency=low
* Update to mesa_7_0_branch head (commit 48ae5cf0).
* Add Vcs-Git, Vcs-Browser and Homepage fields in debian/control.
-- Julien Cristau <jcristau@debian.org> Thu, 17 Jan 2008 22:23:06 +0100
mesa (7.0.2-3) unstable; urgency=low
* Update to mesa_7_0_branch head (commit 0107acde).
* Bump Standards-Version to 3.7.3.
* Move libgl1-mesa-swx11-dbg, mesa-common-dev and libosmesa6-dev to section
libdevel.
* libgl1-mesa-swx11 conflicts with libgl1-mesa-glx. Move it and
libgl1-mesa-swx11-dev to priority extra.
* Fix typo in mesa-common-dev's long description.
-- Julien Cristau <jcristau@debian.org> Tue, 18 Dec 2007 19:13:18 +0100
mesa (7.0.2-2) unstable; urgency=low
[ Julien Cristau ]
* Don't set -fno-strict-aliasing in configs/debian-default. It is set
upstream now.
* Workaround gcc ICE on hppa: build libOSMesa with -O0 (see bug#451047).
* Add build-dep on libxext-dev. Thanks, Timo Aaltonen!
-- Brice Goglin <bgoglin@debian.org> Tue, 13 Nov 2007 21:43:40 +0100
mesa (7.0.2-1) unstable; urgency=low
* New upstream release.

21
debian/control vendored
View File

@@ -3,11 +3,15 @@ Section: graphics
Priority: optional
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Uploaders: Thierry Reding <thierry@gilfi.de>, Julien Cristau <jcristau@debian.org>, David Nusinow <dnusinow@debian.org>, Brice Goglin <bgoglin@debian.org>
Standards-Version: 3.7.2
Build-Depends: debhelper (>= 5), quilt (>= 0.40), pkg-config, libdrm-dev (>= 2.2.0) [!hurd-i386], libx11-dev, xutils-dev, x11proto-gl-dev (>= 1.4.8), libxxf86vm-dev, libexpat1-dev, lesstif2-dev, dpkg-dev (>= 1.13.19), libxfixes-dev, libxdamage-dev
Standards-Version: 3.7.3
Build-Depends: debhelper (>= 5), quilt (>= 0.40), pkg-config, libdrm-dev (>= 2.2.0) [!hurd-i386], libx11-dev, xutils-dev, x11proto-gl-dev (>= 1.4.8), libxxf86vm-dev, libexpat1-dev, lesstif2-dev, dpkg-dev (>= 1.13.19), libxfixes-dev, libxdamage-dev, libxext-dev
Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/mesa
Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/mesa.git
Homepage: http://mesa3d.sourceforge.net/
Package: libgl1-mesa-swx11
Section: libs
Priority: extra
Architecture: any
Depends: ${shlibs:Depends}, libosmesa6 (>= 6.5.2-1)
Conflicts: mesag3-glide, mesag3-glide2, mesag3+ggi, libgl1, nvidia-glx, mesag3, libgl1-mesa-swrast
@@ -28,7 +32,7 @@ Description: A free implementation of the OpenGL API -- runtime
On Linux, this library is also known as libGL or libGL.so.1.
Package: libgl1-mesa-swx11-dbg
Section: libs
Section: libdevel
Priority: extra
Architecture: any
Depends: libgl1-mesa-swx11 (= ${binary:Version})
@@ -56,7 +60,7 @@ Package: libgl1-mesa-swx11-i686
Section: libs
Priority: extra
Architecture: i386
Pre-Depends: libgl1-mesa-swx11
Depends: libgl1-mesa-swx11 (= ${binary:Version}), ${shlibs:Depends}
Description: Mesa OpenGL runtime [i686 optimized]
Mesa is a 3-D graphics library with an API which is very similar to
that of OpenGL. To the extent that Mesa utilizes the OpenGL command
@@ -78,6 +82,7 @@ Description: Mesa OpenGL runtime [i686 optimized]
Package: libgl1-mesa-swx11-dev
Section: libdevel
Priority: extra
Architecture: any
Depends: libgl1-mesa-swx11 (= ${binary:Version}), libc6-dev, libx11-dev, libxext6, mesa-common-dev (= ${source:Version})
Provides: libgl-dev, mesag-dev, libgl1-mesa-swrast-dev
@@ -229,14 +234,14 @@ Description: A free implementation of the OpenGL API -- GLX development files
package.
Package: mesa-common-dev
Section: devel
Section: libdevel
Architecture: all
Replaces: xlibmesa-gl-dev (<< 1:7), xlibosmesa-dev, libgl1-mesa-swx11-dev (<< 6.5.2), libgl1-mesa-dev (<< 6.5.2)
Depends: libx11-dev
Description: Developer documentation for Mesa
This package includes the specifications for the Mesa-specific OpenGL
extensions, the complete set of release release notes and the
development header files common to all Mesa packages.
extensions, the complete set of release notes and the development header
files common to all Mesa packages.
Package: libosmesa6
Section: libs
@@ -252,7 +257,7 @@ Description: Mesa Off-screen rendering extension
renderer which do not require external libraries to work.
Package: libosmesa6-dev
Section: devel
Section: libdevel
Architecture: any
Depends: libosmesa6 (= ${binary:Version}), mesa-common-dev (= ${source:Version}) | libgl-dev
Conflicts: xlibosmesa-dev, libosmesa4-dev, libosmesa-dev

View File

@@ -12,7 +12,7 @@ Index: mesa/src/mesa/main/imports.h
#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
- defined(__s390x__) || defined(__powerpc__) || \
+ defined(__s390__) || defined(__s390x__) || defined(__powerpc__) || \
defined(__amd64__) || \
defined(__amd64__) || defined(__x86_64__) || \
+ defined(__m68k__) || \
defined(ia64) || defined(__ia64__) || \
defined(__hppa__) || defined(hpux) || \

View File

@@ -10,39 +10,31 @@ Also remove references to GLU library since it is not required
and we don't actually build it at this point.
Index: mesa/progs/xdemos/Makefile
===================================================================
--- mesa.orig/progs/xdemos/Makefile 2007-11-11 00:34:12.000000000 +0100
+++ mesa/progs/xdemos/Makefile 2007-11-11 02:07:52.000000000 +0100
@@ -6,11 +6,11 @@
--- mesa.orig/progs/xdemos/Makefile
+++ mesa/progs/xdemos/Makefile
@@ -10,7 +10,7 @@
INCDIR = $(TOP)/include
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
-LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
-PROGS = glthreads \
+PROGS ?= glthreads \
-PROGS = \
+PROGS ?= \
glthreads \
glxdemo \
glxgears \
glxgears_fbconfig \
@@ -46,6 +46,9 @@
@@ -55,6 +55,11 @@
extra: $(EXTRA_PROGS)
default: $(PROGS)
+install: $(PROGS)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/bin
+ $(INSTALL) -m 755 $(PROGS) $(DESTDIR)$(INSTALL_DIR)/bin
+
+
clean:
-rm -f $(PROGS)
Index: mesa/progs/Makefile
===================================================================
--- mesa.orig/progs/Makefile 2007-11-11 00:34:12.000000000 +0100
+++ mesa/progs/Makefile 2007-11-11 02:06:48.000000000 +0100
-rm -f $(PROGS) $(EXTRA_PROGS)
-rm -f *.o *~
--- mesa.orig/progs/Makefile
+++ mesa/progs/Makefile
@@ -21,8 +21,12 @@
fi \
done

View File

@@ -1,197 +0,0 @@
Index: mesa/configs/linux-osmesa
===================================================================
--- mesa.orig/configs/linux-osmesa 2007-11-11 00:24:07.000000000 +0100
+++ mesa/configs/linux-osmesa 2007-11-11 00:33:20.000000000 +0100
@@ -9,8 +9,17 @@
# Compiler and flags
CC = gcc
CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+
+PIC_FLAGS = -fPIC
+
+DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
+ -D_BSD_SOURCE -D_GNU_SOURCE \
+ -DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
+
+CFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
+ $(ASM_FLAGS) -ffast-math
+
+CXXFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
@@ -26,3 +35,4 @@
OSMESA_LIB_DEPS = -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU
+
Index: mesa/configs/linux-osmesa-static
===================================================================
--- mesa.orig/configs/linux-osmesa-static 2007-11-11 00:24:01.000000000 +0100
+++ mesa/configs/linux-osmesa-static 2007-11-11 00:33:20.000000000 +0100
@@ -8,7 +8,8 @@
# Compiler and flags
MKLIB_OPTIONS = -static
+PIC_FLAGS =
# Library names
-OSMESA_LIB_NAME = libOSMesa.a
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
Index: mesa/configs/linux-osmesa16
===================================================================
--- mesa.orig/configs/linux-osmesa16 2007-11-11 00:24:07.000000000 +0100
+++ mesa/configs/linux-osmesa16 2007-11-11 00:33:41.000000000 +0100
@@ -1,31 +1,19 @@
# Configuration for 16 bits/channel OSMesa library on Linux
-include $(TOP)/configs/default
+include $(TOP)/configs/linux-osmesa
CONFIG_NAME = linux-osmesa16
-# Compiler and flags
-CC = gcc
-CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
-
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-
+DEFINES += -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=32
# Library names
OSMESA_LIB = OSMesa16
-OSMESA_LIB_NAME = libOSMesa16.so
-
# Directories
-SRC_DIRS = mesa glu
-DRIVER_DIRS = osmesa
PROGRAM_DIRS =
-
# Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
-GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
-APP_LIB_DEPS = -lOSMesa16
+APP_LIB_DEPS = -l$(OSMESA_LIB)
+
Index: mesa/configs/linux-osmesa16-static
===================================================================
--- mesa.orig/configs/linux-osmesa16-static 2007-11-11 00:24:07.000000000 +0100
+++ mesa/configs/linux-osmesa16-static 2007-11-11 00:33:20.000000000 +0100
@@ -1,14 +1,10 @@
# Configuration for 16 bits/channel OSMesa library on Linux
-include $(TOP)/configs/default
+include $(TOP)/configs/linux-osmesa16
CONFIG_NAME = linux-osmesa16-static
# Compiler and flags
-CC = gcc
-CXX = g++
-CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
MKLIB_OPTIONS = -static
PIC_FLAGS =
@@ -17,16 +13,5 @@
CXXFLAGS += -fno-strict-aliasing
# Library names
-OSMESA_LIB = OSMesa16
-OSMESA_LIB_NAME = libOSMesa16.a
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
-
-# Directories
-SRC_DIRS = mesa glu
-DRIVER_DIRS = osmesa
-PROGRAM_DIRS =
-
-
-# Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
-APP_LIB_DEPS = -lOSMesa16
Index: mesa/configs/linux-osmesa32
===================================================================
--- mesa.orig/configs/linux-osmesa32 2007-11-11 00:24:07.000000000 +0100
+++ mesa/configs/linux-osmesa32 2007-11-11 00:33:51.000000000 +0100
@@ -1,31 +1,22 @@
# Configuration for 32 bits/channel OSMesa library on Linux
-include $(TOP)/configs/default
+include $(TOP)/configs/linux-osmesa
CONFIG_NAME = linux-osmesa32
# Compiler and flags
-CC = gcc
-CXX = g++
-CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
+DEFINES += -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
# Library names
OSMESA_LIB = OSMesa32
-OSMESA_LIB_NAME = libOSMesa32.so
-
# Directories
-SRC_DIRS = mesa glu
-DRIVER_DIRS = osmesa
PROGRAM_DIRS =
-
# Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
-GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
-APP_LIB_DEPS = -lOSMesa32
+APP_LIB_DEPS = -l$(OSMESA_LIB)
+
Index: mesa/configs/linux-osmesa32-static
===================================================================
--- mesa.orig/configs/linux-osmesa32-static 2007-11-11 00:24:01.000000000 +0100
+++ mesa/configs/linux-osmesa32-static 2007-11-11 00:33:20.000000000 +0100
@@ -1,28 +1,13 @@
# Configuration for 32 bits/channel OSMesa library on Linux
-include $(TOP)/configs/default
+include $(TOP)/configs/linux-osmesa32
CONFIG_NAME = linux-osmesa32-static
# Compiler and flags
-CC = gcc
-CXX = g++
-CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
-CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
MKLIB_OPTIONS = -static
-
+PIC_FLAGS =
# Library names
-OSMESA_LIB = OSMesa32
-OSMESA_LIB_NAME = libOSMesa32.a
-
-
-# Directories
-SRC_DIRS = mesa glu
-DRIVER_DIRS = osmesa
-PROGRAM_DIRS =
-
+OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
-# Dependencies
-OSMESA_LIB_DEPS = -lm -lpthread
-APP_LIB_DEPS = -lOSMesa32

View File

@@ -2,4 +2,3 @@
01_fix-makefile.patch
02_use-ieee-fp-on-s390-and-m68k.patch
03_optional-progs-and-install.patch
04_cleanup-osmesa-configs.patch

View File

@@ -342,7 +342,7 @@ will fix the problem.
<h2>4.1 How can I contribute?</a></h2>
<p>
First, join the <a href="http://www.mesa3d.org/lists.html>Mesa3d-dev
First, join the <a href="http://www.mesa3d.org/lists.html">Mesa3d-dev
mailing list</a>.
That's where Mesa development is discussed.
</a></p>

View File

@@ -1,15 +1,15 @@
<html>
<html><head><title>Mesa fbdev/DRI Environment</title>
<TITLE>Mesa fbdev/DRI Environment</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body>
<center><H1>Mesa fbdev/DRI Drivers</H1></center>
<center><h1>Mesa fbdev/DRI Drivers</h1></center>
<br>
<H1>1. Introduction</H1>
<h1>1. Introduction</h1>
<p>
The fbdev/DRI environment supports hardware-accelerated 3D rendering without
@@ -22,54 +22,131 @@ Contributors to this project include Jon Smirl, Keith Whitwell and Dave Airlie.
<p>
Applications in the fbdev/DRI environment use
the <a href="MiniGXL.html"> MiniGLX</a> interface to choose pixel
the <a href="http://www.nabble.com/file/p15480666/MiniGXL.html"> MiniGLX</a> interface to choose pixel
formats, create rendering contexts, etc. It's a subset of the GLX and
Xlib interfaces allowing some degree of application portability between
the X and X-less environments.
</p>
<p>
Some of the files needed for building this configuration are not included
in the normal Mesa releases so you'll need to get the latest sources
sources from the <a href="repository.html">git repository</a>.
Note that this environment is not well-supported and these instructions
may not be completely up to date.
</p>
<br>
<h1>2. Compilation</h1>
<p>
You'll need the DRM and pciaccess libraries. Check with:
<h2>2.1 glxproto</h2>
Get <a href="http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/include/GL/glxproto.h?rev=1.9">glxproto.h</a>. Copy it to the /mesa/include/GL/ directory.
</p>
<pre>
pkg-config --modversion libdrm
pkg-config --modversion pciaccess
<h2>2.2 libpciaccess</h2>
<p>
Check if you have libpciaccess installed:
</p>
<pre>pkg-config --modversion pciaccess
</pre>
<p>
If not you can download the latest code from:
</p>
<pre> git clone git://anongit.freedesktop.org/git/xorg/lib/libpciaccess
</pre>
<p>
Run autogen.sh to generate a configure file. autogen.sh uses autoconf
utility. This utility may not be installed with your linux distro,
check if it is available. if not you can use your package manager or
type:
</p>
<pre>sudo apt-get install autoconf
</pre>
The next step is to install the libpciaccess library.
<pre>make
make install
</pre>
<p> Now your libpciaccess.a file is saved into /usr/local/lib
directory. If you have a libpciaccess.a in /usr/lib you may simply copy
and overwrite these files. Don't forget to copy libpciaccess.pc file to
/usr/lib/pkgconfig, which is also located in /usr/local/lib/pkgconfig/.
Or you may use the following system variables:
</p>
<pre>export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
</pre>
<p>
You can get them from the git repository with:
<h2>2.3 drm</h2>
<p>The next step is to compile the drm. DRM consists of two seperate parts,
the DRM client library(lindrm.so) and kernel device module(such as
radeon.ko). We need to make a small change in kernel device module. So
you need to download the kernel source. You may choose the nearest
mirror from www.kernel.org, or you are using Fedora Core 5, for
example, you may need to install RPMs such as:
kernel-smp-devel-2.16.15-1.2054_FC5.i686.rpm
kernel-devel-2.6.15-1.2054_FC5.i686.rpm
etc. You can find a detailed information <a href="http://www.howtoforge.com/kernel_compilation_fedora">here.</a>
</p>
<p>You will find drm_drv.c at /usr/src/LINUX-VERSION/drivers/char/drm/. Edit this code and comment out the following part:
</p>
<pre>
git clone git://anongit.freedesktop.org/git/mesa/drm
git clone git://anongit.freedesktop.org/git/xorg/lib/libpciaccess
/* ||
((ioctl-&gt;flags &amp; DRM_MASTER) &amp;&amp; !priv-&gt;master)*/
</pre>
<p>
See the README files in those projects for build/install instructions.
</p>
<p>
Now you are ready to compile your kernel. If your kernel version is
identical to the version you have compiled, you can simply over write
your new "ko" files over older ones. If you have compiled a different
kernel, you must configure your grub or lilo to be able to boot your
new kernel. <p>
You'll need fbdev header files. Check with:
</p>
<pre>
ls -l /usr/include/linux/fb.h
ls -l /usr/include/linux/fb.
</pre>
<p>This file may be missing if you have not installed linux header files.
<p>
Compile Mesa with the 'linux-solo' configuration:
<h2>2.4 Mesa</h2>
</p><p>Get latest development Mesa sources from git repository
(currently 7.1-prerelease)
</p>
<pre>
make linux-solo
git clone git://anongit.freedesktop.org/git/mesa/mesa
</pre>
<p>You will need the makedepend utility which is a part of mesa project
to build your linux-solo. You probably wont have this utility. You can
download its source from following git repulsitory:
</p>
<pre>
git clone git://anongit.freedesktop.org/git/xorg/util/makedepend
</pre>
<p>Get the latest stable mesa version from SourceForge (currently 7.0.3)
<a href="http://sourceforge.net/project/showfiles.php?group_id=3">http://sourceforge.net/project/showfiles.php?group_id=3</a>
</p>
<p>Copy the miniglx folder from 7.1-prerelease to 7.0.3.
You may also extract GLUT to 7.0.3 version at this step.
</p>
<p>Edit linux-solo.conf at /conf directory, just only compile the
graphics driver you need, delete the unwanted drivers names from the
list(some drivers are causing problems...)
</p>
<pre>
while(build==0)
{
make linux-solo
There will be some missing header files, copy them from 7.1-prerelease
}
</pre>
<p>
@@ -77,22 +154,40 @@ When complete you should have the following:
</p>
<ul>
<li>lib/libGL.so - the GL library which applications link with
<li>lib/*_dri_so - DRI drivers
<li>lib/miniglx.conf - sample MiniGLX config file
<li>progs/miniglx/* - several MiniGLX sample programs
</ul>
</li><li>lib/*_dri_so - DRI drivers
</li><li>lib/miniglx.conf - sample MiniGLX config file
</li><li>progs/miniglx/* - several MiniGLX sample programs
</li></ul>
To install these files into appropriate locations in system:
<pre>
make install
</pre>
Now your openGL libraries are copied to /usr/local/lib and
miniglx.conf is copied to /etc. You may copy them to /usr/lib and
overwrite your old GL libraries. Or you may export following variable:
<pre>
export LIBGL_DRIVERS_PATH=/usr/local/lib
</pre>
<br>
<h1>3. Using fbdev/DRI</h1>
<p>
If an X server currently running, exit/stop it so you're working from
the console.
the console. Following command shuts down the x window and also the multi user support.
</p>
<pre>
init 1
</pre>
<h2>3.1 Load Kernel Modules</h2>
<p>Also you may define the runlevel as 1 in "/etc/inittab". Your system
will always start in single user mode and without x-window with this
option set.
</p><h2>3.1 Load Kernel Modules</h2>
<p>
You'll need to load the kernel modules specific to your graphics hardware.
@@ -106,8 +201,7 @@ As root, the kernel modules can be loaded as follows:
<p>
If you have Intel i915/i945 hardware:
</p>
<pre>
modprobe agpgart # the AGP GART module
<pre> modprobe agpgart # the AGP GART module
modprobe intelfb # the Intel fbdev driver
modprobe i915 # the i915/945 DRI kernel module
</pre>
@@ -115,8 +209,7 @@ If you have Intel i915/i945 hardware:
<p>
If you have ATI Radeon/R200 hardware:
</p>
<pre>
modprobe agpgart # the AGP GART module
<pre> modprobe agpgart # the AGP GART module
modprobe radeonfb # the Radeon fbdev driver
modprobe radeon # the Radeon DRI kernel module
</pre>
@@ -124,8 +217,7 @@ If you have ATI Radeon/R200 hardware:
<p>
If you have ATI Rage 128 hardware:
</p>
<pre>
modprobe agpgart # the AGP GART module
<pre> modprobe agpgart # the AGP GART module
modprobe aty128fb # the Rage 128 fbdev driver
modprobe r128 # the Rage 128 DRI kernel module
</pre>
@@ -133,8 +225,7 @@ If you have ATI Rage 128 hardware:
<p>
If you have Matrox G200/G400 hardware:
</p>
<pre>
modprobe agpgart # the AGP GART module
<pre> modprobe agpgart # the AGP GART module
modprobe mgafb # the Matrox fbdev driver
modprobe mga # the Matrox DRI kernel module
</pre>
@@ -142,8 +233,7 @@ If you have Matrox G200/G400 hardware:
<p>
To verify that the agpgart, fbdev and drm modules are loaded:
</p>
<pre>
ls -l /dev/agpgart /dev/fb* /dev/dri
<pre> ls -l /dev/agpgart /dev/fb* /dev/dri
</pre>
<p>
Alternately, use lsmod to inspect the currently installed modules.
@@ -154,16 +244,15 @@ If you have problems, look at the output of dmesg.
<h2>3.2 Configuration File</h2>
<p>
Copy the sample miniglx.conf to /etc/miniglx.conf and review/edit its contents.
review/edit /etc/miniglx.conf.
Alternately, the MINIGLX_CONF environment variable can be used to
indicate the location of miniglx.conf
</p>
To determine the pciBusID value, run lspci and examine the output.
For example:
</p>
<pre>
/sbin/lspci:
<p></p>
<pre> /sbin/lspci:
00:02.0 VGA compatible controller: Intel Corporation 82915G/GV/910GL Express Chipset Family Graphics Controller (rev 04)
</pre>
<p>
@@ -186,15 +275,13 @@ for example.
Change to the <code>Mesa/progs/miniglx/</code> directory and
start the sample_server program in the background:
</p>
<pre>
./sample_server &amp;
<pre> ./sample_server &amp;
</pre>
<p>
Then try running the <code>miniglxtest</code> program:
</p>
<pre>
./miniglxtest
<pre> ./miniglxtest
</pre>
<p>
You should see a rotating quadrilateral which changes color as it rotates.
@@ -205,7 +292,7 @@ It will exit automatically after a bit.
If you run other tests in the miniglx/ directory, you may want to run
them from a remote shell so that you can stop them with ctrl-C.
</p>
<br>
<h1>4.0 Troubleshooting</h1>
@@ -214,8 +301,7 @@ them from a remote shell so that you can stop them with ctrl-C.
<li>
If you try to run miniglxtest and get the following:
<br>
<pre>
[miniglx] failed to probe chipset
<pre> [miniglx] failed to probe chipset
connect: Connection refused
server connection lost
</pre>
@@ -229,7 +315,7 @@ It means that the sample_server process is not running.
<h1>5.0 Programming Information</h1>
<p>
OpenGL/Mesa is interfaced to fbdev via the <a href="MiniGLX.html">MiniGLX</a>
OpenGL/Mesa is interfaced to fbdev via the <a href="http://www.nabble.com/file/p15480666/MiniGLX.html">MiniGLX</a>
interface.
MiniGLX is a subset of Xlib and GLX API functions which provides just
enough functionality to setup OpenGL rendering and respond to simple
@@ -250,5 +336,6 @@ See the <code>GL/miniglx.h</code> header file for details.
</p>
</body>
</html>

21
docs/memory.html Normal file
View File

@@ -0,0 +1,21 @@
<HTML>
<TITLE>Mesa News</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>DRI Memory Management</H1>
<p>
Thomas Hellstr&ouml;m's
<a href="http://www.tungstengraphics.com/mm.pdf">Memory Management
whitepaper</a> describes the goals, design and implementation of the
new DRI memory management system.
</p>
</body>
</html>

View File

@@ -11,6 +11,30 @@
<H1>News</H1>
<h2>April 4, 2008</h2>
<p>
<a href="relnotes-7.0.3.html">Mesa 7.0.3</a> is released.
This is a bug-fix release.
</p>
<h2>November 13, 2007</h2>
<p>
Gallium3D is the codename for the new Mesa device driver architecture
which is currently under development.
A <a href="http://www.tungstengraphics.com/wiki/index.php/Gallium3D"
target="_parent"> summary</a> of the architecture can be found on the
Tungsten Graphics website.
</p>
<p>
Gallium3D development is taking place on the <em>gallium-0.1</em> branch
of the git repository.
Currently, there's only a software-only driver and an Intel i915/945 driver
but other drivers will be coming...
</p>
<h2>November 10, 2007</h2>
<p>
<a href="relnotes-7.0.2.html">Mesa 7.0.2</a> is released.

84
docs/relnotes-7.0.3.html Normal file
View File

@@ -0,0 +1,84 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.0.3 Release Notes / April 4, 2008</H1>
<p>
Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
</p>
<h2>MD5 checksums</h2>
<pre>
3fd1cb76531b2515ef7db92d9a93dbf8 MesaLib-7.0.3.tar.gz
e6e6379d7793af40a6bc3ce1bace572e MesaLib-7.0.3.tar.bz2
97882bac195229ee0b78cab82e0e3be1 MesaLib-7.0.3.zip
8abf6bbcb1661e7dd4ce73b3fbb85898 MesaDemos-7.0.3.tar.gz
47fd6863621d3c9c7dbb870ab7f0c303 MesaDemos-7.0.3.tar.bz2
99e442e14da1928f76a7297bb421a3af MesaDemos-7.0.3.zip
2b50fe9fadc4709b57c52adef09fce3c MesaGLUT-7.0.3.tar.gz
0ff23c4e91b238abae63a5fc9fa003e7 MesaGLUT-7.0.3.tar.bz2
70e83554a4462dad28e0d6e20f79aada MesaGLUT-7.0.3.zip
</pre>
<h2>Bug fixes</h2>
<ul>
<li>Added missing glw.pc.in file to release tarball
<li>Fix GLUT/Fortran issues
<li>GLSL gl_FrontLightModelProduct.sceneColor variable wasn't defined
<li>Fix crash upon GLSL variable array indexes (not yet supported)
<li>Two-sided stencil test didn't work in software rendering
<li>Fix two-sided lighting bugs/crashes (bug 13368)
<li>GLSL gl_FrontFacing didn't work properly
<li>glGetActiveUniform returned incorrect sizes (bug 13751)
<li>Fix several bugs relating to uniforms and attributes in GLSL API (Bruce Merry, bug 13753)
<li>glTexImage3D(GL_PROXY_TEXTURE_3D) mis-set teximage depth field
<li>Fixed GLX indirect vertex array rendering bug (14197)
<li>Fixed crash when deleting framebuffer objects (bugs 13507, 14293)
<li>User-defined clip planes enabled for R300 (bug 9871)
<li>Fixed glBindTexture() crash upon bad target (bug 14514)
<li>Fixed potential crash in glDrawPixels(GL_DEPTH_COMPONENT) (bug 13915)
<li>Bad strings given to glProgramStringARB() didn't generate GL_INVALID_OPERATION
<li>Fixed minor point rasterization regression (bug 11016)
<li>state.texenv.color state var didn't work in GL_ARB_fragment_program (bug 14931)
<li>glBitmap from a PBO didn't always work
<li>glGetTexImage into a PBO didn't always work
<li>Comments at the end of ARB vertex/fragment programs crashed the parser
</ul>
<h2>Changes</h2>
<ul>
<li>Updated glext.h to version 40
</ul>
<h2>Driver Status</h2>
<pre>
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa/GLX (on Xlib) implements OpenGL 2.1
OSMesa (off-screen) implements OpenGL 2.1
Windows/Win32 implements OpenGL 2.1
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA unsupported
Wind River UGL unsupported
DJGPP unsupported
GGI unsupported
BeOS unsupported
Allegro unsupported
D3D unsupported
</pre>
</body>
</html>

67
docs/relnotes-7.0.4.html Normal file
View File

@@ -0,0 +1,67 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.0.4 Release Notes / (TBD 2008)</H1>
<p>
Mesa 7.0.4 is a stable release with bug fixes since version 7.0.3.
</p>
<h2>MD5 checksums</h2>
<pre>
</pre>
<h2>Bug fixes</h2>
<ul>
<li>define #extension GL_ARB_texture_rectangle in shading language
<li>fixed WIN32 compile problem in libGLU
<li>Fixed a per-vertex glMaterial bug which could cause bad lighting
<li>Fixed potential crash in AA/smoothed triangle rendering when using a fragment shader
<li>Fixed glDrawElement + VBO segfault (bug 16156)
<li>Fixed GLSL linker bug causing generic vertex attributes to get aliased
<li>Fixed stack overflow when using glPixelZoom on Windows
</ul>
<h2>Changes</h2>
<ul>
<li>Added support for DragonFly OS
<li>Added a build config for FreeBSD static libs (Anatolij Shkodin)
<li>Enabled GL_EXT_multi_draw_arrays extension in R200/R300 drivers
<li>Enabled GL_ARB_point_sprite extension in I965 driver
<li>Enabled GL_EXT_texture_sRGB extension in I965 driver
<li>Added support for GL shading language in I965 driver
</ul>
<h2>Driver Status</h2>
<pre>
Driver Status
---------------------- ----------------------
DRI drivers varies with the driver
XMesa/GLX (on Xlib) implements OpenGL 2.1
OSMesa (off-screen) implements OpenGL 2.1
Windows/Win32 implements OpenGL 2.1
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
SVGA unsupported
Wind River UGL unsupported
DJGPP unsupported
GGI unsupported
BeOS unsupported
Allegro unsupported
D3D unsupported
</pre>
</body>
</html>

View File

@@ -20,6 +20,8 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="relnotes-7.0.4.html">7.0.4 release notes</A>
<LI><A HREF="relnotes-7.0.3.html">7.0.3 release notes</A>
<LI><A HREF="relnotes-7.0.2.html">7.0.2 release notes</A>
<LI><A HREF="relnotes-7.0.1.html">7.0.1 release notes</A>
<LI><A HREF="relnotes-7.0.html">7.0 release notes</A>

View File

@@ -48,6 +48,7 @@ in Mesa:
<li>The inverse trig functions asin(), acos(), and atan() are not implemented
<li>The gl_Color and gl_SecondaryColor varying vars are interpolated
without perspective correction
<li>Floating point literal suffixes 'f' and 'F' aren't allowed.
</ul>
<p>

View File

@@ -46,9 +46,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glext.h last updated 2007/02/12 */
/* glext.h last updated 2008/03/24 */
/* Current version at http://www.opengl.org/registry/ */
#define GL_GLEXT_VERSION 39
#define GL_GLEXT_VERSION 40
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -3091,8 +3091,8 @@ extern "C" {
#ifndef GL_EXT_framebuffer_blit
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
#endif
#ifndef GL_EXT_framebuffer_multisample
@@ -3379,6 +3379,9 @@ extern "C" {
#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E
#endif
#ifndef GL_GREMEDY_frame_terminator
#endif
/*************************************************************/
@@ -7252,6 +7255,14 @@ typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint
typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha);
#endif
#ifndef GL_GREMEDY_frame_terminator
#define GL_GREMEDY_frame_terminator 1
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
#endif /* GL_GLEXT_PROTOTYPES */
typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
#endif
#ifdef __cplusplus
}

View File

@@ -75,7 +75,7 @@ typedef void (GLUTCALLBACK *GLUTmenuStatusFCB) (int *, int *, int *);
typedef void (GLUTCALLBACK *GLUTidleFCB) (void);
/* Functions that set and return Fortran callback functions. */
GLUTAPI void* APIENTRY __glutGetFCB(int which);
GLUTAPI void APIENTRY __glutSetFCB(int which, void *func);
GLUTAPI GLUTproc APIENTRY __glutGetFCB(int which);
GLUTAPI void APIENTRY __glutSetFCB(int which, GLUTproc func);
#endif /* __glutf90_h__ */

View File

@@ -16,6 +16,10 @@
#include "trackball.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define DEG_TO_RAD(DEG) ((DEG) * M_PI / 180.0)
#define TEXTURE_FILE "../images/reflect.rgb"

View File

@@ -1,65 +0,0 @@
clear
dlist-dangling
dlist-edgeflag
dlist-edgeflag-dangling
drawarrays
drawelements
drawrange
line
line-clip
line-cull
line-userclip
line-userclip-clip
line-userclip-nop
line-userclip-nop-clip
lineloop
lineloop-clip
point
point-clip
point-param
point-wide
poly
poly-flat
poly-unfilled
quad
quad-clip
quad-clip-all-vertices
quad-clip-nearplane
quad-degenerate
quad-flat
quad-offset-factor
quad-offset-unfilled
quad-offset-units
quad-tex-2d
quad-tex-3d
quad-tex-pbo
quad-unfilled
quads
quadstrip
quadstrip-flat
readtex.c
readtex.h
tri
tri-blend
tri-clip
tri-cull
tri-dlist
tri-edgeflag
tri-flat
tri-flat-clip
tri-tex-3d
tri-unfilled
tri-unfilled-clip
tri-unfilled-smooth
tri-unfilled-userclip
tri-userclip
tristrip
tristrip-clip
vbo-drawarrays
vbo-drawelements
vbo-drawrange
vp-array
vp-clip
vp-line-clip
vp-tri
vp-unfilled

View File

@@ -6,11 +6,12 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
PROGS = glthreads \
PROGS = \
glthreads \
glxdemo \
glxgears \
glxgears_fbconfig \
@@ -27,10 +28,14 @@ PROGS = glthreads \
pbdemo \
wincopy \
xfont \
xrotfontdemo \
yuvrect_client
xrotfontdemo
# Don't build these by default because of extra library dependencies
EXTRA_PROGS = \
shape \
yuvrect_client \
xdemo
# omit this XMesa API demo: xdemo
##### RULES #####
@@ -47,8 +52,11 @@ PROGS = glthreads \
default: $(PROGS)
extra: $(EXTRA_PROGS)
clean:
-rm -f $(PROGS)
-rm -f $(PROGS) $(EXTRA_PROGS)
-rm -f *.o *~
@@ -83,3 +91,6 @@ xuserotfont.o: xuserotfont.c xuserotfont.h
xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
yuvrect_client: yuvrect_client.c
$(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@

View File

@@ -505,7 +505,7 @@ main(int argc, char *argv[])
for (i = 0; i < numThreads; i++) {
pthread_create(&WinThreads[i].Thread, NULL, thread_function,
(void*) &WinThreads[i]);
printf("glthreads: Created thread %u\n", (unsigned int) WinThreads[i].Thread);
printf("glthreads: Created thread %p\n", WinThreads[i].Thread);
}
if (MultiDisplays)

View File

@@ -596,7 +596,7 @@ get_visual_attribs(Display *dpy, XVisualInfo *vInfo,
/* multisample attribs */
#ifdef GLX_ARB_multisample
if (ext && strstr(ext, "GLX_ARB_multisample") == 0) {
if (ext && strstr(ext, "GLX_ARB_multisample")) {
glXGetConfig(dpy, vInfo, GLX_SAMPLE_BUFFERS_ARB, &attribs->numMultisample);
glXGetConfig(dpy, vInfo, GLX_SAMPLES_ARB, &attribs->numSamples);
}

View File

@@ -47,7 +47,6 @@ PERFORMANCE OF THIS SOFTWARE.
#include <GL/glx.h>
#include <GL/glu.h>
#include <X11/keysym.h>
#include <stdlib.h>
#include <stdio.h>
@@ -134,7 +133,7 @@ int main(int argc, char** argv) {
/* set up viewing parameters */
glMatrixMode(GL_PROJECTION);
gluPerspective(20, 1, 0.1, 20);
glFrustum(-1, 1, -1, 1, 6, 20);
glMatrixMode(GL_MODELVIEW);
glTranslatef(0, 0, -15);

View File

@@ -34,7 +34,6 @@
static int Width=500, Height=500;
static float Xangle = 0.0, Yangle = 0.0;
static int Redraw = 0;
static int Sides = 5;
static int MinSides = 3;
static int MaxSides = 20;

View File

@@ -6627,7 +6627,7 @@ typedef void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
static TexImage3Dproc pTexImage3D = 0;
#ifndef _WIN32
#if !defined(_WIN32) && !defined(__WIN32__)
# include <dlfcn.h>
# include <sys/types.h>
#else
@@ -6642,7 +6642,7 @@ static void gluTexImage3D( GLenum target, GLint level,
const GLvoid *pixels )
{
if (!pTexImage3D) {
#ifdef _WIN32
#if defined(_WIN32) || defined(__WIN32__)
pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3D");
if (!pTexImage3D)
pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3DEXT");

View File

@@ -713,8 +713,8 @@ gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)
GLfloat cosCache3b[CACHE_SIZE];
GLfloat angle;
GLfloat zLow, zHigh;
GLfloat sintemp1, sintemp2, sintemp3 = 0.0, sintemp4 = 0.0;
GLfloat costemp1, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
GLfloat sintemp1 = 0.0, sintemp2 = 0.0, sintemp3 = 0.0, sintemp4 = 0.0;
GLfloat costemp1 = 0.0, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
GLboolean needCache2, needCache3;
GLint start, finish;

View File

@@ -36,6 +36,7 @@ SOURCES = \
glut_dstr.c \
glut_event.c \
glut_ext.c \
glut_fcb.c \
glut_fullscrn.c \
glut_gamemode.c \
glut_get.c \
@@ -125,6 +126,6 @@ depend: $(SOURCES)
@ echo "running $(MKDEP)"
@ touch depend
@ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES) \
> /dev/null
$(X11_INCLUDES) > /dev/null
include depend

View File

@@ -172,10 +172,14 @@ handleTimeouts(void)
GETTIMEOFDAY(&now);
while (IS_AT_OR_AFTER(__glutTimerList->timeout, now)) {
timer = __glutTimerList;
__glutTimerList = timer->next;
/* call the timer function */
timer->func(timer->value);
/* remove from the linked list */
__glutTimerList = timer->next;
/* put this timer on the "free" list */
timer->next = freeTimerList;
freeTimerList = timer;
if (!__glutTimerList)
break;
}

View File

@@ -19,7 +19,7 @@
/* Set a Fortran callback function. */
void APIENTRY
__glutSetFCB(int which, void *func)
__glutSetFCB(int which, GLUTproc func)
{
#ifdef SUPPORT_FORTRAN
switch (which) {
@@ -100,61 +100,61 @@ __glutSetFCB(int which, void *func)
/* Get a Fortran callback function. */
void* APIENTRY
GLUTproc APIENTRY
__glutGetFCB(int which)
{
#ifdef SUPPORT_FORTRAN
switch (which) {
case GLUT_FCB_DISPLAY:
return (void *) __glutCurrentWindow->fdisplay;
return __glutCurrentWindow->fdisplay;
case GLUT_FCB_RESHAPE:
return (void *) __glutCurrentWindow->freshape;
return __glutCurrentWindow->freshape;
case GLUT_FCB_MOUSE:
return (void *) __glutCurrentWindow->fmouse;
return __glutCurrentWindow->fmouse;
case GLUT_FCB_MOTION:
return (void *) __glutCurrentWindow->fmotion;
return __glutCurrentWindow->fmotion;
case GLUT_FCB_PASSIVE:
return (void *) __glutCurrentWindow->fpassive;
return __glutCurrentWindow->fpassive;
case GLUT_FCB_ENTRY:
return (void *) __glutCurrentWindow->fentry;
return __glutCurrentWindow->fentry;
case GLUT_FCB_KEYBOARD:
return (void *) __glutCurrentWindow->fkeyboard;
return __glutCurrentWindow->fkeyboard;
case GLUT_FCB_KEYBOARD_UP:
return (void *) __glutCurrentWindow->fkeyboardUp;
return __glutCurrentWindow->fkeyboardUp;
case GLUT_FCB_WINDOW_STATUS:
return (void *) __glutCurrentWindow->fwindowStatus;
return __glutCurrentWindow->fwindowStatus;
case GLUT_FCB_VISIBILITY:
return (void *) __glutCurrentWindow->fvisibility;
return __glutCurrentWindow->fvisibility;
case GLUT_FCB_SPECIAL:
return (void *) __glutCurrentWindow->fspecial;
return __glutCurrentWindow->fspecial;
case GLUT_FCB_SPECIAL_UP:
return (void *) __glutCurrentWindow->fspecialUp;
return __glutCurrentWindow->fspecialUp;
case GLUT_FCB_BUTTON_BOX:
return (void *) __glutCurrentWindow->fbuttonBox;
return __glutCurrentWindow->fbuttonBox;
case GLUT_FCB_DIALS:
return (void *) __glutCurrentWindow->fdials;
return __glutCurrentWindow->fdials;
case GLUT_FCB_SPACE_MOTION:
return (void *) __glutCurrentWindow->fspaceMotion;
return __glutCurrentWindow->fspaceMotion;
case GLUT_FCB_SPACE_ROTATE:
return (void *) __glutCurrentWindow->fspaceRotate;
return __glutCurrentWindow->fspaceRotate;
case GLUT_FCB_SPACE_BUTTON:
return (void *) __glutCurrentWindow->fspaceButton;
return __glutCurrentWindow->fspaceButton;
case GLUT_FCB_TABLET_MOTION:
return (void *) __glutCurrentWindow->ftabletMotion;
return __glutCurrentWindow->ftabletMotion;
case GLUT_FCB_TABLET_BUTTON:
return (void *) __glutCurrentWindow->ftabletButton;
return __glutCurrentWindow->ftabletButton;
case GLUT_FCB_JOYSTICK:
#ifdef _WIN32
return (void *) __glutCurrentWindow->fjoystick;
return __glutCurrentWindow->fjoystick;
#else
return NULL;
#endif
case GLUT_FCB_OVERLAY_DISPLAY:
return (void *) __glutCurrentWindow->overlay->fdisplay;
return __glutCurrentWindow->overlay->fdisplay;
case GLUT_FCB_SELECT:
return (void *) __glutCurrentMenu->fselect;
return __glutCurrentMenu->fselect;
case GLUT_FCB_TIMER:
return (void *) __glutTimerList->ffunc;
return __glutTimerList ? __glutTimerList->ffunc : NULL;
default:
return NULL;
}

View File

@@ -72,6 +72,23 @@ tags:
etags `find . -name \*.[ch]` `find ../include`
# glut pkgconfig file
pcedit = sed \
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
-e 's,@LIB_DIR@,$(LIB_DIR),' \
-e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),'
glut.pc: glut.pc.in
$(pcedit) $< > $@
install: glut.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
# Remove .o and backup files
clean: depend
-rm -f depend

11
src/glut/mini/glut.pc.in Normal file
View File

@@ -0,0 +1,11 @@
prefix=@INSTALL_DIR@
exec_prefix=${prefix}
libdir=${exec_prefix}/@LIB_DIR@
includedir=${prefix}/include
Name: glut
Description: Mesa OpenGL Utility Toolkit library
Requires: gl glu
Version: @VERSION@
Libs: -L${libdir} -lglut
Cflags: -I${includedir}

View File

@@ -61,7 +61,7 @@ $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
depend: $(GLW_SOURCES)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(GLW_SOURCES) \
> /dev/null
$(X11_INCLUDES) > /dev/null
include depend

View File

@@ -7,5 +7,5 @@ Name: glw
Description: Mesa OpenGL widget library
Requires: gl
Version: @VERSION@
Libs: -L${libdir} -lGLU
Libs: -L${libdir} -lGLw
Cflags: -I${includedir}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,832 @@
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
*
* 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, sub license,
* 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 NON-INFRINGEMENT. IN NO EVENT SHALL
* IBM,
* AND/OR THEIR SUPPLIERS 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.
*/
#include <GL/gl.h>
#include "glxserver.h"
#include "glxbyteorder.h"
#include "indirect_size.h"
#include "indirect_reqsize.h"
#define __GLX_PAD(x) (((x) + 3) & ~3)
#if defined(__CYGWIN__) || defined(__MINGW32__)
# undef HAVE_ALIAS
#endif
#ifdef HAVE_ALIAS
# define ALIAS2(from,to) \
GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
__attribute__ ((alias( # to )));
# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
#else
# define ALIAS(from,to) \
GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
{ return __glX ## to ## ReqSize( pc, swap ); }
#endif
int
__glXCallListsReqSize(const GLbyte *pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 0);
GLenum type = *(GLenum *) (pc + 4);
GLsizei compsize;
if (swap) {
n = bswap_32(n);
type = bswap_32(type);
}
compsize = __glCallLists_size(type);
return __GLX_PAD((compsize * n));
}
int
__glXBitmapReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLsizei width = *(GLsizei *) (pc + 20);
GLsizei height = *(GLsizei *) (pc + 24);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
width = bswap_32(width);
height = bswap_32(height);
}
return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXFogfvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 0);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glFogfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXLightfvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glLightfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXLightModelfvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 0);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glLightModelfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXMaterialfvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glMaterialfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
}
return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glTexParameterfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXTexImage1DReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLenum target = *(GLenum *) (pc + 20);
GLsizei width = *(GLsizei *) (pc + 32);
GLenum format = *(GLenum *) (pc + 44);
GLenum type = *(GLenum *) (pc + 48);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
target = bswap_32(target);
width = bswap_32(width);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, width, 1, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXTexImage2DReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLenum target = *(GLenum *) (pc + 20);
GLsizei width = *(GLsizei *) (pc + 32);
GLsizei height = *(GLsizei *) (pc + 36);
GLenum format = *(GLenum *) (pc + 44);
GLenum type = *(GLenum *) (pc + 48);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
target = bswap_32(target);
width = bswap_32(width);
height = bswap_32(height);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, width, height, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glTexEnvfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXTexGendvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glTexGendv_size(pname);
return __GLX_PAD((compsize * 8));
}
int
__glXTexGenfvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glTexGenfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap)
{
GLsizei mapsize = *(GLsizei *) (pc + 4);
if (swap) {
mapsize = bswap_32(mapsize);
}
return __GLX_PAD((mapsize * 4));
}
int
__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap)
{
GLsizei mapsize = *(GLsizei *) (pc + 4);
if (swap) {
mapsize = bswap_32(mapsize);
}
return __GLX_PAD((mapsize * 2));
}
int
__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLsizei width = *(GLsizei *) (pc + 20);
GLsizei height = *(GLsizei *) (pc + 24);
GLenum format = *(GLenum *) (pc + 28);
GLenum type = *(GLenum *) (pc + 32);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
width = bswap_32(width);
height = bswap_32(height);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, 0, width, height, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 0);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 4) + (n * 4));
}
int
__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLenum target = *(GLenum *) (pc + 20);
GLsizei width = *(GLsizei *) (pc + 36);
GLenum format = *(GLenum *) (pc + 44);
GLenum type = *(GLenum *) (pc + 48);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
target = bswap_32(target);
width = bswap_32(width);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, width, 1, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLenum target = *(GLenum *) (pc + 20);
GLsizei width = *(GLsizei *) (pc + 36);
GLsizei height = *(GLsizei *) (pc + 40);
GLenum format = *(GLenum *) (pc + 44);
GLenum type = *(GLenum *) (pc + 48);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
target = bswap_32(target);
width = bswap_32(width);
height = bswap_32(height);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, width, height, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXColorTableReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLenum target = *(GLenum *) (pc + 20);
GLsizei width = *(GLsizei *) (pc + 28);
GLenum format = *(GLenum *) (pc + 32);
GLenum type = *(GLenum *) (pc + 36);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
target = bswap_32(target);
width = bswap_32(width);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, width, 1, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glColorTableParameterfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXColorSubTableReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLenum target = *(GLenum *) (pc + 20);
GLsizei count = *(GLsizei *) (pc + 28);
GLenum format = *(GLenum *) (pc + 32);
GLenum type = *(GLenum *) (pc + 36);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
target = bswap_32(target);
count = bswap_32(count);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, count, 1, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLenum target = *(GLenum *) (pc + 20);
GLsizei width = *(GLsizei *) (pc + 28);
GLenum format = *(GLenum *) (pc + 36);
GLenum type = *(GLenum *) (pc + 40);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
target = bswap_32(target);
width = bswap_32(width);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, width, 1, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = 0;
GLint skip_images = 0;
GLint skip_rows = *(GLint *) (pc + 8);
GLint alignment = *(GLint *) (pc + 16);
GLenum target = *(GLenum *) (pc + 20);
GLsizei width = *(GLsizei *) (pc + 28);
GLsizei height = *(GLsizei *) (pc + 32);
GLenum format = *(GLenum *) (pc + 36);
GLenum type = *(GLenum *) (pc + 40);
if (swap) {
row_length = bswap_32(row_length);
skip_rows = bswap_32(skip_rows);
alignment = bswap_32(alignment);
target = bswap_32(target);
width = bswap_32(width);
height = bswap_32(height);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, width, height, 1,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 4);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glConvolutionParameterfv_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = *(GLint *) (pc + 8);
GLint skip_rows = *(GLint *) (pc + 16);
GLint skip_images = *(GLint *) (pc + 20);
GLint alignment = *(GLint *) (pc + 32);
GLenum target = *(GLenum *) (pc + 36);
GLsizei width = *(GLsizei *) (pc + 48);
GLsizei height = *(GLsizei *) (pc + 52);
GLsizei depth = *(GLsizei *) (pc + 56);
GLenum format = *(GLenum *) (pc + 68);
GLenum type = *(GLenum *) (pc + 72);
if (swap) {
row_length = bswap_32(row_length);
image_height = bswap_32(image_height);
skip_rows = bswap_32(skip_rows);
skip_images = bswap_32(skip_images);
alignment = bswap_32(alignment);
target = bswap_32(target);
width = bswap_32(width);
height = bswap_32(height);
depth = bswap_32(depth);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, width, height, depth,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap)
{
GLint row_length = *(GLint *) (pc + 4);
GLint image_height = *(GLint *) (pc + 8);
GLint skip_rows = *(GLint *) (pc + 16);
GLint skip_images = *(GLint *) (pc + 20);
GLint alignment = *(GLint *) (pc + 32);
GLenum target = *(GLenum *) (pc + 36);
GLsizei width = *(GLsizei *) (pc + 60);
GLsizei height = *(GLsizei *) (pc + 64);
GLsizei depth = *(GLsizei *) (pc + 68);
GLenum format = *(GLenum *) (pc + 76);
GLenum type = *(GLenum *) (pc + 80);
if (swap) {
row_length = bswap_32(row_length);
image_height = bswap_32(image_height);
skip_rows = bswap_32(skip_rows);
skip_images = bswap_32(skip_images);
alignment = bswap_32(alignment);
target = bswap_32(target);
width = bswap_32(width);
height = bswap_32(height);
depth = bswap_32(depth);
format = bswap_32(format);
type = bswap_32(type);
}
return __glXImageSize(format, type, target, width, height, depth,
image_height, row_length, skip_images,
skip_rows, alignment);
}
int
__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 20);
if (swap) {
imageSize = bswap_32(imageSize);
}
return __GLX_PAD(imageSize);
}
int
__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 24);
if (swap) {
imageSize = bswap_32(imageSize);
}
return __GLX_PAD(imageSize);
}
int
__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 28);
if (swap) {
imageSize = bswap_32(imageSize);
}
return __GLX_PAD(imageSize);
}
int
__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap)
{
GLsizei imageSize = *(GLsizei *) (pc + 36);
if (swap) {
imageSize = bswap_32(imageSize);
}
return __GLX_PAD(imageSize);
}
int
__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap)
{
GLsizei len = *(GLsizei *) (pc + 8);
if (swap) {
len = bswap_32(len);
}
return __GLX_PAD(len);
}
int
__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 0);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 4));
}
int
__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap)
{
GLenum pname = *(GLenum *) (pc + 0);
GLsizei compsize;
if (swap) {
pname = bswap_32(pname);
}
compsize = __glPointParameterfvEXT_size(pname);
return __GLX_PAD((compsize * 4));
}
int
__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap)
{
GLuint num = *(GLuint *) (pc + 8);
if (swap) {
num = bswap_32(num);
}
return __GLX_PAD((num * 32));
}
int
__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap)
{
GLuint num = *(GLuint *) (pc + 8);
if (swap) {
num = bswap_32(num);
}
return __GLX_PAD((num * 16));
}
int
__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 8));
}
int
__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 16));
}
int
__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 24));
}
int
__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 12));
}
int
__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 6));
}
int
__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap)
{
GLsizei n = *(GLsizei *) (pc + 4);
if (swap) {
n = bswap_32(n);
}
return __GLX_PAD((n * 32));
}
int
__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap)
{
GLsizei len = *(GLsizei *) (pc + 4);
if (swap) {
len = bswap_32(len);
}
return __GLX_PAD(len);
}
ALIAS(Fogiv, Fogfv)
ALIAS(Lightiv, Lightfv)
ALIAS(LightModeliv, LightModelfv)
ALIAS(Materialiv, Materialfv)
ALIAS(TexParameteriv, TexParameterfv)
ALIAS(TexEnviv, TexEnvfv)
ALIAS(TexGeniv, TexGenfv)
ALIAS(PixelMapuiv, PixelMapfv)
ALIAS(ColorTableParameteriv, ColorTableParameterfv)
ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB)
ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB)
ALIAS(LoadProgramNV, ProgramStringARB)
ALIAS(RequestResidentProgramsNV, DrawBuffersARB)
ALIAS(VertexAttribs1fvNV, PixelMapfv)
ALIAS(VertexAttribs1svNV, PixelMapusv)
ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV)
ALIAS(VertexAttribs2svNV, PixelMapfv)
ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV)
ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV)
ALIAS(VertexAttribs4ubvNV, PixelMapfv)
ALIAS(PointParameterivNV, PointParameterfvEXT)
ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB)
ALIAS(DeleteFramebuffersEXT, DrawBuffersARB)
ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB)

View File

@@ -0,0 +1,121 @@
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
*
* 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, sub license,
* 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 NON-INFRINGEMENT. IN NO EVENT SHALL
* IBM,
* AND/OR THEIR SUPPLIERS 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.
*/
#if !defined( _INDIRECT_REQSIZE_H_ )
# define _INDIRECT_REQSIZE_H_
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
# define HIDDEN __attribute__((visibility("hidden")))
# else
# define HIDDEN
# endif
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define PURE __attribute__((pure))
# else
# define PURE
# endif
extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap);
extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap);
# undef HIDDEN
# undef PURE
#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,102 @@
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
/*
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
*
* 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, sub license,
* 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 NON-INFRINGEMENT. IN NO EVENT SHALL
* IBM,
* AND/OR THEIR SUPPLIERS 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.
*/
#if !defined( _INDIRECT_SIZE_GET_H_ )
# define _INDIRECT_SIZE_GET_H_
/**
* \file
* Prototypes for functions used to determine the number of data elements in
* various GLX protocol messages.
*
* \author Ian Romanick <idr@us.ibm.com>
*/
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define PURE __attribute__((pure))
# else
# define PURE
# endif
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
# define FASTCALL __attribute__((fastcall))
# else
# define FASTCALL
# endif
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
# define INTERNAL __attribute__((visibility("internal")))
# else
# define INTERNAL
# endif
extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint
__glGetConvolutionParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint
__glGetConvolutionParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint
__glGetFramebufferAttachmentParameterivEXT_size(GLenum);
# undef PURE
# undef FASTCALL
# undef INTERNAL
#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */

1593
src/glx/x11/indirect_table.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -485,14 +485,14 @@ emit_DrawArrays_none( GLenum mode, GLint first, GLsizei count )
for ( i = 0 ; i < count ; i++ ) {
if ( (pc + single_vertex_size) >= gc->bufEnd ) {
pc = __glXFlushRenderBuffer(gc, gc->pc);
pc = __glXFlushRenderBuffer(gc, pc);
}
pc = emit_element_none( pc, arrays, first + i );
}
if ( (pc + 4) >= gc->bufEnd ) {
pc = __glXFlushRenderBuffer(gc, gc->pc);
pc = __glXFlushRenderBuffer(gc, pc);
}
(void) memcpy( pc, end_cmd, 4 );
@@ -726,7 +726,7 @@ emit_DrawElements_none( GLenum mode, GLsizei count, GLenum type,
unsigned index = 0;
if ( (pc + single_vertex_size) >= gc->bufEnd ) {
pc = __glXFlushRenderBuffer(gc, gc->pc);
pc = __glXFlushRenderBuffer(gc, pc);
}
switch( type ) {
@@ -744,7 +744,7 @@ emit_DrawElements_none( GLenum mode, GLsizei count, GLenum type,
}
if ( (pc + 4) >= gc->bufEnd ) {
pc = __glXFlushRenderBuffer(gc, gc->pc);
pc = __glXFlushRenderBuffer(gc, pc);
}
(void) memcpy( pc, end_cmd, 4 );

View File

@@ -65,7 +65,7 @@ linux-solo: depend subdirs libmesa.a
# Stand-alone Mesa libGL, no built-in drivers (DirectFB)
libgl-core: $(CORE_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS) \
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(CORE_OBJECTS) \
$(GL_LIB_DEPS)
@@ -89,7 +89,8 @@ fbdev: $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) $(COMMON_DRIVER_OBJECTS)
# Stand-alone Mesa libGL and libOSMesa
STAND_ALONE_DRIVER_SOURCES = \
$(COMMON_DRIVER_SOURCES) \
$(X11_DRIVER_SOURCES)
$(X11_DRIVER_SOURCES) \
$(GLIDE_DRIVER_SOURCES)
STAND_ALONE_DRIVER_OBJECTS = $(STAND_ALONE_DRIVER_SOURCES:.c=.o)

View File

@@ -112,6 +112,8 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->DeleteTexture = _mesa_delete_texture_object;
driver->NewTextureImage = _mesa_new_texture_image;
driver->FreeTexImageData = _mesa_free_texture_image_data;
driver->MapTexture = NULL;
driver->UnmapTexture = NULL;
driver->TextureMemCpy = _mesa_memcpy;
driver->IsTextureResident = NULL;
driver->PrioritizeTexture = NULL;

View File

@@ -50,7 +50,6 @@ SHARED_INCLUDES = \
-I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
-I$(TOP)/src/mesa/math \
-I$(TOP)/src/mesa/transform \
-I$(TOP)/src/mesa/shader \
-I$(TOP)/src/mesa/swrast \
-I$(TOP)/src/mesa/swrast_setup \

View File

@@ -486,6 +486,9 @@ static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate )
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate;
drm_clip_rect_t rect;
if (!dPriv->numClipRects)
return;
dPriv->swapBuffers(dPriv);
/* Check that we actually have the new damage report method */

View File

@@ -233,8 +233,8 @@ static int do_wait( drmVBlank * vbl, GLuint * vbl_seq, int fd )
if ( first_time ) {
fprintf(stderr,
"%s: drmWaitVBlank returned %d, IRQs don't seem to be"
" working correctly.\nTry running with LIBGL_THROTTLE_REFRESH"
" and LIBL_SYNC_REFRESH unset.\n", __FUNCTION__, ret);
" working correctly.\nTry adjusting the vblank_mode"
" configuration parameter.\n", __FUNCTION__, ret);
first_time = GL_FALSE;
}

View File

@@ -63,6 +63,9 @@ extern char *program_invocation_name, *program_invocation_short_name;
#elif defined(__NetBSD__) && defined(__NetBSD_Version) && (__NetBSD_Version >= 106000100)
# include <stdlib.h>
# define GET_PROGRAM_NAME() getprogname()
#elif defined(__DragonFly__)
# include <stdlib.h>
# define GET_PROGRAM_NAME() getprogname()
#endif
#if !defined(GET_PROGRAM_NAME)

View File

@@ -193,7 +193,7 @@ static GLboolean gamma_run_render( GLcontext *ctx,
for (i = 0 ; i < VB->PrimitiveCount ; i++)
{
GLuint prim = VB->Primitive[i].mode;
GLuint prim = _tnl_translate_prim(&VB->Primitive[i]);
GLuint start = VB->Primitive[i].start;
GLuint length = VB->Primitive[i].count;

View File

@@ -144,7 +144,7 @@ static GLboolean i810_run_render( GLcontext *ctx,
for (i = 0 ; i < VB->PrimitiveCount ; i++)
{
GLuint prim = VB->Primitive[i].mode;
GLuint prim = _tnl_translate_prim(&VB->Primitive[i]);
GLuint start = VB->Primitive[i].start;
GLuint length = VB->Primitive[i].count;

View File

@@ -29,6 +29,7 @@
#define I915CONTEXT_INC
#include "intel_context.h"
#include "i915_reg.h"
#define I915_FALLBACK_TEXTURE 0x1000
#define I915_FALLBACK_COLORMASK 0x2000
@@ -103,6 +104,7 @@
#define I915_PROGRAM_SIZE 192
#define I915_MAX_INSN (I915_MAX_TEX_INSN+I915_MAX_ALU_INSN)
/* Hardware version of a parsed fragment program. "Derived" from the
* mesa fragment_program struct.
@@ -153,6 +155,10 @@ struct i915_fragment_program {
*/
/* Track which R registers are "live" for each instruction.
* A register is live between the time it's written to and the last time
* it's read. */
GLuint usedRegs[I915_MAX_INSN];
/* Helpers for i915_fragprog.c:
*/

View File

@@ -42,7 +42,20 @@
#include "program.h"
#include "programopt.h"
static const GLfloat sin_quad_constants[2][4] = {
{
2.0,
-1.0,
.5,
.75
},
{
4.0,
-4.0,
1.0 / (2.0 * M_PI),
.2225
}
};
/* 1, -1/3!, 1/5!, -1/7! */
static const GLfloat sin_constants[4] = { 1.0,
@@ -91,7 +104,7 @@ static GLuint src_vector( struct i915_fragment_program *p,
break;
case FRAG_ATTRIB_FOGC:
src = i915_emit_decl( p, REG_TYPE_T, T_FOG_W, D0_CHANNEL_W );
src = swizzle( src, W, W, W, W );
src = swizzle(src, W, ZERO, ZERO, ONE);
break;
case FRAG_ATTRIB_TEX0:
case FRAG_ATTRIB_TEX1:
@@ -211,7 +224,7 @@ do { \
GLuint coord = src_vector( p, &inst->SrcReg[0], program); \
/* Texel lookup */ \
\
i915_emit_texld( p, \
i915_emit_texld( p, get_live_regs(p, inst), \
get_result_vector( p, inst ), \
get_result_flags( inst ), \
sampler, \
@@ -234,6 +247,43 @@ do { \
#define EMIT_2ARG_ARITH( OP ) EMIT_ARITH( OP, 2 )
#define EMIT_3ARG_ARITH( OP ) EMIT_ARITH( OP, 3 )
/*
* TODO: consider moving this into core
*/
static void calc_live_regs( struct i915_fragment_program *p )
{
const struct gl_fragment_program *program = p->ctx->FragmentProgram._Current;
GLuint regsUsed = 0xffff0000;
GLint i;
for (i = program->Base.NumInstructions - 1; i >= 0; i--) {
struct prog_instruction *inst = &program->Base.Instructions[i];
int opArgs = _mesa_num_inst_src_regs(inst->Opcode);
int a;
/* Register is written to: unmark as live for this and preceeding ops */
if (inst->DstReg.File == PROGRAM_TEMPORARY)
regsUsed &= ~(1 << inst->DstReg.Index);
for (a = 0; a < opArgs; a++) {
/* Register is read from: mark as live for this and preceeding ops */
if (inst->SrcReg[a].File == PROGRAM_TEMPORARY)
regsUsed |= 1 << inst->SrcReg[a].Index;
}
p->usedRegs[i] = regsUsed;
}
}
static GLuint get_live_regs( struct i915_fragment_program *p,
const struct prog_instruction *inst )
{
const struct gl_fragment_program *program = p->ctx->FragmentProgram._Current;
GLuint nr = inst - program->Base.Instructions;
return p->usedRegs[nr];
}
/* Possible concerns:
*
@@ -267,9 +317,18 @@ static void upload_program( struct i915_fragment_program *p )
return;
}
if (program->Base.NumInstructions > I915_MAX_INSN) {
i915_program_error( p, "Exceeded max instructions" );
return;
}
/* Not always needed:
*/
calc_live_regs(p);
while (1) {
GLuint src0, src1, src2, flags;
GLuint tmp = 0;
GLuint tmp = 0, consts0 = 0, consts1 = 0;
switch (inst->Opcode) {
case OPCODE_ABS:
@@ -297,67 +356,87 @@ static void upload_program( struct i915_fragment_program *p )
break;
case OPCODE_COS:
src0 = src_vector( p, &inst->SrcReg[0], program);
tmp = i915_get_utemp( p );
src0 = src_vector(p, &inst->SrcReg[0], program);
tmp = i915_get_utemp(p);
consts0 = i915_emit_const4fv(p, sin_quad_constants[0]);
consts1 = i915_emit_const4fv(p, sin_quad_constants[1]);
i915_emit_arith( p,
A0_MUL,
/* Reduce range from repeating about [-pi,pi] to [-1,1] */
i915_emit_arith(p,
A0_MAD,
tmp, A0_DEST_CHANNEL_X, 0,
src0,
swizzle(consts1, Z, ZERO, ZERO, ZERO), /* 1/(2pi) */
swizzle(consts0, W, ZERO, ZERO, ZERO)); /* .75 */
i915_emit_arith(p, A0_FRC, tmp, A0_DEST_CHANNEL_X, 0, tmp, 0, 0);
i915_emit_arith(p,
A0_MAD,
tmp, A0_DEST_CHANNEL_X, 0,
src0,
i915_emit_const1f(p, 1.0/(M_PI * 2)),
tmp,
swizzle(consts0, X, ZERO, ZERO, ZERO), /* 2 */
swizzle(consts0, Y, ZERO, ZERO, ZERO)); /* -1 */
/* Compute COS with the same calculation used for SIN, but a
* different source range has been mapped to [-1,1] this time.
*/
/* tmp.y = abs(tmp.x); {x, abs(x), 0, 0} */
i915_emit_arith(p,
A0_MAX,
tmp, A0_DEST_CHANNEL_Y, 0,
swizzle(tmp, ZERO, X, ZERO, ZERO),
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0),
0);
i915_emit_arith( p,
A0_MOD,
tmp, A0_DEST_CHANNEL_X, 0,
tmp,
0, 0 );
/* By choosing different taylor constants, could get rid of this mul:
*/
i915_emit_arith( p,
/* tmp.y = tmp.y * tmp.x; {x, x * abs(x), 0, 0} */
i915_emit_arith(p,
A0_MUL,
tmp, A0_DEST_CHANNEL_X, 0,
tmp,
i915_emit_const1f(p, (M_PI * 2)),
tmp, A0_DEST_CHANNEL_Y, 0,
swizzle(tmp, ZERO, X, ZERO, ZERO),
tmp,
0);
/*
* t0.xy = MUL x.xx11, x.x1111 ; x^2, x, 1, 1
* t0 = MUL t0.xyxy t0.xx11 ; x^4, x^3, x^2, 1
* t0 = MUL t0.xxz1 t0.z111 ; x^6 x^4 x^2 1
* result = DP4 t0, cos_constants
/* tmp.x = tmp.xy DP sin_quad_constants[2].xy */
i915_emit_arith(p,
A0_DP3,
tmp, A0_DEST_CHANNEL_X, 0,
tmp,
swizzle(consts1, X, Y, ZERO, ZERO),
0);
/* tmp.x now contains a first approximation (y). Now, weight it
* against tmp.y**2 to get closer.
*/
i915_emit_arith( p,
A0_MUL,
tmp, A0_DEST_CHANNEL_XY, 0,
swizzle(tmp, X,X,ONE,ONE),
swizzle(tmp, X,ONE,ONE,ONE), 0);
i915_emit_arith(p,
A0_MAX,
tmp, A0_DEST_CHANNEL_Y, 0,
swizzle(tmp, ZERO, X, ZERO, ZERO),
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0),
0);
i915_emit_arith( p,
A0_MUL,
tmp, A0_DEST_CHANNEL_XYZ, 0,
swizzle(tmp, X,Y,X,ONE),
swizzle(tmp, X,X,ONE,ONE), 0);
/* tmp.y = tmp.x * tmp.y - tmp.x; {y, y * abs(y) - y, 0, 0} */
i915_emit_arith(p,
A0_MAD,
tmp, A0_DEST_CHANNEL_Y, 0,
swizzle(tmp, ZERO, X, ZERO, ZERO),
swizzle(tmp, ZERO, Y, ZERO, ZERO),
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0));
i915_emit_arith( p,
A0_MUL,
tmp, A0_DEST_CHANNEL_XYZ, 0,
swizzle(tmp, X,X,Z,ONE),
swizzle(tmp, Z,ONE,ONE,ONE), 0);
i915_emit_arith( p,
A0_DP4,
get_result_vector( p, inst ),
get_result_flags( inst ), 0,
swizzle(tmp, ONE,Z,Y,X),
i915_emit_const4fv( p, cos_constants ), 0);
/* result = .2225 * tmp.y + tmp.x =.2225(y * abs(y) - y) + y= */
i915_emit_arith(p,
A0_MAD,
get_result_vector(p, inst),
get_result_flags(inst), 0,
swizzle(consts1, W, W, W, W),
swizzle(tmp, Y, Y, Y, Y),
swizzle(tmp, X, X, X, X));
break;
break;
case OPCODE_DP3:
EMIT_2ARG_ARITH( A0_DP3 );
break;
case OPCODE_DP3:
EMIT_2ARG_ARITH(A0_DP3);
break;
case OPCODE_DP4:
EMIT_2ARG_ARITH( A0_DP4 );
@@ -414,11 +493,9 @@ static void upload_program( struct i915_fragment_program *p )
src0 = src_vector( p, &inst->SrcReg[0], program);
tmp = i915_get_utemp( p );
i915_emit_texld( p,
tmp, A0_DEST_CHANNEL_ALL, /* use a dummy dest reg */
0,
src0,
T0_TEXKILL );
i915_emit_texld(p, get_live_regs(p, inst),
tmp, A0_DEST_CHANNEL_ALL, /* use a dummy dest reg */
0, src0, T0_TEXKILL);
break;
case OPCODE_LG2:
@@ -638,62 +715,86 @@ static void upload_program( struct i915_fragment_program *p )
break;
case OPCODE_SIN:
src0 = src_vector( p, &inst->SrcReg[0], program);
tmp = i915_get_utemp( p );
src0 = src_vector(p, &inst->SrcReg[0], program);
tmp = i915_get_utemp(p);
consts0 = i915_emit_const4fv(p, sin_quad_constants[0]);
consts1 = i915_emit_const4fv(p, sin_quad_constants[1]);
i915_emit_arith( p,
A0_MUL,
/* Reduce range from repeating about [-pi,pi] to [-1,1] */
i915_emit_arith(p,
A0_MAD,
tmp, A0_DEST_CHANNEL_X, 0,
src0,
swizzle(consts1, Z, ZERO, ZERO, ZERO), /* 1/(2pi) */
swizzle(consts0, Z, ZERO, ZERO, ZERO)); /* .5 */
i915_emit_arith(p, A0_FRC, tmp, A0_DEST_CHANNEL_X, 0, tmp, 0, 0);
i915_emit_arith(p,
A0_MAD,
tmp, A0_DEST_CHANNEL_X, 0,
src0,
i915_emit_const1f(p, 1.0/(M_PI * 2)),
tmp,
swizzle(consts0, X, ZERO, ZERO, ZERO), /* 2 */
swizzle(consts0, Y, ZERO, ZERO, ZERO)); /* -1 */
/* Compute sin using a quadratic and quartic. It gives continuity
* that repeating the Taylor series lacks every 2*pi, and has
* reduced error.
*
* The idea was described at:
* http://www.devmaster.net/forums/showthread.php?t=5784
*/
/* tmp.y = abs(tmp.x); {x, abs(x), 0, 0} */
i915_emit_arith(p,
A0_MAX,
tmp, A0_DEST_CHANNEL_Y, 0,
swizzle(tmp, ZERO, X, ZERO, ZERO),
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0),
0);
i915_emit_arith( p,
A0_MOD,
tmp, A0_DEST_CHANNEL_X, 0,
tmp,
0, 0 );
/* By choosing different taylor constants, could get rid of this mul:
*/
i915_emit_arith( p,
/* tmp.y = tmp.y * tmp.x; {x, x * abs(x), 0, 0} */
i915_emit_arith(p,
A0_MUL,
tmp, A0_DEST_CHANNEL_X, 0,
tmp,
i915_emit_const1f(p, (M_PI * 2)),
tmp, A0_DEST_CHANNEL_Y, 0,
swizzle(tmp, ZERO, X, ZERO, ZERO),
tmp,
0);
/*
* t0.xy = MUL x.xx11, x.x1111 ; x^2, x, 1, 1
* t0 = MUL t0.xyxy t0.xx11 ; x^4, x^3, x^2, x
* t1 = MUL t0.xyyw t0.yz11 ; x^7 x^5 x^3 x
* result = DP4 t1.wzyx, sin_constants
/* tmp.x = tmp.xy DP sin_quad_constants[2].xy */
i915_emit_arith(p,
A0_DP3,
tmp, A0_DEST_CHANNEL_X, 0,
tmp,
swizzle(consts1, X, Y, ZERO, ZERO),
0);
/* tmp.x now contains a first approximation (y). Now, weight it
* against tmp.y**2 to get closer.
*/
i915_emit_arith( p,
A0_MUL,
tmp, A0_DEST_CHANNEL_XY, 0,
swizzle(tmp, X,X,ONE,ONE),
swizzle(tmp, X,ONE,ONE,ONE), 0);
i915_emit_arith(p,
A0_MAX,
tmp, A0_DEST_CHANNEL_Y, 0,
swizzle(tmp, ZERO, X, ZERO, ZERO),
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0),
0);
i915_emit_arith( p,
A0_MUL,
tmp, A0_DEST_CHANNEL_ALL, 0,
swizzle(tmp, X,Y,X,Y),
swizzle(tmp, X,X,ONE,ONE), 0);
/* tmp.y = tmp.x * tmp.y - tmp.x; {y, y * abs(y) - y, 0, 0} */
i915_emit_arith(p,
A0_MAD,
tmp, A0_DEST_CHANNEL_Y, 0,
swizzle(tmp, ZERO, X, ZERO, ZERO),
swizzle(tmp, ZERO, Y, ZERO, ZERO),
negate(swizzle(tmp, ZERO, X, ZERO, ZERO), 0, 1, 0, 0));
i915_emit_arith( p,
A0_MUL,
tmp, A0_DEST_CHANNEL_ALL, 0,
swizzle(tmp, X,Y,Y,W),
swizzle(tmp, X,Z,ONE,ONE), 0);
i915_emit_arith( p,
A0_DP4,
get_result_vector( p, inst ),
get_result_flags( inst ), 0,
swizzle(tmp, W, Z, Y, X ),
i915_emit_const4fv( p, sin_constants ), 0);
break;
/* result = .2225 * tmp.y + tmp.x =.2225(y * abs(y) - y) + y= */
i915_emit_arith(p,
A0_MAD,
get_result_vector(p, inst),
get_result_flags(inst), 0,
swizzle(consts1, W, W, W, W),
swizzle(tmp, Y, Y, Y, Y),
swizzle(tmp, X, X, X, X));
break;
case OPCODE_SLT:
EMIT_2ARG_ARITH( A0_SLT );

View File

@@ -194,27 +194,43 @@ GLuint i915_emit_arith( struct i915_fragment_program *p,
return dest;
}
static GLuint get_free_rreg (struct i915_fragment_program *p,
GLuint live_regs)
{
int bit = ffs(~live_regs);
if (!bit) {
i915_program_error(p, "Can't find free R reg");
return UREG_BAD;
}
return UREG(REG_TYPE_R, bit - 1);
}
GLuint i915_emit_texld( struct i915_fragment_program *p,
GLuint live_regs,
GLuint dest,
GLuint destmask,
GLuint sampler,
GLuint coord,
GLuint op )
{
if (coord != UREG(GET_UREG_TYPE(coord), GET_UREG_NR(coord))) {
/* No real way to work around this in the general case - need to
* allocate and declare a new temporary register (a utemp won't
* do). Will fallback for now.
*/
i915_program_error(p, "Can't (yet) swizzle TEX arguments");
return 0;
}
if (coord != UREG(GET_UREG_TYPE(coord), GET_UREG_NR(coord))) {
/* With the help of the "needed registers" table created earlier, pick
* a register we can MOV the swizzled TC to (since TEX doesn't support
* swizzled sources) */
GLuint swizCoord = get_free_rreg(p, live_regs);
if (swizCoord == UREG_BAD)
return 0;
/* Don't worry about saturate as we only support
i915_emit_arith( p, A0_MOV, swizCoord, A0_DEST_CHANNEL_ALL, 0, coord, 0, 0 );
coord = swizCoord;
}
/* Don't worry about saturate as we only support texture formats
* that are always in the 0..1 range.
*/
if (destmask != A0_DEST_CHANNEL_ALL) {
GLuint tmp = i915_get_utemp(p);
i915_emit_texld( p, tmp, A0_DEST_CHANNEL_ALL, sampler, coord, op );
i915_emit_texld( p, 0, tmp, A0_DEST_CHANNEL_ALL, sampler, coord, op );
i915_emit_arith( p, A0_MOV, dest, destmask, 0, tmp, 0, 0 );
return dest;
}

View File

@@ -110,6 +110,7 @@ extern void i915_release_utemps( struct i915_fragment_program *p );
extern GLuint i915_emit_texld( struct i915_fragment_program *p,
GLuint live_regs,
GLuint dest,
GLuint destmask,
GLuint sampler,

View File

@@ -69,7 +69,7 @@ static GLuint get_source( struct i915_fragment_program *p,
if (p->VB->TexCoordPtr[unit]->size == 4)
op = T0_TEXLDP;
p->src_texture = i915_emit_texld( p, tmp, A0_DEST_CHANNEL_ALL,
p->src_texture = i915_emit_texld( p, 0, tmp, A0_DEST_CHANNEL_ALL,
sampler, texcoord, op );
}

View File

@@ -454,7 +454,12 @@ static void i915SetTexImages( i915ContextPtr i915,
case MESA_FORMAT_Z16:
t->intel.texelBytes = 2;
textureFormat = (MAPSURF_16BIT | MT_16BIT_L16);
if (tObj->DepthMode == GL_ALPHA)
textureFormat = (MAPSURF_16BIT | MT_16BIT_A16);
else if (tObj->DepthMode == GL_INTENSITY)
textureFormat = (MAPSURF_16BIT | MT_16BIT_I16);
else
textureFormat = (MAPSURF_16BIT | MT_16BIT_L16);
break;
case MESA_FORMAT_RGBA_DXT1:
@@ -604,8 +609,13 @@ static void i915ImportTexObjState( struct gl_texture_object *texObj )
shadow = SS2_SHADOW_ENABLE;
shadow |= intel_translate_compare_func( texObj->CompareFunc );
minFilt = FILTER_4X4_FLAT;
magFilt = FILTER_4X4_FLAT;
if (texObj->Target == GL_TEXTURE_1D) {
minFilt = FILTER_NEAREST;
magFilt = FILTER_NEAREST;
} else {
minFilt = FILTER_4X4_FLAT;
magFilt = FILTER_4X4_FLAT;
}
}

View File

@@ -117,6 +117,8 @@ const GLubyte *intelGetString( GLcontext *ctx, GLenum name )
chipset = "Intel(R) 865G"; break;
case PCI_CHIP_I915_G:
chipset = "Intel(R) 915G"; break;
case PCI_CHIP_E7221_G:
chipset = "Intel (R) E7221G (i915)"; break;
case PCI_CHIP_I915_GM:
chipset = "Intel(R) 915GM"; break;
case PCI_CHIP_I945_G:

View File

@@ -361,6 +361,8 @@ do { \
#define SUBPIXEL_X 0.125
#define SUBPIXEL_Y 0.125
#define ALIGN(value, alignment) ((value + alignment - 1) & ~(alignment - 1))
#define INTEL_FIREVERTICES(intel) \
do { \
if ((intel)->prim.flush) \
@@ -451,6 +453,7 @@ extern int INTEL_DEBUG;
#define PCI_CHIP_I855_GM 0x3582
#define PCI_CHIP_I865_G 0x2572
#define PCI_CHIP_I915_G 0x2582
#define PCI_CHIP_E7221_G 0x258A
#define PCI_CHIP_I915_GM 0x2592
#define PCI_CHIP_I945_G 0x2772
#define PCI_CHIP_I945_GM 0x27A2

View File

@@ -228,7 +228,7 @@ intelTryReadPixels( GLcontext *ctx,
__DRIdrawablePrivate *dPriv = intel->driDrawable;
int nbox = dPriv->numClipRects;
int src_offset = intel->readRegion->offset;
int src_pitch = intel->intelScreen->front.pitch;
int src_pitch = intel->intelScreen->front.pitch / intel->intelScreen->cpp; /* in pixels */
int dst_offset = intelAgpOffsetFromVirtual( intel, pixels);
drm_clip_rect_t *box = dPriv->pClipRects;
int i;
@@ -308,7 +308,7 @@ static void do_draw_pix( GLcontext *ctx,
int nbox = dPriv->numClipRects;
int i;
int src_offset = intelAgpOffsetFromVirtual( intel, pixels);
int src_pitch = pitch;
int src_pitch = pitch; /* in pixels */
assert(src_offset != ~0); /* should be caught earlier */
@@ -339,7 +339,7 @@ static void do_draw_pix( GLcontext *ctx,
intelEmitCopyBlitLocked( intel,
intel->intelScreen->cpp,
src_pitch, src_offset,
intel->intelScreen->front.pitch,
intel->intelScreen->front.pitch / intel->intelScreen->cpp, /* in pixels */
intel->drawRegion->offset,
bx - x, by - y,
bx, by,
@@ -364,7 +364,7 @@ intelTryDrawPixels( GLcontext *ctx,
GLint pitch = unpack->RowLength ? unpack->RowLength : width;
GLuint dest;
GLuint cpp = intel->intelScreen->cpp;
GLint size = width * pitch * cpp;
GLint size = height * pitch * cpp;
if (INTEL_DEBUG & DEBUG_PIXEL)
fprintf(stderr, "%s\n", __FUNCTION__);

View File

@@ -213,7 +213,7 @@ static GLboolean intel_run_render( GLcontext *ctx,
for (i = 0 ; i < VB->PrimitiveCount ; i++)
{
GLuint prim = VB->Primitive[i].mode;
GLuint prim = _tnl_translate_prim(&VB->Primitive[i]);
GLuint start = VB->Primitive[i].start;
GLuint length = VB->Primitive[i].count;

View File

@@ -53,7 +53,7 @@ DRI_CONF_BEGIN
DRI_CONF_SECTION_END
DRI_CONF_SECTION_QUALITY
DRI_CONF_FORCE_S3TC_ENABLE(false)
DRI_CONF_ALLOW_LARGE_TEXTURES(1)
DRI_CONF_ALLOW_LARGE_TEXTURES(2)
DRI_CONF_SECTION_END
DRI_CONF_END;
const GLuint __driNConfigOptions = 4;
@@ -511,6 +511,7 @@ static GLboolean intelCreateContext( const __GLcontextModes *mesaVis,
sharedContextPrivate );
case PCI_CHIP_I915_G:
case PCI_CHIP_E7221_G:
case PCI_CHIP_I915_GM:
case PCI_CHIP_I945_G:
case PCI_CHIP_I945_GM:

View File

@@ -189,12 +189,12 @@ static void intelDrawBuffer(GLcontext *ctx, GLenum mode )
if ( intel->sarea->pf_current_page == 1 )
front ^= 1;
intelSetFrontClipRects( intel );
if (front) {
intelSetFrontClipRects( intel );
intel->drawRegion = &intel->intelScreen->front;
intel->readRegion = &intel->intelScreen->front;
} else {
intelSetBackClipRects( intel );
intel->drawRegion = &intel->intelScreen->back;
intel->readRegion = &intel->intelScreen->back;
}

View File

@@ -759,7 +759,7 @@ int intelUploadTexImages( intelContextPtr intel,
GLuint face)
{
const int numLevels = t->base.lastLevel - t->base.firstLevel + 1;
const struct gl_texture_image *firstImage = t->image[face][t->base.firstLevel].image;
const struct gl_texture_image *firstImage = t->image[face][0].image;
int pitch = firstImage->RowStride * firstImage->TexFormat->TexelBytes;
/* Can we texture out of the existing client data? */

View File

@@ -202,12 +202,19 @@ static void intel_wpos_triangle( intelContextPtr intel,
{
GLuint offset = intel->wpos_offset;
GLuint size = intel->wpos_size;
__memcpy( ((char *)v0) + offset, v0, size );
__memcpy( ((char *)v1) + offset, v1, size );
__memcpy( ((char *)v2) + offset, v2, size );
GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);
GLfloat *v1_wpos = (GLfloat *)((char *)v1 + offset);
GLfloat *v2_wpos = (GLfloat *)((char *)v2 + offset);
intel_draw_triangle( intel, v0, v1, v2 );
__memcpy(v0_wpos, v0, size);
__memcpy(v1_wpos, v1, size);
__memcpy(v2_wpos, v2, size);
v0_wpos[1] = -v0_wpos[1] + intel->driDrawable->h;
v1_wpos[1] = -v1_wpos[1] + intel->driDrawable->h;
v2_wpos[1] = -v2_wpos[1] + intel->driDrawable->h;
intel_draw_triangle(intel, v0, v1, v2);
}
@@ -217,9 +224,14 @@ static void intel_wpos_line( intelContextPtr intel,
{
GLuint offset = intel->wpos_offset;
GLuint size = intel->wpos_size;
GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);
GLfloat *v1_wpos = (GLfloat *)((char *)v1 + offset);
__memcpy( ((char *)v0) + offset, v0, size );
__memcpy( ((char *)v1) + offset, v1, size );
__memcpy(v0_wpos, v0, size);
__memcpy(v1_wpos, v1, size);
v0_wpos[1] = -v0_wpos[1] + intel->driDrawable->h;
v1_wpos[1] = -v1_wpos[1] + intel->driDrawable->h;
intel_draw_line( intel, v0, v1 );
}
@@ -230,8 +242,10 @@ static void intel_wpos_point( intelContextPtr intel,
{
GLuint offset = intel->wpos_offset;
GLuint size = intel->wpos_size;
GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);
__memcpy( ((char *)v0) + offset, v0, size );
__memcpy(v0_wpos, v0, size);
v0_wpos[1] = -v0_wpos[1] + intel->driDrawable->h;
intel_draw_point( intel, v0 );
}

View File

@@ -377,10 +377,16 @@ do { \
ADVANCE_BATCH(); \
} while (0)
static GLuint
get_dirty(struct i830_hw_state *state)
{
return state->active & ~state->emitted;
}
static GLuint
get_state_size(struct i830_hw_state *state)
{
GLuint dirty = state->active & ~state->emitted;
GLuint dirty = get_dirty(state);
GLuint sz = 0;
GLuint i;
@@ -411,7 +417,7 @@ get_state_size(struct i830_hw_state *state)
/* Push the state into the sarea and/or texture memory.
*/
static void
i830_emit_state(struct intel_context *intel)
i830_do_emit_state(struct intel_context *intel)
{
struct i830_context *i830 = i830_context(&intel->ctx);
struct i830_hw_state *state = i830->current;
@@ -428,10 +434,32 @@ i830_emit_state(struct intel_context *intel)
*/
intel_batchbuffer_require_space(intel->batch, get_state_size(state), 0);
/* Workaround. There are cases I haven't been able to track down
* where we aren't emitting a full state at the start of a new
* batchbuffer. This code spots that we are on a new batchbuffer
* and forces a full state emit no matter what.
*
* In the normal case state->emitted is already zero, this code is
* another set of checks to make sure it really is.
*/
if (intel->batch->id != intel->last_state_batch_id ||
intel->batch->map == intel->batch->ptr)
{
state->emitted = 0;
intel_batchbuffer_require_space(intel->batch, get_state_size(state), 0);
}
/* Do this here as we may have flushed the batchbuffer above,
* causing more state to be dirty!
*/
dirty = state->active & ~state->emitted;
dirty = get_dirty(state);
state->emitted |= dirty;
assert(get_dirty(state) == 0);
if (intel->batch->id != intel->last_state_batch_id) {
assert(dirty & I830_UPLOAD_CTX);
intel->last_state_batch_id = intel->batch->id;
}
if (dirty & I830_UPLOAD_INVARIENT) {
DBG("I830_UPLOAD_INVARIENT:\n");
@@ -513,7 +541,30 @@ i830_emit_state(struct intel_context *intel)
}
}
state->emitted |= dirty;
intel->batch->dirty_state &= ~dirty;
assert(get_dirty(state) == 0);
}
static void
i830_emit_state(struct intel_context *intel)
{
struct i830_context *i830 = i830_context(&intel->ctx);
i830_do_emit_state( intel );
/* Second chance - catch batchbuffer wrap in the middle of state
* emit. This shouldn't happen but it has been observed in
* testing.
*/
if (get_dirty( i830->current )) {
/* Force a full re-emit if this happens.
*/
i830->current->emitted = 0;
i830_do_emit_state( intel );
}
assert(get_dirty(i830->current) == 0);
assert((intel->batch->dirty_state & (1<<1)) == 0);
}
static void
@@ -650,8 +701,7 @@ i830_assert_not_dirty( struct intel_context *intel )
{
struct i830_context *i830 = i830_context(&intel->ctx);
struct i830_hw_state *state = i830->current;
GLuint dirty = state->active & ~state->emitted;
assert(!dirty);
assert(!get_dirty(state));
}

View File

@@ -94,7 +94,7 @@ src_vector(struct i915_fragment_program *p,
break;
case FRAG_ATTRIB_FOGC:
src = i915_emit_decl(p, REG_TYPE_T, T_FOG_W, D0_CHANNEL_W);
src = swizzle(src, W, W, W, W);
src = swizzle(src, W, ZERO, ZERO, ONE);
break;
case FRAG_ATTRIB_TEX0:
case FRAG_ATTRIB_TEX1:

View File

@@ -54,7 +54,7 @@ static GLint step_offsets[6][2] = { {0, 2},
};
GLboolean
i915_miptree_layout(struct intel_mipmap_tree * mt)
i915_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt)
{
GLint level;
@@ -67,7 +67,7 @@ i915_miptree_layout(struct intel_mipmap_tree * mt)
assert(lvlWidth == lvlHeight); /* cubemap images are square */
/* double pitch for cube layouts */
mt->pitch = ((dim * mt->cpp * 2 + 3) & ~3) / mt->cpp;
mt->pitch = intel_miptree_pitch_align (intel, mt, dim * 2);
mt->total_height = dim * 4;
for (level = mt->first_level; level <= mt->last_level; level++) {
@@ -107,7 +107,7 @@ i915_miptree_layout(struct intel_mipmap_tree * mt)
/* Calculate the size of a single slice.
*/
mt->pitch = ((mt->width0 * mt->cpp + 3) & ~3) / mt->cpp;
mt->pitch = intel_miptree_pitch_align (intel, mt, mt->width0);
/* XXX: hardware expects/requires 9 levels at minimum.
*/
@@ -150,7 +150,7 @@ i915_miptree_layout(struct intel_mipmap_tree * mt)
GLuint height = mt->height0;
GLuint img_height;
mt->pitch = ((mt->width0 * mt->cpp + 3) & ~3) / mt->cpp;
mt->pitch = intel_miptree_pitch_align (intel, mt, mt->width0);
mt->total_height = 0;
for (level = mt->first_level; level <= mt->last_level; level++) {
@@ -180,7 +180,7 @@ i915_miptree_layout(struct intel_mipmap_tree * mt)
GLboolean
i945_miptree_layout(struct intel_mipmap_tree * mt)
i945_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt)
{
GLint level;
@@ -197,7 +197,7 @@ i945_miptree_layout(struct intel_mipmap_tree * mt)
* or the final row of 4x4, 2x2 and 1x1 faces below this.
*/
if (dim > 32)
mt->pitch = ((dim * mt->cpp * 2 + 3) & ~3) / mt->cpp;
mt->pitch = intel_miptree_pitch_align (intel, mt, dim);
else
mt->pitch = 14 * 8;
@@ -279,7 +279,7 @@ i945_miptree_layout(struct intel_mipmap_tree * mt)
GLuint pack_y_pitch;
GLuint level;
mt->pitch = ((mt->width0 * mt->cpp + 3) & ~3) / mt->cpp;
mt->pitch = intel_miptree_pitch_align (intel, mt, mt->width0);
mt->total_height = 0;
pack_y_pitch = MAX2(mt->height0, 2);
@@ -329,7 +329,7 @@ i945_miptree_layout(struct intel_mipmap_tree * mt)
case GL_TEXTURE_1D:
case GL_TEXTURE_2D:
case GL_TEXTURE_RECTANGLE_ARB:
i945_miptree_layout_2d(mt);
i945_miptree_layout_2d(intel, mt);
break;
default:
_mesa_problem(NULL, "Unexpected tex target in i945_miptree_layout()");

View File

@@ -198,7 +198,7 @@ i915_emit_invarient_state(struct intel_context *intel)
/* Need to initialize this to zero.
*/
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(3) | (1));
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(3) | (0));
OUT_BATCH(0);
/* XXX: Use this */
@@ -216,6 +216,7 @@ i915_emit_invarient_state(struct intel_context *intel)
/* Don't support twosided stencil yet */
OUT_BATCH(_3DSTATE_BACKFACE_STENCIL_OPS | BFO_ENABLE_STENCIL_TWO_SIDE | 0);
OUT_BATCH(0);
ADVANCE_BATCH();
}
@@ -247,6 +248,9 @@ get_state_size(struct i915_hw_state *state)
GLuint i;
GLuint sz = 0;
if (dirty & I915_UPLOAD_INVARIENT)
sz += 30 * 4;
if (dirty & I915_UPLOAD_CTX)
sz += sizeof(state->Ctx);
@@ -281,7 +285,7 @@ get_state_size(struct i915_hw_state *state)
/* Push the state into the sarea and/or texture memory.
*/
static void
i915_emit_state(struct intel_context *intel)
i915_do_emit_state(struct intel_context *intel)
{
struct i915_context *i915 = i915_context(&intel->ctx);
struct i915_hw_state *state = i915->current;
@@ -298,10 +302,33 @@ i915_emit_state(struct intel_context *intel)
*/
intel_batchbuffer_require_space(intel->batch, get_state_size(state), 0);
/* Workaround. There are cases I haven't been able to track down
* where we aren't emitting a full state at the start of a new
* batchbuffer. This code spots that we are on a new batchbuffer
* and forces a full state emit no matter what.
*
* In the normal case state->emitted is already zero, this code is
* another set of checks to make sure it really is.
*/
if (intel->batch->id != intel->last_state_batch_id ||
intel->batch->map == intel->batch->ptr)
{
state->emitted = 0;
intel_batchbuffer_require_space(intel->batch, get_state_size(state), 0);
}
/* Do this here as we may have flushed the batchbuffer above,
* causing more state to be dirty!
*/
dirty = get_dirty(state);
state->emitted |= dirty;
assert(get_dirty(state) == 0);
if (intel->batch->id != intel->last_state_batch_id) {
assert(dirty & I915_UPLOAD_CTX);
intel->last_state_batch_id = intel->batch->id;
}
if (INTEL_DEBUG & DEBUG_STATE)
fprintf(stderr, "%s dirty: %x\n", __FUNCTION__, dirty);
@@ -424,7 +451,29 @@ i915_emit_state(struct intel_context *intel)
i915_disassemble_program(state->Program, state->ProgramSize);
}
state->emitted |= dirty;
intel->batch->dirty_state &= ~dirty;
}
static void
i915_emit_state(struct intel_context *intel)
{
struct i915_context *i915 = i915_context(&intel->ctx);
i915_do_emit_state( intel );
/* Second chance - catch batchbuffer wrap in the middle of state
* emit. This shouldn't happen but it has been observed in
* testing.
*/
if (get_dirty( i915->current )) {
/* Force a full re-emit if this happens.
*/
i915->current->emitted = 0;
i915_do_emit_state( intel );
}
assert(get_dirty(i915->current) == 0);
assert((intel->batch->dirty_state & (1<<1)) == 0);
}
static void

View File

@@ -118,6 +118,8 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch)
batch->map = driBOMap(batch->buffer, DRM_BO_FLAG_WRITE, 0);
batch->ptr = batch->map;
batch->dirty_state = ~0;
batch->id = batch->intel->intelScreen->batch_id++;
}
/*======================================================================

View File

@@ -38,6 +38,9 @@ struct intel_batchbuffer
struct buffer_reloc reloc[MAX_RELOCS];
GLuint nr_relocs;
GLuint size;
GLuint dirty_state;
GLuint id;
};
struct intel_batchbuffer *intel_batchbuffer_alloc(struct intel_context

View File

@@ -112,8 +112,8 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
for (i = 0; i < nbox; i++, pbox++) {
drm_clip_rect_t box;
if (pbox->x1 > pbox->x2 ||
pbox->y1 > pbox->y2 ||
if (pbox->x1 >= pbox->x2 ||
pbox->y1 >= pbox->y2 ||
pbox->x2 > intelScreen->width || pbox->y2 > intelScreen->height)
continue;
@@ -129,19 +129,22 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
if (rect->y2 < box.y2)
box.y2 = rect->y2;
if (box.x1 > box.x2 || box.y1 > box.y2)
if (box.x1 >= box.x2 || box.y1 >= box.y2)
continue;
}
assert(box.x1 < box.x2);
assert(box.y1 < box.y2);
BEGIN_BATCH(8, INTEL_BATCH_NO_CLIPRECTS);
OUT_BATCH(CMD);
OUT_BATCH(BR13);
OUT_BATCH((pbox->y1 << 16) | pbox->x1);
OUT_BATCH((pbox->y2 << 16) | pbox->x2);
OUT_BATCH((box.y1 << 16) | box.x1);
OUT_BATCH((box.y2 << 16) | box.x2);
OUT_RELOC(frontRegion->buffer, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_WRITE,
DRM_BO_MASK_MEM | DRM_BO_FLAG_WRITE, 0);
OUT_BATCH((pbox->y1 << 16) | pbox->x1);
OUT_BATCH((box.y1 << 16) | box.x1);
OUT_BATCH(BR13 & 0xffff);
OUT_RELOC(backRegion->buffer, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_READ,
DRM_BO_MASK_MEM | DRM_BO_FLAG_READ, 0);
@@ -152,7 +155,8 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
if (intel->first_swap_fence)
driFenceUnReference(intel->first_swap_fence);
intel->first_swap_fence = intel_batchbuffer_flush(intel->batch);
driFenceReference(intel->first_swap_fence);
if (intel->first_swap_fence)
driFenceReference(intel->first_swap_fence);
}
UNLOCK_HARDWARE(intel);
@@ -193,6 +197,8 @@ intelEmitFillBlit(struct intel_context *intel,
DBG("%s dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
__FUNCTION__, dst_buffer, dst_pitch, dst_offset, x, y, w, h);
assert(w > 0);
assert(h > 0);
BEGIN_BATCH(6, INTEL_BATCH_NO_CLIPRECTS);
OUT_BATCH(CMD);
@@ -280,10 +286,11 @@ intelEmitCopyBlit(struct intel_context *intel,
return;
}
if (dst_y2 < dst_y || dst_x2 < dst_x) {
if (dst_y2 <= dst_y || dst_x2 <= dst_x) {
return;
}
/* Initial y values don't seem to work with negative pitches. If
* we adjust the offsets manually (below), it seems to work fine.
*
@@ -292,6 +299,9 @@ intelEmitCopyBlit(struct intel_context *intel,
* the wrong result.
*/
if (dst_pitch > 0 && src_pitch > 0) {
assert(dst_x < dst_x2);
assert(dst_y < dst_y2);
BEGIN_BATCH(8, INTEL_BATCH_NO_CLIPRECTS);
OUT_BATCH(CMD);
OUT_BATCH(BR13);
@@ -306,6 +316,9 @@ intelEmitCopyBlit(struct intel_context *intel,
ADVANCE_BATCH();
}
else {
assert(dst_x < dst_x2);
assert(h > 0);
BEGIN_BATCH(8, INTEL_BATCH_NO_CLIPRECTS);
OUT_BATCH(CMD);
OUT_BATCH(BR13);
@@ -480,6 +493,9 @@ intelClearWithBlit(GLcontext * ctx, GLbitfield mask)
*/
intel_wait_flips(intel, INTEL_BATCH_NO_CLIPRECTS);
assert(b.x1 < b.x2);
assert(b.y1 < b.y2);
BEGIN_BATCH(6, INTEL_BATCH_NO_CLIPRECTS);
OUT_BATCH(CMD);
OUT_BATCH(BR13);

View File

@@ -714,7 +714,8 @@ intel_wait_flips(struct intel_context *intel, GLuint batch_flags)
BUFFER_BIT_FRONT_LEFT ? BUFFER_FRONT_LEFT :
BUFFER_BACK_LEFT);
if (intel_fb->Base.Name == 0 && intel_rb->pf_pending == intel_fb->pf_seq) {
if (intel_fb->Base.Name == 0 && intel_rb &&
intel_rb->pf_pending == intel_fb->pf_seq) {
GLint pf_pipes = intel_fb->pf_pipes;
BATCH_LOCALS;
@@ -1019,16 +1020,11 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
/*
* How many color buffers are we drawing into?
*/
if (fb->_NumColorDrawBuffers[0] != 1
#if 0
/* XXX FBO temporary - always use software rendering */
|| 1
#endif
) {
if (fb->_NumColorDrawBuffers[0] != 1) {
/* writing to 0 or 2 or 4 color buffers */
/*_mesa_debug(ctx, "Software rendering\n");*/
FALLBACK(intel, INTEL_FALLBACK_DRAW_BUFFER, GL_TRUE);
front = 1; /* might not have back color buffer */
colorRegion = NULL;
}
else {
/* draw to exactly one color buffer */
@@ -1037,30 +1033,30 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
if (fb->_ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT) {
front = 1;
}
}
/*
* Get the intel_renderbuffer for the colorbuffer we're drawing into.
* And set up cliprects.
*/
if (fb->Name == 0) {
/* drawing to window system buffer */
if (front) {
intelSetFrontClipRects(intel);
colorRegion = intel_get_rb_region(fb, BUFFER_FRONT_LEFT);
/*
* Get the intel_renderbuffer for the colorbuffer we're drawing into.
* And set up cliprects.
*/
if (fb->Name == 0) {
/* drawing to window system buffer */
if (front) {
intelSetFrontClipRects(intel);
colorRegion = intel_get_rb_region(fb, BUFFER_FRONT_LEFT);
}
else {
intelSetBackClipRects(intel);
colorRegion = intel_get_rb_region(fb, BUFFER_BACK_LEFT);
}
}
else {
intelSetBackClipRects(intel);
colorRegion = intel_get_rb_region(fb, BUFFER_BACK_LEFT);
/* drawing to user-created FBO */
struct intel_renderbuffer *irb;
intelSetRenderbufferClipRects(intel);
irb = intel_renderbuffer(fb->_ColorDrawBuffers[0][0]);
colorRegion = (irb && irb->region) ? irb->region : NULL;
}
}
else {
/* drawing to user-created FBO */
struct intel_renderbuffer *irb;
intelSetRenderbufferClipRects(intel);
irb = intel_renderbuffer(fb->_ColorDrawBuffers[0][0]);
colorRegion = (irb && irb->region) ? irb->region : NULL;
}
/* Update culling direction which changes depending on the
* orientation of the buffer:

View File

@@ -315,7 +315,7 @@ intelFinish(GLcontext * ctx)
intelFlush(ctx);
if (intel->batch->last_fence) {
driFenceFinish(intel->batch->last_fence,
0, GL_FALSE);
DRM_FENCE_TYPE_EXE | DRM_I915_FENCE_TYPE_RW, GL_FALSE);
driFenceUnReference(intel->batch->last_fence);
intel->batch->last_fence = NULL;
}

View File

@@ -189,6 +189,7 @@ struct intel_context
struct _DriFenceObject *first_swap_fence;
struct intel_batchbuffer *batch;
GLuint last_state_batch_id;
struct
{

View File

@@ -75,6 +75,7 @@ intel_miptree_create(struct intel_context *intel,
mt->cpp = compress_byte ? compress_byte : cpp;
mt->compressed = compress_byte ? 1 : 0;
mt->refcount = 1;
mt->pitch = 0;
switch (intel->intelScreen->deviceID) {
case PCI_CHIP_I945_G:
@@ -83,7 +84,7 @@ intel_miptree_create(struct intel_context *intel,
case PCI_CHIP_G33_G:
case PCI_CHIP_Q33_G:
case PCI_CHIP_Q35_G:
ok = i945_miptree_layout(mt);
ok = i945_miptree_layout(intel, mt);
break;
case PCI_CHIP_I915_G:
case PCI_CHIP_I915_GM:
@@ -93,28 +94,12 @@ intel_miptree_create(struct intel_context *intel,
default:
/* All the i830 chips and the i915 use this layout:
*/
ok = i915_miptree_layout(mt);
ok = i915_miptree_layout(intel, mt);
break;
}
if (ok) {
if (!mt->compressed) {
/* XXX: Align pitch to multiple of 64 bytes for now to allow
* render-to-texture to work in all cases. This should probably be
* replaced at some point by some scheme to only do this when really
* necessary.
*/
mt->pitch = (mt->pitch * cpp + 63) & ~63;
/* XXX: At least the i915 seems very upset when the pitch is a multiple
* of 1024 and sometimes 512 bytes - performance can drop by several
* times. Go to the next multiple of 64 for now.
*/
if (!(mt->pitch & 511))
mt->pitch += 64;
mt->pitch /= cpp;
}
assert (mt->pitch);
mt->region = intel_region_alloc(intel->intelScreen,
mt->cpp, mt->pitch, mt->total_height);
@@ -128,6 +113,42 @@ intel_miptree_create(struct intel_context *intel,
return mt;
}
/**
* intel_miptree_pitch_align:
*
* @intel: intel context pointer
*
* @mt: the miptree to compute pitch alignment for
*
* @pitch: the natural pitch value
*
* Given @pitch, compute a larger value which accounts for
* any necessary alignment required by the device
*/
int intel_miptree_pitch_align (struct intel_context *intel,
struct intel_mipmap_tree *mt,
int pitch)
{
if (!mt->compressed) {
/* XXX: Align pitch to multiple of 64 bytes for now to allow
* render-to-texture to work in all cases. This should probably be
* replaced at some point by some scheme to only do this when really
* necessary.
*/
pitch = (pitch * mt->cpp + 63) & ~63;
/* XXX: At least the i915 seems very upset when the pitch is a multiple
* of 1024 and sometimes 512 bytes - performance can drop by several
* times. Go to the next multiple of the required alignment for now.
*/
if (!(pitch & 511))
pitch += 64;
pitch /= mt->cpp;
}
return pitch;
}
void
intel_miptree_reference(struct intel_mipmap_tree **dst,
@@ -344,6 +365,7 @@ intel_miptree_image_data(struct intel_context *intel,
}
}
extern GLuint intel_compressed_alignment(GLenum);
/* Copy mipmap image between trees
*/
void
@@ -361,8 +383,12 @@ intel_miptree_image_copy(struct intel_context *intel,
const GLuint *src_depth_offset = intel_miptree_depth_offsets(src, level);
GLuint i;
if (dst->compressed)
height /= 4;
if (dst->compressed) {
GLuint alignment = intel_compressed_alignment(dst->internal_format);
height = (height + 3) / 4;
width = ((width + alignment - 1) & ~(alignment - 1));
}
for (i = 0; i < depth; i++) {
intel_region_copy(intel->intelScreen,
dst->region, dst_offset + dst_depth_offset[i],

View File

@@ -123,6 +123,10 @@ struct intel_mipmap_tree *intel_miptree_create(struct intel_context *intel,
GLuint cpp,
GLuint compress_byte);
int intel_miptree_pitch_align (struct intel_context *intel,
struct intel_mipmap_tree *mt,
int pitch);
void intel_miptree_reference(struct intel_mipmap_tree **dst,
struct intel_mipmap_tree *src);
@@ -190,8 +194,10 @@ void intel_miptree_image_copy(struct intel_context *intel,
/* i915_mipmap_tree.c:
*/
GLboolean i915_miptree_layout(struct intel_mipmap_tree *mt);
GLboolean i945_miptree_layout(struct intel_mipmap_tree *mt);
GLboolean i915_miptree_layout(struct intel_context *intel,
struct intel_mipmap_tree *mt);
GLboolean i945_miptree_layout(struct intel_context *intel,
struct intel_mipmap_tree *mt);

View File

@@ -214,7 +214,7 @@ intel_run_render(GLcontext * ctx, struct tnl_pipeline_stage *stage)
tnl->Driver.Render.Start(ctx);
for (i = 0; i < VB->PrimitiveCount; i++) {
GLuint prim = VB->Primitive[i].mode;
GLuint prim = _tnl_translate_prim(&VB->Primitive[i]);
GLuint start = VB->Primitive[i].start;
GLuint length = VB->Primitive[i].count;

View File

@@ -56,7 +56,7 @@ PUBLIC const char __driConfigOptions[] =
DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_0)
DRI_CONF_SECTION_END DRI_CONF_SECTION_QUALITY
DRI_CONF_FORCE_S3TC_ENABLE(false)
DRI_CONF_ALLOW_LARGE_TEXTURES(1)
DRI_CONF_ALLOW_LARGE_TEXTURES(2)
DRI_CONF_SECTION_END DRI_CONF_END;
const GLuint __driNConfigOptions = 4;

View File

@@ -95,6 +95,7 @@ typedef struct
struct _DriBufferPool *regionPool;
struct _DriBufferPool *staticPool;
unsigned int maxBatchSize;
unsigned batch_id;
GLboolean havePools;
} intelScreenPrivate;

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