aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-06-08 15:05:49 +0200
committermarha <marha@users.sourceforge.net>2014-06-08 15:05:49 +0200
commit71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec (patch)
treeea689cdd51f395980ddc37dc33781635976f3a16 /mesalib/src/mesa/main
parentaec798fb4dc72d616732d0fa711faffaa8cd7590 (diff)
parent2acb86c9b086bdb9a3897db0b93820652e07cb59 (diff)
downloadvcxsrv-71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec.tar.gz
vcxsrv-71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec.tar.bz2
vcxsrv-71cc8d9b7dc729934a29445cbd6d1f7a6d9ecbec.zip
Merge remote-tracking branch 'origin/released'
Conflicts: apps/xwininfo/xwininfo.c xorg-server/hw/xwin/glx/indirect.c
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/get.c16
-rw-r--r--mesalib/src/mesa/main/get_hash_generator.py2
-rw-r--r--mesalib/src/mesa/main/get_hash_params.py4
-rw-r--r--mesalib/src/mesa/main/hash.c10
-rw-r--r--mesalib/src/mesa/main/performance_monitor.c5
5 files changed, 33 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index 80a5839b5..9b56edb74 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -847,6 +847,16 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
v->value_int = ctx->Array.VAO->IndexBufferObj->Name;
break;
+ /* ARB_vertex_array_bgra */
+ case GL_COLOR_ARRAY_SIZE:
+ array = &ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_COLOR0];
+ v->value_int = array->Format == GL_BGRA ? GL_BGRA : array->Size;
+ break;
+ case GL_SECONDARY_COLOR_ARRAY_SIZE:
+ array = &ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_COLOR1];
+ v->value_int = array->Format == GL_BGRA ? GL_BGRA : array->Size;
+ break;
+
/* ARB_copy_buffer */
case GL_COPY_READ_BUFFER:
v->value_int = ctx->CopyReadBuffer->Name;
@@ -995,7 +1005,11 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
break;
/* GL_ARB_shader_atomic_counters */
case GL_ATOMIC_COUNTER_BUFFER_BINDING:
- v->value_int = ctx->AtomicBuffer->Name;
+ if (ctx->AtomicBuffer) {
+ v->value_int = ctx->AtomicBuffer->Name;
+ } else {
+ v->value_int = 0;
+ }
break;
/* GL_ARB_draw_indirect */
case GL_DRAW_INDIRECT_BUFFER_BINDING:
diff --git a/mesalib/src/mesa/main/get_hash_generator.py b/mesalib/src/mesa/main/get_hash_generator.py
index 96bc49587..b200d1973 100644
--- a/mesalib/src/mesa/main/get_hash_generator.py
+++ b/mesalib/src/mesa/main/get_hash_generator.py
@@ -52,7 +52,7 @@ def print_header():
(prime_factor, prime_step)
def print_params(params):
- print "static struct value_desc values[] = {"
+ print "static const struct value_desc values[] = {"
for p in params:
print " { %s, %s }," % (p[0], p[1])
diff --git a/mesalib/src/mesa/main/get_hash_params.py b/mesalib/src/mesa/main/get_hash_params.py
index d40fa0778..c7a6e02af 100644
--- a/mesalib/src/mesa/main/get_hash_params.py
+++ b/mesalib/src/mesa/main/get_hash_params.py
@@ -199,7 +199,7 @@ descriptor=[
[ "NORMAL_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_NORMAL].Type), NO_EXTRA" ],
[ "NORMAL_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_NORMAL].Stride), NO_EXTRA" ],
[ "COLOR_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR0].Enabled), NO_EXTRA" ],
- [ "COLOR_ARRAY_SIZE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Size), NO_EXTRA" ],
+ [ "COLOR_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
[ "COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR0].Type), NO_EXTRA" ],
[ "COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Stride), NO_EXTRA" ],
[ "TEXTURE_COORD_ARRAY", "LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Enabled), NO_EXTRA" ],
@@ -552,7 +552,7 @@ descriptor=[
[ "SECONDARY_COLOR_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR1].Enabled), NO_EXTRA" ],
[ "SECONDARY_COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR1].Type), NO_EXTRA" ],
[ "SECONDARY_COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Stride), NO_EXTRA" ],
- [ "SECONDARY_COLOR_ARRAY_SIZE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Size), NO_EXTRA" ],
+ [ "SECONDARY_COLOR_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
# GL_EXT_fog_coord
[ "CURRENT_FOG_COORDINATE", "CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_FOG][0]), extra_flush_current" ],
diff --git a/mesalib/src/mesa/main/hash.c b/mesalib/src/mesa/main/hash.c
index 23018e9da..674c29d65 100644
--- a/mesalib/src/mesa/main/hash.c
+++ b/mesalib/src/mesa/main/hash.c
@@ -115,10 +115,20 @@ _mesa_NewHashTable(void)
if (table) {
table->ht = _mesa_hash_table_create(NULL, uint_key_compare);
+ if (table->ht == NULL) {
+ free(table);
+ _mesa_error_no_memory(__func__);
+ return NULL;
+ }
+
_mesa_hash_table_set_deleted_key(table->ht, uint_key(DELETED_KEY_VALUE));
mtx_init(&table->Mutex, mtx_plain);
mtx_init(&table->WalkMutex, mtx_plain);
}
+ else {
+ _mesa_error_no_memory(__func__);
+ }
+
return table;
}
diff --git a/mesalib/src/mesa/main/performance_monitor.c b/mesalib/src/mesa/main/performance_monitor.c
index 21b9423e0..9d1a6b4d8 100644
--- a/mesalib/src/mesa/main/performance_monitor.c
+++ b/mesalib/src/mesa/main/performance_monitor.c
@@ -1036,6 +1036,11 @@ _mesa_CreatePerfQueryINTEL(GLuint queryId, GLuint *queryHandle)
}
m = new_performance_monitor(ctx, first);
+ if (m == NULL) {
+ _mesa_error_no_memory(__func__);
+ return;
+ }
+
_mesa_HashInsert(ctx->PerfMonitor.Monitors, first, m);
*queryHandle = first;