From b3e1e62c45f525cdd332073aaa34d8452cb23374 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 19 Nov 2012 10:47:23 +0100 Subject: git update 19 nov 2012 fontconfig: c20ac78b01df3f0919352bba16b5b48b3b5d4d6d libxcb: 76a2166de9c80b35f987fdc3f3a228bafa0de94e mesa: ddb901fbf4489ffcd85d3320f23913eb1d4fbdfe pixman: 44dd746bb68625b2f6be77c3f80292b45defe9d7 xserver: 6a6c3afe71ac82a93d9fd0034dd5bbdcf0eae1ea xkeyboard-config: 709e05c069428236ca2567e784c9971eecc8ca50 --- mesalib/src/mesa/program/.gitignore | 1 + mesalib/src/mesa/program/Android.mk | 84 +++++++++++++++++++++++++++++ mesalib/src/mesa/program/Makefile.am | 57 ++++++++++++++++++++ mesalib/src/mesa/program/descrip.mms | 93 --------------------------------- mesalib/src/mesa/program/prog_execute.c | 11 ---- 5 files changed, 142 insertions(+), 104 deletions(-) create mode 100644 mesalib/src/mesa/program/Android.mk create mode 100644 mesalib/src/mesa/program/Makefile.am delete mode 100644 mesalib/src/mesa/program/descrip.mms (limited to 'mesalib/src/mesa/program') diff --git a/mesalib/src/mesa/program/.gitignore b/mesalib/src/mesa/program/.gitignore index 4c20872e1..bc48ef673 100644 --- a/mesalib/src/mesa/program/.gitignore +++ b/mesalib/src/mesa/program/.gitignore @@ -1,3 +1,4 @@ +/Makefile program_parse.output lex.yy.c program_parse.tab.c diff --git a/mesalib/src/mesa/program/Android.mk b/mesalib/src/mesa/program/Android.mk new file mode 100644 index 000000000..5eb043955 --- /dev/null +++ b/mesalib/src/mesa/program/Android.mk @@ -0,0 +1,84 @@ +# Copyright 2012 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +LOCAL_PATH := $(call my-dir) + +define local-l-to-c + @mkdir -p $(dir $@) + @echo "Mesa Lex: $(PRIVATE_MODULE) <= $<" + $(hide) $(LEX) -o$@ $< +endef + +define mesa_local-y-to-c-and-h + @mkdir -p $(dir $@) + @echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<" + $(hide) $(YACC) -o $@ -p "_mesa_program_" $< +endef + +# ---------------------------------------------------------------------- +# libmesa_program.a +# ---------------------------------------------------------------------- + +# Import the following variables: +# PROGRAM_FILES +include $(MESA_TOP)/src/mesa/sources.mak + +include $(CLEAR_VARS) + +LOCAL_MODULE := libmesa_program +LOCAL_MODULE_CLASS := STATIC_LIBRARIES + +intermediates := $(call local-intermediates-dir) + +MESA_ENABLED_APIS := ES1 ES2 + +# TODO(chadv): In sources.mak, move these vars to a different list so we can +# remove this kludge. +generated_sources_basenames := \ + lex.yy.c \ + program_parse.tab.c \ + program_parse.tab.h + +LOCAL_SRC_FILES := \ + $(filter-out $(generated_sources_basenames),$(subst program/,,$(PROGRAM_FILES))) + +LOCAL_GENERATED_SOURCES := \ + $(addprefix $(intermediates)/program/,$(generated_sources_basenames)) + +$(intermediates)/program/program_parse.tab.c: $(LOCAL_PATH)/program_parse.y + $(mesa_local-y-to-c-and-h) + +$(intermediates)/program/program_parse.tab.h: $(LOCAL_PATH)/program_parse.y + $(mesa_local-y-to-c-and-h) + +$(intermediates)/program/lex.yy.c: $(LOCAL_PATH)/program_lexer.l + $(local-l-to-c) + +LOCAL_CFLAGS := \ + $(patsubst %,-DFEATURE_%=1,$(MESA_ENABLED_APIS)) + +LOCAL_C_INCLUDES := \ + $(intermediates) \ + $(MESA_TOP)/src/mapi \ + $(MESA_TOP)/src/mesa \ + $(MESA_TOP)/src/glsl + +include $(MESA_COMMON_MK) +include $(BUILD_STATIC_LIBRARY) diff --git a/mesalib/src/mesa/program/Makefile.am b/mesalib/src/mesa/program/Makefile.am new file mode 100644 index 000000000..ea412f56f --- /dev/null +++ b/mesalib/src/mesa/program/Makefile.am @@ -0,0 +1,57 @@ +# Copyright © 2012 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +include ../sources.mak + +AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS) +AM_CFLAGS = $(VISIBILITY_CFLAGS) +AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS) +libdricore_program_la_CFLAGS = $(NOVISIBILITY_CFLAGS) +libdricore_program_la_CXXFLAGS = $(NOVISIBILITY_CXXFLAGS) + +SRCDIR = $(top_srcdir)/src/mesa/ +BUILDDIR = $(top_builddir)/src/mesa/ + +if NEED_LIBDRICORE +DRICORE_LIB = libdricore_program.la +endif + +noinst_LTLIBRARIES = $(DRICORE_LIB) +if HAVE_GALLIUM +noinst_LTLIBRARIES += libprogram.la +else +check_LTLIBRARIES = libprogram.la +endif + +libprogram_la_SOURCES = $(PROGRAM_FILES) +libdricore_program_la_SOURCES = $(PROGRAM_FILES) + +lex.yy.c: program_lexer.l + $(AM_V_GEN) $(LEX) --never-interactive --outfile=$@ $< + +program_parse.tab.c program_parse.tab.h: program_parse.y + $(AM_V_GEN) $(YACC) -p "_mesa_program_" -v -d --output=program_parse.tab.c $< + +BUILT_SOURCES = \ + program_parse.tab.c \ + program_parse.tab.h \ + lex.yy.c +CLEANFILES = $(BUILT_SOURCES) diff --git a/mesalib/src/mesa/program/descrip.mms b/mesalib/src/mesa/program/descrip.mms deleted file mode 100644 index 59730020d..000000000 --- a/mesalib/src/mesa/program/descrip.mms +++ /dev/null @@ -1,93 +0,0 @@ -# Makefile for core library for VMS -# contributed by Jouk Jansen joukj@hrem.nano.tudelft.nl -# Last revision : 29 September 2008 -.first - define gl [---.include.gl] - define math [-.math] - define swrast [-.swrast] - define array_cache [-.array_cache] - define glapi [-.glapi] - define main [-.main] - define shader [-.shader] - -.include [---]mms-config. - -##### MACROS ##### - -VPATH = RCS - -INCDIR = [---.include],[-.main],[-.glapi],[.slang] -LIBDIR = [---.lib] -CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1,"__extension__=")/name=(as_is,short)/float=ieee/ieee=denorm - -SOURCES = \ - atifragshader.c \ - arbprogparse.c \ - arbprogram.c \ - nvfragparse.c \ - nvprogram.c \ - nvvertparse.c \ - program.c \ - programopt.c \ - prog_debug.c \ - prog_execute.c \ - prog_instruction.c \ - prog_parameter.c \ - prog_print.c \ - prog_cache.c \ - prog_statevars.c \ - shader_api.c prog_uniform.c - -OBJECTS = \ - atifragshader.obj,\ - arbprogparse.obj,\ - arbprogram.obj,\ - nvfragparse.obj,\ - nvprogram.obj,\ - nvvertparse.obj,\ - program.obj,\ - programopt.obj,\ - prog_debug.obj,\ - prog_execute.obj,\ - prog_instruction.obj,\ - prog_parameter.obj,\ - prog_print.obj,\ - prog_statevars.obj,\ - shader_api.obj,prog_uniform.obj,prog_cache.obj - -##### RULES ##### - -VERSION=Mesa V3.4 - -##### TARGETS ##### -all : - $(MMS)$(MMSQUALIFIERS) $(LIBDIR)$(GL_LIB) - set def [.slang] - $(MMS)$(MMSQUALIFIERS) - set def [-] - -# Make the library -$(LIBDIR)$(GL_LIB) : $(OBJECTS) - @ library $(LIBDIR)$(GL_LIB) $(OBJECTS) - -clean : - purge - delete *.obj;* - -atifragshader.obj : atifragshader.c -arbprogparse.obj : arbprogparse.c -arbprogram.obj : arbprogram.c -nvfragparse.obj : nvfragparse.c -nvprogram.obj : nvprogram.c -nvvertparse.obj : nvvertparse.c -program.obj : program.c -programopt. obj : programopt.c -prog_debug.obj : prog_debug.c -prog_execute.obj : prog_execute.c -prog_instruction.obj : prog_instruction.c -prog_parameter.obj : prog_parameter.c -prog_print.obj : prog_print.c -prog_statevars.obj : prog_statevars.c -shader_api.obj : shader_api.c -prog_uniform.obj : prog_uniform.c -prog_cache.obj : prog_cache.c diff --git a/mesalib/src/mesa/program/prog_execute.c b/mesalib/src/mesa/program/prog_execute.c index 9ee2f2014..fe2359bc2 100644 --- a/mesalib/src/mesa/program/prog_execute.c +++ b/mesalib/src/mesa/program/prog_execute.c @@ -65,9 +65,6 @@ fi.i = 0xFF800000; \ x = fi.f; \ } while (0) -#elif defined(VMS) -#define SET_POS_INFINITY(x) x = __MAXFLOAT -#define SET_NEG_INFINITY(x) x = -__MAXFLOAT #else #define SET_POS_INFINITY(x) x = (GLfloat) HUGE_VAL #define SET_NEG_INFINITY(x) x = (GLfloat) -HUGE_VAL @@ -1027,15 +1024,7 @@ _mesa_execute_program(struct gl_context * ctx, fetch_vector1(&inst->SrcReg[0], machine, t); abs_t0 = FABSF(t[0]); if (abs_t0 != 0.0F) { - /* Since we really can't handle infinite values on VMS - * like other OSes we'll use __MAXFLOAT to represent - * infinity. This may need some tweaking. - */ -#ifdef VMS - if (abs_t0 == __MAXFLOAT) -#else if (IS_INF_OR_NAN(abs_t0)) -#endif { SET_POS_INFINITY(q[0]); q[1] = 1.0F; -- cgit v1.2.3