Commit graph

27537 commits

Author SHA1 Message Date
Chia-I Wu
a316b700ef mesa/es: Improve support for GL_OES_compressed_paletted_texture.
Add error checking and fix handling of level (it should be negative).
Besides, always use the palette entry format/type when calling
_mesa_TexImage2D.  It respects the base internal formats of the cpal
formats, and is simpler and faster, except for cases where the unpack
alignment needs to be changed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:16 -07:00
Chia-I Wu
c4b9e1aa1a mesa/es: Fix GL_RGB565 support in FBO.
In GL_OES_framebuffer_object and OpenGL ES 2.0, GL_RGB565 is a valid
internal format.  Since it is not supported by the core, map it to
GL_RGB5 as a workaround.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:16 -07:00
Chia-I Wu
b80ec33f35 mesa/es: Fix GL_OES_texture_cube_map support.
Unlike in OpenGL, GL_OES_texture_cube_map says that all coordinates are
changed the same time by the token GL_TEXTURE_GEN_STR_OES, and the
initial mode is GL_REFLECTION_MAP_OES.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
3a4d0811b4 mesa/es: Clean up extension string.
Add some new extensions and remove those that do not belong to
OpenGL ES 2.0.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
f88297b369 mesa/es: Add more exnteions to APIspec.
This commit adds definitions of

  GL_EXT_texture_compression_dxt1
  GL_EXT_texture_lod_bias
  GL_EXT_blend_minmax
  GL_EXT_multi_draw_arrays

to APIspec.xml and get_gen.py.  Some of the enums are not avaiable in
the header files and the defining extensions are disabled.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
29bd20ad14 mesa/es: Add more extensions to glapi.
This commit adds definitions of

  GL_OES_texture_half_float_linear, GL_OES_texture_float_linear
  GL_OES_texture_half_float, GL_OES_texture_float
  GL_OES_vertex_half_float
  GL_OES_vertex_type_10_10_10_2
  GL_OES_get_program_binary
  GL_EXT_texture_compression_dxt1
  GL_EXT_texture_format_BGRA8888
  GL_EXT_texture_lod_bias
  GL_EXT_blend_minmax
  GL_EXT_read_format_bgra
  GL_EXT_multi_draw_arrays

to glapi.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
a2d21f67f9 mesa/es: Generate code for special functions.
es_generator.py did not generate code for special functions.  They were
supposed to be defined elsewhere.  But as a result, parameter checking
was also skipped.  This commit changes the way special functions are
called so that parameter checking is always performed.

When there is nothing to check, the check functions becomes macros
expanding to the real functions, as an optimization.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
f7d23dfef5 mesa/es: Remove unused code in es_generator.py.
Remove unused GetLoopSizeExpression.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
e0ab739c06 mesa/es: Generate _mesa_GetFixedv.
Have get_gen.py generate _mesa_GetFixedv.  The generated function does
all the checkings and thus simplifies APIspec.xml a bit.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
c3bd857917 mesa/es: Add a sanity check to APIspec.py.
Some attributes are constant in a switch.  Raise an exception if they
are not.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
8264a6a8a6 mesa/es: Switch to APIspec.xml.
Update Makefile and ES generator to use APIspec.xml.  Remove APIspec.txt
and related files.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
0c1a7bbe0d mesa/es: Add APIspec.xml and its parser.
APIspec.xml is based on APIspec.txt.  The new format has less code
duplications and should be easier to read.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-04 14:15:15 -07:00
Chia-I Wu
9f38553018 Update config linux-opengl-es.
Build demos that require EGL_MESA_screen_surface, and build egl_i915.so
that supports EGL_MESA_screen_surface.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:25:00 -07:00
Chia-I Wu
b30876658b progs/es1: Port eglgears to OpenGL ES 1.1.
This demo requires EGL_MESA_screen_surface to run.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:24:53 -07:00
Chia-I Wu
381cbc7192 progs/es1: Port egltri to OpenGL ES 1.1.
This demo requires EGL_MESA_screen_surface to run.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:24:39 -07:00
Chia-I Wu
4b9cc50345 st/egl: Allow APIs other than OpenGL.
This is done by stopping linking to libmesagallium.a and removing DRI
related stuff.  The state tracker an application links to decides the
API supported.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:24:26 -07:00
Chia-I Wu
5f0ea53747 egl_softpipe: Clean up Makefile.
Fix generation of depend.  Link to the dynamic libraries used.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:24:10 -07:00
Chia-I Wu
0b9f0ba706 progs/es: Add .gitignore.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:23:47 -07:00
Chia-I Wu
9de051e85e mesa/es: Add .gitignore.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-10 11:23:40 -07:00
Chia-I Wu
97ea8e9263 Add new config for OpenGL ES.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:24 -07:00
Chia-I Wu
1046f70a7d gallium: Allow state trackers to install files.
State trackers like es or vega need to install their libraries.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:24 -07:00
Chia-I Wu
7fb41df2cb mesa/main: linear_to_nonlinear is not always available.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:24 -07:00
Chia-I Wu
37dca7955a mesa/es: Improve support for parallel execution of make.
Running make with -j for the first time might fail because glapi headers
haven't been generated.  This commit should make it more reliable.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:23 -07:00
Chia-I Wu
f1c7874cd9 mesa/es: Fix symbol conflicts and warnings.
drawtex.c was listed in LOCAL_ES1_SOURCES twice.  My mistake when
merging the patches.

Also, run gl_apitemp.py with -c to silence warnings and add target
"install".

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:23 -07:00
Chia-I Wu
1af44e9e5a glapi: Add OpenGL ES compatibility mode to scripts.
When the mode is on, the scripts would generate headers that are
suitable for OpenGL ES.  There are two differences.  One is that they
will generate function prototypes for OpenGL ES specific functions.  The
other is that, when a function has multiple names, SET/GET/CALL macros
would be generated for each of names.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-06 14:19:23 -07:00
Chia-I Wu
5b85cada60 progs/es: OpenGL ES 1.x and 2.X demo programs.
The demo programs are written by Brian Paul, and cherry-picked from
opengl-es branch.  Several minor issues such as a linking problem are
fixed.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:21 -07:00
Chia-I Wu
d14ac1073c st/es: Add OpenGL ES state trackers.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:21 -07:00
Chia-I Wu
34064756a5 mesa/es: Add support for GL_OES_draw_texture.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:20 -07:00
Chia-I Wu
bfa66bd6f9 mesa/es: Add OpenGL ES overlay.
This is primitive support for OpenGL ES.  It uses a subset of mesa
sources to build libesXgallium.a and libesXapi.a, where X is 1 for
OpenGL ES 1.x, 2 for OpenGL ES 2.x.  The static libraries serve the same
purpose as libmesagallium.a and libglapi.a do for OpenGL.

This is based on the work of opengl-es branch.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:20 -07:00
Chia-I Wu
f68bf0621d mesa/es: Add OpenGL ES XMLs.
These XMLs define OpenGL ES 1.x and 2.x APIs.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:20 -07:00
Chia-I Wu
7cdf8ab096 mesa/main: Make _mesa_TexGenf and _mesa_GetTexGenfv global again.
They are needed by OpenGL ES overlay.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:20 -07:00
Chia-I Wu
5b426288c2 glapi: Include headers with directory prefixes.
This allows different sets of generated sources and headers to be used.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:11 -07:00
Chia-I Wu
7df4c7e1b8 glapi: Avoid hardcoded category names in remap helper script.
The output of the script is unchanged.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:10 -07:00
Chia-I Wu
6418f836d4 glapi: Add is_abi() to test if a function is in the ABI.
The test is done by checking if the offset is manually assigned.  The
generated headers are unchanged.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:10 -07:00
Chia-I Wu
8d2edbf139 mesa/main: Add more OpenGL ES types to glheader.h.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:10 -07:00
Chia-I Wu
c3d61d3785 mesa/main: Add support for point size array in _mesa_GetPointerv.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:04:10 -07:00
Chia-I Wu
6678f597e7 gallium/xlib: Fix missing symbols when GLX_INDIRECT_RENDERING is defined.
When GLX_INDIRECT_RENDERING is defined, some symbols are used in
libglapi.a but are not defined.  Define them through the help of
glapitemp.h.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:03:57 -07:00
Chia-I Wu
888429360a mesa/xlib: Fix missing symbols when GLX_INDIRECT_RENDERING is defined.
When GLX_INDIRECT_RENDERING is defined, some symbols are used in
libglapi.a but are not defined.  Define them through the help of
glapitemp.h.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:03:57 -07:00
Chia-I Wu
7870298086 glapi: Allow normal entry points to be skipped.
Reorganize glapitemp.h such that it is possible to skip normal entry
points or protocol entry points by defining
_GLAPI_SKIP_NORMAL_ENTRY_POINTS or _GLAPI_SKIP_PROTO_ENTRY_POINTS.

Protocol entry points are those with different GLX protocols.  They are
skipped in libglapi.a when GLX_INDIRECT_RENDERING is defined.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-11-05 20:03:56 -07:00
Brian Paul
d971069fc6 mesa: fix infinite loop bug in _mesa_drawbuffers()
Fixes bug 24946.
This regression came from 8df699b3bb.
2009-11-05 13:17:21 -07:00
José Fonseca
67034b9efc softpipe: Implement PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE for destination.
It is a valid and tested combination on D3D9.
2009-11-05 19:44:07 +00:00
Cooper Yuan
e0590159ce g3dvl: remove a debug line 2009-11-05 16:06:01 +08:00
Cooper Yuan
c621c100b2 g3dvl: add scissor setting 2009-11-05 15:59:27 +08:00
Marek Olšák
c2e47191d7 r300g: add polygon mode
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Marek Olšák
4671005a43 r300g: fix the size of CS when emitting the fragprog constant buffer
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Marek Olšák
07190888bd r300g: set the correct offset in a colorbuffer surface
Suggested by Joakim Sindholt.

Also, put flushing of colorbuffers _before_ the framebuffer state setup,
suggested by docs.

Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Marek Olšák
ad96c0d851 r300g: add color channel masking
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Brian Paul
898de4a9d5 Merge branch 'mesa_7_6_branch'
Conflicts:

	src/mesa/drivers/windows/gdi/mesa.def
2009-11-04 17:57:20 -07:00
Brian Paul
1c3f7ab74c vbo: fix out-of-bounds array access
The exec->vtx.inputs[] array was being written past its end.  This was
clobbering the following vbo_exec_context::eval state.  Probably not noticed
since evaluators and immediate mode rendering don't happen at the same time.

Fixed the loop in vbo_exec_vtx_init().
Changed the size of the vbo_exec_context::vtx.arrays[] array.
Added a bunch of debug-build assertions.

Issue found by Vinson Lee.
2009-11-04 17:51:28 -07:00
Brian Paul
bc4ad7c2ae mesa: fix broken pack_histogram() case for GLhalf 2009-11-04 17:42:30 -07:00