summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2014-01-19 15:47:18 -0800
committerChad Versace <chad.versace@linux.intel.com>2014-01-19 15:47:18 -0800
commit0ccb8b74f91206fa6e778b0d3554c092fd0607a6 (patch)
tree79edbf19b67e59c0f4358d8280cbe54b6bfcfebd
parent6e6fd586191dbf554d275a627f73bdba725d2b93 (diff)
parentea347c6659803d8deba3982e9009cb721c8f4915 (diff)
Merge branch 'wflinfo-mac'
This series gets wflinfo working on Mac. On Mac we now have the same insight as provided by glxinfo on Linux. Here's the info from my MacBook Pro: Waffle platform: cgl Waffle api: gl OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: AMD Radeon HD 6750M OpenGL Engine OpenGL version string: 4.1 ATI-1.14.21 OpenGL context flags: FORWARD_COMPATIBLE OpenGL extensions: GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_mirror_clamp GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
-rw-r--r--src/utils/CMakeLists.txt8
-rw-r--r--src/waffle/cgl/cgl_platform.m10
2 files changed, 6 insertions, 12 deletions
diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt
index 652575b..5bdf9c4 100644
--- a/src/utils/CMakeLists.txt
+++ b/src/utils/CMakeLists.txt
@@ -2,14 +2,6 @@
# Target: wflinfo (executable)
# ----------------------------------------------------------------------------
-if(waffle_on_mac)
- # TODO(chadv,due:waffle-1.4): Enable wflinfo on Mac.
- #
- # No one has yet verified that wflinfo successfully builds on Mac. Since it
- # may break the build, we simply disable it for now.
- return()
-endif()
-
add_executable(wflinfo wflinfo.c)
target_link_libraries(wflinfo ${waffle_libname})
set_target_properties(wflinfo
diff --git a/src/waffle/cgl/cgl_platform.m b/src/waffle/cgl/cgl_platform.m
index ee3a23b..fa82041 100644
--- a/src/waffle/cgl/cgl_platform.m
+++ b/src/waffle/cgl/cgl_platform.m
@@ -148,11 +148,13 @@ cgl_make_current(struct wcore_platform *wc_self,
}
static void*
-cgl_get_proc_address(struct wcore_platform *wc_self,
- const char *name)
+cgl_get_proc_address(struct wcore_platform *wc_self, const char *name)
{
- // There is no CGLGetProcAddress.
- return NULL;
+ // There is no CGLGetProcAddress. However, Waffle follows the principle of
+ // least surprise here. The only supported API on CGL is OpenGL, so assume
+ // the user called waffle_get_proc_address() to obtain an OpenGL function
+ // pointer.
+ return cgl_dl_sym(wc_self, WAFFLE_DL_OPENGL, name);
}
static const struct wcore_platform_vtbl cgl_platform_vtbl = {