summaryrefslogtreecommitdiff
path: root/src/glx
AgeCommit message (Collapse)Author
2009-06-17GLX: attempt to fix glean makeCurrent test cases.Brian Paul
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. (cherry picked from master, commit 77506dac8e81e9548a7e9680ce367175fe5747af)
2009-05-18Initialize psp->waitX/waitGL for swrast_dri.so.Aidan Thornton
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21053 .
2009-05-12glXChooseVisual: Only consider fbconfig if we can get the corresponding visual.Michel Dänzer
This can fail, e.g. when XLIB_SKIP_ARGB_VISUALS=1 is set. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524794 and http://bugs.freedesktop.org/show_bug.cgi?id=21600 .
2009-05-04glx: replace Xmalloc() calls with Xcalloc()Brian Paul
Fixes a bug where psp->WaitX was uninitialized. Reported by Chris Clayton.
2009-04-24DRI2: Implement interface for drivers to access DRI2GetBuffersWithFormatIan Romanick
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-24DRI2: Implement protocol for DRI2GetBuffersWithFormatIan Romanick
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-15glx: added null pointer check in glXGetFBConfigs()Brian Paul
Fixes segfault seen with glxinfo with NVIDIA OpenGL.
2009-04-14glx: Make glXGetScreenDriver() work for DRI2Adam Jackson
2009-04-09DRI2: Assume that there is always a front bufferIan Romanick
Assume that the front-buffer exists even if the server didn't tell the client that it exists. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-09DRI2: Provide an interface for drivers to flush front-buffer renderingIan Romanick
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-03glx: remove unused local var in determineTextureFormat()Brian Paul
2009-04-02glx: MakeCurrent fixes.Thomas Hellstrom
1) If MakeContextCurrent is called with (NULL, None, None), Don't send the request to the X server if the current context is direct. 2) Return BadMatch in some error cases according to the glx spec. 3) If MakeContextCurrent is called for a context which is current in another thread, return BadAccess according to the glx spec. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-03-31Fix compiling indirect.c when GLX_DIRECT_RENDERING is not definedJeremy Huddleston
(cherry picked from commit b65bc1b6cb72df950c2e26446936804dfcdc432c)
2009-03-25define __builtin_expect for non-gcc compilers in two more glx filesAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-03-25Revert "dri2: Avoid round-tripping on DRI2GetBuffers for the same set of ↵Michel Dänzer
buffers." This scheme breaks when the display connection doesn't receive ConfigureNotify events. This caused reporoducible problems (cropped / misplaced output) when starting a 3D application in a guest operating system in VMware Workstation. This reverts commit dd1c68f15123a889a3ce9d2afe724e272d163e32. Conflicts: src/glx/x11/dri2_glx.c
2009-03-20Fix DRI2 accelerated EXT_texture_from_pixmap with GL_RGB format.Eric Anholt
This requires upgrading the interface so that the argument to glXBindTexImageEXT isn't just dropped on the floor. Note that this only fixes the accelerated path on Intel, as Mesa's texture format support is missing x8r8g8b8 support (right now, GL_RGB textures get uploaded as a8r8gb8, but in this case we're not doing the upload so we can't really work around it that way). Fixes bugs with compositors trying to use shaders that use alpha channels, on windows without a valid alpha channel. Bug #19910 and likely others as well. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2009-03-12regenerate glapiRoland Scheidegger
2009-02-26mesa: Resurrect SPARC asm code.David S. Miller
This rewrites the sparc GLAPI code so that it's PIC friendly and works with all of the TLS/PTHREADS/64-bit/32-bit combinations properly. As a result we can turn SPARC asm back on. Currently it's only enabled on Linux, as that's the only place where I can test this stuff out. For the moment the cliptest SPARC asm routines are disabled as they are non-working. The problem is that they use register %g7 as a temporary which is where the threading libraries store the thread pointer on SPARC. I will fix that code up in a future change as it's a pretty important routine to optimize. Like x86 we do the runtime patch as a pthread once-invoked initializer in init_glapi_relocs(). Unlike x86, however, our GLAPI stubs on SPARC are just two instruction sequences that branch to a trampoline and put the GLAPI offset into a register. The trampoline is what we run-time patch. The stubs thus all look like: glFoo: ba __glapi_sparc_foo_stub sethi GLAPI_OFFSET(glFOO) * PTR_SIZE, %g3 This actually makes generate_entrypoint() a lot simpler on SPARC. For this case in generate_entrypoint() we generate stubs using a 'call' instead of the 'ba' above to make sure it can reach. In order to get a proper tail call going here, in the unpatched case, we do several tricks. To get the current PC, for example, we save the return address register into a temporary, do a call, save the return address register written by the call to another temporary, then restore the original return address register value. This is to avoid having to allocate a stack frame. This is necessary for PIC address formation. This new GLAPI scheme lets us get rid of the ugly SPARC GLAPI hacks in __glXInitialize() and one_time_init(). Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-23glx: add support for a reallyFlush() function before swap occurs.Alan Hourihane
2009-02-16dri2: support glXWaitX & glXWaitGL by using fake front buffer.Alan Hourihane
2009-02-10dri2: Don't crash if the server returns more buffers than expected.Eric Anholt
2009-02-10dri2: Initialize variables for the getbuffers round-trip reduction.Eric Anholt
Missed setting the initial values which usually didn't hurt at runtime.
2009-02-09mesa: merge gallium-0.2 into gallium-master-mergeBrian Paul
Merge commit 'origin/gallium-0.2' into gallium-master-merge Conflicts: Makefile docs/relnotes-7.4.html docs/relnotes.html src/mesa/drivers/dri/i965/brw_wm.h src/mesa/main/imports.c src/mesa/main/mtypes.h src/mesa/main/texcompress.c src/mesa/main/texenvprogram.c src/mesa/main/version.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_draw.c
2009-02-02dri2: Avoid round-tripping on DRI2GetBuffers for the same set of buffers.Eric Anholt
We only wanted to request when asked for the same set of buffers when a resize has happened. We can just watch the protocol stream for a ConfigureNotify and flag to do it then. This is about a 5% win from doing two glViewport()s per frame in openarena.
2009-01-28Make GLX_SGIX_pbuffer mandatoryIan Romanick
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-01-27dri2: add complaints for more initialization failures.Eric Anholt
Somehow we're running into DRI2Authenticate failing, and silent demotion to swrast is bad.
2009-01-22Merge commit 'origin/master' into gallium-0.2Alan Hourihane
Conflicts: windows/VC8/mesa/osmesa/osmesa.vcproj windows/VC8/progs/demos/gears.vcproj windows/VC8/progs/progs.sln
2009-01-20Fix issues with glXMakeContextCurrent and glXMakeCurrentReadSGIIan Romanick
There were several bugs in the infrastructure for these two routines. 1. GLX_ALIAS was incorrectly used. The function and its alias must be identical! glXMakeContextCurrent / glXMakeCurrentReadSGI and MakeContextCurrent had different parameters. This caused the last parameter of MakeContextCurrent to get random values. 2. We based the implementation of glXMakeContextCurrent on the manual page instead of the GLX spec. The GLX spec says that glXMakeContextCurrent can be passed a Window as a drawable. When this happens, it will behave just like glXMakeCurrentReadSGI or glXMakeCurrent. 3. If there was a problem finding or creating the DRI drawable, MakeContextCurrent would crash instead of returning an error. This commit fixes all three issues, and fixes bug #18367 and bug #19625.
2009-01-18glx: gcc 2.95 build fix (move declaration before code)Brian Paul
Adapted from patch by Matthieu Herbb <matthieu.herrb@laas.fr>
2009-01-14Merge commit 'origin/master' into gallium-0.2Alan Hourihane
Conflicts: docs/install.html docs/relnotes-7.3.html src/mesa/shader/slang/slang_codegen.c src/mesa/shader/slang/slang_compile.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_preprocess.c src/mesa/shader/slang/slang_preprocess.h
2009-01-11Build fixes for gcc 2.95Matthieu Herrb
2009-01-11Fix build with GCC 2.95.Owain G. Ainsworth
2008-12-15Merge commit 'origin/master' into gallium-0.2Alan Hourihane
2008-12-14GLX: Change resulting from previous commitIan Romanick
Commit db61cbfa2aa241da49589331d8b6875d9a77d826 made modifications to the protocol generator data and scripts. This commit represents the changes to the generated files resulting from the previous changes. This is the client-side part of the fix for bugzilla #11003.
2008-12-08Merge commit 'origin/master' into gallium-0.2Alan Hourihane
Conflicts: progs/glsl/Makefile
2008-12-01Bump dri2proto requirement to 1.99.3, drop CopyRegion bitmask from protocol.Kristian Høgsberg
2008-11-28Merge commit 'origin/master' into gallium-0.2Alan Hourihane
2008-11-27Revert "glx: xcbified visual and FBConfig choosing"RALOVICH, Kristóf
This reverts commit 62688f11355cfa865d420755aa159875b425cc9b.
2008-11-27Revert "glx: revert using nonexsisten XCB version of glXGetFBConfigsSGIX"RALOVICH, Kristóf
This reverts commit 53698765019e50172be25a4ff48c83d54f0e7981.
2008-11-26glx: revert using nonexsisten XCB version of glXGetFBConfigsSGIXRALOVICH, Kristóf
This uses a GLX VendorPrivate request. VendorPrivates are real GLX API calls but use the same protocol request. XCB does not currently support specific VendorPrivetes directly. See eg.: http://lists.freedesktop.org/archives/xcb/2008-November/004036.html for more information.
2008-11-26glx: remove XCB debug leftoverRALOVICH, Kristóf
2008-11-26glx: xcbified glXSwapBuffersRALOVICH, Kristóf
2008-11-26glx: xcbified visual and FBConfig choosingRALOVICH, Kristóf
2008-11-26glx: xcbified __glXClientInfoRALOVICH, Kristóf
2008-11-26glx: no graphics context during initializationRALOVICH, Kristóf
2008-11-26glx: xcbified __glXIsDirectRALOVICH, Kristóf
2008-11-26glx: missing static on local functionRALOVICH, Kristóf
2008-11-26glx: use __glXGetStringRALOVICH, Kristóf
2008-11-26glx: use __glXQueryServerStringRALOVICH, Kristóf
2008-11-26glx: implement __glXGetString, hide __glXGetStringFromServerRALOVICH, Kristóf