Commit graph

12724 commits

Author SHA1 Message Date
Roland Scheidegger
5ef4e4ffb8 mesa: fix issues around multisample enable
multisample enable is enabled by default, however gl mandates multisample
rendering rules only apply if there's also a multisampled buffer.
2008-07-02 20:21:06 +02:00
Brian Paul
6befdca6a3 generate a link error if the vertex shader references too many textures 2008-07-02 09:16:10 -06:00
Brian Paul
43346fb1fb set ctx->Const.MaxVertexTextureImageUnits = 0
This disallows vertex shader texture sampling.  See bugs 16157, 13838.
2008-07-02 09:14:53 -06:00
Ian Romanick
ea190fe050 VBO: Regenerate files based on recent changes to gl_API.xml
Since GL_ARB_vertex_buffer_object protocol isn't supported yet, these
changes are innocuous.
2008-07-02 06:26:11 -07:00
Paulo Cesar Pereira de Andrade
abd71144f0 Bring over commit 8d4d0b47a07a298a20ffae9fefe96c8c7ca9dccc from xserver tree 2008-07-02 06:22:47 -07:00
Ian Romanick
21e0d47514 VBO: Add missing functions related to VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 2008-07-01 19:30:32 -07:00
Ian Romanick
c52d6ad465 VBO: add GLX related annotations 2008-07-01 18:20:21 -07:00
Brian Paul
028739faed mesa: fix a GLSL vector subscript/writemask bug
This fixes a failure for cases like:
   vec4 v;
   v[1] *= 2.0;

The v[1] actually acts like a writemask, equivalent to v.y
The fix is a bit convoluted, but will do for now.
2008-07-01 17:59:07 -06:00
Brian Paul
e19af171cf mesa: move some functions 2008-07-01 17:52:31 -06:00
Brian Paul
9ae4d778d8 mesa: make _slang_swizzle_swizzle() non-private 2008-07-01 17:50:14 -06:00
Brian Paul
32a5c40336 mesa: better function inlining in the presence of 'return' statements
Before, the presence of a 'return' statement always prevented inlining
a function.  This was because we didn't want to accidentally return from
the _calling_ function.  We still need the semantic of 'return' when inlining
but we can't always use unconditional branches/jumps (GPUs don't always
support arbitrary branching).

Now, we allow inlining functions w/ return if the return is the last
statement in the function.  This fixes the common case of a function
that returns a value, such as:

vec4 square(const in vec4 x)
{
   return x * x;
}

which effectively compiles into:

vec4 square(const in vec4 x)
{
   __retVal = x * x;
   return;
}

The 'return' can be no-op'd now and we can inline the function.
2008-07-01 11:41:21 -06:00
Brian Paul
b2247c7d29 mesa: add/fix some IrInfo entries for debugging purposes 2008-07-01 11:41:02 -06:00
Brian Paul
011b0e51e4 link to DRM 2.3.1 2008-07-01 09:02:10 -06:00
Brian Paul
2ce4b985a5 press 'm' to toggle multisample enable/disable 2008-07-01 08:49:12 -06:00
Brian Paul
634d2af2b0 init machine->Samplers (fixes vertex program texture fetches) 2008-07-01 08:49:12 -06:00
Dave Airlie
d3f7b463c3 dri: drop asserts to make build against stable libdrm
These asserts are of questionable use at the moment with things in flux.
2008-07-01 18:22:12 +10:00
Xiang, Haihao
bcc2a3d7e3 dri: Take the base image size into account when computing
first level of the mipmap.  fix #16210
2008-07-01 11:50:50 +08:00
Dan Nicholson
5cae1b747b autoconf: Improve the visibility of the swrast DRI driver
Improve the --with-dri-drivers help text so that users are aware that
they should install the swrast DRI driver.
2008-06-30 11:16:09 -07:00
Corbin Simpson
bb1744970d r3xx/r5xx: Enable ARB_point_parameters.
This isn't complete yet. It does cover the two most common usage cases,
though, and at least the third one (POINT_DISTANCE_ATTENUATION) is possible,
so I'll do that later.
2008-06-30 11:12:51 -07:00
Nicolai Haehnle
23e9b43ce4 r300: Fix dumb mistake in LOD bias translation 2008-06-30 08:37:37 +02:00
Nicolai Haehnle
4002b75e62 r300: Cleanup LodBias support
. There is both a per-texture unit and a per-texture object (at least for
OpenGL 1.4); this should now be supported properly.
. The LOD bias calculation in r300_state has been simplified and corrected
  (need to multiply by 32 instead of 31, and ensure clamping)
. do not clamp LOD bias in TexEnv, as that behaviour conflicts with what
  the spec says
. set Const.MaxTextureLodBias properly
. remove the no_neg_lod_bias property; if somebody can explain what
  it's good for, we can add it back in, but according to Google, nobody
  seems to use it
. removed some dead code and unused variables
2008-06-30 00:49:00 +02:00
Corbin Simpson
a74d22ba71 r300: Change LOD bias emission to more closely follow per-tex rules.
Okay, this time it's for real, and for good. This should be a perma-fix.
2008-06-29 10:32:19 -07:00
Corbin Simpson
543893eefd Revert accidental edit to progs/demos/lodbias.
*puts yet another paper bag over head*
2008-06-29 10:32:19 -07:00
Nicolai Haehnle
0918023c28 demos/shadowtex: Don't set TEXTURE_WRAP_T for 1D texture
The operation doesn't really make sense. It triggered a bug in the r300 DRI
driver (and possibly other drivers that simulate 1D textures via 2D textures).
I've added an isolated test case for this bug to Piglit, so everybody wins.
2008-06-29 17:34:14 +02:00
Nicolai Haehnle
bc775066aa r300: Fix wrap mode for 1D textures 2008-06-29 17:28:13 +02:00
Brian Paul
6cb1270491 s/GL_INVALID_VALUE/GL_INVALID_OPERATION/ in _mesa_get_uniformfv() 2008-06-28 16:48:58 -06:00
Brian Paul
b429e9b2d7 mesa: added null ptr checks 2008-06-28 16:48:58 -06:00
Dan Nicholson
f6da1453c5 DRI-specific pkg-config file
Since the gl pkg-config file doesn't convey any specifics about the
backend in use, this adds a new pkg-config file for when DRI is in use.
This can be used by the xserver build to determine if the DRI and/or
GLX extensions are appropriate.
2008-06-27 16:25:28 -07:00
Dan Nicholson
985e1cdfe8 autoconf: Check for posix_memalign
Rather than just defining HAVE_POSIX_MEMALIGN on Linux, check whether
the function exists on all platforms and define the macro if it is.
2008-06-27 16:24:42 -07:00
Alan Hourihane
3b132b297f Check in SwapBuffers for any new pending dri2 events 2008-06-26 22:53:29 +01:00
Eric Anholt
5174b85a0c intel: Fix glCopyPixels when x or y are < 0 in hw coordinates.
Nothing would get drawn as the negative coordinates broke the rectangle
intersection code that used unsigned ints.  Tested with copypix demo and
sliding the copy to the upper left.
2008-06-24 14:04:11 -07:00
Eric Anholt
9a0d773116 i965: Use the shared intel_pixel_copy.c.
This disables the textured copy implementation on 965, which didn't appear
to work (mesa copypix demo, disable the blit path, move so that regions don't
overlap and textured is used, and you get garbage).  If we resurrect this for
i965, I'd rather it used the 915-style metaops instead.  Current metaops code
left in place so that whoever picks it up has a reference.
2008-06-24 13:18:40 -07:00
Eric Anholt
744357e29c intel: Same pixel function init for everyone now. 2008-06-24 11:49:21 -07:00
Eric Anholt
f5eb62a116 intel: Avoid glBitmap software fallback for blending when no blending occurs.
Mesa demos tend to leave blending on but in GL_ONE/GL_ZERO, or
GL_SRC_ALPHA/GL_ONE_MINUS_SRC_ALPHA with a source alpha of 1.0.
2008-06-24 11:44:42 -07:00
Eric Anholt
f23adc504d intel: Merge check_blit_fragment_ops between i915/i965.
Both had some useful bits for the other.
2008-06-24 11:34:42 -07:00
Eric Anholt
90d33edf37 intel: Note reasons for blit pixel op fallbacks under INTEL_DEBUG=pix. 2008-06-24 10:50:10 -07:00
Eric Anholt
eda68cccc0 i915: Add support for accelerated glBitmap, shared from 965. 2008-06-24 10:26:57 -07:00
Eric Anholt
5989098779 i915: Fix read != draw drawable for glCopyPixels.
Taken from commit bad6e175cf.
2008-06-24 10:25:19 -07:00
Eric Anholt
98fa0aec36 i915: Allow accelerated pixel ops to be disabled with INTEL_NO_BLIT.
This matches 965.
2008-06-24 10:24:32 -07:00
Dan Nicholson
fe3b62b5b1 Ensure all objects are built when installing DRI 2008-06-22 20:29:45 -07:00
Dan Nicholson
5aa4d5a87d Don't make libmesa.a or libglapi.a depend on asm_subdirs
Since the asm_subdirs target does not actually create a file, make will
always consider that it needs to be rebuilt. If libmesa.a and libglapi.a
have asm_subdirs as a prerequisite, then they will always need to be
rebuilt, too. The correct order will be preserved by the default target,
though.

This should fix #16358.
2008-06-22 20:27:00 -07:00
Dan Nicholson
7ec5e6a032 Create $(TOP)/$(LIB_DIR) for install, too
If `make install' is run without running `make' first, the $(LIB_DIR)
will not be created. This also changes the mkdir a little bit so that it
isn't run if necessary and added `-p' so that it is immune to races.
2008-06-22 20:19:35 -07:00
Brian Paul
71d2578ac5 replace __inline and __inline__ with INLINE macro 2008-06-21 10:55:24 -06:00
Brian Paul
ba97ed2b74 replace __inline and __inline__ with INLINE macro 2008-06-21 10:52:40 -06:00
Brian Paul
cc96d54920 replace __inline and __inline__ with INLINE macro 2008-06-21 10:52:32 -06:00
Brian Paul
37f19b94ac replace __inline and __inline__ with INLINE macro 2008-06-21 10:49:45 -06:00
Brian Paul
402e7f76b1 #undef DEBUG to silence warnings 2008-06-21 10:49:40 -06:00
Brian Paul
5ee7b7912c replace __inline and __inline__ with INLINE macro 2008-06-21 10:34:38 -06:00
Brian Paul
055ab81920 replace __inline and __inline__ with INLINE macro 2008-06-21 10:34:00 -06:00
Brian Paul
24197b4901 replace __inline and __inline__ with INLINE macro 2008-06-21 10:30:01 -06:00