summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common
AgeCommit message (Collapse)Author
2010-03-23dri: fix dri_test.c for non-TLS buildLuca Barbieri
_glapi_Context and _glapi_Dispatch have different constness between TLS and non-TLS builds.
2010-03-23dri: add _glthread_GetID to dri_test.c dummy glapiLuca Barbieri
2010-03-23dri: make unresolved symbol test link work even without a libGL.soLuca Barbieri
Currently the test link uses -lGL to define the glapi symbols. This makes it impossible to build DRI drivers on systems without Mesa installed and without building the libGL from the Mesa tree first. Some automated build systems trigger this problem. This commit removes -lGL and instead adds a dummy implementation of glapi to dri_test.c This, along with Kristian's commit, should fix all known regressions due to the addition of unresolved symbol checking.
2010-03-23dri: test whether the built drivers have unresolved symbolsLuca Barbieri
This is a different approach to solving this problem that the patch I previously posted, and unlike that, should not cause any problems. Right now undefined symbols in DRI drivers will still allow the build to succeed. As a result, people modifying drivers they cannot test risk creating unloadable drivers with no easy way of automatically avoiding it. For instance, the modifications to nv50 for context transfers caused such an issue recently. Unfortunately, just adding -Wl,--no-undefined doesn't work, because the DRI drivers depend on glapi symbols, but do not depend on libGL.so.1 Adding -lGL is not the correct solution since DRI drivers are not loaded just by libGL, but also by X and possibly by other clients. So, this patch simply tries to build an executable linked to the DRI driver and to libGL. If the DRI driver contains any undefined symbols not satisfied by its dependencies or by libGL, this will fail. This solution does not alter the built drivers, and does not significantly slow down the build process. All classic DRI drivers as well as all the Gallium drivers with configure options compiled successfully with this change. Thanks to Xavier Chantry <chantry.xavier@gmail.com> and Michel Daenzer <michel@daenzer.net> for helping with this. Signed-off-by: Luca Barbieri <luca@luca-barbieri.com> Acked-by: Brian Paul <brian.e.paul@gmail.com>
2010-03-21rename dri_sw to drisw_util for consistencyGeorge Sapountzis
2010-03-15dri/common: mv __driUtilMessage to utils.cGeorge Sapountzis
allows to link with xmlconfig without dri_util, and has nothing drm-specific.
2010-03-15dri/swrast: drop mtypes.h from dri_swGeorge Sapountzis
2010-03-15dri/swrast: port to dri_sw (drawable)George Sapountzis
2010-03-15dri/swrast: port to dri_sw (context)George Sapountzis
2010-03-15dri: add dri_sw.c helperGeorge Sapountzis
This is dri_util.c stripped from the drm-specific bits and will be used for both classic and gallium swrast_dri.so
2010-03-12Grammar and spelling fixesJeff Smith
Signed-off-by: Jeff Smith <whydoubt@yahoo.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2010-03-04DRI: Put back missing break-statementIan Romanick
The break in the __DRI_ATTRIB_RENDER_TYPE case was accidentally removed in commit 5cf2c5851bcd29c2d53bb04ab692b4b156f5a74d. This puts it back. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03DRI: Remove support for color-index visualsIan Romanick
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-02-27dri: Remove dead code.Vinson Lee
2010-02-27dri: Add assert to check for null pointer dereference.Vinson Lee
2010-02-27dri: Assert pointer is not null before dereferencing.Vinson Lee
2010-02-26remove hack for miniglx from dri/utils.cGeorge Sapountzis
2010-02-24dri: remove old assertion (see bug 26734)Brian Paul
(cherry picked from commit 293f4d51b473783d5c5ab773a1c438e0a2fe46f2)
2010-02-24intel: Implement DRI image extensionKristian Høgsberg
2010-02-19Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg
2010-02-17intel: Implement the DRI2 invalidate function properlyKristian Høgsberg
This uses a stamp mechanisms to mark the DRI drawable as invalid. Instead of immediately updating the buffers we just bump the drawable stamp and call out to DRI2GetBuffers "later". "Later" used to be at LOCK_HARDWARE time, and this patch brings back callouts at the points where we used to call LOCK_HARDWARE. A new function, intel_prepare_render(), is called where we used to call LOCK_HARDWARE, and if the buffers are invalid, we call out to DRI2GetBuffers there. This lets us invalidate buffers only when notified instead of on every glViewport() call. If the loader calls the DRI invalidate entrypoint, we disable viewport triggered buffer invalidation. Additionally, we can clean up the old viewport mechanism a bit, since we can just invalidate the buffers and not worry about reentrancy and whatnot.
2010-02-16dri2: Event driven buffer validation.Francisco Jerez
When a buffer invalidation event is received from the X server, the "invalidate" hook of the DRI2 flush extension is executed: A generic implementation (dri2InvalidateDrawable) is provided that just bumps the "pStamp" sequence number in __DRIdrawableRec. For old servers not supporting buffer invalidation events, the invalidate hook will be called before flushing the fake front/back buffer (that's typically once per frame -- not a lot worse than the situation we were in before). No effort has been made on preserving backwards compatibility with version 2 of the flush extension, but I think it's acceptable because AFAIK no released stack is making use of it. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-02-16dri2: Allocate cliprect as part of the __DRIdrawableRecKristian Høgsberg
2010-02-12dri: Remove unnecessary headers.Vinson Lee
2010-02-12dri: Store the loader private passed in at dri context creationKristian Høgsberg
We just threw it away before, but we haven't had a use for it yet.
2010-02-10dri: Allow selective generation of accum. buffer configsIan Romanick
Modify the interface to driCreateConfigs allowing drivers to not expose configs with an accumuation buffer. All of the drivers calling function have been updated to pass true for the accumulation selector. This maintains the current behavior. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2010-01-22Merge branch 'mesa_7_7_branch'Brian Paul
Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c
2010-01-22Fix PowerPC related typo in spantmp2.hRuediger Oertel
Signed-off-by: Matthias Hopf <mhopf@suse.de> Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-21dri: Remove unnecessary glapi headers.Chia-I Wu
They are not used at all.
2010-01-11Merge branch 'master' of ssh://people.freedesktop.org/~jbarnes/mesaJesse Barnes
Conflicts due to DRI1 removal: src/mesa/drivers/dri/intel/intel_context.c src/mesa/drivers/dri/intel/intel_screen.c
2010-01-08DRI2: add SwapBuffers supportJesse Barnes
Support the new DRI2 protocol request, DRI2SwapBuffers, in both direct and indirect rendering context. This request allows the display server to optimize back->front swaps (e.g. through page flipping) and allows us to more easily support other GLX features like swap interval and the OML sync extension in DRI2. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-04Push __driDriverExtensions out of dri_util.c and into the driversKristian Høgsberg
This lets the individual drivers select which extensions to advertise. Specifically, most drivers (tdfx, sis, savage etc) don't support DRI2 but the shared extension list in dri_util.c does list the DRI2 extension. Pushing the list into the drivers, lets us avoid listing the DRI2 extension for drivers that don't support it.
2010-01-04Remove leftover __DRI{screen,drawable,context}Private referencesKristian Høgsberg
As part of the DRI driver interface rewrite I merged __DRIscreenPrivate and __DRIscreen, and likewise for __DRIdrawablePrivate and __DRIcontextPrivate. I left typedefs in place though, to avoid renaming all the *Private use internal to the driver. That was probably a mistake, and it turns out a one-line find+sed combo can do the mass rename. Better late than never.
2009-12-16Merge branch 'mesa_7_6_branch' into mesa_7_7_branchIan Romanick
Conflicts: src/mesa/drivers/dri/unichrome/via_ioctl.c src/mesa/drivers/dri/unichrome/via_screen.c src/mesa/main/version.h src/mesa/state_tracker/st_atom.c
2009-12-15dri: Initialize variable in driBindContext.Vinson Lee
2009-12-10spantmp2: Add support for GL_BGR / GL_UNSIGNED_INT_8_8_8_8_REVIan Romanick
This is really for MESA_FORMAT_XRGB8888. Clearly spantmp2.h needs some re-work. Any volunteers?
2009-12-06dri: Fix potential null pointer dereference in driBindContext.Vinson Lee
(cherry picked from commit 919898e92fa23ff71a59d86a46ff0886a6f34e4d)
2009-12-06dri: Fix potential null pointer deference in dri_put_drawable.Vinson Lee
(cherry picked from commit 364070b1f2b08d43fb205ec198894a35bec6b2f3)
2009-11-28dri: Fix potential null pointer dereference in driBindContext.Vinson Lee
2009-11-24dri: Fix potential null pointer deference in dri_put_drawable.Vinson Lee
2009-11-17Remove unconditional use of glibc specific bswap_16() macro.Michel Dänzer
Fixes unresolved symbol bswap_16 on non-glibc or little endian glibc platforms.
2009-11-17radeon: Fix software fallbacks with KMS on big endian.Michel Dänzer
2009-10-28Merge branch 'texformat-rework'Brian Paul
Conflicts: src/mesa/drivers/dri/radeon/radeon_fbo.c src/mesa/drivers/dri/s3v/s3v_tex.c src/mesa/drivers/dri/s3v/s3v_xmesa.c src/mesa/drivers/dri/trident/trident_context.c src/mesa/main/debug.c src/mesa/main/mipmap.c src/mesa/main/texformat.c src/mesa/main/texgetimage.c
2009-10-23mesa/dri: Remove extension_helper.h.Chia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-23mesa: Enable remap table in core.Chia-I Wu
This enables the remap table in core. driInitExtensions is adapted to use the remap table. All uses of extension_helper.h are replaced by remap_helper.h. The chicken-egg problem of the DRI drivers is also solved. It is now also possible to pass NULL extensions to driInitExtensions. It will cause driInitExtensions to map all known functions. This functionality is used by software drivers and EGL_i915. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-22dri/drivers: update driNewRenderbuffer() to take a gl_formatBrian Paul
Now pass a specific MESA_FORMAT_x token to indicate the renderbuffer's format. This is better than passing a GLenum and having to guess the specific format. I'm unable to test all the drivers, but any issues should be easy to fix.
2009-10-22Nuke s3v.Corbin Simpson
As per FDO #17889.
2009-10-15dri/common: updated #includesBrian Paul
2009-10-15dri/common: use _mesa_little_endian() and update commentsBrian Paul
2009-10-15dri/common: fix broken _dri_texformat_* initializationsBrian Paul