Commit graph

35316 commits

Author SHA1 Message Date
Brian Paul
effd33071e llvmpipe: added new lp_memory.[ch] files
Functions for using dummy tiles when we detect OOM conditions.
2010-06-30 12:00:22 -06:00
Brian Paul
87d2c77ed3 draw: fix out of memory handling in polygon stipple stage 2010-06-30 11:46:17 -06:00
Neil Roberts
75acb896c6 glu: Fix some compiler warnings in libtess
When compiled with the more aggressive compiler warnings such as
-Wshadow and -Wempty-body the libtess code gives a lot more
warnings. This fixes the following issues:

* The 'Swap' macro tries to combine multiple statements into one and
  then consume the trailing semicolon by using if(1){/*...*/}else.
  This gives warnings because the else part ends up with an empty
  statement. It also seems a bit dangerous because if the semicolon
  were missed then it would still be valid syntax but it would just
  ignore the following statement. This patch replaces it with the more
  common idiom do { /*...*/ } while(0).

* 'free' was being used as a local variable name but this shadows the
  global function. This has been renamed to 'free_handle'

* TRUE and FALSE were being unconditionally defined. Although this
  isn't currently a problem it seems better to guard them with #ifndef
  because it's quite common for them to be defined in other headers.

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

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-06-30 07:59:39 -06:00
Chia-I Wu
a8815b754d egl: Update MaxSize when a dynamic array is grown. 2010-06-30 18:52:00 +08:00
Chia-I Wu
98ebc8165c egl: Make _eglUnloadDrivers no-op on Windows.
Windows unloads DLLs before atexit.  Make _eglUnloadDrivers no-op on
Windows for now.
2010-06-30 18:32:48 +08:00
Chia-I Wu
c5bc0a8d66 st/egl: Manually free configs on terminate.
The configs should be FREE()ed, not free()ed.  We cannot rely on
_eglCleanupDisplay here.
2010-06-30 18:32:48 +08:00
Chia-I Wu
8b0c6c4a8d egl: Store screens in a dynamic array. 2010-06-30 18:32:48 +08:00
Chia-I Wu
6717a313f2 egl: Store configs in a dynamic array. 2010-06-30 18:32:48 +08:00
Chia-I Wu
106466783f egl: Add dynamic array.
Dynamic arrays will be used to store configs and screens of a display.
2010-06-30 18:32:48 +08:00
Chia-I Wu
2d8e70fcd5 st/vega: Match MALLOC/FREE for vg_shader.
A vg_shader is destroyed with FREE.
2010-06-30 18:32:48 +08:00
José Fonseca
a2311400fe llvmpipe: Add a new scene state to describe scenes which only have state changes.
It's a rare condition, but it may happen if all primitives are
clipped/culled.

For now we just do a no-op rasterization, but we could bypass it.
2010-06-30 11:10:33 +01:00
José Fonseca
4ca3e0d84b llvmpipe: Don't reset the bin when there's a zsbuf bound.
The previous rendering may have secondary effects on the zsbuf.

Fixes the missing tiles on gearbox.
2010-06-30 10:19:50 +01:00
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
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
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
Zack Rusin
da7bd6a90e mesa: initial support for ARB_geometry_shader4
laying down the foundation for everything and implementing most of the
stuff.
linking, gl_VerticesIn and multidimensional inputs are left.
2010-06-28 22:53:21 -04:00
Marek Olšák
0b50fcbd55 util: reference surfaces and sampler views in blitter when saving them
Ooops. This should possibly fix some bugs...
2010-06-29 01:54:26 +02:00
Jakob Bornecrantz
7e1ce791c7 i915g: Add Galahad to targets 2010-06-28 22:33:39 +02:00
Jakob Bornecrantz
77cd1a989b r300g: Galahad for scons as well 2010-06-28 22:27:51 +02:00
Jakob Bornecrantz
2da9d80a4b r300g: Add target defines for Galahad 2010-06-28 22:27:08 +02:00
Jakob Bornecrantz
40d4b414d9 glhd: Build with scons 2010-06-28 22:27:06 +02:00
Jakob Bornecrantz
d12c4c5a62 glhd: Re-integrate with the debug system 2010-06-28 21:52:03 +02:00
Jakob Bornecrantz
2932dd6374 glhd: Remove leftover file 2010-06-28 21:37:03 +02:00
Jakob Bornecrantz
a01e0afd9f Merge branch 'gallium-drm-driver-drescriptor'
Conflicts:
	src/gallium/state_trackers/egl/x11/native_dri2.c
	src/gallium/state_trackers/egl/x11/native_x11.c
	src/gallium/state_trackers/egl/x11/native_x11.h
	src/gallium/state_trackers/xorg/xorg_driver.c
	src/gallium/winsys/radeon/drm/radeon_drm.c
2010-06-28 21:14:45 +02:00
José Fonseca
250b92f3bb llvmpipe: set WRITE_ALL only a per-tile basis in lp_resource_copy(). 2010-06-28 16:33:52 +01:00
José Fonseca
a9e0fda070 llvmpipe: Actually flush in lp_resource_copy()
The cpu_access is redundant in a software rasterizer.
2010-06-28 16:33:21 +01:00
José Fonseca
8be645d53a llvmpipe: Ensure outdated framebuffer state is not reused in lp_setup_bind_framebuffer().
We were starting a scene whenever lp_setup_get_vertex_info() was called by
the draw module. So when when all primitives were culled/clipped, not only
did we create a new scene for nothing, but we end up using the old scene
with the old framebuffer state instead of a new one.

Fix consists in:
- don't call lp_setup_update_state() in lp_setup_get_vertex_info() -- no
  longer necessary
- always setting the scene state before binning a command -- query
  commands were bypassing it
- assert no old scene is reused in lp_setup_bind_framebuffer()
2010-06-28 16:33:05 +01:00
Marek Olšák
ce7a70b8b4 r300g: fix a compile error on non-debug builds 2010-06-27 17:15:23 +02:00
Marek Olšák
57c3f70018 util: fix a memory leak in blitter 2010-06-27 15:13:14 +02:00