Tuesday, December 28, 2010

xfx radeonhd 6950 / 6970 on linux

Well, my 6870 seemed to have a little bit of problems with red dots and spazing out. Was reminiscent of old laptops heating up or some other problems with ati graphics cards I've had in the past. So I put in for a return on the card and after checking out the specs decided to get a 6950 instead. It was awesome that you can flash the vbios of the 6950 to be a 6970 and that the cards are physically the same. This really is awesome. So I saved about 100 bucks (after the extra 60 to upgrade from the 6870 to the 6950) , loaded up freedos w/ unetbootin and my spare usb flash drive, and used atiflash to save and write the new 6970 bios. Again XFX on account of a nice warranty package.

And it works, perfectly fine. It's much snappier overall with many windows so either that extra graphics ram or those 90 something texture units make a lot of difference.

So as below, I loaded up catalyst 10.12, ran the nm/sed script to remove the unsupported hardware logo (AMD remove that crap sooner and make aticonfig more robust! Official drivers would also be nice!) . I tested alot of the OpenCL programs in the ati stream sdk too and saw impressive numbers.

I like your hardware and am a pure linux user... AMD... please keep improving things (esp on flickery video on compositing - I understand this probably isn't entirely your fault! Oh btw, 4 xv ports, hah - scale up like nvidia, this card in reality supports much more than 4). It'd be more encouraging if I didn't have to run x to run opencl on the gpu too :-). FOSS integration with these same technologies would also be great on your products. kthxbye

Tuesday, December 7, 2010

just cmake it

CMake is awesome, sure it is a little weird at times but vs all competition it's wiping the floor in maintaining complex builds over many platforms. The code can be really clean in comparison with some things I've seen in the past too. Well anyway, here's a few build scripts I'd like to contribute:

  • A 32bit software on a 64bit linux install configuration handler This, by default, automatically detects if the build environment is not 32 bit and adjusts accordingly when included. The automatic behavior is disableable by setting NO_AUTO_X86_32 before include.
    macro(setx86_32)
    set(CMAKE_C_FLAGS "-m32 ${CMAKE_C_FLAGS}")
    set(CMAKE_CXX_FLAGS "-m32 ${CMAKE_CXX_FLAGS}")
    set(LINK_FLAGS "-m32 ${LINK_FLAGS}")
    set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
    set(QT_LIBRARY_DIR /usr/lib)
    endmacro()

    if(NOT NO_AUTO_X86_32 AND NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
    setx86_32()
    endif()



  • An XPlane plugin cmake file . Include and use pretty much like add_library / install_target.
    set(XPLANE_LINKER_FLAGS "-nodefaultlibs")
    if(NOT DEFINED XPLANE_SDK)
    if(UNIX)
    set(XPLANE_SDK "/opt/xplane sdk")
    endif()
    endif(NOT DEFINED XPLANE_SDK)

    if(NOT DEFINED XPLANE_PATH)
    if(UNIX)
    set(XPLANE_PATH "/opt/X-Plane 9/")
    endif()
    endif(NOT DEFINED XPLANE_PATH)

    foreach(X Widgets Wrappers XPLM)
    include_directories(${XPLANE_SDK}/CHeaders/${X})
    endforeach()

    if(UNIX)
    add_definitions(-DLIN=1)
    endif()

    add_definitions(-DXPLM200=1)

    macro(add_xplane_plugin TARGET_NAME SRCS)
    add_library(${TARGET_NAME} SHARED ${SRCS})
    set_target_properties(${TARGET_NAME} PROPERTIES LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${XPLANE_LINKER_FLAGS}")
    set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
    set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".xpl")
    if(UNIX)
    set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "lin")
    elseif(WINDOWS)
    set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "win")
    endif()
    endmacro()

    macro(install_xplane_plugin TARGET_NAME PLUGIN_NAME)
    install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION "${XPLANE_PATH}/Resources/plugins/${PLUGIN_NAME}")
    endmacro()