diff --git a/programs/develop/libraries/Mesa/configs/current b/programs/develop/libraries/Mesa/configs/current index 9a160381b9..93f504ede5 100644 --- a/programs/develop/libraries/Mesa/configs/current +++ b/programs/develop/libraries/Mesa/configs/current @@ -20,8 +20,8 @@ GLES_OVERLAY = 0 CFLAGS = -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \ -I$(TOP)/../newlib/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) \ $(DEFINES) -CXXFLAGS = -g -O2 -Wall -fvisibility=hidden -fno-strict-aliasing \ - $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) +CXXFLAGS = -g -O2 -Wall -fno-strict-aliasing \ + -I$(TOP)/../newlib/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) LDFLAGS = EXTRA_LIB_PATH = RADEON_CFLAGS = @@ -89,10 +89,16 @@ VG_LIB_GLOB = lib$(VG_LIB).*a* # Directories to build LIB_DIR = lib -SRC_DIRS = mapi/glapi mesa +SRC_DIRS = mapi/glapi glsl mesa GLU_DIRS = sgi DRIVER_DIRS = osmesa +EGL_DRIVERS_DIRS = +GALLIUM_TARGET_DIRS = +GALLIUM_STATE_TRACKERS_DIRS = +# Driver specific build vars +EGL_PLATFORMS = +EGL_CLIENT_APIS = $(GL_LIB) # Dependencies X11_INCLUDES = diff --git a/programs/develop/libraries/Mesa/src/glsl/Makefile b/programs/develop/libraries/Mesa/src/glsl/Makefile index 7e9471e0c0..13b1dd45c9 100644 --- a/programs/develop/libraries/Mesa/src/glsl/Makefile +++ b/programs/develop/libraries/Mesa/src/glsl/Makefile @@ -127,7 +127,7 @@ ALL_SOURCES = \ ##### TARGETS ##### -default: depend lib$(LIBNAME).a $(APPS) +default: depend lib$(LIBNAME).a lib$(LIBNAME).a: $(OBJECTS) Makefile $(TOP)/src/glsl/Makefile.template $(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS) diff --git a/programs/develop/libraries/Mesa/src/glsl/glcpp/glcpp b/programs/develop/libraries/Mesa/src/glsl/glcpp/glcpp deleted file mode 100644 index a5d568c756..0000000000 Binary files a/programs/develop/libraries/Mesa/src/glsl/glcpp/glcpp and /dev/null differ diff --git a/programs/develop/libraries/Mesa/src/mesa/Makefile b/programs/develop/libraries/Mesa/src/mesa/Makefile index d0d3bd78bf..c6a166acf9 100644 --- a/programs/develop/libraries/Mesa/src/mesa/Makefile +++ b/programs/develop/libraries/Mesa/src/mesa/Makefile @@ -100,8 +100,8 @@ main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py m # Helper libraries used by many drivers: # Make archive of core mesa object files -libmesa.a: $(MESA_OBJECTS) - @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) +libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS) libes1.a: $(ES1_OBJECTS) $(GLSL_LIBS) @$(MKLIB) -o es1 -static $(ES1_OBJECTS) $(GLSL_LIBS) diff --git a/programs/develop/libraries/Mesa/src/mesa/drivers/osmesa/Makefile b/programs/develop/libraries/Mesa/src/mesa/drivers/osmesa/Makefile index 3144ef68d6..97b3da0f01 100644 --- a/programs/develop/libraries/Mesa/src/mesa/drivers/osmesa/Makefile +++ b/programs/develop/libraries/Mesa/src/mesa/drivers/osmesa/Makefile @@ -22,8 +22,8 @@ INCLUDE_DIRS = \ CORE_MESA = \ $(TOP)/src/mesa/libmesa.a \ - $(TOP)/src/mapi/glapi/libglapi.a -# $(TOP)/src/glsl/libglsl.a + $(TOP)/src/mapi/glapi/libglapi.a \ + $(TOP)/src/glsl/libglsl.a .c.o: $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ @@ -40,7 +40,7 @@ $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OBJECTS) $(CORE_MESA) -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \ -install $(TOP)/$(LIB_DIR) -cplusplus $(MKLIB_OPTIONS) \ -id $(INSTALL_LIB_DIR)/lib$(OSMESA_LIB).$(MESA_MAJOR).dylib \ - $(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA) + $(OSMESA_LIB_DEPS) $(OBJECTS) diff --git a/programs/develop/libraries/Mesa/src/mesa/drivers/osmesa/osmesa.c b/programs/develop/libraries/Mesa/src/mesa/drivers/osmesa/osmesa.c index d7633f2444..d064f1f04c 100644 --- a/programs/develop/libraries/Mesa/src/mesa/drivers/osmesa/osmesa.c +++ b/programs/develop/libraries/Mesa/src/mesa/drivers/osmesa/osmesa.c @@ -1125,7 +1125,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, else { return NULL; } - + osmesa = (OSMesaContext) CALLOC_STRUCT(osmesa_context); if (osmesa) { osmesa->gl_visual = _mesa_create_visual( GL_FALSE, /* double buffer */ @@ -1153,7 +1153,7 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, functions.GetString = get_string; functions.UpdateState = osmesa_update_state; functions.GetBufferSize = NULL; - + if (!_mesa_initialize_context(&osmesa->mesa, osmesa->gl_visual, sharelist ? &sharelist->mesa @@ -1163,13 +1163,13 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, free(osmesa); return NULL; } - + _mesa_enable_sw_extensions(&(osmesa->mesa)); _mesa_enable_1_3_extensions(&(osmesa->mesa)); _mesa_enable_1_4_extensions(&(osmesa->mesa)); _mesa_enable_1_5_extensions(&(osmesa->mesa)); -// _mesa_enable_2_0_extensions(&(osmesa->mesa)); -// _mesa_enable_2_1_extensions(&(osmesa->mesa)); + _mesa_enable_2_0_extensions(&(osmesa->mesa)); + _mesa_enable_2_1_extensions(&(osmesa->mesa)); osmesa->gl_buffer = _mesa_create_framebuffer(osmesa->gl_visual); if (!osmesa->gl_buffer) { diff --git a/programs/develop/libraries/Mesa/src/mesa/main/mfeatures.h b/programs/develop/libraries/Mesa/src/mesa/main/mfeatures.h index f4a64b4089..900ddd899d 100644 --- a/programs/develop/libraries/Mesa/src/mesa/main/mfeatures.h +++ b/programs/develop/libraries/Mesa/src/mesa/main/mfeatures.h @@ -111,33 +111,33 @@ #define FEATURE_es2_glsl FEATURE_ES2 -#define FEATURE_ARB_fragment_program 0 -#define FEATURE_ARB_vertex_program 0 -#define FEATURE_ARB_vertex_shader FEATURE_GL -#define FEATURE_ARB_fragment_shader 0 +#define FEATURE_ARB_fragment_program 1 +#define FEATURE_ARB_vertex_program 1 +#define FEATURE_ARB_vertex_shader 1 +#define FEATURE_ARB_fragment_shader 1 #define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader) #define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects #define FEATURE_ARB_geometry_shader4 FEATURE_ARB_shader_objects -#define FEATURE_ARB_framebuffer_object 0 -#define FEATURE_ARB_map_buffer_range 0 +#define FEATURE_ARB_framebuffer_object (FEATURE_GL && FEATURE_EXT_framebuffer_object) +#define FEATURE_ARB_map_buffer_range FEATURE_GL #define FEATURE_ARB_pixel_buffer_object (FEATURE_GL && FEATURE_EXT_pixel_buffer_object) #define FEATURE_ARB_sync FEATURE_GL -#define FEATURE_ARB_vertex_buffer_object FEATURE_GL +#define FEATURE_ARB_vertex_buffer_object 1 -#define FEATURE_EXT_framebuffer_blit 0 -#define FEATURE_EXT_framebuffer_object 0 -#define FEATURE_EXT_pixel_buffer_object 0 +#define FEATURE_EXT_framebuffer_blit FEATURE_GL +#define FEATURE_EXT_framebuffer_object 1 +#define FEATURE_EXT_pixel_buffer_object 1 #define FEATURE_EXT_texture_sRGB FEATURE_GL #define FEATURE_EXT_transform_feedback FEATURE_GL -#define FEATURE_APPLE_object_purgeable 0 -#define FEATURE_ATI_fragment_shader 0 -#define FEATURE_NV_fence 0 -#define FEATURE_NV_fragment_program 0 -#define FEATURE_NV_vertex_program 0 +#define FEATURE_APPLE_object_purgeable FEATURE_GL +#define FEATURE_ATI_fragment_shader FEATURE_GL +#define FEATURE_NV_fence FEATURE_GL +#define FEATURE_NV_fragment_program FEATURE_GL +#define FEATURE_NV_vertex_program FEATURE_GL -#define FEATURE_OES_EGL_image 0 +#define FEATURE_OES_EGL_image 1 #define FEATURE_OES_draw_texture FEATURE_ES1 #define FEATURE_OES_framebuffer_object FEATURE_ES #define FEATURE_OES_mapbuffer FEATURE_ES diff --git a/programs/develop/libraries/Mesa/src/mesa/main/shaderapi.c b/programs/develop/libraries/Mesa/src/mesa/main/shaderapi.c index bee25b224e..afae02261e 100644 --- a/programs/develop/libraries/Mesa/src/mesa/main/shaderapi.c +++ b/programs/develop/libraries/Mesa/src/mesa/main/shaderapi.c @@ -851,7 +851,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj) /* this call will set the sh->CompileStatus field to indicate if * compilation was successful. */ -// _mesa_glsl_compile_shader(ctx, sh); + _mesa_glsl_compile_shader(ctx, sh); } @@ -880,7 +880,7 @@ link_program(struct gl_context *ctx, GLuint program) FLUSH_VERTICES(ctx, _NEW_PROGRAM); - //_mesa_glsl_link_shader(ctx, shProg); + _mesa_glsl_link_shader(ctx, shProg); /* debug code */ if (0) { @@ -1677,7 +1677,7 @@ _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, void GLAPIENTRY _mesa_ReleaseShaderCompiler(void) { -// _mesa_destroy_shader_compiler_caches(); + _mesa_destroy_shader_compiler_caches(); } diff --git a/programs/develop/libraries/Mesa/src/mesa/main/shaderobj.c b/programs/develop/libraries/Mesa/src/mesa/main/shaderobj.c index c9436652de..82e5d876fd 100644 --- a/programs/develop/libraries/Mesa/src/mesa/main/shaderobj.c +++ b/programs/develop/libraries/Mesa/src/mesa/main/shaderobj.c @@ -406,6 +406,6 @@ _mesa_init_shader_object_functions(struct dd_function_table *driver) driver->DeleteShader = _mesa_delete_shader; driver->NewShaderProgram = _mesa_new_shader_program; driver->DeleteShaderProgram = _mesa_delete_shader_program; -// driver->CompileShader = _mesa_ir_compile_shader; -// driver->LinkShader = _mesa_ir_link_shader; + driver->CompileShader = _mesa_ir_compile_shader; + driver->LinkShader = _mesa_ir_link_shader; } diff --git a/programs/develop/libraries/Mesa/src/mesa/sources.mak b/programs/develop/libraries/Mesa/src/mesa/sources.mak index 892e0eb05a..75c3468abf 100644 --- a/programs/develop/libraries/Mesa/src/mesa/sources.mak +++ b/programs/develop/libraries/Mesa/src/mesa/sources.mak @@ -300,6 +300,8 @@ MESA_SOURCES = \ $(COMMON_DRIVER_SOURCES)\ $(ASM_C_SOURCES) +MESA_CXX_SOURCES = \ + $(SHADER_CXX_SOURCES) # Sources for building Gallium drivers MESA_GALLIUM_SOURCES = \ diff --git a/programs/develop/libraries/Mesa/src/mesa/x86/matypes.h b/programs/develop/libraries/Mesa/src/mesa/x86/matypes.h index e8ba861d58..e3831d425d 100644 --- a/programs/develop/libraries/Mesa/src/mesa/x86/matypes.h +++ b/programs/develop/libraries/Mesa/src/mesa/x86/matypes.h @@ -14,16 +14,16 @@ #define CTX_DRIVER_CTX 880 -#define CTX_LIGHT_ENABLED 39628 -#define CTX_LIGHT_SHADE_MODEL 39632 -#define CTX_LIGHT_COLOR_MAT_FACE 39640 -#define CTX_LIGHT_COLOR_MAT_MODE 39644 -#define CTX_LIGHT_COLOR_MAT_MASK 39648 -#define CTX_LIGHT_COLOR_MAT_ENABLED 39652 -#define CTX_LIGHT_ENABLED_LIST 39660 -#define CTX_LIGHT_NEED_VERTS 44021 -#define CTX_LIGHT_FLAGS 44024 -#define CTX_LIGHT_BASE_COLOR 44028 +#define CTX_LIGHT_ENABLED 39612 +#define CTX_LIGHT_SHADE_MODEL 39616 +#define CTX_LIGHT_COLOR_MAT_FACE 39624 +#define CTX_LIGHT_COLOR_MAT_MODE 39628 +#define CTX_LIGHT_COLOR_MAT_MASK 39632 +#define CTX_LIGHT_COLOR_MAT_ENABLED 39636 +#define CTX_LIGHT_ENABLED_LIST 39644 +#define CTX_LIGHT_NEED_VERTS 44005 +#define CTX_LIGHT_FLAGS 44008 +#define CTX_LIGHT_BASE_COLOR 44012 /* =============================================================