summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common
AgeCommit message (Collapse)Author
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
2009-10-08mesa: remove a bunch of gl_renderbuffer fieldsBrian Paul
_ActualFormat is replaced by Format (MESA_FORMAT_x). ColorEncoding, ComponentType, RedBits, GreenBits, BlueBits, etc. are all replaced by MESA_FORMAT_x queries.
2009-09-30mesa: replace gl_texture_format with gl_formatBrian Paul
Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum. ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x. gl_texture_format will go away next.
2009-09-19glapi: regenerated filesBrian Paul
2009-09-08glapi: Add ARB_draw_elements_base_vertexEric Anholt
2009-09-03Eliminate trailing whitespace in extension_helper.cIan Romanick
2009-09-03ARB sync: Regenerate files from previous commitIan Romanick
2009-09-01dri: remove unused meta_clear_tris()Brian Paul
2009-08-25Revert "glx: Make drawables persistent untill they are changed by ↵Pauli Nieminen
glXMakeCurrent" This commit was not mean to end in to master yet. It is still queston if this right design to fix the problem. This reverts commit 45e3be3c07f543f3f2869ba7750ba4695cd25122.
2009-08-21glx: Make drawables persistent untill they are changed by glXMakeCurrentPauli Nieminen
This fixes bug that xdemos/manywin would segfault if it was run with command ./manywin 2. Demo is tring to call glXSwapBuffers while another context was bind using glXMakeCurrent. Fix is simple makes drawable and readable persistent untill they change or context is destroyed. I found a logic error when same dri context is used for multiple drawables which caused readable and drawable to fall out of sync in special case. Fix is simple just updating drawables more often than in original patch. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-11mesa/glapi: regenerated files from gl_API.xmlBrian Paul
2009-08-07intel: Fix googleearth by avoiding GL_VIEWPORT_BIT in meta clear push/popEric Anholt
I have no idea why this fixes things, but being more efficient sounds good anyway. Fixes regression in 99d07d0f91ddd37926d08f4e7f10d55cac28d9a7 where most of the lit half of the world was not drawn.
2009-08-07dri: Fix problems with unitialized values in dri screen object.Pauli Nieminen
This fixes crash in r200 KMS driver when pSAREA was set to 1 randomly because of memory wasn't cleared. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-06mesa: IgnoresJakob Bornecrantz
Got tired of seeing these files in git status all the time
2009-07-27mesa: regenerated fileBrian Paul
2009-07-15intel/radeon: add common metaops code.Dave Airlie
Move all the metaops to a dri_metaops file and port radeon/intel to use the new common meta ops code.
2009-07-08glx: death to RCS tagRALOVICH, Kristóf
2009-06-19mesa: regenerated files related to GL_ARB_vertex_array_objectBrian Paul
2009-06-19Merge branch 'ext-provoking-vertex'Brian Paul
Conflicts: docs/relnotes-7.6.html progs/tests/Makefile src/gallium/drivers/softpipe/sp_prim_vbuf.c src/glx/x11/indirect.c src/mesa/glapi/Makefile src/mesa/glapi/dispatch.h src/mesa/glapi/glapioffsets.h src/mesa/glapi/glapitable.h src/mesa/glapi/glapitemp.h src/mesa/glapi/glprocs.h src/mesa/main/dlist.c src/mesa/main/enums.c src/mesa/sparc/glapi_sparc.S src/mesa/x86-64/glapi_x86-64.S src/mesa/x86/glapi_x86.S
2009-06-17mesa driconf: Add macro to specify an option with a quoted default value.Thomas Hellstrom
The default values true and false will expand to "1" and "0" when gcc -std=c99, causing bool option defaults to generate runtime failures. One solution is to specify bool option defaults quoted as "true" and "false". Add a macro to assist this. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2009-06-17GLX: attempt to fix glean makeCurrent test cases.Dave Airlie
Two parts to this: One we don't keep pointers to possibly freed memory anymore once we unbind the drawables from the context. Brian I need to figure out what the comment you made there, can we get a glean/piglit test so we can fix it properly? If the new gc is the same as the oldGC, we call the unbind even though we just bound it in that function. doh.