summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-05-15Use anonymous mmap() implementation of rtasm_exec_malloc() on darwin, alsoapplegl-vtable-3Jon TURNEY1-1/+1
2014-05-15Add applegl_drawable objectJon TURNEY3-43/+67
Make a start at fixing... The various ways a GLX drawable can be created (GLXCreateWindow, glXCreatePixmap, glXCreatePbuffer, implicit in using glXMakeCurrent on an X window) should applegl_bind_context should use driFetchDrawable() to ensure that an implicitly created drawable is entered into hashes. Remove duplicate glXCreateGLXPbufferSGIX from apple/glx_emtpy.c
2014-05-15Use -Wl,-Bsymbolic, not -Bsymbolic, as beforeJon TURNEY1-1/+1
2014-05-15Wire up SwapBuffers via vtableJon TURNEY2-15/+37
2014-05-15Obvious cases for indirectJon TURNEY2-8/+3
2014-05-15Fix up a few files which didn't get categorized correctlyJon TURNEY1-2/+6
2014-05-15Remove wrapping whole files in #ifdef, unneeded since they are selected to ↵Jon TURNEY11-44/+0
be built in Makefile.am
2014-05-15Enable indirectJon TURNEY6-19/+1
2014-05-15Nore vtable, use the destroyScreen screenrec fn on appleglJon TURNEY1-1/+1
2014-05-15Additional vtablingJon TURNEY3-7/+15
Don't call direct to applegl_create_context, it's in the vtable Don't call direct to applegl_create_context from glXCreateContextAttribsARB(), provide an applegl_create_context_attribs() in the vtable, which does the same thing, although it's unclear that ignoring the context attributes like that is a good idea.
2014-05-15Enable swrast with apple-driJon TURNEY7-34/+35
Remove all the pointless !GLX_USE_APPLEGL guards which prevent swrast from being linked into a apple-dri GLX libGL Make sure that appledri is chosen in preference to swrast unless LIBGL_ALWAYS_SOFTWARE is set After wiring-up swrsast we now have two possible software renderers on darwin, mesa swrast, and the native one. Add an additional env var control to choose between them: LIBGL_ALWAYS_SOFTWARE_NATIVE forces applegl to use a native software renderer LIBGL_ALWAYS_SOFTWARE uses mesa swrast Remove unneeded duplicate glXCreateGLXPixmapMESA() stub from apple/glx_empty.c
2014-05-15Use display vtable for appleglJon TURNEY3-13/+38
Make applegl_create_display look like all the other renderers, setting a vtable in glx_display which points to createScreen and destroyDisplay routines. Actually invoke apple_create_screen and apple_destroy_display via the vtable, rather than putting direct calls under GLX_USE_APPLEGL. This is groundwork for making it so that indirect and swrast rendering are runtime alternatives to appledri
2014-05-15Add Windows-DRIJon TURNEY3-1/+16
HAVE_WINDOWSDRI enables building of a Windows-specific direct rendering interface XXX: TBD: add some code... :D
2014-05-15Fix applegl build for srcdir != builddirJon TURNEY1-0/+2
2014-05-14Fix 'make check' for when we are building only swrastdriJon TURNEY1-1/+5
2014-05-14Add error message when a direct renderer fails because no matching fbConfigs ↵Jon TURNEY4-4/+12
or visuals Add an error message when a direct renderer fails because no matching fbConfigs or visuals could be found. (This can be triggered with a server which reports definite values for MAX_PBUFFFER_(WIDTH|HEIGHT|SIZE))
2014-05-14Ignore pbuffer size attributesJon TURNEY1-0/+2
Ignore pbuffer size attributes. If the server doesn't lie and say 0, no fbconfigs match and direct rendering fails and sadness... XXX: should probably fix this in XWin by reporting 0 or GLX_DONT_CARE.
2014-05-14Ignore server performance caveats for swrastJon TURNEY2-0/+13
2014-05-14Always default to --enable-driglx-directJon TURNEY1-15/+1
Always default to --enable-driglx-direct, now it will build driswrast, but won't try to use dri2 on platforms which don't have that.
2014-05-14Avoid lots of automake subdir-objects warningsJon TURNEY1-1/+1
2014-05-14Fix an apparent leak of dri3_display objectsJon TURNEY1-0/+7
2014-05-14megadriver: explicitly link against glapi, link with -no-undefinedJon TURNEY1-1/+7
On cygwin we need to link against the static or shared glapi provider so it can be built with no unresolved references. "Use -no-undefined to assure libtool that the library has no unresolved symbols at link time, so that libtool will build a shared library on platforms that require that all symbols are resolved when the library is linked." Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-05-14targets/dri-swrast: explicitly link against glapi, use -no-undefinedJon TURNEY1-1/+7
On cygwin we need to link against the static or shared glapi provider so it can be built with no unresolved references. "Use -no-undefined to assure libtool that the library has no unresolved symbols at link time, so that libtool will build a shared library on platforms that require that all symbols are resolved when the library is linked." Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-05-13Fix build in dri_platform=none, --enable-driglx-direct case (i.e. swrast only)darwin-build-fixes-3Jon TURNEY3-1/+4
Untangling to fix build in dri_platform=none, --enable-driglx-direct case. Turn some tests from !GLX_USE_APPLEGL into a positive form, so DRI1/2/3 renderers and the glXGetScreenDriver()/glXGetScreenDriver() interface used by xdriinfo are only used when dri_platform=drm Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-05-13applegl: Provide requirements of _SET_DrawBuffersJon TURNEY2-1/+7
_SET_DrawBuffers requires driDispatchRemapTable, so we need to link with libmesa for remap.c. libmesa requires the C++ linker. Also need to arrange to call _mesa_init_remap_table() to initialize the remap table. XXX: There has to be a better way fixing this. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-05-13applegl: Improve error reporting if CGLChoosePixelFormat() didn't find any ↵Jon TURNEY1-0/+5
matching pixel formats. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-05-13darwin: Suppress type conversion warnings for GLhandleARBJon TURNEY1-3/+3
On darwin, GLhandleARB is defined as a void *, not the unsigned int it is on linux. For the moment, apply a cast to supress the warning Possibly this is safe, as for the mesa software renderer the shader program handle is not a real pointer, but a integer handle Probably this is not the right thing to do, and we should pay closer attention to how the GLhandlerARB type is used. main/shader_query.cpp:49:7: error: no matching function for call to '_mesa_lookup_shader_program_err' _mesa_lookup_shader_program_err(ctx, program, "glBindAttribLocation"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/mesa/main/shaderobj.h:81:1: note: candidate function not viable: cannot convert argument of incomplete type 'GLhandleARB' (aka 'void *') to 'GLuint' (aka 'unsigned int') _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, ^ main/shader_query.cpp:111:13: error: no matching function for call to '_mesa_lookup_shader_program_err' shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveAttrib"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/mesa/main/shaderobj.h:81:1: note: candidate function not viable: cannot convert argument of incomplete type 'GLhandleARB' (aka 'void *') to 'GLuint' (aka 'unsigned int') _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, ^ main/shader_query.cpp:218:7: error: no matching function for call to '_mesa_lookup_shader_program_err' _mesa_lookup_shader_program_err(ctx, program, "glGetAttribLocation"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../src/mesa/main/shaderobj.h:81:1: note: candidate function not viable: cannot convert argument of incomplete type 'GLhandleARB' (aka 'void *') to 'GLuint' (aka 'unsigned int') _mesa_lookup_shader_program_err(struct gl_context *ctx, GLuint name, Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-05-13Fix build of appleglxJon TURNEY22-291/+78
Define GLX_USE_APPLEGL, as config/darwin used to, to turn on specific code to use the applegl direct renderer Convert src/glx/apple/Makefile to automake Since the applegl libGL is now built by linking libappleglx into libGL, rather than by linking selected files into a special libGL: - Remove duplicate code in apple/glxreply.c and apple/apple_glx.c. This makes apple/glxreply.c empty, so remove it - Some indirect rendering code is already guarded by !GLX_USE_APPLEGL, but we need to add those guards to indirect_glx.c, indirect_init.c (via it's generator), render2.c and vertarr.c so they don't generate anything Fix and update various includes glapi_gentable.c (which is only used on darwin), should be included in shared glapi as well, to provide _glapi_create_table_from_handle() Note that neither swrast nor indirect is supported in the APPLEGL path at the moment, which makes things more complex than they need to be. More untangling is needed to allow that Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-05-12Make DRI dependencies and build depend on the targetJon TURNEY12-38/+77
- Don't require xcb-dri[23] etc. if we aren't building for a target with DRM, as we won't be using dri[23] - Enable a more fine-grained control of what DRI code is built, so that a libGL using direct swrast can be built on targets which don't have DRM. The HAVE_DRI automake conditional is retired in favour of a number of other conditionals: HAVE_DRI2 enables building of code using the DRI2 interface (and possibly DRI3 with HAVE_DRI3) HAVE_DRISW enables building of DRI swrast HAVE_DRICOMMON enables building of target-independent DRI code, and also enables some makefile cases where a more detailled decision is made at a lower level. HAVE_APPLEDRI enables building of an Apple-specific direct rendering interface, still which requires additional fixing up to build properly. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-05-12Fix build for darwinJon TURNEY5-3/+47
Fix build for darwin, when ./configured --disable-driglx-direct - darwin ld doesn't support -Bsymbolic or --version-script, so check if ld supports those options before using them - define GLX_ALIAS_UNSUPPORTED as config/darwin used to, as aliasing of non-weak symbols isn't supported - default to -with-dri-drivers=swrast Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-05-10radeonsi: prepare depth export registers at compile timeMarek Olšák3-14/+14
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-05-10radeonsi: simplify depth/stencil export codeMarek Olšák1-11/+5
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-05-10radeon/llvm: add support for non-scalar system valuesMarek Olšák1-0/+6
The sample position is one of them. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-05-10radeonsi: add and use a helper function for loading constantsMarek Olšák1-19/+19
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-05-10radeonsi: only count CS space for state atoms if we're going to drawMarek Olšák1-5/+5
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-05-10radeonsi: remove unused variable exports_ps in si_pipe_shader_psMarek Olšák1-12/+1
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-05-10radeonsi: use DRAW_PREAMBLE on CIKMarek Olšák2-5/+10
It's the same as setting the 3 regs separately, but shorter, and it also seems to be required on GFX7.2 and later. This doesn't fix Hawaii. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-05-10r600g: simplify framebuffer state size computationMarek Olšák1-26/+4
Take the upper bound. The number doesn't have to absolutely correct, only safe. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-05-09Revert "i965: Fix depth (array slices) computation for 1D_ARRAY render targets."Kenneth Graunke2-5/+0
This reverts commit e6967270c75a5b669152127bb7a746d55f4407a6. Chris Forbes pointed out that this is broken for texture views which restrict the number of slices. He committed a better fix which makes this unnecessary. Cc: "10.2" <mesa-stable@lists.freedesktop.org>
2014-05-10egl_dri2: cleanup memory leak in dri2_create_context()Emil Velikov1-2/+3
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2014-05-10ilo: destroy the mutex, if winsys creation failsEmil Velikov1-0/+1
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
2014-05-10glx/tests: Partially revert commit 51e3569573a7b3f8da0df093836761003fcdc414Emil Velikov1-3/+3
C++ does not support designated initializers, thus compilation is not guaranteed to succeed. Surprisingly gcc 4.6.3 fails to build the code, while version 4.9.0 compiles it without a hitch. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78403 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Vinson Lee <vlee@freedesktop.org>
2014-05-10configure: error out if building GBM without driEmil Velikov1-0/+7
Both backends require --enable-dri, and building an empty libgbm makes little to no sense. Error out at configure to prevent the user from shooting themselves in the foot. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78225 Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-05-09mesa: propagate FragDepthLayout to gl_programChia-I Wu1-0/+5
The information was lost during linking, causing the layout to be treated as FRAG_DEPTH_LAYOUT_NONE. Signed-off-by: Chia-I Wu <olv@lunarg.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-05-10glsl: Rename linker's is_varying_varChris Forbes1-3/+3
Both the ast->IR and linker have functions with this name, but different behavior. Rename the linker's version to var_counts_against_varying_limit to be closer to what it is actually used for. Suggested by Ian a while back. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2014-05-09i965: Fix GPU hangs on Broadwell in shaders with some control flow.Kenneth Graunke1-7/+7
According to the documentation, we need to set the source 0 register type to IMM for flow control instructions that have both JIP and UIP. Fixes GPU hangs in approximately 10 Piglit tests, 5 es3conform tests, Unigine Crypt, a WebGL raytracer demo, and several Steam titles. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75478 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75878 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76939 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Tested-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-05-09radeonsi: Enable geometry shaders with LLVM 3.4.1Tom Stellard4-9/+13
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> CC: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
2014-05-09configure.ac: Add LLVM_VERSION_PATCH to DEFINESTom Stellard1-1/+7
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> CC: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
2014-05-09docs: Import 10.1.3 release notes, andd news item.Carl Worth2-0/+10
2014-05-09st/xa: Fix performance regression introduced by commit "Cache render target ↵Thomas Hellstrom1-1/+1
surface" The mentioned commit has the nasty side-effect of turning off accelerated copies. Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Rob Clark <robdclark@gmail.com>