mesa: make nv50 build and disable intel GL3

This commit is contained in:
Dave Airlie 2013-02-13 18:19:46 +10:00
parent 43bd7e5b7d
commit cbd72a1775
3 changed files with 79 additions and 0 deletions

59
intel-revert-gl3.patch Normal file
View File

@ -0,0 +1,59 @@
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 4e7b5da..1562f59 100755
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -135,9 +135,11 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.ARB_seamless_cube_map = true;
ctx->Extensions.ARB_shader_bit_encoding = true;
ctx->Extensions.ARB_shader_texture_lod = true;
+#ifdef TEXTURE_FLOAT_ENABLED
ctx->Extensions.ARB_texture_float = true;
ctx->Extensions.EXT_texture_shared_exponent = true;
ctx->Extensions.EXT_packed_float = true;
+#endif
ctx->Extensions.ARB_texture_compression_rgtc = true;
ctx->Extensions.ARB_texture_rg = true;
ctx->Extensions.ARB_vertex_type_2_10_10_10_rev = true;
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 750cb78..c0b63d3 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -1039,9 +1039,15 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
static void
set_max_gl_versions(struct intel_screen *screen)
{
+#ifdef TEXTURE_FLOAT_ENABLED
+ bool has_texture_float = true;
+#else
+ bool has_texture_float = false;
+#endif
+
switch (screen->gen) {
case 7:
- if (screen->kernel_has_gen7_sol_reset) {
+ if (has_texture_float && screen->kernel_has_gen7_sol_reset) {
screen->max_gl_core_version = 31;
screen->max_gl_compat_version = 30;
screen->max_gl_es1_version = 11;
@@ -1054,10 +1060,17 @@ set_max_gl_versions(struct intel_screen *screen)
}
break;
case 6:
- screen->max_gl_core_version = 31;
- screen->max_gl_compat_version = 30;
- screen->max_gl_es1_version = 11;
- screen->max_gl_es2_version = 20;
+ if (has_texture_float) {
+ screen->max_gl_core_version = 31;
+ screen->max_gl_compat_version = 30;
+ screen->max_gl_es1_version = 11;
+ screen->max_gl_es2_version = 20;
+ } else {
+ screen->max_gl_core_version = 0;
+ screen->max_gl_compat_version = 21;
+ screen->max_gl_es1_version = 11;
+ screen->max_gl_es2_version = 20;
+ }
break;
case 5:
case 4:

View File

@ -65,6 +65,9 @@ Source3: make-git-snapshot.sh
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
Source4: Mesa-MLAA-License-Clarification-Email.txt
# -fno-rtti makes nv50 assert angry
Patch0: nv50-fix-build.patch
Patch1: intel-revert-gl3.patch
#Patch7: mesa-7.1-link-shared.patch
Patch9: mesa-8.0-llvmpipe-shmget.patch
#Patch11: mesa-8.0-nouveau-tfp-blacklist.patch
@ -278,6 +281,8 @@ Mesa shared glapi
%prep
#%setup -q -n Mesa-%{version}%{?snapshot}
%setup -q -n mesa-%{gitdate}
%patch0 -p1 -b .nv50rtti
%patch1 -p1 -b .nogl3
#%patch11 -p1 -b .nouveau
# this fastpath is:
@ -515,6 +520,9 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/GLES2/gl2platform.h
%{_includedir}/GLES2/gl2.h
%{_includedir}/GLES2/gl2ext.h
%{_includedir}/GLES3/gl3platform.h
%{_includedir}/GLES3/gl3.h
%{_includedir}/GLES3/gl3ext.h
%{_libdir}/pkgconfig/glesv1_cm.pc
%{_libdir}/pkgconfig/glesv2.pc
%{_libdir}/libGLESv1_CM.so

12
nv50-fix-build.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up mesa-20130213/src/gallium/drivers/nv50/codegen/nv50_ir.cpp.rtti mesa-20130213/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
--- mesa-20130213/src/gallium/drivers/nv50/codegen/nv50_ir.cpp.rtti 2013-02-13 18:08:17.533677028 +1000
+++ mesa-20130213/src/gallium/drivers/nv50/codegen/nv50_ir.cpp 2013-02-13 18:08:20.496752128 +1000
@@ -716,7 +716,7 @@ Instruction::clone(ClonePolicy<Function>
if (!i)
i = new_Instruction(pol.context(), op, dType);
#ifndef NDEBUG // non-conformant assert, so this is required
- assert(typeid(*i) == typeid(*this));
+ // assert(typeid(*i) == typeid(*this));
#endif
pol.set<Instruction>(this, i);