- mesa-9.0-12-gd56ee24.patch: sync with 9.0 branch in git
This commit is contained in:
Adam Jackson 2012-10-10 14:33:29 -04:00
parent 9058f5aaa6
commit a3d595cd31
4 changed files with 367 additions and 8 deletions

1
.gitignore vendored
View File

@ -42,3 +42,4 @@ mesa-20100720.tar.bz2
/mesa-20120827.tar.xz
/mesa-20120924.tar.xz
/glu-9.0.0.tar.bz2
/MesaLib-9.0.tar.bz2

351
mesa-9.0-12-gd56ee24.patch Normal file
View File

@ -0,0 +1,351 @@
% git describe origin/9.0
mesa-9.0-12-gd56ee24
diff --git a/docs/news.html b/docs/news.html
index 541bde6..26e648b 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -9,6 +9,16 @@
<h1>News</h1>
+<h2>October 8, 2012</h2>
+
+<p>
+<a href="relnotes-9.0.html">Mesa 9.0</a> is released.
+This is the first version of Mesa to support OpenGL 3.1 and GLSL 1.40
+(with the i965 driver).
+See the release notes for more information about the release.
+</p>
+
+
<h2>July 10, 2012</h2>
<p>
diff --git a/docs/relnotes-9.0.html b/docs/relnotes-9.0.html
index d72c5bb..02b7324 100644
--- a/docs/relnotes-9.0.html
+++ b/docs/relnotes-9.0.html
@@ -26,7 +26,9 @@ because GL_ARB_compatibility is not supported.
<h2>MD5 checksums</h2>
<pre>
-tbd
+be4cd34c6599a7cb9d254b05c48bdb1f MesaLib-9.0.tar.gz
+60e557ce407be3732711da484ab3db6c MesaLib-9.0.tar.bz2
+16b128544cd3f7e237927bb9f8aab7ce MesaLib-9.0.zip
</pre>
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index 751a18f..f83a7a7 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -2981,7 +2981,6 @@
<enum name="POLYGON_OFFSET_FACTOR" count="1" value="0x8038">
<size name="Get" mode="get"/>
</enum>
- <enum name="POLYGON_OFFSET_BIAS" value="0x8039"/>
<enum name="ALPHA4" value="0x803B"/>
<enum name="ALPHA8" value="0x803C"/>
<enum name="ALPHA12" value="0x803D"/>
@@ -8089,6 +8088,8 @@
</category>
<category name="GL_EXT_polygon_offset" number="3">
+ <enum name="POLYGON_OFFSET_BIAS_EXT" value="0x8039"/>
+
<function name="PolygonOffsetEXT" offset="assign">
<param name="factor" type="GLfloat"/>
<param name="bias" type="GLfloat"/>
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index c0e6bc7..a21ae10 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -404,9 +404,6 @@ one_time_init( struct gl_context *ctx )
_mesa_get_cpu_features();
- /* context dependence is never a one-time thing... */
- _mesa_init_get_hash(ctx);
-
for (i = 0; i < 256; i++) {
_mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F;
}
@@ -425,6 +422,8 @@ one_time_init( struct gl_context *ctx )
/* per-API one-time init */
if (!(api_init_mask & (1 << ctx->API))) {
+ _mesa_init_get_hash(ctx);
+
/*
* This is fine as ES does not use the remap table, but it may not be
* future-proof. We cannot always initialize the remap table because
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index fe1035b..e2ccc29 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -538,6 +538,11 @@ static const struct value_desc values[] = {
/* GL_{APPLE,ARB,OES}_vertex_array_object */
{ GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name), NO_EXTRA },
+ /* GL_EXT_texture_filter_anisotropic */
+ { GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
+ CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy),
+ extra_EXT_texture_filter_anisotropic },
+
#if FEATURE_GL || FEATURE_ES1
/* Enums in OpenGL and GLES1 */
{ 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES_BIT | API_OPENGL_CORE_BIT, NO_EXTRA },
@@ -687,11 +692,6 @@ static const struct value_desc values[] = {
/* GL_EXT_texture_lod_bias */
{ GL_MAX_TEXTURE_LOD_BIAS_EXT, CONTEXT_FLOAT(Const.MaxTextureLodBias),
NO_EXTRA },
-
- /* GL_EXT_texture_filter_anisotropic */
- { GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
- CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy),
- extra_EXT_texture_filter_anisotropic },
#endif /* FEATURE_GL || FEATURE_ES1 */
#if FEATURE_ES1
@@ -791,6 +791,15 @@ static const struct value_desc values[] = {
#endif /* FEATURE_GL || FEATURE_ES2 */
+#if FEATURE_ES1 || FEATURE_ES2
+ { 0, 0, TYPE_API_MASK, API_OPENGLES | API_OPENGLES2_BIT, NO_EXTRA },
+ /* GL_OES_EGL_image_external */
+ { GL_TEXTURE_BINDING_EXTERNAL_OES, LOC_CUSTOM,
+ TYPE_INT, TEXTURE_EXTERNAL_INDEX, extra_OES_EGL_image_external },
+ { GL_TEXTURE_EXTERNAL_OES, LOC_CUSTOM,
+ TYPE_BOOLEAN, 0, extra_OES_EGL_image_external },
+#endif
+
#if FEATURE_ES2
/* Enums unique to OpenGL ES 2.0 */
{ 0, 0, TYPE_API_MASK, API_OPENGLES2_BIT, NO_EXTRA },
@@ -803,12 +812,6 @@ static const struct value_desc values[] = {
{ GL_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA },
#endif /* FEATURE_ES2 */
- /* GL_OES_EGL_image_external */
- { GL_TEXTURE_BINDING_EXTERNAL_OES, LOC_CUSTOM,
- TYPE_INT, TEXTURE_EXTERNAL_INDEX, extra_OES_EGL_image_external },
- { GL_TEXTURE_EXTERNAL_OES, LOC_CUSTOM,
- TYPE_BOOLEAN, 0, extra_OES_EGL_image_external },
-
#if FEATURE_GL
/* Remaining enums are only in OpenGL */
{ 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGL_CORE_BIT, NO_EXTRA },
@@ -1384,45 +1387,54 @@ static const struct value_desc values[] = {
* collisions for any enum (typical numbers). And the code is very
* simple, even though it feels a little magic. */
-static unsigned short table[1024];
+static unsigned short table[API_LAST + 1][1024];
static const int prime_factor = 89, prime_step = 281;
#ifdef GET_DEBUG
static void
-print_table_stats(void)
+print_table_stats(int api)
{
int i, j, collisions[11], count, hash, mask;
const struct value_desc *d;
-
+ const char *api_names[] = {
+ [API_OPENGL] = "GL",
+ [API_OPENGL_CORE] = "GL_CORE",
+ [API_OPENGLES] = "GLES",
+ [API_OPENGLES2] = "GLES2",
+ };
+ const char *api_name;
+
+ api_name = api < Elements(api_names) ? api_names[api] : "N/A";
count = 0;
- mask = Elements(table) - 1;
+ mask = Elements(table[api]) - 1;
memset(collisions, 0, sizeof collisions);
- for (i = 0; i < Elements(table); i++) {
- if (!table[i])
- continue;
+ for (i = 0; i < Elements(table[api]); i++) {
+ if (!table[api][i])
+ continue;
count++;
- d = &values[table[i]];
+ d = &values[table[api][i]];
hash = (d->pname * prime_factor);
j = 0;
while (1) {
- if (values[table[hash & mask]].pname == d->pname)
- break;
- hash += prime_step;
- j++;
+ if (values[table[api][hash & mask]].pname == d->pname)
+ break;
+ hash += prime_step;
+ j++;
}
if (j < 10)
- collisions[j]++;
+ collisions[j]++;
else
- collisions[10]++;
+ collisions[10]++;
}
- printf("number of enums: %d (total %d)\n", count, Elements(values));
+ printf("number of enums for %s: %d (total %ld)\n",
+ api_name, count, Elements(values));
for (i = 0; i < Elements(collisions) - 1; i++)
if (collisions[i] > 0)
- printf(" %d enums with %d %scollisions\n",
- collisions[i], i, i == 10 ? "or more " : "");
+ printf(" %d enums with %d %scollisions\n",
+ collisions[i], i, i == 10 ? "or more " : "");
}
#endif
@@ -1437,27 +1449,30 @@ print_table_stats(void)
void _mesa_init_get_hash(struct gl_context *ctx)
{
int i, hash, index, mask;
+ int api;
int api_mask = 0, api_bit;
- mask = Elements(table) - 1;
- api_bit = 1 << ctx->API;
+ api = ctx->API;
+
+ mask = Elements(table[api]) - 1;
+ api_bit = 1 << api;
for (i = 0; i < Elements(values); i++) {
if (values[i].type == TYPE_API_MASK) {
- api_mask = values[i].offset;
- continue;
+ api_mask = values[i].offset;
+ continue;
}
if (!(api_mask & api_bit))
- continue;
+ continue;
hash = (values[i].pname * prime_factor) & mask;
while (1) {
- index = hash & mask;
- if (!table[index]) {
- table[index] = i;
- break;
- }
- hash += prime_step;
+ index = hash & mask;
+ if (!table[api][index]) {
+ table[api][index] = i;
+ break;
+ }
+ hash += prime_step;
}
}
@@ -1985,22 +2000,24 @@ find_value(const char *func, GLenum pname, void **p, union value *v)
struct gl_texture_unit *unit;
int mask, hash;
const struct value_desc *d;
+ int api;
- mask = Elements(table) - 1;
+ api = ctx->API;
+ mask = Elements(table[api]) - 1;
hash = (pname * prime_factor);
while (1) {
- d = &values[table[hash & mask]];
+ d = &values[table[api][hash & mask]];
/* If the enum isn't valid, the hash walk ends with index 0,
* which is the API mask entry at the beginning of values[]. */
if (unlikely(d->type == TYPE_API_MASK)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
- _mesa_lookup_enum_by_nr(pname));
- return &error_value;
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
+ _mesa_lookup_enum_by_nr(pname));
+ return &error_value;
}
if (likely(d->pname == pname))
- break;
+ break;
hash += prime_step;
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index ba43e57..f185ffd 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3340,6 +3340,8 @@ typedef enum
API_OPENGLES,
API_OPENGLES2,
API_OPENGL_CORE,
+
+ API_LAST = API_OPENGL_CORE,
} gl_api;
/**
diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp
index 7d46080..f4f424d 100644
--- a/src/mesa/main/tests/enum_strings.cpp
+++ b/src/mesa/main/tests/enum_strings.cpp
@@ -563,7 +563,7 @@ const struct enum_info everything[] = {
{ 0x8036, "GL_UNSIGNED_INT_10_10_10_2" },
{ 0x8037, "GL_POLYGON_OFFSET_FILL" },
{ 0x8038, "GL_POLYGON_OFFSET_FACTOR" },
- { 0x8039, "GL_POLYGON_OFFSET_BIAS" },
+ { 0x8039, "GL_POLYGON_OFFSET_BIAS_EXT" },
{ 0x803A, "GL_RESCALE_NORMAL" },
{ 0x803B, "GL_ALPHA4" },
{ 0x803C, "GL_ALPHA8" },
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 21646cc..38fa9fa 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3034,13 +3034,15 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
border, internalFormat, texFormat);
/* Give the texture to the driver. <pixels> may be null. */
- if (compressed) {
- ctx->Driver.CompressedTexImage(ctx, dims, texImage,
- imageSize, pixels);
- }
- else {
- ctx->Driver.TexImage(ctx, dims, texImage, format,
- type, pixels, unpack);
+ if (width > 0 && height > 0 && depth > 0) {
+ if (compressed) {
+ ctx->Driver.CompressedTexImage(ctx, dims, texImage,
+ imageSize, pixels);
+ }
+ else {
+ ctx->Driver.TexImage(ctx, dims, texImage, format,
+ type, pixels, unpack);
+ }
}
check_gen_mipmap(ctx, target, texObj, level);
@@ -3596,10 +3598,10 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions,
if (!_mesa_is_compressed_format(ctx, format))
return GL_INVALID_ENUM;
- if (width < 1 || width > maxTextureSize)
+ if (width < 0 || width > maxTextureSize)
return GL_INVALID_VALUE;
- if ((height < 1 || height > maxTextureSize)
+ if ((height < 0 || height > maxTextureSize)
&& dimensions > 1)
return GL_INVALID_VALUE;

View File

@ -31,23 +31,25 @@
%define _default_patch_fuzz 2
%define gitdate 20120924
#define gitdate 20120924
#% define snapshot
Summary: Mesa graphics libraries
Name: mesa
Version: 9.0
Release: 0.4%{?dist}
Release: 1%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
#Source0: http://downloads.sf.net/mesa3d/MesaLib-%{version}.tar.bz2
#Source0: http://www.mesa3d.org/beta/MesaLib-%{version}%{?snapshot}.tar.bz2
#Source0: ftp://ftp.freedesktop.org/pub/%{name}/%{version}/MesaLib-%{version}.tar.bz2
Source0: %{name}-%{gitdate}.tar.xz
Source0: ftp://ftp.freedesktop.org/pub/%{name}/%{version}/MesaLib-%{version}.tar.bz2
#Source0: %{name}-%{gitdate}.tar.xz
Source3: make-git-snapshot.sh
Patch1: mesa-9.0-12-gd56ee24.patch
#Patch7: mesa-7.1-link-shared.patch
Patch9: mesa-8.0-llvmpipe-shmget.patch
Patch11: mesa-8.0-nouveau-tfp-blacklist.patch
@ -261,12 +263,12 @@ Group: System Environment/Libraries
Mesa shared glapi
%prep
#% setup -q -n Mesa-%{version}%{?snapshot}
%setup -q -n mesa-%{gitdate}
#patch7 -p1 -b .dricore
%setup -q -n Mesa-%{version}%{?snapshot}
#setup -q -n mesa-%{gitdate}
%patch1 -p1 -b .git
%patch11 -p1 -b .nouveau
%patch13 -p1 -b .no-libkms
%patch101 -p1 -b .syms
#patch101 -p1 -b .syms
# this fastpath is:
# - broken with swrast classic
@ -544,6 +546,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Wed Oct 10 2012 Adam Jackson <ajax@redhat.com> 9.0-1
- Mesa 9.0
- mesa-9.0-12-gd56ee24.patch: sync with 9.0 branch in git
* Wed Oct 10 2012 Adam Jackson <ajax@redhat.com> 9.0-0.4
- Switch to external gl-manpages and libGLU
- Drop ShmGetImage fastpath for a bit

View File

@ -1,3 +1,4 @@
6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2
9f4b33ba3e41185966d333ff4b4594f4 mesa-20120924.tar.xz
be9249132ff49275461cf92039083030 glu-9.0.0.tar.bz2
60e557ce407be3732711da484ab3db6c MesaLib-9.0.tar.bz2