public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-util/apitrace/files: apitrace-4.0-memcpy.patch apitrace-4.0-glext-texture-storage.patch apitrace-4.0-system-libs.patch apitrace-4.0-disable-multiarch.patch apitrace-4.0-glxtrace-only.patch apitrace-4.0-glxcopysubbuffermesa.patch apitrace-4.0-multilib.patch
@ 2014-04-03 18:23 Mike Frysinger (vapier)
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2014-04-03 18:23 UTC (permalink / raw
  To: gentoo-commits

vapier      14/04/03 18:23:13

  Added:                apitrace-4.0-memcpy.patch
                        apitrace-4.0-glext-texture-storage.patch
                        apitrace-4.0-system-libs.patch
                        apitrace-4.0-disable-multiarch.patch
                        apitrace-4.0-glxtrace-only.patch
                        apitrace-4.0-glxcopysubbuffermesa.patch
                        apitrace-4.0-multilib.patch
  Log:
  Version bump #468254#14 by David Heidelberger.  Should fix OpenGL compilation #493008 by Michał Górny.  Switches to cmake-multilib #468250 by Patrick Lauer.
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

Revision  Changes    Path
1.1                  dev-util/apitrace/files/apitrace-4.0-memcpy.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-memcpy.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-memcpy.patch?rev=1.1&content-type=text/plain

Index: apitrace-4.0-memcpy.patch
===================================================================
http://bugs.gentoo.org/465504
http://github.com/apitrace/apitrace/issues/118

--- a/image/image_png.cpp
+++ b/image/image_png.cpp
@@ -31,6 +31,7 @@
 #include <assert.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include <fstream>
 



1.1                  dev-util/apitrace/files/apitrace-4.0-glext-texture-storage.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-glext-texture-storage.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-glext-texture-storage.patch?rev=1.1&content-type=text/plain

Index: apitrace-4.0-glext-texture-storage.patch
===================================================================
Upstream commit to support GL_EXT_texture_storage.

commit 0436cc01329b6be60801dd7bfe641be7d8be5bc7
Author: José Fonseca <jfonseca@vmware.com>
Date:   Wed Nov 13 13:57:43 2013 +0000

    egltrace: Add GL_EXT_texture_storage entrypoints
    
    Prototypes obtained through:
    
      specs/scripts/gltxt.py http://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_storage.txt
    
    Issue #184.

commit 0bacf23eacd15c8f15413b85bdcb6ccc4d288f37
Author: José Fonseca <jfonseca@vmware.com>
Date:   Wed Nov 13 13:59:51 2013 +0000

    glxtrace: Add GLES prototypes too.
    
    Some applications seem to fail to distinguish GLES and GL entrypoints
    apart.  To have complete traces in that situation, generate wrappers
    for both GLES and GL prototypes.
    
    Issue #184.

--- apitrace/specs/glesapi.py
+++ apitrace/specs/glesapi.py
@@ -255,4 +255,16 @@ glesapi.addFunctions([
     #GlFunction(Void, "glProgramUniformMatrix4fvEXT", [(GLprogram, "program"), (GLlocation, "location"), (GLsizei, "count"), (GLboolean, "transpose"), (Array(Const(GLfloat), "count*4*4"), "value")]),
     GlFunction(Void, "glValidateProgramPipelineEXT", [(GLpipeline, "pipeline")]),
     GlFunction(Void, "glGetProgramPipelineInfoLogEXT", [(GLpipeline, "pipeline"), (GLsizei, "bufSize"), Out(Pointer(GLsizei), "length"), Out(GLstring, "infoLog")], sideeffects=False),
+
+    # GL_EXT_multisampled_render_to_texture
+    #GlFunction(Void, "glRenderbufferStorageMultisampleEXT", [(GLenum, "target"), (GLsizei, "samples"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
+    GlFunction(Void, "glFramebufferTexture2DMultisampleEXT", [(GLenum, "target"), (GLenum, "attachment"), (GLenum, "textarget"), (GLtexture, "texture"), (GLint, "level"), (GLsizei, "samples")]),
+
+    # GL_EXT_texture_storage
+    GlFunction(Void, "glTexStorage1DEXT", [(GLenum, "target"), (GLsizei, "levels"), (GLenum, "internalformat"), (GLsizei, "width")]),
+    GlFunction(Void, "glTexStorage2DEXT", [(GLenum, "target"), (GLsizei, "levels"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
+    GlFunction(Void, "glTexStorage3DEXT", [(GLenum, "target"), (GLsizei, "levels"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth")]),
+    #GlFunction(Void, "glTextureStorage1DEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLsizei, "levels"), (GLenum, "internalformat"), (GLsizei, "width")]),
+    #GlFunction(Void, "glTextureStorage2DEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLsizei, "levels"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height")]),
+    #GlFunction(Void, "glTextureStorage3DEXT", [(GLtexture, "texture"), (GLenum, "target"), (GLsizei, "levels"), (GLenum, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth")]),
 ])
--- apitrace/wrappers/CMakeLists.txt
+++ apitrace/wrappers/CMakeLists.txt
@@ -393,6 +393,7 @@ elseif (X11_FOUND)
             gltrace.py
             trace.py
             ${CMAKE_SOURCE_DIR}/specs/glxapi.py
+            ${CMAKE_SOURCE_DIR}/specs/glesapi.py
             ${CMAKE_SOURCE_DIR}/specs/glapi.py
             ${CMAKE_SOURCE_DIR}/specs/glparams.py
             ${CMAKE_SOURCE_DIR}/specs/gltypes.py
--- apitrace/wrappers/glxtrace.py
+++ apitrace/wrappers/glxtrace.py
@@ -32,6 +32,7 @@ from gltrace import GlTracer
 from specs.stdapi import Module, API
 from specs.glapi import glapi
 from specs.glxapi import glxapi
+from specs.glesapi import glesapi
 
 
 class GlxTracer(GlTracer):
@@ -104,6 +105,7 @@ if __name__ == '__main__':
     module = Module()
     module.mergeModule(glxapi)
     module.mergeModule(glapi)
+    module.mergeModule(glesapi)
     api = API()
     api.addModule(module)
     tracer = GlxTracer()



1.1                  dev-util/apitrace/files/apitrace-4.0-system-libs.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-system-libs.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-system-libs.patch?rev=1.1&content-type=text/plain

Index: apitrace-4.0-system-libs.patch
===================================================================
Find external system libraries for ebuild.

Updated from 3.0 version of patch to apply against 4.0.

--- apitrace/CMakeLists.txt
+++ apitrace/CMakeLists.txt
@@ -224,23 +224,14 @@ set (WRAPPER_INSTALL_DIR ${LIB_ARCH_INSTALL_DIR}/wrappers)
 # - on unices to prevent symbol collisions when tracing applications that link
 # against other versions of these libraries
 
-set (ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib)
-set (ZLIB_LIBRARIES z_bundled)
-add_subdirectory (thirdparty/zlib)
-
-include_directories (${ZLIB_INCLUDE_DIRS})
-
-set (SNAPPY_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/snappy)
-set (SNAPPY_LIBRARIES snappy_bundled)
-add_subdirectory (thirdparty/snappy)
+find_package (ZLIB REQUIRED)
+include_directories (${ZLIB_INCLUDE_DIRS})
 
+find_package (SNAPPY REQUIRED)
 include_directories (${SNAPPY_INCLUDE_DIRS})
 
-set (PNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng)
-set (PNG_DEFINITIONS "")
-set (PNG_LIBRARIES png_bundled)
-
-add_subdirectory (thirdparty/libpng)
+find_package (PNG REQUIRED)
+include_directories (${PNG_INCLUDE_DIRS})
 
 if (MSVC)
     add_subdirectory (thirdparty/getopt)
diff --git a/cmake/FindSNAPPY.cmake b/cmake/FindSNAPPY.cmake
new file mode 100644
index 0000000..5cd64c3
--- /dev/null
+++ apitrace/cmake/FindSNAPPY.cmake
@@ -0,0 +1,31 @@
+# Find SNAPPY - A fast compressor/decompressor
+#
+# This module defines
+#  SNAPPY_FOUND - whether the qsjon library was found
+#  SNAPPY_LIBRARIES - the snappy library
+#  SNAPPY_INCLUDE_DIR - the include path of the snappy library
+#
+
+if (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARIES)
+
+  # Already in cache
+  set (SNAPPY_FOUND TRUE)
+
+else (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARIES)
+
+  find_library (SNAPPY_LIBRARIES
+    NAMES
+    snappy
+    PATHS
+  )
+
+  find_path (SNAPPY_INCLUDE_DIR
+    NAMES
+    snappy.h
+    PATHS
+  )
+
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(SNAPPY DEFAULT_MSG SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIR)
+
+endif (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARIES)



1.1                  dev-util/apitrace/files/apitrace-4.0-disable-multiarch.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-disable-multiarch.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-disable-multiarch.patch?rev=1.1&content-type=text/plain

Index: apitrace-4.0-disable-multiarch.patch
===================================================================
respect the libdir cmake already set up for us instead of using the multiarch crap

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -184,12 +184,6 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
 # Installation directories
 
 if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-    # Debian multiarch support
-    execute_process(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
-        OUTPUT_VARIABLE ARCH_SUBDIR
-        ERROR_QUIET
-        OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
     CHECK_INCLUDE_FILES(proc/readproc.h READPROC_H_FOUND)
     if (READPROC_H_FOUND)
         add_definitions (-DHAVE_READPROC_H)
@@ -205,11 +205,11 @@ if (WIN32 OR APPLE)
     set (LIB_ARCH_INSTALL_DIR lib)
 else ()
     set (DOC_INSTALL_DIR share/doc/${CMAKE_PROJECT_NAME})
-    set (LIB_INSTALL_DIR lib/${CMAKE_PROJECT_NAME})
+    set (LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${CMAKE_PROJECT_NAME})
     if (ARCH_SUBDIR)
-        set (LIB_ARCH_INSTALL_DIR lib/${ARCH_SUBDIR}/${CMAKE_PROJECT_NAME})
+        set (LIB_ARCH_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${ARCH_SUBDIR}/${CMAKE_PROJECT_NAME})
     else ()
-        set (LIB_ARCH_INSTALL_DIR lib/${CMAKE_PROJECT_NAME})
+        set (LIB_ARCH_INSTALL_DIR ${LIB_INSTALL_DIR})
     endif ()
 endif ()
 



1.1                  dev-util/apitrace/files/apitrace-4.0-glxtrace-only.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-glxtrace-only.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-glxtrace-only.patch?rev=1.1&content-type=text/plain

Index: apitrace-4.0-glxtrace-only.patch
===================================================================
Allow building of just glxtrace library for ebuilds without GUI tools.

Updated from 3.0 version of patch to apply against 4.0.

--- apitrace/CMakeLists.txt
+++ apitrace/CMakeLists.txt
@@ -30,6 +30,7 @@ set (ENABLE_CLI true CACHE BOOL "Enable command Line interface.")
 
 set (ENABLE_EGL true CACHE BOOL "Enable EGL support.")
 
+option (BUILD_LIB_ONLY "Build the glxtrace library only" OFF)
 
 ##############################################################################
 # Find dependencies
@@ -227,7 +228,13 @@ set (WRAPPER_INSTALL_DIR ${LIB_ARCH_INSTALL_DIR}/wrappers)
 find_package (ZLIB REQUIRED)
 include_directories (${ZLIB_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib)
 
-find_package (SNAPPY REQUIRED)
+if (BUILD_LIB_ONLY)
+       set (SNAPPY_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/snappy)
+       set (SNAPPY_LIBRARIES snappy_bundled)
+       add_subdirectory (thirdparty/snappy EXCLUDE_FROM_ALL)
+else (BUILD_LIB_ONLY)
+       find_package (SNAPPY REQUIRED)
+endif (BUILD_LIB_ONLY)
 include_directories (${SNAPPY_INCLUDE_DIRS})
 
 find_package (PNG REQUIRED)
@@ -248,6 +255,8 @@ endif ()
 # - The packaged versions QJson are very old, and do not support NaN/Infinity.
 # - To make it easier to build the GUI on Windows and MacOSX, as there are no
 # binaries at all.
+if (NOT BUILD_LIB_ONLY)
+
 if (QT4_FOUND)
     add_definitions (-DQJSON_EXPORT=)
     add_subdirectory (thirdparty/qjson)
@@ -257,6 +266,8 @@ if (QT4_FOUND)
     set (QJSON_FOUND TRUE)
 endif ()
 
+endif (NOT BUILD_LIB_ONLY)
+
 # We use bundled headers for all Khronos APIs, to guarantee support for both
 # OpenGL and OpenGL ES at build time, because the OpenGL and OpenGL ES 1 APIs
 # are so intertwined that conditional compilation extremely difficult. This
diff --git a/retrace/CMakeLists.txt b/retrace/CMakeLists.txt
index 913c23e..08b2905 100644
--- apitrace/retrace/CMakeLists.txt
+++ apitrace/retrace/CMakeLists.txt
@@ -11,6 +11,8 @@ include_directories (
 
 add_definitions (-DRETRACE)
 
+if (NOT BUILD_LIB_ONLY) 
+
 add_custom_command (
     OUTPUT glretrace_gl.cpp
     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glretrace_gl.cpp
@@ -259,3 +261,6 @@ if (WIN32)
 
     install (TARGETS d3dretrace RUNTIME DESTINATION bin)
 endif ()
+
+endif (NOT BUILD_LIB_ONLY) 
+



1.1                  dev-util/apitrace/files/apitrace-4.0-glxcopysubbuffermesa.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-glxcopysubbuffermesa.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-glxcopysubbuffermesa.patch?rev=1.1&content-type=text/plain

Index: apitrace-4.0-glxcopysubbuffermesa.patch
===================================================================
Upstream commit to support glxCopySubBufferMESA.  Modified to fix compile error with egl.

commit 4dc3f3bdc3611ca1b3dec402f9242a036db8c8e4
Author: Carl Worth <cworth@cworth.org>
Date:   Thu Oct 17 14:52:21 2013 -0700

    retrace: Implement glxCopySubBufferMESA
    
    This enables replay of a trace captured on ChromeOS.
    
    Note: Replaying on EGL is not supported, (will trigger a warning),
    since, as far as I know, EGL does not provide an equivalent function.

--- apitrace/retrace/glretrace_glx.cpp
+++ apitrace/retrace/glretrace_glx.cpp
@@ -111,6 +111,16 @@ static void retrace_glXDestroyContext(trace::Call &call) {
     delete context;
 }
 
+static void retrace_glXCopySubBufferMESA(trace::Call &call) {
+    glws::Drawable *drawable = getDrawable(call.arg(1).toUInt());
+    int x = call.arg(2).toSInt();
+    int y = call.arg(3).toSInt();
+    int width = call.arg(4).toSInt();
+    int height = call.arg(5).toSInt();
+
+    drawable->copySubBuffer(x, y, width, height);
+}
+
 static void retrace_glXSwapBuffers(trace::Call &call) {
     glws::Drawable *drawable = getDrawable(call.arg(1).toUInt());
 
@@ -173,7 +183,7 @@ const retrace::Entry glretrace::glx_callbacks[] = {
     {"glXChooseVisual", &retrace::ignore},
     //{"glXCopyContext", &retrace_glXCopyContext},
     //{"glXCopyImageSubDataNV", &retrace_glXCopyImageSubDataNV},
-    //{"glXCopySubBufferMESA", &retrace_glXCopySubBufferMESA},
+    {"glXCopySubBufferMESA", &retrace_glXCopySubBufferMESA},
     {"glXCreateContextAttribsARB", &retrace_glXCreateContextAttribsARB},
     {"glXCreateContext", &retrace_glXCreateContext},
     //{"glXCreateContextWithConfigSGIX", &retrace_glXCreateContextWithConfigSGIX},
--- apitrace/retrace/glws.hpp
+++ apitrace/retrace/glws.hpp
@@ -127,6 +127,8 @@ public:
         visible = true;
     }
 
+    virtual void copySubBuffer(int x, int y, int width, int height) = 0;
+
     virtual void swapBuffers(void) = 0;
 };
 
--- apitrace/retrace/glws_egl_xlib.cpp
+++ apitrace/retrace/glws_egl_xlib.cpp
@@ -244,6 +244,10 @@ public:
         Drawable::show();
     }
 
+    void copySubBuffer(int x, int y, int width, int height) {
+        std::cerr << "glws_egl_xlib: Warning: copySubBuffer Not yet implemented\n";
+    }
+
     void swapBuffers(void) {
         eglBindAPI(api);
         eglSwapBuffers(eglDisplay, surface);
--- apitrace/retrace/glws_glx.cpp
+++ apitrace/retrace/glws_glx.cpp
@@ -213,6 +213,12 @@ public:
         Drawable::show();
     }
 
+    void copySubBuffer(int x, int y, int width, int height) {
+        glXCopySubBufferMESA(display, window, x, y, width, height);
+
+        processKeys();
+    }
+
     void swapBuffers(void) {
         glXSwapBuffers(display, window);
 



1.1                  dev-util/apitrace/files/apitrace-4.0-multilib.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-multilib.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/apitrace/files/apitrace-4.0-multilib.patch?rev=1.1&content-type=text/plain

Index: apitrace-4.0-multilib.patch
===================================================================
Upstream commit to find wrappers in lib64 directory.

commit 3f9c2ecf18d8fa37fad5a7062f80952692eaa8e7
Author: Alexander Monakov <amonakov@ispras.ru>
Date:   Wed Oct 16 20:51:47 2013 +0400

    cli: use $LIB to handle multilib automagically on glibc

--- apitrace/cli/CMakeLists.txt
+++ apitrace/cli/CMakeLists.txt
@@ -31,6 +31,7 @@ target_link_libraries (apitrace
     ${ZLIB_LIBRARIES}
     ${SNAPPY_LIBRARIES}
     ${GETOPT_LIBRARIES}
+    dl
 )
 
 if (NOT CMAKE_CROSSCOMPILING)
--- apitrace/cli/cli_resources.cpp
+++ apitrace/cli/cli_resources.cpp
@@ -32,6 +32,20 @@
 
 #include "cli_resources.hpp"
 
+#ifdef __GLIBC__
+
+#include <dlfcn.h>
+
+static bool
+tryLib(const os::String &path)
+{
+    void *handle = dlopen(path.str(), RTLD_LAZY);
+    bool exists = (handle != NULL);
+    if (exists)
+        dlclose(handle);
+    return exists;
+}
+#endif
 
 os::String
 findProgram(const char*programFilename)
@@ -76,6 +90,17 @@ findWrapper(const char *wrapperFilename)
         return wrapperPath;
     }
 
+#ifdef __GLIBC__
+    // We want to take advantage of $LIB dynamic string token expansion in
+    // glibc dynamic linker to handle multilib layout for us
+    wrapperPath = processDir;
+    wrapperPath.join("../$LIB/apitrace/wrappers");
+    wrapperPath.join(wrapperFilename);
+    if (tryLib(wrapperPath)) {
+        return wrapperPath;
+    }
+#endif
+
     // Try relative install directory
     wrapperPath = processDir;
 #if defined(_WIN32)





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-03 18:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-03 18:23 [gentoo-commits] gentoo-x86 commit in dev-util/apitrace/files: apitrace-4.0-memcpy.patch apitrace-4.0-glext-texture-storage.patch apitrace-4.0-system-libs.patch apitrace-4.0-disable-multiarch.patch apitrace-4.0-glxtrace-only.patch apitrace-4.0-glxcopysubbuffermesa.patch apitrace-4.0-multilib.patch Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox