aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-07-04 19:50:15 +0200
committermarha <marha@users.sourceforge.net>2014-07-04 19:50:15 +0200
commitfe03d6aef6338e43593f164b09ae993bcd0ecbdd (patch)
tree0fdb7e12fc82894e07b8b8141f2dbb00a93c60ad /mesalib/src/mesa/main
parentcfc5bafcb2db8c6e05d7be6bb7315960be08c0d8 (diff)
downloadvcxsrv-fe03d6aef6338e43593f164b09ae993bcd0ecbdd.tar.gz
vcxsrv-fe03d6aef6338e43593f164b09ae993bcd0ecbdd.tar.bz2
vcxsrv-fe03d6aef6338e43593f164b09ae993bcd0ecbdd.zip
fontconfig mesa pixman xserver git update 4 July 2014
xserver commit a61ca6f006d70343c88fe45206fae0669d1e8971 pixman commit 6d2cf40166d81bfc63108504c8022dc4fec37ff5 fontconfig commit 5b22776999b6052afe0e829b1a0c0935bbe1e9f7 mesa commit 9a37eb8adb6558a4abf47774b583cb582a0ae116
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/compiler.h14
-rw-r--r--mesalib/src/mesa/main/extensions.c1
-rw-r--r--mesalib/src/mesa/main/mtypes.h3
-rw-r--r--mesalib/src/mesa/main/shader_query.cpp24
4 files changed, 26 insertions, 16 deletions
diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h
index 600691724..79d8740e5 100644
--- a/mesalib/src/mesa/main/compiler.h
+++ b/mesalib/src/mesa/main/compiler.h
@@ -253,15 +253,23 @@ static INLINE GLuint CPU_TO_LE32(GLuint x)
* function" warnings.
*/
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 5
-#define unreachable() __builtin_unreachable()
+#define unreachable(str) \
+do { \
+ assert(!str); \
+ __builtin_unreachable(); \
+} while (0)
#elif (defined(__clang__) && defined(__has_builtin))
# if __has_builtin(__builtin_unreachable)
-# define unreachable() __builtin_unreachable()
+# define unreachable(str) \
+do { \
+ assert(!str); \
+ __builtin_unreachable(); \
+} while (0)
# endif
#endif
#ifndef unreachable
-#define unreachable()
+#define unreachable(str)
#endif
/*
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index 6f2536170..92e3f0d68 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -323,6 +323,7 @@ static const struct extension extension_table[] = {
{ "GL_AMD_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 },
{ "GL_AMD_shader_trinary_minmax", o(dummy_true), GL, 2012 },
{ "GL_AMD_vertex_shader_layer", o(AMD_vertex_shader_layer), GLC, 2012 },
+ { "GL_AMD_vertex_shader_viewport_index", o(AMD_vertex_shader_viewport_index), GLC, 2012 },
{ "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), GL, 2006 },
{ "GL_APPLE_packed_pixels", o(dummy_true), GLL, 2002 },
{ "GL_APPLE_texture_max_level", o(dummy_true), ES1 | ES2, 2009 },
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index eaf377610..a7126fd55 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -2560,7 +2560,7 @@ struct gl_uniform_block
GLuint Binding;
/**
- * Minimum size of a buffer object to back this uniform buffer
+ * Minimum size (in bytes) of a buffer object to back this uniform buffer
* (GL_UNIFORM_BLOCK_DATA_SIZE).
*/
GLuint UniformBufferSize;
@@ -3616,6 +3616,7 @@ struct gl_extensions
GLboolean AMD_performance_monitor;
GLboolean AMD_seamless_cubemap_per_texture;
GLboolean AMD_vertex_shader_layer;
+ GLboolean AMD_vertex_shader_viewport_index;
GLboolean APPLE_object_purgeable;
GLboolean ATI_texture_compression_3dc;
GLboolean ATI_texture_mirror_once;
diff --git a/mesalib/src/mesa/main/shader_query.cpp b/mesalib/src/mesa/main/shader_query.cpp
index 36d1d9cc0..426774316 100644
--- a/mesalib/src/mesa/main/shader_query.cpp
+++ b/mesalib/src/mesa/main/shader_query.cpp
@@ -126,8 +126,8 @@ _mesa_GetActiveAttrib(GLhandleARB program, GLuint desired_index,
exec_list *const ir = shProg->_LinkedShaders[MESA_SHADER_VERTEX]->ir;
unsigned current_index = 0;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
if (!is_active_attrib(var))
continue;
@@ -236,8 +236,8 @@ _mesa_GetAttribLocation(GLhandleARB program, const GLcharARB * name)
return -1;
exec_list *ir = shProg->_LinkedShaders[MESA_SHADER_VERTEX]->ir;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
/* The extra check against VERT_ATTRIB_GENERIC0 is because
* glGetAttribLocation cannot be used on "conventional" attributes.
@@ -274,8 +274,8 @@ _mesa_count_active_attribs(struct gl_shader_program *shProg)
exec_list *const ir = shProg->_LinkedShaders[MESA_SHADER_VERTEX]->ir;
unsigned i = 0;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
if (!is_active_attrib(var))
continue;
@@ -298,8 +298,8 @@ _mesa_longest_attribute_name_length(struct gl_shader_program *shProg)
exec_list *const ir = shProg->_LinkedShaders[MESA_SHADER_VERTEX]->ir;
size_t longest = 0;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
if (var == NULL
|| var->data.mode != ir_var_shader_in
@@ -400,8 +400,8 @@ _mesa_GetFragDataIndex(GLuint program, const GLchar *name)
return -1;
exec_list *ir = shProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->ir;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
/* The extra check against FRAG_RESULT_DATA0 is because
* glGetFragDataLocation cannot be used on "conventional" attributes.
@@ -456,8 +456,8 @@ _mesa_GetFragDataLocation(GLuint program, const GLchar *name)
return -1;
exec_list *ir = shProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->ir;
- foreach_list(node, ir) {
- const ir_variable *const var = ((ir_instruction *) node)->as_variable();
+ foreach_in_list(ir_instruction, node, ir) {
+ const ir_variable *const var = node->as_variable();
/* The extra check against FRAG_RESULT_DATA0 is because
* glGetFragDataLocation cannot be used on "conventional" attributes.