Commit graph

37181 commits

Author SHA1 Message Date
nobled
f914cd1796 st/vega: s/free/FREE for matching MALLOC/CALLOC
[Manually fix a conflict in vg_context.c by Chia-I Wu]
2010-06-30 14:25:43 +08:00
nobled
78215b02e4 st/xorg: s/free/FREE for matching MALLOC/CALLOC 2010-06-30 14:16:20 +08:00
Chia-I Wu
8977879ec9 st/egl: Add egl-gdi target.
The target supports OpenVG on Windows with software rasterizer.  The
egl_g3d_loader defined by the target supports arbitrary client APIs and
window systems.  It is the SConscript that limits the support to OpenVG
and GDI.

This commit also fixes a typo in gdi backend.
2010-06-30 14:00:43 +08:00
Chia-I Wu
2f0b01826d mesa: Use fpclassify for GL_OES_query_matrix on OpenBSD and NetBSD.
Patch from Brad Smith <brad@comstyle.com>

  The attached patch allows the GL_OES_query_matrix function to use the
  systems fpclassify() for OpenBSD and NetBSD.
2010-06-30 13:01:10 +08:00
Zack Rusin
0d68d01347 mesa: make the arguments in the asm statemants optional
geometry shaders emit/end functions don't take any arguments
2010-06-29 21:45:41 -04:00
Eric Anholt
524745bc55 ir_to_mesa: Add support for ir_unop_abs. 2010-06-29 17:18:28 -07:00
Eric Anholt
ba9bd708cb ir_to_mesa: Add support for dFdx, dFdy. 2010-06-29 17:18:28 -07:00
Eric Anholt
d4f7e660dd ir_to_mesa: Start adding support for texture instructions.
Fixes:
glsl-fs-bug25902
glsl-fs-sampler-numbering
glsl-lod-bias
2010-06-29 17:18:28 -07:00
Kenneth Graunke
506199b852 glsl2: Keep the same number of components in implicit conversions.
Fixes piglit test glsl-implicit-conversion-01.
2010-06-29 16:31:52 -07:00
Ian Romanick
22971e922a glsl2: Make gl_MaxDrawBuffers available in the vertex shader 2010-06-29 15:32:19 -07:00
Ian Romanick
e2f84f04e5 glsl2: Make gl_MaxDrawBuffers available in the fragment shader 2010-06-29 15:32:15 -07:00
Ian Romanick
9c4b1f2bad glsl2: Make gl_FragData be available in GLSL 1.10 too 2010-06-29 15:19:42 -07:00
Ian Romanick
5e18b051c0 glsl2: Pass MaxDrawBuffers from core Mesa into the GLSL compiler 2010-06-29 15:19:38 -07:00
Marek Olšák
b939f83eb7 r300g: add workaround for multiple contexts 2010-06-30 00:03:04 +02:00
Marek Olšák
6a34287bb5 r300g: move one flush from winsys to the context
This flush happens when changing the tiling flags, and it should really be
done in the context.

I hope this fixes FDO bug #28630.
2010-06-30 00:03:04 +02:00
Brian Paul
3d6101245b llvmpipe: don't crash/assert on out of memory
Check for null pointers and return early, etc.
2010-06-29 15:40:19 -06:00
Brian Paul
249c6735dd llvmpipe: restore call to lp_setup_update_state()
This undoes part of commit 8be645d53a
and fixes fd.o bug 28822 as well as other regressions.

The 'draw' module may issue additional state-change commands while
we're inside the draw_arrays/elements() call so it's important to
check for updated state at this point.
2010-06-29 15:19:01 -06:00
Ian Romanick
efc15f862b glsl_type: Add _mesa_glsl_release_types to release all type related storage 2010-06-29 11:15:40 -07:00
Ian Romanick
e1374d48de glsl_type: All glsl_type objects live in their own talloc context 2010-06-29 11:15:40 -07:00
Ian Romanick
72e627d02a glsl_type: Record type constructors are private 2010-06-29 11:15:39 -07:00
Ian Romanick
49e3577b91 glsl_type: Add get_record_instance method 2010-06-29 11:15:39 -07:00
Ian Romanick
31bcce04b1 glsl_type: Vector, matrix, and sampler type constructors are private 2010-06-29 11:15:39 -07:00
Ian Romanick
e94642eb0d glsl_type: Make all static objects be class private 2010-06-29 11:15:39 -07:00
Ian Romanick
4b6feb0398 glsl2: Use talloc_strdup when generating constructor temporary names 2010-06-29 11:15:26 -07:00
Ian Romanick
12681610f5 glsl_type: Remove vector and matrix constructor generators
All scalar, vector, and matrix constructors are generated in-line
during AST-to-HIR translation.  There is no longer any need to
generate function versions of the constructors.
2010-06-29 11:15:26 -07:00
Ian Romanick
699b247661 glsl2: Don't flatten constructor parameters to scalars
Now that all scalar, vector, and matrix constructors are emitted
in-line, the parameters to these constructors should not be flattened
to a pile of scalars.  Instead, the functions that emit the in-line
constructor bodies can directly write the parameters to the correct
locations in the objects being constructed.
2010-06-29 11:15:26 -07:00
Ian Romanick
81c7e94466 glsl2: Always emit matrix constructors inline 2010-06-29 11:15:26 -07:00
Ian Romanick
c31dcdf57e glsl2: Always emit vector constructors inline 2010-06-29 11:15:26 -07:00
Ian Romanick
6315b68f5f ir_swizzle: Add new constructor, refactor constructors
Adds a new constructor that takes an array of component values.  Refactors
the meat of the two constructors to an init_mask method.
2010-06-29 11:15:26 -07:00
Kenneth Graunke
50577b96ac glsl2: Update TODO. 2010-06-29 11:12:54 -07:00
Kenneth Graunke
6de8256505 glsl2: Check for non-void functions that don't have a return statement.
This doesn't do any control flow analysis to ensure that the return
statements are actually reached.

Fixes piglit tests function5.frag and function-07.vert.
2010-06-29 11:12:54 -07:00
Kenneth Graunke
ac04c257e3 glsl2: Reject return types with qualifiers.
Fixes piglit test return-qualifier.frag.
2010-06-29 11:12:54 -07:00
Kenneth Graunke
28527ed557 glsl2: Add a method for querying if an AST type has any qualifiers. 2010-06-29 11:12:53 -07:00
Kenneth Graunke
18707eba1c glsl2: Check that returned expressions match the function return type.
From my reading of the specification, implicit conversions are not
allowed.  ATI seems to agree, though nVidia allows it without warning.
2010-06-29 11:12:53 -07:00
Ian Romanick
153eca9806 glsl2: Invoke preprocessor before calling the compiler proper 2010-06-29 11:00:58 -07:00
Jakob Bornecrantz
172f3f5eac egl: Check for drm winsys not just the driver name
Also fix pipe_radeon.so not building
2010-06-29 18:25:49 +01:00
José Fonseca
bb6ca7b3f7 draw: Add inline keyword to inline function.
Otherwise gcc will warn about unusued functions.
2010-06-29 14:30:44 +01:00
Jakob Bornecrantz
218da1ef34 i915g: Fix copy pasto 2010-06-29 12:36:40 +01:00
Jakob Bornecrantz
006d02a911 egl: Fix gallium build when EGL is not installed on system 2010-06-29 12:28:41 +01:00
Jakob Bornecrantz
eebb048753 i915g: Add missing egl pipe file 2010-06-29 12:28:15 +01:00
Chia-I Wu
4cb853402b egl: Remove st/egl probe code.
It is no longer needed.
2010-06-29 17:16:20 +08:00
Chia-I Wu
afcea9b115 egl: Do not call drv->Initialize with global mutex locked. 2010-06-29 17:16:20 +08:00
Chia-I Wu
a81ef14228 st/egl: Build a single EGL driver.
This change makes st/egl build a single egl_gallium.so and multiple
st_<API>.so and pipe_<HW>.so.  When a display is initialized, the
corresponding pipe driver will be loaded.  When a context is created,
the corresponding state tracker will be loaded.

Unlike DRI drivers, no ABI compatibility is maintained.  egl_gallium,
pipe drivers and state trackers should always be distributed as a single
package.  As such, there is only a single src/gallium/targets/egl/ that
builds everything for the package.
2010-06-29 17:16:20 +08:00
Chia-I Wu
d5ab243d5a st/egl: Move module loading code to targets.
Several changes are made.  libegl.a no longer defines _eglMain.  It
defines functions to create and destroy a _EGLDriver instead.  The
creation function is called by the targets.  It takes an egl_g3d_loader
as its argument.  The loader is defined by the targets and is in charge
of creating st_api and pipe_screen.  This allows us to move the module
loading code to targets.  Lastly, the modules are now loaded as the
respective contexts are created.
2010-06-29 17:16:20 +08:00
Chia-I Wu
d8e0e11456 st/egl: Reorganize targets.
Merge all targets into targets/egl/.  The target produces
egl_gallium_<HW>.so for each pipe driver and st_<API>.so for each client
APIs.  This enables us to further merge egl_gallium_<HW>.so into
egl_gallium.so later.
2010-06-29 17:16:20 +08:00
Chia-I Wu
ea05299ce5 st/egl: One driver per hardware.
Merge multiple egl_<platform>_<pipe>.so into a single
egl_gallium_<pipe>.so.  The environment variable EGL_PLATFORM is now
used to modify the return value of _eglGetNativePlatform.
2010-06-29 17:16:19 +08:00
Chia-I Wu
f66a4e20c1 st/egl: Introduce native_platform.
Move native_get_name, native_create_probe, native_get_probe_result, and
native_create_display into struct native_platform, and add
native_get_platform to get a handle to the struct.
2010-06-29 17:16:19 +08:00
Chia-I Wu
f9574c5f89 st/egl: Make api_OpenGL support OpenGL ES.
This allows api_OpenGL.so to support OpenGL ES.
2010-06-29 17:16:19 +08:00
Chia-I Wu
57c654324f st/mesa: Add support for multiple APIs.
Add st_gl_api_create_es1 and st_gl_api_create_es2 to create OpeGL ES 1.1
and OpenGL ES 2.0 contexts respectively.
2010-06-29 17:16:19 +08:00
Chia-I Wu
982aba97c5 st_api: Remove st_context::is_visual_supported.
The callback is used by st/vega to check if a visual specifies the
depth/stencil format.  It forces st/vega to be loaded by st/egl to
perform the check.  As noted in EGL spec, the depth/stencil format of a
visual should not affect OpenVG.  It should be better to ignore the
field and always allocate the depth/stencil texture.
2010-06-29 17:16:19 +08:00