diff options
author | Ian Romanick <[email protected]> | 2004-10-13 19:56:15 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2004-10-13 19:56:15 +0000 |
commit | 447cdd536fe4539b724e8a7024659e3f4cd724d1 (patch) | |
tree | ba64cf7c4d3b15dd52fef34f68a38b8057d988af /src/mesa/drivers/dri/common | |
parent | b72ed81818e63a70c1ded2789b9e22ee4c516aae (diff) |
Initial support for PowerPC specific code in Mesa and DRI drivers. DRI
drivers built on PowerPC systems should now show things like "PowerPC" or
"PowerPC/Altivec" in the GL_RENDERER string.
The VMX moniker is used for Altivec/Velocity Engine/VMX SIMD additions. I
chose this not because I work for IBM but because it's a LOT shorter to
type. :)
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/utils.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index 59401073ece..0e8e54a2028 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -20,11 +20,14 @@ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * \file utils.c + * Utility functions for DRI drivers. * - * Authors: - * Ian Romanick <[email protected]> + * \author Ian Romanick <[email protected]> */ -/* $XFree86:$ */ #include <string.h> #include <stdlib.h> @@ -40,6 +43,10 @@ #include "x86/common_x86_asm.h" #endif +#if defined(USE_PPC_ASM) +#include "ppc/common_ppc_features.h" +#endif + unsigned driParseDebugString( const char * debug, const struct dri_debug_control * control ) @@ -141,6 +148,23 @@ driGetRendererString( char * buffer, const char * hardware_name, cpu[0] = " SPARC"; next = 1; +#elif defined(USE_PPC_ASM) + if ( _mesa_ppc_cpu_features ) { + cpu[next] = (cpu_has_64) ? " PowerPC 64" : " PowerPC"; + next++; + } + +# ifdef USE_VMX_ASM + if ( cpu_has_vmx ) { + cpu[next] = "/Altivec"; + next++; + } +# endif + + if ( ! cpu_has_fpu ) { + cpu[next] = "/No FPU"; + next++; + } #endif for ( i = 0 ; i < next ; i++ ) { |