Commit graph

48156 commits

Author SHA1 Message Date
Yuanhan Liu
7a9a8bbabd mesa: fix error handling for glPixelZoom
According the man page, GL_INVALID_OPERATION should generated if
glPixelZoom is executed between the execution of glBegin and the
corresponding execution of glEnd.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-19 08:11:52 -06:00
Yuanhan Liu
6a98802243 mesa: fix error handling for glIsEnabled
According the man page, GL_INVALID_OPERATION should be generated if
glIsEnabled is executed betwwen the execution of glBegin and the
correspoding execution of glEnd.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-19 08:11:52 -06:00
Yuanhan Liu
b020b111a8 mesa: fix error handling for glTexEnv
Fix error handling while calling glTexEnv with invalid texture
environment parameters.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-19 08:11:51 -06:00
Yuanhan Liu
f1ddde5c16 mesa: fix error handling for some glGet* functions
According to the man page, it should trigger a GL_INVALID_OPERATION
while calling some glGet* functions inside glBegin and glEnd.

This patch dose handle the following functions:
 glGetBooleanv
 glGetFloatv
 glGetIntegerv
 glGetInteger64v
 glGetDoublev

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-19 08:11:51 -06:00
Yuanhan Liu
21b2895bd0 mesa: fix error handling for glEvalMesh1/2D
According man page, trigger error when calling glEvalMesh1/2D inside
glBegin/glEnd.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-19 08:11:51 -06:00
Matt Turner
f534c13413 Remove unused APP_LIB_DEPS variable
Unused since removal of demos from the repository?

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-19 07:39:19 -06:00
Matt Turner
75eb92fb28 egl_glx.c: use unsigned instead of uint
We've had a hack to fix this in Gentoo on Solaris for a while.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-19 07:39:04 -06:00
Matt Turner
116e896aaf Remove unneeded xdamages header from dri2_glx.c.
It's needed for dri1 but not dri2.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-19 07:34:46 -06:00
Dave Airlie
f8c190b0ab graw: fix tests to build on msvc again.
Should fix https://bugs.freedesktop.org/show_bug.cgi?id=40997

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-19 10:20:10 +01:00
Tom Stellard
2d1004d9aa r300/compiler: Fix regalloc for values with multiple writers
https://bugs.freedesktop.org/show_bug.cgi?id=40062
https://bugs.freedesktop.org/show_bug.cgi?id=36939

Note: This is a candidate for the 7.11 branch.
2011-09-18 18:00:14 -07:00
Brian Paul
63b5902756 swrast: fix more store_texel() bugs
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412 on swrast.
2011-09-18 11:24:04 -06:00
Dave Airlie
6dd284f7c8 gallium: move clear paths from rgba to a pointer to a color union (v2)
This moves the gallium interface for clears from using a pointer to 4 floats to a pointer to a union of float/unsigned/int values.

Notes:
1. the value is opaque.
2. only when the value is used should it be interpretered according to
the surface format it is going to be used with.
3. float clears on integer buffers and vice-versa are undefined.

v2: fixed up vega and graw, dropped hunks that shouldn't have been in
patch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-18 15:12:47 +01:00
Brian Paul
78026b8ace mesa: use ctx->Driver.AllocTextureImageBuffer() to alloc texture memory 2011-09-17 14:57:41 -06:00
Brian Paul
e6cf338d01 mesa: plug in swrast texture image alloc/free functions
Use the swrast allocation/free functions instead of core Mesa.
2011-09-17 14:57:40 -06:00
Brian Paul
efc93219a9 swrast: add Alloc/FreeTextureImageBuffer() driver functions
Not called yet.  These will replace the core Mesa functions for allocating
and freeing malloc'd texture memory.
2011-09-17 14:57:40 -06:00
Brian Paul
d1da1c0ca8 mesa: add AllocTextureImageBuffer() driver hook 2011-09-17 14:57:40 -06:00
Brian Paul
a1661dc895 mesa: move gl_texture_image::FetchTexel fields to swrast
This also involves passing swrast_texture_image instead of gl_texture_image
into all the fetch functions.
2011-09-17 14:57:40 -06:00
Brian Paul
20177a620e swrast: plug in _swrast_new/delete_texture_image() functions 2011-09-17 14:57:40 -06:00
Brian Paul
abdfa0b4f1 radeon: make radeon_texture_image a subclass of swrast_texture_image 2011-09-17 14:57:40 -06:00
Brian Paul
fa2c886863 intel: make intel_texture_image a subclass of swrast_texture_image
We need to subclass swrast_texture_image because if we use swrast for
fallback rendering, we'll need to have swrast_texture_image objects.
2011-09-17 14:57:40 -06:00
Brian Paul
1da896803c swrast: introduce new swrast_texture_image struct
No subclass fields yet.  Subsequent patches will add the fields related
to software rendering that are currently in gl_texture_image.
2011-09-17 14:57:40 -06:00
Brian Paul
146f536b33 mesa: add new DeleteTextureImage() driver hook
Matches the NewTextureImage() hook.  With new subclasses of
gl_texture_image coming we need a new hook to properly delete objects of
those subclasses.
2011-09-17 14:57:40 -06:00
Brian Paul
baeefef2c0 mesa: move software texel fetch code into swrast
It's only used by swrast now so move it out of core Mesa.
2011-09-17 14:57:40 -06:00
Brian Paul
ce82914f5a mesa: move _mesa_update_fetch_functions() calls into swrast
Do it during swrast state validation since the FetchTexel() functions
are only called from swrast now and not core Mesa.
Remove assertions in mipmap.c since they're no longer appropriate.
2011-09-17 14:57:40 -06:00
Brian Paul
f0f28548c2 mesa: implement unpack_SIGNED_GR1616 in format_unpack.c 2011-09-17 13:36:58 -06:00
Brian Paul
6e423253e7 meta: fix/add checks for GL_EXT_framebuffer_sRGB
This fixes spurious GL errors when the GL_EXT_framebuffer_sRGB extension
is not supported.

Note: This is a candidate for the 7.11 branch
2011-09-17 11:14:21 -06:00
Brian Paul
3b29631c33 mesa: s/short/ushort/ in unpack_SIGNED_RGBA_16() 2011-09-17 10:50:42 -06:00
Christoph Bumiller
ee09c1e1c3 d3d1x: fix parsing of SM4 relative addressing register op 2011-09-17 12:11:44 +02:00
Christoph Bumiller
4a06248281 d3d1x: set flatshade_first in rasterizer state
D3D10 specifies the first vertex as the leading/provoking one.
2011-09-17 12:09:03 +02:00
Christoph Bumiller
e27d72d6c3 d3d1x: initialize point size and line width to 1
Otherwise lines would never be visible since the width cannot be
specified in D3D10.
Wireframe mode is also affected by line width.
2011-09-17 12:07:42 +02:00
Tom Stellard
e945fb04d0 r300/compiler: Add support for the output modifier (OMOD) 2011-09-16 17:35:46 -07:00
Tom Stellard
1e5aaaa138 r300/compiler: Move some helper functions to radeon_compiler_util.c 2011-09-16 17:19:56 -07:00
Tom Stellard
96620d2275 r300/compiler: Don't unroll loops that conditionally increment the counter 2011-09-16 17:19:56 -07:00
Vinson Lee
79b162ba45 nouveau: Fix typos of ParseSourceList in SConscript files.
Reviewed-by: Chia-I Wu <olv@lunarg.com>
2011-09-16 14:07:20 -07:00
Brian Paul
88625e6e65 scons: fix incorrect test for embedded build
This was missed back in commit 4175010749.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-09-16 10:13:14 -06:00
Marek Olšák
34f4bd8190 winsys/radeon: use the cache bufmgr for buffers with PIPE_BIND_CUSTOM
so that we don't abuse PIPE_BIND_VERTEX_BUFFER all the time.
2011-09-16 17:25:12 +02:00
Brian Paul
81c688babe softpipe: use pipe_get_tile_rgba_format()
Pass an explicit surface format as we do with pipe_put_tile_rgba_format().
This fixes the piglit fbo-srgb-blit test.  With GL_EXT_framebuffer_sRGB we
override the resource's format with an explicit format (linear vs. sRGB).
We need to do so both when getting and putting tiles.

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

Reviewed-by: Dave Airlie <airlied@redhat.com>
2011-09-16 07:38:53 -06:00
Brian Paul
89999204ec softpipe: use util_format_is_depth_or_stencil()
Reviewed-by: Dave Airlie <airlied@redhat.com>
2011-09-16 07:38:53 -06:00
Dave Airlie
2b47d2bce1 r600g: fixup missing scaled r600 types.
I was still missing a couple of types on r600/r700 codepaths.

Fixes these up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 14:09:16 +01:00
Dave Airlie
f2bae9456f r600g: interpret integer texture types as ints.
For signed/unsigned with no normalisation or srgb, assume its an INT
type texture.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:26:57 +01:00
Dave Airlie
2dfabdd0a4 r600g: take constantly interpolated values into a/c
We could constant interpolated values now and set have_perspective
if nothing else is set to avoid a GPU hang.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:26:57 +01:00
Dave Airlie
21c5607e64 r600g: add flat non-interpolation support.
TGSI CONSTANT interpolation is just flat, and we just read the values
direct from the LDS into the GPR without doing any interpolation on them.

This is needed to pass integer types into the fragment shader.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:25:48 +01:00
Dave Airlie
de3218664a r600g: set number type correctly for color buffers.
If we get a scaled type assume its a real integer type (as textures are).

Also fixup the blend bypass and blend clamp flags on evergreen as per the
docs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:25:48 +01:00
Dave Airlie
b205f53c7f r600g: add missing formats to color buffer setup.
just playing with EXT_texture_integer, and this was first bug.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-16 09:25:48 +01:00
Brian Paul
3edbce32fb softpipe: use consistent indentation in sp_quad_blend.c 2011-09-15 16:18:14 -06:00
Tobias Droste
1795372fee gallivm: fix build with LLVM 3.0svn
LLVM 3.0svn added SubtargetInfo as additional parameter to
createMCDisassembler() and createMCInstPrinter().
See revision 139237 of LLVM.

Signed-off-by: Tobias Droste <tdroste@gmx.de>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-15 15:53:04 -06:00
Eugeni Dodonov
72e0a9226d Change strerror(ret) to strerror(-ret). 2011-09-15 15:12:02 -03:00
Brian Paul
a7109a3199 softpipe: fix blending for luminance/intensity surfaces
If we're drawing to a luminance, luminance/alpha or intensity surface
we have to adjust (rebase) the fragment/quad colors before writing them
to the tile cache.  The tile cache always stores RGBA colors but if
we're caching a L/A surface (for example) we need to be sure that R=G=B
so that subsequent reads from the surface cache appear to return L/A

We previously had a special case for RGB (no alpha) surfaces.  This
change generalizes that for the other base formats.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40408, but sRGB
formats are still failing.  That'll be addressed in a later patch.
2011-09-15 11:31:55 -06:00
Brian Paul
ba6f1f2c29 util: add util_format_is_luminance/intensity/rgb(), etc
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-09-15 11:31:55 -06:00
Jørgen Lind
0763b978ee wayland: Flush before blocking in swapbuffers.
Make sure that we've sent the frame request that we're going to block on.
2011-09-15 11:53:39 -04:00