aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa')
-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
6 files changed, 31 insertions, 8 deletions
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;