Compare commits

...

917 Commits

Author SHA1 Message Date
Ian Romanick
85396d8ef4 intel: Bump driver date 2009-04-15 15:12:48 -07:00
Ian Romanick
f11b84998d docs: more bug fixes for Mesa 7.4.1 2009-04-15 15:10:33 -07:00
Brian Paul
d2f6791062 glx: added null pointer check in glXGetFBConfigs()
Fixes segfault seen with glxinfo with NVIDIA OpenGL.

(cherry picked from master, commit 05471828dc)
2009-04-15 08:02:38 -06:00
Ian Romanick
49e0c74ddd DRI2: Don't fault on NULL DrawBuffer
It is possible for ctx->DrawBuffer to be NULL, so don't fault when
that happens.  This change is not being committed to master because it
doesn't appear to be necessary there.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-04-11 20:24:15 -07:00
Eric Anholt
83e14773c5 dri2: Don't crash if the server returns more buffers than expected.
(cherry picked from commit f967e8b507)
2009-04-09 15:15:33 -07:00
Ian Romanick
4605937843 intel / DRI2: Accept fake front-buffer from loader
Handle the loader returning a fake front-buffer.  Since the driver
never specifically requests a fake front-buffer, the driver assumes
that it will never receive both a fake and a real front-buffer.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
(cherry picked from commit 6a6e478e55)
2009-04-09 14:44:53 -07:00
Ian Romanick
b8ef30c45c DRI2: Assume that there is always a front buffer
Assume that the front-buffer exists even if the server didn't tell the
client that it exists.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
(cherry picked from commit e6386e0d9a)
2009-04-09 14:44:44 -07:00
Ian Romanick
4f17040cb1 intel / DRI2: Track and flush front-buffer rendering
Track two flags:  whether or not front-buffer rendering is currently
enabled and whether or not front-buffer rendering has been enabled
since the last glFlush.  If the second flag is set, the front-buffer
is flushed via a loader call back.  If the first flag is cleared, the
second flag is cleared at this time.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
(cherry picked from commit 43cf0d1eeb)
2009-04-09 14:44:34 -07:00
Ian Romanick
98c2c9ef8c DRI2: Provide an interface for drivers to flush front-buffer rendering
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
(cherry picked from commit 82634ee8df)
2009-04-09 14:44:17 -07:00
Brian Paul
d805c82068 mesa: fix potential recursive locking deadlock in _mesa_HashWalk()
If the walk callback called _mesa_HashRemove() we'd deadlock.

(cherry picked from master, commit deff099215)
2009-04-09 10:55:06 -06:00
Brian Paul
6c3bec4387 swrast: fix point rendering function selection
Need to clamp default point size to min/max range before checking if it's one.
Fixes glean pointAtten test.

(cherry picked from master, commit 228f20e324)
2009-04-07 13:44:50 -06:00
Brian Paul
7d3561c871 docs: more bug fixes for Mesa 7.4.1 2009-04-07 08:37:22 -06:00
Brian Paul
5c47d53924 mesa: in mesa_add_named_constant(), avoid adding duplicate constants
(cherry picked from master, commit 80197a0c1b)
2009-04-07 08:35:01 -06:00
Brian Paul
a18216308a mesa: fix parameter counting in ARB vertex/fragment program parsing
Duplicated unnamed constants were getting counted more than once.

(cherry picked from master, commit 866bdd0509)
2009-04-07 08:34:32 -06:00
Brian Paul
14f13fbcfa mesa: replace >= with > when testing if we've exceeded max local params
Now a program that uses 256 locals works as it should.

(cherry picked from master, commit a4173956eb)
2009-04-07 08:34:04 -06:00
Brian Paul
ca24095c1e mesa: only clear matrix MAT_DIRTY_INVERSE flag when we actually compute the inverse
If _math_matrix_analyse() got called before we allocated the inverse
matrix array we could lose the flag indicating that we needed to compute
the inverse.  This could happen with certain vertex shader cases.

(cherry picked from master, commit ce461ffc5a)
2009-04-07 08:33:43 -06:00
Brian Paul
d5e0e03d43 mesa: for OPCODE_LIT, use _mesa_pow() instead of exp() and log()
Also, s/pow/_mesa_pow/

(cherry picked from master, commit b8a200ac9d)
2009-04-07 08:32:42 -06:00
Michel Dänzer
775ca8e3fa radeon: Expose a 32 bit RGBA fbconfig even when the screen depth is 16.
Otherwise current xserver / libGL no longer expose a 32 bit RGBA GLX visual,
and compiz fails.

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

(Cherry picked from commit e798bf8053)
2009-04-06 09:27:17 +02:00
Brian Paul
39345a4928 mesa: don't normalize spot light direction until validation time
In glLight() we're only supposed to transform the direction by the modelview
matrix, not normalized it too.

(cherry picked from commit 650d147289)
2009-04-03 10:16:31 -06:00
Roland Scheidegger
7be149cfd1 mesa: fix TexParameter functions
premature return in TexParameterf caused mesa to never call Driver.TexParameter
breaking drivers relying on this (fix bug #20966).
While here, also fix using ctx->ErrorValue when deciding to call
Driver.TexParameter. Errors are sticky and uncleared errors thus would cause
this to no longer get called. Since we thus need return value of
set_tex_parameter[if] can also optimize this to only call when value changed.
2009-04-03 00:00:40 +02:00
Brian Paul
8c9d7b2474 docs: fix TXB texture unit bias error 2009-04-02 13:11:56 -06:00
Brian Paul
6ef0951b17 mesa: don't call ctx->Driver.ReadPixels() if width or height is zero
(cherry picked from commit master, 7b9bf39543)
2009-04-02 13:11:33 -06:00
Brian Paul
2b33b77337 mesa: don't call ctx->Driver.Draw/CopyPixels() if width or height is zero
(cherry picked from master, commit f6a3f1f52a)
2009-04-02 13:10:41 -06:00
Brian Paul
0590edeea0 mesa: use correct tex unit lod bias for TXB instruction
(cherry picked from master, commit 1ab225017e)
2009-04-02 13:09:32 -06:00
Brian Paul
7511d76bd7 swrast: fix glDrawBuffer(GL_FRONT_AND_BACK)
We weren't putting the right colors into the back buffer in this mode.

(cherry picked from master, commit 9cc79fc2dc)
2009-04-02 13:07:53 -06:00
Brian Paul
7f30aba920 docs: fix bug 20986 2009-04-01 07:39:43 -06:00
Brian Paul
4fa700260e glsl: fix texgen state variable tokens in emit_statevars()
This fixes broken variable indexing into the gl_Eye/ObjectPlaneS/T/R/Q arrays.
See bug 20986.

(cherry picked from master, commit f8dd6594bf)
2009-04-01 07:39:26 -06:00
Brian Paul
781fb79c59 docs: first 7.4.1 bug fixes 2009-03-31 16:29:23 -06:00
Brian Paul
5b7e9f2f3a mesa: fix bug in GPU codegen for fixed-function two-sided lighting
The 'dots' register wasn't getting properly un-negated and un-swizzled
after emitting the code for back-face lighting.  So, if more than one
light source was enabled, the specular exponent for the next light source
was wrong.

During execution we were evaluating pow(x, y) where y was negative instead
of positive.  This led to the outcome being zero or NaN.

This fixes the occasional black triangles seen in isosurf when hacked to
enable two-sided lighting.

(cherry picked from master, commit 919f57078b)
2009-03-31 16:28:17 -06:00
Brian Paul
d4d4b63d7f docs: prep for Mesa 7.4.1 release notes 2009-03-31 16:26:24 -06:00
Jeremy Huddleston
9e9fe51acd Updated CPU_TO_LE32 to work on darwin 2009-03-31 14:59:28 -07:00
Jeremy Huddleston
b65bc1b6cb Fix compiling indirect.c when GLX_DIRECT_RENDERING is not defined 2009-03-31 14:48:19 -07:00
Jeremy Huddleston
6cb796f6fc Updated darwin config for when X11 is not in the same location as we're installing to
(cherry picked from commit 7817fea0b6)
2009-03-31 14:37:27 -07:00
Brian Paul
de197cf991 docs: 7.4 release md5 sums 2009-03-27 19:12:16 -06:00
Brian Paul
bf1e6581a5 docs: set 7.4 release date 2009-03-27 18:57:39 -06:00
Brian Paul
80ec7843bc mesa: set VERSION=7.4 2009-03-27 18:57:23 -06:00
Brian Paul
366d6e8cd1 mesa: set version to 7.4 2009-03-27 18:57:07 -06:00
Ian Romanick
63ed288396 intel: Add extra, stronger flushes around CopyTexSubImage blits 2009-03-27 15:22:27 -07:00
Eric Anholt
88ce34f400 swrast: Add support for x8r8g8b8 fbconfig.
This lets swrast produce an fbconfig suitable for the root visual now that
the server's not allowing mismatched fbconfigs.
(cherry picked from commit 529d1d720e)
2009-03-27 15:20:09 -07:00
Ian Romanick
f535de8721 Mark current bits as 2009Q1-RC2 for Intel driver. 2009-03-26 15:32:29 -07:00
Eric Anholt
1db913f687 i965: Fix glFrontFacing in twoside GLSL demo.
This also cuts instructions by just using the existing bit in the payload
rather than computing it from the determinant in the SF unit and passing it
as a varying down to the WM.  Something still goes wrong with getting the
backface color right, but a simpler shader appears to get the right result.
(cherry picked from commit 699db6d842)
2009-03-26 15:15:51 -07:00
Eric Anholt
0e5d1f43af i965: Fix fog coordinate g,b,a values when glFrontFacing isn't used.
Previously, we would sample (f,glFrontFacing,undef,undef) instead of the
(f,0,0,1) that fragment.fogcoord is supposed to return.  Due to
glFrontFacing's presence in FOGC.y, we'll still give bad results there when
glFrontFacing is used.

Bug #19122, piglit testcase fp-fog.
(cherry picked from commit 411d913cce)
2009-03-26 15:15:27 -07:00
Eric Anholt
09c587ae55 i965: Clean up a bit of mess with unneeded variables in emit_interp.
(cherry picked from commit b013f945d8)
2009-03-26 15:15:14 -07:00
Brian Paul
775d8431e9 i965: separate emit_op() and emit_tex_op() functions
(cherry picked from commit a79186e29e)
2009-03-26 15:14:56 -07:00
Brian Paul
3217ea8a1d i965: minor clean-up, comments, etc.
(cherry picked from commit 9e7903e492)
2009-03-26 15:14:22 -07:00
Brian Paul
00aea5853d docs: mention Solaris updates in release notes 2009-03-25 21:08:21 -06:00
Brian Paul
20d34b50b5 mesa: bump version to 7.4 rc2 2009-03-25 21:06:41 -06:00
Alan Coopersmith
9cff0acb36 define __builtin_expect for non-gcc compilers in two more glx files
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-03-25 16:26:03 -07:00
Alan Coopersmith
791b59493f mklib improvements for Solaris
Move flags for linking standard C/C++ libraries from configure.ac to mklib
Use -norunpath flag when linking with Sun C++ compiler
Convert mklib -exports list into a linker mapfile
Set FINAL_LIBS correctly when -noprefix is used

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-03-25 16:26:02 -07:00
Michel Dänzer
7dff7029fa Revert "dri2: Avoid round-tripping on DRI2GetBuffers for the same set of buffers."
This scheme breaks when the display connection doesn't receive ConfigureNotify
events. This caused reporoducible problems (cropped / misplaced output) when
starting a 3D application in a guest operating system in VMware Workstation.

This reverts commit dd1c68f151.

Conflicts:

	src/glx/x11/dri2_glx.c
(cherry picked from commit 11da7e02aa)
2009-03-25 15:55:20 +01:00
Brian Paul
f8fd9bc46b docs: update glext.h to version 48 2009-03-25 08:35:15 -06:00
Brian Paul
53f0e141c0 gl: update include/GL/glext.h to version 48 2009-03-25 08:35:02 -06:00
Brian Paul
14a794300e demos: add LDFLAGS for corender target, bug 20844
(cherry picked from commit c4c4358e08)
2009-03-24 16:09:23 -06:00
Eric Anholt
912ec292c1 i965: Fix occlusion query when no other WM state updates occur.
Turns out that XXX comment was important.  We weren't flagging the WM to
re-update with the statistics enable, so we got zeroes out of our query.

Bug #20740, fixes piglit occlusion_query test.

Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit c0d6e07909)
2009-03-23 12:49:31 -07:00
Tom Fogal
e814b5ae2f mesa: fix _glxapi_get_proc_address() for mangled names
(cherry picked from commit 7399d56ec6)
2009-03-23 12:49:13 -07:00
Brian Paul
0fea05915a glapi: update find_entry() for mangled names
(cherry picked from commit 4447fddc82)
2009-03-23 12:49:05 -07:00
Brian Paul
dfa44f0ff9 mesa: regenerated gl_mange.h file
(cherry picked from commit fe0ccf323d)
2009-03-23 12:48:56 -07:00
Brian Paul
f850ff2bcc mesa: remove unused 'out' label 2009-03-23 08:27:00 -06:00
Brian Paul
66f972ab55 Add Solaris to OS'es using PROT_EXEC mmap() to get executable heap space
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

(cherry picked from master, commit a06dd4de87)
2009-03-23 08:18:48 -06:00
Brian Paul
17db2db9dc docs: prep for 7.4 release 2009-03-20 17:34:54 -06:00
Brian Paul
dba79af9bc mesa: prep for 7.4-rc1 release 2009-03-20 17:26:04 -06:00
Brian Paul
b009a32bf4 r300: don't crash on sw tcl hw if point size vertex attrib is sent
(cherry picked from master, commit 005ad1a71d)
2009-03-20 08:49:39 -06:00
Brian Paul
7122490982 mesa: avoid setting texObj->_Complete = GL_FALSE when there's no state change
Avoid a little bit of unneeded state validation and fixes a bug where the
texture complete flags was set to false, but we didn't signal _NEW_TEXTURE.

Fixes piglit tex1d-2dborder failure.
(cherry picked from commit aad3f546a0)
2009-03-18 14:47:47 -07:00
Brian Paul
6ada1d47d9 mesa: add no-change testing for a few more texture parameters
(cherry picked from commit 37c768b36a)
2009-03-18 10:54:09 -07:00
Robert Ellison
55865335f4 i965: fix polygon stipple when rendering to FBO
The polygon stipple pattern, like the viewport and the
polygon face orientation, must be inverted on the i965
when rendering to a FBO (which itself has an inverted pixel
coordinate system compared to raw Mesa).

In addition, the polygon stipple offset, which orients
the stipple to the window system, disappears when rendering
to an FBO (because the window system offset doesn't apply,
and there's no associated FBO offset).

With these fixes, the conform triangle and polygon stipple
tests pass when rendering to texture.
(cherry picked from commit 29309b45b0)
2009-03-18 10:47:24 -07:00
Robert Ellison
918e5221ef i965: fix polygon face orientation when rendering to FBO
In the i965, the FBO coordinate system is inverted from the standard
OpenGL/Mesa coordinate system; that means that the viewport and the
polygon face orientation have to be inverted if rendering to a FBO.

The viewport was already being handled correctly; but polygon face
was not.  This caused a conform failure when rendering to texture with
two-sided lighting enabled.

This fixes the problem in the i965 driver, and adds to the comment about
the gl_framebuffer "Name" field so that this isn't a surprise to other
driver writers.
(cherry picked from commit 6dceeb2eb8)
2009-03-18 10:47:24 -07:00
Brian Paul
9feb26584a swrast: use better _swrast_compute_lambda() function
The MAX-based function can produce values that are non-monotonic for a span
which causes glitches in texture filtering.  The sqrt-based one avoids that.

This is perhaps slightly slower than before, but the difference
probably isn't noticable given we're doing software mipmap filtering.

Issue reported by Nir Radian <nirr@horizonsemi.com>

(cherry picked from master, commit c334ce273e)
2009-03-17 10:34:45 -06:00
Ian Romanick
a8528a2e86 Mark current bits as 2009Q1-RC1 for Intel driver. 2009-03-16 13:39:32 -07:00
Brian Paul
119360cccd i965: init dest reg CondMask = COND_TR (the proper default)
Plus fix up a debug printf.
(cherry picked from commit 20f49252e1)
2009-03-13 17:38:40 -07:00
Brian Paul
ac2216542d glsl: fix vec4_texp_rect IR code (need projective version) (cherry picked from commit ad2cfa4199) 2009-03-13 17:38:40 -07:00
Brian Paul
37e5c057f1 i965: check if we run out of GRF/temp registers
Before this change we would up emitting instructions with invalid register
numbers.  This typically (but not always) hung the GPU.  For now, just
prevent emitting bad instructions to avoid hangs.  Still need to do some
kind of proper error recovery.
(cherry picked from commit e60b3067d8)
2009-03-13 17:38:40 -07:00
Brian Paul
4d9b8e0f93 mesa: added _mesa_fprintf() wrapper (cherry picked from commit 596b8fbbbf) 2009-03-13 17:38:40 -07:00
Brian Paul
c1b71f46b5 i965: fix emit_math1() function used for scalar instructions
Instructions such as RCP, RSQ, LOG must smear the result of the function
across the dest register's X, Y, Z and W channels (subject to write masking).
Before this change, only the X component was getting written.

Among other things, this fixes cube map texture sampling in GLSL shaders
(since cube lookups involve normalizing the texcoord).
(cherry picked from commit 3485801978)
2009-03-13 17:38:39 -07:00
Brian Paul
4a25ac9564 i965: rewrite the code for handling shader subroutine calls
Previously, the prog_instruction::Data field was used to map original Mesa
instructions to brw instructions in order to resolve subroutine calls.  This
was a rather tangled mess.  Plus it's an obstacle to implementing dynamic
allocation/growing of the instruction buffer (it's still a fixed size).

Mesa's GLSL compiler emits a label for each subroutine and CAL instruction.
Now we use those labels to patch the subroutine calls after code generation
has been done.  We just keep a list of all CAL instructions that needs patching
and a list of all subroutine labels.  It's a simple matter to resolve them.

This also consolidates some redundant post-emit code between brw_vs_emit.c and
brw_wm_glsl.c and removes some loops that cleared the prog_instruction::Data
fields at the end.

Plus, a bunch of new comments.
(cherry picked from commit c51c822ee0)
2009-03-13 17:38:39 -07:00
Eric Anholt
35d965b39b intel: Fix bpp setting of blits to 8bpp targets.
This was causing hangs in cairogears, as we would blit to the 8bpp target
(A8 texture) as 16bpp, and stomp over state objects.
(cherry picked from commit 19e134051c)
2009-03-13 17:38:39 -07:00
Robert Ellison
d0aab00609 i965: add software fallback for conformant 3D textures and GL_CLAMP
The i965 hardware cannot do GL_CLAMP behavior on textures; an earlier
commit forced a software fallback if strict conformance was required
(i.e. the INTEL_STRICT_CONFORMANCE environment variable was set) and
2D textures were used, but it was somewhat flawed - it could trigger
the software fallback even if 2D textures weren't enabled, as long
as one texture unit was enabled.

This fixes that, and adds software fallback for GL_CLAMP behavior with
1D and 3D textures.

It also adds support for a particular setting of the INTEL_STRICT_CONFORMANCE
environment variable, which forces software fallbacks to be taken *all*
the time.  This is helpful with debugging.  The value is:
   export INTEL_STRICT_CONFORMANCE=2
(cherry picked from commit 3468315087)
2009-03-13 17:38:39 -07:00
Brian Paul
ef33d0f103 mesa: don't draw arrays if vertex position array is not enabled
For regular GL, we must have vertex positions in order to draw.  But ES2
doesn't have that requirement (positions can be computed from any array
of data).

See bug 19911.
(cherry picked from commit 97dd2ddbd9)
2009-03-13 17:38:39 -07:00
Robert Ellison
349b819768 i965: texture fixes: bordered textures, fallback rendering
i965 doesn't natively support GL_CLAMP; it treats it like
GL_CLAMP_TO_EDGE, which fails conformance tests.

This fix adds a clause to the check_fallbacks() test to check
whether GL_CLAMP is in use on any enabled 2D texture.  If so,
and if strict conformance is required (via INTEL_STRICT_CONFORMANCE),
a software fallback is mandated.

In addition, validate textures *before* checking for fallbacks,
rather than after; otherwise, the texture state is never validated
and can't be trusted.  (In particular, if texturing is enabled and
the sampler would access any level beyond level 0 of a texture, the
sampler will segfault, because texture validation sets the firstLevel
and lastLevel fields of a texture object so that the valid levels
will be mapped and accessed correctly.  If texture validation doesn't
occur, only level 0 is accessed correctly, and that only because
firstLevel and lastLevel happen to be set to 0.)
(cherry picked from commit 17c7852bf9)
2009-03-13 17:38:39 -07:00
Dave Airlie
50443db882 texmem: fix typo from brianp's changes.
Reported by cjb via tinderbox on irc
(cherry picked from commit 487a55af78)
2009-03-13 17:38:39 -07:00
Brian Paul
c503cacb53 mesa: use an array for current texture objects
Use loops to consolidate lots of texture object code.
(cherry picked from commit 9818734e01)
2009-03-13 17:38:39 -07:00
Brian Paul
e862b4e38f mesa: use an array for default texture objects
Replace Default1D/2D/3D/Cube/etc with DefaultTex[TEXTURE_x_INDEX].
The same should be done with the Current1D/2D/3D/etc pointers...
(cherry picked from commit 4d24b639d1)
2009-03-13 17:38:39 -07:00
Robert Ellison
e9dfc858fb Fix an i965 assertion failure on glClear()
While running conform with render-to-texture:

	conform -d 33 -v 2 -t -direct

the i965 driver failed this assertion:

intel_clear.c:77: intel_clear_tris: Assertion `(mask & ~((1 << BUFFER_BACK_LEFT) | (1 << BUFFER_FRONT_LEFT) | (1 << BUFFER_DEPTH) | (1 << BUFFER_STENCIL))) == 0' failed.

The problem is that intel_clear_tris() is called by intelClear() to
clear any and all of the available color buffers, but intel_clear_tris()
actually only handles the back left and front left color buffers; so
the assertion fails as soon as you try to clear a non-standard color
buffer.

The fix is to have intelClear() only call intel_clear_tris() with
buffers that intel_clear_tris() can support.  intelClear() already backs
down to _swrast_Clear() for all buffers that aren't handled explicitly.
(cherry picked from commit 0ccbc3c905)
2009-03-13 17:38:39 -07:00
Brian Paul
5efbca1e21 intel: fix datatype typo, s/GLboolean/GLuint/
Fixes mysterious failures in glean glsl1 test.
(cherry picked from commit da2b661ee4)
2009-03-13 17:38:39 -07:00
Kristian Høgsberg
d6d8663a88 intel: Fix intelSetTexBuffer miptree leak.
The intelImage also holds a reference to the miptree, so unref that as well.
(cherry picked from commit 5b354d39d4)
2009-03-13 17:38:39 -07:00
Eric Anholt
13990bd98a intel: tell libdrm whether we want a cpu-ready or gpu-ready BO for regions.
This lets us avoid allocing new buffers for renderbuffers, finalized miptrees,
and PBO-uploaded textures when there's an unreferenced but still active one
cached, while also avoiding CPU waits for batchbuffers and CPU-uploaded
textures.  The size of BOs allocated for a desktop running current GL
cairogears on i915 is cut in half with this.

Note that this means we require libdrm 2.4.5.
(cherry picked from commit 40dd024be6)
2009-03-13 17:38:39 -07:00
Eric Anholt
def630d0a2 i965: Fix render target read domains.
We were asking for something illegal (write_domain != 0 && read_domains !=
write_domain) because at the time of writing the region surfaces were used
for texturing occasionally as well, and we weren't really clear on the model
GEM was going to use.

This reliably triggered a kernel bug with domain handling, resulting in
oglconform mustpass.c failure.  Of course, it only became visible after
01bc4d441f cleaned up some gratuitous flushing.
(cherry picked from commit 078e8a61b2)
2009-03-13 17:38:39 -07:00
Eric Anholt
ca2564f1e6 intel: Don't do the extra MI_FLUSH in flushing except when doing glFlush().
Everything other than "make sure the last rendering ends up visible on the
screen" doesn't need that behavior.
(cherry picked from commit 01bc4d441f)
2009-03-13 17:38:38 -07:00
Eric Anholt
711a57f7c7 intel: don't crash when dri2 tells us about buffers we don't care about. (cherry picked from commit f82f1ffba9) 2009-03-13 17:38:38 -07:00
Eric Anholt
058cf2fff1 dri2: Initialize variables for the getbuffers round-trip reduction.
Missed setting the initial values which usually didn't hurt at runtime.
(cherry picked from commit 680c708dee)
2009-03-13 17:38:38 -07:00
Eric Anholt
715f509c5d intel: Fix tri clear to do FBO color attachments as well.
This is a 2% win in fbo_firecube, and would avoid a sw fallback for
masked clears.
(cherry picked from commit fd51cf1531)
2009-03-13 17:38:38 -07:00
Eric Anholt
e704e6c6f3 i965: Fix fallback on stencil drawing to fbo when the visual lacks stencil.
Noticed this with the fbotexture demo.
(cherry picked from commit c06f4e2a37)
2009-03-13 17:38:38 -07:00
Brian Paul
01f34e667a i965: need to disable current shader, if any, in intel_clear_tris()
Fixes bad background in all the progs/glsl/ tests.
(cherry picked from commit 60b3fe6c19)
2009-03-13 17:38:38 -07:00
Eric Anholt
4d0a7b33c5 intel: Speed up glDrawPixels(GL_ALPHA) by using an alpha texture format. (cherry picked from commit 0b63f6449e) 2009-03-13 17:38:38 -07:00
Eric Anholt
fb1d2ed34c intel: Fix some state leakage of {Client,}ActiveTexture in metaops.
Found while debugging cairo-gl.
(cherry picked from commit d11981e0d7)
2009-03-13 17:38:38 -07:00
Eric Anholt
9395fedf98 i965: Remove brw->attribs now that we can just always look in the GLcontext. (cherry picked from commit 052c1d66a1) 2009-03-13 17:38:38 -07:00
Eric Anholt
9abc0d80af i965: Delete old metaops code now that there are no remaining consumers. (cherry picked from commit 14321fcfde) 2009-03-13 17:38:38 -07:00
Brian Paul
90e89c01df i965: init array->Format fields (see bug 19708) (cherry picked from commit 628b52241b) 2009-03-13 17:38:38 -07:00
Eric Anholt
790d93e362 intel: If we're doing a depth clear with tris, do color with it.
This is a 10% win on the ever-important glxgears not-a-benchmark.
(cherry picked from commit 67ee22c89f)
2009-03-13 17:38:38 -07:00
Eric Anholt
e9f3783169 i915: Only call CalcViewport from DrawBuffers instead of Viewport.
This saves an inadvertent round-trip to the X Server on DrawBuffers, which was
hurting some metaops.
(cherry picked from commit ac0dfbdf0f)
2009-03-13 17:38:38 -07:00
Brian Paul
e41780fedc intel: move some driver functions around
A step toward consolidating i915/intel_state.c and i965/intel_state.c
(cherry picked from commit 84c8b5bbf9)
2009-03-13 17:38:38 -07:00
Eric Anholt
d0edbbb3f3 intel: replace custom metaops clear with generic.
No real-world impact on performance seen.  Even glxgears seems to be, if
anything, happier.
(cherry picked from commit c96bac0950)
2009-03-13 17:38:38 -07:00
Brian Paul
e10119c23e intel: make intelUpdateScreenFromSAREA() static (cherry picked from commit aae2729aeb) 2009-03-13 17:38:38 -07:00
Brian Paul
208c087f39 intel: remove unused var (cherry picked from commit 66c7f06413) 2009-03-13 17:38:38 -07:00
Shaohua Li
0c8b40b42b i915: Add support for a new G33-like chipset.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 40290745ea)
2009-03-13 17:38:37 -07:00
Xiang, Haihao
5199f451bb i965: fix for RHW workaround
It is possible that an object whose vertices all are outside of a
view plane is passed to clip thread due to the RHW workaround. This
object should be rejected by clip thread. Fix bug #19879
(cherry picked from commit 68915fd6fa)
2009-03-13 17:38:37 -07:00
Brian Paul
dd7cde5230 i965: tell GLSL compiler to emit code using condition codes
The default for EmitCondCodes got flipped when gallium-0.2 was merged.
This fixes GLSL if/else/endif regressions.
Drivers that use GLSL should always explicitly set the flag to be safe.
(cherry picked from commit a9e753c84c)
2009-03-13 17:38:37 -07:00
Eric Anholt
ab5746e5d8 tdfx: Fix begin/endquery for current API. (cherry picked from commit 0cb295584f) 2009-03-13 17:38:37 -07:00
Brian Paul
3bd446c0ab i965: add missing break for OPCODE_RET case
This doesn't effect correctness, but we were emitting an extraneous ADD.
(cherry picked from commit 74b6d55864)
2009-03-13 17:38:37 -07:00
Brian Paul
9b78402ee4 mesa: more info in error messages (cherry picked from commit 1ca05a066b) 2009-03-13 17:38:37 -07:00
Brian Paul
cf1ef0f308 mesa: minor error msg improvement (cherry picked from commit 803504e69f) 2009-03-13 17:38:37 -07:00
Chris Wilson
fd1f65ba61 intel: Decode MI operands using specific length masks
The MI opcodes have different variable length masks, so use an operand
specific mask to decode the length.
(cherry picked from commit e92d97d75b)
2009-03-13 17:38:37 -07:00
Chris Wilson
967345b497 intel: Correct decoding of 3DSTATE_PIXEL_SHADER_CONSTANTS
A couple of minor typos that proclaimed an error in the wrong command, and
failed to offset the mask.
(cherry picked from commit 05d130a35a)
2009-03-13 17:38:37 -07:00
Ian Romanick
41ad853a6a glxgears: No, really. Fix the dyslexia. (cherry picked from commit 5b5ddfb89c) 2009-03-13 17:38:37 -07:00
Ian Romanick
842baa29cb Fix dyslexia. (cherry picked from commit 9d6880ec8d) 2009-03-13 17:38:37 -07:00
Ian Romanick
9556d870a1 glxgears: Log a message if synched to vblank
Tries to use either GLX_MESA_swap_control or GLX_SGI_video_sync to
detect whether the display is synchronized to the vertical blank.  If
it detects this, a message will be printed.  HOPEFULLY this will
prevent some of the bug reports such as "glxgears only gets 59.7fps.
What's wrong with my driver?"
(cherry picked from commit 58b9cd411f)
2009-03-13 17:38:37 -07:00
Brian Paul
42ce790086 mesa: refactor glTexParameter code (cherry picked from commit 318e53a4bf) 2009-03-13 17:38:37 -07:00
Robert Ellison
b17769af42 mesa: add missing texture_put_row_rgb() function in texrender.c
The wrap_texture() function doesn't set the renderbuffer PutRowRGB() method,
which is used to implement DrawPixels().  This fix adds an implementation
of this method.
(cherry picked from commit 523febe12e)
2009-03-13 17:38:37 -07:00
Brian Paul
9030277b0d intel: move glClear-related code into new intel_clear.c file (cherry picked from commit 4451eb2e75) 2009-03-13 17:38:37 -07:00
Brian Paul
a37a9bf769 intel: Move swap-related functions from intel_buffers.c to new intel_swapbuffers.c (cherry picked from commit 6fcebbe719) 2009-03-13 17:38:37 -07:00
Brian Paul
8afb8a8145 i965: scissor rect was inverted when rendering to texture (cherry picked from commit 3b23a8e07d) 2009-03-13 17:38:37 -07:00
Brian Paul
801f933694 mesa: consolidate glGetTexEnvi/f() code with new get_texenvi() helper (cherry picked from commit ad338c14c2) 2009-03-13 17:38:36 -07:00
Jesse Barnes
75ecd6ebbf intel: fix the mismerge of the vblank pipe enable sanity check
Fix the last merge fix, had the blocks ordered incorrectly.
(cherry picked from commit e57e398960)
2009-03-13 17:38:36 -07:00
Jesse Barnes
1cd7317fdb intel: move pipe enable sanity check to where it belongs
Bah, applied the patches in the wrong order, not Owain's fault...
(cherry picked from commit 216bff5fd4)
2009-03-13 17:38:36 -07:00
Owain Ainsworth
1865291701 intel: fix vblank crtc selection with DRI1 when only one pipe is enabled.
On Mobile chipsets, we often enable PipeB instead of PipeA, but the test
in here was insufficient, falling back to pipe A if the area
intersection returned zero. Therefore, in the case where a window went
off to the top of the left of the screen, it would freeze, waiting on
the wrong vblank.

Fix this mess by checking the sarea for a crtc being zero sized, and in
that case always default to the other one.
(cherry picked from commit 0b5266ff64)
2009-03-13 17:38:36 -07:00
Owain G. Ainsworth
3edbcce7d5 intel: Prevent an "irq is not working" printf when only pipe B is enabled.
intelMakeCurrent is called before intelWindowMoved (in fact, it calls
it), so calculation of the correct vblank crtc has not happened yet.
Fix this by making a function that fixes up a set of vblank flags and
call if from both functions.
(cherry picked from commit 39b4061bb9)
2009-03-13 17:38:36 -07:00
Robert Ellison
b1fb34d0ac i965: fix line stipple fallback for GL_LINE_STRIP primitives
When doing line stipple, the stipple count resets on each line segment,
unless the primitive is a GL_LINE_LOOP or a GL_LINE_STRIP.

The existing code correctly identifies the need for a software fallback
to handle conformant line stipple on GL_LINE_LOOP primitives, but
neglects to make the same assessment on GL_LINE_STRIP primitives.
This fixes it so they match.
(cherry picked from commit 73658ff04f)
2009-03-13 17:38:36 -07:00
Ian Romanick
606099f545 swrast: Enable GL_EXT_stencil_two_side (cherry picked from commit b5fbdef7ec) 2009-03-13 17:38:36 -07:00
Brian Paul
32e3142071 i965: minor improvements in brw_wm_populate_key() (cherry picked from commit 89fddf978c) 2009-03-13 17:38:36 -07:00
Brian Paul
66eea4e104 mesa: fix/update/restore comments related to two-sided stencil (cherry picked from commit a304cc6cca) 2009-03-13 17:38:36 -07:00
Brian Paul
e428cf3afd mesa: initialize ctx->Stencil._BackFace = 1
Back-face stencil operations didn't work correctly because this value was
zero.  It needs to be 1 or 2.  The only place it's set otherwise is in
glEnable/Disable(GL_STENCIL_TEST_TWO_SIDE_EXT).
(cherry picked from commit 2a968113a9)
2009-03-13 17:38:36 -07:00
Ian Romanick
842b5164d2 Track two sets of back-face stencil state
Track separate back-face stencil state for OpenGL 2.0 /
GL_ATI_separate_stencil and GL_EXT_stencil_two_side.  This allows all
three to be enabled in a driver.  One set of state is set via the 2.0
or ATI functions and is used when STENCIL_TEST_TWO_SIDE_EXT is
disabled.  The other is set by StencilFunc and StencilOp when the
active stencil face is set to BACK.  The GL_EXT_stencil_two_side spec has
more details.

http://opengl.org/registry/specs/EXT/stencil_two_side.txt
(cherry picked from commit dde7cb9628)
2009-03-13 17:38:36 -07:00
Brian Paul
a6f7e909a7 mesa: fix transposed red/blue in store_texel_rgb888/bgr888() functions
(cherry picked from master, commit 862dccd560)
2009-03-12 09:32:55 -06:00
Brian Paul
ca87e5a7bd mesa: add missing _glthread_INIT_MUTEX in _mesa_new_framebuffer()
(cherry picked from master, commit 81569c2f69)
2009-03-12 08:12:54 -06:00
Alan Hourihane
45c4b4dfbd xdemos: On termination with esc close the contexts correctly. 2009-03-11 13:36:26 +00:00
Brian Paul
2adaec1226 xmesa: set back-buffer's drawable field
Fixes back-buffer rendering when MESA_BACK_BUFFER=pixmap

(cherry picked from master, commit 22bac2a1a0)
2009-03-09 16:28:50 -06:00
Brian Paul
549586c319 i965: fix cube map lock-up / corruption
If we're using anything but GL_NEAREST sampling of a cube map, we need to
use the BRW_TEXCOORDMODE_CUBE texcoord wrap mode.  Before this, the GPU
would either lock up or subsequent texture filtering would be corrupted.

(cherry picked from master, commit 6f915b10d5)
2009-03-09 11:57:16 -06:00
Dan Nicholson
463ac421a5 autoconf: Restore _GNU_SOURCE for all Linux systems
This catches the linux-uclibc case and any others that were being set
prior to 98fcdf3f. Fixes bug 20345.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
(cherry picked from commit ac55db1d7d)
2009-03-06 07:59:00 -08:00
Brian Paul
6801240205 mesa: Reads must also be done with lock held.
Otherwise two threads might think each made the refcount go zero.

(cherry picked from master, commit 8bbb6b352a)
2009-03-06 07:51:18 -07:00
Brian Paul
a22088b7d5 mesa: Fix typo.
Windows threads block if one over-unlocks them.

(cherry picked from master, commit f6159ba4d5)
2009-03-06 07:50:55 -07:00
Brian Paul
e89c49147f docs: update glext.h to version 46 2009-03-05 08:25:17 -07:00
Brian Paul
67634240d1 gl: update glext.h to version 46 2009-03-05 08:25:09 -07:00
Brian Paul
819b028a8e mesa: fix sw fallback state validation bug
When a hw driver fell back to swrast, swrast wasn't always getting informed
of program changes.  When fixed function is translated into shaders, flags
like _NEW_LIGHT, _NEW_TEXTURE, etc. should really signal _NEW_PROGRAM.
In this case, swrast wasn't seeing _NEW_PROGRAM when new fragment shaders
were generated.

(cherry picked from master, commit de1caa5507)
2009-03-03 14:25:28 -07:00
Brian Paul
a43c30ef41 mesa: update fragResults array in arb_output_attrib_string()
Plus add some comments.

(cherry picked from master, commit a070937c00)
2009-02-27 13:49:58 -07:00
Brian Paul
b65bfde84d mesa: set bufObj->Pointer = NULL after unmapping
Also, ctx->Driver.UnmapBuffer can never be null, so remove conditional.

(cherry picked from master, commit 67025f7893)
2009-02-27 13:13:31 -07:00
Brian Paul
c39e6917ac mesa: if a buffer object is mapped when glDeleteBuffers() is called, unmap it
(cherry picked from master, commit a7f434b486)
2009-02-27 13:05:51 -07:00
Brian Paul
c79079895f mesa: fix incorrect error handling in glBufferDataARB()
If glBufferDataARB() is called while a buffer object is currently mapped
we're supposed to unmap the current buffer, then replace it.  Don't generate
an error.

(cherry picked from master, commit 75e3ccf6a5)
2009-02-27 12:58:07 -07:00
Alex Deucher
4480e631cd R300: Add support for RS600 chips 2009-02-25 17:48:45 -05:00
Brian Paul
c32661c3ce mesa: Build DRI by default on Linux/sparc
Signed-off-by: David S. Miller <davem@davemloft.net>

(cherry picked from master, commit 32dc28ac7a)
2009-02-24 20:08:00 -07:00
Brian Paul
d5c06bb812 glsl: yet another swizzled expression fix
This fixes swizzled conditional expressions such "(b ? p : q).x"

(cherry picked from master, commit 00f0b05d5f)
2009-02-24 08:32:01 -07:00
Brian Paul
9d5aa36239 glsl: fix another swizzle-related bug
This fixes the case of "infinitely" nested swizzles such as EXPR.wzyx.yxwz.xxyz
This doesn't appear in typical shaders but with function inlining and the
compiler's internal use of swizzles it can happen.
New glean glsl1 test case added for this.

(cherry picked from master, commit d9881356a6)
2009-02-24 08:31:02 -07:00
Brian Paul
e3050c1777 docs: Haiku fixes 2009-02-23 08:16:09 -07:00
Brian Paul
06295ddbdd mesa: fixes for building on Haiku
(cherry picked from master, commit 41172c0430)

Conflicts:
	src/mesa/main/dlopen.c
2009-02-23 08:15:43 -07:00
Brian Paul
e2092bb23c demos: update multitex.c GLSL demo to use vertex arrays or glVertex-mode
Press 'a' to toggle drawing mode.

(cherry picked from master, commit 8e8b25c26a)
2009-02-19 17:05:14 -07:00
Brian Paul
528836d0ad util: added more functions to extfuncs.h
(cherry picked from master, commit 4c5f390328)
2009-02-19 17:04:42 -07:00
Brian Paul
3511442e43 mesa: fix GLSL issue preventing use of all 16 generic vertex attributes
Only 15 actually worked before since we always reserved generic[0] as an
alias for vertex position.

The case of vertex attribute 0 is tricky.  The spec says that there is no
aliasing between generic vertex attributes 0..MAX_VERTEX_ATTRIBS-1 and the
conventional attributes.  But it also says that calls to glVertexAttrib(0, v)
are equivalent to glVertex(v).  The distinction seems to be in glVertex-mode
versus vertex array mode.

So update the VBO code so that if the shader uses generic[0] but not gl_Vertex,
route the attribute data set with glVertex() to go to shader input generic[0].

No change needed for the glDrawArrays/Elements() path.

This is a potentially risky change so regressions are possible.  All the usual
tests seem OK though.

(cherry picked from mesa, commit dea0d4d563)

Follow-up: This patch doesn't seem to be as risky as noted above.
There have been no known regressions on Mesa/master because of it.
2009-02-19 17:01:17 -07:00
Brian Paul
d20c53b511 glsl: update program->InputsRead when referencing input attributes
This info will be used in the linker for allocating generic vertex attribs.

(cherry picked from master, commit 1cb7cd1292)
2009-02-19 17:00:06 -07:00
Brian Paul
091cc122ad glsl: asst improvements, clean-ups in set_program_uniform()
Move the is_boolean/integer_type() calls out of the loops.
Move the is_sampler_type() function near the bool/int functions.
Add a bunch of comments.

(cherry picked from master, commit c4ffbf009e)
2009-02-18 17:53:08 -07:00
Brian Paul
c983abbb9e glsl: fix inequality in set_program_uniform()
We were off by one when checking for too many uniform values.

(cherry picked from master, commit b9d8f717d2)
2009-02-18 17:52:47 -07:00
Brian Paul
a0a81204c2 mesa: bump gl.h version comment to 7.4 (bug 20170) 2009-02-18 15:37:44 -07:00
Brian Paul
409d4f839c glsl: fix link failure for variable-indexed varying output arrays
If the vertex shader writes to a varying array with a variable index,
mark all the elements of that array as being written.

For example, if the vertex shader does:

   for (i = 0; i < 4; i++)
      gl_TexCoord[i] = expr;

Mark all texcoord outputs as being written, not just the first.

Linking will fail if a fragment shader tries to read an input that's not
written by the vertex shader.  Before this fix, this linker test could fail.

(cherry picked from master, commit dac19f17f3)
2009-02-18 14:29:46 -07:00
Brian Paul
0ab36958ea mesa: improved error msg
(cherry picked from master, commit 621c999d82)
2009-02-18 13:41:12 -07:00
Brian Paul
c2445f43a3 mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)
Old limit was 256.  Note that no arrays are declared to this size.
The only place we have to be careful about raising this limit is the
prog_src/dst_register Index bitfields.  These have been bumped up too.

Added assertions to check we don't exceed the bitfield in the future too.

(cherry picked from master, commit 5b2f8dc013)
2009-02-18 13:40:57 -07:00
Brian Paul
f3d1c136b7 glsl: fix a swizzle-related regression
This new issue was exposed by commit 6eabfc27f1

(cherry picked from master, commit 212f41b80f)
2009-02-18 13:37:31 -07:00
Brian Paul
dd10a8b09d docs: 7.4 relnotes: report GLSL 1.20, fixed GLSL array index bug 2009-02-17 16:39:45 -07:00
Brian Paul
dd312366da glsl: silence some uninit var warnings
(cherry picked from master, commit 9d49802b7a)
2009-02-17 16:38:30 -07:00
Brian Paul
d2fe466ef3 mesa: turn on reporting of GLSL version 1.20
The new array features, precision/invariant/centroid qualifiers, etc. were
done a while back.  The glGetString(GL_SHADING_LANGUAGE_VERSION) query returns
"1.20" now (for drivers that support it anyway).

(cherry picked from master, commit f59719c6c7)
2009-02-17 16:37:41 -07:00
Brian Paul
fe5328bfad glsl: fix mistake in a comment
(cherry picked from master, commit be8dd01678)
2009-02-17 16:36:15 -07:00
Brian Paul
c0891dde07 glsl: fix an array indexing bug
This fixes a bug found with swizzled array indexes such as in "array[index.z]"
where "index" is an ivec4.

(cherry picked from master, commit 6eabfc27f1)
2009-02-17 16:35:59 -07:00
Brian Paul
0e6d9c1a55 docs: recent 7.4 bug fixes 2009-02-16 20:35:12 -07:00
Brian Paul
5f74a66132 glsl: allow setting arrays of samplers in set_program_uniform()
Arrays of sampler vars haven't been tested much and might actually be broken.
Will need to be revisited someday.

Another fix for bug 20056.

(cherry picked from master, commit 2b4f0216bf)
2009-02-16 20:30:49 -07:00
Brian Paul
46f8b62d5f glsl: raise GL_INVALID_OPERATION for glUniform(location < -1)
location = -1 is silently ignored, but other negative values should raise
an error.

Another fix for bug 20056.

(cherry picked from master, commit 234f03e90a)
2009-02-16 20:30:06 -07:00
Brian Paul
3e3e80c431 glsl: rework _mesa_get_uniform[fi]v() to avoid using a fixed size intermediate array
(cherry picked from master, commit 4ef7a93296)
2009-02-16 20:29:36 -07:00
Brian Paul
0486d117e4 glsl: fix glUniform() array bounds error checking
If too many array elements are specified, they're to be silently ignored (don't
raise a GL error).

Fixes another issue in bug 20056.

(cherry picked from master, commit 2c1ea0720d)
2009-02-16 20:28:57 -07:00
Brian Paul
29981c14da glsl: fix incorrect size returned by glGetActiveUniform() for array elements.
Fixes one of the issues in bug 20056.

(cherry picked from master, commit 369d1859d7)
2009-02-16 20:28:14 -07:00
Brian Paul
98d5efb2c5 glsl: use _slang_var_swizzle() in a few places to simplify the code.
(cherry picked from master, commit 285b500bb7)
2009-02-16 20:26:58 -07:00
Brian Paul
77a44aafaf mesa: another fix for program/texture state validation
This fixes a regression introduced in 46ae1abbac

Break program validation into two steps, do part before texture state
validation and do the rest after:
1. Determine Vertex/Fragment _Enabled state.
2. Update texture state.
3. Determine pointers to current Vertex/Fragment programs (which may involve
generating new "fixed-function" programs).

See comments in the code for more details of the dependencies.

(cherry picked from master, commit 537d3ed6f3)
2009-02-16 20:23:17 -07:00
Brian Paul
8278c70716 mesa: fix/change state validation order for program/texture state
Program state needs to be updated before texture state since the later depends
on the former.

Fixes piglit texgen failure.  The second time through the modes (press 't'
three times) we disable the fragment program and return to conventional texture
mode.  State validation failed here because update_texture() saw stale fragment
program state.

(cherry picked from master, commit 46ae1abbac)
2009-02-16 20:22:46 -07:00
Alan Hourihane
ac0955f5e2 demos: fix glxpixmap and call glXWaitGL before calling XCopyArea. 2009-02-16 11:55:47 +00:00
Alan Hourihane
4130c35ca8 dri2: support glXWaitX & glXWaitGL by using fake front buffer. 2009-02-16 11:48:24 +00:00
Brian Paul
d440647eb8 autoconf: Use include-fixed directory with makedepend on newer GCC
On newer GCC releases, the compiler's headers have been split between
the include and include-fixed directories. Add both if the directories
exist.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>

(cherry picked from master, commit a3d223f0d2)
2009-02-13 09:10:09 -07:00
Brian Paul
7e8f2c56c0 mesa: fix logic error in computing enableBits in update_texture_state()
If we had a vertex shader but no fragment shader (i.e. fixed function) we
didn't get the right enabled texture targets.

Fixes blank/white texture problem.

(cherry picked from master, commit b46611633c)
2009-02-07 12:04:15 -07:00
Brian Paul
a0880a152f mesa: fix tnl->render_inputs_bitset setup for fragment program texcoords
Handle the case where there's no per-vertex texcoords but the fragment shader
needs texcoords.

Fixes piglit shaders/fp-generic/dph test.

(cherry picked from master, commit f6d23943cd)
2009-02-07 12:03:37 -07:00
Brian Paul
4608a9172f swrast: return (0,0,0,1) when sampling incomplete textures, not (0,0,0,0)
Fixes piglit shaders/fp-incomplete-tex test.

(cherry picked from master, commit 1df62651b2)

Conflicts:
	src/mesa/swrast/s_fragprog.c

Also updated the fetch_texel_lod(), fetch_texel_deriv() functions to match
those in git/master.
2009-02-07 12:02:22 -07:00
Brian Paul
d0e38f7ec0 glsl: replace assertion with conditional in _slang_pop_var_table()
We were hitting the assertion when we ran out of registers, which can happen.

Also, add some additional assertions and freshen up some comments.

(cherry picked from master, commit 0744805d58)
2009-02-07 11:57:43 -07:00
Brian Paul
a69bdbbbdd docs: fixed Windows build error, added MESA_GLX_FORCE_DIRECT env var 2009-02-03 15:40:16 -07:00
Brian Paul
88c97a2662 docs: document new MESA_GLX_FORCE_DIRECT env var for the Xlib driver
(cherry picked from master, commit 2f51be75c5)
2009-02-03 15:39:13 -07:00
Brian Paul
ce9c69ddbc xlib: use MESA_GLX_FORCE_DIRECT to make glXIsDirect() always return True
Some apps won't run w/ indirect rendering contexts.
Also, consolidate some context-init code in new init_glx_context() function.

(cherry-picked from master, commit 49e80bf6b1)
2009-02-03 15:38:44 -07:00
Eric Anholt
e430fcb716 dri2: Avoid round-tripping on DRI2GetBuffers for the same set of buffers.
We only wanted to request when asked for the same set of buffers when a resize
has happened.  We can just watch the protocol stream for a ConfigureNotify
and flag to do it then.

This is about a 5% win from doing two glViewport()s per frame in openarena.
2009-02-03 21:36:38 +00:00
Brian Paul
11a363e632 mesa: move code after decls. Fixes Window build failure.
(cherry picked from master, commit 92ced46eaf)
2009-02-02 07:50:31 -07:00
Brian Paul
41e63fbdb2 docs: recent bug fixes for 7.4 2009-01-30 16:09:58 -07:00
Brian Paul
b543401a5c mesa: fix incorrect call to clear_teximage_fields() in _mesa_TexImage2D()
Fixes failed assertion / segfault for particular proxy texture tests.

(cherry picked from master, commit ea4b183b8c)
2009-01-30 16:06:52 -07:00
Brian Paul
8c4f08fbad mesa: add missing _mesa_reference_texobj() calls for texture array targets
(cherry picked from master, commit 7c48719a5f)
2009-01-30 16:06:21 -07:00
Brian Paul
f3081a34d2 mesa: remove incorrect refcounting adjustment in adjust_buffer_object_ref_counts()
Fixes bug 19835.  However, a more elaborate fix should be implemented someday
which uses proper reference counting for gl_array_object.

(cherry picked from master, commit 88e0b92a74)
2009-01-30 16:05:51 -07:00
Brian Paul
7b1d3cf392 docs: i965 fixes 2009-01-28 17:02:39 -07:00
Brian Paul
25515b557e i965: fix bug in pass0_precalc_mov()
Previously, "in-place" swizzles such as:
   MOV t, t.xxyx;
were handled incorrectly.  Fixed by splitting the one loop into two loops so we
get all the refs before assigning them (to avoid potential clobbering).

(cherry picked from master/commit faa48915d2)
2009-01-28 17:01:34 -07:00
Brian Paul
51625ff86e i965: widen per-texture bitfields for 16 texture image units
(cherry picked from master/commit f78c388b6c)
2009-01-28 17:01:03 -07:00
Brian Paul
4d8f661726 intel: check if stencil test is enabled in intel_stencil_drawpixels()
(cherry picked from master/commit 72ee0e247d)
2009-01-28 17:00:23 -07:00
Brian Paul
efa69a2f66 intel: save/restore GL matrix mode in intel_meta_set_passthrough_transform(), intel_meta_restore_transform()
(cherry picked from master, commit 723648f2ee)
2009-01-28 16:55:16 -07:00
Brian Paul
30a6dd78d5 docs: fix typo 2009-01-22 10:39:05 -07:00
Brian Paul
9f75836308 mesa: set version to 7.4 for mesa_7_4_branch 2009-01-22 10:19:39 -07:00
Brian Paul
609cc9c139 docs: skeleton 7.4 release notes file 2009-01-22 10:18:04 -07:00
Brian Paul
e5aa89386d docs: 7.3 md5 sums 2009-01-22 10:14:39 -07:00
Brian Paul
5a45897711 mesa: set version to 7.3 2009-01-22 10:14:24 -07:00
Brian Paul
faa6d8af59 docs: set 7.3 release date 2009-01-22 10:01:17 -07:00
Brian Paul
b6c41fd933 docs: assorted updates, link fixes 2009-01-22 10:01:17 -07:00
Eric Anholt
b8bd0b0ddc i915: Add decode for PS in batchbuffers. 2009-01-21 14:03:56 -08:00
Eric Anholt
fc3971d800 i965: Remove gratuitous whitespace in INTEL_DEBUG=wm output. 2009-01-21 14:03:56 -08:00
Eric Anholt
046e88fc0b i965: Use _mesa_num_inst_src_regs() instead of keeping a copy of its contents. 2009-01-21 14:03:56 -08:00
Kristian Høgsberg
194d039f1e [intel] Remove remaining references to intel_wait_flips().
Oops.
2009-01-21 11:47:01 -05:00
Thomas Henn
470e10dfaa windows: fix output dir for glut project file 2009-01-21 09:32:40 -07:00
Brian Paul
8c7135ee14 swrast: fix redundant texture application in affine_textured_triangle().
This function does simple texture mapping so disable normal texture mapping
before we call _swrast_write_rgba_span() so that we don't do it twice.
2009-01-21 09:05:02 -07:00
Brian Paul
4683cab29a mesa: add some debug assertions to detect null current texture object pointers
See bug #17895.  These assertions could be removed when this is resolved.
2009-01-21 08:18:07 -07:00
Karl Schultz
787a001a67 windows: another round of VC8 project file updates
New static configs generate DLLs that do not have a dependency on the MSCVR*
DLL's.
2009-01-21 07:59:11 -07:00
Brian Paul
dd92f483b0 Revert "windows: new VC8 projects statically linked against libcmt"
This reverts commit bbda892c55.

Static configs rolled into regular project files (in next commit).
Provided by Karl Schultz.
2009-01-21 07:57:45 -07:00
Brian Paul
65118a51b6 docs: document glXMakeContextCurrent() and Windows fixes 2009-01-20 15:36:01 -07:00
Ian Romanick
ab9b4e1f59 Fix issues with glXMakeContextCurrent and glXMakeCurrentReadSGI
There were several bugs in the infrastructure for these two routines.

1. GLX_ALIAS was incorrectly used.  The function and its alias must be
identical!  glXMakeContextCurrent / glXMakeCurrentReadSGI and
MakeContextCurrent had different parameters.  This caused the last
parameter of MakeContextCurrent to get random values.

2. We based the implementation of glXMakeContextCurrent on the manual
page instead of the GLX spec.  The GLX spec says that
glXMakeContextCurrent can be passed a Window as a drawable.  When this
happens, it will behave just like glXMakeCurrentReadSGI or
glXMakeCurrent.

3. If there was a problem finding or creating the DRI drawable,
MakeContextCurrent would crash instead of returning an error.

This commit fixes all three issues, and fixes bug #18367 and bug #19625.
2009-01-20 13:55:18 -08:00
Timo Aaltonen
39e6d0d810 [intel] Go back to using the typedef for the sarea struct
The upstream linux kernel headers and libdrm kernel headers disagree on the
tag name for the sarea struct: _drm_i915_sarea vs drm_i915_sarea.  They
both typedef it to drm_i915_sarea_t though, so just use that.
2009-01-20 11:52:32 -05:00
Owain G. Ainsworth
b5da7feee0 Remove intel pageflipping support in its entirety.
It's been broken and deprecated for a while, so it's time to die. This has the
wonderful benefit of cleaning up the code a fair amount; making it marginally
less twisty.

I'm unsure if the for loops in IntelWindowMoved are still needed.
2009-01-20 11:52:32 -05:00
Brian Paul
0f548dbc98 glsl: silence unused var warnings 2009-01-20 09:21:32 -07:00
Brian Paul
9d216be8cf mesa: silence uninitialized var warnings 2009-01-20 09:20:41 -07:00
Brian Paul
eb26cc6cf5 mesa: silence compiler warning at -O2 2009-01-20 09:17:12 -07:00
Brian Paul
bb63a663b1 mesa: bump version to 7.3-rc3 2009-01-20 09:13:41 -07:00
Brian Paul
dace4e3e2a mesa: inlclude whole windows/VC8/ directory in tarballs 2009-01-20 09:13:06 -07:00
Thomas Henn
bbda892c55 windows: new VC8 projects statically linked against libcmt 2009-01-20 09:07:01 -07:00
Karl Schultz
61a387dca1 windows: more VC8 project file updates
Make some compiler flags per-file.
Remove driverfuncs.c from osmesa project.
2009-01-20 09:07:01 -07:00
Thomas Hellstrom
437fa85ba3 Add a comment about _tnl_emit_indexed_vertices_to_buffer. 2009-01-20 11:40:51 +01:00
Thomas Hellstrom
b00477acf3 tnl: Add a utility to emit indexed vertices to a DMA buffer.
This utility is useful for hardware that doesn't support HW index buffers.
It's a bit inefficient but appears to give a substantial performance gain,
as we can emit tri strips that would otherwise be split into triangles.
2009-01-20 11:15:57 +01:00
Thomas Hellstrom
7374285f07 Fix store texel for argb4444. 2009-01-20 11:13:38 +01:00
Thomas Hellstrom
5c84a1032c Fix store texel for argb8888_rev. 2009-01-20 11:13:05 +01:00
Thomas Hellstrom
dbda49a9e6 Add RGBA4444 and RGBA5551 texture formats. 2009-01-20 11:12:17 +01:00
Thomas Hellstrom
11351f0c8a dri1: Add a macro to validate two dri drawables in one go.
Dri drivers often may validate first a write drawable and then a read
drawable ("readable"). However, the hardware lock may be unlocked when
validating the readable, causing the write drawable status to be stale.

Drivers should use this macro instead when validating two drawables.
2009-01-20 11:07:10 +01:00
Brian Paul
a5b5bc9f95 mesa: fix build of stand-alone glslcompiler driver 2009-01-19 17:50:44 -07:00
Brian Paul
f97792421b tests: test pseudo-XOR blend mode.
GL_XOR logicop mode can be approximated with blending by computing 1 - dst.
Here's a couple test programs for that.
2009-01-19 12:09:40 -07:00
Alan Hourihane
396711b840 dri: add fake front definitions 2009-01-19 15:41:19 +00:00
Thomas Henn
dbd8e4066b windows: updated VC8 project files 2009-01-19 08:23:22 -07:00
Brian Paul
b7f802eca2 glx: gcc 2.95 build fix (move declaration before code)
Adapted from patch by Matthieu Herbb <matthieu.herrb@laas.fr>
2009-01-18 10:00:34 -07:00
Brian Paul
a61a1a8181 i965: fix polygon culling bug when rendering to a texture/FBO
Since we use an inverted viewport transformation for render to texture, that
inverts front/back polygon orientation.
Now glCullFace(GL_FRONT / GL_BACK) works correctly.
2009-01-16 13:33:19 -07:00
Brian Paul
345a08a77f intel: added intel_rendering_to_texture() helper function.
When we're rendering to textures we have to invert the viewport transformation.
This helper cleans up that test and can be used elsewhere...
2009-01-16 13:31:04 -07:00
Brian Paul
12c6d28cc7 mesa: remove GL_DEPTH_TEST + no depth buffer test
One could enable depth testing before binding an FBO that has a depth buffer
so this test is no longer useful or correct.
2009-01-16 13:25:41 -07:00
Brian Paul
e442fe5ba5 glsl: fix broken sampler assignments 2009-01-16 09:30:58 -07:00
Xiang, Haihao
66a4f5cf9a i915: fallback on transfer mode 2009-01-16 16:06:33 +08:00
Karl Schultz
a740858fc0 windows: updated VC8 project file 2009-01-15 11:32:47 -07:00
Karl Schultz
e7c988d065 windows: updated mesa.def file 2009-01-15 07:05:31 -07:00
Brian Paul
4a8356209d glsl: use _mesa_sprintf() 2009-01-15 07:05:30 -07:00
Brian Paul
e1ba29ea19 glsl: move declaration before code 2009-01-15 07:05:30 -07:00
Alan Hourihane
fbf13bcb8a mesa: check frambuffer complete status before rendering 2009-01-15 11:56:00 +00:00
Brian Paul
8f8435637d mesa: bump version to 7.3-rc2 2009-01-14 17:05:26 -07:00
Brian Paul
7d08091767 glsl: fix comment 2009-01-14 17:05:26 -07:00
Brian Paul
b5f32e1d5a glsl: minor clean-up for rect sampler test 2009-01-14 17:05:26 -07:00
Brian Paul
0dffd22349 r300: work-around FRAG_BIT_FOGC warning/error
See bug 17929.

Fog doesn't actually work, but the often complained about warning is
silenced.
2009-01-14 16:49:24 -07:00
Brian Paul
947d1c5b2a i965: asst. fixes, work-arounds for FBOs and render to texture
OpenGL allows mixing and matching depth and stencil renderbuffers in
framebuffer objects while the hardware really only supports interleaved
depth/stencil buffers.  This makes for some tricky buffer management.

An extra wrinkle is the situation where the user allocates a 16bpp depth
texture or renderbuffer then tries to render to it along with a stencil
buffer.  We'd have to promote the 16bpp Z values to 24-bit Z values and
mix in the stencil values to setup the depth/stencil renderbuffer.

There's no support for that now, so always allocate 32bpp depth textures/
renderbuffers for now.
2009-01-14 16:49:24 -07:00
Brian Paul
c7f43543af i965: fix incorrect renderbuffer DataType assignment 2009-01-14 16:49:24 -07:00
Brian Paul
5912cdff3e i965: fix some FBO depth/stencil assertions 2009-01-14 16:49:24 -07:00
Ian Romanick
03188b09e0 intel: SW fallback maps texture images, not texture coordinates 2009-01-14 12:48:22 -08:00
Brian Paul
fae9604727 glsl: propagate pragma info down into compiler from preprocessor 2009-01-14 12:16:00 -07:00
Brian Paul
aac4a0509e windows: remove reference to swizzle.c file 2009-01-14 12:07:25 -07:00
Brian Paul
b5f89e5f17 glsl: simplify IR storage for samplers
Don't overload the Size field with the texture target, to avoid confusion.
2009-01-14 11:58:45 -07:00
Brian Paul
c12d24b513 mesa: fix incorrect transformation of GL_SPOT_DIRECTION
This was changed between GL 1.0 and 1.1.  Mesa still had the 1.0 behaviour.
2009-01-14 11:51:30 -07:00
Ian Romanick
2549c26a8b Treat image units and coordinate units differently.
Previously MaxTextureUnits was used to validate both texture image
units and texture coordinate units in fragment programs.  Instead, use
MaxTextureCoordUnits for texture coordinate units and
MaxTextureImageUnits for texture image units.

Fixes bugzilla #19468.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2009-01-14 10:09:01 -08:00
Alan Hourihane
a98dccca36 glsl: fix regression from sampler arrays commit 2009-01-14 16:34:19 +00:00
Brian Paul
1b3e3e6b84 i965: indentation fixes 2009-01-14 08:34:07 -07:00
Brian Paul
49b53407c7 i965: allow larger AA points on fallback path 2009-01-14 08:34:06 -07:00
Brian Paul
d911e3e24f i965: fix indentation 2009-01-14 08:34:06 -07:00
Brian Paul
658ab3c3ae i965: comment for emit_kil() 2009-01-14 08:34:06 -07:00
Brian Paul
8f7349dbb4 mesa: put _NV suffix on a few opcodes 2009-01-14 08:34:06 -07:00
Brian Paul
d687476edd i965: fix indentation 2009-01-14 08:34:06 -07:00
Xiang, Haihao
c157a5bb91 intel: bump driver date 2009-01-14 09:32:55 +08:00
Alan Hourihane
14eca6b573 glsl: fix a comment typo 2009-01-14 00:12:59 +00:00
Alan Hourihane
ef0e0f2550 glsl: support sampler arrays. 2009-01-14 00:12:33 +00:00
Brian Paul
34d17d2bdc docs: #pragma now handled 2009-01-13 15:09:40 -07:00
Brian Paul
01a0938776 glsl: add preprocessor support for #pragma
Two forms are supported:

Pragmas are silently ignored at this time.
2009-01-13 15:09:40 -07:00
Ian Romanick
1f47388dfe Add language about implicit flush and command completion
Copied language from the glXSwapBuffers manual page about the implicit
glFlush and expected command completion.  This just codifies what
people already expect from glXCopySubBufferMESA.  The intention of
this command is to work like glXSwapBuffers but on a sub-rectangle of
the drawable.

Acked-by: Brian Paul <brianp@vmware.com>
2009-01-13 12:36:03 -08:00
Brian Paul
34500a6da5 docs: fixes since 7.3-rc1 2009-01-13 09:03:43 -07:00
Karl Schultz
00c02626d8 windows: try to create a context in wglCreateLayerContext() 2009-01-13 09:02:04 -07:00
Brian Paul
eeeed45c2c i965: fix glDrawPixels Z coordinate in intel_texture_drawpixels().
As for glBitmap, it needs to be an NDC coord in [-1,1].
2009-01-12 15:47:57 -07:00
Brian Paul
3a5463d158 i965: fix broken glBitmap + depth test
When we use the do_blit_bitmap() function, it seems the fragment Z is always
1.0.  If depth testing is on, that means that bitmap fragments are often
occluded by other rendering.  So, the bitmap doesn't appear even if
rasterpos.Z==0.
The fix is to use the intel_texture_bitmap() path when depth testing is on.
Also, fix the incorrect Z coordinate.  It needs to be an NDC value in [-1,1].
2009-01-12 15:43:54 -07:00
Brian Paul
de35989cde i965: fix broken ARB fp fog options
Just call _mesa_append_fog_code() if the fragment program's FogOption is
not GL_NONE.
This allows us to remove some unnecessary i965 fog code.
Note, the arbfplight.c demo can be used to test this (see DO_FRAGMENT_FOG).
2009-01-12 14:24:45 -07:00
Dan Nicholson
29f603a270 autoconf: Only _GNU_SOURCE feature test macro needed on gnu systems
According to feature_test_macros(7), _GNU_SOURCE encompasses all the
other feature macros we were setting, so we can just dispose of them.
2009-01-12 11:10:31 -08:00
Julien Cristau
7f7fc3e3af mesa: match against *-gnu* instead of *-gnu in configure.ac
Fixes build on arm-linux-gnueabi
2009-01-12 11:08:02 -08:00
Thomas Henn
a0318d7f8e windows: updated VC8 project files 2009-01-12 10:56:42 -07:00
Brian Paul
06fdb6a74c glsl: better fix for for-loop scope issue (commit 6333005f7a) 2009-01-12 08:52:54 -07:00
Brian Paul
88fdddcbbe windows: added new sources for 7.3 (may be more, needs testing) 2009-01-12 08:36:21 -07:00
Brian Paul
1598be5083 mesa: add osmesa.pc.in to tarball list 2009-01-12 08:36:21 -07:00
Matthieu Herrb
436024561a Build fixes for gcc 2.95 2009-01-11 16:56:34 -07:00
Matthieu Herrb
0f0922f93c Big endian fixes. 2009-01-11 16:44:54 -07:00
Matthieu Herrb
33f6dc3c33 build fix on big endian OpenBSD architectures. 2009-01-11 16:44:52 -07:00
Matthieu Herrb
356428d4e4 replace nearbyint() by rint() for now. 2009-01-11 16:44:50 -07:00
Owain G. Ainsworth
b4866f8a52 Fix build with GCC 2.95. 2009-01-11 16:44:40 -07:00
Matthieu Herrb
297a9606ea __builtin_expect is a gcc 3.x feature. define it out for gcc 2.95.
Patch suggested by miod@. Thanks.
2009-01-11 16:44:36 -07:00
Brian
44557bf065 mesa: require libdrm 2.4.3 in configure.ac 2009-01-10 16:32:32 -07:00
Brian Paul
f1455ca5f4 mesa: omit old headers from tarball 2009-01-10 12:21:37 -07:00
Brian Paul
834db82153 docs: document deprecated/removed headers/interfaces 2009-01-10 12:09:08 -07:00
Brian Paul
ef193c10e7 mesa: remove old GLView.h header for BeOS 2009-01-10 12:07:58 -07:00
Brian Paul
c3a00a728b mesa: remove deprecated headers from Makefile.am 2009-01-10 12:06:29 -07:00
Brian Paul
287102ddcc mesa: deprecate GL/amesa.h header (allegro driver) 2009-01-10 12:04:39 -07:00
Brian Paul
f5979b0c15 mesa: deprecate the GL/fxmesa.h header 2009-01-10 12:01:40 -07:00
Brian Paul
d25cc16efa mesa: remove the ancient include/GL/ugl*.h headers 2009-01-10 12:00:27 -07:00
Brian Paul
1636328b0a xmesa: deprecate the "XMesa" interface
Move the include/GL/xmesa*.h files to src/mesa/drivers/x11/ so they're no
longer considered public.
2009-01-10 11:57:13 -07:00
Brian Paul
2c56dd7757 docs: prerequisite updates 2009-01-10 11:52:55 -07:00
Brian Paul
6333005f7a glsl: force creation of new scope for for-loop body
Fixes regression in progs/demos/convolution.c due to loop unrolling.
This also allows the following to be compiled correctly:
for (int i = 0; i < n; i++) {
   int i;
   ...
}
This fix is a bit of a hack, however.  The better fix would be to change
the slang_shader.syn grammar.  Will revisit that...
2009-01-10 11:40:20 -07:00
Brian Paul
1d352b42a1 glsl: replace 0/1 with GL_FALSE/GL_TRUE 2009-01-10 11:39:05 -07:00
Ian Romanick
9939a306f7 swrast: Fix GL_ATI_separate_stencil
GL_ATI_separate_stencil is enabled by default for software
rasterizers, but the extension functions weren't hooked up to the
dispatch table.
2009-01-09 16:44:08 -08:00
Brian Paul
ca03e881a8 glsl: make minimum struct size = 2, not 1
1-component structs such as "struct foo { float x; }" could get placed at
any position within a register.  This caused some trouble computing the
field offset which assumed all struct objects were placed at R.x.
It would be unusual to hit this case in normal shaders.
2009-01-09 09:59:49 -07:00
Brian Paul
4497a5a57d mesa: 7.3-rc-1 Makefile changes 2009-01-08 17:21:20 -07:00
Brian Paul
f7b4c2cca9 mesa: latest glxext.h header, no version change 2009-01-08 17:20:41 -07:00
Brian Paul
08fdc741bc mesa: import glext.h version 44 2009-01-08 17:20:18 -07:00
Brian Paul
d0c2cbd257 docs: dri2proto, libdrm tweaks 2009-01-08 17:19:51 -07:00
Brian Paul
acd99f67cc glsl: fix typo in the vec2 += operator function 2009-01-08 17:07:28 -07:00
Brian Paul
0713e9da73 mesa: set version string to 7.3-rc1 2009-01-08 16:16:36 -07:00
Brian Paul
2c0ce92e8a docs: updated Cell docs, from gallium-0.2 branch 2009-01-08 16:15:31 -07:00
Brian Paul
1ed9b1ec90 docs: more 7.3 doc updates 2009-01-08 16:14:19 -07:00
Brian Paul
11ade9a3d1 docs: import 7.2 relnotes, start on 7.3 relnotes 2009-01-08 16:12:23 -07:00
Brian Paul
730a407ca2 glsl: fix broken +=, -=, *=, /= operators
These functions need to return the final computed value.
Now expressions such as a = (b += c) work properly.
Also, no need to use __asm intrinsics in these functions.  The resulting
code is the same when using ordinary arithmetic operators and is more legible.
2009-01-08 15:35:23 -07:00
Brian Paul
19c877c327 mesa: fix off-by-one bug in _mesa_delete_instructions() 2009-01-08 15:35:23 -07:00
Eric Anholt
83a74521cf i965: Fix GLSL FS DPH to return the right value instead of src0.w * src1.w. 2009-01-07 20:35:25 -08:00
Eric Anholt
6d2cf395f4 i965: Remove worrisome comment about _NEW_PROGRAM signaling fp change.
Everything now depends on either BRW_NEW_FRAGMENT_PROGRAM or
BRW_NEW_VERTEX_PROGRAM.
2009-01-07 20:35:24 -08:00
Eric Anholt
8fb727548a mesa: Remove _Active and _UseTexEnvProgram flags from fragment programs.
There was a note in state.c about _Active deserving to die, and there were
potential issues with it due to i965 forgetting to set _UseTexEnvProgram.
Removing both simplifies things.

Reviewed-by: Brian Paul <brianp@vmware.com>
2009-01-07 20:34:46 -08:00
Eric Anholt
b9b482bd8d i965: Remove dead brw_vs_tnl.c 2009-01-07 20:34:43 -08:00
Brian Paul
f68f94c2bc i965: allow gl_FragData[0] usage when there's only one color buffer
If gl_FragData[0] is written but not gl_FragCOlor, use the former.
2009-01-07 18:45:49 -07:00
Brian Paul
bc7d2c4f51 mesa: additional case in file_string() 2009-01-07 18:44:41 -07:00
Brian Paul
9629be5e07 glsl: pass GLcontext::Extension info down into GLSL preprocessor
Now the #extension directives can be handled properly.
2009-01-07 18:44:00 -07:00
Brian Paul
176464b14b glsl: bump up MAX_FOR_LOOP_UNROLL_COMPLEXITY 2009-01-07 18:41:54 -07:00
Brian Paul
d1860bcd0a glsl: check that the fragment shader does not write both gl_FragColor and gl_FragData[] 2009-01-07 18:22:56 -07:00
Brian Paul
95fa98d61a i965: init dst reg RelAddr field to zero 2009-01-07 15:06:06 -07:00
Eric Anholt
8112c9e2cc i965: Note when we drop saturate mode on the floor in a VP. 2009-01-07 12:41:55 -08:00
Eric Anholt
f53d9913ac i965: Add support for LRP in VPs.
Bug #19226.
2009-01-07 12:40:16 -08:00
José Fonseca
b3c7f7466c mesa: Add _mesa_snprintf.
On Windows snprintf is renamed as _snprintf.

(cherry picked from commit f8f9a1b620)
2009-01-07 09:00:05 -07:00
Brian Paul
510ed7f51e glsl: disable some unused functions (but don't remove just yet) 2009-01-07 08:56:10 -07:00
Brian Paul
a8542200b3 glsl: also unroll loops with variable declarations such as "for (int i = 0; ..." 2009-01-07 08:54:09 -07:00
Brian Paul
cea7f7b763 glsl: remove dead code 2009-01-07 08:32:21 -07:00
Brian Paul
1a414a4dbe mesa: OSMesa Makefile fixes (use LIB_DIR) 2009-01-07 08:25:59 -07:00
Brian Paul
0b0d0dcdef glsl: loop unroll adjustments
Add a "max complexity" heuristic to allow unrolling long loops with small
bodies and short loops with large bodies.

The loop unroll limits may need further tweaking...
2009-01-06 17:36:20 -07:00
Brian Paul
1fa978c891 glsl: implement loop unrolling for simple 'for' loops
Loops such as this will be unrolled:
  for (i = 0; i < 4; ++i) {
      body;
  }
where 'body' isn't too large.

This also helps to fix the issue reported in bug #19190.  The problem there
is indexing vector types with a variable index.  For example:
  vec4 v;
  v[2] = 1.0;  // equivalent to v.z = 1.0
  v[i] = 2.0;  // variable index into vector!!

Since the for-i loop can be unrolled, we can avoid the problems associated
with variable indexing into a vector (at least in this case).
2009-01-06 17:24:23 -07:00
Brian Paul
338ae34d22 mesa: Move var declaration to top of scope.
(cherry picked from commit 3740a06e28)
2009-01-06 14:29:08 -07:00
Brian Paul
814bc5ccda mesa: fix GL_DEPTH_CLEAR_VALUE casting
(cherry picked from commit d14d494dcd)
2009-01-06 14:24:16 -07:00
Brian Paul
a8ee35c1c5 mesa: remove dri_sarea.h, add glcore.h in Makefile 2009-01-06 07:36:11 -07:00
Xiang, Haihao
f1f022dbb1 mesa: Fix the size per pixel for packed pixel format data type. 2009-01-06 15:37:45 +08:00
Xiang, Haihao
241c0bfc98 mesa: Fix the number of components for GL_UNSIGNED_SHORT_1_5_5_5_REV. (bug #19390) 2009-01-06 15:34:51 +08:00
Xiang, Haihao
7627c7f5df dri: correct the damage.
Fixes bug #17234
2009-01-06 11:22:19 +08:00
Brian Paul
c5c9241cca mesa: add GLushort cases for render to texture (Z-buffers) 2009-01-05 18:12:23 -07:00
Brian Paul
9736d8f033 mesa: fix a GLSL swizzled writemask bug
This fixes cases such as:
  vec4 v4;
  vec2 v2;
  v4.xz.yx = v2;
The last line now correctly compiles into MOV TEMP[1].xz, TEMP[0].yyxw;
Helps to fix the Humus Domino demo.  See bug 19189.
2009-01-05 13:16:09 -07:00
Brian Paul
0d797365de i965: implement OPCODE_TRUNC (round toward zero) on vertex path.
Also, fix some RNDD vs. RNDZ confusion elsewhere.
2009-01-05 10:09:28 -07:00
Tom Fogal
4469355df2 glu: Add mangled symbols to export list
This adds all of the `mglu' symbols to the list of symbol exports
for GLU.  Without this patch, mangled GLU symbols are considered
`internal' symbols, and calling any results in undefined references.
2009-01-05 08:00:16 -07:00
Brian Paul
724ed5b84b mesa: fix warning about possibly undefined var in GLSL compiler 2009-01-02 17:30:08 -07:00
Brian Paul
1fad6ccb75 mesa: fix another "out of samplers" problem
Now only the samplers that are actually used by texture() functions are
saved in the uniform variable list.  Before, we could run out of samplers
if too many were declared while only some of them were actually used.
2009-01-02 12:28:37 -07:00
Brian Paul
4a6ad999ea i965: increase number of texture samplers to 16
This lets GLSL shaders use up to 16 samplers.
Fixed function is still limited to 8 textures.
Tested with progs/glsl/samplers.c
2009-01-01 14:05:30 -07:00
Brian Paul
3b891a502b i965: comments, clean-ups, re-order some functions 2009-01-01 14:05:30 -07:00
Brian Paul
32e03c4a2f i965: added OPCODE_NRM3/4 2009-01-01 14:05:30 -07:00
Brian Paul
e262da8040 i965: fix comment 2009-01-01 14:05:30 -07:00
Brian Paul
914fcbafdb i965: indentation and formatting fixes 2009-01-01 14:05:30 -07:00
Brian Paul
131ac5b465 i965: implement OPCODE_NRM3/NRM4 2009-01-01 14:05:30 -07:00
Brian Paul
23b0ad4d7e i965: whitespace, comment changes 2009-01-01 14:05:30 -07:00
Brian Paul
1d03f2834f mesa: comments, whitespace changes 2009-01-01 14:05:30 -07:00
Brian Paul
46b8fe00c9 demos: added progs/glsl/samplers.c to test all available texture samplers 2009-01-01 14:02:17 -07:00
Brian Paul
dfada459aa mesa: updated comments about GLSL constants 2009-01-01 08:07:54 -07:00
Brian Paul
e9b34885b8 mesa: increase max texture image units and GLSL samplers to 16
The max texture coord units is still 8.  All the fixed-function paths are
still limited to 8 too.  But GLSL shaders can use more samplers now.

Note that some texcoord-related data structures are declared to be 16
elements in size rather than 8.  This just simplifies the code in a few
places; the extra elements aren't accessible to the user.

These changes haven't been extensively tested yet, but sanity checking has
been done.

It should be possible to increase the max image units/samplers to 32 without
doing anything special.  Beyond that we'll need longer bitfields in a few
places.
2008-12-31 12:00:17 -07:00
Eric Anholt
bfebeffc00 intel: Share passthrough transform setup between glBitmap and glDrawPixels.
The DrawPixels path was missing glViewport care, so blender's toolbar icons
would go to the wrong places.

Bug #19118.
2008-12-31 00:35:17 -08:00
Eric Anholt
e1a9217554 intel: Add support for glBitmap as metaops using GL calls.
This lets us avoid software fallbacks when clients forget to turn some state
off (engine demo) or just do crazy things to test conformance (OGLC).

This should probably be brought into mesa generic code so other drivers can
make use of it.

Bug #19016.
2008-12-31 00:10:29 -08:00
Brian Paul
e8d7db31e2 mesa: fix bug in evaluation of structure fields
Fixes incorrect size information.  See bug 19273.
2008-12-30 17:50:39 -07:00
Brian Paul
c6537ac8b8 mesa: allow variable indexing into the predefined uniform variable arrays
This allows code such as "vec4 a = gl_LightSource[i].ambient;" to work.

When a built-in uniform array is indexed with a variable index we need to
"unroll" the whole array into the parameter list (aka constant buffer) because
we don't know which elements may be accessed at compile-time.  In the case of
the gl_LightSource array of size [8], we emit 64 state references into the
parameter array (8 elements times 8 vec4s per gl_LightSourceParameters
struct).

Previously, we only allowed constant-indexed references to uniform arrays
(such as gl_LightSource[2].position) which resulted in a single state reference
being added to the parameter array, not 64.  We still optimize this case.

Users should be aware that using "gl_LightSource[i].ambient" in their shaders
is a bit expensive since state validation will involve updating all 64
light source entries in the parameter list.
2008-12-30 17:11:32 -07:00
Brian Paul
ca0540e25c mesa: better error message when running out of GLSL samplers 2008-12-30 17:03:09 -07:00
Brian Paul
6f346ec0b8 mesa: comments for some state vars 2008-12-30 17:00:36 -07:00
Brian Paul
432e9fa852 mesa: increase max constants/uniforms to 256 (vec4 vectors) 2008-12-30 17:00:06 -07:00
Brian Paul
49a3fabed8 mesa: updated compilation documentation 2008-12-30 07:57:16 -07:00
Brian Paul
c9122072fc demos: minor fixes to twoside.c glsl demo 2008-12-30 07:24:19 -07:00
Xiang, Haihao
0c4346e632 intel: disable ATI_texture_env_combine3 for i830( and related device).
Thanks to Eric for pointing it out.
2008-12-30 11:25:45 +08:00
Eric Anholt
6c01500228 dri: Fix driWaitForMSC32 when divisor >= 2 and msc < 0.
We'd come up with a negative remainder, while we were looking for the positive
version of it in the loop conditional.  And, since the "did we hit our target"
break was disabled for the target_msc == 0 ("Just make the divisor/remainder
work") path, we'd never exit.

Simplify the code by just using int64_t all over instead of trying to do it
in a u32 space.
2008-12-29 12:09:24 -08:00
Alex Deucher
c40cd2ccdd R300: missing semicolon 2008-12-29 12:28:12 -05:00
Xiang, Haihao
0674a23854 intel: enable ATI_texture_env_combine3. Fixes #17707 2008-12-29 09:32:51 +08:00
Dave Airlie
0d1f90c75e r300: remove the unknowns from the indx_buffer code 2008-12-28 16:48:36 +10:00
Xiang, Haihao
129b6bc4e3 i915: separate the fog term from the specular color term.
Previously fog parameter and specular color are packed into the
same dword. Note specular color should be packed in BGRA for device,
so if fog parameter and specular color all are present, fog parameter
will dirty the alpha term of specular color. This fixes rendering
issue when playing 'Yo Frankie' on 915/945.
2008-12-24 09:26:46 +08:00
Eric Anholt
15b2e0d138 intel: Fix glBitmap clipping for DRI1. 2008-12-23 15:01:53 -08:00
Dave Airlie
b359350017 Remove third buffer support from Mesa.
This is part of the deprecated pageflipping infrastructure.
2008-12-23 15:01:53 -08:00
Ian Romanick
f83f5ec8f5 Add do_row_3d for mipmapping 3D textures
Previously 3D textures were mipmapped using multiple passed through
the 2D mipmap generation code.  This had 3 disadvantages.  First, the
extra passes were slow.  Second, this required the allocation of a
temporary buffer to hold intermediate data.  Third, and most
important, the extra passes caused loss of additional bits due to
integer division / bit-shifting.

With this change, our mipmapgen conformance test passes for
non-compressed texture formats.
2008-12-19 13:06:53 -08:00
Ian Romanick
a330933bb7 Fix typeo in mipmap filter for GL_UNSIGNED_SHORT_1_5_5_5_REV 2008-12-19 13:06:53 -08:00
Ian Romanick
7e04272690 965 / GLSL: Use full precision for EXP instruction
The partial precision mode doesn't have quite enough bits of precision
to pass conformance tests.
2008-12-19 13:06:53 -08:00
Ian Romanick
962fa6bbc1 GLSL: The LOG2 macro doesn't have enough precision
It looks like the LOG2 macro only has 8 or 9 bits of precission, but
the ARB_vertex_program spec says "accurate to at least 10 bits".
2008-12-19 13:06:53 -08:00
Eric Anholt
1db6371304 intel: Fix glBitmap top/bottom clipping.
Bug #19139.
2008-12-19 13:05:50 -08:00
Eric Anholt
e67350da34 intel: Don't forget the source bitmap size when clipping the size we draw. 2008-12-19 13:04:29 -08:00
Eric Anholt
b9752a2bd6 intel: Update mesa state in blit operations that want post-scissor draw bounds. 2008-12-19 13:04:29 -08:00
Eric Anholt
d091ebd4e4 intel: don't clip to scissor-clipped read framebuffer bounds in copypixels. 2008-12-19 13:04:23 -08:00
Eric Anholt
1e7785fe07 intel: Move copyteximage source clipping out of copytexsubimage.
glCopyTexSubImage already gets the (correct) clipping for us, so it doesn't
need the path.  While moving the clipping out, replace the code with the mesa
path to do the same job.
2008-12-18 18:50:16 -08:00
Eric Anholt
d01c44aaca mesa: Clip copytexsubimage to read framebuffer bounds, not scissor region. 2008-12-18 18:32:07 -08:00
Eric Anholt
aa09e0a1d5 mesa: Correct _mesa_clip_to_region() off-by-one.
Note how if:
x + width == xmax + 0: width -= 0
x + width == xmax + 1: width -= 0
x + width == xmax + 2: width -= 1

So, the function was clipping to [xmin, xmax+1), not [xmin, xmax) like it was
supposed to.  Same for ymax.
2008-12-18 18:32:07 -08:00
Michal Krol
d9b92b112f glsl: Fix handling of nested parens in macro actual arguments. 2008-12-18 11:11:59 -07:00
Brian Paul
f43019b226 demos: all glutDestroyWindow() upon exit to test query object clean-up 2008-12-18 11:11:59 -07:00
Xiang, Haihao
cb453244ca i915: check WRAP_T instead of WRAP_R for cube map texture. 2008-12-18 12:59:43 +08:00
Xiang, Haihao
df73363ed1 i915: fix abort issue. (bug #19147) 2008-12-18 10:07:45 +08:00
Brian Paul
35aebf4667 mesa: remove unneeded _mesa_reference_fragprog() call
The subsequent if/else cases always call _mesa_reference_fragprog() anyway.
2008-12-17 18:05:03 -07:00
Jon Turney
8e7599892f dri: fix for Cygwin compilation, bug 19144 2008-12-17 18:01:16 -07:00
Brian Paul
20555835b6 mesa: updated comments 2008-12-17 14:54:46 -07:00
Brian Paul
1cb680d06b demos: add test of vertex-only and fragment-only shader programs 2008-12-17 13:58:31 -07:00
Brian Paul
637f06dcdc util: check for frag/vertShader=0 before attaching 2008-12-17 13:58:05 -07:00
Brian Paul
3be8d6db9e mesa: disable debug output 2008-12-16 15:25:58 -07:00
Brian Paul
368df1615e mesa: fix some GLSL array regressions
array.length() wasn't working.
Swizzle mask for accessing elements of float arrays was incorrect.
2008-12-16 14:29:52 -07:00
Brian Paul
702b5b076b mesa: rename slang_library_noise.[ch] to prog_noise.[ch] and rename functions
The noise functions were not glsl-specific.
Also, ran indent on the code to clean it up.
2008-12-15 18:37:39 -07:00
Brian Paul
c4341fe80a mesa: updated GLSL docs 2008-12-15 18:30:40 -07:00
Brian Paul
ec8cdc7113 Merge branch 'glsl-1.20-v2' 2008-12-15 18:25:43 -07:00
Brian Paul
4561307a27 mesa: bump glsl grammar revision
And update some copyrights.
2008-12-15 18:24:16 -07:00
Brian Paul
63fc119d6c mesa: in slang linker, replace assertion with link error when max samplers exceeded 2008-12-15 18:19:05 -07:00
Brian Paul
b8bfddf976 demos: updated tests/floattex.c (doesn't work just yet). 2008-12-15 18:19:05 -07:00
Brian Paul
c573b9f94a mesa: move _mesa_dlopen(), etc into separate dlopen.c file 2008-12-15 18:19:05 -07:00
Brian Paul
12219210af glut: added GLUT_PPM_FILE env var to dump first frame to a PPM file
Set GLUT_PPM_FILE to the desired filename.  The first frame rendered will
be written to that file.
2008-12-15 18:19:05 -07:00
Brian Paul
49543d7177 mesa: more re-org of variable declarations in glsl compiler 2008-12-15 18:18:08 -07:00
Brian Paul
a1229cc9e7 mesa: more comments, clean up 2008-12-15 16:57:37 -07:00
Brian Paul
a66ff046cc mesa: added comments, remove unused code 2008-12-15 16:49:32 -07:00
Brian Paul
aa1b904636 mesa: checkpoint: handle uniform vars in _slang_gen_var_decl()
This allows uniform declarations with scalar/array initializers.
The code is rough though, and will be cleaned up.
2008-12-15 16:44:55 -07:00
Eric Anholt
dc58da3e06 intel: stub out CompressedTexSubImage2D instead of segfaulting. 2008-12-15 15:10:18 -08:00
Eric Anholt
095c3a5cb1 i965: Update state before checking for fallbacks in brw_try_draw_prims.
This got flipped around in 7855b2aef6.

Bug #18907.  Thanks to idr for pointing me at a nicer testcase than blender.
2008-12-15 13:34:07 -08:00
Pierre Willenbrock
e72a442153 intel: Don't steal renderbuffer from caller in intel_miptree_create_for_region
Fixes double-frees of some regions, once from the renderbuffer code and
once from the miptree itself.

Bug #19062
2008-12-14 19:27:56 -08:00
Eric Anholt
0dfec4ab61 i965: Add decode of index/vertex buffer and primitive emit. 2008-12-14 19:27:56 -08:00
Eric Anholt
bc3b8a39a7 intel: Add batchbuffer assertions to hopefully catch future mistakes. 2008-12-14 19:27:55 -08:00
Ian Romanick
1126aa86bf Perform range checking on app supplied texture base level
It is possible for applications to specify any texture base level,
including trivially invalid values (i.e., 47000000).  When an app
specifies an invalide base level, we should gracefully disable the
texture instead of accessing memory outside the gl_texture_object.

This fixes an occasional segfault in one of our conformance tests.
2008-12-14 18:46:18 -08:00
Ian Romanick
63cca2ba10 GLX: Include glapi.h before glapitable.h
A previous commit (2dbc515a66) change
some of the interdependencies between these two header files.  Now
glapi.h must be included before glapitable.h.
2008-12-14 18:46:17 -08:00
Ian Romanick
2dd0c16f21 GLX: Change resulting from previous commit
Commit db61cbfa2aa241da49589331d8b6875d9a77d826 made modifications to
the protocol generator data and scripts.  This commit represents the
changes to the generated files resulting from the previous changes.

This is the client-side part of the fix for bugzilla #11003.
2008-12-14 18:46:17 -08:00
Neil Roberts
1709ab01ef Return 0 as the request size when the pixels parameter is NULL
img_null_flag was being ignored when calculating the size of a request
so a BadLength error gets thrown for glTexImage3D when the pixels
parameter is NULL.

See bug #11003
2008-12-14 18:46:17 -08:00
Ian Romanick
0f73302d24 GLX: Fix protocol for glTexSubImage#D
The TexSubImage commands do not have the "NULL image" flag that was
introduced with glTexImage3D.  However, there is a CARD32 pad element
where that flag would be.  Removing the img_null_flag causes the flag
to be removed from the protocol.  This changes the protocol and breaks
everything.

In order to prevent needing to hand-code all of the TexSubImage
functions, a new attribute was added to the param element.  This new
attribute, called "padding," is a boolean flag that selects whether or
not the parameter is a real parameter (default / false) or is protocol
padding (true) that does not appear in the function's parameter list.

This change resulted in a number of changes to other Python scripts.
In almost all cases parameters with the is_padding flag set should not
be emitted.

This patch only changes the the XML, the DTD, and the generator
scripts.  It does NOT include the resulting changes to the generated
code.  Generated code in the X server is also changed by the script /
XML changes in this patch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2008-12-14 18:46:17 -08:00
Dan Nicholson
8be02fc8c6 Add OSMesa pkg-config file
This makes the GLU .pc file a little simpler, too.
2008-12-14 09:35:29 -08:00
Dan Nicholson
71e208bafe Add more package metadata to the pkg-config files
The pkg-config files have been filled in more thoroughly to allow users
to use mesa more effectively. By adding metadata to Requires.private,
Libs.private and Cflags, we can ensure that all the libraries and
headers will be found in all situations. However, the full substitutions
are only done when using the configure script.

This also fixes the glu pkg-config file to account for using GL or
OSMesa.

Fixes bug 18161.
2008-12-14 08:47:03 -08:00
Gary Wong
a42342cd90 Fix silly type mismatch error in multinoise demo. 2008-12-13 20:06:21 -07:00
Gary Wong
d28e852895 i965: Finish OPCODE_NOISEn instructions.
Added missing OPCODE_NOISE4, and use BRW_REGISTER_TYPE_D (instead of _UD)
in the initial RNDD instructions (which avoids saturating negative inputs
to 0).
2008-12-13 14:28:28 -07:00
Gary Wong
d427a2910f Add "multinoise" demo, to test 1/2/3/4 dimensional noise. 2008-12-13 14:28:04 -07:00
Gary Wong
0df3dfab82 Ensure p.w is initialised in noise demo. 2008-12-13 14:25:52 -07:00
Brian Paul
a9475cc240 mesa: use IFLOOR(x) instead of (int) FLOORF(x) 2008-12-12 18:03:48 -07:00
Brian Paul
3b61e9c6e6 mesa: place glsl constant arrays in constant memory
For example, a declaration like
   const float[3] xxx = float[3](1.1, 2.2, 3.3);
will place the array in the constant buffer whereas a regular, non-const array
would be placed in the temporary register file.
Next up: do the same thing for uniform arrays.
2008-12-12 18:00:47 -07:00
Brian Paul
0da44c62cc mesa: remove old size=4 limit 2008-12-12 18:00:19 -07:00
Brian Paul
d4be09fb2b mesa: code clean-up in glsl compiler 2008-12-12 16:20:31 -07:00
Brian Paul
240e211c71 mesa: remove unneeded swizzle init code in glsl compiler 2008-12-12 16:02:31 -07:00
Brian Paul
4d49fc83f1 mesa: disable glsl debug output 2008-12-12 15:34:58 -07:00
Brian Paul
81253be334 mesa: remove unused varpool code in glsl compiler 2008-12-12 15:11:08 -07:00
Brian Paul
5c0c5e5af9 mesa: basic array constructors work now
For example: float[3] xxx = float[3](1.1, 2.2, 3.3);

Optimizations for const-qualified arrays next.
2008-12-12 15:07:21 -07:00
Brian Paul
c20d00f04b mesa: copy array_len in slang_fully_specified_type_copy() 2008-12-12 15:01:00 -07:00
Brian Paul
9016331d0f mesa: remove incorrect array_len assignment 2008-12-12 15:00:06 -07:00
Brian Paul
87a00959ba mesa: array size fix in _slang_typeof_operation() 2008-12-12 13:18:30 -07:00
Brian Paul
8571401d7d mesa: fix some more GLSL 1.20 array things.
Function that return arrays should work now.
2008-12-12 13:05:29 -07:00
Brian Paul
d5367622a3 mesa: more glsl function renaming 2008-12-12 10:32:56 -07:00
Brian Paul
b4019483de mesa: use _slang_alloc() 2008-12-12 10:29:15 -07:00
Brian Paul
456a4e274f mesa: glsl compiler function renaming 2008-12-12 10:22:47 -07:00
Brian Paul
9a174ef409 mesa: more glsl type/function movement 2008-12-12 10:17:58 -07:00
Brian Paul
aeeb9bca27 mesa: move some glsl compiler functions to different files to be more consistant 2008-12-12 10:11:41 -07:00
Brian Paul
ea9dc3879f mesa: move _slang_locate_function() to different file 2008-12-12 10:03:31 -07:00
Brian Paul
19ca2908be mesa: remove unused fixup table code in glsl compiler 2008-12-12 09:58:18 -07:00
Brian Paul
ade777ea1b mesa: checkpoint: GLSL 1.20 array constructors 2008-12-12 09:56:13 -07:00
Brian Paul
1737f2dbdd mesa: consolidate variable declaration initializer code for globals too 2008-12-11 19:34:43 -07:00
Brian Paul
2760bca1e1 mesa: move variable initializer IR generation into _slang_gen_var_decl()
More code consolidation coming...
2008-12-11 19:28:22 -07:00
Brian Paul
05ed9f7fe9 mesa: simplify some glsl variable declaration code 2008-12-11 19:10:58 -07:00
Xiang, Haihao
8b69c42b35 intel: check for null texture. (fix #13902) 2008-12-12 10:02:05 +08:00
Brian Paul
929eb00b32 mesa: glsl clean-ups 2008-12-11 18:49:28 -07:00
Brian Paul
2dc3de016c mesa: checkpoint commit of GLSL 1.20 array syntax.
This allows things like float[3] x = float[3](1., 2., 3.);

Parsing and AST construction now.  Codegen not working yet.
2008-12-11 18:02:19 -07:00
Xiang, Haihao
c8b505d826 i915: fallback for cube map texture.
The i915 (and related graphics cores) only support TEXCOORDMODE_CLAMP and
TEXCOORDMODE_CUBE when using cube map texture coordinates, so fall back to
software rendering for other modes to avoid potential gpu hang issue. This
fixes scorched3d issue on 945GM(see bug 14539).
2008-12-11 14:03:00 +08:00
Brian Paul
e8f5c1a5e8 mesa: in slang linker, replace assertion with link error when max samplers exceeded 2008-12-09 14:30:42 -07:00
Brian Paul
3c7419d57b demos: updated tests/floattex.c (doesn't work just yet). 2008-12-09 14:29:14 -07:00
Brian Paul
c89690f765 mesa: move _mesa_dlopen(), etc into separate dlopen.c file 2008-12-09 14:26:02 -07:00
Guillaume Melquiond
3b9bc821e1 tnl: Fix zeroing of the 3ub part of a 3ub+1ub attrib pair in SSE.
Bug #16520.
2008-12-09 13:18:02 -08:00
Guillaume Melquiond
b66495a0d9 tnl: Optimize SSE load[23]f_1 since they don't need the identity swizzle.
SSE movss from memory zeroes out everything above the destination dword, so
we get the (a, 0) or (a, 0, 0) result that these functions needed.

Bug #16520.
2008-12-09 13:17:48 -08:00
Guillaume Melquiond
6e29a3c8e2 tnl: Fix typo that resulted in fallback from SSE for EMIT_3UB_3F_RGB/BGR.
Bug #16520
2008-12-09 11:42:24 -08:00
Guillaume Melquiond
d507cd749b tnl: Avoid undefined input value use in insert_3f_viewport_2().
Bug #16520.
2008-12-09 09:29:08 -08:00
Brian Paul
5295f9a033 glut: added GLUT_PPM_FILE env var to dump first frame to a PPM file
Set GLUT_PPM_FILE to the desired filename.  The first frame rendered will
be written to that file.
2008-12-09 10:23:14 -07:00
Pierre Willenbrock
a0d5c3cfe6 intel: Require the right amount of space in glBitmap blit acceleration.
This leads to problems when the batchbuffer is flushed, but the bitmap
data could not fit into it.
2008-12-08 14:06:51 -08:00
Eric Anholt
f849d364c2 mesa: Fix GenerateMipmapEXT(GL_TEXTURE_CUBE_MAP_ARB).
The ctx->Driver.GenerateMipmap() hook only expects cubemap face enums, not
CUBE_MAP_ARB, so walk all faces when we encounter that.  Fixes oglconform
fbo.c segfault with both swrast and i965 drivers.
2008-12-06 22:41:52 -08:00
Eric Anholt
8b661a5d33 intel: Fall back on rendering to a texture attachment with a border.
Fixes a segfault in oglconform fbo.c test.
2008-12-06 22:41:52 -08:00
Eric Anholt
75b26e18a6 intel: Fix crash in automatic mipmap generation for glCopyTex{Sub,}Image.
The images aren't mapped at this point, so we want the generic Mesa path for
GenerateMipmapEXT that does the mapping/unmapping for us.  Ideally Mesa would
just call it for us.
2008-12-06 22:41:52 -08:00
Eric Anholt
a0625fa281 intel: Fix glCopyPixels blit acceleration for FBO destinations.
This was another opportunity to either get clipped to screen size or not get
clipped enough and draw outside of object boundaries.
2008-12-06 22:41:51 -08:00
Eric Anholt
cb433d91c6 intel: Fix glBitmap blit acceleration for FBO destinations.
Bug #18914.  Fixes fbo_firecube hang due to drawing outside the FBO bounds.
Thanks to Pierre Willenbrock for debugging the issue.
2008-12-06 22:41:51 -08:00
Eric Anholt
bdc8ac4426 intel: Put CopyTexImage fallback under DEBUG_FALLBACKS not DEBUG_TEXTURE. 2008-12-06 22:41:51 -08:00
Brian
6e0f8b174d mesa: assorted clean-ups, updated comments, etc. 2008-12-05 09:20:06 -07:00
Brian
249e1e4d30 mesa: replace large macros with inline functions 2008-12-05 09:20:06 -07:00
Brian
39091cc638 demos: added simple vertex shader texture test.
Draw a quadmesh where Z coord is taken from a texture map.
2008-12-03 18:55:25 -07:00
Jeremy Huddleston
f18880038b darwin: Use -Os instead of -O2
(cherry picked from commit 456dbb143a0d11b69d8af0d493cd84efb0596273)
2008-12-03 17:03:35 -08:00
Eric Anholt
264cba6f70 i965: Fix failure to upload new constant data when changing programs.
This is fallout from the ffvertex_prog.c work.  It doesn't call
ProgramStringNotify, so we don't set param_state, so we wouldn't track when
VP parameters changed, and constants wouldn't get uploaded.  Instead, remove
param_state entirely and just use the real value that we want to be tracking.

Fixes rendering in openarena since BRW_NEW_BATCH got disentangled from
BRW_NEW_INDICES.

Bug #18822.
2008-12-03 11:45:16 -08:00
Eric Anholt
8a1e7086c7 i965: Fix stray character that the compile whined about. 2008-12-03 11:30:58 -08:00
Kristian Høgsberg
154a9e5317 Bump dri2proto requirement to 1.99.3, drop CopyRegion bitmask from protocol. 2008-12-01 21:44:03 -05:00
Dave Airlie
cd031749a7 intel: restore old vertex submit paths for i8xx hardware.
Intel docs state that only 830/845 have VBOs, 855/865 don't. So
lets just not use them on i8xx at all.

This restores the old pre-vbo code and uses it on all 8xx hw.
2008-12-02 20:31:14 +10:00
Brian
1e2f574251 mesa: fix conditional in save_Lightfv(), bug 18838 2008-12-01 18:32:47 -07:00
Eric Anholt
e476acb105 i965: Add a new state flag BRW_NEW_NR_SURFACES instead of CACHE_NEW_SURFACE
The CACHE_NEW_SURFACE bit always gets spammed since we get many different
surface BOs per state emit, but the only consumer of it wanted to just know
how many surfaces were enabled.
2008-11-28 17:09:46 -08:00
Eric Anholt
8e5639577c i965: Fix clashing enums for BRW_NEW_INDICES/VERTICES versus BATCH/DEPTH_BUFFER.
Fixes upload of large amounts of state for every new primitive emit.
2008-11-28 17:09:46 -08:00
Eric Anholt
287d719a93 i965: Remove BRW_WM_LOCK dirty bit, introduced to work around lack of relocs.
This was causing a prepare of wm state at every primitive emit.
2008-11-28 17:09:46 -08:00
Eric Anholt
3f973de07c i965: Add debug code for dumping how frequently different dirty bits are set. 2008-11-28 17:09:46 -08:00
Eric Anholt
8e76ac070d i915: Remove dead early z enable bit which was always on. 2008-11-28 17:09:46 -08:00
Eric Anholt
7855b2aef6 i965: Reduce fast-pathiness of brw_try_draw_prims, bringing in important checks.
Later primitives, even if they caused a full state validate, wouldn't check
that there was enough space in the batchbuffer, occasionally triggering the
sanity check.  We also skipped the aperture space check, even if it would
mean bringing in new programs and associated state.
2008-11-28 17:09:45 -08:00
Brian Paul
baaf9779f1 mesa: add missing break statements 2008-11-28 16:17:57 -07:00
Brian Paul
166d5ac170 mesa: enable texture compression extensions for software drivers when possible 2008-11-28 14:08:04 -07:00
Phillip Klaus Krause
3b5cd7d74a mesa: remove unneeded compressed texure size checks 2008-11-28 13:54:08 -07:00
Brian Paul
ec17001cd4 mesa: fix default switch case in append_token(), see bug 18734 2008-11-28 13:50:41 -07:00
Brian Paul
c303e7299b mesa: remove an assertion (see bug 18734) 2008-11-27 11:01:30 -07:00
RALOVICH, Kristóf
8c2b4b33c5 Revert "glx: xcbified visual and FBConfig choosing"
This reverts commit 62688f1135.
2008-11-27 07:20:38 -07:00
RALOVICH, Kristóf
80d1531ebe Revert "glx: revert using nonexsisten XCB version of glXGetFBConfigsSGIX"
This reverts commit 5369876501.
2008-11-27 07:20:35 -07:00
RALOVICH, Kristóf
5369876501 glx: revert using nonexsisten XCB version of glXGetFBConfigsSGIX
This uses a GLX VendorPrivate request. VendorPrivates are real GLX API
calls but use the same protocol request. XCB does not currently
support specific VendorPrivetes directly. See eg.:
http://lists.freedesktop.org/archives/xcb/2008-November/004036.html
for more information.
2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
1e167f6b5c glx: remove XCB debug leftover 2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
ff3fa92eaa glx: xcbified glXSwapBuffers 2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
62688f1135 glx: xcbified visual and FBConfig choosing 2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
66db1b64e8 glx: xcbified __glXClientInfo 2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
5f19f5c586 configure.ac: advertise XCB 2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
6d1d157606 glx: no graphics context during initialization 2008-11-26 10:02:11 -07:00
RALOVICH, Kristóf
9c7aaa7afb glx: xcbified __glXIsDirect 2008-11-26 10:02:10 -07:00
RALOVICH, Kristóf
00f22f972f glx: missing static on local function 2008-11-26 10:02:10 -07:00
RALOVICH, Kristóf
f0d015cccb glx: use __glXGetString 2008-11-26 10:00:58 -07:00
RALOVICH, Kristóf
9c98e35ff6 glx: use __glXQueryServerString 2008-11-26 10:00:58 -07:00
RALOVICH, Kristóf
24b8a8cfe8 glx: implement __glXGetString, hide __glXGetStringFromServer 2008-11-26 10:00:58 -07:00
RALOVICH, Kristóf
fd52001c5c glx: implement QueryVersion using XCB 2008-11-26 10:00:58 -07:00
RALOVICH, Kristóf
5444424562 glx: implement __glXQueryServerString using XCB 2008-11-26 10:00:58 -07:00
Thomas Henn
55aeeef547 windows: fix visual object memleak 2008-11-26 09:51:29 -07:00
Thomas Henn
279343059f windows: fix _mesa_unreference_framebuffer() to pass ** type. 2008-11-26 09:49:32 -07:00
Brian Paul
001b1cbb0d mesa: add missing type check for function calls 2008-11-26 09:35:26 -07:00
Brian Paul
aa40de5c6f mesa: add missing size check for assignment optimization 2008-11-26 09:35:08 -07:00
Brian Paul
fea3a32e17 mesa: remove debug code 2008-11-26 09:02:37 -07:00
Brian Paul
e23122d309 demos: press SPACE to toggle fbo_firecube animation 2008-11-26 09:00:44 -07:00
Brian Paul
11701b4c15 mesa: add some missing switch cases for generating state var strings 2008-11-26 07:21:12 -07:00
Daniel Zimmermann
c03af8e780 fix possible memory leak in bezierPatchMeshMake 2008-11-26 07:20:02 -07:00
Brian Paul
8d95e66cf7 mesa: added support for GLSL 1.20 array.length() method
This is the only method supported in GLSL 1.20 so we take a few short-cuts.
2008-11-24 17:18:56 -07:00
Brian Paul
0fab514ff5 mesa: support for GLSL 1.20 array types
This allows syntax like "float[8] foo, bar;"
2008-11-24 15:28:21 -07:00
Brian Paul
b730d0d3e9 mesa: add gl_program::Input/OutputFlags[] array
These arrays will indicate per-input or per-output options for vertex/fragment
programs such as centroid-sampling and invariance.
2008-11-24 13:05:54 -07:00
Bernd Buschinski
d52e8543b6 glx: Add missing include for XCB, fixing crash on 64-bit.
Bug #18689
2008-11-24 11:40:38 -08:00
Brian Paul
153cc70ddb windows: replace free() with _mesa_unreference_framebuffer()
Fixes invalid memory reference bug when exiting.
2008-11-24 11:10:58 -07:00
Brian Paul
a203713738 mesa: copy centroid/invariance/precision info in parse_init_declarator() 2008-11-24 09:28:25 -07:00
Brian Paul
dc1107c08d mesa: check that varying variable qualifiers agree 2008-11-24 09:25:05 -07:00
Brian Paul
0e2f757413 mesa: copy precision/variant/centroid info in slang_fully_specified_type_copy() 2008-11-24 09:13:14 -07:00
Brian Paul
3197954554 mesa: set flags for varying vars 2008-11-24 09:05:49 -07:00
Brian Paul
f490ec9797 mesa: rename program parameter flags to match other Mesa conventions 2008-11-24 09:04:52 -07:00
Brian Paul
08b825a771 mesa: copy Flags in _mesa_clone_parameter_list() 2008-11-24 09:04:11 -07:00
Brian Paul
3f6668a4bf mesa: dump/debug varying vars list 2008-11-24 09:03:47 -07:00
Brian Paul
777a5c4f2e mesa: added PROG_PARAM_ bits for invariant, flat/linear interpolation
Plus, update the print/debug code.
2008-11-24 08:43:38 -07:00
Brian Paul
0f228d7ab3 mesa: add Flags field to gl_program_parameter
Only one flag defined so far: PROG_PARAM_CENTROID_BIT
2008-11-24 08:33:49 -07:00
Brian Paul
5464667874 docs: update webmaster email addr 2008-11-24 08:14:28 -07:00
Brian Paul
4f05893415 mesa: issue error, don't crash, when calling a prototyped, but undefined function
Bug #18659.
2008-11-21 17:22:16 -07:00
Brian Paul
b63a31b36f mesa: better variable name: s/aux/store/ 2008-11-21 14:24:28 -07:00
Brian Paul
c45c5c4ca4 added progs/demos/fragcoord.c - tests gl_FragCoord attribute in fragment shader
Fragment's red/greenb/blue is a function gl_FragCoord.xyz
2008-11-21 10:04:37 -07:00
Eric Anholt
3e0164aabb i965: Add support for accelerated CopyTexSubImage.
There were hacks in EmitCopyBlit before to adjust offsets so that y=0 after
the offsets had been adjusted for a negative pitch.  It appears that those
hacks were due to an unclear and surprising aspect of the hardware: inverting
the pitch results in the blit into the specified rectangle being inverted,
without the user needing to adjust y and base offset.

Tested with piglit copytexsubimage test on 915GM and GM965.  Should fix
serious performance issues with ETQW and other applications.
2008-11-21 17:35:33 +08:00
Eric Anholt
a6aa926e3f intel: Don't glBitmap fallback with scissoring enabled.
The blit bitmap code already handles scissoring.  This is a 15-100% speedup on
blender benchmark.blend thanks to avoiding fallbacks. Bug #17951.
2008-11-21 13:25:10 +08:00
Eric Anholt
2adef553f2 i915: Don't overwrite i915's Viewport function from generic code.
Instead, have i965 and i915 both call the generic function from their Viewport.
2008-11-21 13:23:46 +08:00
Xiang, Haihao
b6bb5e09e0 mesa: fix shadow sampling unit issue.
texture comparison logic is bypassed if the currently bound texture is not
a depth/depth_stencil texture.
2008-11-20 16:54:16 +08:00
airlied
1412ca0be2 intel: fix i830 comment + backwards VB offsets.
According to Keith the docs have these offsets the other way around
2008-11-20 21:27:45 +10:00
airlied
1ea414fdeb intel: fix i8xx vbo enable bit 2008-11-20 21:14:45 +10:00
airlied
b17e343bdd intel: add lots of i830 engine to intel_decode debug 2008-11-20 18:18:20 +10:00
Brian Paul
bab4e78734 mesa: minor comment reformattting 2008-11-19 16:04:37 -07:00
Brian Paul
bf7f9d2143 mesa: glsl compiler debug code
RETURN0 macro reports file/line before returning zero.
2008-11-19 15:08:46 -07:00
Brian Paul
ae0ff8097b mesa: rework GLSL array code generation
We now express arrays in terms of indirect addressing.  For example:
  dst = a[i];
becomes:
  MOV dst, TEMP[1 + TEMP[2].y];
At instruction-emit time indirect addressing is converted into ARL/
ADDR-relative form:
  ARL ADDR.x, TEMP[2].y;
  MOV dst, TEMP[1 + ADDR.x];
This fixes a number of array-related issues.  Arrays of arrays and complex
array/struct nesting works now.
There may be some regressions, but more work is coming.
2008-11-19 14:12:25 -07:00
Brian Paul
e709d68d92 mesa: don't realloc instruction buffer so often 2008-11-19 09:12:47 -07:00
Brian Paul
d9fa9e3290 mesa: updated comment 2008-11-19 09:12:47 -07:00
Xiang, Haihao
2f9ceb158a mesa: clamp luminance if needed.
This fixes glReadPixels(GL_LUMINANCE, GL_FLOAT)/glGetTexImage(GL_LUMINANCE, GL_FLOAT) issue
on fixed-point color buffers.
2008-11-19 11:30:30 +08:00
Brian Paul
80d6379722 mesa: no longer need Writemask field in GLSL IR nodes
The Swizzle and Size fields carry all the info we need now.
2008-11-13 18:19:12 -07:00
Brian Paul
3a7ed9779b mesa: revamp GLSL instruction emit code
This is a step toward better array handling code.  In particular, when more
than one operand of an instruction uses indirect addressing, we'll need some
temporary instructions and registers.  By converting IR storage to instruction
operands all in one place (emit_instruction()) we can be smarter about this.

Also, somewhat better handling of dst register swizzle/writemask handling.
This results in tighter writemasks on some instructions which is good for
SOA execution.

And, cleaner instruction commenting with inst_comment().

Next: remove some more dead code and additional clean-ups...
2008-11-13 18:19:12 -07:00
Brian Paul
610c2461ce mesa: make writemask_string() non-static 2008-11-13 18:19:12 -07:00
Brian Paul
4c167f8fc1 mesa: remove some do-nothing GLSL code 2008-11-13 18:19:12 -07:00
Brian Paul
fe984aed5a mesa: fix accidental regression in GLSL built-in texture matrix lookup
Was broken by commit 9aca9a4b72b2a7b378e50bd88f9c3324d07375ec.
2008-11-13 18:19:12 -07:00
Brian Paul
d835f415c6 mesa: use the tighter definition of GLSL ftransform() from the gallium branches 2008-11-13 18:19:12 -07:00
Brian Paul
e556cc82f8 mesa: remove unused/obsolete __NormalMatrixTranspose matrix 2008-11-13 18:19:12 -07:00
Brian Paul
47b883e42b mesa: fix bug in GLSL built-in matrix state lookup 2008-11-13 18:19:12 -07:00
Brian Paul
557fde9531 mesa: tweak program register printing for RelAddr case 2008-11-13 18:19:12 -07:00
Alan Hourihane
e4c9aeed8b mesa: fix generation of fixed function state when no vp exists 2008-11-13 13:31:10 +00:00
Eric Anholt
c30eb2c104 i965: Upload state on primitive switch, don't just prepare it.
This was a regression in 59b2c2adbb that broke
blender, among other apps.
2008-11-12 13:37:16 -08:00
Eric Anholt
2fc9d671e0 i965: Fix VB refcount leak on aperture overflow. 2008-11-12 13:34:20 -08:00
Eric Anholt
72bbc89534 Add glsync demo program from jbarnes for testing vblank synchronization. 2008-11-12 13:07:23 -08:00
Eric Anholt
62ff7ab720 i965: Fix up VS max_threads for G4X and removing a magic number.
As far as I can read in the docs, VS threads can be 1:1 with the pairs of
VUE handles allocated for them.  Also, G4X can run twice as many threads as
before (though we won't unless the we bump the preferred URB entries for VS).
2008-11-12 13:07:23 -08:00
Eric Anholt
9dadfc09a9 i965: Fix up SF max_threads.
We were dividing the number of URB entries by two to get number of threads,
which looks suspiciously like a copy'n'paste-o from brw_vs_state.c.  Also, the
maximum number of threads is 24, not 12.
2008-11-12 13:07:23 -08:00
Eric Anholt
82eb7c235d i965: Fix up clip min_nr_entries, preferred_nr_entries, and max_threads.
The clip thread could potentially deadlock when processing tristrips since
being moved back to dual-thread mode, as the two threads could each have 4 VUEs
referenced and not be able to allocate another one since SF processing
wasn't able to continue (needing 5 entries before it freed 2).
In constrained URB mode, similar deadlock could even have occurred with
polygons (so we cut back max_threads if we can't handle it any primitive type).
2008-11-12 13:07:22 -08:00
Eric Anholt
5cb7ba10cc i965: Update WM maximum threads for G4X. 2008-11-12 13:07:22 -08:00
Eric Anholt
d70d62c561 i965: Add a big comment explaining my understanding of URB management.
It shouldn't offer anything new over what's in the docs (except for G4X notes),
but here it's all in one place.
2008-11-12 13:07:22 -08:00
Kristian Høgsberg
e1fbb30211 glFlush before CopySubBuffer, fix coordinates and extension name typo. 2008-11-12 15:26:25 -05:00
Hanno Böck
becf3d9272 glx: fix xcb build 2008-11-12 06:56:42 -07:00
Brian Paul
90246d3ea5 mesa: fix version check in dinoshade.c 2008-11-11 14:35:39 -07:00
Brian Paul
f4361540f8 mesa: allow relative indexing into all register files and indirect dst register indexing 2008-11-11 14:35:39 -07:00
Kristian Høgsberg
57d78067bd Don't mess with emacs tab width. 2008-11-11 13:41:43 -05:00
Xiang, Haihao
09623fe551 intel: reset cliprect_mode to IGNORE_CLIPRECTS.
This ensures all batchbuffers have a same cliprect mode after calling
_intel_batchbuffer_flush even if there aren't invalid commands in the
current batch buffer. (fix bug#18362).
2008-11-11 13:58:15 +08:00
Xiang, Haihao
8412b06b67 mesa: restore the negate flag of dots in build_lighting.
Dots is re-used if more than one light is enabled. Previously
the negate flag of dots may affect next light.
2008-11-11 13:36:32 +08:00
Xiang, Haihao
064b04d464 mesa: update new state for RasterPos like other operations.
This fixes a lighting issue when drawing a bitmap.
2008-11-11 13:35:51 +08:00
Brian
be1b8e5d6c mesa: new _mesa_is_pow_two() function 2008-11-10 20:16:00 -07:00
Brian Paul
8df4f6667f mesa: restore glapi/ prefix on #include 2008-11-10 16:38:47 -07:00
Brian Paul
59cc973940 mesa: fix some misc breakage caused by editing auto-generated files rather than the python generators
Specifically:
  #include "glapitable.h" in src/mesa/main/glapi/dispatch.h
  Call _mesa_bsearch() in src/mesa/main/enums.c.
2008-11-10 14:42:02 -07:00
Brian Paul
13f96c5401 GLX: fix out-of-bounds memory issue in indirect glAreTexturesResident()
See bug 18445.
When getting array results, __glXReadReply() always reads a multiple of
four bytes.  This can cause writing to invalid memory when 'n' is not a
multiple of four.

Special-case the glAreTexturesResident() functions now.
To fix the bug, we use a temporary buffer that's a multiple of four bytes
in length.

NOTE: this commit also reverts part of commit 919ec22ecf
(glx/x11: Added some #ifdef GLX_DIRECT_RENDERING protection) which
directly edited the indirect.c file rather than the python generator!
I'm not repairing that issue at this time.
2008-11-10 14:27:42 -07:00
Brian Paul
6186e7a206 dri: alloc __DRIscreen object with calloc() 2008-11-10 12:39:36 -07:00
Brian Paul
2d76a0d77a mesa: track initialization status of uniform variables. Plus, asst clean-ups. 2008-11-10 12:39:36 -07:00
Brian Paul
379ff8c956 mesa: initial support for uniform variable initializers.
This lets one specify initial values for uniforms in the code, avoiding
the need to call glUniform() in some cases.
2008-11-10 12:39:36 -07:00
Brian Paul
242c0cb543 mesa: fix logic error in GLSL linker when looking for main() shaders 2008-11-10 12:39:36 -07:00
Brian Paul
80c8017a64 mesa: allows 'f' suffix on GLSL float literals 2008-11-10 12:39:36 -07:00
Brian Paul
e5359401d6 undo accidental changes to multitex.frag shader 2008-11-10 12:39:36 -07:00
Brian
f1c9016af1 mesa: remove OPCODE_INT #define 2008-11-08 10:33:30 -07:00
Brian
e24afc808f mesa: use NRM3 in emit_normalize_vec3() when drivers are ready 2008-11-08 10:29:03 -07:00
Brian Paul
87d1a26ba3 mesa: add support for 'centroid' qualifier in GLSL 1.20 2008-11-07 16:08:21 -07:00
Brian Paul
448156f769 mesa: add support for 'invariant' keyword for GLSL 1.20 2008-11-07 15:51:10 -07:00
Brian Paul
b632e5aa7f mesa: reformat comments, rewrap lines, etc for a little better readability 2008-11-07 14:28:00 -07:00
Brian Paul
22459e7a9c mesa: forgot sqrt in NRM3/4 instructions 2008-11-07 12:59:36 -07:00
Brian Paul
6dc91b8371 mesa: fix opcode table order bug 2008-11-07 12:59:08 -07:00
Brian Paul
a98a25c25f mesa: add GLSL support for DP2, NRM3, NRM4 instructions (not actually emitted yet though) 2008-11-07 09:51:25 -07:00
Brian Paul
65cb74ecc0 mesa: added DP2, DP2A instructions 2008-11-07 09:51:25 -07:00
Brian Paul
37eef7b474 mesa: added AND/OR/NOT/XOR instructions 2008-11-07 09:51:25 -07:00
Brian Paul
d93072782a mesa: include shader/prog_instruction.h
Seems to fix a mysteriously missing build dependency.
2008-11-07 09:51:25 -07:00
Brian Paul
f6ead50827 mesa: added OPCODE_NRM3/NRM4 instructions for vector normalization.
We may emit these instructions from GLSL instead of DP3/RCP/MUL.

Also, implement SSG (set sign) instruction in the interpreter.
2008-11-07 09:51:25 -07:00
Xiang, Haihao
4550b0562d mesa: use _bfc0 instead of _col0 when building back face lighting. 2008-11-07 14:58:04 +08:00
Brian Paul
035c0cf71a mesa: rename OPCODE_INT -> OPCODE_TRUNC
Trunc is a more accurate description; there's no type conversion involved.
2008-11-06 17:14:33 -07:00
Brian Paul
517401af07 mesa: update the shader programs->TexturesUsed array at link time
If an application never calls glUniform() to set sampler variable values
they'll remain 0 (the default value/unit).
Now call _mesa_update_shader_textures_used() at link time in case glUniform()
is never called.  program->TextureUsed[] will then be correct for state
validation.
2008-11-06 15:24:18 -07:00
Xiang, Haihao
df94fd1764 i965: Always check vertex program.
Now i965 also uses the vertex program created by Mesa Core, but this vertex program
is not only depend on mesa state _NEW_PROGRAM, so always check the current vertex
program is updated or not. This fixes broken demo cubemap.
2008-11-06 15:25:55 +08:00
Gary Wong
0060d41549 i965: Implement missing OPCODE_NOISE3 instruction in fragment shaders.
OPCODE_NOISE4 coming later.
2008-11-05 20:38:05 -05:00
Brian Paul
1bfdab781b mesa: Fix compiler warnings on Windows.
cherry-picked subset of a77976d2ee
2008-11-05 16:04:40 -07:00
Brian Paul
50beb4e6fd mesa: fix a GLSL array indexing codegen bug
Expressions like array[i] + array[j] didn't work properly before.
2008-11-05 16:02:16 -07:00
Brian Paul
dea4826b84 mesa: remove extra \n from printf string 2008-11-05 09:34:15 -07:00
Brian Paul
949e7383b5 mesa: add Initialized field to gl_uniform struct, for debugging purposes only 2008-11-05 09:17:55 -07:00
Brian Paul
aab429c8df added glsl/skinning.c test to test matrix blending/weighting 2008-11-04 16:56:59 -07:00
Brian Paul
6c8274078d mesa: fix float-valued GLSL vertex attribute variables
The swizzle mask for such variables wasn't set up properly.
2008-11-04 16:55:18 -07:00
Brian Paul
35a9f1bccf print err msg if unable to open shader file 2008-11-04 16:55:18 -07:00
Brian Paul
d3222cb1d4 remove old debug glFlush/Finish calls from demos 2008-11-04 16:55:18 -07:00
Eric Anholt
4be624d693 i965: Clean up stale NDC comment. 2008-11-02 12:30:01 -08:00
Eric Anholt
9fd4c27ae3 i965: Avoid vs header computation for negative rhw on G4X.
This cuts one MOV out when setting a zero header.
2008-11-02 12:30:01 -08:00
Eric Anholt
34b1776e8d i965: Merge GM45 into the G4X chipset define.
The mobile and desktop chipsets are the same, and having them separate is
more typing and more chances to screw up.
2008-11-02 12:30:00 -08:00
Eric Anholt
d758c48761 i965: Fix copy'n'paste issue that made brw->urb.constrained useless.
Also, add a comment explaining what brw->urb.constrained tries to do.
2008-11-02 12:30:00 -08:00
Brian Paul
bbffed0857 mesa: silence warnings 2008-11-01 16:05:40 -06:00
Brian Paul
b625a0a475 mesa: do scope replacement for while/for loops too
This fixes a function inlining bug involving vars declared inside loop bodies.
2008-11-01 16:05:40 -06:00
Brian Paul
3d0d803313 mesa: glsl tree print improvements 2008-11-01 16:05:40 -06:00
Brian Paul
1e1ba54a94 mesa: fix assignment / parameter passing of sampler types 2008-11-01 16:05:40 -06:00
Brian Paul
131d42573c mesa: additional debug flags for glsl debug/disassembly 2008-11-01 16:05:40 -06:00
Keith Packard
72c914805b Fix for 58dc8b7: dest regions must not use HorzStride 0 in ExecSize 1
Quoting section 11.3.10, paragraph 10.2 of the 965PRM:

10.2. 	If ExecSize is 1, dst.HorzStride must not be 0. Note that this is
	relaxed from rule 10.1.2. Also note that this rule for destination
	horizontal stride is different from that for source as stated in
	rule #7.

GM45 gets very angry when rule 10.2 is violated.

Patch 58dc8b7 (i965: support destination horiz strides in align1 access mode)
added support for additional horizontal strides in the ExecSize 1 case, but
failed to notice that mesa occasionally re-purposes a register as a
temporary destination, even though it was constructed as a repeating source
with HorzStride = 0.

While, ideally, we should probably fix the code using these register
specifications, this patch simply rewrites them to use HorzStride 1 as the
pre-58dc8b7 code did.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-01 14:38:19 -07:00
Brian Paul
06fe728e5b mesa: fix some bugs with precision qualifier parsing 2008-10-31 17:42:26 -06:00
Brian Paul
90711775d7 mesa: do scope replacement for variable initializers too 2008-10-31 17:42:26 -06:00
Brian Paul
89bca902b3 mesa: fix copy/paste error in GLSL error msg 2008-10-31 17:42:25 -06:00
Eric Anholt
69e10084cd intel: pixelzoom doesn't apply to glBitmap, so disable the fallback. 2008-10-31 16:04:50 -07:00
Eric Anholt
018088996a intel: Remove fallback for glDrawPixels(GL_COLOR_INDEX)
GL_COLOR_INDEX mode is just like other normal formats (that is, not
depth/stencil) and is uploaded fine by TexImage.
2008-10-31 16:04:50 -07:00
Eric Anholt
ed478a5fde intel: Add more fallback debugging for glDrawPixels. 2008-10-31 16:04:50 -07:00
Gary Wong
ab3e9c481f i965: implement the missing OPCODE_NOISE1 and OPCODE_NOISE2 instructions.
(Only in fragment shaders, so far.  Support for NOISE3 and NOISE4 to come.)
2008-10-31 17:37:26 -04:00
Gary Wong
58dc8b7db5 i965: support destination horiz strides in align1 access mode.
This is required for scatter writes in destination regions to work.
2008-10-31 17:34:32 -04:00
Xiang, Haihao
963071ffea mesa: fix a typo in the previous commit 2008-10-31 09:24:27 +08:00
Xiang, Haihao
bccc09e6bf mesa: fix an issue in _mesa_PointParameterfv(). 2008-10-30 10:40:51 +08:00
Brian Paul
239ce2240a glx: added PFNGL*PROC typedefs for GLX 1.3 functions
Since we define GLX_VERSION_1_3 in glx.h, the typedefs in the glxext.h header
were getting skipped.
2008-10-29 15:49:19 -06:00
Nigel Stewart
cd1283f515 glu: fix compilation problem when using Windows gl.h (sf bug 2204589) 2008-10-29 09:23:48 -06:00
Eric Anholt
26c1c04fd0 intel: Fix glDrawPixels with 4d RasterPos. 2008-10-28 22:52:38 -07:00
Eric Anholt
59b2c2adbb i965: Fix check_aperture calls to cover everything needed for the prim at once.
Previously, since my check_aperture API change, we would check each piece of
state against the batchbuffer individually, but not all the state against the
batchbuffer at once.  In addition to not being terribly useful in assuring
success, it probably also increased CPU load by calling check_aperture many
times per primitive.
2008-10-28 22:52:38 -07:00
Brian Paul
835a9fef05 mesa: include glslcompiler driver in tarball 2008-10-28 18:27:21 -06:00
Brian Paul
1100866aa1 mesa: fix stand-alone glslcompiler build 2008-10-28 17:03:49 -06:00
Eric Anholt
0cade4de4f intel: Don't keep intel->pClipRects, and instead just calculate it when needed.
This avoids issues with dereferencing stale cliprects around intel_draw_buffer
time.  Additionally, take advantage of cliprects staying constant for FBOs and
DRI2, and emit cliprects in the batchbuffer instead of having to flush batch
each time they change.
2008-10-28 13:23:33 -07:00
Gary Wong
e92a457ac0 i965: Allocate temporaries contiguously with other regs in fragment shaders.
This is required for threads to be spawned with correctly sized GRF
register blocks.
2008-10-28 15:03:14 -04:00
Julien Cristau
98fcdf3f49 configure.ac: Add support for gnu/kfreebsd
Check for *-gnu instead of linux* to set DEFINES.
Change some freebsd* checks to *freebsd*.
2008-10-28 11:45:05 -07:00
Eric Anholt
bcfba0d91e i965: Fix compiler warning from unused var. 2008-10-27 11:53:06 -07:00
Eric Anholt
a74b1e149d i965: Remove dead brw->wrap flag. 2008-10-27 11:53:06 -07:00
Eric Anholt
dd17cd600a intel: Use dri_bo_get_tiling to get tiling mode of buffers we get from names.
Previously, we were trying to pass a name to the GEM GET_TILING_IOCTL,
which needs a handle, and failing.  None of our buffers were tiled yet, but
they will be at some point with DRI2 and UXA.
2008-10-27 11:53:06 -07:00
Xiang, Haihao
2a877411db intel: GL_FALSE on a BO if it won't be modified when mapping this BO. (thanks Eric). 2008-10-26 06:38:27 +08:00
Xiang, Haihao
ec8076264e i965: don't emit state when dri_bufmgr_check_aperture_space fails.
This ensures there is an unfilled batchbuffer used for emitting states again. Partial fix for #17964.
2008-10-24 16:05:48 +08:00
Xiang, Haihao
f657c81911 intel: fallback for intelEmitCopyBlit.
Use _mesa_copy_rect instead of BLT operation if dri_bufmgr_check_aperture_space
still fails after flushing batchbuffer. Partial fix for #17964.
2008-10-24 15:55:32 +08:00
Brian Paul
8c20c913f8 mesa: version 43 of glext.h 2008-10-23 11:23:36 -06:00
Brian Paul
3efd3b1512 mesa: version 21 of glxext.h 2008-10-23 11:21:32 -06:00
Brian Paul
ea6ddcbe0e mesa: remove calls to _mesa_adjust_image_for_convolution(), use texImage fields
The texImage->Width/Height fields will have the post-convolution width/height.
2008-10-23 10:49:51 -06:00
Brian Paul
95c04cccfe mesa: move convolution image adjustment code for glCopyTexSubImage1/2/3D()
Do it after initial error checking, after we know the texture's internal format.
2008-10-22 07:53:26 -06:00
Brian Paul
9dfd54fa83 mesa: some re-org of glCopyTexSubImage1/2/3D() error checking 2008-10-22 07:48:37 -06:00
Brian Paul
22e442544b mesa: in textore.c, only adjust image for convolution if image is a color format
Makes things consistant with the code in teximage.c.
We only want to apply convolution to color formats (not depth/index formats)
2008-10-22 07:36:33 -06:00
Kristof Ralovich
0970de3171 glx: updated comment 2008-10-21 08:20:43 -06:00
Xiang, Haihao
b4bf9acc32 i915: fix carsh in i830_emit_state. (bug #17766) 2008-10-21 10:30:39 +08:00
Brian Paul
893ea47e44 glxswapcontrol: added -fullscreen option 2008-10-16 14:33:27 -06:00
Brian Paul
9a84d78c18 glxgears: for fullscreen, disable window borders the right way 2008-10-16 14:33:27 -06:00
Roland Scheidegger
73e1193632 fix span issue with really old ddx and non-tcl r100 chips 2008-10-16 16:25:52 +02:00
Brian Paul
a7b24ac02f mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861 2008-10-16 08:23:53 -06:00
Kristian Høgsberg
4830809524 Update DRI2 implementation according to new specification. 2008-10-14 23:07:55 -04:00
Kristian Høgsberg
77c7f90ed4 Revert pointless reindents to avoid merge conflicts.
Why are we reindenting code that's work in progress...
2008-10-14 23:07:42 -04:00
RALOVICH, Kristóf
351de8aecc glx: indent -br -i3 -npcs --no-tabs glxclient.h 2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
03b471d389 glx: indent -br -i3 -npcs --no-tabs glcontextmodes.h 2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
843a09cf5c glx: indent -br -i3 -npcs --no-tabs glxextensions.c 2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
80c83c97fc glx: indent -br -i3 -npcs --no-tabs glxextensions.h 2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
1d0a9e4377 glx: indent -br -i3 -npcs --no-tabs xfont.c 2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
4a3ccc6ca5 glx: indent -br -i3 -npcs --no-tabs xf86dristr.h 2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
4d2a381114 glx: indent -br -i3 -npcs --no-tabs XF86dri.c 2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
04a810beac glx: indent -br -i3 -npcs --no-tabs xf86dri.h 2008-10-13 16:53:41 -06:00
RALOVICH, Kristóf
4c4cb1b5d1 glx: kill old K&R syntax in XF86dri.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
b9a2d35429 glx: indent -br -i3 -npcs --no-tabs vertarr.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
64085b2c2c glx: indent -br -i3 -npcs --no-tabs singlepix.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
dd0edeb887 glx: indent -br -i3 -npcs --no-tabs single2.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
507808875d glx: indent -br -i3 -npcs --no-tabs renderpix.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
6bfd57ecde glx: indent -br -i3 -npcs --no-tabs render2.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
40c481dc91 glx: indent -br -i3 -npcs --no-tabs pixelstore.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
6581071c1d glx: indent -br -i3 -npcs --no-tabs pixel.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
cfe7f20d0e glx: indent -br -i3 -npcs --no-tabs packsingle.h 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
0cff716e70 glx: indent -br -i3 -npcs --no-tabs packrender.h 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
68583292b1 glx: indent -br -i3 -npcs --no-tabs indirect_window_pos.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
ccc03b427a glx: indent -br -i3 -npcs --no-tabs indirect_vertex_program.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
1c916736b8 glx: indent -br -i3 -npcs --no-tabs indirect_vertex_array_priv.h 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
9389aa3c0b glx: indent -br -i3 -npcs --no-tabs indirect_vertex_array.h 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
c868ab3dd1 glx: indent -br -i3 -npcs --no-tabs indirect_vertex_array.c 2008-10-13 16:53:40 -06:00
RALOVICH, Kristóf
39df336635 glx: indent -br -i3 -npcs --no-tabs indirect_transpose_matrix.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
64d1c10e6c glx: indent -br -i3 -npcs --no-tabs indirect_texture_compression.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
6020e6e66a glx: indent -br -i3 -npcs --no-tabs glx_query.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
2d4c26b85e glx: indent -br -i3 -npcs --no-tabs glx_pbuffer.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
bd6a3d5975 glx: indent -br -i3 -npcs --no-tabs glxhash.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
39c958944c glx: indent -br -i3 -npcs --no-tabs glxhash.h 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
acb7e52430 glx: indent -br -i3 -npcs --no-tabs glxext.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
3a2d2fcd8a glx: indent -br -i3 -npcs --no-tabs glxcurrent.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
1293356c60 glx: indent -br -i3 -npcs --no-tabs glxcmds.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
07c9bd246d glx: indent -br -i3 -npcs --no-tabs glcontextmodes.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
f76724b767 glx: indent -br -i3 -npcs --no-tabs eval.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
60aa0918a1 glx: indent -br -i3 -npcs --no-tabs drisw_glx.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
4e88ae5639 glx: indent -br -i3 -npcs --no-tabs dri_glx.c 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
09c889b318 glx: indent -br -i3 -npcs --no-tabs dri_common.h 2008-10-13 16:53:39 -06:00
RALOVICH, Kristóf
4d86228321 glx: indent -br -i3 -npcs --no-tabs dri_common.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
2e8d62be61 glx: indent -br -i3 -npcs --no-tabs dri2.h 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
bca6e79a45 glx: indent -br -i3 -npcs --no-tabs dri2_glx.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
66cc150770 glx: indent -br -i3 -npcs --no-tabs dri2.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
f788a8ed69 glx: indent -br -i3 -npcs --no-tabs compsize.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
ee3a6cec36 glx: indent -br -i3 -npcs --no-tabs clientattrib.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
58b72103d3 glx: add a line of Emacs helping variables 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
61eb4f50eb glx: No need to zero a local variable.
My previous commit e206034863 introduced this.
2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf
0b188d1cdc glx: make INIT_MESA_SPARC more robust
Embed the macro body into do { ... } while(0) .
2008-10-13 16:53:38 -06:00
Xiang, Haihao
c238098bbc i915: Texture instructions use r/t/oC/oD register as texture coordinate.
Fix http://bugs.freedesktop.org/show_bug.cgi?id=16287.
2008-10-13 13:04:04 +08:00
Eric Anholt
5c39bad220 intel: Add acceleration for glDrawPixels(GL_STENCIL_INDEX).
This is nasty because there's no way in GL to output data to the stencil
buffer directly, so we have to do a dance to wrap the depth/stencil buffer
in an ARGB renderbuffer.

Improves performance of several oglconform testcases by better than a factor
of 2.
2008-10-11 03:17:08 -07:00
Brian Paul
24748268a3 mesa: fix asst. issues in _mesa_texstore_argb8888()
If we shift bytes into the texel word (or use the PACK_COLOR_8888 macro),
we don't have to worry about big vs. little endian.  See comments about
texel formats in texformat.h.
Remove an unneeded/incorrect else-if clause that produced wrong results
on big-endian systems.
2008-10-10 16:34:08 -06:00
Brian Paul
bf9d9a9d01 mesa: include needed header 2008-10-10 16:34:08 -06:00
Brian Paul
f863ae1a04 mesa: remove unneeded includes 2008-10-10 16:34:08 -06:00
Brian Paul
85a3bf6dab mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861 2008-10-10 16:34:08 -06:00
Brian Paul
3210a6d6c7 mesa: rename macro params to emphasize that there's no particular color ordering 2008-10-10 16:34:08 -06:00
Brian Paul
f63594bfef mesa: remove unneeded includes 2008-10-10 16:34:08 -06:00
Ian Romanick
e700269441 intel: GLSL 1.20 is broken in Mesa, so disable it in the i965 driver 2008-10-10 11:47:43 -07:00
Eric Anholt
5e9cb42aa6 i965: Add missing intel_pixel_draw.c symlink to fix build. 2008-10-10 09:43:15 -07:00
Eric Anholt
7216679c19 i965: Accelerate depth textures with border color.
The fallback was introduced to fix bug #16697, but made the test it was
fixing run excessively long.
2008-10-09 11:45:58 -07:00
Eric Anholt
91221483a6 i965: Actually hook up the accelerated DrawPixels support. 2008-10-09 10:23:47 -07:00
Eric Anholt
9aec1288ee i915: Accelerate depth textures with border color.
The fallback was introduced to fix bug #16697, but made the test it was
fixing run excessively long.
2008-10-08 23:55:58 -07:00
Brian Paul
a71b1af5ad mesa: vertex emit debug code (disabled) 2008-10-08 09:33:56 -06:00
Brian Paul
5462d447aa mesa: fix vertex format/attribute bug
If the tnl output attributes matches the swsetup input attributes we still
need to check if the desired vertex color type (float vs. chan) has changed
so that we use the right emit functions.

Fixes a conformance failure found with logicop test at pathlevel 3.
2008-10-08 09:33:56 -06:00
Eric Anholt
902727b7e3 mesa: Pass the context to query object delete cb to avoid null dereference. 2008-10-07 18:52:12 -07:00
Eric Anholt
c157cfc637 i965: Add ARB_occlusion_query support. 2008-10-07 18:52:12 -07:00
Eric Anholt
fc19536aa9 intel: Push flushing for cliprects changes down into the cliprects changes.
This lets us short-circuit when we're leaving the same cliprects in place,
which becomes quite common with metaops clears, and may be useful for some of
our FBO paths.
2008-10-07 18:52:12 -07:00
Xiang, Haihao
94d3a30df7 i965: Fix a potential assertion failure. 2008-10-08 09:30:12 +08:00
Brian Paul
7cb723a3fd mesa: pass 'mask', not NULL to renderbuffer->Put functions
Fixes bug 17800.
2008-10-07 16:52:47 -06:00
Brian
4f4147eadd mesa: fix convolve/convolution mix-ups 2008-10-06 17:10:22 -06:00
Brian Paul
f8baad2d25 mesa: set FRAG_BIT_FOGC bit in InputsUsed if FogOption!=GL_NONE 2008-10-06 12:29:29 -06:00
Brian Paul
6e34fc0d37 mesa: adjust texcoords for swrast sprite points.
Fixes glean pointSprite test w/ software rendering
2008-10-06 11:34:01 -06:00
Brian Paul
145d49838f mesa: fix static library construction
If the .a is made of other .a files, extract the objects from the later.
2008-10-06 11:01:31 -06:00
Brian Paul
b0ca50bd38 mesa: updated _mesa_delete_query() comments 2008-10-06 09:32:33 -06:00
Brian Paul
382911bdbc mesa: add missing GLcontext param to _mesa_delete_query().
Fixes vtk crash and others.
2008-10-06 09:26:45 -06:00
Eric Anholt
91d0020eec i915: Refine the texture indirect lookup accounting.
Without this, we would reject programs which sampled multiple times from
registers defined in the same phase (block of instructions with the same
texture indirection count), as each sample would count as a new phase
beginning.  Instead, keep track of which phases registers were written in,
and only bump phase when we're reading from one generated in this phase.

On the other hand, we failed to count oC or oD texture samples as being new
phases.

Bug #17865.
2008-10-04 18:40:32 -07:00
Ian Romanick
db9ba91971 intel: Don't advertise unsupported extensions on pre-965 hardware
Move GL_ARB_texture_non_power_of_two and GL_ATI_separate_stencil
from the generic extension list to the 965-specific list.  Neither
extension is supported on i830-class hardware, and
GL_ATI_separate_stencil is not supported on i915-class hardare.
GL_ARB_texture_non_power_of_two is supported on i915-class hardare and
is already in the i915-specific list.
2008-10-03 12:16:04 -07:00
Ian Romanick
4741dbcbbc Unify ARB_depth_texture and SGIX_depth_texture
The ARB extension is a superset of the older SGIX extension.  Any
hardware that can support the SGIX version can also support the ARB
version.  In Mesa, any driver that supports one also supports the
other.  This unification just simplifies some bits of code.
2008-10-01 20:38:10 -07:00
Eric Anholt
17fdd1ab3b i965: sampler default color ends up in texture cache, not instructions.
See volume 4, SAMPLER_BORDER_COLOR_STATE programming notes.
2008-10-01 16:59:16 -07:00
Eric Anholt
df6ae3f0a3 i965: Fix overwriting of depth override for SetTexOffset.
Fixes black borders around windows in compiz.  Bug #17233.
2008-10-01 14:15:17 -07:00
Ian Romanick
08b9e29c1d intel: Clean-up the extension string madness!
- Sort extensions by ARB, then EXT, then vendor by name
- Remove redundant (only one of GL_{ARB,EXT,NV}_texture_rectangle) or
  duplicate extension strings
2008-09-29 18:50:05 -07:00
Ian Romanick
3ab4b2066f GLSL: Implement GL_OBJECT_TYPE_ARB query
The GL_OBJECT_TYPE_ARB query is handled directly in
_mesa_GetObjectParamterivARB because it is only supported in the
extension version of the shanding language API.  glGetProgramiv and
glGetShaderiv should not accept this enum.
2008-09-29 12:30:05 -07:00
Ian Romanick
905d8e0742 GLSL: Implement _mesa_get_handle
Implementing _mesa_get_handle in using
glGetIntegerv(GL_CURRENT_PROGRAM, ...) allows glGetHandleARB to work.
2008-09-29 12:27:00 -07:00
Ian Romanick
d806d451e6 GLSL: AttachShader returns INVALID_OPERATION for repeated attach
The GL_ARB_shader_objects spec says that glAttachShaderARB is supposed
to return GL_INVALID_OPERATION if a shader is attached to a program
where it is already attached.  _mesa_attach_shader perviously returned
without error in this case.
2008-09-29 12:18:06 -07:00
Jouk Jansen
fc13269b82 mesa: asst updates for VMS 2008-09-29 08:35:05 -06:00
Shunichi Fuji
e095d5812a mesa: drop calloc from _mesa_get_fixed_func_vertex_program
Signed-off-by: Shunichi Fuji <palglowr@gmail.com>
2008-09-29 10:38:45 +01:00
Ian Romanick
2b8d8989fb Use 3Dnow! x86-64 routines only on processors that support 3Dnow!
Added an x86-64 CPUID function and use it to detect 3Dnow!  If 3Dnow!
is available, use _mesa_3dnow_transform_points4_3d_no_rot,
_mesa_3dnow_transform_points4_perspective,
_mesa_3dnow_transform_points4_2d_no_rot, and _mesa_3dnow_transform_points4_2d.

This fixes long standing bug #8724.
2008-09-28 20:32:05 -07:00
Ian Romanick
b5d59222cc Remove TNL-to-VP tracking from i965
The i965 driver previously had it's own set of code to convert
fixed-function TNL state to a vertex program.  Core Mesa has code to
do this, so there is no reason to duplicate that effort in the driver.
In fact, this duplication leads to bugs when other aspects of the Mesa
infrastructure change.
2008-09-28 20:32:05 -07:00
Tobias Jakobi
2e5d717007 glapi: add DISPATCH_FUNCTION_SIZE 2008-09-27 08:51:45 +01:00
Tobias Jakobi
a23026effc glapi: add gl_dispatch_functions_start and end 2008-09-27 08:47:55 +01:00
Eric Anholt
7d99ddcb2b intel: Fix a number of memory leaks on context destroy. 2008-09-26 15:39:20 -07:00
Jeremy Huddleston
8338cc25f9 configs: darwin: Don't build GLw
(cherry picked from commit ef688ba1ee366a8937a41075cbe8b76a9bf75013)
2008-09-26 12:37:31 -07:00
Brian Paul
a4a5a37f27 mesa: remove invalid assertions that programs have parameters
Fixes failure with demos/fplight.c
2008-09-26 07:45:06 -06:00
Brian Paul
4bc39c58eb mesa: fix assertion in _mesa_reference_program() 2008-09-26 07:40:45 -06:00
Brad King
ee80c64be8 mesa: fix param indexing 2008-09-26 07:40:05 -06:00
Brian
1e3a44fab0 mesa: fix cast/conversion for optional code 2008-09-25 19:57:34 -06:00
Brian Paul
b3c3bc63f0 mesa: fix typo (s/feadback/feedback/). Fixes broken selection/feedback. 2008-09-25 18:55:52 -06:00
Brian Paul
8124faf89d mesa: fix float->int mapping for glGetIntegerv(GL_DEPTH_CLEAR_VALUE) 2008-09-25 11:54:00 -06:00
Brian Paul
6222eb3fcd mesa: fix some VBO buffer object issues
The VBO module may use a real VBO or a malloc'd buffer for vertex storage.
Be careful not to accidentally replace the later with the former when drawing.
Check if using a real VBO at destroy time to prevent a double-free.
2008-09-25 11:03:46 -06:00
Sam Hocevar
507ef82077 mesa: fix function params to match prototypes 2008-09-25 09:58:27 -06:00
Sam Hocevar
7be5411ce6 mesa: prevent the slang code generator from aborting when faced with a sampler variable redeclaration. 2008-09-25 09:53:09 -06:00
Sam Hocevar
561787e697 i965: support for sin() and cos() in vertex shaders. 2008-09-25 09:49:36 -06:00
Sam Hocevar
831bfb9053 i965: more meaningful message for unsupported opcodes. 2008-09-25 09:49:18 -06:00
Eric Anholt
c5945c2d17 intel: Fix clears to depth_stencil texture attachments.
Broken by 0adfd10210, showed up as an assertion
failure in a software fallback in the shadowtex demo when we failed to
recognize the texture format.
2008-09-24 15:13:19 -07:00
Brian
1fe385fdc9 set SamplerUnit[] entry in load_texture() just to be safe
(cherry picked from commit fce4612f8a)
2008-09-24 10:15:07 -07:00
Brian
dff0b0e772 use PROGRAM_CONSTANT instead of PROGRAM_STATE_VAR when generating immediates/literals
(cherry picked from commit fdc8636bdc)
2008-09-24 10:13:46 -07:00
Brian
9b7e5a51f4 set program->SamplersUsed bit when using a texture instruction 2008-09-24 10:13:31 -07:00
Brian
93fef22d05 Remove ctx field from texenvprog_cache 2008-09-24 10:11:37 -07:00
Brian
fb3c41f504 include programopt.h
(cherry picked from commit 83fad68ec1)
2008-09-24 10:04:31 -07:00
Brian
c81cce7831 Disable vertex shader fog, compute fog in fragment shader. 2008-09-24 10:04:17 -07:00
Brian
19d77d6cfa temporarily set the FRAG_BIT_FOGC bit in InputsRead when fog is enabled
(cherry picked from commit 63be96bdc7)
2008-09-24 10:03:27 -07:00
Keith Whitwell
8e7d941d7a mesa: fix main/ prefix in include 2008-09-23 21:08:50 -07:00
Keith Whitwell
33fef8be82 vbo: unmap and remap immediate vbo before/after each draw.
Also use BufferData(NULL) to get fresh storage and avoid synchronous
operation where we would have to flush and wait for the fence after each
draw because of the map.

This will chew through a whole load of buffer space on small draws, so
it isn't a proper solution.  Need to support a no-fence or append mapping
mode to do this right, or use user buffers.
2008-09-23 18:26:17 -07:00
Brian
6f765fbde4 added vbo_use_buffer_objects() to specify that immediate mode data should be put into bufferobjects 2008-09-23 18:26:00 -07:00
Keith Whitwell
b36bc54d3c vbo: seed initial max_element value with a more likely candidate
(cherry picked from commit 026e7731e5)
2008-09-23 18:05:48 -07:00
Brian Paul
9acf207277 mesa: s/GL_POLYGON+1/PRIM_OUTSIDE_BEGIN_END/
(cherry picked from commit 8a369b909a)
2008-09-23 17:36:01 -07:00
Brian Paul
5b98236e75 mesa: glsl: fix glGetUniform for matrix queries
(cherry picked from commit 7a6eba54d0)
2008-09-23 17:34:59 -07:00
Brian Paul
eda291e316 mesa: glsl: fix a number of glUniform issues
Additional error checking.
Allow setting elements of uniform arrays.  This involves encoding both
a uniform location and a parameter offset in the value returned by
glGetUniformLocation().
Limit glUniform[if]v()'s count to the size of the uniform array.
When setting bool-valued uniforms, convert all float/int values to 0 or 1.
2008-09-23 17:33:49 -07:00
Brian Paul
bda6ad273d mesa: glsl: fix error check in get_uniformfv()
(cherry picked from commit 18cd9c229a)
2008-09-23 17:33:19 -07:00
José Fonseca
452a592ca4 mesa: Apply MSVC portability fixes from Alan Hourihane. 2008-09-23 17:20:38 -07:00
Brian Paul
9118b02fd0 mesa: update program->NumAddressRegs field in _slang_update_inputs_outputs() 2008-09-23 17:11:25 -07:00
Brian Paul
c79779aff0 mesa: add fwd decl of fill_in_entrypoint_offset()
(cherry picked from commit b1eff0228b)
2008-09-23 17:09:24 -07:00
Brian Paul
ec76910187 mesa: new gl_fragment_program fields indicating use of fog, front-facing, point coord
(cherry picked from commit d7a7b0a10d)
2008-09-23 17:01:05 -07:00
Brian
03bafd1f9f Added new _mesa_clip_copytexsubimage() function to do avoid clipping down in the drivers.
This should probably be pulled into main-line Mesa...
(cherry picked from commit 324ecadbfd)
2008-09-23 16:59:56 -07:00
Brian Paul
a97226352f mesa: refactor: move GetProcAddress code from glapi.c into new glapi_getproc.c file 2008-09-23 16:56:23 -07:00
Eric Anholt
d533da2db8 i965: Cope with batch getting flushed in the middle of batchbuffer emits.
This isn't required for GEM (at least, yet), but the check_aperture code
for non-GEM results in batch getting flushed during emit.  brw_state_upload
restarts state emits, but a bunch of the state emit functions were assuming
that they would be called exactly once, after prepare and before new_batch.

Bug #17179.
2008-09-23 15:53:29 -07:00
Eric Anholt
4b038e24b0 intel: Add missing include files for meta drawpixels since mesa shuffling. 2008-09-23 15:32:41 -07:00
Eric Anholt
f85ea6837d intel: Replace pbo-only drawpixels function with a generic Mesa metaops.
Improves performance of some oglconform regression tests 9x.
2008-09-23 13:31:19 -07:00
Eric Anholt
15487e46a2 i915: Fix overlapping CopyPixels with negative pixel zoom.
Fixes a failure in pixel-pos.c oglconform test.
2008-09-23 13:31:12 -07:00
Eric Anholt
b9532f078a i915: fix crash in flush_prim -> wait_flips -> flush_batch -> flush_prim. 2008-09-23 13:30:03 -07:00
Ian Romanick
2511d57fa4 i965: Adapt to new TNL program tracking semantics
This fixes bugzilla #17718.
2008-09-22 17:23:40 -07:00
Michel Dänzer
ed4c6cbe01 r300: Adapt to the removal of _tnl_ProgramCacheInit() and friends. 2008-09-22 11:49:34 +02:00
Michel Dänzer
78f4a695ad Remove incorrect test from mmAllocMem.
0 is a perfectly valid alignment shift, see e.g. driTexturesGone() which was
broken by this.
2008-09-22 11:48:26 +02:00
Brian Paul
6fd15dd806 mesa: allow for extra per-context init
(cherry picked from commit 815cdcfbc0)
2008-09-21 22:13:57 -07:00
Brian Paul
1b7e909845 mesa: texture crop rect state
(cherry picked from commit c01fbc7866)
2008-09-21 22:13:57 -07:00
Brian Paul
93c90d34d1 mesa: set point state
(cherry picked from commit af3d9dba56)
2008-09-21 22:13:57 -07:00
Brian Paul
868c09a267 mesa: fix some feature tests
(cherry picked from commit 74b14fe6dd)
2008-09-21 22:13:57 -07:00
Brian Paul
8122ab2dfd mesa: fix some pixel transfer state tests for depth formats
(cherry picked from commit 966e199e40)
2008-09-21 22:13:57 -07:00
Brian Paul
6bc8749cd5 mesa: fix issues causing warnings on Windows 2008-09-21 22:13:57 -07:00
Michal Krol
9614eac85d mesa: Silence compiler warnings on Windows. 2008-09-21 22:13:57 -07:00
Brian Paul
ce1685ce94 mesa: comments about vectors vs components 2008-09-21 22:13:57 -07:00
Brian Paul
eb10fa3ed6 mesa: remove debug code 2008-09-21 22:13:57 -07:00
Brian Paul
6246dd890f mesa: implement glGetUniformiv() with new ctx->Driver function
The old implementation could overwrite the caller's param buffer.
2008-09-21 22:13:56 -07:00
Brian Paul
48cba703fa mesa: added case for fixed pt 2008-09-21 22:13:56 -07:00
Brian Paul
1cf2c8a043 mesa: point size arrays 2008-09-21 22:13:56 -07:00
José Fonseca
f8e50dd796 mesa: Replace deprecated __MSC__ macro. 2008-09-21 22:13:56 -07:00
José Fonseca
60325331a8 mesa: More signed/unsigned float/integer fixes. 2008-09-21 22:13:56 -07:00
José Fonseca
457d7218b8 mesa: Use appropriate unsigned/signed, float/integer types. 2008-09-21 22:13:56 -07:00
José Fonseca
88f729e4ec mesa: Use _mesa_bsearch. 2008-09-21 22:13:56 -07:00
José Fonseca
baa76e9aa2 mesa: bsearch implementation for WinCE. 2008-09-21 22:13:56 -07:00
José Fonseca
2e8af5ffcf mesa: ASSERT macro is already defined by WinCE headers.
Even when just the standard headers are used....
2008-09-21 22:13:56 -07:00
Brian Paul
c115616bda mesa: init ctx->RenderMode 2008-09-21 22:13:56 -07:00
Brian Paul
d17485fef9 mesa: GL_BYTE vertex/texcoord arrays 2008-09-21 22:13:55 -07:00
Brian Paul
394c1d1c53 mesa: initial support for fixed-pt vertex arrays 2008-09-21 22:13:55 -07:00
Brian Paul
bb00f09f1b mesa: refactor: move initialization of DefaultPacking state. 2008-09-21 22:13:55 -07:00
Brian Paul
9b8b58b79a mesa: fix errors in prev commit 2008-09-21 22:13:55 -07:00
Brian Paul
3a4bed8f08 mesa: revamp glBlendFunc loopback 2008-09-21 22:13:55 -07:00
Brian Paul
85f553d3c1 mesa: fix some FEATURE_x tests 2008-09-21 22:13:55 -07:00
Brian Paul
b51d73dd94 mesa: test for FEATURE_ATI_fragment_shader 2008-09-21 22:13:55 -07:00
Brian Paul
715715e230 mesa: fix ReadBuffer initialization 2008-09-21 22:13:55 -07:00
Brian Paul
cd4d4f590f mesa: FEATURE_dispatch to control dispatch table usage 2008-09-21 22:13:55 -07:00
Brian Paul
2dbc515a66 mesa: move some glapi bits around
Move _glapi_proc typedef from glapitable.h to glapi.h
Also, don't include glapitable.h from glapi.h
Before we were including the huge glapitable.h file in every .c file.
2008-09-21 22:13:55 -07:00
Brian Paul
d22ef6bcba mesa: remove some temp debug code 2008-09-21 22:13:54 -07:00
Brian Paul
4e3ae76fea mesa: check FEATURE_ARB_occlusion_query 2008-09-21 22:13:54 -07:00
Brian Paul
049a59a87c mesa: fix typo: s/stacks/stack/ 2008-09-21 22:13:54 -07:00
Brian
74c64fa748 code refactoring, new next_mipmap_level_size() function
(cherry picked from commit c22d9152e3)
2008-09-21 22:13:54 -07:00
Brian
e93243f8b7 added _mesa_tex_target_to_face()
(cherry picked from commit b52ce6341f)
2008-09-21 22:13:54 -07:00
Brian
abb465cdc7 refactor code, export _mesa_generate_mipmap_level() 2008-09-21 22:13:54 -07:00
Brian
12dc9c99b9 move _mesa_format_to_type_and_comps() to texformat.c
(cherry picked from commit 42eac65da4)
2008-09-21 22:13:54 -07:00
Keith Whitwell
b082002379 mesa: pull in mipmap.c changes from gallium-0.2 2008-09-21 22:13:54 -07:00
Brian Paul
facfb44d37 mesa: remove unneeded #include
(cherry picked from commit 6363960db5)
2008-09-21 22:13:54 -07:00
Brian Paul
ddd630ef90 mesa: refactor: move various ENUM_TO_x macros into macros.h 2008-09-21 22:13:53 -07:00
Brian Paul
ae1fdc1523 mesa: refactor: move glTexParameter-related functions into new texparam.c file 2008-09-21 22:13:53 -07:00
Brian Paul
11ebfd22bb mesa: refactor: move glTexEnv-related functions into new texenv.c file
(cherry picked from commit 7ecac78ab5)
2008-09-21 22:13:52 -07:00
Brian Paul
10db6c2d81 mesa: refactor: move glTexGen-related functions into new texgen.c file
(cherry picked from commit 27049189d6)
2008-09-21 22:13:52 -07:00
Brian Paul
4fc71f3ec2 mesa: refactor: fix some FEATURE_ typos, mistakes
(cherry picked from commit e4cfe0854a)
2008-09-21 22:13:52 -07:00
Keith Whitwell
34a61c66fd mesa: refactor: move #define FEATURE flags into new mfeatures.h file
Also, check the FEATURE flags in many places.
(cherry picked from commit 40d1a40f29)

Conflicts:

	src/mesa/main/config.h
	src/mesa/main/context.c
	src/mesa/main/texobj.c
	src/mesa/main/texstate.c
	src/mesa/main/texstore.c
2008-09-21 22:13:52 -07:00
Brian Paul
24172fe595 mesa: refactor: move _mesa_update_minmax/histogram() into image.c
(cherry picked from commit eded7f010d)
2008-09-21 22:13:52 -07:00
Brian Paul
c132e2b1db mesa: refactor: move multisample-related functions into new multisample.c file 2008-09-21 22:13:52 -07:00
Brian Paul
e48defc980 mesa: refactor: move _mesa_resizebuffers(), _mesa_ResizeBuffersMESA() to framebuffer.c
(cherry picked from commit 9091015a97)
2008-09-21 22:13:51 -07:00
Brian Paul
5ab1d0acea mesa: refactor: move glClear, glClearColor into new clear.c file. 2008-09-21 22:13:51 -07:00
Brian Paul
55e341c4c2 mesa: refactor: move scissor functions into new scissor.c file
(cherry picked from commit 4be7296bfc)
2008-09-21 22:13:51 -07:00
Brian Paul
18d2822905 mesa: refactor: move pixel map/scale/bias code into image.c
pixel.c is just the API-related code now.
2008-09-21 22:13:51 -07:00
Brian Paul
533c1dbe75 mesa: refactor: new _mesa_init_pixelstore() function
(cherry picked from commit 5f91007f99)
2008-09-21 22:13:51 -07:00
Brian Paul
c9e5671691 mesa: refactor: move _mesa_init_exec_table() into new api_exec.c file
(cherry picked from commit b36e6f0baf)
2008-09-21 22:13:51 -07:00
Brian Paul
28876dd511 mesa: refactor: move glReadPixels code into new readpix.c file 2008-09-21 22:13:51 -07:00
Brian
87534210bb Add some FLUSH_CURRENT() calls.
Without these we can find ourselves in _mesa_load_state_parameters()
computing derived lighting/material values whhen the current material
properties haven't been updated from the VBO.
This may be a somewhat wide-spread problem that needs more attention...
(cherry picked from commit 49adf51eee)
2008-09-21 22:13:51 -07:00
Brian Paul
411d6672a6 mesa: refactor: move glPixelStore function into new pixelstore.c file 2008-09-21 22:13:51 -07:00
Brian Paul
9228f1c881 mesa: remove EXT/NV suffixes from _mesa_PointParameter functions 2008-09-21 22:13:50 -07:00
José Fonseca
d1e1a76f62 glut: Remove EOF characters. 2008-09-22 12:09:58 +09:00
Benjamin Close
7c1fda71ac i965: fix compilation
Found By: Tinderbox
2008-09-22 12:04:16 +09:30
Chris Rankin
a7573d805e Fix X86 compilation. 2008-09-21 23:56:17 +02:00
Keith Whitwell
45efcc44c7 Remove CVS keywords.
Cherry-picked from gallium-0.1

Conflicts:

	src/glu/sgi/libnurbs/interface/bezierEval.h
	src/glu/sgi/libnurbs/interface/bezierPatch.h
	src/glu/sgi/libnurbs/interface/bezierPatchMesh.h
	src/glu/sgi/libnurbs/internals/dataTransform.h
	src/glu/sgi/libnurbs/internals/displaymode.h
	src/glu/sgi/libnurbs/internals/sorter.h
	src/glu/sgi/libnurbs/nurbtess/definitions.h
	src/glu/sgi/libnurbs/nurbtess/directedLine.h
	src/glu/sgi/libnurbs/nurbtess/gridWrap.h
	src/glu/sgi/libnurbs/nurbtess/monoChain.h
	src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h
	src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
	src/glu/sgi/libnurbs/nurbtess/partitionX.h
	src/glu/sgi/libnurbs/nurbtess/partitionY.h
	src/glu/sgi/libnurbs/nurbtess/polyDBG.h
	src/glu/sgi/libnurbs/nurbtess/polyUtil.h
	src/glu/sgi/libnurbs/nurbtess/primitiveStream.h
	src/glu/sgi/libnurbs/nurbtess/quicksort.h
	src/glu/sgi/libnurbs/nurbtess/rectBlock.h
	src/glu/sgi/libnurbs/nurbtess/sampleComp.h
	src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h
	src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h
	src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h
	src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h
	src/glu/sgi/libnurbs/nurbtess/sampledLine.h
	src/glu/sgi/libnurbs/nurbtess/searchTree.h
	src/glu/sgi/libnurbs/nurbtess/zlassert.h
	src/glu/sgi/libutil/error.c
	src/glu/sgi/libutil/glue.c
	src/glu/sgi/libutil/gluint.h
	src/glu/sgi/libutil/project.c
	src/glu/sgi/libutil/registry.c
	src/glx/x11/glxclient.h
	src/glx/x11/glxext.c
	src/mesa/drivers/dri/ffb/ffb_dd.h
	src/mesa/drivers/dri/ffb/ffb_points.h
	src/mesa/drivers/dri/gamma/gamma_context.h
	src/mesa/drivers/dri/gamma/gamma_macros.h
	src/mesa/drivers/dri/i810/i810context.h
	src/mesa/drivers/dri/r128/r128_dd.h
	src/mesa/drivers/dri/tdfx/tdfx_dd.h
2008-09-21 11:00:44 -07:00
José Fonseca
64dc397d8b mesa: Prefix main includes with dir to avoid conflicts.
Eliminate a couple of differences with gallium-0.2
2008-09-21 10:48:40 -07:00
Keith Whitwell
2ea3ef9a80 mesa: remove dead file 2008-09-21 10:34:04 -07:00
Keith Whitwell
c07e274f44 mesa: add explict float casts 2008-09-21 10:31:15 -07:00
Keith Whitwell
32ef6e7583 mesa: move fixed function vertex program builder from tnl to core mesa
Also unify caching of fragment and vertex programs in shader/prog_cache.c`

Brought across from gallium-0.2
2008-09-21 09:46:00 -07:00
Brian Paul
e019ead5d7 mesa: add parenthesis
(cherry picked from commit c366fd83b6)
2008-09-21 09:45:41 -07:00
Keith Whitwell
5a46e17671 mesa: standardize on C99's uint*_t instead of u_int*_t 2008-09-21 09:45:00 -07:00
José Fonseca
3474e9de92 mesa: Remove assyntax.h include from generated matypes.h.
matypes.h doesn't really depend on assyntax.h; assyntax.h is only present
on x86; and this way we remove the need of grep being available (which is
relevant for scons and non-unix platforms).
(cherry picked from commit fc286ff3ba)
2008-09-21 09:44:37 -07:00
Keith Whitwell
6b146214dc mesa: move rastpos helper to tnl 2008-09-21 09:44:30 -07:00
Keith Whitwell
7ce597508e mesa: improved driver query interface
Brought over from gallium-0.2 branch.
2008-09-21 09:44:25 -07:00
Adam Jackson
dc8058c337 Update to SGI FreeB 2.0.
Under the terms of version 1.1, "once Covered Code has been published
under a particular version of the License, Recipient may, for the
duration of the License, continue to use it under the terms of that
version, or choose to use such Covered Code under the terms of any
subsequent version published by SGI."

FreeB 2.0 license refers to "dates of first publication".  They are here
taken to be 1991-2000, as noted in the original license text:

 ** Original Code. The Original Code is: OpenGL Sample Implementation,
 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 ** Copyright in any portions created by third parties is as indicated
 ** elsewhere herein. All Rights Reserved.

Official FreeB 2.0 text:

http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf

As always, this code has not been tested for conformance with the OpenGL
specification.  OpenGL conformance testing is available from
http://khronos.org/ and is required for use of the OpenGL logo in
product advertising and promotion.
2008-09-19 17:16:53 -04:00
Brian
19d9c81b8c glx: re-add glapi/ path 2008-09-18 21:22:08 -06:00
Brian
cfc4b4c989 mesa: remove unneeded s_drawpix.h header 2008-09-18 20:31:05 -06:00
Brian
4eb95ce807 glx: added "glapi/" prefix to include 2008-09-18 20:27:16 -06:00
Chris Rankin
8d41e4536d mesa: fix asst path/include mistakes in prev commits 2008-09-18 16:48:11 -06:00
Brian Paul
58dce864e6 mesa: fix null ptr deref bug in _tnl_InvalidateState(), bug 15834 2008-09-18 15:29:57 -06:00
Brian Paul
ecadb51bbc mesa: added "main/" prefix to includes, remove some -I paths from Makefile.template 2008-09-18 15:17:05 -06:00
Brian Paul
374e7fd6cc mesa: prefix more #includes with "main/" 2008-09-18 13:46:47 -06:00
Brian Paul
06370a91b3 mesa: remove a bunch of -I paths from INCLUDE_DIRS 2008-09-18 13:34:57 -06:00
Brian Paul
a25e1aa0aa glx: remove #include "glheader.h" lines
Was only used to get the PUBLIC/USED macros.
Also, replace "GL_FALSE" with "False" in a couple places.
2008-09-18 13:26:30 -06:00
Brian Paul
3537da87de glx: remove depency on glheader.h and GLboolean type in XF86DRI code
Return Bool instead of GLboolean to match other functions.
Define PUBLIC/USED macros locally.
2008-09-18 13:23:06 -06:00
Brian Paul
bbd287103d mesa: prefix a bunch of #include lines with "main/".
This is another step toward removing a whole bunch of -I flags from
the cc commands.  Still need to address driver code...
2008-09-18 12:26:54 -06:00
Brian Paul
5e530d8384 mesa: fix bug in previous changes to _slang_resolve_attributes() 2008-09-17 09:13:55 -06:00
Eric Anholt
904f31a624 intel: Destroy bufmgr in screen destroy, not context.
Caused server crashes on second context creation since
7e0bbdcf03.

Bug #17600.
2008-09-16 17:02:41 -07:00
Brian Paul
27341a97a1 mesa: rework GLSL vertex attribute binding
Calls to glBindAttribLocation() should not take effect until the next time
that glLinkProgram() is called.
gl_shader_program::Attributes now just contains user-defined bindings.
gl_shader_program::VertexProgram->Attributes contains the actual/final bindings.
2008-09-16 16:28:36 -06:00
Brian Paul
d43951192b mesa: fix display list regression (check if save->prim_count > 0 in vbo_save_EndList()) 2008-09-16 13:23:01 -06:00
Brian Paul
9d48a7832b mesa: fix MSAA enable state in update_multisample() 2008-09-15 17:14:53 -06:00
Brian Paul
d36f4ef16b mesa: remove some assertions that are invalid during context tear-down 2008-09-15 09:07:32 -06:00
Keith Whitwell
bd953e872f mesa: get another class of degenerate dlists working
Primitive begin in one dlist, end in another.
2008-09-15 13:49:04 +01:00
Keith Whitwell
a30d2c5727 add dlist-degenerate test case 2008-09-15 13:49:04 +01:00
Shane Blackett
641b80275b glut: s/glut_fbc.c/glut_fcb.c/ 2008-09-14 17:51:01 -06:00
Jakub Bogusz
68a19e353e tdfx: fix crash and lack of visuals bug 2008-09-13 14:35:02 -06:00
Guillaume Melquiond
87ccb9504d i915: fix himask constant init for 64-bit build 2008-09-13 14:25:02 -06:00
Guillaume Melquiond
811d8b86eb glx: fix 64-bit datatype issue 2008-09-13 14:24:31 -06:00
Guillaume Melquiond
11a889db8f mesa: return after _mesa_problem() calls 2008-09-13 14:23:39 -06:00
Guillaume Melquiond
d2e0504d4e mesa: #include <stdio.h> 2008-09-13 14:23:14 -06:00
Guillaume Melquiond
5d4c8ec5e0 remove invalid XDestroyWindow() call 2008-09-13 14:22:15 -06:00
Guillaume Melquiond
ee2c8d6d3e silence warning 2008-09-13 14:21:50 -06:00
Guillaume Melquiond
6e51febc6b GLU: fix asst warnings 2008-09-13 14:20:14 -06:00
Eric Anholt
8db761409d intel: Add a width field to regions, and use it for making miptrees in TFP.
Otherwise, we would use the pitch as width of the texture, and compiz would
render the pitch padding on the right hand side.
2008-09-12 15:48:13 -07:00
Eric Anholt
bdc8ac4ae2 Finish off the previous fix for TFP.
A couple of those lines of debug printfs I deleted weren't actually debug
printfs.
2008-09-12 15:09:43 -07:00
Eric Anholt
34bba445a1 intel: Don't segfault on TFP from a bad drawable. 2008-09-12 13:49:23 -07:00
Eric Anholt
201d3419a6 intel: Remove dead allow_batchbuffer param. 2008-09-12 13:49:23 -07:00
George Sapountzis
d3dc95e26a dri/swrast: fix swapBuffers after dri2 2008-09-12 12:43:10 +03:00
Xiang, Haihao
b2e083eba2 i965: Add support for G41 chipset which is another 4 series. 2008-09-12 09:25:34 +08:00
Shane Blackett
4d42c5bebf added 24bpp support 2008-09-11 08:36:03 -06:00
Shane Blackett
bc3b2a5d7a Fixes for Mingw 2008-09-11 08:36:03 -06:00
Eric Anholt
35fd72756a intel: track move of bo_exec from drivers to bufmgr. 2008-09-10 13:59:45 -07:00
Eric Anholt
3628185f56 intel: track bufmgr move to libdrm_intel and bufmgr_fake irq emit/wait change. 2008-09-10 13:59:45 -07:00
Eric Anholt
7e0bbdcf03 intel: Move the bufmgr back to the screen.
Mesa requires that we be able to share objects between contexts, which means
that the objects need to be created by the same bufmgr, and the bufmgr
internally requires pthread protection for thread safety.
Rely on the bufmgr having appropriate locking.
2008-09-10 13:59:45 -07:00
Brian Paul
11d694b1bb mesa: replace MALLOC w/ CALLOC to fix memory error in glPushClientAttrib() 2008-09-05 08:06:59 -06:00
Brian Paul
9246c2fad4 mesa: replace MALLOC w/ CALLOC to fix valgrind warning 2008-09-05 08:06:24 -06:00
Dave Airlie
06537296f1 intel: only enable occlusion query if the drm has defines.
This interface has to be re-written to not be dumb and to work
for multiple apps.
2008-09-05 13:48:51 +10:00
Brian Paul
37c74af01c mesa: improved gl_buffer_object reference counting
Use new _mesa_reference_buffer_object() function wherever possible.
Fixes buffer object/display list crash reported in ParaView.
2008-09-04 14:59:40 -06:00
Kristian Høgsberg
4a32f0c638 configure.ac: bump dri2proto requirement, drop TTM_API define. 2008-09-04 06:23:14 -04:00
Xiang, Haihao
0adfd10210 intel: Fix depth_stencil texture. 2008-09-04 11:36:04 +08:00
Xiang, Haihao
218df7f9c5 mesa: merge stencil values into depth values for MESA_FORMAT_S8_Z24 2008-09-04 11:32:52 +08:00
Jakob Bornecrantz
dc44bb8e92 mesa: Support for MESA_FORMAT_S8_Z24 texture
cherry-picked from gallium-0.1
2008-09-04 10:35:01 +08:00
Eric Anholt
a04aeea5c0 intel: Fix prototype warning. 2008-09-03 16:13:18 +01:00
Eric Anholt
e32721c46a intel: Fix refcounting on depth buffer initialization in DRI2.
(Reverts a change to work around the problem on 965).
2008-09-03 13:31:44 +01:00
Xiang, Haihao
3bb2a24921 intel: Fix a crash if dri2 is disabled. 2008-09-03 14:47:36 +08:00
Brian Paul
0fd1a8c4a1 fix BUFFER_DEPTH/BUFFER_ACCUM mix-up 2008-09-02 18:10:51 -06:00
Roland Scheidegger
418b603513 fix no error generated when calling glLight{if}[v] inside begin/end (bug 17408) 2008-09-02 15:48:50 +02:00
Michel Dänzer
55270310c5 Fix build by removing #include of removed dri_sarea.h.
Thanks to JohnFlux on IRC for pointing out the problem.
2008-09-01 11:43:29 +02:00
Kristian Høgsberg
f56b569e9a DRI2: Drop sarea, implement swap buffers in the X server. 2008-08-29 12:13:14 -04:00
Xiang, Haihao
7a2ab6d055 i965: force thread switch after IF/ELSE/ENDIF. partial fix for #16882.
A thread switch is implicitly invoked after the issuance of an IF/ELSE/ENDIF
instruction if necessary. Unfortunately it seems sometimes a forced thread
switch is needed.
2008-08-29 09:49:16 +08:00
Xiang, Haihao
6073b49c79 i965: mask control for BREAK/CONT/DO/WHILE. partial fix fox #16882 2008-08-29 09:28:08 +08:00
Xiang, Haihao
fd81433a4e i965: Push/pop instruction state. partial fix for #16882 2008-08-29 09:23:25 +08:00
Brian Paul
6138ee9de0 mesa: bump MAX_INSN to 350 2008-08-28 15:15:00 -06:00
Brian Paul
bafefccff8 mesa: don't check for GLSL 1.2 to advertise GL 2.1
The GLSL 1.2 features are minor...
2008-08-26 16:13:39 -06:00
Brian Paul
9aeb6e7825 added 7.1 MD5 sums 2008-08-26 16:12:29 -06:00
Brian Paul
019b9529e5 change MESA_MINOR to 3 2008-08-26 15:59:06 -06:00
Brian Paul
17e9bbd5a4 7.1 updates from 7.2 branch 2008-08-26 15:58:42 -06:00
Timo Jyrinki
385d6b2e68 asst. html doc updates 2008-08-26 12:36:39 -06:00
Brian Paul
80af50b35b mesa: glsl: regenerated file 2008-08-25 09:20:26 -06:00
Brian Paul
2d5087bf74 mesa: glsl: grab latest fixes from gallium-0.1 branch
Includes:
1. Fixes failed asserting about bad swizzles in src reg emit.
2. Tracks uniform var usage.
3. Emit exp() in terms of EXP2 instruction.
2008-08-25 09:20:00 -06:00
Brian Paul
d6df735f1c mesa: set version string to 7.3-devel 2008-08-25 09:18:33 -06:00
Dave Airlie
f75843a517 Revert "Revert "Merge branch 'drm-gem'""
This reverts commit 7c81124d7c.
2008-08-24 17:59:10 +10:00
1337 changed files with 51839 additions and 41032 deletions

View File

@@ -174,10 +174,11 @@ ultrix-gcc:
# Rules for making release tarballs
DIRECTORY = Mesa-7.1-rc4
LIB_NAME = MesaLib-7.1-rc4
DEMO_NAME = MesaDemos-7.1-rc4
GLUT_NAME = MesaGLUT-7.1-rc4
VERSION=7.4
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
DEMO_NAME = MesaDemos-$(VERSION)
GLUT_NAME = MesaGLUT-$(VERSION)
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
@@ -200,9 +201,7 @@ MAIN_FILES = \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/amesa.h \
$(DIRECTORY)/include/GL/dmesa.h \
$(DIRECTORY)/include/GL/fxmesa.h \
$(DIRECTORY)/include/GL/ggimesa.h \
$(DIRECTORY)/include/GL/gl.h \
$(DIRECTORY)/include/GL/glext.h \
@@ -217,19 +216,15 @@ MAIN_FILES = \
$(DIRECTORY)/include/GL/mglmesa.h \
$(DIRECTORY)/include/GL/osmesa.h \
$(DIRECTORY)/include/GL/svgamesa.h \
$(DIRECTORY)/include/GL/ugl*.h \
$(DIRECTORY)/include/GL/vms_x_fix.h \
$(DIRECTORY)/include/GL/wmesa.h \
$(DIRECTORY)/include/GL/xmesa.h \
$(DIRECTORY)/include/GL/xmesa_x.h \
$(DIRECTORY)/include/GL/xmesa_xf86.h \
$(DIRECTORY)/include/GLView.h \
$(DIRECTORY)/src/Makefile \
$(DIRECTORY)/src/descrip.mms \
$(DIRECTORY)/src/mesa/Makefile* \
$(DIRECTORY)/src/mesa/sources \
$(DIRECTORY)/src/mesa/descrip.mms \
$(DIRECTORY)/src/mesa/gl.pc.in \
$(DIRECTORY)/src/mesa/osmesa.pc.in \
$(DIRECTORY)/src/mesa/depend \
$(DIRECTORY)/src/mesa/main/*.[chS] \
$(DIRECTORY)/src/mesa/main/descrip.mms \
@@ -287,6 +282,8 @@ MAIN_FILES = \
$(DIRECTORY)/src/mesa/drivers/x11/Makefile \
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
$(DIRECTORY)/src/mesa/drivers/glslcompiler/Makefile \
$(DIRECTORY)/src/mesa/drivers/glslcompiler/glslcompiler.c \
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
$(DIRECTORY)/src/mesa/x86/Makefile \
@@ -302,19 +299,12 @@ MAIN_FILES = \
$(DIRECTORY)/vms/analyze_map.com \
$(DIRECTORY)/vms/xlib.opt \
$(DIRECTORY)/vms/xlib_share.opt \
$(DIRECTORY)/windows/VC8/mesa/mesa.sln \
$(DIRECTORY)/windows/VC8/mesa/gdi/gdi.vcproj \
$(DIRECTORY)/windows/VC8/mesa/glu/glu.vcproj \
$(DIRECTORY)/windows/VC8/mesa/mesa/mesa.vcproj \
$(DIRECTORY)/windows/VC8/mesa/osmesa/osmesa.vcproj \
$(DIRECTORY)/windows/VC8/progs/progs.sln \
$(DIRECTORY)/windows/VC8/progs/demos/gears.vcproj \
$(DIRECTORY)/windows/VC8/progs/glut/glut.vcproj
$(DIRECTORY)/windows/VC8/
DRI_FILES = \
$(DIRECTORY)/include/GL/internal/dri_interface.h \
$(DIRECTORY)/include/GL/internal/dri_sarea.h \
$(DIRECTORY)/include/GL/internal/glcore.h \
$(DIRECTORY)/include/GL/internal/sarea.h \
$(DIRECTORY)/src/glx/Makefile \
$(DIRECTORY)/src/glx/x11/Makefile \

View File

@@ -260,9 +260,31 @@ case $ARCH in
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}
# expand any .a objects into constituent .o files.
NEWOBJECTS=""
DELETIA=""
for OBJ in ${OBJECTS} ; do
if [ `expr match $OBJ '.*\.a'` -gt 0 ] ; then
# extract the .o files from this .a archive
FILES=`ar t $OBJ`
ar x $OBJ
NEWOBJECTS="$NEWOBJECTS $FILES"
# keep track of temporary .o files and delete them below
DELETIA="$DELETIA $FILES"
else
# ordinary .o file
NEWOBJECTS="$NEWOBJECTS $OBJ"
fi
done
# make lib
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS}
ranlib ${LIBNAME}
# remove temporary extracted .o files
rm -f ${DELETIA}
# finish up
FINAL_LIBS=${LIBNAME}
else
@@ -372,6 +394,30 @@ case $ARCH in
fi
fi
# If using Sun C++ compiler, need to tell it not to add runpaths
# that are specific to the build machine
if [ ${LINK} = "CC" ] ; then
OPTS="${OPTS} -norunpath"
fi
# Solaris linker requires explicitly listing the Standard C & C++
# libraries in the link path when building shared objects
if [ ${LINK} = "CC" ] ; then
DEPS="${DEPS} -lCrun"
fi
DEPS="${DEPS} -lc"
if [ $EXPORTS ] ; then
# Make the 'mapfile.scope' linker mapfile
echo "{" > mapfile.scope
echo "global:" >> mapfile.scope
sed 's/$/;/' ${EXPORTS} >> mapfile.scope
echo "local:" >> mapfile.scope
echo " *;" >> mapfile.scope
echo "};" >> mapfile.scope
OPTS="${OPTS} -Wl,-Mmapfile.scope"
fi
# Check if objects are SPARC v9
# file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
set ${OBJECTS}
@@ -384,17 +430,19 @@ case $ARCH in
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
# for debug:
#echo "mklib: linker is" ${LINK} ${OPTS}
if [ $NOPREFIX = 1 ] ; then
rm -f ${LIBNAME}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS="${LIBNAME}"
else
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
fi
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
fi
;;

View File

@@ -105,3 +105,21 @@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
# pkg-config substitutions
GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
GL_PC_CFLAGS = @GL_PC_CFLAGS@
DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@
GLU_PC_REQ = @GLU_PC_REQ@
GLU_PC_REQ_PRIV = @GLU_PC_REQ_PRIV@
GLU_PC_LIB_PRIV = @GLU_PC_LIB_PRIV@
GLU_PC_CFLAGS = @GLU_PC_CFLAGS@
GLUT_PC_REQ_PRIV = @GLUT_PC_REQ_PRIV@
GLUT_PC_LIB_PRIV = @GLUT_PC_LIB_PRIV@
GLUT_PC_CFLAGS = @GLUT_PC_CFLAGS@
GLW_PC_REQ_PRIV = @GLW_PC_REQ_PRIV@
GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@
GLW_PC_CFLAGS = @GLW_PC_CFLAGS@
OSMESA_PC_REQ = @OSMESA_PC_REQ@
OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@

View File

@@ -6,24 +6,26 @@ CONFIG_NAME = darwin
INSTALL_DIR = /usr/X11
X11_DIR = $(INSTALL_DIR)
# Compiler and flags
CC = gcc
CXX = gcc
PIC_FLAGS = -fPIC
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \
-DGLX_INDIRECT_RENDERING \
-DGLX_ALIAS_UNSUPPORTED
-DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11
# -DGLX_USE_APPLEGL - supposed to be used with GLX_DIRECT_RENDERING to use AGL rather than DRM, but doesn't compile
# -DIN_DRI_DRIVER
ARCH_FLAGS += $(RC_CFLAGS)
CFLAGS = -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
CXXFLAGS = -g -O2 -Wall -fno-strict-aliasing \
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
CFLAGS = -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
CXXFLAGS = -ggdb3 -Os -Wall -fno-strict-aliasing \
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
# Library names (actual file names)
GL_LIB_NAME = libGL.dylib
@@ -39,15 +41,15 @@ GLUT_LIB_GLOB = libglut.*dylib
GLW_LIB_GLOB = libGLw.*dylib
OSMESA_LIB_GLOB = libOSMesa.*dylib
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXt
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now:
SRC_DIRS = glx/x11 mesa glu glw glut/glx
SRC_DIRS = glx/x11 mesa glu glut/glx
GLU_DIRS = sgi
DRIVER_DIRS = osmesa
#DRIVER_DIRS = dri

View File

@@ -9,7 +9,7 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
MESA_MINOR=1
MESA_MINOR=3
MESA_TINY=0
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
@@ -100,3 +100,20 @@ DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
# pkg-config substitutions
GL_PC_REQ_PRIV =
GL_PC_LIB_PRIV =
GL_PC_CFLAGS =
DRI_PC_REQ_PRIV =
GLU_PC_REQ = gl
GLU_PC_REQ_PRIV =
GLU_PC_LIB_PRIV =
GLU_PC_CFLAGS =
GLUT_PC_REQ_PRIV =
GLUT_PC_LIB_PRIV =
GLUT_PC_CFLAGS =
GLW_PC_REQ_PRIV =
GLW_PC_LIB_PRIV =
GLW_PC_CFLAGS =
OSMESA_PC_REQ =
OSMESA_PC_LIB_PRIV =

View File

@@ -22,8 +22,8 @@ AC_CONFIG_AUX_DIR([bin])
AC_CANONICAL_HOST
dnl Versions for external dependencies
LIBDRM_REQUIRED=2.3.1
DRI2PROTO_REQUIRED=1.1
LIBDRM_REQUIRED=2.4.3
DRI2PROTO_REQUIRED=1.99.3
dnl Check for progs
AC_PROG_CPP
@@ -46,10 +46,14 @@ esac
MKDEP_OPTIONS=-fdepend
dnl Ask gcc where it's keeping its secret headers
if test "x$GCC" = xyes; then
GCC_INCLUDES=`$CC -print-file-name=include`
if test "x$GCC_INCLUDES" != x; then
MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
fi
for dir in include include-fixed; do
GCC_INCLUDES=`$CC -print-file-name=$dir`
if test "x$GCC_INCLUDES" != x && \
test "$GCC_INCLUDES" != "$dir" && \
test -d "$GCC_INCLUDES"; then
MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
fi
done
fi
AC_SUBST([MKDEP_OPTIONS])
@@ -83,11 +87,8 @@ dnl Compiler macros
DEFINES=""
AC_SUBST([DEFINES])
case "$host_os" in
linux*)
if test "x$GCC" = xyes; then
DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
fi
DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS"
linux*|*-gnu*)
DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS"
;;
solaris*)
DEFINES="$DEFINES -DPTHREADS -DSVR4"
@@ -271,14 +272,14 @@ if test "x$enable_asm" = xyes; then
case "$host_cpu" in
i?86)
case "$host_os" in
linux* | freebsd* | dragonfly*)
linux* | *freebsd* | dragonfly*)
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
;;
esac
;;
x86_64)
case "$host_os" in
linux* | freebsd* | dragonfly*)
linux* | *freebsd* | dragonfly*)
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
;;
esac
@@ -345,17 +346,6 @@ if test "x$enable_selinux" = "xyes"; then
DEFINES="$DEFINES -DMESA_SELINUX"
fi
dnl OS-specific libraries
OS_LIBS=""
case "$host_os" in
solaris*)
OS_LIBS="-lc"
if test "x$GXX" != xyes; then
OS_CPLUSPLUS_LIBS="-lCrun $OS_LIBS"
fi
;;
esac
dnl
dnl Driver configuration. Options are xlib, dri and osmesa right now.
dnl More later: directfb, fbdev, ...
@@ -365,10 +355,10 @@ default_driver="xlib"
case "$host_os" in
linux*)
case "$host_cpu" in
i*86|x86_64|powerpc*) default_driver="dri";;
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
esac
;;
freebsd* | dragonfly*)
*freebsd* | dragonfly*)
case "$host_cpu" in
i*86|x86_64) default_driver="dri";;
esac
@@ -507,14 +497,18 @@ case "$mesa_driver" in
xlib)
if test "$x11_pkgconfig" = yes; then
PKG_CHECK_MODULES([XLIBGL], [x11 xext])
GL_PC_REQ_PRIV="x11 xext"
X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
GL_LIB_DEPS="$XLIBGL_LIBS"
else
# should check these...
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
GL_PC_CFLAGS="$X11_INCLUDES"
fi
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS"
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
# if static, move the external libraries to the programs
# and empty the libraries for libGL
@@ -532,6 +526,8 @@ dri)
# Check for libdrm
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
# find the DRI deps for libGL
if test "$x11_pkgconfig" = yes; then
@@ -542,30 +538,39 @@ dri)
fi
PKG_CHECK_MODULES([DRIGL], [$dri_modules])
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules"
X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
GL_LIB_DEPS="$DRIGL_LIBS"
else
# should check these...
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
GL_PC_CFLAGS="$X11_INCLUDES"
# XCB can only be used from pkg-config
if test "$enable_xcb" = yes; then
PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx])
GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV x11-xcb xcb-glx"
X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS"
GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS"
fi
fi
# need DRM libs, -lpthread, etc.
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS"
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
;;
osmesa)
# No libGL for osmesa
GL_LIB_DEPS="$OS_LIBS"
GL_LIB_DEPS=""
;;
esac
AC_SUBST([GL_LIB_DEPS])
AC_SUBST([GL_PC_REQ_PRIV])
AC_SUBST([GL_PC_LIB_PRIV])
AC_SUBST([GL_PC_CFLAGS])
AC_SUBST([DRI_PC_REQ_PRIV])
dnl
dnl More X11 setup
@@ -595,20 +600,6 @@ AC_ARG_ENABLE([driglx-direct],
[enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
[driglx_direct="$enableval"],
[driglx_direct="yes"])
dnl ttm support
AC_ARG_ENABLE([ttm-api],
[AS_HELP_STRING([--enable-ttm-api],
[enable TTM API users @<:@default=disabled@:>@])],
[ttmapi="$enableval"],
[ttmapi="no"])
if test "x$ttmapi" = "xyes"; then
save_CFLAGS=$CFLAGS
CFLAGS=$LIBDRM_CFLAGS
AC_CHECK_HEADERS([xf86mm.h],[],[AC_MSG_ERROR([xf86mm.h required for TTM.])],[#include "stdint.h"\n#include "drm.h"])
CFLAGS=$save_CFLAGS
fi
dnl Which drivers to build - default is chosen by platform
AC_ARG_WITH([dri-drivers],
[AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
@@ -650,10 +641,6 @@ if test "$mesa_driver" = dri; then
DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
fi
if test "x$ttmapi" = xyes; then
DEFINES="$DEFINES -DTTM_API"
fi
if test "x$USING_EGL" = x1; then
PROGRAM_DIRS="egl"
fi
@@ -804,6 +791,7 @@ osmesa)
OSMESA_LIB_DEPS=""
fi
OSMESA_MESA_DEPS=""
OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS"
;;
*)
# Link OSMesa to libGL otherwise
@@ -814,13 +802,17 @@ osmesa)
else
OSMESA_MESA_DEPS=""
fi
OSMESA_PC_REQ="gl"
;;
esac
if test "$enable_static" = no; then
OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS"
fi
OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV"
AC_SUBST([OSMESA_LIB_DEPS])
AC_SUBST([OSMESA_MESA_DEPS])
AC_SUBST([OSMESA_PC_REQ])
AC_SUBST([OSMESA_PC_LIB_PRIV])
dnl
dnl GLU configuration
@@ -843,6 +835,7 @@ if test "x$enable_glu" = xyes; then
# Link libGLU to libOSMesa instead of libGL
GLU_LIB_DEPS=""
GLU_PC_REQ="osmesa"
if test "$enable_static" = no; then
GLU_MESA_DEPS='-l$(OSMESA_LIB)'
else
@@ -851,6 +844,8 @@ if test "x$enable_glu" = xyes; then
;;
*)
# If static, empty GLU_LIB_DEPS and add libs for programs to link
GLU_PC_REQ="gl"
GLU_PC_LIB_PRIV="-lm"
if test "$enable_static" = no; then
GLU_LIB_DEPS="-lm"
GLU_MESA_DEPS='-l$(GL_LIB)'
@@ -865,8 +860,13 @@ fi
if test "$enable_static" = no; then
GLU_LIB_DEPS="$GLU_LIB_DEPS $OS_CPLUSPLUS_LIBS"
fi
GLU_PC_LIB_PRIV="$GLU_PC_LIB_PRIV $OS_CPLUSPLUS_LIBS"
AC_SUBST([GLU_LIB_DEPS])
AC_SUBST([GLU_MESA_DEPS])
AC_SUBST([GLU_PC_REQ])
AC_SUBST([GLU_PC_REQ_PRIV])
AC_SUBST([GLU_PC_LIB_PRIV])
AC_SUBST([GLU_PC_CFLAGS])
dnl
dnl GLw configuration
@@ -891,10 +891,13 @@ if test "x$enable_glw" = xyes; then
SRC_DIRS="$SRC_DIRS glw"
if test "$x11_pkgconfig" = yes; then
PKG_CHECK_MODULES([GLW],[x11 xt])
GLW_PC_REQ_PRIV="x11 xt"
GLW_LIB_DEPS="$GLW_LIBS"
else
# should check these...
GLW_LIB_DEPS="$X_LIBS -lXt -lX11"
GLW_PC_LIB_PRIV="$GLW_LIB_DEPS"
GLW_PC_CFLAGS="$X11_INCLUDES"
fi
GLW_SOURCES="GLwDrawA.c"
@@ -913,12 +916,15 @@ if test "x$enable_glw" = xyes; then
fi
# MOTIF_LIBS is prepended to GLW_LIB_DEPS since Xm needs Xt/X11
GLW_LIB_DEPS="$MOTIF_LIBS $GLW_LIB_DEPS"
GLW_PC_LIB_PRIV="$MOTIF_LIBS $GLW_PC_LIB_PRIV"
GLW_PC_CFLAGS="$MOTIF_CFLAGS $GLW_PC_CFLAGS"
fi
# If static, empty GLW_LIB_DEPS and add libs for programs to link
GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV"
if test "$enable_static" = no; then
GLW_MESA_DEPS='-l$(GL_LIB)'
GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS"
GLW_LIB_DEPS="$GLW_LIB_DEPS"
else
APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
GLW_LIB_DEPS=""
@@ -929,6 +935,9 @@ AC_SUBST([GLW_LIB_DEPS])
AC_SUBST([GLW_MESA_DEPS])
AC_SUBST([GLW_SOURCES])
AC_SUBST([MOTIF_CFLAGS])
AC_SUBST([GLW_PC_REQ_PRIV])
AC_SUBST([GLW_PC_LIB_PRIV])
AC_SUBST([GLW_PC_CFLAGS])
dnl
dnl GLUT configuration
@@ -963,12 +972,16 @@ if test "x$enable_glut" = xyes; then
fi
if test "$x11_pkgconfig" = yes; then
PKG_CHECK_MODULES([GLUT],[x11 xmu xi])
GLUT_PC_REQ_PRIV="x11 xmu xi"
GLUT_LIB_DEPS="$GLUT_LIBS"
else
# should check these...
GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS"
GLUT_PC_CFLAGS="$X11_INCLUDES"
fi
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS"
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm"
# If glut is available, we can build most programs
if test "$with_demos" = yes; then
@@ -987,6 +1000,9 @@ fi
AC_SUBST([GLUT_LIB_DEPS])
AC_SUBST([GLUT_MESA_DEPS])
AC_SUBST([GLUT_CFLAGS])
AC_SUBST([GLUT_PC_REQ_PRIV])
AC_SUBST([GLUT_PC_LIB_PRIV])
AC_SUBST([GLUT_PC_CFLAGS])
dnl
dnl Program library dependencies
@@ -1050,8 +1066,8 @@ else
echo " DRI drivers: $dri_dirs"
fi
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
echo " TTM API support: $ttmapi"
fi
echo " Use XCB: $enable_xcb"
dnl Libraries
echo ""

View File

@@ -16,7 +16,7 @@ Status
Version
Last Modified Date: 8 June 2000
Last Modified Date: 12 January 2009
Number
@@ -69,6 +69,12 @@ Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
<width> and <height> indicate the size in pixels. Coordinate (0,0)
corresponds to the lower-left pixel of the window, like glReadPixels.
If dpy and drawable are the display and drawable for the calling
thread's current context, glXCopySubBufferMESA performs an
implicit glFlush before it returns. Subsequent OpenGL commands
may be issued immediately after calling glXCopySubBufferMESA, but
are not executed until the copy is completed.
GLX Protocol
None at this time. The extension is implemented in terms of ordinary
@@ -84,5 +90,7 @@ New State
Revision History
8 June 2000 - initial specification
12 January 2009 Ian Romanick - Added language about implicit flush
and command completion.
8 June 2000 Brian Paul - initial specification

View File

@@ -16,7 +16,6 @@ Status
Version
$Id: MESA_resize_buffers.spec,v 1.3 2004/03/25 01:42:42 brianp Exp $
Number

View File

@@ -19,7 +19,6 @@ Version
Last Modified Date: July 30, 2006
Author Revision: 0.2
$Date: 2006/07/30 14:28:38 $ $Revision: 1.2 $
Number

View File

@@ -20,7 +20,6 @@ Status
Version
$Date: 2007/05/16$ $Revision: 0.4$
Number

View File

@@ -16,7 +16,6 @@ Status
Version
$Id: MESA_window_pos.spec,v 1.4 2004/03/25 01:42:42 brianp Exp $
Number

View File

@@ -17,7 +17,6 @@ Status
Version
$Id: MESA_packed_depth_stencil.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $
Number

View File

@@ -18,7 +18,6 @@ Version
Last Modified Date: July 20, 2003
Author Revision: 1.0
$Date: 2004/03/25 01:42:41 $ $Revision: 1.4 $
Number

View File

@@ -16,7 +16,6 @@ Status
Version
$Id: MESA_sprite_point.spec,v 1.2 2003/09/19 14:58:21 brianp Exp $
Number

View File

@@ -17,7 +17,6 @@ Status
Version
$Id: MESA_trace.spec,v 1.4 2004/03/25 01:42:42 brianp Exp $
Number

View File

@@ -134,4 +134,3 @@ as of February, 1999.
----------------------------------------------------------------------
$Id: README.BEOS,v 1.12 2004/10/13 00:35:55 phoudoin Exp $

View File

@@ -205,4 +205,3 @@ http://www.linuxgames.com/quake2/
----------------------------------------------------------------------
$Id: README.QUAKE,v 1.3 1998/08/23 15:26:26 brianp Exp $

View File

@@ -143,4 +143,3 @@ code). Anyone want to help?
----------------------------------------------------------------------
$Id: RELNOTES-3.1,v 1.2 2000/04/07 17:08:06 brianp Exp $

View File

@@ -9,4 +9,3 @@ have been added. For a list of bug fixes please read the VERSIONS file.
----------------------------------------------------------------------
$Id: RELNOTES-3.2,v 1.2 2000/04/07 17:08:06 brianp Exp $

View File

@@ -29,4 +29,3 @@ GLU library.
----------------------------------------------------------------------
$Id: RELNOTES-3.2.1,v 1.2 2000/07/21 16:32:33 brianp Exp $

View File

@@ -268,4 +268,3 @@ image convolution. This will (hopefully) be done for Mesa 3.5/3.6.
----------------------------------------------------------------------
$Id: RELNOTES-3.3,v 1.8 2000/07/21 16:26:41 brianp Exp $

View File

@@ -19,4 +19,3 @@ see the VERSIONS file.
----------------------------------------------------------------------
$Id: RELNOTES-3.4,v 1.2 2002/03/23 02:37:17 brianp Exp $

View File

@@ -19,4 +19,3 @@ the Mesa 3.4 release. For details, see the VERSIONS file.
----------------------------------------------------------------------
$Id: RELNOTES-3.4.1,v 1.2 2001/05/23 14:45:01 brianp Exp $

View File

@@ -19,4 +19,3 @@ the Mesa 3.4.1 release. For details, see the VERSIONS file.
----------------------------------------------------------------------
$Id: RELNOTES-3.4.2,v 1.2 2001/05/23 14:45:01 brianp Exp $

View File

@@ -225,4 +225,3 @@ In the future I hope to implement support for 32-bit, floating point
color channels.
----------------------------------------------------------------------
$Id: RELNOTES-3.5,v 1.14 2001/06/20 19:02:48 brianp Exp $

View File

@@ -160,4 +160,3 @@ See the VERSIONS file for more details about bug fixes, etc. in Mesa 4.0.
----------------------------------------------------------------------
$Id: RELNOTES-4.0,v 3.2 2001/10/17 14:59:21 brianp Exp $

View File

@@ -19,4 +19,3 @@ Mesa 4.0.1 only contains bug fixes since version 4.0.
See the docs/VERSIONS file for the list of bug fixes.
----------------------------------------------------------------------
$Id: RELNOTES-4.0.1,v 1.2 2001/12/18 14:08:23 brianp Exp $

View File

@@ -47,4 +47,3 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-4.0.2,v 1.2 2002/03/23 02:38:39 brianp Exp $

View File

@@ -49,4 +49,3 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-4.0.3,v 1.2 2002/06/26 02:36:34 brianp Exp $

View File

@@ -305,4 +305,3 @@ are some things to change:
----------------------------------------------------------------------
$Id: RELNOTES-4.1,v 1.22 2002/10/29 15:06:37 brianp Exp $

View File

@@ -82,4 +82,3 @@ driver call the _mesa_enable_1_4_extensions() function.
----------------------------------------------------------------------
$Id: RELNOTES-5.0,v 3.2 2002/11/13 15:33:51 brianp Exp $

View File

@@ -43,4 +43,3 @@ driver call the _mesa_enable_1_4_extensions() function.
----------------------------------------------------------------------
$Id: RELNOTES-5.0.1,v 3.1 2003/03/30 16:17:54 brianp Exp $

View File

@@ -43,4 +43,3 @@ driver call the _mesa_enable_1_4_extensions() function.
----------------------------------------------------------------------
$Id: RELNOTES-5.0.2,v 1.1 2003/09/04 23:10:38 brianp Exp $

View File

@@ -84,4 +84,3 @@ See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.0.
----------------------------------------------------------------------
$Id: RELNOTES-6.0,v 1.3 2004/01/15 15:47:57 brianp Exp $

View File

@@ -47,4 +47,3 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.0.1,v 3.1 2004/04/02 23:37:02 brianp Exp $

View File

@@ -109,4 +109,3 @@ See the VERSIONS file for more details about bug fixes, etc. in Mesa 6.1.
----------------------------------------------------------------------
$Id: RELNOTES-6.1,v 3.5 2004/08/17 22:58:23 brianp Exp $

View File

@@ -49,4 +49,3 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.2,v 3.4 2004/10/02 15:43:14 brianp Exp $

View File

@@ -47,4 +47,3 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.2.1,v 3.1 2004/12/09 23:21:36 brianp Exp $

View File

@@ -112,4 +112,3 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.3,v 3.13 2005/07/21 15:57:29 brianp Exp $

View File

@@ -46,4 +46,3 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.3.1,v 3.1 2005/07/21 18:45:54 brianp Exp $

View File

@@ -34,4 +34,3 @@ D3D needs updating
----------------------------------------------------------------------
$Id: RELNOTES-6.3.2,v 3.2 2005/08/19 16:57:50 brianp Exp $

View File

@@ -47,4 +47,3 @@ in Mesa 6.3.
----------------------------------------------------------------------
$Id: RELNOTES-6.4,v 3.1 2005/10/24 23:33:27 brianp Exp $

View File

@@ -6,7 +6,7 @@
<BODY>
<H1>Mesa Cell Driver</H1>
<H1>Mesa/Gallium Cell Driver</H1>
<p>
The Mesa
@@ -23,18 +23,19 @@ Two phases are planned.
First, to implement the framework for parallel rasterization using the Cell
SPEs, including texture mapping.
Second, to implement a full-featured OpenGL driver with support for GLSL, etc.
The second phase is now underway.
</p>
<H2>Source Code</H2>
<p>
The Cell driver source code is on the <code>gallium-0.1</code> branch of the
git repository.
The latest Cell driver source code is on the <code>gallium-0.2</code> branch
of the Mesa git repository.
After you've cloned the repository, check out the branch with:
</p>
<pre>
git-checkout -b gallium-0.1 origin/gallium-0.1
git-checkout -b gallium-0.2 origin/gallium-0.2
</pre>
<p>
To build the driver you'll need the IBM Cell SDK (version 2.1 or 3.0).
@@ -43,12 +44,13 @@ or the Cell Simulator (untested, though).
</p>
<p>
If using Cell SDK 3.0, first edit configs/linux-cell and add
<code>-DSPU_MAIN_PARAM_LONG_LONG</code> to the SPU_CFLAGS.
If using Cell SDK 2.1, see the configs/linux-cell file for some
special changes.
</p>
<p>
To compile the code, run <code>make linux-cell</code>.
To build in debug mode, run <code>make linux-cell-debug</code>.
</p>
<p>
@@ -60,7 +62,7 @@ directory that contains <code>libGL.so</code>.
Verify that the Cell driver is being used by running <code>glxinfo</code>
and looking for:
<pre>
OpenGL renderer string: Gallium 0.1, Cell on Xlib
OpenGL renderer string: Gallium 0.2, Cell on Xlib
</pre>
@@ -77,21 +79,61 @@ SPU local store as needed.
Similarly, textures are tiled and brought into local store as needed.
</p>
<p>
More recently, vertex transformation has been parallelized across the SPUs
as well.
</p>
<H2>Status</H2>
<p>
As of February 2008 the driver supports smooth/flat shaded triangle rendering
with Z testing and simple texture mapping.
Simple demos like gears run successfully.
To test texture mapping, try progs/demos/texcyl (press right mouse button for
rendering options).
As of October 2008, the driver runs quite a few OpenGL demos.
Features that work include:
</p>
<ul>
<li>Point/line/triangle rendering, glDrawPixels
<li>2D, NPOT and cube texture maps with nearest/linear/mipmap filtering
<li>Dynamic SPU code generation for fragment shaders, but not complete
<li>Dynamic SPU code generation for fragment ops (blend, Z-test, etc), but not complete
<li>Dynamic PPU/PPC code generation for vertex shaders, but not complete
</ul>
<p>
Performance has recently improved with the addition of PPC code generation
for vertex shaders, but the code quality isn't too great yet.
</p>
<p>
Another bottleneck is SwapBuffers. It may be the limiting factor for
many simple GL tests.
</p>
<H2>Debug Options</H2>
<p>
The CELL_DEBUG env var can be set to a comma-separated list of one or
more of the following debug options:
</p>
<ul>
<li><b>checker</b> - use a different background clear color for each SPU.
This lets you see which SPU is rendering which screen tiles.
<li><b>sync</b> - wait/synchronize after each DMA transfer
<li><b>asm</b> - print generated SPU assembly code to stdout
<li><b>fragops</b> - emit fragment ops debug messages
<li><b>fragopfallback</b> - don't use codegen for fragment ops
<li><b>cmd</b> - print SPU commands as their received
<li><b>cache</b> - print texture cache statistics when program exits
</ul>
<p>
Note that some of these options may only work for linux-cell-debug builds.
</p>
<p>
If the GALLIUM_NOPPC env var is set, PPC code generation will not be used
and vertex shaders will be run with the TGSI interpreter.
</p>
<p>
If the GALLIUM_NOCELL env var is set, the softpipe driver will be used
intead of the Cell driver.
This is useful for comparison/validation.
</p>
<H2>Contributing</H2>

View File

@@ -37,8 +37,8 @@ a:visited {
<b>Download / Install</b>
<ul>
<li><a href="download.html" target="MainFrame">Downloading/Unpacking</a>
<li><a href="install.html" target="MainFrame">Compilation/Installation</a>
<li><a href="download.html" target="MainFrame">Downloading / Unpacking</a>
<li><a href="install.html" target="MainFrame">Compiling / Installing</a>
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
<li><a href="precompiled.html" target="MainFrame">Precompiled Libraries</a>
</ul>
@@ -48,6 +48,7 @@ a:visited {
<li><a href="lists.html" target="MainFrame">Mailing Lists</a>
<li><a href="bugs.html" target="MainFrame">Bug Database</a>
<li><a href="webmaster.html" target="MainFrame">Webmaster</a>
<li><a href="http://dri.freedesktop.org/" target="_parent">Mesa/DRI Wiki</a>
</ul>
<b>User Topics</b>

View File

@@ -9,7 +9,9 @@
<H1>Downloading</H1>
<p>
Last stable release: <b>7.0.4</b>
Current stable release: <b>7.4</b>
<br>
Last unstable/development release: <b>7.3</b>
</p>
<p>

View File

@@ -29,7 +29,7 @@ Setting this variable automatically sets the MESA_TEX_PROG variable as well.
<p>
The following are only applicable to the Xlib software driver.
See <A HREF="README.X11">README.X11</A> for details.
See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
</p>
<ul>
<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode

View File

@@ -15,17 +15,40 @@ Here are some specific ideas and areas where help would be appreciated:
<ol>
<li>
Enable -Wstrict-aliasing=2 -fstrict-aliasing and track down aliasing
<b>Driver patching and testing.</b>
Patches are often posted to the mesa3d-dev mailing list, but aren't
immediately checked into git because not enough people are testing them.
Just applying patches, testing and reporting back is helpful.
<li>
<b>Driver debugging.</b>
There are plenty of open bugs in the bug database.
<li>
<b>Remove aliasing warnings.</b>
Enable gcc -Wstrict-aliasing=2 -fstrict-aliasing and track down aliasing
issues in the code.
<li>
Windows 98/NT driver building, maintenance and testing
<b>Windows driver building, testing and maintenance.</b>
The Visual Studio project files aren't always updated in a timely manner
when new source files are added or old ones are removed.
Fixing these tends to delay new Mesa releases.
<li>
Maintenance and testing of lesser-used drivers, such as DOS/DJGPP, GGI, etc.
<b>Maintenance and testing of lesser-used drivers.</b>
Drivers such as DOS/DJGPP, GGI, etc that aren't being maintained are being
deprecated starting in Mesa 7.3.
<li>
<b>Contribute more tests to
<a href="http://glean.sourceforge.net/" target="_parent">glean</a>.</b>
<li>
<b>Automatic testing.
</b>
It would be great if someone would set up an automated system for grabbing
the latest Mesa code and run tests (such as glean) then report issues to
the mailing list.
</ol>
<p>
If you want to help with Mesa, first join the Mesa developer's
If you want to do something new in Mesa, first join the Mesa developer's
mailing list.
Then post a message to propose what you want to do, just to make sure
there's no issues.

View File

@@ -1,58 +1,73 @@
<HTML>
<TITLE>Compilation and Installation</TITLE>
<TITLE>Compiling and Installing</TITLE>
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<H1>Compilation and Installation</H1>
<H1>Compiling and Installing</H1>
<ol>
<li><a href="#unix-x11">Unix / X11</a>
<ul>
<li><a href="#prereq">Prerequisites for DRI and hardware acceleration</a>
<li><a href="#autoconf">Building with autoconf</a>
<li><a href="#traditional">Building with traditional Makefiles</a>
<li><a href="#libs">The Libraries</a>
<li><a href="#demos">Running the demos
<li><a href="#install">Installing the header and library files
<li><a href="#pkg-config">Building OpenGL programs with pkg-config
</ul>
<li><a href="#windows">Windows</a>
<li><a href="#vms">VMS</a>
<li><a href="#other">Other</a>
</ol>
<br>
<a name="unix-x11">
<H2>1. Unix/X11 Compilation and Installation</H1>
<h3>1.1 Prerequisites for DRI and Hardware Acceleration</h3>
<a name="prereq">
<h3>1.1 Prerequisites for DRI and hardware acceleration</h3>
<p>
To build Mesa 7.1 with DRI-based hardware acceleration you must first have
the <a href="http://dri.freedesktop.org/libdrm/" target="_parent">DRM version 2.3.1</a>.
The following are required for DRI-based hardware acceleration with Mesa 7.3:
</p>
<p>
You should also be using the Xorg server version 1.4 or 1.5.
<ul>
<li><a href="http://xorg.freedesktop.org/releases/individual/proto/">dri2proto</a> version 1.99.3 or later
<li>Linux 2.6.28
<li><a href="http://dri.freedesktop.org/libdrm/" target="_parent">libDRM</a>
version 2.4.3 or later
<li>Xorg server version 1.5 or later
</ul>
</p>
<h3>1.2 Autoconf Compilation</h3>
<a name="autoconf">
<h3>1.2 Building with Autoconf</h3>
<p>
Mesa may be <a href="autoconf.html">built using autoconf</a>.
This should work well on most GNU-based systems.
When that fails, the traditional Mesa build system is available.
If that fails the traditional Mesa build system is available.
<h3>1.3 Traditional Compilation</h3>
<a name="traditional">
<h3>1.3 Building with traditional Makefiles</h3>
<p>
The traditional Mesa build system is based on a collection of pre-defined
system configurations.
</p>
<p>
To see the list of configurations, type <b>make</b> alone.
Then choose a configuration from the list and type <b>make configname</b>.
To see the list of configurations, just type <code>make</code>.
Then choose a configuration from the list and type <code>make</code>
<em>configname</em>.
</p>
<p>
@@ -66,7 +81,7 @@ allow you to run OpenGL/GLX applications on any X server (regardless of
whether it supports the GLX X server extension).
You will <em>not</em> be able to use hardware 3D acceleration.
<p>
To compile stand-alone Mesa type <b>make</b> in the top-level directory.
To compile stand-alone Mesa type <code>make</code> in the top-level directory.
You'll see a list of supported system configurations.
Choose one from the list (such as linux-x86), and type:
</p>
@@ -109,6 +124,7 @@ Later, if you want to rebuild for a different configuration run
</p>
<a name="libs">
<h3>1.4 The libraries</h3>
<p>
@@ -169,6 +185,7 @@ If you built the DRI hardware drivers, you'll also see the DRI drivers:
</pre>
<a name="demos">
<h3>1.5 Running the demos</h3>
<p>
@@ -244,6 +261,7 @@ Retrace your steps if this doesn't look right.
</p>
<a name="install">
<H3>1.6 Installing the header and library files</H3>
<p>
@@ -284,7 +302,8 @@ This is a handy way to compare multiple OpenGL implementations.
</p>
<H3>1.7 Building OpenGL Programs With pkg-config</H3>
<a name="pkg-config">
<H3>1.7 Building OpenGL programs with pkg-config</H3>
<p>
Running <code>make install</code> will install package configuration files
@@ -314,25 +333,15 @@ Please see the <a href="README.WIN32">README.WIN32</a> file.
<a name="vms">
<H2>3. VMS Compilation and Installation</H1>
<p>
Please see the <a href="README.VMS">README.VMS</a> file.
</p>
<a name="other">
<H2>4. Other systems</H1>
<H2>3. Other systems</H1>
<p>
Documentation for other environments (some may be very out of date):
</p>
<UL>
<li><A HREF="README.VMS">README.VMS</A> - VMS
<LI><A HREF="README.GGI">README.GGI</A> - GGI
<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin

View File

@@ -22,9 +22,10 @@ for modern GPUs.
<p>
Mesa ties into several other open-source projects: the
<a href="http://dri.sf.net/" target="_parent">Direct Rendering Infrastructure</a>
and <a href="http://x.org" target="_parent">X.org</a> to provide OpenGL
support to users of X on Linux, FreeBSD and other operating systems.
<a href="http://dri.freedesktop.org/" target="_parent">Direct Rendering
Infrastructure</a> and <a href="http://x.org" target="_parent">X.org</a> to
provide OpenGL support to users of X on Linux, FreeBSD and other operating
systems.
</p>

View File

@@ -9,7 +9,7 @@
<H1>Mailing Lists</H1>
<p>There are four Mesa mailing lists:
<p>There are four Mesa 3D / DRI mailing lists:
</p>
<ul>
@@ -19,14 +19,14 @@ versions are sent to this list.
</li>
<br>
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-users"
target="_parent">mesa3d-users</a> - intended for users of the Mesa library.
target="_parent">mesa3d-users</a> - intended for users of the Mesa and DRI.
Newbie questions are appropriate, but please try the general OpenGL
resources and Mesa documentation first.
resources and Mesa/DRI documentation first.
</li>
<br>
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev"
target="_parent">mesa3d-dev</a> - for discussion of Mesa development.
Not for beginners.
target="_parent">mesa3d-dev</a> - for discussion of Mesa and Direct Rendering
Infrastructure development. Not for beginners.
</li>
<br>
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-commit"
@@ -37,6 +37,9 @@ Note: the old mesa3d-cvs list is no longer in use.
</li>
</ul>
<p>For mailing lists about Direct Rendering Modules (drm) in Linux/BSD
kernels, see <a href="http://dri.freedesktop.org/wiki/MailingLists">wiki</a>.
<p>
<b>Notice</b>: non-member posts to any of these lists will be automatically
rejected.

View File

@@ -11,6 +11,38 @@
<H1>News</H1>
<h2>March 27, 2009</h2>
<p>
<a href="relnotes-7.4.html">Mesa 7.4</a> is released.
This is a stable release fixing bugs since the 7.3 release.
</p>
<h2>January 22, 2009</h2>
<p>
<a href="relnotes-7.3.html">Mesa 7.3</a> is released.
This is a new development release.
Mesa 7.4 will follow and will have bug fixes relative to 7.3.
</p>
<h2>September 20, 2008</h2>
<p>
<a href="relnotes-7.2.html">Mesa 7.2</a> is released.
This is a stable, bug-fix release.
</p>
<h2>August 26, 2008</h2>
<p>
<a href="relnotes-7.1.html">Mesa 7.1</a> is released.
This is a new development release.
It should be relatively stable, but those especially concerned about
stability should wait for the 7.2 release or use Mesa 7.0.4 (the
previous stable release).
</p>
<h2>August 16, 2008</h2>
<p>
<a href="relnotes-7.0.4.html">Mesa 7.0.4</a> is released.
@@ -1170,6 +1202,5 @@ source code</a>.</p>
<hr>
$Id: news.html,v 3.33 2006/12/02 18:18:41 brianp Exp $
</body>
</html>

View File

@@ -8,28 +8,46 @@
<body bgcolor="#eeeeee">
<H1>Mesa 7.1 Release Notes / May XX, 2008</H1>
<H1>Mesa 7.1 Release Notes / August 26, 2008</H1>
<p>
Mesa 7.1 is a new development release.
There have been many internal code changes since Mesa 7.0.x.
It should be relatively stable, but those who are especially concerned about
stability should wait for Mesa 7.2.
stability should wait for Mesa 7.2 or use Mesa 7.0.4 (the previous stable
release).
</p>
</>
Note that this version of Mesa does not use the GEM memory manager.
The master branch of git uses GEM.
</p>
<p>
DRM version 2.3.1 should be used with Mesa 7.1
</p>
<h2>MD5 checksums</h2>
<pre>
TBD
971c2fe6e6949dc5ba200a6f97a6dc81 MesaLib-7.1.tar.gz
6bff7f532d16f90f944a400c8bd7074d MesaLib-7.1.tar.bz2
d48224bf9d54c3da6776adb4869ba024 MesaLib-7.1.zip
3de268420efca43e9a19ab506cdfc993 MesaDemos-7.1.tar.gz
abfc9775e1462363af8ec160d1feb01f MesaDemos-7.1.tar.bz2
f7b3623387c4036e9895cd9ac0dfad99 MesaDemos-7.1.zip
fdf348f78cd09304b6ff801ef8acc8eb MesaGLUT-7.1.tar.gz
f6d88a4eeb02e98c7e92f1c895d3c76b MesaGLUT-7.1.tar.bz2
4dc102a5ca51e1c41dde87d3f8c7b22a MesaGLUT-7.1.zip
</pre>
<h2>New features</h2>
<ul>
<li>autoconf-based configuration (and clean-up of Makefiles)
<li>Assorted DRI driver enhancements
<li>Reduced dependencies between X server and Mesa
<li>GL_EXT_texture_from_pixmap extension for Xlib driver
<li>Support for the GL shading language with i965 driver (implemented by Intel)
<li>ATI R500 series support (Radeon X1300&#8211;X1950) in r300 DRI driver
</ul>
@@ -37,6 +55,7 @@ TBD
<ul>
<li>Numerous GLSL fixes
<li>Fixed some error code/detection bugs in the GLSL-related API functions
<li>Lots of DRI driver fixes.
</ul>

104
docs/relnotes-7.2.html Normal file
View File

@@ -0,0 +1,104 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.2 Release Notes / 20 September 2008</H1>
<p>
Mesa 7.2 is a stable release fixing bugs found in 7.1, which was a
new development release.
</p>
<p>
Mesa 7.2 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
Note that this version of Mesa does not use the GEM memory manager.
The master branch of git uses GEM.
The prototype DRI2 code that was in 7.1 has also been removed.
</p>
<p>
DRM version 2.3.1 should be used with Mesa 7.2
</p>
<h2>MD5 checksums</h2>
<pre>
81a2a4b7cbfce7553f7ad8d924edbe2f MesaLib-7.2.tar.gz
04d379292e023df0b0266825cb0dbde5 MesaLib-7.2.tar.bz2
8bc497a37977a55e987a4d1fabc3d882 MesaLib-7.2.zip
10c762e39486df395838af1d7b57e69c MesaDemos-7.2.tar.gz
22e03dc4038cd63f32c21eb60994892b MesaDemos-7.2.tar.bz2
1197bc4eb3bf44e291c14d4eb2e19381 MesaDemos-7.2.zip
42e3c6c6d156cd9dc545dbef72407354 MesaGLUT-7.2.tar.gz
f67daf93e12c4a459703bbf3e4004e31 MesaGLUT-7.2.tar.bz2
0390567eb2c2d12fbf82e8523fd77e2b MesaGLUT-7.2.zip
</pre>
<h2>New features</h2>
<ul>
<li>i965 driver: added support for G41 chipset (Intel)
</ul>
<h2>Bug fixes</h2>
<ul>
<li>Fixed display list bug involving primitives split across lists (bug 17564)
<li>Fixed some issues with glBindAttribLocation()
<li>Fixed crash in _tnl_InvalidateState() found with Amira (bug 15834)
<li>Assorted bug fixes for Ming build
<li>Fixed some vertex/pixel buffer object reference counting bugs
<li>Fixed depth/stencil bug in i915/945 driver
<li>Fixed some shader flow control bugs in i965 driver
<li>Fixed a few tdfx driver bugs which prevented driver from working
<li>Fixed multisample enable/disable bug
</ul>
<h2>Changes</h2>
<ul>
<li>Updated SGI header files with new license terms.
</ul>
<h2>To Do (someday) items</h2>
<ul>
<li>Remove the MEMCPY() and _mesa_memcpy() wrappers and just use memcpy().
Probably do the same for malloc, calloc, etc.
The wrappers were useful in the past for memory debugging but now we
have valgrind. Not worried about SunOS 4 support anymore either...
<li>Switch to freeglut
<li>Fix linux-glide target/driver.
<li>Improved lambda and derivative calculation for frag progs.
</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>

93
docs/relnotes-7.3.html Normal file
View File

@@ -0,0 +1,93 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.3 Release Notes / 22 January 2009</H1>
<p>
Mesa 7.3 is a new development release.
Users especially concerned with stability should stick with latest
stable release: version 7.2.
</p>
<p>
Mesa 7.3 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI hardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
8ed03191432b22d118d88d6db497f304 MesaLib-7.3.tar.gz
781e7811a6ed5c97b2b8defefc8ffbc9 MesaLib-7.3.tar.bz2
3ccba9a1734ed6d4b3389e1535d90fbf MesaLib-7.3.zip
d312e974b31043b13b61bac5fbf00b87 MesaDemos-7.3.tar.gz
3f0741394069bdf2329565a387396cda MesaDemos-7.3.tar.bz2
4d0887fd4c66a824295cdd619f6d34cb MesaDemos-7.3.zip
2d7661b66022bcb8878728f3d5bd33ab MesaGLUT-7.3.tar.gz
abe8036a724c1a483bdad6b5a55ddc1a MesaGLUT-7.3.tar.bz2
5f247819b47e2a7c62d07a6afe5262fb MesaGLUT-7.3.zip
</pre>
<h2>New features</h2>
<ul>
<li>Support for GLSL 1.20
<li>Intel DRI drivers now use GEM and DRI2
</ul>
<h2>Bug fixes</h2>
<ul>
<li>Assorted GLSL bug fixes
<li>Assorted i965 driver fixes
<li>Fix for wglCreateLayerContext() in WGL/Windows driver
<li>Build fixes for OpenBSD and gcc 2.95
<li>GLSL preprocessor handles #pragma now
<li>Fix incorrect transformation of GL_SPOT_DIRECTION
<li>Fixed several bugs (#18367 and #19625) in glXMakeContextCurrent()
<li>Assorted Windows build fixes
</ul>
<h2>Changes</h2>
<ul>
<li>Deprecated the "XMesa" interface (include/GL/xmesa*.h files)
<li>Deprecated the "FXMesa" interface (include/GL/fxmesa.h file)
<li>Deprecated the "Allegro" interface (include/GL/amesa.h file)
<li>Removed include/GL/uglmesa.h header
<li>Removed include/GLView.h header for BeOS
</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>

79
docs/relnotes-7.4.1.html Normal file
View File

@@ -0,0 +1,79 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.4.1 Release Notes / (date TBD)</H1>
<p>
Mesa 7.4.1 is a stable development release fixing bugs since the 7.4 release.
</p>
<p>
Mesa 7.4.1 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI ardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
tbd
</pre>
<h2>New features</h2>
<ul>
</ul>
<h2>Bug fixes</h2>
<ul>
<li>Fixed a two-sided lighting bug in fixed-function-to-GPU code generation
<li>Fixed some Darwin issues (Jeremy Huddleston)
<li>Indexing the GLSL gl_EyePlane[] or gl_ObjectPlane[] arrays with a variable
was broken, bug 20986
<li>Fixed incorrect texture unit bias in TXB instruction
<li>glTexParameter settings weren't always propogated to drivers
<li>Assorted vertex/fragment program bug fixes
<li>Fixed point rendering in software rasterizer
<li>Fixed potential deadlock in object hash functions
<li>Fix a couple bugs surrounding front-buffer rendering with DRI2, but this
is not quite complete.
</ul>
<h2>Changes</h2>
<ul>
</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>

89
docs/relnotes-7.4.html Normal file
View File

@@ -0,0 +1,89 @@
<HTML>
<TITLE>Mesa Release Notes</TITLE>
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
<BODY>
<body bgcolor="#eeeeee">
<H1>Mesa 7.4 Release Notes / 27 March 2009</H1>
<p>
Mesa 7.4 is a stable development release fixing bugs since the 7.3 release.
</p>
<p>
Mesa 7.4 implements the OpenGL 2.1 API, but the version reported by
glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
</p>
<p>
See the <a href="install.html">Compiling/Installing page</a> for prerequisites
for DRI ardware acceleration.
</p>
<h2>MD5 checksums</h2>
<pre>
ed6bd7437177307e51e16d0c7c381dfa MesaLib-7.4.tar.gz
7ecddb341a2691e0dfdb02f697109834 MesaLib-7.4.tar.bz2
433e823f8245f9fd5f397e7b719a8e47 MesaLib-7.4.zip
656eee6128016fb237e01aa8dabbc703 MesaDemos-7.4.tar.gz
02816f10f30b1dc5e069e0f68c177c98 MesaDemos-7.4.tar.bz2
44a70d6db4aa4c64ecc47871b6aceee8 MesaDemos-7.4.zip
25f80db4f8645cd3e58e2c9af53ec341 MesaGLUT-7.4.tar.gz
04ec01caebde44f5b0d619f00716b368 MesaGLUT-7.4.tar.bz2
019dc213baecaa3cb1278847d41b8591 MesaGLUT-7.4.zip
</pre>
<h2>New features</h2>
<ul>
<li>Added MESA_GLX_FORCE_DIRECT env var for Xlib/software driver
<li>GLSL version 1.20 is returnd by the GL_SHADING_LANGUAGE_VERSION query
</ul>
<h2>Bug fixes</h2>
<ul>
<li>glGetActiveUniform() returned wrong size for some array types
<li>Fixed some error checking in glUniform()
<li>Fixed a potential glTexImage('proxy target') segfault
<li>Fixed bad reference counting for 1D/2D texture arrays
<li>Fixed VBO + glPush/PopClientAttrib() bug #19835
<li>Assorted i965 driver bug fixes
<li>Fixed a Windows compilation failure in s_triangle.c
<li>Fixed a GLSL array indexing bug
<li>Fixes for building on Haiku
</ul>
<h2>Changes</h2>
<ul>
<li>Updated GL/glxext.h to version 48
<li>Assorted updates for building on Solaris
</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,10 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
<LI><A HREF="relnotes-7.4.1.html">7.4.1 release notes</A>
<LI><A HREF="relnotes-7.4.html">7.4 release notes</A>
<LI><A HREF="relnotes-7.3.html">7.3 release notes</A>
<LI><A HREF="relnotes-7.2.html">7.2 release notes</A>
<LI><A HREF="relnotes-7.1.html">7.1 release notes</A>
<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>

View File

@@ -15,23 +15,46 @@ OpenGL Shading Language</a>.
</p>
<p>
Last updated on 28 March 2007.
Last updated on 15 December 2008.
</p>
<p>
Contents
</p>
<ul>
<li><a href="#120">GLSL 1.20 support</a>
<li><a href="#unsup">Unsupported Features</a>
<li><a href="#notes">Implementation Notes</a>
<li><a href="#hints">Programming Hints</a>
<li><a href="#standalone">Stand-alone GLSL Compiler</a>
<li><a href="#implementation">Compiler Implementation</a>
<li><a href="#validation">Compiler Validation</a>
<li><a href="#120">GLSL 1.20 support</a>
</ul>
<a name="120">
<h2>GLSL 1.20 support</h2>
<p>
GLSL version 1.20 is supported in Mesa 7.3.
Among the features/differences of GLSL 1.20 are:
<ul>
<li><code>mat2x3, mat2x4</code>, etc. types and functions
<li><code>transpose(), outerProduct(), matrixCompMult()</code> functions
(but untested)
<li>precision qualifiers (lowp, mediump, highp)
<li><code>invariant</code> qualifier
<li><code>array.length()</code> method
<li><code>float[5] a;</code> array syntax
<li><code>centroid</code> qualifier
<li>unsized array constructors
<li>initializers for uniforms
<li>const initializers calling built-in functions
</ul>
<a name="unsup">
<h2>Unsupported Features</h2>
@@ -41,15 +64,10 @@ in Mesa:
</p>
<ul>
<li>Dereferencing arrays with non-constant indexes
<li>Comparison of user-defined structs
<li>Linking of multiple shaders is not supported
<li>gl_ClipVertex
<li>The derivative functions such as dFdx() are not implemented
<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>
@@ -304,11 +322,11 @@ Extra NOP instructions will also be inserted.
<h2>Compiler Validation</h2>
<p>
A new <a href="http://glean.sf.net" target="_parent">Glean</a> test has
A <a href="http://glean.sf.net" target="_parent">Glean</a> test has
been create to exercise the GLSL compiler.
</p>
<p>
The <em>glsl1</em> test runs over 150 sub-tests to check that the language
The <em>glsl1</em> test runs over 170 sub-tests to check that the language
features and built-in functions work properly.
This test should be run frequently while working on the compiler to catch
regressions.
@@ -319,39 +337,5 @@ should be added.
</p>
<a name="120">
<h2>GLSL 1.20 support</h2>
<p>
Support for GLSL version 1.20 is underway. Status as follows.
</p>
<h3>Supported</h3>
<ul>
<li><code>mat2x3, mat2x4</code>, etc. types and functions
<li><code>transpose(), outerProduct(), matrixCompMult()</code> functions
(but untested)
<li>precision qualifiers (lowp, mediump, highp)
</ul>
<h3>Partially Complete</h3>
<ul>
<li><code>invariant</code> qualifier
</ul>
<h3>Not Completed</h3>
<ul>
<li><code>array.length()</code> method
<li><code>float[5] a;</code> array syntax
<li><code>centroid</code> qualifier
<li>unsized array constructors
<li>initializers for uniforms
<li>const initializers calling built-in functions
</ul>
</BODY>
</HTML>

View File

@@ -27,16 +27,27 @@ the Amiga, Apple Macintosh, BeOS, NeXT, OS/2, MS-DOS, VMS, Windows
</p>
<p>
Details about particular drivers follows.
Be warned that some drivers may be out of date and no longer function.
Details about particular drivers follows:
</p>
<UL>
<LI><a href="xlibdriver.html">Xlib driver</a> for the X Window System
<li><a href="http://dri.freedesktop.org/" target="_parent">
DRI hardware drivers</a> for the X window system
<li><a href="http://dri.freedesktop.org/" target="_parent"> DRI hardware
drivers</a> for the X Window System
<LI><a href="xlibdriver.html">Xlib software driver</a> for the X Window System
and Unix-like operating systems
<LI>Microsoft Windows <A HREF="README.WIN32">(README.WIN32)</A>
<LI>DEC VMS <A HREF="README.VMS">(README.VMS)</A>
</UL>
<h2>Deprecated Systems</h2>
<p>
These drivers have not been maintained and are being deprecated.
They can be saved if someone steps up to help.
</p>
<UL>
<LI>3dfx/Glide <A HREF="README.3DFX">(README.3DFX)</A>
<LI>GGI <A HREF="README.GGI">(README.GGI)</A>
<LI>Amiga Amiwin <A HREF="README.AMIWIN">(README.AMIWIN)</A>
@@ -49,6 +60,10 @@ DRI hardware drivers</a> for the X window system
<LI>OpenStep <A HREF="README.OpenStep">(README.OpenStep)</A>
<LI>OS/2 <A HREF="README.OS2">(README.OS2)</A>
<LI>WindML <A HREF="README.WINDML">(README.WINDML)</A>
</UL>
And for historical reference:
<UL>
<LI><a href="http://utah-glx.sourceforge.net/" target="_parent">Utah GLX drivers</a>
</UL>

View File

@@ -11,7 +11,7 @@
<p>
If you have problems, edits or additions for this website send them
to Brian
(<em>b</em><em>r</em><em>i</em><em>a</em><em>n</em><em>_</em><em>e</em><em>_</em><em>p</em><em>a</em><em>u</em><em>l</em><em>@</em><em>y</em><em>a</em><em>h</em><em>o</em><em>o</em><em>.</em><em>c</em><em>o</em><em>m</em>)</a>.
(<em>b</em><em>r</em><em>i</em><em>a</em><em>n</em><em>.</em><em>e</em><em>.</em><em>p</em><em>a</em><em>u</em><em>l</em><em> </em><em>g</em><em>m</em><em>a</em><em>i</em><em>l</em><em>.</em><em>c</em><em>o</em><em>m</em>)</a>.
</p>
<p>
@@ -21,4 +21,4 @@ Brian's modified it a lot since then.
</body>
</html>
</html>

View File

@@ -169,6 +169,20 @@ the Gamma FAQ</a>
</p>
<H2>Direct Rendering Flag</H2>
<p>
Some applications won't run with indirect rendering contexts (which is
what the Xlib driver supports).
To force the glXIsDirect() query to return True, set the MESA_GLX_FORCE_DIRECT
environment variable.
For example:
</p>
<pre>
$ export MESA_GLX_FORCE_DIRECT=1
</pre>
<H2>Overlay Planes</H2>
<p>
Hardware overlay planes are supported by the Xlib driver. To
@@ -268,6 +282,8 @@ This extension was added in Mesa 2.6
MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
MESA_GAMMA - gamma correction coefficients (X only)
MESA_GLX_FORCE_DIRECT - report that the driver is direct rendering, even
though it's not.
</pre>

View File

@@ -2,17 +2,12 @@
GLincludedir = $(includedir)/GL
INC_FX = fxmesa.h
INC_GGI = ggimesa.h
INC_OSMESA = osmesa.h
INC_SVGA = svgamesa.h
INC_X11 = glx.h glxext.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
INC_X11 = glx.h glxext.h glx_mangle.h
INC_GLUT = glut.h glutf90.h
if HAVE_FX
sel_inc_fx = $(INC_FX)
endif
if HAVE_GGI
sel_inc_ggi = $(INC_GGI)
endif
@@ -35,9 +30,9 @@ endif
EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \
vms_x_fix.h wmesa.h \
$(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
$(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
$(sel_inc_fx) $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
$(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
$(sel_inc_x11) $(sel_inc_glut)
include $(top_srcdir)/common_rules.make

View File

@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
* Version: 6.5.1
* Version: 7.4
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*

View File

@@ -48,34 +48,49 @@
#define glAsyncMarkerSGIX MANGLE(AsyncMarkerSGIX)
#define glAttachObjectARB MANGLE(AttachObjectARB)
#define glAttachShader MANGLE(AttachShader)
#define glBeginConditionalRender MANGLE(BeginConditionalRender)
#define glBeginConditionalRenderNV MANGLE(BeginConditionalRenderNV)
#define glBeginFragmentShaderATI MANGLE(BeginFragmentShaderATI)
#define glBegin MANGLE(Begin)
#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
#define glBeginQueryARB MANGLE(BeginQueryARB)
#define glBeginQuery MANGLE(BeginQuery)
#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT)
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
#define glBindAttribLocation MANGLE(BindAttribLocation)
#define glBindBufferARB MANGLE(BindBufferARB)
#define glBindBufferBaseEXT MANGLE(BindBufferBaseEXT)
#define glBindBufferBase MANGLE(BindBufferBase)
#define glBindBufferBaseNV MANGLE(BindBufferBaseNV)
#define glBindBuffer MANGLE(BindBuffer)
#define glBindBufferOffsetEXT MANGLE(BindBufferOffsetEXT)
#define glBindBufferOffsetNV MANGLE(BindBufferOffsetNV)
#define glBindBufferRangeEXT MANGLE(BindBufferRangeEXT)
#define glBindBufferRange MANGLE(BindBufferRange)
#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
#define glBindFragDataLocation MANGLE(BindFragDataLocation)
#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
#define glBindFramebuffer MANGLE(BindFramebuffer)
#define glBindLightParameterEXT MANGLE(BindLightParameterEXT)
#define glBindMaterialParameterEXT MANGLE(BindMaterialParameterEXT)
#define glBindMultiTextureEXT MANGLE(BindMultiTextureEXT)
#define glBindParameterEXT MANGLE(BindParameterEXT)
#define glBindProgramARB MANGLE(BindProgramARB)
#define glBindProgramNV MANGLE(BindProgramNV)
#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT)
#define glBindRenderbuffer MANGLE(BindRenderbuffer)
#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT)
#define glBindTextureEXT MANGLE(BindTextureEXT)
#define glBindTexture MANGLE(BindTexture)
#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT)
#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV)
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
#define glBindVertexArray MANGLE(BindVertexArray)
#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT)
#define glBinormal3bEXT MANGLE(Binormal3bEXT)
#define glBinormal3bvEXT MANGLE(Binormal3bvEXT)
@@ -101,6 +116,7 @@
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
#define glBlitFramebuffer MANGLE(BlitFramebuffer)
#define glBufferDataARB MANGLE(BufferDataARB)
#define glBufferData MANGLE(BufferData)
#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
@@ -109,8 +125,15 @@
#define glCallList MANGLE(CallList)
#define glCallLists MANGLE(CallLists)
#define glCheckFramebufferStatusEXT MANGLE(CheckFramebufferStatusEXT)
#define glCheckFramebufferStatus MANGLE(CheckFramebufferStatus)
#define glCheckNamedFramebufferStatusEXT MANGLE(CheckNamedFramebufferStatusEXT)
#define glClampColorARB MANGLE(ClampColorARB)
#define glClampColor MANGLE(ClampColor)
#define glClearAccum MANGLE(ClearAccum)
#define glClearBufferfi MANGLE(ClearBufferfi)
#define glClearBufferfv MANGLE(ClearBufferfv)
#define glClearBufferiv MANGLE(ClearBufferiv)
#define glClearBufferuiv MANGLE(ClearBufferuiv)
#define glClearColorIiEXT MANGLE(ClearColorIiEXT)
#define glClearColorIuiEXT MANGLE(ClearColorIuiEXT)
#define glClearColor MANGLE(ClearColor)
@@ -123,6 +146,7 @@
#define glClientActiveTextureARB MANGLE(ClientActiveTextureARB)
#define glClientActiveTexture MANGLE(ClientActiveTexture)
#define glClientActiveVertexStreamATI MANGLE(ClientActiveVertexStreamATI)
#define glClientAttribDefaultEXT MANGLE(ClientAttribDefaultEXT)
#define glClipPlane MANGLE(ClipPlane)
#define glColor3b MANGLE(Color3b)
#define glColor3bv MANGLE(Color3bv)
@@ -171,6 +195,7 @@
#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI)
#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI)
#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI)
#define glColorMaski MANGLE(ColorMaski)
#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT)
#define glColorMask MANGLE(ColorMask)
#define glColorMaterial MANGLE(ColorMaterial)
@@ -196,6 +221,12 @@
#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV)
#define glCompileShaderARB MANGLE(CompileShaderARB)
#define glCompileShader MANGLE(CompileShader)
#define glCompressedMultiTexImage1DEXT MANGLE(CompressedMultiTexImage1DEXT)
#define glCompressedMultiTexImage2DEXT MANGLE(CompressedMultiTexImage2DEXT)
#define glCompressedMultiTexImage3DEXT MANGLE(CompressedMultiTexImage3DEXT)
#define glCompressedMultiTexSubImage1DEXT MANGLE(CompressedMultiTexSubImage1DEXT)
#define glCompressedMultiTexSubImage2DEXT MANGLE(CompressedMultiTexSubImage2DEXT)
#define glCompressedMultiTexSubImage3DEXT MANGLE(CompressedMultiTexSubImage3DEXT)
#define glCompressedTexImage1DARB MANGLE(CompressedTexImage1DARB)
#define glCompressedTexImage1D MANGLE(CompressedTexImage1D)
#define glCompressedTexImage2DARB MANGLE(CompressedTexImage2DARB)
@@ -208,6 +239,12 @@
#define glCompressedTexSubImage2D MANGLE(CompressedTexSubImage2D)
#define glCompressedTexSubImage3DARB MANGLE(CompressedTexSubImage3DARB)
#define glCompressedTexSubImage3D MANGLE(CompressedTexSubImage3D)
#define glCompressedTextureImage1DEXT MANGLE(CompressedTextureImage1DEXT)
#define glCompressedTextureImage2DEXT MANGLE(CompressedTextureImage2DEXT)
#define glCompressedTextureImage3DEXT MANGLE(CompressedTextureImage3DEXT)
#define glCompressedTextureSubImage1DEXT MANGLE(CompressedTextureSubImage1DEXT)
#define glCompressedTextureSubImage2DEXT MANGLE(CompressedTextureSubImage2DEXT)
#define glCompressedTextureSubImage3DEXT MANGLE(CompressedTextureSubImage3DEXT)
#define glConvolutionFilter1DEXT MANGLE(ConvolutionFilter1DEXT)
#define glConvolutionFilter1D MANGLE(ConvolutionFilter1D)
#define glConvolutionFilter2DEXT MANGLE(ConvolutionFilter2DEXT)
@@ -228,6 +265,11 @@
#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D)
#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT)
#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D)
#define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT)
#define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT)
#define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT)
#define glCopyMultiTexSubImage2DEXT MANGLE(CopyMultiTexSubImage2DEXT)
#define glCopyMultiTexSubImage3DEXT MANGLE(CopyMultiTexSubImage3DEXT)
#define glCopyPixels MANGLE(CopyPixels)
#define glCopyTexImage1DEXT MANGLE(CopyTexImage1DEXT)
#define glCopyTexImage1D MANGLE(CopyTexImage1D)
@@ -239,6 +281,11 @@
#define glCopyTexSubImage2D MANGLE(CopyTexSubImage2D)
#define glCopyTexSubImage3DEXT MANGLE(CopyTexSubImage3DEXT)
#define glCopyTexSubImage3D MANGLE(CopyTexSubImage3D)
#define glCopyTextureImage1DEXT MANGLE(CopyTextureImage1DEXT)
#define glCopyTextureImage2DEXT MANGLE(CopyTextureImage2DEXT)
#define glCopyTextureSubImage1DEXT MANGLE(CopyTextureSubImage1DEXT)
#define glCopyTextureSubImage2DEXT MANGLE(CopyTextureSubImage2DEXT)
#define glCopyTextureSubImage3DEXT MANGLE(CopyTextureSubImage3DEXT)
#define glCreateDebugObjectMESA MANGLE(CreateDebugObjectMESA)
#define glCreateProgram MANGLE(CreateProgram)
#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB)
@@ -258,6 +305,7 @@
#define glDeleteFencesNV MANGLE(DeleteFencesNV)
#define glDeleteFragmentShaderATI MANGLE(DeleteFragmentShaderATI)
#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT)
#define glDeleteFramebuffers MANGLE(DeleteFramebuffers)
#define glDeleteLists MANGLE(DeleteLists)
#define glDeleteObjectARB MANGLE(DeleteObjectARB)
#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV)
@@ -267,10 +315,13 @@
#define glDeleteQueriesARB MANGLE(DeleteQueriesARB)
#define glDeleteQueries MANGLE(DeleteQueries)
#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
#define glDeleteShader MANGLE(DeleteShader)
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
#define glDeleteTextures MANGLE(DeleteTextures)
#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
#define glDeleteVertexArrays MANGLE(DeleteVertexArrays)
#define glDeleteVertexShaderEXT MANGLE(DeleteVertexShaderEXT)
#define glDepthBoundsdNV MANGLE(DepthBoundsdNV)
#define glDepthBoundsEXT MANGLE(DepthBoundsEXT)
@@ -281,13 +332,16 @@
#define glDetachObjectARB MANGLE(DetachObjectARB)
#define glDetachShader MANGLE(DetachShader)
#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS)
#define glDisableClientStateIndexedEXT MANGLE(DisableClientStateIndexedEXT)
#define glDisableClientState MANGLE(DisableClientState)
#define glDisablei MANGLE(Disablei)
#define glDisableIndexedEXT MANGLE(DisableIndexedEXT)
#define glDisable MANGLE(Disable)
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
#define glDrawArraysInstancedARB MANGLE(DrawArraysInstancedARB)
#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT)
#define glDrawArrays MANGLE(DrawArrays)
#define glDrawBuffer MANGLE(DrawBuffer)
@@ -296,6 +350,7 @@
#define glDrawBuffers MANGLE(DrawBuffers)
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
#define glDrawElements MANGLE(DrawElements)
#define glDrawMeshArraysSUN MANGLE(DrawMeshArraysSUN)
@@ -304,6 +359,7 @@
#define glDrawRangeElementArrayATI MANGLE(DrawRangeElementArrayATI)
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
#define glDrawRangeElements MANGLE(DrawRangeElements)
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
#define glEdgeFlag MANGLE(EdgeFlag)
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
@@ -311,18 +367,24 @@
#define glEdgeFlagv MANGLE(EdgeFlagv)
#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE)
#define glElementPointerATI MANGLE(ElementPointerATI)
#define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT)
#define glEnableClientState MANGLE(EnableClientState)
#define glEnablei MANGLE(Enablei)
#define glEnableIndexedEXT MANGLE(EnableIndexedEXT)
#define glEnable MANGLE(Enable)
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray)
#define glEndConditionalRender MANGLE(EndConditionalRender)
#define glEndConditionalRenderNV MANGLE(EndConditionalRenderNV)
#define glEndFragmentShaderATI MANGLE(EndFragmentShaderATI)
#define glEndList MANGLE(EndList)
#define glEnd MANGLE(End)
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
#define glEndQueryARB MANGLE(EndQueryARB)
#define glEndQuery MANGLE(EndQuery)
#define glEndTransformFeedbackEXT MANGLE(EndTransformFeedbackEXT)
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV)
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
#define glEvalCoord1d MANGLE(EvalCoord1d)
@@ -350,6 +412,7 @@
#define glFinishTextureSUNX MANGLE(FinishTextureSUNX)
#define glFlush MANGLE(Flush)
#define glFlushMappedBufferRangeAPPLE MANGLE(FlushMappedBufferRangeAPPLE)
#define glFlushMappedBufferRange MANGLE(FlushMappedBufferRange)
#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV)
#define glFlushRasterSGIX MANGLE(FlushRasterSGIX)
#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE)
@@ -385,13 +448,25 @@
#define glFragmentMaterialfvSGIX MANGLE(FragmentMaterialfvSGIX)
#define glFragmentMaterialiSGIX MANGLE(FragmentMaterialiSGIX)
#define glFragmentMaterialivSGIX MANGLE(FragmentMaterialivSGIX)
#define glFramebufferDrawBufferEXT MANGLE(FramebufferDrawBufferEXT)
#define glFramebufferDrawBuffersEXT MANGLE(FramebufferDrawBuffersEXT)
#define glFramebufferReadBufferEXT MANGLE(FramebufferReadBufferEXT)
#define glFramebufferRenderbufferEXT MANGLE(FramebufferRenderbufferEXT)
#define glFramebufferRenderbuffer MANGLE(FramebufferRenderbuffer)
#define glFramebufferTexture1DEXT MANGLE(FramebufferTexture1DEXT)
#define glFramebufferTexture1D MANGLE(FramebufferTexture1D)
#define glFramebufferTexture2DEXT MANGLE(FramebufferTexture2DEXT)
#define glFramebufferTexture2D MANGLE(FramebufferTexture2D)
#define glFramebufferTexture3DEXT MANGLE(FramebufferTexture3DEXT)
#define glFramebufferTexture3D MANGLE(FramebufferTexture3D)
#define glFramebufferTextureARB MANGLE(FramebufferTextureARB)
#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
#define glFrameTerminatorGREMEDY MANGLE(FrameTerminatorGREMEDY)
#define glFrameZoomSGIX MANGLE(FrameZoomSGIX)
#define glFreeObjectBufferATI MANGLE(FreeObjectBufferATI)
#define glFrontFace MANGLE(FrontFace)
@@ -400,10 +475,14 @@
#define glGenBuffersARB MANGLE(GenBuffersARB)
#define glGenBuffers MANGLE(GenBuffers)
#define glGenerateMipmapEXT MANGLE(GenerateMipmapEXT)
#define glGenerateMipmap MANGLE(GenerateMipmap)
#define glGenerateMultiTexMipmapEXT MANGLE(GenerateMultiTexMipmapEXT)
#define glGenerateTextureMipmapEXT MANGLE(GenerateTextureMipmapEXT)
#define glGenFencesAPPLE MANGLE(GenFencesAPPLE)
#define glGenFencesNV MANGLE(GenFencesNV)
#define glGenFragmentShadersATI MANGLE(GenFragmentShadersATI)
#define glGenFramebuffersEXT MANGLE(GenFramebuffersEXT)
#define glGenFramebuffers MANGLE(GenFramebuffers)
#define glGenLists MANGLE(GenLists)
#define glGenOcclusionQueriesNV MANGLE(GenOcclusionQueriesNV)
#define glGenProgramsARB MANGLE(GenProgramsARB)
@@ -411,10 +490,13 @@
#define glGenQueriesARB MANGLE(GenQueriesARB)
#define glGenQueries MANGLE(GenQueries)
#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT)
#define glGenRenderbuffers MANGLE(GenRenderbuffers)
#define glGenSymbolsEXT MANGLE(GenSymbolsEXT)
#define glGenTexturesEXT MANGLE(GenTexturesEXT)
#define glGenTextures MANGLE(GenTextures)
#define glGenTransformFeedbacksNV MANGLE(GenTransformFeedbacksNV)
#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE)
#define glGenVertexArrays MANGLE(GenVertexArrays)
#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT)
#define glGetActiveAttribARB MANGLE(GetActiveAttribARB)
#define glGetActiveAttrib MANGLE(GetActiveAttrib)
@@ -428,6 +510,7 @@
#define glGetAttribLocationARB MANGLE(GetAttribLocationARB)
#define glGetAttribLocation MANGLE(GetAttribLocation)
#define glGetBooleanIndexedvEXT MANGLE(GetBooleanIndexedvEXT)
#define glGetBooleani_v MANGLE(GetBooleani_v)
#define glGetBooleanv MANGLE(GetBooleanv)
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
@@ -450,8 +533,10 @@
#define glGetCombinerOutputParameterfvNV MANGLE(GetCombinerOutputParameterfvNV)
#define glGetCombinerOutputParameterivNV MANGLE(GetCombinerOutputParameterivNV)
#define glGetCombinerStageParameterfvNV MANGLE(GetCombinerStageParameterfvNV)
#define glGetCompressedMultiTexImageEXT MANGLE(GetCompressedMultiTexImageEXT)
#define glGetCompressedTexImageARB MANGLE(GetCompressedTexImageARB)
#define glGetCompressedTexImage MANGLE(GetCompressedTexImage)
#define glGetCompressedTextureImageEXT MANGLE(GetCompressedTextureImageEXT)
#define glGetConvolutionFilterEXT MANGLE(GetConvolutionFilterEXT)
#define glGetConvolutionFilter MANGLE(GetConvolutionFilter)
#define glGetConvolutionParameterfvEXT MANGLE(GetConvolutionParameterfvEXT)
@@ -461,19 +546,24 @@
#define glGetDebugLogLengthMESA MANGLE(GetDebugLogLengthMESA)
#define glGetDebugLogMESA MANGLE(GetDebugLogMESA)
#define glGetDetailTexFuncSGIS MANGLE(GetDetailTexFuncSGIS)
#define glGetDoubleIndexedvEXT MANGLE(GetDoubleIndexedvEXT)
#define glGetDoublev MANGLE(GetDoublev)
#define glGetError MANGLE(GetError)
#define glGetFenceivNV MANGLE(GetFenceivNV)
#define glGetFinalCombinerInputParameterfvNV MANGLE(GetFinalCombinerInputParameterfvNV)
#define glGetFinalCombinerInputParameterivNV MANGLE(GetFinalCombinerInputParameterivNV)
#define glGetFloatIndexedvEXT MANGLE(GetFloatIndexedvEXT)
#define glGetFloatv MANGLE(GetFloatv)
#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS)
#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT)
#define glGetFragDataLocation MANGLE(GetFragDataLocation)
#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX)
#define glGetFragmentLightivSGIX MANGLE(GetFragmentLightivSGIX)
#define glGetFragmentMaterialfvSGIX MANGLE(GetFragmentMaterialfvSGIX)
#define glGetFragmentMaterialivSGIX MANGLE(GetFragmentMaterialivSGIX)
#define glGetFramebufferAttachmentParameterivEXT MANGLE(GetFramebufferAttachmentParameterivEXT)
#define glGetFramebufferAttachmentParameteriv MANGLE(GetFramebufferAttachmentParameteriv)
#define glGetFramebufferParameterivEXT MANGLE(GetFramebufferParameterivEXT)
#define glGetHandleARB MANGLE(GetHandleARB)
#define glGetHistogramEXT MANGLE(GetHistogramEXT)
#define glGetHistogram MANGLE(GetHistogram)
@@ -486,6 +576,7 @@
#define glGetInfoLogARB MANGLE(GetInfoLogARB)
#define glGetInstrumentsSGIX MANGLE(GetInstrumentsSGIX)
#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
#define glGetIntegeri_v MANGLE(GetIntegeri_v)
#define glGetIntegerv MANGLE(GetIntegerv)
#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT)
#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT)
@@ -513,6 +604,30 @@
#define glGetMinmaxParameterfv MANGLE(GetMinmaxParameterfv)
#define glGetMinmaxParameterivEXT MANGLE(GetMinmaxParameterivEXT)
#define glGetMinmaxParameteriv MANGLE(GetMinmaxParameteriv)
#define glGetMultisamplefvNV MANGLE(GetMultisamplefvNV)
#define glGetMultiTexEnvfvEXT MANGLE(GetMultiTexEnvfvEXT)
#define glGetMultiTexEnvivEXT MANGLE(GetMultiTexEnvivEXT)
#define glGetMultiTexGendvEXT MANGLE(GetMultiTexGendvEXT)
#define glGetMultiTexGenfvEXT MANGLE(GetMultiTexGenfvEXT)
#define glGetMultiTexGenivEXT MANGLE(GetMultiTexGenivEXT)
#define glGetMultiTexImageEXT MANGLE(GetMultiTexImageEXT)
#define glGetMultiTexLevelParameterfvEXT MANGLE(GetMultiTexLevelParameterfvEXT)
#define glGetMultiTexLevelParameterivEXT MANGLE(GetMultiTexLevelParameterivEXT)
#define glGetMultiTexParameterfvEXT MANGLE(GetMultiTexParameterfvEXT)
#define glGetMultiTexParameterIivEXT MANGLE(GetMultiTexParameterIivEXT)
#define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT)
#define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT)
#define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT)
#define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT)
#define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT)
#define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT)
#define glGetNamedProgramivEXT MANGLE(GetNamedProgramivEXT)
#define glGetNamedProgramLocalParameterdvEXT MANGLE(GetNamedProgramLocalParameterdvEXT)
#define glGetNamedProgramLocalParameterfvEXT MANGLE(GetNamedProgramLocalParameterfvEXT)
#define glGetNamedProgramLocalParameterIivEXT MANGLE(GetNamedProgramLocalParameterIivEXT)
#define glGetNamedProgramLocalParameterIuivEXT MANGLE(GetNamedProgramLocalParameterIuivEXT)
#define glGetNamedProgramStringEXT MANGLE(GetNamedProgramStringEXT)
#define glGetNamedRenderbufferParameterivEXT MANGLE(GetNamedRenderbufferParameterivEXT)
#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
@@ -524,6 +639,7 @@
#define glGetPixelMapusv MANGLE(GetPixelMapusv)
#define glGetPixelTexGenParameterfvSGIS MANGLE(GetPixelTexGenParameterfvSGIS)
#define glGetPixelTexGenParameterivSGIS MANGLE(GetPixelTexGenParameterivSGIS)
#define glGetPointerIndexedvEXT MANGLE(GetPointerIndexedvEXT)
#define glGetPointervEXT MANGLE(GetPointervEXT)
#define glGetPointerv MANGLE(GetPointerv)
#define glGetPolygonStipple MANGLE(GetPolygonStipple)
@@ -555,6 +671,7 @@
#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB)
#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv)
#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT)
#define glGetRenderbufferParameteriv MANGLE(GetRenderbufferParameteriv)
#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT)
#define glGetSeparableFilter MANGLE(GetSeparableFilter)
#define glGetShaderInfoLog MANGLE(GetShaderInfoLog)
@@ -562,6 +679,7 @@
#define glGetShaderSourceARB MANGLE(GetShaderSourceARB)
#define glGetShaderSource MANGLE(GetShaderSource)
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
#define glGetStringi MANGLE(GetStringi)
#define glGetString MANGLE(GetString)
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
@@ -576,9 +694,20 @@
#define glGetTexLevelParameteriv MANGLE(GetTexLevelParameteriv)
#define glGetTexParameterfv MANGLE(GetTexParameterfv)
#define glGetTexParameterIivEXT MANGLE(GetTexParameterIivEXT)
#define glGetTexParameterIiv MANGLE(GetTexParameterIiv)
#define glGetTexParameterIuivEXT MANGLE(GetTexParameterIuivEXT)
#define glGetTexParameterIuiv MANGLE(GetTexParameterIuiv)
#define glGetTexParameteriv MANGLE(GetTexParameteriv)
#define glGetTextureImageEXT MANGLE(GetTextureImageEXT)
#define glGetTextureLevelParameterfvEXT MANGLE(GetTextureLevelParameterfvEXT)
#define glGetTextureLevelParameterivEXT MANGLE(GetTextureLevelParameterivEXT)
#define glGetTextureParameterfvEXT MANGLE(GetTextureParameterfvEXT)
#define glGetTextureParameterIivEXT MANGLE(GetTextureParameterIivEXT)
#define glGetTextureParameterIuivEXT MANGLE(GetTextureParameterIuivEXT)
#define glGetTextureParameterivEXT MANGLE(GetTextureParameterivEXT)
#define glGetTrackMatrixivNV MANGLE(GetTrackMatrixivNV)
#define glGetTransformFeedbackVaryingEXT MANGLE(GetTransformFeedbackVaryingEXT)
#define glGetTransformFeedbackVarying MANGLE(GetTransformFeedbackVarying)
#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV)
#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT)
#define glGetUniformfvARB MANGLE(GetUniformfvARB)
@@ -589,6 +718,7 @@
#define glGetUniformLocation MANGLE(GetUniformLocation)
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
#define glGetUniformuiv MANGLE(GetUniformuiv)
#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
#define glGetVariantArrayObjectivATI MANGLE(GetVariantArrayObjectivATI)
#define glGetVariantBooleanvEXT MANGLE(GetVariantBooleanvEXT)
@@ -605,7 +735,9 @@
#define glGetVertexAttribfv MANGLE(GetVertexAttribfv)
#define glGetVertexAttribfvNV MANGLE(GetVertexAttribfvNV)
#define glGetVertexAttribIivEXT MANGLE(GetVertexAttribIivEXT)
#define glGetVertexAttribIiv MANGLE(GetVertexAttribIiv)
#define glGetVertexAttribIuivEXT MANGLE(GetVertexAttribIuivEXT)
#define glGetVertexAttribIuiv MANGLE(GetVertexAttribIuiv)
#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB)
#define glGetVertexAttribiv MANGLE(GetVertexAttribiv)
#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV)
@@ -652,11 +784,13 @@
#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX)
#define glIsBufferARB MANGLE(IsBufferARB)
#define glIsBuffer MANGLE(IsBuffer)
#define glIsEnabledi MANGLE(IsEnabledi)
#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT)
#define glIsEnabled MANGLE(IsEnabled)
#define glIsFenceAPPLE MANGLE(IsFenceAPPLE)
#define glIsFenceNV MANGLE(IsFenceNV)
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
#define glIsFramebuffer MANGLE(IsFramebuffer)
#define glIsList MANGLE(IsList)
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
@@ -666,11 +800,14 @@
#define glIsQueryARB MANGLE(IsQueryARB)
#define glIsQuery MANGLE(IsQuery)
#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
#define glIsRenderbuffer MANGLE(IsRenderbuffer)
#define glIsShader MANGLE(IsShader)
#define glIsTextureEXT MANGLE(IsTextureEXT)
#define glIsTexture MANGLE(IsTexture)
#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
#define glIsVertexArray MANGLE(IsVertexArray)
#define glLightEnviSGIX MANGLE(LightEnviSGIX)
#define glLightf MANGLE(Lightf)
#define glLightfv MANGLE(Lightfv)
@@ -707,11 +844,13 @@
#define glMap2f MANGLE(Map2f)
#define glMapBufferARB MANGLE(MapBufferARB)
#define glMapBuffer MANGLE(MapBuffer)
#define glMapBufferRange MANGLE(MapBufferRange)
#define glMapControlPointsNV MANGLE(MapControlPointsNV)
#define glMapGrid1d MANGLE(MapGrid1d)
#define glMapGrid1f MANGLE(MapGrid1f)
#define glMapGrid2d MANGLE(MapGrid2d)
#define glMapGrid2f MANGLE(MapGrid2f)
#define glMapNamedBufferEXT MANGLE(MapNamedBufferEXT)
#define glMapObjectBufferATI MANGLE(MapObjectBufferATI)
#define glMapParameterfvNV MANGLE(MapParameterfvNV)
#define glMapParameterivNV MANGLE(MapParameterivNV)
@@ -719,11 +858,30 @@
#define glMaterialfv MANGLE(Materialfv)
#define glMateriali MANGLE(Materiali)
#define glMaterialiv MANGLE(Materialiv)
#define glMatrixFrustumEXT MANGLE(MatrixFrustumEXT)
#define glMatrixIndexPointerARB MANGLE(MatrixIndexPointerARB)
#define glMatrixIndexubvARB MANGLE(MatrixIndexubvARB)
#define glMatrixIndexuivARB MANGLE(MatrixIndexuivARB)
#define glMatrixIndexusvARB MANGLE(MatrixIndexusvARB)
#define glMatrixLoaddEXT MANGLE(MatrixLoaddEXT)
#define glMatrixLoadfEXT MANGLE(MatrixLoadfEXT)
#define glMatrixLoadIdentityEXT MANGLE(MatrixLoadIdentityEXT)
#define glMatrixLoadTransposedEXT MANGLE(MatrixLoadTransposedEXT)
#define glMatrixLoadTransposefEXT MANGLE(MatrixLoadTransposefEXT)
#define glMatrixMode MANGLE(MatrixMode)
#define glMatrixMultdEXT MANGLE(MatrixMultdEXT)
#define glMatrixMultfEXT MANGLE(MatrixMultfEXT)
#define glMatrixMultTransposedEXT MANGLE(MatrixMultTransposedEXT)
#define glMatrixMultTransposefEXT MANGLE(MatrixMultTransposefEXT)
#define glMatrixOrthoEXT MANGLE(MatrixOrthoEXT)
#define glMatrixPopEXT MANGLE(MatrixPopEXT)
#define glMatrixPushEXT MANGLE(MatrixPushEXT)
#define glMatrixRotatedEXT MANGLE(MatrixRotatedEXT)
#define glMatrixRotatefEXT MANGLE(MatrixRotatefEXT)
#define glMatrixScaledEXT MANGLE(MatrixScaledEXT)
#define glMatrixScalefEXT MANGLE(MatrixScalefEXT)
#define glMatrixTranslatedEXT MANGLE(MatrixTranslatedEXT)
#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT)
#define glMinmaxEXT MANGLE(MinmaxEXT)
#define glMinmax MANGLE(Minmax)
#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT)
@@ -734,6 +892,7 @@
#define glMultiDrawRangeElementArrayAPPLE MANGLE(MultiDrawRangeElementArrayAPPLE)
#define glMultiModeDrawArraysIBM MANGLE(MultiModeDrawArraysIBM)
#define glMultiModeDrawElementsIBM MANGLE(MultiModeDrawElementsIBM)
#define glMultiTexBufferEXT MANGLE(MultiTexBufferEXT)
#define glMultiTexCoord1dARB MANGLE(MultiTexCoord1dARB)
#define glMultiTexCoord1d MANGLE(MultiTexCoord1d)
#define glMultiTexCoord1dvARB MANGLE(MultiTexCoord1dvARB)
@@ -806,12 +965,60 @@
#define glMultiTexCoord4s MANGLE(MultiTexCoord4s)
#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB)
#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv)
#define glMultiTexCoordPointerEXT MANGLE(MultiTexCoordPointerEXT)
#define glMultiTexEnvfEXT MANGLE(MultiTexEnvfEXT)
#define glMultiTexEnvfvEXT MANGLE(MultiTexEnvfvEXT)
#define glMultiTexEnviEXT MANGLE(MultiTexEnviEXT)
#define glMultiTexEnvivEXT MANGLE(MultiTexEnvivEXT)
#define glMultiTexGendEXT MANGLE(MultiTexGendEXT)
#define glMultiTexGendvEXT MANGLE(MultiTexGendvEXT)
#define glMultiTexGenfEXT MANGLE(MultiTexGenfEXT)
#define glMultiTexGenfvEXT MANGLE(MultiTexGenfvEXT)
#define glMultiTexGeniEXT MANGLE(MultiTexGeniEXT)
#define glMultiTexGenivEXT MANGLE(MultiTexGenivEXT)
#define glMultiTexImage1DEXT MANGLE(MultiTexImage1DEXT)
#define glMultiTexImage2DEXT MANGLE(MultiTexImage2DEXT)
#define glMultiTexImage3DEXT MANGLE(MultiTexImage3DEXT)
#define glMultiTexParameterfEXT MANGLE(MultiTexParameterfEXT)
#define glMultiTexParameterfvEXT MANGLE(MultiTexParameterfvEXT)
#define glMultiTexParameteriEXT MANGLE(MultiTexParameteriEXT)
#define glMultiTexParameterIivEXT MANGLE(MultiTexParameterIivEXT)
#define glMultiTexParameterIuivEXT MANGLE(MultiTexParameterIuivEXT)
#define glMultiTexParameterivEXT MANGLE(MultiTexParameterivEXT)
#define glMultiTexRenderbufferEXT MANGLE(MultiTexRenderbufferEXT)
#define glMultiTexSubImage1DEXT MANGLE(MultiTexSubImage1DEXT)
#define glMultiTexSubImage2DEXT MANGLE(MultiTexSubImage2DEXT)
#define glMultiTexSubImage3DEXT MANGLE(MultiTexSubImage3DEXT)
#define glMultMatrixd MANGLE(MultMatrixd)
#define glMultMatrixf MANGLE(MultMatrixf)
#define glMultTransposeMatrixdARB MANGLE(MultTransposeMatrixdARB)
#define glMultTransposeMatrixd MANGLE(MultTransposeMatrixd)
#define glMultTransposeMatrixfARB MANGLE(MultTransposeMatrixfARB)
#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf)
#define glNamedBufferDataEXT MANGLE(NamedBufferDataEXT)
#define glNamedBufferSubDataEXT MANGLE(NamedBufferSubDataEXT)
#define glNamedFramebufferRenderbufferEXT MANGLE(NamedFramebufferRenderbufferEXT)
#define glNamedFramebufferTexture1DEXT MANGLE(NamedFramebufferTexture1DEXT)
#define glNamedFramebufferTexture2DEXT MANGLE(NamedFramebufferTexture2DEXT)
#define glNamedFramebufferTexture3DEXT MANGLE(NamedFramebufferTexture3DEXT)
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
#define glNamedProgramLocalParameter4fvEXT MANGLE(NamedProgramLocalParameter4fvEXT)
#define glNamedProgramLocalParameterI4iEXT MANGLE(NamedProgramLocalParameterI4iEXT)
#define glNamedProgramLocalParameterI4ivEXT MANGLE(NamedProgramLocalParameterI4ivEXT)
#define glNamedProgramLocalParameterI4uiEXT MANGLE(NamedProgramLocalParameterI4uiEXT)
#define glNamedProgramLocalParameterI4uivEXT MANGLE(NamedProgramLocalParameterI4uivEXT)
#define glNamedProgramLocalParameters4fvEXT MANGLE(NamedProgramLocalParameters4fvEXT)
#define glNamedProgramLocalParametersI4ivEXT MANGLE(NamedProgramLocalParametersI4ivEXT)
#define glNamedProgramLocalParametersI4uivEXT MANGLE(NamedProgramLocalParametersI4uivEXT)
#define glNamedProgramStringEXT MANGLE(NamedProgramStringEXT)
#define glNamedRenderbufferStorageEXT MANGLE(NamedRenderbufferStorageEXT)
#define glNamedRenderbufferStorageMultisampleCoverageEXT MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT)
#define glNamedRenderbufferStorageMultisampleEXT MANGLE(NamedRenderbufferStorageMultisampleEXT)
#define glNewList MANGLE(NewList)
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
#define glNormal3b MANGLE(Normal3b)
@@ -845,6 +1052,7 @@
#define glOrtho MANGLE(Ortho)
#define glPassTexCoordATI MANGLE(PassTexCoordATI)
#define glPassThrough MANGLE(PassThrough)
#define glPauseTransformFeedbackNV MANGLE(PauseTransformFeedbackNV)
#define glPixelDataRangeNV MANGLE(PixelDataRangeNV)
#define glPixelMapfv MANGLE(PixelMapfv)
#define glPixelMapuiv MANGLE(PixelMapuiv)
@@ -926,12 +1134,47 @@
#define glProgramParameter4dvNV MANGLE(ProgramParameter4dvNV)
#define glProgramParameter4fNV MANGLE(ProgramParameter4fNV)
#define glProgramParameter4fvNV MANGLE(ProgramParameter4fvNV)
#define glProgramParameteriARB MANGLE(ProgramParameteriARB)
#define glProgramParameteriEXT MANGLE(ProgramParameteriEXT)
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
#define glProgramStringARB MANGLE(ProgramStringARB)
#define glProgramUniform1fEXT MANGLE(ProgramUniform1fEXT)
#define glProgramUniform1fvEXT MANGLE(ProgramUniform1fvEXT)
#define glProgramUniform1iEXT MANGLE(ProgramUniform1iEXT)
#define glProgramUniform1ivEXT MANGLE(ProgramUniform1ivEXT)
#define glProgramUniform1uiEXT MANGLE(ProgramUniform1uiEXT)
#define glProgramUniform1uivEXT MANGLE(ProgramUniform1uivEXT)
#define glProgramUniform2fEXT MANGLE(ProgramUniform2fEXT)
#define glProgramUniform2fvEXT MANGLE(ProgramUniform2fvEXT)
#define glProgramUniform2iEXT MANGLE(ProgramUniform2iEXT)
#define glProgramUniform2ivEXT MANGLE(ProgramUniform2ivEXT)
#define glProgramUniform2uiEXT MANGLE(ProgramUniform2uiEXT)
#define glProgramUniform2uivEXT MANGLE(ProgramUniform2uivEXT)
#define glProgramUniform3fEXT MANGLE(ProgramUniform3fEXT)
#define glProgramUniform3fvEXT MANGLE(ProgramUniform3fvEXT)
#define glProgramUniform3iEXT MANGLE(ProgramUniform3iEXT)
#define glProgramUniform3ivEXT MANGLE(ProgramUniform3ivEXT)
#define glProgramUniform3uiEXT MANGLE(ProgramUniform3uiEXT)
#define glProgramUniform3uivEXT MANGLE(ProgramUniform3uivEXT)
#define glProgramUniform4fEXT MANGLE(ProgramUniform4fEXT)
#define glProgramUniform4fvEXT MANGLE(ProgramUniform4fvEXT)
#define glProgramUniform4iEXT MANGLE(ProgramUniform4iEXT)
#define glProgramUniform4ivEXT MANGLE(ProgramUniform4ivEXT)
#define glProgramUniform4uiEXT MANGLE(ProgramUniform4uiEXT)
#define glProgramUniform4uivEXT MANGLE(ProgramUniform4uivEXT)
#define glProgramUniformMatrix2fvEXT MANGLE(ProgramUniformMatrix2fvEXT)
#define glProgramUniformMatrix2x3fvEXT MANGLE(ProgramUniformMatrix2x3fvEXT)
#define glProgramUniformMatrix2x4fvEXT MANGLE(ProgramUniformMatrix2x4fvEXT)
#define glProgramUniformMatrix3fvEXT MANGLE(ProgramUniformMatrix3fvEXT)
#define glProgramUniformMatrix3x2fvEXT MANGLE(ProgramUniformMatrix3x2fvEXT)
#define glProgramUniformMatrix3x4fvEXT MANGLE(ProgramUniformMatrix3x4fvEXT)
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
#define glPushAttrib MANGLE(PushAttrib)
#define glPushClientAttribDefaultEXT MANGLE(PushClientAttribDefaultEXT)
#define glPushClientAttrib MANGLE(PushClientAttrib)
#define glPushMatrix MANGLE(PushMatrix)
#define glPushName MANGLE(PushName)
@@ -972,8 +1215,10 @@
#define glRectsv MANGLE(Rectsv)
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
#define glRenderbufferStorage MANGLE(RenderbufferStorage)
#define glRenderbufferStorageMultisampleCoverageNV MANGLE(RenderbufferStorageMultisampleCoverageNV)
#define glRenderbufferStorageMultisampleEXT MANGLE(RenderbufferStorageMultisampleEXT)
#define glRenderbufferStorageMultisample MANGLE(RenderbufferStorageMultisample)
#define glRenderMode MANGLE(RenderMode)
#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN)
#define glReplacementCodeubSUN MANGLE(ReplacementCodeubSUN)
@@ -1004,12 +1249,14 @@
#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT)
#define glResetMinmax MANGLE(ResetMinmax)
#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA)
#define glResumeTransformFeedbackNV MANGLE(ResumeTransformFeedbackNV)
#define glRotated MANGLE(Rotated)
#define glRotatef MANGLE(Rotatef)
#define glSampleCoverageARB MANGLE(SampleCoverageARB)
#define glSampleCoverage MANGLE(SampleCoverage)
#define glSampleMapATI MANGLE(SampleMapATI)
#define glSampleMaskEXT MANGLE(SampleMaskEXT)
#define glSampleMaskIndexedNV MANGLE(SampleMaskIndexedNV)
#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
#define glSamplePatternEXT MANGLE(SamplePatternEXT)
#define glSamplePatternSGIS MANGLE(SamplePatternSGIS)
@@ -1101,6 +1348,7 @@
#define glTestFenceAPPLE MANGLE(TestFenceAPPLE)
#define glTestFenceNV MANGLE(TestFenceNV)
#define glTestObjectAPPLE MANGLE(TestObjectAPPLE)
#define glTexBufferARB MANGLE(TexBufferARB)
#define glTexBufferEXT MANGLE(TexBufferEXT)
#define glTexBumpParameterfvATI MANGLE(TexBumpParameterfvATI)
#define glTexBumpParameterivATI MANGLE(TexBumpParameterivATI)
@@ -1181,9 +1429,12 @@
#define glTexParameterf MANGLE(TexParameterf)
#define glTexParameterfv MANGLE(TexParameterfv)
#define glTexParameterIivEXT MANGLE(TexParameterIivEXT)
#define glTexParameterIiv MANGLE(TexParameterIiv)
#define glTexParameteri MANGLE(TexParameteri)
#define glTexParameterIuivEXT MANGLE(TexParameterIuivEXT)
#define glTexParameterIuiv MANGLE(TexParameterIuiv)
#define glTexParameteriv MANGLE(TexParameteriv)
#define glTexRenderbufferNV MANGLE(TexRenderbufferNV)
#define glTexSubImage1DEXT MANGLE(TexSubImage1DEXT)
#define glTexSubImage1D MANGLE(TexSubImage1D)
#define glTexSubImage2DEXT MANGLE(TexSubImage2DEXT)
@@ -1191,12 +1442,28 @@
#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT)
#define glTexSubImage3D MANGLE(TexSubImage3D)
#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS)
#define glTextureBufferEXT MANGLE(TextureBufferEXT)
#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS)
#define glTextureImage1DEXT MANGLE(TextureImage1DEXT)
#define glTextureImage2DEXT MANGLE(TextureImage2DEXT)
#define glTextureImage3DEXT MANGLE(TextureImage3DEXT)
#define glTextureLightEXT MANGLE(TextureLightEXT)
#define glTextureMaterialEXT MANGLE(TextureMaterialEXT)
#define glTextureNormalEXT MANGLE(TextureNormalEXT)
#define glTextureParameterfEXT MANGLE(TextureParameterfEXT)
#define glTextureParameterfvEXT MANGLE(TextureParameterfvEXT)
#define glTextureParameteriEXT MANGLE(TextureParameteriEXT)
#define glTextureParameterIivEXT MANGLE(TextureParameterIivEXT)
#define glTextureParameterIuivEXT MANGLE(TextureParameterIuivEXT)
#define glTextureParameterivEXT MANGLE(TextureParameterivEXT)
#define glTextureRenderbufferEXT MANGLE(TextureRenderbufferEXT)
#define glTextureSubImage1DEXT MANGLE(TextureSubImage1DEXT)
#define glTextureSubImage2DEXT MANGLE(TextureSubImage2DEXT)
#define glTextureSubImage3DEXT MANGLE(TextureSubImage3DEXT)
#define glTrackMatrixNV MANGLE(TrackMatrixNV)
#define glTransformFeedbackAttribsNV MANGLE(TransformFeedbackAttribsNV)
#define glTransformFeedbackVaryingsEXT MANGLE(TransformFeedbackVaryingsEXT)
#define glTransformFeedbackVaryings MANGLE(TransformFeedbackVaryings)
#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV)
#define glTranslated MANGLE(Translated)
#define glTranslatef MANGLE(Translatef)
@@ -1209,7 +1476,9 @@
#define glUniform1ivARB MANGLE(Uniform1ivARB)
#define glUniform1iv MANGLE(Uniform1iv)
#define glUniform1uiEXT MANGLE(Uniform1uiEXT)
#define glUniform1ui MANGLE(Uniform1ui)
#define glUniform1uivEXT MANGLE(Uniform1uivEXT)
#define glUniform1uiv MANGLE(Uniform1uiv)
#define glUniform2fARB MANGLE(Uniform2fARB)
#define glUniform2f MANGLE(Uniform2f)
#define glUniform2fvARB MANGLE(Uniform2fvARB)
@@ -1219,7 +1488,9 @@
#define glUniform2ivARB MANGLE(Uniform2ivARB)
#define glUniform2iv MANGLE(Uniform2iv)
#define glUniform2uiEXT MANGLE(Uniform2uiEXT)
#define glUniform2ui MANGLE(Uniform2ui)
#define glUniform2uivEXT MANGLE(Uniform2uivEXT)
#define glUniform2uiv MANGLE(Uniform2uiv)
#define glUniform3fARB MANGLE(Uniform3fARB)
#define glUniform3f MANGLE(Uniform3f)
#define glUniform3fvARB MANGLE(Uniform3fvARB)
@@ -1229,7 +1500,9 @@
#define glUniform3ivARB MANGLE(Uniform3ivARB)
#define glUniform3iv MANGLE(Uniform3iv)
#define glUniform3uiEXT MANGLE(Uniform3uiEXT)
#define glUniform3ui MANGLE(Uniform3ui)
#define glUniform3uivEXT MANGLE(Uniform3uivEXT)
#define glUniform3uiv MANGLE(Uniform3uiv)
#define glUniform4fARB MANGLE(Uniform4fARB)
#define glUniform4f MANGLE(Uniform4f)
#define glUniform4fvARB MANGLE(Uniform4fvARB)
@@ -1239,7 +1512,9 @@
#define glUniform4ivARB MANGLE(Uniform4ivARB)
#define glUniform4iv MANGLE(Uniform4iv)
#define glUniform4uiEXT MANGLE(Uniform4uiEXT)
#define glUniform4ui MANGLE(Uniform4ui)
#define glUniform4uivEXT MANGLE(Uniform4uivEXT)
#define glUniform4uiv MANGLE(Uniform4uiv)
#define glUniformBufferEXT MANGLE(UniformBufferEXT)
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
@@ -1256,6 +1531,7 @@
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
#define glUnmapBuffer MANGLE(UnmapBuffer)
#define glUnmapNamedBufferEXT MANGLE(UnmapNamedBufferEXT)
#define glUnmapObjectBufferATI MANGLE(UnmapObjectBufferATI)
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
#define glUseProgram MANGLE(UseProgram)
@@ -1412,27 +1688,49 @@
#define glVertexAttrib4usvARB MANGLE(VertexAttrib4usvARB)
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
#define glVertexAttribDivisor MANGLE(VertexAttribDivisor)
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT)
#define glVertexAttribI1iv MANGLE(VertexAttribI1iv)
#define glVertexAttribI1uiEXT MANGLE(VertexAttribI1uiEXT)
#define glVertexAttribI1ui MANGLE(VertexAttribI1ui)
#define glVertexAttribI1uivEXT MANGLE(VertexAttribI1uivEXT)
#define glVertexAttribI1uiv MANGLE(VertexAttribI1uiv)
#define glVertexAttribI2iEXT MANGLE(VertexAttribI2iEXT)
#define glVertexAttribI2i MANGLE(VertexAttribI2i)
#define glVertexAttribI2ivEXT MANGLE(VertexAttribI2ivEXT)
#define glVertexAttribI2iv MANGLE(VertexAttribI2iv)
#define glVertexAttribI2uiEXT MANGLE(VertexAttribI2uiEXT)
#define glVertexAttribI2ui MANGLE(VertexAttribI2ui)
#define glVertexAttribI2uivEXT MANGLE(VertexAttribI2uivEXT)
#define glVertexAttribI2uiv MANGLE(VertexAttribI2uiv)
#define glVertexAttribI3iEXT MANGLE(VertexAttribI3iEXT)
#define glVertexAttribI3i MANGLE(VertexAttribI3i)
#define glVertexAttribI3ivEXT MANGLE(VertexAttribI3ivEXT)
#define glVertexAttribI3iv MANGLE(VertexAttribI3iv)
#define glVertexAttribI3uiEXT MANGLE(VertexAttribI3uiEXT)
#define glVertexAttribI3ui MANGLE(VertexAttribI3ui)
#define glVertexAttribI3uivEXT MANGLE(VertexAttribI3uivEXT)
#define glVertexAttribI3uiv MANGLE(VertexAttribI3uiv)
#define glVertexAttribI4bvEXT MANGLE(VertexAttribI4bvEXT)
#define glVertexAttribI4bv MANGLE(VertexAttribI4bv)
#define glVertexAttribI4iEXT MANGLE(VertexAttribI4iEXT)
#define glVertexAttribI4i MANGLE(VertexAttribI4i)
#define glVertexAttribI4ivEXT MANGLE(VertexAttribI4ivEXT)
#define glVertexAttribI4iv MANGLE(VertexAttribI4iv)
#define glVertexAttribI4svEXT MANGLE(VertexAttribI4svEXT)
#define glVertexAttribI4sv MANGLE(VertexAttribI4sv)
#define glVertexAttribI4ubvEXT MANGLE(VertexAttribI4ubvEXT)
#define glVertexAttribI4ubv MANGLE(VertexAttribI4ubv)
#define glVertexAttribI4uiEXT MANGLE(VertexAttribI4uiEXT)
#define glVertexAttribI4ui MANGLE(VertexAttribI4ui)
#define glVertexAttribI4uivEXT MANGLE(VertexAttribI4uivEXT)
#define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv)
#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT)
#define glVertexAttribI4usv MANGLE(VertexAttribI4usv)
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
#define glVertexAttribPointer MANGLE(VertexAttribPointer)
#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)

File diff suppressed because it is too large Load Diff

View File

@@ -1,31 +1,32 @@
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
*/
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
* Copyright (C) 1991-2000 Silicon Graphics, Inc. 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, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice including the dates of first publication and
* either this permission notice or a reference to
* http://oss.sgi.com/projects/FreeB/
* shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SILICON GRAPHICS, INC. 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.
*
* Except as contained in this notice, the name of Silicon Graphics, Inc.
* shall not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization from
* Silicon Graphics, Inc.
*/
#ifndef __glu_h__
#define __glu_h__
@@ -37,8 +38,12 @@
#include <GL/gl.h>
#ifndef GLAPIENTRY
#if defined(_MSC_VER) || defined(__MINGW32__)
#define GLAPIENTRY __stdcall
#else
#define GLAPIENTRY
#endif
#endif
#ifndef GLAPIENTRYP
#define GLAPIENTRYP GLAPIENTRY *

View File

@@ -290,17 +290,25 @@ extern void glXSelectEvent( Display *dpy, GLXDrawable drawable,
extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
unsigned long *mask );
/* GLX 1.4 and later */
extern void (*glXGetProcAddress(const GLubyte *procname))( void );
#ifndef GLX_GLXEXT_LEGACY
#include <GL/glxext.h>
#else
/* GLX 1.3 function pointer typedefs */
typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
typedef int (* PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
typedef GLXWindow (* PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
typedef void (* PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
typedef GLXPixmap (* PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
typedef void (* PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
typedef GLXPbuffer (* PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
typedef void (* PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
typedef void (* PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
typedef GLXContext (* PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
typedef Bool (* PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
typedef GLXDrawable (* PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (void);
typedef int (* PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
typedef void (* PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
typedef void (* PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
/*
@@ -316,6 +324,17 @@ extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
/* GLX 1.4 and later */
extern void (*glXGetProcAddress(const GLubyte *procname))( void );
/* GLX 1.4 function pointer typedefs */
typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
#ifndef GLX_GLXEXT_LEGACY
#include <GL/glxext.h>
#endif /* GLX_GLXEXT_LEGACY */

View File

@@ -46,9 +46,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
/* glxext.h last updated 2008/08/10 */
/* glxext.h last updated 2008/10/22 */
/* Current version at http://www.opengl.org/registry/ */
#define GLX_GLXEXT_VERSION 20
#define GLX_GLXEXT_VERSION 21
#ifndef GLX_VERSION_1_3
#define GLX_WINDOW_BIT 0x00000001
@@ -127,6 +127,14 @@ extern "C" {
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
#endif
#ifndef GLX_ARB_create_context
#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
#define GLX_CONTEXT_FLAGS_ARB 0x2094
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SAMPLE_BUFFERS_SGIS 100000
#define GLX_SAMPLES_SGIS 100001
@@ -347,20 +355,20 @@ extern "C" {
#endif
#ifndef GLX_NV_present_video
#define GLX_GLX_NUM_VIDEO_SLOTS_NV 0x20F0
#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
#endif
#ifndef GLX_NV_video_out
#define GLX_GLX_VIDEO_OUT_COLOR_NV 0x20C3
#define GLX_GLX_VIDEO_OUT_ALPHA_NV 0x20C4
#define GLX_GLX_VIDEO_OUT_DEPTH_NV 0x20C5
#define GLX_GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
#define GLX_GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
#define GLX_GLX_VIDEO_OUT_FRAME_NV 0x20C8
#define GLX_GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
#define GLX_GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
#define GLX_GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
#define GLX_GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
#define GLX_VIDEO_OUT_FRAME_NV 0x20C8
#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
#endif
#ifndef GLX_NV_swap_group
@@ -502,6 +510,14 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
#define GLX_ARB_fbconfig_float 1
#endif
#ifndef GLX_ARB_create_context
#define GLX_ARB_create_context 1
#ifdef GLX_GLXEXT_PROTOTYPES
extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *);
#endif /* GLX_GLXEXT_PROTOTYPES */
typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
#endif
#ifndef GLX_SGIS_multisample
#define GLX_SGIS_multisample 1
#endif

View File

@@ -40,8 +40,8 @@
#ifndef DRI_INTERFACE_H
#define DRI_INTERFACE_H
/* Make this something other than __APPLE__ for other arcs with no drm.h */
#ifndef __APPLE__
/* For archs with no drm.h */
#if !defined(__APPLE__) && !defined(__CYGWIN__)
#include <drm.h>
#else
typedef unsigned int drm_context_t;
@@ -75,6 +75,10 @@ typedef struct __DRItexOffsetExtensionRec __DRItexOffsetExtension;
typedef struct __DRItexBufferExtensionRec __DRItexBufferExtension;
typedef struct __DRIlegacyExtensionRec __DRIlegacyExtension;
typedef struct __DRIswrastExtensionRec __DRIswrastExtension;
typedef struct __DRIbufferRec __DRIbuffer;
typedef struct __DRIdri2ExtensionRec __DRIdri2Extension;
typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension;
/*@}*/
@@ -343,29 +347,6 @@ struct __DRIdamageExtensionRec {
void *loaderPrivate);
};
/**
* DRI2 Loader extension. This extension describes the basic
* functionality the loader needs to provide for the DRI driver.
*/
#define __DRI_LOADER "DRI_Loader"
#define __DRI_LOADER_VERSION 1
struct __DRIloaderExtensionRec {
__DRIextension base;
/**
* Ping the windowing system to get it to reemit info for the
* specified drawable in the DRI2 event buffer.
*
* \param draw the drawable for which to request info
* \param tail the new event buffer tail pointer
*/
void (*reemitDrawableInfo)(__DRIdrawable *draw, unsigned int *tail,
void *loaderPrivate);
void (*postDamage)(__DRIdrawable *draw, struct drm_clip_rect *rects,
int num_rects, void *loaderPrivate);
};
#define __DRI_SWRAST_IMAGE_OP_DRAW 1
#define __DRI_SWRAST_IMAGE_OP_CLEAR 2
#define __DRI_SWRAST_IMAGE_OP_SWAP 3
@@ -633,4 +614,75 @@ struct __DRIswrastExtensionRec {
void *loaderPrivate);
};
/**
* DRI2 Loader extension.
*/
#define __DRI_BUFFER_FRONT_LEFT 0
#define __DRI_BUFFER_BACK_LEFT 1
#define __DRI_BUFFER_FRONT_RIGHT 2
#define __DRI_BUFFER_BACK_RIGHT 3
#define __DRI_BUFFER_DEPTH 4
#define __DRI_BUFFER_STENCIL 5
#define __DRI_BUFFER_ACCUM 6
#define __DRI_BUFFER_FAKE_FRONT_LEFT 7
#define __DRI_BUFFER_FAKE_FRONT_RIGHT 8
struct __DRIbufferRec {
unsigned int attachment;
unsigned int name;
unsigned int pitch;
unsigned int cpp;
unsigned int flags;
};
#define __DRI_DRI2_LOADER "DRI_DRI2Loader"
#define __DRI_DRI2_LOADER_VERSION 2
struct __DRIdri2LoaderExtensionRec {
__DRIextension base;
__DRIbuffer *(*getBuffers)(__DRIdrawable *driDrawable,
int *width, int *height,
unsigned int *attachments, int count,
int *out_count, void *loaderPrivate);
/**
* Flush pending front-buffer rendering
*
* Any rendering that has been performed to the
* \c __DRI_BUFFER_FAKE_FRONT_LEFT will be flushed to the
* \c __DRI_BUFFER_FRONT_LEFT.
*
* \param driDrawable Drawable whose front-buffer is to be flushed
* \param loaderPrivate Loader's private data that was previously passed
* into __DRIdri2ExtensionRec::createNewDrawable
*/
void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate);
};
/**
* This extension provides alternative screen, drawable and context
* constructors for DRI2.
*/
#define __DRI_DRI2 "DRI_DRI2"
#define __DRI_DRI2_VERSION 1
struct __DRIdri2ExtensionRec {
__DRIextension base;
__DRIscreen *(*createNewScreen)(int screen, int fd,
const __DRIextension **extensions,
const __DRIconfig ***driver_configs,
void *loaderPrivate);
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
const __DRIconfig *config,
void *loaderPrivate);
__DRIcontext *(*createNewContext)(__DRIscreen *screen,
const __DRIconfig *config,
__DRIcontext *shared,
void *loaderPrivate);
};
#endif

View File

@@ -1,134 +0,0 @@
/*
* Copyright 2007 Red Hat, Inc
* 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
* on 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
* THE COPYRIGHT HOLDERS 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.
*/
#ifndef DRI_SAREA_H
#define DRI_SAREA_H
#include <drm.h>
/* The DRI2 SAREA holds a list of self-describing blocks. Each block
* is 8 byte aligned and has a common 32-bit header word. The upper
* 16 bits describe the type of the block and the lower 16 bits the
* size. DRI2 only defines a couple of blocks and allows drivers to
* define driver specific blocks using type codes from 0x8000 and up.
* The type code 0x0000 defines the end of the sarea. */
#define DRI2_SAREA_BLOCK_HEADER(type, size) (((type) << 16) | (size))
#define DRI2_SAREA_BLOCK_TYPE(b) ((b) >> 16)
#define DRI2_SAREA_BLOCK_SIZE(b) ((b) & 0xffff)
#define DRI2_SAREA_BLOCK_NEXT(p) \
((void *) ((unsigned char *) (p) + \
DRI2_SAREA_BLOCK_SIZE(*(unsigned int *) p)))
#define DRI2_SAREA_BLOCK_END 0x0000
#define DRI2_SAREA_BLOCK_LOCK 0x0001
#define DRI2_SAREA_BLOCK_EVENT_BUFFER 0x0002
/* Chipset specific blocks start at 0x8000, 0xffff is reserved. */
typedef struct __DRILock __DRILock;
typedef struct __DRIEventBuffer __DRIEventBuffer;
typedef struct __DRIDrawableBuffer __DRIDrawableBuffer;
typedef struct __DRIDrawableConfigEvent __DRIDrawableConfigEvent;
typedef struct __DRIBufferAttachEvent __DRIBufferAttachEvent;
struct __DRILock {
unsigned int block_header;
drm_hw_lock_t lock;
/* We use this with DRM_CAS to allocate lock IDs for the real lock.*/
unsigned int next_id;
};
struct __DRIEventBuffer {
unsigned int block_header;
unsigned int head; /* last valid event */
unsigned int prealloc; /* event currently being written */
unsigned int size; /* size of data */
unsigned char data[0];
};
enum {
/* the four standard color buffers */
DRI_DRAWABLE_BUFFER_FRONT_LEFT = 0,
DRI_DRAWABLE_BUFFER_BACK_LEFT = 1,
DRI_DRAWABLE_BUFFER_FRONT_RIGHT = 2,
DRI_DRAWABLE_BUFFER_BACK_RIGHT = 3,
/* optional aux buffer */
DRI_DRAWABLE_BUFFER_AUX0 = 4,
DRI_DRAWABLE_BUFFER_AUX1 = 5,
DRI_DRAWABLE_BUFFER_AUX2 = 6,
DRI_DRAWABLE_BUFFER_AUX3 = 7,
DRI_DRAWABLE_BUFFER_DEPTH = 8,
DRI_DRAWABLE_BUFFER_STENCIL = 9,
DRI_DRAWABLE_BUFFER_ACCUM = 10,
/* generic renderbuffers */
DRI_DRAWABLE_BUFFER_COLOR0 = 11,
DRI_DRAWABLE_BUFFER_COLOR1 = 12,
DRI_DRAWABLE_BUFFER_COLOR2 = 13,
DRI_DRAWABLE_BUFFER_COLOR3 = 14,
DRI_DRAWABLE_BUFFER_COLOR4 = 15,
DRI_DRAWABLE_BUFFER_COLOR5 = 16,
DRI_DRAWABLE_BUFFER_COLOR6 = 17,
DRI_DRAWABLE_BUFFER_COLOR7 = 18,
DRI_DRAWABLE_BUFFER_COUNT = 19
};
struct __DRIDrawableBuffer {
unsigned int attachment;
unsigned int handle;
unsigned int pitch;
unsigned short cpp;
/* Upper 8 bits are driver specific, lower 8 bits generic. The
* bits can inidicate buffer properties such as tiled, swizzled etc. */
unsigned short flags;
};
#define DRI2_EVENT_HEADER(type, size) (((type) << 16) | (size))
#define DRI2_EVENT_TYPE(b) ((b) >> 16)
#define DRI2_EVENT_SIZE(b) ((b) & 0xffff)
#define DRI2_EVENT_PAD 0x0000
#define DRI2_EVENT_DRAWABLE_CONFIG 0x0001
#define DRI2_EVENT_BUFFER_ATTACH 0x0002
struct __DRIDrawableConfigEvent {
unsigned int event_header;
unsigned int drawable;
short x;
short y;
unsigned int width;
unsigned int height;
unsigned int num_rects;
struct drm_clip_rect rects[0];
};
struct __DRIBufferAttachEvent {
unsigned int event_header;
unsigned int drawable;
__DRIDrawableBuffer buffer;
};
#endif /* DRI_SAREA_H */

View File

@@ -2,39 +2,34 @@
#define __gl_core_h_
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
*/
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
* Copyright (C) 1991-2000 Silicon Graphics, Inc. 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, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice including the dates of first publication and
* either this permission notice or a reference to
* http://oss.sgi.com/projects/FreeB/
* shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SILICON GRAPHICS, INC. 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.
*
* Except as contained in this notice, the name of Silicon Graphics, Inc.
* shall not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization from
* Silicon Graphics, Inc.
*/
#include <sys/types.h>

View File

@@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */
/**
* \file sarea.h
* SAREA definitions.
@@ -34,7 +33,6 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/GL/dri/sarea.h,v 1.11 2002/10/30 12:52:03 alanh Exp $ */
#ifndef _SAREA_H_
#define _SAREA_H_

View File

@@ -1,45 +0,0 @@
/* uglglutshapes.h - Public header GLUT Shapes */
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
/* This program is freely distributable without licensing fees and is
provided without guarantee or warrantee expressed or implied. This
program is -not- in the public domain. */
#ifndef GLUTSHAPES_H
#define GLUTSHAPES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <GL/gl.h>
void glutWireSphere (GLdouble radius, GLint slices, GLint stacks);
void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks);
void glutWireCone (GLdouble base, GLdouble height,
GLint slices, GLint stacks);
void glutSolidCone (GLdouble base, GLdouble height,
GLint slices, GLint stacks);
void glutWireCube (GLdouble size);
void glutSolidCube (GLdouble size);
void glutWireTorus (GLdouble innerRadius, GLdouble outerRadius,
GLint sides, GLint rings);
void glutSolidTorus (GLdouble innerRadius, GLdouble outerRadius,
GLint sides, GLint rings);
void glutWireDodecahedron (void);
void glutSolidDodecahedron (void);
void glutWireOctahedron (void);
void glutSolidOctahedron (void);
void glutWireTetrahedron (void);
void glutSolidTetrahedron (void);
void glutWireIcosahedron (void);
void glutSolidIcosahedron (void);
void glutWireTeapot (GLdouble size);
void glutSolidTeapot (GLdouble size);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,155 +0,0 @@
/* uglmesa.h - Public header UGL/Mesa */
/* Copyright (C) 2001 by Wind River Systems, Inc */
/*
* Mesa 3-D graphics library
* Version: 4.0
*
* The MIT License
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT 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.
*/
/*
* Author:
* Stephane Raimbault <stephane.raimbault@windriver.com>
*/
#ifndef UGLMESA_H
#define UGLMESA_H
#ifdef __cplusplus
extern "C" {
#endif
#define UGL_MESA_MAJOR_VERSION 4
#define UGL_MESA_MINOR_VERSION 0
#include <GL/gl.h>
#include <ugl/ugl.h>
/*
* Values for display mode of uglMesaCreateContext ()
*/
/*
* With these mask values, it's possible to test double buffer mode
* with UGL_MESA_DOUBLE mask
*
* SINGLE 0000 0001
* DOUBLE 0000 0110
* - SOFT 0000 0010
* - HARD 0000 0100
* WINDML 0001 0000
*
*
*/
#define UGL_MESA_SINGLE 0x01
#define UGL_MESA_DOUBLE 0x06
#define UGL_MESA_DOUBLE_SOFTWARE 0x02
#define UGL_MESA_DOUBLE_HARDWARE 0x04
#define UGL_MESA_WINDML_EXCLUSIVE 0x10
#define UGL_MESA_FULLSCREEN_WIDTH 0x0
#define UGL_MESA_FULLSCREEN_HEIGHT 0x0
/*
* uglMesaPixelStore() parameters:
*/
#define UGL_MESA_ROW_LENGTH 0x20
#define UGL_MESA_Y_UP 0x21
/*
* Accepted by uglMesaGetIntegerv:
*/
#define UGL_MESA_LEFT_X 0x01
#define UGL_MESA_TOP_Y 0x02
#define UGL_MESA_WIDTH 0x03
#define UGL_MESA_HEIGHT 0x04
#define UGL_MESA_DISPLAY_WIDTH 0x05
#define UGL_MESA_DISPLAY_HEIGHT 0x06
#define UGL_MESA_COLOR_FORMAT 0x07
#define UGL_MESA_COLOR_MODEL 0x08
#define UGL_MESA_PIXEL_FORMAT 0x09
#define UGL_MESA_TYPE 0x0A
#define UGL_MESA_RGB 0x0B
#define UGL_MESA_COLOR_INDEXED 0x0C
#define UGL_MESA_SINGLE_BUFFER 0x0D
#define UGL_MESA_DOUBLE_BUFFER 0x0E
#define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F
#define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10
/*
* typedefs
*/
typedef struct uglMesaContext * UGL_MESA_CONTEXT;
UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode,
UGL_MESA_CONTEXT share_list);
UGL_MESA_CONTEXT uglMesaCreateNewContextExt (GLenum mode,
GLint depth_bits,
GLint stencil_bits,
GLint accum_red_bits,
GLint accum_green_bits,
GLint accum_blue_bits,
GLint accum_alpha_bits,
UGL_MESA_CONTEXT share_list);
GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc,
GLsizei left, GLsizei top,
GLsizei width, GLsizei height);
GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy);
GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top);
GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh);
GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height);
void uglMesaDestroyContext (void);
UGL_MESA_CONTEXT uglMesaGetCurrentContext (void);
void uglMesaSwapBuffers (void);
void uglMesaPixelStore (GLint pname, GLint value);
void uglMesaGetIntegerv (GLint pname, GLint *value);
GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height,
GLint *bytesPerValue, void **buffer);
GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height,
GLint *format, void **buffer);
GLboolean uglMesaSetColor (GLubyte index, GLfloat red,
GLfloat green, GLfloat blue);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -2,38 +2,34 @@
#define _EGL_H
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.0 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
*/
* SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
* Copyright (C) 1991-2000 Silicon Graphics, Inc. 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, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice including the dates of first publication and
* either this permission notice or a reference to
* http://oss.sgi.com/projects/FreeB/
* shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* SILICON GRAPHICS, INC. 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.
*
* Except as contained in this notice, the name of Silicon Graphics, Inc.
* shall not be used in advertising or otherwise to promote the sale, use or
* other dealings in this Software without prior written authorization from
* Silicon Graphics, Inc.
*/
#if 0/*XXX TEMPORARY HACK*/
#include <GLES/gl.h>

View File

@@ -13,20 +13,20 @@
/*
** These opaque EGL types are implemented as unsigned 32-bit integers:
*/
typedef u_int32_t EGLDisplay;
typedef u_int32_t EGLConfig;
typedef u_int32_t EGLSurface;
typedef u_int32_t EGLContext;
typedef uint32_t EGLDisplay;
typedef uint32_t EGLConfig;
typedef uint32_t EGLSurface;
typedef uint32_t EGLContext;
/* EGL_MESA_screen_surface */
typedef u_int32_t EGLModeMESA;
typedef u_int32_t EGLScreenMESA;
typedef uint32_t EGLModeMESA;
typedef uint32_t EGLScreenMESA;
/*
** Other basic EGL types:
*/
typedef u_int8_t EGLBoolean;
typedef uint8_t EGLBoolean;
typedef int32_t EGLint;
typedef void * NativeDisplayType;

View File

@@ -1,192 +0,0 @@
/*******************************************************************************
/
/ File: GLView.h
/
/ Copyright 1993-98, Be Incorporated, All Rights Reserved.
/
*******************************************************************************/
#ifndef BGLVIEW_H
#define BGLVIEW_H
#include <GL/gl.h>
#define BGL_RGB 0
#define BGL_INDEX 1
#define BGL_SINGLE 0
#define BGL_DOUBLE 2
#define BGL_DIRECT 0
#define BGL_INDIRECT 4
#define BGL_ACCUM 8
#define BGL_ALPHA 16
#define BGL_DEPTH 32
#define BGL_OVERLAY 64
#define BGL_UNDERLAY 128
#define BGL_STENCIL 512
#ifdef __cplusplus
#include <AppKit.h>
#include <interface/Window.h>
#include <interface/View.h>
#include <interface/Bitmap.h>
#include <game/WindowScreen.h>
#include <game/DirectWindow.h>
class BGLView : public BView {
public:
BGLView(BRect rect, char *name,
ulong resizingMode, ulong mode,
ulong options);
virtual ~BGLView();
void LockGL();
void UnlockGL();
void SwapBuffers();
void SwapBuffers( bool vSync );
BView * EmbeddedView();
status_t CopyPixelsOut(BPoint source, BBitmap *dest);
status_t CopyPixelsIn(BBitmap *source, BPoint dest);
virtual void ErrorCallback(unsigned long errorCode); // Mesa's GLenum is uint where Be's ones was ulong!
virtual void Draw(BRect updateRect);
virtual void AttachedToWindow();
virtual void AllAttached();
virtual void DetachedFromWindow();
virtual void AllDetached();
virtual void FrameResized(float width, float height);
virtual status_t Perform(perform_code d, void *arg);
/* The public methods below, for the moment,
are just pass-throughs to BView */
virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void MessageReceived(BMessage *msg);
virtual void SetResizingMode(uint32 mode);
virtual void Show();
virtual void Hide();
virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index,
BMessage *specifier, int32 form,
const char *property);
virtual status_t GetSupportedSuites(BMessage *data);
/* New public functions */
void DirectConnected( direct_buffer_info *info );
void EnableDirectMode( bool enabled );
void * getGC() { return m_gc; }
private:
virtual void _ReservedGLView1();
virtual void _ReservedGLView2();
virtual void _ReservedGLView3();
virtual void _ReservedGLView4();
virtual void _ReservedGLView5();
virtual void _ReservedGLView6();
virtual void _ReservedGLView7();
virtual void _ReservedGLView8();
BGLView(const BGLView &);
BGLView &operator=(const BGLView &);
void dither_front();
bool confirm_dither();
void draw(BRect r);
void * m_gc;
uint32 m_options;
uint32 m_ditherCount;
BLocker m_drawLock;
BLocker m_displayLock;
void * m_clip_info;
void * _Unused1;
BBitmap * m_ditherMap;
BRect m_bounds;
int16 * m_errorBuffer[2];
uint64 _reserved[8];
/* Direct Window stuff */
private:
void drawScanline( int x1, int x2, int y, void *data );
static void scanlineHandler(struct rasStateRec *state, GLint x1, GLint x2);
void lock_draw();
void unlock_draw();
bool validateView();
};
class BGLScreen : public BWindowScreen {
public:
BGLScreen(char *name,
ulong screenMode, ulong options,
status_t *error, bool debug=false);
~BGLScreen();
void LockGL();
void UnlockGL();
void SwapBuffers();
virtual void ErrorCallback(GLenum errorCode);
virtual void ScreenConnected(bool connected);
virtual void FrameResized(float width, float height);
virtual status_t Perform(perform_code d, void *arg);
/* The public methods below, for the moment,
are just pass-throughs to BWindowScreen */
virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual void MessageReceived(BMessage *msg);
virtual void Show();
virtual void Hide();
virtual BHandler *ResolveSpecifier(BMessage *msg,
int32 index,
BMessage *specifier,
int32 form,
const char *property);
virtual status_t GetSupportedSuites(BMessage *data);
private:
virtual void _ReservedGLScreen1();
virtual void _ReservedGLScreen2();
virtual void _ReservedGLScreen3();
virtual void _ReservedGLScreen4();
virtual void _ReservedGLScreen5();
virtual void _ReservedGLScreen6();
virtual void _ReservedGLScreen7();
virtual void _ReservedGLScreen8();
BGLScreen(const BGLScreen &);
BGLScreen &operator=(const BGLScreen &);
void * m_gc;
long m_options;
BLocker m_drawLock;
int32 m_colorSpace;
uint32 m_screen_mode;
uint64 _reserved[7];
};
#endif // __cplusplus
#endif // BGLVIEW_H

View File

@@ -1,4 +1,3 @@
// $Id: demo.cpp,v 1.2 2004/08/14 09:59:16 phoudoin Exp $
// Simple BeOS GLView demo
// Written by Brian Paul

View File

@@ -37,7 +37,7 @@
static GLboolean Anim = GL_TRUE;
static GLfloat Xpos = 0;
static GLuint OccQuery;
static GLint Win = 0;
static void
@@ -204,6 +204,7 @@ static void Key( unsigned char key, int x, int y )
(void) y;
switch (key) {
case 27:
glutDestroyWindow(Win);
exit(0);
break;
case ' ':
@@ -271,7 +272,7 @@ int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
Win = glutCreateWindow(argv[0]);
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );

View File

@@ -154,6 +154,7 @@ static GLuint TexObj;
static GLuint MyFB;
static GLuint DepthRB;
static GLboolean WireFrame = GL_FALSE;
static GLboolean Anim = GL_TRUE;
static GLint texType = 0;
static GLint T0 = 0;
@@ -163,6 +164,11 @@ static GLint Win = 0;
static GLfloat ViewRotX = 20.0, ViewRotY = 30.0, ViewRotZ = 0.0;
static GLfloat CubeRot = 0.0;
static void
idle(void);
static void
CheckError(int line)
{
@@ -561,7 +567,7 @@ drawfire(void)
printstring(GLUT_BITMAP_HELVETICA_18, texNames[texType]);
glColor3f(1.0, 0.0, 0.0);
glRasterPos2i(10, 470);
printstring(GLUT_BITMAP_HELVETICA_10,
printstring(GLUT_BITMAP_HELVETICA_10,
"Fire V1.5 Written by David Bucciarelli (tech.hmw@plus.it)");
if (help)
@@ -605,7 +611,10 @@ key(unsigned char key, int x, int y)
cleanup();
exit(0);
break;
case ' ':
Anim = !Anim;
glutIdleFunc(Anim ? idle : NULL);
break;
case 'a':
v += 0.0005;
break;
@@ -1013,7 +1022,7 @@ static void
visible(int vis)
{
if (vis == GLUT_VISIBLE)
glutIdleFunc(idle);
glutIdleFunc(Anim ? idle : NULL);
else
glutIdleFunc(NULL);
}

View File

@@ -114,7 +114,7 @@ static void calcposobs(void)
rainParticle::setRainingArea(obs[0]-7.0f,-0.2f,obs[2]-7.0f,obs[0]+7.0f,8.0f,obs[2]+7.0f);
}
static void printstring(void *font, char *string)
static void printstring(void *font, const char *string)
{
int len,i;

View File

@@ -1,4 +1,3 @@
/* $Id: gears.c,v 1.3 1999/08/22 08:56:50 jtaylor Exp $ */
/*
* 3-D gear wheels. This program is in the public domain.

View File

@@ -4,6 +4,7 @@ bump
deriv
extfuncs.h
mandelbrot
multinoise
multitex
noise
points

View File

@@ -15,15 +15,21 @@ PROGS = \
bump \
convolutions \
deriv \
fragcoord \
mandelbrot \
multinoise \
multitex \
noise \
points \
pointcoord \
samplers \
skinning \
texdemo1 \
toyball \
twoside \
trirast
trirast \
vert-or-frag-only \
vert-tex
##### RULES #####
@@ -105,6 +111,13 @@ deriv: deriv.o shaderutil.o
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) deriv.o shaderutil.o $(LIBS) -o $@
fragcoord.o: fragcoord.c extfuncs.h shaderutil.h
$(CC) -c -I$(INCDIR) $(CFLAGS) fragcoord.c
fragcoord: fragcoord.o shaderutil.o
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) fragcoord.o shaderutil.o $(LIBS) -o $@
mandelbrot.o: mandelbrot.c extfuncs.h shaderutil.h
$(CC) -c -I$(INCDIR) $(CFLAGS) mandelbrot.c
@@ -140,6 +153,20 @@ pointcoord: pointcoord.o readtex.o shaderutil.o
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) pointcoord.o readtex.o shaderutil.o $(LIBS) -o $@
samplers.o: samplers.c readtex.h extfuncs.h shaderutil.h
$(CC) -c -I$(INCDIR) $(CFLAGS) samplers.c
samplers: samplers.o readtex.o shaderutil.o
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) samplers.o readtex.o shaderutil.o $(LIBS) -o $@
skinning.o: skinning.c readtex.h extfuncs.h shaderutil.h
$(CC) -c -I$(INCDIR) $(CFLAGS) skinning.c
skinning: skinning.o readtex.o shaderutil.o
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) skinning.o readtex.o shaderutil.o $(LIBS) -o $@
texdemo1.o: texdemo1.c readtex.h extfuncs.h shaderutil.h
$(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
@@ -168,6 +195,20 @@ trirast: trirast.o shaderutil.o
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) trirast.o shaderutil.o $(LIBS) -o $@
vert-or-frag-only.o: vert-or-frag-only.c extfuncs.h shaderutil.h
$(CC) -c -I$(INCDIR) $(CFLAGS) vert-or-frag-only.c
vert-or-frag-only: vert-or-frag-only.o shaderutil.o
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) vert-or-frag-only.o shaderutil.o $(LIBS) -o $@
vert-tex.o: vert-tex.c extfuncs.h shaderutil.h
$(CC) -c -I$(INCDIR) $(CFLAGS) vert-tex.c
vert-tex: vert-tex.o shaderutil.o
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) vert-tex.o shaderutil.o $(LIBS) -o $@

View File

@@ -141,9 +141,6 @@ Redisplay(void)
glPopMatrix();
glFinish();
glFlush();
CheckError(__LINE__);
glutSwapBuffers();

View File

@@ -438,8 +438,6 @@ static void draw()
glPopMatrix();
glFlush();
glutSwapBuffers();
}

185
progs/glsl/fragcoord.c Normal file
View File

@@ -0,0 +1,185 @@
/**
* Test GLSL gl_FragCoord fragment program attribute.
* Color the quad's fragments according to their window position.
*
* Brian Paul
* 20 Nov 2008
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include "extfuncs.h"
#include "shaderutil.h"
static GLint WinWidth = 200, WinHeight = 200;
static char *FragProgFile = NULL;
static char *VertProgFile = NULL;
static GLuint fragShader;
static GLuint vertShader;
static GLuint program;
static GLint win = 0;
static GLboolean Anim = GL_TRUE;
static GLfloat PosX = 0.0, PosY = 0.0;
static void
Idle(void)
{
float r = (WinWidth < WinHeight) ? WinWidth : WinHeight;
float a = glutGet(GLUT_ELAPSED_TIME) * 0.001;
r *= 0.25;
PosX = WinWidth / 2 + r * cos(a);
PosY = WinHeight / 2 + r * sin(a);
glutPostRedisplay();
}
static void
Redisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glPushMatrix();
glTranslatef(PosX, PosY, 0.0);
#if 0
glBegin(GL_POLYGON);
glVertex2f(-50, -50);
glVertex2f( 50, -50);
glVertex2f( 50, 50);
glVertex2f(-50, 50);
glEnd();
#else
glutSolidSphere(50, 20, 10);
#endif
glPopMatrix();
glutSwapBuffers();
}
static void
Reshape(int width, int height)
{
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, width, 0, height, -55, 55);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
WinWidth = width;
WinHeight = height;
}
static void
CleanUp(void)
{
glDeleteShader_func(fragShader);
glDeleteShader_func(vertShader);
glDeleteProgram_func(program);
glutDestroyWindow(win);
}
static void
Key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch(key) {
case ' ':
case 'a':
Anim = !Anim;
glutIdleFunc(Anim ? Idle : NULL);
break;
case 27:
CleanUp();
exit(0);
break;
}
glutPostRedisplay();
}
static void
Init(void)
{
static const char *fragShaderText =
"void main() { \n"
" vec4 scale = vec4(.005, 0.005, 0.5, 1.0);\n"
" gl_FragColor = gl_FragCoord * scale; \n"
"}\n";
static const char *vertShaderText =
"void main() {\n"
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
"}\n";
if (!ShadersSupported())
exit(1);
GetExtensionFuncs();
vertShader = CompileShaderText(GL_VERTEX_SHADER, vertShaderText);
fragShader = CompileShaderText(GL_FRAGMENT_SHADER, fragShaderText);
program = LinkShaders(vertShader, fragShader);
glUseProgram_func(program);
/*assert(glGetError() == 0);*/
glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
assert(glIsProgram_func(program));
assert(glIsShader_func(fragShader));
assert(glIsShader_func(vertShader));
glColor3f(1, 0, 0);
}
static void
ParseOptions(int argc, char *argv[])
{
int i;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-fs") == 0) {
FragProgFile = argv[i+1];
}
else if (strcmp(argv[i], "-vs") == 0) {
VertProgFile = argv[i+1];
}
}
}
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowPosition( 0, 0);
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Redisplay);
ParseOptions(argc, argv);
Init();
glutIdleFunc(Anim ? Idle : NULL);
glutMainLoop();
return 0;
}

View File

@@ -74,8 +74,6 @@ Redisplay(void)
glPopMatrix();
glFinish();
glFlush();
glutSwapBuffers();
}

281
progs/glsl/multinoise.c Normal file
View File

@@ -0,0 +1,281 @@
/**
* Another test for noise() functions (noise1 to noise4 tested independently).
* 13 Dec 2008
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include "extfuncs.h"
static const char *VertShaderText =
"void main() {\n"
" gl_TexCoord[0].xyz = gl_Vertex.xyz;\n"
" gl_TexCoord[0].w = gl_MultiTexCoord1.x;\n"
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
"}\n";
static const char *FragShaderText[ 4 ] = {
"void main()\n"
"{\n"
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].w ) * 0.5 + 0.5;\n"
" gl_FragColor.a = 1;\n"
"}\n",
"void main()\n"
"{\n"
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xw ) * 0.5 + 0.5;\n"
" gl_FragColor.a = 1;\n"
"}\n",
"void main()\n"
"{\n"
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xyw ) * 0.5 + 0.5;\n"
" gl_FragColor.a = 1;\n"
"}\n",
"void main()\n"
"{\n"
" gl_FragColor.rgb = noise3( gl_TexCoord[ 0 ].xyzw ) * 0.5 + 0.5;\n"
" gl_FragColor.a = 1;\n"
"}\n"
};
struct uniform_info {
const char *name;
GLuint size;
GLint location;
GLfloat value[4];
};
/* program/shader objects */
static GLuint fragShader[ 4 ];
static GLuint vertShader;
static GLuint program[ 4 ];
static GLint win = 0;
static GLfloat xRot = 0.0f, yRot = 0.0f, zRot = 0.0f;
static GLfloat Slice = 0.0;
static GLboolean Anim = GL_FALSE;
static void
Idle(void)
{
Slice += 0.01;
glutPostRedisplay();
}
static void
Redisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMultiTexCoord1f( GL_TEXTURE1, Slice );
glPushMatrix();
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
glRotatef(zRot, 0.0f, 0.0f, 1.0f);
glutSolidTeapot( 1.0 );
glPopMatrix();
glutSwapBuffers();
}
static void
Reshape(int width, int height)
{
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -15.0f);
}
static void
CleanUp(void)
{
GLint i;
glDeleteShader_func(vertShader);
for( i = 0; i < 4; i++ ) {
glDeleteShader_func(fragShader[ i ]);
glDeleteProgram_func(program[ i ]);
}
glutDestroyWindow(win);
}
static void
Key(unsigned char key, int x, int y)
{
const GLfloat step = 0.01;
(void) x;
(void) y;
switch(key) {
case 'a':
Anim = !Anim;
glutIdleFunc(Anim ? Idle : NULL);
case 's':
Slice -= step;
break;
case 'S':
Slice += step;
break;
case 'z':
zRot -= 1.0;
break;
case 'Z':
zRot += 1.0;
break;
case '1':
case '2':
case '3':
case '4':
glUseProgram_func(program[ key - '1' ]);
break;
case 27:
CleanUp();
exit(0);
break;
}
glutPostRedisplay();
}
static void
SpecialKey(int key, int x, int y)
{
const GLfloat step = 3.0f;
(void) x;
(void) y;
switch(key) {
case GLUT_KEY_UP:
xRot -= step;
break;
case GLUT_KEY_DOWN:
xRot += step;
break;
case GLUT_KEY_LEFT:
yRot -= step;
break;
case GLUT_KEY_RIGHT:
yRot += step;
break;
}
glutPostRedisplay();
}
static void
LoadAndCompileShader(GLuint shader, const char *text)
{
GLint stat;
glShaderSource_func(shader, 1, (const GLchar **) &text, NULL);
glCompileShader_func(shader);
glGetShaderiv_func(shader, GL_COMPILE_STATUS, &stat);
if (!stat) {
GLchar log[1000];
GLsizei len;
glGetShaderInfoLog_func(shader, 1000, &len, log);
fprintf(stderr, "noise: problem compiling shader: %s\n", log);
exit(1);
}
else {
printf("Shader compiled OK\n");
}
}
static void
CheckLink(GLuint prog)
{
GLint stat;
glGetProgramiv_func(prog, GL_LINK_STATUS, &stat);
if (!stat) {
GLchar log[1000];
GLsizei len;
glGetProgramInfoLog_func(prog, 1000, &len, log);
fprintf(stderr, "Linker error:\n%s\n", log);
}
else {
fprintf(stderr, "Link success!\n");
}
}
static void
Init(void)
{
const char *version;
GLint i;
version = (const char *) glGetString(GL_VERSION);
if (version[0] != '2' || version[1] != '.') {
printf("Warning: this program expects OpenGL 2.0\n");
/*exit(1);*/
}
GetExtensionFuncs();
vertShader = glCreateShader_func(GL_VERTEX_SHADER);
LoadAndCompileShader(vertShader, VertShaderText);
for( i = 0; i < 4; i++ ) {
fragShader[ i ] = glCreateShader_func(GL_FRAGMENT_SHADER);
LoadAndCompileShader(fragShader[ i ], FragShaderText[ i ]);
program[ i ] = glCreateProgram_func();
glAttachShader_func(program[ i ], fragShader[ i ]);
glAttachShader_func(program[ i ], vertShader);
glLinkProgram_func(program[ i ]);
CheckLink(program[ i ]);
}
glUseProgram_func(program[ 0 ]);
assert(glGetError() == 0);
glClearColor(0.4f, 0.4f, 0.8f, 0.0f);
glColor3f(1, 0, 0);
glFrontFace( GL_CW );
glEnable( GL_CULL_FACE );
glEnable( GL_DEPTH_TEST );
}
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowPosition( 0, 0);
glutInitWindowSize(400, 400);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
glutDisplayFunc(Redisplay);
Init();
glutMainLoop();
return 0;
}

View File

@@ -47,9 +47,12 @@ static const char *TexFiles[2] =
static GLuint Program;
static GLfloat Xrot = -90.0, Yrot = .0, Zrot = 0.0;
static GLfloat Xrot = 0.0, Yrot = .0, Zrot = 0.0;
static GLfloat EyeDist = 10;
static GLboolean Anim = GL_TRUE;
static GLboolean UseArrays = GL_TRUE;
static GLint VertCoord_attr = -1, TexCoord0_attr = -1, TexCoord1_attr = -1;
/* value[0] = tex unit */
@@ -60,32 +63,62 @@ static struct uniform_info Uniforms[] = {
};
static const GLfloat Tex0Coords[4][2] = {
{ 0.0, 0.0 }, { 2.0, 0.0 }, { 2.0, 2.0 }, { 0.0, 2.0 }
};
static const GLfloat Tex1Coords[4][2] = {
{ 0.0, 0.0 }, { 1.0, 0.0 }, { 1.0, 1.0 }, { 0.0, 1.0 }
};
static const GLfloat VertCoords[4][2] = {
{ -3.0, -3.0 }, { 3.0, -3.0 }, { 3.0, 3.0 }, { -3.0, 3.0 }
};
static void
DrawPolygon(GLfloat size)
DrawPolygonArray(void)
{
glPushMatrix();
glRotatef(90, 1, 0, 0);
glNormal3f(0, 0, 1);
glBegin(GL_POLYGON);
if (VertCoord_attr >= 0) {
glVertexAttribPointer_func(VertCoord_attr, 2, GL_FLOAT, GL_FALSE,
0, VertCoords);
glEnableVertexAttribArray_func(VertCoord_attr);
}
else {
glVertexPointer(2, GL_FLOAT, 0, VertCoords);
glEnable(GL_VERTEX_ARRAY);
}
glMultiTexCoord2f(GL_TEXTURE0, 0, 0);
glMultiTexCoord2f(GL_TEXTURE1, 0, 0);
glVertex2f(-size, -size);
glVertexAttribPointer_func(TexCoord0_attr, 2, GL_FLOAT, GL_FALSE,
0, Tex0Coords);
glEnableVertexAttribArray_func(TexCoord0_attr);
glMultiTexCoord2f(GL_TEXTURE0, 2, 0);
glMultiTexCoord2f(GL_TEXTURE1, 1, 0);
glVertex2f( size, -size);
glVertexAttribPointer_func(TexCoord1_attr, 2, GL_FLOAT, GL_FALSE,
0, Tex1Coords);
glEnableVertexAttribArray_func(TexCoord1_attr);
glMultiTexCoord2f(GL_TEXTURE0, 2, 2);
glMultiTexCoord2f(GL_TEXTURE1, 1, 1);
glVertex2f( size, size);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
}
glMultiTexCoord2f(GL_TEXTURE0, 0, 2);
glMultiTexCoord2f(GL_TEXTURE1, 0, 1);
glVertex2f(-size, size);
static void
DrawPolygonVert(void)
{
GLuint i;
glBegin(GL_TRIANGLE_FAN);
for (i = 0; i < 4; i++) {
glVertexAttrib2fv_func(TexCoord0_attr, Tex0Coords[i]);
glVertexAttrib2fv_func(TexCoord1_attr, Tex1Coords[i]);
if (VertCoord_attr >= 0)
glVertexAttrib2fv_func(VertCoord_attr, VertCoords[i]);
else
glVertex2fv(VertCoords[i]);
}
glEnd();
glPopMatrix();
}
@@ -100,7 +133,10 @@ draw(void)
glRotatef(Yrot, 0, 1, 0);
glRotatef(Xrot, 1, 0, 0);
DrawPolygon(3.0);
if (UseArrays)
DrawPolygonArray();
else
DrawPolygonVert();
glPopMatrix();
@@ -123,8 +159,11 @@ key(unsigned char k, int x, int y)
(void) x;
(void) y;
switch (k) {
case ' ':
case 'a':
UseArrays = !UseArrays;
printf("Arrays: %d\n", UseArrays);
break;
case ' ':
Anim = !Anim;
if (Anim)
glutIdleFunc(idle);
@@ -232,6 +271,13 @@ CreateProgram(const char *vertProgFile, const char *fragProgFile,
InitUniforms(program, uniforms);
TexCoord0_attr = glGetAttribLocation_func(program, "TexCoord0");
TexCoord1_attr = glGetAttribLocation_func(program, "TexCoord1");
VertCoord_attr = glGetAttribLocation_func(program, "VertCoord");
printf("TexCoord0_attr = %d\n", TexCoord0_attr);
printf("TexCoord1_attr = %d\n", TexCoord1_attr);
printf("VertCoord_attr = %d\n", VertCoord_attr);
return program;
}

View File

@@ -2,9 +2,13 @@
// Brian Paul
attribute vec4 TexCoord0, TexCoord1;
attribute vec4 VertCoord;
void main()
{
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_TexCoord[1] = gl_MultiTexCoord1;
gl_Position = ftransform();
gl_TexCoord[0] = TexCoord0;
gl_TexCoord[1] = TexCoord1;
// note: may use gl_Vertex or VertCoord here for testing:
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}

View File

@@ -30,6 +30,7 @@ static const char *FragShaderText =
" vec4 p;\n"
" p.xy = gl_TexCoord[0].xy;\n"
" p.z = Slice;\n"
" p.w = 0;\n"
" vec4 n = noise4(p * scale);\n"
" gl_FragColor = n * Scale + Bias;\n"
"}\n";

357
progs/glsl/samplers.c Normal file
View File

@@ -0,0 +1,357 @@
/**
* Exercise all available GLSL texture samplers.
*
* Copyright (C) 2009 VMware, Inc. 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, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL 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.
*/
/**
* We generate a fragment shader which uses the maximum number of supported
* texture samplers.
* For each sampler we create a separate texture. Each texture has a
* single strip of color at a different intensity. The fragment shader
* samples all the textures at the same coordinate and sums the values.
* The result should be a quad with rows of colors of increasing intensity
* from bottom to top.
*
* Brian Paul
* 1 Jan 2009
*/
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "GL/glut.h"
#include "readtex.h"
#include "extfuncs.h"
#include "shaderutil.h"
#define MAX_SAMPLERS 128
static const char *Demo = "samplers";
static GLuint Program;
static GLint NumSamplers;
static GLuint Textures[MAX_SAMPLERS];
static GLfloat Xrot = 0.0, Yrot = .0, Zrot = 0.0;
static GLfloat EyeDist = 10;
static GLboolean Anim = GL_FALSE;
static void
DrawPolygon(GLfloat size)
{
glPushMatrix();
glNormal3f(0, 0, 1);
glBegin(GL_POLYGON);
glMultiTexCoord2f(GL_TEXTURE0, 0, 0);
glVertex2f(-size, -size);
glMultiTexCoord2f(GL_TEXTURE0, 1, 0);
glVertex2f( size, -size);
glMultiTexCoord2f(GL_TEXTURE0, 1, 1);
glVertex2f( size, size);
glMultiTexCoord2f(GL_TEXTURE0, 0, 1);
glVertex2f(-size, size);
glEnd();
glPopMatrix();
}
static void
draw(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
glTranslatef(0.0, 0.0, -EyeDist);
glRotatef(Zrot, 0, 0, 1);
glRotatef(Yrot, 0, 1, 0);
glRotatef(Xrot, 1, 0, 0);
DrawPolygon(3.0);
glPopMatrix();
glutSwapBuffers();
}
static void
idle(void)
{
GLfloat t = 0.05 * glutGet(GLUT_ELAPSED_TIME);
Yrot = t;
glutPostRedisplay();
}
static void
key(unsigned char k, int x, int y)
{
(void) x;
(void) y;
switch (k) {
case ' ':
case 'a':
Anim = !Anim;
if (Anim)
glutIdleFunc(idle);
else
glutIdleFunc(NULL);
break;
case 'z':
EyeDist -= 0.5;
if (EyeDist < 3.0)
EyeDist = 3.0;
break;
case 'Z':
EyeDist += 0.5;
if (EyeDist > 90.0)
EyeDist = 90;
break;
case 27:
exit(0);
}
glutPostRedisplay();
}
static void
specialkey(int key, int x, int y)
{
GLfloat step = 2.0;
(void) x;
(void) y;
switch (key) {
case GLUT_KEY_UP:
Xrot += step;
break;
case GLUT_KEY_DOWN:
Xrot -= step;
break;
case GLUT_KEY_LEFT:
Yrot -= step;
break;
case GLUT_KEY_RIGHT:
Yrot += step;
break;
}
glutPostRedisplay();
}
/* new window size or exposure */
static void
Reshape(int width, int height)
{
GLfloat ar = (float) width / (float) height;
glViewport(0, 0, (GLint)width, (GLint)height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-2.0*ar, 2.0*ar, -2.0, 2.0, 4.0, 100.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
static void
InitTextures(void)
{
const GLint size = MAX_SAMPLERS;
GLubyte *texImage;
GLenum filter = GL_NEAREST;
GLint stripeSize;
GLint s;
texImage = (GLubyte *) malloc(size * size * 4);
glGenTextures(NumSamplers, Textures);
/* size of texels stripe */
stripeSize = size / NumSamplers;
/* create a texture for each sampler */
for (s = 0; s < NumSamplers; s++) {
GLint x, y, ypos;
GLubyte intensity = 31 + s * (256-32) / (NumSamplers - 1);
printf("Texture %d: color = %d, %d, %d\n", s,
(int) intensity, 0, (int) intensity );
/* initialize the texture to black */
memset(texImage, 0, size * size * 4);
/* set a stripe of texels to the intensity value */
ypos = s * stripeSize;
for (y = 0; y < stripeSize; y++) {
for (x = 0; x < size; x++) {
GLint k = 4 * ((ypos + y) * size + x);
texImage[k + 0] = intensity;
texImage[k + 1] = intensity;
texImage[k + 2] = 0;
texImage[k + 3] = 255;
}
}
glActiveTexture(GL_TEXTURE0 + s);
glBindTexture(GL_TEXTURE_2D, Textures[s]);
gluBuild2DMipmaps(GL_TEXTURE_2D, 4, size, size,
GL_RGBA, GL_UNSIGNED_BYTE, texImage);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
}
free(texImage);
}
/**
* Generate a fragment shader that uses the given number of samplers.
*/
static char *
GenFragmentShader(GLint numSamplers)
{
const int maxLen = 10 * 1000;
char *prog = (char *) malloc(maxLen);
char *p = prog;
int s;
p += sprintf(p, "// Generated fragment shader:\n");
for (s = 0; s < numSamplers; s++) {
p += sprintf(p, "uniform sampler2D tex%d;\n", s);
}
p += sprintf(p, "void main()\n");
p += sprintf(p, "{\n");
p += sprintf(p, " vec4 color = vec4(0.0);\n");
for (s = 0; s < numSamplers; s++) {
p += sprintf(p, " color += texture2D(tex%d, gl_TexCoord[0].xy);\n", s);
}
p += sprintf(p, " gl_FragColor = color;\n");
p += sprintf(p, "}\n");
assert(p - prog < maxLen);
return prog;
}
/** Create & bind shader program */
static GLuint
CreateProgram(void)
{
GLuint fragShader, vertShader, program;
const char *vertShaderText =
"void main() \n"
"{ \n"
" gl_TexCoord[0] = gl_MultiTexCoord0; \n"
" gl_Position = ftransform(); \n"
"} \n";
char *fragShaderText = GenFragmentShader(NumSamplers);
printf("%s", fragShaderText);
vertShader = CompileShaderText(GL_VERTEX_SHADER, vertShaderText);
fragShader = CompileShaderText(GL_FRAGMENT_SHADER, fragShaderText);
assert(vertShader);
program = LinkShaders(vertShader, fragShader);
glUseProgram_func(program);
free(fragShaderText);
return program;
}
static void
InitProgram(void)
{
GLint s;
Program = CreateProgram();
/* init sampler uniforms */
for (s = 0; s < NumSamplers; s++) {
char uname[10];
GLint loc;
sprintf(uname, "tex%d", s);
loc = glGetUniformLocation_func(Program, uname);
assert(loc >= 0);
glUniform1i_func(loc, s);
}
}
static void
InitGL(void)
{
if (!ShadersSupported()) {
printf("GLSL not supported!\n");
exit(1);
}
printf("GL_RENDERER = %s\n", (const char *) glGetString(GL_RENDERER));
GetExtensionFuncs();
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &NumSamplers);
if (NumSamplers > MAX_SAMPLERS)
NumSamplers = MAX_SAMPLERS;
printf("Testing %d samplers\n", NumSamplers);
InitTextures();
InitProgram();
glClearColor(.6, .6, .9, 0);
glColor3f(1.0, 1.0, 1.0);
printf("Each color corresponds to a separate sampler/texture.\n");
}
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowSize(500, 400);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
glutCreateWindow(Demo);
glutReshapeFunc(Reshape);
glutKeyboardFunc(key);
glutSpecialFunc(specialkey);
glutDisplayFunc(draw);
if (Anim)
glutIdleFunc(idle);
InitGL();
glutMainLoop();
return 0;
}

280
progs/glsl/skinning.c Normal file
View File

@@ -0,0 +1,280 @@
/**
* Vertex "skinning" example.
* The idea is there are multiple modeling matrices applied to every
* vertex. Weighting values in [0,1] control the influence of each
* matrix on each vertex.
*
* 4 Nov 2008
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include "extfuncs.h"
#include "shaderutil.h"
static char *FragProgFile = "skinning.frag";
static char *VertProgFile = "skinning.vert";
/* program/shader objects */
static GLuint fragShader;
static GLuint vertShader;
static GLuint program;
static GLint win = 0;
static GLboolean Anim = GL_TRUE;
static GLboolean WireFrame = GL_TRUE;
static GLfloat xRot = 0.0f, yRot = 90.0f, zRot = 0.0f;
#define NUM_MATS 2
static GLfloat Matrices[NUM_MATS][16];
static GLint uMat0, uMat1;
static GLint WeightAttr;
static void
Idle(void)
{
yRot = 90 + glutGet(GLUT_ELAPSED_TIME) * 0.005;
glutPostRedisplay();
}
static void
Cylinder(GLfloat length, GLfloat radius, GLint slices, GLint stacks)
{
float dw = 1.0 / (stacks - 1);
float dz = length / stacks;
int i, j;
for (j = 0; j < stacks; j++) {
float w0 = j * dw;
float z0 = j * dz;
glBegin(GL_TRIANGLE_STRIP);
for (i = 0; i < slices; i++) {
float a = (float) i / (slices - 1) * M_PI * 2.0;
float x = radius * cos(a);
float y = radius * sin(a);
glVertexAttrib1f_func(WeightAttr, w0);
glNormal3f(x, y, 0.0);
glVertex3f(x, y, z0);
glVertexAttrib1f_func(WeightAttr, w0 + dw);
glNormal3f(x, y, 0.0);
glVertex3f(x, y, z0 + dz);
}
glEnd();
}
}
/**
* Update/animate the two matrices. One rotates, the other scales.
*/
static void
UpdateMatrices(void)
{
GLfloat t = glutGet(GLUT_ELAPSED_TIME) * 0.0025;
GLfloat scale = 0.5 * (1.1 + sin(0.5 * t));
GLfloat rot = cos(t) * 90.0;
glPushMatrix();
glLoadIdentity();
glScalef(1.0, scale, 1.0);
glGetFloatv(GL_MODELVIEW_MATRIX, Matrices[0]);
glPopMatrix();
glPushMatrix();
glLoadIdentity();
glRotatef(rot, 0, 0, 1);
glGetFloatv(GL_MODELVIEW_MATRIX, Matrices[1]);
glPopMatrix();
}
static void
Redisplay(void)
{
UpdateMatrices();
glUniformMatrix4fv_func(uMat0, 1, GL_FALSE, Matrices[0]);
glUniformMatrix4fv_func(uMat1, 1, GL_FALSE, Matrices[1]);
if (WireFrame)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
else
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
glRotatef(zRot, 0.0f, 0.0f, 1.0f);
glPushMatrix();
glTranslatef(0, 0, -2.5);
Cylinder(5.0, 1.0, 10, 20);
glPopMatrix();
glPopMatrix();
glutSwapBuffers();
}
static void
Reshape(int width, int height)
{
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -15.0f);
}
static void
CleanUp(void)
{
glDeleteShader_func(fragShader);
glDeleteShader_func(vertShader);
glDeleteProgram_func(program);
glutDestroyWindow(win);
}
static void
Key(unsigned char key, int x, int y)
{
const GLfloat step = 2.0;
(void) x;
(void) y;
switch(key) {
case 'a':
Anim = !Anim;
if (Anim)
glutIdleFunc(Idle);
else
glutIdleFunc(NULL);
break;
case 'w':
WireFrame = !WireFrame;
break;
case 'z':
zRot += step;
break;
case 'Z':
zRot -= step;
break;
case 27:
CleanUp();
exit(0);
break;
}
glutPostRedisplay();
}
static void
SpecialKey(int key, int x, int y)
{
const GLfloat step = 2.0;
(void) x;
(void) y;
switch(key) {
case GLUT_KEY_UP:
xRot += step;
break;
case GLUT_KEY_DOWN:
xRot -= step;
break;
case GLUT_KEY_LEFT:
yRot -= step;
break;
case GLUT_KEY_RIGHT:
yRot += step;
break;
}
glutPostRedisplay();
}
static void
Init(void)
{
if (!ShadersSupported())
exit(1);
GetExtensionFuncs();
vertShader = CompileShaderFile(GL_VERTEX_SHADER, VertProgFile);
fragShader = CompileShaderFile(GL_FRAGMENT_SHADER, FragProgFile);
program = LinkShaders(vertShader, fragShader);
glUseProgram_func(program);
uMat0 = glGetUniformLocation_func(program, "mat0");
uMat1 = glGetUniformLocation_func(program, "mat1");
WeightAttr = glGetAttribLocation_func(program, "weight");
assert(glGetError() == 0);
glClearColor(0.4f, 0.4f, 0.8f, 0.0f);
glEnable(GL_DEPTH_TEST);
glColor3f(1, 0, 0);
}
static void
ParseOptions(int argc, char *argv[])
{
int i;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-fs") == 0) {
FragProgFile = argv[i+1];
}
else if (strcmp(argv[i], "-vs") == 0) {
VertProgFile = argv[i+1];
}
}
}
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowSize(500, 500);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
glutDisplayFunc(Redisplay);
ParseOptions(argc, argv);
Init();
if (Anim)
glutIdleFunc(Idle);
glutMainLoop();
return 0;
}

6
progs/glsl/skinning.frag Normal file
View File

@@ -0,0 +1,6 @@
// color pass-through
void main()
{
gl_FragColor = gl_Color;
}

24
progs/glsl/skinning.vert Normal file
View File

@@ -0,0 +1,24 @@
// Vertex weighting/blendin shader
// Brian Paul
// 4 Nov 2008
uniform mat4 mat0, mat1;
attribute float weight;
void main()
{
// simple diffuse shading
// Note that we should really transform the normal vector along with
// the postion below... someday.
vec3 lightVec = vec3(0, 0, 1);
vec3 norm = gl_NormalMatrix * gl_Normal;
float dot = 0.2 + max(0.0, dot(norm, lightVec));
gl_FrontColor = vec4(dot);
// compute sum of weighted transformations
vec4 pos0 = mat0 * gl_Vertex;
vec4 pos1 = mat1 * gl_Vertex;
vec4 pos = mix(pos0, pos1, weight);
gl_Position = gl_ModelViewProjectionMatrix * pos;
}

View File

@@ -79,8 +79,6 @@ Redisplay(void)
glPopMatrix();
glFinish();
glFlush();
glutSwapBuffers();
}

View File

@@ -26,27 +26,39 @@ static GLuint fragShader;
static GLuint vertShader;
static GLuint program;
static GLint win = 0;
static GLboolean anim = 0*GL_TRUE;
static GLboolean DetermineInFragProg = GL_TRUE;
static GLfloat Xrot = 30.0f;
static GLboolean anim;
static GLboolean DetermineFacingInFragProg;
static GLfloat Xrot;
static GLint u_fragface;
static GLenum FrontWinding = GL_CCW;
static GLenum FrontWinding;
static int prevTime = 0;
static const GLfloat Red[4] = {1, 0, 0, 0};
static const GLfloat Red[4] = {1, 0, 0, 1};
static const GLfloat Green[4] = {0, 1, 0, 0};
static void
SetDefaults(void)
{
DetermineFacingInFragProg = GL_TRUE;
FrontWinding = GL_CCW;
Xrot = 30;
anim = 0;
glutIdleFunc(NULL);
}
static void
Redisplay(void)
{
const int sections = 20;
int i;
float radius = 2;
glFrontFace(FrontWinding);
if (DetermineInFragProg) {
if (DetermineFacingInFragProg) {
glUniform1i_func(u_fragface, 1);
glDisable(GL_VERTEX_PROGRAM_TWO_SIDE);
}
@@ -64,8 +76,8 @@ Redisplay(void)
glBegin(GL_TRIANGLE_STRIP);
glColor4fv(Red);
glSecondaryColor3fv_func(Green);
for (i = 0; i < 20; i++) {
float a = i / 19.0 * M_PI * 2.0;
for (i = 0; i <= sections; i++) {
float a = (float) i / (sections) * M_PI * 2.0;
float x = radius * cos(a);
float y = radius * sin(a);
glVertex3f(x, -1, y);
@@ -139,17 +151,15 @@ Key(unsigned char key, int x, int y)
break;
case 'f':
printf("Using frag shader gl_FrontFacing\n");
DetermineInFragProg = GL_TRUE;
DetermineFacingInFragProg = GL_TRUE;
break;
case 'v':
printf("Using vert shader Two-sided lighting\n");
DetermineInFragProg = GL_FALSE;
DetermineFacingInFragProg = GL_FALSE;
break;
case 'r':
/* reset */
Xrot = 30;
anim = 0;
glutIdleFunc(NULL);
SetDefaults();
break;
case 's':
Xrot += 5;
@@ -182,14 +192,16 @@ Init(void)
static const char *fragShaderText =
"uniform bool fragface; \n"
"void main() { \n"
#if 0
#if 1
" if (!fragface || gl_FrontFacing) { \n"
" gl_FragColor = gl_Color; \n"
" } \n"
" else { \n"
" // note: dim green to help debug \n"
" gl_FragColor = 0.8 * gl_SecondaryColor; \n"
" } \n"
#else
/* DEBUG CODE */
" bool f = gl_FrontFacing; \n"
" if (f) { \n"
" gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0); \n"
@@ -197,8 +209,6 @@ Init(void)
" else { \n"
" gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0); \n"
" } \n"
" //float g = float(gl_FrontFacing) * 0.5 + 0.5; \n"
" //gl_FragColor = vec4(g); \n"
#endif
"} \n";
static const char *vertShaderText =
@@ -241,6 +251,8 @@ Init(void)
assert(glIsShader_func(vertShader));
glEnable(GL_DEPTH_TEST);
SetDefaults();
}

View File

@@ -0,0 +1,191 @@
/**
* Draw two quads, one using only a vertex shader, the other only with a
* fragment shader. They should appear the same.
* 17 Dec 2008
* Brian Paul
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include "extfuncs.h"
#include "shaderutil.h"
static char *FragProgFile = NULL;
static char *VertProgFile = NULL;
static GLuint FragShader;
static GLuint VertShader;
static GLuint VertProgram; /* w/out vertex shader */
static GLuint FragProgram; /* w/out fragment shader */
static GLint Win = 0;
static void
DrawQuadColor(void)
{
glBegin(GL_QUADS);
glColor3f(1, 0, 0); glVertex2f(-1, -1);
glColor3f(0, 1, 0); glVertex2f( 1, -1);
glColor3f(0, 0, 1); glVertex2f( 1, 1);
glColor3f(1, 0, 1); glVertex2f(-1, 1);
glEnd();
}
/** as above, but specify color via texcoords */
static void
DrawQuadTex(void)
{
glBegin(GL_QUADS);
glTexCoord3f(1, 0, 0); glVertex2f(-1, -1);
glTexCoord3f(0, 1, 0); glVertex2f( 1, -1);
glTexCoord3f(0, 0, 1); glVertex2f( 1, 1);
glTexCoord3f(1, 0, 1); glVertex2f(-1, 1);
glEnd();
}
static void
Redisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
/* render with vertex shader only */
glUseProgram_func(VertProgram);
glPushMatrix();
glTranslatef(-1.5, 0, 0);
DrawQuadTex();
glPopMatrix();
/* render with fragment shader only */
glUseProgram_func(FragProgram);
glPushMatrix();
glTranslatef(+1.5, 0, 0);
DrawQuadColor();
glPopMatrix();
glutSwapBuffers();
}
static void
Reshape(int width, int height)
{
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-4, 4, -2, 2, -1, 1);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
static void
CleanUp(void)
{
glDeleteShader_func(FragShader);
glDeleteShader_func(VertShader);
glDeleteProgram_func(VertProgram);
glDeleteProgram_func(FragProgram);
glutDestroyWindow(Win);
}
static void
Key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch(key) {
case 27:
CleanUp();
exit(0);
break;
}
glutPostRedisplay();
}
static void
Init(void)
{
static const char *fragShaderText =
"void main() {\n"
" gl_FragColor = gl_Color;\n"
"}\n";
static const char *vertShaderText =
"void main() {\n"
" gl_Position = ftransform();\n"
" gl_FrontColor = gl_MultiTexCoord0;\n" /* see DrawQuadTex() */
"}\n";
if (!ShadersSupported())
exit(1);
GetExtensionFuncs();
if (FragProgFile)
FragShader = CompileShaderFile(GL_FRAGMENT_SHADER, FragProgFile);
else
FragShader = CompileShaderText(GL_FRAGMENT_SHADER, fragShaderText);
if (VertProgFile)
VertShader = CompileShaderFile(GL_VERTEX_SHADER, VertProgFile);
else
VertShader = CompileShaderText(GL_VERTEX_SHADER, vertShaderText);
VertProgram = LinkShaders(VertShader, 0);
FragProgram = LinkShaders(0, FragShader);
glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
glEnable(GL_DEPTH_TEST);
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
assert(glIsProgram_func(VertProgram));
assert(glIsProgram_func(FragProgram));
assert(glIsShader_func(FragShader));
assert(glIsShader_func(VertShader));
glColor3f(1, 0, 0);
}
static void
ParseOptions(int argc, char *argv[])
{
int i;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-fs") == 0) {
FragProgFile = argv[i+1];
}
else if (strcmp(argv[i], "-vs") == 0) {
VertProgFile = argv[i+1];
}
}
}
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowPosition( 0, 0);
glutInitWindowSize(400, 200);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Redisplay);
ParseOptions(argc, argv);
Init();
glutMainLoop();
return 0;
}

279
progs/glsl/vert-tex.c Normal file
View File

@@ -0,0 +1,279 @@
/**
* Vertex shader texture sampling test.
* Brian Paul
* 2 Dec 2008
*/
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <GL/gl.h>
#include <GL/glut.h>
#include <GL/glext.h>
#include "extfuncs.h"
#include "shaderutil.h"
static const char *VertShaderText =
"uniform sampler2D tex1; \n"
"void main() \n"
"{ \n"
" vec4 pos = gl_Vertex; \n"
" pos.z = texture2D(tex1, gl_MultiTexCoord0.xy).x - 0.5; \n"
" gl_Position = gl_ModelViewProjectionMatrix * pos; \n"
" gl_FrontColor = pos; \n"
"} \n";
static const char *FragShaderText =
"void main() \n"
"{ \n"
" gl_FragColor = gl_Color; \n"
"} \n";
static GLuint fragShader;
static GLuint vertShader;
static GLuint program;
static GLint win = 0;
static GLboolean Anim = GL_TRUE;
static GLboolean WireFrame = GL_TRUE;
static GLfloat xRot = -70.0f, yRot = 0.0f, zRot = 0.0f;
/* value[0] = tex unit */
static struct uniform_info Uniforms[] = {
{ "tex1", 1, GL_INT, { 0, 0, 0, 0 }, -1 },
END_OF_UNIFORMS
};
static void
Idle(void)
{
zRot = 90 + glutGet(GLUT_ELAPSED_TIME) * 0.05;
glutPostRedisplay();
}
static void
DrawMesh(void)
{
GLfloat xmin = -2.0, xmax = 2.0;
GLfloat ymin = -2.0, ymax = 2.0;
GLuint xdivs = 20, ydivs = 20;
GLfloat dx = (xmax - xmin) / xdivs;
GLfloat dy = (ymax - ymin) / ydivs;
GLfloat ds = 1.0 / xdivs, dt = 1.0 / ydivs;
GLfloat x, y, s, t;
GLuint i, j;
y = ymin;
t = 0.0;
for (i = 0; i < ydivs; i++) {
x = xmin;
s = 0.0;
glBegin(GL_QUAD_STRIP);
for (j = 0; j < xdivs; j++) {
glTexCoord2f(s, t);
glVertex2f(x, y);
glTexCoord2f(s, t + dt);
glVertex2f(x, y + dy);
x += dx;
s += ds;
}
glEnd();
y += dy;
t += dt;
}
}
static void
Redisplay(void)
{
if (WireFrame)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
else
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glPushMatrix();
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
glRotatef(zRot, 0.0f, 0.0f, 1.0f);
glPushMatrix();
DrawMesh();
glPopMatrix();
glPopMatrix();
glutSwapBuffers();
}
static void
Reshape(int width, int height)
{
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.0f, 0.0f, -15.0f);
}
static void
CleanUp(void)
{
glDeleteShader_func(fragShader);
glDeleteShader_func(vertShader);
glDeleteProgram_func(program);
glutDestroyWindow(win);
}
static void
Key(unsigned char key, int x, int y)
{
const GLfloat step = 2.0;
(void) x;
(void) y;
switch(key) {
case 'a':
Anim = !Anim;
if (Anim)
glutIdleFunc(Idle);
else
glutIdleFunc(NULL);
break;
case 'w':
WireFrame = !WireFrame;
break;
case 'z':
zRot += step;
break;
case 'Z':
zRot -= step;
break;
case 27:
CleanUp();
exit(0);
break;
}
glutPostRedisplay();
}
static void
SpecialKey(int key, int x, int y)
{
const GLfloat step = 2.0;
(void) x;
(void) y;
switch(key) {
case GLUT_KEY_UP:
xRot += step;
break;
case GLUT_KEY_DOWN:
xRot -= step;
break;
case GLUT_KEY_LEFT:
yRot -= step;
break;
case GLUT_KEY_RIGHT:
yRot += step;
break;
}
glutPostRedisplay();
}
static void
MakeTexture(void)
{
const GLuint texWidth = 64, texHeight = 64;
GLfloat texImage[64][64];
GLuint i, j;
/* texture is basically z = f(x, y) */
for (i = 0; i < texHeight; i++) {
GLfloat y = 2.0 * (i / (float) (texHeight - 1)) - 1.0;
for (j = 0; j < texWidth; j++) {
GLfloat x = 2.0 * (j / (float) (texWidth - 1)) - 1.0;
GLfloat z = 0.5 + 0.5 * (sin(4.0 * x) * sin(4.0 * y));
texImage[i][j] = z;
}
}
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, 42);
glTexImage2D(GL_TEXTURE_2D, 0, GL_INTENSITY, texWidth, texHeight, 0,
GL_LUMINANCE, GL_FLOAT, texImage);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
}
static void
Init(void)
{
GLint m;
glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, &m);
if (m < 1) {
printf("Error: no vertex shader texture units supported.\n");
exit(1);
}
if (!ShadersSupported())
exit(1);
GetExtensionFuncs();
vertShader = CompileShaderText(GL_VERTEX_SHADER, VertShaderText);
fragShader = CompileShaderText(GL_FRAGMENT_SHADER, FragShaderText);
program = LinkShaders(vertShader, fragShader);
glUseProgram_func(program);
assert(glGetError() == 0);
MakeTexture();
glClearColor(0.4f, 0.4f, 0.8f, 0.0f);
glEnable(GL_DEPTH_TEST);
glColor3f(1, 1, 1);
}
int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowSize(500, 500);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
win = glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
glutDisplayFunc(Redisplay);
Init();
if (Anim)
glutIdleFunc(Idle);
glutMainLoop();
return 0;
}

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