aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-04 09:21:39 +0200
committermarha <marha@users.sourceforge.net>2012-06-04 09:21:39 +0200
commit1af6fc1b5d93e54d6674de8b5870448b29f139a7 (patch)
tree83c0d1097657f08544c154d5ba6c820c1fb67e78 /mesalib/src
parente4580373a81894c451e5933b24906a075828b77e (diff)
downloadvcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.tar.gz
vcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.tar.bz2
vcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.zip
fontconfig libX11 libXft mesa pixman xserver xkeyboard-config git update 4
May 2012
Diffstat (limited to 'mesalib/src')
-rw-r--r--mesalib/src/SConscript1
-rw-r--r--mesalib/src/glsl/ast_to_hir.cpp3
-rw-r--r--mesalib/src/glsl/ralloc.c2
-rw-r--r--mesalib/src/mapi/glapi/SConscript25
-rw-r--r--mesalib/src/mapi/glapi/gen/SConscript49
-rw-r--r--mesalib/src/mesa/Makefile1
-rw-r--r--mesalib/src/mesa/SConscript15
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c2
-rw-r--r--mesalib/src/mesa/main/attrib.c8
-rw-r--r--mesalib/src/mesa/state_tracker/st_draw_feedback.c9
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp4
11 files changed, 107 insertions, 12 deletions
diff --git a/mesalib/src/SConscript b/mesalib/src/SConscript
index 3d0087887..75c444677 100644
--- a/mesalib/src/SConscript
+++ b/mesalib/src/SConscript
@@ -16,6 +16,7 @@ if env['hostonly']:
# used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined
# in mapi/glapi-shared/SConscript. mesa/SConscript also adapts itself to
# enable OpenGL ES support.
+SConscript('mapi/glapi/gen/SConscript')
SConscript('mapi/glapi/SConscript')
SConscript('mesa/SConscript')
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp
index e23718bdb..15aa88ea9 100644
--- a/mesalib/src/glsl/ast_to_hir.cpp
+++ b/mesalib/src/glsl/ast_to_hir.cpp
@@ -3733,13 +3733,10 @@ ast_case_label::hir(exec_list *instructions,
instructions->push_tail(set_fallthru_on_test);
} else { /* default case */
if (state->switch_state.previous_default) {
- printf("a\n");
YYLTYPE loc = this->get_location();
_mesa_glsl_error(& loc, state,
"multiple default labels in one switch");
- printf("b\n");
-
loc = state->switch_state.previous_default->get_location();
_mesa_glsl_error(& loc, state,
"this is the first default label");
diff --git a/mesalib/src/glsl/ralloc.c b/mesalib/src/glsl/ralloc.c
index 2f93dcdea..3da09b559 100644
--- a/mesalib/src/glsl/ralloc.c
+++ b/mesalib/src/glsl/ralloc.c
@@ -278,7 +278,7 @@ ralloc_parent(const void *ptr)
return NULL;
info = get_header(ptr);
- return PTR_FROM_HEADER(info->parent);
+ return info->parent ? PTR_FROM_HEADER(info->parent) : NULL;
}
static void *autofree_context = NULL;
diff --git a/mesalib/src/mapi/glapi/SConscript b/mesalib/src/mapi/glapi/SConscript
index 4097a7fe1..ad007a6f4 100644
--- a/mesalib/src/mapi/glapi/SConscript
+++ b/mesalib/src/mapi/glapi/SConscript
@@ -2,6 +2,8 @@
# SConscript for glapi
+from sys import executable as python_cmd
+
Import('*')
env = env.Clone()
@@ -47,6 +49,8 @@ for s in mapi_sources:
# Assembly sources
#
if env['gcc'] and env['platform'] not in ('darwin', 'windows'):
+ GLAPI = '#src/mapi/glapi/'
+
if env['machine'] == 'x86':
env.Append(CPPDEFINES = [
'USE_X86_ASM',
@@ -54,6 +58,12 @@ if env['gcc'] and env['platform'] not in ('darwin', 'windows'):
glapi_sources += [
'glapi_x86.S',
]
+ env.CodeGenerate(
+ target = 'glapi_x86.S',
+ script = GLAPI + 'gen/gl_x86_asm.py',
+ source = GLAPI + 'gen/gl_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+ )
elif env['machine'] == 'x86_64':
env.Append(CPPDEFINES = [
'USE_X86_64_ASM',
@@ -61,6 +71,12 @@ if env['gcc'] and env['platform'] not in ('darwin', 'windows'):
glapi_sources += [
'glapi_x86-64.S'
]
+ env.CodeGenerate(
+ target = 'glapi_x86-64.S',
+ script = GLAPI + 'gen/gl_x86-64_asm.py',
+ source = GLAPI + 'gen/gl_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+ )
elif env['machine'] == 'sparc':
env.Append(CPPDEFINES = [
'USE_SPARC_ASM',
@@ -68,6 +84,12 @@ if env['gcc'] and env['platform'] not in ('darwin', 'windows'):
glapi_sources += [
'glapi_sparc.S'
]
+ env.CodeGenerate(
+ target = 'glapi_sparc.S',
+ script = GLAPI + 'gen/gl_SPARC_asm.py',
+ source = GLAPI + 'gen/gl_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+ )
else:
pass
@@ -81,3 +103,6 @@ glapi = env.ConvenienceLibrary(
source = glapi_sources,
)
Export('glapi')
+
+
+env.Depends(glapi_sources, glapi_headers)
diff --git a/mesalib/src/mapi/glapi/gen/SConscript b/mesalib/src/mapi/glapi/gen/SConscript
new file mode 100644
index 000000000..e8bb22731
--- /dev/null
+++ b/mesalib/src/mapi/glapi/gen/SConscript
@@ -0,0 +1,49 @@
+Import('*')
+
+from sys import executable as python_cmd
+
+
+# Generate the GL API headers that are used by various parts of the
+# Mesa and GLX tree. Other .c and .h files are generated elsewhere
+# if they're only used in one place.
+
+GLAPI = '#src/mapi/glapi/'
+
+glapi_headers = []
+
+glapi_headers += env.CodeGenerate(
+ target = '#src/mesa/main/dispatch.h',
+ script = GLAPI + 'gen/gl_table.py',
+ source = GLAPI + 'gen/gl_API.xml',
+ command = python_cmd + ' $SCRIPT -m remap_table -f $SOURCE > $TARGET',
+ )
+
+glapi_headers += env.CodeGenerate(
+ target = '#src/mapi/glapi/glapitable.h',
+ script = GLAPI + 'gen/gl_table.py',
+ source = GLAPI + 'gen/gl_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+ )
+
+glapi_headers += env.CodeGenerate(
+ target = '#src/mapi/glapi/glapitemp.h',
+ script = GLAPI + 'gen/gl_apitemp.py',
+ source = GLAPI + 'gen/gl_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+ )
+
+glapi_headers += env.CodeGenerate(
+ target = '#src/mapi/glapi/glprocs.h',
+ script = GLAPI + 'gen/gl_procs.py',
+ source = GLAPI + 'gen/gl_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+ )
+
+glapi_headers += env.CodeGenerate(
+ target = '#src/mesa/main/remap_helper.h',
+ script = GLAPI + 'gen/remap_helper.py',
+ source = GLAPI + 'gen/gl_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+ )
+
+env.Export('glapi_headers')
diff --git a/mesalib/src/mesa/Makefile b/mesalib/src/mesa/Makefile
index 069527e3a..05aea8d93 100644
--- a/mesalib/src/mesa/Makefile
+++ b/mesalib/src/mesa/Makefile
@@ -215,6 +215,7 @@ clean:
-@cd drivers/osmesa && $(MAKE) clean
-@cd x86 && $(MAKE) clean
-@cd x86-64 && $(MAKE) clean
+ -@cd libdricore && $(MAKE) clean
-include $(DEPENDS)
diff --git a/mesalib/src/mesa/SConscript b/mesalib/src/mesa/SConscript
index d7932c7c9..99bdfad46 100644
--- a/mesalib/src/mesa/SConscript
+++ b/mesalib/src/mesa/SConscript
@@ -6,6 +6,7 @@ Import('*')
import filecmp
import os
import subprocess
+from sys import executable as python_cmd
env = env.Clone()
@@ -328,8 +329,9 @@ mesa_sources = (
statetracker_sources
)
+GLAPI = '#src/mapi/glapi/'
+
if env['gles']:
- from sys import executable as python_cmd
env.Append(CPPDEFINES = ['FEATURE_ES1=1', 'FEATURE_ES2=1'])
@@ -349,7 +351,6 @@ if env['gles']:
)
# generate GLES headers
- GLAPI = '#src/mapi/glapi/'
gles_headers = []
gles_headers += env.CodeGenerate(
target = 'main/api_exec_es1_dispatch.h',
@@ -452,6 +453,16 @@ if env['gcc'] and env['platform'] not in ('darwin', 'windows'):
env.Append(CPPPATH = [matypes[0].dir])
+# The enums.c file is generated from the GL/ES API.xml file
+env.CodeGenerate(
+ target = 'main/enums.c',
+ script = GLAPI + 'gen/gl_enums.py',
+ source = GLAPI + 'gen/gl_and_es_API.xml',
+ command = python_cmd + ' $SCRIPT -f $SOURCE > $TARGET'
+ )
+
+# We also depend on the auto-generated GL API headers
+env.Depends(mesa_sources, glapi_headers)
def write_git_sha1_h_file(filename):
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 95336fc28..a20e41972 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -1793,7 +1793,7 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
clear->ColorLocation = _mesa_GetUniformLocationARB(clear->ShaderProg,
"color");
- if (ctx->Const.GLSLVersion >= 130) {
+ if (ctx->API == API_OPENGL && ctx->Const.GLSLVersion >= 130) {
vs = compile_shader_with_debug(ctx, GL_VERTEX_SHADER, vs_int_source);
fs = compile_shader_with_debug(ctx, GL_FRAGMENT_SHADER, fs_int_source);
diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c
index b114ec941..318d576e8 100644
--- a/mesalib/src/mesa/main/attrib.c
+++ b/mesalib/src/mesa/main/attrib.c
@@ -799,6 +799,14 @@ pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
_mesa_TexParameterf(target, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB,
samp->CompareFailValue);
}
+ if (ctx->Extensions.ARB_shadow) {
+ _mesa_TexParameteri(target, GL_TEXTURE_COMPARE_MODE,
+ samp->CompareMode);
+ _mesa_TexParameteri(target, GL_TEXTURE_COMPARE_FUNC,
+ samp->CompareFunc);
+ }
+ if (ctx->Extensions.ARB_depth_texture)
+ _mesa_TexParameteri(target, GL_DEPTH_TEXTURE_MODE, samp->DepthMode);
}
/* remove saved references to the texture objects */
diff --git a/mesalib/src/mesa/state_tracker/st_draw_feedback.c b/mesalib/src/mesa/state_tracker/st_draw_feedback.c
index 4209fb214..820918e51 100644
--- a/mesalib/src/mesa/state_tracker/st_draw_feedback.c
+++ b/mesalib/src/mesa/state_tracker/st_draw_feedback.c
@@ -232,8 +232,9 @@ st_feedback_draw_vbo(struct gl_context *ctx,
mapped_indices = ib->ptr;
}
- draw_set_index_buffer(draw, &ibuffer);
- draw_set_mapped_index_buffer(draw, mapped_indices);
+ draw_set_indexes(draw,
+ (ubyte *) mapped_indices + ibuffer.offset,
+ ibuffer.index_size);
}
/* set the constant buffer */
@@ -252,9 +253,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
* unmap vertex/index buffers
*/
if (ib) {
- draw_set_mapped_index_buffer(draw, NULL);
- draw_set_index_buffer(draw, NULL);
-
+ draw_set_indexes(draw, NULL, 0);
if (ib_transfer)
pipe_buffer_unmap(pipe, ib_transfer);
pipe_resource_reference(&ibuffer.buffer, NULL);
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 60a4e2831..e8d60f80d 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2810,8 +2810,12 @@ glsl_to_tgsi_visitor::glsl_to_tgsi_visitor()
num_immediates = 0;
current_function = NULL;
num_address_regs = 0;
+ samplers_used = 0;
indirect_addr_temps = false;
indirect_addr_consts = false;
+ num_clip_distances = 0;
+ glsl_version = 0;
+ native_integers = false;
mem_ctx = ralloc_context(NULL);
ctx = NULL;
prog = NULL;