Commit graph

32187 commits

Author SHA1 Message Date
Kristian Høgsberg
faa8c0ce8c Merge remote branch 'origin/7.8' into 7.8-gles 2010-05-14 15:05:02 -04:00
Kristian Høgsberg
8e60aeca2e egl: Implement EGL_NOK_texture_from_pixmap
This extension allows a color buffer to be used for both rendering and
texturing.  EGL allows the use of color buffers of pbuffer drawables
for texturing, this extension extends this to allow the use of color
buffers of pixmaps too.
2010-05-14 15:04:34 -04:00
Kristian Høgsberg
f2e8f4c473 egl: Only allow valid config attributes in _eglParseConfigAttribList()
Passing 0x3030, 0 in the chooser list didn't get caught.
2010-05-14 15:04:30 -04:00
Brian Paul
cf83f0b812 egl: remove duplicate ARRAY_SIZE() macro declaration 2010-05-14 15:04:25 -04:00
Vinson Lee
407ef9b5cc egl: Silence uninitialized variable warnings. 2010-05-14 15:04:22 -04:00
Kristian Høgsberg
61cc9a7538 egl: Implement EGL_NOK_swap_region
This extension adds a new function which provides an alternative to
eglSwapBuffers. eglSwapBuffersRegionNOK accepts two new parameters in
addition to those in eglSwapBuffers. The new parameters consist of a
pointer to a list of 4-integer blocks defining rectangles (x, y,
width, height) and an integer specifying the number of rectangles in
the list.
2010-05-14 15:04:12 -04:00
Kristian Høgsberg
59cee11522 egl_dri2: Enable KHR_gl_texture_2D_image
Forgot to set the enabled bit when I implemented the extension.
2010-05-14 15:03:17 -04:00
Chia-I Wu
5a27e8e2ae egl_dri2: Flush before context switch and swap buffers.
DRI does not define any callback to flush the current context.  GLX
loader simply calls glFlush.  Follow the GLX loader here.
2010-05-14 14:57:44 -04:00
Eric Anholt
533b766383 i965: Fix scissoring when width or height is 0.
We would run into trouble due to the hardware using inclusive numbers
and the subtraction to handle that producing negative (meaning large
positive) coordinates.

Bug #27643.
(cherry picked from commit 64516430be)
2010-05-13 13:43:06 -07:00
Eric Anholt
71f028bf93 i965: Fix assertion for surface tile offset usage on Ironlake.
Fixes assertion failure in fbo-generatemipmap-npot.
(cherry picked from commit b2e52e7278)
2010-05-13 13:43:06 -07:00
Eric Anholt
f007d0f89d i965: Fix cube map layouts on Ironlake.
We were doubling up the offsets for the mipmap levels for CPU access.
Instead of reimplementing i945_miptree_layout_2d with 6 cube images
separated by qpitch, share that function and provide the level offsets
later.

Fixes piglit cubemap and fbo-cubemap.
(cherry picked from commit 7d8f0fc282
Conflict due to mt->pitch still being here resolved -- i945 layout
should set it.)
2010-05-13 13:42:36 -07:00
Zhenyu Wang
728df9aaca intel: Clean up chipset name and gen num for Ironlake
Rename old IGDNG to Ironlake, and set 'gen' number for
Ironlake as 5, so tracking the features with generation num
instead of special is_ironlake flag.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
(cherry picked from commit cdcef6cbf4)
2010-05-13 13:41:33 -07:00
Kristian Høgsberg
f8a500d96b egl: Allow a prioritized list of default drivers
When there is no user driver or any matching display drivers we fall
back to the default driver.  This patch lets us have a list of default
drivers instead of just one.  The drivers are loaded in turn and we
attempt to initialize the display.  If it fails we unload the driver
and move on to the next one.

Compared to the display driver mechanism, this avoids loading a number
of drivers and then only using one.  Also, we call Initialize to see
if the driver will work instead of relying on Probe.  To know for sure
that a driver will work, Probe really have to do a full Initialize, so
we will just use Initialize directly.
2010-05-13 16:16:26 -04:00
Kristian Høgsberg
12f4f51873 egl_dri2: Downgrade initialization errors to warnings
Don't want to shutdown everything if egl_dri2 fails to initialize.
2010-05-13 16:16:21 -04:00
Kristian Høgsberg
0c3f95e5e8 egl: Drop broken _EGL_PLATFORM_NO_OS code
It would do strlen(library_suffix()) in _eglLoaderFile(), with
library_suffix() returning NULL.  So obviuosly not used or tested.
2010-05-13 16:15:25 -04:00
Kristian Høgsberg
b3e27bca9f egl: Don't try to load driver basename if the platform needs a suffix
That is, don't dlopen(egl_glx) when we know we need to append .so.
2010-05-13 16:15:19 -04:00
Eric Anholt
d2ade4b802 i965: When an RB gets a new region, clear the old from the state cache.
This prevents memory usage explosion in blender due to the state cache
hanging on to old fake frontbuffer regions.  Sigh at blender still
using frontbuffer rendering.

Bug #24119.
(cherry picked from commit ce914fff08)
2010-05-13 11:41:14 -07:00
Eric Anholt
e48964a561 intel: Don't tile textures so small that size is blown up by over 2x.
Noted on the mailing list for an app that puts each glyph for its text
into a separate texture.
(cherry picked from commit 453f0b1f24)
2010-05-13 11:41:10 -07:00
Eric Anholt
53557f1f34 i965: Reject shaders with uninlined function calls instead of hanging.
Most of the failure from using uninlined function calls ends up being
just bad rendering, but nested function calls in the VS currently hang
the GPU, so reject them and explain why.
(cherry picked from commit ee29b86129)
2010-05-13 11:40:21 -07:00
Eric Anholt
3bf7ea2a1c mesa: Don't overwrite a driver's shader infolog with generic failure message.
(cherry picked from commit 07a248a366)
2010-05-13 11:40:17 -07:00
Kristian Høgsberg
4784a5030a Merge remote branch 'origin/7.8' into 7.8-gles 2010-05-12 16:11:42 -04:00
Chia-I Wu
bf3b9187f0 mesa: Add missing features.
Add features tested in the code but missing from mfeatures.h.

This also fixes some tests of features.  They should be tested with
"#if", not "#ifdef".
2010-05-12 15:54:02 -04:00
Chia-I Wu
d747bfc224 mesa: Add umbrella features.
Add FEATURE_GL, FEATURE_ES1, and FEATURE_ES2 for OpenGL, OpenGL ES 1.x,
and OpenGL ES 2.x respectively.  Define individual features through the
new umbrella features.  There is no real change introduced by this
commit.
2010-05-12 15:54:00 -04:00
Kristian Høgsberg
f3b55494f3 egl_dri2: Zero out driver struct
Otherwise testing ->Probe for non-NULL and calling it goes boom.
2010-05-12 14:51:25 -04:00
Kristian Høgsberg
8b68c0aa24 glx: Get GLX_SCREEN first in __glXQueryContextInfo()
And lookup the GLX screen for the context.  Otherwise we'll end up
jumping through a NULL-pointer once we try to look up the visual
or config for the shared context.

https://bugs.freedesktop.org/show_bug.cgi?id=14245
2010-05-12 14:50:04 -04:00
Brian Paul
3c407b52ff osmesa: fix OSMesa for CHAN_BITS=32
CHAN_BITS=16 still broken.

NOTE: this is a candidate for back-porting to the 7.8 stable branch.
(cherry picked from commit 36b3a8bd5a)
2010-05-07 09:00:05 -06:00
Brian Paul
210b74c613 glsl: change variable declared assertion into conditional
The slang_variable::declared field originated as a debug field but
can be promoted for use during sematic error checking.

Fixes fd.o bug 27921.

NOTE: this is a candidate for back-porting to the 7.8 stable branch.
(cherry picked from commit a12614362a)
2010-05-07 08:59:08 -06:00
Kristian Høgsberg
dd0292dcf9 Merge remote branch 'origin/7.8' into 7.8-gles 2010-05-06 11:07:11 -04:00
Chia-I Wu
8c1b3b102d mesa: Fix build of ES overlay.
ES overlay is built with FEATURE_ES1 or FEATURE_ES2, and is built
without FEATURE_GL.  Fix the build by always building OpenGL ES sources,
but test for FEATURE_ES1 or FEATURE_ES2.  Also, define symbols that are
missing because FEATURE_GL is not defined.
2010-05-06 11:05:01 -04:00
Kristian Høgsberg
320b7ac65e Fix gles .pc file generation 2010-05-06 11:04:44 -04:00
Kristian Høgsberg
5571689f8f Add egl.pc file 2010-05-06 11:04:41 -04:00
Kristian Høgsberg
49dbb9def6 intel: Enable GL_EXT_framebuffer_object for gles2 2010-05-06 11:04:28 -04:00
Chia-I Wu
90d824edaf gles: Add -I$(TOP)/include. 2010-05-06 11:04:20 -04:00
Kristian Høgsberg
d3702fc3ea mesa: Forgot to add .pc.in files for gles
Some day I'll grow up and remember to add new files when I commit.
2010-05-06 11:04:10 -04:00
Xavier Chantry
f7638f004d gallium: untrack u_indices_gen.c and u_indices_gen.c
These files are built with make and removed with make clean, so it does not
seem necessary to track them.

Looking at the Makefile, it seems that the two u_indices_* files are handled
similarly to u_format_srgb.c u_format_table.c and u_half.c, and these 3
files are already untracked and in .gitignore

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-05-06 12:40:36 +01:00
José Fonseca
30e9ffcd3b mesa/st: Fill in native program limits.
In the lack of more fine grained capabilities in Gallium, assume that if
the pipe driver supports GLSL then native limits match Mesa software
limits.
(cherry picked from commit 40a90cd11234a09c2477f5c9984dd6d9fac3f52c)
2010-05-04 15:37:25 +01:00
Kristian Høgsberg
cdf9f4680f mesa: Only initialize TNL for OpenGL 2010-05-03 21:32:05 -04:00
Kristian Høgsberg
0bb23b4b6f mesa: Only initialize save dispatch table for OpenGL 2010-05-03 21:32:01 -04:00
Chia-I Wu
a2dcd67c39 mesa: Add OES_EGL_image to extension list. 2010-05-03 12:27:21 -04:00
Kristian Høgsberg
34e4091a44 Generate es glapi files when es1 or es2 is enabled 2010-05-03 12:22:30 -04:00
Xavier Chantry
ebb5228d18 Update dri state tracker to use new API aware context create 2010-05-03 12:22:29 -04:00
Kristian Høgsberg
df104eaa47 configure.ac: Fix test for whether to build src/gles 2010-05-03 12:22:29 -04:00
Kristian Høgsberg
ebf84d9a2c mesa: Include mfeatures.h before testing feature macros 2010-05-03 12:22:29 -04:00
Kristian Høgsberg
2b1b51db7d mesa: Only compile ES files when ES1 or ES2 are selected
This still requieres manual generation of the es1 and es2 glapis and is
disabled by default.
2010-05-03 12:22:28 -04:00
José Fonseca
a5fca974cf mesa: #ifdef out more remap_table related code when disabled.
Seems to get everything building again here.
2010-05-03 12:22:28 -04:00
Kristian Høgsberg
269f416864 Hook in install rules for es1 and es2 2010-05-03 12:22:28 -04:00
Kristian Høgsberg
6434e18af2 Add glesv2.pc and glesv1_cm.pc pkg-config files for ES 1 and 2 2010-05-03 12:22:27 -04:00
Kristian Høgsberg
dbf423975c st/mesa: Create context for API_OPENGL as first priority 2010-05-03 12:22:27 -04:00
Kristian Høgsberg
e53e7c9346 gles: Build libGLESv1_CM.so and libGLESv2.so from glapi files 2010-05-03 12:22:27 -04:00
Kristian Høgsberg
144b103f7f intel: Only register ES2 extensions for ES2 contexts 2010-05-03 12:22:27 -04:00