Enable llvmpipe even on non-SSE2 machines (#909473)
This commit is contained in:
		
							parent
							
								
									5b216c73c9
								
							
						
					
					
						commit
						ac0fbf9e29
					
				
							
								
								
									
										33
									
								
								0001-llvmpipe-Work-without-sse2-if-llvm-is-new-enough.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								0001-llvmpipe-Work-without-sse2-if-llvm-is-new-enough.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,33 @@ | |||||||
|  | From a499fd73461257f284bd3194f9198dc484acd373 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Adam Jackson <ajax@redhat.com> | ||||||
|  | Date: Thu, 4 Apr 2013 17:16:22 -0400 | ||||||
|  | Subject: [PATCH] llvmpipe: Work without sse2 if llvm is new enough | ||||||
|  | 
 | ||||||
|  | At least on llvm 3.2 this appears to work fine.  Tested on an Athlon XP | ||||||
|  | 2600+, which has sse and 3dnow but not sse2. | ||||||
|  | 
 | ||||||
|  | Signed-off-by: Adam Jackson <ajax@redhat.com> | ||||||
|  | ---
 | ||||||
|  |  src/gallium/drivers/llvmpipe/lp_screen.c | 5 +++-- | ||||||
|  |  1 file changed, 3 insertions(+), 2 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
 | ||||||
|  | index 6700887..ebcf680 100644
 | ||||||
|  | --- a/src/gallium/drivers/llvmpipe/lp_screen.c
 | ||||||
|  | +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
 | ||||||
|  | @@ -485,9 +485,10 @@ llvmpipe_create_screen(struct sw_winsys *winsys)
 | ||||||
|  |  { | ||||||
|  |     struct llvmpipe_screen *screen; | ||||||
|  |   | ||||||
|  | -#ifdef PIPE_ARCH_X86
 | ||||||
|  | -   /* require SSE2 due to LLVM PR6960. */
 | ||||||
|  |     util_cpu_detect(); | ||||||
|  | +
 | ||||||
|  | +#if defined(PIPE_ARCH_X86) && HAVE_LLVM < 0x0302
 | ||||||
|  | +   /* require SSE2 due to LLVM PR6960. */
 | ||||||
|  |     if (!util_cpu_caps.has_sse2) | ||||||
|  |         return NULL; | ||||||
|  |  #endif | ||||||
|  | -- 
 | ||||||
|  | 1.8.2 | ||||||
|  | 
 | ||||||
| @ -48,7 +48,7 @@ | |||||||
| Summary: Mesa graphics libraries | Summary: Mesa graphics libraries | ||||||
| Name: mesa | Name: mesa | ||||||
| Version: 9.1 | Version: 9.1 | ||||||
| Release: 4%{?dist} | Release: 5%{?dist} | ||||||
| License: MIT | License: MIT | ||||||
| Group: System Environment/Libraries | Group: System Environment/Libraries | ||||||
| URL: http://www.mesa3d.org | URL: http://www.mesa3d.org | ||||||
| @ -73,7 +73,7 @@ Patch9: mesa-8.0-llvmpipe-shmget.patch | |||||||
| #Patch11: mesa-8.0-nouveau-tfp-blacklist.patch | #Patch11: mesa-8.0-nouveau-tfp-blacklist.patch | ||||||
| Patch12: mesa-8.0.1-fix-16bpp.patch | Patch12: mesa-8.0.1-fix-16bpp.patch | ||||||
| Patch14: i965-hack-hiz-snb-fix.patch | Patch14: i965-hack-hiz-snb-fix.patch | ||||||
| 
 | Patch15: 0001-llvmpipe-Work-without-sse2-if-llvm-is-new-enough.patch | ||||||
| 
 | 
 | ||||||
| BuildRequires: pkgconfig autoconf automake libtool | BuildRequires: pkgconfig autoconf automake libtool | ||||||
| %if %{with_hardware} | %if %{with_hardware} | ||||||
| @ -301,6 +301,7 @@ Mesa shared glapi | |||||||
| 
 | 
 | ||||||
| # hack from chromium - awaiting real upstream fix | # hack from chromium - awaiting real upstream fix | ||||||
| %patch14 -p1 -b .snbfix | %patch14 -p1 -b .snbfix | ||||||
|  | %patch15 -p1 -b .sse2 | ||||||
| # default to dri (not xlib) for libGL on all arches | # default to dri (not xlib) for libGL on all arches | ||||||
| # XXX please fix upstream | # XXX please fix upstream | ||||||
| sed -i 's/^default_driver.*$/default_driver="dri"/' configure.ac | sed -i 's/^default_driver.*$/default_driver="dri"/' configure.ac | ||||||
| @ -591,6 +592,9 @@ rm -rf $RPM_BUILD_ROOT | |||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Thu Apr 04 2013 Adam Jackson <ajax@redhat.com> 9.1-5 | ||||||
|  | - Enable llvmpipe even on non-SSE2 machines (#909473) | ||||||
|  | 
 | ||||||
| * Tue Mar 26 2013 Adam Jackson <ajax@redhat.com> 9.1-4 | * Tue Mar 26 2013 Adam Jackson <ajax@redhat.com> 9.1-4 | ||||||
| - Fix build with private LLVM | - Fix build with private LLVM | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user