From 7933658107276f9d5491f8736a743cf8f8bbd5f2 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 2 Apr 2010 14:47:58 +0000 Subject: Updated to following packages: mesa-7.8 --- mesalib/Makefile | 115 +- mesalib/aclocal.m4 | 22 +- mesalib/bin/install-sh | 93 - mesalib/bin/mklib | 258 +- mesalib/configs/autoconf.in | 16 +- mesalib/configs/darwin | 4 +- mesalib/configs/darwin-x86ppc | 33 - mesalib/configs/default | 27 +- mesalib/configs/freebsd-dri | 4 +- mesalib/configs/linux-cell | 16 +- mesalib/configs/linux-debug | 2 +- mesalib/configs/linux-directfb | 38 - mesalib/configs/linux-dri | 14 +- mesalib/configs/linux-dri-x86-64 | 2 +- mesalib/configs/linux-dri-xcb | 19 +- mesalib/configs/linux-egl | 8 - mesalib/configs/linux-glide | 23 - mesalib/configs/linux-i965 | 8 + mesalib/configs/linux-indirect | 2 +- mesalib/configs/linux-llvm | 12 +- mesalib/configs/linux-llvm-debug | 12 + mesalib/configs/linux-opengl-es | 28 + mesalib/configs/linux-solo | 54 - mesalib/configs/linux-solo-ia64 | 7 - mesalib/configs/linux-solo-x86 | 10 - mesalib/configs/linux-x86-glide | 28 - mesalib/configure | 7110 +++++++++++++------- mesalib/configure.ac | 235 +- mesalib/docs/MESA_swap_control.spec | 7 +- mesalib/docs/MiniGLX.html | 534 -- mesalib/docs/README.3DFX | 2 +- mesalib/docs/README.D3D | 124 - mesalib/docs/README.directfb | 29 - mesalib/docs/contents.html | 8 +- mesalib/docs/demos.html | 18 - mesalib/docs/devinfo.html | 2 +- mesalib/docs/dispatch.html | 6 +- mesalib/docs/egl.html | 324 + mesalib/docs/envvars.html | 23 + mesalib/docs/install.html | 9 - mesalib/docs/lists.html | 31 +- mesalib/docs/news.html | 19 +- mesalib/docs/opengles.html | 79 + mesalib/docs/openvg.html | 19 +- mesalib/docs/osmesa.html | 2 +- mesalib/docs/pbuffers.html | 54 - mesalib/docs/relnotes-7.6.1.html | 12 +- mesalib/docs/relnotes-7.7.1.html | 60 + mesalib/docs/relnotes-7.7.html | 12 +- mesalib/docs/relnotes-7.8.html | 62 + mesalib/docs/relnotes.html | 2 + mesalib/docs/repository.html | 84 +- mesalib/docs/shading.html | 4 - mesalib/docs/sourcetree.html | 165 + mesalib/include/EGL/egl.h | 39 +- mesalib/include/EGL/eglext.h | 60 +- mesalib/include/EGL/eglplatform.h | 133 +- mesalib/include/GL/dmesa.h | 160 - mesalib/include/GL/ggimesa.h | 85 - mesalib/include/GL/gl.h | 19 +- mesalib/include/GL/gl_mangle.h | 45 + mesalib/include/GL/glx.h | 23 + mesalib/include/GL/glxext.h | 8 + mesalib/include/GL/internal/dri_interface.h | 74 +- mesalib/include/GL/internal/glcore.h | 4 - mesalib/include/GL/svgamesa.h | 97 - mesalib/include/KHR/khrplatform.h | 273 + mesalib/include/VG/openvg.h | 686 ++ mesalib/include/VG/vgext.h | 233 + mesalib/include/VG/vgplatform.h | 111 + mesalib/include/VG/vgu.h | 130 + mesalib/progs/util/readtex.c | 20 +- .../glu/sgi/libnurbs/interface/bezierPatchMesh.h | 1 + .../src/glu/sgi/libnurbs/interface/glsurfeval.h | 2 +- mesalib/src/glu/sgi/libnurbs/internals/arc.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/arc.h | 6 + mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h | 1 - mesalib/src/glu/sgi/libnurbs/internals/backend.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/bin.cc | 1 + mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc | 3 + mesalib/src/glu/sgi/libnurbs/internals/curve.cc | 6 + .../src/glu/sgi/libnurbs/internals/curvelist.cc | 12 +- mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc | 1 - .../src/glu/sgi/libnurbs/internals/displaylist.h | 1 + .../src/glu/sgi/libnurbs/internals/gridvertex.h | 2 +- .../src/glu/sgi/libnurbs/internals/knotvector.cc | 3 + mesalib/src/glu/sgi/libnurbs/internals/maplist.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/mesher.cc | 3 + .../src/glu/sgi/libnurbs/internals/patchlist.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/quilt.cc | 2 - mesalib/src/glu/sgi/libnurbs/internals/reader.cc | 2 + mesalib/src/glu/sgi/libnurbs/internals/reader.h | 14 +- .../src/glu/sgi/libnurbs/internals/renderhints.cc | 5 +- .../src/glu/sgi/libnurbs/internals/simplemath.h | 2 + mesalib/src/glu/sgi/libnurbs/internals/slicer.cc | 4 + .../src/glu/sgi/libnurbs/internals/subdivider.cc | 6 +- .../src/glu/sgi/libnurbs/internals/trimregion.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/uarray.cc | 1 + mesalib/src/glu/sgi/libnurbs/internals/varray.cc | 8 + .../src/glu/sgi/libnurbs/nurbtess/directedLine.cc | 32 +- mesalib/src/glu/sgi/libnurbs/nurbtess/monoChain.cc | 2 + .../src/glu/sgi/libnurbs/nurbtess/partitionY.cc | 4 +- mesalib/src/glu/sgi/libnurbs/nurbtess/partitionY.h | 2 +- .../glu/sgi/libnurbs/nurbtess/primitiveStream.cc | 2 + .../src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc | 4 +- .../src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc | 4 +- .../src/glu/sgi/libnurbs/nurbtess/sampledLine.cc | 3 + mesalib/src/glu/sgi/libtess/normal.c | 2 +- mesalib/src/glu/sgi/libutil/error.c | 2 - mesalib/src/glu/sgi/libutil/mipmap.c | 1 - mesalib/src/mesa/Makefile | 30 +- mesalib/src/mesa/Makefile.mgw | 3 +- mesalib/src/mesa/drivers/common/driverfuncs.c | 31 +- mesalib/src/mesa/drivers/common/meta.c | 159 +- mesalib/src/mesa/drivers/dri/Makefile.template | 24 +- mesalib/src/mesa/drivers/dri/common/dri_metaops.c | 8 - mesalib/src/mesa/drivers/dri/common/dri_util.c | 96 +- mesalib/src/mesa/drivers/dri/common/dri_util.h | 28 +- .../src/mesa/drivers/dri/common/drirenderbuffer.c | 17 +- .../src/mesa/drivers/dri/common/drirenderbuffer.h | 8 +- mesalib/src/mesa/drivers/dri/common/spantmp.h | 23 +- mesalib/src/mesa/drivers/dri/common/spantmp2.h | 25 +- mesalib/src/mesa/drivers/dri/common/utils.c | 37 +- mesalib/src/mesa/drivers/dri/common/utils.h | 3 +- mesalib/src/mesa/drivers/dri/common/vblank.c | 20 +- mesalib/src/mesa/drivers/dri/common/vblank.h | 16 +- mesalib/src/mesa/drivers/dri/common/xmlconfig.c | 7 - mesalib/src/mesa/drivers/dri/swrast/swrast.c | 86 +- mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h | 13 +- mesalib/src/mesa/drivers/dri/swrast/swrast_span.c | 52 +- .../src/mesa/drivers/dri/swrast/swrast_spantemp.h | 33 +- mesalib/src/mesa/drivers/windows/gdi/mesa.def | 13 +- mesalib/src/mesa/drivers/windows/gdi/wmesa.c | 61 +- mesalib/src/mesa/drivers/windows/gdi/wmesadef.h | 2 +- .../src/mesa/drivers/windows/gldirect/dglcontext.c | 2 - mesalib/src/mesa/drivers/windows/icd/mesa.def | 6 - mesalib/src/mesa/glapi/dispatch.h | 37 - mesalib/src/mesa/glapi/glapi.c | 445 +- mesalib/src/mesa/glapi/glapi.h | 92 +- mesalib/src/mesa/glapi/glapi_dispatch.c | 102 + mesalib/src/mesa/glapi/glapi_getproc.c | 302 +- mesalib/src/mesa/glapi/glapi_nop.c | 114 + mesalib/src/mesa/glapi/glapidispatch.h | 109 +- mesalib/src/mesa/glapi/glapioffsets.h | 44 +- mesalib/src/mesa/glapi/glapitable.h | 29 +- mesalib/src/mesa/glapi/glapitemp.h | 511 +- mesalib/src/mesa/glapi/glprocs.h | 674 +- mesalib/src/mesa/glapi/glthread.c | 111 +- mesalib/src/mesa/glapi/glthread.h | 162 +- mesalib/src/mesa/main/accum.c | 2 +- mesalib/src/mesa/main/api_arrayelt.c | 2 +- mesalib/src/mesa/main/api_exec.c | 32 +- mesalib/src/mesa/main/api_loopback.c | 2 +- mesalib/src/mesa/main/api_noop.c | 2 +- mesalib/src/mesa/main/api_validate.c | 23 +- mesalib/src/mesa/main/arrayobj.c | 18 +- mesalib/src/mesa/main/attrib.c | 164 +- mesalib/src/mesa/main/bitset.h | 33 +- mesalib/src/mesa/main/blend.c | 65 +- mesalib/src/mesa/main/blend.h | 4 + mesalib/src/mesa/main/bufferobj.c | 553 +- mesalib/src/mesa/main/bufferobj.h | 17 + mesalib/src/mesa/main/buffers.c | 2 - mesalib/src/mesa/main/clear.c | 331 +- mesalib/src/mesa/main/clear.h | 13 + mesalib/src/mesa/main/colortab.c | 12 +- mesalib/src/mesa/main/compiler.h | 24 +- mesalib/src/mesa/main/condrender.c | 147 + mesalib/src/mesa/main/condrender.h | 45 + mesalib/src/mesa/main/config.h | 3 +- mesalib/src/mesa/main/context.c | 154 +- mesalib/src/mesa/main/context.h | 6 +- mesalib/src/mesa/main/convolve.c | 3 +- mesalib/src/mesa/main/cpuinfo.c | 6 +- mesalib/src/mesa/main/dd.h | 81 +- mesalib/src/mesa/main/debug.c | 94 +- mesalib/src/mesa/main/depthstencil.c | 5 +- mesalib/src/mesa/main/descrip.mms | 3 - mesalib/src/mesa/main/dispatch.c | 96 - mesalib/src/mesa/main/dispatch.h | 37 + mesalib/src/mesa/main/dlist.c | 519 +- mesalib/src/mesa/main/dlopen.c | 2 +- mesalib/src/mesa/main/drawpix.c | 6 +- mesalib/src/mesa/main/enable.c | 92 +- mesalib/src/mesa/main/enable.h | 12 + mesalib/src/mesa/main/enums.c | 6118 ++++++++--------- mesalib/src/mesa/main/eval.c | 6 +- mesalib/src/mesa/main/execmem.c | 6 +- mesalib/src/mesa/main/extensions.c | 118 +- mesalib/src/mesa/main/extensions.h | 7 + mesalib/src/mesa/main/fbobject.c | 111 +- mesalib/src/mesa/main/fbobject.h | 3 + mesalib/src/mesa/main/feedback.c | 22 +- mesalib/src/mesa/main/feedback.h | 2 - mesalib/src/mesa/main/ffvertex_prog.c | 15 +- mesalib/src/mesa/main/formats.c | 2 +- mesalib/src/mesa/main/framebuffer.c | 62 +- mesalib/src/mesa/main/framebuffer.h | 6 +- mesalib/src/mesa/main/get.c | 412 +- mesalib/src/mesa/main/get.h | 12 + mesalib/src/mesa/main/getstring.c | 115 +- mesalib/src/mesa/main/glheader.h | 7 + mesalib/src/mesa/main/hash.c | 53 +- mesalib/src/mesa/main/hash.h | 2 +- mesalib/src/mesa/main/histogram.c | 2 +- mesalib/src/mesa/main/image.c | 71 +- mesalib/src/mesa/main/image.h | 2 +- mesalib/src/mesa/main/imports.c | 242 +- mesalib/src/mesa/main/imports.h | 150 +- mesalib/src/mesa/main/light.c | 45 +- mesalib/src/mesa/main/lines.c | 2 - mesalib/src/mesa/main/macros.h | 21 +- mesalib/src/mesa/main/matrix.c | 10 +- mesalib/src/mesa/main/mfeatures.h | 3 + mesalib/src/mesa/main/mipmap.c | 61 +- mesalib/src/mesa/main/mm.c | 16 +- mesalib/src/mesa/main/mtypes.h | 43 +- mesalib/src/mesa/main/pixel.c | 17 +- mesalib/src/mesa/main/pixelstore.c | 3 - mesalib/src/mesa/main/points.c | 3 +- mesalib/src/mesa/main/polygon.c | 3 +- mesalib/src/mesa/main/queryobj.c | 27 +- mesalib/src/mesa/main/queryobj.h | 10 + mesalib/src/mesa/main/rastpos.c | 44 +- mesalib/src/mesa/main/readpix.c | 16 +- mesalib/src/mesa/main/remap.c | 6 +- mesalib/src/mesa/main/remap_helper.h | 3179 ++++----- mesalib/src/mesa/main/renderbuffer.c | 130 +- mesalib/src/mesa/main/renderbuffer.h | 6 - mesalib/src/mesa/main/scissor.c | 6 +- mesalib/src/mesa/main/shaders.c | 20 +- mesalib/src/mesa/main/shared.c | 43 +- mesalib/src/mesa/main/shared.h | 2 +- mesalib/src/mesa/main/state.c | 9 +- mesalib/src/mesa/main/syncobj.c | 4 +- mesalib/src/mesa/main/texcompress.c | 3 - mesalib/src/mesa/main/texcompress_fxt1.c | 19 +- mesalib/src/mesa/main/texcompress_s3tc.c | 8 +- mesalib/src/mesa/main/texenvprogram.c | 37 +- mesalib/src/mesa/main/texformat.c | 2 - mesalib/src/mesa/main/texgen.c | 6 +- mesalib/src/mesa/main/texgen.h | 6 + mesalib/src/mesa/main/texgetimage.c | 79 +- mesalib/src/mesa/main/teximage.c | 68 +- mesalib/src/mesa/main/teximage.h | 2 + mesalib/src/mesa/main/texobj.c | 22 +- mesalib/src/mesa/main/texparam.c | 193 +- mesalib/src/mesa/main/texparam.h | 12 + mesalib/src/mesa/main/texrender.c | 106 +- mesalib/src/mesa/main/texstate.c | 74 +- mesalib/src/mesa/main/texstore.c | 96 +- mesalib/src/mesa/main/varray.c | 43 +- mesalib/src/mesa/main/version.c | 130 + mesalib/src/mesa/main/version.h | 13 +- mesalib/src/mesa/main/vtxfmt.c | 2 - mesalib/src/mesa/main/vtxfmt_tmp.h | 2 +- mesalib/src/mesa/math/m_debug_clip.c | 44 +- mesalib/src/mesa/math/m_debug_norm.c | 40 +- mesalib/src/mesa/math/m_debug_util.h | 2 +- mesalib/src/mesa/math/m_debug_xform.c | 36 +- mesalib/src/mesa/math/m_matrix.c | 38 +- mesalib/src/mesa/math/m_translate.c | 14 +- mesalib/src/mesa/math/m_vector.c | 20 +- mesalib/src/mesa/shader/arbprogparse.c | 17 +- mesalib/src/mesa/shader/arbprogram.c | 81 +- mesalib/src/mesa/shader/atifragshader.c | 58 +- mesalib/src/mesa/shader/descrip.mms | 4 +- mesalib/src/mesa/shader/grammar/grammar.c | 3178 --------- mesalib/src/mesa/shader/grammar/grammar.h | 103 - mesalib/src/mesa/shader/grammar/grammar_crt.c | 64 - mesalib/src/mesa/shader/grammar/grammar_crt.h | 20 - mesalib/src/mesa/shader/grammar/grammar_mesa.c | 87 - mesalib/src/mesa/shader/grammar/grammar_mesa.h | 43 - mesalib/src/mesa/shader/grammar/grammar_syn.h | 202 - mesalib/src/mesa/shader/hash_table.c | 8 +- mesalib/src/mesa/shader/lex.yy.c | 48 +- mesalib/src/mesa/shader/nvfragparse.c | 48 +- mesalib/src/mesa/shader/nvprogram.c | 14 +- mesalib/src/mesa/shader/nvvertparse.c | 45 +- mesalib/src/mesa/shader/prog_cache.c | 20 +- mesalib/src/mesa/shader/prog_execute.c | 127 +- mesalib/src/mesa/shader/prog_instruction.c | 12 +- mesalib/src/mesa/shader/prog_instruction.h | 5 +- mesalib/src/mesa/shader/prog_optimize.c | 81 +- mesalib/src/mesa/shader/prog_parameter.c | 40 +- mesalib/src/mesa/shader/prog_parameter.h | 1 + mesalib/src/mesa/shader/prog_parameter_layout.c | 16 +- mesalib/src/mesa/shader/prog_print.c | 367 +- mesalib/src/mesa/shader/prog_print.h | 6 + mesalib/src/mesa/shader/prog_statevars.c | 83 +- mesalib/src/mesa/shader/prog_statevars.h | 2 + mesalib/src/mesa/shader/prog_uniform.c | 10 +- mesalib/src/mesa/shader/program.c | 96 +- mesalib/src/mesa/shader/program.h | 24 +- mesalib/src/mesa/shader/program_lexer.l | 18 +- mesalib/src/mesa/shader/program_parse.tab.c | 667 +- mesalib/src/mesa/shader/program_parse.tab.h | 2 +- mesalib/src/mesa/shader/program_parse.y | 135 +- mesalib/src/mesa/shader/program_parse_extra.c | 12 + mesalib/src/mesa/shader/program_parser.h | 10 +- mesalib/src/mesa/shader/programopt.c | 11 +- mesalib/src/mesa/shader/shader_api.c | 100 +- mesalib/src/mesa/shader/slang/descrip.mms | 5 +- mesalib/src/mesa/shader/slang/library/Makefile | 64 +- mesalib/src/mesa/shader/slang/library/gc_to_bin.c | 85 - .../mesa/shader/slang/library/slang_120_core_gc.h | 764 --- .../slang/library/slang_builtin_120_common_gc.h | 108 - .../slang/library/slang_builtin_120_fragment_gc.h | 5 - .../shader/slang/library/slang_common_builtin.gc | 14 +- .../shader/slang/library/slang_common_builtin_gc.h | 880 --- .../src/mesa/shader/slang/library/slang_core_gc.h | 869 --- .../shader/slang/library/slang_fragment_builtin.gc | 64 + .../slang/library/slang_fragment_builtin_gc.h | 110 - .../shader/slang/library/slang_pp_directives.syn | 405 -- .../shader/slang/library/slang_pp_directives_syn.h | 250 - .../shader/slang/library/slang_pp_expression.syn | 265 - .../shader/slang/library/slang_pp_expression_syn.h | 179 - .../mesa/shader/slang/library/slang_pp_version.syn | 122 - .../shader/slang/library/slang_pp_version_syn.h | 69 - .../src/mesa/shader/slang/library/slang_shader.syn | 1716 ----- .../mesa/shader/slang/library/slang_shader_syn.h | 866 --- .../mesa/shader/slang/library/slang_version.syn | 118 - .../shader/slang/library/slang_vertex_builtin.gc | 20 + .../shader/slang/library/slang_vertex_builtin_gc.h | 109 - mesalib/src/mesa/shader/slang/library/syn_to_c.c | 72 - mesalib/src/mesa/shader/slang/slang_builtin.c | 4 +- mesalib/src/mesa/shader/slang/slang_codegen.c | 117 +- mesalib/src/mesa/shader/slang/slang_codegen.h | 1 + mesalib/src/mesa/shader/slang/slang_compile.c | 557 +- .../mesa/shader/slang/slang_compile_operation.c | 7 +- .../src/mesa/shader/slang/slang_compile_variable.c | 2 +- mesalib/src/mesa/shader/slang/slang_emit.c | 120 +- mesalib/src/mesa/shader/slang/slang_label.c | 6 +- mesalib/src/mesa/shader/slang/slang_link.c | 88 +- mesalib/src/mesa/shader/slang/slang_log.c | 11 +- mesalib/src/mesa/shader/slang/slang_mem.c | 20 +- mesalib/src/mesa/shader/slang/slang_preprocess.c | 1406 ---- mesalib/src/mesa/shader/slang/slang_preprocess.h | 41 - mesalib/src/mesa/shader/slang/slang_print.c | 30 +- mesalib/src/mesa/shader/slang/slang_storage.c | 21 +- mesalib/src/mesa/shader/slang/slang_typeinfo.c | 73 +- mesalib/src/mesa/shader/slang/slang_typeinfo.h | 40 +- mesalib/src/mesa/shader/slang/slang_utility.c | 10 +- mesalib/src/mesa/shader/slang/slang_utility.h | 6 +- mesalib/src/mesa/shader/symbol_table.c | 2 +- mesalib/src/mesa/sources.mak | 16 +- mesalib/src/mesa/swrast/s_aaline.c | 50 +- mesalib/src/mesa/swrast/s_aalinetemp.h | 32 - mesalib/src/mesa/swrast/s_aatriangle.c | 102 +- mesalib/src/mesa/swrast/s_aatritemp.h | 60 +- mesalib/src/mesa/swrast/s_accum.c | 19 +- mesalib/src/mesa/swrast/s_alpha.c | 4 +- mesalib/src/mesa/swrast/s_atifragshader.c | 30 +- mesalib/src/mesa/swrast/s_bitmap.c | 20 +- mesalib/src/mesa/swrast/s_blend.c | 2 +- mesalib/src/mesa/swrast/s_blit.c | 36 +- mesalib/src/mesa/swrast/s_clear.c | 149 +- mesalib/src/mesa/swrast/s_context.c | 53 +- mesalib/src/mesa/swrast/s_copypix.c | 167 +- mesalib/src/mesa/swrast/s_depth.c | 60 +- mesalib/src/mesa/swrast/s_drawpix.c | 98 +- mesalib/src/mesa/swrast/s_feedback.c | 3 +- mesalib/src/mesa/swrast/s_fog.c | 97 +- mesalib/src/mesa/swrast/s_fog.h | 4 - mesalib/src/mesa/swrast/s_fragprog.c | 16 +- mesalib/src/mesa/swrast/s_lines.c | 51 +- mesalib/src/mesa/swrast/s_linetemp.h | 19 - mesalib/src/mesa/swrast/s_logic.c | 27 - mesalib/src/mesa/swrast/s_logic.h | 6 - mesalib/src/mesa/swrast/s_masking.c | 51 +- mesalib/src/mesa/swrast/s_masking.h | 7 +- mesalib/src/mesa/swrast/s_points.c | 69 +- mesalib/src/mesa/swrast/s_readpix.c | 96 +- mesalib/src/mesa/swrast/s_span.c | 476 +- mesalib/src/mesa/swrast/s_span.h | 20 +- mesalib/src/mesa/swrast/s_spantemp.h | 16 +- mesalib/src/mesa/swrast/s_stencil.c | 12 +- mesalib/src/mesa/swrast/s_texcombine.c | 23 +- mesalib/src/mesa/swrast/s_texfilter.c | 69 +- mesalib/src/mesa/swrast/s_triangle.c | 29 +- mesalib/src/mesa/swrast/s_tritemp.h | 50 - mesalib/src/mesa/swrast/s_zoom.c | 52 +- mesalib/src/mesa/swrast/s_zoom.h | 4 - mesalib/src/mesa/swrast/swrast.h | 6 - mesalib/src/mesa/swrast_setup/ss_context.c | 23 +- mesalib/src/mesa/swrast_setup/ss_triangle.c | 74 +- mesalib/src/mesa/swrast_setup/ss_tritmp.h | 152 +- mesalib/src/mesa/tnl/t_context.c | 34 +- mesalib/src/mesa/tnl/t_context.h | 22 +- mesalib/src/mesa/tnl/t_draw.c | 68 +- mesalib/src/mesa/tnl/t_pipeline.c | 7 +- mesalib/src/mesa/tnl/t_rasterpos.c | 53 +- mesalib/src/mesa/tnl/t_vb_cliptmp.h | 16 +- mesalib/src/mesa/tnl/t_vb_fog.c | 14 +- mesalib/src/mesa/tnl/t_vb_light.c | 53 +- mesalib/src/mesa/tnl/t_vb_lighttmp.h | 193 +- mesalib/src/mesa/tnl/t_vb_normals.c | 5 +- mesalib/src/mesa/tnl/t_vb_points.c | 6 +- mesalib/src/mesa/tnl/t_vb_program.c | 26 +- mesalib/src/mesa/tnl/t_vb_texgen.c | 3 +- mesalib/src/mesa/tnl/t_vb_texmat.c | 1 - mesalib/src/mesa/tnl/t_vb_vertex.c | 10 +- mesalib/src/mesa/tnl/t_vertex.c | 20 +- mesalib/src/mesa/tnl/t_vertex_generic.c | 54 +- mesalib/src/mesa/tnl/t_vertex_sse.c | 10 +- mesalib/src/mesa/tnl/tnl.h | 2 +- mesalib/src/mesa/vbo/vbo_context.c | 50 +- mesalib/src/mesa/vbo/vbo_exec.c | 3 - mesalib/src/mesa/vbo/vbo_exec_api.c | 44 +- mesalib/src/mesa/vbo/vbo_exec_array.c | 140 +- mesalib/src/mesa/vbo/vbo_exec_draw.c | 49 +- mesalib/src/mesa/vbo/vbo_exec_eval.c | 2 +- mesalib/src/mesa/vbo/vbo_rebase.c | 10 +- mesalib/src/mesa/vbo/vbo_save.c | 13 +- mesalib/src/mesa/vbo/vbo_save_api.c | 30 +- mesalib/src/mesa/vbo/vbo_save_draw.c | 2 +- mesalib/src/mesa/vbo/vbo_save_loopback.c | 17 +- mesalib/src/mesa/vbo/vbo_split.c | 4 +- mesalib/src/mesa/vbo/vbo_split_copy.c | 55 +- mesalib/src/mesa/vbo/vbo_split_inplace.c | 114 +- mesalib/windows/VC8/mesa/gdi/gdi.vcproj | 8 + mesalib/windows/VC8/mesa/mesa.sln | 15 +- mesalib/windows/VC8/mesa/mesa/mesa.vcproj | 556 +- 423 files changed, 22004 insertions(+), 28418 deletions(-) delete mode 100644 mesalib/configs/darwin-x86ppc delete mode 100644 mesalib/configs/linux-directfb delete mode 100644 mesalib/configs/linux-glide create mode 100644 mesalib/configs/linux-i965 create mode 100644 mesalib/configs/linux-llvm-debug create mode 100644 mesalib/configs/linux-opengl-es delete mode 100644 mesalib/configs/linux-solo delete mode 100644 mesalib/configs/linux-solo-ia64 delete mode 100644 mesalib/configs/linux-solo-x86 delete mode 100644 mesalib/configs/linux-x86-glide delete mode 100644 mesalib/docs/MiniGLX.html delete mode 100644 mesalib/docs/README.D3D delete mode 100644 mesalib/docs/README.directfb delete mode 100644 mesalib/docs/demos.html create mode 100644 mesalib/docs/egl.html create mode 100644 mesalib/docs/opengles.html delete mode 100644 mesalib/docs/pbuffers.html create mode 100644 mesalib/docs/relnotes-7.7.1.html create mode 100644 mesalib/docs/relnotes-7.8.html create mode 100644 mesalib/docs/sourcetree.html delete mode 100644 mesalib/include/GL/dmesa.h delete mode 100644 mesalib/include/GL/ggimesa.h delete mode 100644 mesalib/include/GL/svgamesa.h create mode 100644 mesalib/include/KHR/khrplatform.h create mode 100644 mesalib/include/VG/openvg.h create mode 100644 mesalib/include/VG/vgext.h create mode 100644 mesalib/include/VG/vgplatform.h create mode 100644 mesalib/include/VG/vgu.h delete mode 100644 mesalib/src/mesa/glapi/dispatch.h create mode 100644 mesalib/src/mesa/glapi/glapi_dispatch.c create mode 100644 mesalib/src/mesa/glapi/glapi_nop.c create mode 100644 mesalib/src/mesa/main/condrender.c create mode 100644 mesalib/src/mesa/main/condrender.h delete mode 100644 mesalib/src/mesa/main/dispatch.c create mode 100644 mesalib/src/mesa/main/dispatch.h create mode 100644 mesalib/src/mesa/main/version.c delete mode 100644 mesalib/src/mesa/shader/grammar/grammar.c delete mode 100644 mesalib/src/mesa/shader/grammar/grammar.h delete mode 100644 mesalib/src/mesa/shader/grammar/grammar_crt.c delete mode 100644 mesalib/src/mesa/shader/grammar/grammar_crt.h delete mode 100644 mesalib/src/mesa/shader/grammar/grammar_mesa.c delete mode 100644 mesalib/src/mesa/shader/grammar/grammar_mesa.h delete mode 100644 mesalib/src/mesa/shader/grammar/grammar_syn.h delete mode 100644 mesalib/src/mesa/shader/slang/library/gc_to_bin.c delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_120_core_gc.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_common_builtin_gc.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_core_gc.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_pp_directives.syn delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_pp_directives_syn.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_pp_expression.syn delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_pp_expression_syn.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_pp_version.syn delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_pp_version_syn.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_shader.syn delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_shader_syn.h delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_version.syn delete mode 100644 mesalib/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h delete mode 100644 mesalib/src/mesa/shader/slang/library/syn_to_c.c delete mode 100644 mesalib/src/mesa/shader/slang/slang_preprocess.c delete mode 100644 mesalib/src/mesa/shader/slang/slang_preprocess.h (limited to 'mesalib') diff --git a/mesalib/Makefile b/mesalib/Makefile index e927cb968..6e6413411 100644 --- a/mesalib/Makefile +++ b/mesalib/Makefile @@ -48,7 +48,7 @@ install: done -.PHONY: default doxygen clean realclean distclean install linux-directfb-install +.PHONY: default doxygen clean realclean distclean install # If there's no current configuration file $(TOP)/configs/current: @@ -80,8 +80,6 @@ catamount-osmesa-pgi \ darwin \ darwin-fat-32bit \ darwin-fat-all \ -darwin-static \ -darwin-static-x86ppc \ freebsd \ freebsd-dri \ freebsd-dri-amd64 \ @@ -105,12 +103,12 @@ irix6-n32-static \ irix6-o32 \ irix6-o32-static \ linux \ +linux-i965 \ linux-alpha \ linux-alpha-static \ linux-cell \ linux-cell-debug \ linux-debug \ -linux-directfb \ linux-dri \ linux-dri-debug \ linux-dri-x86 \ @@ -120,12 +118,13 @@ linux-dri-xcb \ linux-egl \ linux-indirect \ linux-fbdev \ -linux-glide \ linux-ia64-icc \ linux-ia64-icc-static \ linux-icc \ linux-icc-static \ linux-llvm \ +linux-llvm-debug \ +linux-opengl-es \ linux-osmesa \ linux-osmesa-static \ linux-osmesa16 \ @@ -134,9 +133,6 @@ linux-osmesa32 \ linux-ppc \ linux-ppc-static \ linux-profile \ -linux-solo \ -linux-solo-x86 \ -linux-solo-ia64 \ linux-sparc \ linux-sparc5 \ linux-static \ @@ -149,7 +145,6 @@ linux-x86-64 \ linux-x86-64-debug \ linux-x86-64-profile \ linux-x86-64-static \ -linux-x86-glide \ linux-x86-profile \ linux-x86-static \ netbsd \ @@ -172,17 +167,20 @@ sunos5-v9 \ sunos5-v9-static \ sunos5-v9-cc-g++ \ ultrix-gcc: - @ if test -f configs/current || test -L configs/current ; then \ - echo "Please run 'make realclean' before changing configs" ; \ - exit 1 ; \ + @ if test -f configs/current -o -L configs/current; then \ + if ! cmp configs/$@ configs/current > /dev/null; then \ + echo "Please run 'make realclean' before changing configs" ; \ + exit 1 ; \ + fi ; \ + else \ + cd configs && rm -f current && ln -s $@ current ; \ fi - (cd configs && rm -f current && ln -s $@ current) $(MAKE) default # Rules for making release tarballs -VERSION=7.7 +VERSION=7.8 DIRECTORY = Mesa-$(VERSION) LIB_NAME = MesaLib-$(VERSION) DEMO_NAME = MesaDemos-$(VERSION) @@ -207,8 +205,6 @@ MAIN_FILES = \ $(DIRECTORY)/docs/RELNOTES* \ $(DIRECTORY)/docs/*.spec \ $(DIRECTORY)/include/GL/internal/glcore.h \ - $(DIRECTORY)/include/GL/dmesa.h \ - $(DIRECTORY)/include/GL/ggimesa.h \ $(DIRECTORY)/include/GL/gl.h \ $(DIRECTORY)/include/GL/glext.h \ $(DIRECTORY)/include/GL/gl_mangle.h \ @@ -221,10 +217,16 @@ MAIN_FILES = \ $(DIRECTORY)/include/GL/mesa_wgl.h \ $(DIRECTORY)/include/GL/mglmesa.h \ $(DIRECTORY)/include/GL/osmesa.h \ - $(DIRECTORY)/include/GL/svgamesa.h \ $(DIRECTORY)/include/GL/vms_x_fix.h \ $(DIRECTORY)/include/GL/wglext.h \ $(DIRECTORY)/include/GL/wmesa.h \ + $(DIRECTORY)/include/VG/*.h \ + $(DIRECTORY)/include/KHR/*.h \ + $(DIRECTORY)/src/glsl/Makefile \ + $(DIRECTORY)/src/glsl/Makefile.template \ + $(DIRECTORY)/src/glsl/SConscript \ + $(DIRECTORY)/src/glsl/*/Makefile \ + $(DIRECTORY)/src/glsl/*/*.[ch] \ $(DIRECTORY)/src/Makefile \ $(DIRECTORY)/src/mesa/Makefile* \ $(DIRECTORY)/src/mesa/sources.mak \ @@ -240,12 +242,9 @@ MAIN_FILES = \ $(DIRECTORY)/src/mesa/shader/*.[chly] \ $(DIRECTORY)/src/mesa/shader/Makefile \ $(DIRECTORY)/src/mesa/shader/descrip.mms \ - $(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \ $(DIRECTORY)/src/mesa/shader/slang/*.[ch] \ $(DIRECTORY)/src/mesa/shader/slang/descrip.mms \ - $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \ $(DIRECTORY)/src/mesa/shader/slang/library/*.gc \ - $(DIRECTORY)/src/mesa/shader/slang/library/*.syn \ $(DIRECTORY)/src/mesa/shader/slang/library/Makefile \ $(DIRECTORY)/src/mesa/swrast/*.[ch] \ $(DIRECTORY)/src/mesa/swrast/descrip.mms \ @@ -263,25 +262,13 @@ MAIN_FILES = \ $(DIRECTORY)/src/mesa/drivers/beos/Makefile \ $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \ $(DIRECTORY)/src/mesa/drivers/common/descrip.mms \ - $(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/directfb/Makefile \ - $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \ $(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \ $(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \ - $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \ - $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \ - $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \ - $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \ - $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \ - $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \ $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \ $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \ $(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \ $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \ $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \ - $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \ $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \ $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \ $(DIRECTORY)/src/mesa/drivers/x11/Makefile \ @@ -303,12 +290,28 @@ MAIN_FILES = \ $(DIRECTORY)/progs/util/sampleMakefile \ $(DIRECTORY)/windows/VC8/ -EGL_FILES = \ - $(DIRECTORY)/include/EGL/*.h \ +ES_FILES = \ $(DIRECTORY)/include/GLES/*.h \ $(DIRECTORY)/include/GLES2/*.h \ + $(DIRECTORY)/src/mesa/glapi/gen/*.xml \ + $(DIRECTORY)/src/mesa/glapi/gen/*.py \ + $(DIRECTORY)/src/mesa/glapi/gen/*.dtd \ + $(DIRECTORY)/src/mesa/es/glapi/Makefile \ + $(DIRECTORY)/src/mesa/es/glapi/*.xml \ + $(DIRECTORY)/src/mesa/es/glapi/*.py \ + $(DIRECTORY)/src/mesa/es/state_tracker/*.[ch] \ + $(DIRECTORY)/src/mesa/es/main/*.[ch] \ + $(DIRECTORY)/src/mesa/es/main/*.xml \ + $(DIRECTORY)/src/mesa/es/main/*.py \ + $(DIRECTORY)/src/mesa/es/main/*.dtd \ + $(DIRECTORY)/src/mesa/es/Makefile \ + $(DIRECTORY)/src/mesa/es/sources.mak \ + +EGL_FILES = \ + $(DIRECTORY)/include/EGL/*.h \ $(DIRECTORY)/src/egl/Makefile \ $(DIRECTORY)/src/egl/*/Makefile \ + $(DIRECTORY)/src/egl/*/Makefile.template \ $(DIRECTORY)/src/egl/*/*.[ch] \ $(DIRECTORY)/src/egl/*/*/Makefile \ $(DIRECTORY)/src/egl/*/*/*.[ch] \ @@ -321,6 +324,7 @@ GALLIUM_FILES = \ $(DIRECTORY)/src/gallium/*/Makefile \ $(DIRECTORY)/src/gallium/*/SConscript \ $(DIRECTORY)/src/gallium/*/*/Makefile \ + $(DIRECTORY)/src/gallium/*/*/Makefile.egl \ $(DIRECTORY)/src/gallium/*/*/Makefile.template \ $(DIRECTORY)/src/gallium/*/*/SConscript \ $(DIRECTORY)/src/gallium/*/*/*.[ch] \ @@ -339,8 +343,8 @@ DRI_FILES = \ $(DIRECTORY)/include/GL/internal/glcore.h \ $(DIRECTORY)/include/GL/internal/sarea.h \ $(DIRECTORY)/src/glx/Makefile \ - $(DIRECTORY)/src/glx/x11/Makefile \ - $(DIRECTORY)/src/glx/x11/*.[ch] \ + $(DIRECTORY)/src/glx/Makefile \ + $(DIRECTORY)/src/glx/*.[ch] \ $(DIRECTORY)/src/mesa/drivers/dri/Makefile \ $(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \ $(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \ @@ -376,15 +380,6 @@ SGI_GLU_FILES = \ $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \ $(DIRECTORY)/src/glu/sgi/libutil/*.[ch] -MESA_GLU_FILES = \ - $(DIRECTORY)/src/glu/mesa/README[12] \ - $(DIRECTORY)/src/glu/mesa/Makefile* \ - $(DIRECTORY)/src/glu/mesa/descrip.mms \ - $(DIRECTORY)/src/glu/mesa/mms_depend \ - $(DIRECTORY)/src/glu/mesa/*.def \ - $(DIRECTORY)/src/glu/mesa/depend \ - $(DIRECTORY)/src/glu/mesa/*.[ch] - GLW_FILES = \ $(DIRECTORY)/src/glw/*.[ch] \ $(DIRECTORY)/src/glw/Makefile* \ @@ -413,6 +408,14 @@ DEMO_FILES = \ $(DIRECTORY)/progs/demos/*.cxx \ $(DIRECTORY)/progs/demos/*.dat \ $(DIRECTORY)/progs/demos/README \ + $(DIRECTORY)/progs/egl/Makefile \ + $(DIRECTORY)/progs/egl/*.[ch] \ + $(DIRECTORY)/progs/es1/*/Makefile \ + $(DIRECTORY)/progs/es1/*/*.[ch] \ + $(DIRECTORY)/progs/es2/*/Makefile \ + $(DIRECTORY)/progs/es2/*/*.[ch] \ + $(DIRECTORY)/progs/openvg/*/Makefile \ + $(DIRECTORY)/progs/openvg/*/*.[ch] \ $(DIRECTORY)/progs/fbdev/Makefile \ $(DIRECTORY)/progs/fbdev/glfbdevtest.c \ $(DIRECTORY)/progs/objviewer/*.[ch] \ @@ -435,11 +438,7 @@ DEMO_FILES = \ $(DIRECTORY)/progs/glsl/*.c \ $(DIRECTORY)/progs/glsl/*.frag \ $(DIRECTORY)/progs/glsl/*.vert \ - $(DIRECTORY)/progs/glsl/*.shtest \ - $(DIRECTORY)/progs/windml/Makefile.ugl \ - $(DIRECTORY)/progs/windml/*.c \ - $(DIRECTORY)/progs/windml/*.bmp \ - $(DIRECTORY)/progs/ggi/*.c + $(DIRECTORY)/progs/glsl/*.shtest GLUT_FILES = \ $(DIRECTORY)/include/GL/glut.h \ @@ -451,22 +450,11 @@ GLUT_FILES = \ $(DIRECTORY)/src/glut/glx/*.[ch] \ $(DIRECTORY)/src/glut/beos/*.[ch] \ $(DIRECTORY)/src/glut/beos/*.cpp \ - $(DIRECTORY)/src/glut/beos/Makefile \ - $(DIRECTORY)/src/glut/dos/*.[ch] \ - $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \ - $(DIRECTORY)/src/glut/ggi/*.[ch] \ - $(DIRECTORY)/src/glut/ggi/Makefile \ - $(DIRECTORY)/src/glut/fbdev/Makefile \ - $(DIRECTORY)/src/glut/fbdev/*[ch] \ - $(DIRECTORY)/src/glut/mini/*[ch] \ - $(DIRECTORY)/src/glut/mini/glut.pc.in \ - $(DIRECTORY)/src/glut/directfb/Makefile \ - $(DIRECTORY)/src/glut/directfb/NOTES \ - $(DIRECTORY)/src/glut/directfb/*[ch] + $(DIRECTORY)/src/glut/beos/Makefile DEPEND_FILES = \ $(TOP)/src/mesa/depend \ - $(TOP)/src/glx/x11/depend \ + $(TOP)/src/glx/depend \ $(TOP)/src/glw/depend \ $(TOP)/src/glut/glx/depend \ $(TOP)/src/glu/sgi/depend @@ -474,6 +462,7 @@ DEPEND_FILES = \ LIB_FILES = \ $(MAIN_FILES) \ + $(ES_FILES) \ $(EGL_FILES) \ $(GALLIUM_FILES) \ $(DRI_FILES) \ diff --git a/mesalib/aclocal.m4 b/mesalib/aclocal.m4 index e46192caf..65419c757 100644 --- a/mesalib/aclocal.m4 +++ b/mesalib/aclocal.m4 @@ -79,16 +79,14 @@ fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_failed=yes]) + else + pkg_failed=untried fi[]dnl ])# _PKG_CONFIG @@ -132,9 +130,9 @@ See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD diff --git a/mesalib/bin/install-sh b/mesalib/bin/install-sh index 130025829..e69de29bb 100644 --- a/mesalib/bin/install-sh +++ b/mesalib/bin/install-sh @@ -1,93 +0,0 @@ -#!/bin/sh - - -# A minimal replacement for 'install' that supports installing symbolic links. -# Only a limited number of options are supported: -# -d dir Create a directory -# -m mode Sets a file's mode when installing - - -# If these commands aren't portable, we'll need some "if (arch)" type stuff -SYMLINK="ln -s" -MKDIR="mkdir -p" -RM="rm -f" - -MODE="" - -if [ "$1" = "-d" ] ; then - # make a directory path - $MKDIR "$2" - exit 0 -fi - -if [ "$1" = "-m" ] ; then - # set file mode - MODE=$2 - shift 2 -fi - -# install file(s) into destination -if [ $# -ge 2 ] ; then - - # Last cmd line arg is the dest dir - for FILE in $@ ; do - DEST="$FILE" - done - - # Loop over args, moving them to DEST directory - I=1 - for FILE in $@ ; do - if [ $I = $# ] ; then - # stop, don't want to install $DEST into $DEST - exit 0 - fi - - PWDSAVE=`pwd` - - # determine file's type - if [ -h "$FILE" ] ; then - #echo $FILE is a symlink - # Unfortunately, cp -d isn't universal so we have to - # use a work-around. - - # Use ls -l to find the target that the link points to - LL=`ls -l "$FILE"` - for L in $LL ; do - TARGET=$L - done - #echo $FILE is a symlink pointing to $TARGET - - FILE=`basename "$FILE"` - # Go to $DEST and make the link - cd "$DEST" # pushd - $RM "$FILE" - $SYMLINK "$TARGET" "$FILE" - cd "$PWDSAVE" # popd - - elif [ -f "$FILE" ] ; then - #echo "$FILE" is a regular file - # Only copy if the files differ - if ! cmp -s $FILE $DEST/`basename $FILE`; then - $RM "$DEST/`basename $FILE`" - cp "$FILE" "$DEST" - fi - if [ $MODE ] ; then - FILE=`basename "$FILE"` - chmod $MODE "$DEST/$FILE" - fi - else - echo "Unknown type of argument: " "$FILE" - exit 1 - fi - - I=`expr $I + 1` - done - - exit 0 -fi - -# If we get here, we didn't find anything to do -echo "Usage:" -echo " install -d dir Create named directory" -echo " install [-m mode] file [...] dest Install files in destination" - diff --git a/mesalib/bin/mklib b/mesalib/bin/mklib index 3bec160b4..08ef99ec1 100644 --- a/mesalib/bin/mklib +++ b/mesalib/bin/mklib @@ -25,6 +25,109 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# Clear CDPATH as the 'cd' command will echo stuff +# to stdout if it is set +unset CDPATH + +# Given a list of files, look for .a archives and unpack them. +# Return the original list of files minus the .a files plus the unpacked files. +# first param: name of a temp directory (to be deleted when finished) +# remaining params: list of .o and .a files +expand_archives() { + DIR=$1 + shift + FILES=$@ + NEWFILES="" + ORIG_DIR=`pwd` + mkdir -p "$DIR" + cd "$DIR" + for FILE in $FILES ; do + case $FILE in + *.a) + # extract the .o files from this .a archive + case $FILE in + /*) ;; + *) FILE="$ORIG_DIR/$FILE" ;; + esac + MEMBERS=`ar t $FILE` + ar x $FILE + for MEMBER in $MEMBERS ; do + NEWFILES="$NEWFILES $DIR/$MEMBER" + done + ;; + *) + # other file type, just add to list + NEWFILES="$NEWFILES $FILE" + ;; + esac + done + cd "$ORIG_DIR" + echo $NEWFILES +} + + +# Make static library with 'ar' +# params: +# options to ar +# 1 or 0 to indicate if ranlib should be run +# libname to make +# list of object files +# Return name of library we made +# Example: "make_ar_static_lib -ru 1 libfoo.a foo.o bar.o" +make_ar_static_lib() { + OPTS=$1 + shift; + RANLIB=$1 + shift; + LIBNAME=$1 + shift; + OBJECTS=$@ + + # remove existing lib, if present + rm -f ${LIBNAME} + + # make static lib + ar ${OPTS} ${LIBNAME} ${OBJECTS} + + # run ranlib + if [ ${RANLIB} = 1 ] ; then + ranlib ${LIBNAME} + fi + + echo ${LIBNAME} +} + + +# Print usage info. +usage() { + echo 'Usage: mklib [options] objects' + echo 'Create a shared library from object files.' + echo ' -o LIBRARY specifies the name of the resulting library, without' + echo ' the leading "lib" or any suffix.' + echo ' (eg: "-o GL" might result in "libGL.so" being made)' + echo ' -major N specifies major version number (default is 1)' + echo ' -minor N specifies minor version number (default is 0)' + echo ' -patch N specifies patch version number (default is 0)' + echo ' -lLIBRARY specifies a dependency on LIBRARY' + echo ' -LDIR search in DIR for library dependencies at build time' + echo ' -RDIR search in DIR for library dependencies at run time' + echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)' + echo ' Not observed on all systems at this time.' + echo ' -ldflags OPT specify any additional linker flags in OPT' + echo ' -cplusplus link with C++ runtime' + echo ' -static make a static library (default is dynamic/shared)' + echo ' -dlopen make a shared library suitable for dynamic loading' + echo ' -install DIR put resulting library file(s) in DIR' + echo ' -arch ARCH override using `uname` to determine host system' + echo ' -archopt OPT specify an extra achitecture-specific option OPT' + echo ' -altopts OPTS alternate options to override all others' + echo " -noprefix don't prefix library name with 'lib' nor add any suffix" + echo ' -exports FILE only export the symbols listed in FILE' + echo ' -id NAME Sets the id of the dylib (Darwin)' + echo ' -h, --help display this information and exit' +} + + # # Option defaults # @@ -52,31 +155,7 @@ while true do case $1 in '-h' | '--help') - echo 'Usage: mklib [options] objects' - echo 'Create a shared library from object files.' - echo ' -o LIBRARY specifies the name of the resulting library, without' - echo ' the leading "lib" or any suffix.' - echo ' (eg: "-o GL" might result in "libGL.so" being made)' - echo ' -major N specifies major version number (default is 1)' - echo ' -minor N specifies minor version number (default is 0)' - echo ' -patch N specifies patch version number (default is 0)' - echo ' -lLIBRARY specifies a dependency on LIBRARY' - echo ' -LDIR search in DIR for library dependencies at build time' - echo ' -RDIR search in DIR for library dependencies at run time' - echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)' - echo ' Not observed on all systems at this time.' - echo ' -ldflags OPT specify any additional linker flags in OPT' - echo ' -cplusplus link with C++ runtime' - echo ' -static make a static library (default is dynamic/shared)' - echo ' -dlopen make a shared library suitable for dynamic loading' - echo ' -install DIR put resulting library file(s) in DIR' - echo ' -arch ARCH override using `uname` to determine host system' - echo ' -archopt OPT specify an extra achitecture-specific option OPT' - echo ' -altopts OPTS alternate options to override all others' - echo " -noprefix don't prefix library name with 'lib' nor add any suffix" - echo ' -exports FILE only export the symbols listed in FILE' - echo ' -id NAME Sets the id of the dylib (Darwin)' - echo ' -h, --help display this information and exit' + usage exit 1 ;; '-o') @@ -197,11 +276,11 @@ fi # Error checking # if [ "x${LIBNAME}" = "x" ] ; then - echo "mklib: Error: no library name specified" + echo "mklib: Error: no library name specified (-h for help)" exit 1 fi if [ "x${OBJECTS}" = "x" ] ; then - echo "mklib: Error: no object files specified" + echo "mklib: Error: no object files specified (-h for help)" exit 1 fi @@ -269,45 +348,24 @@ case $ARCH in # finish up FINAL_LIBS="${LIBNAME}" elif [ $STATIC = 1 ] ; then + # make a static .a library LIBNAME="lib${LIBNAME}.a" # prefix with "lib", suffix with ".a" echo "mklib: Making" $ARCH "static library: " ${LIBNAME} - LINK="ar" OPTS="-ru" if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} fi - rm -f ${LIBNAME} - # expand any .a objects into constituent .o files. - NEWOBJECTS="" - DELETIA="" - for OBJ in $OBJECTS ; do - case $OBJ in - *.a) - # extract the .o files from this .a archive - FILES=`ar t $OBJ` - ar x $OBJ - NEWOBJECTS="$NEWOBJECTS $FILES" - # keep track of temporary .o files and delete them below - DELETIA="$DELETIA $FILES" - ;; - *) - # ordinary .o file - NEWOBJECTS="$NEWOBJECTS $OBJ" - ;; - esac - done + # expand .a into .o files + NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS` - # make lib - ${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS} - ranlib ${LIBNAME} + # make static lib + FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}` # remove temporary extracted .o files - rm -f ${DELETIA} - - # finish up - FINAL_LIBS=${LIBNAME} + rm -rf ${LIBNAME}.obj else + # make dynamic library LIBNAME="lib${LIBNAME}" # prefix with "lib" case $ARCH in 'Linux' | 'GNU' | GNU/*) OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}" @@ -368,9 +426,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making SunOS static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar -ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ruc 0 ${LIBNAME} ${OBJECTS}` else if [ $NOPREFIX = 0 ] ; then LIBNAME="lib${LIBNAME}.so" @@ -489,13 +545,19 @@ case $ARCH in ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} FINAL_LIBS=${LIBNAME} elif [ $STATIC = 1 ] ; then + # make a static .a library STLIB="lib${LIBNAME}.a" echo "mklib: Making FreeBSD static library: " ${STLIB} - rm -f ${STLIB} - ar cq ${STLIB} ${OBJECTS} - ranlib ${STLIB} - FINAL_LIBS=${STLIB} + + # expand .a into .o files + NEW_OBJECTS=`expand_archives ${STLIB}.obj $OBJECTS` + + FINAL_LIBS=`make_ar_static_lib cq 1 ${STLIB} ${NEW_OBJECTS}` + + # remove temporary extracted .o files + rm -rf ${STLIB}.obj else + # make dynamic library SHLIB="lib${LIBNAME}.so.${MAJOR}" OPTS="-shared -Wl,-soname,${SHLIB}" if [ "${ALTOPTS}" ] ; then @@ -513,10 +575,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}_pic.a" echo "mklib: Making NetBSD PIC static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar cq ${LIBNAME} ${OBJECTS} - ranlib ${LIBNAME} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib cq 1 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so.${MAJOR}.${MINOR}" echo "mklib: Making NetBSD PIC shared library: " ${LIBNAME} @@ -529,9 +588,7 @@ case $ARCH in 'IRIX' | 'IRIX64') if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" - rm -f ${LIBNAME} - ar rc ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib rc 0 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" @@ -582,9 +639,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making HP-UX static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar -ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}` else # HP uses a .2 for their current GL/GLU libraries if [ ${LIBNAME} = "GL" -o ${LIBNAME} = "GLU" ] ; then @@ -614,8 +669,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making AIX static library: " ${LIBNAME} - ar -ruv ${X64} ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}` else EXPFILE="lib${LIBNAME}.exp" LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries @@ -666,9 +720,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making OSF/1 static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar -ruv ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ruv 0 ${LIBNAME} ${OBJECTS}` else VERSION="${MAJOR}.${MINOR}" LIBNAME="lib${LIBNAME}.so" @@ -691,12 +743,20 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making Darwin static library: " ${LIBNAME} - LINK="ar" OPTS="-ruvs" if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} fi - ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS} + + # expand .a into .o files + NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS` + + # make static lib + FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}` + + # remove temporary extracted .o files + rm -rf ${LIBNAME}.obj + FINAL_LIBS=${LIBNAME} else # On Darwin a .bundle is used for a library that you want to dlopen @@ -755,16 +815,14 @@ case $ARCH in 'LynxOS') LIBNAME="lib${LIBNAME}.a" echo "mklib: Making LynxOS static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar ru ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib -ru 0 ${LIBNAME} ${OBJECTS}` ;; 'BeOS') if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making BeOS static library: " ${LIBNAME} - ar -cru "${LIBNAME}" ${OBJECTS} + FINAL_LIBS=`make_ar_static_lib -cru 0 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so" echo "mklib: Making BeOS shared library: " ${LIBNAME} @@ -843,9 +901,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making AIX GCC static library: " ${LIBNAME} - rm -f ${LIBNAME} - ar ru ${LIBNAME} ${OBJECTS} - FINAL_LIBS=${LIBNAME} + FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" echo "mklib: Making AIX GCC shared library: " ${LIBNAME} @@ -866,9 +922,7 @@ case $ARCH in fi LIBNAME="lib${LIBNAME}.a" echo "mklib: Making static library for Ultrix: " ${LIBNAME} - rm -f ${LIBNAME} - ar ru ${LIBNAME} ${OBJECTS} - FINAL_LIBS="${LIBNAME}" + FINAL_LIBS=`make_ar_static_lib ru 0 ${LIBNAME} ${OBJECTS}` ;; CYGWIN*) @@ -888,17 +942,20 @@ case $ARCH in LIBNAME="lib${LIBNAME}" # prefix with "lib" if [ $STATIC = 1 ] ; then - echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a - LINK="ar" + LIBNAME=${LIBNAME}.a + echo "mklib: Making" $ARCH "static library: " ${LIBNAME} OPTS="-ru" if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} fi - # make lib - ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS} - ranlib ${LIBNAME}.a - # finish up - FINAL_LIBS=${LIBNAME}.a + + # expand .a into .o files + NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS` + + FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}` + + # remove temporary extracted .o files + rm -rf ${LIBNAME}.obj else OPTS="-shared -Wl,--enable-auto-image-base -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a" if [ "${ALTOPTS}" ] ; then @@ -920,6 +977,11 @@ case $ARCH in # make lib ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} + # make build fail if link failed + es=$? + if [ "$es" -ne "0" ]; then + exit $es + fi # make usual symlinks ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a # finish up @@ -936,9 +998,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME="lib${LIBNAME}.a" echo "mklib: Making static library for example arch: " ${LIBNAME} - rm -f ${LIBNAME} - ar rv ${LIBNAME} ${OBJECTS} - FINAL_LIBS="${LIBNAME}" + FINAL_LIBS=`make_ar_static_lib rv 0 ${LIBNAME} ${OBJECTS}` else LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so" echo "mklib: Making shared library for example arch: " ${LIBNAME} diff --git a/mesalib/configs/autoconf.in b/mesalib/configs/autoconf.in index a7f3c9df9..30637877f 100644 --- a/mesalib/configs/autoconf.in +++ b/mesalib/configs/autoconf.in @@ -22,6 +22,8 @@ LDFLAGS = @LDFLAGS@ EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ RADEON_CFLAGS = @RADEON_CFLAGS@ RADEON_LDFLAGS = @RADEON_LDFLAGS@ +INTEL_LIBS = @INTEL_LIBS@ +INTEL_CFLAGS = @INTEL_CFLAGS@ # Assembler MESA_ASM_SOURCES = @MESA_ASM_SOURCES@ @@ -52,6 +54,7 @@ GLU_LIB_NAME = @GLU_LIB_NAME@ GLUT_LIB_NAME = @GLUT_LIB_NAME@ GLW_LIB_NAME = @GLW_LIB_NAME@ OSMESA_LIB_NAME = @OSMESA_LIB_NAME@ +EGL_LIB_NAME = @EGL_LIB_NAME@ # Globs used to install the lib and all symlinks GL_LIB_GLOB = @GL_LIB_GLOB@ @@ -59,19 +62,20 @@ GLU_LIB_GLOB = @GLU_LIB_GLOB@ GLUT_LIB_GLOB = @GLUT_LIB_GLOB@ GLW_LIB_GLOB = @GLW_LIB_GLOB@ OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@ +EGL_LIB_GLOB = @EGL_LIB_GLOB@ # Directories to build LIB_DIR = @LIB_DIR@ SRC_DIRS = @SRC_DIRS@ GLU_DIRS = @GLU_DIRS@ DRIVER_DIRS = @DRIVER_DIRS@ +EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@ GALLIUM_DIRS = @GALLIUM_DIRS@ -GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@ GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@ GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ GALLIUM_WINSYS_DRM_DIRS = @GALLIUM_WINSYS_DRM_DIRS@ GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@ -GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) +GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) # Which subdirs under $(TOP)/progs/ to enter: @@ -80,7 +84,7 @@ PROGRAM_DIRS = @PROGRAM_DIRS@ # Driver specific build vars DRI_DIRS = @DRI_DIRS@ WINDOW_SYSTEM = @WINDOW_SYSTEM@ -USING_EGL = @USING_EGL@ +EGL_DISPLAYS = @EGL_DISPLAYS@ # Dependencies X11_INCLUDES = @X11_INCLUDES@ @@ -126,6 +130,9 @@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ # Where libGL will look for DRI hardware drivers DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@ +# EGL driver install directory +EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@ + # Xorg driver install directory (for xorg state-tracker) XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@ @@ -146,3 +153,6 @@ GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@ GLW_PC_CFLAGS = @GLW_PC_CFLAGS@ OSMESA_PC_REQ = @OSMESA_PC_REQ@ OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ + +EGL_DRI2_CFLAGS = @EGL_DRI2_CFLAGS@ +EGL_DRI2_LIBS = @EGL_DRI2_LIBS@ diff --git a/mesalib/configs/darwin b/mesalib/configs/darwin index 824f71c0c..d28d5906b 100644 --- a/mesalib/configs/darwin +++ b/mesalib/configs/darwin @@ -16,7 +16,7 @@ DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \ -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING # -D_GNU_SOURCE - for src/mesa/main ... -# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11 +# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx # -DGLX_USE_APPLEGL - supposed to be used with GLX_DIRECT_RENDERING to use AGL rather than DRM, but doesn't compile # -DIN_DRI_DRIVER @@ -49,7 +49,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm # omit glw lib for now: -SRC_DIRS = glx/x11 mesa glu glut/glx glew +SRC_DIRS = glsl glx mesa gallium glu glut/glx glew GLU_DIRS = sgi DRIVER_DIRS = osmesa #DRIVER_DIRS = dri diff --git a/mesalib/configs/darwin-x86ppc b/mesalib/configs/darwin-x86ppc deleted file mode 100644 index 3d82e3040..000000000 --- a/mesalib/configs/darwin-x86ppc +++ /dev/null @@ -1,33 +0,0 @@ -# Configuration for Darwin / MacOS X, making dynamic libs - -include $(TOP)/configs/default - -CONFIG_NAME = darwin - -# Compiler and flags -CC = cc -CXX = cc -CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \ - -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin -CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \ - -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin - -MKLIB_OPTIONS = -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk" - -# Library names (actual file names) -GL_LIB_NAME = libGL.dylib -GLU_LIB_NAME = libGLU.dylib -GLUT_LIB_NAME = libglut.dylib -GLW_LIB_NAME = libGLw.dylib -OSMESA_LIB_NAME = libOSMesa.dylib - -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext -GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib -APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm - -# omit glw lib for now: -SRC_DIRS = gallium mesa glu glut/glx glew - diff --git a/mesalib/configs/default b/mesalib/configs/default index 9af816cf9..ad6d93c92 100644 --- a/mesalib/configs/default +++ b/mesalib/configs/default @@ -9,7 +9,7 @@ CONFIG_NAME = default # Version info MESA_MAJOR=7 -MESA_MINOR=7 +MESA_MINOR=8 MESA_TINY=0 MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY) @@ -55,6 +55,7 @@ GLUT_LIB = glut GLEW_LIB = GLEW GLW_LIB = GLw OSMESA_LIB = OSMesa +EGL_LIB = EGL # Library names (actual file names) @@ -64,6 +65,7 @@ GLUT_LIB_NAME = lib$(GLUT_LIB).so GLEW_LIB_NAME = lib$(GLEW_LIB).a GLW_LIB_NAME = lib$(GLW_LIB).so OSMESA_LIB_NAME = lib$(OSMESA_LIB).so +EGL_LIB_NAME = lib$(EGL_LIB).so # globs used to install the lib and all symlinks GL_LIB_GLOB = $(GL_LIB_NAME)* @@ -71,6 +73,7 @@ GLU_LIB_GLOB = $(GLU_LIB_NAME)* GLUT_LIB_GLOB = $(GLUT_LIB_NAME)* GLW_LIB_GLOB = $(GLW_LIB_NAME)* OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)* +EGL_LIB_GLOB = $(EGL_LIB_NAME)* # Optional assembly language optimization files for libGL MESA_ASM_SOURCES = @@ -83,25 +86,26 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2 # Directories to build LIB_DIR = lib -SRC_DIRS = mesa gallium egl gallium/winsys glu glut/glx glew glw +SRC_DIRS = glsl mesa gallium egl gallium/winsys glu glut/glx glew glw GLU_DIRS = sgi DRIVER_DIRS = x11 osmesa # Which subdirs under $(TOP)/progs/ to enter: PROGRAM_DIRS = demos redbook samples glsl objviewer xdemos -# EGL directories -EGL_DRIVERS_DIRS = demo +# EGL drivers to build +EGL_DRIVERS_DIRS = glx # Gallium directories and GALLIUM_DIRS = auxiliary drivers state_trackers -GALLIUM_AUXILIARY_DIRS = rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl -GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a) -GALLIUM_DRIVERS_DIRS = softpipe failover svga i915 trace identity +GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a +GALLIUM_DRIVERS_DIRS = softpipe failover svga i915 i965 r300 trace identity GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) -GALLIUM_WINSYS_DIRS = xlib egl_xlib -GALLIUM_WINSYS_DRM_DIRS = -GALLIUM_STATE_TRACKERS_DIRS = glx +GALLIUM_WINSYS_DIRS = drm xlib +GALLIUM_WINSYS_DRM_DIRS = swrast +GALLIUM_STATE_TRACKERS_DIRS = glx vega +# native displays EGL should support +EGL_DISPLAYS = x11 # Library dependencies #EXTRA_LIB_PATH ?= @@ -126,6 +130,9 @@ DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri # Where libGL will look for DRI hardware drivers DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR) +# EGL driver install directory +EGL_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/egl + # Xorg driver install directory (for xorg state-tracker) XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers diff --git a/mesalib/configs/freebsd-dri b/mesalib/configs/freebsd-dri index 0ec25f916..0b91cfc37 100644 --- a/mesalib/configs/freebsd-dri +++ b/mesalib/configs/freebsd-dri @@ -41,15 +41,13 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11 # Directories -SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw +SRC_DIRS = glx gallium mesa glu glut/glx glew glw DRIVER_DIRS = dri PROGRAM_DIRS = WINDOW_SYSTEM=dri DRM_SOURCE_PATH=$(TOP)/../drm -# ffb and gamma are missing because they have not been converted to use the new -# interface. DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \ unichrome savage sis diff --git a/mesalib/configs/linux-cell b/mesalib/configs/linux-cell index 19d435fec..e89a08cd9 100644 --- a/mesalib/configs/linux-cell +++ b/mesalib/configs/linux-cell @@ -1,6 +1,6 @@ # linux-cell (non-debug build) -include $(TOP)/configs/default +include $(TOP)/configs/linux CONFIG_NAME = linux-cell @@ -25,15 +25,19 @@ OPT_FLAGS = -O3 SDK = /opt/cell/sdk/usr -CFLAGS = $(OPT_FLAGS) -Wall -Winline -Wmissing-prototypes \ - -fPIC -m32 -std=c99 -mabi=altivec -maltivec \ + +COMMON_C_CPP_FLAGS = $(OPT_FLAGS) -Wall -Winline \ + -fPIC -m32 -mabi=altivec -maltivec \ -I. -I$(SDK)/include \ - -DGALLIUM_CELL -DUSE_XSHM -D_BSD_SOURCE -D_SVID_SOURCE + -DGALLIUM_CELL $(DEFINES) + +CFLAGS = $(COMMON_C_CPP_FLAGS) -Wmissing-prototypes -std=c99 + +CXXFLAGS = $(COMMON_C_CPP_FLAGS) -CXXFLAGS = $(CFLAGS) # Omitting glw here: -SRC_DIRS = gallium mesa gallium/winsys glu glut/glx glew +SRC_DIRS = glsl mesa gallium gallium/winsys glu glut/glx glew # Build no traditional Mesa drivers: DRIVER_DIRS = diff --git a/mesalib/configs/linux-debug b/mesalib/configs/linux-debug index 8b0b3126d..01763b1a3 100644 --- a/mesalib/configs/linux-debug +++ b/mesalib/configs/linux-debug @@ -5,5 +5,5 @@ include $(TOP)/configs/linux CONFIG_NAME = linux-debug OPT_FLAGS = -g -CFLAGS += -ansi -pedantic +CFLAGS += -pedantic DEFINES += -DDEBUG -DDEBUG_MATH diff --git a/mesalib/configs/linux-directfb b/mesalib/configs/linux-directfb deleted file mode 100644 index 9ae3de96d..000000000 --- a/mesalib/configs/linux-directfb +++ /dev/null @@ -1,38 +0,0 @@ -# Configuration for DirectFB - -include $(TOP)/configs/default - -CONFIG_NAME = linux-directfb - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -Wall -O3 -ffast-math -fPIC -std=c99 -D_GNU_SOURCE -D_POSIX_SOURCE -D_SVID_SOURCE \ - -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DPTHREADS - -CXXFLAGS = -Wall -O3 -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE - -# Work around aliasing bugs - developers should comment this out -CFLAGS += -fno-strict-aliasing -CXXFLAGS += -fno-strict-aliasing - -HAVE_X86 = $(shell uname -m | grep 'i[3-6]86' >/dev/null && echo yes) -ifeq ($(HAVE_X86), yes) - CFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM - CXXFLAGS += -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM - MESA_ASM_SOURCES = $(X86_SOURCES) - GLAPI_ASM_SOURCES = $(X86_API) -endif - -# Directories -SRC_DIRS = gallium mesa glu glut/directfb glew -GLU_DIRS = sgi -DRIVER_DIRS = directfb -PROGRAM_DIRS = demos directfb - -# Library/program dependencies -GL_LIB_DEPS = -lm -lpthread -GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB) -APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB) -l$(GLUT_LIB) - diff --git a/mesalib/configs/linux-dri b/mesalib/configs/linux-dri index 080254334..e8e8ccfcf 100644 --- a/mesalib/configs/linux-dri +++ b/mesalib/configs/linux-dri @@ -51,17 +51,23 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ # Directories -SRC_DIRS := glx/x11 egl $(SRC_DIRS) +SRC_DIRS := glx egl $(SRC_DIRS) PROGRAM_DIRS := egl $(PROGRAM_DIRS) # EGL directories -EGL_DRIVERS_DIRS = demo glx +EGL_DRIVERS_DIRS = glx DRIVER_DIRS = dri WINDOW_SYSTEM = dri GALLIUM_WINSYS_DIRS = drm -GALLIUM_WINSYS_DRM_DIRS = vmware intel +GALLIUM_WINSYS_DRM_DIRS = vmware intel i965 GALLIUM_STATE_TRACKERS_DIRS = egl DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \ - savage sis tdfx unichrome ffb swrast + savage sis tdfx unichrome swrast + +INTEL_LIBS = `pkg-config --libs libdrm_intel` +INTEL_CFLAGS = `pkg-config --cflags libdrm_intel` + +RADEON_LIBS = `pkg-config --libs libdrm_radeon` +RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon` diff --git a/mesalib/configs/linux-dri-x86-64 b/mesalib/configs/linux-dri-x86-64 index ceab05d5d..656cf6140 100644 --- a/mesalib/configs/linux-dri-x86-64 +++ b/mesalib/configs/linux-dri-x86-64 @@ -16,7 +16,7 @@ LIB_DIR = lib64 # Library/program dependencies EXTRA_LIB_PATH=-L/usr/X11R6/lib64 -# ffb, gamma, and sis are missing because they have not be converted to use +# sis is missing because it has not been converted to use # the new interface. i810 are missing because there is no x86-64 # system where they could *ever* be used. # diff --git a/mesalib/configs/linux-dri-xcb b/mesalib/configs/linux-dri-xcb index 827fb9733..c5ed89c4b 100644 --- a/mesalib/configs/linux-dri-xcb +++ b/mesalib/configs/linux-dri-xcb @@ -47,26 +47,11 @@ DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB) GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \ $(LIBDRM_LIB) $(shell pkg-config --libs xcb) $(shell pkg-config --libs x11-xcb) $(shell pkg-config --libs xcb-glx) - -# This is now 0 by default since it seems to confuse the hell out of people -# and generate a lot of extra noise on bugzilla. If you need to build with -# EGL, do 'make linux-dri USING_EGL=1' - -USING_EGL=0 - -# Directories -ifeq ($(USING_EGL), 1) -SRC_DIRS = egl glx/x11 gallium mesa glu glut/glx glew glw -PROGRAM_DIRS = egl -else -SRC_DIRS = glx/x11 gallium mesa glu glut/glx glew glw +SRC_DIRS = glx gallium mesa glu glut/glx glew glw PROGRAM_DIRS = xdemos -endif DRIVER_DIRS = dri WINDOW_SYSTEM=dri -# gamma are missing because they have not been converted to use the new -# interface. DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon \ - savage sis tdfx unichrome ffb + savage sis tdfx unichrome diff --git a/mesalib/configs/linux-egl b/mesalib/configs/linux-egl index e906806f4..2c2834b81 100644 --- a/mesalib/configs/linux-egl +++ b/mesalib/configs/linux-egl @@ -46,12 +46,6 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \ $(LIBDRM_LIB) -# This is now 0 by default since it seems to confuse the hell out of people -# and generate a lot of extra noise on bugzilla. If you need to build with -# EGL, do 'make linux-dri USING_EGL=1' - -USING_EGL=0 - # Directories SRC_DIRS = gallium mesa gallium/winsys glu egl PROGRAM_DIRS = egl @@ -60,6 +54,4 @@ DRIVER_DIRS = dri WINDOW_SYSTEM = dri GALLIUM_WINSYS_DIRS = egl_drm -# gamma are missing because they have not been converted to use the new -# interface. DRI_DIRS = intel diff --git a/mesalib/configs/linux-glide b/mesalib/configs/linux-glide deleted file mode 100644 index 31475c81d..000000000 --- a/mesalib/configs/linux-glide +++ /dev/null @@ -1,23 +0,0 @@ -# Configuration for generic Linux with 3Dfx Glide driver - -include $(TOP)/configs/default - -CONFIG_NAME = linux-glide - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include -CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -GLUT_CFLAGS = -fexceptions - -# Work around aliasing bugs - developers should comment this out -CFLAGS += -fno-strict-aliasing -CXXFLAGS += -fno-strict-aliasing - -# Library/program dependencies -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread -GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 -APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm diff --git a/mesalib/configs/linux-i965 b/mesalib/configs/linux-i965 new file mode 100644 index 000000000..e66abc347 --- /dev/null +++ b/mesalib/configs/linux-i965 @@ -0,0 +1,8 @@ +# Configuration for standalone mode i965 debug + +include $(TOP)/configs/linux-debug + +CONFIG_NAME = linux-i965 + +GALLIUM_DRIVER_DIRS = i965 +GALLIUM_WINSYS_DIRS = drm/i965/xlib diff --git a/mesalib/configs/linux-indirect b/mesalib/configs/linux-indirect index 4b81383c0..0914fba19 100644 --- a/mesalib/configs/linux-indirect +++ b/mesalib/configs/linux-indirect @@ -47,7 +47,7 @@ GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl # Directories -SRC_DIRS = glx/x11 glu glut/glx glew glw +SRC_DIRS = glx glu glut/glx glew glw DRIVER_DIRS = PROGRAM_DIRS = WINDOW_SYSTEM=dri diff --git a/mesalib/configs/linux-llvm b/mesalib/configs/linux-llvm index 19b53cc54..27e082ebf 100644 --- a/mesalib/configs/linux-llvm +++ b/mesalib/configs/linux-llvm @@ -1,18 +1,18 @@ # -*-makefile-*- -# Configuration for Linux and LLVM with debugging info +# Configuration for Linux and LLVM with optimizations # Builds the llvmpipe gallium driver include $(TOP)/configs/linux CONFIG_NAME = linux-llvm -#GALLIUM_AUXILIARY_DIRS += gallivm - # Add llvmpipe driver GALLIUM_DRIVERS_DIRS += llvmpipe -OPT_FLAGS = -g -ansi -pedantic -DEFINES += -DDEBUG -DDEBUG_MATH -DGALLIUM_LLVMPIPE -DHAVE_UDIS86 +OPT_FLAGS = -O3 -ansi -pedantic +ARCH_FLAGS = -m32 -mmmx -msse -msse2 -mstackrealign + +DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE -DDRAW_LLVM -DHAVE_UDIS86 # override -std=c99 CFLAGS += -std=gnu99 @@ -31,7 +31,7 @@ ifeq ($(MESA_LLVM),1) # LLVM_CFLAGS=`llvm-config --cflags` LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long LLVM_LDFLAGS = $(shell llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation) - LLVM_LIBS = $(shell llvm-config --libs backend bitreader engine ipo interpreter instrumentation) + LLVM_LIBS = $(shell llvm-config --libs backend bitwriter bitreader engine ipo interpreter instrumentation) MKLIB_OPTIONS=-cplusplus else LLVM_CFLAGS= diff --git a/mesalib/configs/linux-llvm-debug b/mesalib/configs/linux-llvm-debug new file mode 100644 index 000000000..28bcfdb18 --- /dev/null +++ b/mesalib/configs/linux-llvm-debug @@ -0,0 +1,12 @@ +# -*-makefile-*- +# Configuration for Linux and LLVM with debugging info +# Builds the llvmpipe gallium driver + +include $(TOP)/configs/linux-llvm + +CONFIG_NAME = linux-llvm-debug + +OPT_FLAGS = -g -ansi -pedantic + +DEFINES += -DDEBUG -UNDEBUG + diff --git a/mesalib/configs/linux-opengl-es b/mesalib/configs/linux-opengl-es new file mode 100644 index 000000000..259c26a93 --- /dev/null +++ b/mesalib/configs/linux-opengl-es @@ -0,0 +1,28 @@ +# Configuration for OpenGL ES on Linux + +include $(TOP)/configs/linux + +CONFIG_NAME = linux-opengl-es + +# Directories to build +LIB_DIR = lib +SRC_DIRS = egl glsl mesa/es gallium gallium/winsys +PROGRAM_DIRS = es1/screen es1/xegl es2/xegl + +# egl st needs this +DEFINES += -DGLX_DIRECT_RENDERING + +# no mesa or egl drivers +DRIVER_DIRS = +EGL_DRIVERS_DIRS = + +GALLIUM_DRIVERS_DIRS = softpipe + +# build libGLES*.so +GALLIUM_STATE_TRACKERS_DIRS = es + +# build egl_x11_{swrast,i915}.so +GALLIUM_DRIVERS_DIRS += trace i915 +GALLIUM_STATE_TRACKERS_DIRS += egl +GALLIUM_WINSYS_DIRS += drm +GALLIUM_WINSYS_DRM_DIRS += intel swrast diff --git a/mesalib/configs/linux-solo b/mesalib/configs/linux-solo deleted file mode 100644 index 247a2d489..000000000 --- a/mesalib/configs/linux-solo +++ /dev/null @@ -1,54 +0,0 @@ -# Configuration for linux-solo: Linux DRI hardware drivers for fbdev - -include $(TOP)/configs/default - -CONFIG_NAME = linux-solo - -# Compiler and flags -CC = gcc -CXX = g++ - -WARN_FLAGS = -Wall -Wundef -OPT_FLAGS = -O3 -g -PIC_FLAGS = -fPIC - -# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support. -ARCH_FLAGS ?= - -# DRM and pciaccess -LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm) -LIBDRM_LIB = $(shell pkg-config --libs libdrm) -PCIACCESS_CFLAGS = $(shell pkg-config --cflags pciaccess) -PCIACCESS_LIB = $(shell pkg-config --libs pciaccess) - - -DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \ - -D_BSD_SOURCE -D_GNU_SOURCE -DHAVE_POSIX_MEMALIGN \ - -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \ - -DHAVE_ALIAS - -CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \ - $(ASM_FLAGS) -std=c99 -ffast-math - -CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) - -# Work around aliasing bugs - developers should comment this out -CFLAGS += -fno-strict-aliasing -CXXFLAGS += -fno-strict-aliasing - -MESA_ASM_SOURCES = - -# Library/program dependencies -DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(TOP)/$(LIB_DIR) $(PCIACCESS_LIB) -GL_LIB_DEPS = -lm -lpthread -ldl -GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm -GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm -APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread - -# Directories -SRC_DIRS = glx/mini gallium mesa glu glut/mini glew -DRIVER_DIRS = dri -PROGRAM_DIRS = miniglx - -#DRI_DIRS = ffb gamma sis savage tdfx unichrome fb -DRI_DIRS = i810 i915tex i915 mach64 mga r128 r200 radeon diff --git a/mesalib/configs/linux-solo-ia64 b/mesalib/configs/linux-solo-ia64 deleted file mode 100644 index b2051fac8..000000000 --- a/mesalib/configs/linux-solo-ia64 +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration for linux-solo-ia64: Linux DRI hardware drivers for fbdev - -include $(TOP)/configs/linux-solo - -CONFIG_NAME = linux-solo-ia64 - -DRI_DIRS = fb mach64 mga r128 r200 radeon sis tdfx unichrome diff --git a/mesalib/configs/linux-solo-x86 b/mesalib/configs/linux-solo-x86 deleted file mode 100644 index a9bf38826..000000000 --- a/mesalib/configs/linux-solo-x86 +++ /dev/null @@ -1,10 +0,0 @@ -# -*-makefile-*- -# Configuration for linux-solo-x86: Linux hardware drivers for fbdev for x86 - -include $(TOP)/configs/linux-solo - -CONFIG_NAME = linux-solo-x86 - -ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -MESA_ASM_SOURCES = $(X86_SOURCES) -GLAPI_ASM_SOURCES = $(X86_API) diff --git a/mesalib/configs/linux-x86-glide b/mesalib/configs/linux-x86-glide deleted file mode 100644 index 603b2bf75..000000000 --- a/mesalib/configs/linux-x86-glide +++ /dev/null @@ -1,28 +0,0 @@ -# Configuration for Linux with 3Dfx Glide driver and x86 optimizations - -include $(TOP)/configs/default - -CONFIG_NAME = linux-x86-glide - -# Compiler and flags -CC = gcc -CXX = g++ - -CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include -DFX -I/usr/include/glide -I/usr/local/glide/include - -CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE - -GLUT_CFLAGS = -fexceptions - -# Work around aliasing bugs - developers should comment this out -CFLAGS += -fno-strict-aliasing -CXXFLAGS += -fno-strict-aliasing - -MESA_ASM_SOURCES = $(X86_SOURCES) -GLAPI_ASM_SOURCES = $(X86_API) - -# Library/program dependencies -GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -L/usr/local/glide/lib -lglide3x -lm -lpthread -GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11 -APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/local/glide/lib -lglide3x -lm diff --git a/mesalib/configure b/mesalib/configure index 621ac3526..14651ee97 100644 --- a/mesalib/configure +++ b/mesalib/configure @@ -1,24 +1,20 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for Mesa 7.7.0. +# Generated by GNU Autoconf 2.63 for Mesa 7.8.0. # # Report bugs to . # -# # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# -# +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -26,15 +22,23 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; esac + fi + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + as_nl=' ' export as_nl @@ -42,13 +46,7 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -59,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in #( + case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -82,6 +80,13 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -91,15 +96,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( +case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done IFS=$as_save_IFS ;; @@ -111,16 +116,12 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 + { (exit 1); exit 1; } fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' @@ -132,250 +133,7 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa -$0: about your system, including any error possibly output -$0: before this message. Then install a modern shell, or -$0: manually run the script under such a shell if you do -$0: have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - +# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -389,12 +147,8 @@ else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -414,126 +168,414 @@ $as_echo X/"$0" | } s/.*/./; q'` -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 } -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file +exitcode=0 +if as_func_success; then + : else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null + exitcode=1 + echo as_func_success failed. fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' +if as_func_ret_success; then + : else - test -d ./-p && rmdir ./-p - as_mkdir_p=false + exitcode=1 + echo as_func_ret_success failed. fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' + exitcode=1 + echo positional parameters were not saved. fi -as_executable_p=$as_test_x -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +test \$exitcode = 0) || { (exit 1); exit 1; } -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS -test -n "$DJDIR" || exec 7<&0 &1 + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac -# Name of the host. +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -549,14 +591,14 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Mesa' PACKAGE_TARNAME='mesa' -PACKAGE_VERSION='7.7.0' -PACKAGE_STRING='Mesa 7.7.0' +PACKAGE_VERSION='7.8.0' +PACKAGE_STRING='Mesa 7.8.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa' -PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ @@ -597,8 +639,14 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS XORG_DRIVER_INSTALL_DIR +EGL_DRIVER_INSTALL_DIR +EGL_DISPLAYS XEXT_LIBS XEXT_CFLAGS +LIBKMS_XORG_LIBS +LIBKMS_XORG_CFLAGS +LIBDRM_XORG_LIBS +LIBDRM_XORG_CFLAGS XORG_LIBS XORG_CFLAGS PROGRAM_DIRS @@ -626,18 +674,24 @@ GLU_PC_REQ_PRIV GLU_PC_REQ GLU_MESA_DEPS GLU_LIB_DEPS +EGL_DRIVERS_DIRS EGL_LIB_DEPS -EGL_LIBS -EGL_CFLAGS +EGL_DRI2_LIBS +EGL_DRI2_CFLAGS OSMESA_PC_LIB_PRIV OSMESA_PC_REQ OSMESA_MESA_DEPS OSMESA_LIB_DEPS OSMESA_LIB +RADEON_LDFLAGS +RADEON_CFLAGS +LIBDRM_RADEON_LIBS +LIBDRM_RADEON_CFLAGS +INTEL_LIBS +INTEL_CFLAGS DRI_LIB_DEPS EXPAT_INCLUDES DRI_DIRS -USING_EGL DRI_DRIVER_SEARCH_DIR DRI_DRIVER_INSTALL_DIR DRI_PC_REQ_PRIV @@ -649,8 +703,8 @@ XCB_LIBS XCB_CFLAGS DRIGL_LIBS DRIGL_CFLAGS -LIBDRM_RADEON_LIBS -LIBDRM_RADEON_CFLAGS +GLPROTO_LIBS +GLPROTO_CFLAGS DRI2PROTO_LIBS DRI2PROTO_CFLAGS LIBDRM_LIBS @@ -662,10 +716,7 @@ X_LIBS X_PRE_LIBS X_CFLAGS XMKMF -RADEON_LDFLAGS -RADEON_CFLAGS GALLIUM_STATE_TRACKERS_DIRS -GALLIUM_AUXILIARY_DIRS GALLIUM_DRIVERS_DIRS GALLIUM_WINSYS_DRM_DIRS GALLIUM_WINSYS_DIRS @@ -680,11 +731,13 @@ PIC_FLAGS GLAPI_ASM_SOURCES MESA_ASM_SOURCES ASM_FLAGS +EGL_LIB_GLOB OSMESA_LIB_GLOB GLW_LIB_GLOB GLUT_LIB_GLOB GLU_LIB_GLOB GL_LIB_GLOB +EGL_LIB_NAME OSMESA_LIB_NAME GLW_LIB_NAME GLUT_LIB_NAME @@ -755,7 +808,6 @@ bindir program_transform_name prefix exec_prefix -PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION @@ -793,6 +845,8 @@ enable_motif enable_glut enable_gallium with_state_trackers +with_egl_displays +with_egl_driver_dir with_xorg_driver_dir with_max_width with_max_height @@ -800,6 +854,7 @@ enable_gallium_svga enable_gallium_intel enable_gallium_radeon enable_gallium_nouveau +enable_gallium_swrast ' ac_precious_vars='build_alias host_alias @@ -827,20 +882,28 @@ LIBDRM_CFLAGS LIBDRM_LIBS DRI2PROTO_CFLAGS DRI2PROTO_LIBS -LIBDRM_RADEON_CFLAGS -LIBDRM_RADEON_LIBS +GLPROTO_CFLAGS +GLPROTO_LIBS DRIGL_CFLAGS DRIGL_LIBS XCB_CFLAGS XCB_LIBS -EGL_CFLAGS -EGL_LIBS +INTEL_CFLAGS +INTEL_LIBS +LIBDRM_RADEON_CFLAGS +LIBDRM_RADEON_LIBS +EGL_DRI2_CFLAGS +EGL_DRI2_LIBS GLW_CFLAGS GLW_LIBS GLUT_CFLAGS GLUT_LIBS XORG_CFLAGS XORG_LIBS +LIBDRM_XORG_CFLAGS +LIBDRM_XORG_LIBS +LIBKMS_XORG_CFLAGS +LIBKMS_XORG_LIBS XEXT_CFLAGS XEXT_LIBS' @@ -951,7 +1014,8 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -977,7 +1041,8 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1181,7 +1246,8 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1197,7 +1263,8 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1227,17 +1294,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; - esac + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1254,13 +1321,15 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1283,7 +1352,8 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -1313,9 +1383,11 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } # Find the source files, if location was not specified. @@ -1354,11 +1426,13 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1384,7 +1458,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Mesa 7.7.0 to adapt to many kinds of systems. +\`configure' configures Mesa 7.8.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1455,7 +1529,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Mesa 7.7.0:";; + short | recursive ) echo "Configuration of Mesa 7.8.0:";; esac cat <<\_ACEOF @@ -1492,6 +1566,7 @@ Optional Features: --enable-gallium-radeon build gallium radeon [default=disabled] --enable-gallium-nouveau build gallium nouveau [default=disabled] + --enable-gallium-swrast build gallium swrast [default=disabled] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1515,6 +1590,11 @@ Optional Packages: --with-state-trackers[=DIRS...] comma delimited state_trackers list, e.g. "egl,glx" [default=auto] + --with-egl-displays[=DIRS...] + comma delimited native displays libEGL supports, + e.g. "x11,kms" [default=auto] + --with-egl-driver-dir=DIR + directory for EGL drivers [[default=${libdir}/egl]] --with-xorg-driver-dir=DIR Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]] @@ -1527,7 +1607,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command @@ -1555,23 +1635,40 @@ Some influential environment variables: C compiler flags for DRI2PROTO, overriding pkg-config DRI2PROTO_LIBS linker flags for DRI2PROTO, overriding pkg-config - LIBDRM_RADEON_CFLAGS - C compiler flags for LIBDRM_RADEON, overriding pkg-config - LIBDRM_RADEON_LIBS - linker flags for LIBDRM_RADEON, overriding pkg-config + GLPROTO_CFLAGS + C compiler flags for GLPROTO, overriding pkg-config + GLPROTO_LIBS + linker flags for GLPROTO, overriding pkg-config DRIGL_CFLAGS C compiler flags for DRIGL, overriding pkg-config DRIGL_LIBS linker flags for DRIGL, overriding pkg-config XCB_CFLAGS C compiler flags for XCB, overriding pkg-config XCB_LIBS linker flags for XCB, overriding pkg-config - EGL_CFLAGS C compiler flags for EGL, overriding pkg-config - EGL_LIBS linker flags for EGL, overriding pkg-config + INTEL_CFLAGS + C compiler flags for INTEL, overriding pkg-config + INTEL_LIBS linker flags for INTEL, overriding pkg-config + LIBDRM_RADEON_CFLAGS + C compiler flags for LIBDRM_RADEON, overriding pkg-config + LIBDRM_RADEON_LIBS + linker flags for LIBDRM_RADEON, overriding pkg-config + EGL_DRI2_CFLAGS + C compiler flags for EGL_DRI2, overriding pkg-config + EGL_DRI2_LIBS + linker flags for EGL_DRI2, overriding pkg-config GLW_CFLAGS C compiler flags for GLW, overriding pkg-config GLW_LIBS linker flags for GLW, overriding pkg-config GLUT_CFLAGS C compiler flags for GLUT, overriding pkg-config GLUT_LIBS linker flags for GLUT, overriding pkg-config XORG_CFLAGS C compiler flags for XORG, overriding pkg-config XORG_LIBS linker flags for XORG, overriding pkg-config + LIBDRM_XORG_CFLAGS + C compiler flags for LIBDRM_XORG, overriding pkg-config + LIBDRM_XORG_LIBS + linker flags for LIBDRM_XORG, overriding pkg-config + LIBKMS_XORG_CFLAGS + C compiler flags for LIBKMS_XORG, overriding pkg-config + LIBKMS_XORG_LIBS + linker flags for LIBKMS_XORG, overriding pkg-config XEXT_CFLAGS C compiler flags for XEXT, overriding pkg-config XEXT_LIBS linker flags for XEXT, overriding pkg-config @@ -1643,436 +1740,41 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Mesa configure 7.7.0 -generated by GNU Autoconf 2.65 +Mesa configure 7.8.0 +generated by GNU Autoconf 2.63 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by Mesa $as_me 7.8.0, which was +generated by GNU Autoconf 2.63. Invocation command line was -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## + $ $0 $@ -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () +_ACEOF +exec 5>>config.log { - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_func - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ---------------------------------------------------------------------- ## -## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa ## -## ---------------------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_header_compile -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by Mesa $as_me 7.7.0, which was -generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` @@ -2089,8 +1791,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done + $as_echo "PATH: $as_dir" +done IFS=$as_save_IFS } >&5 @@ -2127,9 +1829,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) - as_fn_append ac_configure_args1 " '$ac_arg'" + ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -2145,13 +1847,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - as_fn_append ac_configure_args " '$ac_arg'" + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -2176,13 +1878,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; + *) $as_unset $ac_var ;; esac ;; esac done @@ -2254,39 +1956,37 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h - # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF + cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF @@ -2306,8 +2006,8 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 + if test -r "$ac_site_file"; then + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" @@ -2315,10 +2015,10 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -2326,7 +2026,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -2341,11 +2041,11 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -2355,17 +2055,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -2377,20 +2077,43 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## + + + + + + + + + + + + + + + + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2401,16 +2124,24 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in bin "$srcdir"/bin; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in bin \"$srcdir\"/bin" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in bin \"$srcdir\"/bin" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in bin \"$srcdir\"/bin" >&2;} + { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, @@ -2424,27 +2155,35 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2460,24 +2199,28 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2496,7 +2239,10 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac LIBDRM_REQUIRED=2.4.15 LIBDRM_RADEON_REQUIRED=2.4.17 -DRI2PROTO_REQUIRED=1.99.3 +DRI2PROTO_REQUIRED=2.1 +GLPROTO_REQUIRED=1.4.11 +LIBDRM_XORG_REQUIRED=2.4.17 +LIBKMS_XORG_REQUIRED=1.0.0 ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2506,9 +2252,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2519,24 +2265,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -2546,9 +2292,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2559,24 +2305,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -2585,7 +2331,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2599,9 +2345,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2612,24 +2358,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -2639,9 +2385,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2653,18 +2399,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2683,10 +2429,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -2698,9 +2444,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2711,24 +2457,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -2742,9 +2488,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2755,24 +2501,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -2785,7 +2531,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -2796,42 +2542,62 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" +{ (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ ; return 0; @@ -2842,8 +2608,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -2859,17 +2625,17 @@ do done rm -f $ac_rmfiles -if { { ac_try="$ac_link_default" +if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2886,7 +2652,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2905,42 +2671,84 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } + ac_exeext=$ac_cv_exeext +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + fi +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2955,83 +2763,32 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 + +rm -f conftest$ac_cv_exeext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3043,17 +2800,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3066,23 +2823,31 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3096,16 +2861,37 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - ac_compiler_gnu=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -3114,16 +2900,20 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3134,11 +2924,35 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3149,12 +2963,36 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : else - ac_c_werror_flag=$ac_save_c_werror_flag + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3165,17 +3003,42 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3192,14 +3055,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -3256,9 +3123,32 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3269,19 +3159,17 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 + { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3294,14 +3182,14 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -3316,7 +3204,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3325,34 +3217,78 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok; then break fi @@ -3364,7 +3300,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -3375,7 +3311,11 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3384,40 +3324,87 @@ do #endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - +if $ac_preproc_ok; then + : else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -3434,9 +3421,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3447,24 +3434,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3474,9 +3461,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3487,24 +3474,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3513,7 +3500,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -3527,9 +3514,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3540,24 +3527,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3567,9 +3554,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3581,18 +3568,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -3611,10 +3598,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3626,9 +3613,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -3639,24 +3626,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3670,9 +3657,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -3683,24 +3670,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -3713,7 +3700,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -3724,42 +3711,62 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" +{ (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3773,16 +3780,37 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -3791,16 +3819,20 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3811,11 +3843,35 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3826,12 +3882,36 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : else - ac_c_werror_flag=$ac_save_c_werror_flag + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -3842,17 +3922,42 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3869,14 +3974,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -3933,9 +4042,32 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3946,19 +4078,17 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 + { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -if test "x$ac_cv_prog_cc_c89" != xno; then : -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3980,9 +4110,9 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -3993,24 +4123,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 + { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4024,9 +4154,9 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -4037,24 +4167,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4067,7 +4197,7 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -4078,36 +4208,53 @@ fi fi fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" +{ (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -4121,16 +4268,37 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - ac_compiler_gnu=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes @@ -4139,16 +4307,20 @@ else fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -4159,11 +4331,35 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CXXFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -4174,12 +4370,36 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -4190,17 +4410,42 @@ main () return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS @@ -4227,9 +4472,9 @@ for ac_prog in gmake make do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MAKE+set}" = set; then : +if test "${ac_cv_prog_MAKE+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$MAKE"; then @@ -4240,24 +4485,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MAKE="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS fi fi MAKE=$ac_cv_prog_MAKE if test -n "$MAKE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 + { $as_echo "$as_me:$LINENO: result: $MAKE" >&5 $as_echo "$MAKE" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4267,9 +4512,9 @@ done # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MKDEP+set}" = set; then : +if test "${ac_cv_path_MKDEP+set}" = set; then $as_echo_n "(cached) " >&6 else case $MKDEP in @@ -4282,14 +4527,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MKDEP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -4297,19 +4542,19 @@ esac fi MKDEP=$ac_cv_path_MKDEP if test -n "$MKDEP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDEP" >&5 + { $as_echo "$as_me:$LINENO: result: $MKDEP" >&5 $as_echo "$MKDEP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if test "${ac_cv_path_SED+set}" = set; then $as_echo_n "(cached) " >&6 else case $SED in @@ -4322,14 +4567,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -4337,10 +4582,10 @@ esac fi SED=$ac_cv_path_SED if test -n "$SED"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 + { $as_echo "$as_me:$LINENO: result: $SED" >&5 $as_echo "$SED" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4360,10 +4605,10 @@ fi # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4371,11 +4616,11 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -4412,7 +4657,7 @@ case $as_dir/ in #(( ;; esac - done +done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -4428,7 +4673,7 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -4448,9 +4693,9 @@ solaris*) do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_POSIX_SHELL+set}" = set; then : +if test "${ac_cv_path_POSIX_SHELL+set}" = set; then $as_echo_n "(cached) " >&6 else case $POSIX_SHELL in @@ -4463,14 +4708,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_POSIX_SHELL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -4478,10 +4723,10 @@ esac fi POSIX_SHELL=$ac_cv_path_POSIX_SHELL if test -n "$POSIX_SHELL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POSIX_SHELL" >&5 + { $as_echo "$as_me:$LINENO: result: $POSIX_SHELL" >&5 $as_echo "$POSIX_SHELL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4493,6 +4738,31 @@ done ;; esac +if test "x$GCC" = xyes; then + { $as_echo "$as_me:$LINENO: checking whether gcc version is sufficient" >&5 +$as_echo_n "checking whether gcc version is sufficient... " >&6; } + major=0 + minor=0 + + GCC_VERSION=`$CC -dumpversion` + if test $? -eq 0; then + major=`echo $GCC_VERSION | cut -d. -f1` + minor=`echo $GCC_VERSION | cut -d. -f1` + fi + + if test $major -lt 3 -o $major -eq 3 -a $minor -lt 3 ; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: If using GCC, version 3.3.0 or later is required." >&5 +$as_echo "$as_me: error: If using GCC, version 3.3.0 or later is required." >&2;} + { (exit 1); exit 1; }; } + else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + fi +fi + + MKDEP_OPTIONS=-fdepend if test "x$GCC" = xyes; then for dir in include include-fixed; do @@ -4513,9 +4783,9 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -4528,14 +4798,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -4543,10 +4813,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4556,9 +4826,9 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in @@ -4571,14 +4841,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS ;; @@ -4586,10 +4856,10 @@ esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 + { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -4598,7 +4868,7 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac @@ -4611,13 +4881,13 @@ fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 + { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi @@ -4644,11 +4914,70 @@ linux*|*-gnu*|gnu*) solaris*) DEFINES="$DEFINES -DPTHREADS -DSVR4" ;; +cygwin*) + DEFINES="$DEFINES -DPTHREADS" + ;; esac if test "x$GCC" = xyes; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math" + # Enable -fvisibility=hidden if using a gcc that supports it + save_CFLAGS="$CFLAGS" + { $as_echo "$as_me:$LINENO: checking whether $CC supports -fvisibility=hidden" >&5 +$as_echo_n "checking whether $CC supports -fvisibility=hidden... " >&6; } + CFLAGS="$CFLAGS -fvisibility=hidden" + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="$save_CFLAGS" ; { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext; + # Work around aliasing bugs - developers should comment this out CFLAGS="$CFLAGS -fno-strict-aliasing" fi @@ -4665,7 +4994,7 @@ fi # Check whether --enable-32-bit was given. -if test "${enable_32_bit+set}" = set; then : +if test "${enable_32_bit+set}" = set; then enableval=$enable_32_bit; enable_32bit="$enableval" else enable_32bit=auto @@ -4682,7 +5011,7 @@ if test "x$enable_32bit" = xyes; then fi fi # Check whether --enable-64-bit was given. -if test "${enable_64_bit+set}" = set; then : +if test "${enable_64_bit+set}" = set; then enableval=$enable_64_bit; enable_64bit="$enableval" else enable_64bit=auto @@ -4699,7 +5028,7 @@ if test "x$enable_64bit" = xyes; then fi # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : +if test "${enable_static+set}" = set; then enableval=$enable_static; enable_static="$enableval" else enable_static=no @@ -4710,11 +5039,13 @@ case "x$enable_static" in xyes|xno ) ;; x ) enable_static=no ;; * ) - as_fn_error "Static library option '$enable_static' is not a valid" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Static library option '$enable_static' is not a valid" >&5 +$as_echo "$as_me: error: Static library option '$enable_static' is not a valid" >&2;} + { (exit 1); exit 1; }; } ;; esac # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test "${enable_shared+set}" = set; then enableval=$enable_shared; enable_shared="$enableval" else enable_shared=yes @@ -4725,18 +5056,20 @@ case "x$enable_shared" in xyes|xno ) ;; x ) enable_shared=yes ;; * ) - as_fn_error "Shared library option '$enable_shared' is not a valid" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Shared library option '$enable_shared' is not a valid" >&5 +$as_echo "$as_me: error: Shared library option '$enable_shared' is not a valid" >&2;} + { (exit 1); exit 1; }; } ;; esac case "x$enable_static$enable_shared" in xyesyes ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't build static and shared libraries, disabling shared" >&5 + { $as_echo "$as_me:$LINENO: WARNING: Can't build static and shared libraries, disabling shared" >&5 $as_echo "$as_me: WARNING: Can't build static and shared libraries, disabling shared" >&2;} enable_shared=no ;; xnono ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't disable both static and shared libraries, enabling static" >&5 + { $as_echo "$as_me:$LINENO: WARNING: Can't disable both static and shared libraries, enabling static" >&5 $as_echo "$as_me: WARNING: Can't disable both static and shared libraries, enabling static" >&2;} enable_static=yes ;; @@ -4749,7 +5082,7 @@ fi # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : +if test "${enable_debug+set}" = set; then enableval=$enable_debug; enable_debug="$enableval" else enable_debug=no @@ -4786,12 +5119,16 @@ GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION} GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION} GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION} OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION} +EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION} GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*' GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*' GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*' GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*' OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*' +EGL_LIB_GLOB='lib$(EGL_LIB).*'${LIB_EXTENSION}'*' + + @@ -4806,7 +5143,7 @@ OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*' # Check whether --enable-asm was given. -if test "${enable_asm+set}" = set; then : +if test "${enable_asm+set}" = set; then enableval=$enable_asm; enable_asm="$enableval" else enable_asm=yes @@ -4817,16 +5154,16 @@ asm_arch="" ASM_FLAGS="" MESA_ASM_SOURCES="" GLAPI_ASM_SOURCES="" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assembly" >&5 +{ $as_echo "$as_me:$LINENO: checking whether to enable assembly" >&5 $as_echo_n "checking whether to enable assembly... " >&6; } -test "x$enable_asm" = xno && { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +test "x$enable_asm" = xno && { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } # disable if cross compiling on x86/x86_64 since we must run gen_matypes if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then case "$host_cpu" in i?86 | x86_64) enable_asm=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cross compiling" >&5 + { $as_echo "$as_me:$LINENO: result: no, cross compiling" >&5 $as_echo "no, cross compiling" >&6; } ;; esac @@ -4869,31 +5206,31 @@ if test "x$enable_asm" = xyes; then ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM" MESA_ASM_SOURCES='$(X86_SOURCES)' GLAPI_ASM_SOURCES='$(X86_API)' - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, x86" >&5 + { $as_echo "$as_me:$LINENO: result: yes, x86" >&5 $as_echo "yes, x86" >&6; } ;; x86_64) ASM_FLAGS="-DUSE_X86_64_ASM" MESA_ASM_SOURCES='$(X86-64_SOURCES)' GLAPI_ASM_SOURCES='$(X86-64_API)' - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, x86_64" >&5 + { $as_echo "$as_me:$LINENO: result: yes, x86_64" >&5 $as_echo "yes, x86_64" >&6; } ;; ppc) ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM" MESA_ASM_SOURCES='$(PPC_SOURCES)' - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, ppc" >&5 + { $as_echo "$as_me:$LINENO: result: yes, ppc" >&5 $as_echo "yes, ppc" >&6; } ;; sparc) ASM_FLAGS="-DUSE_SPARC_ASM" MESA_ASM_SOURCES='$(SPARC_SOURCES)' GLAPI_ASM_SOURCES='$(SPARC_API)' - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, sparc" >&5 + { $as_echo "$as_me:$LINENO: result: yes, sparc" >&5 $as_echo "yes, sparc" >&6; } ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, platform not supported" >&5 + { $as_echo "$as_me:$LINENO: result: no, platform not supported" >&5 $as_echo "no, platform not supported" >&6; } ;; esac @@ -4904,7 +5241,7 @@ fi # Check whether --enable-pic was given. -if test "${enable_pic+set}" = set; then : +if test "${enable_pic+set}" = set; then enableval=$enable_pic; enable_pic="$enableval" test "x$enable_pic" = x && enable_pic=auto else @@ -4917,7 +5254,7 @@ if test "$enable_pic" = auto && test "$enable_static" = yes; then fi # if PIC hasn't been explicitly disabled, try to figure out the flags if test "$enable_pic" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to produce PIC" >&5 + { $as_echo "$as_me:$LINENO: checking for $CC option to produce PIC" >&5 $as_echo_n "checking for $CC option to produce PIC... " >&6; } # allow the user's flags to override if test "x$PIC_FLAGS" = x; then @@ -5003,26 +5340,39 @@ $as_echo_n "checking for $CC option to produce PIC... " >&6; } esac fi # GCC fi # PIC_FLAGS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PIC_FLAGS" >&5 + { $as_echo "$as_me:$LINENO: result: $PIC_FLAGS" >&5 $as_echo "$PIC_FLAGS" >&6; } fi - -ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +{ $as_echo "$as_me:$LINENO: checking for dlopen" >&5 +$as_echo_n "checking for dlopen... " >&6; } +if test "${ac_cv_func_dlopen+set}" = set; then $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -5031,6 +5381,13 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext extern "C" #endif char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_dlopen || defined __stub___dlopen +choke me +#endif + int main () { @@ -5039,32 +5396,208 @@ return dlopen (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_dlopen=yes else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : - DLOPEN_LIBS="-ldl" -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_dlopen=no fi - -ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" -if test "x$ac_cv_func_posix_memalign" = x""yes; then : - DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN" +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi - - -# Check whether --enable-selinux was given. -if test "${enable_selinux+set}" = set; then : +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +$as_echo "$ac_cv_func_dlopen" >&6; } +if test "x$ac_cv_func_dlopen" = x""yes; then + : +else + { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_dl_dlopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dl_dlopen=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = x""yes; then + DLOPEN_LIBS="-ldl" +fi + +fi + + +{ $as_echo "$as_me:$LINENO: checking for posix_memalign" >&5 +$as_echo_n "checking for posix_memalign... " >&6; } +if test "${ac_cv_func_posix_memalign+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define posix_memalign to an innocuous variant, in case declares posix_memalign. + For example, HP-UX 11i declares gettimeofday. */ +#define posix_memalign innocuous_posix_memalign + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char posix_memalign (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef posix_memalign + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char posix_memalign (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_posix_memalign || defined __stub___posix_memalign +choke me +#endif + +int +main () +{ +return posix_memalign (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_posix_memalign=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_posix_memalign=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_posix_memalign" >&5 +$as_echo "$ac_cv_func_posix_memalign" >&6; } +if test "x$ac_cv_func_posix_memalign" = x""yes; then + DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN" +fi + + +# Check whether --enable-selinux was given. +if test "${enable_selinux+set}" = set; then enableval=$enable_selinux; MESA_SELINUX="$enableval" else MESA_SELINUX=no @@ -5072,9 +5605,9 @@ fi if test "x$enable_selinux" = "xyes"; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -5085,7 +5618,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue @@ -5105,7 +5638,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val + ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -5120,24 +5653,26 @@ esac $ac_path_GREP_found && break 3 done done - done +done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -5151,7 +5686,7 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue @@ -5171,7 +5706,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val + ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -5186,10 +5721,12 @@ esac $ac_path_EGREP_found && break 3 done done - done +done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP @@ -5197,17 +5734,21 @@ fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -5222,23 +5763,48 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - ac_cv_header_stdc=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - + $EGREP "memchr" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -5248,14 +5814,18 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - + $EGREP "free" >/dev/null 2>&1; then + : else ac_cv_header_stdc=no fi @@ -5265,10 +5835,14 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include @@ -5295,34 +5869,118 @@ main () return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : else - ac_cv_header_stdc=no + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -$as_echo "#define STDC_HEADERS 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5332,22 +5990,160 @@ fi done -ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default" -if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then : +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 +$as_echo_n "checking for selinux/selinux.h... " >&6; } +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 +$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5 +$as_echo_n "checking selinux/selinux.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5 +$as_echo_n "checking selinux/selinux.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 +$as_echo_n "checking for selinux/selinux.h... " >&6; } +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_selinux_selinux_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 +$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } +fi +if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then + : else - as_fn_error "SELinux headers not found" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: SELinux headers not found" >&5 +$as_echo "$as_me: error: SELinux headers not found" >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5 + +{ $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5 $as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then : +if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lselinux $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5365,18 +6161,43 @@ return is_selinux_enabled (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_selinux_is_selinux_enabled=yes -else - ac_cv_lib_selinux_is_selinux_enabled=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 -$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } -if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_selinux_is_selinux_enabled=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_selinux_is_selinux_enabled=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5 +$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; } +if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSELINUX 1 _ACEOF @@ -5384,7 +6205,9 @@ _ACEOF LIBS="-lselinux $LIBS" else - as_fn_error "SELinux library not found" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: SELinux library not found" >&5 +$as_echo "$as_me: error: SELinux library not found" >&2;} + { (exit 1); exit 1; }; } fi SELINUX_LIBS="-lselinux" @@ -5408,7 +6231,7 @@ esac # Check whether --with-driver was given. -if test "${with_driver+set}" = set; then : +if test "${with_driver+set}" = set; then withval=$with_driver; mesa_driver="$withval" else mesa_driver="$default_driver" @@ -5418,17 +6241,21 @@ case "x$mesa_driver" in xxlib|xdri|xosmesa) ;; *) - as_fn_error "Driver '$mesa_driver' is not a valid option" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Driver '$mesa_driver' is not a valid option" >&5 +$as_echo "$as_me: error: Driver '$mesa_driver' is not a valid option" >&2;} + { (exit 1); exit 1; }; } ;; esac -SRC_DIRS="mesa glew" + +CORE_DIRS="glsl mesa" + +SRC_DIRS="glew" GLU_DIRS="sgi" WINDOW_SYSTEM="" GALLIUM_DIRS="auxiliary drivers state_trackers" GALLIUM_WINSYS_DIRS="" GALLIUM_WINSYS_DRM_DIRS="" -GALLIUM_AUXILIARY_DIRS="rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl" GALLIUM_DRIVERS_DIRS="softpipe failover trace identity" GALLIUM_STATE_TRACKERS_DIRS="" @@ -5438,7 +6265,7 @@ xlib) GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS xlib" ;; dri) - SRC_DIRS="glx/x11 $SRC_DIRS" + SRC_DIRS="$SRC_DIRS glx" DRIVER_DIRS="dri" WINDOW_SYSTEM="dri" GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS drm" @@ -5457,9 +6284,6 @@ esac - - - if test -d "$srcdir/progs/demos"; then default_demos=yes else @@ -5467,7 +6291,7 @@ else fi # Check whether --with-demos was given. -if test "${with_demos+set}" = set; then : +if test "${with_demos+set}" = set; then withval=$with_demos; with_demos="$withval" else with_demos="$default_demos" @@ -5491,21 +6315,23 @@ yes) demos=`IFS=,; echo $with_demos` for demo in $demos; do test -d "$srcdir/progs/$demo" || \ - as_fn_error "Program directory '$demo' doesn't exist" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Program directory '$demo' doesn't exist" >&5 +$as_echo "$as_me: error: Program directory '$demo' doesn't exist" >&2;} + { (exit 1); exit 1; }; } done PROGRAM_DIRS="$demos" ;; esac if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config files for X11 are available" >&5 + { $as_echo "$as_me:$LINENO: checking pkg-config files for X11 are available" >&5 $as_echo_n "checking pkg-config files for X11 are available... " >&6; } if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then x11_pkgconfig=yes have_x=yes @@ -5515,18 +6341,18 @@ else x11_pkgconfig=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $x11_pkgconfig" >&5 + { $as_echo "$as_me:$LINENO: result: $x11_pkgconfig" >&5 $as_echo "$x11_pkgconfig" >&6; } else x11_pkgconfig=no fi if test "$x11_pkgconfig" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 + { $as_echo "$as_me:$LINENO: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. -if test "${with_x+set}" = set; then : +if test "${with_x+set}" = set; then withval=$with_x; fi @@ -5536,8 +6362,10 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5 +$as_echo "$as_me: error: cannot use X directory names containing '" >&2;} + { (exit 1); exit 1; }; };; #( + *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -5585,25 +6413,21 @@ fi # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include -/usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 -/usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include -/usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 -/usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 @@ -5625,14 +6449,37 @@ ac_x_header_dirs=' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # We can compile using X headers with no special include directory. ac_x_includes= else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir @@ -5640,6 +6487,7 @@ else fi done fi + rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no @@ -5649,7 +6497,11 @@ if test "$ac_x_libraries" = no; then # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int @@ -5660,12 +6512,35 @@ XrmInitialize () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else - LIBS=$ac_save_LIBS + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! @@ -5677,8 +6552,10 @@ do done done fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( @@ -5699,7 +6576,7 @@ fi fi # $with_x != no if test "$have_x" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 + { $as_echo "$as_me:$LINENO: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else @@ -5710,14 +6587,16 @@ else ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 + { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h +cat >>confdefs.h <<\_ACEOF +#define X_DISPLAY_MISSING 1 +_ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else @@ -5730,12 +6609,16 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 + { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5746,13 +6629,40 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int @@ -5763,19 +6673,46 @@ main () return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: neither works" >&5 $as_echo "neither works" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi @@ -5791,7 +6728,11 @@ rm -f core conftest.err conftest.$ac_objext \ # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5809,17 +6750,44 @@ return XOpenDisplay (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + : else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5837,30 +6805,59 @@ return dnet_ntoa (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dnet_dnet_ntoa=yes else - ac_cv_lib_dnet_dnet_ntoa=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 + { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5878,25 +6875,52 @@ return dnet_ntoa (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else - ac_cv_lib_dnet_stub_dnet_ntoa=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_dnet_stub_dnet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, @@ -5907,20 +6931,105 @@ rm -f core conftest.err conftest.$ac_objext \ # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = x""yes; then : + { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 +$as_echo_n "checking for gethostbyname... " >&6; } +if test "${ac_cv_func_gethostbyname+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_gethostbyname || defined __stub___gethostbyname +choke me +#endif + +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_gethostbyname=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gethostbyname=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +$as_echo "$ac_cv_func_gethostbyname" >&6; } if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 + { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5938,30 +7047,59 @@ return gethostbyname (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_nsl_gethostbyname=yes else - ac_cv_lib_nsl_gethostbyname=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : +if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 + { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5979,18 +7117,43 @@ return gethostbyname (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_bsd_gethostbyname=yes else - ac_cv_lib_bsd_gethostbyname=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_bsd_gethostbyname=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : +if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi @@ -6004,20 +7167,105 @@ fi # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. - ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -if test "x$ac_cv_func_connect" = x""yes; then : + { $as_echo "$as_me:$LINENO: checking for connect" >&5 +$as_echo_n "checking for connect... " >&6; } +if test "${ac_cv_func_connect+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_connect || defined __stub___connect +choke me +#endif + +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_connect=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_connect=no +fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +$as_echo "$ac_cv_func_connect" >&6; } if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 + { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then : +if test "${ac_cv_lib_socket_connect+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6035,39 +7283,235 @@ return connect (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_socket_connect=yes else - ac_cv_lib_socket_connect=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_connect=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then : +if test "x$ac_cv_lib_socket_connect" = x""yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. - ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -if test "x$ac_cv_func_remove" = x""yes; then : + { $as_echo "$as_me:$LINENO: checking for remove" >&5 +$as_echo_n "checking for remove... " >&6; } +if test "${ac_cv_func_remove+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define remove to an innocuous variant, in case declares remove. + For example, HP-UX 11i declares gettimeofday. */ +#define remove innocuous_remove +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef remove + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_remove || defined __stub___remove +choke me +#endif + +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_remove=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_remove=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +$as_echo "$ac_cv_func_remove" >&6; } if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 + { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then : +if test "${ac_cv_lib_posix_remove+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char remove (); +int +main () +{ +return remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_posix_remove=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_posix_remove=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +$as_echo "$ac_cv_lib_posix_remove" >&6; } +if test "x$ac_cv_lib_posix_remove" = x""yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + { $as_echo "$as_me:$LINENO: checking for shmat" >&5 +$as_echo_n "checking for shmat... " >&6; } +if test "${ac_cv_func_shmat+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define shmat to an innocuous variant, in case declares shmat. + For example, HP-UX 11i declares gettimeofday. */ +#define shmat innocuous_shmat + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shmat /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -6075,47 +7519,71 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #ifdef __cplusplus extern "C" #endif -char remove (); +char shmat (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_shmat || defined __stub___shmat +choke me +#endif + int main () { -return remove (); +return shmat (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_posix_remove=yes +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_shmat=yes else - ac_cv_lib_posix_remove=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 -$as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then : - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -fi - - fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -if test "x$ac_cv_func_shmat" = x""yes; then : + ac_cv_func_shmat=no +fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +$as_echo "$ac_cv_func_shmat" >&6; } if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 + { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then : +if test "${ac_cv_lib_ipc_shmat+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6133,18 +7601,43 @@ return shmat (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_ipc_shmat=yes else - ac_cv_lib_ipc_shmat=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ipc_shmat=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : +if test "x$ac_cv_lib_ipc_shmat" = x""yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi @@ -6160,14 +7653,18 @@ fi # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 + { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6185,18 +7682,43 @@ return IceConnectionNumber (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_ICE_IceConnectionNumber=yes else - ac_cv_lib_ICE_IceConnectionNumber=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_ICE_IceConnectionNumber=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi @@ -6211,13 +7733,15 @@ fi case "$mesa_driver" in xlib|dri) if test "$no_x" = yes; then - as_fn_error "X11 development libraries needed for $mesa_driver driver" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: X11 development libraries needed for $mesa_driver driver" >&5 +$as_echo "$as_me: error: X11 development libraries needed for $mesa_driver driver" >&2;} + { (exit 1); exit 1; }; } fi ;; esac # Check whether --enable-xcb was given. -if test "${enable_xcb+set}" = set; then : +if test "${enable_xcb+set}" = set; then enableval=$enable_xcb; enable_xcb="$enableval" else enable_xcb=no @@ -6234,44 +7758,40 @@ xlib) if test "$x11_pkgconfig" = yes; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XLIBGL" >&5 +{ $as_echo "$as_me:$LINENO: checking for XLIBGL" >&5 $as_echo_n "checking for XLIBGL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XLIBGL_CFLAGS"; then - pkg_cv_XLIBGL_CFLAGS="$XLIBGL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xext\""; } >&5 +if test -n "$XLIBGL_CFLAGS"; then + pkg_cv_XLIBGL_CFLAGS="$XLIBGL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xext\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xext") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XLIBGL_CFLAGS=`$PKG_CONFIG --cflags "x11 xext" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XLIBGL_LIBS"; then - pkg_cv_XLIBGL_LIBS="$XLIBGL_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xext\""; } >&5 +if test -n "$XLIBGL_LIBS"; then + pkg_cv_XLIBGL_LIBS="$XLIBGL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xext\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xext") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XLIBGL_LIBS=`$PKG_CONFIG --libs "x11 xext" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -6284,14 +7804,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XLIBGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xext"` + XLIBGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xext" 2>&1` else - XLIBGL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xext"` + XLIBGL_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xext" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XLIBGL_PKG_ERRORS" >&5 - as_fn_error "Package requirements (x11 xext) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (x11 xext) were not met: + +$XLIBGL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XLIBGL_CFLAGS +and XLIBGL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (x11 xext) were not met: $XLIBGL_PKG_ERRORS @@ -6301,11 +7832,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XLIBGL_CFLAGS and XLIBGL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XLIBGL_CFLAGS +and XLIBGL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -6314,11 +7856,12 @@ and XLIBGL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XLIBGL_CFLAGS=$pkg_cv_XLIBGL_CFLAGS XLIBGL_LIBS=$pkg_cv_XLIBGL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi @@ -6345,50 +7888,48 @@ fi dri) # DRI must be shared, I think if test "$enable_static" = yes; then - as_fn_error "Can't use static libraries for DRI drivers" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Can't use static libraries for DRI drivers" >&5 +$as_echo "$as_me: error: Can't use static libraries for DRI drivers" >&2;} + { (exit 1); exit 1; }; } fi # Check for libdrm pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5 +{ $as_echo "$as_me:$LINENO: checking for LIBDRM" >&5 $as_echo_n "checking for LIBDRM... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$LIBDRM_CFLAGS"; then - pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_REQUIRED\""; } >&5 +if test -n "$LIBDRM_CFLAGS"; then + pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "libdrm >= $LIBDRM_REQUIRED") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= $LIBDRM_REQUIRED" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$LIBDRM_LIBS"; then - pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_REQUIRED\""; } >&5 +if test -n "$LIBDRM_LIBS"; then + pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "libdrm >= $LIBDRM_REQUIRED") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= $LIBDRM_REQUIRED" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -6401,14 +7942,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdrm >= $LIBDRM_REQUIRED"` + LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm >= $LIBDRM_REQUIRED" 2>&1` else - LIBDRM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdrm >= $LIBDRM_REQUIRED"` + LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm >= $LIBDRM_REQUIRED" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBDRM_PKG_ERRORS" >&5 - as_fn_error "Package requirements (libdrm >= $LIBDRM_REQUIRED) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (libdrm >= $LIBDRM_REQUIRED) were not met: $LIBDRM_PKG_ERRORS @@ -6418,11 +7959,33 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBDRM_CFLAGS and LIBDRM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&5 +$as_echo "$as_me: error: Package requirements (libdrm >= $LIBDRM_REQUIRED) were not met: + +$LIBDRM_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBDRM_CFLAGS +and LIBDRM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -6431,54 +7994,51 @@ and LIBDRM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRI2PROTO" >&5 +{ $as_echo "$as_me:$LINENO: checking for DRI2PROTO" >&5 $as_echo_n "checking for DRI2PROTO... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DRI2PROTO_CFLAGS"; then - pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dri2proto >= \$DRI2PROTO_REQUIRED\""; } >&5 +if test -n "$DRI2PROTO_CFLAGS"; then + pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dri2proto >= \$DRI2PROTO_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "dri2proto >= $DRI2PROTO_REQUIRED") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DRI2PROTO_CFLAGS=`$PKG_CONFIG --cflags "dri2proto >= $DRI2PROTO_REQUIRED" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DRI2PROTO_LIBS"; then - pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dri2proto >= \$DRI2PROTO_REQUIRED\""; } >&5 +if test -n "$DRI2PROTO_LIBS"; then + pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dri2proto >= \$DRI2PROTO_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "dri2proto >= $DRI2PROTO_REQUIRED") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DRI2PROTO_LIBS=`$PKG_CONFIG --libs "dri2proto >= $DRI2PROTO_REQUIRED" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -6491,14 +8051,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dri2proto >= $DRI2PROTO_REQUIRED"` + DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dri2proto >= $DRI2PROTO_REQUIRED" 2>&1` else - DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dri2proto >= $DRI2PROTO_REQUIRED"` + DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "dri2proto >= $DRI2PROTO_REQUIRED" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRI2PROTO_PKG_ERRORS" >&5 - as_fn_error "Package requirements (dri2proto >= $DRI2PROTO_REQUIRED) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (dri2proto >= $DRI2PROTO_REQUIRED) were not met: + +$DRI2PROTO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DRI2PROTO_CFLAGS +and DRI2PROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (dri2proto >= $DRI2PROTO_REQUIRED) were not met: $DRI2PROTO_PKG_ERRORS @@ -6508,11 +8079,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables DRI2PROTO_CFLAGS and DRI2PROTO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DRI2PROTO_CFLAGS +and DRI2PROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -6521,57 +8103,51 @@ and DRI2PROTO_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else DRI2PROTO_CFLAGS=$pkg_cv_DRI2PROTO_CFLAGS DRI2PROTO_LIBS=$pkg_cv_DRI2PROTO_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi - GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" - DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" - pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM_RADEON" >&5 -$as_echo_n "checking for LIBDRM_RADEON... " >&6; } +{ $as_echo "$as_me:$LINENO: checking for GLPROTO" >&5 +$as_echo_n "checking for GLPROTO... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$LIBDRM_RADEON_CFLAGS"; then - pkg_cv_LIBDRM_RADEON_CFLAGS="$LIBDRM_RADEON_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon libdrm >= \$LIBDRM_RADEON_REQUIRED\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED") 2>&5 +if test -n "$GLPROTO_CFLAGS"; then + pkg_cv_GLPROTO_CFLAGS="$GLPROTO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= \$GLPROTO_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= $GLPROTO_REQUIRED") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBDRM_RADEON_CFLAGS=`$PKG_CONFIG --cflags "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLPROTO_CFLAGS=`$PKG_CONFIG --cflags "glproto >= $GLPROTO_REQUIRED" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$LIBDRM_RADEON_LIBS"; then - pkg_cv_LIBDRM_RADEON_LIBS="$LIBDRM_RADEON_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon libdrm >= \$LIBDRM_RADEON_REQUIRED\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED") 2>&5 +if test -n "$GLPROTO_LIBS"; then + pkg_cv_GLPROTO_LIBS="$GLPROTO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= \$GLPROTO_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= $GLPROTO_REQUIRED") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_LIBDRM_RADEON_LIBS=`$PKG_CONFIG --libs "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_GLPROTO_LIBS=`$PKG_CONFIG --libs "glproto >= $GLPROTO_REQUIRED" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -6584,30 +8160,69 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBDRM_RADEON_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED"` + GLPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glproto >= $GLPROTO_REQUIRED" 2>&1` else - LIBDRM_RADEON_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED"` + GLPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "glproto >= $GLPROTO_REQUIRED" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$LIBDRM_RADEON_PKG_ERRORS" >&5 + echo "$GLPROTO_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - HAVE_LIBDRM_RADEON=no + { { $as_echo "$as_me:$LINENO: error: Package requirements (glproto >= $GLPROTO_REQUIRED) were not met: + +$GLPROTO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLPROTO_CFLAGS +and GLPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (glproto >= $GLPROTO_REQUIRED) were not met: + +$GLPROTO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLPROTO_CFLAGS +and GLPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - HAVE_LIBDRM_RADEON=no + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLPROTO_CFLAGS +and GLPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLPROTO_CFLAGS +and GLPROTO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else - LIBDRM_RADEON_CFLAGS=$pkg_cv_LIBDRM_RADEON_CFLAGS - LIBDRM_RADEON_LIBS=$pkg_cv_LIBDRM_RADEON_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + GLPROTO_CFLAGS=$pkg_cv_GLPROTO_CFLAGS + GLPROTO_LIBS=$pkg_cv_GLPROTO_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_LIBDRM_RADEON=yes + : fi - - if test "$HAVE_LIBDRM_RADEON" = yes; then - RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS" - RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS - fi + GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED" + DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" # find the DRI deps for libGL if test "$x11_pkgconfig" = yes; then @@ -6619,44 +8234,40 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DRIGL" >&5 +{ $as_echo "$as_me:$LINENO: checking for DRIGL" >&5 $as_echo_n "checking for DRIGL... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$DRIGL_CFLAGS"; then - pkg_cv_DRIGL_CFLAGS="$DRIGL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$dri_modules\""; } >&5 +if test -n "$DRIGL_CFLAGS"; then + pkg_cv_DRIGL_CFLAGS="$DRIGL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$dri_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$dri_modules") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DRIGL_CFLAGS=`$PKG_CONFIG --cflags "$dri_modules" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$DRIGL_LIBS"; then - pkg_cv_DRIGL_LIBS="$DRIGL_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$dri_modules\""; } >&5 +if test -n "$DRIGL_LIBS"; then + pkg_cv_DRIGL_LIBS="$DRIGL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$dri_modules\"") >&5 ($PKG_CONFIG --exists --print-errors "$dri_modules") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_DRIGL_LIBS=`$PKG_CONFIG --libs "$dri_modules" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -6669,14 +8280,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DRIGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$dri_modules"` + DRIGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$dri_modules" 2>&1` else - DRIGL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$dri_modules"` + DRIGL_PKG_ERRORS=`$PKG_CONFIG --print-errors "$dri_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRIGL_PKG_ERRORS" >&5 - as_fn_error "Package requirements ($dri_modules) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements ($dri_modules) were not met: + +$DRIGL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables DRIGL_CFLAGS +and DRIGL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements ($dri_modules) were not met: $DRIGL_PKG_ERRORS @@ -6686,11 +8308,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables DRIGL_CFLAGS and DRIGL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables DRIGL_CFLAGS +and DRIGL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -6699,11 +8332,12 @@ and DRIGL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else DRIGL_CFLAGS=$pkg_cv_DRIGL_CFLAGS DRIGL_LIBS=$pkg_cv_DRIGL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi @@ -6721,44 +8355,40 @@ fi if test "$enable_xcb" = yes; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCB" >&5 +{ $as_echo "$as_me:$LINENO: checking for XCB" >&5 $as_echo_n "checking for XCB... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_CFLAGS"; then - pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb-glx\""; } >&5 +if test -n "$XCB_CFLAGS"; then + pkg_cv_XCB_CFLAGS="$XCB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb-glx\"") >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb-glx") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XCB_CFLAGS=`$PKG_CONFIG --cflags "x11-xcb xcb-glx" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XCB_LIBS"; then - pkg_cv_XCB_LIBS="$XCB_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb-glx\""; } >&5 +if test -n "$XCB_LIBS"; then + pkg_cv_XCB_LIBS="$XCB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb-glx\"") >&5 ($PKG_CONFIG --exists --print-errors "x11-xcb xcb-glx") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XCB_LIBS=`$PKG_CONFIG --libs "x11-xcb xcb-glx" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -6771,14 +8401,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11-xcb xcb-glx"` + XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb xcb-glx" 2>&1` else - XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11-xcb xcb-glx"` + XCB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb xcb-glx" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XCB_PKG_ERRORS" >&5 - as_fn_error "Package requirements (x11-xcb xcb-glx) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (x11-xcb xcb-glx) were not met: + +$XCB_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables XCB_CFLAGS +and XCB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (x11-xcb xcb-glx) were not met: $XCB_PKG_ERRORS @@ -6788,11 +8429,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XCB_CFLAGS and XCB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables XCB_CFLAGS +and XCB_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -6801,11 +8453,12 @@ and XCB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else XCB_CFLAGS=$pkg_cv_XCB_CFLAGS XCB_LIBS=$pkg_cv_XCB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi @@ -6835,7 +8488,7 @@ if test "$mesa_driver" = xlib; then fi # Check whether --enable-glx-tls was given. -if test "${enable_glx_tls+set}" = set; then : +if test "${enable_glx_tls+set}" = set; then enableval=$enable_glx_tls; GLX_USE_TLS="$enableval" else GLX_USE_TLS=no @@ -6843,7 +8496,7 @@ fi # Check whether --with-dri-driverdir was given. -if test "${with_dri_driverdir+set}" = set; then : +if test "${with_dri_driverdir+set}" = set; then withval=$with_dri_driverdir; DRI_DRIVER_INSTALL_DIR="$withval" else DRI_DRIVER_INSTALL_DIR='${libdir}/dri' @@ -6852,7 +8505,7 @@ fi # Check whether --with-dri-searchpath was given. -if test "${with_dri_searchpath+set}" = set; then : +if test "${with_dri_searchpath+set}" = set; then withval=$with_dri_searchpath; DRI_DRIVER_SEARCH_DIR="$withval" else DRI_DRIVER_SEARCH_DIR='${DRI_DRIVER_INSTALL_DIR}' @@ -6860,7 +8513,7 @@ fi # Check whether --enable-driglx-direct was given. -if test "${enable_driglx_direct+set}" = set; then : +if test "${enable_driglx_direct+set}" = set; then enableval=$enable_driglx_direct; driglx_direct="$enableval" else driglx_direct="yes" @@ -6868,7 +8521,7 @@ fi # Check whether --with-dri-drivers was given. -if test "${with_dri_drivers+set}" = set; then : +if test "${with_dri_drivers+set}" = set; then withval=$with_dri_drivers; with_dri_drivers="$withval" else with_dri_drivers=yes @@ -6889,25 +8542,20 @@ yes) dri_drivers=`IFS=', '; echo $with_dri_drivers` for driver in $dri_drivers; do test -d "$srcdir/src/mesa/drivers/dri/$driver" || \ - as_fn_error "DRI driver directory '$driver' doesn't exist" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: DRI driver directory '$driver' doesn't exist" >&5 +$as_echo "$as_me: error: DRI driver directory '$driver' doesn't exist" >&2;} + { (exit 1); exit 1; }; } done DRI_DIRS="$dri_drivers" ;; esac -USING_EGL=0 - - if test "$mesa_driver" = dri; then # Use TLS in GLX? if test "x$GLX_USE_TLS" = xyes; then DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS" fi - if test "x$USING_EGL" = x1; then - PROGRAM_DIRS="egl" - fi - # Platform specific settings and drivers to build case "$host_os" in linux*) @@ -6919,10 +8567,9 @@ if test "$mesa_driver" = dri; then case "$host_cpu" in x86_64) - # ffb, gamma, and sis are missing because they have not be - # converted to use the new interface. i810 are missing - # because there is no x86-64 system where they could *ever* - # be used. + # sis is missing because they have not be converted to use + # the new interface. i810 are missing because there is no + # x86-64 system where they could *ever* be used. if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \ savage tdfx unichrome swrast" @@ -6938,7 +8585,7 @@ if test "$mesa_driver" = dri; then sparc*) # Build only the drivers for cards that exist on sparc` if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="mach64 r128 r200 r300 r600 radeon ffb swrast" + DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast" fi ;; esac @@ -6954,8 +8601,6 @@ if test "$mesa_driver" = dri; then CXXFLAGS="$CXXFLAGS -ansi -pedantic" fi - # ffb and gamma are missing because they have not been converted - # to use the new interface. if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ unichrome savage sis swrast" @@ -6977,7 +8622,7 @@ if test "$mesa_driver" = dri; then # default drivers if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \ - savage sis tdfx unichrome ffb swrast" + savage sis tdfx unichrome swrast" fi DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'` @@ -6987,7 +8632,7 @@ if test "$mesa_driver" = dri; then EXPAT_LIB=-lexpat # Check whether --with-expat was given. -if test "${with_expat+set}" = set; then : +if test "${with_expat+set}" = set; then withval=$with_expat; EXPAT_INCLUDES="-I$withval/include" CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES" @@ -6996,22 +8641,160 @@ if test "${with_expat+set}" = set; then : fi - ac_fn_c_check_header_mongrel "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default" -if test "x$ac_cv_header_expat_h" = x""yes; then : + if test "${ac_cv_header_expat_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for expat.h" >&5 +$as_echo_n "checking for expat.h... " >&6; } +if test "${ac_cv_header_expat_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 +$as_echo "$ac_cv_header_expat_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking expat.h usability" >&5 +$as_echo_n "checking expat.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking expat.h presence" >&5 +$as_echo_n "checking expat.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: expat.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: expat.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: expat.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: expat.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: expat.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: expat.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: expat.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: expat.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for expat.h" >&5 +$as_echo_n "checking for expat.h... " >&6; } +if test "${ac_cv_header_expat_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_expat_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 +$as_echo "$ac_cv_header_expat_h" >&6; } +fi +if test "x$ac_cv_header_expat_h" = x""yes; then + : else - as_fn_error "Expat required for DRI." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Expat required for DRI." >&5 +$as_echo "$as_me: error: Expat required for DRI." >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML_ParserCreate in -lexpat" >&5 + +{ $as_echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5 $as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; } -if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then : +if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexpat $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -7029,18 +8812,43 @@ return XML_ParserCreate (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_expat_XML_ParserCreate=yes else - ac_cv_lib_expat_XML_ParserCreate=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_expat_XML_ParserCreate=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 $as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; } -if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then : +if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXPAT 1 _ACEOF @@ -7048,7 +8856,9 @@ _ACEOF LIBS="-lexpat $LIBS" else - as_fn_error "Expat required for DRI." "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Expat required for DRI." >&5 +$as_echo "$as_me: error: Expat required for DRI." >&2;} + { (exit 1); exit 1; }; } fi @@ -7059,13 +8869,207 @@ fi +case $DRI_DIRS in +*i915*|*i965*) + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for INTEL" >&5 +$as_echo_n "checking for INTEL... " >&6; } + +if test -n "$INTEL_CFLAGS"; then + pkg_cv_INTEL_CFLAGS="$INTEL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm_intel >= 2.4.19\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm_intel >= 2.4.19") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_INTEL_CFLAGS=`$PKG_CONFIG --cflags "libdrm_intel >= 2.4.19" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$INTEL_LIBS"; then + pkg_cv_INTEL_LIBS="$INTEL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm_intel >= 2.4.19\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm_intel >= 2.4.19") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_INTEL_LIBS=`$PKG_CONFIG --libs "libdrm_intel >= 2.4.19" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + INTEL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm_intel >= 2.4.19" 2>&1` + else + INTEL_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm_intel >= 2.4.19" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$INTEL_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements (libdrm_intel >= 2.4.19) were not met: + +$INTEL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables INTEL_CFLAGS +and INTEL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libdrm_intel >= 2.4.19) were not met: + +$INTEL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables INTEL_CFLAGS +and INTEL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables INTEL_CFLAGS +and INTEL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables INTEL_CFLAGS +and INTEL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + INTEL_CFLAGS=$pkg_cv_INTEL_CFLAGS + INTEL_LIBS=$pkg_cv_INTEL_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + ;; +esac + +case $DRI_DIRS in +*radeon*|*r200*|*r300*|*r600*) + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for LIBDRM_RADEON" >&5 +$as_echo_n "checking for LIBDRM_RADEON... " >&6; } + +if test -n "$LIBDRM_RADEON_CFLAGS"; then + pkg_cv_LIBDRM_RADEON_CFLAGS="$LIBDRM_RADEON_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon libdrm >= \$LIBDRM_RADEON_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDRM_RADEON_CFLAGS=`$PKG_CONFIG --cflags "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBDRM_RADEON_LIBS"; then + pkg_cv_LIBDRM_RADEON_LIBS="$LIBDRM_RADEON_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon libdrm >= \$LIBDRM_RADEON_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDRM_RADEON_LIBS=`$PKG_CONFIG --libs "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBDRM_RADEON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED" 2>&1` + else + LIBDRM_RADEON_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBDRM_RADEON_PKG_ERRORS" >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + HAVE_LIBDRM_RADEON=no +elif test $pkg_failed = untried; then + HAVE_LIBDRM_RADEON=no +else + LIBDRM_RADEON_CFLAGS=$pkg_cv_LIBDRM_RADEON_CFLAGS + LIBDRM_RADEON_LIBS=$pkg_cv_LIBDRM_RADEON_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_LIBDRM_RADEON=yes +fi + + if test "$HAVE_LIBDRM_RADEON" = yes; then + RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS" + RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS + fi + ;; +esac + + + + if test "$mesa_driver" = xlib; then default_gl_osmesa=yes else default_gl_osmesa=no fi # Check whether --enable-gl-osmesa was given. -if test "${enable_gl_osmesa+set}" = set; then : +if test "${enable_gl_osmesa+set}" = set; then enableval=$enable_gl_osmesa; gl_osmesa="$enableval" else gl_osmesa="$default_gl_osmesa" @@ -7073,7 +9077,9 @@ fi if test "x$gl_osmesa" = xyes; then if test "$mesa_driver" = osmesa; then - as_fn_error "libGL is not available for OSMesa driver" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: libGL is not available for OSMesa driver" >&5 +$as_echo "$as_me: error: libGL is not available for OSMesa driver" >&2;} + { (exit 1); exit 1; }; } else DRIVER_DIRS="$DRIVER_DIRS osmesa" fi @@ -7081,14 +9087,14 @@ fi # Check whether --with-osmesa-bits was given. -if test "${with_osmesa_bits+set}" = set; then : +if test "${with_osmesa_bits+set}" = set; then withval=$with_osmesa_bits; osmesa_bits="$withval" else osmesa_bits=8 fi if test "$mesa_driver" != osmesa && test "x$osmesa_bits" != x8; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring OSMesa channel bits for non-OSMesa driver" >&5 + { $as_echo "$as_me:$LINENO: WARNING: Ignoring OSMesa channel bits for non-OSMesa driver" >&5 $as_echo "$as_me: WARNING: Ignoring OSMesa channel bits for non-OSMesa driver" >&2;} osmesa_bits=8 fi @@ -7101,7 +9107,9 @@ x16|x32) DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31" ;; *) - as_fn_error "OSMesa bits '$osmesa_bits' is not a valid option" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: OSMesa bits '$osmesa_bits' is not a valid option" >&5 +$as_echo "$as_me: error: OSMesa bits '$osmesa_bits' is not a valid option" >&2;} + { (exit 1); exit 1; }; } ;; esac @@ -7136,7 +9144,7 @@ OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV" # Check whether --enable-egl was given. -if test "${enable_egl+set}" = set; then : +if test "${enable_egl+set}" = set; then enableval=$enable_egl; enable_egl="$enableval" else enable_egl=yes @@ -7144,48 +9152,51 @@ fi if test "x$enable_egl" = xyes; then SRC_DIRS="$SRC_DIRS egl" + EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread" + EGL_DRIVERS_DIRS="" + if test "$enable_static" != yes; then + # build egl_glx when libGL is built + if test "$mesa_driver" != osmesa; then + EGL_DRIVERS_DIRS="glx" + fi - if test "$x11_pkgconfig" = yes; then + # build egl_dri2 when xcb-dri2 is available pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGL" >&5 -$as_echo_n "checking for EGL... " >&6; } +{ $as_echo "$as_me:$LINENO: checking for EGL_DRI2" >&5 +$as_echo_n "checking for EGL_DRI2... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$EGL_CFLAGS"; then - pkg_cv_EGL_CFLAGS="$EGL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11") 2>&5 +if test -n "$EGL_DRI2_CFLAGS"; then + pkg_cv_EGL_DRI2_CFLAGS="$EGL_DRI2_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb-dri2 xcb-xfixes libdrm\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11-xcb xcb-dri2 xcb-xfixes libdrm") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_EGL_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_EGL_DRI2_CFLAGS=`$PKG_CONFIG --cflags "x11-xcb xcb-dri2 xcb-xfixes libdrm" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$EGL_LIBS"; then - pkg_cv_EGL_LIBS="$EGL_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 - ($PKG_CONFIG --exists --print-errors "x11") 2>&5 +if test -n "$EGL_DRI2_LIBS"; then + pkg_cv_EGL_DRI2_LIBS="$EGL_DRI2_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11-xcb xcb-dri2 xcb-xfixes libdrm\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11-xcb xcb-dri2 xcb-xfixes libdrm") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_EGL_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_EGL_DRI2_LIBS=`$PKG_CONFIG --libs "x11-xcb xcb-dri2 xcb-xfixes libdrm" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -7198,55 +9209,39 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - EGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` + EGL_DRI2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11-xcb xcb-dri2 xcb-xfixes libdrm" 2>&1` else - EGL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` + EGL_DRI2_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11-xcb xcb-dri2 xcb-xfixes libdrm" 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$EGL_PKG_ERRORS" >&5 - - as_fn_error "Package requirements (x11) were not met: - -$EGL_PKG_ERRORS + echo "$EGL_DRI2_PKG_ERRORS" >&5 -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables EGL_CFLAGS -and EGL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" "$LINENO" 5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + have_xcb_dri2=no elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables EGL_CFLAGS -and EGL_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } + have_xcb_dri2=no else - EGL_CFLAGS=$pkg_cv_EGL_CFLAGS - EGL_LIBS=$pkg_cv_EGL_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + EGL_DRI2_CFLAGS=$pkg_cv_EGL_DRI2_CFLAGS + EGL_DRI2_LIBS=$pkg_cv_EGL_DRI2_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - : + have_xcb_dri2=yes fi - EGL_LIB_DEPS="$EGL_LIBS" - else - # should check these... - EGL_LIB_DEPS="$X_LIBS -lX11" + if test "$have_xcb_dri2" = yes; then + EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS dri2" + fi + fi + + if test "$with_demos" = yes; then + PROGRAM_DIRS="$PROGRAM_DIRS egl" fi - EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS" fi + # Check whether --enable-glu was given. -if test "${enable_glu+set}" = set; then : +if test "${enable_glu+set}" = set; then enableval=$enable_glu; enable_glu="$enableval" else enable_glu=yes @@ -7299,19 +9294,19 @@ GLU_PC_LIB_PRIV="$GLU_PC_LIB_PRIV $OS_CPLUSPLUS_LIBS" # Check whether --enable-glw was given. -if test "${enable_glw+set}" = set; then : +if test "${enable_glw+set}" = set; then enableval=$enable_glw; enable_glw="$enableval" else enable_glw=yes fi if test "x$enable_glw" = xyes && test "$mesa_driver" = osmesa; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling GLw since the driver is OSMesa" >&5 + { $as_echo "$as_me:$LINENO: WARNING: Disabling GLw since the driver is OSMesa" >&5 $as_echo "$as_me: WARNING: Disabling GLw since the driver is OSMesa" >&2;} enable_glw=no fi # Check whether --enable-motif was given. -if test "${enable_motif+set}" = set; then : +if test "${enable_motif+set}" = set; then enableval=$enable_motif; enable_motif="$enableval" else enable_motif=no @@ -7323,44 +9318,40 @@ if test "x$enable_glw" = xyes; then if test "$x11_pkgconfig" = yes; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLW" >&5 +{ $as_echo "$as_me:$LINENO: checking for GLW" >&5 $as_echo_n "checking for GLW... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$GLW_CFLAGS"; then - pkg_cv_GLW_CFLAGS="$GLW_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xt\""; } >&5 +if test -n "$GLW_CFLAGS"; then + pkg_cv_GLW_CFLAGS="$GLW_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_GLW_CFLAGS=`$PKG_CONFIG --cflags "x11 xt" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$GLW_LIBS"; then - pkg_cv_GLW_LIBS="$GLW_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xt\""; } >&5 +if test -n "$GLW_LIBS"; then + pkg_cv_GLW_LIBS="$GLW_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xt\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xt") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_GLW_LIBS=`$PKG_CONFIG --libs "x11 xt" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -7373,14 +9364,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GLW_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xt"` + GLW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xt" 2>&1` else - GLW_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xt"` + GLW_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xt" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLW_PKG_ERRORS" >&5 - as_fn_error "Package requirements (x11 xt) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (x11 xt) were not met: + +$GLW_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLW_CFLAGS +and GLW_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (x11 xt) were not met: $GLW_PKG_ERRORS @@ -7390,11 +9392,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables GLW_CFLAGS and GLW_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLW_CFLAGS +and GLW_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -7403,11 +9416,12 @@ and GLW_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else GLW_CFLAGS=$pkg_cv_GLW_CFLAGS GLW_LIBS=$pkg_cv_GLW_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi @@ -7426,9 +9440,9 @@ fi GLW_SOURCES="$GLW_SOURCES GLwMDrawA.c" # Extract the first word of "motif-config", so it can be a program name with args. set dummy motif-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MOTIF_CONFIG+set}" = set; then : +if test "${ac_cv_path_MOTIF_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $MOTIF_CONFIG in @@ -7441,14 +9455,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_MOTIF_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done - done +done IFS=$as_save_IFS test -z "$ac_cv_path_MOTIF_CONFIG" && ac_cv_path_MOTIF_CONFIG="no" @@ -7457,10 +9471,10 @@ esac fi MOTIF_CONFIG=$ac_cv_path_MOTIF_CONFIG if test -n "$MOTIF_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOTIF_CONFIG" >&5 + { $as_echo "$as_me:$LINENO: result: $MOTIF_CONFIG" >&5 $as_echo "$MOTIF_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi @@ -7469,22 +9483,159 @@ fi MOTIF_CFLAGS=`$MOTIF_CONFIG --cflags` MOTIF_LIBS=`$MOTIF_CONFIG --libs` else - ac_fn_c_check_header_mongrel "$LINENO" "Xm/PrimitiveP.h" "ac_cv_header_Xm_PrimitiveP_h" "$ac_includes_default" -if test "x$ac_cv_header_Xm_PrimitiveP_h" = x""yes; then : + if test "${ac_cv_header_Xm_PrimitiveP_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for Xm/PrimitiveP.h" >&5 +$as_echo_n "checking for Xm/PrimitiveP.h... " >&6; } +if test "${ac_cv_header_Xm_PrimitiveP_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_PrimitiveP_h" >&5 +$as_echo "$ac_cv_header_Xm_PrimitiveP_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking Xm/PrimitiveP.h usability" >&5 +$as_echo_n "checking Xm/PrimitiveP.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking Xm/PrimitiveP.h presence" >&5 +$as_echo_n "checking Xm/PrimitiveP.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: Xm/PrimitiveP.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: Xm/PrimitiveP.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Xm/PrimitiveP.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: Xm/PrimitiveP.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: Xm/PrimitiveP.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: Xm/PrimitiveP.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Xm/PrimitiveP.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: Xm/PrimitiveP.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Xm/PrimitiveP.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: Xm/PrimitiveP.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Xm/PrimitiveP.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: Xm/PrimitiveP.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Xm/PrimitiveP.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: Xm/PrimitiveP.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: Xm/PrimitiveP.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: Xm/PrimitiveP.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for Xm/PrimitiveP.h" >&5 +$as_echo_n "checking for Xm/PrimitiveP.h... " >&6; } +if test "${ac_cv_header_Xm_PrimitiveP_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_Xm_PrimitiveP_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_Xm_PrimitiveP_h" >&5 +$as_echo "$ac_cv_header_Xm_PrimitiveP_h" >&6; } + +fi +if test "x$ac_cv_header_Xm_PrimitiveP_h" = x""yes; then + : else - as_fn_error "Can't locate Motif headers" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Can't locate Motif headers" >&5 +$as_echo "$as_me: error: Can't locate Motif headers" >&2;} + { (exit 1); exit 1; }; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmGetPixmap in -lXm" >&5 + { $as_echo "$as_me:$LINENO: checking for XmGetPixmap in -lXm" >&5 $as_echo_n "checking for XmGetPixmap in -lXm... " >&6; } -if test "${ac_cv_lib_Xm_XmGetPixmap+set}" = set; then : +if test "${ac_cv_lib_Xm_XmGetPixmap+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXm $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -7502,21 +9653,48 @@ return XmGetPixmap (); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_Xm_XmGetPixmap=yes else - ac_cv_lib_Xm_XmGetPixmap=no + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xm_XmGetPixmap=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xm_XmGetPixmap" >&5 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xm_XmGetPixmap" >&5 $as_echo "$ac_cv_lib_Xm_XmGetPixmap" >&6; } -if test "x$ac_cv_lib_Xm_XmGetPixmap" = x""yes; then : +if test "x$ac_cv_lib_Xm_XmGetPixmap" = x""yes; then MOTIF_LIBS="-lXm" else - as_fn_error "Can't locate Motif Xm library" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: Can't locate Motif Xm library" >&5 +$as_echo "$as_me: error: Can't locate Motif Xm library" >&2;} + { (exit 1); exit 1; }; } fi fi @@ -7551,7 +9729,7 @@ else default_glut=no fi # Check whether --enable-glut was given. -if test "${enable_glut+set}" = set; then : +if test "${enable_glut+set}" = set; then enableval=$enable_glut; enable_glut="$enableval" else enable_glut="$default_glut" @@ -7559,12 +9737,12 @@ fi if test "x$enable_glu$enable_glut" = xnoyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling glut since GLU is disabled" >&5 + { $as_echo "$as_me:$LINENO: WARNING: Disabling glut since GLU is disabled" >&5 $as_echo "$as_me: WARNING: Disabling glut since GLU is disabled" >&2;} enable_glut=no fi if test "x$enable_glut" = xyes && test "$mesa_driver" = osmesa; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling glut since the driver is OSMesa" >&5 + { $as_echo "$as_me:$LINENO: WARNING: Disabling glut since the driver is OSMesa" >&5 $as_echo "$as_me: WARNING: Disabling glut since the driver is OSMesa" >&2;} enable_glut=no fi @@ -7578,44 +9756,40 @@ if test "x$enable_glut" = xyes; then if test "$x11_pkgconfig" = yes; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLUT" >&5 +{ $as_echo "$as_me:$LINENO: checking for GLUT" >&5 $as_echo_n "checking for GLUT... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$GLUT_CFLAGS"; then - pkg_cv_GLUT_CFLAGS="$GLUT_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xmu xi\""; } >&5 +if test -n "$GLUT_CFLAGS"; then + pkg_cv_GLUT_CFLAGS="$GLUT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmu xi\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmu xi") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_GLUT_CFLAGS=`$PKG_CONFIG --cflags "x11 xmu xi" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$GLUT_LIBS"; then - pkg_cv_GLUT_LIBS="$GLUT_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11 xmu xi\""; } >&5 +if test -n "$GLUT_LIBS"; then + pkg_cv_GLUT_LIBS="$GLUT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xmu xi\"") >&5 ($PKG_CONFIG --exists --print-errors "x11 xmu xi") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_GLUT_LIBS=`$PKG_CONFIG --libs "x11 xmu xi" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -7628,14 +9802,25 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GLUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xmu xi"` + GLUT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xmu xi" 2>&1` else - GLUT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xmu xi"` + GLUT_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xmu xi" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLUT_PKG_ERRORS" >&5 - as_fn_error "Package requirements (x11 xmu xi) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (x11 xmu xi) were not met: + +$GLUT_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables GLUT_CFLAGS +and GLUT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (x11 xmu xi) were not met: $GLUT_PKG_ERRORS @@ -7645,11 +9830,22 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables GLUT_CFLAGS and GLUT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" "$LINENO" 5 +" >&2;} + { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "The pkg-config script could not be found or is too old. Make sure it +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables GLUT_CFLAGS +and GLUT_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -7658,11 +9854,12 @@ and GLUT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else GLUT_CFLAGS=$pkg_cv_GLUT_CFLAGS GLUT_LIBS=$pkg_cv_GLUT_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi @@ -7715,7 +9912,7 @@ fi # Check whether --enable-gallium was given. -if test "${enable_gallium+set}" = set; then : +if test "${enable_gallium+set}" = set; then enableval=$enable_gallium; enable_gallium="$enableval" else enable_gallium=yes @@ -7727,7 +9924,7 @@ fi # Check whether --with-state-trackers was given. -if test "${with_state_trackers+set}" = set; then : +if test "${with_state_trackers+set}" = set; then withval=$with_state_trackers; with_state_trackers="$withval" else with_state_trackers=yes @@ -7752,44 +9949,40 @@ yes) # Have only tested st/xorg on 1.6.0 servers pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XORG" >&5 +{ $as_echo "$as_me:$LINENO: checking for XORG" >&5 $as_echo_n "checking for XORG... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XORG_CFLAGS"; then - pkg_cv_XORG_CFLAGS="$XORG_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.6.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.6.0") 2>&5 +if test -n "$XORG_CFLAGS"; then + pkg_cv_XORG_CFLAGS="$XORG_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.6.0 libdrm >= \$LIBDRM_XORG_REQUIRED libkms >= \$LIBKMS_XORG_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.6.0" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XORG_LIBS"; then - pkg_cv_XORG_LIBS="$XORG_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.6.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.6.0") 2>&5 +if test -n "$XORG_LIBS"; then + pkg_cv_XORG_LIBS="$XORG_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.6.0 libdrm >= \$LIBDRM_XORG_REQUIRED libkms >= \$LIBKMS_XORG_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.6.0" 2>/dev/null` + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -7802,79 +9995,313 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xorg-server >= 1.6.0"` + XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED" 2>&1` else - XORG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xorg-server >= 1.6.0"` + XORG_PKG_ERRORS=`$PKG_CONFIG --print-errors "xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XORG_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_XORG="no" elif test $pkg_failed = untried; then - HAVE_XORG="no" + HAVE_XORG="no" +else + XORG_CFLAGS=$pkg_cv_XORG_CFLAGS + XORG_LIBS=$pkg_cv_XORG_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg" +fi + ;; + esac + ;; +*) + # verify the requested state tracker exist + state_trackers=`IFS=', '; echo $with_state_trackers` + for tracker in $state_trackers; do + test -d "$srcdir/src/gallium/state_trackers/$tracker" || \ + { { $as_echo "$as_me:$LINENO: error: state tracker '$tracker' doesn't exist" >&5 +$as_echo "$as_me: error: state tracker '$tracker' doesn't exist" >&2;} + { (exit 1); exit 1; }; } + + case "$tracker" in + egl) + if test "x$enable_egl" != xyes; then + { { $as_echo "$as_me:$LINENO: error: cannot build egl state tracker without EGL library" >&5 +$as_echo "$as_me: error: cannot build egl state tracker without EGL library" >&2;} + { (exit 1); exit 1; }; } + fi + ;; + xorg) + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for LIBDRM_XORG" >&5 +$as_echo_n "checking for LIBDRM_XORG... " >&6; } + +if test -n "$LIBDRM_XORG_CFLAGS"; then + pkg_cv_LIBDRM_XORG_CFLAGS="$LIBDRM_XORG_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_XORG_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm >= $LIBDRM_XORG_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDRM_XORG_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= $LIBDRM_XORG_REQUIRED" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBDRM_XORG_LIBS"; then + pkg_cv_LIBDRM_XORG_LIBS="$LIBDRM_XORG_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= \$LIBDRM_XORG_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm >= $LIBDRM_XORG_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBDRM_XORG_LIBS=`$PKG_CONFIG --libs "libdrm >= $LIBDRM_XORG_REQUIRED" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBDRM_XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm >= $LIBDRM_XORG_REQUIRED" 2>&1` + else + LIBDRM_XORG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm >= $LIBDRM_XORG_REQUIRED" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBDRM_XORG_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements (libdrm >= $LIBDRM_XORG_REQUIRED) were not met: + +$LIBDRM_XORG_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBDRM_XORG_CFLAGS +and LIBDRM_XORG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libdrm >= $LIBDRM_XORG_REQUIRED) were not met: + +$LIBDRM_XORG_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBDRM_XORG_CFLAGS +and LIBDRM_XORG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBDRM_XORG_CFLAGS +and LIBDRM_XORG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBDRM_XORG_CFLAGS +and LIBDRM_XORG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +else + LIBDRM_XORG_CFLAGS=$pkg_cv_LIBDRM_XORG_CFLAGS + LIBDRM_XORG_LIBS=$pkg_cv_LIBDRM_XORG_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for LIBKMS_XORG" >&5 +$as_echo_n "checking for LIBKMS_XORG... " >&6; } + +if test -n "$LIBKMS_XORG_CFLAGS"; then + pkg_cv_LIBKMS_XORG_CFLAGS="$LIBKMS_XORG_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libkms >= \$LIBKMS_XORG_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "libkms >= $LIBKMS_XORG_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBKMS_XORG_CFLAGS=`$PKG_CONFIG --cflags "libkms >= $LIBKMS_XORG_REQUIRED" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBKMS_XORG_LIBS"; then + pkg_cv_LIBKMS_XORG_LIBS="$LIBKMS_XORG_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libkms >= \$LIBKMS_XORG_REQUIRED\"") >&5 + ($PKG_CONFIG --exists --print-errors "libkms >= $LIBKMS_XORG_REQUIRED") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBKMS_XORG_LIBS=`$PKG_CONFIG --libs "libkms >= $LIBKMS_XORG_REQUIRED" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBKMS_XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libkms >= $LIBKMS_XORG_REQUIRED" 2>&1` + else + LIBKMS_XORG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libkms >= $LIBKMS_XORG_REQUIRED" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBKMS_XORG_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements (libkms >= $LIBKMS_XORG_REQUIRED) were not met: + +$LIBKMS_XORG_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBKMS_XORG_CFLAGS +and LIBKMS_XORG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements (libkms >= $LIBKMS_XORG_REQUIRED) were not met: + +$LIBKMS_XORG_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBKMS_XORG_CFLAGS +and LIBKMS_XORG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBKMS_XORG_CFLAGS +and LIBKMS_XORG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBKMS_XORG_CFLAGS +and LIBKMS_XORG_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } else - XORG_CFLAGS=$pkg_cv_XORG_CFLAGS - XORG_LIBS=$pkg_cv_XORG_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + LIBKMS_XORG_CFLAGS=$pkg_cv_LIBKMS_XORG_CFLAGS + LIBKMS_XORG_LIBS=$pkg_cv_LIBKMS_XORG_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg" + : fi - ;; - esac + HAVE_XORG="yes" + ;; + es) + # mesa/es is required to build es state tracker + CORE_DIRS="$CORE_DIRS mesa/es" + ;; + esac + done + GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" ;; -*) - # verify the requested state tracker exist - state_trackers=`IFS=', '; echo $with_state_trackers` - for tracker in $state_trackers; do - test -d "$srcdir/src/gallium/state_trackers/$tracker" || \ - as_fn_error "state tracker '$tracker' doesn't exist" "$LINENO" 5 +esac - if test "$tracker" = egl && test "x$enable_egl" != xyes; then - as_fn_error "cannot build egl state tracker without EGL library" "$LINENO" 5 - fi - if test "$tracker" = xorg; then +if test "x$HAVE_XORG" = xyes; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5 +{ $as_echo "$as_me:$LINENO: checking for XEXT" >&5 $as_echo_n "checking for XEXT... " >&6; } -if test -n "$PKG_CONFIG"; then - if test -n "$XEXT_CFLAGS"; then - pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5 +if test -n "$XEXT_CFLAGS"; then + pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\"") >&5 ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags "xextproto >= 7.0.99.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi -if test -n "$PKG_CONFIG"; then - if test -n "$XEXT_LIBS"; then - pkg_cv_XEXT_LIBS="$XEXT_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5 +if test -n "$XEXT_LIBS"; then + pkg_cv_XEXT_LIBS="$XEXT_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\"") >&5 ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs "xextproto >= 7.0.99.1" 2>/dev/null` else pkg_failed=yes fi - fi -else - pkg_failed=untried + else + pkg_failed=untried fi @@ -7887,14 +10314,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xextproto >= 7.0.99.1"` + XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xextproto >= 7.0.99.1" 2>&1` else - XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xextproto >= 7.0.99.1"` + XEXT_PKG_ERRORS=`$PKG_CONFIG --print-errors "xextproto >= 7.0.99.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XEXT_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } HAVE_XEXTPROTO_71="no" elif test $pkg_failed = untried; then @@ -7902,19 +10329,60 @@ elif test $pkg_failed = untried; then else XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS XEXT_LIBS=$pkg_cv_XEXT_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71" fi - fi +fi + + +# Check whether --with-egl-displays was given. +if test "${with_egl_displays+set}" = set; then + withval=$with_egl_displays; with_egl_displays="$withval" +else + with_egl_displays=yes +fi + + +EGL_DISPLAYS="" +case "$with_egl_displays" in +yes) + if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then + EGL_DISPLAYS="x11" + fi + ;; +*) + if test "x$enable_egl" != xyes; then + { { $as_echo "$as_me:$LINENO: error: cannot build egl state tracker without EGL library" >&5 +$as_echo "$as_me: error: cannot build egl state tracker without EGL library" >&2;} + { (exit 1); exit 1; }; } + fi + # verify the requested driver directories exist + egl_displays=`IFS=', '; echo $with_egl_displays` + for dpy in $egl_displays; do + test -d "$srcdir/src/gallium/state_trackers/egl/$dpy" || \ + { { $as_echo "$as_me:$LINENO: error: EGL display '$dpy' does't exist" >&5 +$as_echo "$as_me: error: EGL display '$dpy' does't exist" >&2;} + { (exit 1); exit 1; }; } done - GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" + EGL_DISPLAYS="$egl_displays" ;; esac + +# Check whether --with-egl-driver-dir was given. +if test "${with_egl_driver_dir+set}" = set; then + withval=$with_egl_driver_dir; EGL_DRIVER_INSTALL_DIR="$withval" +else + EGL_DRIVER_INSTALL_DIR='${libdir}/egl' +fi + + + + # Check whether --with-xorg-driver-dir was given. -if test "${with_xorg_driver_dir+set}" = set; then : +if test "${with_xorg_driver_dir+set}" = set; then withval=$with_xorg_driver_dir; XORG_DRIVER_INSTALL_DIR="$withval" else XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers" @@ -7924,29 +10392,31 @@ fi # Check whether --with-max-width was given. -if test "${with_max_width+set}" = set; then : +if test "${with_max_width+set}" = set; then withval=$with_max_width; DEFINES="${DEFINES} -DMAX_WIDTH=${withval}"; - if test "${withval}" -gt "4096"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Large framebuffer: see s_tritemp.h comments." >&5 + if test "${withval}" -gt "4096"; then + { $as_echo "$as_me:$LINENO: WARNING: Large framebuffer: see s_tritemp.h comments." >&5 $as_echo "$as_me: WARNING: Large framebuffer: see s_tritemp.h comments." >&2;} fi + fi # Check whether --with-max-height was given. -if test "${with_max_height+set}" = set; then : +if test "${with_max_height+set}" = set; then withval=$with_max_height; DEFINES="${DEFINES} -DMAX_HEIGHT=${withval}"; - if test "${withval}" -gt "4096"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Large framebuffer: see s_tritemp.h comments." >&5 + if test "${withval}" -gt "4096"; then + { $as_echo "$as_me:$LINENO: WARNING: Large framebuffer: see s_tritemp.h comments." >&5 $as_echo "$as_me: WARNING: Large framebuffer: see s_tritemp.h comments." >&2;} fi + fi # Check whether --enable-gallium-svga was given. -if test "${enable_gallium_svga+set}" = set; then : +if test "${enable_gallium_svga+set}" = set; then enableval=$enable_gallium_svga; enable_gallium_svga="$enableval" else enable_gallium_svga=auto @@ -7960,33 +10430,35 @@ elif test "x$enable_gallium_svga" = xauto; then fi # Check whether --enable-gallium-intel was given. -if test "${enable_gallium_intel+set}" = set; then : +if test "${enable_gallium_intel+set}" = set; then enableval=$enable_gallium_intel; enable_gallium_intel="$enableval" else enable_gallium_intel=auto fi if test "x$enable_gallium_intel" = xyes; then - GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel" - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" + GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel i965" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965" elif test "x$enable_gallium_intel" = xauto; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965" fi # Check whether --enable-gallium-radeon was given. -if test "${enable_gallium_radeon+set}" = set; then : +if test "${enable_gallium_radeon+set}" = set; then enableval=$enable_gallium_radeon; enable_gallium_radeon="$enableval" else - enable_gallium_radeon=no + enable_gallium_radeon=auto fi if test "x$enable_gallium_radeon" = xyes; then GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS radeon" GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" +elif test "x$enable_gallium_radeon" = xauto; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" fi # Check whether --enable-gallium-nouveau was given. -if test "${enable_gallium_nouveau+set}" = set; then : +if test "${enable_gallium_nouveau+set}" = set; then enableval=$enable_gallium_nouveau; enable_gallium_nouveau="$enableval" else enable_gallium_nouveau=no @@ -7994,9 +10466,21 @@ fi if test "x$enable_gallium_nouveau" = xyes; then GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS nouveau" - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv04 nv10 nv20 nv30 nv40 nv50" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv40 nv50" +fi + +# Check whether --enable-gallium-swrast was given. +if test "${enable_gallium_swrast+set}" = set; then + enableval=$enable_gallium_swrast; enable_gallium_swrast="$enableval" +else + enable_gallium_swrast=auto +fi + +if test "x$enable_gallium_swrast" = xyes; then + GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS swrast" fi +SRC_DIRS="$CORE_DIRS $SRC_DIRS" LDFLAGS="$_SAVE_LDFLAGS" CPPFLAGS="$_SAVE_CPPFLAGS" @@ -8034,13 +10518,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; + *) $as_unset $ac_var ;; esac ;; esac done @@ -8048,8 +10532,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -8072,11 +10556,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -8132,8 +10616,8 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -8145,10 +10629,9 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -8158,18 +10641,17 @@ cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false - SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -8177,15 +10659,23 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; esac + fi + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + as_nl=' ' export as_nl @@ -8193,13 +10683,7 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -8210,7 +10694,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in #( + case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -8233,6 +10717,13 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -8242,15 +10733,15 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in #(( +case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done IFS=$as_save_IFS ;; @@ -8262,16 +10753,12 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 + { (exit 1); exit 1; } fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' @@ -8283,89 +10770,7 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. -as_fn_error () -{ - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 - fi - $as_echo "$as_me: error: $1" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - +# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -8379,12 +10784,8 @@ else as_basename=false fi -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -8404,25 +10805,76 @@ $as_echo X/"$0" | } s/.*/./; q'` -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( +case `echo -n x` in -n*) - case `echo 'xy\c'` in + case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; + *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -8451,56 +10903,8 @@ fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" - - -} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' + as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -8519,10 +10923,10 @@ else if test -d "$1"; then test -d "$1/."; else - case $1 in #( + case $1 in -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -8537,19 +10941,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Mesa $as_me 7.7.0, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by Mesa $as_me 7.8.0, which was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -8577,15 +10975,13 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. +\`$as_me' instantiates files from templates according to the +current configuration. -Usage: $0 [OPTION]... [TAG]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files @@ -8599,17 +10995,16 @@ $config_files Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Mesa config.status 7.7.0 -configured by $0, generated by GNU Autoconf 2.65, - with options \\"\$ac_cs_config\\" +Mesa config.status 7.8.0 +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -8643,8 +11038,6 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) @@ -8652,7 +11045,7 @@ do case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - as_fn_append CONFIG_FILES " '$ac_optarg'" + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -8661,10 +11054,11 @@ do ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; - *) as_fn_append ac_config_targets " $1" + *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac @@ -8713,7 +11107,9 @@ do "configs/autoconf") CONFIG_FILES="$CONFIG_FILES configs/autoconf" ;; "configs") CONFIG_COMMANDS="$CONFIG_COMMANDS configs" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; esac done @@ -8739,7 +11135,7 @@ $debug || trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap 'as_fn_exit 1' 1 2 13 15 + trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -8750,7 +11146,11 @@ $debug || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -8758,16 +11158,10 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi +ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi @@ -8781,18 +11175,24 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -8814,7 +11214,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\)..*/\1/ +s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -8828,7 +11228,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\)..*/\1/ +s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -8881,7 +11281,9 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), @@ -8912,7 +11314,9 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -8940,10 +11344,12 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" + ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -8954,7 +11360,7 @@ do `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -8967,7 +11373,9 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; esac @@ -8995,7 +11403,47 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in @@ -9047,6 +11495,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= + ac_sed_dataroot=' /datarootdir/ { p @@ -9056,11 +11505,12 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p' +/@mandir@/p +' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -9070,7 +11520,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -9098,12 +11548,14 @@ s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} @@ -9113,11 +11565,13 @@ which seems to be undefined. Please make sure it is defined." >&2;} -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -9135,12 +11589,15 @@ ln -s autoconf configs/current done # for ac_tag -as_fn_exit 0 +{ (exit 0); exit 0; } _ACEOF +chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. @@ -9161,10 +11618,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -9200,7 +11657,6 @@ if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then echo " Gallium dirs: $GALLIUM_DIRS" echo " Winsys dirs: $GALLIUM_WINSYS_DIRS" echo " Winsys drm dirs:$GALLIUM_WINSYS_DRM_DIRS" - echo " Auxiliary dirs: $GALLIUM_AUXILIARY_DIRS" echo " Driver dirs: $GALLIUM_DRIVERS_DIRS" echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS" else @@ -9210,7 +11666,11 @@ fi echo "" echo " Shared libs: $enable_shared" echo " Static libs: $enable_static" -echo " EGL: $enable_egl" +if test "$enable_egl" = yes; then + echo " EGL: $EGL_DRIVERS_DIRS" +else + echo " EGL: no" +fi echo " GLU: $enable_glu" echo " GLw: $enable_glw (Motif: $enable_motif)" echo " glut: $enable_glut" diff --git a/mesalib/configure.ac b/mesalib/configure.ac index a15ca111e..61487c390 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -20,7 +20,10 @@ AC_CANONICAL_HOST dnl Versions for external dependencies LIBDRM_REQUIRED=2.4.15 LIBDRM_RADEON_REQUIRED=2.4.17 -DRI2PROTO_REQUIRED=1.99.3 +DRI2PROTO_REQUIRED=2.1 +GLPROTO_REQUIRED=1.4.11 +LIBDRM_XORG_REQUIRED=2.4.17 +LIBKMS_XORG_REQUIRED=1.0.0 dnl Check for progs AC_PROG_CPP @@ -45,6 +48,28 @@ solaris*) ;; esac +dnl If we're using GCC, make sure that it is at least version 3.3.0. Older +dnl versions are explictly not supported. +if test "x$GCC" = xyes; then + AC_MSG_CHECKING([whether gcc version is sufficient]) + major=0 + minor=0 + + GCC_VERSION=`$CC -dumpversion` + if test $? -eq 0; then + major=`echo $GCC_VERSION | cut -d. -f1` + minor=`echo $GCC_VERSION | cut -d. -f1` + fi + + if test $major -lt 3 -o $major -eq 3 -a $minor -lt 3 ; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([If using GCC, version 3.3.0 or later is required.]) + else + AC_MSG_RESULT([yes]) + fi +fi + + MKDEP_OPTIONS=-fdepend dnl Ask gcc where it's keeping its secret headers if test "x$GCC" = xyes; then @@ -91,12 +116,22 @@ linux*|*-gnu*|gnu*) solaris*) DEFINES="$DEFINES -DPTHREADS -DSVR4" ;; +cygwin*) + DEFINES="$DEFINES -DPTHREADS" + ;; esac dnl Add flags for gcc and g++ if test "x$GCC" = xyes; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99 -ffast-math" + # Enable -fvisibility=hidden if using a gcc that supports it + save_CFLAGS="$CFLAGS" + AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) + CFLAGS="$CFLAGS -fvisibility=hidden" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), + [CFLAGS="$save_CFLAGS" ; AC_MSG_RESULT([no])]); + # Work around aliasing bugs - developers should comment this out CFLAGS="$CFLAGS -fno-strict-aliasing" fi @@ -243,24 +278,28 @@ GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION} GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION} GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION} OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION} +EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION} GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*' GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*' GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*' GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*' OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*' +EGL_LIB_GLOB='lib$(EGL_LIB).*'${LIB_EXTENSION}'*' AC_SUBST([GL_LIB_NAME]) AC_SUBST([GLU_LIB_NAME]) AC_SUBST([GLUT_LIB_NAME]) AC_SUBST([GLW_LIB_NAME]) AC_SUBST([OSMESA_LIB_NAME]) +AC_SUBST([EGL_LIB_NAME]) AC_SUBST([GL_LIB_GLOB]) AC_SUBST([GLU_LIB_GLOB]) AC_SUBST([GLUT_LIB_GLOB]) AC_SUBST([GLW_LIB_GLOB]) AC_SUBST([OSMESA_LIB_GLOB]) +AC_SUBST([EGL_LIB_GLOB]) dnl dnl Arch/platform-specific settings @@ -380,7 +419,7 @@ fi dnl dnl Driver configuration. Options are xlib, dri and osmesa right now. -dnl More later: directfb, fbdev, ... +dnl More later: fbdev, ... dnl default_driver="xlib" @@ -414,13 +453,16 @@ esac dnl dnl Driver specific build directories dnl -SRC_DIRS="mesa glew" + +dnl this variable will be prepended to SRC_DIRS and is not exported +CORE_DIRS="glsl mesa" + +SRC_DIRS="glew" GLU_DIRS="sgi" WINDOW_SYSTEM="" GALLIUM_DIRS="auxiliary drivers state_trackers" GALLIUM_WINSYS_DIRS="" GALLIUM_WINSYS_DRM_DIRS="" -GALLIUM_AUXILIARY_DIRS="rbug draw translate cso_cache pipebuffer tgsi sct rtasm util indices vl" GALLIUM_DRIVERS_DIRS="softpipe failover trace identity" GALLIUM_STATE_TRACKERS_DIRS="" @@ -430,7 +472,7 @@ xlib) GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS xlib" ;; dri) - SRC_DIRS="glx/x11 $SRC_DIRS" + SRC_DIRS="$SRC_DIRS glx" DRIVER_DIRS="dri" WINDOW_SYSTEM="dri" GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS drm" @@ -447,10 +489,7 @@ AC_SUBST([GALLIUM_DIRS]) AC_SUBST([GALLIUM_WINSYS_DIRS]) AC_SUBST([GALLIUM_WINSYS_DRM_DIRS]) AC_SUBST([GALLIUM_DRIVERS_DIRS]) -AC_SUBST([GALLIUM_AUXILIARY_DIRS]) AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS]) -AC_SUBST([RADEON_CFLAGS]) -AC_SUBST([RADEON_LDFLAGS]) dnl dnl User supplied program configuration @@ -575,16 +614,10 @@ dri) # Check for libdrm PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) - GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" + PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED]) + GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED" DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" - PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no) - - if test "$HAVE_LIBDRM_RADEON" = yes; then - RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS" - RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS - fi - # find the DRI deps for libGL if test "$x11_pkgconfig" = yes; then # add xcb modules if necessary @@ -693,10 +726,6 @@ yes) ;; esac -dnl Just default to no EGL for now -USING_EGL=0 -AC_SUBST([USING_EGL]) - dnl Set DRI_DIRS, DEFINES and LIB_DEPS if test "$mesa_driver" = dri; then # Use TLS in GLX? @@ -704,10 +733,6 @@ if test "$mesa_driver" = dri; then DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS" fi - if test "x$USING_EGL" = x1; then - PROGRAM_DIRS="egl" - fi - # Platform specific settings and drivers to build case "$host_os" in linux*) @@ -719,10 +744,9 @@ if test "$mesa_driver" = dri; then case "$host_cpu" in x86_64) - # ffb, gamma, and sis are missing because they have not be - # converted to use the new interface. i810 are missing - # because there is no x86-64 system where they could *ever* - # be used. + # sis is missing because they have not be converted to use + # the new interface. i810 are missing because there is no + # x86-64 system where they could *ever* be used. if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \ savage tdfx unichrome swrast" @@ -738,7 +762,7 @@ if test "$mesa_driver" = dri; then sparc*) # Build only the drivers for cards that exist on sparc` if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="mach64 r128 r200 r300 r600 radeon ffb swrast" + DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast" fi ;; esac @@ -754,8 +778,6 @@ if test "$mesa_driver" = dri; then CXXFLAGS="$CXXFLAGS -ansi -pedantic" fi - # ffb and gamma are missing because they have not been converted - # to use the new interface. if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ unichrome savage sis swrast" @@ -777,7 +799,7 @@ if test "$mesa_driver" = dri; then # default drivers if test "x$DRI_DIRS" = "xyes"; then DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \ - savage sis tdfx unichrome ffb swrast" + savage sis tdfx unichrome swrast" fi DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'` @@ -804,6 +826,29 @@ AC_SUBST([DRI_DIRS]) AC_SUBST([EXPAT_INCLUDES]) AC_SUBST([DRI_LIB_DEPS]) +case $DRI_DIRS in +*i915*|*i965*) + PKG_CHECK_MODULES([INTEL], [libdrm_intel >= 2.4.19]) + ;; +esac + +case $DRI_DIRS in +*radeon*|*r200*|*r300*|*r600*) + PKG_CHECK_MODULES([LIBDRM_RADEON], + [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED], + HAVE_LIBDRM_RADEON=yes, + HAVE_LIBDRM_RADEON=no) + + if test "$HAVE_LIBDRM_RADEON" = yes; then + RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS" + RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS + fi + ;; +esac +AC_SUBST([RADEON_CFLAGS]) +AC_SUBST([RADEON_LDFLAGS]) + + dnl dnl OSMesa configuration dnl @@ -888,17 +933,28 @@ AC_ARG_ENABLE([egl], [enable_egl=yes]) if test "x$enable_egl" = xyes; then SRC_DIRS="$SRC_DIRS egl" + EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread" + EGL_DRIVERS_DIRS="" + if test "$enable_static" != yes; then + # build egl_glx when libGL is built + if test "$mesa_driver" != osmesa; then + EGL_DRIVERS_DIRS="glx" + fi - if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([EGL], [x11]) - EGL_LIB_DEPS="$EGL_LIBS" - else - # should check these... - EGL_LIB_DEPS="$X_LIBS -lX11" + # build egl_dri2 when xcb-dri2 is available + PKG_CHECK_MODULES([EGL_DRI2], [x11-xcb xcb-dri2 xcb-xfixes libdrm], + [have_xcb_dri2=yes],[have_xcb_dri2=no]) + if test "$have_xcb_dri2" = yes; then + EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS dri2" + fi + fi + + if test "$with_demos" = yes; then + PROGRAM_DIRS="$PROGRAM_DIRS egl" fi - EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS" fi AC_SUBST([EGL_LIB_DEPS]) +AC_SUBST([EGL_DRIVERS_DIRS]) dnl dnl GLU configuration @@ -1149,7 +1205,7 @@ yes) GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl" fi # Have only tested st/xorg on 1.6.0 servers - PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0], + PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED], HAVE_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg", HAVE_XORG="no") ;; @@ -1162,19 +1218,69 @@ yes) test -d "$srcdir/src/gallium/state_trackers/$tracker" || \ AC_MSG_ERROR([state tracker '$tracker' doesn't exist]) - if test "$tracker" = egl && test "x$enable_egl" != xyes; then - AC_MSG_ERROR([cannot build egl state tracker without EGL library]) - fi - if test "$tracker" = xorg; then - PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], - HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71", - HAVE_XEXTPROTO_71="no") - fi + case "$tracker" in + egl) + if test "x$enable_egl" != xyes; then + AC_MSG_ERROR([cannot build egl state tracker without EGL library]) + fi + ;; + xorg) + PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED]) + PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED]) + HAVE_XORG="yes" + ;; + es) + # mesa/es is required to build es state tracker + CORE_DIRS="$CORE_DIRS mesa/es" + ;; + esac done GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" ;; esac +if test "x$HAVE_XORG" = xyes; then + PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], + HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71", + HAVE_XEXTPROTO_71="no") +fi + +AC_ARG_WITH([egl-displays], + [AS_HELP_STRING([--with-egl-displays@<:@=DIRS...@:>@], + [comma delimited native displays libEGL supports, e.g. + "x11,kms" @<:@default=auto@:>@])], + [with_egl_displays="$withval"], + [with_egl_displays=yes]) + +EGL_DISPLAYS="" +case "$with_egl_displays" in +yes) + if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then + EGL_DISPLAYS="x11" + fi + ;; +*) + if test "x$enable_egl" != xyes; then + AC_MSG_ERROR([cannot build egl state tracker without EGL library]) + fi + # verify the requested driver directories exist + egl_displays=`IFS=', '; echo $with_egl_displays` + for dpy in $egl_displays; do + test -d "$srcdir/src/gallium/state_trackers/egl/$dpy" || \ + AC_MSG_ERROR([EGL display '$dpy' does't exist]) + done + EGL_DISPLAYS="$egl_displays" + ;; +esac +AC_SUBST([EGL_DISPLAYS]) + +AC_ARG_WITH([egl-driver-dir], + [AS_HELP_STRING([--with-egl-driver-dir=DIR], + [directory for EGL drivers [[default=${libdir}/egl]]])], + [EGL_DRIVER_INSTALL_DIR="$withval"], + [EGL_DRIVER_INSTALL_DIR='${libdir}/egl']) +AC_SUBST([EGL_DRIVER_INSTALL_DIR]) + AC_ARG_WITH([xorg-driver-dir], [AS_HELP_STRING([--with-xorg-driver-dir=DIR], [Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])], @@ -1221,10 +1327,10 @@ AC_ARG_ENABLE([gallium-intel], [enable_gallium_intel="$enableval"], [enable_gallium_intel=auto]) if test "x$enable_gallium_intel" = xyes; then - GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel" - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" + GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel i965" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965" elif test "x$enable_gallium_intel" = xauto; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965" fi dnl @@ -1234,10 +1340,12 @@ AC_ARG_ENABLE([gallium-radeon], [AS_HELP_STRING([--enable-gallium-radeon], [build gallium radeon @<:@default=disabled@:>@])], [enable_gallium_radeon="$enableval"], - [enable_gallium_radeon=no]) + [enable_gallium_radeon=auto]) if test "x$enable_gallium_radeon" = xyes; then GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS radeon" GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" +elif test "x$enable_gallium_radeon" = xauto; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" fi dnl @@ -1250,9 +1358,23 @@ AC_ARG_ENABLE([gallium-nouveau], [enable_gallium_nouveau=no]) if test "x$enable_gallium_nouveau" = xyes; then GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS nouveau" - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv04 nv10 nv20 nv30 nv40 nv50" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nv30 nv40 nv50" fi +dnl +dnl Gallium swrast configuration +dnl +AC_ARG_ENABLE([gallium-swrast], + [AS_HELP_STRING([--enable-gallium-swrast], + [build gallium swrast @<:@default=disabled@:>@])], + [enable_gallium_swrast="$enableval"], + [enable_gallium_swrast=auto]) +if test "x$enable_gallium_swrast" = xyes; then + GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS swrast" +fi + +dnl prepend CORE_DIRS to SRC_DIRS +SRC_DIRS="$CORE_DIRS $SRC_DIRS" dnl Restore LDFLAGS and CPPFLAGS LDFLAGS="$_SAVE_LDFLAGS" @@ -1306,7 +1428,6 @@ if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then echo " Gallium dirs: $GALLIUM_DIRS" echo " Winsys dirs: $GALLIUM_WINSYS_DIRS" echo " Winsys drm dirs:$GALLIUM_WINSYS_DRM_DIRS" - echo " Auxiliary dirs: $GALLIUM_AUXILIARY_DIRS" echo " Driver dirs: $GALLIUM_DRIVERS_DIRS" echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS" else @@ -1317,7 +1438,11 @@ dnl Libraries echo "" echo " Shared libs: $enable_shared" echo " Static libs: $enable_static" -echo " EGL: $enable_egl" +if test "$enable_egl" = yes; then + echo " EGL: $EGL_DRIVERS_DIRS" +else + echo " EGL: no" +fi echo " GLU: $enable_glu" echo " GLw: $enable_glw (Motif: $enable_motif)" echo " glut: $enable_glut" diff --git a/mesalib/docs/MESA_swap_control.spec b/mesalib/docs/MESA_swap_control.spec index ecc674649..856978b53 100644 --- a/mesalib/docs/MESA_swap_control.spec +++ b/mesalib/docs/MESA_swap_control.spec @@ -43,7 +43,7 @@ Issues New Procedures and Functions - int glXSwapIntervalMESA(int interval) + int glXSwapIntervalMESA(unsigned int interval) int glXGetSwapIntervalMESA(void) New Tokens @@ -103,11 +103,8 @@ Additions to the GLX 1.3 Specification Errors - glXSwapIntervalMESA returns GLX_BAD_VALUE if parameter is - less than zero. - glXSwapIntervalMESA returns GLX_BAD_CONTEXT if there is no current - GLXContext. + GLXContext or if the current context is not a direct rendering context. GLX Protocol diff --git a/mesalib/docs/MiniGLX.html b/mesalib/docs/MiniGLX.html deleted file mode 100644 index e7ebae685..000000000 --- a/mesalib/docs/MiniGLX.html +++ /dev/null @@ -1,534 +0,0 @@ - - - - Mini GLX Specification - - -

-
Mini GLX Specification
-

-

-
Tungsten Graphics, Inc.
-
-January 20, 2003
-
-
-

-

Copyright © 2002-2003 by Tungsten Graphics, Inc., Cedar Park, -Texas. All Rights Reserved.
-
-Permission is granted to make and distribute verbatim copies of this -document provided the copyright notice and this permission notice are -preserved on all copies.
-
-

-

1. Introduction

-

The Mini GLX interface facilitates OpenGL rendering on embedded -devices. The interface is a subset of the GLX interface, plus a minimal -set of Xlib-like functions.

-

Programs written to the Mini GLX specification should run unchanged -on systems with the X Window System and the GLX extension. The intention -is to allow flexibility for prototyping and testing.

-

This document serves as both the reference guide and programming -guide for Mini GLX.
-
-

-

2. Mini GLX Concepts

-

The OpenGL specification does not describe how OpenGL rendering -contexts and drawing surfaces (i.e. the frame buffer) are created and -managed. Rather, this is handled by an OpenGL window system interface, -such as Mini GLX.

-

There are three main datatypes or resources managed by Mini GLX. The -resources and their corresponding GLX or Xlib data types are:

- - - - - - - - - - - - - - - - - - - -
ResourceData type
pixel formatsX Visual and XVisualInfo
drawing surfacesX Window or GLXDrawable
rendering contextsGLXContext
-

Pixel formats or X Visuals describe the per-pixel attributes of the -frame buffer. For example, bits per color component, Z buffer size, -stencil size, TrueColor vs PseudoColor, etc.

-

Drawing surfaces or X Windows typically describe a spatial -allocation of the frame buffer (i.e. the position and size of a -rectangular region of pixels). Since MiniGLX doesn't really support a -window system, the window is effectively the entire frame buffer.

-

A rendering context represents the current OpenGL state such as -current drawing color, line width, blending mode, texture parameters, -etc. Several rendering contexts can be created but only one can be in -use at any given time.

-

The Mini GLX interface provides all the functions needed for -choosing pixel formats, create drawing surfaces, creating rendering -contexts and binding rendering contexts to drawing surfaces.
-
-

-

3. Using Mini GLX

-

To use the Mini GLX interface in your application, include the -GL/miniglx.h header file at compile time:

-
#include <GL/miniglx.h>
-
-Applications should link with libGL.so (i.e. gcc -myprogram.o -lGL -o myprogram).  libGL.so implements the -MiniGLX API functions and, in turn, loads a hardware-specific device -driver (such as radeon_dri.so) at runtime.  The -environment variable LIBGL_DRIVERS_PATH should name the -directory where these modules are located.
-
-The remainder of this section describes the MiniGLX API functions.
-
-

3.1 Initialization

-

The XOpenDisplay function is used to initialize the graphics system:

-
-
Display *XOpenDisplay(const char *displayname)
-
-

The displayName parameter is currently ignored in Mini -GLX. It is recommended that NULL be passed as thedisplayName -parameter.

-

If XOpenDisplay is able to initialize the graphics system a pointer -to a Display will be returned. Otherwise, NULL will be returned.

-

3.2 Choosing a Visual

-

A visual (i.e. pixel format) must be chosen before a drawing surface -or rendering context can be created. This is done with the -glXChooseVisual function:

-
-
XVisualInfo *glXChooseVisual(Display *dpy, int screen, const int *attribList)
-
-

dpy is a pointer to the display returned by -XOpenDisplay.

-

screen is currently ignored by Mini GLX and should be -zero.

-

attribList is a list of GLX attributes which describe -the desired pixel format. It is terminated by the token None. -The attributes are as follows:

-
-
-
GLX_USE_GL
-
This attribute should always be present in order to maintain -compatibility with GLX.
-
GLX_RGBA
-
If present, only RGBA pixel formats will be considered. -Otherwise, only color index formats are considered.
-
GLX_DOUBLEBUFFER
-
if present, only double-buffered pixel formats will be chosen.
-
GLX_RED_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per red pixel component that is acceptable.
-
GLX_GREEN_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per green pixel component that is acceptable.
-
GLX_BLUE_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per blue pixel component that is acceptable.
-
GLX_ALPHA_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per alpha pixel component that is acceptable.
-
GLX_STENCIL_SIZE n
-
Must be followed by a non-negative integer indicating the -minimum number of bits per stencil value that is acceptable.
-
None
-
This token is used to terminate the attribute list.
-
-
-

glXChooseVisual will return a pointer to an XVisualInfo object which -most closely matches the requirements of the attribute list. If there -is no visual which matches the request, NULL will be returned.

-

Note that visuals with accumulation buffers and depth buffers are -not available.
-
-

-

3.3 Creating a Drawing Surface

-

Drawing surfaces are created as X windows.  For Mini GLX, -windows are full-screen; they cover the entire frame buffer. - Also, Mini GLX imposes a limit of one window. A second window -cannot be created until the first one is destroyed.

-

3.3.1 Window Creation

-

The XCreateWindow function is used to create a drawing surface:

-
-
Window XCreateWindow( Display *display,
Window parent,
int x, int y,
unsigned int width, unsigned int height,
unsigned int borderWidth,
int depth,
unsigned int class,
Visual *visual,
unsigned long valuemask,
XSetWindowAttributes *attributes )
-
-

The parameters are as follows:

-
-
-
display
-
A Display pointer, as returned by XOpenDisplay.
-
parent
-
The parent window for the new window. For Mini GLX, this -should beRootWindow(dpy, 0).
-
x, y
-
The position of the window. For Mini GLX, both values should -be zero.
-
width, height
-
The size of the window. For Mini GLX, this specifies the -desired screen size such as 1024, 768 or 1280, 1024.
-
borderWidth
-
This parameter should be zero.
-
depth
-
The pixel depth for the window. For Mini GLX this should be -the depth found in the XVisualInfo object returned by glxChooseVisual.
-
class
-
The window class. For Mini GLX this value should be InputOutput.
-
visual
-
This parameter should be the visual field of the XVisualInfo -object returned by glxChooseVisual.
-
valuemask
-
This parameter indicates which fields of the XSetWindowAttributes -are to be used. For Mini GLX this is typically the bitmaskCWBackPixel -| CWBorderPixel | CWColormap.
-
attributes
-
Initial window attributes. Of the fields in the XSetWindowAttributes -structure, thebackground_pixel, border_pixel -and colormap fields should be set.  See the discussion -below regarding colormaps.
-
-
-

XCreateWindow will return a window handle if it succeeds -or zero if it fails.

-

3.3.2 Window Mapping

-

To display the window the XMapWindow function must be called:

-
-
void XMapWindow(Display *dpy, Window w)
-
-

This function does nothing in Mini GLX but is required for Xlib/GLX -compatibility

-

3.3.3 Colormaps
-

-

Xlib requires specification of a colormap when creating a window. - For purposes of interoperability, Mini GLX requires this as well, -though the colormap is not actually used.  The XCreateColormap -function is used to create a colormap:

-
Colormap XCreateColormap(Display *dpy, Window window, -Visual *visual, int alloc)
-
-

The parameters are as follows:
-

-
-
-
dpy
-
The display handle as returned by XOpenDisplay.
-
window
-
This parameter is ignored by Mini GLX but should be the value -returned by the RootWindow(dpy, 0) macro.
-
-
visual
-
This parameter is ignored by Mini GLX but should be the visual -field of the XVisualInfo object returned by glXChooseVisual.
-
alloc
-
This parameter is ignored by Mini GLX but should be set to AllocNone.
-
-
-
-

3.4 Creating a Rendering Context

-

An OpenGL rendering context is created with the glXCreateContext -function:

-
-
GLXContext glXCreateContext(Display *dpy, XVisualInfo *visInfo, GLXContext shareList, Bool direct)
-
-

The parameters are as follows:

-
-
-
dpy
-
The display handle as returned by XOpenDisplay.
-
visInfo
-
The visual as returned by glXChooseVisual.
-
shareList
-
If non-zero, texture objects and display lists are shared with -the named rendering context. If zero, texture objects and display lists -will (initially) be private to this context. They may be shared when a -subsequent context is created.
-
direct
-
Specifies whether direct or indirect rendering is desired. For -Mini GLX this value is ignored but it should be set to True.
-
-
-

glXCreateContext will return a GLXContext handle if it -succeeds or zero if it fails due to invalid parameter or insufficient -resources.
-
-

-

3.5 Binding a Rendering Context

-

The final step before beginning OpenGL rendering is to bind (i.e. -activate) a rendering context and drawing surface with the -glXMakeCurrent function:

-
-
Bool glXMakeCurrent(Display *dpy, GLXDrawable drawable, GLXContext ctx)
-
-

The parameters are as follows:

-
-
-
dpy
-
The display handle, as returned by XOpenDisplay.
-
drawable
-
The window or drawable to bind to the rendering context. This -should be the value returned by XCreateWindow.
-
ctx
-
The rendering context to bind, as returned by glXCreateContext.
-
-
-

If glXMakeCurrent succeeds True is returned. Otherwise False is -returned to indicate an invalid display, window or context parameter.

-

After the rendering context has been bound to the drawing surface -OpenGL rendering can begin.

-

The current rendering context may be unbound by calling -glXMakeCurrent with the window and context parameters set to zero.

-

An application may create any number of rendering contexts and bind -them as needed. Note that binding a rendering context is generally not a -light-weight operation.  Most simple OpenGL applications create -only one rendering context.
-
-

-

3.6 Color Buffer Swapping

-

A double buffered window has two color buffers: a front buffer and a -back buffer. Normally, rendering is directed to the back buffer while -the front buffer is displayed. When rendering of a frame is finished -the front and back buffers are swapped to provide the illusion of -instanteous screen updates.

-

The color buffers for a particular window (i.e. drawable) may be -swapped with the glXSwapBuffers command:

-
-
void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
-
-Any pending rendering commands will be completed before the buffer swap -takes place.
-
-Calling glXSwapBuffers on a window which is single-buffered has no -effect.
-
-

3.7 Releasing Resources

-

3.7.1 Releasing Rendering Contexts

-

A rendering context may be destroyed by calling glXDestroyContext:

-
-
void glXDestroyContext(Display *dpy, GLXContext ctx)
-
-

3.7.2 Releasing Windows

-

A window may be destroyed by calling XDestroyWindow:

-
-
void XDestroyWindow(Display *dpy, Window window)
-
-

3.7.3 Releasing Visuals

-

An XVisualInfo object may be freed by calling XFree:

-
-
void XFree(void *data)
-
-

3.7.4 Releasing Colormaps

-

A colormap may be freed by calling XFreeColormap:

-
-
void XFreeColormap(Display *dpy, Colormap colormap)
-
-

3.7.4 Releasing Display Resources

-

When the application is about to exit, the resources associated with -the graphics system can be released by calling XCloseDisplay:

-
-
void XCloseDisplay(Display *dpy)
-
-

The display handle becomes invalid at this point.
-
-

-

3.8 Query Functions

-

3.8.1 Querying Available Visuals

-A list of all available visuals can be obtained with the XGetVisualInfo -function:
-
-
XVisualInfo -*XGetVisualInfo(Display *dpy, long vinfo_mask, XVisualInfo -*vinfo_template, int *nitems_return)
-
-
-The parameters are as follows:
-
-
-
dpy
-
The display handle, as returned by XOpenDisplay.
-
vinfo_mask
-
A bitmask indicating which fields of the vinfo_template are to -be matched.  The value must be VisualScreenMask.
-
vinfo_template
-
A template whose fields indicate which visual attributes must -be matched by the results.  The screen field of this structure must -be zero.
-
nitems_return
-
Returns the number of visuals returned.
-
-
-The return value is the address of an array of all available visuals.
-
-An example of using XGetVisualInfo to get all available visuals follows:
-
-
XVisualInfo visTemplate, *results;
-int numVisuals;
-Display *dpy = XOpenDisplay(NULL);
-visTemplate.screen = 0;
-results = XGetVisualInfo(dpy, VisualScreenMask, &visTemplate, -&numVisuals);
-
-
-

3.8.2 Querying Visual Attributes

-

The GLX attributes of an X visual may be queried with the -glXGetConfig function:

-
-
int glXGetConfig(Display *dpy, XVisualInfo *vis, int attribute, int *value)
-
-

The parameters are as follows:

-
-
-
dpy
-
The display handle, as returned by XOpenDisplay.
-
vis
-
The visual, as returned by glXChooseVisual.
-
attribute
-
The attribute to query. The attributes are listed below.
-
value
-
Pointer to an integer in which the result of the query will be -stored.
-
-
-

The return value will be zero if no error occurs. - GLX_INVALID_ATTRIBUTE will be returned if the attribute -parameter is invalid.  GLX_BAD_VISUAL will be returned -if the XVisualInfo parameter is invalid.

-

The following attributes may be queried:

-
-
-
GLX_USE_GL
-
The result will be True or False to -indicate if OpenGL rendering is supported with the visual. Mini GLX -always return True.
-
GLX_RGBA
-
The result will be True for RGBA visuals or False -for color index visuals.
-
GLX_DOUBLEBUFFER
-
The result will be True if the visual has two -color buffers or False if the visual has one color buffer.
-
GLX_RED_SIZE
-
The result will be the number of red bits per pixel.
-
GLX_GREEN_SIZE
-
The result will be the number of green bits per pixel.
-
GLX_BLUE_SIZE
-
The result will be the number of blue bits per pixel.
-
GLX_ALPHA_SIZE
-
The result will be the number of alpha bits per pixel.
-
GLX_DEPTH_SIZE
-
The result will be the number of bits per Z value.
-
GLX_STENCIL_SIZE
-
The result will be the number of bits per stencil value.
-
-
-
-
-

3.8.3 Querying the Current Rendering Context

-

The current rendering context can be queried with -glXGetCurrentContext:

-
-
GLXContext glXGetCurrentContext(void)
-
-

Zero will be returned if no context is currently bound.
-
-

-

3.8.4 Querying the Current Drawable

-

The current drawable (i.e. window or drawing surface) can be queried -with glXGetCurrentDrawable:

-
-
GLXDrawable glXGetCurrentDrawable(void)
-
-

Zero will be returned if no drawable is currently bound.
-
-

-

3.8.5 Function Address Queries

-

The glXGetProcAddress function will return the address of any -available OpenGL or Mini GLX function:

-
-
void *glXGetProcAddress(const GLubyte *procName)
-
-

If procName is a valid function name, a pointer to that -function will be returned.  Otherwise, NULL will be returned.

-

The purpose of glXGetProcAddress is to facilitate using future -extensions to OpenGL or Mini GLX. If a future version of the library -adds new extension functions they'll be accessible via -glXGetProcAddress. The alternative is to hard-code calls to the new -functions in the application but doing so will prevent linking the -application with older versions of the library.
-
-

-

3.9 Versioning

-The Mini GLX version can be queried at run time with glXQueryVersion: -
-
Bool glXQueryVersion(Display *dpy, int *major, int *minor)
-
-

major will be set to the major version number andminor -will be set to the minor version number.True will be -returned if the function succeeds. False will be returned -if the function fails due to invalid parameters. The dpy -argument is currently ignored, but should be the value returned by -XOpenDisplay.

-

At compile time, the Mini GLX interface version can be tested with -the MINI_GLX_VERSION_1_x preprocessor tokens. For example, if -version 1.0 of Mini GLX is supported, then MINI_GLX_VERSION_1_0 -will be defined. If version 1.1 of Mini GLX is supported, then -MINI_GLX_VERSION_1_1 will be defined.

-

At the time of writing the current Mini GLX version is 1.0.
-
-

-

4.0 Interoperability with GLX and Xlib

-While Mini GLX strives to be compatible with GLX and Xlib there are -some unavoidable differences which must be taken into consideration.
-

4.1 Public vs Private Structures

-The structure of many X data types is public.  For example, the Display -data type is defined as a structure in /usr/include/X11/Xlib.h and -programmers may access any fields of that structure at will.  Mini -GLX also defines a Display data type but its fields are hidden and not -visiblein miniglx.h.  Duplicating the Xlib -declaration for the Display data type in minigl.h would -require defining a large number of other superfluous Xlib datatypes.
-
-Mini GLX users are discouraged from directly accessing the fields of -Xlib data types to maximize portability - though this is unavoidable to -some extent.  For example, the XVisualInfo and XSetWindowAtttributes -data types must be completely public. -

4.2 Macros

-In some cases, Xlib defines macros which are meant to be used instead -of direct structure accesses.  For example, the RootWindow(dpy, -screen) macro returns the root window for a given screen on a -given display.  Unfortunately, macros do nothing to aid in ABI -compatibility since they are resolved at compile time instead of at -link/run time.
-
-Mini GLX also defines a RootWindow macro since it's -essential for creating windows.  But the implementation of this -macro by Xlib and Mini GLX is completely different.
-

4.3 Summary

-Because Xlib and Mini GLX define data types and macros differently, -Mini GLX applications must be recompiled when retargeting Mini GLX or -native Xlib/GLX.  That is, applications can't simply be re-linked -because of ABI incompatibilities.
-
-Nevertheless, the fact that Mini GLX programs can be recompiled for -Xlib and GLX increases portability and flexibility for testing and -prototyping.
-
-

5.0 Example Program

-

This section shows an example program which uses the Mini GLX -interface. The program simply draws several frames of a rotating square.
-

-

The program may be compiled for use with Xlib/GLX or Mini GLX by -setting the USE_MINIGLX token to 0 or 1, respectively. - Note that the only difference is the header files which are -included.
-

-

-

#define USE_MINIGLX 1 /* 1 = use Mini GLX, 0 = use Xlib/GLX */

#include <stdio.h>
#include <stdlib.h>
#include <GL/gl.h>

#if USE_MINIGLX
#include <GL/miniglx.h>
#else
#include <GL/glx.h>
#include <X11/Xlib.h>
#endif

/*
* Create a simple double-buffered RGBA window.
*/
static Window
MakeWindow(Display * dpy, unsigned int width, unsigned int height)
{
int visAttributes[] = {
GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER,
None
};
XSetWindowAttributes attr;
unsigned long attrMask;
Window root;
Window win;
GLXContext ctx;
XVisualInfo *visinfo;

root = RootWindow(dpy, 0);

/* Choose GLX visual / pixel format */
visinfo = glXChooseVisual(dpy, 0, visAttributes);
if (!visinfo) {
printf("Error: couldn't get an RGB, Double-buffered visual\n");
exit(1);
}

/* Create the window */
attr.background_pixel = 0;
attr.border_pixel = 0;
attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
attrMask = CWBackPixel | CWBorderPixel | CWColormap;
win = XCreateWindow(dpy, root, 0, 0, width, height,
0, visinfo->depth, InputOutput,
visinfo->visual, attrMask, &attr);
if (!win) {
printf("Error: XCreateWindow failed\n");
exit(1);
}

/* Display the window */
XMapWindow(dpy, win);

/* Create GLX rendering context */
ctx = glXCreateContext(dpy, visinfo, NULL, True);
if (!ctx) {
printf("Error: glXCreateContext failed\n");
exit(1);
}

/* Bind the rendering context and window */
glXMakeCurrent(dpy, win, ctx);

return win;
}


/*
* Draw a few frames of a rotating square.
*/
static void
DrawFrames(Display * dpy, Window win)
{
int angle;
glShadeModel(GL_FLAT);
glClearColor(0.5, 0.5, 0.5, 1.0);
for (angle = 0; angle < 360; angle += 10) {
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 0.0);
glPushMatrix();
glRotatef(angle, 0, 0, 1);
glRectf(-0.8, -0.8, 0.8, 0.8);
glPopMatrix();
glXSwapBuffers(dpy, win);
}
}


int
main(int argc, char *argv[])
{
Display *dpy;
Window win;

dpy = XOpenDisplay(NULL);
if (!dpy) {
printf("Error: XOpenDisplay failed\n");
return 1;
}

win = MakeWindow(dpy, 300, 300);

DrawFrames(dpy, win);

return 0;
}
-
- - diff --git a/mesalib/docs/README.3DFX b/mesalib/docs/README.3DFX index 037e8fa7c..7feda6f33 100644 --- a/mesalib/docs/README.3DFX +++ b/mesalib/docs/README.3DFX @@ -644,7 +644,7 @@ Hints and Special Features: - The Voodoo driver supports the GL_EXT_paletted_texture. it works only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value - is ignored because this is a limitation of the the current Glide + is ignored because this is a limitation of the current Glide version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for a demo of this extension. diff --git a/mesalib/docs/README.D3D b/mesalib/docs/README.D3D deleted file mode 100644 index b41fcb620..000000000 --- a/mesalib/docs/README.D3D +++ /dev/null @@ -1,124 +0,0 @@ - - DirectX 6 Driver for Mesa 3.0 - - -This software is distributed under the terms of the GNU Library -General Public License, see the LICENSE file for details. - - - -What do you need ? ------------------- - - - A PC with a DirectX 6 video driver installed. - - - Mesa 3.0 - - - The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine). - The Voodoo2 requires the Glide library 2.51. The Glide 3.0 is not - compatible with the Glide 2.x so it doesn't work with the current - version of the driver; - - - Visual C++ 5.0 is only compiler test but others should be ok with - changes to the makefiles (CFLAGS/LFLAGS). - - - DirectX 6 SDK (was a MS download but not sure if still available). - - - SoftIce or another debugger that will get DPF's is nice. - - -Tested on: ----------- - Windows 95 - Windows 98 - Windows NT 5.0 (beta 2) - - -What is able to do ? --------------------- - - - the driver will try and use DirectX to rasterize the OpenGL primitives - that are sent to the driver. The driver will fall back to SW if the rendering - context is too big. The fallback to SW still uses DirectDraw. If the driver - fails to support and operation (accum, stencil, etc) then it will try and get - Mesa to render it in SW. DirectX 6 features that are unsupported by the - installed DirectX 6 driver will be mapped to some other best fit feature. - - -How to compile: ---------------- - - These instructions assume you have Visual C++ installed. - - You might need to increase you enviroment space. You can do this by - adding the following statement to you config.sys. - - shell=C:\COMMAND.COM C:\ /p /e:8198 - - Next setup you compiler enviroment by running vcvars32.bat in the Visual C++ - 'bin' directoy. - - c:\DevStudio\VC\bin\vcvars32.bat - - Modify the D3D makefile to point at your SDK install. Example has the SDK - installed on my 'f' drive in the root. - - file: \Mesa-3.0\src\makefile.d3d - - SDKROOT=f:\mssdk - - Now you can simply make the project. If you look in the makefile you can see - I have some different targets like 'install'. - - nmake /f makefile.d3d - - -FAQ: ----- - - 1) I don't think the driver is using my DirectX driver. - - This maybe true as the current version will only select the Primary D3D driver - installed. If you 3D card is the secondary (3dfx) then your out of luck for this - release. - - 2) The driver seems like its not HW accelerated. - - If you have a video card with limited memory then you might want to try and - change your destop resolution to a low setting (640x480x16) so that the 3D part - of the card has more resources. Remeber the driver can't make the card better... - - 3) Nothing works. - - Make sure you have a DirectX '6' driver installed. Check you driver docs for this - info or use the SDK info utilities. - The final 'dll' is named opengl32.dll and is either in the same directory as the - OpenGL program or in your system directory (x:\windows\system or x:\winnt\system32). - Check your destop resolution. Most DirectX 6 drivers will only support 16bit and - 32bit color depth. To find out for sure you can check the DirectX Info Viewer in - the SDK. - - - 4) Rendering doesn't look right. - - Sometimes this is because the card doesn't support a feature that that is required. - This is usually due to unsupported alpha functions (test/blend) or texture mapping. - Some cards suffer from too small of an alpha channel. The driver does its best to - fallback on unsupported features. This is not to say the driver may not have a bug(s). - - 5) Textures look bad. - - No mipmapping in this release. - - -Thanks to: ----------- - -Brian Paul - - - - -Leigh McRae (leigh@altsoftware.com) -February 9, 1999 - diff --git a/mesalib/docs/README.directfb b/mesalib/docs/README.directfb deleted file mode 100644 index d66ca8d3c..000000000 --- a/mesalib/docs/README.directfb +++ /dev/null @@ -1,29 +0,0 @@ - - Mesa DirectFB Information - - -Requirements -============ - - To build Mesa with DirectFB (DirectFBGL) support you need: - - DirectFB at least 1.0.0 (http://directfb.org) - - pkg-config at least 0.9 (http://pkgconfig.sf.net) - - -Installation -============ - Run - - make linux-directfb - - to build Mesa and DirectFBGL module, - - make install - - to install OpenGL libraries and - - cd src/mesa/drivers/directfb ; make install - - to install DirectFBGL module in the proper location. - Actually, that last command may not be needed. Please provide feedback. - diff --git a/mesalib/docs/contents.html b/mesalib/docs/contents.html index d15e6c1e3..cca20ecaa 100644 --- a/mesalib/docs/contents.html +++ b/mesalib/docs/contents.html @@ -52,9 +52,12 @@ a:visited { User Topics @@ -244,8 +244,8 @@ isn't a significant problem.

system. There are two steps to this. The file must first be added to src/mesa/sources. That gets the file built and linked. The second step is to add the correct #ifdef magic to -src/mesa/main/dispatch.c to prevent the C version of the dispatch -functions from being built.

+src/mesa/glapi/glapi_dispatch.c to prevent the C version of the +dispatch functions from being built.

3.4. Fixed-Length Dispatch Stubs

diff --git a/mesalib/docs/egl.html b/mesalib/docs/egl.html new file mode 100644 index 000000000..55907f6cf --- /dev/null +++ b/mesalib/docs/egl.html @@ -0,0 +1,324 @@ + + +Mesa EGL + + + + + +

Mesa EGL

+ +

The current version of EGL in Mesa implements EGL 1.4. More information +about EGL can be found at + +http://www.khronos.org/egl/.

+ +

The Mesa's implementation of EGL uses a driver architecture. The main +library (libEGL) is window system neutral. It provides the EGL +API entry points and helper functions for use by the drivers. Drivers are +dynamically loaded by the main library and most of the EGL API calls are +directly dispatched to the drivers.

+ +

The driver in use decides the window system to support. For drivers that +support hardware rendering, there are usually multiple drivers supporting the +same window system. Each one of of them supports a certain range of graphics +cards.

+ +

Build EGL

+ +
    +
  1. +

    Run configure with the desired state trackers and enable +the Gallium driver for your hardware. For example

    + +
    +  $ ./configure --with-state-trackers=egl,es,vega --enable-gallium-{swrast,intel}
    +
    + +

    The main library will be enabled by default. The egl state +tracker is needed by a number of EGL drivers. EGL drivers will be covered +later. The es state tracker provides OpenGL ES 1.x +and 2.x and the vega state tracker provides OpenVG +1.x.

    +
  2. + +
  3. Build and install Mesa as usual.
  4. +
+ +

In the given example, it will build and install libEGL, +libGLESv1_CM, libGLESv2, libOpenVG, and +one or more EGL drivers.

+ +

Configure Options

+ +

There are several options that control the build of EGL at configuration +time

+ +
    +
  • --enable-egl + +

    By default, EGL is enabled. When disabled, the main library and the drivers +will not be built.

    + +
  • + +
  • --with-egl-driver-dir + +

    The directory EGL drivers should be installed to. If not specified, EGL +drivers will be installed to ${libdir}/egl.

    + +
  • + +
  • --with-egl-displays + +

    List the window system(s) to support. It is by default x11, +which supports the X Window System. Its argument is a comma separated string +like, for example, --with-egl-displays=x11,kms. Because an EGL +driver decides which window system to support, this example will enable two +(sets of) EGL drivers. One supports the X window system and the other supports +bare KMS (kernel modesetting).

    + +
  • + +
  • --with-state-trackers + +

    The argument is a comma separated string. It is usually used to specify the +rendering APIs, like OpenGL ES or OpenVG, to build. But it should be noted +that a number of EGL drivers depend on the egl state tracker. +They will not be built without the egl state tracker.

    + +
  • + +
  • --enable-gallium-swrast + +

    This option is not specific to EGL. But if there is no driver for your +hardware, or you are experiencing problems with the hardware driver, you can +enable the swrast DRM driver. It is a dummy driver and EGL will fallback to +software rendering automatically.

    + +
  • +
+ +

OpenGL

+ +

The OpenGL state tracker is not built in the above example. It should be +noted that the classic libGL is not a state tracker and cannot be +used with EGL (unless the EGL driver in use is egl_glx). To build +the OpenGL state tracker, one may append glx to +--with-state-trackers and manually build +src/gallium/winsys/xlib/.

+ +

Use EGL

+ +

The demos for OpenGL ES and OpenVG can be found in progs/es1/, +progs/es2/ and progs/openvg/. You can use them to +test your build. For example,

+ +
+  $ cd progs/es1/xegl
+  $ make
+  $ ./torus
+
+ +

Environment Variables

+ +

There are several environment variables that control the behavior of EGL at +runtime

+ +
    +
  • EGL_DRIVERS_PATH + +

    By default, the main library will look for drivers in the directory where +the drivers are installed to. This variable specifies a list of +colon-separated directories where the main library will look for drivers, in +addition to the default directory. This variable is ignored for setuid/setgid +binaries.

    + +
  • + +
  • EGL_DRIVER + +

    This variable specifies a full path to an EGL driver and it forces the +specified EGL driver to be loaded. It comes in handy when one wants to test a +specific driver. This variable is ignored for setuid/setgid binaries.

    + +
  • + +
  • EGL_DISPLAY + +

    When EGL_DRIVER is not set, the main library loads all +EGL drivers that support a certain window system. EGL_DISPLAY can +be used to specify the window system and the valid values are, for example, +x11 or kms. When the variable is not set, the main +library defaults the value to the first window system listed in +--with-egl-displays at configuration time. + +

  • + +
  • EGL_LOG_LEVEL + +

    This changes the log level of the main library and the drivers. The valid +values are: debug, info, warning, and +fatal.

    + +
  • + +
  • EGL_SOFTWARE + +

    For drivers that support both hardware and software rendering, setting this +variable to true forces the use of software rendering.

    + +
  • +
+ +

EGL Drivers

+ +

There are two categories of EGL drivers: Gallium and classic.

+ +

Gallium EGL drivers supports all rendering APIs specified in EGL 1.4. The +support for optional EGL functions and EGL extensions is usually more complete +than the classic ones. These drivers depend on the egl state +tracker to build. The available drivers are

+ +
    +
  • egl_<dpy>_i915
  • +
  • egl_<dpy>_i965
  • +
  • egl_<dpy>_radeon
  • +
  • egl_<dpy>_nouveau
  • +
  • egl_<dpy>_swrast
  • +
  • egl_<dpy>_vmwgfx
  • +
+ +

<dpy> is given by --with-egl-displays at +configuration time. There will be one EGL driver for each combination of the +displays listed and the hardware drivers enabled.

+ +

Classic EGL drivers, on the other hand, supports only OpenGL as its +rendering API. They can be found under src/egl/drivers/. There +are 3 of them

+ +
    +
  • egl_glx + +

    This driver provides a wrapper to GLX. It uses exclusively GLX to implement +the EGL API. It supports both direct and indirect rendering when the GLX does. +It is accelerated when the GLX is. As such, it cannot provide functions that +is not available in GLX or GLX extensions.

    +
  • + +
  • egl_dri2 + +

    This driver supports the X Window System as its window system. It functions +as a DRI2 driver loader. Unlike egl_glx, it has no dependency on +libGL. It talks to the X server directly using DRI2 protocol.

    + +
  • +
  • egl_dri + +

    This driver lacks maintenance and does not build. It is similiar +to egl_dri2 in that it functions as a DRI(1) driver loader. But +unlike egl_dri2, it supports Linux framebuffer devices as its +window system and supports EGL_MESA_screen_surface extension. As DRI1 drivers +are phasing out, it might eventually be replaced by egl_dri2.

    + +
  • +
+ +

To use the classic drivers, one must manually set EGL_DRIVER at +runtime.

+ +

Developers

+ +

The sources of the main library and the classic drivers can be found at +src/egl/. The sources of the egl state tracker can +be found at src/gallium/state_trackers/egl/.

+ +

The suggested way to learn to write a EGL driver is to see how other drivers +are written. egl_glx should be a good reference. It works in any +environment that has GLX support, and it is simpler than most drivers.

+ +

Lifetime of Display Resources

+ +

Contexts and surfaces are examples of display resources. They might live +longer than the display that creates them.

+ +

In EGL, when a display is terminated through eglTerminate, all +display resources should be destroyed. Similarly, when a thread is released +throught eglReleaseThread, all current display resources should be +released. Another way to destory or release resources is through functions +such as eglDestroySurface or eglMakeCurrent.

+ +

When a resource that is current to some thread is destroyed, the resource +should not be destroyed immediately. EGL requires the resource to live until +it is no longer current. A driver usually calls +eglIs<Resource>Bound to check if a resource is bound +(current) to any thread in the destroy callbacks. If it is still bound, the +resource is not destroyed.

+ +

The main library will mark destroyed current resources as unlinked. In a +driver's MakeCurrent callback, +eglIs<Resource>Linked can then be called to check if a newly +released resource is linked to a display. If it is not, the last reference to +the resource is removed and the driver should destroy the resource. But it +should be careful here because MakeCurrent might be called with an +uninitialized display.

+ +

This is the only mechanism provided by the main library to help manage the +resources. The drivers are responsible to the correct behavior as defined by +EGL.

+ +

EGL_RENDER_BUFFER

+ +

In EGL, the color buffer a context should try to render to is decided by the +binding surface. It should try to render to the front buffer if the binding +surface has EGL_RENDER_BUFFER set to +EGL_SINGLE_BUFFER; If the same context is later bound to a +surface with EGL_RENDER_BUFFER set to +EGL_BACK_BUFFER, the context should try to render to the back +buffer. However, the context is allowed to make the final decision as to which +color buffer it wants to or is able to render to.

+ +

For pbuffer surfaces, the render buffer is always +EGL_BACK_BUFFER. And for pixmap surfaces, the render buffer is +always EGL_SINGLE_BUFFER. Unlike window surfaces, EGL spec +requires their EGL_RENDER_BUFFER values to be honored. As a +result, a driver should never set EGL_PIXMAP_BIT or +EGL_PBUFFER_BIT bits of a config if the contexts created with the +config won't be able to honor the EGL_RENDER_BUFFER of pixmap or +pbuffer surfaces.

+ +

It should also be noted that pixmap and pbuffer surfaces are assumed to be +single-buffered, in that eglSwapBuffers has no effect on them. It +is desirable that a driver allocates a private color buffer for each pbuffer +surface created. If the window system the driver supports has native pbuffers, +or if the native pixmaps have more than one color buffers, the driver should +carefully attach the native color buffers to the EGL surfaces, re-route them if +required.

+ +

There is no defined behavior as to, for example, how +glDrawBuffer interacts with EGL_RENDER_BUFFER. Right +now, it is desired that the draw buffer in a client API be fixed for pixmap and +pbuffer surfaces. Therefore, the driver is responsible to guarantee that the +client API renders to the specified render buffer for pixmap and pbuffer +surfaces.

+ +

EGLDisplay Mutex

+ +The EGLDisplay will be locked before calling any of the dispatch +functions (well, except for GetProcAddress which does not take an +EGLDisplay). This guarantees that the same dispatch function will +not be called with the sample display at the same time. If a driver has access +to an EGLDisplay without going through the EGL APIs, the driver +should as well lock the display before using it. + +

TODOs

+ +
    +
  • Pass the conformance tests
  • +
  • Better automatic driver selection: EGL_DISPLAY loads all +drivers and might eat too much memory.
  • + +
+ + + diff --git a/mesalib/docs/envvars.html b/mesalib/docs/envvars.html index b2c0e01ee..fd1700a02 100644 --- a/mesalib/docs/envvars.html +++ b/mesalib/docs/envvars.html @@ -51,5 +51,28 @@ See the Xlib software driver page for details. +

+These environment variables are for the Intel i945/i965 drivers: +

+
    +
  • INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve + OpenGL conformance. If set to 2, always use software rendering. +
  • INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap, + glCopyPixels, glDrawPixels. +
+ + +

+These environment variables are for the Radeon R300 driver: +

+
    +
  • R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting. +
+ +

+Mesa EGL supports different sets of environment variables. See the +Mesa EGL page for the details. +

+ diff --git a/mesalib/docs/install.html b/mesalib/docs/install.html index 8c24cee7a..5aea92e0b 100644 --- a/mesalib/docs/install.html +++ b/mesalib/docs/install.html @@ -351,20 +351,11 @@ example linux or windows, machine is x86 or x86_64, optionally followed by -debug for debug builds.

-

-The sample programs are built seperately. To build them do -

-    scons -C progs
-
-And the build output will be placed in progs/build/... -

-

To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler toolchain do

     scons platform=windows toolchain=crossmingw machine=x86 statetrackers=mesa drivers=softpipe,trace winsys=gdi
-    scons -C progs platform=windows toolchain=crossmingw machine=x86 -k
 

This will create: diff --git a/mesalib/docs/lists.html b/mesalib/docs/lists.html index 5227fbd05..9c17a9f35 100644 --- a/mesalib/docs/lists.html +++ b/mesalib/docs/lists.html @@ -13,36 +13,41 @@

    -
  • mesa3d-announce - announcements of new Mesa -versions are sent to this list. -
  • -
  • mesa3d-users - intended for users of the Mesa and DRI. -Newbie questions are appropriate, but please try the general OpenGL +target="_parent">mesa3d-users - intended for end-users of Mesa and DRI +drivers. Newbie questions are OK, but please try the general OpenGL resources and Mesa/DRI documentation first.

  • mesa3d-dev - for discussion of Mesa and Direct Rendering -Infrastructure development. Not for beginners. +target="_parent">mesa3d-dev - for Mesa, Gallium and DRI development +discussion. Not for beginners.

  • mesa-commit - relays git check-in messages (for developers). +In general, people should not post to this list. +

  • -Note: the old mesa3d-cvs list is no longer in use. +
  • mesa3d-announce - announcements of new Mesa +versions are sent to this list. Very low traffic.
+

+Follow the links above for list archives. +

+

For mailing lists about Direct Rendering Modules (drm) in Linux/BSD -kernels, see wiki. +kernels, see the + +DRI wiki. +

-Notice: non-member posts to any of these lists will be automatically -rejected. +Notice: You must subscribe to these lists in order to post to them.

diff --git a/mesalib/docs/news.html b/mesalib/docs/news.html index 2abec2e63..a60d7a87d 100644 --- a/mesalib/docs/news.html +++ b/mesalib/docs/news.html @@ -10,11 +10,28 @@

News

-

November XX, 2009

+ +

March 26, 2010

+

+Mesa 7.7.1 is released. This is a bug-fix +release fixing issues found in the 7.7 release. +

+

+Also, Mesa 7.8 is released. This is a new +development release. +

+ + + +

December 21, 2009

Mesa 7.6.1 is released. This is a bug-fix release fixing issues found in the 7.6 release.

+

+Also, Mesa 7.7 is released. This is a new +development release. +

September 28, 2009

diff --git a/mesalib/docs/opengles.html b/mesalib/docs/opengles.html new file mode 100644 index 000000000..fc41e6771 --- /dev/null +++ b/mesalib/docs/opengles.html @@ -0,0 +1,79 @@ + + +OpenGL ES State Trackers + + + + + +

OpenGL ES State Trackers

+ +

The current version of the OpenGL ES state trackers implement OpenGL ES 1.1 and OpenGL ES 2.0. +More informations about OpenGL ES can be found at + +http://www.khronos.org/opengles/.

+ +

The OpenGL ES state trackers depends on the Gallium architecture and a +working EGL implementation. Please refer to Mesa EGL +for more information about EGL.

+ + +

Build the Libraries

+
    +
  1. Run configure with --with-state-trackers=egl,es and enable the Gallium driver for your hardware.
  2. +
  3. Build and install Mesa as usual.
  4. +
+ +

It will install libGLESv1_CM, libGLESv2, libEGL, and one or more EGL drivers for your hardware.

+

Run the Demos

+ +

There are some demos in progs/es1/ and progs/es2/. You can use them to test your build. For example,

+ +
+  $ cd progs/es1/xegl
+  $ make
+  $ ./torus
+
+ +

Developers

+ +

The core of OpenGL ES state trackers is the ES overlay. It is located in +src/mesa/es/.

+ +

Structure

+ +

The ES overlay uses as much code as possible from Mesa. It has its own glapi XMLs to describe the APIs of OpenGL ES. The ES overlay can be built parallelly with Mesa, and they will give

+ + + + + + + + + +
Library NameUsageSource
libmesagallium.aOpenGL state trackerMesa
libes1gallium.aOpenGL ES 1.x state trackerES overlay
libes2gallium.aOpenGL ES 2.x state trackerES overlay
libglapi.aOpenGL APIMesa
libes1api.aOpenGL ES 1.x APIES overlay
libes2api.aOpenGL ES 2.x APIES overlay
+ +

The OpenGL ES state trackers and APIs are then used by src/gallium/state_trackers/es/ to create the final libraries.

+ +

Dispatch Table

+ +

The ES overlay uses an additional indirection when dispatching fucntions

+ +
+  Mesa:       glFoo() --> _mesa_Foo()
+  ES overlay: glFoo() --> _es_Foo() --> _mesa_Foo()
+
+ +

The indirection serves several purposes

+ +
    +
  • When a function is in Mesa and the type matches, it checks the arguments and calls the Mesa function.
  • +
  • When a function is in Mesa but the type mismatches, it checks and converts the arguments before calling the Mesa function.
  • +
  • When a function is not available in Mesa, or accepts arguments that are not available in OpenGL, it provides its own implementation.
  • +
+ +

Other than the last case, the ES overlay uses APIspec.xml to generate functions to check and/or converts the arguments.

+ + + diff --git a/mesalib/docs/openvg.html b/mesalib/docs/openvg.html index 442ee522f..cdf6b57e0 100644 --- a/mesalib/docs/openvg.html +++ b/mesalib/docs/openvg.html @@ -1,6 +1,6 @@ -Mesa Release Notes +OpenVG State Tracker @@ -20,12 +20,13 @@ http://www.khronos.org/openvg/ .

The OpenVG state tracker depends on the Gallium architecture and a working EGL implementation. +Please refer to Mesa EGL for more information about EGL.

Building the library

    -
  1. Build Mesa3D with Gallium3D. Any build that builds Gallium3D libraries and EGL will suffice
  2. +
  3. Build Mesa3D with Gallium3D. Any build that builds Gallium3D libraries, EGL, and Gallium EGL drivers will suffice
  4. cd src/gallium/state_trackers/vega; make
  5. The last step will build libOpenVG library. You can add the libdir to LD_LIBRARY_PATH or install libOpenVG
@@ -33,12 +34,9 @@ The OpenVG state tracker depends on the Gallium architecture and a working EGL i

Sample build

A sample build looks as follows:
-  make linux-x86-64-debug
-  cd src/gallium/state_trackers/vega
-  make
-  cd ../../../..
-  export LD_LIBRARY_PATH=$PWD/lib64
-  export EGL_DRIVER="egl_softpipe"
+  $ ./configure --with-state-trackers=egl,vega --enable-gallium-intel
+  $ make
+  $ make install
 

OpenVG Demos

@@ -59,10 +57,5 @@ To run a demo: -

Notes

-
    -
  • EGL_DRIVER environmental variable: forces usage of a specific EGL driver. Unless you force egl_softpipe the implementation will look for a DRI hardware accelerate driver and unless you have a Gallium driver that supports it, you'll see crashes
  • -
- diff --git a/mesalib/docs/osmesa.html b/mesalib/docs/osmesa.html index 629d054f4..525da4d42 100644 --- a/mesalib/docs/osmesa.html +++ b/mesalib/docs/osmesa.html @@ -26,7 +26,7 @@ more information about the API functions.

-There are several examples of OSMesa in the progs/osdemo/ +There are several examples of OSMesa in the progs/osdemos/ directory.

diff --git a/mesalib/docs/pbuffers.html b/mesalib/docs/pbuffers.html deleted file mode 100644 index 259910155..000000000 --- a/mesalib/docs/pbuffers.html +++ /dev/null @@ -1,54 +0,0 @@ - - -PBuffer Rendering - - - - - -

PBuffer Rendering

- -

-Basically, FBconfigs and PBuffers allow you to do off-screen rendering -with OpenGL. The OSMesa interface does basically the same thing, but -fbconfigs and pbuffers are supported by more vendors. -PBuffer rendering may also be hardware accelerated. -

- -

-PBuffers are getting more use nowadays, though they've actually been -around for a long time on IRIX systems and other workstations. -

- -

-The -GL_SGIX_fbconfig -and - -GL_SGIX_pbuffer extensions describe the functionality. -More recently, these extensions have been promoted to ARB extensions (on -Windows at least). -

- -

-The Mesa/progs/xdemos/ directory has some useful code for working -with pbuffers: -

- -
    -
  • pbinfo.c - like glxinfo, it prints a list of available - fbconfigs and whether each supports pbuffers. -
  • pbutil.c - a few utility functions for dealing with - fbconfigs and pbuffers. -
  • pbdemo.c - a demonstration of off-screen rendering with pbuffers. -
- -

-Mesa 4.1 and later support GL_SGIX_fbconfig and GL_SGIX_pbuffer (software -rendering only). -

- - - diff --git a/mesalib/docs/relnotes-7.6.1.html b/mesalib/docs/relnotes-7.6.1.html index a41bcee81..1d0ecd2ac 100644 --- a/mesalib/docs/relnotes-7.6.1.html +++ b/mesalib/docs/relnotes-7.6.1.html @@ -8,7 +8,7 @@ -

Mesa 7.6.1 Release Notes, (date tbd)

+

Mesa 7.6.1 Release Notes, 21 December 2009

Mesa 7.6.1 is a bug-fix release fixing issues since version 7.6. @@ -26,7 +26,15 @@ for DRI hardware acceleration.

MD5 checksums

-tbd
+e80fabad2e3eb7990adae773d6aeacba  MesaLib-7.6.1.tar.gz
+7db4617e9e10ad3aca1b64339fd71b7d  MesaLib-7.6.1.tar.bz2
+dd3275dbf9833480d2e92d0c69b22abd  MesaLib-7.6.1.zip
+f7fdcfe3c0f363e571c60f02f74368fb  MesaDemos-7.6.1.tar.gz
+a4226f06732a02556fcf6be290b86dff  MesaDemos-7.6.1.tar.bz2
+849425f356bd940726cebedfa79de176  MesaDemos-7.6.1.zip
+d40cc7c5e337a85b674e27a8e494f52f  MesaGLUT-7.6.1.tar.gz
+ca9aecb91f05b1da9fd7d5eeb19d47d7  MesaGLUT-7.6.1.tar.bz2
+23fad8398004c977a1d8953079b72ca6  MesaGLUT-7.6.1.zip
 
diff --git a/mesalib/docs/relnotes-7.7.1.html b/mesalib/docs/relnotes-7.7.1.html new file mode 100644 index 000000000..00b36714c --- /dev/null +++ b/mesalib/docs/relnotes-7.7.1.html @@ -0,0 +1,60 @@ + + +Mesa Release Notes + + + + + + + +

Mesa 7.7.1 Release Notes / March 28, 2010

+ +

+Mesa 7.7.1 is a bug-fix release. +

+

+Mesa 7.7.1 implements the OpenGL 2.1 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 2.1. +

+

+See the Compiling/Installing page for prerequisites +for DRI hardware acceleration. +

+ + +

MD5 checksums

+
+3ab0638cfa7ce8157337a229cf0db2c4  MesaLib-7.7.1.tar.gz
+46664d99e03f1e3ac078a7fea02af115  MesaLib-7.7.1.tar.bz2
+4e73ba8abb59aff79485eb95d7cefff7  MesaLib-7.7.1.zip
+bf1b108983995f7a712cf3343df1c918  MesaDemos-7.7.1.tar.gz
+aeb39645d80d656e0adebaa09e5bcd03  MesaDemos-7.7.1.tar.bz2
+01c49b7454fd292244eaf8bdc6ed8cf0  MesaDemos-7.7.1.zip
+37ec6386693dcb6dc770d1efd63a7a93  MesaGLUT-7.7.1.tar.gz
+1e16c85282f843791a21f7bc7b6a1ca8  MesaGLUT-7.7.1.tar.bz2
+d352c9e36a8e4d1059f4abc017b131e0  MesaGLUT-7.7.1.zip
+
+ + +

Bug fixes

+
    +
  • Assorted fixes to VMware SVGA gallium driver. +
  • Fixed broken blending to multiple color buffers in swrast driver. +
  • Allocate constants more tightly in GL_ARB_vertex/fragment parser. +
  • Fixed mipmap generation bug caused by invalid viewport state. +
  • Gallium SSE codegen for XPD didn't always work. +
  • Fixed Windows build. +
  • Fixed broken glMultiDrawElements(). +
  • Silence bogus GL errors generated in glxinfo. +
  • Fixed several render to texture bugs. +
  • Assorted bug fixes in Mesa/Gallium state tracker including + glCopy/DrawPixels() to FBOs. +
  • Assorted fixes to Gallium drivers. +
  • Fixed broken glPush/PopClientAttrib() for vertex arrays in GLX code. +
+ + + + diff --git a/mesalib/docs/relnotes-7.7.html b/mesalib/docs/relnotes-7.7.html index 8c8f763b6..c1ed65461 100644 --- a/mesalib/docs/relnotes-7.7.html +++ b/mesalib/docs/relnotes-7.7.html @@ -8,7 +8,7 @@ -

Mesa 7.7 Release Notes / date TBD

+

Mesa 7.7 Release Notes / 21 December 2009

Mesa 7.7 is a new development release. @@ -28,7 +28,15 @@ for DRI hardware acceleration.

MD5 checksums

-tbd
+395c9516edf1ad54b0934d8db15557bf  MesaLib-7.7.tar.gz
+e3fa64a1508bc23dd9de9dd2cea7cfb1  MesaLib-7.7.tar.bz2
+e54903eb5e49c3969821fa16b32da245  MesaLib-7.7.zip
+53b5b6f78e55de170d43c98cb6aaab7e  MesaDemos-7.7.tar.gz
+6fd616b27b9826d0faa23e08e05d9435  MesaDemos-7.7.tar.bz2
+240fe06159ad73d5e22c27033b66c80a  MesaDemos-7.7.zip
+9fe11a904b2a9d8cd06cc52bc330b716  MesaGLUT-7.7.tar.gz
+e8dceed05a59a2d3c2619d7d734587e3  MesaGLUT-7.7.tar.bz2
+96af041d435349ee23ead4667ec36363  MesaGLUT-7.7.zip
 
diff --git a/mesalib/docs/relnotes-7.8.html b/mesalib/docs/relnotes-7.8.html new file mode 100644 index 000000000..9622d1665 --- /dev/null +++ b/mesalib/docs/relnotes-7.8.html @@ -0,0 +1,62 @@ + + +Mesa Release Notes + + + + + + + +

Mesa 7.8 Release Notes / March 28, 2010

+ +

+Mesa 7.8 is a new development release. +People who are concerned with stability and reliability should stick +with a previous release or wait for Mesa 7.8.1. +

+

+Mesa 7.8 implements the OpenGL 2.1 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 2.1. +

+

+See the Compiling/Installing page for prerequisites +for DRI hardware acceleration. +

+ + +

MD5 checksums

+
+tbd
+
+ + +

New features

+
    +
  • GL_NV_conditional_render extension (swrast driver only) +
  • GL_EXT_draw_buffers2 extension (swrast and i965 driver only) +
  • GL_ARB_fragment_coord_conventions extension (for swrast, i965, and Gallium drivers) +
  • GL_EXT_texture_array extension (swrast driver only) +
  • GL_APPLE_object_purgeable extension (swrast and i945/i965 DRI drivers) +
  • Much improved support for EGL in Mesa +
  • New state trackers for OpenGL ES 1.1 and 2.0 +
  • Dedicated documentation for Gallium +
+ + +

Bug fixes

+
    +
  • Massive improvements to the Gallium driver for R300-R500 Radeons; this + driver is now moderately stable but not terribly performant. +
+ + +

Changes

+
    +
  • Removed support for color-index rendering
  • +
  • Removed support for GCC versions earlier than 3.3.0.
  • +
+ + + diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html index b301ee046..3e17a1e94 100644 --- a/mesalib/docs/relnotes.html +++ b/mesalib/docs/relnotes.html @@ -13,6 +13,8 @@ The release notes summarize what's new or changed in each Mesa release.

    +
  • 7.8 release notes +
  • 7.7.1 release notes
  • 7.7 release notes
  • 7.6.1 release notes
  • 7.6 release notes diff --git a/mesalib/docs/repository.html b/mesalib/docs/repository.html index ed385288e..95d274a7a 100644 --- a/mesalib/docs/repository.html +++ b/mesalib/docs/repository.html @@ -1,6 +1,6 @@ -Cocd Repository +Code Repository @@ -9,11 +9,8 @@

    Code Repository

    -As of December 5, 2006, Mesa is using -git +Mesa uses git as its source code management system. -CVS was used previously. -The old CVS repository should no longer be used.

    The master git repository is hosted on @@ -125,6 +122,83 @@ Questions about branch status/activity should be posted to the mesa3d-dev mailing list.

    +

    Developer Git Tips

    + +
      +
    1. Setting up to edit the master branch +

      +If you try to do a pull by just saying git pull +and git complains that you have not specified a +branch, try: +

      +    git config branch.master.remote origin
      +    git config branch.master.merge master
      +
      +Otherwise, you have to say git pull origin master +each time you do a pull. +

      +
    2. Small changes to master +

      +If you are an experienced git user working on substancial modifications, +you are probably +working on a separate branch and would rebase your branch prior to +merging with master. +But for small changes to the master branch itself, +you also need to use the rebase feature in order to avoid an +unnecessary and distracting branch in master. +

      +

      +If it has been awhile since you've done the initial clone, try +

      +    git pull
      +
      +to get the latest files before you start working. +

      +

      +Make your changes and use +

      +    git add <files to commit>
      +    git commit
      +
      +to get your changes ready to push back into the fd.o repository. +

      +

      +It is possible (and likely) that someone has changed master since +you did your last pull. Even if your changes do not conflict with +their changes, git will make a fast-forward +merge branch, branching from the point in time +where you did your last pull and merging it to a point after the other changes. +

      +

      +To avoid this, +

      +    git pull --rebase
      +    git push
      +
      +If you are familiar with CVS or similar system, this is similar to doing a + cvs update in order to update your source tree to +the current repository state, instead of the time you did the last update. +(CVS doesn't work like git in this respect, but this is easiest way +to explain it.) +
      +In any case, your repository now looks like you made your changes after +all the other changes. +

      +

      +If the rebase resulted in conflicts or changes that could affect +the proper operation of your changes, you'll need to investigate +those before doing the push. +

      +

      +If you want the rebase action to be the default action, then +

      +    git config branch.master.rebase true
      +    git config --global branch.autosetuprebase=always
      +
      +

      +See Understanding Git Conceptually for a fairly clear explanation about all of this. +

      +
    diff --git a/mesalib/docs/shading.html b/mesalib/docs/shading.html index bd02335a8..750884cf3 100644 --- a/mesalib/docs/shading.html +++ b/mesalib/docs/shading.html @@ -14,10 +14,6 @@ This page describes the features and status of Mesa's support for the OpenGL Shading Language.

    -

    -Last updated on 15 December 2008. -

    -

    Contents

    diff --git a/mesalib/docs/sourcetree.html b/mesalib/docs/sourcetree.html new file mode 100644 index 000000000..00dc4e7c9 --- /dev/null +++ b/mesalib/docs/sourcetree.html @@ -0,0 +1,165 @@ + + +Mesa Source Tree + + + + + +

    Mesa source code tree overview

    + +

    +This is a brief summary of Mesa's directory tree and what's contained in +each directory. +

    + + +
      +
    • docs - Documentation +
    • include - Public OpenGL header files +
    • src +
        +
      • egl - EGL library sources +
          +
        • docs - EGL documentation +
        • drivers - EGL drivers +
        • main - main EGL library implementation. This is where all + the EGL API functions are implemented, like eglCreateContext(). +
        +
      • mesa - Main Mesa sources +
          +
        • glapi - OpenGL API dispatch layer. This is where all the + GL entrypoints like glClear, glBegin, etc. are generated, as well as + the GL dispatch table. All GL function calls jump through the + dispatch table to functions found in main/. +
        • main - The core Mesa code (mainly state management) +
        • drivers - Mesa drivers (not used with Gallium) +
            +
          • common - code which may be shared by all drivers +
          • dri - Direct Rendering Infrastructure drivers +
              +
            • common - code shared by all DRI drivers +
            • i915 - driver for Intel i915/i945 +
            • i965 - driver for Intel i965 +
            • XXX more +
            +
          • x11 - Xlib-based software driver +
          • osmesa - off-screen software driver +
          • glslcompiler - a stand-alone GLSL compiler driver +
          • XXX more +
          +
        • es - OpenGL ES overlay, parallelly buildable with the core Mesa +
        • math - vertex array translation and transformation code + (not used with Gallium) +
        • ppc - Assembly code/optimizations for PPC systems + (not used with Gallium) +
        • shader - Vertex/fragment shader and GLSL compiler code +
        • sparc - Assembly code/optimizations for SPARC systems + (not used with Gallium) +
        • state_tracker - State tracker / driver for Gallium. This + is basically a Mesa device driver that speaks to Gallium. This + directory may be moved to src/mesa/drivers/gallium at some point. +
        • swrast - Software rasterization module. For drawing points, + lines, triangles, bitmaps, images, etc. in software. + (not used with Gallium) +
        • swrast_setup - Software primitive setup. Does things like + polygon culling, glPolygonMode, polygon offset, etc. + (not used with Gallium) +
        • tnl - Software vertex Transformation 'n Lighting. + (not used with Gallium) +
        • tnl_dd - TNL code for device drivers. + (not used with Gallium) +
        • vbo - Vertex Buffer Object code. All drawing with + glBegin/glEnd, glDrawArrays, display lists, etc. goes through this + module. The results is a well-defined set of vertex arrays which + are passed to the device driver (or tnl module) for rendering. +
        • vf - vertex format conversion (currently unused) +
        • x86 - Assembly code/optimizations for 32-bit x86 systems + (not used with Gallium) +
        • x86-64 - Assembly code/optimizations for 64-bit x86 systems + (not used with Gallium) +
        +
      • gallium - Gallium3D source code +
          +
        • include - Gallium3D header files which define the Gallium3D + interfaces +
        • drivers - Gallium3D device drivers +
            +
          • cell - Driver for Cell processor. +
          • i915 - Driver for Intel i915/i945. +
          • i965 - Driver for Intel i965. +
          • llvmpipe - Software driver using LLVM for runtime code generation. +
          • nv* - Drivers for NVIDIA GPUs. +
          • r300 - Driver for ATI/AMD R300. +
          • softpipe - Software reference driver. +
          • svga - Driver for VMware's SVGA virtual GPU. +
          • trace - Driver for tracing Gallium calls. +
          • XXX more +
          +
        • auxiliary - Gallium support code +
            +
          • draw - Software vertex processing and primitive assembly + module. This includes vertex program execution, clipping, culling + and optional stages for drawing wide lines, stippled lines, + polygon stippling, two-sided lighting, etc. + Intended for use by drivers for hardware that does not have + vertex shaders. + Geometry shaders will also be implemented in this module. +
          • cso_cache - Constant State Objects Cache. Used to filter out + redundant state changes between state trackers and drivers. +
          • gallivm - LLVM module for Gallium. For LLVM-based + compilation, optimization and code generation for TGSI shaders. + Incomplete. +
          • pipebuffer - utility module for managing buffers +
          • rbug - Gallium remote debug utility +
          • rtasm - run-time assembly/machine code generation. + Currently there's run-time code generation for x86/SSE, PowerPC + and Cell SPU. +
          • tgsi - TG Shader Infrastructure. Code for encoding, + manipulating and interpretting GPU programs. +
          • translate - module for translating vertex data from one format + to another. +
          • util - assorted utilities for arithmetic, hashing, surface + creation, memory management, 2D blitting, simple rendering, etc. +
          +
        • state_trackers - +
            +
          • dri - Meta state tracker for DRI drivers +
          • egl - Meta state tracker for EGL drivers +
          • es - OpenGL ES 1.x and 2.x state trackers +
          • g3dvl - +
          • glx - Meta state tracker for GLX +
          • python - +
          • vega - OpenVG 1.x state tracker +
          • wgl - +
          • xorg - Meta state tracker for Xorg video drivers +
          +
        • winsys - +
            +
          • drm - +
          • g3dvl - +
          • gdi - +
          • xlib - +
          +
        +
      +
        +
      • glu - The OpenGL Utility library +
          +
        • sgi - GLU from SGI +
        • mesa - Mesa version of GLU (deprecated) +
        +
      • glut - Mark Kilgard's OpenGL OpenGL Utility Toolkit library +
      • glx - The GLX library code for building libGL. This is used for + direct rendering drivers. It will dynamically load one of the + xxx_dri.so drivers. +
      • glw - Widgets for Xt/Motif. +
      • glew - OpenGL Extension Wrangler library (used by demo programs) +
      +
    • progs - OpenGL test and demonstration programs +
    • lib - where the GL libraries are placed +
    + + + + diff --git a/mesalib/include/EGL/egl.h b/mesalib/include/EGL/egl.h index e33a31572..990ce0a45 100644 --- a/mesalib/include/EGL/egl.h +++ b/mesalib/include/EGL/egl.h @@ -1,9 +1,32 @@ /* -*- mode: c; tab-width: 8; -*- */ /* vi: set sw=4 ts=8: */ /* Reference version of egl.h for EGL 1.4. - * Last modified 2008/05/02 + * $Revision$ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ */ +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are 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 Materials. +** +** THE MATERIALS ARE 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 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + #ifndef __egl_h_ #define __egl_h_ @@ -17,7 +40,7 @@ extern "C" { #endif /* EGL Types */ -typedef int32_t EGLint; +/* EGLint is defined in eglplatform.h */ typedef unsigned int EGLBoolean; typedef unsigned int EGLenum; typedef void *EGLConfig; @@ -42,7 +65,7 @@ typedef void *EGLClientBuffer; #define EGL_TRUE 1 /* Out-of-band handle values */ -#define EGL_DEFAULT_DISPLAY ((void *)0) +#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) #define EGL_NO_CONTEXT ((EGLContext)0) #define EGL_NO_DISPLAY ((EGLDisplay)0) #define EGL_NO_SURFACE ((EGLSurface)0) @@ -86,7 +109,6 @@ typedef void *EGLClientBuffer; #define EGL_NATIVE_RENDERABLE 0x302D #define EGL_NATIVE_VISUAL_ID 0x302E #define EGL_NATIVE_VISUAL_TYPE 0x302F -#define EGL_PRESERVED_RESOURCES 0x3030 #define EGL_SAMPLES 0x3031 #define EGL_SAMPLE_BUFFERS 0x3032 #define EGL_SURFACE_TYPE 0x3033 @@ -291,7 +313,14 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); -EGLAPI void (* EGLAPIENTRY eglGetProcAddress(const char *procname))(void); +/* This is a generic function pointer type, whose name indicates it must + * be cast to the proper type *and calling convention* before use. + */ +typedef void (*__eglMustCastToProperFunctionPointerType)(void); + +/* Now, define eglGetProcAddress using the generic function ptr. type */ +EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY + eglGetProcAddress(const char *procname); #ifdef __cplusplus } diff --git a/mesalib/include/EGL/eglext.h b/mesalib/include/EGL/eglext.h index b65f7f2bc..3be9e5024 100644 --- a/mesalib/include/EGL/eglext.h +++ b/mesalib/include/EGL/eglext.h @@ -6,7 +6,7 @@ extern "C" { #endif /* -** Copyright (c) 2007 The Khronos Group Inc. +** Copyright (c) 2007-2009 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -33,9 +33,9 @@ extern "C" { /*************************************************************/ /* Header file version number */ -/* eglext.h last updated 2007/11/20 */ /* Current version at http://www.khronos.org/registry/egl/ */ -#define EGL_EGLEXT_VERSION 1 +/* $Revision$ on $Date: 2010-01-22 11:38:01 -0800 (Fri, 22 Jan 2010) $ */ +#define EGL_EGLEXT_VERSION 5 #ifndef EGL_KHR_config_attribs #define EGL_KHR_config_attribs 1 @@ -79,12 +79,12 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display #define EGL_KHR_image 1 #define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ typedef void *EGLImageKHR; -extern const EGLImageKHR EGL_NO_IMAGE_KHR; +#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list); +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); #endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, EGLint *attr_list); +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); #endif @@ -120,6 +120,35 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL #define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ #endif +#ifndef EGL_KHR_reusable_sync +#define EGL_KHR_reusable_sync 1 + +typedef void* EGLSyncKHR; +typedef khronos_utime_nanoseconds_t EGLTimeKHR; + +#define EGL_SYNC_STATUS_KHR 0x30F1 +#define EGL_SIGNALED_KHR 0x30F2 +#define EGL_UNSIGNALED_KHR 0x30F3 +#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 +#define EGL_CONDITION_SATISFIED_KHR 0x30F6 +#define EGL_SYNC_TYPE_KHR 0x30F7 +#define EGL_SYNC_REUSABLE_KHR 0x30FA +#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR bitfield */ +#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull +#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); +EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); +EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); +EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); +typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif /* EGL_MESA_screen extension >>> PRELIMINARY <<< */ #ifndef EGL_MESA_screen_surface @@ -179,6 +208,25 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLCont #endif /* EGL_MESA_copy_context */ +#ifndef EGL_KHR_image_base +#define EGL_KHR_image_base 1 +/* Most interfaces defined by EGL_KHR_image_pixmap above */ +#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_image_pixmap +#define EGL_KHR_image_pixmap 1 +/* Interfaces defined by EGL_KHR_image above */ +#endif + +#ifndef EGL_IMG_context_priority +#define EGL_IMG_context_priority 1 +#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 +#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 +#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 +#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 +#endif + #ifdef __cplusplus } #endif diff --git a/mesalib/include/EGL/eglplatform.h b/mesalib/include/EGL/eglplatform.h index 9e83b6000..f71b36258 100644 --- a/mesalib/include/EGL/eglplatform.h +++ b/mesalib/include/EGL/eglplatform.h @@ -1,38 +1,59 @@ -/* -*- mode: c; tab-width: 8; -*- */ -/* vi: set sw=4 ts=8: */ -/* Platform-specific types and definitions for egl.h */ - #ifndef __eglplatform_h_ #define __eglplatform_h_ -/* Windows calling convention boilerplate */ -#if (defined(WIN32) || defined(_WIN32_WCE)) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ -#endif -#include -#endif +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are 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 Materials. +** +** THE MATERIALS ARE 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 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Platform-specific types and definitions for egl.h + * $Revision$ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $ + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "EGL" component "Registry". + */ -#if !defined(_WIN32_WCE) -#include -#include -#endif +#include /* Macros used in EGL function prototype declarations. + * + * EGL functions should be prototyped as: * * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); * - * On Windows, EGLAPIENTRY can be defined like APIENTRY. - * On most other platforms, it should be empty. + * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h */ -#ifndef EGLAPIENTRY -#define EGLAPIENTRY +#ifndef EGLAPI +#define EGLAPI KHRONOS_APICALL #endif -#ifndef EGLAPIENTRYP -#define EGLAPIENTRYP EGLAPIENTRY * + +#ifndef EGLAPIENTRY +#define EGLAPIENTRY KHRONOS_APIENTRY #endif +#define EGLAPIENTRYP EGLAPIENTRY* /* The types NativeDisplayType, NativeWindowType, and NativePixmapType * are aliases of window-system-dependent types, such as X Display * or @@ -41,53 +62,49 @@ * types, renamed in EGL 1.3 so all types in the API start with "EGL". */ -/* Unix (tentative) - #include - typedef Display *NativeDisplayType; - - or maybe, if encoding "hostname:display.head" - typedef const char *NativeWindowType; - etc. - */ - - -#if (defined(WIN32) || defined(_WIN32_WCE)) - -/** BEGIN Added for Windows **/ -#ifndef EGLAPI -#define EGLAPI __declspec(dllexport) +#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 #endif +#include -typedef long int32_t; -typedef unsigned long uint32_t; -typedef unsigned char uint8_t; -#define snprintf _snprintf -#define strcasecmp _stricmp -#define vsnprintf _vsnprintf +typedef HDC EGLNativeDisplayType; +typedef HBITMAP EGLNativePixmapType; +typedef HWND EGLNativeWindowType; -typedef HDC NativeDisplayType; -typedef HWND NativeWindowType; -typedef HBITMAP NativePixmapType; -/** END Added for Windows **/ +#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ -#elif defined(__gnu_linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__APPLE__) +typedef int EGLNativeDisplayType; +typedef void *EGLNativeWindowType; +typedef void *EGLNativePixmapType; +#elif defined(__unix__) || defined(__unix) -/** BEGIN Added for X (Mesa) **/ -#ifndef EGLAPI -#define EGLAPI extern -#endif - +/* X11 (tentative) */ #include -typedef Display *NativeDisplayType; -typedef Window NativeWindowType; -typedef Pixmap NativePixmapType; -/** END Added for X (Mesa) **/ +#include + +typedef Display *EGLNativeDisplayType; +typedef Pixmap EGLNativePixmapType; +typedef Window EGLNativeWindowType; +#else +#error "Platform not recognized" #endif /* EGL 1.2 types, renamed for consistency in EGL 1.3 */ -typedef NativeDisplayType EGLNativeDisplayType; -typedef NativePixmapType EGLNativePixmapType; -typedef NativeWindowType EGLNativeWindowType; +typedef EGLNativeDisplayType NativeDisplayType; +typedef EGLNativePixmapType NativePixmapType; +typedef EGLNativeWindowType NativeWindowType; + + +/* Define EGLint. This must be a signed integral type large enough to contain + * all legal attribute names and values passed into and out of EGL, whether + * their type is boolean, bitmask, enumerant (symbolic constant), integer, + * handle, or other. While in general a 32-bit integer will suffice, if + * handles are 64 bit types, then EGLint should be defined as a signed 64-bit + * integer type. + */ +typedef khronos_int32_t EGLint; #endif /* __eglplatform_h */ diff --git a/mesalib/include/GL/dmesa.h b/mesalib/include/GL/dmesa.h deleted file mode 100644 index 358082e3e..000000000 --- a/mesalib/include/GL/dmesa.h +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/* - * DOS/DJGPP device driver for Mesa - * - * Author: Daniel Borca - * Email : dborca@users.sourceforge.net - * Web : http://www.geocities.com/dborca - */ - - -#ifndef DMESA_H_included -#define DMESA_H_included - -#define DMESA_MAJOR_VERSION 6 -#define DMESA_MINOR_VERSION 5 - -/* Sample Usage: - * - * 1. Call DMesaCreateVisual() to initialize graphics. - * 2. Call DMesaCreateContext() to create a DMesa rendering context. - * 3. Call DMesaCreateBuffer() to define the window. - * 4. Call DMesaMakeCurrent() to bind the DMesaBuffer to a DMesaContext. - * 5. Make gl* calls to render your graphics. - * 6. Use DMesaSwapBuffers() when double buffering to swap front/back buffers. - * 7. Before exiting, destroy DMesaBuffer, DMesaContext and DMesaVisual. - */ - -typedef struct dmesa_context *DMesaContext; -typedef struct dmesa_visual *DMesaVisual; -typedef struct dmesa_buffer *DMesaBuffer; - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Create a new Visual and set graphics mode. - */ -DMesaVisual DMesaCreateVisual (GLint width, /* X res */ - GLint height, /* Y res */ - GLint colDepth, /* BPP */ - GLint refresh, /* refresh rate: 0=default */ - GLboolean dbFlag, /* double-buffered */ - GLboolean rgbFlag, /* RGB mode */ - GLint alphaSize, /* requested bits/alpha */ - GLint depthSize, /* requested bits/depth */ - GLint stencilSize, /* requested bits/stencil */ - GLint accumSize); /* requested bits/accum */ - -/* - * Destroy Visual and restore screen. - */ -void DMesaDestroyVisual (DMesaVisual v); - - - -/* - * Create a new Context for rendering. - */ -DMesaContext DMesaCreateContext (DMesaVisual visual, DMesaContext share); - -/* - * Destroy Context. - */ -void DMesaDestroyContext (DMesaContext c); - -/* - * Return a handle to the current context. - */ -DMesaContext DMesaGetCurrentContext (void); - - - -/* - * Create a new Buffer (window). - */ -DMesaBuffer DMesaCreateBuffer (DMesaVisual visual, - GLint xpos, GLint ypos, - GLint width, GLint height); - -/* - * Destroy Buffer. - */ -void DMesaDestroyBuffer (DMesaBuffer b); - -/* - * Return a handle to the current buffer. - */ -DMesaBuffer DMesaGetCurrentBuffer (void); - -/* - * Swap the front and back buffers for the given Buffer. - * No action is taken if the buffer is not double buffered. - */ -void DMesaSwapBuffers (DMesaBuffer b); - -/* - * Bind Buffer to Context and make the Context the current one. - */ -GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b); - - - -/* - * Move/Resize current Buffer. - */ -GLboolean DMesaMoveBuffer (GLint xpos, GLint ypos); -GLboolean DMesaResizeBuffer (GLint width, GLint height); - -/* - * Set palette index, using normalized values. - */ -void DMesaSetCI (int ndx, GLfloat red, GLfloat green, GLfloat blue); - -/* - * DMesa functions - */ -typedef void (*DMesaProc) (); -DMesaProc DMesaGetProcAddress (const char *name); - -/* - * DMesa state retrieval. - */ -#define DMESA_GET_SCREEN_SIZE 0x0100 -#define DMESA_GET_DRIVER_CAPS 0x0200 -#define DMESA_GET_VIDEO_MODES 0x0300 -#define DMESA_GET_BUFFER_ADDR 0x0400 - -#define DMESA_DRIVER_DBL_BIT 0x1 /* double-buffered */ -#define DMESA_DRIVER_YUP_BIT 0x2 /* lower-left window origin */ -int DMesaGetIntegerv (GLenum pname, GLint *params); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/mesalib/include/GL/ggimesa.h b/mesalib/include/GL/ggimesa.h deleted file mode 100644 index 90e0b4222..000000000 --- a/mesalib/include/GL/ggimesa.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Mesa 3-D graphics library GGI bindings (GGIGL [giggle]) - * Version: 4.0 - * Copyright (C) 1995-2000 Brian Paul - * Copyright (C) 1998 Uwe Maurer - * Copyrigth (C) 2001 Filip Spacek - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef GGIMESA_H -#define GGIMESA_H - -#define GGIMESA_MAJOR_VERSION 4 -#define GGIMESA_MINOR_VERSION 0 - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include "GL/gl.h" - -typedef struct ggi_mesa_context *ggi_mesa_context_t; - -/* - * Initialize Mesa GGI extension - */ -int ggiMesaInit(void); -/* - * Clean up Mesa GGI exension - */ -int ggiMesaExit(void); - -/* - * Attach Mesa GGI extension to the visual 'vis' - */ -int ggiMesaAttach(ggi_visual_t vis); -/* - * Detach Mesa GGI extension from the visual 'vis' - */ -int ggiMesaDetach(ggi_visual_t vis); - -int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag, - GLboolean stereo_flag, GLint depth_size, - GLint stencil_size, GLint accum_red_size, - GLint accum_green_size, GLint accum_blue_size, - GLint accum_alpha_size, GLint num_samples); - -/* - * Create a new context capable of displaying on the visual vis. - */ -ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis); -/* - * Destroy the context 'ctx' - */ -void ggiMesaDestroyContext(ggi_mesa_context_t ctx); - -/* - * Make context 'ctx' the current context and bind it to visual 'vis'. - * Note that the context must have been created with respect to that visual. - */ -void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis); - -void ggiMesaSwapBuffers(void); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/mesalib/include/GL/gl.h b/mesalib/include/GL/gl.h index 5f8bc2b70..8e5f1383f 100644 --- a/mesalib/include/GL/gl.h +++ b/mesalib/include/GL/gl.h @@ -67,7 +67,7 @@ #elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ # define GLAPI extern # define GLAPIENTRY __stdcall -#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +#elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) # define GLAPI __attribute__((visibility("default"))) # define GLAPIENTRY #endif /* WIN32 && !CYGWIN */ @@ -85,7 +85,9 @@ * glut.h or gl.h. */ #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 +#endif #include #endif @@ -2193,6 +2195,21 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen #endif /* GL_ATI_blend_equation_separate */ +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +typedef void* GLeglImageOES; +#endif + +#ifndef GL_OES_EGL_image +#define GL_OES_EGL_image 1 +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +#endif +typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +#endif + /** ** NOTE!!!!! If you add new functions to this file, or update diff --git a/mesalib/include/GL/gl_mangle.h b/mesalib/include/GL/gl_mangle.h index 59f614979..43d2e896b 100644 --- a/mesalib/include/GL/gl_mangle.h +++ b/mesalib/include/GL/gl_mangle.h @@ -30,6 +30,7 @@ /*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */ #define glAccum MANGLE(Accum) +#define glActiveProgramEXT MANGLE(ActiveProgramEXT) #define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT) #define glActiveTextureARB MANGLE(ActiveTextureARB) #define glActiveTexture MANGLE(ActiveTexture) @@ -60,6 +61,7 @@ #define glBeginTransformFeedback MANGLE(BeginTransformFeedback) #define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV) #define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT) +#define glBeginVideoCaptureNV MANGLE(BeginVideoCaptureNV) #define glBindAttribLocationARB MANGLE(BindAttribLocationARB) #define glBindAttribLocation MANGLE(BindAttribLocation) #define glBindBufferARB MANGLE(BindBufferARB) @@ -93,6 +95,8 @@ #define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE) #define glBindVertexArray MANGLE(BindVertexArray) #define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT) +#define glBindVideoCaptureStreamBufferNV MANGLE(BindVideoCaptureStreamBufferNV) +#define glBindVideoCaptureStreamTextureNV MANGLE(BindVideoCaptureStreamTextureNV) #define glBinormal3bEXT MANGLE(Binormal3bEXT) #define glBinormal3bvEXT MANGLE(Binormal3bvEXT) #define glBinormal3dEXT MANGLE(Binormal3dEXT) @@ -126,6 +130,7 @@ #define glBlendFuncSeparate MANGLE(BlendFuncSeparate) #define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT) #define glBlitFramebuffer MANGLE(BlitFramebuffer) +#define glBufferAddressRangeNV MANGLE(BufferAddressRangeNV) #define glBufferDataARB MANGLE(BufferDataARB) #define glBufferData MANGLE(BufferData) #define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE) @@ -202,6 +207,7 @@ #define glColor4uiv MANGLE(Color4uiv) #define glColor4us MANGLE(Color4us) #define glColor4usv MANGLE(Color4usv) +#define glColorFormatNV MANGLE(ColorFormatNV) #define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI) #define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI) #define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI) @@ -276,6 +282,7 @@ #define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D) #define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT) #define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D) +#define glCopyImageSubDataNV MANGLE(CopyImageSubDataNV) #define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT) #define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT) #define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT) @@ -302,6 +309,7 @@ #define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB) #define glCreateShader MANGLE(CreateShader) #define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB) +#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT) #define glCullFace MANGLE(CullFace) #define glCullParameterdvEXT MANGLE(CullParameterdvEXT) #define glCullParameterfvEXT MANGLE(CullParameterfvEXT) @@ -379,11 +387,14 @@ #define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT) #define glDrawRangeElements MANGLE(DrawRangeElements) #define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV) +#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV) #define glEdgeFlag MANGLE(EdgeFlag) #define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT) #define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM) #define glEdgeFlagPointer MANGLE(EdgeFlagPointer) #define glEdgeFlagv MANGLE(EdgeFlagv) +#define glEGLImageTargetRenderbufferStorageOES MANGLE(EGLImageTargetRenderbufferStorageOES) +#define glEGLImageTargetTexture2DOES MANGLE(EGLImageTargetTexture2DOES) #define glElementPointerAPPLE MANGLE(ElementPointerAPPLE) #define glElementPointerATI MANGLE(ElementPointerATI) #define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT) @@ -408,6 +419,7 @@ #define glEndTransformFeedback MANGLE(EndTransformFeedback) #define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV) #define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT) +#define glEndVideoCaptureNV MANGLE(EndVideoCaptureNV) #define glEvalCoord1d MANGLE(EvalCoord1d) #define glEvalCoord1dv MANGLE(EvalCoord1dv) #define glEvalCoord1f MANGLE(EvalCoord1f) @@ -445,6 +457,7 @@ #define glFogCoorddv MANGLE(FogCoorddv) #define glFogCoordfEXT MANGLE(FogCoordfEXT) #define glFogCoordf MANGLE(FogCoordf) +#define glFogCoordFormatNV MANGLE(FogCoordFormatNV) #define glFogCoordfvEXT MANGLE(FogCoordfvEXT) #define glFogCoordfv MANGLE(FogCoordfv) #define glFogCoordhNV MANGLE(FogCoordhNV) @@ -544,6 +557,7 @@ #define glGetBufferParameteri64v MANGLE(GetBufferParameteri64v) #define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB) #define glGetBufferParameteriv MANGLE(GetBufferParameteriv) +#define glGetBufferParameterui64vNV MANGLE(GetBufferParameterui64vNV) #define glGetBufferPointervARB MANGLE(GetBufferPointervARB) #define glGetBufferPointerv MANGLE(GetBufferPointerv) #define glGetBufferSubDataARB MANGLE(GetBufferSubDataARB) @@ -609,6 +623,8 @@ #define glGetInteger64v MANGLE(GetInteger64v) #define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT) #define glGetIntegeri_v MANGLE(GetIntegeri_v) +#define glGetIntegerui64i_vNV MANGLE(GetIntegerui64i_vNV) +#define glGetIntegerui64vNV MANGLE(GetIntegerui64vNV) #define glGetIntegerv MANGLE(GetIntegerv) #define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT) #define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT) @@ -651,6 +667,7 @@ #define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT) #define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT) #define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT) +#define glGetNamedBufferParameterui64vNV MANGLE(GetNamedBufferParameterui64vNV) #define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT) #define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT) #define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT) @@ -761,6 +778,7 @@ #define glGetUniformLocationARB MANGLE(GetUniformLocationARB) #define glGetUniformLocation MANGLE(GetUniformLocation) #define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT) +#define glGetUniformui64vNV MANGLE(GetUniformui64vNV) #define glGetUniformuivEXT MANGLE(GetUniformuivEXT) #define glGetUniformuiv MANGLE(GetUniformuiv) #define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI) @@ -788,6 +806,10 @@ #define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB) #define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv) #define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV) +#define glGetVideoCaptureivNV MANGLE(GetVideoCaptureivNV) +#define glGetVideoCaptureStreamdvNV MANGLE(GetVideoCaptureStreamdvNV) +#define glGetVideoCaptureStreamfvNV MANGLE(GetVideoCaptureStreamfvNV) +#define glGetVideoCaptureStreamivNV MANGLE(GetVideoCaptureStreamivNV) #define glGetVideoi64vNV MANGLE(GetVideoi64vNV) #define glGetVideoivNV MANGLE(GetVideoivNV) #define glGetVideoui64vNV MANGLE(GetVideoui64vNV) @@ -812,6 +834,7 @@ #define glIndexd MANGLE(Indexd) #define glIndexdv MANGLE(Indexdv) #define glIndexf MANGLE(Indexf) +#define glIndexFormatNV MANGLE(IndexFormatNV) #define glIndexFuncEXT MANGLE(IndexFuncEXT) #define glIndexfv MANGLE(Indexfv) #define glIndexi MANGLE(Indexi) @@ -832,6 +855,7 @@ #define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX) #define glIsBufferARB MANGLE(IsBufferARB) #define glIsBuffer MANGLE(IsBuffer) +#define glIsBufferResidentNV MANGLE(IsBufferResidentNV) #define glIsEnabledi MANGLE(IsEnabledi) #define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT) #define glIsEnabled MANGLE(IsEnabled) @@ -840,6 +864,7 @@ #define glIsFramebufferEXT MANGLE(IsFramebufferEXT) #define glIsFramebuffer MANGLE(IsFramebuffer) #define glIsList MANGLE(IsList) +#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV) #define glIsObjectBufferATI MANGLE(IsObjectBufferATI) #define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV) #define glIsProgramARB MANGLE(IsProgramARB) @@ -888,6 +913,8 @@ #define glLoadTransposeMatrixf MANGLE(LoadTransposeMatrixf) #define glLockArraysEXT MANGLE(LockArraysEXT) #define glLogicOp MANGLE(LogicOp) +#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV) +#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV) #define glMap1d MANGLE(Map1d) #define glMap1f MANGLE(Map1f) #define glMap2d MANGLE(Map2d) @@ -1060,6 +1087,8 @@ #define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT) #define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT) #define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT) +#define glNamedMakeBufferNonResidentNV MANGLE(NamedMakeBufferNonResidentNV) +#define glNamedMakeBufferResidentNV MANGLE(NamedMakeBufferResidentNV) #define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT) #define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT) #define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT) @@ -1091,6 +1120,7 @@ #define glNormal3iv MANGLE(Normal3iv) #define glNormal3s MANGLE(Normal3s) #define glNormal3sv MANGLE(Normal3sv) +#define glNormalFormatNV MANGLE(NormalFormatNV) #define glNormalPointerEXT MANGLE(NormalPointerEXT) #define glNormalPointerListIBM MANGLE(NormalPointerListIBM) #define glNormalPointer MANGLE(NormalPointer) @@ -1234,6 +1264,8 @@ #define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT) #define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT) #define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT) +#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV) +#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV) #define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV) #define glProvokingVertexEXT MANGLE(ProvokingVertexEXT) #define glProvokingVertex MANGLE(ProvokingVertex) @@ -1362,6 +1394,7 @@ #define glSecondaryColor3us MANGLE(SecondaryColor3us) #define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT) #define glSecondaryColor3usv MANGLE(SecondaryColor3usv) +#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV) #define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT) #define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM) #define glSecondaryColorPointer MANGLE(SecondaryColorPointer) @@ -1475,6 +1508,7 @@ #define glTexCoord4iv MANGLE(TexCoord4iv) #define glTexCoord4s MANGLE(TexCoord4s) #define glTexCoord4sv MANGLE(TexCoord4sv) +#define glTexCoordFormatNV MANGLE(TexCoordFormatNV) #define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT) #define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM) #define glTexCoordPointer MANGLE(TexCoordPointer) @@ -1513,6 +1547,7 @@ #define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT) #define glTexSubImage3D MANGLE(TexSubImage3D) #define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS) +#define glTextureBarrierNV MANGLE(TextureBarrierNV) #define glTextureBufferEXT MANGLE(TextureBufferEXT) #define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS) #define glTextureImage1DEXT MANGLE(TextureImage1DEXT) @@ -1601,6 +1636,8 @@ #define glUniformMatrix4fv MANGLE(UniformMatrix4fv) #define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv) #define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv) +#define glUniformui64NV MANGLE(Uniformui64NV) +#define glUniformui64vNV MANGLE(Uniformui64vNV) #define glUnlockArraysEXT MANGLE(UnlockArraysEXT) #define glUnmapBufferARB MANGLE(UnmapBufferARB) #define glUnmapBuffer MANGLE(UnmapBuffer) @@ -1609,6 +1646,7 @@ #define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI) #define glUseProgram MANGLE(UseProgram) #define glUseProgramObjectARB MANGLE(UseProgramObjectARB) +#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT) #define glValidateProgramARB MANGLE(ValidateProgramARB) #define glValidateProgram MANGLE(ValidateProgram) #define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI) @@ -1762,6 +1800,7 @@ #define glVertexAttrib4usv MANGLE(VertexAttrib4usv) #define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI) #define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB) +#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV) #define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT) #define glVertexAttribI1i MANGLE(VertexAttribI1i) #define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT) @@ -1802,6 +1841,7 @@ #define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv) #define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT) #define glVertexAttribI4usv MANGLE(VertexAttribI4usv) +#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV) #define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT) #define glVertexAttribIPointer MANGLE(VertexAttribIPointer) #define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB) @@ -1827,6 +1867,7 @@ #define glVertexBlendARB MANGLE(VertexBlendARB) #define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI) #define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI) +#define glVertexFormatNV MANGLE(VertexFormatNV) #define glVertexPointerEXT MANGLE(VertexPointerEXT) #define glVertexPointerListIBM MANGLE(VertexPointerListIBM) #define glVertexPointer MANGLE(VertexPointer) @@ -1868,6 +1909,10 @@ #define glVertexWeighthNV MANGLE(VertexWeighthNV) #define glVertexWeighthvNV MANGLE(VertexWeighthvNV) #define glVertexWeightPointerEXT MANGLE(VertexWeightPointerEXT) +#define glVideoCaptureNV MANGLE(VideoCaptureNV) +#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV) +#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV) +#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV) #define glViewport MANGLE(Viewport) #define glWaitSync MANGLE(WaitSync) #define glWeightbvARB MANGLE(WeightbvARB) diff --git a/mesalib/include/GL/glx.h b/mesalib/include/GL/glx.h index 288440140..fd53964ea 100644 --- a/mesalib/include/GL/glx.h +++ b/mesalib/include/GL/glx.h @@ -186,6 +186,16 @@ typedef XID GLXWindow; typedef XID GLXPbuffer; +/* +** Events. +** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX +** event - this helps initialization if the server supports the pbuffer +** extension and the client doesn't. +*/ +#define GLX_PbufferClobber 0 +#define GLX_BufferSwapComplete 1 + +#define __GLX_NUMBER_EVENTS 17 extern XVisualInfo* glXChooseVisual( Display *dpy, int screen, int *attribList ); @@ -507,8 +517,21 @@ typedef struct { int count; /* if nonzero, at least this many more */ } GLXPbufferClobberEvent; +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + GLXDrawable drawable; /* drawable on which event was requested in event mask */ + int event_type; + int64_t ust; + int64_t msc; + int64_t sbc; +} GLXBufferSwapComplete; + typedef union __GLXEvent { GLXPbufferClobberEvent glxpbufferclobber; + GLXBufferSwapComplete glxbufferswapcomplete; long pad[24]; } GLXEvent; diff --git a/mesalib/include/GL/glxext.h b/mesalib/include/GL/glxext.h index 9ac0592e0..50740dd29 100644 --- a/mesalib/include/GL/glxext.h +++ b/mesalib/include/GL/glxext.h @@ -696,6 +696,14 @@ extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable); typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); #endif +#ifndef GLX_INTEL_swap_event +#define GLX_INTEL_swap_event +#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x10000000 +#define GLX_EXCHANGE_COMPLETE_INTEL 0x8024 +#define GLX_BLIT_COMPLETE_INTEL 0x8025 +#define GLX_FLIP_COMPLETE_INTEL 0x8026 +#endif + #ifndef GLX_SGIX_swap_barrier #define GLX_SGIX_swap_barrier 1 #ifdef GLX_GLXEXT_PROTOTYPES diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h index 910c9166b..1d4e82e15 100644 --- a/mesalib/include/GL/internal/dri_interface.h +++ b/mesalib/include/GL/internal/dri_interface.h @@ -230,6 +230,13 @@ struct __DRItexOffsetExtensionRec { }; +/* Valid values for format in the setTexBuffer2 function below. These + * values match the GLX tokens for compatibility reasons, but we + * define them here since the DRI interface can't depend on GLX. */ +#define __DRI_TEXTURE_FORMAT_NONE 0x20D8 +#define __DRI_TEXTURE_FORMAT_RGB 0x20D9 +#define __DRI_TEXTURE_FORMAT_RGBA 0x20DA + #define __DRI_TEX_BUFFER "DRI_TexBuffer" #define __DRI_TEX_BUFFER_VERSION 2 struct __DRItexBufferExtensionRec { @@ -262,10 +269,20 @@ struct __DRItexBufferExtensionRec { * Used by drivers that implement DRI2 */ #define __DRI2_FLUSH "DRI2_Flush" -#define __DRI2_FLUSH_VERSION 1 +#define __DRI2_FLUSH_VERSION 3 struct __DRI2flushExtensionRec { __DRIextension base; void (*flush)(__DRIdrawable *drawable); + + /** + * Ask the driver to call getBuffers/getBuffersWithFormat before + * it starts rendering again. + * + * \param drawable the drawable to invalidate + * + * \since 3 + */ + void (*invalidate)(__DRIdrawable *drawable); }; @@ -734,4 +751,59 @@ struct __DRIdri2ExtensionRec { }; + +/** + * This extension provides functionality to enable various EGLImage + * extensions. + */ +#define __DRI_IMAGE "DRI_IMAGE" +#define __DRI_IMAGE_VERSION 1 + +/** + * These formats correspond to the similarly named MESA_FORMAT_* + * tokens, except in the native endian of the CPU. For example, on + * little endian __DRI_IMAGE_FORMAT_XRGB8888 corresponds to + * MESA_FORMAT_XRGB8888, but MESA_FORMAT_XRGB8888_REV on big endian. + */ +#define __DRI_IMAGE_FORMAT_RGB565 0x1001 +#define __DRI_IMAGE_FORMAT_XRGB8888 0x1002 +#define __DRI_IMAGE_FORMAT_ARGB8888 0x1003 + +typedef struct __DRIimageRec __DRIimage; +typedef struct __DRIimageExtensionRec __DRIimageExtension; +struct __DRIimageExtensionRec { + __DRIextension base; + + __DRIimage *(*createImageFromName)(__DRIcontext *context, + int width, int height, int format, + int name, int pitch, + void *loaderPrivate); + + __DRIimage *(*createImageFromRenderbuffer)(__DRIcontext *context, + int renderbuffer, + void *loaderPrivate); + + void (*destroyImage)(__DRIimage *image); +}; + +/** + * This extension must be implemented by the loader and passed to the + * driver at screen creation time. The EGLImage entry points in the + * various client APIs take opaque EGLImage handles and use this + * extension to map them to a __DRIimage. At version 1, this + * extensions allows mapping EGLImage pointers to __DRIimage pointers, + * but future versions could support other EGLImage-like, opaque types + * with new lookup functions. + */ +#define __DRI_IMAGE_LOOKUP "DRI_IMAGE_LOOKUP" +#define __DRI_IMAGE_LOOKUP_VERSION 1 + +typedef struct __DRIimageLookupExtensionRec __DRIimageLookupExtension; +struct __DRIimageLookupExtensionRec { + __DRIextension base; + + __DRIimage *(*lookupEGLImage)(__DRIcontext *context, void *image, + void *loaderPrivate); +}; + #endif diff --git a/mesalib/include/GL/internal/glcore.h b/mesalib/include/GL/internal/glcore.h index 18f657662..547b11137 100644 --- a/mesalib/include/GL/internal/glcore.h +++ b/mesalib/include/GL/internal/glcore.h @@ -178,8 +178,4 @@ typedef struct __GLcontextModesRec { #define GLX_TEXTURE_2D_BIT_EXT 0x00000002 #define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 -#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 -#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 -#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA - #endif /* __gl_core_h_ */ diff --git a/mesalib/include/GL/svgamesa.h b/mesalib/include/GL/svgamesa.h deleted file mode 100644 index 67c0e4c5c..000000000 --- a/mesalib/include/GL/svgamesa.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 4.0 - * Copyright (C) 1995-2001 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -/* - * SVGA/Mesa interface for Linux. - */ - - -/* - * Intro to using the VGA/Mesa interface - * - * 1. #include the file - * 2. Call vga_init() to initialize the SVGA library. - * 3. Call vga_setmode() to specify the screen size and color depth. - * 4. Call SVGAMesaCreateContext() to setup a Mesa context. If using 8-bit - * color Mesa assumes color index mode, if using 16-bit or deeper color - * Mesa assumes RGB mode. - * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context. - * 6. You can now use the Mesa API functions. - * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT) - * to restore the original text screen. - * - * Notes - * 1. You must run your executable as root (or use the set UID-bit) because - * the SVGA library requires it. - * 2. The SVGA driver is not fully implemented yet. See svgamesa.c for what - * has to be done yet. - */ - - -#ifndef SVGAMESA_H -#define SVGAMESA_H - - -#define SVGAMESA_MAJOR_VERSION 4 -#define SVGAMESA_MINOR_VERSION 0 - - -#ifdef __cplusplus -extern "C" { -#endif - - -#include "GL/gl.h" - - - -/* - * This is the SVGAMesa context 'handle': - */ -typedef struct svgamesa_context *SVGAMesaContext; - - - -/* - * doubleBuffer flag new in version 2.4 - */ -extern int SVGAMesaInit( int GraphMode ); - -extern int SVGAMesaClose( void ); - -extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer ); - -extern void SVGAMesaDestroyContext( SVGAMesaContext ctx ); - -extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx ); - -extern void SVGAMesaSwapBuffers( void ); - -extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue); - -extern SVGAMesaContext SVGAMesaGetCurrentContext( void ); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/mesalib/include/KHR/khrplatform.h b/mesalib/include/KHR/khrplatform.h new file mode 100644 index 000000000..64dfa7189 --- /dev/null +++ b/mesalib/include/KHR/khrplatform.h @@ -0,0 +1,273 @@ +#ifndef __khrplatform_h_ +#define __khrplatform_h_ + +/* +** Copyright (c) 2008-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are 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 Materials. +** +** THE MATERIALS ARE 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 +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Khronos platform-specific types and definitions. + * + * $Revision$ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ + * + * Adopters may modify this file to suit their platform. Adopters are + * encouraged to submit platform specific modifications to the Khronos + * group so that they can be included in future versions of this file. + * Please submit changes by sending them to the public Khronos Bugzilla + * (http://khronos.org/bugzilla) by filing a bug against product + * "Khronos (general)" component "Registry". + * + * A predefined template which fills in some of the bug fields can be + * reached using http://tinyurl.com/khrplatform-h-bugreport, but you + * must create a Bugzilla login first. + * + * + * See the Implementer's Guidelines for information about where this file + * should be located on your system and for more details of its use: + * http://www.khronos.org/registry/implementers_guide.pdf + * + * This file should be included as + * #include + * by Khronos client API header files that use its types and defines. + * + * The types in khrplatform.h should only be used to define API-specific types. + * + * Types defined in khrplatform.h: + * khronos_int8_t signed 8 bit + * khronos_uint8_t unsigned 8 bit + * khronos_int16_t signed 16 bit + * khronos_uint16_t unsigned 16 bit + * khronos_int32_t signed 32 bit + * khronos_uint32_t unsigned 32 bit + * khronos_int64_t signed 64 bit + * khronos_uint64_t unsigned 64 bit + * khronos_intptr_t signed same number of bits as a pointer + * khronos_uintptr_t unsigned same number of bits as a pointer + * khronos_ssize_t signed size + * khronos_usize_t unsigned size + * khronos_float_t signed 32 bit floating point + * khronos_time_ns_t unsigned 64 bit time in nanoseconds + * khronos_utime_nanoseconds_t unsigned time interval or absolute time in + * nanoseconds + * khronos_stime_nanoseconds_t signed time interval in nanoseconds + * khronos_boolean_enum_t enumerated boolean type. This should + * only be used as a base type when a client API's boolean type is + * an enum. Client APIs which use an integer or other type for + * booleans cannot use this as the base type for their boolean. + * + * Tokens defined in khrplatform.h: + * + * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. + * + * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. + * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. + * + * Calling convention macros defined in this file: + * KHRONOS_APICALL + * KHRONOS_APIENTRY + * KHRONOS_APIATTRIBUTES + * + * These may be used in function prototypes as: + * + * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( + * int arg1, + * int arg2) KHRONOS_APIATTRIBUTES; + */ + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APICALL + *------------------------------------------------------------------------- + * This precedes the return type of the function in the function prototype. + */ +#if defined(_WIN32) && !defined(__SCITECH_SNAP__) +# define KHRONOS_APICALL __declspec(dllimport) +#elif defined (__SYMBIAN32__) +# define KHRONOS_APICALL IMPORT_C +#elif (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \ + || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) +/* KHRONOS_APIATTRIBUTES is not used by the client API headers yet */ +# define KHRONOS_APICALL __attribute__((visibility("default"))) +#else +# define KHRONOS_APICALL +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIENTRY + *------------------------------------------------------------------------- + * This follows the return type of the function and precedes the function + * name in the function prototype. + */ +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) + /* Win32 but not WinCE */ +# define KHRONOS_APIENTRY __stdcall +#else +# define KHRONOS_APIENTRY +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIATTRIBUTES + *------------------------------------------------------------------------- + * This follows the closing parenthesis of the function prototype arguments. + */ +#if defined (__ARMCC_2__) +#define KHRONOS_APIATTRIBUTES __softfp +#else +#define KHRONOS_APIATTRIBUTES +#endif + +/*------------------------------------------------------------------------- + * basic type definitions + *-----------------------------------------------------------------------*/ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) + + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__VMS ) || defined(__sgi) + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) + +/* + * Win32 + */ +typedef __int32 khronos_int32_t; +typedef unsigned __int32 khronos_uint32_t; +typedef __int64 khronos_int64_t; +typedef unsigned __int64 khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__sun__) || defined(__digital__) + +/* + * Sun or Digital + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#if defined(__arch64__) || defined(_LP64) +typedef long int khronos_int64_t; +typedef unsigned long int khronos_uint64_t; +#else +typedef long long int khronos_int64_t; +typedef unsigned long long int khronos_uint64_t; +#endif /* __arch64__ */ +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif 0 + +/* + * Hypothetical platform with no float or int64 support + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#define KHRONOS_SUPPORT_INT64 0 +#define KHRONOS_SUPPORT_FLOAT 0 + +#else + +/* + * Generic fallback + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#endif + + +/* + * Types that are (so far) the same on all platforms + */ +typedef signed char khronos_int8_t; +typedef unsigned char khronos_uint8_t; +typedef signed short int khronos_int16_t; +typedef unsigned short int khronos_uint16_t; +typedef signed long int khronos_intptr_t; +typedef unsigned long int khronos_uintptr_t; +typedef signed long int khronos_ssize_t; +typedef unsigned long int khronos_usize_t; + +#if KHRONOS_SUPPORT_FLOAT +/* + * Float type + */ +typedef float khronos_float_t; +#endif + +#if KHRONOS_SUPPORT_INT64 +/* Time types + * + * These types can be used to represent a time interval in nanoseconds or + * an absolute Unadjusted System Time. Unadjusted System Time is the number + * of nanoseconds since some arbitrary system event (e.g. since the last + * time the system booted). The Unadjusted System Time is an unsigned + * 64 bit value that wraps back to 0 every 584 years. Time intervals + * may be either signed or unsigned. + */ +typedef khronos_uint64_t khronos_utime_nanoseconds_t; +typedef khronos_int64_t khronos_stime_nanoseconds_t; +#endif + +/* + * Dummy value used to pad enum types to 32 bits. + */ +#ifndef KHRONOS_MAX_ENUM +#define KHRONOS_MAX_ENUM 0x7FFFFFFF +#endif + +/* + * Enumerated boolean type + * + * Values other than zero should be considered to be true. Therefore + * comparisons should not be made against KHRONOS_TRUE. + */ +typedef enum { + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM +} khronos_boolean_enum_t; + +#endif /* __khrplatform_h_ */ diff --git a/mesalib/include/VG/openvg.h b/mesalib/include/VG/openvg.h new file mode 100644 index 000000000..fa37fa373 --- /dev/null +++ b/mesalib/include/VG/openvg.h @@ -0,0 +1,686 @@ +/* $Revision$ on $Date:: 2008-10-30 05:14:19 -0400 #$ */ + +/*------------------------------------------------------------------------ + * + * OpenVG 1.0.1 Reference Implementation + * ------------------------------------- + * + * Copyright (c) 2008 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and /or associated documentation files + * (the "Materials "), to deal in the Materials without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Materials, + * and to permit persons to whom the Materials are 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 Materials. + * + * THE MATERIALS ARE 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 MATERIALS OR + * THE USE OR OTHER DEALINGS IN THE MATERIALS. + * + *//** + * \file + * \brief OpenVG 1.0.1 API. + *//*-------------------------------------------------------------------*/ + +#ifndef _OPENVG_H +#define _OPENVG_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define OPENVG_VERSION_1_0 1 +#define OPENVG_VERSION_1_0_1 1 + +#ifndef VG_MAXSHORT +#define VG_MAXSHORT 0x7FFF +#endif + +#ifndef VG_MAXINT +#define VG_MAXINT 0x7FFFFFFF +#endif + +#ifndef VG_MAX_ENUM +#define VG_MAX_ENUM 0x7FFFFFFF +#endif + +typedef long VGHandle; + +typedef VGHandle VGPath; +typedef VGHandle VGImage; +typedef VGHandle VGPaint; + +#define VG_INVALID_HANDLE ((VGHandle)0) + +typedef enum { + VG_FALSE = 0, + VG_TRUE = 1, + + VG_BOOLEAN_FORCE_SIZE = VG_MAX_ENUM +} VGboolean; + +typedef enum { + VG_NO_ERROR = 0, + VG_BAD_HANDLE_ERROR = 0x1000, + VG_ILLEGAL_ARGUMENT_ERROR = 0x1001, + VG_OUT_OF_MEMORY_ERROR = 0x1002, + VG_PATH_CAPABILITY_ERROR = 0x1003, + VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004, + VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005, + VG_IMAGE_IN_USE_ERROR = 0x1006, + VG_NO_CONTEXT_ERROR = 0x1007, + + VG_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM +} VGErrorCode; + +typedef enum { + /* Mode settings */ + VG_MATRIX_MODE = 0x1100, + VG_FILL_RULE = 0x1101, + VG_IMAGE_QUALITY = 0x1102, + VG_RENDERING_QUALITY = 0x1103, + VG_BLEND_MODE = 0x1104, + VG_IMAGE_MODE = 0x1105, + + /* Scissoring rectangles */ + VG_SCISSOR_RECTS = 0x1106, + + /* Stroke parameters */ + VG_STROKE_LINE_WIDTH = 0x1110, + VG_STROKE_CAP_STYLE = 0x1111, + VG_STROKE_JOIN_STYLE = 0x1112, + VG_STROKE_MITER_LIMIT = 0x1113, + VG_STROKE_DASH_PATTERN = 0x1114, + VG_STROKE_DASH_PHASE = 0x1115, + VG_STROKE_DASH_PHASE_RESET = 0x1116, + + /* Edge fill color for VG_TILE_FILL tiling mode */ + VG_TILE_FILL_COLOR = 0x1120, + + /* Color for vgClear */ + VG_CLEAR_COLOR = 0x1121, + + /* Enable/disable alpha masking and scissoring */ + VG_MASKING = 0x1130, + VG_SCISSORING = 0x1131, + + /* Pixel layout information */ + VG_PIXEL_LAYOUT = 0x1140, + VG_SCREEN_LAYOUT = 0x1141, + + /* Source format selection for image filters */ + VG_FILTER_FORMAT_LINEAR = 0x1150, + VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151, + + /* Destination write enable mask for image filters */ + VG_FILTER_CHANNEL_MASK = 0x1152, + + /* Implementation limits (read-only) */ + VG_MAX_SCISSOR_RECTS = 0x1160, + VG_MAX_DASH_COUNT = 0x1161, + VG_MAX_KERNEL_SIZE = 0x1162, + VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163, + VG_MAX_COLOR_RAMP_STOPS = 0x1164, + VG_MAX_IMAGE_WIDTH = 0x1165, + VG_MAX_IMAGE_HEIGHT = 0x1166, + VG_MAX_IMAGE_PIXELS = 0x1167, + VG_MAX_IMAGE_BYTES = 0x1168, + VG_MAX_FLOAT = 0x1169, + VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A, + + VG_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM +} VGParamType; + +typedef enum { + VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200, + VG_RENDERING_QUALITY_FASTER = 0x1201, + VG_RENDERING_QUALITY_BETTER = 0x1202, /* Default */ + + VG_RENDERING_QUALITY_FORCE_SIZE = VG_MAX_ENUM +} VGRenderingQuality; + +typedef enum { + VG_PIXEL_LAYOUT_UNKNOWN = 0x1300, + VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301, + VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302, + VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303, + VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304, + + VG_PIXEL_LAYOUT_FORCE_SIZE = VG_MAX_ENUM +} VGPixelLayout; + +typedef enum { + VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400, + VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401, + VG_MATRIX_FILL_PAINT_TO_USER = 0x1402, + VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403, + + VG_MATRIX_MODE_FORCE_SIZE = VG_MAX_ENUM +} VGMatrixMode; + +typedef enum { + VG_CLEAR_MASK = 0x1500, + VG_FILL_MASK = 0x1501, + VG_SET_MASK = 0x1502, + VG_UNION_MASK = 0x1503, + VG_INTERSECT_MASK = 0x1504, + VG_SUBTRACT_MASK = 0x1505, + + VG_MASK_OPERATION_FORCE_SIZE = VG_MAX_ENUM +} VGMaskOperation; + +#define VG_PATH_FORMAT_STANDARD 0 + +typedef enum { + VG_PATH_DATATYPE_S_8 = 0, + VG_PATH_DATATYPE_S_16 = 1, + VG_PATH_DATATYPE_S_32 = 2, + VG_PATH_DATATYPE_F = 3, + + VG_PATH_DATATYPE_FORCE_SIZE = VG_MAX_ENUM +} VGPathDatatype; + +typedef enum { + VG_ABSOLUTE = 0, + VG_RELATIVE = 1, + + VG_PATH_ABS_REL_FORCE_SIZE = VG_MAX_ENUM +} VGPathAbsRel; + +typedef enum { + VG_CLOSE_PATH = ( 0 << 1), + VG_MOVE_TO = ( 1 << 1), + VG_LINE_TO = ( 2 << 1), + VG_HLINE_TO = ( 3 << 1), + VG_VLINE_TO = ( 4 << 1), + VG_QUAD_TO = ( 5 << 1), + VG_CUBIC_TO = ( 6 << 1), + VG_SQUAD_TO = ( 7 << 1), + VG_SCUBIC_TO = ( 8 << 1), + VG_SCCWARC_TO = ( 9 << 1), + VG_SCWARC_TO = (10 << 1), + VG_LCCWARC_TO = (11 << 1), + VG_LCWARC_TO = (12 << 1), + + VG_PATH_SEGMENT_FORCE_SIZE = VG_MAX_ENUM +} VGPathSegment; + +typedef enum { + VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE, + VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE, + VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE, + VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE, + VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE, + VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE, + VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE, + VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE, + VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE, + VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE, + VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE, + VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE, + VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE, + VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE, + VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE, + VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE, + VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE, + VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE, + VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE, + VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE, + VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE, + VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE, + VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE, + VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE, + + VG_PATH_COMMAND_FORCE_SIZE = VG_MAX_ENUM +} VGPathCommand; + +typedef enum { + VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0), + VG_PATH_CAPABILITY_APPEND_TO = (1 << 1), + VG_PATH_CAPABILITY_MODIFY = (1 << 2), + VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3), + VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4), + VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5), + VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6), + VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7), + VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8), + VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9), + VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10), + VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11), + VG_PATH_CAPABILITY_ALL = (1 << 12) - 1, + + VG_PATH_CAPABILITIES_FORCE_SIZE = VG_MAX_ENUM +} VGPathCapabilities; + +typedef enum { + VG_PATH_FORMAT = 0x1600, + VG_PATH_DATATYPE = 0x1601, + VG_PATH_SCALE = 0x1602, + VG_PATH_BIAS = 0x1603, + VG_PATH_NUM_SEGMENTS = 0x1604, + VG_PATH_NUM_COORDS = 0x1605, + + VG_PATH_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM +} VGPathParamType; + +typedef enum { + VG_CAP_BUTT = 0x1700, + VG_CAP_ROUND = 0x1701, + VG_CAP_SQUARE = 0x1702, + + VG_CAP_STYLE_FORCE_SIZE = VG_MAX_ENUM +} VGCapStyle; + +typedef enum { + VG_JOIN_MITER = 0x1800, + VG_JOIN_ROUND = 0x1801, + VG_JOIN_BEVEL = 0x1802, + + VG_JOIN_STYLE_FORCE_SIZE = VG_MAX_ENUM +} VGJoinStyle; + +typedef enum { + VG_EVEN_ODD = 0x1900, + VG_NON_ZERO = 0x1901, + + VG_FILL_RULE_FORCE_SIZE = VG_MAX_ENUM +} VGFillRule; + +typedef enum { + VG_STROKE_PATH = (1 << 0), + VG_FILL_PATH = (1 << 1), + + VG_PAINT_MODE_FORCE_SIZE = VG_MAX_ENUM +} VGPaintMode; + +typedef enum { + /* Color paint parameters */ + VG_PAINT_TYPE = 0x1A00, + VG_PAINT_COLOR = 0x1A01, + VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02, + VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07, + VG_PAINT_COLOR_RAMP_STOPS = 0x1A03, + + /* Linear gradient paint parameters */ + VG_PAINT_LINEAR_GRADIENT = 0x1A04, + + /* Radial gradient paint parameters */ + VG_PAINT_RADIAL_GRADIENT = 0x1A05, + + /* Pattern paint parameters */ + VG_PAINT_PATTERN_TILING_MODE = 0x1A06, + + VG_PAINT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM +} VGPaintParamType; + +typedef enum { + VG_PAINT_TYPE_COLOR = 0x1B00, + VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01, + VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02, + VG_PAINT_TYPE_PATTERN = 0x1B03, + + VG_PAINT_TYPE_FORCE_SIZE = VG_MAX_ENUM +} VGPaintType; + +typedef enum { + VG_COLOR_RAMP_SPREAD_PAD = 0x1C00, + VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01, + VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02, + + VG_COLOR_RAMP_SPREAD_MODE_FORCE_SIZE = VG_MAX_ENUM +} VGColorRampSpreadMode; + +typedef enum { + VG_TILE_FILL = 0x1D00, + VG_TILE_PAD = 0x1D01, + VG_TILE_REPEAT = 0x1D02, + VG_TILE_REFLECT = 0x1D03, + + VG_TILING_MODE_FORCE_SIZE = VG_MAX_ENUM +} VGTilingMode; + +typedef enum { + /* RGB{A,X} channel ordering */ + VG_sRGBX_8888 = 0, + VG_sRGBA_8888 = 1, + VG_sRGBA_8888_PRE = 2, + VG_sRGB_565 = 3, + VG_sRGBA_5551 = 4, + VG_sRGBA_4444 = 5, + VG_sL_8 = 6, + VG_lRGBX_8888 = 7, + VG_lRGBA_8888 = 8, + VG_lRGBA_8888_PRE = 9, + VG_lL_8 = 10, + VG_A_8 = 11, + VG_BW_1 = 12, + + /* {A,X}RGB channel ordering */ + VG_sXRGB_8888 = 0 | (1 << 6), + VG_sARGB_8888 = 1 | (1 << 6), + VG_sARGB_8888_PRE = 2 | (1 << 6), + VG_sARGB_1555 = 4 | (1 << 6), + VG_sARGB_4444 = 5 | (1 << 6), + VG_lXRGB_8888 = 7 | (1 << 6), + VG_lARGB_8888 = 8 | (1 << 6), + VG_lARGB_8888_PRE = 9 | (1 << 6), + + /* BGR{A,X} channel ordering */ + VG_sBGRX_8888 = 0 | (1 << 7), + VG_sBGRA_8888 = 1 | (1 << 7), + VG_sBGRA_8888_PRE = 2 | (1 << 7), + VG_sBGR_565 = 3 | (1 << 7), + VG_sBGRA_5551 = 4 | (1 << 7), + VG_sBGRA_4444 = 5 | (1 << 7), + VG_lBGRX_8888 = 7 | (1 << 7), + VG_lBGRA_8888 = 8 | (1 << 7), + VG_lBGRA_8888_PRE = 9 | (1 << 7), + + /* {A,X}BGR channel ordering */ + VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7), + VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7), + VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7), + VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7), + VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7), + VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7), + VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7), + VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7), + + VG_IMAGE_FORMAT_FORCE_SIZE = VG_MAX_ENUM +} VGImageFormat; + +typedef enum { + VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0), + VG_IMAGE_QUALITY_FASTER = (1 << 1), + VG_IMAGE_QUALITY_BETTER = (1 << 2), + + VG_IMAGE_QUALITY_FORCE_SIZE = VG_MAX_ENUM +} VGImageQuality; + +typedef enum { + VG_IMAGE_FORMAT = 0x1E00, + VG_IMAGE_WIDTH = 0x1E01, + VG_IMAGE_HEIGHT = 0x1E02, + + VG_IMAGE_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM +} VGImageParamType; + +typedef enum { + VG_DRAW_IMAGE_NORMAL = 0x1F00, + VG_DRAW_IMAGE_MULTIPLY = 0x1F01, + VG_DRAW_IMAGE_STENCIL = 0x1F02, + + VG_IMAGE_MODE_FORCE_SIZE = VG_MAX_ENUM +} VGImageMode; + +typedef enum { + VG_RED = (1 << 3), + VG_GREEN = (1 << 2), + VG_BLUE = (1 << 1), + VG_ALPHA = (1 << 0), + + VG_IMAGE_CHANNEL_FORCE_SIZE = VG_MAX_ENUM +} VGImageChannel; + +typedef enum { + VG_BLEND_SRC = 0x2000, + VG_BLEND_SRC_OVER = 0x2001, + VG_BLEND_DST_OVER = 0x2002, + VG_BLEND_SRC_IN = 0x2003, + VG_BLEND_DST_IN = 0x2004, + VG_BLEND_MULTIPLY = 0x2005, + VG_BLEND_SCREEN = 0x2006, + VG_BLEND_DARKEN = 0x2007, + VG_BLEND_LIGHTEN = 0x2008, + VG_BLEND_ADDITIVE = 0x2009, + + VG_BLEND_MODE_FORCE_SIZE = VG_MAX_ENUM +} VGBlendMode; + +typedef enum { + VG_IMAGE_FORMAT_QUERY = 0x2100, + VG_PATH_DATATYPE_QUERY = 0x2101, + + VG_HARDWARE_QUERY_TYPE_FORCE_SIZE = VG_MAX_ENUM +} VGHardwareQueryType; + +typedef enum { + VG_HARDWARE_ACCELERATED = 0x2200, + VG_HARDWARE_UNACCELERATED = 0x2201, + + VG_HARDWARE_QUERY_RESULT_FORCE_SIZE = VG_MAX_ENUM +} VGHardwareQueryResult; + +typedef enum { + VG_VENDOR = 0x2300, + VG_RENDERER = 0x2301, + VG_VERSION = 0x2302, + VG_EXTENSIONS = 0x2303, + + VG_STRING_ID_FORCE_SIZE = VG_MAX_ENUM +} VGStringID; + +/* Function Prototypes */ + +#ifndef VG_API_CALL +# error VG_API_CALL must be defined +#endif + +#ifndef VG_API_ENTRY +# error VG_API_ENTRY must be defined +#endif + +#ifndef VG_API_EXIT +# error VG_API_EXIT must be defined +#endif + +VG_API_CALL VGErrorCode VG_API_ENTRY vgGetError(void) VG_API_EXIT; + +VG_API_CALL void VG_API_ENTRY vgFlush(void) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgFinish(void) VG_API_EXIT; + +/* Getters and Setters */ +VG_API_CALL void VG_API_ENTRY vgSetf (VGParamType type, VGfloat value) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSeti (VGParamType type, VGint value) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSetfv(VGParamType type, VGint count, + const VGfloat * values) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSetiv(VGParamType type, VGint count, + const VGint * values) VG_API_EXIT; + +VG_API_CALL VGfloat VG_API_ENTRY vgGetf(VGParamType type) VG_API_EXIT; +VG_API_CALL VGint VG_API_ENTRY vgGeti(VGParamType type) VG_API_EXIT; +VG_API_CALL VGint VG_API_ENTRY vgGetVectorSize(VGParamType type) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgGetfv(VGParamType type, VGint count, VGfloat * values) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgGetiv(VGParamType type, VGint count, VGint * values) VG_API_EXIT; + +VG_API_CALL void VG_API_ENTRY vgSetParameterf(VGHandle object, + VGint paramType, + VGfloat value) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSetParameteri(VGHandle object, + VGint paramType, + VGint value) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSetParameterfv(VGHandle object, + VGint paramType, + VGint count, const VGfloat * values) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSetParameteriv(VGHandle object, + VGint paramType, + VGint count, const VGint * values) VG_API_EXIT; + +VG_API_CALL VGfloat VG_API_ENTRY vgGetParameterf(VGHandle object, + VGint paramType) VG_API_EXIT; +VG_API_CALL VGint VG_API_ENTRY vgGetParameteri(VGHandle object, + VGint paramType); +VG_API_CALL VGint VG_API_ENTRY vgGetParameterVectorSize(VGHandle object, + VGint paramType) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgGetParameterfv(VGHandle object, + VGint paramType, + VGint count, VGfloat * values) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgGetParameteriv(VGHandle object, + VGint paramType, + VGint count, VGint * values) VG_API_EXIT; + +/* Matrix Manipulation */ +VG_API_CALL void VG_API_ENTRY vgLoadIdentity(void) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgLoadMatrix(const VGfloat * m) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgGetMatrix(VGfloat * m) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgMultMatrix(const VGfloat * m) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgTranslate(VGfloat tx, VGfloat ty) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgScale(VGfloat sx, VGfloat sy) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgShear(VGfloat shx, VGfloat shy) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgRotate(VGfloat angle) VG_API_EXIT; + +/* Masking and Clearing */ +VG_API_CALL void VG_API_ENTRY vgMask(VGImage mask, VGMaskOperation operation, + VGint x, VGint y, VGint width, VGint height) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgClear(VGint x, VGint y, VGint width, VGint height) VG_API_EXIT; + +/* Paths */ +VG_API_CALL VGPath VG_API_ENTRY vgCreatePath(VGint pathFormat, + VGPathDatatype datatype, + VGfloat scale, VGfloat bias, + VGint segmentCapacityHint, + VGint coordCapacityHint, + VGbitfield capabilities) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgClearPath(VGPath path, VGbitfield capabilities) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgDestroyPath(VGPath path) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgRemovePathCapabilities(VGPath path, + VGbitfield capabilities) VG_API_EXIT; +VG_API_CALL VGbitfield VG_API_ENTRY vgGetPathCapabilities(VGPath path) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgAppendPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgAppendPathData(VGPath dstPath, + VGint numSegments, + const VGubyte * pathSegments, + const void * pathData) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgModifyPathCoords(VGPath dstPath, VGint startIndex, + VGint numSegments, + const void * pathData) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgTransformPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT; +VG_API_CALL VGboolean VG_API_ENTRY vgInterpolatePath(VGPath dstPath, + VGPath startPath, + VGPath endPath, + VGfloat amount) VG_API_EXIT; +VG_API_CALL VGfloat VG_API_ENTRY vgPathLength(VGPath path, + VGint startSegment, VGint numSegments) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgPointAlongPath(VGPath path, + VGint startSegment, VGint numSegments, + VGfloat distance, + VGfloat * x, VGfloat * y, + VGfloat * tangentX, VGfloat * tangentY) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgPathBounds(VGPath path, + VGfloat * minX, VGfloat * minY, + VGfloat * width, VGfloat * height) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgPathTransformedBounds(VGPath path, + VGfloat * minX, VGfloat * minY, + VGfloat * width, VGfloat * height) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgDrawPath(VGPath path, VGbitfield paintModes) VG_API_EXIT; + +/* Paint */ +VG_API_CALL VGPaint VG_API_ENTRY vgCreatePaint(void) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgDestroyPaint(VGPaint paint) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSetPaint(VGPaint paint, VGbitfield paintModes) VG_API_EXIT; +VG_API_CALL VGPaint VG_API_ENTRY vgGetPaint(VGPaintMode paintMode) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSetColor(VGPaint paint, VGuint rgba) VG_API_EXIT; +VG_API_CALL VGuint VG_API_ENTRY vgGetColor(VGPaint paint) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgPaintPattern(VGPaint paint, VGImage pattern) VG_API_EXIT; + +/* Images */ +VG_API_CALL VGImage VG_API_ENTRY vgCreateImage(VGImageFormat format, + VGint width, VGint height, + VGbitfield allowedQuality) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgDestroyImage(VGImage image) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgClearImage(VGImage image, + VGint x, VGint y, VGint width, VGint height) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgImageSubData(VGImage image, + const void * data, VGint dataStride, + VGImageFormat dataFormat, + VGint x, VGint y, VGint width, VGint height) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgGetImageSubData(VGImage image, + void * data, VGint dataStride, + VGImageFormat dataFormat, + VGint x, VGint y, + VGint width, VGint height) VG_API_EXIT; +VG_API_CALL VGImage VG_API_ENTRY vgChildImage(VGImage parent, + VGint x, VGint y, VGint width, VGint height) VG_API_EXIT; +VG_API_CALL VGImage VG_API_ENTRY vgGetParent(VGImage image) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgCopyImage(VGImage dst, VGint dx, VGint dy, + VGImage src, VGint sx, VGint sy, + VGint width, VGint height, + VGboolean dither) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgDrawImage(VGImage image) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSetPixels(VGint dx, VGint dy, + VGImage src, VGint sx, VGint sy, + VGint width, VGint height) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgWritePixels(const void * data, VGint dataStride, + VGImageFormat dataFormat, + VGint dx, VGint dy, + VGint width, VGint height) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgGetPixels(VGImage dst, VGint dx, VGint dy, + VGint sx, VGint sy, + VGint width, VGint height) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgReadPixels(void * data, VGint dataStride, + VGImageFormat dataFormat, + VGint sx, VGint sy, + VGint width, VGint height) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgCopyPixels(VGint dx, VGint dy, + VGint sx, VGint sy, + VGint width, VGint height) VG_API_EXIT; + +/* Image Filters */ +VG_API_CALL void VG_API_ENTRY vgColorMatrix(VGImage dst, VGImage src, + const VGfloat * matrix) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgConvolve(VGImage dst, VGImage src, + VGint kernelWidth, VGint kernelHeight, + VGint shiftX, VGint shiftY, + const VGshort * kernel, + VGfloat scale, + VGfloat bias, + VGTilingMode tilingMode) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgSeparableConvolve(VGImage dst, VGImage src, + VGint kernelWidth, + VGint kernelHeight, + VGint shiftX, VGint shiftY, + const VGshort * kernelX, + const VGshort * kernelY, + VGfloat scale, + VGfloat bias, + VGTilingMode tilingMode) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgGaussianBlur(VGImage dst, VGImage src, + VGfloat stdDeviationX, + VGfloat stdDeviationY, + VGTilingMode tilingMode) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgLookup(VGImage dst, VGImage src, + const VGubyte * redLUT, + const VGubyte * greenLUT, + const VGubyte * blueLUT, + const VGubyte * alphaLUT, + VGboolean outputLinear, + VGboolean outputPremultiplied) VG_API_EXIT; +VG_API_CALL void VG_API_ENTRY vgLookupSingle(VGImage dst, VGImage src, + const VGuint * lookupTable, + VGImageChannel sourceChannel, + VGboolean outputLinear, + VGboolean outputPremultiplied) VG_API_EXIT; + +/* Hardware Queries */ +VG_API_CALL VGHardwareQueryResult VG_API_ENTRY vgHardwareQuery(VGHardwareQueryType key, + VGint setting) VG_API_EXIT; + +/* Renderer and Extension Information */ +VG_API_CALL const VGubyte * VG_API_ENTRY vgGetString(VGStringID name) VG_API_EXIT; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* _OPENVG_H */ diff --git a/mesalib/include/VG/vgext.h b/mesalib/include/VG/vgext.h new file mode 100644 index 000000000..ba2875e52 --- /dev/null +++ b/mesalib/include/VG/vgext.h @@ -0,0 +1,233 @@ +/* $Revision$ on $Date:: 2008-10-29 10:31:37 -0400 #$ */ + +/*------------------------------------------------------------------------ + * + * VG extensions Reference Implementation + * ------------------------------------- + * + * Copyright (c) 2008 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and /or associated documentation files + * (the "Materials "), to deal in the Materials without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Materials, + * and to permit persons to whom the Materials are 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 Materials. + * + * THE MATERIALS ARE 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 MATERIALS OR + * THE USE OR OTHER DEALINGS IN THE MATERIALS. + * + *//** + * \file + * \brief VG extensions + *//*-------------------------------------------------------------------*/ + + + +#ifndef _VGEXT_H +#define _VGEXT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#ifndef VG_API_ENTRYP +# define VG_API_ENTRYP VG_API_ENTRY* +#endif + +#ifndef VGU_API_ENTRYP +# define VGU_API_ENTRYP VGU_API_ENTRY* +#endif + +/*------------------------------------------------------------------------------- + * KHR extensions + *------------------------------------------------------------------------------*/ + +typedef enum { + +#ifndef VG_KHR_iterative_average_blur + VG_MAX_AVERAGE_BLUR_DIMENSION_KHR = 0x116B, + VG_AVERAGE_BLUR_DIMENSION_RESOLUTION_KHR = 0x116C, + VG_MAX_AVERAGE_BLUR_ITERATIONS_KHR = 0x116D, +#endif + + VG_PARAM_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM +} VGParamTypeKHR; + +#ifndef VG_KHR_EGL_image +#define VG_KHR_EGL_image 1 +/* VGEGLImageKHR is an opaque handle to an EGLImage */ +typedef void* VGeglImageKHR; + +#ifdef VG_VGEXT_PROTOTYPES +VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image); +#endif +typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR image); + +#endif + + +#ifndef VG_KHR_iterative_average_blur +#define VG_KHR_iterative_average_blur 1 + +#ifdef VG_VGEXT_PROTOTYPES +VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode); +#endif +typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode); + +#endif + + +#ifndef VG_KHR_advanced_blending +#define VG_KHR_advanced_blending 1 + +typedef enum { + VG_BLEND_OVERLAY_KHR = 0x2010, + VG_BLEND_HARDLIGHT_KHR = 0x2011, + VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012, + VG_BLEND_SOFTLIGHT_KHR = 0x2013, + VG_BLEND_COLORDODGE_KHR = 0x2014, + VG_BLEND_COLORBURN_KHR = 0x2015, + VG_BLEND_DIFFERENCE_KHR = 0x2016, + VG_BLEND_SUBTRACT_KHR = 0x2017, + VG_BLEND_INVERT_KHR = 0x2018, + VG_BLEND_EXCLUSION_KHR = 0x2019, + VG_BLEND_LINEARDODGE_KHR = 0x201a, + VG_BLEND_LINEARBURN_KHR = 0x201b, + VG_BLEND_VIVIDLIGHT_KHR = 0x201c, + VG_BLEND_LINEARLIGHT_KHR = 0x201d, + VG_BLEND_PINLIGHT_KHR = 0x201e, + VG_BLEND_HARDMIX_KHR = 0x201f, + VG_BLEND_CLEAR_KHR = 0x2020, + VG_BLEND_DST_KHR = 0x2021, + VG_BLEND_SRC_OUT_KHR = 0x2022, + VG_BLEND_DST_OUT_KHR = 0x2023, + VG_BLEND_SRC_ATOP_KHR = 0x2024, + VG_BLEND_DST_ATOP_KHR = 0x2025, + VG_BLEND_XOR_KHR = 0x2026, + + VG_BLEND_MODE_KHR_FORCE_SIZE= VG_MAX_ENUM +} VGBlendModeKHR; +#endif + +#ifndef VG_KHR_parametric_filter +#define VG_KHR_parametric_filter 1 + +typedef enum { + VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0), + VG_PF_KNOCKOUT_FLAG_KHR = (1 << 1), + VG_PF_OUTER_FLAG_KHR = (1 << 2), + VG_PF_INNER_FLAG_KHR = (1 << 3), + + VG_PF_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM +} VGPfTypeKHR; + +typedef enum { + VGU_IMAGE_IN_USE_ERROR = 0xF010, + + VGU_ERROR_CODE_KHR_FORCE_SIZE = VG_MAX_ENUM +} VGUErrorCodeKHR; + +#ifdef VG_VGEXT_PROTOTYPES +VG_API_CALL void VG_API_ENTRY vgParametricFilterKHR(VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint); +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguDropShadowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA); +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA) ; +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA); +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops); +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops); +#endif +typedef void (VG_API_ENTRYP PFNVGPARAMETRICFILTERKHRPROC) (VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint); +typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUDROPSHADOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA); +typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA); +typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA); +typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops); +typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops); + +#endif + + +/*------------------------------------------------------------------------------- + * NDS extensions + *------------------------------------------------------------------------------*/ + +#ifndef VG_NDS_paint_generation +#define VG_NDS_paint_generation 1 + +typedef enum { + VG_PAINT_COLOR_RAMP_LINEAR_NDS = 0x1A10, + VG_COLOR_MATRIX_NDS = 0x1A11, + VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS = 0x1A12, + + VG_PAINT_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM +} VGPaintParamTypeNds; + +typedef enum { + VG_DRAW_IMAGE_COLOR_MATRIX_NDS = 0x1F10, + + VG_IMAGE_MODE_NDS_FORCE_SIZE = VG_MAX_ENUM +} VGImageModeNds; +#endif + + +#ifndef VG_NDS_projective_geometry +#define VG_NDS_projective_geometry 1 + +typedef enum { + VG_CLIP_MODE_NDS = 0x1180, + VG_CLIP_LINES_NDS = 0x1181, + VG_MAX_CLIP_LINES_NDS = 0x1182, + + VG_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM +} VGParamTypeNds; + +typedef enum { + VG_CLIPMODE_NONE_NDS = 0x3000, + VG_CLIPMODE_CLIP_CLOSED_NDS = 0x3001, + VG_CLIPMODE_CLIP_OPEN_NDS = 0x3002, + VG_CLIPMODE_CULL_NDS = 0x3003, + + VG_CLIPMODE_NDS_FORCE_SIZE = VG_MAX_ENUM +} VGClipModeNds; + +typedef enum { + VG_RQUAD_TO_NDS = ( 13 << 1 ), + VG_RCUBIC_TO_NDS = ( 14 << 1 ), + + VG_PATH_SEGMENT_NDS_FORCE_SIZE = VG_MAX_ENUM +} VGPathSegmentNds; + +typedef enum { + VG_RQUAD_TO_ABS_NDS = (VG_RQUAD_TO_NDS | VG_ABSOLUTE), + VG_RQUAD_TO_REL_NDS = (VG_RQUAD_TO_NDS | VG_RELATIVE), + VG_RCUBIC_TO_ABS_NDS = (VG_RCUBIC_TO_NDS | VG_ABSOLUTE), + VG_RCUBIC_TO_REL_NDS = (VG_RCUBIC_TO_NDS | VG_RELATIVE), + + VG_PATH_COMMAND_NDS_FORCE_SIZE = VG_MAX_ENUM +} VGPathCommandNds; + +#ifdef VG_VGEXT_PROTOTYPES +VG_API_CALL void VG_API_ENTRY vgProjectiveMatrixNDS(VGboolean enable) ; +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguTransformClipLineNDS(const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout); +#endif +typedef void (VG_API_ENTRYP PFNVGPROJECTIVEMATRIXNDSPROC) (VGboolean enable) ; +typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUTRANSFORMCLIPLINENDSPROC) (const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout); + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* _VGEXT_H */ diff --git a/mesalib/include/VG/vgplatform.h b/mesalib/include/VG/vgplatform.h new file mode 100644 index 000000000..4579deb6f --- /dev/null +++ b/mesalib/include/VG/vgplatform.h @@ -0,0 +1,111 @@ +/* $Revision$ on $Date:: 2008-10-29 10:31:37 -0400 #$ */ + +/*------------------------------------------------------------------------ + * + * VG platform specific header Reference Implementation + * ---------------------------------------------------- + * + * Copyright (c) 2008 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and /or associated documentation files + * (the "Materials "), to deal in the Materials without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Materials, + * and to permit persons to whom the Materials are 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 Materials. + * + * THE MATERIALS ARE 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 MATERIALS OR + * THE USE OR OTHER DEALINGS IN THE MATERIALS. + * + *//** + * \file + * \brief VG platform specific header + *//*-------------------------------------------------------------------*/ + +#ifndef _VGPLATFORM_H +#define _VGPLATFORM_H + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +# define VG_API_CALL __attribute__((visibility("default"))) +# define VGU_API_CALL __attribute__((visibility("default"))) +#endif + +#ifndef VG_API_CALL +#if defined(OPENVG_STATIC_LIBRARY) +# define VG_API_CALL +#else +# if defined(_WIN32) || defined(__VC32__) /* Win32 */ +# if defined (OPENVG_DLL_EXPORTS) +# define VG_API_CALL __declspec(dllexport) +# else +# define VG_API_CALL __declspec(dllimport) +# endif +# else +# define VG_API_CALL extern +# endif /* defined(_WIN32) ||... */ +#endif /* defined OPENVG_STATIC_LIBRARY */ +#endif /* ifndef VG_API_CALL */ + +#ifndef VGU_API_CALL +#if defined(OPENVG_STATIC_LIBRARY) +# define VGU_API_CALL +#else +# if defined(_WIN32) || defined(__VC32__) /* Win32 */ +# if defined (OPENVG_DLL_EXPORTS) +# define VGU_API_CALL __declspec(dllexport) +# else +# define VGU_API_CALL __declspec(dllimport) +# endif +# else +# define VGU_API_CALL extern +# endif /* defined(_WIN32) ||... */ +#endif /* defined OPENVG_STATIC_LIBRARY */ +#endif /* ifndef VGU_API_CALL */ + + +#ifndef VG_API_ENTRY +#define VG_API_ENTRY +#endif + +#ifndef VG_API_EXIT +#define VG_API_EXIT +#endif + +#ifndef VGU_API_ENTRY +#define VGU_API_ENTRY +#endif + +#ifndef VGU_API_EXIT +#define VGU_API_EXIT +#endif + +typedef float VGfloat; +typedef signed char VGbyte; +typedef unsigned char VGubyte; +typedef signed short VGshort; +typedef signed int VGint; +typedef unsigned int VGuint; +typedef unsigned int VGbitfield; + +#ifndef VG_VGEXT_PROTOTYPES +#define VG_VGEXT_PROTOTYPES +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* _VGPLATFORM_H */ diff --git a/mesalib/include/VG/vgu.h b/mesalib/include/VG/vgu.h new file mode 100644 index 000000000..ecb27a002 --- /dev/null +++ b/mesalib/include/VG/vgu.h @@ -0,0 +1,130 @@ +/* $Revision$ on $Date:: 2008-10-29 10:31:37 -0400 #$ */ + +/*------------------------------------------------------------------------ + * + * VGU 1.0.1 Reference Implementation + * ------------------------------------- + * + * Copyright (c) 2008 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and /or associated documentation files + * (the "Materials "), to deal in the Materials without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Materials, + * and to permit persons to whom the Materials are 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 Materials. + * + * THE MATERIALS ARE 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 MATERIALS OR + * THE USE OR OTHER DEALINGS IN THE MATERIALS. + * + *//** + * \file + * \brief VGU 1.0.1 API. + *//*-------------------------------------------------------------------*/ + +#ifndef _VGU_H +#define _VGU_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define VGU_VERSION_1_0 1 + +#ifndef VGU_API_CALL +# error VGU_API_CALL must be defined +#endif + +#ifndef VGU_API_ENTRY +# error VGU_API_ENTRY must be defined +#endif + +#ifndef VGU_API_EXIT +# error VGU_API_EXIT must be defined +#endif + + +typedef enum { + VGU_NO_ERROR = 0, + VGU_BAD_HANDLE_ERROR = 0xF000, + VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001, + VGU_OUT_OF_MEMORY_ERROR = 0xF002, + VGU_PATH_CAPABILITY_ERROR = 0xF003, + VGU_BAD_WARP_ERROR = 0xF004, + + VGU_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM +} VGUErrorCode; + +typedef enum { + VGU_ARC_OPEN = 0xF100, + VGU_ARC_CHORD = 0xF101, + VGU_ARC_PIE = 0xF102, + + VGU_ARC_TYPE_FORCE_SIZE = VG_MAX_ENUM +} VGUArcType; + +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguLine(VGPath path, + VGfloat x0, VGfloat y0, + VGfloat x1, VGfloat y1) VGU_API_EXIT; + +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguPolygon(VGPath path, + const VGfloat * points, VGint count, + VGboolean closed) VGU_API_EXIT; + +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRect(VGPath path, + VGfloat x, VGfloat y, + VGfloat width, VGfloat height) VGU_API_EXIT; + +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRoundRect(VGPath path, + VGfloat x, VGfloat y, + VGfloat width, VGfloat height, + VGfloat arcWidth, VGfloat arcHeight) VGU_API_EXIT; + +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguEllipse(VGPath path, + VGfloat cx, VGfloat cy, + VGfloat width, VGfloat height) VGU_API_EXIT; + +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguArc(VGPath path, + VGfloat x, VGfloat y, + VGfloat width, VGfloat height, + VGfloat startAngle, VGfloat angleExtent, + VGUArcType arcType) VGU_API_EXIT; + +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0, + VGfloat sx1, VGfloat sy1, + VGfloat sx2, VGfloat sy2, + VGfloat sx3, VGfloat sy3, + VGfloat * matrix) VGU_API_EXIT; + +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0, + VGfloat dx1, VGfloat dy1, + VGfloat dx2, VGfloat dy2, + VGfloat dx3, VGfloat dy3, + VGfloat * matrix) VGU_API_EXIT; + +VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0, + VGfloat dx1, VGfloat dy1, + VGfloat dx2, VGfloat dy2, + VGfloat dx3, VGfloat dy3, + VGfloat sx0, VGfloat sy0, + VGfloat sx1, VGfloat sy1, + VGfloat sx2, VGfloat sy2, + VGfloat sx3, VGfloat sy3, + VGfloat * matrix) VGU_API_EXIT; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* #ifndef _VGU_H */ diff --git a/mesalib/progs/util/readtex.c b/mesalib/progs/util/readtex.c index d1c50a494..f6f511481 100644 --- a/mesalib/progs/util/readtex.c +++ b/mesalib/progs/util/readtex.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -89,6 +90,7 @@ static rawImageRec *RawImageOpen(const char *fileName) rawImageRec *raw; GLenum swapFlag; int x; + size_t result; endianTest.testWord = 1; if (endianTest.testByte[0] == 1) { @@ -114,7 +116,8 @@ static rawImageRec *RawImageOpen(const char *fileName) } } - fread(raw, 1, 12, raw->file); + result = fread(raw, 1, 12, raw->file); + assert(result == 12); if (swapFlag) { ConvertShort(&raw->imagic, 1); @@ -162,8 +165,10 @@ static rawImageRec *RawImageOpen(const char *fileName) } raw->rleEnd = 512 + (2 * x); fseek(raw->file, 512, SEEK_SET); - fread(raw->rowStart, 1, x, raw->file); - fread(raw->rowSize, 1, x, raw->file); + result = fread(raw->rowStart, 1, x, raw->file); + assert(result == x); + result = fread(raw->rowSize, 1, x, raw->file); + assert(result == x); if (swapFlag) { ConvertLong(raw->rowStart, (long) (x/sizeof(GLuint))); ConvertLong((GLuint *)raw->rowSize, (long) (x/sizeof(GLint))); @@ -193,11 +198,13 @@ static void RawImageGetRow(rawImageRec *raw, unsigned char *buf, int y, int z) { unsigned char *iPtr, *oPtr, pixel; int count, done = 0; + size_t result; if ((raw->type & 0xFF00) == 0x0100) { fseek(raw->file, (long) raw->rowStart[y+z*raw->sizeY], SEEK_SET); - fread(raw->tmp, 1, (unsigned int)raw->rowSize[y+z*raw->sizeY], - raw->file); + result = fread(raw->tmp, 1, (unsigned int)raw->rowSize[y+z*raw->sizeY], + raw->file); + assert(result == (unsigned int)raw->rowSize[y+z*raw->sizeY]); iPtr = raw->tmp; oPtr = buf; @@ -222,7 +229,8 @@ static void RawImageGetRow(rawImageRec *raw, unsigned char *buf, int y, int z) } else { fseek(raw->file, 512+(y*raw->sizeX)+(z*raw->sizeX*raw->sizeY), SEEK_SET); - fread(buf, 1, raw->sizeX, raw->file); + result = fread(buf, 1, raw->sizeX, raw->file); + assert(result == raw->sizeX); } } diff --git a/mesalib/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h b/mesalib/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h index 449329665..ba6868a30 100644 --- a/mesalib/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h +++ b/mesalib/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h @@ -33,6 +33,7 @@ #ifndef _BEZIERPATCHMESH_H #define _BEZIERPATCHMESH_H +#include #include "bezierPatch.h" typedef struct bezierPatchMesh{ diff --git a/mesalib/src/glu/sgi/libnurbs/interface/glsurfeval.h b/mesalib/src/glu/sgi/libnurbs/interface/glsurfeval.h index 1567c6b09..621e59391 100644 --- a/mesalib/src/glu/sgi/libnurbs/interface/glsurfeval.h +++ b/mesalib/src/glu/sgi/libnurbs/interface/glsurfeval.h @@ -83,7 +83,7 @@ typedef struct surfEvalMachine{ class StoredVertex { public: - StoredVertex() { type = 0; } + StoredVertex() { type = 0; coord[0] = 0; coord[1] = 0; point[0] = 0; point[1] = 0; } ~StoredVertex(void) {} void saveEvalCoord(REAL x, REAL y) {coord[0] = x; coord[1] = y; type = TYPECOORD; } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/arc.cc b/mesalib/src/glu/sgi/libnurbs/internals/arc.cc index b85139de9..cd4c4048a 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/arc.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/arc.cc @@ -43,7 +43,6 @@ #include "myassert.h" #include "arc.h" #include "bin.h" -#include "bezierarc.h" #include "pwlarc.h" #include "simplemath.h" diff --git a/mesalib/src/glu/sgi/libnurbs/internals/arc.h b/mesalib/src/glu/sgi/libnurbs/internals/arc.h index e986019c3..ca397f3b1 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/arc.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/arc.h @@ -108,6 +108,9 @@ public: inline Arc::Arc( Arc *j, PwlArc *p ) { + prev = NULL; + next = NULL; + link = NULL; bezierArc = NULL; pwlArc = p; type = j->type; @@ -123,6 +126,9 @@ Arc::Arc( Arc *j, PwlArc *p ) inline Arc::Arc( arc_side side, long _nuid ) { + prev = NULL; + next = NULL; + link = NULL; bezierArc = NULL; pwlArc = NULL; type = 0; diff --git a/mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h b/mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h index d72dd1e86..a55df9267 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h @@ -37,7 +37,6 @@ #define __gluarcsorter_h_ #include "sorter.h" -#include "arcsorter.h" class Arc; class Subdivider; diff --git a/mesalib/src/glu/sgi/libnurbs/internals/backend.cc b/mesalib/src/glu/sgi/libnurbs/internals/backend.cc index 88dc3f516..27b41ebb2 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/backend.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/backend.cc @@ -46,7 +46,6 @@ #include "backend.h" #include "basiccrveval.h" #include "basicsurfeval.h" -#include "nurbsconsts.h" #define NOWIREFRAME diff --git a/mesalib/src/glu/sgi/libnurbs/internals/bin.cc b/mesalib/src/glu/sgi/libnurbs/internals/bin.cc index 54b406147..ff75b86be 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/bin.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/bin.cc @@ -49,6 +49,7 @@ Bin::Bin() { head = NULL; + current = NULL; } Bin::~Bin() diff --git a/mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc b/mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc index 8cc847ab2..53ac1a569 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc @@ -60,6 +60,9 @@ Pool::Pool( int _buffersize, int initpoolsize, const char *n ) curblock = 0; freelist = 0; nextfree = 0; + for (int i = 0; i < NBLOCKS; i++) { + blocklist[i] = 0; + } } /*----------------------------------------------------------------------------- diff --git a/mesalib/src/glu/sgi/libnurbs/internals/curve.cc b/mesalib/src/glu/sgi/libnurbs/internals/curve.cc index 33e275264..b7c4d4a9c 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/curve.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/curve.cc @@ -60,6 +60,12 @@ Curve::Curve( Quilt_ptr geo, REAL pta, REAL ptb, Curve *c ) cullval = mapdesc->isCulling() ? CULL_ACCEPT : CULL_TRIVIAL_ACCEPT; order = geo->qspec[0].order; stride = MAXCOORDS; + for( int i = 0; i < MAXORDER * MAXCOORDS; i++ ) { + cpts[i] = 0; + spts[i] = 0; + } + stepsize = 0; + minstepsize = 0; REAL *ps = geo->cpts; Quiltspec_ptr qs = geo->qspec; diff --git a/mesalib/src/glu/sgi/libnurbs/internals/curvelist.cc b/mesalib/src/glu/sgi/libnurbs/internals/curvelist.cc index 872eb5816..8f2ee4678 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/curvelist.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/curvelist.cc @@ -43,7 +43,6 @@ #include "quilt.h" #include "curvelist.h" #include "curve.h" -#include "nurbsconsts.h" #include "types.h" Curvelist::Curvelist( Quilt *quilts, REAL pta, REAL ptb ) @@ -54,20 +53,23 @@ Curvelist::Curvelist( Quilt *quilts, REAL pta, REAL ptb ) range[0] = pta; range[1] = ptb; range[2] = ptb - pta; + needsSubdivision = 0; + stepsize = 0; } Curvelist::Curvelist( Curvelist &upper, REAL value ) { - Curvelist &lower = *this; curve = 0; for( Curve *c = upper.curve; c; c = c->next ) curve = new Curve( *c, value, curve ); - lower.range[0] = upper.range[0]; - lower.range[1] = value; - lower.range[2] = value - upper.range[0]; + range[0] = upper.range[0]; + range[1] = value; + range[2] = value - upper.range[0]; upper.range[0] = value; upper.range[2] = upper.range[1] - value; + needsSubdivision = 0; + stepsize = 0; } Curvelist::~Curvelist() diff --git a/mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc b/mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc index f85acc269..91f2ca8ce 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc @@ -45,7 +45,6 @@ #include "backend.h" #include "quilt.h" #include "curvelist.h" -#include "curve.h" #include "nurbsconsts.h" /*-------------------------------------------------------------------------- diff --git a/mesalib/src/glu/sgi/libnurbs/internals/displaylist.h b/mesalib/src/glu/sgi/libnurbs/internals/displaylist.h index 22cbec378..d009a4251 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/displaylist.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/displaylist.h @@ -59,6 +59,7 @@ Dlnode::Dlnode( PFVS _work, void *_arg, PFVS _cleanup ) work = _work; arg = _arg; cleanup = _cleanup; + next = 0; } class DisplayList { diff --git a/mesalib/src/glu/sgi/libnurbs/internals/gridvertex.h b/mesalib/src/glu/sgi/libnurbs/internals/gridvertex.h index 36a65c7bd..2e27436ef 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/gridvertex.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/gridvertex.h @@ -38,7 +38,7 @@ struct GridVertex { long gparam[2]; - GridVertex( void ) {} + GridVertex( void ) { gparam[0] = 0, gparam[1] = 0; } GridVertex( long u, long v ) { gparam[0] = u, gparam[1] = v; } void set( long u, long v ) { gparam[0] = u, gparam[1] = v; } long nextu() { return gparam[0]++; } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/knotvector.cc b/mesalib/src/glu/sgi/libnurbs/internals/knotvector.cc index 9eb5cbace..dcbf0067d 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/knotvector.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/knotvector.cc @@ -61,6 +61,9 @@ void Knotvector::init( long _knotcount, long _stride, long _order, INREAL *_knot Knotvector::Knotvector( void ) { + knotcount = 0; + stride = 0; + order = 0; knotlist = 0; } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/maplist.cc b/mesalib/src/glu/sgi/libnurbs/internals/maplist.cc index f944d1529..e51a3e85d 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/maplist.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/maplist.cc @@ -44,7 +44,6 @@ #include "nurbsconsts.h" #include "maplist.h" #include "mapdesc.h" -#include "backend.h" Maplist::Maplist( Backend& b ) : mapdescPool( sizeof( Mapdesc ), 10, "mapdesc pool" ), diff --git a/mesalib/src/glu/sgi/libnurbs/internals/mesher.cc b/mesalib/src/glu/sgi/libnurbs/internals/mesher.cc index 9cc436adb..b2d83f412 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/mesher.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/mesher.cc @@ -58,6 +58,9 @@ Mesher::Mesher( Backend& b ) { stacksize = 0; vdata = 0; + last[0] = 0; + last[1] = 0; + itop = 0; lastedge = 0; //needed to prevent purify UMR } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/patchlist.cc b/mesalib/src/glu/sgi/libnurbs/internals/patchlist.cc index 989d2dd00..6a400ab6f 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/patchlist.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/patchlist.cc @@ -44,7 +44,6 @@ #include "quilt.h" #include "patchlist.h" #include "patch.h" -#include "nurbsconsts.h" Patchlist::Patchlist( Quilt *quilts, REAL *pta, REAL *ptb ) { diff --git a/mesalib/src/glu/sgi/libnurbs/internals/quilt.cc b/mesalib/src/glu/sgi/libnurbs/internals/quilt.cc index 4fc58b747..d16f4bfec 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/quilt.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/quilt.cc @@ -44,9 +44,7 @@ #include "backend.h" #include "mapdesc.h" #include "flist.h" -#include "knotvector.h" #include "patchlist.h" -#include "math.h" //fglu_abs() #include "simplemath.h" //min() /* local preprocessor definitions */ diff --git a/mesalib/src/glu/sgi/libnurbs/internals/reader.cc b/mesalib/src/glu/sgi/libnurbs/internals/reader.cc index 6135eef60..c59240d26 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/reader.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/reader.cc @@ -64,6 +64,7 @@ O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride, owner = 0; pts = trimpts; npts = (int) count; + save = 0; int i; /* copy user data into internal trimming data structures */ @@ -115,6 +116,7 @@ O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride, owner = 0; pts = trimpts; npts = (int) count; + save = 0; /* copy user data into internal trimming data structures */ switch( _type ) { diff --git a/mesalib/src/glu/sgi/libnurbs/internals/reader.h b/mesalib/src/glu/sgi/libnurbs/internals/reader.h index 8a8dcebb5..cae6cada4 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/reader.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/reader.h @@ -64,7 +64,7 @@ struct O_curve : public PooledObj { int save; /* 1 if in display list */ long nuid; O_curve() { next = 0; used = 0; owner = 0; - curve.o_pwlcurve = 0; } + curve.o_pwlcurve = 0; curvetype = ct_none; save = 0; nuid = 0; } }; struct O_nurbscurve : public PooledObj { @@ -77,7 +77,7 @@ struct O_nurbscurve : public PooledObj { int save; /* 1 if in display list */ O_curve * owner; /* owning curve */ O_nurbscurve( long _type ) - { type = _type; owner = 0; next = 0; used = 0; } + { bezier_curves = 0; type = _type; tesselation = 0; method = 0; next = 0; used = 0; save = 0; owner = 0; } }; class O_pwlcurve : public PooledObj { @@ -95,7 +95,7 @@ struct O_trim : public PooledObj { O_curve *o_curve; /* closed trim loop */ O_trim * next; /* next loop along trim */ int save; /* 1 if in display list */ - O_trim() { next = 0; o_curve = 0; } + O_trim() { next = 0; o_curve = 0; save = 0; } }; struct O_nurbssurface : public PooledObj { @@ -106,7 +106,7 @@ struct O_nurbssurface : public PooledObj { int save; /* 1 if in display list */ int used; /* 1 if prev called in block */ O_nurbssurface( long _type ) - { type = _type; owner = 0; next = 0; used = 0; } + { bezier_patches = 0; type = _type; owner = 0; next = 0; save = 0; used = 0; } }; struct O_surface : public PooledObj { @@ -114,7 +114,7 @@ struct O_surface : public PooledObj { O_trim * o_trim; /* list of trim loops */ int save; /* 1 if in display list */ long nuid; - O_surface() { o_trim = 0; o_nurbssurface = 0; } + O_surface() { o_trim = 0; o_nurbssurface = 0; save = 0; nuid = 0; } }; struct Property : public PooledObj { @@ -123,9 +123,9 @@ struct Property : public PooledObj { REAL value; int save; /* 1 if in display list */ Property( long _type, long _tag, INREAL _value ) - { type = _type; tag = _tag; value = (REAL) _value; } + { type = _type; tag = _tag; value = (REAL) _value; save = 0; } Property( long _tag, INREAL _value ) - { type = 0; tag = _tag; value = (REAL) _value; } + { type = 0; tag = _tag; value = (REAL) _value; save = 0; } }; class NurbsTessellator; diff --git a/mesalib/src/glu/sgi/libnurbs/internals/renderhints.cc b/mesalib/src/glu/sgi/libnurbs/internals/renderhints.cc index a3aa62d42..4b347ebc7 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/renderhints.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/renderhints.cc @@ -40,7 +40,6 @@ #include "glimports.h" #include "mystdio.h" #include "renderhints.h" -#include "defines.h" #include "nurbsconsts.h" @@ -54,6 +53,10 @@ Renderhints::Renderhints() errorchecking = N_MSG; subdivisions = 6.0; tmp1 = 0.0; + displaydomain = 0; + maxsubdivisions = (int) subdivisions; + wiretris = 0; + wirequads = 0; } void diff --git a/mesalib/src/glu/sgi/libnurbs/internals/simplemath.h b/mesalib/src/glu/sgi/libnurbs/internals/simplemath.h index 0a060c57e..d00062dc7 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/simplemath.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/simplemath.h @@ -38,6 +38,8 @@ /* simple inline routines */ +#include "types.h" + inline int max( int x, int y ) { return ( x < y ) ? y : x; } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/slicer.cc b/mesalib/src/glu/sgi/libnurbs/internals/slicer.cc index 27d2a650d..1b18d73c1 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/slicer.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/slicer.cc @@ -1181,6 +1181,10 @@ void Slicer::slice(Arc_ptr loop) Slicer::Slicer( Backend &b ) : CoveAndTiler( b ), Mesher( b ), backend( b ) { + oneOverDu = 0; + du = 0; + dv = 0; + isolines = 0; ulinear = 0; vlinear = 0; } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/subdivider.cc b/mesalib/src/glu/sgi/libnurbs/internals/subdivider.cc index cc0b51470..ccddc270f 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/subdivider.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/subdivider.cc @@ -531,16 +531,18 @@ Subdivider::nonSamplingSplit( patchlist.pspec[param].range[1] ) * 0.5; split( source, left, right, param, mid ); Patchlist subpatchlist( patchlist, param, mid ); - if( left.isnonempty() ) + if( left.isnonempty() ) { if( subpatchlist.cullCheck() == CULL_TRIVIAL_REJECT ) freejarcs( left ); else nonSamplingSplit( left, subpatchlist, subdivisions-1, param ); - if( right.isnonempty() ) + } + if( right.isnonempty() ) { if( patchlist.cullCheck() == CULL_TRIVIAL_REJECT ) freejarcs( right ); else nonSamplingSplit( right, patchlist, subdivisions-1, param ); + } } else { // make bbox calls diff --git a/mesalib/src/glu/sgi/libnurbs/internals/trimregion.cc b/mesalib/src/glu/sgi/libnurbs/internals/trimregion.cc index efe789356..4aeb5eeac 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/trimregion.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/trimregion.cc @@ -41,7 +41,6 @@ #include "myassert.h" #include "mystdio.h" #include "trimregion.h" -#include "backend.h" TrimRegion::TrimRegion( void ) { diff --git a/mesalib/src/glu/sgi/libnurbs/internals/uarray.cc b/mesalib/src/glu/sgi/libnurbs/internals/uarray.cc index f0e236437..4b3329c0f 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/uarray.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/uarray.cc @@ -47,6 +47,7 @@ Uarray::Uarray( void ) { uarray = 0; size = 0; + ulines = 0; } Uarray::~Uarray( void ) diff --git a/mesalib/src/glu/sgi/libnurbs/internals/varray.cc b/mesalib/src/glu/sgi/libnurbs/internals/varray.cc index 31cc73a9d..1cb235443 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/varray.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/varray.cc @@ -53,8 +53,16 @@ inline long sgn( REAL x ) Varray::Varray( void ) { + int i; + varray = 0; size = 0; + numquads = 0; + + for (i = 0; i < 1000; i++) { + vval[i] = 0; + voffset[i] = 0; + } } Varray::~Varray( void ) diff --git a/mesalib/src/glu/sgi/libnurbs/nurbtess/directedLine.cc b/mesalib/src/glu/sgi/libnurbs/nurbtess/directedLine.cc index 74450352d..d942db728 100644 --- a/mesalib/src/glu/sgi/libnurbs/nurbtess/directedLine.cc +++ b/mesalib/src/glu/sgi/libnurbs/nurbtess/directedLine.cc @@ -309,6 +309,8 @@ directedLine::directedLine() nextPolygon = NULL; rootBit = 0;/*important to initilzae to 0 meaning not root yet*/ rootLink = NULL; + direction = INCREASING; + sline = NULL; } directedLine::~directedLine() @@ -791,22 +793,30 @@ directedLine* readAllPolygons(char* filename) { Int i,j; FILE* fp = fopen(filename, "r"); - assert(fp); Int nPolygons; - fscanf(fp, "%i", &nPolygons); + int result; + + assert(fp); + result = fscanf(fp, "%i", &nPolygons); + assert(result != EOF); directedLine *ret = NULL; for(i=0; irootLinkSet(NULL); { vert[0][0]=vert[1][0]; vert[0][1]=vert[1][1]; - fscanf(fp, "%f", &(vert[1][0])); - fscanf(fp, "%f", &(vert[1][1])); + result = fscanf(fp, "%f", &(vert[1][0])); + assert(result != EOF); + result = fscanf(fp, "%f", &(vert[1][1])); + assert(result != EOF); sLine = new sampledLine(2,vert); dLine = new directedLine(INCREASING, sLine); dLine->rootLinkSet(thisPoly); diff --git a/mesalib/src/glu/sgi/libnurbs/nurbtess/monoChain.cc b/mesalib/src/glu/sgi/libnurbs/nurbtess/monoChain.cc index 814bf32fa..cb28129ad 100644 --- a/mesalib/src/glu/sgi/libnurbs/nurbtess/monoChain.cc +++ b/mesalib/src/glu/sgi/libnurbs/nurbtess/monoChain.cc @@ -127,6 +127,7 @@ monoChain::monoChain(directedLine* cHead, directedLine* cTail) current = chainTail; isKey = 0; + keyY = 0; } //insert a new line between prev and this @@ -263,6 +264,7 @@ monoChain* directedLineLoopToMonoChainLoop(directedLine* loop) prevCusp = temp; } } + assert(ret); ret->insert(new monoChain(prevCusp, firstCusp)); return ret; diff --git a/mesalib/src/glu/sgi/libnurbs/nurbtess/partitionY.cc b/mesalib/src/glu/sgi/libnurbs/nurbtess/partitionY.cc index 297c62997..e097461ac 100644 --- a/mesalib/src/glu/sgi/libnurbs/nurbtess/partitionY.cc +++ b/mesalib/src/glu/sgi/libnurbs/nurbtess/partitionY.cc @@ -111,8 +111,8 @@ Int isCusp(directedLine *v) else if(A[1] > B[1] && C[1] > B[1]) return 1; - if(isAbove(v, v) && isAbove(v, v->getPrev()) || - isBelow(v, v) && isBelow(v, v->getPrev())) + if((isAbove(v, v) && isAbove(v, v->getPrev())) || + (isBelow(v, v) && isBelow(v, v->getPrev()))) return 1; else return 0; diff --git a/mesalib/src/glu/sgi/libnurbs/nurbtess/partitionY.h b/mesalib/src/glu/sgi/libnurbs/nurbtess/partitionY.h index 8dda409de..5570c183d 100644 --- a/mesalib/src/glu/sgi/libnurbs/nurbtess/partitionY.h +++ b/mesalib/src/glu/sgi/libnurbs/nurbtess/partitionY.h @@ -39,7 +39,7 @@ *or both at or below v. In addition, at least one of the ajacent verteces is *strictly below or above v. * A vertex is a relex vertex if the internals angle is strictly greater than - *180. In other words, if the the signed area is negative: + *180. In other words, if the signed area is negative: *(x1, y1), (x2, y2), (x3, y3) are the three vertices along a polygon, the *order is such that left hand side is inside the polygon. Then (x2,y2) is *reflex if: diff --git a/mesalib/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc b/mesalib/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc index 26d05342f..dfdbd4e84 100644 --- a/mesalib/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc +++ b/mesalib/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc @@ -156,6 +156,8 @@ primStream::primStream(Int sizeLengths, Int sizeVertices) index_vertices = 0; size_lengths = sizeLengths; size_vertices = sizeVertices; + + counter = 0; } primStream::~primStream() diff --git a/mesalib/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc b/mesalib/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc index e12f88bab..2e70f8393 100644 --- a/mesalib/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc +++ b/mesalib/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc @@ -207,7 +207,7 @@ void sampleBotRightWithGridLine(Real* botVertex, return; } - Int segIndexMono, segIndexPass; + Int segIndexMono = 0, segIndexPass; findBotRightSegment(rightChain, rightEnd, rightCorner, @@ -293,7 +293,7 @@ void sampleBotLeftWithGridLine(Real* botVertex, return; } - Int segIndexPass, segIndexMono; + Int segIndexPass, segIndexMono = 0; findBotLeftSegment(leftChain, leftEnd, leftCorner, grid->get_u_value(leftU), segIndexMono, segIndexPass); sampleBotLeftWithGridLinePost(botVertex, diff --git a/mesalib/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc b/mesalib/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc index b7b929623..951e937c4 100644 --- a/mesalib/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc +++ b/mesalib/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc @@ -172,7 +172,7 @@ void sampleTopRightWithGridLine(Real* topVertex, return; } - Int segIndexSmall, segIndexLarge; + Int segIndexSmall = 0, segIndexLarge; findTopRightSegment(rightChain, rightStart, rightEnd, @@ -294,7 +294,7 @@ void sampleTopLeftWithGridLine(Real* topVertex, primStream* pStream ) { - Int segIndexSmall, segIndexLarge; + Int segIndexSmall = 0, segIndexLarge; //if left chain is empty, then there is only one top vertex with one grid // line if(leftEnd < leftStart) { diff --git a/mesalib/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc b/mesalib/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc index 6253a7c09..89f6c6e23 100644 --- a/mesalib/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc +++ b/mesalib/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc @@ -107,6 +107,9 @@ sampledLine::sampledLine(Real pt1[2], Real pt2[2]) //needs tp call init to setup sampledLine::sampledLine() { + npoints = 0; + points = NULL; + next = NULL; } //warning: ONLY pointer is copies!!! diff --git a/mesalib/src/glu/sgi/libtess/normal.c b/mesalib/src/glu/sgi/libtess/normal.c index 0a2494be3..7ab83167b 100644 --- a/mesalib/src/glu/sgi/libtess/normal.c +++ b/mesalib/src/glu/sgi/libtess/normal.c @@ -142,7 +142,7 @@ static void CheckOrientation( GLUtesselator *tess ) GLUhalfEdge *e; /* When we compute the normal automatically, we choose the orientation - * so that the the sum of the signed areas of all contours is non-negative. + * so that the sum of the signed areas of all contours is non-negative. */ area = 0; for( f = fHead->next; f != fHead; f = f->next ) { diff --git a/mesalib/src/glu/sgi/libutil/error.c b/mesalib/src/glu/sgi/libutil/error.c index e734818ed..721274845 100644 --- a/mesalib/src/glu/sgi/libutil/error.c +++ b/mesalib/src/glu/sgi/libutil/error.c @@ -31,8 +31,6 @@ #include "gluos.h" #include "gluint.h" #include -#include -#include struct token_string diff --git a/mesalib/src/glu/sgi/libutil/mipmap.c b/mesalib/src/glu/sgi/libutil/mipmap.c index d1fd5a7d7..8e63eaaad 100644 --- a/mesalib/src/glu/sgi/libutil/mipmap.c +++ b/mesalib/src/glu/sgi/libutil/mipmap.c @@ -36,7 +36,6 @@ #include #include /* UINT_MAX */ #include -#include "gluint.h" typedef union { unsigned char ub[4]; diff --git a/mesalib/src/mesa/Makefile b/mesalib/src/mesa/Makefile index 6f58ad616..8c0ebf84c 100644 --- a/mesalib/src/mesa/Makefile +++ b/mesalib/src/mesa/Makefile @@ -18,11 +18,10 @@ include sources.mak - -# Default: build dependencies, then asm_subdirs, then convenience -# libs (.a) and finally the device drivers: -default: depend asm_subdirs libmesa.a libmesagallium.a libglapi.a \ - driver_subdirs +# Default: build dependencies, then asm_subdirs, GLSL built-in lib, +# then convenience libs (.a) and finally the device drivers: +default: depend asm_subdirs glsl_builtin libmesa.a libmesagallium.a \ + libglapi.a driver_subdirs @@ -30,20 +29,20 @@ default: depend asm_subdirs libmesa.a libmesagallium.a libglapi.a \ # 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) # Make archive of subset of core mesa object files for gallium -libmesagallium.a: $(MESA_GALLIUM_OBJECTS) - @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) +libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) # Make archive of gl* API dispatcher functions only libglapi.a: $(GLAPI_OBJECTS) - $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) + @ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) ###################################################################### # Device drivers -driver_subdirs: libmesa.a libglapi.a +driver_subdirs: libmesa.a libglapi.a libmesagallium.a @ (cd drivers && $(MAKE)) @@ -59,6 +58,12 @@ asm_subdirs: fi +###################################################################### +# GLSL built-in library +glsl_builtin: + (cd shader/slang/library && $(MAKE)) || exit 1 ; + + ###################################################################### # Dependency generation @@ -149,9 +154,10 @@ tags: clean: -rm -f */*.o -rm -f */*/*.o - -rm -f depend depend.bak libmesa.a libglapi.a + -rm -f depend depend.bak libmesa.a libglapi.a libmesagallium.a -rm -f drivers/*/*.o -rm -f *.pc + -rm -f shader/slang/library/*_gc.h -@cd drivers/dri && $(MAKE) clean -@cd drivers/x11 && $(MAKE) clean -@cd drivers/osmesa && $(MAKE) clean diff --git a/mesalib/src/mesa/Makefile.mgw b/mesalib/src/mesa/Makefile.mgw index 097c390a8..b90384d04 100644 --- a/mesalib/src/mesa/Makefile.mgw +++ b/mesalib/src/mesa/Makefile.mgw @@ -200,7 +200,7 @@ ifeq (1,1) x86/glapi_x86.o: x86/glapi_x86.S $(CC) -o $@ $(CFLAGS) -DSTDCALL_API -c $< else -main/dispatch.o: main/dispatch.c +glapi/glapi_dispatch.o: glapi/glapi_dispatch.c $(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $< glapi/glapi.o: glapi/glapi.c $(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $< @@ -218,7 +218,6 @@ clean: -$(call UNLINK,vbo/*.o) -$(call UNLINK,shader/*.o) -$(call UNLINK,shader/slang/*.o) - -$(call UNLINK,shader/grammar/*.o) -$(call UNLINK,sparc/*.o) -$(call UNLINK,ppc/*.o) -$(call UNLINK,swrast/*.o) diff --git a/mesalib/src/mesa/drivers/common/driverfuncs.c b/mesalib/src/mesa/drivers/common/driverfuncs.c index 4ca0e7bcc..ebfaa2f07 100644 --- a/mesalib/src/mesa/drivers/common/driverfuncs.c +++ b/mesalib/src/mesa/drivers/common/driverfuncs.c @@ -26,7 +26,6 @@ #include "main/glheader.h" #include "main/imports.h" #include "main/arrayobj.h" -#include "main/buffers.h" #include "main/context.h" #include "main/framebuffer.h" #include "main/mipmap.h" @@ -50,7 +49,6 @@ #endif #include "shader/program.h" -#include "shader/prog_execute.h" #include "shader/shader_api.h" #include "tnl/tnl.h" #include "swrast/swrast.h" @@ -72,7 +70,7 @@ void _mesa_init_driver_functions(struct dd_function_table *driver) { - _mesa_bzero(driver, sizeof(*driver)); + memset(driver, 0, sizeof(*driver)); driver->GetString = NULL; /* REQUIRED! */ driver->UpdateState = NULL; /* REQUIRED! */ @@ -122,9 +120,8 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->FreeTexImageData = _mesa_free_texture_image_data; driver->MapTexture = NULL; driver->UnmapTexture = NULL; - driver->TextureMemCpy = _mesa_memcpy; + driver->TextureMemCpy = memcpy; driver->IsTextureResident = NULL; - driver->ActiveTexture = NULL; driver->UpdateTexturePalette = NULL; /* imaging */ @@ -145,7 +142,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->BlendFuncSeparate = NULL; driver->ClearColor = NULL; driver->ClearDepth = NULL; - driver->ClearIndex = NULL; driver->ClearStencil = NULL; driver->ClipPlane = NULL; driver->ColorMask = NULL; @@ -160,7 +156,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->Enable = NULL; driver->Fogfv = NULL; driver->Hint = NULL; - driver->IndexMask = NULL; driver->Lightfv = NULL; driver->LightModelfv = NULL; driver->LineStipple = NULL; @@ -265,11 +260,23 @@ _mesa_init_driver_state(GLcontext *ctx) ctx->Color.BlendDstRGB, ctx->Color.BlendSrcA, ctx->Color.BlendDstA); - ctx->Driver.ColorMask(ctx, - ctx->Color.ColorMask[RCOMP], - ctx->Color.ColorMask[GCOMP], - ctx->Color.ColorMask[BCOMP], - ctx->Color.ColorMask[ACOMP]); + if (ctx->Driver.ColorMaskIndexed) { + GLuint i; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + ctx->Driver.ColorMaskIndexed(ctx, i, + ctx->Color.ColorMask[0][RCOMP], + ctx->Color.ColorMask[0][GCOMP], + ctx->Color.ColorMask[0][BCOMP], + ctx->Color.ColorMask[0][ACOMP]); + } + } + else { + ctx->Driver.ColorMask(ctx, + ctx->Color.ColorMask[0][RCOMP], + ctx->Color.ColorMask[0][GCOMP], + ctx->Color.ColorMask[0][BCOMP], + ctx->Color.ColorMask[0][ACOMP]); + } ctx->Driver.CullFace(ctx, ctx->Polygon.CullFaceMode); ctx->Driver.DepthFunc(ctx, ctx->Depth.Func); diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index cd9075b39..b97b760f1 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -56,7 +56,6 @@ #include "main/stencil.h" #include "main/texobj.h" #include "main/texenv.h" -#include "main/texformat.h" #include "main/teximage.h" #include "main/texparam.h" #include "main/texstate.h" @@ -107,11 +106,11 @@ struct save_state GLboolean AlphaEnabled; /** META_BLEND */ - GLboolean BlendEnabled; + GLbitfield BlendEnabled; GLboolean ColorLogicOpEnabled; /** META_COLOR_MASK */ - GLubyte ColorMask[4]; + GLubyte ColorMask[MAX_DRAW_BUFFERS][4]; /** META_DEPTH_TEST */ struct gl_depthbuffer_attrib Depth; @@ -308,7 +307,7 @@ _mesa_meta_free(GLcontext *ctx) * freed by the normal context destruction code. But this would be * the place to free other meta data someday. */ - _mesa_free(ctx->Meta); + free(ctx->Meta); ctx->Meta = NULL; } @@ -335,19 +334,29 @@ _mesa_meta_begin(GLcontext *ctx, GLbitfield state) if (state & META_BLEND) { save->BlendEnabled = ctx->Color.BlendEnabled; - if (ctx->Color.BlendEnabled) - _mesa_set_enable(ctx, GL_BLEND, GL_FALSE); + if (ctx->Color.BlendEnabled) { + if (ctx->Extensions.EXT_draw_buffers2) { + GLuint i; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + _mesa_set_enablei(ctx, GL_BLEND, i, GL_FALSE); + } + } + else { + _mesa_set_enable(ctx, GL_BLEND, GL_FALSE); + } + } save->ColorLogicOpEnabled = ctx->Color.ColorLogicOpEnabled; if (ctx->Color.ColorLogicOpEnabled) _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, GL_FALSE); } if (state & META_COLOR_MASK) { - COPY_4V(save->ColorMask, ctx->Color.ColorMask); - if (!ctx->Color.ColorMask[0] || - !ctx->Color.ColorMask[1] || - !ctx->Color.ColorMask[2] || - !ctx->Color.ColorMask[3]) + memcpy(save->ColorMask, ctx->Color.ColorMask, + sizeof(ctx->Color.ColorMask)); + if (!ctx->Color.ColorMask[0][0] || + !ctx->Color.ColorMask[0][1] || + !ctx->Color.ColorMask[0][2] || + !ctx->Color.ColorMask[0][3]) _mesa_ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); } @@ -484,12 +493,12 @@ _mesa_meta_begin(GLcontext *ctx, GLbitfield state) if (state & META_TRANSFORM) { GLuint activeTexture = ctx->Texture.CurrentUnit; - _mesa_memcpy(save->ModelviewMatrix, ctx->ModelviewMatrixStack.Top->m, - 16 * sizeof(GLfloat)); - _mesa_memcpy(save->ProjectionMatrix, ctx->ProjectionMatrixStack.Top->m, - 16 * sizeof(GLfloat)); - _mesa_memcpy(save->TextureMatrix, ctx->TextureMatrixStack[0].Top->m, - 16 * sizeof(GLfloat)); + memcpy(save->ModelviewMatrix, ctx->ModelviewMatrixStack.Top->m, + 16 * sizeof(GLfloat)); + memcpy(save->ProjectionMatrix, ctx->ProjectionMatrixStack.Top->m, + 16 * sizeof(GLfloat)); + memcpy(save->TextureMatrix, ctx->TextureMatrixStack[0].Top->m, + 16 * sizeof(GLfloat)); save->MatrixMode = ctx->Transform.MatrixMode; /* set 1:1 vertex:pixel coordinate transform */ _mesa_ActiveTextureARB(GL_TEXTURE0); @@ -500,9 +509,9 @@ _mesa_meta_begin(GLcontext *ctx, GLbitfield state) _mesa_LoadIdentity(); _mesa_MatrixMode(GL_PROJECTION); _mesa_LoadIdentity(); - _mesa_Ortho(0.0F, ctx->DrawBuffer->Width, - 0.0F, ctx->DrawBuffer->Height, - -1.0F, 1.0F); + _mesa_Ortho(0.0, ctx->DrawBuffer->Width, + 0.0, ctx->DrawBuffer->Height, + -1.0, 1.0); save->ClipPlanesEnabled = ctx->Transform.ClipPlanesEnabled; if (ctx->Transform.ClipPlanesEnabled) { GLuint i; @@ -566,16 +575,38 @@ _mesa_meta_end(GLcontext *ctx) } if (state & META_BLEND) { - if (ctx->Color.BlendEnabled != save->BlendEnabled) - _mesa_set_enable(ctx, GL_BLEND, save->BlendEnabled); + if (ctx->Color.BlendEnabled != save->BlendEnabled) { + if (ctx->Extensions.EXT_draw_buffers2) { + GLuint i; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + _mesa_set_enablei(ctx, GL_BLEND, i, (save->BlendEnabled >> i) & 1); + } + } + else { + _mesa_set_enable(ctx, GL_BLEND, (save->BlendEnabled & 1)); + } + } if (ctx->Color.ColorLogicOpEnabled != save->ColorLogicOpEnabled) _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, save->ColorLogicOpEnabled); } if (state & META_COLOR_MASK) { - if (!TEST_EQ_4V(ctx->Color.ColorMask, save->ColorMask)) - _mesa_ColorMask(save->ColorMask[0], save->ColorMask[1], - save->ColorMask[2], save->ColorMask[3]); + GLuint i; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + if (!TEST_EQ_4V(ctx->Color.ColorMask[i], save->ColorMask[i])) { + if (i == 0) { + _mesa_ColorMask(save->ColorMask[i][0], save->ColorMask[i][1], + save->ColorMask[i][2], save->ColorMask[i][3]); + } + else { + _mesa_ColorMaskIndexed(i, + save->ColorMask[i][0], + save->ColorMask[i][1], + save->ColorMask[i][2], + save->ColorMask[i][3]); + } + } + } } if (state & META_DEPTH_TEST) { @@ -1273,7 +1304,7 @@ _mesa_meta_BlitFramebuffer(GLcontext *ctx, } if (mask & GL_DEPTH_BUFFER_BIT) { - GLuint *tmp = (GLuint *) _mesa_malloc(srcW * srcH * sizeof(GLuint)); + GLuint *tmp = (GLuint *) malloc(srcW * srcH * sizeof(GLuint)); if (tmp) { if (!blit->DepthFP) init_blit_depth_pixels(ctx); @@ -1297,7 +1328,7 @@ _mesa_meta_BlitFramebuffer(GLcontext *ctx, _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); mask &= ~GL_DEPTH_BUFFER_BIT; - _mesa_free(tmp); + free(tmp); } } @@ -1864,7 +1895,7 @@ _mesa_meta_DrawPixels(GLcontext *ctx, _mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, drawpix->StencilFP); _mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_TRUE); - for (bit = 0; bit < ctx->Visual.stencilBits; bit++) { + for (bit = 0; bit < ctx->DrawBuffer->Visual.stencilBits; bit++) { const GLuint mask = 1 << bit; if (mask & origStencilMask) { _mesa_StencilFunc(GL_ALWAYS, mask, mask); @@ -2034,7 +2065,7 @@ _mesa_meta_Bitmap(GLcontext *ctx, if (!bitmap1) return; - bitmap8 = (GLubyte *) _mesa_calloc(width * height); + bitmap8 = (GLubyte *) calloc(1, width * height); if (bitmap8) { _mesa_expand_bitmap(width, height, &unpackSave, bitmap1, bitmap8, width, 0xff); @@ -2051,7 +2082,7 @@ _mesa_meta_Bitmap(GLcontext *ctx, _mesa_set_enable(ctx, tex->Target, GL_FALSE); - _mesa_free(bitmap8); + free(bitmap8); } _mesa_unmap_pbo_source(ctx, &unpackSave); @@ -2100,12 +2131,15 @@ _mesa_meta_check_generate_mipmap_fallback(GLcontext *ctx, GLenum target, GL_COLOR_ATTACHMENT0_EXT, target, texObj->Name, srcLevel); } +#if 0 + /* other work is needed to enable 3D mipmap generation */ else if (target == GL_TEXTURE_3D) { GLint zoffset = 0; _mesa_FramebufferTexture3DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, target, texObj->Name, srcLevel, zoffset); } +#endif else { /* 2D / cube */ _mesa_FramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, @@ -2289,6 +2323,26 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, _mesa_set_enable(ctx, target, GL_TRUE); + /* setup vertex positions */ + { + verts[0].x = 0.0F; + verts[0].y = 0.0F; + verts[1].x = 1.0F; + verts[1].y = 0.0F; + verts[2].x = 1.0F; + verts[2].y = 1.0F; + verts[3].x = 0.0F; + verts[3].y = 1.0F; + + /* upload new vertex data */ + _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); + } + + /* setup projection matrix */ + _mesa_MatrixMode(GL_PROJECTION); + _mesa_LoadIdentity(); + _mesa_Ortho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0); + /* texture is already locked, unlock now */ _mesa_unlock_texture(ctx, texObj); @@ -2355,21 +2409,6 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, } } - /* setup vertex positions */ - { - verts[0].x = 0.0F; - verts[0].y = 0.0F; - verts[1].x = (GLfloat) dstWidth; - verts[1].y = 0.0F; - verts[2].x = (GLfloat) dstWidth; - verts[2].y = (GLfloat) dstHeight; - verts[3].x = 0.0F; - verts[3].y = (GLfloat) dstHeight; - - /* upload new vertex data */ - _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); - } - /* limit sampling to src level */ _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, srcLevel); _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel); @@ -2408,6 +2447,12 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target, break; } + assert(dstWidth == ctx->DrawBuffer->Width); + assert(dstHeight == ctx->DrawBuffer->Height); + + /* setup viewport */ + _mesa_set_viewport(ctx, 0, 0, dstWidth, dstHeight); + _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); } @@ -2489,7 +2534,7 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level, /* * Alloc image buffer (XXX could use a PBO) */ - buf = _mesa_malloc(width * height * bpp); + buf = malloc(width * height * bpp); if (!buf) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage%uD", dims); return; @@ -2550,7 +2595,7 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level, _mesa_lock_texture(ctx, texObj); /* re-lock */ - _mesa_free(buf); + free(buf); } @@ -2605,7 +2650,7 @@ copy_tex_sub_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level, /* * Alloc image buffer (XXX could use a PBO) */ - buf = _mesa_malloc(width * height * bpp); + buf = malloc(width * height * bpp); if (!buf) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage%uD", dims); return; @@ -2646,7 +2691,7 @@ copy_tex_sub_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level, _mesa_lock_texture(ctx, texObj); /* re-lock */ - _mesa_free(buf); + free(buf); } @@ -2689,7 +2734,7 @@ _mesa_meta_CopyColorTable(GLcontext *ctx, { GLfloat *buf; - buf = (GLfloat *) _mesa_malloc(width * 4 * sizeof(GLfloat)); + buf = (GLfloat *) malloc(width * 4 * sizeof(GLfloat)); if (!buf) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyColorTable"); return; @@ -2706,7 +2751,7 @@ _mesa_meta_CopyColorTable(GLcontext *ctx, _mesa_meta_end(ctx); - _mesa_free(buf); + free(buf); } @@ -2716,7 +2761,7 @@ _mesa_meta_CopyColorSubTable(GLcontext *ctx,GLenum target, GLsizei start, { GLfloat *buf; - buf = (GLfloat *) _mesa_malloc(width * 4 * sizeof(GLfloat)); + buf = (GLfloat *) malloc(width * 4 * sizeof(GLfloat)); if (!buf) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyColorSubTable"); return; @@ -2733,7 +2778,7 @@ _mesa_meta_CopyColorSubTable(GLcontext *ctx,GLenum target, GLsizei start, _mesa_meta_end(ctx); - _mesa_free(buf); + free(buf); } @@ -2744,7 +2789,7 @@ _mesa_meta_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target, { GLfloat *buf; - buf = (GLfloat *) _mesa_malloc(width * 4 * sizeof(GLfloat)); + buf = (GLfloat *) malloc(width * 4 * sizeof(GLfloat)); if (!buf) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyConvolutionFilter2D"); return; @@ -2763,7 +2808,7 @@ _mesa_meta_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target, _mesa_meta_end(ctx); - _mesa_free(buf); + free(buf); } @@ -2774,7 +2819,7 @@ _mesa_meta_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target, { GLfloat *buf; - buf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat)); + buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat)); if (!buf) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyConvolutionFilter2D"); return; @@ -2794,5 +2839,5 @@ _mesa_meta_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target, _mesa_meta_end(ctx); - _mesa_free(buf); + free(buf); } diff --git a/mesalib/src/mesa/drivers/dri/Makefile.template b/mesalib/src/mesa/drivers/dri/Makefile.template index 39d25ce3f..a0c25d26c 100644 --- a/mesalib/src/mesa/drivers/dri/Makefile.template +++ b/mesalib/src/mesa/drivers/dri/Makefile.template @@ -14,28 +14,11 @@ COMMON_SOURCES = $(COMMON_GALLIUM_SOURCES) \ ../common/drirenderbuffer.c \ ../common/dri_metaops.c -ifeq ($(WINDOW_SYSTEM),dri) -WINOBJ= -WINLIB= INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES) OBJECTS = $(C_SOURCES:.c=.o) \ $(ASM_SOURCES:.S=.o) -else -# miniglx -WINOBJ= -WINLIB=-L$(MESA)/src/glx/mini -MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini -INCLUDES = $(MINIGLX_INCLUDES) \ - $(SHARED_INCLUDES) \ - $(PCIACCESS_CFLAGS) - -OBJECTS = $(C_SOURCES:.c=.o) \ - $(MINIGLX_SOURCES:.c=.o) \ - $(ASM_SOURCES:.S=.o) -endif - ### Include directories SHARED_INCLUDES = \ @@ -55,7 +38,7 @@ SHARED_INCLUDES = \ $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ .S.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ + $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@ ##### TARGETS ##### @@ -67,11 +50,10 @@ default: subdirs lib lib: symlinks subdirs depend @$(MAKE) $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME) -$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) Makefile \ +$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) Makefile \ $(TOP)/src/mesa/drivers/dri/Makefile.template $(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \ - $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) \ - $(DRI_LIB_DEPS) + $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(DRI_LIB_DEPS) $(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME) diff --git a/mesalib/src/mesa/drivers/dri/common/dri_metaops.c b/mesalib/src/mesa/drivers/dri/common/dri_metaops.c index c7bea07dc..dfb7d6404 100644 --- a/mesalib/src/mesa/drivers/dri/common/dri_metaops.c +++ b/mesalib/src/mesa/drivers/dri/common/dri_metaops.c @@ -27,17 +27,9 @@ **************************************************************************/ #include "main/arrayobj.h" -#include "main/attrib.h" -#include "main/blend.h" #include "main/bufferobj.h" -#include "main/buffers.h" -#include "main/depth.h" #include "main/enable.h" #include "main/matrix.h" -#include "main/macros.h" -#include "main/polygon.h" -#include "main/shaders.h" -#include "main/stencil.h" #include "main/texstate.h" #include "main/varray.h" #include "main/viewport.h" diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c index 547f18a00..75c98825b 100644 --- a/mesalib/src/mesa/drivers/dri/common/dri_util.c +++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c @@ -97,7 +97,7 @@ driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 ) * * \internal * This function calls __DriverAPIRec::UnbindContext, and then decrements - * __DRIdrawablePrivateRec::refcount which must be non-zero for a successful + * __DRIdrawableRec::refcount which must be non-zero for a successful * return. * * While casting the opaque private pointers associated with the parameters @@ -127,6 +127,7 @@ static int driUnbindContext(__DRIcontext *pcp) /* Let driver unbind drawable from context */ (*psp->DriverAPI.UnbindContext)(pcp); + assert(pdp); if (pdp->refcount == 0) { /* ERROR!!! */ return GL_FALSE; @@ -167,7 +168,7 @@ static int driBindContext(__DRIcontext *pcp, __DRIdrawable *pdp, __DRIdrawable *prp) { - __DRIscreenPrivate *psp = NULL; + __DRIscreen *psp = NULL; /* Bind the drawable to the context */ @@ -189,6 +190,7 @@ static int driBindContext(__DRIcontext *pcp, ** initialize the drawable information if has not been done before. */ + assert(psp); if (!psp->dri2.enabled) { if (pdp && !pdp->pStamp) { DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); @@ -220,7 +222,7 @@ static int driBindContext(__DRIcontext *pcp, * * \param pdp pointer to the private drawable information to update. * - * This function basically updates the __DRIdrawablePrivate struct's + * This function basically updates the __DRIdrawable struct's * cliprect information by calling \c __DRIinterfaceMethods::getDrawableInfo. * This is usually called by the DRI_VALIDATE_DRAWABLE_INFO macro which * compares the __DRIdrwablePrivate pStamp and lastStamp values. If @@ -228,10 +230,10 @@ static int driBindContext(__DRIcontext *pcp, * info. */ void -__driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) +__driUtilUpdateDrawableInfo(__DRIdrawable *pdp) { - __DRIscreenPrivate *psp = pdp->driScreenPriv; - __DRIcontextPrivate *pcp = pdp->driContextPriv; + __DRIscreen *psp = pdp->driScreenPriv; + __DRIcontext *pcp = pdp->driContextPriv; if (!pcp || ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) { @@ -242,12 +244,12 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) } if (pdp->pClipRects) { - _mesa_free(pdp->pClipRects); + free(pdp->pClipRects); pdp->pClipRects = NULL; } if (pdp->pBackClipRects) { - _mesa_free(pdp->pBackClipRects); + free(pdp->pBackClipRects); pdp->pBackClipRects = NULL; } @@ -309,7 +311,7 @@ static void driReportDamage(__DRIdrawable *pdp, * \param drawablePrivate opaque pointer to the per-drawable private info. * * \internal - * This function calls __DRIdrawablePrivate::swapBuffers. + * This function calls __DRIdrawable::swapBuffers. * * Is called directly from glXSwapBuffers(). */ @@ -324,7 +326,7 @@ static void driSwapBuffers(__DRIdrawable *dPriv) if (!dPriv->numClipRects) return; - rects = _mesa_malloc(sizeof(*rects) * dPriv->numClipRects); + rects = malloc(sizeof(*rects) * dPriv->numClipRects); if (!rects) return; @@ -337,7 +339,7 @@ static void driSwapBuffers(__DRIdrawable *dPriv) } driReportDamage(dPriv, rects, dPriv->numClipRects); - _mesa_free(rects); + free(rects); } static int driDrawableGetMSC( __DRIscreen *sPriv, __DRIdrawable *dPriv, @@ -430,7 +432,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config, */ (void) attrs; - pdp = _mesa_malloc(sizeof *pdp); + pdp = malloc(sizeof *pdp); if (!pdp) { return NULL; } @@ -457,7 +459,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config, if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, &config->modes, renderType == GLX_PIXMAP_BIT)) { - _mesa_free(pdp); + free(pdp); return NULL; } @@ -484,8 +486,11 @@ dri2CreateNewDrawable(__DRIscreen *screen, if (!pdraw) return NULL; - pdraw->pClipRects = _mesa_malloc(sizeof *pdraw->pBackClipRects); - pdraw->pBackClipRects = _mesa_malloc(sizeof *pdraw->pBackClipRects); + pdraw->pClipRects = &pdraw->dri2.clipRect; + pdraw->pBackClipRects = &pdraw->dri2.clipRect; + + pdraw->pStamp = &pdraw->dri2.stamp; + *pdraw->pStamp = pdraw->lastStamp + 1; return pdraw; } @@ -497,7 +502,7 @@ static void dri_get_drawable(__DRIdrawable *pdp) static void dri_put_drawable(__DRIdrawable *pdp) { - __DRIscreenPrivate *psp; + __DRIscreen *psp; if (pdp) { pdp->refcount--; @@ -506,15 +511,15 @@ static void dri_put_drawable(__DRIdrawable *pdp) psp = pdp->driScreenPriv; (*psp->DriverAPI.DestroyBuffer)(pdp); - if (pdp->pClipRects) { - _mesa_free(pdp->pClipRects); + if (pdp->pClipRects && pdp->pClipRects != &pdp->dri2.clipRect) { + free(pdp->pClipRects); pdp->pClipRects = NULL; } - if (pdp->pBackClipRects) { - _mesa_free(pdp->pBackClipRects); + if (pdp->pBackClipRects && pdp->pClipRects != &pdp->dri2.clipRect) { + free(pdp->pBackClipRects); pdp->pBackClipRects = NULL; } - _mesa_free(pdp); + free(pdp); } } @@ -544,7 +549,7 @@ driDestroyContext(__DRIcontext *pcp) { if (pcp) { (*pcp->driScreenPriv->DriverAPI.DestroyContext)(pcp); - _mesa_free(pcp); + free(pcp); } } @@ -560,7 +565,7 @@ driDestroyContext(__DRIcontext *pcp) * success, or \c NULL on failure. * * \internal - * This function allocates and fills a __DRIcontextPrivateRec structure. It + * This function allocates and fills a __DRIcontextRec structure. It * performs some device independent initialization and passes all the * relevent information to __DriverAPIRec::CreateContext to create the * context. @@ -574,13 +579,16 @@ driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config, __DRIcontext *pcp; void * const shareCtx = (shared != NULL) ? shared->driverPrivate : NULL; - pcp = _mesa_malloc(sizeof *pcp); + pcp = malloc(sizeof *pcp); if (!pcp) return NULL; pcp->driScreenPriv = psp; pcp->driDrawablePriv = NULL; - + pcp->loaderPrivate = data; + + pcp->dri2.draw_stamp = 0; + pcp->dri2.read_stamp = 0; /* When the first context is created for a screen, initialize a "dummy" * context. */ @@ -596,7 +604,7 @@ driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config, pcp->hHWContext = hwContext; if ( !(*psp->DriverAPI.CreateContext)(&config->modes, pcp, shareCtx) ) { - _mesa_free(pcp); + free(pcp); return NULL; } @@ -650,7 +658,7 @@ static void driDestroyScreen(__DRIscreen *psp) (void)drmCloseOnce(psp->fd); } - _mesa_free(psp); + free(psp); } } @@ -669,6 +677,8 @@ setupLoaderExtensions(__DRIscreen *psp, psp->systemTime = (__DRIsystemTimeExtension *) extensions[i]; if (strcmp(extensions[i]->name, __DRI_DRI2_LOADER) == 0) psp->dri2.loader = (__DRIdri2LoaderExtension *) extensions[i]; + if (strcmp(extensions[i]->name, __DRI_IMAGE_LOOKUP) == 0) + psp->dri2.image = (__DRIimageLookupExtension *) extensions[i]; } } @@ -688,7 +698,7 @@ setupLoaderExtensions(__DRIscreen *psp, * \param drm_version Version of the kernel DRM. * \param frame_buffer Data describing the location and layout of the * framebuffer. - * \param pSAREA Pointer the the SAREA. + * \param pSAREA Pointer to the SAREA. * \param fd Device handle for the DRM. * \param extensions ?? * \param driver_modes Returns modes suppoted by the driver @@ -712,7 +722,7 @@ driCreateNewScreen(int scrn, static const __DRIextension *emptyExtensionList[] = { NULL }; __DRIscreen *psp; - psp = _mesa_calloc(sizeof *psp); + psp = calloc(1, sizeof *psp); if (!psp) return NULL; @@ -757,7 +767,7 @@ driCreateNewScreen(int scrn, *driver_modes = driDriverAPI.InitScreen(psp); if (*driver_modes == NULL) { - _mesa_free(psp); + free(psp); return NULL; } @@ -779,7 +789,7 @@ dri2CreateNewScreen(int scrn, int fd, if (driDriverAPI.InitScreen2 == NULL) return NULL; - psp = _mesa_calloc(sizeof(*psp)); + psp = calloc(1, sizeof(*psp)); if (!psp) return NULL; @@ -801,7 +811,7 @@ dri2CreateNewScreen(int scrn, int fd, psp->DriverAPI = driDriverAPI; *driver_configs = driDriverAPI.InitScreen2(psp); if (*driver_configs == NULL) { - _mesa_free(psp); + free(psp); return NULL; } @@ -841,7 +851,7 @@ const __DRIlegacyExtension driLegacyExtension = { driCreateNewContext, }; -/** Legacy DRI interface */ +/** DRI2 interface */ const __DRIdri2Extension driDRI2Extension = { { __DRI_DRI2, __DRI_DRI2_VERSION }, dri2CreateNewScreen, @@ -849,14 +859,6 @@ const __DRIdri2Extension driDRI2Extension = { dri2CreateNewContext, }; -/* This is the table of extensions that the loader will dlsym() for. */ -PUBLIC const __DRIextension *__driDriverExtensions[] = { - &driCoreExtension.base, - &driLegacyExtension.base, - &driDRI2Extension.base, - NULL -}; - static int driFrameTracking(__DRIdrawable *drawable, GLboolean enable) { @@ -871,7 +873,7 @@ driQueryFrameTracking(__DRIdrawable *dpriv, __DRIswapInfo sInfo; int status; int64_t ust; - __DRIscreenPrivate *psp = dpriv->driScreenPriv; + __DRIscreen *psp = dpriv->driScreenPriv; status = dpriv->driScreenPriv->DriverAPI.GetSwapInfo( dpriv, & sInfo ); if ( status == 0 ) { @@ -921,14 +923,14 @@ const __DRIframeTrackingExtension driFrameTrackingExtension = { * be possible to cache the sync rate? */ float -driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust, +driCalculateSwapUsage( __DRIdrawable *dPriv, int64_t last_swap_ust, int64_t current_ust ) { int32_t n; int32_t d; int interval; float usage = 1.0; - __DRIscreenPrivate *psp = dPriv->driScreenPriv; + __DRIscreen *psp = dPriv->driScreenPriv; if ( (*psp->systemTime->getMSCRate)(dPriv, &n, &d, dPriv->loaderPrivate) ) { interval = (dPriv->swap_interval != 0) ? dPriv->swap_interval : 1; @@ -955,4 +957,10 @@ driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust, return usage; } +void +dri2InvalidateDrawable(__DRIdrawable *drawable) +{ + drawable->dri2.stamp++; +} + /*@}*/ diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.h b/mesalib/src/mesa/drivers/dri/common/dri_util.h index c95a5c829..99c0f1e44 100644 --- a/mesalib/src/mesa/drivers/dri/common/dri_util.h +++ b/mesalib/src/mesa/drivers/dri/common/dri_util.h @@ -59,16 +59,12 @@ typedef struct __DRIswapInfoRec __DRIswapInfo; -/* Typedefs to avoid rewriting the world. */ -typedef struct __DRIscreenRec __DRIscreenPrivate; -typedef struct __DRIdrawableRec __DRIdrawablePrivate; -typedef struct __DRIcontextRec __DRIcontextPrivate; - /** * Extensions. */ extern const __DRIlegacyExtension driLegacyExtension; extern const __DRIcoreExtension driCoreExtension; +extern const __DRIdri2Extension driDRI2Extension; extern const __DRIextension driReadDrawableExtension; extern const __DRIcopySubBufferExtension driCopySubBufferExtension; extern const __DRIswapControlExtension driSwapControlExtension; @@ -299,7 +295,8 @@ struct __DRIdrawableRec { unsigned int index; /** - * Pointer to the "drawable has changed ID" stamp in the SAREA. + * Pointer to the "drawable has changed ID" stamp in the SAREA (or + * to dri2.stamp if DRI2 is being used). */ unsigned int *pStamp; @@ -380,6 +377,11 @@ struct __DRIdrawableRec { * GLX_MESA_swap_control. */ unsigned int swap_interval; + + struct { + unsigned int stamp; + drm_clip_rect_t clipRect; + } dri2; }; /** @@ -415,6 +417,16 @@ struct __DRIcontextRec { * Pointer to screen on which this context was created. */ __DRIscreen *driScreenPriv; + + /** + * The loaders's private context data. This structure is opaque. + */ + void *loaderPrivate; + + struct { + int draw_stamp; + int read_stamp; + } dri2; }; /** @@ -532,6 +544,7 @@ struct __DRIscreenRec { * fields will not be valid or initializaed in that case. */ int enabled; __DRIdri2LoaderExtension *loader; + __DRIimageLookupExtension *image; } dri2; /* The lock actually in use, old sarea or DRI2 */ @@ -552,4 +565,7 @@ driCalculateSwapUsage( __DRIdrawable *dPriv, extern GLint driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 ); +extern void +dri2InvalidateDrawable(__DRIdrawable *drawable); + #endif /* _DRI_UTIL_H_ */ diff --git a/mesalib/src/mesa/drivers/dri/common/drirenderbuffer.c b/mesalib/src/mesa/drivers/dri/common/drirenderbuffer.c index 4e7e92c82..c9ce6e3cb 100644 --- a/mesalib/src/mesa/drivers/dri/common/drirenderbuffer.c +++ b/mesalib/src/mesa/drivers/dri/common/drirenderbuffer.c @@ -1,7 +1,6 @@ #include "main/mtypes.h" #include "main/formats.h" -#include "main/framebuffer.h" #include "main/renderbuffer.h" #include "main/imports.h" #include "drirenderbuffer.h" @@ -33,7 +32,7 @@ driDeleteRenderbuffer(struct gl_renderbuffer *rb) /* don't free rb->Data Chances are it's a memory mapped region for * the dri drivers. */ - _mesa_free(rb); + free(rb); } @@ -56,22 +55,14 @@ driDeleteRenderbuffer(struct gl_renderbuffer *rb) driRenderbuffer * driNewRenderbuffer(gl_format format, GLvoid *addr, GLint cpp, GLint offset, GLint pitch, - __DRIdrawablePrivate *dPriv) + __DRIdrawable *dPriv) { driRenderbuffer *drb; - assert(format == GL_RGBA || - format == GL_RGB5 || - format == GL_RGBA8 || - format == GL_DEPTH_COMPONENT16 || - format == GL_DEPTH_COMPONENT24 || - format == GL_DEPTH_COMPONENT32 || - format == GL_STENCIL_INDEX8_EXT); - assert(cpp > 0); assert(pitch > 0); - drb = _mesa_calloc(sizeof(driRenderbuffer)); + drb = calloc(1, sizeof(driRenderbuffer)); if (drb) { const GLuint name = 0; @@ -196,7 +187,7 @@ driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped) * gl_framebuffer object. */ void -driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv) +driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawable *dPriv) { struct gl_framebuffer *fb = (struct gl_framebuffer *) dPriv->driverPrivate; if (fb && (dPriv->w != fb->Width || dPriv->h != fb->Height)) { diff --git a/mesalib/src/mesa/drivers/dri/common/drirenderbuffer.h b/mesalib/src/mesa/drivers/dri/common/drirenderbuffer.h index 3a5cbcdaa..677511334 100644 --- a/mesalib/src/mesa/drivers/dri/common/drirenderbuffer.h +++ b/mesalib/src/mesa/drivers/dri/common/drirenderbuffer.h @@ -43,10 +43,10 @@ typedef struct { GLint flippedPitch; GLvoid *flippedData; /* mmap'd address of buffer memory, if used */ - /* Pointer to corresponding __DRIdrawablePrivate. This is used to compute + /* Pointer to corresponding __DRIdrawable. This is used to compute * the window's position within the framebuffer. */ - __DRIdrawablePrivate *dPriv; + __DRIdrawable *dPriv; /* XXX this is for radeon/r200 only. We should really create a new * r200Renderbuffer class, derived from this class... not a huge deal. @@ -66,14 +66,14 @@ typedef struct { extern driRenderbuffer * driNewRenderbuffer(gl_format format, GLvoid *addr, GLint cpp, GLint offset, GLint pitch, - __DRIdrawablePrivate *dPriv); + __DRIdrawable *dPriv); extern void driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped); extern void -driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv); +driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawable *dPriv); #endif /* DRIRENDERBUFFER_H */ diff --git a/mesalib/src/mesa/drivers/dri/common/spantmp.h b/mesalib/src/mesa/drivers/dri/common/spantmp.h index d5608b880..cdc4f422c 100644 --- a/mesalib/src/mesa/drivers/dri/common/spantmp.h +++ b/mesalib/src/mesa/drivers/dri/common/spantmp.h @@ -288,7 +288,6 @@ static void TAG(ReadRGBAPixels)( GLcontext *ctx, HW_READ_LOCK() { GLubyte (*rgba)[4] = (GLubyte (*)[4]) values; - const GLubyte *mask = NULL; /* remove someday */ GLuint i; LOCAL_VARS; @@ -296,23 +295,11 @@ static void TAG(ReadRGBAPixels)( GLcontext *ctx, HW_READ_CLIPLOOP() { - if (mask) - { - for (i=0;imajor != -1) && ((ddxActual->major < ddxExpected->major_min) + if ( (ddxActual->major < ddxExpected->major_min) || (ddxActual->major > ddxExpected->major_max) - || (ddxActual->minor < ddxExpected->minor)) ) { + || (ddxActual->minor < ddxExpected->minor) ) { fprintf(stderr, format2, driver_name, "DDX", ddxExpected->major_min, ddxExpected->major_max, ddxExpected->minor, ddxActual->major, ddxActual->minor, ddxActual->patch); @@ -425,7 +423,8 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, const uint8_t * depth_bits, const uint8_t * stencil_bits, unsigned num_depth_stencil_bits, const GLenum * db_modes, unsigned num_db_modes, - const uint8_t * msaa_samples, unsigned num_msaa_modes) + const uint8_t * msaa_samples, unsigned num_msaa_modes, + GLboolean enable_accum) { static const uint8_t bits_table[4][4] = { /* R G B A */ @@ -487,7 +486,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, __GLcontextModes *modes; unsigned i, j, k, h; unsigned num_modes; - unsigned num_accum_bits = 2; + unsigned num_accum_bits = (enable_accum) ? 2 : 1; switch ( fb_type ) { case GL_UNSIGNED_BYTE_3_3_2: @@ -559,7 +558,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, } num_modes = num_depth_stencil_bits * num_db_modes * num_accum_bits * num_msaa_modes; - configs = _mesa_calloc((num_modes + 1) * sizeof *configs); + configs = calloc(1, (num_modes + 1) * sizeof *configs); if (configs == NULL) return NULL; @@ -568,7 +567,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, for ( i = 0 ; i < num_db_modes ; i++ ) { for ( h = 0 ; h < num_msaa_modes; h++ ) { for ( j = 0 ; j < num_accum_bits ; j++ ) { - *c = _mesa_malloc (sizeof **c); + *c = malloc (sizeof **c); modes = &(*c)->modes; c++; @@ -626,11 +625,10 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, modes->bindToTextureRgb = GL_TRUE; modes->bindToTextureRgba = GL_TRUE; modes->bindToMipmapTexture = GL_FALSE; - modes->bindToTextureTargets = modes->rgbMode ? - __DRI_ATTRIB_TEXTURE_1D_BIT | - __DRI_ATTRIB_TEXTURE_2D_BIT | - __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT : - 0; + modes->bindToTextureTargets = + __DRI_ATTRIB_TEXTURE_1D_BIT | + __DRI_ATTRIB_TEXTURE_2D_BIT | + __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT; } } } @@ -653,7 +651,7 @@ __DRIconfig **driConcatConfigs(__DRIconfig **a, while (b[j] != NULL) j++; - all = _mesa_malloc((i + j + 1) * sizeof *all); + all = malloc((i + j + 1) * sizeof *all); index = 0; for (i = 0; a[i] != NULL; i++) all[index++] = a[i]; @@ -661,8 +659,8 @@ __DRIconfig **driConcatConfigs(__DRIconfig **a, all[index++] = b[j]; all[index++] = NULL; - _mesa_free(a); - _mesa_free(b); + free(a); + free(b); return all; } @@ -727,10 +725,7 @@ driGetConfigAttribIndex(const __DRIconfig *config, { switch (attribMap[index].attrib) { case __DRI_ATTRIB_RENDER_TYPE: - if (config->modes.rgbMode) - *value = __DRI_ATTRIB_RGBA_BIT; - else - *value = __DRI_ATTRIB_COLOR_INDEX_BIT; + *value = __DRI_ATTRIB_RGBA_BIT; break; case __DRI_ATTRIB_CONFIG_CAVEAT: if (config->modes.visualRating == GLX_NON_CONFORMANT_CONFIG) diff --git a/mesalib/src/mesa/drivers/dri/common/utils.h b/mesalib/src/mesa/drivers/dri/common/utils.h index 2aa6de66c..02ca3feb7 100644 --- a/mesalib/src/mesa/drivers/dri/common/utils.h +++ b/mesalib/src/mesa/drivers/dri/common/utils.h @@ -104,7 +104,8 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, const uint8_t * depth_bits, const uint8_t * stencil_bits, unsigned num_depth_stencil_bits, const GLenum * db_modes, unsigned num_db_modes, - const uint8_t * msaa_samples, unsigned num_msaa_modes); + const uint8_t * msaa_samples, unsigned num_msaa_modes, + GLboolean enable_accum); __DRIconfig **driConcatConfigs(__DRIconfig **a, __DRIconfig **b); diff --git a/mesalib/src/mesa/drivers/dri/common/vblank.c b/mesalib/src/mesa/drivers/dri/common/vblank.c index 12aeaa108..49b22a2dc 100644 --- a/mesalib/src/mesa/drivers/dri/common/vblank.c +++ b/mesalib/src/mesa/drivers/dri/common/vblank.c @@ -34,12 +34,12 @@ #include "vblank.h" #include "xmlpool.h" -static unsigned int msc_to_vblank(__DRIdrawablePrivate * dPriv, int64_t msc) +static unsigned int msc_to_vblank(__DRIdrawable * dPriv, int64_t msc) { return (unsigned int)(msc - dPriv->msc_base + dPriv->vblank_base); } -static int64_t vblank_to_msc(__DRIdrawablePrivate * dPriv, unsigned int vblank) +static int64_t vblank_to_msc(__DRIdrawable * dPriv, unsigned int vblank) { return (int64_t)(vblank - dPriv->vblank_base + dPriv->msc_base); } @@ -64,8 +64,8 @@ static int64_t vblank_to_msc(__DRIdrawablePrivate * dPriv, unsigned int vblank) * \return Zero is returned on success. A negative errno value * is returned on failure. */ -int driDrawableGetMSC32( __DRIscreenPrivate * priv, - __DRIdrawablePrivate * dPriv, +int driDrawableGetMSC32( __DRIscreen * priv, + __DRIdrawable * dPriv, int64_t * count) { drmVBlank vbl; @@ -122,7 +122,7 @@ int driDrawableGetMSC32( __DRIscreenPrivate * priv, * \return Zero on success or \c GLX_BAD_CONTEXT on failure. */ -int driWaitForMSC32( __DRIdrawablePrivate *priv, +int driWaitForMSC32( __DRIdrawable *priv, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * msc ) { @@ -278,7 +278,7 @@ static int do_wait( drmVBlank * vbl, GLuint * vbl_seq, int fd ) */ static unsigned -driGetDefaultVBlankInterval( const __DRIdrawablePrivate *priv ) +driGetDefaultVBlankInterval( const __DRIdrawable *priv ) { if ( (priv->vblFlags & (VBLANK_FLAG_THROTTLE | VBLANK_FLAG_SYNC)) != 0 ) { return 1; @@ -295,7 +295,7 @@ driGetDefaultVBlankInterval( const __DRIdrawablePrivate *priv ) * direct rendering context. */ -void driDrawableInitVBlank( __DRIdrawablePrivate *priv ) +void driDrawableInitVBlank( __DRIdrawable *priv ) { if ( priv->swap_interval == (unsigned)-1 && !( priv->vblFlags & VBLANK_FLAG_NO_IRQ ) ) { @@ -320,7 +320,7 @@ void driDrawableInitVBlank( __DRIdrawablePrivate *priv ) */ unsigned -driGetVBlankInterval( const __DRIdrawablePrivate *priv ) +driGetVBlankInterval( const __DRIdrawable *priv ) { if ( (priv->vblFlags & VBLANK_FLAG_INTERVAL) != 0 ) { /* this must have been initialized when the drawable was first bound @@ -340,7 +340,7 @@ driGetVBlankInterval( const __DRIdrawablePrivate *priv ) */ void -driGetCurrentVBlank( __DRIdrawablePrivate *priv ) +driGetCurrentVBlank( __DRIdrawable *priv ) { drmVBlank vbl; @@ -366,7 +366,7 @@ driGetCurrentVBlank( __DRIdrawablePrivate *priv ) */ int -driWaitForVBlank( __DRIdrawablePrivate *priv, GLboolean * missed_deadline ) +driWaitForVBlank( __DRIdrawable *priv, GLboolean * missed_deadline ) { drmVBlank vbl; unsigned original_seq; diff --git a/mesalib/src/mesa/drivers/dri/common/vblank.h b/mesalib/src/mesa/drivers/dri/common/vblank.h index 8b2c761a1..29d1ad800 100644 --- a/mesalib/src/mesa/drivers/dri/common/vblank.h +++ b/mesalib/src/mesa/drivers/dri/common/vblank.h @@ -44,17 +44,17 @@ #define VBLANK_FLAG_SECONDARY (1U << 8) /* Wait for secondary vblank. */ -extern int driGetMSC32( __DRIscreenPrivate * priv, int64_t * count ); -extern int driDrawableGetMSC32( __DRIscreenPrivate * priv, - __DRIdrawablePrivate * drawablePrivate, +extern int driGetMSC32( __DRIscreen * priv, int64_t * count ); +extern int driDrawableGetMSC32( __DRIscreen * priv, + __DRIdrawable * drawablePrivate, int64_t * count); -extern int driWaitForMSC32( __DRIdrawablePrivate *priv, +extern int driWaitForMSC32( __DRIdrawable *priv, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * msc ); extern GLuint driGetDefaultVBlankFlags( const driOptionCache *optionCache ); -extern void driDrawableInitVBlank ( __DRIdrawablePrivate *priv ); -extern unsigned driGetVBlankInterval( const __DRIdrawablePrivate *priv ); -extern void driGetCurrentVBlank( __DRIdrawablePrivate *priv ); -extern int driWaitForVBlank( __DRIdrawablePrivate *priv, +extern void driDrawableInitVBlank ( __DRIdrawable *priv ); +extern unsigned driGetVBlankInterval( const __DRIdrawable *priv ); +extern void driGetCurrentVBlank( __DRIdrawable *priv ); +extern int driWaitForVBlank( __DRIdrawable *priv, GLboolean * missed_deadline ); #undef usleep diff --git a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c index 46ba2ffbf..477259ea7 100644 --- a/mesalib/src/mesa/drivers/dri/common/xmlconfig.c +++ b/mesalib/src/mesa/drivers/dri/common/xmlconfig.c @@ -39,13 +39,6 @@ #include "dri_util.h" #include "xmlconfig.h" -/* - * OS dependent ways of getting the name of the running program - */ -#if (defined(__unix__) || defined(unix)) && !defined(USG) -#include -#endif - #undef GET_PROGRAM_NAME #if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__) diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c index 8340861af..03c672ecf 100644 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c @@ -132,7 +132,8 @@ swrastFillInModes(__DRIscreen *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor, msaa_samples_array, 1); + back_buffer_factor, msaa_samples_array, 1, + GL_TRUE); if (configs == NULL) { fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); @@ -154,7 +155,7 @@ driCreateNewScreen(int scrn, const __DRIextension **extensions, TRACE; - psp = _mesa_calloc(sizeof(*psp)); + psp = calloc(1, sizeof(*psp)); if (!psp) return NULL; @@ -183,7 +184,7 @@ static void driDestroyScreen(__DRIscreen *psp) TRACE; if (psp) { - _mesa_free(psp); + free(psp); } } @@ -202,34 +203,28 @@ static const __DRIextension **driGetExtensions(__DRIscreen *psp) static GLuint choose_pixel_format(const GLvisual *v) { - if (v->rgbMode) { - int depth = v->rgbBits; - - if (depth == 32 - && v->redMask == 0xff0000 - && v->greenMask == 0x00ff00 - && v->blueMask == 0x0000ff) - return PF_A8R8G8B8; - else if (depth == 24 - && v->redMask == 0xff0000 - && v->greenMask == 0x00ff00 - && v->blueMask == 0x0000ff) - return PF_X8R8G8B8; - else if (depth == 16 - && v->redMask == 0xf800 - && v->greenMask == 0x07e0 - && v->blueMask == 0x001f) - return PF_R5G6B5; - else if (depth == 8 - && v->redMask == 0x07 - && v->greenMask == 0x38 - && v->blueMask == 0xc0) - return PF_R3G3B2; - } - else { - if (v->indexBits == 8) - return PF_CI8; - } + int depth = v->rgbBits; + + if (depth == 32 + && v->redMask == 0xff0000 + && v->greenMask == 0x00ff00 + && v->blueMask == 0x0000ff) + return PF_A8R8G8B8; + else if (depth == 24 + && v->redMask == 0xff0000 + && v->greenMask == 0x00ff00 + && v->blueMask == 0x0000ff) + return PF_X8R8G8B8; + else if (depth == 16 + && v->redMask == 0xf800 + && v->greenMask == 0x07e0 + && v->blueMask == 0x001f) + return PF_R5G6B5; + else if (depth == 8 + && v->redMask == 0x07 + && v->greenMask == 0x38 + && v->blueMask == 0xc0) + return PF_R3G3B2; _mesa_problem( NULL, "unexpected format in %s", __FUNCTION__ ); return 0; @@ -240,8 +235,8 @@ swrast_delete_renderbuffer(struct gl_renderbuffer *rb) { TRACE; - _mesa_free(rb->Data); - _mesa_free(rb); + free(rb->Data); + free(rb); } static GLboolean @@ -271,11 +266,11 @@ swrast_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb, TRACE; - _mesa_free(rb->Data); + free(rb->Data); swrast_alloc_front_storage(ctx, rb, internalFormat, width, height); - rb->Data = _mesa_malloc(height * xrb->pitch); + rb->Data = malloc(height * xrb->pitch); return GL_TRUE; } @@ -283,7 +278,7 @@ swrast_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb, static struct swrast_renderbuffer * swrast_new_renderbuffer(const GLvisual *visual, GLboolean front) { - struct swrast_renderbuffer *xrb = _mesa_calloc(sizeof *xrb); + struct swrast_renderbuffer *xrb = calloc(1, sizeof *xrb); GLuint pixel_format; TRACE; @@ -334,13 +329,6 @@ swrast_new_renderbuffer(const GLvisual *visual, GLboolean front) xrb->Base.DataType = GL_UNSIGNED_BYTE; xrb->bpp = 8; break; - case PF_CI8: - xrb->Base.Format = MESA_FORMAT_CI8; - xrb->Base.InternalFormat = GL_COLOR_INDEX8_EXT; - xrb->Base._BaseFormat = GL_COLOR_INDEX; - xrb->Base.DataType = GL_UNSIGNED_BYTE; - xrb->bpp = 8; - break; default: return NULL; } @@ -357,7 +345,7 @@ driCreateNewDrawable(__DRIscreen *screen, TRACE; - buf = _mesa_calloc(sizeof *buf); + buf = calloc(1, sizeof *buf); if (!buf) return NULL; @@ -365,10 +353,10 @@ driCreateNewDrawable(__DRIscreen *screen, buf->driScreenPriv = screen; - buf->row = _mesa_malloc(MAX_WIDTH * 4); + buf->row = malloc(MAX_WIDTH * 4); /* basic framebuffer setup */ - _mesa_initialize_framebuffer(&buf->Base, &config->modes); + _mesa_initialize_window_framebuffer(&buf->Base, &config->modes); /* add front renderbuffer */ frontrb = swrast_new_renderbuffer(&config->modes, GL_TRUE); @@ -400,7 +388,7 @@ driDestroyDrawable(__DRIdrawable *buf) if (buf) { struct gl_framebuffer *fb = &buf->Base; - _mesa_free(buf->row); + free(buf->row); fb->DeletePending = GL_TRUE; _mesa_reference_framebuffer(&fb, NULL); @@ -524,7 +512,7 @@ driCreateNewContext(__DRIscreen *screen, const __DRIconfig *config, TRACE; - ctx = _mesa_calloc(sizeof *ctx); + ctx = calloc(1, sizeof *ctx); if (!ctx) return NULL; @@ -539,7 +527,7 @@ driCreateNewContext(__DRIscreen *screen, const __DRIconfig *config, if (!_mesa_initialize_context(&ctx->Base, &config->modes, shared ? &shared->Base : NULL, &functions, (void *) ctx)) { - _mesa_free(ctx); + free(ctx); return NULL; } diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h index 1a5fb31d5..4722007f9 100644 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast_priv.h @@ -43,13 +43,13 @@ #define DEBUG_SPAN 0 #if DEBUG_CORE -#define TRACE _mesa_printf("--> %s\n", __FUNCTION__) +#define TRACE printf("--> %s\n", __FUNCTION__) #else #define TRACE #endif #if DEBUG_SPAN -#define TRACE_SPAN _mesa_printf("--> %s\n", __FUNCTION__) +#define TRACE_SPAN printf("--> %s\n", __FUNCTION__) #else #define TRACE_SPAN #endif @@ -116,11 +116,10 @@ swrast_renderbuffer(struct gl_renderbuffer *rb) /** * Pixel formats we support */ -#define PF_CI8 1 /**< Color Index mode */ -#define PF_A8R8G8B8 2 /**< 32bpp TrueColor: 8-A, 8-R, 8-G, 8-B bits */ -#define PF_R5G6B5 3 /**< 16bpp TrueColor: 5-R, 6-G, 5-B bits */ -#define PF_R3G3B2 4 /**< 8bpp TrueColor: 3-R, 3-G, 2-B bits */ -#define PF_X8R8G8B8 5 /**< 32bpp TrueColor: 8-R, 8-G, 8-B bits */ +#define PF_A8R8G8B8 1 /**< 32bpp TrueColor: 8-A, 8-R, 8-G, 8-B bits */ +#define PF_R5G6B5 2 /**< 16bpp TrueColor: 5-R, 6-G, 5-B bits */ +#define PF_R3G3B2 3 /**< 8bpp TrueColor: 3-R, 3-G, 2-B bits */ +#define PF_X8R8G8B8 4 /**< 32bpp TrueColor: 8-R, 8-G, 8-B bits */ /** * Renderbuffer pitch alignment (in bits). diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast_span.c b/mesalib/src/mesa/drivers/dri/swrast/swrast_span.c index f8e503463..d896e154f 100644 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast_span.c +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast_span.c @@ -193,23 +193,6 @@ static const GLubyte kernel[16] = { #include "swrast/s_spantemp.h" -/* 8-bit color index */ -#define NAME(FUNC) FUNC##_CI8 -#define CI_MODE -#define RB_TYPE GLubyte -#define SPAN_VARS \ - struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); -#define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X); -#define INC_PIXEL_PTR(P) P += 1 -#define STORE_PIXEL(DST, X, Y, VALUE) \ - *DST = VALUE[0] -#define FETCH_PIXEL(DST, SRC) \ - DST = SRC[0] - -#include "swrast/s_spantemp.h" - - /* * Generate code for front-buffer span functions. */ @@ -257,7 +240,7 @@ static const GLubyte kernel[16] = { struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); #define INIT_PIXEL_PTR(P, X, Y) \ GLushort *P = (GLushort *)row; -#define INC_PIXEL_PTR(P) P += 2 +#define INC_PIXEL_PTR(P) P++ #define STORE_PIXEL(DST, X, Y, VALUE) \ STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) #define FETCH_PIXEL(DST, SRC) \ @@ -282,23 +265,6 @@ static const GLubyte kernel[16] = { #include "swrast_spantemp.h" -/* 8-bit color index */ -#define NAME(FUNC) FUNC##_CI8_front -#define CI_MODE -#define RB_TYPE GLubyte -#define SPAN_VARS \ - struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb); -#define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)row; -#define INC_PIXEL_PTR(P) P += 1 -#define STORE_PIXEL(DST, X, Y, VALUE) \ - *DST = VALUE[0] -#define FETCH_PIXEL(DST, SRC) \ - DST = SRC[0] - -#include "swrast_spantemp.h" - - /* * Back-buffers are malloced memory and always private. * @@ -346,14 +312,6 @@ swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb, xrb->Base.PutValues = put_values_R3G3B2; xrb->Base.PutMonoValues = put_mono_values_R3G3B2; break; - case PF_CI8: - xrb->Base.GetRow = get_row_CI8; - xrb->Base.GetValues = get_values_CI8; - xrb->Base.PutRow = put_row_CI8; - xrb->Base.PutMonoRow = put_mono_row_CI8; - xrb->Base.PutValues = put_values_CI8; - xrb->Base.PutMonoValues = put_mono_values_CI8; - break; default: assert(0); return; @@ -410,14 +368,6 @@ swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb, xrb->Base.PutValues = put_values_R3G3B2_front; xrb->Base.PutMonoValues = put_mono_values_R3G3B2_front; break; - case PF_CI8: - xrb->Base.GetRow = get_row_CI8_front; - xrb->Base.GetValues = get_values_CI8_front; - xrb->Base.PutRow = put_row_CI8_front; - xrb->Base.PutMonoRow = put_mono_row_CI8_front; - xrb->Base.PutValues = put_values_CI8_front; - xrb->Base.PutMonoValues = put_mono_values_CI8_front; - break; default: assert(0); return; diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast_spantemp.h b/mesalib/src/mesa/drivers/dri/swrast/swrast_spantemp.h index e0cb24142..848736171 100644 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast_spantemp.h +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast_spantemp.h @@ -37,7 +37,7 @@ #define _SWRAST_SPANTEMP_ONCE static INLINE void -PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p ) +PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLvoid *p ) { __DRIcontext *ctx = swrast_context(glCtx); __DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer); @@ -98,7 +98,6 @@ GET_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row ) * Define the following macros before including this file: * NAME(BASE) to generate the function name (i.e. add prefix or suffix) * RB_TYPE the renderbuffer DataType - * CI_MODE if set, color index mode, else RGBA * SPAN_VARS to declare any local variables * INIT_PIXEL_PTR(P, X, Y) to initialize a pointer to a pixel * INC_PIXEL_PTR(P) to increment a pixel pointer by one pixel @@ -113,9 +112,7 @@ GET_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row ) #include "main/macros.h" -#ifdef CI_MODE -#define RB_COMPONENTS 1 -#elif !defined(RB_COMPONENTS) +#if !defined(RB_COMPONENTS) #define RB_COMPONENTS 4 #endif @@ -127,11 +124,7 @@ NAME(get_row)( GLcontext *ctx, struct gl_renderbuffer *rb, #ifdef SPAN_VARS SPAN_VARS #endif -#ifdef CI_MODE - RB_TYPE *dest = (RB_TYPE *) values; -#else RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values; -#endif GLuint i; char *row = swrast_drawable(ctx->ReadBuffer)->row; INIT_PIXEL_PTR(pixel, x, y); @@ -151,11 +144,7 @@ NAME(get_values)( GLcontext *ctx, struct gl_renderbuffer *rb, #ifdef SPAN_VARS SPAN_VARS #endif -#ifdef CI_MODE - RB_TYPE *dest = (RB_TYPE *) values; -#else RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values; -#endif GLuint i; for (i = 0; i < count; i++) { RB_TYPE pixel[4]; @@ -179,7 +168,8 @@ NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb, if (mask) { for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); STORE_PIXEL(pixel, x + i, y, src[i]); PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel); } @@ -198,7 +188,6 @@ NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb, } -#if !defined(CI_MODE) static void NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, @@ -212,7 +201,8 @@ NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb, if (mask) { for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); #ifdef STORE_PIXEL_RGB STORE_PIXEL_RGB(pixel, x + i, y, src[i]); #else @@ -237,7 +227,6 @@ NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb, } (void) rb; } -#endif static void @@ -253,7 +242,8 @@ NAME(put_mono_row)( GLcontext *ctx, struct gl_renderbuffer *rb, if (mask) { for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); STORE_PIXEL(pixel, x + i, y, src); PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel); } @@ -285,7 +275,8 @@ NAME(put_values)( GLcontext *ctx, struct gl_renderbuffer *rb, ASSERT(mask); for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); STORE_PIXEL(pixel, x[i], y[i], src[i]); PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel); } @@ -307,7 +298,8 @@ NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb, ASSERT(mask); for (i = 0; i < count; i++) { if (mask[i]) { - RB_TYPE pixel[4]; + RB_TYPE row[4]; + INIT_PIXEL_PTR(pixel, x, y); STORE_PIXEL(pixel, x[i], y[i], src); PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel); } @@ -319,7 +311,6 @@ NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb, #undef NAME #undef RB_TYPE #undef RB_COMPONENTS -#undef CI_MODE #undef SPAN_VARS #undef INIT_PIXEL_PTR #undef INC_PIXEL_PTR diff --git a/mesalib/src/mesa/drivers/windows/gdi/mesa.def b/mesalib/src/mesa/drivers/windows/gdi/mesa.def index 62f75d954..b537b3460 100644 --- a/mesalib/src/mesa/drivers/windows/gdi/mesa.def +++ b/mesalib/src/mesa/drivers/windows/gdi/mesa.def @@ -867,10 +867,8 @@ EXPORTS _glapi_get_proc_address _mesa_add_soft_renderbuffers _mesa_add_renderbuffer - _mesa_bzero - _mesa_calloc + _mesa_check_conditional_render _mesa_choose_tex_format - _mesa_compressed_texture_size _mesa_create_framebuffer _mesa_create_visual _mesa_delete_array_object @@ -887,7 +885,6 @@ EXPORTS _mesa_error _mesa_finish_render_texture _mesa_framebuffer_renderbuffer - _mesa_free _mesa_free_context_data _mesa_free_texture_image_data _mesa_generate_mipmap @@ -899,8 +896,6 @@ EXPORTS _mesa_init_renderbuffer _mesa_initialize_context _mesa_make_current - _mesa_memcpy - _mesa_memset _mesa_new_array_object _mesa_new_framebuffer _mesa_new_program @@ -926,12 +921,13 @@ EXPORTS _mesa_store_texsubimage1d _mesa_store_texsubimage2d _mesa_store_texsubimage3d - _mesa_strcmp _mesa_test_proxy_teximage _mesa_reference_framebuffer _mesa_update_framebuffer_visual _mesa_use_program _mesa_Viewport + _mesa_meta_init + _mesa_meta_free _mesa_meta_CopyColorSubTable _mesa_meta_CopyColorTable _mesa_meta_CopyConvolutionFilter1D @@ -941,7 +937,6 @@ EXPORTS _mesa_meta_CopyTexSubImage1D _mesa_meta_CopyTexSubImage2D _mesa_meta_CopyTexSubImage3D - _mesa_wait_query _swrast_Accum _swrast_Bitmap _swrast_BlitFramebuffer @@ -965,4 +960,4 @@ EXPORTS _tnl_InvalidateState _tnl_run_pipeline _tnl_program_string - _tnl_RasterPos \ No newline at end of file + _tnl_RasterPos diff --git a/mesalib/src/mesa/drivers/windows/gdi/wmesa.c b/mesalib/src/mesa/drivers/windows/gdi/wmesa.c index 8929b22af..22b0c46b4 100644 --- a/mesalib/src/mesa/drivers/windows/gdi/wmesa.c +++ b/mesalib/src/mesa/drivers/windows/gdi/wmesa.c @@ -35,7 +35,7 @@ wmesa_new_framebuffer(HDC hdc, GLvisual *visual) WMesaFramebuffer pwfb = (WMesaFramebuffer) malloc(sizeof(struct wmesa_framebuffer)); if (pwfb) { - _mesa_initialize_framebuffer(&pwfb->Base, visual); + _mesa_initialize_window_framebuffer(&pwfb->Base, visual); pwfb->hDC = hdc; /* insert at head of list */ pwfb->next = FirstFramebuffer; @@ -247,16 +247,6 @@ static void wmesa_flush(GLcontext *ctx) * span writing interface, which is very slow for a clear operation. */ -/* - * Set the color index used to clear the color buffer. - */ -static void clear_index(GLcontext *ctx, GLuint index) -{ - WMesaContext pwc = wmesa_context(ctx); - /* Note that indexed mode is not supported yet */ - pwc->clearColorRef = RGB(0,0,0); -} - /* * Set the color used to clear the color buffer. */ @@ -301,10 +291,10 @@ static void clear(GLcontext *ctx, GLbitfield mask) /* Let swrast do all the work if the masks are not set to * clear all channels. */ - if (ctx->Color.ColorMask[0] != 0xff || - ctx->Color.ColorMask[1] != 0xff || - ctx->Color.ColorMask[2] != 0xff || - ctx->Color.ColorMask[3] != 0xff) { + if (!ctx->Color.ColorMask[0][0] || + !ctx->Color.ColorMask[0][1] || + !ctx->Color.ColorMask[0][2] || + !ctx->Color.ColorMask[0][3]) { _swrast_Clear(ctx, mask); return; } @@ -482,7 +472,7 @@ static void write_rgba_span_front(const GLcontext *ctx, }; } BGRA; BGRA *bgra, c; - int i; + GLuint i; if (n < 16) { // the value 16 is just guessed y=FLIP(y); @@ -827,9 +817,9 @@ static void read_rgba_span_32(const GLcontext *ctx, lpdw = ((LPDWORD)(pwfb->pbPixels + pwfb->ScanWidth * y)) + x; for (i=0; i> 16; - rgba[i][GCOMP] = (pixel & 0x0000ff00) >> 8; - rgba[i][BCOMP] = (pixel & 0x000000ff); + rgba[i][RCOMP] = (GLubyte)((pixel & 0x00ff0000) >> 16); + rgba[i][GCOMP] = (GLubyte)((pixel & 0x0000ff00) >> 8); + rgba[i][BCOMP] = (GLubyte)(pixel & 0x000000ff); rgba[i][ACOMP] = 255; } } @@ -851,9 +841,9 @@ static void read_rgba_pixels_32(const GLcontext *ctx, GLint y2 = FLIP(y[i]); lpdw = ((LPDWORD)(pwfb->pbPixels + pwfb->ScanWidth * y2)) + x[i]; pixel = *lpdw; - rgba[i][RCOMP] = (pixel & 0x00ff0000) >> 16; - rgba[i][GCOMP] = (pixel & 0x0000ff00) >> 8; - rgba[i][BCOMP] = (pixel & 0x000000ff); + rgba[i][RCOMP] = (GLubyte)((pixel & 0x00ff0000) >> 16); + rgba[i][GCOMP] = (GLubyte)((pixel & 0x0000ff00) >> 8); + rgba[i][BCOMP] = (GLubyte)(pixel & 0x000000ff); rgba[i][ACOMP] = 255; } } @@ -1245,7 +1235,7 @@ static void read_rgba_pixels_16(const GLcontext *ctx, static void wmesa_delete_renderbuffer(struct gl_renderbuffer *rb) { - _mesa_free(rb); + free(rb); } @@ -1271,7 +1261,7 @@ wmesa_renderbuffer_storage(GLcontext *ctx, * on if we're drawing to the front or back color buffer. */ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat, - BYTE cColorBits, int double_buffer) + int cColorBits, int double_buffer) { if (double_buffer) { /* back buffer */ @@ -1286,9 +1276,6 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat, rb->PutMonoValues = write_mono_rgba_pixels_16; rb->GetRow = read_rgba_span_16; rb->GetValues = read_rgba_pixels_16; - rb->RedBits = 5; - rb->GreenBits = 6; - rb->BlueBits = 5; break; case PF_8R8G8B: if (cColorBits == 24) @@ -1300,9 +1287,6 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat, rb->PutMonoValues = write_mono_rgba_pixels_24; rb->GetRow = read_rgba_span_24; rb->GetValues = read_rgba_pixels_24; - rb->RedBits = 8; - rb->GreenBits = 8; - rb->BlueBits = 8; } else { @@ -1313,9 +1297,6 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat, rb->PutMonoValues = write_mono_rgba_pixels_32; rb->GetRow = read_rgba_span_32; rb->GetValues = read_rgba_pixels_32; - rb->RedBits = 8; - rb->GreenBits = 8; - rb->BlueBits = 8; } break; default: @@ -1331,9 +1312,6 @@ void wmesa_set_renderbuffer_funcs(struct gl_renderbuffer *rb, int pixelformat, rb->PutMonoValues = write_mono_rgba_pixels_front; rb->GetRow = read_rgba_span_front; rb->GetValues = read_rgba_pixels_front; - rb->RedBits = 8; /* XXX fix these (565?) */ - rb->GreenBits = 8; - rb->BlueBits = 8; } } @@ -1473,12 +1451,10 @@ WMesaContext WMesaCreateContext(HDC hDC, break; } /* Create visual based on flags */ - visual = _mesa_create_visual(rgb_flag, - db_flag, /* db_flag */ + visual = _mesa_create_visual(db_flag, /* db_flag */ GL_FALSE, /* stereo */ red_bits, green_bits, blue_bits, /* color RGB */ alpha_flag ? alpha_bits : 0, /* color A */ - 0, /* index bits */ DEFAULT_SOFTWARE_DEPTH_BITS, /* depth_bits */ 8, /* stencil_bits */ 16,16,16, /* accum RGB */ @@ -1486,7 +1462,7 @@ WMesaContext WMesaCreateContext(HDC hDC, 1); /* num samples */ if (!visual) { - _mesa_free(c); + free(c); return NULL; } @@ -1497,7 +1473,6 @@ WMesaContext WMesaCreateContext(HDC hDC, functions.GetBufferSize = wmesa_get_buffer_size; functions.Flush = wmesa_flush; functions.Clear = clear; - functions.ClearIndex = clear_index; functions.ClearColor = clear_color; functions.ResizeBuffers = wmesa_resize_buffers; functions.Viewport = wmesa_viewport; @@ -1524,7 +1499,7 @@ WMesaContext WMesaCreateContext(HDC hDC, !_tnl_CreateContext(ctx) || !_swsetup_CreateContext(ctx)) { _mesa_free_context_data(ctx); - _mesa_free(c); + free(c); return NULL; } _swsetup_Wakeup(ctx); @@ -1569,7 +1544,7 @@ void WMesaDestroyContext( WMesaContext pwc ) _swrast_DestroyContext(ctx); _mesa_free_context_data(ctx); - _mesa_free(pwc); + free(pwc); } diff --git a/mesalib/src/mesa/drivers/windows/gdi/wmesadef.h b/mesalib/src/mesa/drivers/windows/gdi/wmesadef.h index 83a42e608..1c0e24511 100644 --- a/mesalib/src/mesa/drivers/windows/gdi/wmesadef.h +++ b/mesalib/src/mesa/drivers/windows/gdi/wmesadef.h @@ -27,7 +27,7 @@ struct wmesa_framebuffer HDC hDC; int pixelformat; GLuint ScanWidth; - BYTE cColorBits; + int cColorBits; /* back buffer DIB fields */ HDC dib_hDC; BITMAPINFO bmi; diff --git a/mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c b/mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c index e9c23d1cc..a420b36ff 100644 --- a/mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c +++ b/mesalib/src/mesa/drivers/windows/gldirect/dglcontext.c @@ -1377,14 +1377,12 @@ SkipPrimaryCreate: #ifdef _USE_GLD3_WGL lpCtx->glVis = _mesa_create_visual( - GL_TRUE, // RGB mode bDouble, /* double buffer */ GL_FALSE, // stereo lpPFD->cRedBits, lpPFD->cGreenBits, lpPFD->cBlueBits, dwAlphaBits, - 0, // index bits dwDepthBits, dwStencilBits, lpPFD->cAccumRedBits, // accum bits diff --git a/mesalib/src/mesa/drivers/windows/icd/mesa.def b/mesalib/src/mesa/drivers/windows/icd/mesa.def index 25ac08a2f..6f33d170f 100644 --- a/mesalib/src/mesa/drivers/windows/icd/mesa.def +++ b/mesalib/src/mesa/drivers/windows/icd/mesa.def @@ -32,8 +32,6 @@ EXPORTS _mesa_buffer_data _mesa_buffer_map _mesa_buffer_subdata - _mesa_bzero - _mesa_calloc _mesa_choose_tex_format _mesa_compressed_texture_size _mesa_create_framebuffer @@ -47,15 +45,12 @@ EXPORTS _mesa_enable_1_5_extensions _mesa_enable_sw_extensions _mesa_error - _mesa_free _mesa_free_context_data _mesa_get_current_context _mesa_init_default_imports _mesa_init_driver_functions _mesa_initialize_context _mesa_make_current - _mesa_memcpy - _mesa_memset _mesa_new_buffer_object _mesa_new_texture_object _mesa_problem @@ -72,7 +67,6 @@ EXPORTS _mesa_store_texsubimage1d _mesa_store_texsubimage2d _mesa_store_texsubimage3d - _mesa_strcmp _mesa_test_proxy_teximage _mesa_Viewport _mesa_meta_CopyColorSubTable diff --git a/mesalib/src/mesa/glapi/dispatch.h b/mesalib/src/mesa/glapi/dispatch.h deleted file mode 100644 index 6623d5246..000000000 --- a/mesalib/src/mesa/glapi/dispatch.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * 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, sub license, - * 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 NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS 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. - */ - -#ifndef _DISPATCH_H -#define _DISPATCH_H - -#ifdef IN_DRI_DRIVER -#define _GLAPI_USE_REMAP_TABLE -#endif - -#include "glapitable.h" -#include "glapioffsets.h" -#include "glapidispatch.h" - -#endif /* _DISPATCH_H */ diff --git a/mesalib/src/mesa/glapi/glapi.c b/mesalib/src/mesa/glapi/glapi.c index e36fccb35..13de594aa 100644 --- a/mesalib/src/mesa/glapi/glapi.c +++ b/mesalib/src/mesa/glapi/glapi.c @@ -51,104 +51,17 @@ #ifdef HAVE_DIX_CONFIG_H - #include -#define PUBLIC - +#include "glapi/mesa.h" #else - #include "main/glheader.h" - -#endif - #include "main/compiler.h" - -#include -#include -#ifdef DEBUG -#include -#endif - -#include "glapi.h" -#include "glapioffsets.h" -#include "glapitable.h" - - -/***** BEGIN NO-OP DISPATCH *****/ - -static GLboolean WarnFlag = GL_FALSE; -static _glapi_warning_func warning_func; - -/* - * Enable/disable printing of warning messages. - */ -PUBLIC void -_glapi_noop_enable_warnings(GLboolean enable) -{ - WarnFlag = enable; -} - -/* - * Register a callback function for reporting errors. - */ -PUBLIC void -_glapi_set_warning_func( _glapi_warning_func func ) -{ - warning_func = func; -} - -static GLboolean -warn(void) -{ -#if !defined(_WIN32_WCE) - if ((WarnFlag || getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) - && warning_func) { - return GL_TRUE; - } - else { - return GL_FALSE; - } -#else - return GL_FALSE; #endif -} - - -#define KEYWORD1 static -#define KEYWORD1_ALT static -#define KEYWORD2 GLAPIENTRY -#define NAME(func) NoOp##func - -#define F NULL - -#define DISPATCH(func, args, msg) \ - if (warn()) { \ - warning_func(NULL, "GL User Error: called without context: %s", #func); \ - } - -#define RETURN_DISPATCH(func, args, msg) \ - if (warn()) { \ - warning_func(NULL, "GL User Error: called without context: %s", #func); \ - } \ - return 0 -#define DISPATCH_TABLE_NAME __glapi_noop_table -#define UNUSED_TABLE_NAME __unused_noop_functions - -#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name - -static GLint NoOpUnused(void) -{ - if (warn()) { - warning_func(NULL, "GL User Error: calling extension function without a current context\n"); - } - return 0; -} - -#include "glapitemp.h" - -/***** END NO-OP DISPATCH *****/ +#include "glapi/glapi.h" +#include "glapi/glapitable.h" +extern _glapi_proc __glapi_noop_table[]; /** @@ -192,39 +105,23 @@ PUBLIC __thread void * _glapi_tls_Context __attribute__((tls_model("initial-exec"))); PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL; + PUBLIC const void *_glapi_Context = NULL; #else #if defined(THREADS) -#ifdef WIN32_THREADS -/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */ -#define CHECK_MULTITHREAD_LOCK() -#define CHECK_MULTITHREAD_UNLOCK() -#else -_glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex); -#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex) -#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex) -#endif - static GLboolean ThreadSafe = GL_FALSE; /**< In thread-safe mode? */ + _glthread_TSD _gl_DispatchTSD; /**< Per-thread dispatch pointer */ -static _glthread_TSD ContextTSD; /**< Per-thread context pointer */ -#if defined(WIN32_THREADS) -void FreeTSD(_glthread_TSD *p); -void FreeAllTSD(void) -{ - FreeTSD(&_gl_DispatchTSD); - FreeTSD(&ContextTSD); -} -#endif /* defined(WIN32_THREADS) */ +static _glthread_TSD ContextTSD; /**< Per-thread context pointer */ #endif /* defined(THREADS) */ -PUBLIC struct _glapi_table *_glapi_Dispatch = - (struct _glapi_table *) __glapi_noop_table; +PUBLIC struct _glapi_table *_glapi_Dispatch = (struct _glapi_table *) __glapi_noop_table; + PUBLIC void *_glapi_Context = NULL; #endif /* defined(GLX_USE_TLS) */ @@ -232,15 +129,44 @@ PUBLIC void *_glapi_Context = NULL; +#if defined(THREADS) && !defined(GLX_USE_TLS) + +void +_glapi_init_multithread(void) +{ + _glthread_InitTSD(&_gl_DispatchTSD); + _glthread_InitTSD(&ContextTSD); +} + +void +_glapi_destroy_multithread(void) +{ +#ifdef WIN32_THREADS + _glthread_DestroyTSD(&_gl_DispatchTSD); + _glthread_DestroyTSD(&ContextTSD); +#endif +} + +/** + * Mutex for multithread check. + */ +#ifdef WIN32_THREADS +/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */ +#define CHECK_MULTITHREAD_LOCK() +#define CHECK_MULTITHREAD_UNLOCK() +#else +_glthread_DECLARE_STATIC_MUTEX(ThreadCheckMutex); +#define CHECK_MULTITHREAD_LOCK() _glthread_LOCK_MUTEX(ThreadCheckMutex) +#define CHECK_MULTITHREAD_UNLOCK() _glthread_UNLOCK_MUTEX(ThreadCheckMutex) +#endif /** * We should call this periodically from a function such as glXMakeCurrent * in order to test if multiple threads are being used. */ -void +PUBLIC void _glapi_check_multithread(void) { -#if defined(THREADS) && !defined(GLX_USE_TLS) static unsigned long knownID; static GLboolean firstCall = GL_TRUE; @@ -249,9 +175,7 @@ _glapi_check_multithread(void) CHECK_MULTITHREAD_LOCK(); if (firstCall) { - /* initialize TSDs */ - (void) _glthread_GetTSD(&ContextTSD); - (void) _glthread_GetTSD(&_gl_DispatchTSD); + _glapi_init_multithread(); knownID = _glthread_GetID(); firstCall = GL_FALSE; @@ -262,9 +186,21 @@ _glapi_check_multithread(void) _glapi_set_context(NULL); } CHECK_MULTITHREAD_UNLOCK(); -#endif } +#else + +void +_glapi_init_multithread(void) { } + +void +_glapi_destroy_multithread(void) { } + +PUBLIC void +_glapi_check_multithread(void) { } + +#endif + /** @@ -275,7 +211,6 @@ _glapi_check_multithread(void) PUBLIC void _glapi_set_context(void *context) { - (void) __unused_noop_functions; /* silence a warning */ #if defined(GLX_USE_TLS) _glapi_tls_Context = context; #elif defined(THREADS) @@ -299,198 +234,12 @@ _glapi_get_context(void) #if defined(GLX_USE_TLS) return _glapi_tls_Context; #elif defined(THREADS) - if (ThreadSafe) { - return _glthread_GetTSD(&ContextTSD); - } - else { - return _glapi_Context; - } + return (ThreadSafe) ? _glthread_GetTSD(&ContextTSD) : _glapi_Context; #else return _glapi_Context; #endif } -#ifdef USE_X86_ASM - -#if defined( GLX_USE_TLS ) -extern GLubyte gl_dispatch_functions_start[]; -extern GLubyte gl_dispatch_functions_end[]; -#else -extern const GLubyte gl_dispatch_functions_start[]; -#endif - -#endif /* USE_X86_ASM */ - - -#if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS) -# define DISPATCH_FUNCTION_SIZE 16 -#elif defined(USE_X86_ASM) -# if defined(THREADS) && !defined(GLX_USE_TLS) -# define DISPATCH_FUNCTION_SIZE 32 -# else -# define DISPATCH_FUNCTION_SIZE 16 -# endif -#endif - -#ifdef USE_SPARC_ASM -#ifdef GLX_USE_TLS -extern unsigned int __glapi_sparc_tls_stub; -#else -extern unsigned int __glapi_sparc_pthread_stub; -#endif -#endif - -#if !defined(DISPATCH_FUNCTION_SIZE) && !defined(XFree86Server) && !defined(XGLServer) -# define NEED_FUNCTION_POINTER -#endif - -#if defined(PTHREADS) || defined(GLX_USE_TLS) -/** - * Perform platform-specific GL API entry-point fixups. - */ -static void -init_glapi_relocs( void ) -{ -#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT) - extern unsigned long _x86_get_dispatch(void); - char run_time_patch[] = { - 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */ - }; - GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */ - const GLubyte * const get_disp = (const GLubyte *) run_time_patch; - GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start; - - *offset = _x86_get_dispatch(); - while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) { - (void) memcpy( curr_func, get_disp, sizeof(run_time_patch)); - curr_func += DISPATCH_FUNCTION_SIZE; - } -#endif -#ifdef USE_SPARC_ASM - extern void __glapi_sparc_icache_flush(unsigned int *); - static const unsigned int template[] = { -#ifdef GLX_USE_TLS - 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */ - 0x8730e00a, /* srl %g3, 10, %g3 */ - 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */ -#ifdef __arch64__ - 0xc259c002, /* ldx [%g7 + %g2], %g1 */ - 0xc2584003, /* ldx [%g1 + %g3], %g1 */ -#else - 0xc201c002, /* ld [%g7 + %g2], %g1 */ - 0xc2004003, /* ld [%g1 + %g3], %g1 */ -#endif - 0x81c04000, /* jmp %g1 */ - 0x01000000, /* nop */ -#else -#ifdef __arch64__ - 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */ - 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */ - 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */ - 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */ - 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */ - 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */ - 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */ -#else - 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */ - 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */ - 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */ -#endif - 0x80a06000, /* --> cmp %g1, 0 */ - 0x02800005, /* --> be +4*5 */ - 0x01000000, /* --> nop */ -#ifdef __arch64__ - 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */ -#else - 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */ -#endif - 0x81c04000, /* --> jmp %g1 */ - 0x01000000, /* --> nop */ -#ifdef __arch64__ - 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */ -#else - 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */ -#endif - 0xa0100003, /* --> mov %g3, %l0 */ - 0x40000000, /* --> call _glapi_get_dispatch */ - 0x01000000, /* --> nop */ - 0x82100008, /* --> mov %o0, %g1 */ - 0x86100010, /* --> mov %l0, %g3 */ - 0x10bffff7, /* --> ba -4*9 */ - 0x81e80000, /* --> restore */ -#endif - }; -#ifdef GLX_USE_TLS - extern unsigned long __glapi_sparc_get_dispatch(void); - unsigned int *code = &__glapi_sparc_tls_stub; - unsigned long dispatch = __glapi_sparc_get_dispatch(); -#else - unsigned int *code = &__glapi_sparc_pthread_stub; - unsigned long dispatch = (unsigned long) &_glapi_Dispatch; - unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch; - int idx; -#endif - -#if defined(GLX_USE_TLS) - code[0] = template[0] | (dispatch >> 10); - code[1] = template[1]; - __glapi_sparc_icache_flush(&code[0]); - code[2] = template[2] | (dispatch & 0x3ff); - code[3] = template[3]; - __glapi_sparc_icache_flush(&code[2]); - code[4] = template[4]; - code[5] = template[5]; - __glapi_sparc_icache_flush(&code[4]); - code[6] = template[6]; - __glapi_sparc_icache_flush(&code[6]); -#else -#if defined(__arch64__) - code[0] = template[0] | (dispatch >> (32 + 10)); - code[1] = template[1] | ((dispatch & 0xffffffff) >> 10); - __glapi_sparc_icache_flush(&code[0]); - code[2] = template[2] | ((dispatch >> 32) & 0x3ff); - code[3] = template[3]; - __glapi_sparc_icache_flush(&code[2]); - code[4] = template[4]; - code[5] = template[5]; - __glapi_sparc_icache_flush(&code[4]); - code[6] = template[6] | (dispatch & 0x3ff); - idx = 7; -#else - code[0] = template[0] | (dispatch >> 10); - code[1] = template[1]; - __glapi_sparc_icache_flush(&code[0]); - code[2] = template[2] | (dispatch & 0x3ff); - idx = 3; -#endif - code[idx + 0] = template[idx + 0]; - __glapi_sparc_icache_flush(&code[idx - 1]); - code[idx + 1] = template[idx + 1]; - code[idx + 2] = template[idx + 2]; - __glapi_sparc_icache_flush(&code[idx + 1]); - code[idx + 3] = template[idx + 3]; - code[idx + 4] = template[idx + 4]; - __glapi_sparc_icache_flush(&code[idx + 3]); - code[idx + 5] = template[idx + 5]; - code[idx + 6] = template[idx + 6]; - __glapi_sparc_icache_flush(&code[idx + 5]); - code[idx + 7] = template[idx + 7]; - code[idx + 8] = template[idx + 8] | - (((call_dest - ((unsigned long) &code[idx + 8])) - >> 2) & 0x3fffffff); - __glapi_sparc_icache_flush(&code[idx + 7]); - code[idx + 9] = template[idx + 9]; - code[idx + 10] = template[idx + 10]; - __glapi_sparc_icache_flush(&code[idx + 9]); - code[idx + 11] = template[idx + 11]; - code[idx + 12] = template[idx + 12]; - __glapi_sparc_icache_flush(&code[idx + 11]); - code[idx + 13] = template[idx + 13]; - __glapi_sparc_icache_flush(&code[idx + 13]); -#endif -#endif -} -#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */ /** @@ -501,17 +250,15 @@ init_glapi_relocs( void ) PUBLIC void _glapi_set_dispatch(struct _glapi_table *dispatch) { -#if defined(PTHREADS) || defined(GLX_USE_TLS) - static pthread_once_t once_control = PTHREAD_ONCE_INIT; - pthread_once( & once_control, init_glapi_relocs ); -#endif + init_glapi_relocs_once(); - if (!dispatch) { + if (dispatch == NULL) { /* use the no-op functions */ dispatch = (struct _glapi_table *) __glapi_noop_table; } #ifdef DEBUG else { + _glapi_check_table_not_null(dispatch); _glapi_check_table(dispatch); } #endif @@ -521,9 +268,9 @@ _glapi_set_dispatch(struct _glapi_table *dispatch) #elif defined(THREADS) _glthread_SetTSD(&_gl_DispatchTSD, (void *) dispatch); _glapi_Dispatch = (ThreadSafe) ? NULL : dispatch; -#else /*THREADS*/ +#else _glapi_Dispatch = dispatch; -#endif /*THREADS*/ +#endif } @@ -534,17 +281,15 @@ _glapi_set_dispatch(struct _glapi_table *dispatch) PUBLIC struct _glapi_table * _glapi_get_dispatch(void) { - struct _glapi_table * api; #if defined(GLX_USE_TLS) - api = _glapi_tls_Dispatch; + return _glapi_tls_Dispatch; #elif defined(THREADS) - api = (ThreadSafe) + return (ThreadSafe) ? (struct _glapi_table *) _glthread_GetTSD(&_gl_DispatchTSD) : _glapi_Dispatch; #else - api = _glapi_Dispatch; + return _glapi_Dispatch; #endif - return api; } @@ -575,75 +320,15 @@ _glapi_get_dispatch_table_size(void) * Intended for debugging purposes. */ void -_glapi_check_table(const struct _glapi_table *table) +_glapi_check_table_not_null(const struct _glapi_table *table) { -#ifdef EXTRA_DEBUG +#if 0 /* enable this for extra DEBUG */ const GLuint entries = _glapi_get_dispatch_table_size(); const void **tab = (const void **) table; GLuint i; for (i = 1; i < entries; i++) { assert(tab[i]); } - - /* Do some spot checks to be sure that the dispatch table - * slots are assigned correctly. - */ - { - GLuint BeginOffset = _glapi_get_proc_offset("glBegin"); - char *BeginFunc = (char*) &table->Begin; - GLuint offset = (BeginFunc - (char *) table) / sizeof(void *); - assert(BeginOffset == _gloffset_Begin); - assert(BeginOffset == offset); - } - { - GLuint viewportOffset = _glapi_get_proc_offset("glViewport"); - char *viewportFunc = (char*) &table->Viewport; - GLuint offset = (viewportFunc - (char *) table) / sizeof(void *); - assert(viewportOffset == _gloffset_Viewport); - assert(viewportOffset == offset); - } - { - GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer"); - char *VertexPointerFunc = (char*) &table->VertexPointer; - GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *); - assert(VertexPointerOffset == _gloffset_VertexPointer); - assert(VertexPointerOffset == offset); - } - { - GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax"); - char *ResetMinMaxFunc = (char*) &table->ResetMinmax; - GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *); - assert(ResetMinMaxOffset == _gloffset_ResetMinmax); - assert(ResetMinMaxOffset == offset); - } - { - GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor"); - char *blendColorFunc = (char*) &table->BlendColor; - GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *); - assert(blendColorOffset == _gloffset_BlendColor); - assert(blendColorOffset == offset); - } - { - GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT"); - char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT; - GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *); - assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT); - assert(secondaryColor3fOffset == offset); - } - { - GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV"); - char *pointParameterivFunc = (char*) &table->PointParameterivNV; - GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *); - assert(pointParameterivOffset == _gloffset_PointParameterivNV); - assert(pointParameterivOffset == offset); - } - { - GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV"); - char *setFenceFunc = (char*) &table->SetFenceNV; - GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *); - assert(setFenceOffset == _gloffset_SetFenceNV); - assert(setFenceOffset == offset); - } #else (void) table; #endif diff --git a/mesalib/src/mesa/glapi/glapi.h b/mesalib/src/mesa/glapi/glapi.h index 5fb540122..1ca2e4bef 100644 --- a/mesalib/src/mesa/glapi/glapi.h +++ b/mesalib/src/mesa/glapi/glapi.h @@ -44,10 +44,6 @@ #ifndef _GLAPI_H #define _GLAPI_H -#define GL_GLEXT_PROTOTYPES - -#include "GL/gl.h" -#include "GL/glext.h" #include "glthread.h" @@ -55,48 +51,67 @@ struct _glapi_table; typedef void (*_glapi_proc)(void); /* generic function pointer */ -typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...); - #if defined(USE_MGL_NAMESPACE) #define _glapi_set_dispatch _mglapi_set_dispatch #define _glapi_get_dispatch _mglapi_get_dispatch #define _glapi_set_context _mglapi_set_context #define _glapi_get_context _mglapi_get_context -#define _glapi_Context _mglapi_Context #define _glapi_Dispatch _mglapi_Dispatch +#define _glapi_Context _mglapi_Context #endif -/* - * Number of extension functions which we can dynamically add at runtime. - */ -#define MAX_EXTENSION_FUNCS 300 +#if defined(__GNUC__) +# define likely(x) __builtin_expect(!!(x), 1) +# define unlikely(x) __builtin_expect(!!(x), 0) +#else +# define likely(x) (x) +# define unlikely(x) (x) +#endif /** - ** Define the GET_CURRENT_CONTEXT() macro. + ** Define the GET_DISPATCH() and GET_CURRENT_CONTEXT() macros. + ** ** \param C local variable which will hold the current context. **/ #if defined (GLX_USE_TLS) -extern const void *_glapi_Context; extern const struct _glapi_table *_glapi_Dispatch; +extern const void *_glapi_Context; + +extern __thread struct _glapi_table * _glapi_tls_Dispatch + __attribute__((tls_model("initial-exec"))); + extern __thread void * _glapi_tls_Context __attribute__((tls_model("initial-exec"))); +# define GET_DISPATCH() _glapi_tls_Dispatch + # define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context #else -extern void *_glapi_Context; extern struct _glapi_table *_glapi_Dispatch; +extern void *_glapi_Context; + # ifdef THREADS -# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context()) + +# define GET_DISPATCH() \ + (likely(_glapi_Dispatch) ? _glapi_Dispatch : _glapi_get_dispatch()) + +# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) \ + (likely(_glapi_Context) ? _glapi_Context : _glapi_get_context()) + # else + +# define GET_DISPATCH() _glapi_Dispatch + # define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context + # endif #endif /* defined (GLX_USE_TLS) */ @@ -107,10 +122,12 @@ extern struct _glapi_table *_glapi_Dispatch; **/ extern void -_glapi_noop_enable_warnings(GLboolean enable); +_glapi_init_multithread(void); + extern void -_glapi_set_warning_func(_glapi_warning_func func); +_glapi_destroy_multithread(void); + extern void _glapi_check_multithread(void); @@ -132,40 +149,45 @@ extern struct _glapi_table * _glapi_get_dispatch(void); -extern int -_glapi_begin_dispatch_override(struct _glapi_table *override); +extern unsigned int +_glapi_get_dispatch_table_size(void); -extern void -_glapi_end_dispatch_override(int layer); +extern int +_glapi_add_dispatch( const char * const * function_names, + const char * parameter_signature ); +extern int +_glapi_get_proc_offset(const char *funcName); -struct _glapi_table * -_glapi_get_override_dispatch(int layer); +extern _glapi_proc +_glapi_get_proc_address(const char *funcName); -extern GLuint -_glapi_get_dispatch_table_size(void); +/** + * GL API local functions and defines + */ extern void -_glapi_check_table(const struct _glapi_table *table); +init_glapi_relocs_once(void); +extern void +_glapi_check_table_not_null(const struct _glapi_table *table); -extern int -_glapi_add_dispatch( const char * const * function_names, - const char * parameter_signature ); -extern GLint -_glapi_get_proc_offset(const char *funcName); +extern void +_glapi_check_table(const struct _glapi_table *table); -extern _glapi_proc -_glapi_get_proc_address(const char *funcName); +extern const char * +_glapi_get_proc_name(unsigned int offset); -extern const char * -_glapi_get_proc_name(GLuint offset); +/* + * Number of extension functions which we can dynamically add at runtime. + */ +#define MAX_EXTENSION_FUNCS 300 #endif diff --git a/mesalib/src/mesa/glapi/glapi_dispatch.c b/mesalib/src/mesa/glapi/glapi_dispatch.c new file mode 100644 index 000000000..32b9535e3 --- /dev/null +++ b/mesalib/src/mesa/glapi/glapi_dispatch.c @@ -0,0 +1,102 @@ +/* + * Mesa 3-D graphics library + * Version: 6.3 + * + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * + * 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 + * BRIAN PAUL 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. + */ + + +/** + * \file glapi_dispatch.c + * + * This file generates all the gl* function entrypoints. This code is not + * used if optimized assembly stubs are available (e.g., using x86/glapi_x86.S + * on IA32 or sparc/glapi_sparc.S on SPARC). + * + * \note + * This file is also used to build the client-side libGL that loads DRI-based + * device drivers. At build-time it is symlinked to src/glx. + * + * \author Brian Paul + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#include "glapi/mesa.h" +#else +#include "main/glheader.h" +#include "main/compiler.h" +#endif + +#include "glapi/glapi.h" +#include "glapi/glapitable.h" +#include "glapi/glapidispatch.h" +#include "glapi/glthread.h" + + +#if !(defined(USE_X86_ASM) || defined(USE_X86_64_ASM) || defined(USE_SPARC_ASM)) + +#if defined(WIN32) +#define KEYWORD1 GLAPI +#else +#define KEYWORD1 PUBLIC +#endif + +#define KEYWORD2 GLAPIENTRY + +#if defined(USE_MGL_NAMESPACE) +#define NAME(func) mgl##func +#else +#define NAME(func) gl##func +#endif + +#if 0 /* Use this to log GL calls to stdout (for DEBUG only!) */ + +#define F stdout +#define DISPATCH(FUNC, ARGS, MESSAGE) \ + fprintf MESSAGE; \ + CALL_ ## FUNC(GET_DISPATCH(), ARGS); + +#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ + fprintf MESSAGE; \ + return CALL_ ## FUNC(GET_DISPATCH(), ARGS); + +#else + +#define DISPATCH(FUNC, ARGS, MESSAGE) \ + CALL_ ## FUNC(GET_DISPATCH(), ARGS); + +#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ + return CALL_ ## FUNC(GET_DISPATCH(), ARGS); + +#endif /* logging */ + + +#ifndef GLAPIENTRY +#define GLAPIENTRY +#endif + +#ifdef GLX_INDIRECT_RENDERING +/* those link to libglapi.a should provide the entry points */ +#define _GLAPI_SKIP_PROTO_ENTRY_POINTS +#endif +#include "glapi/glapitemp.h" + +#endif /* USE_X86_ASM */ diff --git a/mesalib/src/mesa/glapi/glapi_getproc.c b/mesalib/src/mesa/glapi/glapi_getproc.c index ed443c12c..a6dbf173e 100644 --- a/mesalib/src/mesa/glapi/glapi_getproc.c +++ b/mesalib/src/mesa/glapi/glapi_getproc.c @@ -30,34 +30,17 @@ */ -#include -#include +#ifdef HAVE_DIX_CONFIG_H +#include +#include "glapi/mesa.h" +#else #include "main/glheader.h" #include "main/compiler.h" -#include "glapi.h" -#include "glapioffsets.h" -#include "glapitable.h" - - -static void -fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset); - - -/** - * strdup() is actually not a standard ANSI C or POSIX routine. - * Irix will not define it if ANSI mode is in effect. - */ -static char * -str_dup(const char *str) -{ - char *copy; - copy = (char*) malloc(strlen(str) + 1); - if (!copy) - return NULL; - strcpy(copy, str); - return copy; -} +#endif +#include "glapi/glapi.h" +#include "glapi/glapioffsets.h" +#include "glapi/glapitable.h" #if defined(USE_X64_64_ASM) && defined(GLX_USE_TLS) @@ -75,7 +58,7 @@ str_dup(const char *str) #endif /* The code in this file is auto-generated with Python */ -#include "glprocs.h" +#include "glapi/glprocs.h" /** @@ -117,7 +100,6 @@ get_static_proc_offset(const char *funcName) } -#if !defined(XFree86Server) && !defined(XGLServer) #ifdef USE_X86_ASM #if defined( GLX_USE_TLS ) @@ -130,6 +112,8 @@ extern const GLubyte gl_dispatch_functions_start[]; #endif /* USE_X86_ASM */ +#if !defined(XFree86Server) && !defined(XGLServer) + /** * Return dispatch function address for the named static (built-in) function. * Return NULL if function not found. @@ -178,6 +162,172 @@ get_static_proc_name( GLuint offset ) +#if defined(PTHREADS) || defined(GLX_USE_TLS) + +/** + * Perform platform-specific GL API entry-point fixups. + */ +static void +init_glapi_relocs( void ) +{ +#if defined(USE_X86_ASM) && defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT) + extern unsigned long _x86_get_dispatch(void); + char run_time_patch[] = { + 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */ + }; + GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */ + const GLubyte * const get_disp = (const GLubyte *) run_time_patch; + GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start; + + *offset = _x86_get_dispatch(); + while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) { + (void) memcpy( curr_func, get_disp, sizeof(run_time_patch)); + curr_func += DISPATCH_FUNCTION_SIZE; + } +#endif +#ifdef USE_SPARC_ASM + extern void __glapi_sparc_icache_flush(unsigned int *); + static const unsigned int template[] = { +#ifdef GLX_USE_TLS + 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */ + 0x8730e00a, /* srl %g3, 10, %g3 */ + 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */ +#ifdef __arch64__ + 0xc259c002, /* ldx [%g7 + %g2], %g1 */ + 0xc2584003, /* ldx [%g1 + %g3], %g1 */ +#else + 0xc201c002, /* ld [%g7 + %g2], %g1 */ + 0xc2004003, /* ld [%g1 + %g3], %g1 */ +#endif + 0x81c04000, /* jmp %g1 */ + 0x01000000, /* nop */ +#else +#ifdef __arch64__ + 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */ + 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */ + 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */ + 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */ + 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */ + 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */ + 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */ +#else + 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */ + 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */ + 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */ +#endif + 0x80a06000, /* --> cmp %g1, 0 */ + 0x02800005, /* --> be +4*5 */ + 0x01000000, /* --> nop */ +#ifdef __arch64__ + 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */ +#else + 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */ +#endif + 0x81c04000, /* --> jmp %g1 */ + 0x01000000, /* --> nop */ +#ifdef __arch64__ + 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */ +#else + 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */ +#endif + 0xa0100003, /* --> mov %g3, %l0 */ + 0x40000000, /* --> call _glapi_get_dispatch */ + 0x01000000, /* --> nop */ + 0x82100008, /* --> mov %o0, %g1 */ + 0x86100010, /* --> mov %l0, %g3 */ + 0x10bffff7, /* --> ba -4*9 */ + 0x81e80000, /* --> restore */ +#endif + }; +#ifdef GLX_USE_TLS + extern unsigned int __glapi_sparc_tls_stub; + extern unsigned long __glapi_sparc_get_dispatch(void); + unsigned int *code = &__glapi_sparc_tls_stub; + unsigned long dispatch = __glapi_sparc_get_dispatch(); +#else + extern unsigned int __glapi_sparc_pthread_stub; + unsigned int *code = &__glapi_sparc_pthread_stub; + unsigned long dispatch = (unsigned long) &_glapi_Dispatch; + unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch; + int idx; +#endif + +#if defined(GLX_USE_TLS) + code[0] = template[0] | (dispatch >> 10); + code[1] = template[1]; + __glapi_sparc_icache_flush(&code[0]); + code[2] = template[2] | (dispatch & 0x3ff); + code[3] = template[3]; + __glapi_sparc_icache_flush(&code[2]); + code[4] = template[4]; + code[5] = template[5]; + __glapi_sparc_icache_flush(&code[4]); + code[6] = template[6]; + __glapi_sparc_icache_flush(&code[6]); +#else +#if defined(__arch64__) + code[0] = template[0] | (dispatch >> (32 + 10)); + code[1] = template[1] | ((dispatch & 0xffffffff) >> 10); + __glapi_sparc_icache_flush(&code[0]); + code[2] = template[2] | ((dispatch >> 32) & 0x3ff); + code[3] = template[3]; + __glapi_sparc_icache_flush(&code[2]); + code[4] = template[4]; + code[5] = template[5]; + __glapi_sparc_icache_flush(&code[4]); + code[6] = template[6] | (dispatch & 0x3ff); + idx = 7; +#else + code[0] = template[0] | (dispatch >> 10); + code[1] = template[1]; + __glapi_sparc_icache_flush(&code[0]); + code[2] = template[2] | (dispatch & 0x3ff); + idx = 3; +#endif + code[idx + 0] = template[idx + 0]; + __glapi_sparc_icache_flush(&code[idx - 1]); + code[idx + 1] = template[idx + 1]; + code[idx + 2] = template[idx + 2]; + __glapi_sparc_icache_flush(&code[idx + 1]); + code[idx + 3] = template[idx + 3]; + code[idx + 4] = template[idx + 4]; + __glapi_sparc_icache_flush(&code[idx + 3]); + code[idx + 5] = template[idx + 5]; + code[idx + 6] = template[idx + 6]; + __glapi_sparc_icache_flush(&code[idx + 5]); + code[idx + 7] = template[idx + 7]; + code[idx + 8] = template[idx + 8] | + (((call_dest - ((unsigned long) &code[idx + 8])) + >> 2) & 0x3fffffff); + __glapi_sparc_icache_flush(&code[idx + 7]); + code[idx + 9] = template[idx + 9]; + code[idx + 10] = template[idx + 10]; + __glapi_sparc_icache_flush(&code[idx + 9]); + code[idx + 11] = template[idx + 11]; + code[idx + 12] = template[idx + 12]; + __glapi_sparc_icache_flush(&code[idx + 11]); + code[idx + 13] = template[idx + 13]; + __glapi_sparc_icache_flush(&code[idx + 13]); +#endif +#endif +} + +void +init_glapi_relocs_once( void ) +{ + static pthread_once_t once_control = PTHREAD_ONCE_INIT; + pthread_once( & once_control, init_glapi_relocs ); +} + +#else + +void +init_glapi_relocs_once( void ) { } + +#endif /* defined(PTHREADS) || defined(GLX_USE_TLS) */ + + + /********************************************************************** * Extension function management. */ @@ -235,6 +385,9 @@ static GLuint NumExtEntryPoints = 0; extern void __glapi_sparc_icache_flush(unsigned int *); #endif +static void +fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset); + /** * Generate a dispatch function (entrypoint) which jumps through * the given slot number (offset) in the current dispatch table. @@ -259,7 +412,9 @@ generate_entrypoint(GLuint functionOffset) } return (_glapi_proc) code; -#elif defined(USE_SPARC_ASM) && (defined(PTHREADS) || defined(GLX_USE_TLS)) +#elif defined(USE_SPARC_ASM) + +#if defined(PTHREADS) || defined(GLX_USE_TLS) static const unsigned int template[] = { 0x07000000, /* sethi %hi(0), %g3 */ 0x8210000f, /* mov %o7, %g1 */ @@ -285,6 +440,8 @@ generate_entrypoint(GLuint functionOffset) __glapi_sparc_icache_flush(&code[2]); } return (_glapi_proc) code; +#endif + #else (void) functionOffset; return NULL; @@ -328,6 +485,22 @@ fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset) } +/** + * strdup() is actually not a standard ANSI C or POSIX routine. + * Irix will not define it if ANSI mode is in effect. + */ +static char * +str_dup(const char *str) +{ + char *copy; + copy = (char*) malloc(strlen(str) + 1); + if (!copy) + return NULL; + strcpy(copy, str); + return copy; +} + + /** * Generate new entrypoint * @@ -530,7 +703,7 @@ _glapi_get_proc_offset(const char *funcName) * in the name of static functions, try generating a new API entrypoint on * the fly with assembly language. */ -_glapi_proc +PUBLIC _glapi_proc _glapi_get_proc_address(const char *funcName) { struct _glapi_function * entry; @@ -590,3 +763,74 @@ _glapi_get_proc_name(GLuint offset) } return NULL; } + + + +/** + * Do some spot checks to be sure that the dispatch table + * slots are assigned correctly. For debugging only. + */ +void +_glapi_check_table(const struct _glapi_table *table) +{ +#if 0 /* enable this for extra DEBUG */ + { + GLuint BeginOffset = _glapi_get_proc_offset("glBegin"); + char *BeginFunc = (char*) &table->Begin; + GLuint offset = (BeginFunc - (char *) table) / sizeof(void *); + assert(BeginOffset == _gloffset_Begin); + assert(BeginOffset == offset); + } + { + GLuint viewportOffset = _glapi_get_proc_offset("glViewport"); + char *viewportFunc = (char*) &table->Viewport; + GLuint offset = (viewportFunc - (char *) table) / sizeof(void *); + assert(viewportOffset == _gloffset_Viewport); + assert(viewportOffset == offset); + } + { + GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer"); + char *VertexPointerFunc = (char*) &table->VertexPointer; + GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *); + assert(VertexPointerOffset == _gloffset_VertexPointer); + assert(VertexPointerOffset == offset); + } + { + GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax"); + char *ResetMinMaxFunc = (char*) &table->ResetMinmax; + GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *); + assert(ResetMinMaxOffset == _gloffset_ResetMinmax); + assert(ResetMinMaxOffset == offset); + } + { + GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor"); + char *blendColorFunc = (char*) &table->BlendColor; + GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *); + assert(blendColorOffset == _gloffset_BlendColor); + assert(blendColorOffset == offset); + } + { + GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT"); + char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT; + GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *); + assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT); + assert(secondaryColor3fOffset == offset); + } + { + GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV"); + char *pointParameterivFunc = (char*) &table->PointParameterivNV; + GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *); + assert(pointParameterivOffset == _gloffset_PointParameterivNV); + assert(pointParameterivOffset == offset); + } + { + GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV"); + char *setFenceFunc = (char*) &table->SetFenceNV; + GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *); + assert(setFenceOffset == _gloffset_SetFenceNV); + assert(setFenceOffset == offset); + } +#else + (void) table; +#endif +} diff --git a/mesalib/src/mesa/glapi/glapi_nop.c b/mesalib/src/mesa/glapi/glapi_nop.c new file mode 100644 index 000000000..df9c58728 --- /dev/null +++ b/mesalib/src/mesa/glapi/glapi_nop.c @@ -0,0 +1,114 @@ +/* + * Mesa 3-D graphics library + * Version: 7.8 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2010 VMWare, Inc. All Rights Reserved. + * + * 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 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. + */ + + +/** + * No-op dispatch table. + * + * This file defines a special dispatch table which is loaded with no-op + * functions. + * + * When there's no current rendering context, calling a GL function like + * glBegin() is a no-op. Apps should never normally do this. So as a + * debugging aid, each of the no-op functions will emit a warning to + * stderr if the MESA_DEBUG or LIBGL_DEBUG env var is set. + */ + + + +#ifdef HAVE_DIX_CONFIG_H +#include +#include "glapi/mesa.h" +#else +#include "main/compiler.h" +#include "main/glheader.h" +#endif + +#include "glapi/glapi.h" + +#ifdef DEBUG + +/** + * Called by each of the no-op GL entrypoints. + */ +static int +Warn(const char *func) +{ +#if !defined(_WIN32_WCE) + if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) { + fprintf(stderr, "GL User Error: gl%s called without a rendering context\n", + func); + } +#endif + return 0; +} + + +/** + * This is called if the user somehow calls an unassigned GL dispatch function. + */ +static GLint +NoOpUnused(void) +{ + return Warn(" function"); +} + +/* + * Defines for the glapitemp.h functions. + */ +#define KEYWORD1 static +#define KEYWORD1_ALT static +#define KEYWORD2 GLAPIENTRY +#define NAME(func) NoOp##func +#define DISPATCH(func, args, msg) Warn(#func); +#define RETURN_DISPATCH(func, args, msg) Warn(#func); return 0 + + +/* + * Defines for the table of no-op entry points. + */ +#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name + +#else + +static int +NoOpGeneric(void) +{ +#if !defined(_WIN32_WCE) + if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) { + fprintf(stderr, "GL User Error: calling GL function without a rendering context\n"); + } +#endif + return 0; +} + +#define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric + +#endif + +#define DISPATCH_TABLE_NAME __glapi_noop_table +#define UNUSED_TABLE_NAME __unused_noop_functions + +#include "glapi/glapitemp.h" diff --git a/mesalib/src/mesa/glapi/glapidispatch.h b/mesalib/src/mesa/glapi/glapidispatch.h index d6ba92824..7e0f21390 100644 --- a/mesalib/src/mesa/glapi/glapidispatch.h +++ b/mesalib/src/mesa/glapi/glapidispatch.h @@ -2422,6 +2422,30 @@ #define CALL_FramebufferTextureLayerEXT(disp, parameters) (*((disp)->FramebufferTextureLayerEXT)) parameters #define GET_FramebufferTextureLayerEXT(disp) ((disp)->FramebufferTextureLayerEXT) #define SET_FramebufferTextureLayerEXT(disp, fn) ((disp)->FramebufferTextureLayerEXT = fn) +#define CALL_ColorMaskIndexedEXT(disp, parameters) (*((disp)->ColorMaskIndexedEXT)) parameters +#define GET_ColorMaskIndexedEXT(disp) ((disp)->ColorMaskIndexedEXT) +#define SET_ColorMaskIndexedEXT(disp, fn) ((disp)->ColorMaskIndexedEXT = fn) +#define CALL_DisableIndexedEXT(disp, parameters) (*((disp)->DisableIndexedEXT)) parameters +#define GET_DisableIndexedEXT(disp) ((disp)->DisableIndexedEXT) +#define SET_DisableIndexedEXT(disp, fn) ((disp)->DisableIndexedEXT = fn) +#define CALL_EnableIndexedEXT(disp, parameters) (*((disp)->EnableIndexedEXT)) parameters +#define GET_EnableIndexedEXT(disp) ((disp)->EnableIndexedEXT) +#define SET_EnableIndexedEXT(disp, fn) ((disp)->EnableIndexedEXT = fn) +#define CALL_GetBooleanIndexedvEXT(disp, parameters) (*((disp)->GetBooleanIndexedvEXT)) parameters +#define GET_GetBooleanIndexedvEXT(disp) ((disp)->GetBooleanIndexedvEXT) +#define SET_GetBooleanIndexedvEXT(disp, fn) ((disp)->GetBooleanIndexedvEXT = fn) +#define CALL_GetIntegerIndexedvEXT(disp, parameters) (*((disp)->GetIntegerIndexedvEXT)) parameters +#define GET_GetIntegerIndexedvEXT(disp) ((disp)->GetIntegerIndexedvEXT) +#define SET_GetIntegerIndexedvEXT(disp, fn) ((disp)->GetIntegerIndexedvEXT = fn) +#define CALL_IsEnabledIndexedEXT(disp, parameters) (*((disp)->IsEnabledIndexedEXT)) parameters +#define GET_IsEnabledIndexedEXT(disp) ((disp)->IsEnabledIndexedEXT) +#define SET_IsEnabledIndexedEXT(disp, fn) ((disp)->IsEnabledIndexedEXT = fn) +#define CALL_BeginConditionalRenderNV(disp, parameters) (*((disp)->BeginConditionalRenderNV)) parameters +#define GET_BeginConditionalRenderNV(disp) ((disp)->BeginConditionalRenderNV) +#define SET_BeginConditionalRenderNV(disp, fn) ((disp)->BeginConditionalRenderNV = fn) +#define CALL_EndConditionalRenderNV(disp, parameters) (*((disp)->EndConditionalRenderNV)) parameters +#define GET_EndConditionalRenderNV(disp) ((disp)->EndConditionalRenderNV) +#define SET_EndConditionalRenderNV(disp, fn) ((disp)->EndConditionalRenderNV = fn) #define CALL_ProvokingVertexEXT(disp, parameters) (*((disp)->ProvokingVertexEXT)) parameters #define GET_ProvokingVertexEXT(disp) ((disp)->ProvokingVertexEXT) #define SET_ProvokingVertexEXT(disp, fn) ((disp)->ProvokingVertexEXT = fn) @@ -2431,6 +2455,15 @@ #define CALL_TextureRangeAPPLE(disp, parameters) (*((disp)->TextureRangeAPPLE)) parameters #define GET_TextureRangeAPPLE(disp) ((disp)->TextureRangeAPPLE) #define SET_TextureRangeAPPLE(disp, fn) ((disp)->TextureRangeAPPLE = fn) +#define CALL_GetObjectParameterivAPPLE(disp, parameters) (*((disp)->GetObjectParameterivAPPLE)) parameters +#define GET_GetObjectParameterivAPPLE(disp) ((disp)->GetObjectParameterivAPPLE) +#define SET_GetObjectParameterivAPPLE(disp, fn) ((disp)->GetObjectParameterivAPPLE = fn) +#define CALL_ObjectPurgeableAPPLE(disp, parameters) (*((disp)->ObjectPurgeableAPPLE)) parameters +#define GET_ObjectPurgeableAPPLE(disp) ((disp)->ObjectPurgeableAPPLE) +#define SET_ObjectPurgeableAPPLE(disp, fn) ((disp)->ObjectPurgeableAPPLE = fn) +#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) (*((disp)->ObjectUnpurgeableAPPLE)) parameters +#define GET_ObjectUnpurgeableAPPLE(disp) ((disp)->ObjectUnpurgeableAPPLE) +#define SET_ObjectUnpurgeableAPPLE(disp, fn) ((disp)->ObjectUnpurgeableAPPLE = fn) #define CALL_StencilFuncSeparateATI(disp, parameters) (*((disp)->StencilFuncSeparateATI)) parameters #define GET_StencilFuncSeparateATI(disp) ((disp)->StencilFuncSeparateATI) #define SET_StencilFuncSeparateATI(disp, fn) ((disp)->StencilFuncSeparateATI = fn) @@ -2446,10 +2479,16 @@ #define CALL_GetQueryObjectui64vEXT(disp, parameters) (*((disp)->GetQueryObjectui64vEXT)) parameters #define GET_GetQueryObjectui64vEXT(disp) ((disp)->GetQueryObjectui64vEXT) #define SET_GetQueryObjectui64vEXT(disp, fn) ((disp)->GetQueryObjectui64vEXT = fn) +#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) (*((disp)->EGLImageTargetRenderbufferStorageOES)) parameters +#define GET_EGLImageTargetRenderbufferStorageOES(disp) ((disp)->EGLImageTargetRenderbufferStorageOES) +#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) ((disp)->EGLImageTargetRenderbufferStorageOES = fn) +#define CALL_EGLImageTargetTexture2DOES(disp, parameters) (*((disp)->EGLImageTargetTexture2DOES)) parameters +#define GET_EGLImageTargetTexture2DOES(disp) ((disp)->EGLImageTargetTexture2DOES) +#define SET_EGLImageTargetTexture2DOES(disp, fn) ((disp)->EGLImageTargetTexture2DOES = fn) #else -#define driDispatchRemapTable_size 387 +#define driDispatchRemapTable_size 400 extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define AttachShader_remap_index 0 @@ -2831,14 +2870,27 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define BufferParameteriAPPLE_remap_index 376 #define FlushMappedBufferRangeAPPLE_remap_index 377 #define FramebufferTextureLayerEXT_remap_index 378 -#define ProvokingVertexEXT_remap_index 379 -#define GetTexParameterPointervAPPLE_remap_index 380 -#define TextureRangeAPPLE_remap_index 381 -#define StencilFuncSeparateATI_remap_index 382 -#define ProgramEnvParameters4fvEXT_remap_index 383 -#define ProgramLocalParameters4fvEXT_remap_index 384 -#define GetQueryObjecti64vEXT_remap_index 385 -#define GetQueryObjectui64vEXT_remap_index 386 +#define ColorMaskIndexedEXT_remap_index 379 +#define DisableIndexedEXT_remap_index 380 +#define EnableIndexedEXT_remap_index 381 +#define GetBooleanIndexedvEXT_remap_index 382 +#define GetIntegerIndexedvEXT_remap_index 383 +#define IsEnabledIndexedEXT_remap_index 384 +#define BeginConditionalRenderNV_remap_index 385 +#define EndConditionalRenderNV_remap_index 386 +#define ProvokingVertexEXT_remap_index 387 +#define GetTexParameterPointervAPPLE_remap_index 388 +#define TextureRangeAPPLE_remap_index 389 +#define GetObjectParameterivAPPLE_remap_index 390 +#define ObjectPurgeableAPPLE_remap_index 391 +#define ObjectUnpurgeableAPPLE_remap_index 392 +#define StencilFuncSeparateATI_remap_index 393 +#define ProgramEnvParameters4fvEXT_remap_index 394 +#define ProgramLocalParameters4fvEXT_remap_index 395 +#define GetQueryObjecti64vEXT_remap_index 396 +#define GetQueryObjectui64vEXT_remap_index 397 +#define EGLImageTargetRenderbufferStorageOES_remap_index 398 +#define EGLImageTargetTexture2DOES_remap_index 399 #define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[AttachShader_remap_index], parameters) #define GET_AttachShader(disp) GET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index]) @@ -3977,6 +4029,30 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index], parameters) #define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index]) #define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index], fn) +#define CALL_ColorMaskIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)), driDispatchRemapTable[ColorMaskIndexedEXT_remap_index], parameters) +#define GET_ColorMaskIndexedEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ColorMaskIndexedEXT_remap_index]) +#define SET_ColorMaskIndexedEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorMaskIndexedEXT_remap_index], fn) +#define CALL_DisableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[DisableIndexedEXT_remap_index], parameters) +#define GET_DisableIndexedEXT(disp) GET_by_offset(disp, driDispatchRemapTable[DisableIndexedEXT_remap_index]) +#define SET_DisableIndexedEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DisableIndexedEXT_remap_index], fn) +#define CALL_EnableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[EnableIndexedEXT_remap_index], parameters) +#define GET_EnableIndexedEXT(disp) GET_by_offset(disp, driDispatchRemapTable[EnableIndexedEXT_remap_index]) +#define SET_EnableIndexedEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EnableIndexedEXT_remap_index], fn) +#define CALL_GetBooleanIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLboolean *)), driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index], parameters) +#define GET_GetBooleanIndexedvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index]) +#define SET_GetBooleanIndexedvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index], fn) +#define CALL_GetIntegerIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint *)), driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index], parameters) +#define GET_GetIntegerIndexedvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index]) +#define SET_GetIntegerIndexedvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index], fn) +#define CALL_IsEnabledIndexedEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[IsEnabledIndexedEXT_remap_index], parameters) +#define GET_IsEnabledIndexedEXT(disp) GET_by_offset(disp, driDispatchRemapTable[IsEnabledIndexedEXT_remap_index]) +#define SET_IsEnabledIndexedEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsEnabledIndexedEXT_remap_index], fn) +#define CALL_BeginConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), driDispatchRemapTable[BeginConditionalRenderNV_remap_index], parameters) +#define GET_BeginConditionalRenderNV(disp) GET_by_offset(disp, driDispatchRemapTable[BeginConditionalRenderNV_remap_index]) +#define SET_BeginConditionalRenderNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BeginConditionalRenderNV_remap_index], fn) +#define CALL_EndConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[EndConditionalRenderNV_remap_index], parameters) +#define GET_EndConditionalRenderNV(disp) GET_by_offset(disp, driDispatchRemapTable[EndConditionalRenderNV_remap_index]) +#define SET_EndConditionalRenderNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EndConditionalRenderNV_remap_index], fn) #define CALL_ProvokingVertexEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[ProvokingVertexEXT_remap_index], parameters) #define GET_ProvokingVertexEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ProvokingVertexEXT_remap_index]) #define SET_ProvokingVertexEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProvokingVertexEXT_remap_index], fn) @@ -3986,6 +4062,15 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define CALL_TextureRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLvoid *)), driDispatchRemapTable[TextureRangeAPPLE_remap_index], parameters) #define GET_TextureRangeAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[TextureRangeAPPLE_remap_index]) #define SET_TextureRangeAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[TextureRangeAPPLE_remap_index], fn) +#define CALL_GetObjectParameterivAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index], parameters) +#define GET_GetObjectParameterivAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index]) +#define SET_GetObjectParameterivAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index], fn) +#define CALL_ObjectPurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index], parameters) +#define GET_ObjectPurgeableAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index]) +#define SET_ObjectPurgeableAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index], fn) +#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index], parameters) +#define GET_ObjectUnpurgeableAPPLE(disp) GET_by_offset(disp, driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index]) +#define SET_ObjectUnpurgeableAPPLE(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index], fn) #define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), driDispatchRemapTable[StencilFuncSeparateATI_remap_index], parameters) #define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index]) #define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, driDispatchRemapTable[StencilFuncSeparateATI_remap_index], fn) @@ -4001,6 +4086,12 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index], parameters) #define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index]) #define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index], fn) +#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index], parameters) +#define GET_EGLImageTargetRenderbufferStorageOES(disp) GET_by_offset(disp, driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index]) +#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index], fn) +#define CALL_EGLImageTargetTexture2DOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index], parameters) +#define GET_EGLImageTargetTexture2DOES(disp) GET_by_offset(disp, driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index]) +#define SET_EGLImageTargetTexture2DOES(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index], fn) #endif /* !defined(_GLAPI_USE_REMAP_TABLE) */ diff --git a/mesalib/src/mesa/glapi/glapioffsets.h b/mesalib/src/mesa/glapi/glapioffsets.h index 3d10260a0..6d7bc2a0f 100644 --- a/mesalib/src/mesa/glapi/glapioffsets.h +++ b/mesalib/src/mesa/glapi/glapioffsets.h @@ -821,15 +821,28 @@ #define _gloffset_BufferParameteriAPPLE 784 #define _gloffset_FlushMappedBufferRangeAPPLE 785 #define _gloffset_FramebufferTextureLayerEXT 786 -#define _gloffset_ProvokingVertexEXT 787 -#define _gloffset_GetTexParameterPointervAPPLE 788 -#define _gloffset_TextureRangeAPPLE 789 -#define _gloffset_StencilFuncSeparateATI 790 -#define _gloffset_ProgramEnvParameters4fvEXT 791 -#define _gloffset_ProgramLocalParameters4fvEXT 792 -#define _gloffset_GetQueryObjecti64vEXT 793 -#define _gloffset_GetQueryObjectui64vEXT 794 -#define _gloffset_FIRST_DYNAMIC 795 +#define _gloffset_ColorMaskIndexedEXT 787 +#define _gloffset_DisableIndexedEXT 788 +#define _gloffset_EnableIndexedEXT 789 +#define _gloffset_GetBooleanIndexedvEXT 790 +#define _gloffset_GetIntegerIndexedvEXT 791 +#define _gloffset_IsEnabledIndexedEXT 792 +#define _gloffset_BeginConditionalRenderNV 793 +#define _gloffset_EndConditionalRenderNV 794 +#define _gloffset_ProvokingVertexEXT 795 +#define _gloffset_GetTexParameterPointervAPPLE 796 +#define _gloffset_TextureRangeAPPLE 797 +#define _gloffset_GetObjectParameterivAPPLE 798 +#define _gloffset_ObjectPurgeableAPPLE 799 +#define _gloffset_ObjectUnpurgeableAPPLE 800 +#define _gloffset_StencilFuncSeparateATI 801 +#define _gloffset_ProgramEnvParameters4fvEXT 802 +#define _gloffset_ProgramLocalParameters4fvEXT 803 +#define _gloffset_GetQueryObjecti64vEXT 804 +#define _gloffset_GetQueryObjectui64vEXT 805 +#define _gloffset_EGLImageTargetRenderbufferStorageOES 806 +#define _gloffset_EGLImageTargetTexture2DOES 807 +#define _gloffset_FIRST_DYNAMIC 808 #else @@ -1212,14 +1225,27 @@ #define _gloffset_BufferParameteriAPPLE driDispatchRemapTable[BufferParameteriAPPLE_remap_index] #define _gloffset_FlushMappedBufferRangeAPPLE driDispatchRemapTable[FlushMappedBufferRangeAPPLE_remap_index] #define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index] +#define _gloffset_ColorMaskIndexedEXT driDispatchRemapTable[ColorMaskIndexedEXT_remap_index] +#define _gloffset_DisableIndexedEXT driDispatchRemapTable[DisableIndexedEXT_remap_index] +#define _gloffset_EnableIndexedEXT driDispatchRemapTable[EnableIndexedEXT_remap_index] +#define _gloffset_GetBooleanIndexedvEXT driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index] +#define _gloffset_GetIntegerIndexedvEXT driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index] +#define _gloffset_IsEnabledIndexedEXT driDispatchRemapTable[IsEnabledIndexedEXT_remap_index] +#define _gloffset_BeginConditionalRenderNV driDispatchRemapTable[BeginConditionalRenderNV_remap_index] +#define _gloffset_EndConditionalRenderNV driDispatchRemapTable[EndConditionalRenderNV_remap_index] #define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index] #define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index] #define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index] +#define _gloffset_GetObjectParameterivAPPLE driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index] +#define _gloffset_ObjectPurgeableAPPLE driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index] +#define _gloffset_ObjectUnpurgeableAPPLE driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index] #define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index] #define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index] #define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index] #define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index] #define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index] +#define _gloffset_EGLImageTargetRenderbufferStorageOES driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index] +#define _gloffset_EGLImageTargetTexture2DOES driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index] #endif /* !defined(_GLAPI_USE_REMAP_TABLE) */ diff --git a/mesalib/src/mesa/glapi/glapitable.h b/mesalib/src/mesa/glapi/glapitable.h index 4f9e53b62..149ff3f3c 100644 --- a/mesalib/src/mesa/glapi/glapitable.h +++ b/mesalib/src/mesa/glapi/glapitable.h @@ -827,14 +827,27 @@ struct _glapi_table void (GLAPIENTRYP BufferParameteriAPPLE)(GLenum target, GLenum pname, GLint param); /* 784 */ void (GLAPIENTRYP FlushMappedBufferRangeAPPLE)(GLenum target, GLintptr offset, GLsizeiptr size); /* 785 */ void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 786 */ - void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 787 */ - void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 788 */ - void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 789 */ - void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 790 */ - void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 791 */ - void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 792 */ - void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 793 */ - void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 794 */ + void (GLAPIENTRYP ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); /* 787 */ + void (GLAPIENTRYP DisableIndexedEXT)(GLenum target, GLuint index); /* 788 */ + void (GLAPIENTRYP EnableIndexedEXT)(GLenum target, GLuint index); /* 789 */ + void (GLAPIENTRYP GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data); /* 790 */ + void (GLAPIENTRYP GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data); /* 791 */ + GLboolean (GLAPIENTRYP IsEnabledIndexedEXT)(GLenum target, GLuint index); /* 792 */ + void (GLAPIENTRYP BeginConditionalRenderNV)(GLuint query, GLenum mode); /* 793 */ + void (GLAPIENTRYP EndConditionalRenderNV)(void); /* 794 */ + void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 795 */ + void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 796 */ + void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 797 */ + void (GLAPIENTRYP GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value); /* 798 */ + GLenum (GLAPIENTRYP ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 799 */ + GLenum (GLAPIENTRYP ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 800 */ + void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 801 */ + void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 802 */ + void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 803 */ + void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 804 */ + void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 805 */ + void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 806 */ + void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 807 */ }; #endif /* !defined( _GLAPI_TABLE_H_ ) */ diff --git a/mesalib/src/mesa/glapi/glapitemp.h b/mesalib/src/mesa/glapi/glapitemp.h index 319a4ab55..ea6b61159 100644 --- a/mesalib/src/mesa/glapi/glapitemp.h +++ b/mesalib/src/mesa/glapi/glapitemp.h @@ -27,7 +27,7 @@ */ -# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) +# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) && defined(__ELF__) # define HIDDEN __attribute__((visibility("hidden"))) # else # define HIDDEN @@ -80,6 +80,8 @@ #endif +#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS + KEYWORD1 void KEYWORD2 NAME(NewList)(GLuint list, GLenum mode) { DISPATCH(NewList, (list, mode), (F, "glNewList(%d, 0x%x);\n", list, mode)); @@ -1710,13 +1712,6 @@ KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResident)(GLsizei n, const GLuint * RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences) -{ - RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border)); @@ -1762,25 +1757,11 @@ KEYWORD1 void KEYWORD2 NAME(DeleteTextures)(GLsizei n, const GLuint * textures) DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTextures(%d, %p);\n", n, (const void *) textures)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures) -{ - DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GenTextures)(GLsizei n, GLuint * textures) { DISPATCH(GenTextures, (n, textures), (F, "glGenTextures(%d, %p);\n", n, (const void *) textures)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures) -{ - DISPATCH(GenTextures, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetPointerv)(GLenum pname, GLvoid ** params) { DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params)); @@ -1796,13 +1777,6 @@ KEYWORD1 GLboolean KEYWORD2 NAME(IsTexture)(GLuint texture) RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTexture(%d);\n", texture)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture) -{ - RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTextureEXT(%d);\n", texture)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities) { DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTextures(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities)); @@ -1878,6 +1852,11 @@ KEYWORD1 void KEYWORD2 NAME(ColorTable)(GLenum target, GLenum internalformat, GL DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTable(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); } +KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) +{ + DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); +} + KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) @@ -1885,11 +1864,6 @@ KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum intern DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableSGI(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); } -KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) -{ - DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); -} - KEYWORD1 void KEYWORD2 NAME(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params) { DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); @@ -1931,64 +1905,16 @@ KEYWORD1 void KEYWORD2 NAME(GetColorTable)(GLenum target, GLenum format, GLenum DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTable(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table) -{ - DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); -} -#endif /* GLX_INDIRECT_RENDERING */ - -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * table) -{ - DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params) { DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params) { DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) { DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTable(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data)); @@ -2114,57 +2040,21 @@ KEYWORD1 void KEYWORD2 NAME(GetConvolutionFilter)(GLenum target, GLenum format, DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilter(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image) -{ - DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params) { DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params) { DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) { DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilter(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) -{ - DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) { DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column)); @@ -2182,85 +2072,31 @@ KEYWORD1 void KEYWORD2 NAME(GetHistogram)(GLenum target, GLboolean reset, GLenum DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogram(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params) { DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params) { DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) { DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmax(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params) { DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params) -{ - DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params) { DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } -#ifndef GLX_INDIRECT_RENDERING -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params) -{ - DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} -#endif /* GLX_INDIRECT_RENDERING */ - KEYWORD1 void KEYWORD2 NAME(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) { DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogram(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink)); @@ -5677,6 +5513,46 @@ KEYWORD1 void KEYWORD2 NAME(FramebufferTextureLayerEXT)(GLenum target, GLenum at DISPATCH(FramebufferTextureLayerEXT, (target, attachment, texture, level, layer), (F, "glFramebufferTextureLayerEXT(0x%x, 0x%x, %d, %d, %d);\n", target, attachment, texture, level, layer)); } +KEYWORD1 void KEYWORD2 NAME(ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a) +{ + DISPATCH(ColorMaskIndexedEXT, (buf, r, g, b, a), (F, "glColorMaskIndexedEXT(%d, %d, %d, %d, %d);\n", buf, r, g, b, a)); +} + +KEYWORD1 void KEYWORD2 NAME(DisableIndexedEXT)(GLenum target, GLuint index) +{ + DISPATCH(DisableIndexedEXT, (target, index), (F, "glDisableIndexedEXT(0x%x, %d);\n", target, index)); +} + +KEYWORD1 void KEYWORD2 NAME(EnableIndexedEXT)(GLenum target, GLuint index) +{ + DISPATCH(EnableIndexedEXT, (target, index), (F, "glEnableIndexedEXT(0x%x, %d);\n", target, index)); +} + +KEYWORD1 void KEYWORD2 NAME(GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data) +{ + DISPATCH(GetBooleanIndexedvEXT, (value, index, data), (F, "glGetBooleanIndexedvEXT(0x%x, %d, %p);\n", value, index, (const void *) data)); +} + +KEYWORD1 void KEYWORD2 NAME(GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data) +{ + DISPATCH(GetIntegerIndexedvEXT, (value, index, data), (F, "glGetIntegerIndexedvEXT(0x%x, %d, %p);\n", value, index, (const void *) data)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabledIndexedEXT)(GLenum target, GLuint index) +{ + RETURN_DISPATCH(IsEnabledIndexedEXT, (target, index), (F, "glIsEnabledIndexedEXT(0x%x, %d);\n", target, index)); +} + +KEYWORD1 void KEYWORD2 NAME(BeginConditionalRenderNV)(GLuint query, GLenum mode) +{ + DISPATCH(BeginConditionalRenderNV, (query, mode), (F, "glBeginConditionalRenderNV(%d, 0x%x);\n", query, mode)); +} + +KEYWORD1 void KEYWORD2 NAME(EndConditionalRenderNV)(void) +{ + DISPATCH(EndConditionalRenderNV, (), (F, "glEndConditionalRenderNV();\n")); +} + KEYWORD1 void KEYWORD2 NAME(ProvokingVertexEXT)(GLenum mode) { DISPATCH(ProvokingVertexEXT, (mode), (F, "glProvokingVertexEXT(0x%x);\n", mode)); @@ -5687,55 +5563,215 @@ KEYWORD1 void KEYWORD2 NAME(ProvokingVertex)(GLenum mode) DISPATCH(ProvokingVertexEXT, (mode), (F, "glProvokingVertex(0x%x);\n", mode)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_788)(GLenum target, GLenum pname, GLvoid ** params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_796)(GLenum target, GLenum pname, GLvoid ** params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_788)(GLenum target, GLenum pname, GLvoid ** params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_796)(GLenum target, GLenum pname, GLvoid ** params) { DISPATCH(GetTexParameterPointervAPPLE, (target, pname, params), (F, "glGetTexParameterPointervAPPLE(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_789)(GLenum target, GLsizei length, GLvoid * pointer); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLenum target, GLsizei length, GLvoid * pointer); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_789)(GLenum target, GLsizei length, GLvoid * pointer) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLenum target, GLsizei length, GLvoid * pointer) { DISPATCH(TextureRangeAPPLE, (target, length, pointer), (F, "glTextureRangeAPPLE(0x%x, %d, %p);\n", target, length, (const void *) pointer)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_790)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +KEYWORD1 void KEYWORD2 NAME(GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value) +{ + DISPATCH(GetObjectParameterivAPPLE, (objectType, name, pname, value), (F, "glGetObjectParameterivAPPLE(0x%x, %d, 0x%x, %p);\n", objectType, name, pname, (const void *) value)); +} + +KEYWORD1 GLenum KEYWORD2 NAME(ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option) +{ + RETURN_DISPATCH(ObjectPurgeableAPPLE, (objectType, name, option), (F, "glObjectPurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option)); +} + +KEYWORD1 GLenum KEYWORD2 NAME(ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option) +{ + RETURN_DISPATCH(ObjectUnpurgeableAPPLE, (objectType, name, option), (F, "glObjectUnpurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_790)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) { DISPATCH(StencilFuncSeparateATI, (frontfunc, backfunc, ref, mask), (F, "glStencilFuncSeparateATI(0x%x, 0x%x, %d, %d);\n", frontfunc, backfunc, ref, mask)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_791)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_791)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) { DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_792)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_803)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_792)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_803)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) { DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_793)(GLuint id, GLenum pname, GLint64EXT * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_804)(GLuint id, GLenum pname, GLint64EXT * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_793)(GLuint id, GLenum pname, GLint64EXT * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_804)(GLuint id, GLenum pname, GLint64EXT * params) { DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); } -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_794)(GLuint id, GLenum pname, GLuint64EXT * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_805)(GLuint id, GLenum pname, GLuint64EXT * params); -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_794)(GLuint id, GLenum pname, GLuint64EXT * params) +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_805)(GLuint id, GLenum pname, GLuint64EXT * params) { DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); } +KEYWORD1 void KEYWORD2 NAME(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset) +{ + DISPATCH(EGLImageTargetRenderbufferStorageOES, (target, writeOffset), (F, "glEGLImageTargetRenderbufferStorageOES(0x%x, %p);\n", target, (const void *) writeOffset)); +} + +KEYWORD1 void KEYWORD2 NAME(EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset) +{ + DISPATCH(EGLImageTargetTexture2DOES, (target, writeOffset), (F, "glEGLImageTargetTexture2DOES(0x%x, %p);\n", target, (const void *) writeOffset)); +} + + +#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */ + +/* these entry points might require different protocols */ +#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS + +KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences) +{ + RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences)); +} + +KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures) +{ + DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures)); +} + +KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures) +{ + DISPATCH(GenTextures, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures)); +} + +KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture) +{ + RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTextureEXT(%d);\n", texture)); +} + +KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * table) +{ + DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table) +{ + DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); +} + +KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image) +{ + DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) +{ + DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) +{ + DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) +{ + DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params) +{ + DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params); + +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params) +{ + DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); +} + + +#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */ + #endif /* defined( NAME ) */ @@ -5749,7 +5785,11 @@ KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_794)(GLuint id, GLenum pname, GLu #error TABLE_ENTRY must be defined #endif -static _glapi_proc DISPATCH_TABLE_NAME[] = { +#ifdef _GLAPI_SKIP_NORMAL_ENTRY_POINTS +#error _GLAPI_SKIP_NORMAL_ENTRY_POINTS must not be defined +#endif + +_glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(NewList), TABLE_ENTRY(EndList), TABLE_ENTRY(CallList), @@ -6537,14 +6577,27 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { TABLE_ENTRY(_dispatch_stub_784), TABLE_ENTRY(_dispatch_stub_785), TABLE_ENTRY(FramebufferTextureLayerEXT), + TABLE_ENTRY(ColorMaskIndexedEXT), + TABLE_ENTRY(DisableIndexedEXT), + TABLE_ENTRY(EnableIndexedEXT), + TABLE_ENTRY(GetBooleanIndexedvEXT), + TABLE_ENTRY(GetIntegerIndexedvEXT), + TABLE_ENTRY(IsEnabledIndexedEXT), + TABLE_ENTRY(BeginConditionalRenderNV), + TABLE_ENTRY(EndConditionalRenderNV), TABLE_ENTRY(ProvokingVertexEXT), - TABLE_ENTRY(_dispatch_stub_788), - TABLE_ENTRY(_dispatch_stub_789), - TABLE_ENTRY(_dispatch_stub_790), - TABLE_ENTRY(_dispatch_stub_791), - TABLE_ENTRY(_dispatch_stub_792), - TABLE_ENTRY(_dispatch_stub_793), - TABLE_ENTRY(_dispatch_stub_794), + TABLE_ENTRY(_dispatch_stub_796), + TABLE_ENTRY(_dispatch_stub_797), + TABLE_ENTRY(GetObjectParameterivAPPLE), + TABLE_ENTRY(ObjectPurgeableAPPLE), + TABLE_ENTRY(ObjectUnpurgeableAPPLE), + TABLE_ENTRY(_dispatch_stub_801), + TABLE_ENTRY(_dispatch_stub_802), + TABLE_ENTRY(_dispatch_stub_803), + TABLE_ENTRY(_dispatch_stub_804), + TABLE_ENTRY(_dispatch_stub_805), + TABLE_ENTRY(EGLImageTargetRenderbufferStorageOES), + TABLE_ENTRY(EGLImageTargetTexture2DOES), /* A whole bunch of no-op functions. These might be called * when someone tries to call a dynamically-registered * extension function without a current rendering context. @@ -6657,27 +6710,16 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = { * We list the functions which are not otherwise used. */ #ifdef UNUSED_TABLE_NAME -static _glapi_proc UNUSED_TABLE_NAME[] = { +_glapi_proc UNUSED_TABLE_NAME[] = { +#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS TABLE_ENTRY(ArrayElementEXT), TABLE_ENTRY(BindTextureEXT), TABLE_ENTRY(DrawArraysEXT), -#ifndef GLX_INDIRECT_RENDERING - TABLE_ENTRY(AreTexturesResidentEXT), -#endif TABLE_ENTRY(CopyTexImage1DEXT), TABLE_ENTRY(CopyTexImage2DEXT), TABLE_ENTRY(CopyTexSubImage1DEXT), TABLE_ENTRY(CopyTexSubImage2DEXT), -#ifndef GLX_INDIRECT_RENDERING - TABLE_ENTRY(DeleteTexturesEXT), -#endif -#ifndef GLX_INDIRECT_RENDERING - TABLE_ENTRY(GenTexturesEXT), -#endif TABLE_ENTRY(GetPointervEXT), -#ifndef GLX_INDIRECT_RENDERING - TABLE_ENTRY(IsTextureEXT), -#endif TABLE_ENTRY(PrioritizeTexturesEXT), TABLE_ENTRY(TexSubImage1DEXT), TABLE_ENTRY(TexSubImage2DEXT), @@ -6685,15 +6727,25 @@ static _glapi_proc UNUSED_TABLE_NAME[] = { TABLE_ENTRY(BlendEquationEXT), TABLE_ENTRY(DrawRangeElementsEXT), TABLE_ENTRY(ColorTableEXT), -#ifndef GLX_INDIRECT_RENDERING - TABLE_ENTRY(GetColorTableEXT), -#endif -#ifndef GLX_INDIRECT_RENDERING - TABLE_ENTRY(GetColorTableParameterfvEXT), -#endif -#ifndef GLX_INDIRECT_RENDERING - TABLE_ENTRY(GetColorTableParameterivEXT), -#endif + TABLE_ENTRY(_dispatch_stub_339), + TABLE_ENTRY(_dispatch_stub_340), + TABLE_ENTRY(_dispatch_stub_341), + TABLE_ENTRY(_dispatch_stub_342), + TABLE_ENTRY(_dispatch_stub_346), + TABLE_ENTRY(_dispatch_stub_347), + TABLE_ENTRY(_dispatch_stub_348), + TABLE_ENTRY(_dispatch_stub_349), + TABLE_ENTRY(_dispatch_stub_350), + TABLE_ENTRY(_dispatch_stub_351), + TABLE_ENTRY(_dispatch_stub_352), + TABLE_ENTRY(_dispatch_stub_353), + TABLE_ENTRY(_dispatch_stub_354), + TABLE_ENTRY(_dispatch_stub_355), + TABLE_ENTRY(_dispatch_stub_360), + TABLE_ENTRY(_dispatch_stub_367), + TABLE_ENTRY(_dispatch_stub_368), + TABLE_ENTRY(_dispatch_stub_369), + TABLE_ENTRY(_dispatch_stub_370), TABLE_ENTRY(TexImage3DEXT), TABLE_ENTRY(TexSubImage3DEXT), TABLE_ENTRY(CopyTexSubImage3DEXT), @@ -6731,6 +6783,7 @@ static _glapi_proc UNUSED_TABLE_NAME[] = { TABLE_ENTRY(MultiTexCoord4iv), TABLE_ENTRY(MultiTexCoord4s), TABLE_ENTRY(MultiTexCoord4sv), + TABLE_ENTRY(_dispatch_stub_423), TABLE_ENTRY(LoadTransposeMatrixd), TABLE_ENTRY(LoadTransposeMatrixf), TABLE_ENTRY(MultTransposeMatrixd), @@ -6845,8 +6898,10 @@ static _glapi_proc UNUSED_TABLE_NAME[] = { TABLE_ENTRY(RenderbufferStorageMultisampleEXT), TABLE_ENTRY(PointParameterf), TABLE_ENTRY(PointParameterfARB), + TABLE_ENTRY(_dispatch_stub_592), TABLE_ENTRY(PointParameterfv), TABLE_ENTRY(PointParameterfvARB), + TABLE_ENTRY(_dispatch_stub_593), TABLE_ENTRY(SecondaryColor3b), TABLE_ENTRY(SecondaryColor3bv), TABLE_ENTRY(SecondaryColor3d), @@ -6872,6 +6927,7 @@ static _glapi_proc UNUSED_TABLE_NAME[] = { TABLE_ENTRY(FogCoordf), TABLE_ENTRY(FogCoordfv), TABLE_ENTRY(BlendFuncSeparate), + TABLE_ENTRY(_dispatch_stub_623), TABLE_ENTRY(WindowPos2d), TABLE_ENTRY(WindowPos2dARB), TABLE_ENTRY(WindowPos2dv), @@ -6935,6 +6991,29 @@ static _glapi_proc UNUSED_TABLE_NAME[] = { TABLE_ENTRY(BlitFramebuffer), TABLE_ENTRY(FramebufferTextureLayer), TABLE_ENTRY(ProvokingVertex), +#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */ +#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS + TABLE_ENTRY(AreTexturesResidentEXT), + TABLE_ENTRY(DeleteTexturesEXT), + TABLE_ENTRY(GenTexturesEXT), + TABLE_ENTRY(IsTextureEXT), + TABLE_ENTRY(GetColorTableEXT), + TABLE_ENTRY(_dispatch_stub_343), + TABLE_ENTRY(GetColorTableParameterfvEXT), + TABLE_ENTRY(_dispatch_stub_344), + TABLE_ENTRY(GetColorTableParameterivEXT), + TABLE_ENTRY(_dispatch_stub_345), + TABLE_ENTRY(_dispatch_stub_356), + TABLE_ENTRY(_dispatch_stub_357), + TABLE_ENTRY(_dispatch_stub_358), + TABLE_ENTRY(_dispatch_stub_359), + TABLE_ENTRY(_dispatch_stub_361), + TABLE_ENTRY(_dispatch_stub_362), + TABLE_ENTRY(_dispatch_stub_363), + TABLE_ENTRY(_dispatch_stub_364), + TABLE_ENTRY(_dispatch_stub_365), + TABLE_ENTRY(_dispatch_stub_366), +#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */ }; #endif /*UNUSED_TABLE_NAME*/ diff --git a/mesalib/src/mesa/glapi/glprocs.h b/mesalib/src/mesa/glapi/glprocs.h index 1ad7e8433..44861863e 100644 --- a/mesalib/src/mesa/glapi/glprocs.h +++ b/mesalib/src/mesa/glapi/glprocs.h @@ -839,14 +839,27 @@ static const char gl_string_table[] = "glBufferParameteriAPPLE\0" "glFlushMappedBufferRangeAPPLE\0" "glFramebufferTextureLayerEXT\0" + "glColorMaskIndexedEXT\0" + "glDisableIndexedEXT\0" + "glEnableIndexedEXT\0" + "glGetBooleanIndexedvEXT\0" + "glGetIntegerIndexedvEXT\0" + "glIsEnabledIndexedEXT\0" + "glBeginConditionalRenderNV\0" + "glEndConditionalRenderNV\0" "glProvokingVertexEXT\0" "glGetTexParameterPointervAPPLE\0" "glTextureRangeAPPLE\0" + "glGetObjectParameterivAPPLE\0" + "glObjectPurgeableAPPLE\0" + "glObjectUnpurgeableAPPLE\0" "glStencilFuncSeparateATI\0" "glProgramEnvParameters4fvEXT\0" "glProgramLocalParameters4fvEXT\0" "glGetQueryObjecti64vEXT\0" "glGetQueryObjectui64vEXT\0" + "glEGLImageTargetRenderbufferStorageOES\0" + "glEGLImageTargetTexture2DOES\0" "glArrayElementEXT\0" "glBindTextureEXT\0" "glDrawArraysEXT\0" @@ -1196,13 +1209,13 @@ static const char gl_string_table[] = #define gl_dispatch_stub_783 mgl_dispatch_stub_783 #define gl_dispatch_stub_784 mgl_dispatch_stub_784 #define gl_dispatch_stub_785 mgl_dispatch_stub_785 -#define gl_dispatch_stub_788 mgl_dispatch_stub_788 -#define gl_dispatch_stub_789 mgl_dispatch_stub_789 -#define gl_dispatch_stub_790 mgl_dispatch_stub_790 -#define gl_dispatch_stub_791 mgl_dispatch_stub_791 -#define gl_dispatch_stub_792 mgl_dispatch_stub_792 -#define gl_dispatch_stub_793 mgl_dispatch_stub_793 -#define gl_dispatch_stub_794 mgl_dispatch_stub_794 +#define gl_dispatch_stub_796 mgl_dispatch_stub_796 +#define gl_dispatch_stub_797 mgl_dispatch_stub_797 +#define gl_dispatch_stub_801 mgl_dispatch_stub_801 +#define gl_dispatch_stub_802 mgl_dispatch_stub_802 +#define gl_dispatch_stub_803 mgl_dispatch_stub_803 +#define gl_dispatch_stub_804 mgl_dispatch_stub_804 +#define gl_dispatch_stub_805 mgl_dispatch_stub_805 #endif /* USE_MGL_NAMESPACE */ @@ -1250,13 +1263,13 @@ void GLAPIENTRY gl_dispatch_stub_765(GLenum modeRGB, GLenum modeA); void GLAPIENTRY gl_dispatch_stub_783(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); void GLAPIENTRY gl_dispatch_stub_784(GLenum target, GLenum pname, GLint param); void GLAPIENTRY gl_dispatch_stub_785(GLenum target, GLintptr offset, GLsizeiptr size); -void GLAPIENTRY gl_dispatch_stub_788(GLenum target, GLenum pname, GLvoid ** params); -void GLAPIENTRY gl_dispatch_stub_789(GLenum target, GLsizei length, GLvoid * pointer); -void GLAPIENTRY gl_dispatch_stub_790(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -void GLAPIENTRY gl_dispatch_stub_791(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_792(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_793(GLuint id, GLenum pname, GLint64EXT * params); -void GLAPIENTRY gl_dispatch_stub_794(GLuint id, GLenum pname, GLuint64EXT * params); +void GLAPIENTRY gl_dispatch_stub_796(GLenum target, GLenum pname, GLvoid ** params); +void GLAPIENTRY gl_dispatch_stub_797(GLenum target, GLsizei length, GLvoid * pointer); +void GLAPIENTRY gl_dispatch_stub_801(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +void GLAPIENTRY gl_dispatch_stub_802(GLenum target, GLuint index, GLsizei count, const GLfloat * params); +void GLAPIENTRY gl_dispatch_stub_803(GLenum target, GLuint index, GLsizei count, const GLfloat * params); +void GLAPIENTRY gl_dispatch_stub_804(GLuint id, GLenum pname, GLint64EXT * params); +void GLAPIENTRY gl_dispatch_stub_805(GLuint id, GLenum pname, GLuint64EXT * params); #endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */ static const glprocs_table_t static_functions[] = { @@ -2047,316 +2060,329 @@ static const glprocs_table_t static_functions[] = { NAME_FUNC_OFFSET(13784, gl_dispatch_stub_784, gl_dispatch_stub_784, NULL, _gloffset_BufferParameteriAPPLE), NAME_FUNC_OFFSET(13808, gl_dispatch_stub_785, gl_dispatch_stub_785, NULL, _gloffset_FlushMappedBufferRangeAPPLE), NAME_FUNC_OFFSET(13838, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT), - NAME_FUNC_OFFSET(13867, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT), - NAME_FUNC_OFFSET(13888, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, _gloffset_GetTexParameterPointervAPPLE), - NAME_FUNC_OFFSET(13919, gl_dispatch_stub_789, gl_dispatch_stub_789, NULL, _gloffset_TextureRangeAPPLE), - NAME_FUNC_OFFSET(13939, gl_dispatch_stub_790, gl_dispatch_stub_790, NULL, _gloffset_StencilFuncSeparateATI), - NAME_FUNC_OFFSET(13964, gl_dispatch_stub_791, gl_dispatch_stub_791, NULL, _gloffset_ProgramEnvParameters4fvEXT), - NAME_FUNC_OFFSET(13993, gl_dispatch_stub_792, gl_dispatch_stub_792, NULL, _gloffset_ProgramLocalParameters4fvEXT), - NAME_FUNC_OFFSET(14024, gl_dispatch_stub_793, gl_dispatch_stub_793, NULL, _gloffset_GetQueryObjecti64vEXT), - NAME_FUNC_OFFSET(14048, gl_dispatch_stub_794, gl_dispatch_stub_794, NULL, _gloffset_GetQueryObjectui64vEXT), - NAME_FUNC_OFFSET(14073, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement), - NAME_FUNC_OFFSET(14091, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture), - NAME_FUNC_OFFSET(14108, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays), - NAME_FUNC_OFFSET(14124, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident), - NAME_FUNC_OFFSET(14149, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D), - NAME_FUNC_OFFSET(14169, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D), - NAME_FUNC_OFFSET(14189, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D), - NAME_FUNC_OFFSET(14212, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D), - NAME_FUNC_OFFSET(14235, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures), - NAME_FUNC_OFFSET(14255, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures), - NAME_FUNC_OFFSET(14272, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv), - NAME_FUNC_OFFSET(14289, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture), - NAME_FUNC_OFFSET(14304, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures), - NAME_FUNC_OFFSET(14328, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D), - NAME_FUNC_OFFSET(14347, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D), - NAME_FUNC_OFFSET(14366, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor), - NAME_FUNC_OFFSET(14382, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation), - NAME_FUNC_OFFSET(14401, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements), - NAME_FUNC_OFFSET(14424, glColorTable, glColorTable, NULL, _gloffset_ColorTable), - NAME_FUNC_OFFSET(14440, glColorTable, glColorTable, NULL, _gloffset_ColorTable), - NAME_FUNC_OFFSET(14456, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv), - NAME_FUNC_OFFSET(14483, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv), - NAME_FUNC_OFFSET(14510, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable), - NAME_FUNC_OFFSET(14530, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), - NAME_FUNC_OFFSET(14549, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), - NAME_FUNC_OFFSET(14568, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), - NAME_FUNC_OFFSET(14598, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), - NAME_FUNC_OFFSET(14628, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), - NAME_FUNC_OFFSET(14658, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), - NAME_FUNC_OFFSET(14688, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable), - NAME_FUNC_OFFSET(14707, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable), - NAME_FUNC_OFFSET(14730, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D), - NAME_FUNC_OFFSET(14755, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D), - NAME_FUNC_OFFSET(14780, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf), - NAME_FUNC_OFFSET(14807, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv), - NAME_FUNC_OFFSET(14835, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri), - NAME_FUNC_OFFSET(14862, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv), - NAME_FUNC_OFFSET(14890, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D), - NAME_FUNC_OFFSET(14919, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D), - NAME_FUNC_OFFSET(14948, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter), - NAME_FUNC_OFFSET(14974, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv), - NAME_FUNC_OFFSET(15005, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv), - NAME_FUNC_OFFSET(15036, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter), - NAME_FUNC_OFFSET(15060, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D), - NAME_FUNC_OFFSET(15083, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram), - NAME_FUNC_OFFSET(15101, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv), - NAME_FUNC_OFFSET(15130, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv), - NAME_FUNC_OFFSET(15159, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax), - NAME_FUNC_OFFSET(15174, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv), - NAME_FUNC_OFFSET(15200, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv), - NAME_FUNC_OFFSET(15226, glHistogram, glHistogram, NULL, _gloffset_Histogram), - NAME_FUNC_OFFSET(15241, glMinmax, glMinmax, NULL, _gloffset_Minmax), - NAME_FUNC_OFFSET(15253, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram), - NAME_FUNC_OFFSET(15273, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax), - NAME_FUNC_OFFSET(15290, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D), - NAME_FUNC_OFFSET(15306, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D), - NAME_FUNC_OFFSET(15325, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D), - NAME_FUNC_OFFSET(15348, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB), - NAME_FUNC_OFFSET(15364, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB), - NAME_FUNC_OFFSET(15386, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB), - NAME_FUNC_OFFSET(15404, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB), - NAME_FUNC_OFFSET(15423, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB), - NAME_FUNC_OFFSET(15441, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB), - NAME_FUNC_OFFSET(15460, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB), - NAME_FUNC_OFFSET(15478, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB), - NAME_FUNC_OFFSET(15497, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB), - NAME_FUNC_OFFSET(15515, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB), - NAME_FUNC_OFFSET(15534, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB), - NAME_FUNC_OFFSET(15552, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB), - NAME_FUNC_OFFSET(15571, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB), - NAME_FUNC_OFFSET(15589, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB), - NAME_FUNC_OFFSET(15608, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB), - NAME_FUNC_OFFSET(15626, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB), - NAME_FUNC_OFFSET(15645, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB), - NAME_FUNC_OFFSET(15663, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB), - NAME_FUNC_OFFSET(15682, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB), - NAME_FUNC_OFFSET(15700, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB), - NAME_FUNC_OFFSET(15719, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB), - NAME_FUNC_OFFSET(15737, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB), - NAME_FUNC_OFFSET(15756, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB), - NAME_FUNC_OFFSET(15774, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB), - NAME_FUNC_OFFSET(15793, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB), - NAME_FUNC_OFFSET(15811, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB), - NAME_FUNC_OFFSET(15830, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB), - NAME_FUNC_OFFSET(15848, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB), - NAME_FUNC_OFFSET(15867, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB), - NAME_FUNC_OFFSET(15885, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB), - NAME_FUNC_OFFSET(15904, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB), - NAME_FUNC_OFFSET(15922, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB), - NAME_FUNC_OFFSET(15941, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB), - NAME_FUNC_OFFSET(15959, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB), - NAME_FUNC_OFFSET(15978, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate), - NAME_FUNC_OFFSET(16001, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), - NAME_FUNC_OFFSET(16024, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), - NAME_FUNC_OFFSET(16047, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), - NAME_FUNC_OFFSET(16070, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), - NAME_FUNC_OFFSET(16093, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), - NAME_FUNC_OFFSET(16110, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), - NAME_FUNC_OFFSET(16133, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), - NAME_FUNC_OFFSET(16156, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), - NAME_FUNC_OFFSET(16179, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), - NAME_FUNC_OFFSET(16205, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), - NAME_FUNC_OFFSET(16231, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), - NAME_FUNC_OFFSET(16257, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), - NAME_FUNC_OFFSET(16281, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), - NAME_FUNC_OFFSET(16308, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), - NAME_FUNC_OFFSET(16334, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), - NAME_FUNC_OFFSET(16354, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), - NAME_FUNC_OFFSET(16374, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), - NAME_FUNC_OFFSET(16394, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB), - NAME_FUNC_OFFSET(16417, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB), - NAME_FUNC_OFFSET(16441, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB), - NAME_FUNC_OFFSET(16464, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB), - NAME_FUNC_OFFSET(16488, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), - NAME_FUNC_OFFSET(16505, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), - NAME_FUNC_OFFSET(16523, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), - NAME_FUNC_OFFSET(16540, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), - NAME_FUNC_OFFSET(16558, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), - NAME_FUNC_OFFSET(16575, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), - NAME_FUNC_OFFSET(16593, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), - NAME_FUNC_OFFSET(16610, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), - NAME_FUNC_OFFSET(16628, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), - NAME_FUNC_OFFSET(16645, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), - NAME_FUNC_OFFSET(16663, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), - NAME_FUNC_OFFSET(16680, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), - NAME_FUNC_OFFSET(16698, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), - NAME_FUNC_OFFSET(16715, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), - NAME_FUNC_OFFSET(16733, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), - NAME_FUNC_OFFSET(16750, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), - NAME_FUNC_OFFSET(16768, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), - NAME_FUNC_OFFSET(16785, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), - NAME_FUNC_OFFSET(16803, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), - NAME_FUNC_OFFSET(16822, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), - NAME_FUNC_OFFSET(16841, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), - NAME_FUNC_OFFSET(16860, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), - NAME_FUNC_OFFSET(16879, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), - NAME_FUNC_OFFSET(16899, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), - NAME_FUNC_OFFSET(16919, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), - NAME_FUNC_OFFSET(16939, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB), - NAME_FUNC_OFFSET(16957, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), - NAME_FUNC_OFFSET(16974, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), - NAME_FUNC_OFFSET(16992, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), - NAME_FUNC_OFFSET(17009, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), - NAME_FUNC_OFFSET(17027, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB), - NAME_FUNC_OFFSET(17045, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), - NAME_FUNC_OFFSET(17062, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), - NAME_FUNC_OFFSET(17080, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB), - NAME_FUNC_OFFSET(17099, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB), - NAME_FUNC_OFFSET(17118, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB), - NAME_FUNC_OFFSET(17137, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), - NAME_FUNC_OFFSET(17159, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), - NAME_FUNC_OFFSET(17172, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), - NAME_FUNC_OFFSET(17185, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), - NAME_FUNC_OFFSET(17201, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), - NAME_FUNC_OFFSET(17217, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), - NAME_FUNC_OFFSET(17230, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), - NAME_FUNC_OFFSET(17253, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), - NAME_FUNC_OFFSET(17273, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), - NAME_FUNC_OFFSET(17292, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), - NAME_FUNC_OFFSET(17303, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), - NAME_FUNC_OFFSET(17315, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), - NAME_FUNC_OFFSET(17329, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), - NAME_FUNC_OFFSET(17342, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), - NAME_FUNC_OFFSET(17358, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), - NAME_FUNC_OFFSET(17369, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), - NAME_FUNC_OFFSET(17382, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), - NAME_FUNC_OFFSET(17401, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), - NAME_FUNC_OFFSET(17421, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), - NAME_FUNC_OFFSET(17434, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), - NAME_FUNC_OFFSET(17444, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), - NAME_FUNC_OFFSET(17460, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), - NAME_FUNC_OFFSET(17479, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), - NAME_FUNC_OFFSET(17497, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), - NAME_FUNC_OFFSET(17518, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), - NAME_FUNC_OFFSET(17533, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), - NAME_FUNC_OFFSET(17548, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), - NAME_FUNC_OFFSET(17562, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), - NAME_FUNC_OFFSET(17577, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), - NAME_FUNC_OFFSET(17589, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), - NAME_FUNC_OFFSET(17602, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), - NAME_FUNC_OFFSET(17614, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), - NAME_FUNC_OFFSET(17627, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), - NAME_FUNC_OFFSET(17639, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), - NAME_FUNC_OFFSET(17652, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), - NAME_FUNC_OFFSET(17664, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), - NAME_FUNC_OFFSET(17677, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), - NAME_FUNC_OFFSET(17689, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), - NAME_FUNC_OFFSET(17702, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), - NAME_FUNC_OFFSET(17714, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), - NAME_FUNC_OFFSET(17727, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), - NAME_FUNC_OFFSET(17739, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), - NAME_FUNC_OFFSET(17752, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), - NAME_FUNC_OFFSET(17764, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), - NAME_FUNC_OFFSET(17777, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), - NAME_FUNC_OFFSET(17796, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), - NAME_FUNC_OFFSET(17815, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), - NAME_FUNC_OFFSET(17834, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), - NAME_FUNC_OFFSET(17847, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), - NAME_FUNC_OFFSET(17865, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), - NAME_FUNC_OFFSET(17886, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), - NAME_FUNC_OFFSET(17904, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), - NAME_FUNC_OFFSET(17924, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), - NAME_FUNC_OFFSET(17938, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), - NAME_FUNC_OFFSET(17955, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, _gloffset_RenderbufferStorageMultisample), - NAME_FUNC_OFFSET(17991, gl_dispatch_stub_584, gl_dispatch_stub_584, NULL, _gloffset_SampleMaskSGIS), - NAME_FUNC_OFFSET(18007, gl_dispatch_stub_585, gl_dispatch_stub_585, NULL, _gloffset_SamplePatternSGIS), - NAME_FUNC_OFFSET(18026, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET(18044, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET(18065, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), - NAME_FUNC_OFFSET(18087, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET(18106, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET(18128, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), - NAME_FUNC_OFFSET(18151, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), - NAME_FUNC_OFFSET(18170, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), - NAME_FUNC_OFFSET(18190, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), - NAME_FUNC_OFFSET(18209, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), - NAME_FUNC_OFFSET(18229, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), - NAME_FUNC_OFFSET(18248, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), - NAME_FUNC_OFFSET(18268, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), - NAME_FUNC_OFFSET(18287, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), - NAME_FUNC_OFFSET(18307, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), - NAME_FUNC_OFFSET(18326, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), - NAME_FUNC_OFFSET(18346, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), - NAME_FUNC_OFFSET(18366, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), - NAME_FUNC_OFFSET(18387, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), - NAME_FUNC_OFFSET(18407, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), - NAME_FUNC_OFFSET(18428, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), - NAME_FUNC_OFFSET(18448, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), - NAME_FUNC_OFFSET(18469, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), - NAME_FUNC_OFFSET(18493, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), - NAME_FUNC_OFFSET(18511, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), - NAME_FUNC_OFFSET(18531, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), - NAME_FUNC_OFFSET(18549, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), - NAME_FUNC_OFFSET(18561, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), - NAME_FUNC_OFFSET(18574, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), - NAME_FUNC_OFFSET(18586, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), - NAME_FUNC_OFFSET(18599, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), - NAME_FUNC_OFFSET(18619, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), - NAME_FUNC_OFFSET(18643, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), - NAME_FUNC_OFFSET(18657, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), - NAME_FUNC_OFFSET(18674, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), - NAME_FUNC_OFFSET(18689, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), - NAME_FUNC_OFFSET(18707, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), - NAME_FUNC_OFFSET(18721, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), - NAME_FUNC_OFFSET(18738, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), - NAME_FUNC_OFFSET(18753, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), - NAME_FUNC_OFFSET(18771, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), - NAME_FUNC_OFFSET(18785, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), - NAME_FUNC_OFFSET(18802, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), - NAME_FUNC_OFFSET(18817, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), - NAME_FUNC_OFFSET(18835, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), - NAME_FUNC_OFFSET(18849, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), - NAME_FUNC_OFFSET(18866, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), - NAME_FUNC_OFFSET(18881, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), - NAME_FUNC_OFFSET(18899, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), - NAME_FUNC_OFFSET(18913, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), - NAME_FUNC_OFFSET(18930, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), - NAME_FUNC_OFFSET(18945, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), - NAME_FUNC_OFFSET(18963, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), - NAME_FUNC_OFFSET(18977, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), - NAME_FUNC_OFFSET(18994, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), - NAME_FUNC_OFFSET(19009, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), - NAME_FUNC_OFFSET(19027, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), - NAME_FUNC_OFFSET(19041, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), - NAME_FUNC_OFFSET(19058, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), - NAME_FUNC_OFFSET(19073, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), - NAME_FUNC_OFFSET(19091, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), - NAME_FUNC_OFFSET(19105, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), - NAME_FUNC_OFFSET(19122, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), - NAME_FUNC_OFFSET(19137, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), - NAME_FUNC_OFFSET(19155, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), - NAME_FUNC_OFFSET(19172, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), - NAME_FUNC_OFFSET(19192, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), - NAME_FUNC_OFFSET(19209, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), - NAME_FUNC_OFFSET(19235, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), - NAME_FUNC_OFFSET(19264, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), - NAME_FUNC_OFFSET(19279, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), - NAME_FUNC_OFFSET(19297, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), - NAME_FUNC_OFFSET(19316, gl_dispatch_stub_755, gl_dispatch_stub_755, NULL, _gloffset_DeleteVertexArraysAPPLE), - NAME_FUNC_OFFSET(19337, gl_dispatch_stub_757, gl_dispatch_stub_757, NULL, _gloffset_IsVertexArrayAPPLE), - NAME_FUNC_OFFSET(19353, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT), - NAME_FUNC_OFFSET(19377, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT), - NAME_FUNC_OFFSET(19404, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT), - NAME_FUNC_OFFSET(19422, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT), - NAME_FUNC_OFFSET(19441, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT), - NAME_FUNC_OFFSET(19466, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT), - NAME_FUNC_OFFSET(19487, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT), - NAME_FUNC_OFFSET(19509, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT), - NAME_FUNC_OFFSET(19535, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT), - NAME_FUNC_OFFSET(19558, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT), - NAME_FUNC_OFFSET(19581, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT), - NAME_FUNC_OFFSET(19604, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT), - NAME_FUNC_OFFSET(19622, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT), - NAME_FUNC_OFFSET(19641, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT), - NAME_FUNC_OFFSET(19658, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT), - NAME_FUNC_OFFSET(19696, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT), - NAME_FUNC_OFFSET(19725, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT), - NAME_FUNC_OFFSET(19741, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT), - NAME_FUNC_OFFSET(19758, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT), - NAME_FUNC_OFFSET(19780, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, _gloffset_BlitFramebufferEXT), - NAME_FUNC_OFFSET(19798, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT), - NAME_FUNC_OFFSET(19824, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT), + NAME_FUNC_OFFSET(13867, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, _gloffset_ColorMaskIndexedEXT), + NAME_FUNC_OFFSET(13889, glDisableIndexedEXT, glDisableIndexedEXT, NULL, _gloffset_DisableIndexedEXT), + NAME_FUNC_OFFSET(13909, glEnableIndexedEXT, glEnableIndexedEXT, NULL, _gloffset_EnableIndexedEXT), + NAME_FUNC_OFFSET(13928, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, _gloffset_GetBooleanIndexedvEXT), + NAME_FUNC_OFFSET(13952, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, _gloffset_GetIntegerIndexedvEXT), + NAME_FUNC_OFFSET(13976, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, _gloffset_IsEnabledIndexedEXT), + NAME_FUNC_OFFSET(13998, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, _gloffset_BeginConditionalRenderNV), + NAME_FUNC_OFFSET(14025, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, _gloffset_EndConditionalRenderNV), + NAME_FUNC_OFFSET(14050, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT), + NAME_FUNC_OFFSET(14071, gl_dispatch_stub_796, gl_dispatch_stub_796, NULL, _gloffset_GetTexParameterPointervAPPLE), + NAME_FUNC_OFFSET(14102, gl_dispatch_stub_797, gl_dispatch_stub_797, NULL, _gloffset_TextureRangeAPPLE), + NAME_FUNC_OFFSET(14122, glGetObjectParameterivAPPLE, glGetObjectParameterivAPPLE, NULL, _gloffset_GetObjectParameterivAPPLE), + NAME_FUNC_OFFSET(14150, glObjectPurgeableAPPLE, glObjectPurgeableAPPLE, NULL, _gloffset_ObjectPurgeableAPPLE), + NAME_FUNC_OFFSET(14173, glObjectUnpurgeableAPPLE, glObjectUnpurgeableAPPLE, NULL, _gloffset_ObjectUnpurgeableAPPLE), + NAME_FUNC_OFFSET(14198, gl_dispatch_stub_801, gl_dispatch_stub_801, NULL, _gloffset_StencilFuncSeparateATI), + NAME_FUNC_OFFSET(14223, gl_dispatch_stub_802, gl_dispatch_stub_802, NULL, _gloffset_ProgramEnvParameters4fvEXT), + NAME_FUNC_OFFSET(14252, gl_dispatch_stub_803, gl_dispatch_stub_803, NULL, _gloffset_ProgramLocalParameters4fvEXT), + NAME_FUNC_OFFSET(14283, gl_dispatch_stub_804, gl_dispatch_stub_804, NULL, _gloffset_GetQueryObjecti64vEXT), + NAME_FUNC_OFFSET(14307, gl_dispatch_stub_805, gl_dispatch_stub_805, NULL, _gloffset_GetQueryObjectui64vEXT), + NAME_FUNC_OFFSET(14332, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, _gloffset_EGLImageTargetRenderbufferStorageOES), + NAME_FUNC_OFFSET(14371, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, _gloffset_EGLImageTargetTexture2DOES), + NAME_FUNC_OFFSET(14400, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement), + NAME_FUNC_OFFSET(14418, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture), + NAME_FUNC_OFFSET(14435, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays), + NAME_FUNC_OFFSET(14451, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident), + NAME_FUNC_OFFSET(14476, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D), + NAME_FUNC_OFFSET(14496, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D), + NAME_FUNC_OFFSET(14516, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D), + NAME_FUNC_OFFSET(14539, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D), + NAME_FUNC_OFFSET(14562, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures), + NAME_FUNC_OFFSET(14582, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures), + NAME_FUNC_OFFSET(14599, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv), + NAME_FUNC_OFFSET(14616, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture), + NAME_FUNC_OFFSET(14631, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures), + NAME_FUNC_OFFSET(14655, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D), + NAME_FUNC_OFFSET(14674, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D), + NAME_FUNC_OFFSET(14693, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor), + NAME_FUNC_OFFSET(14709, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation), + NAME_FUNC_OFFSET(14728, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements), + NAME_FUNC_OFFSET(14751, glColorTable, glColorTable, NULL, _gloffset_ColorTable), + NAME_FUNC_OFFSET(14767, glColorTable, glColorTable, NULL, _gloffset_ColorTable), + NAME_FUNC_OFFSET(14783, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv), + NAME_FUNC_OFFSET(14810, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv), + NAME_FUNC_OFFSET(14837, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable), + NAME_FUNC_OFFSET(14857, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), + NAME_FUNC_OFFSET(14876, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable), + NAME_FUNC_OFFSET(14895, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), + NAME_FUNC_OFFSET(14925, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv), + NAME_FUNC_OFFSET(14955, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), + NAME_FUNC_OFFSET(14985, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv), + NAME_FUNC_OFFSET(15015, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable), + NAME_FUNC_OFFSET(15034, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable), + NAME_FUNC_OFFSET(15057, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D), + NAME_FUNC_OFFSET(15082, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D), + NAME_FUNC_OFFSET(15107, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf), + NAME_FUNC_OFFSET(15134, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv), + NAME_FUNC_OFFSET(15162, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri), + NAME_FUNC_OFFSET(15189, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv), + NAME_FUNC_OFFSET(15217, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D), + NAME_FUNC_OFFSET(15246, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D), + NAME_FUNC_OFFSET(15275, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter), + NAME_FUNC_OFFSET(15301, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv), + NAME_FUNC_OFFSET(15332, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv), + NAME_FUNC_OFFSET(15363, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter), + NAME_FUNC_OFFSET(15387, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D), + NAME_FUNC_OFFSET(15410, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram), + NAME_FUNC_OFFSET(15428, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv), + NAME_FUNC_OFFSET(15457, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv), + NAME_FUNC_OFFSET(15486, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax), + NAME_FUNC_OFFSET(15501, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv), + NAME_FUNC_OFFSET(15527, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv), + NAME_FUNC_OFFSET(15553, glHistogram, glHistogram, NULL, _gloffset_Histogram), + NAME_FUNC_OFFSET(15568, glMinmax, glMinmax, NULL, _gloffset_Minmax), + NAME_FUNC_OFFSET(15580, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram), + NAME_FUNC_OFFSET(15600, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax), + NAME_FUNC_OFFSET(15617, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D), + NAME_FUNC_OFFSET(15633, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D), + NAME_FUNC_OFFSET(15652, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D), + NAME_FUNC_OFFSET(15675, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB), + NAME_FUNC_OFFSET(15691, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB), + NAME_FUNC_OFFSET(15713, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB), + NAME_FUNC_OFFSET(15731, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB), + NAME_FUNC_OFFSET(15750, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB), + NAME_FUNC_OFFSET(15768, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB), + NAME_FUNC_OFFSET(15787, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB), + NAME_FUNC_OFFSET(15805, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB), + NAME_FUNC_OFFSET(15824, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB), + NAME_FUNC_OFFSET(15842, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB), + NAME_FUNC_OFFSET(15861, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB), + NAME_FUNC_OFFSET(15879, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB), + NAME_FUNC_OFFSET(15898, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB), + NAME_FUNC_OFFSET(15916, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB), + NAME_FUNC_OFFSET(15935, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB), + NAME_FUNC_OFFSET(15953, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB), + NAME_FUNC_OFFSET(15972, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB), + NAME_FUNC_OFFSET(15990, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB), + NAME_FUNC_OFFSET(16009, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB), + NAME_FUNC_OFFSET(16027, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB), + NAME_FUNC_OFFSET(16046, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB), + NAME_FUNC_OFFSET(16064, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB), + NAME_FUNC_OFFSET(16083, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB), + NAME_FUNC_OFFSET(16101, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB), + NAME_FUNC_OFFSET(16120, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB), + NAME_FUNC_OFFSET(16138, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB), + NAME_FUNC_OFFSET(16157, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB), + NAME_FUNC_OFFSET(16175, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB), + NAME_FUNC_OFFSET(16194, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB), + NAME_FUNC_OFFSET(16212, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB), + NAME_FUNC_OFFSET(16231, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB), + NAME_FUNC_OFFSET(16249, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB), + NAME_FUNC_OFFSET(16268, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB), + NAME_FUNC_OFFSET(16286, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB), + NAME_FUNC_OFFSET(16305, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate), + NAME_FUNC_OFFSET(16328, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB), + NAME_FUNC_OFFSET(16351, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB), + NAME_FUNC_OFFSET(16374, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB), + NAME_FUNC_OFFSET(16397, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB), + NAME_FUNC_OFFSET(16420, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB), + NAME_FUNC_OFFSET(16437, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB), + NAME_FUNC_OFFSET(16460, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB), + NAME_FUNC_OFFSET(16483, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB), + NAME_FUNC_OFFSET(16506, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB), + NAME_FUNC_OFFSET(16532, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB), + NAME_FUNC_OFFSET(16558, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB), + NAME_FUNC_OFFSET(16584, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB), + NAME_FUNC_OFFSET(16608, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB), + NAME_FUNC_OFFSET(16635, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB), + NAME_FUNC_OFFSET(16661, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB), + NAME_FUNC_OFFSET(16681, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB), + NAME_FUNC_OFFSET(16701, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB), + NAME_FUNC_OFFSET(16721, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB), + NAME_FUNC_OFFSET(16744, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB), + NAME_FUNC_OFFSET(16768, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB), + NAME_FUNC_OFFSET(16791, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB), + NAME_FUNC_OFFSET(16815, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB), + NAME_FUNC_OFFSET(16832, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB), + NAME_FUNC_OFFSET(16850, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB), + NAME_FUNC_OFFSET(16867, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB), + NAME_FUNC_OFFSET(16885, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB), + NAME_FUNC_OFFSET(16902, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB), + NAME_FUNC_OFFSET(16920, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB), + NAME_FUNC_OFFSET(16937, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB), + NAME_FUNC_OFFSET(16955, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB), + NAME_FUNC_OFFSET(16972, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB), + NAME_FUNC_OFFSET(16990, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB), + NAME_FUNC_OFFSET(17007, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB), + NAME_FUNC_OFFSET(17025, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB), + NAME_FUNC_OFFSET(17042, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB), + NAME_FUNC_OFFSET(17060, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB), + NAME_FUNC_OFFSET(17077, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB), + NAME_FUNC_OFFSET(17095, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB), + NAME_FUNC_OFFSET(17112, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB), + NAME_FUNC_OFFSET(17130, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB), + NAME_FUNC_OFFSET(17149, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB), + NAME_FUNC_OFFSET(17168, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB), + NAME_FUNC_OFFSET(17187, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB), + NAME_FUNC_OFFSET(17206, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB), + NAME_FUNC_OFFSET(17226, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB), + NAME_FUNC_OFFSET(17246, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB), + NAME_FUNC_OFFSET(17266, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB), + NAME_FUNC_OFFSET(17284, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB), + NAME_FUNC_OFFSET(17301, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB), + NAME_FUNC_OFFSET(17319, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB), + NAME_FUNC_OFFSET(17336, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB), + NAME_FUNC_OFFSET(17354, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB), + NAME_FUNC_OFFSET(17372, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB), + NAME_FUNC_OFFSET(17389, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB), + NAME_FUNC_OFFSET(17407, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB), + NAME_FUNC_OFFSET(17426, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB), + NAME_FUNC_OFFSET(17445, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB), + NAME_FUNC_OFFSET(17464, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB), + NAME_FUNC_OFFSET(17486, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB), + NAME_FUNC_OFFSET(17499, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB), + NAME_FUNC_OFFSET(17512, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB), + NAME_FUNC_OFFSET(17528, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB), + NAME_FUNC_OFFSET(17544, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB), + NAME_FUNC_OFFSET(17557, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB), + NAME_FUNC_OFFSET(17580, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB), + NAME_FUNC_OFFSET(17600, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB), + NAME_FUNC_OFFSET(17619, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB), + NAME_FUNC_OFFSET(17630, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB), + NAME_FUNC_OFFSET(17642, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB), + NAME_FUNC_OFFSET(17656, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB), + NAME_FUNC_OFFSET(17669, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB), + NAME_FUNC_OFFSET(17685, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB), + NAME_FUNC_OFFSET(17696, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB), + NAME_FUNC_OFFSET(17709, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB), + NAME_FUNC_OFFSET(17728, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB), + NAME_FUNC_OFFSET(17748, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB), + NAME_FUNC_OFFSET(17761, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB), + NAME_FUNC_OFFSET(17771, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB), + NAME_FUNC_OFFSET(17787, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB), + NAME_FUNC_OFFSET(17806, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB), + NAME_FUNC_OFFSET(17824, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB), + NAME_FUNC_OFFSET(17845, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB), + NAME_FUNC_OFFSET(17860, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB), + NAME_FUNC_OFFSET(17875, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB), + NAME_FUNC_OFFSET(17889, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB), + NAME_FUNC_OFFSET(17904, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB), + NAME_FUNC_OFFSET(17916, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB), + NAME_FUNC_OFFSET(17929, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB), + NAME_FUNC_OFFSET(17941, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB), + NAME_FUNC_OFFSET(17954, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB), + NAME_FUNC_OFFSET(17966, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB), + NAME_FUNC_OFFSET(17979, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB), + NAME_FUNC_OFFSET(17991, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB), + NAME_FUNC_OFFSET(18004, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB), + NAME_FUNC_OFFSET(18016, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB), + NAME_FUNC_OFFSET(18029, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB), + NAME_FUNC_OFFSET(18041, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB), + NAME_FUNC_OFFSET(18054, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB), + NAME_FUNC_OFFSET(18066, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB), + NAME_FUNC_OFFSET(18079, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB), + NAME_FUNC_OFFSET(18091, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB), + NAME_FUNC_OFFSET(18104, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB), + NAME_FUNC_OFFSET(18123, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB), + NAME_FUNC_OFFSET(18142, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB), + NAME_FUNC_OFFSET(18161, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB), + NAME_FUNC_OFFSET(18174, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB), + NAME_FUNC_OFFSET(18192, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB), + NAME_FUNC_OFFSET(18213, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB), + NAME_FUNC_OFFSET(18231, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB), + NAME_FUNC_OFFSET(18251, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET(18265, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB), + NAME_FUNC_OFFSET(18282, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, _gloffset_RenderbufferStorageMultisample), + NAME_FUNC_OFFSET(18318, gl_dispatch_stub_584, gl_dispatch_stub_584, NULL, _gloffset_SampleMaskSGIS), + NAME_FUNC_OFFSET(18334, gl_dispatch_stub_585, gl_dispatch_stub_585, NULL, _gloffset_SamplePatternSGIS), + NAME_FUNC_OFFSET(18353, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(18371, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(18392, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT), + NAME_FUNC_OFFSET(18414, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(18433, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(18455, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT), + NAME_FUNC_OFFSET(18478, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT), + NAME_FUNC_OFFSET(18497, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT), + NAME_FUNC_OFFSET(18517, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT), + NAME_FUNC_OFFSET(18536, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT), + NAME_FUNC_OFFSET(18556, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT), + NAME_FUNC_OFFSET(18575, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT), + NAME_FUNC_OFFSET(18595, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT), + NAME_FUNC_OFFSET(18614, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT), + NAME_FUNC_OFFSET(18634, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT), + NAME_FUNC_OFFSET(18653, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT), + NAME_FUNC_OFFSET(18673, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT), + NAME_FUNC_OFFSET(18693, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT), + NAME_FUNC_OFFSET(18714, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT), + NAME_FUNC_OFFSET(18734, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT), + NAME_FUNC_OFFSET(18755, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT), + NAME_FUNC_OFFSET(18775, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT), + NAME_FUNC_OFFSET(18796, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT), + NAME_FUNC_OFFSET(18820, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT), + NAME_FUNC_OFFSET(18838, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT), + NAME_FUNC_OFFSET(18858, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT), + NAME_FUNC_OFFSET(18876, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT), + NAME_FUNC_OFFSET(18888, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT), + NAME_FUNC_OFFSET(18901, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT), + NAME_FUNC_OFFSET(18913, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT), + NAME_FUNC_OFFSET(18926, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET(18946, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT), + NAME_FUNC_OFFSET(18970, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(18984, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA), + NAME_FUNC_OFFSET(19001, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(19016, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA), + NAME_FUNC_OFFSET(19034, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(19048, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA), + NAME_FUNC_OFFSET(19065, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(19080, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA), + NAME_FUNC_OFFSET(19098, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(19112, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA), + NAME_FUNC_OFFSET(19129, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(19144, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA), + NAME_FUNC_OFFSET(19162, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(19176, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA), + NAME_FUNC_OFFSET(19193, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(19208, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA), + NAME_FUNC_OFFSET(19226, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(19240, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA), + NAME_FUNC_OFFSET(19257, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(19272, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA), + NAME_FUNC_OFFSET(19290, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(19304, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA), + NAME_FUNC_OFFSET(19321, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(19336, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA), + NAME_FUNC_OFFSET(19354, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(19368, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA), + NAME_FUNC_OFFSET(19385, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(19400, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA), + NAME_FUNC_OFFSET(19418, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(19432, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA), + NAME_FUNC_OFFSET(19449, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(19464, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA), + NAME_FUNC_OFFSET(19482, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV), + NAME_FUNC_OFFSET(19499, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), + NAME_FUNC_OFFSET(19519, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), + NAME_FUNC_OFFSET(19536, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(19562, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(19591, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), + NAME_FUNC_OFFSET(19606, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), + NAME_FUNC_OFFSET(19624, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), + NAME_FUNC_OFFSET(19643, gl_dispatch_stub_755, gl_dispatch_stub_755, NULL, _gloffset_DeleteVertexArraysAPPLE), + NAME_FUNC_OFFSET(19664, gl_dispatch_stub_757, gl_dispatch_stub_757, NULL, _gloffset_IsVertexArrayAPPLE), + NAME_FUNC_OFFSET(19680, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(19704, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(19731, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT), + NAME_FUNC_OFFSET(19749, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT), + NAME_FUNC_OFFSET(19768, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT), + NAME_FUNC_OFFSET(19793, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT), + NAME_FUNC_OFFSET(19814, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT), + NAME_FUNC_OFFSET(19836, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT), + NAME_FUNC_OFFSET(19862, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT), + NAME_FUNC_OFFSET(19885, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT), + NAME_FUNC_OFFSET(19908, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT), + NAME_FUNC_OFFSET(19931, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT), + NAME_FUNC_OFFSET(19949, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT), + NAME_FUNC_OFFSET(19968, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT), + NAME_FUNC_OFFSET(19985, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT), + NAME_FUNC_OFFSET(20023, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT), + NAME_FUNC_OFFSET(20052, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT), + NAME_FUNC_OFFSET(20068, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT), + NAME_FUNC_OFFSET(20085, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT), + NAME_FUNC_OFFSET(20107, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, _gloffset_BlitFramebufferEXT), + NAME_FUNC_OFFSET(20125, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT), + NAME_FUNC_OFFSET(20151, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT), NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0) }; diff --git a/mesalib/src/mesa/glapi/glthread.c b/mesalib/src/mesa/glapi/glthread.c index 737fd4d6a..f365d17bd 100644 --- a/mesalib/src/mesa/glapi/glthread.c +++ b/mesalib/src/mesa/glapi/glthread.c @@ -30,10 +30,12 @@ #ifdef HAVE_DIX_CONFIG_H #include +#include "glapi/mesa.h" +#else +#include "main/compiler.h" #endif -#include "main/compiler.h" -#include "glthread.h" +#include "glapi/glthread.h" /* @@ -69,7 +71,7 @@ */ #ifdef PTHREADS -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return (unsigned long) pthread_self(); @@ -113,74 +115,6 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -/* - * Solaris/Unix International Threads -- Use only if POSIX threads - * aren't available on your Unix platform. Solaris 2.[34] are examples - * of platforms where this is the case. Be sure to use -mt and/or - * -D_REENTRANT when compiling. - */ -#ifdef SOLARIS_THREADS -#define USE_LOCK_FOR_KEY /* undef this to try a version without - lock for the global key... */ - -unsigned long -_glthread_GetID(void) -{ - abort(); /* XXX not implemented yet */ - return (unsigned long) 0; -} - - -void -_glthread_InitTSD(_glthread_TSD *tsd) -{ - if ((errno = mutex_init(&tsd->keylock, 0, NULL)) != 0 || - (errno = thr_keycreate(&(tsd->key), free)) != 0) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void * -_glthread_GetTSD(_glthread_TSD *tsd) -{ - void* ret; - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } -#ifdef USE_LOCK_FOR_KEY - mutex_lock(&tsd->keylock); - thr_getspecific(tsd->key, &ret); - mutex_unlock(&tsd->keylock); -#else - if ((errno = thr_getspecific(tsd->key, &ret)) != 0) { - perror(GET_TSD_ERROR); - exit(-1); - } -#endif - return ret; -} - - -void -_glthread_SetTSD(_glthread_TSD *tsd, void *ptr) -{ - if (tsd->initMagic != INIT_MAGIC) { - _glthread_InitTSD(tsd); - } - if ((errno = thr_setspecific(tsd->key, ptr)) != 0) { - perror(SET_TSD_ERROR); - exit(-1); - } -} - -#undef USE_LOCK_FOR_KEY -#endif /* SOLARIS_THREADS */ - - - /* * Win32 Threads. The only available option for Windows 95/NT. * Be sure that you compile using the Multithreaded runtime, otherwise @@ -188,20 +122,12 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) */ #ifdef WIN32_THREADS -void FreeTSD(_glthread_TSD *p) -{ - if (p->initMagic==INIT_MAGIC) { - TlsFree(p->key); - p->initMagic=0; - } -} - -void InsteadOf_exit(int nCode) +static void InsteadOf_exit(int nCode) { - DWORD dwErr=GetLastError(); + DWORD dwErr = GetLastError(); } -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return GetCurrentThreadId(); @@ -213,13 +139,24 @@ _glthread_InitTSD(_glthread_TSD *tsd) { tsd->key = TlsAlloc(); if (tsd->key == TLS_OUT_OF_INDEXES) { - perror("Mesa:_glthread_InitTSD"); + perror(INIT_TSD_ERROR); InsteadOf_exit(-1); } tsd->initMagic = INIT_MAGIC; } +void +_glthread_DestroyTSD(_glthread_TSD *tsd) +{ + if (tsd->initMagic != INIT_MAGIC) { + return; + } + TlsFree(tsd->key); + tsd->initMagic = 0x0; +} + + void * _glthread_GetTSD(_glthread_TSD *tsd) { @@ -239,8 +176,8 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) _glthread_InitTSD(tsd); } if (TlsSetValue(tsd->key, ptr) == 0) { - perror("Mesa:_glthread_SetTSD"); - InsteadOf_exit(-1); + perror(SET_TSD_ERROR); + InsteadOf_exit(-1); } } @@ -251,7 +188,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) */ #ifdef BEOS_THREADS -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return (unsigned long) find_thread(NULL); @@ -293,7 +230,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr) * no-op functions */ -unsigned long +PUBLIC unsigned long _glthread_GetID(void) { return 0; diff --git a/mesalib/src/mesa/glapi/glthread.h b/mesalib/src/mesa/glapi/glthread.h index 8ec933a85..4fe99284a 100644 --- a/mesalib/src/mesa/glapi/glthread.h +++ b/mesalib/src/mesa/glapi/glthread.h @@ -64,21 +64,12 @@ #define GLTHREAD_H -#if defined(USE_MGL_NAMESPACE) -#define _glapi_Dispatch _mglapi_Dispatch +#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS) +#ifndef THREADS +#define THREADS #endif - - - -#if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\ - defined(WIN32_THREADS) || defined(BEOS_THREADS)) \ - && !defined(THREADS) -# define THREADS #endif -#ifdef VMS -#include -#endif /* * POSIX threads. This should be your choice in the Unix world @@ -116,80 +107,7 @@ typedef pthread_mutex_t _glthread_Mutex; #define _glthread_UNLOCK_MUTEX(name) \ (void) pthread_mutex_unlock(&(name)) -typedef pthread_cond_t _glthread_Cond; - -#define _glthread_DECLARE_STATIC_COND(name) \ - static _glthread_Cond name = PTHREAD_COND_INITIALIZER - -#define _glthread_INIT_COND(cond) \ - pthread_cond_init(&(cond), NULL) - -#define _glthread_DESTROY_COND(name) \ - pthread_cond_destroy(&(name)) - -#define _glthread_COND_WAIT(cond, mutex) \ - pthread_cond_wait(&(cond), &(mutex)) - -#define _glthread_COND_SIGNAL(cond) \ - pthread_cond_signal(&(cond)) - -#define _glthread_COND_BROADCAST(cond) \ - pthread_cond_broadcast(&(cond)) - - -#else /* PTHREADS */ - -typedef unsigned int _glthread_Cond; -#define _glthread_DECLARE_STATIC_COND(name) \ -// #warning Condition variables not implemented. - -#define _glthread_INIT_COND(cond) \ - ASSERT(0); - -#define _glthread_DESTROY_COND(name) \ - ASSERT(0); - -#define _glthread_COND_WAIT(cond, mutex) \ - ASSERT(0); - -#define _glthread_COND_SIGNAL(cond) \ - ASSERT(0); - -#define _glthread_COND_BROADCAST(cond) \ - ASSERT(0); - -#endif - - -/* - * Solaris threads. Use only up to Solaris 2.4. - * Solaris 2.5 and higher provide POSIX threads. - * Be sure to compile with -mt on the Solaris compilers, or - * use -D_REENTRANT if using gcc. - */ -#ifdef SOLARIS_THREADS -#include - -typedef struct { - thread_key_t key; - mutex_t keylock; - int initMagic; -} _glthread_TSD; - -typedef thread_t _glthread_Thread; - -typedef mutex_t _glthread_Mutex; - -/* XXX need to really implement mutex-related macros */ -#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 -#define _glthread_INIT_MUTEX(name) (void) name -#define _glthread_DESTROY_MUTEX(name) (void) name -#define _glthread_LOCK_MUTEX(name) (void) name -#define _glthread_UNLOCK_MUTEX(name) (void) name - -#endif /* SOLARIS_THREADS */ - - +#endif /* PTHREADS */ /* @@ -209,11 +127,20 @@ typedef HANDLE _glthread_Thread; typedef CRITICAL_SECTION _glthread_Mutex; -#define _glthread_DECLARE_STATIC_MUTEX(name) /*static*/ _glthread_Mutex name = {0,0,0,0,0,0} -#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name) -#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name) -#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name) -#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name) +#define _glthread_DECLARE_STATIC_MUTEX(name) \ + /* static */ _glthread_Mutex name = { 0, 0, 0, 0, 0, 0 } + +#define _glthread_INIT_MUTEX(name) \ + InitializeCriticalSection(&name) + +#define _glthread_DESTROY_MUTEX(name) \ + DeleteCriticalSection(&name) + +#define _glthread_LOCK_MUTEX(name) \ + EnterCriticalSection(&name) + +#define _glthread_UNLOCK_MUTEX(name) \ + LeaveCriticalSection(&name) #endif /* WIN32_THREADS */ @@ -252,22 +179,34 @@ typedef struct { } benaphore; typedef benaphore _glthread_Mutex; -#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = { 0, 0 } -#define _glthread_INIT_MUTEX(name) name.sem = create_sem(0, #name"_benaphore"), name.lock = 0 -#define _glthread_DESTROY_MUTEX(name) delete_sem(name.sem), name.lock = 0 -#define _glthread_LOCK_MUTEX(name) if (name.sem == 0) _glthread_INIT_MUTEX(name); \ - if (atomic_add(&(name.lock), 1) >= 1) acquire_sem(name.sem) -#define _glthread_UNLOCK_MUTEX(name) if (atomic_add(&(name.lock), -1) > 1) release_sem(name.sem) +#define _glthread_DECLARE_STATIC_MUTEX(name) \ + static _glthread_Mutex name = { 0, 0 } -#endif /* BEOS_THREADS */ +#define _glthread_INIT_MUTEX(name) \ + name.sem = create_sem(0, #name"_benaphore"), \ + name.lock = 0 +#define _glthread_DESTROY_MUTEX(name) \ + delete_sem(name.sem), \ + name.lock = 0 +#define _glthread_LOCK_MUTEX(name) \ + if (name.sem == 0) \ + _glthread_INIT_MUTEX(name); \ + if (atomic_add(&(name.lock), 1) >= 1) \ + acquire_sem(name.sem) + +#define _glthread_UNLOCK_MUTEX(name) \ + if (atomic_add(&(name.lock), -1) > 1) \ + release_sem(name.sem) + +#endif /* BEOS_THREADS */ -#ifndef THREADS /* * THREADS not defined */ +#ifndef THREADS typedef unsigned _glthread_TSD; @@ -301,6 +240,10 @@ extern void _glthread_InitTSD(_glthread_TSD *); +extern void +_glthread_DestroyTSD(_glthread_TSD *); /* WIN32 only */ + + extern void * _glthread_GetTSD(_glthread_TSD *); @@ -308,26 +251,5 @@ _glthread_GetTSD(_glthread_TSD *); extern void _glthread_SetTSD(_glthread_TSD *, void *); -#if !defined __GNUC__ || __GNUC__ < 3 -# define __builtin_expect(x, y) x -#endif - -#if defined(GLX_USE_TLS) - -extern __thread struct _glapi_table * _glapi_tls_Dispatch - __attribute__((tls_model("initial-exec"))); - -#define GET_DISPATCH() _glapi_tls_Dispatch - -#elif !defined(GL_CALL) -# if defined(THREADS) -# define GET_DISPATCH() \ - ((__builtin_expect( _glapi_Dispatch != NULL, 1 )) \ - ? _glapi_Dispatch : _glapi_get_dispatch()) -# else -# define GET_DISPATCH() _glapi_Dispatch -# endif /* defined(THREADS) */ -#endif /* ndef GL_CALL */ - #endif /* THREADS_H */ diff --git a/mesalib/src/mesa/main/accum.c b/mesalib/src/mesa/main/accum.c index 032e13b96..2012d00fd 100644 --- a/mesalib/src/mesa/main/accum.c +++ b/mesalib/src/mesa/main/accum.c @@ -29,7 +29,7 @@ #include "macros.h" #include "state.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_accum diff --git a/mesalib/src/mesa/main/api_arrayelt.c b/mesalib/src/mesa/main/api_arrayelt.c index 469b4529f..ffcd19424 100644 --- a/mesalib/src/mesa/main/api_arrayelt.c +++ b/mesalib/src/mesa/main/api_arrayelt.c @@ -32,7 +32,7 @@ #include "context.h" #include "imports.h" #include "macros.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" typedef void (GLAPIENTRY *array_func)( const void * ); diff --git a/mesalib/src/mesa/main/api_exec.c b/mesalib/src/mesa/main/api_exec.c index 1559984f4..fa8d409ca 100644 --- a/mesalib/src/mesa/main/api_exec.c +++ b/mesalib/src/mesa/main/api_exec.c @@ -51,6 +51,7 @@ #include "clear.h" #include "clip.h" #include "colortab.h" +#include "condrender.h" #include "context.h" #include "convolve.h" #include "depth.h" @@ -65,14 +66,12 @@ #if FEATURE_EXT_framebuffer_object #include "fbobject.h" #endif -#include "ffvertex_prog.h" #include "framebuffer.h" #include "hint.h" #include "histogram.h" #include "imports.h" #include "light.h" #include "lines.h" -#include "macros.h" #include "matrix.h" #include "multisample.h" #include "pixel.h" @@ -82,7 +81,6 @@ #include "queryobj.h" #include "readpix.h" #include "scissor.h" -#include "state.h" #include "stencil.h" #include "texenv.h" #include "texgetimage.h" @@ -99,8 +97,6 @@ #endif #if FEATURE_NV_fragment_program #include "shader/nvprogram.h" -#include "shader/program.h" -#include "texenvprogram.h" #endif #if FEATURE_ARB_shader_objects #include "shaders.h" @@ -108,8 +104,7 @@ #if FEATURE_ARB_sync #include "syncobj.h" #endif -#include "debug.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" @@ -746,4 +741,27 @@ _mesa_init_exec_table(struct _glapi_table *exec) /* GL_ARB_vertex_array_object */ SET_BindVertexArray(exec, _mesa_BindVertexArray); SET_GenVertexArrays(exec, _mesa_GenVertexArrays); + + /* GL_EXT_draw_buffers2 */ + SET_ColorMaskIndexedEXT(exec, _mesa_ColorMaskIndexed); + SET_GetBooleanIndexedvEXT(exec, _mesa_GetBooleanIndexedv); + SET_GetIntegerIndexedvEXT(exec, _mesa_GetIntegerIndexedv); + SET_EnableIndexedEXT(exec, _mesa_EnableIndexed); + SET_DisableIndexedEXT(exec, _mesa_DisableIndexed); + SET_IsEnabledIndexedEXT(exec, _mesa_IsEnabledIndexed); + + /* GL_NV_conditional_render */ + SET_BeginConditionalRenderNV(exec, _mesa_BeginConditionalRender); + SET_EndConditionalRenderNV(exec, _mesa_EndConditionalRender); + +#if FEATURE_OES_EGL_image + SET_EGLImageTargetTexture2DOES(exec, _mesa_EGLImageTargetTexture2DOES); + SET_EGLImageTargetRenderbufferStorageOES(exec, _mesa_EGLImageTargetRenderbufferStorageOES); +#endif + +#if FEATURE_APPLE_object_purgeable + SET_ObjectPurgeableAPPLE(exec, _mesa_ObjectPurgeableAPPLE); + SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE); + SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE); +#endif } diff --git a/mesalib/src/mesa/main/api_loopback.c b/mesalib/src/mesa/main/api_loopback.c index 3d466ac44..aedc509fb 100644 --- a/mesalib/src/mesa/main/api_loopback.c +++ b/mesalib/src/mesa/main/api_loopback.c @@ -36,7 +36,7 @@ #include "glapi/glapi.h" #include "glapi/glapitable.h" #include "glapi/glthread.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /* KW: A set of functions to convert unusual Color/Normal/Vertex/etc * calls to a smaller set of driver-provided formats. Currently just diff --git a/mesalib/src/mesa/main/api_noop.c b/mesalib/src/mesa/main/api_noop.c index f72f95730..9a36394d6 100644 --- a/mesalib/src/mesa/main/api_noop.c +++ b/mesalib/src/mesa/main/api_noop.c @@ -32,7 +32,7 @@ #include "macros.h" #include "dlist.h" #include "eval.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c index e71e5a6ce..4fb7b5ad6 100644 --- a/mesalib/src/mesa/main/api_validate.c +++ b/mesalib/src/mesa/main/api_validate.c @@ -28,7 +28,6 @@ #include "context.h" #include "imports.h" #include "mtypes.h" -#include "state.h" #include "vbo/vbo.h" @@ -124,6 +123,12 @@ check_valid_to_render(GLcontext *ctx, const char *function) return GL_TRUE; } + +/** + * Do bounds checking on array element indexes. Check that the vertices + * pointed to by the indices don't lie outside buffer object bounds. + * \return GL_TRUE if OK, GL_FALSE if any indexed vertex goes is out of bounds + */ static GLboolean check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex) @@ -148,17 +153,18 @@ check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type, vbo_get_minmax_index(ctx, &prim, &ib, &min, &max); - if (min + basevertex < 0 || + if ((int)(min + basevertex) < 0 || max + basevertex > ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ - _mesa_warning(ctx, "glDrawElements() index=%u is " - "out of bounds (max=%u)", max, ctx->Array.ArrayObj->_MaxElement); + _mesa_warning(ctx, "glDrawElements() index=%u is out of bounds (max=%u)", + max, ctx->Array.ArrayObj->_MaxElement); return GL_FALSE; } return GL_TRUE; } + /** * Error checking for glDrawElements(). Includes parameter checking * and VBO bounds checking. @@ -190,9 +196,6 @@ _mesa_validate_DrawElements(GLcontext *ctx, return GL_FALSE; } - if (ctx->NewState) - _mesa_update_state(ctx); - if (!check_valid_to_render(ctx, "glDrawElements")) return GL_FALSE; @@ -254,9 +257,6 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode, return GL_FALSE; } - if (ctx->NewState) - _mesa_update_state(ctx); - if (!check_valid_to_render(ctx, "glDrawRangeElements")) return GL_FALSE; @@ -304,9 +304,6 @@ _mesa_validate_DrawArrays(GLcontext *ctx, return GL_FALSE; } - if (ctx->NewState) - _mesa_update_state(ctx); - if (!check_valid_to_render(ctx, "glDrawArrays")) return GL_FALSE; diff --git a/mesalib/src/mesa/main/arrayobj.c b/mesalib/src/mesa/main/arrayobj.c index fd35d4e38..0069cd3dc 100644 --- a/mesalib/src/mesa/main/arrayobj.c +++ b/mesalib/src/mesa/main/arrayobj.c @@ -48,7 +48,7 @@ #endif #include "arrayobj.h" #include "macros.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** @@ -95,6 +95,10 @@ unbind_array_object_vbos(GLcontext *ctx, struct gl_array_object *obj) for (i = 0; i < Elements(obj->VertexAttrib); i++) _mesa_reference_buffer_object(ctx, &obj->VertexAttrib[i].BufferObj,NULL); + +#if FEATURE_point_size_array + _mesa_reference_buffer_object(ctx, &obj->PointSize.BufferObj, NULL); +#endif } @@ -126,7 +130,7 @@ _mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj ) (void) ctx; unbind_array_object_vbos(ctx, obj); _glthread_DESTROY_MUTEX(obj->Mutex); - _mesa_free(obj); + free(obj); } @@ -291,11 +295,11 @@ compute_max_element(struct gl_client_array *array) - (GLsizeiptrARB) array->Ptr + array->StrideB - array->_ElementSize) / array->StrideB; if (0) - _mesa_printf("%s Object %u Size %u MaxElement %u\n", - __FUNCTION__, - array->BufferObj->Name, - (GLuint) array->BufferObj->Size, - array->_MaxElement); + printf("%s Object %u Size %u MaxElement %u\n", + __FUNCTION__, + array->BufferObj->Name, + (GLuint) array->BufferObj->Size, + array->_MaxElement); } else { /* user-space array, no idea how big it is */ diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c index 246c5521b..92fb8d289 100644 --- a/mesalib/src/mesa/main/attrib.c +++ b/mesalib/src/mesa/main/attrib.c @@ -33,7 +33,6 @@ #include "bufferobj.h" #include "clear.h" #include "colormac.h" -#include "colortab.h" #include "context.h" #include "depth.h" #include "enable.h" @@ -57,7 +56,7 @@ #include "varray.h" #include "viewport.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** @@ -223,7 +222,7 @@ _mesa_PushAttrib(GLbitfield mask) if (mask & GL_ACCUM_BUFFER_BIT) { struct gl_accum_attrib *attr; attr = MALLOC_STRUCT( gl_accum_attrib ); - MEMCPY( attr, &ctx->Accum, sizeof(struct gl_accum_attrib) ); + memcpy( attr, &ctx->Accum, sizeof(struct gl_accum_attrib) ); save_attrib_data(&head, GL_ACCUM_BUFFER_BIT, attr); } @@ -231,7 +230,7 @@ _mesa_PushAttrib(GLbitfield mask) GLuint i; struct gl_colorbuffer_attrib *attr; attr = MALLOC_STRUCT( gl_colorbuffer_attrib ); - MEMCPY( attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib) ); + memcpy( attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib) ); /* push the Draw FBO's DrawBuffer[] state, not ctx->Color.DrawBuffer[] */ for (i = 0; i < ctx->Const.MaxDrawBuffers; i ++) attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i]; @@ -242,14 +241,14 @@ _mesa_PushAttrib(GLbitfield mask) struct gl_current_attrib *attr; FLUSH_CURRENT( ctx, 0 ); attr = MALLOC_STRUCT( gl_current_attrib ); - MEMCPY( attr, &ctx->Current, sizeof(struct gl_current_attrib) ); + memcpy( attr, &ctx->Current, sizeof(struct gl_current_attrib) ); save_attrib_data(&head, GL_CURRENT_BIT, attr); } if (mask & GL_DEPTH_BUFFER_BIT) { struct gl_depthbuffer_attrib *attr; attr = MALLOC_STRUCT( gl_depthbuffer_attrib ); - MEMCPY( attr, &ctx->Depth, sizeof(struct gl_depthbuffer_attrib) ); + memcpy( attr, &ctx->Depth, sizeof(struct gl_depthbuffer_attrib) ); save_attrib_data(&head, GL_DEPTH_BUFFER_BIT, attr); } @@ -293,7 +292,7 @@ _mesa_PushAttrib(GLbitfield mask) attr->Map1TextureCoord4 = ctx->Eval.Map1TextureCoord4; attr->Map1Vertex3 = ctx->Eval.Map1Vertex3; attr->Map1Vertex4 = ctx->Eval.Map1Vertex4; - MEMCPY(attr->Map1Attrib, ctx->Eval.Map1Attrib, sizeof(ctx->Eval.Map1Attrib)); + memcpy(attr->Map1Attrib, ctx->Eval.Map1Attrib, sizeof(ctx->Eval.Map1Attrib)); attr->Map2Color4 = ctx->Eval.Map2Color4; attr->Map2Index = ctx->Eval.Map2Index; attr->Map2Normal = ctx->Eval.Map2Normal; @@ -303,7 +302,7 @@ _mesa_PushAttrib(GLbitfield mask) attr->Map2TextureCoord4 = ctx->Eval.Map2TextureCoord4; attr->Map2Vertex3 = ctx->Eval.Map2Vertex3; attr->Map2Vertex4 = ctx->Eval.Map2Vertex4; - MEMCPY(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib)); + memcpy(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib)); attr->Normalize = ctx->Transform.Normalize; attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped; attr->PointSmooth = ctx->Point.SmoothFlag; @@ -337,21 +336,21 @@ _mesa_PushAttrib(GLbitfield mask) if (mask & GL_EVAL_BIT) { struct gl_eval_attrib *attr; attr = MALLOC_STRUCT( gl_eval_attrib ); - MEMCPY( attr, &ctx->Eval, sizeof(struct gl_eval_attrib) ); + memcpy( attr, &ctx->Eval, sizeof(struct gl_eval_attrib) ); save_attrib_data(&head, GL_EVAL_BIT, attr); } if (mask & GL_FOG_BIT) { struct gl_fog_attrib *attr; attr = MALLOC_STRUCT( gl_fog_attrib ); - MEMCPY( attr, &ctx->Fog, sizeof(struct gl_fog_attrib) ); + memcpy( attr, &ctx->Fog, sizeof(struct gl_fog_attrib) ); save_attrib_data(&head, GL_FOG_BIT, attr); } if (mask & GL_HINT_BIT) { struct gl_hint_attrib *attr; attr = MALLOC_STRUCT( gl_hint_attrib ); - MEMCPY( attr, &ctx->Hint, sizeof(struct gl_hint_attrib) ); + memcpy( attr, &ctx->Hint, sizeof(struct gl_hint_attrib) ); save_attrib_data(&head, GL_HINT_BIT, attr); } @@ -359,28 +358,28 @@ _mesa_PushAttrib(GLbitfield mask) struct gl_light_attrib *attr; FLUSH_CURRENT(ctx, 0); /* flush material changes */ attr = MALLOC_STRUCT( gl_light_attrib ); - MEMCPY( attr, &ctx->Light, sizeof(struct gl_light_attrib) ); + memcpy( attr, &ctx->Light, sizeof(struct gl_light_attrib) ); save_attrib_data(&head, GL_LIGHTING_BIT, attr); } if (mask & GL_LINE_BIT) { struct gl_line_attrib *attr; attr = MALLOC_STRUCT( gl_line_attrib ); - MEMCPY( attr, &ctx->Line, sizeof(struct gl_line_attrib) ); + memcpy( attr, &ctx->Line, sizeof(struct gl_line_attrib) ); save_attrib_data(&head, GL_LINE_BIT, attr); } if (mask & GL_LIST_BIT) { struct gl_list_attrib *attr; attr = MALLOC_STRUCT( gl_list_attrib ); - MEMCPY( attr, &ctx->List, sizeof(struct gl_list_attrib) ); + memcpy( attr, &ctx->List, sizeof(struct gl_list_attrib) ); save_attrib_data(&head, GL_LIST_BIT, attr); } if (mask & GL_PIXEL_MODE_BIT) { struct gl_pixel_attrib *attr; attr = MALLOC_STRUCT( gl_pixel_attrib ); - MEMCPY( attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib) ); + memcpy( attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib) ); /* push the Read FBO's ReadBuffer state, not ctx->Pixel.ReadBuffer */ attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer; save_attrib_data(&head, GL_PIXEL_MODE_BIT, attr); @@ -389,35 +388,35 @@ _mesa_PushAttrib(GLbitfield mask) if (mask & GL_POINT_BIT) { struct gl_point_attrib *attr; attr = MALLOC_STRUCT( gl_point_attrib ); - MEMCPY( attr, &ctx->Point, sizeof(struct gl_point_attrib) ); + memcpy( attr, &ctx->Point, sizeof(struct gl_point_attrib) ); save_attrib_data(&head, GL_POINT_BIT, attr); } if (mask & GL_POLYGON_BIT) { struct gl_polygon_attrib *attr; attr = MALLOC_STRUCT( gl_polygon_attrib ); - MEMCPY( attr, &ctx->Polygon, sizeof(struct gl_polygon_attrib) ); + memcpy( attr, &ctx->Polygon, sizeof(struct gl_polygon_attrib) ); save_attrib_data(&head, GL_POLYGON_BIT, attr); } if (mask & GL_POLYGON_STIPPLE_BIT) { GLuint *stipple; stipple = (GLuint *) MALLOC( 32*sizeof(GLuint) ); - MEMCPY( stipple, ctx->PolygonStipple, 32*sizeof(GLuint) ); + memcpy( stipple, ctx->PolygonStipple, 32*sizeof(GLuint) ); save_attrib_data(&head, GL_POLYGON_STIPPLE_BIT, stipple); } if (mask & GL_SCISSOR_BIT) { struct gl_scissor_attrib *attr; attr = MALLOC_STRUCT( gl_scissor_attrib ); - MEMCPY( attr, &ctx->Scissor, sizeof(struct gl_scissor_attrib) ); + memcpy( attr, &ctx->Scissor, sizeof(struct gl_scissor_attrib) ); save_attrib_data(&head, GL_SCISSOR_BIT, attr); } if (mask & GL_STENCIL_BUFFER_BIT) { struct gl_stencil_attrib *attr; attr = MALLOC_STRUCT( gl_stencil_attrib ); - MEMCPY( attr, &ctx->Stencil, sizeof(struct gl_stencil_attrib) ); + memcpy( attr, &ctx->Stencil, sizeof(struct gl_stencil_attrib) ); save_attrib_data(&head, GL_STENCIL_BUFFER_BIT, attr); } @@ -433,7 +432,7 @@ _mesa_PushAttrib(GLbitfield mask) _mesa_lock_context_textures(ctx); /* copy/save the bulk of texture state here */ - _mesa_memcpy(&texstate->Texture, &ctx->Texture, sizeof(ctx->Texture)); + memcpy(&texstate->Texture, &ctx->Texture, sizeof(ctx->Texture)); /* Save references to the currently bound texture objects so they don't * accidentally get deleted while referenced in the attribute stack. @@ -461,14 +460,14 @@ _mesa_PushAttrib(GLbitfield mask) if (mask & GL_TRANSFORM_BIT) { struct gl_transform_attrib *attr; attr = MALLOC_STRUCT( gl_transform_attrib ); - MEMCPY( attr, &ctx->Transform, sizeof(struct gl_transform_attrib) ); + memcpy( attr, &ctx->Transform, sizeof(struct gl_transform_attrib) ); save_attrib_data(&head, GL_TRANSFORM_BIT, attr); } if (mask & GL_VIEWPORT_BIT) { struct gl_viewport_attrib *attr; attr = MALLOC_STRUCT( gl_viewport_attrib ); - MEMCPY( attr, &ctx->Viewport, sizeof(struct gl_viewport_attrib) ); + memcpy( attr, &ctx->Viewport, sizeof(struct gl_viewport_attrib) ); save_attrib_data(&head, GL_VIEWPORT_BIT, attr); } @@ -476,7 +475,7 @@ _mesa_PushAttrib(GLbitfield mask) if (mask & GL_MULTISAMPLE_BIT_ARB) { struct gl_multisample_attrib *attr; attr = MALLOC_STRUCT( gl_multisample_attrib ); - MEMCPY( attr, &ctx->Multisample, sizeof(struct gl_multisample_attrib) ); + memcpy( attr, &ctx->Multisample, sizeof(struct gl_multisample_attrib) ); save_attrib_data(&head, GL_MULTISAMPLE_BIT_ARB, attr); } @@ -499,7 +498,17 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable) } TEST_AND_UPDATE(ctx->Color.AlphaEnabled, enable->AlphaTest, GL_ALPHA_TEST); - TEST_AND_UPDATE(ctx->Color.BlendEnabled, enable->Blend, GL_BLEND); + if (ctx->Color.BlendEnabled != enable->Blend) { + if (ctx->Extensions.EXT_draw_buffers2) { + GLuint i; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + _mesa_set_enablei(ctx, GL_BLEND, i, (enable->Blend >> i) & 1); + } + } + else { + _mesa_set_enable(ctx, GL_BLEND, (enable->Blend & 1)); + } + } for (i=0;iName); - _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, obj->BorderColor); + _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, obj->BorderColor.f); _mesa_TexParameterf(target, GL_TEXTURE_PRIORITY, obj->Priority); _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, obj->WrapS); _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, obj->WrapT); @@ -906,6 +915,7 @@ _mesa_PopAttrib(void) case GL_COLOR_BUFFER_BIT: { const struct gl_colorbuffer_attrib *color; + color = (const struct gl_colorbuffer_attrib *) attr->data; _mesa_ClearIndex((GLfloat) color->ClearIndex); _mesa_ClearColor(color->ClearColor[0], @@ -913,10 +923,22 @@ _mesa_PopAttrib(void) color->ClearColor[2], color->ClearColor[3]); _mesa_IndexMask(color->IndexMask); - _mesa_ColorMask((GLboolean) (color->ColorMask[0] != 0), - (GLboolean) (color->ColorMask[1] != 0), - (GLboolean) (color->ColorMask[2] != 0), - (GLboolean) (color->ColorMask[3] != 0)); + if (!ctx->Extensions.EXT_draw_buffers2) { + _mesa_ColorMask((GLboolean) (color->ColorMask[0][0] != 0), + (GLboolean) (color->ColorMask[0][1] != 0), + (GLboolean) (color->ColorMask[0][2] != 0), + (GLboolean) (color->ColorMask[0][3] != 0)); + } + else { + GLuint i; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + _mesa_ColorMaskIndexed(i, + (GLboolean) (color->ColorMask[i][0] != 0), + (GLboolean) (color->ColorMask[i][1] != 0), + (GLboolean) (color->ColorMask[i][2] != 0), + (GLboolean) (color->ColorMask[i][3] != 0)); + } + } { /* Need to determine if more than one color output is * specified. If so, call glDrawBuffersARB, else call @@ -948,7 +970,18 @@ _mesa_PopAttrib(void) } _mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled); _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRef); - _mesa_set_enable(ctx, GL_BLEND, color->BlendEnabled); + if (ctx->Color.BlendEnabled != color->BlendEnabled) { + if (ctx->Extensions.EXT_draw_buffers2) { + GLuint i; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + _mesa_set_enablei(ctx, GL_BLEND, i, + (color->BlendEnabled >> i) & 1); + } + } + else { + _mesa_set_enable(ctx, GL_BLEND, (color->BlendEnabled & 1)); + } + } _mesa_BlendFuncSeparateEXT(color->BlendSrcRGB, color->BlendDstRGB, color->BlendSrcA, @@ -977,7 +1010,7 @@ _mesa_PopAttrib(void) break; case GL_CURRENT_BIT: FLUSH_CURRENT( ctx, 0 ); - MEMCPY( &ctx->Current, attr->data, + memcpy( &ctx->Current, attr->data, sizeof(struct gl_current_attrib) ); break; case GL_DEPTH_BUFFER_BIT: @@ -999,7 +1032,7 @@ _mesa_PopAttrib(void) } break; case GL_EVAL_BIT: - MEMCPY( &ctx->Eval, attr->data, sizeof(struct gl_eval_attrib) ); + memcpy( &ctx->Eval, attr->data, sizeof(struct gl_eval_attrib) ); ctx->NewState |= _NEW_EVAL; break; case GL_FOG_BIT: @@ -1043,22 +1076,39 @@ _mesa_PopAttrib(void) _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); for (i = 0; i < ctx->Const.MaxLights; i++) { - const struct gl_light *l = &light->Light[i]; + const struct gl_light *l = &light->Light[i]; _mesa_set_enable(ctx, GL_LIGHT0 + i, l->Enabled); - _mesa_light(ctx, i, GL_AMBIENT, l->Ambient); - _mesa_light(ctx, i, GL_DIFFUSE, l->Diffuse); - _mesa_light(ctx, i, GL_SPECULAR, l->Specular ); - _mesa_light(ctx, i, GL_POSITION, l->EyePosition); - _mesa_light(ctx, i, GL_SPOT_DIRECTION, l->SpotDirection); - _mesa_light(ctx, i, GL_SPOT_EXPONENT, &l->SpotExponent); - _mesa_light(ctx, i, GL_SPOT_CUTOFF, &l->SpotCutoff); - _mesa_light(ctx, i, GL_CONSTANT_ATTENUATION, - &l->ConstantAttenuation); - _mesa_light(ctx, i, GL_LINEAR_ATTENUATION, - &l->LinearAttenuation); - _mesa_light(ctx, i, GL_QUADRATIC_ATTENUATION, - &l->QuadraticAttenuation); - } + _mesa_light(ctx, i, GL_AMBIENT, l->Ambient); + _mesa_light(ctx, i, GL_DIFFUSE, l->Diffuse); + _mesa_light(ctx, i, GL_SPECULAR, l->Specular ); + _mesa_light(ctx, i, GL_POSITION, l->EyePosition); + _mesa_light(ctx, i, GL_SPOT_DIRECTION, l->SpotDirection); + { + GLfloat p[4] = { 0 }; + p[0] = l->SpotExponent; + _mesa_light(ctx, i, GL_SPOT_EXPONENT, p); + } + { + GLfloat p[4] = { 0 }; + p[0] = l->SpotCutoff; + _mesa_light(ctx, i, GL_SPOT_CUTOFF, p); + } + { + GLfloat p[4] = { 0 }; + p[0] = l->ConstantAttenuation; + _mesa_light(ctx, i, GL_CONSTANT_ATTENUATION, p); + } + { + GLfloat p[4] = { 0 }; + p[0] = l->LinearAttenuation; + _mesa_light(ctx, i, GL_LINEAR_ATTENUATION, p); + } + { + GLfloat p[4] = { 0 }; + p[0] = l->QuadraticAttenuation; + _mesa_light(ctx, i, GL_QUADRATIC_ATTENUATION, p); + } + } /* light model */ _mesa_LightModelfv(GL_LIGHT_MODEL_AMBIENT, light->Model.Ambient); @@ -1076,7 +1126,7 @@ _mesa_PopAttrib(void) _mesa_set_enable(ctx, GL_COLOR_MATERIAL, light->ColorMaterialEnabled); /* materials */ - MEMCPY(&ctx->Light.Material, &light->Material, + memcpy(&ctx->Light.Material, &light->Material, sizeof(struct gl_material)); } break; @@ -1091,10 +1141,10 @@ _mesa_PopAttrib(void) } break; case GL_LIST_BIT: - MEMCPY( &ctx->List, attr->data, sizeof(struct gl_list_attrib) ); + memcpy( &ctx->List, attr->data, sizeof(struct gl_list_attrib) ); break; case GL_PIXEL_MODE_BIT: - MEMCPY( &ctx->Pixel, attr->data, sizeof(struct gl_pixel_attrib) ); + memcpy( &ctx->Pixel, attr->data, sizeof(struct gl_pixel_attrib) ); /* XXX what other pixel state needs to be set by function calls? */ _mesa_ReadBuffer(ctx->Pixel.ReadBuffer); ctx->NewState |= _NEW_PIXEL; @@ -1153,7 +1203,7 @@ _mesa_PopAttrib(void) } break; case GL_POLYGON_STIPPLE_BIT: - MEMCPY( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) ); + memcpy( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) ); ctx->NewState |= _NEW_POLYGONSTIPPLE; if (ctx->Driver.PolygonStipple) ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data ); @@ -1367,8 +1417,8 @@ _mesa_PushClientAttrib(GLbitfield mask) ctx->Array.ElementArrayBufferObj->RefCount++; #endif - MEMCPY( attr, &ctx->Array, sizeof(struct gl_array_attrib) ); - MEMCPY( obj, ctx->Array.ArrayObj, sizeof(struct gl_array_object) ); + memcpy( attr, &ctx->Array, sizeof(struct gl_array_attrib) ); + memcpy( obj, ctx->Array.ArrayObj, sizeof(struct gl_array_object) ); attr->ArrayObj = obj; @@ -1442,7 +1492,7 @@ _mesa_PopClientAttrib(void) data->ElementArrayBufferObj->Name); #endif - MEMCPY( ctx->Array.ArrayObj, data->ArrayObj, + memcpy( ctx->Array.ArrayObj, data->ArrayObj, sizeof( struct gl_array_object ) ); FREE( data->ArrayObj ); @@ -1509,8 +1559,8 @@ _mesa_free_attrib_data(GLcontext *ctx) } next = attr->next; - _mesa_free(attr->data); - _mesa_free(attr); + free(attr->data); + free(attr); attr = next; } } diff --git a/mesalib/src/mesa/main/bitset.h b/mesalib/src/mesa/main/bitset.h index 8bd4526cb..9f48b3cce 100644 --- a/mesalib/src/mesa/main/bitset.h +++ b/mesalib/src/mesa/main/bitset.h @@ -27,7 +27,12 @@ * \brief Bitset of arbitrary size definitions. * \author Michal Krol */ - + +#ifndef BITSET_H +#define BITSET_H + +#include "imports.h" + /**************************************************************************** * generic bitset implementation */ @@ -42,10 +47,10 @@ /* bitset operations */ -#define BITSET_COPY(x, y) _mesa_memcpy( (x), (y), sizeof (x) ) -#define BITSET_EQUAL(x, y) (_mesa_memcmp( (x), (y), sizeof (x) ) == 0) -#define BITSET_ZERO(x) _mesa_memset( (x), 0, sizeof (x) ) -#define BITSET_ONES(x) _mesa_memset( (x), 0xff, sizeof (x) ) +#define BITSET_COPY(x, y) memcpy( (x), (y), sizeof (x) ) +#define BITSET_EQUAL(x, y) (memcmp( (x), (y), sizeof (x) ) == 0) +#define BITSET_ZERO(x) memset( (x), 0, sizeof (x) ) +#define BITSET_ONES(x) memset( (x), 0xff, sizeof (x) ) #define BITSET_BITWORD(b) ((b) / BITSET_WORDBITS) #define BITSET_BIT(b) (1 << ((b) % BITSET_WORDBITS)) @@ -74,6 +79,23 @@ ((x)[BITSET_BITWORD(b)] &= ~BITSET_RANGE(b, e)) : \ (assert (!"BITSET_CLEAR_RANGE: bit range crosses word boundary"), 0)) +/* Get first bit set in a bitset. + */ +static INLINE int +__bitset_ffs(const BITSET_WORD *x, int n) +{ + int i; + + for (i = 0; i < n; i++) { + if (x[i]) + return _mesa_ffs(x[i]) + BITSET_WORDBITS * i; + } + + return 0; +} + +#define BITSET_FFS(x) __bitset_ffs(x, Elements(x)) + /**************************************************************************** * 64-bit bitset implementation */ @@ -120,3 +142,4 @@ ((x)[BITSET64_BITWORD(b)] &= ~BITSET64_RANGE(b, e)) : \ (assert (!"BITSET64_CLEAR_RANGE: bit range crosses word boundary"), 0)) +#endif diff --git a/mesalib/src/mesa/main/blend.c b/mesalib/src/mesa/main/blend.c index 830e3b2e5..d022770f2 100644 --- a/mesalib/src/mesa/main/blend.c +++ b/mesalib/src/mesa/main/blend.c @@ -35,7 +35,6 @@ #include "enums.h" #include "macros.h" #include "mtypes.h" -#include "glapi/glapitable.h" /** @@ -457,9 +456,6 @@ _mesa_IndexMask( GLuint mask ) FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.IndexMask = mask; - - if (ctx->Driver.IndexMask) - ctx->Driver.IndexMask( ctx, mask ); } #endif @@ -484,6 +480,8 @@ _mesa_ColorMask( GLboolean red, GLboolean green, { GET_CURRENT_CONTEXT(ctx); GLubyte tmp[4]; + GLuint i; + GLboolean flushed; ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE & VERBOSE_API) @@ -497,14 +495,58 @@ _mesa_ColorMask( GLboolean red, GLboolean green, tmp[BCOMP] = blue ? 0xff : 0x0; tmp[ACOMP] = alpha ? 0xff : 0x0; - if (TEST_EQ_4UBV(tmp, ctx->Color.ColorMask)) + flushed = GL_FALSE; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + if (!TEST_EQ_4V(tmp, ctx->Color.ColorMask[i])) { + if (!flushed) { + FLUSH_VERTICES(ctx, _NEW_COLOR); + } + flushed = GL_TRUE; + COPY_4UBV(ctx->Color.ColorMask[i], tmp); + } + } + + if (ctx->Driver.ColorMask) + ctx->Driver.ColorMask( ctx, red, green, blue, alpha ); +} + + +/** + * For GL_EXT_draw_buffers2 and GL3 + */ +void GLAPIENTRY +_mesa_ColorMaskIndexed( GLuint buf, GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha ) +{ + GLubyte tmp[4]; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glColorMaskIndexed %u %d %d %d %d\n", + buf, red, green, blue, alpha); + + if (buf >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glColorMaskIndexed(buf=%u)", buf); + return; + } + + /* Shouldn't have any information about channel depth in core mesa + * -- should probably store these as the native booleans: + */ + tmp[RCOMP] = red ? 0xff : 0x0; + tmp[GCOMP] = green ? 0xff : 0x0; + tmp[BCOMP] = blue ? 0xff : 0x0; + tmp[ACOMP] = alpha ? 0xff : 0x0; + + if (TEST_EQ_4V(tmp, ctx->Color.ColorMask[buf])) return; FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4UBV(ctx->Color.ColorMask, tmp); + COPY_4UBV(ctx->Color.ColorMask[buf], tmp); - if (ctx->Driver.ColorMask) - ctx->Driver.ColorMask( ctx, red, green, blue, alpha ); + if (ctx->Driver.ColorMaskIndexed) + ctx->Driver.ColorMaskIndexed(ctx, buf, red, green, blue, alpha); } @@ -555,16 +597,13 @@ void _mesa_init_color( GLcontext * ctx ) { /* Color buffer group */ ctx->Color.IndexMask = ~0u; - ctx->Color.ColorMask[0] = 0xff; - ctx->Color.ColorMask[1] = 0xff; - ctx->Color.ColorMask[2] = 0xff; - ctx->Color.ColorMask[3] = 0xff; + memset(ctx->Color.ColorMask, 0xff, sizeof(ctx->Color.ColorMask)); ctx->Color.ClearIndex = 0; ASSIGN_4V( ctx->Color.ClearColor, 0, 0, 0, 0 ); ctx->Color.AlphaEnabled = GL_FALSE; ctx->Color.AlphaFunc = GL_ALWAYS; ctx->Color.AlphaRef = 0; - ctx->Color.BlendEnabled = GL_FALSE; + ctx->Color.BlendEnabled = 0x0; ctx->Color.BlendSrcRGB = GL_ONE; ctx->Color.BlendDstRGB = GL_ZERO; ctx->Color.BlendSrcA = GL_ONE; diff --git a/mesalib/src/mesa/main/blend.h b/mesalib/src/mesa/main/blend.h index 5c0f2783a..b4fd7470e 100644 --- a/mesalib/src/mesa/main/blend.h +++ b/mesalib/src/mesa/main/blend.h @@ -72,6 +72,10 @@ extern void GLAPIENTRY _mesa_ColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); +extern void GLAPIENTRY +_mesa_ColorMaskIndexed( GLuint buf, GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha ); + extern void GLAPIENTRY _mesa_ClampColorARB(GLenum target, GLenum clamp); diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index 52c4995b0..71d1514fe 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -37,6 +37,8 @@ #include "image.h" #include "context.h" #include "bufferobj.h" +#include "fbobject.h" +#include "texobj.h" /* Debug flags */ @@ -208,13 +210,14 @@ _mesa_delete_buffer_object( GLcontext *ctx, struct gl_buffer_object *bufObj ) (void) ctx; if (bufObj->Data) - _mesa_free(bufObj->Data); + free(bufObj->Data); /* assign strange values here to help w/ debugging */ bufObj->RefCount = -1000; bufObj->Name = ~0; - _mesa_free(bufObj); + _glthread_DESTROY_MUTEX(bufObj->Mutex); + free(bufObj); } @@ -235,7 +238,7 @@ _mesa_reference_buffer_object(GLcontext *ctx, GLboolean deleteFlag = GL_FALSE; struct gl_buffer_object *oldObj = *ptr; - /*_glthread_LOCK_MUTEX(oldObj->Mutex);*/ + _glthread_LOCK_MUTEX(oldObj->Mutex); ASSERT(oldObj->RefCount > 0); oldObj->RefCount--; #if 0 @@ -243,7 +246,7 @@ _mesa_reference_buffer_object(GLcontext *ctx, (void *) oldObj, oldObj->Name, oldObj->RefCount); #endif deleteFlag = (oldObj->RefCount == 0); - /*_glthread_UNLOCK_MUTEX(oldObj->Mutex);*/ + _glthread_UNLOCK_MUTEX(oldObj->Mutex); if (deleteFlag) { @@ -265,7 +268,7 @@ _mesa_reference_buffer_object(GLcontext *ctx, if (bufObj) { /* reference new buffer */ - /*_glthread_LOCK_MUTEX(tex->Mutex);*/ + _glthread_LOCK_MUTEX(bufObj->Mutex); if (bufObj->RefCount == 0) { /* this buffer's being deleted (look just above) */ /* Not sure this can every really happen. Warn if it does. */ @@ -280,7 +283,7 @@ _mesa_reference_buffer_object(GLcontext *ctx, #endif *ptr = bufObj; } - /*_glthread_UNLOCK_MUTEX(tex->Mutex);*/ + _glthread_UNLOCK_MUTEX(bufObj->Mutex); } } @@ -294,7 +297,8 @@ _mesa_initialize_buffer_object( struct gl_buffer_object *obj, { (void) target; - _mesa_bzero(obj, sizeof(struct gl_buffer_object)); + memset(obj, 0, sizeof(struct gl_buffer_object)); + _glthread_INIT_MUTEX(obj->Mutex); obj->RefCount = 1; obj->Name = name; obj->Usage = GL_STATIC_DRAW_ARB; @@ -337,7 +341,7 @@ _mesa_buffer_data( GLcontext *ctx, GLenum target, GLsizeiptrARB size, bufObj->Usage = usage; if (data) { - _mesa_memcpy( bufObj->Data, data, size ); + memcpy( bufObj->Data, data, size ); } return GL_TRUE; @@ -376,7 +380,7 @@ _mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, ASSERT(size + offset <= bufObj->Size); if (bufObj->Data) { - _mesa_memcpy( (GLubyte *) bufObj->Data + offset, data, size ); + memcpy( (GLubyte *) bufObj->Data + offset, data, size ); } } @@ -406,7 +410,7 @@ _mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, (void) ctx; (void) target; if (bufObj->Data && ((GLsizeiptrARB) (size + offset) <= bufObj->Size)) { - _mesa_memcpy( data, (GLubyte *) bufObj->Data + offset, size ); + memcpy( data, (GLubyte *) bufObj->Data + offset, size ); } } @@ -528,7 +532,7 @@ _mesa_copy_buffer_subdata(GLcontext *ctx, GL_WRITE_ONLY, dst); if (srcPtr && dstPtr) - _mesa_memcpy(dstPtr + writeOffset, srcPtr + readOffset, size); + memcpy(dstPtr + writeOffset, srcPtr + readOffset, size); ctx->Driver.UnmapBuffer(ctx, GL_COPY_READ_BUFFER, src); ctx->Driver.UnmapBuffer(ctx, GL_COPY_WRITE_BUFFER, dst); @@ -554,6 +558,17 @@ _mesa_init_buffer_objects( GLcontext *ctx ) } +void +_mesa_free_buffer_objects( GLcontext *ctx ) +{ + _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL); + _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, NULL); + + _mesa_reference_buffer_object(ctx, &ctx->CopyReadBuffer, NULL); + _mesa_reference_buffer_object(ctx, &ctx->CopyWriteBuffer, NULL); +} + + /** * Bind the specified target to buffer for the specified context. * Called by glBindBuffer() and other functions. @@ -1104,20 +1119,20 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size, } switch (usage) { - case GL_STREAM_DRAW_ARB: - case GL_STREAM_READ_ARB: - case GL_STREAM_COPY_ARB: - case GL_STATIC_DRAW_ARB: - case GL_STATIC_READ_ARB: - case GL_STATIC_COPY_ARB: - case GL_DYNAMIC_DRAW_ARB: - case GL_DYNAMIC_READ_ARB: - case GL_DYNAMIC_COPY_ARB: - /* OK */ - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glBufferDataARB(usage)"); - return; + case GL_STREAM_DRAW_ARB: + case GL_STREAM_READ_ARB: + case GL_STREAM_COPY_ARB: + case GL_STATIC_DRAW_ARB: + case GL_STATIC_READ_ARB: + case GL_STATIC_COPY_ARB: + case GL_DYNAMIC_DRAW_ARB: + case GL_DYNAMIC_READ_ARB: + case GL_DYNAMIC_COPY_ARB: + /* OK */ + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glBufferDataARB(usage)"); + return; } bufObj = get_buffer(ctx, target); @@ -1142,7 +1157,7 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size, bufObj->Written = GL_TRUE; #ifdef VBO_DEBUG - _mesa_printf("glBufferDataARB(%u, sz %ld, from %p, usage 0x%x)\n", + printf("glBufferDataARB(%u, sz %ld, from %p, usage 0x%x)\n", bufObj->Name, size, data, usage); #endif @@ -1210,18 +1225,18 @@ _mesa_MapBufferARB(GLenum target, GLenum access) ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL); switch (access) { - case GL_READ_ONLY_ARB: - accessFlags = GL_MAP_READ_BIT; - break; - case GL_WRITE_ONLY_ARB: - accessFlags = GL_MAP_WRITE_BIT; - break; - case GL_READ_WRITE_ARB: - accessFlags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glMapBufferARB(access)"); - return NULL; + case GL_READ_ONLY_ARB: + accessFlags = GL_MAP_READ_BIT; + break; + case GL_WRITE_ONLY_ARB: + accessFlags = GL_MAP_WRITE_BIT; + break; + case GL_READ_WRITE_ARB: + accessFlags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT; + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glMapBufferARB(access)"); + return NULL; } bufObj = get_buffer(ctx, target); @@ -1259,8 +1274,8 @@ _mesa_MapBufferARB(GLenum target, GLenum access) bufObj->Written = GL_TRUE; #ifdef VBO_DEBUG - _mesa_printf("glMapBufferARB(%u, sz %ld, access 0x%x)\n", - bufObj->Name, bufObj->Size, access); + printf("glMapBufferARB(%u, sz %ld, access 0x%x)\n", + bufObj->Name, bufObj->Size, access); if (access == GL_WRITE_ONLY_ARB) { GLuint i; GLubyte *b = (GLubyte *) bufObj->Pointer; @@ -1336,7 +1351,7 @@ _mesa_UnmapBufferARB(GLenum target) } } if (unchanged) { - _mesa_printf("glUnmapBufferARB(%u): %u of %ld unchanged, starting at %d\n", + printf("glUnmapBufferARB(%u): %u of %ld unchanged, starting at %d\n", bufObj->Name, unchanged, bufObj->Size, pos); } } @@ -1370,21 +1385,63 @@ _mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params) } switch (pname) { - case GL_BUFFER_SIZE_ARB: - *params = (GLint) bufObj->Size; - break; - case GL_BUFFER_USAGE_ARB: - *params = bufObj->Usage; - break; - case GL_BUFFER_ACCESS_ARB: - *params = simplified_access_mode(bufObj->AccessFlags); - break; - case GL_BUFFER_MAPPED_ARB: - *params = _mesa_bufferobj_mapped(bufObj); - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameterivARB(pname)"); - return; + case GL_BUFFER_SIZE_ARB: + *params = (GLint) bufObj->Size; + break; + case GL_BUFFER_USAGE_ARB: + *params = bufObj->Usage; + break; + case GL_BUFFER_ACCESS_ARB: + *params = simplified_access_mode(bufObj->AccessFlags); + break; + case GL_BUFFER_MAPPED_ARB: + *params = _mesa_bufferobj_mapped(bufObj); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameterivARB(pname)"); + return; + } +} + + +/** + * New in GL 3.2 + * This is pretty much a duplicate of GetBufferParameteriv() but the + * GL_BUFFER_SIZE_ARB attribute will be 64-bits on a 64-bit system. + */ +void GLAPIENTRY +_mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_buffer_object *bufObj; + ASSERT_OUTSIDE_BEGIN_END(ctx); + + bufObj = get_buffer(ctx, target); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_ENUM, "GetBufferParameteri64v(target)" ); + return; + } + if (!_mesa_is_bufferobj(bufObj)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "GetBufferParameteri64v" ); + return; + } + + switch (pname) { + case GL_BUFFER_SIZE_ARB: + *params = bufObj->Size; + break; + case GL_BUFFER_USAGE_ARB: + *params = bufObj->Usage; + break; + case GL_BUFFER_ACCESS_ARB: + *params = simplified_access_mode(bufObj->AccessFlags); + break; + case GL_BUFFER_MAPPED_ARB: + *params = _mesa_bufferobj_mapped(bufObj); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameteri64v(pname)"); + return; } } @@ -1655,3 +1712,387 @@ _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) if (ctx->Driver.FlushMappedBufferRange) ctx->Driver.FlushMappedBufferRange(ctx, target, offset, length, bufObj); } + + +#if FEATURE_APPLE_object_purgeable +static GLenum +_mesa_BufferObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) +{ + struct gl_buffer_object *bufObj; + GLenum retval; + + bufObj = _mesa_lookup_bufferobj(ctx, name); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectPurgeable(name = 0x%x)", name); + return 0; + } + if (!_mesa_is_bufferobj(bufObj)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glObjectPurgeable(buffer 0)" ); + return 0; + } + + if (bufObj->Purgeable) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glObjectPurgeable(name = 0x%x) is already purgeable", name); + return GL_VOLATILE_APPLE; + } + + bufObj->Purgeable = GL_TRUE; + + retval = GL_VOLATILE_APPLE; + if (ctx->Driver.BufferObjectPurgeable) + retval = ctx->Driver.BufferObjectPurgeable(ctx, bufObj, option); + + return retval; +} + + +static GLenum +_mesa_RenderObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) +{ + struct gl_renderbuffer *bufObj; + GLenum retval; + + bufObj = _mesa_lookup_renderbuffer(ctx, name); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectUnpurgeable(name = 0x%x)", name); + return 0; + } + + if (bufObj->Purgeable) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glObjectPurgeable(name = 0x%x) is already purgeable", name); + return GL_VOLATILE_APPLE; + } + + bufObj->Purgeable = GL_TRUE; + + retval = GL_VOLATILE_APPLE; + if (ctx->Driver.RenderObjectPurgeable) + retval = ctx->Driver.RenderObjectPurgeable(ctx, bufObj, option); + + return retval; +} + + +static GLenum +_mesa_TextureObjectPurgeable(GLcontext *ctx, GLuint name, GLenum option) +{ + struct gl_texture_object *bufObj; + GLenum retval; + + bufObj = _mesa_lookup_texture(ctx, name); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectPurgeable(name = 0x%x)", name); + return 0; + } + + if (bufObj->Purgeable) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glObjectPurgeable(name = 0x%x) is already purgeable", name); + return GL_VOLATILE_APPLE; + } + + bufObj->Purgeable = GL_TRUE; + + retval = GL_VOLATILE_APPLE; + if (ctx->Driver.TextureObjectPurgeable) + retval = ctx->Driver.TextureObjectPurgeable(ctx, bufObj, option); + + return retval; +} + + +GLenum GLAPIENTRY +_mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) +{ + GLenum retval; + + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); + + if (name == 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectPurgeable(name = 0x%x)", name); + return 0; + } + + switch (option) { + case GL_VOLATILE_APPLE: + case GL_RELEASED_APPLE: + /* legal */ + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glObjectPurgeable(name = 0x%x) invalid option: %d", + name, option); + return 0; + } + + switch (objectType) { + case GL_TEXTURE: + retval = _mesa_TextureObjectPurgeable (ctx, name, option); + break; + case GL_RENDERBUFFER_EXT: + retval = _mesa_RenderObjectPurgeable (ctx, name, option); + break; + case GL_BUFFER_OBJECT_APPLE: + retval = _mesa_BufferObjectPurgeable (ctx, name, option); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glObjectPurgeable(name = 0x%x) invalid type: %d", + name, objectType); + return 0; + } + + /* In strict conformance to the spec, we must only return VOLATILE when + * when passed the VOLATILE option. Madness. + * + * XXX First fix the spec, then fix me. + */ + return option == GL_VOLATILE_APPLE ? GL_VOLATILE_APPLE : retval; +} + + +static GLenum +_mesa_BufferObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option) +{ + struct gl_buffer_object *bufObj; + GLenum retval; + + bufObj = _mesa_lookup_bufferobj(ctx, name); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectUnpurgeable(name = 0x%x)", name); + return 0; + } + + if (! bufObj->Purgeable) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glObjectUnpurgeable(name = 0x%x) object is " + " already \"unpurged\"", name); + return 0; + } + + bufObj->Purgeable = GL_FALSE; + + retval = GL_RETAINED_APPLE; + if (ctx->Driver.BufferObjectUnpurgeable) + retval = ctx->Driver.BufferObjectUnpurgeable(ctx, bufObj, option); + + return retval; +} + + +static GLenum +_mesa_RenderObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option) +{ + struct gl_renderbuffer *bufObj; + GLenum retval; + + bufObj = _mesa_lookup_renderbuffer(ctx, name); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectUnpurgeable(name = 0x%x)", name); + return 0; + } + + if (! bufObj->Purgeable) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glObjectUnpurgeable(name = 0x%x) object is " + " already \"unpurged\"", name); + return 0; + } + + bufObj->Purgeable = GL_FALSE; + + retval = GL_RETAINED_APPLE; + if (ctx->Driver.RenderObjectUnpurgeable) + retval = ctx->Driver.RenderObjectUnpurgeable(ctx, bufObj, option); + + return option; +} + + +static GLenum +_mesa_TextureObjectUnpurgeable(GLcontext *ctx, GLuint name, GLenum option) +{ + struct gl_texture_object *bufObj; + GLenum retval; + + bufObj = _mesa_lookup_texture(ctx, name); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectUnpurgeable(name = 0x%x)", name); + return 0; + } + + if (! bufObj->Purgeable) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glObjectUnpurgeable(name = 0x%x) object is" + " already \"unpurged\"", name); + return 0; + } + + bufObj->Purgeable = GL_FALSE; + + retval = GL_RETAINED_APPLE; + if (ctx->Driver.TextureObjectUnpurgeable) + retval = ctx->Driver.TextureObjectUnpurgeable(ctx, bufObj, option); + + return retval; +} + + +GLenum GLAPIENTRY +_mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); + + if (name == 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectUnpurgeable(name = 0x%x)", name); + return 0; + } + + switch (option) { + case GL_RETAINED_APPLE: + case GL_UNDEFINED_APPLE: + /* legal */ + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glObjectUnpurgeable(name = 0x%x) invalid option: %d", + name, option); + return 0; + } + + switch (objectType) { + case GL_BUFFER_OBJECT_APPLE: + return _mesa_BufferObjectUnpurgeable(ctx, name, option); + case GL_TEXTURE: + return _mesa_TextureObjectUnpurgeable(ctx, name, option); + case GL_RENDERBUFFER_EXT: + return _mesa_RenderObjectUnpurgeable(ctx, name, option); + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glObjectUnpurgeable(name = 0x%x) invalid type: %d", + name, objectType); + return 0; + } +} + + +static void +_mesa_GetBufferObjectParameterivAPPLE(GLcontext *ctx, GLuint name, + GLenum pname, GLint* params) +{ + struct gl_buffer_object *bufObj; + + bufObj = _mesa_lookup_bufferobj(ctx, name); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetObjectParameteriv(name = 0x%x) invalid object", name); + return; + } + + switch (pname) { + case GL_PURGEABLE_APPLE: + *params = bufObj->Purgeable; + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetObjectParameteriv(name = 0x%x) invalid enum: %d", + name, pname); + break; + } +} + + +static void +_mesa_GetRenderObjectParameterivAPPLE(GLcontext *ctx, GLuint name, + GLenum pname, GLint* params) +{ + struct gl_renderbuffer *bufObj; + + bufObj = _mesa_lookup_renderbuffer(ctx, name); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectUnpurgeable(name = 0x%x)", name); + return; + } + + switch (pname) { + case GL_PURGEABLE_APPLE: + *params = bufObj->Purgeable; + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetObjectParameteriv(name = 0x%x) invalid enum: %d", + name, pname); + break; + } +} + + +static void +_mesa_GetTextureObjectParameterivAPPLE(GLcontext *ctx, GLuint name, + GLenum pname, GLint* params) +{ + struct gl_texture_object *bufObj; + + bufObj = _mesa_lookup_texture(ctx, name); + if (!bufObj) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glObjectUnpurgeable(name = 0x%x)", name); + return; + } + + switch (pname) { + case GL_PURGEABLE_APPLE: + *params = bufObj->Purgeable; + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetObjectParameteriv(name = 0x%x) invalid enum: %d", + name, pname); + break; + } +} + + +void GLAPIENTRY +_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, + GLint* params) +{ + GET_CURRENT_CONTEXT(ctx); + + if (name == 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetObjectParameteriv(name = 0x%x)", name); + return; + } + + switch (objectType) { + case GL_TEXTURE: + _mesa_GetTextureObjectParameterivAPPLE (ctx, name, pname, params); + break; + case GL_BUFFER_OBJECT_APPLE: + _mesa_GetBufferObjectParameterivAPPLE (ctx, name, pname, params); + break; + case GL_RENDERBUFFER_EXT: + _mesa_GetRenderObjectParameterivAPPLE (ctx, name, pname, params); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetObjectParameteriv(name = 0x%x) invalid type: %d", + name, objectType); + } +} + +#endif /* FEATURE_APPLE_object_purgeable */ diff --git a/mesalib/src/mesa/main/bufferobj.h b/mesalib/src/mesa/main/bufferobj.h index 9f732ec0c..912529cfd 100644 --- a/mesalib/src/mesa/main/bufferobj.h +++ b/mesalib/src/mesa/main/bufferobj.h @@ -59,6 +59,9 @@ _mesa_is_bufferobj(const struct gl_buffer_object *obj) extern void _mesa_init_buffer_objects( GLcontext *ctx ); +extern void +_mesa_free_buffer_objects( GLcontext *ctx ); + extern void _mesa_update_default_objects_buffer_objects(GLcontext *ctx); @@ -154,6 +157,9 @@ _mesa_UnmapBufferARB(GLenum target); extern void GLAPIENTRY _mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params); +extern void GLAPIENTRY +_mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params); + extern void GLAPIENTRY _mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params); @@ -169,4 +175,15 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, extern void GLAPIENTRY _mesa_FlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length); +#if FEATURE_APPLE_object_purgeable +extern GLenum GLAPIENTRY +_mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option); + +extern GLenum GLAPIENTRY +_mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option); + +extern void GLAPIENTRY +_mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint* params); +#endif + #endif diff --git a/mesalib/src/mesa/main/buffers.c b/mesalib/src/mesa/main/buffers.c index 97f065975..fb30b5996 100644 --- a/mesalib/src/mesa/main/buffers.c +++ b/mesalib/src/mesa/main/buffers.c @@ -35,8 +35,6 @@ #include "colormac.h" #include "context.h" #include "enums.h" -#include "fbobject.h" -#include "state.h" #define BAD_MASK ~0u diff --git a/mesalib/src/mesa/main/clear.c b/mesalib/src/mesa/main/clear.c index 63388f42e..e76ab5527 100644 --- a/mesalib/src/mesa/main/clear.c +++ b/mesalib/src/mesa/main/clear.c @@ -34,6 +34,7 @@ #include "clear.h" #include "context.h" #include "colormac.h" +#include "enums.h" #include "state.h" @@ -50,11 +51,6 @@ _mesa_ClearIndex( GLfloat c ) FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.ClearIndex = (GLuint) c; - - if (!ctx->Visual.rgbMode && ctx->Driver.ClearIndex) { - /* it's OK to call glClearIndex in RGBA mode but it should be a NOP */ - (*ctx->Driver.ClearIndex)( ctx, ctx->Color.ClearIndex ); - } } #endif @@ -91,7 +87,7 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) FLUSH_VERTICES(ctx, _NEW_COLOR); COPY_4V(ctx->Color.ClearColor, tmp); - if (ctx->Visual.rgbMode && ctx->Driver.ClearColor) { + if (ctx->Driver.ClearColor) { /* it's OK to call glClearColor in CI mode but it should be a NOP */ (*ctx->Driver.ClearColor)(ctx, ctx->Color.ClearColor); } @@ -182,3 +178,326 @@ _mesa_Clear( GLbitfield mask ) ctx->Driver.Clear(ctx, bufferMask); } } + + +/** Returned by make_color_buffer_mask() for errors */ +#define INVALID_MASK ~0x0 + + +/** + * Convert the glClearBuffer 'drawbuffer' parameter into a bitmask of + * BUFFER_BIT_x values. + * Return INVALID_MASK if the drawbuffer value is invalid. + */ +static GLbitfield +make_color_buffer_mask(GLcontext *ctx, GLint drawbuffer) +{ + const struct gl_renderbuffer_attachment *att = ctx->DrawBuffer->Attachment; + GLbitfield mask = 0x0; + + switch (drawbuffer) { + case GL_FRONT: + if (att[BUFFER_FRONT_LEFT].Renderbuffer) + mask |= BUFFER_BIT_FRONT_LEFT; + if (att[BUFFER_FRONT_RIGHT].Renderbuffer) + mask |= BUFFER_BIT_FRONT_RIGHT; + break; + case GL_BACK: + if (att[BUFFER_BACK_LEFT].Renderbuffer) + mask |= BUFFER_BIT_BACK_LEFT; + if (att[BUFFER_BACK_RIGHT].Renderbuffer) + mask |= BUFFER_BIT_BACK_RIGHT; + break; + case GL_LEFT: + if (att[BUFFER_FRONT_LEFT].Renderbuffer) + mask |= BUFFER_BIT_FRONT_LEFT; + if (att[BUFFER_BACK_LEFT].Renderbuffer) + mask |= BUFFER_BIT_BACK_LEFT; + break; + case GL_RIGHT: + if (att[BUFFER_FRONT_RIGHT].Renderbuffer) + mask |= BUFFER_BIT_FRONT_RIGHT; + if (att[BUFFER_BACK_RIGHT].Renderbuffer) + mask |= BUFFER_BIT_BACK_RIGHT; + break; + case GL_FRONT_AND_BACK: + if (att[BUFFER_FRONT_LEFT].Renderbuffer) + mask |= BUFFER_BIT_FRONT_LEFT; + if (att[BUFFER_BACK_LEFT].Renderbuffer) + mask |= BUFFER_BIT_BACK_LEFT; + if (att[BUFFER_FRONT_RIGHT].Renderbuffer) + mask |= BUFFER_BIT_FRONT_RIGHT; + if (att[BUFFER_BACK_RIGHT].Renderbuffer) + mask |= BUFFER_BIT_BACK_RIGHT; + break; + default: + if (drawbuffer < 0 || drawbuffer >= (GLint)ctx->Const.MaxDrawBuffers) { + mask = INVALID_MASK; + } + else if (att[BUFFER_COLOR0 + drawbuffer].Renderbuffer) { + mask |= (BUFFER_BIT_COLOR0 << drawbuffer); + } + } + + return mask; +} + + + +/** + * New in GL 3.0 + * Clear signed integer color buffer or stencil buffer (not depth). + */ +void GLAPIENTRY +_mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + FLUSH_CURRENT(ctx, 0); + + if (ctx->NewState) { + _mesa_update_state( ctx ); + } + + switch (buffer) { + case GL_STENCIL: + if (drawbuffer != 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)", + drawbuffer); + return; + } + else { + /* Save current stencil clear value, set to 'value', do the + * stencil clear and restore the clear value. + * XXX in the future we may have a new ctx->Driver.ClearBuffer() + * hook instead. + */ + const GLuint clearSave = ctx->Stencil.Clear; + ctx->Stencil.Clear = *value; + if (ctx->Driver.ClearStencil) + ctx->Driver.ClearStencil(ctx, *value); + ctx->Driver.Clear(ctx, BUFFER_BIT_STENCIL); + ctx->Stencil.Clear = clearSave; + if (ctx->Driver.ClearStencil) + ctx->Driver.ClearStencil(ctx, clearSave); + } + break; + case GL_COLOR: + { + const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer); + if (mask == INVALID_MASK) { + _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)", + drawbuffer); + return; + } + else if (mask) { + /* XXX note: we're putting the integer clear values into the + * floating point state var. This will not always work. We'll + * need a new ctx->Driver.ClearBuffer() hook.... + */ + GLclampf clearSave[4]; + /* save color */ + COPY_4V(clearSave, ctx->Color.ClearColor); + /* set color */ + COPY_4V_CAST(ctx->Color.ClearColor, value, GLclampf); + if (ctx->Driver.ClearColor) + ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor); + /* clear buffer(s) */ + ctx->Driver.Clear(ctx, mask); + /* restore color */ + COPY_4V(ctx->Color.ClearColor, clearSave); + if (ctx->Driver.ClearColor) + ctx->Driver.ClearColor(ctx, clearSave); + } + } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferiv(buffer=%s)", + _mesa_lookup_enum_by_nr(buffer)); + return; + } +} + + +/** + * New in GL 3.0 + * Clear unsigned integer color buffer (not depth, not stencil). + */ +void GLAPIENTRY +_mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + FLUSH_CURRENT(ctx, 0); + + if (ctx->NewState) { + _mesa_update_state( ctx ); + } + + switch (buffer) { + case GL_COLOR: + { + const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer); + if (mask == INVALID_MASK) { + _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)", + drawbuffer); + return; + } + else if (mask) { + /* XXX note: we're putting the uint clear values into the + * floating point state var. This will not always work. We'll + * need a new ctx->Driver.ClearBuffer() hook.... + */ + GLclampf clearSave[4]; + /* save color */ + COPY_4V(clearSave, ctx->Color.ClearColor); + /* set color */ + COPY_4V_CAST(ctx->Color.ClearColor, value, GLclampf); + if (ctx->Driver.ClearColor) + ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor); + /* clear buffer(s) */ + ctx->Driver.Clear(ctx, mask); + /* restore color */ + COPY_4V(ctx->Color.ClearColor, clearSave); + if (ctx->Driver.ClearColor) + ctx->Driver.ClearColor(ctx, clearSave); + } + } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferuiv(buffer=%s)", + _mesa_lookup_enum_by_nr(buffer)); + return; + } +} + + +/** + * New in GL 3.0 + * Clear fixed-pt or float color buffer or depth buffer (not stencil). + */ +void GLAPIENTRY +_mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + FLUSH_CURRENT(ctx, 0); + + if (ctx->NewState) { + _mesa_update_state( ctx ); + } + + switch (buffer) { + case GL_DEPTH: + if (drawbuffer != 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfv(drawbuffer=%d)", + drawbuffer); + return; + } + else { + /* Save current depth clear value, set to 'value', do the + * depth clear and restore the clear value. + * XXX in the future we may have a new ctx->Driver.ClearBuffer() + * hook instead. + */ + const GLclampd clearSave = ctx->Depth.Clear; + ctx->Depth.Clear = *value; + if (ctx->Driver.ClearDepth) + ctx->Driver.ClearDepth(ctx, *value); + ctx->Driver.Clear(ctx, BUFFER_BIT_DEPTH); + ctx->Depth.Clear = clearSave; + if (ctx->Driver.ClearDepth) + ctx->Driver.ClearDepth(ctx, clearSave); + } + /* clear depth buffer to value */ + break; + case GL_COLOR: + { + const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer); + if (mask == INVALID_MASK) { + _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfv(drawbuffer=%d)", + drawbuffer); + return; + } + else if (mask) { + GLclampf clearSave[4]; + /* save color */ + COPY_4V(clearSave, ctx->Color.ClearColor); + /* set color */ + COPY_4V_CAST(ctx->Color.ClearColor, value, GLclampf); + if (ctx->Driver.ClearColor) + ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor); + /* clear buffer(s) */ + ctx->Driver.Clear(ctx, mask); + /* restore color */ + COPY_4V(ctx->Color.ClearColor, clearSave); + if (ctx->Driver.ClearColor) + ctx->Driver.ClearColor(ctx, clearSave); + } + } + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfv(buffer=%s)", + _mesa_lookup_enum_by_nr(buffer)); + return; + } +} + + +/** + * New in GL 3.0 + * Clear depth/stencil buffer only. + */ +void GLAPIENTRY +_mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer, + GLfloat depth, GLint stencil) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + FLUSH_CURRENT(ctx, 0); + + if (buffer != GL_DEPTH_STENCIL) { + _mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfi(buffer=%s)", + _mesa_lookup_enum_by_nr(buffer)); + return; + } + + if (drawbuffer != 0) { + _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfi(drawbuffer=%d)", + drawbuffer); + return; + } + + if (ctx->NewState) { + _mesa_update_state( ctx ); + } + + { + /* save current clear values */ + const GLclampd clearDepthSave = ctx->Depth.Clear; + const GLuint clearStencilSave = ctx->Stencil.Clear; + + /* set new clear values */ + ctx->Depth.Clear = depth; + ctx->Stencil.Clear = stencil; + if (ctx->Driver.ClearDepth) + ctx->Driver.ClearDepth(ctx, depth); + if (ctx->Driver.ClearStencil) + ctx->Driver.ClearStencil(ctx, stencil); + + /* clear buffers */ + ctx->Driver.Clear(ctx, BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL); + + /* restore */ + ctx->Depth.Clear = clearDepthSave; + ctx->Stencil.Clear = clearStencilSave; + if (ctx->Driver.ClearDepth) + ctx->Driver.ClearDepth(ctx, clearDepthSave); + if (ctx->Driver.ClearStencil) + ctx->Driver.ClearStencil(ctx, clearStencilSave); + } +} diff --git a/mesalib/src/mesa/main/clear.h b/mesalib/src/mesa/main/clear.h index 9a54ba14b..4c78eeda4 100644 --- a/mesalib/src/mesa/main/clear.h +++ b/mesalib/src/mesa/main/clear.h @@ -41,4 +41,17 @@ extern void GLAPIENTRY _mesa_Clear( GLbitfield mask ); +extern void GLAPIENTRY +_mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value); + +extern void GLAPIENTRY +_mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value); + +extern void GLAPIENTRY +_mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value); + +extern void GLAPIENTRY +_mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer, + GLfloat depth, GLint stencil); + #endif diff --git a/mesalib/src/mesa/main/colortab.c b/mesalib/src/mesa/main/colortab.c index 5ede76c1f..52d5badf3 100644 --- a/mesalib/src/mesa/main/colortab.c +++ b/mesalib/src/mesa/main/colortab.c @@ -32,7 +32,7 @@ #include "state.h" #include "teximage.h" #include "texstate.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_colortable @@ -407,8 +407,8 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat, _mesa_free_colortable_data(table); if (width > 0) { - table->TableF = (GLfloat *) _mesa_malloc(comps * width * sizeof(GLfloat)); - table->TableUB = (GLubyte *) _mesa_malloc(comps * width * sizeof(GLubyte)); + table->TableF = (GLfloat *) malloc(comps * width * sizeof(GLfloat)); + table->TableUB = (GLubyte *) malloc(comps * width * sizeof(GLubyte)); if (!table->TableF || !table->TableUB) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glColorTable"); @@ -684,7 +684,7 @@ _mesa_GetColorTable( GLenum target, GLenum format, } break; case GL_RGBA: - _mesa_memcpy(rgba, table->TableF, 4 * table->Size * sizeof(GLfloat)); + memcpy(rgba, table->TableF, 4 * table->Size * sizeof(GLfloat)); break; default: _mesa_problem(ctx, "bad table format in glGetColorTable"); @@ -1095,11 +1095,11 @@ void _mesa_free_colortable_data( struct gl_color_table *p ) { if (p->TableF) { - _mesa_free(p->TableF); + free(p->TableF); p->TableF = NULL; } if (p->TableUB) { - _mesa_free(p->TableUB); + free(p->TableUB); p->TableUB = NULL; } } diff --git a/mesalib/src/mesa/main/compiler.h b/mesalib/src/mesa/main/compiler.h index 4eb249b4a..81704ae2c 100644 --- a/mesalib/src/mesa/main/compiler.h +++ b/mesalib/src/mesa/main/compiler.h @@ -173,7 +173,7 @@ extern "C" { * We also need to define a USED attribute, so the optimizer doesn't * inline a static function that we later use in an alias. - ajax */ -#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 +#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) # define PUBLIC __attribute__((visibility("default"))) # define USED __attribute__((used)) #else @@ -196,7 +196,7 @@ extern "C" { /** * __builtin_expect macros */ -#if (!defined(__GNUC__) || __GNUC__ < 3) && (!defined(__IBMC__) || __IBMC__ < 900) +#if !defined(__GNUC__) # define __builtin_expect(x, y) x #endif @@ -209,7 +209,7 @@ extern "C" { #ifndef __FUNCTION__ # if defined(__VMS) # define __FUNCTION__ "VMS$NL:" -# elif ((!defined __GNUC__) || (__GNUC__ < 2)) && (!defined __xlC__) && \ +# elif !defined(__GNUC__) && !defined(__xlC__) && \ (!defined(_MSC_VER) || _MSC_VER < 1300) # if (__STDC_VERSION__ >= 199901L) /* C99 */ || \ (defined(__SUNPRO_C) && defined(__C99FEATURES__)) @@ -222,8 +222,8 @@ extern "C" { /** - * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN. - * Do not use them unless absolutely necessary! + * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN, and CPU_TO_LE32. + * Do not use these unless absolutely necessary! * Try to use a runtime test instead. * For now, only used by some DRI hardware drivers for color/texel packing. */ @@ -235,10 +235,13 @@ extern "C" { #include #define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x ) #elif (defined(_AIX) || defined(__blrts)) -#define CPU_TO_LE32( x ) x = ((x & 0x000000ff) << 24) | \ - ((x & 0x0000ff00) << 8) | \ - ((x & 0x00ff0000) >> 8) | \ - ((x & 0xff000000) >> 24); +static INLINE GLuint CPU_TO_LE32(GLuint x) +{ + return (((x & 0x000000ff) << 24) | + ((x & 0x0000ff00) << 8) | + ((x & 0x00ff0000) >> 8) | + ((x & 0xff000000) >> 24)); +} #else /*__linux__ */ #include #define CPU_TO_LE32( x ) bswap32( x ) @@ -318,8 +321,7 @@ extern "C" { * LONGSTRING macro * gcc -pedantic warns about long string literals, LONGSTRING silences that. */ -#if !defined(__GNUC__) || (__GNUC__ < 2) || \ - ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)) +#if !defined(__GNUC__) # define LONGSTRING #else # define LONGSTRING __extension__ diff --git a/mesalib/src/mesa/main/condrender.c b/mesalib/src/mesa/main/condrender.c new file mode 100644 index 000000000..8d9a91d54 --- /dev/null +++ b/mesalib/src/mesa/main/condrender.c @@ -0,0 +1,147 @@ +/* + * Mesa 3-D graphics library + * Version: 7.8 + * + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * 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. + */ + +/** + * \file condrender.c + * Conditional rendering functions + * + * \author Brian Paul + */ + +#include "glheader.h" +#include "condrender.h" +#include "enums.h" +#include "queryobj.h" + + +void GLAPIENTRY +_mesa_BeginConditionalRender(GLuint queryId, GLenum mode) +{ + struct gl_query_object *q; + GET_CURRENT_CONTEXT(ctx); + + if (!ctx->Extensions.NV_conditional_render || ctx->Query.CondRenderQuery) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()"); + return; + } + + ASSERT(ctx->Query.CondRenderMode == GL_NONE); + + switch (mode) { + case GL_QUERY_WAIT: + case GL_QUERY_NO_WAIT: + case GL_QUERY_BY_REGION_WAIT: + case GL_QUERY_BY_REGION_NO_WAIT: + /* OK */ + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glBeginConditionalRender(mode=%s)", + _mesa_lookup_enum_by_nr(mode)); + return; + } + + q = _mesa_lookup_query_object(ctx, queryId); + if (!q) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glBeginConditionalRender(bad queryId=%u)", queryId); + return; + } + ASSERT(q->Id == queryId); + + if (q->Target != GL_SAMPLES_PASSED) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()"); + return; + } + + ctx->Query.CondRenderQuery = q; + ctx->Query.CondRenderMode = mode; + + if (ctx->Driver.BeginConditionalRender) + ctx->Driver.BeginConditionalRender(ctx, q, mode); +} + + +void APIENTRY +_mesa_EndConditionalRender(void) +{ + GET_CURRENT_CONTEXT(ctx); + + FLUSH_VERTICES(ctx, 0x0); + + if (!ctx->Extensions.NV_conditional_render || !ctx->Query.CondRenderQuery) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glEndConditionalRender()"); + return; + } + + if (ctx->Driver.EndConditionalRender) + ctx->Driver.EndConditionalRender(ctx, ctx->Query.CondRenderQuery); + + ctx->Query.CondRenderQuery = NULL; + ctx->Query.CondRenderMode = GL_NONE; +} + + +/** + * This function is called by software rendering commands (all point, + * line triangle drawing, glClear, glDrawPixels, glCopyPixels, and + * glBitmap, glBlitFramebuffer) to determine if subsequent drawing + * commands should be + * executed or discarded depending on the current conditional + * rendering state. Ideally, this check would be implemented by the + * GPU when doing hardware rendering. XXX should this function be + * called via a new driver hook? + * + * \return GL_TRUE if we should render, GL_FALSE if we should discard + */ +GLboolean +_mesa_check_conditional_render(GLcontext *ctx) +{ + struct gl_query_object *q = ctx->Query.CondRenderQuery; + + if (!q) { + /* no query in progress - draw normally */ + return GL_TRUE; + } + + switch (ctx->Query.CondRenderMode) { + case GL_QUERY_BY_REGION_WAIT: + /* fall-through */ + case GL_QUERY_WAIT: + if (!q->Ready) { + ctx->Driver.WaitQuery(ctx, q); + } + return q->Result > 0; + case GL_QUERY_BY_REGION_NO_WAIT: + /* fall-through */ + case GL_QUERY_NO_WAIT: + return q->Ready ? (q->Result > 0) : GL_TRUE; + default: + _mesa_problem(ctx, "Bad cond render mode %s in " + " _mesa_check_conditional_render()", + _mesa_lookup_enum_by_nr(ctx->Query.CondRenderMode)); + return GL_TRUE; + } +} diff --git a/mesalib/src/mesa/main/condrender.h b/mesalib/src/mesa/main/condrender.h new file mode 100644 index 000000000..d55e9805f --- /dev/null +++ b/mesalib/src/mesa/main/condrender.h @@ -0,0 +1,45 @@ +/* + * Mesa 3-D graphics library + * Version: 7.8 + * + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * 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. + */ + +#ifndef CONDRENDER_H +#define CONDRENDER_H + + +#include "glheader.h" +#include "context.h" + + +extern void GLAPIENTRY +_mesa_BeginConditionalRender(GLuint queryId, GLenum mode); + +extern void APIENTRY +_mesa_EndConditionalRender(void); + +extern GLboolean +_mesa_check_conditional_render(GLcontext *ctx); + + +#endif /* CONDRENDER_H */ diff --git a/mesalib/src/mesa/main/config.h b/mesalib/src/mesa/main/config.h index c5048970c..2eac1cc2e 100644 --- a/mesalib/src/mesa/main/config.h +++ b/mesalib/src/mesa/main/config.h @@ -243,7 +243,8 @@ /*@{*/ #define MAX_VERTEX_GENERIC_ATTRIBS 16 #define MAX_VERTEX_TEXTURE_IMAGE_UNITS MAX_TEXTURE_IMAGE_UNITS -#define MAX_COMBINED_TEXTURE_IMAGE_UNITS MAX_TEXTURE_IMAGE_UNITS +#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_VERTEX_TEXTURE_IMAGE_UNITS + \ + MAX_TEXTURE_IMAGE_UNITS) /*@}*/ diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index 87eae9663..73126b957 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -93,13 +93,11 @@ #include "depth.h" #include "dlist.h" #include "eval.h" -#include "enums.h" #include "extensions.h" #include "fbobject.h" #include "feedback.h" #include "fog.h" #include "framebuffer.h" -#include "get.h" #include "histogram.h" #include "hint.h" #include "hash.h" @@ -124,8 +122,6 @@ #include "state.h" #include "stencil.h" #include "texcompress_s3tc.h" -#include "teximage.h" -#include "texobj.h" #include "texstate.h" #include "mtypes.h" #include "varray.h" @@ -137,9 +133,6 @@ #include "shader/program.h" #include "shader/prog_print.h" #include "shader/shader_api.h" -#if FEATURE_ATI_fragment_shader -#include "shader/atifragshader.h" -#endif #if _HAVE_FULL_GL #include "math/m_matrix.h" #endif @@ -191,7 +184,6 @@ _mesa_notifySwapBuffers(__GLcontext *ctx) * Allocates a GLvisual structure and initializes it via * _mesa_initialize_visual(). * - * \param rgbFlag GL_TRUE for RGB(A) mode, GL_FALSE for Color Index mode. * \param dbFlag double buffering * \param stereoFlag stereo buffer * \param depthBits requested bits per depth buffer value. Any value in [0, 32] @@ -213,14 +205,12 @@ _mesa_notifySwapBuffers(__GLcontext *ctx) * \note Need to add params for level and numAuxBuffers (at least) */ GLvisual * -_mesa_create_visual( GLboolean rgbFlag, - GLboolean dbFlag, +_mesa_create_visual( GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, - GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, @@ -229,15 +219,15 @@ _mesa_create_visual( GLboolean rgbFlag, GLint accumAlphaBits, GLint numSamples ) { - GLvisual *vis = (GLvisual *) _mesa_calloc(sizeof(GLvisual)); + GLvisual *vis = (GLvisual *) calloc(1, sizeof(GLvisual)); if (vis) { - if (!_mesa_initialize_visual(vis, rgbFlag, dbFlag, stereoFlag, + if (!_mesa_initialize_visual(vis, dbFlag, stereoFlag, redBits, greenBits, blueBits, alphaBits, - indexBits, depthBits, stencilBits, + depthBits, stencilBits, accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits, numSamples)) { - _mesa_free(vis); + free(vis); return NULL; } } @@ -255,14 +245,12 @@ _mesa_create_visual( GLboolean rgbFlag, */ GLboolean _mesa_initialize_visual( GLvisual *vis, - GLboolean rgbFlag, GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, - GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, @@ -284,7 +272,7 @@ _mesa_initialize_visual( GLvisual *vis, assert(accumBlueBits >= 0); assert(accumAlphaBits >= 0); - vis->rgbMode = rgbFlag; + vis->rgbMode = GL_TRUE; vis->doubleBufferMode = dbFlag; vis->stereoMode = stereoFlag; @@ -294,7 +282,7 @@ _mesa_initialize_visual( GLvisual *vis, vis->alphaBits = alphaBits; vis->rgbBits = redBits + greenBits + blueBits; - vis->indexBits = indexBits; + vis->indexBits = 0; vis->depthBits = depthBits; vis->stencilBits = stencilBits; @@ -327,7 +315,7 @@ _mesa_initialize_visual( GLvisual *vis, void _mesa_destroy_visual( GLvisual *vis ) { - _mesa_free(vis); + free(vis); } /*@}*/ @@ -415,14 +403,6 @@ one_time_init( GLcontext *ctx ) _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F; } - if (_mesa_getenv("MESA_DEBUG")) { - _glapi_noop_enable_warnings(GL_TRUE); - _glapi_set_warning_func( (_glapi_warning_func) _mesa_warning ); - } - else { - _glapi_noop_enable_warnings(GL_FALSE); - } - #if defined(DEBUG) && defined(__DATE__) && defined(__TIME__) _mesa_debug(ctx, "Mesa %s DEBUG build %s %s\n", MESA_VERSION_STRING, __DATE__, __TIME__); @@ -510,12 +490,6 @@ _mesa_init_constants(GLcontext *ctx) { assert(ctx); - assert(MAX_TEXTURE_LEVELS >= MAX_3D_TEXTURE_LEVELS); - assert(MAX_TEXTURE_LEVELS >= MAX_CUBE_TEXTURE_LEVELS); - - /* Max texture size should be <= max viewport size (render to texture) */ - assert((1 << (MAX_TEXTURE_LEVELS - 1)) <= MAX_WIDTH); - /* Constants, may be overriden (usually only reduced) by device drivers */ ctx->Const.MaxTextureLevels = MAX_TEXTURE_LEVELS; ctx->Const.Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS; @@ -571,6 +545,7 @@ _mesa_init_constants(GLcontext *ctx) #if FEATURE_ARB_vertex_shader ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS; + ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS; ctx->Const.MaxVarying = MAX_VARYING; #endif @@ -585,23 +560,6 @@ _mesa_init_constants(GLcontext *ctx) /* GL_EXT_provoking_vertex */ ctx->Const.QuadsFollowProvokingVertexConvention = GL_TRUE; - - /* sanity checks */ - ASSERT(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.MaxTextureImageUnits, - ctx->Const.MaxTextureCoordUnits)); - ASSERT(ctx->Const.FragmentProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS); - ASSERT(ctx->Const.VertexProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS); - - ASSERT(MAX_NV_FRAGMENT_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS); - ASSERT(MAX_NV_VERTEX_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS); - ASSERT(MAX_NV_VERTEX_PROGRAM_INPUTS <= VERT_ATTRIB_MAX); - ASSERT(MAX_NV_VERTEX_PROGRAM_OUTPUTS <= VERT_RESULT_MAX); - - /* check that we don't exceed the size of various bitfields */ - ASSERT(VERT_RESULT_MAX <= - (8 * sizeof(ctx->VertexProgram._Current->Base.OutputsWritten))); - ASSERT(FRAG_ATTRIB_MAX <= - (8 * sizeof(ctx->FragmentProgram._Current->Base.InputsRead))); } @@ -612,17 +570,41 @@ _mesa_init_constants(GLcontext *ctx) static void check_context_limits(GLcontext *ctx) { - /* Many context limits/constants are limited by the size of - * internal arrays. - */ + /* check that we don't exceed the size of various bitfields */ + assert(VERT_RESULT_MAX <= + (8 * sizeof(ctx->VertexProgram._Current->Base.OutputsWritten))); + assert(FRAG_ATTRIB_MAX <= + (8 * sizeof(ctx->FragmentProgram._Current->Base.InputsRead))); + + assert(MAX_COMBINED_TEXTURE_IMAGE_UNITS <= 8 * sizeof(GLbitfield)); + + /* shader-related checks */ + assert(ctx->Const.FragmentProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS); + assert(ctx->Const.VertexProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS); + + assert(MAX_NV_FRAGMENT_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS); + assert(MAX_NV_VERTEX_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS); + assert(MAX_NV_VERTEX_PROGRAM_INPUTS <= VERT_ATTRIB_MAX); + assert(MAX_NV_VERTEX_PROGRAM_OUTPUTS <= VERT_RESULT_MAX); + + /* Texture unit checks */ + assert(ctx->Const.MaxTextureImageUnits > 0); assert(ctx->Const.MaxTextureImageUnits <= MAX_TEXTURE_IMAGE_UNITS); + assert(ctx->Const.MaxTextureCoordUnits > 0); assert(ctx->Const.MaxTextureCoordUnits <= MAX_TEXTURE_COORD_UNITS); + assert(ctx->Const.MaxTextureUnits > 0); assert(ctx->Const.MaxTextureUnits <= MAX_TEXTURE_IMAGE_UNITS); assert(ctx->Const.MaxTextureUnits <= MAX_TEXTURE_COORD_UNITS); - + assert(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.MaxTextureImageUnits, + ctx->Const.MaxTextureCoordUnits)); + assert(ctx->Const.MaxCombinedTextureImageUnits > 0); + assert(ctx->Const.MaxCombinedTextureImageUnits <= MAX_COMBINED_TEXTURE_IMAGE_UNITS); + assert(ctx->Const.MaxTextureCoordUnits <= MAX_COMBINED_TEXTURE_IMAGE_UNITS); /* number of coord units cannot be greater than number of image units */ assert(ctx->Const.MaxTextureCoordUnits <= ctx->Const.MaxTextureImageUnits); + + /* Texture size checks */ assert(ctx->Const.MaxTextureLevels <= MAX_TEXTURE_LEVELS); assert(ctx->Const.Max3DTextureLevels <= MAX_3D_TEXTURE_LEVELS); assert(ctx->Const.MaxCubeTextureLevels <= MAX_CUBE_TEXTURE_LEVELS); @@ -633,6 +615,13 @@ check_context_limits(GLcontext *ctx) assert((1 << (ctx->Const.MaxCubeTextureLevels - 1)) <= MAX_WIDTH); assert((1 << (ctx->Const.Max3DTextureLevels - 1)) <= MAX_WIDTH); + /* Texture level checks */ + assert(MAX_TEXTURE_LEVELS >= MAX_3D_TEXTURE_LEVELS); + assert(MAX_TEXTURE_LEVELS >= MAX_CUBE_TEXTURE_LEVELS); + + /* Max texture size should be <= max viewport size (render to texture) */ + assert((1 << (MAX_TEXTURE_LEVELS - 1)) <= MAX_WIDTH); + assert(ctx->Const.MaxViewportWidth <= MAX_WIDTH); assert(ctx->Const.MaxViewportHeight <= MAX_WIDTH); @@ -761,7 +750,7 @@ alloc_dispatch_table(void) GLint numEntries = MAX2(_glapi_get_dispatch_table_size(), sizeof(struct _glapi_table) / sizeof(_glapi_proc)); struct _glapi_table *table = - (struct _glapi_table *) _mesa_malloc(numEntries * sizeof(_glapi_proc)); + (struct _glapi_table *) malloc(numEntries * sizeof(_glapi_proc)); if (table) { _glapi_proc *entry = (_glapi_proc *) table; GLint i; @@ -846,7 +835,7 @@ _mesa_initialize_context(GLcontext *ctx, _glthread_UNLOCK_MUTEX(shared->Mutex); if (!init_attrib_groups( ctx )) { - _mesa_free_shared_state(ctx, ctx->Shared); + _mesa_release_shared_state(ctx, ctx->Shared); return GL_FALSE; } @@ -854,9 +843,9 @@ _mesa_initialize_context(GLcontext *ctx, ctx->Exec = alloc_dispatch_table(); ctx->Save = alloc_dispatch_table(); if (!ctx->Exec || !ctx->Save) { - _mesa_free_shared_state(ctx, ctx->Shared); + _mesa_release_shared_state(ctx, ctx->Shared); if (ctx->Exec) - _mesa_free(ctx->Exec); + free(ctx->Exec); return GL_FALSE; } #if FEATURE_dispatch @@ -919,7 +908,7 @@ _mesa_create_context(const GLvisual *visual, ASSERT(visual); /*ASSERT(driverContext);*/ - ctx = (GLcontext *) _mesa_calloc(sizeof(GLcontext)); + ctx = (GLcontext *) calloc(1, sizeof(GLcontext)); if (!ctx) return NULL; @@ -928,7 +917,7 @@ _mesa_create_context(const GLvisual *visual, return ctx; } else { - _mesa_free(ctx); + free(ctx); return NULL; } } @@ -944,8 +933,6 @@ _mesa_create_context(const GLvisual *visual, void _mesa_free_context_data( GLcontext *ctx ) { - GLint RefCount; - if (!_mesa_get_current_context()){ /* No current context, but we may need one in order to delete * texture objs, etc. So temporarily bind the context now. @@ -968,6 +955,7 @@ _mesa_free_context_data( GLcontext *ctx ) _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL); _mesa_free_attrib_data(ctx); + _mesa_free_buffer_objects(ctx); _mesa_free_lighting_data( ctx ); _mesa_free_eval_data( ctx ); _mesa_free_texture_data( ctx ); @@ -987,6 +975,7 @@ _mesa_free_context_data( GLcontext *ctx ) #if FEATURE_ARB_pixel_buffer_object _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, NULL); _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, NULL); + _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj, NULL); #endif #if FEATURE_ARB_vertex_buffer_object @@ -995,24 +984,20 @@ _mesa_free_context_data( GLcontext *ctx ) #endif /* free dispatch tables */ - _mesa_free(ctx->Exec); - _mesa_free(ctx->Save); + free(ctx->Exec); + free(ctx->Save); /* Shared context state (display lists, textures, etc) */ - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - RefCount = --ctx->Shared->RefCount; - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - assert(RefCount >= 0); - if (RefCount == 0) { - /* free shared state */ - _mesa_free_shared_state( ctx, ctx->Shared ); - } + _mesa_release_shared_state( ctx, ctx->Shared ); /* needs to be after freeing shared state */ _mesa_free_display_list_data(ctx); if (ctx->Extensions.String) - _mesa_free((void *) ctx->Extensions.String); + free((void *) ctx->Extensions.String); + + if (ctx->VersionString) + free(ctx->VersionString); /* unbind the context if it's currently bound */ if (ctx == _mesa_get_current_context()) { @@ -1033,7 +1018,7 @@ _mesa_destroy_context( GLcontext *ctx ) { if (ctx) { _mesa_free_context_data(ctx); - _mesa_free( (void *) ctx ); + free( (void *) ctx ); } } @@ -1118,7 +1103,7 @@ _mesa_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask ) dst->Polygon = src->Polygon; } if (mask & GL_POLYGON_STIPPLE_BIT) { - /* Use loop instead of MEMCPY due to problem with Portland Group's + /* Use loop instead of memcpy due to problem with Portland Group's * C compiler. Reported by John Stone. */ GLuint i; @@ -1179,8 +1164,6 @@ check_compatible(const GLcontext *ctx, const GLframebuffer *buffer) if (ctxvis == bufvis) return GL_TRUE; - if (ctxvis->rgbMode != bufvis->rgbMode) - return GL_FALSE; #if 0 /* disabling this fixes the fgl_glxgears pbuffer demo */ if (ctxvis->doubleBufferMode && !bufvis->doubleBufferMode) @@ -1373,6 +1356,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer, } if (newCtx->FirstTimeCurrent) { + _mesa_compute_version(newCtx); + check_context_limits(newCtx); /* We can use this to help debug user's problems. Tell them to set @@ -1403,7 +1388,6 @@ _mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare) { if (ctx && ctxToShare && ctx->Shared && ctxToShare->Shared) { struct gl_shared_state *oldSharedState = ctx->Shared; - GLint RefCount; ctx->Shared = ctxToShare->Shared; @@ -1413,13 +1397,7 @@ _mesa_share_state(GLcontext *ctx, GLcontext *ctxToShare) update_default_objects(ctx); - _glthread_LOCK_MUTEX(oldSharedState->Mutex); - RefCount = --oldSharedState->RefCount; - _glthread_UNLOCK_MUTEX(oldSharedState->Mutex); - - if (RefCount == 0) { - _mesa_free_shared_state(ctx, oldSharedState); - } + _mesa_release_shared_state(ctx, oldSharedState); return GL_TRUE; } @@ -1580,6 +1558,10 @@ _mesa_set_mvp_with_dp4( GLcontext *ctx, GLboolean _mesa_valid_to_render(GLcontext *ctx, const char *where) { + /* This depends on having up to date derived state (shaders) */ + if (ctx->NewState) + _mesa_update_state(ctx); + if (ctx->Shader.CurrentProgram) { /* using shaders */ if (!ctx->Shader.CurrentProgram->LinkStatus) { diff --git a/mesalib/src/mesa/main/context.h b/mesalib/src/mesa/main/context.h index c3be1063f..09bf1777d 100644 --- a/mesalib/src/mesa/main/context.h +++ b/mesalib/src/mesa/main/context.h @@ -60,14 +60,12 @@ struct _glapi_table; /*@{*/ extern GLvisual * -_mesa_create_visual( GLboolean rgbFlag, - GLboolean dbFlag, +_mesa_create_visual( GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, - GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, @@ -78,14 +76,12 @@ _mesa_create_visual( GLboolean rgbFlag, extern GLboolean _mesa_initialize_visual( GLvisual *v, - GLboolean rgbFlag, GLboolean dbFlag, GLboolean stereoFlag, GLint redBits, GLint greenBits, GLint blueBits, GLint alphaBits, - GLint indexBits, GLint depthBits, GLint stencilBits, GLint accumRedBits, diff --git a/mesalib/src/mesa/main/convolve.c b/mesalib/src/mesa/main/convolve.c index 8db3e79d3..15e8dffc2 100644 --- a/mesalib/src/mesa/main/convolve.c +++ b/mesalib/src/mesa/main/convolve.c @@ -38,9 +38,8 @@ #include "context.h" #include "image.h" #include "mtypes.h" -#include "pixel.h" #include "state.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_convolve diff --git a/mesalib/src/mesa/main/cpuinfo.c b/mesalib/src/mesa/main/cpuinfo.c index b4bfb40eb..35de69b18 100644 --- a/mesalib/src/mesa/main/cpuinfo.c +++ b/mesalib/src/mesa/main/cpuinfo.c @@ -43,7 +43,7 @@ _mesa_get_cpu_features(void) /** * Return a string describing the CPU architexture and extensions that * Mesa is using (such as SSE or Altivec). - * \return information string, free it with _mesa_free() + * \return information string, free it with free() */ char * _mesa_get_cpu_string(void) @@ -51,7 +51,7 @@ _mesa_get_cpu_string(void) #define MAX_STRING 50 char *buffer; - buffer = (char *) _mesa_malloc(MAX_STRING); + buffer = (char *) malloc(MAX_STRING); if (!buffer) return NULL; @@ -103,7 +103,7 @@ _mesa_get_cpu_string(void) #endif - assert(_mesa_strlen(buffer) < MAX_STRING); + assert(strlen(buffer) < MAX_STRING); return buffer; } diff --git a/mesalib/src/mesa/main/dd.h b/mesalib/src/mesa/main/dd.h index 27ed92176..7c02faaa5 100644 --- a/mesalib/src/mesa/main/dd.h +++ b/mesalib/src/mesa/main/dd.h @@ -182,7 +182,7 @@ struct dd_function_table { * * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback * functions. The driver should examine \p internalFormat and return a - * pointer to an appropriate gl_texture_format. + * gl_format value. */ GLuint (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat, GLenum srcFormat, GLenum srcType ); @@ -537,11 +537,6 @@ struct dd_function_table { GLboolean (*IsTextureResident)( GLcontext *ctx, struct gl_texture_object *t ); - /** - * Called by glActiveTextureARB() to set current texture unit. - */ - void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber ); - /** * Called when the texture's color lookup table is changed. * @@ -586,9 +581,13 @@ struct dd_function_table { struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id); /** Delete a program */ void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog); - /** Notify driver that a program string has been specified. */ - void (*ProgramStringNotify)(GLcontext *ctx, GLenum target, - struct gl_program *prog); + /** + * Notify driver that a program string (and GPU code) has been specified + * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is + * supported by the driver. + */ + GLboolean (*ProgramStringNotify)(GLcontext *ctx, GLenum target, + struct gl_program *prog); /** Query if program can be loaded onto hardware */ GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target, @@ -621,8 +620,6 @@ struct dd_function_table { void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]); /** Specify the clear value for the depth buffer */ void (*ClearDepth)(GLcontext *ctx, GLclampd d); - /** Specify the clear value for the color index buffers */ - void (*ClearIndex)(GLcontext *ctx, GLuint index); /** Specify the clear value for the stencil buffer */ void (*ClearStencil)(GLcontext *ctx, GLint s); /** Specify a plane against which all geometry is clipped */ @@ -630,6 +627,8 @@ struct dd_function_table { /** Enable and disable writing of frame buffer color components */ void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ); + void (*ColorMaskIndexed)(GLcontext *ctx, GLuint buf, GLboolean rmask, + GLboolean gmask, GLboolean bmask, GLboolean amask); /** Cause a material color to track the current color */ void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode); /** Specify whether front- or back-facing facets can be culled */ @@ -652,8 +651,6 @@ struct dd_function_table { void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); /** Specify implementation-specific hints */ void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode); - /** Control the writing of individual bits in the color index buffers */ - void (*IndexMask)(GLcontext *ctx, GLuint mask); /** Set light source parameters. * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already * been transformed to eye-space. @@ -766,19 +763,36 @@ struct dd_function_table { /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access: */ - void * (*MapBufferRange)( GLcontext *ctx, GLenum target, - GLintptr offset, GLsizeiptr length, GLbitfield access, + void * (*MapBufferRange)( GLcontext *ctx, GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access, struct gl_buffer_object *obj); - void (*FlushMappedBufferRange) (GLcontext *ctx, GLenum target, - GLintptr offset, GLsizeiptr length, - struct gl_buffer_object *obj); + void (*FlushMappedBufferRange)(GLcontext *ctx, GLenum target, + GLintptr offset, GLsizeiptr length, + struct gl_buffer_object *obj); GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target, struct gl_buffer_object *obj ); /*@}*/ #endif + /** + * \name Functions for GL_APPLE_object_purgeable + */ +#if FEATURE_APPLE_object_purgeable + /*@{*/ + /* variations on ObjectPurgeable */ + GLenum (*BufferObjectPurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectPurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectPurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option ); + + /* variations on ObjectUnpurgeable */ + GLenum (*BufferObjectUnpurgeable)( GLcontext *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectUnpurgeable)( GLcontext *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectUnpurgeable)( GLcontext *ctx, struct gl_texture_object *obj, GLenum option ); + /*@}*/ +#endif + /** * \name Functions for GL_EXT_framebuffer_object */ @@ -787,7 +801,8 @@ struct dd_function_table { struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name); struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name); void (*BindFramebuffer)(GLcontext *ctx, GLenum target, - struct gl_framebuffer *fb, struct gl_framebuffer *fbread); + struct gl_framebuffer *drawFb, + struct gl_framebuffer *readFb); void (*FramebufferRenderbuffer)(GLcontext *ctx, struct gl_framebuffer *fb, GLenum attachment, @@ -1018,6 +1033,32 @@ struct dd_function_table { GLbitfield, GLuint64); /*@}*/ #endif + + /** GL_NV_conditional_render */ + void (*BeginConditionalRender)(GLcontext *ctx, struct gl_query_object *q, + GLenum mode); + void (*EndConditionalRender)(GLcontext *ctx, struct gl_query_object *q); + +#if FEATURE_OES_draw_texture + /** + * \name GL_OES_draw_texture interface + */ + /*@{*/ + void (*DrawTex)(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, + GLfloat width, GLfloat height); + /*@}*/ +#endif + +#if FEATURE_OES_EGL_image + void (*EGLImageTargetTexture2D)(GLcontext *ctx, GLenum target, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLeglImageOES image_handle); + void (*EGLImageTargetRenderbufferStorage)(GLcontext *ctx, + struct gl_renderbuffer *rb, + void *image_handle); +#endif + }; @@ -1031,7 +1072,7 @@ struct dd_function_table { * These are the initial values to be installed into dispatch by * mesa. If the T&L driver wants to modify the dispatch table * while installed, it must do so itself. It would be possible for - * the vertexformat to install it's own initial values for these + * the vertexformat to install its own initial values for these * functions, but this way there is an obvious list of what is * expected of the driver. * diff --git a/mesalib/src/mesa/main/debug.c b/mesalib/src/mesa/main/debug.c index a42113edc..33b35e03c 100644 --- a/mesalib/src/mesa/main/debug.c +++ b/mesalib/src/mesa/main/debug.c @@ -26,7 +26,6 @@ #include "mtypes.h" #include "attrib.h" #include "colormac.h" -#include "context.h" #include "enums.h" #include "formats.h" #include "hash.h" @@ -35,7 +34,6 @@ #include "get.h" #include "pixelstore.h" #include "readpix.h" -#include "texgetimage.h" #include "texobj.h" @@ -54,7 +52,7 @@ const char *_mesa_prim_name[GL_POLYGON+4] = { "GL_QUAD_STRIP", "GL_POLYGON", "outside begin/end", - "inside unkown primitive", + "inside unknown primitive", "unknown state" }; @@ -208,17 +206,17 @@ static void add_debug_flags( const char *debug ) MESA_VERBOSE = 0x0; for (i = 0; i < Elements(debug_opt); i++) { - if (_mesa_strstr(debug, debug_opt[i].name)) + if (strstr(debug, debug_opt[i].name)) MESA_VERBOSE |= debug_opt[i].flag; } /* Debug flag: */ - if (_mesa_strstr(debug, "flush")) + if (strstr(debug, "flush")) MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH; #if defined(_FPU_GETCW) && defined(_FPU_SETCW) - if (_mesa_strstr(debug, "fpexceptions")) { + if (strstr(debug, "fpexceptions")) { /* raise FP exceptions */ fpu_control_t mask; _FPU_GETCW(mask); @@ -305,7 +303,7 @@ write_texture_image(struct gl_texture_object *texObj, GLubyte *buffer; char s[100]; - buffer = (GLubyte *) _mesa_malloc(img->Width * img->Height + buffer = (GLubyte *) malloc(img->Width * img->Height * img->Depth * 4); store = ctx->Pack; /* save */ @@ -316,14 +314,14 @@ write_texture_image(struct gl_texture_object *texObj, buffer, texObj, img); /* make filename */ - _mesa_sprintf(s, "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face); + sprintf(s, "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face); - _mesa_printf(" Writing image level %u to %s\n", level, s); + printf(" Writing image level %u to %s\n", level, s); write_ppm(s, buffer, img->Width, img->Height, 4, 0, 1, 2, GL_FALSE); ctx->Pack = store; /* restore */ - _mesa_free(buffer); + free(buffer); } } @@ -352,18 +350,18 @@ write_renderbuffer_image(const struct gl_renderbuffer *rb) return; } - buffer = (GLubyte *) _mesa_malloc(rb->Width * rb->Height * 4); + buffer = (GLubyte *) malloc(rb->Width * rb->Height * 4); ctx->Driver.ReadPixels(ctx, 0, 0, rb->Width, rb->Height, format, type, &ctx->DefaultPacking, buffer); /* make filename */ - _mesa_sprintf(s, "/tmp/renderbuffer%u.ppm", rb->Name); + sprintf(s, "/tmp/renderbuffer%u.ppm", rb->Name); - _mesa_printf(" Writing renderbuffer image to %s\n", s); + printf(" Writing renderbuffer image to %s\n", s); write_ppm(s, buffer, rb->Width, rb->Height, 4, 0, 1, 2, GL_TRUE); - _mesa_free(buffer); + free(buffer); } @@ -382,17 +380,17 @@ dump_texture(struct gl_texture_object *texObj, GLuint writeImages) GLboolean written = GL_FALSE; GLuint i, j; - _mesa_printf("Texture %u\n", texObj->Name); - _mesa_printf(" Target %s\n", tex_target_name(texObj->Target)); + printf("Texture %u\n", texObj->Name); + printf(" Target %s\n", tex_target_name(texObj->Target)); for (i = 0; i < MAX_TEXTURE_LEVELS; i++) { for (j = 0; j < numFaces; j++) { struct gl_texture_image *texImg = texObj->Image[j][i]; if (texImg) { - _mesa_printf(" Face %u level %u: %d x %d x %d, format %s at %p\n", - j, i, - texImg->Width, texImg->Height, texImg->Depth, - _mesa_get_format_name(texImg->TexFormat), - texImg->Data); + printf(" Face %u level %u: %d x %d x %d, format %s at %p\n", + j, i, + texImg->Width, texImg->Height, texImg->Depth, + _mesa_get_format_name(texImg->TexFormat), + texImg->Data); if (writeImages == WRITE_ALL || (writeImages == WRITE_ONE && !written)) { write_texture_image(texObj, j, i); @@ -443,9 +441,9 @@ _mesa_dump_textures(GLuint writeImages) static void dump_renderbuffer(const struct gl_renderbuffer *rb, GLboolean writeImage) { - _mesa_printf("Renderbuffer %u: %u x %u IntFormat = %s\n", - rb->Name, rb->Width, rb->Height, - _mesa_lookup_enum_by_nr(rb->InternalFormat)); + printf("Renderbuffer %u: %u x %u IntFormat = %s\n", + rb->Name, rb->Width, rb->Height, + _mesa_lookup_enum_by_nr(rb->InternalFormat)); if (writeImage) { write_renderbuffer_image(rb); } @@ -483,7 +481,7 @@ _mesa_dump_color_buffer(const char *filename) const GLuint h = ctx->DrawBuffer->Height; GLubyte *buf; - buf = (GLubyte *) _mesa_malloc(w * h * 4); + buf = (GLubyte *) malloc(w * h * 4); _mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); _mesa_PixelStorei(GL_PACK_ALIGNMENT, 1); @@ -491,17 +489,17 @@ _mesa_dump_color_buffer(const char *filename) _mesa_ReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, buf); - _mesa_printf("ReadBuffer %p 0x%x DrawBuffer %p 0x%x\n", - ctx->ReadBuffer->_ColorReadBuffer, - ctx->ReadBuffer->ColorReadBuffer, - ctx->DrawBuffer->_ColorDrawBuffers[0], - ctx->DrawBuffer->ColorDrawBuffer[0]); - _mesa_printf("Writing %d x %d color buffer to %s\n", w, h, filename); + printf("ReadBuffer %p 0x%x DrawBuffer %p 0x%x\n", + (void *) ctx->ReadBuffer->_ColorReadBuffer, + ctx->ReadBuffer->ColorReadBuffer, + (void *) ctx->DrawBuffer->_ColorDrawBuffers[0], + ctx->DrawBuffer->ColorDrawBuffer[0]); + printf("Writing %d x %d color buffer to %s\n", w, h, filename); write_ppm(filename, buf, w, h, 4, 0, 1, 2, GL_TRUE); _mesa_PopClientAttrib(); - _mesa_free(buf); + free(buf); } @@ -515,8 +513,8 @@ _mesa_dump_depth_buffer(const char *filename) GLubyte *buf2; GLuint i; - buf = (GLuint *) _mesa_malloc(w * h * 4); /* 4 bpp */ - buf2 = (GLubyte *) _mesa_malloc(w * h * 3); /* 3 bpp */ + buf = (GLuint *) malloc(w * h * 4); /* 4 bpp */ + buf2 = (GLubyte *) malloc(w * h * 3); /* 3 bpp */ _mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); _mesa_PixelStorei(GL_PACK_ALIGNMENT, 1); @@ -531,13 +529,13 @@ _mesa_dump_depth_buffer(const char *filename) buf2[i*3+2] = (buf[i] >> 8) & 0xff; } - _mesa_printf("Writing %d x %d depth buffer to %s\n", w, h, filename); + printf("Writing %d x %d depth buffer to %s\n", w, h, filename); write_ppm(filename, buf2, w, h, 3, 0, 1, 2, GL_TRUE); _mesa_PopClientAttrib(); - _mesa_free(buf); - _mesa_free(buf2); + free(buf); + free(buf2); } @@ -551,8 +549,8 @@ _mesa_dump_stencil_buffer(const char *filename) GLubyte *buf2; GLuint i; - buf = (GLubyte *) _mesa_malloc(w * h); /* 1 bpp */ - buf2 = (GLubyte *) _mesa_malloc(w * h * 3); /* 3 bpp */ + buf = (GLubyte *) malloc(w * h); /* 1 bpp */ + buf2 = (GLubyte *) malloc(w * h * 3); /* 3 bpp */ _mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); _mesa_PixelStorei(GL_PACK_ALIGNMENT, 1); @@ -566,13 +564,13 @@ _mesa_dump_stencil_buffer(const char *filename) buf2[i*3+2] = (buf[i] - 128) * 2; } - _mesa_printf("Writing %d x %d stencil buffer to %s\n", w, h, filename); + printf("Writing %d x %d stencil buffer to %s\n", w, h, filename); write_ppm(filename, buf2, w, h, 3, 0, 1, 2, GL_TRUE); _mesa_PopClientAttrib(); - _mesa_free(buf); - _mesa_free(buf2); + free(buf); + free(buf2); } @@ -589,7 +587,7 @@ _mesa_print_texture(GLcontext *ctx, const struct gl_texture_image *img) const GLubyte *data = (const GLubyte *) img->Data; if (!data) { - _mesa_printf("No texture data\n"); + printf("No texture data\n"); return; } @@ -621,17 +619,17 @@ _mesa_print_texture(GLcontext *ctx, const struct gl_texture_image *img) for (i = 0; i < img->Height; i++) { for (j = 0; j < img->Width; j++) { if (c==1) - _mesa_printf("%02x ", data[0]); + printf("%02x ", data[0]); else if (c==2) - _mesa_printf("%02x%02x ", data[0], data[1]); + printf("%02x%02x ", data[0], data[1]); else if (c==3) - _mesa_printf("%02x%02x%02x ", data[0], data[1], data[2]); + printf("%02x%02x%02x ", data[0], data[1], data[2]); else if (c==4) - _mesa_printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]); + printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]); data += (img->RowStride - img->Width) * c; } /* XXX use img->ImageStride here */ - _mesa_printf("\n"); + printf("\n"); } #endif } diff --git a/mesalib/src/mesa/main/depthstencil.c b/mesalib/src/mesa/main/depthstencil.c index 193c7f825..892520b69 100644 --- a/mesalib/src/mesa/main/depthstencil.c +++ b/mesalib/src/mesa/main/depthstencil.c @@ -25,7 +25,6 @@ #include "glheader.h" #include "imports.h" #include "context.h" -#include "fbobject.h" #include "formats.h" #include "mtypes.h" #include "depthstencil.h" @@ -66,7 +65,7 @@ delete_wrapper(struct gl_renderbuffer *rb) ASSERT(rb->Format == MESA_FORMAT_Z24_S8 || rb->Format == MESA_FORMAT_S8_Z24); _mesa_reference_renderbuffer(&rb->Wrapped, NULL); - _mesa_free(rb); + free(rb); } @@ -819,5 +818,5 @@ _mesa_promote_stencil(GLcontext *ctx, struct gl_renderbuffer *stencilRb) } stencilRb->PutRow(ctx, stencilRb, width, 0, i, depthStencil, NULL); } - _mesa_free(data); + free(data); } diff --git a/mesalib/src/mesa/main/descrip.mms b/mesalib/src/mesa/main/descrip.mms index e49ec65d4..70bc26372 100644 --- a/mesalib/src/mesa/main/descrip.mms +++ b/mesalib/src/mesa/main/descrip.mms @@ -38,7 +38,6 @@ SOURCES =accum.c \ debug.c \ depth.c \ depthstencil.c \ - dispatch.c \ dlist.c \ drawpix.c \ enable.c \ @@ -113,7 +112,6 @@ convolve.obj,\ debug.obj,\ depth.obj,\ depthstencil.obj,\ -dispatch.obj,\ dlist.obj,\ drawpix.obj,\ enable.obj,\ @@ -198,7 +196,6 @@ convolve.obj : convolve.c debug.obj : debug.c depth.obj : depth.c depthstencil.obj : depthstencil.c -dispatch.obj : dispatch.c dlist.obj : dlist.c drawpix.obj : drawpix.c enable.obj : enable.c diff --git a/mesalib/src/mesa/main/dispatch.c b/mesalib/src/mesa/main/dispatch.c deleted file mode 100644 index 97d213e8e..000000000 --- a/mesalib/src/mesa/main/dispatch.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - - -/** - * \file dispatch.c - * - * This file generates all the gl* function entrypoints. This code is not - * used if optimized assembly stubs are available (e.g., using x86/glapi_x86.S - * on IA32 or sparc/glapi_sparc.S on SPARC). - * - * \note - * This file is also used to build the client-side libGL that loads DRI-based - * device drivers. At build-time it is symlinked to src/glx/x11. - * - * \author Brian Paul - */ - -#ifndef GLX_USE_APPLEGL - -#include "main/glheader.h" -#include "main/compiler.h" -#include "glapi/glapi.h" -#include "glapi/glapitable.h" -#include "glapi/glapidispatch.h" -#include "glapi/glthread.h" - - -#if !(defined(USE_X86_ASM) || defined(USE_X86_64_ASM) || defined(USE_SPARC_ASM)) - -#if defined(WIN32) -#define KEYWORD1 GLAPI -#else -#define KEYWORD1 PUBLIC -#endif - -#define KEYWORD2 GLAPIENTRY - -#if defined(USE_MGL_NAMESPACE) -#define NAME(func) mgl##func -#else -#define NAME(func) gl##func -#endif - -#if 0 /* Use this to log GL calls to stdout (for DEBUG only!) */ - -#define F stdout -#define DISPATCH(FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -#else - -#define DISPATCH(FUNC, ARGS, MESSAGE) \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -#endif /* logging */ - - -#ifndef GLAPIENTRY -#define GLAPIENTRY -#endif - -#include "glapi/glapitemp.h" - -#endif /* USE_X86_ASM */ - -#endif /* !GLX_USE_APPLEGL */ diff --git a/mesalib/src/mesa/main/dispatch.h b/mesalib/src/mesa/main/dispatch.h new file mode 100644 index 000000000..27f80a506 --- /dev/null +++ b/mesalib/src/mesa/main/dispatch.h @@ -0,0 +1,37 @@ +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * 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, sub license, + * 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 NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS 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. + */ + +#ifndef _DISPATCH_H +#define _DISPATCH_H + +#ifdef IN_DRI_DRIVER +#define _GLAPI_USE_REMAP_TABLE +#endif + +#include "glapi/glapitable.h" +#include "glapi/glapioffsets.h" +#include "glapi/glapidispatch.h" + +#endif /* _DISPATCH_H */ diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c index b692c335a..43aadb1de 100644 --- a/mesalib/src/mesa/main/dlist.c +++ b/mesalib/src/mesa/main/dlist.c @@ -35,53 +35,30 @@ #include "api_loopback.h" #include "config.h" #include "mfeatures.h" -#include "attrib.h" -#include "blend.h" -#include "buffers.h" #if FEATURE_ARB_vertex_buffer_object #include "bufferobj.h" #endif #include "arrayobj.h" -#include "clip.h" -#include "colortab.h" #include "context.h" -#include "convolve.h" -#include "depth.h" #include "dlist.h" -#include "enable.h" #include "enums.h" #include "eval.h" -#include "extensions.h" -#include "feedback.h" #include "framebuffer.h" -#include "get.h" #include "glapi/glapi.h" #include "hash.h" -#include "histogram.h" #include "image.h" #include "light.h" -#include "lines.h" #include "dlist.h" #include "macros.h" -#include "matrix.h" -#include "pixel.h" -#include "points.h" -#include "polygon.h" #include "queryobj.h" -#include "state.h" -#include "texobj.h" #include "teximage.h" -#include "texstate.h" #include "mtypes.h" #include "varray.h" -#include "vtxfmt.h" #if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program #include "shader/arbprogram.h" -#include "shader/program.h" #endif #if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program #include "shader/nvprogram.h" -#include "shader/program.h" #endif #if FEATURE_ATI_fragment_shader #include "shader/atifragshader.h" @@ -89,7 +66,7 @@ #include "math/m_matrix.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" @@ -218,8 +195,13 @@ typedef enum OPCODE_CLEAR_DEPTH, OPCODE_CLEAR_INDEX, OPCODE_CLEAR_STENCIL, + OPCODE_CLEAR_BUFFER_IV, + OPCODE_CLEAR_BUFFER_UIV, + OPCODE_CLEAR_BUFFER_FV, + OPCODE_CLEAR_BUFFER_FI, OPCODE_CLIP_PLANE, OPCODE_COLOR_MASK, + OPCODE_COLOR_MASK_INDEXED, OPCODE_COLOR_MATERIAL, OPCODE_COLOR_TABLE, OPCODE_COLOR_TABLE_PARAMETER_FV, @@ -244,9 +226,11 @@ typedef enum OPCODE_DEPTH_MASK, OPCODE_DEPTH_RANGE, OPCODE_DISABLE, + OPCODE_DISABLE_INDEXED, OPCODE_DRAW_BUFFER, OPCODE_DRAW_PIXELS, OPCODE_ENABLE, + OPCODE_ENABLE_INDEXED, OPCODE_EVALMESH1, OPCODE_EVALMESH2, OPCODE_FOG, @@ -488,7 +472,7 @@ make_list(GLuint name, GLuint count) { struct gl_display_list *dlist = CALLOC_STRUCT(gl_display_list); dlist->Name = name; - dlist->Head = (Node *) _mesa_malloc(sizeof(Node) * count); + dlist->Head = (Node *) malloc(sizeof(Node) * count); dlist->Head[0].opcode = OPCODE_END_OF_LIST; return dlist; } @@ -573,108 +557,108 @@ _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist) switch (opcode) { /* for some commands, we need to free malloc'd memory */ case OPCODE_MAP1: - _mesa_free(n[6].data); + free(n[6].data); n += InstSize[n[0].opcode]; break; case OPCODE_MAP2: - _mesa_free(n[10].data); + free(n[10].data); n += InstSize[n[0].opcode]; break; case OPCODE_DRAW_PIXELS: - _mesa_free(n[5].data); + free(n[5].data); n += InstSize[n[0].opcode]; break; case OPCODE_BITMAP: - _mesa_free(n[7].data); + free(n[7].data); n += InstSize[n[0].opcode]; break; case OPCODE_COLOR_TABLE: - _mesa_free(n[6].data); + free(n[6].data); n += InstSize[n[0].opcode]; break; case OPCODE_COLOR_SUB_TABLE: - _mesa_free(n[6].data); + free(n[6].data); n += InstSize[n[0].opcode]; break; case OPCODE_CONVOLUTION_FILTER_1D: - _mesa_free(n[6].data); + free(n[6].data); n += InstSize[n[0].opcode]; break; case OPCODE_CONVOLUTION_FILTER_2D: - _mesa_free(n[7].data); + free(n[7].data); n += InstSize[n[0].opcode]; break; case OPCODE_POLYGON_STIPPLE: - _mesa_free(n[1].data); + free(n[1].data); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_IMAGE1D: - _mesa_free(n[8].data); + free(n[8].data); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_IMAGE2D: - _mesa_free(n[9].data); + free(n[9].data); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_IMAGE3D: - _mesa_free(n[10].data); + free(n[10].data); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_SUB_IMAGE1D: - _mesa_free(n[7].data); + free(n[7].data); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_SUB_IMAGE2D: - _mesa_free(n[9].data); + free(n[9].data); n += InstSize[n[0].opcode]; break; case OPCODE_TEX_SUB_IMAGE3D: - _mesa_free(n[11].data); + free(n[11].data); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_IMAGE_1D: - _mesa_free(n[7].data); + free(n[7].data); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_IMAGE_2D: - _mesa_free(n[8].data); + free(n[8].data); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_IMAGE_3D: - _mesa_free(n[9].data); + free(n[9].data); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: - _mesa_free(n[7].data); + free(n[7].data); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: - _mesa_free(n[9].data); + free(n[9].data); n += InstSize[n[0].opcode]; break; case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: - _mesa_free(n[11].data); + free(n[11].data); n += InstSize[n[0].opcode]; break; #if FEATURE_NV_vertex_program case OPCODE_LOAD_PROGRAM_NV: - _mesa_free(n[4].data); /* program string */ + free(n[4].data); /* program string */ n += InstSize[n[0].opcode]; break; case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV: - _mesa_free(n[2].data); /* array of program ids */ + free(n[2].data); /* array of program ids */ n += InstSize[n[0].opcode]; break; #endif #if FEATURE_NV_fragment_program case OPCODE_PROGRAM_NAMED_PARAMETER_NV: - _mesa_free(n[3].data); /* parameter name */ + free(n[3].data); /* parameter name */ n += InstSize[n[0].opcode]; break; #endif #if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program case OPCODE_PROGRAM_STRING_ARB: - _mesa_free(n[4].data); /* program string */ + free(n[4].data); /* program string */ n += InstSize[n[0].opcode]; break; #endif @@ -686,7 +670,7 @@ _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist) case OPCODE_UNIFORM_2IV: case OPCODE_UNIFORM_3IV: case OPCODE_UNIFORM_4IV: - _mesa_free(n[3].data); + free(n[3].data); n += InstSize[n[0].opcode]; break; case OPCODE_UNIFORM_MATRIX22: @@ -698,17 +682,17 @@ _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist) case OPCODE_UNIFORM_MATRIX32: case OPCODE_UNIFORM_MATRIX34: case OPCODE_UNIFORM_MATRIX43: - _mesa_free(n[4].data); + free(n[4].data); n += InstSize[n[0].opcode]; break; case OPCODE_CONTINUE: n = (Node *) n[1].next; - _mesa_free(block); + free(block); block = n; break; case OPCODE_END_OF_LIST: - _mesa_free(block); + free(block); done = GL_TRUE; break; default: @@ -719,7 +703,7 @@ _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist) } } - _mesa_free(dlist); + free(dlist); } @@ -885,7 +869,7 @@ dlist_alloc(GLcontext *ctx, OpCode opcode, GLuint bytes) Node *newblock; n = ctx->ListState.CurrentBlock + ctx->ListState.CurrentPos; n[0].opcode = OPCODE_CONTINUE; - newblock = (Node *) _mesa_malloc(sizeof(Node) * BLOCK_SIZE); + newblock = (Node *) malloc(sizeof(Node) * BLOCK_SIZE); if (!newblock) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "Building display list"); return NULL; @@ -1230,6 +1214,110 @@ save_Clear(GLbitfield mask) } +static void GLAPIENTRY +save_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_IV, 6); + if (n) { + n[1].e = buffer; + n[2].i = drawbuffer; + n[3].i = value[0]; + if (buffer == GL_COLOR) { + n[4].i = value[1]; + n[5].i = value[2]; + n[6].i = value[3]; + } + else { + n[4].i = 0; + n[5].i = 0; + n[6].i = 0; + } + } + if (ctx->ExecuteFlag) { + /*CALL_ClearBufferiv(ctx->Exec, (buffer, drawbuffer, value));*/ + } +} + + +static void GLAPIENTRY +save_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_UIV, 6); + if (n) { + n[1].e = buffer; + n[2].i = drawbuffer; + n[3].ui = value[0]; + if (buffer == GL_COLOR) { + n[4].ui = value[1]; + n[5].ui = value[2]; + n[6].ui = value[3]; + } + else { + n[4].ui = 0; + n[5].ui = 0; + n[6].ui = 0; + } + } + if (ctx->ExecuteFlag) { + /*CALL_ClearBufferuiv(ctx->Exec, (buffer, drawbuffer, value));*/ + } +} + + +static void GLAPIENTRY +save_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_FV, 6); + if (n) { + n[1].e = buffer; + n[2].i = drawbuffer; + n[3].f = value[0]; + if (buffer == GL_COLOR) { + n[4].f = value[1]; + n[5].f = value[2]; + n[6].f = value[3]; + } + else { + n[4].f = 0.0F; + n[5].f = 0.0F; + n[6].f = 0.0F; + } + } + if (ctx->ExecuteFlag) { + /*CALL_ClearBufferuiv(ctx->Exec, (buffer, drawbuffer, value));*/ + } +} + + +static void GLAPIENTRY +save_ClearBufferfi(GLenum buffer, GLint drawbuffer, + GLfloat depth, GLint stencil) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_FI, 4); + if (n) { + n[1].e = buffer; + n[2].i = drawbuffer; + n[3].f = depth; + n[4].i = stencil; + } + if (ctx->ExecuteFlag) { + /*CALL_ClearBufferfi(ctx->Exec, (buffer, drawbuffer, depth, stencil));*/ + } +} + + static void GLAPIENTRY save_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { @@ -1357,6 +1445,27 @@ save_ColorMask(GLboolean red, GLboolean green, } +static void GLAPIENTRY +save_ColorMaskIndexed(GLuint buf, GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_COLOR_MASK_INDEXED, 5); + if (n) { + n[1].ui = buf; + n[2].b = red; + n[3].b = green; + n[4].b = blue; + n[5].b = alpha; + } + if (ctx->ExecuteFlag) { + /*CALL_ColorMaskIndexedEXT(ctx->Exec, (buf, red, green, blue, alpha));*/ + } +} + + static void GLAPIENTRY save_ColorMaterial(GLenum face, GLenum mode) { @@ -1915,6 +2024,23 @@ save_Disable(GLenum cap) } +static void GLAPIENTRY +save_DisableIndexed(GLuint index, GLenum cap) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_DISABLE_INDEXED, 2); + if (n) { + n[1].ui = index; + n[2].e = cap; + } + if (ctx->ExecuteFlag) { + CALL_DisableIndexedEXT(ctx->Exec, (index, cap)); + } +} + + static void GLAPIENTRY save_DrawBuffer(GLenum mode) { @@ -1973,6 +2099,24 @@ save_Enable(GLenum cap) +static void GLAPIENTRY +save_EnableIndexed(GLuint index, GLenum cap) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_ENABLE_INDEXED, 2); + if (n) { + n[1].ui = index; + n[2].e = cap; + } + if (ctx->ExecuteFlag) { + CALL_EnableIndexedEXT(ctx->Exec, (index, cap)); + } +} + + + static void GLAPIENTRY save_EvalMesh1(GLenum mode, GLint i1, GLint i2) { @@ -2768,8 +2912,8 @@ save_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values) if (n) { n[1].e = map; n[2].i = mapsize; - n[3].data = (void *) _mesa_malloc(mapsize * sizeof(GLfloat)); - MEMCPY(n[3].data, (void *) values, mapsize * sizeof(GLfloat)); + n[3].data = (void *) malloc(mapsize * sizeof(GLfloat)); + memcpy(n[3].data, (void *) values, mapsize * sizeof(GLfloat)); } if (ctx->ExecuteFlag) { CALL_PixelMapfv(ctx->Exec, (map, mapsize, values)); @@ -3583,7 +3727,7 @@ save_TexEnvi(GLenum target, GLenum pname, GLint param) { GLfloat p[4]; p[0] = (GLfloat) param; - p[1] = p[2] = p[3] = 0.0; + p[1] = p[2] = p[3] = 0.0F; save_TexEnvfv(target, pname, p); } @@ -3717,7 +3861,7 @@ save_TexParameteri(GLenum target, GLenum pname, GLint param) { GLfloat fparam[4]; fparam[0] = (GLfloat) param; - fparam[1] = fparam[2] = fparam[3] = 0.0; + fparam[1] = fparam[2] = fparam[3] = 0.0F; save_TexParameterfv(target, pname, fparam); } @@ -3727,7 +3871,7 @@ save_TexParameteriv(GLenum target, GLenum pname, const GLint *params) { GLfloat fparam[4]; fparam[0] = (GLfloat) params[0]; - fparam[1] = fparam[2] = fparam[3] = 0.0; + fparam[1] = fparam[2] = fparam[3] = 0.0F; save_TexParameterfv(target, pname, fparam); } @@ -4216,12 +4360,12 @@ save_CompressedTexImage1DARB(GLenum target, GLint level, GLvoid *image; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); /* make copy of image */ - image = _mesa_malloc(imageSize); + image = malloc(imageSize); if (!image) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB"); return; } - MEMCPY(image, data, imageSize); + memcpy(image, data, imageSize); n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7); if (n) { n[1].e = target; @@ -4233,7 +4377,7 @@ save_CompressedTexImage1DARB(GLenum target, GLint level, n[7].data = image; } else if (image) { - _mesa_free(image); + free(image); } if (ctx->ExecuteFlag) { CALL_CompressedTexImage1DARB(ctx->Exec, @@ -4262,12 +4406,12 @@ save_CompressedTexImage2DARB(GLenum target, GLint level, GLvoid *image; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); /* make copy of image */ - image = _mesa_malloc(imageSize); + image = malloc(imageSize); if (!image) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB"); return; } - MEMCPY(image, data, imageSize); + memcpy(image, data, imageSize); n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8); if (n) { n[1].e = target; @@ -4280,7 +4424,7 @@ save_CompressedTexImage2DARB(GLenum target, GLint level, n[8].data = image; } else if (image) { - _mesa_free(image); + free(image); } if (ctx->ExecuteFlag) { CALL_CompressedTexImage2DARB(ctx->Exec, @@ -4309,12 +4453,12 @@ save_CompressedTexImage3DARB(GLenum target, GLint level, GLvoid *image; ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); /* make copy of image */ - image = _mesa_malloc(imageSize); + image = malloc(imageSize); if (!image) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB"); return; } - MEMCPY(image, data, imageSize); + memcpy(image, data, imageSize); n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9); if (n) { n[1].e = target; @@ -4328,7 +4472,7 @@ save_CompressedTexImage3DARB(GLenum target, GLint level, n[9].data = image; } else if (image) { - _mesa_free(image); + free(image); } if (ctx->ExecuteFlag) { CALL_CompressedTexImage3DARB(ctx->Exec, @@ -4352,12 +4496,12 @@ save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); /* make copy of image */ - image = _mesa_malloc(imageSize); + image = malloc(imageSize); if (!image) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage1DARB"); return; } - MEMCPY(image, data, imageSize); + memcpy(image, data, imageSize); n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7); if (n) { n[1].e = target; @@ -4369,7 +4513,7 @@ save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, n[7].data = image; } else if (image) { - _mesa_free(image); + free(image); } if (ctx->ExecuteFlag) { CALL_CompressedTexSubImage1DARB(ctx->Exec, (target, level, xoffset, @@ -4392,12 +4536,12 @@ save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); /* make copy of image */ - image = _mesa_malloc(imageSize); + image = malloc(imageSize); if (!image) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage2DARB"); return; } - MEMCPY(image, data, imageSize); + memcpy(image, data, imageSize); n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9); if (n) { n[1].e = target; @@ -4411,7 +4555,7 @@ save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, n[9].data = image; } else if (image) { - _mesa_free(image); + free(image); } if (ctx->ExecuteFlag) { CALL_CompressedTexSubImage2DARB(ctx->Exec, @@ -4434,12 +4578,12 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); /* make copy of image */ - image = _mesa_malloc(imageSize); + image = malloc(imageSize); if (!image) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage3DARB"); return; } - MEMCPY(image, data, imageSize); + memcpy(image, data, imageSize); n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11); if (n) { n[1].e = target; @@ -4455,7 +4599,7 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, n[11].data = image; } else if (image) { - _mesa_free(image); + free(image); } if (ctx->ExecuteFlag) { CALL_CompressedTexSubImage3DARB(ctx->Exec, @@ -4644,12 +4788,12 @@ save_LoadProgramNV(GLenum target, GLuint id, GLsizei len, n = alloc_instruction(ctx, OPCODE_LOAD_PROGRAM_NV, 4); if (n) { - GLubyte *programCopy = (GLubyte *) _mesa_malloc(len); + GLubyte *programCopy = (GLubyte *) malloc(len); if (!programCopy) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); return; } - _mesa_memcpy(programCopy, program, len); + memcpy(programCopy, program, len); n[1].e = target; n[2].ui = id; n[3].i = len; @@ -4671,12 +4815,12 @@ save_RequestResidentProgramsNV(GLsizei num, const GLuint * ids) n = alloc_instruction(ctx, OPCODE_TRACK_MATRIX_NV, 2); if (n) { - GLuint *idCopy = (GLuint *) _mesa_malloc(num * sizeof(GLuint)); + GLuint *idCopy = (GLuint *) malloc(num * sizeof(GLuint)); if (!idCopy) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glRequestResidentProgramsNV"); return; } - _mesa_memcpy(idCopy, ids, num * sizeof(GLuint)); + memcpy(idCopy, ids, num * sizeof(GLuint)); n[1].i = num; n[2].data = idCopy; } @@ -4842,12 +4986,12 @@ save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, n = alloc_instruction(ctx, OPCODE_PROGRAM_NAMED_PARAMETER_NV, 6); if (n) { - GLubyte *nameCopy = (GLubyte *) _mesa_malloc(len); + GLubyte *nameCopy = (GLubyte *) malloc(len); if (!nameCopy) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramNamedParameter4fNV"); return; } - _mesa_memcpy(nameCopy, name, len); + memcpy(nameCopy, name, len); n[1].ui = id; n[2].i = len; n[3].data = nameCopy; @@ -4941,12 +5085,12 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len, n = alloc_instruction(ctx, OPCODE_PROGRAM_STRING_ARB, 4); if (n) { - GLubyte *programCopy = (GLubyte *) _mesa_malloc(len); + GLubyte *programCopy = (GLubyte *) malloc(len); if (!programCopy) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB"); return; } - _mesa_memcpy(programCopy, string, len); + memcpy(programCopy, string, len); n[1].e = target; n[2].e = format; n[3].i = len; @@ -6055,9 +6199,9 @@ save_Uniform4fARB(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) static void * memdup(const void *src, GLsizei bytes) { - void *b = bytes >= 0 ? _mesa_malloc(bytes) : NULL; + void *b = bytes >= 0 ? malloc(bytes) : NULL; if (b) - _mesa_memcpy(b, src, bytes); + memcpy(b, src, bytes); return b; } @@ -6596,6 +6740,39 @@ execute_list(GLcontext *ctx, GLuint list) case OPCODE_CLEAR: CALL_Clear(ctx->Exec, (n[1].bf)); break; + case OPCODE_CLEAR_BUFFER_IV: + { + GLint value[4]; + value[0] = n[3].i; + value[1] = n[4].i; + value[2] = n[5].i; + value[3] = n[6].i; + /*CALL_ClearBufferiv(ctx->Exec, (n[1].e, n[2].i, value));*/ + } + break; + case OPCODE_CLEAR_BUFFER_UIV: + { + GLuint value[4]; + value[0] = n[3].ui; + value[1] = n[4].ui; + value[2] = n[5].ui; + value[3] = n[6].ui; + /*CALL_ClearBufferiv(ctx->Exec, (n[1].e, n[2].i, value));*/ + } + break; + case OPCODE_CLEAR_BUFFER_FV: + { + GLfloat value[4]; + value[0] = n[3].f; + value[1] = n[4].f; + value[2] = n[5].f; + value[3] = n[6].f; + /*CALL_ClearBufferfv(ctx->Exec, (n[1].e, n[2].i, value));*/ + } + break; + case OPCODE_CLEAR_BUFFER_FI: + /*CALL_ClearBufferfi(ctx->Exec, (n[1].e, n[2].i, n[3].f, n[4].i));*/ + break; case OPCODE_CLEAR_COLOR: CALL_ClearColor(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f)); break; @@ -6624,6 +6801,10 @@ execute_list(GLcontext *ctx, GLuint list) case OPCODE_COLOR_MASK: CALL_ColorMask(ctx->Exec, (n[1].b, n[2].b, n[3].b, n[4].b)); break; + case OPCODE_COLOR_MASK_INDEXED: + CALL_ColorMaskIndexedEXT(ctx->Exec, (n[1].ui, n[2].b, n[3].b, + n[4].b, n[5].b)); + break; case OPCODE_COLOR_MATERIAL: CALL_ColorMaterial(ctx->Exec, (n[1].e, n[2].e)); break; @@ -6766,6 +6947,9 @@ execute_list(GLcontext *ctx, GLuint list) case OPCODE_DISABLE: CALL_Disable(ctx->Exec, (n[1].e)); break; + case OPCODE_DISABLE_INDEXED: + CALL_DisableIndexedEXT(ctx->Exec, (n[1].ui, n[2].e)); + break; case OPCODE_DRAW_BUFFER: CALL_DrawBuffer(ctx->Exec, (n[1].e)); break; @@ -6781,6 +6965,9 @@ execute_list(GLcontext *ctx, GLuint list) case OPCODE_ENABLE: CALL_Enable(ctx->Exec, (n[1].e)); break; + case OPCODE_ENABLE_INDEXED: + CALL_EnableIndexedEXT(ctx->Exec, (n[1].ui, n[2].e)); + break; case OPCODE_EVALMESH1: CALL_EvalMesh1(ctx->Exec, (n[1].e, n[2].i, n[3].i)); break; @@ -7498,7 +7685,7 @@ execute_list(GLcontext *ctx, GLuint list) default: { char msg[1000]; - _mesa_sprintf(msg, "Error in execute_list: opcode=%d", + sprintf(msg, "Error in execute_list: opcode=%d", (int) opcode); _mesa_problem(ctx, msg); } @@ -8540,6 +8727,7 @@ _mesa_init_save_table(struct _glapi_table *table) SET_ClearStencil(table, save_ClearStencil); SET_ClipPlane(table, save_ClipPlane); SET_ColorMask(table, save_ColorMask); + SET_ColorMaskIndexedEXT(table, save_ColorMaskIndexed); SET_ColorMaterial(table, save_ColorMaterial); SET_CopyPixels(table, save_CopyPixels); SET_CullFace(table, save_CullFace); @@ -8548,9 +8736,11 @@ _mesa_init_save_table(struct _glapi_table *table) SET_DepthMask(table, save_DepthMask); SET_DepthRange(table, save_DepthRange); SET_Disable(table, save_Disable); + SET_DisableIndexedEXT(table, save_DisableIndexed); SET_DrawBuffer(table, save_DrawBuffer); SET_DrawPixels(table, save_DrawPixels); SET_Enable(table, save_Enable); + SET_EnableIndexedEXT(table, save_EnableIndexed); SET_EndList(table, _mesa_EndList); SET_EvalMesh1(table, save_EvalMesh1); SET_EvalMesh2(table, save_EvalMesh2); @@ -9094,6 +9284,25 @@ _mesa_init_save_table(struct _glapi_table *table) /* 364. GL_EXT_provoking_vertex */ SET_ProvokingVertexEXT(table, save_ProvokingVertexEXT); + + /* 371. GL_APPLE_object_purgeable */ +#if FEATURE_APPLE_object_purgeable + SET_ObjectPurgeableAPPLE(table, _mesa_ObjectPurgeableAPPLE); + SET_ObjectUnpurgeableAPPLE(table, _mesa_ObjectUnpurgeableAPPLE); +#endif + + /* GL 3.0 */ +#if 0 + SET_ClearBufferiv(table, save_ClearBufferiv); + SET_ClearBufferuiv(table, save_ClearBufferuiv); + SET_ClearBufferfv(table, save_ClearBufferfv); + SET_ClearBufferfi(table, save_ClearBufferfi); +#else + (void) save_ClearBufferiv; + (void) save_ClearBufferuiv; + (void) save_ClearBufferfv; + (void) save_ClearBufferfi; +#endif } @@ -9117,7 +9326,7 @@ print_list(GLcontext *ctx, GLuint list) GLboolean done; if (!islist(ctx, list)) { - _mesa_printf("%u is not a display list ID\n", list); + printf("%u is not a display list ID\n", list); return; } @@ -9127,7 +9336,7 @@ print_list(GLcontext *ctx, GLuint list) n = dlist->Head; - _mesa_printf("START-LIST %u, address %p\n", list, (void *) n); + printf("START-LIST %u, address %p\n", list, (void *) n); done = n ? GL_FALSE : GL_TRUE; while (!done) { @@ -9139,196 +9348,196 @@ print_list(GLcontext *ctx, GLuint list) else { switch (opcode) { case OPCODE_ACCUM: - _mesa_printf("Accum %s %g\n", enum_string(n[1].e), n[2].f); + printf("Accum %s %g\n", enum_string(n[1].e), n[2].f); break; case OPCODE_BITMAP: - _mesa_printf("Bitmap %d %d %g %g %g %g %p\n", n[1].i, n[2].i, + printf("Bitmap %d %d %g %g %g %g %p\n", n[1].i, n[2].i, n[3].f, n[4].f, n[5].f, n[6].f, (void *) n[7].data); break; case OPCODE_CALL_LIST: - _mesa_printf("CallList %d\n", (int) n[1].ui); + printf("CallList %d\n", (int) n[1].ui); break; case OPCODE_CALL_LIST_OFFSET: - _mesa_printf("CallList %d + offset %u = %u\n", (int) n[1].ui, + printf("CallList %d + offset %u = %u\n", (int) n[1].ui, ctx->List.ListBase, ctx->List.ListBase + n[1].ui); break; case OPCODE_COLOR_TABLE_PARAMETER_FV: - _mesa_printf("ColorTableParameterfv %s %s %f %f %f %f\n", + printf("ColorTableParameterfv %s %s %f %f %f %f\n", enum_string(n[1].e), enum_string(n[2].e), n[3].f, n[4].f, n[5].f, n[6].f); break; case OPCODE_COLOR_TABLE_PARAMETER_IV: - _mesa_printf("ColorTableParameteriv %s %s %d %d %d %d\n", + printf("ColorTableParameteriv %s %s %d %d %d %d\n", enum_string(n[1].e), enum_string(n[2].e), n[3].i, n[4].i, n[5].i, n[6].i); break; case OPCODE_DISABLE: - _mesa_printf("Disable %s\n", enum_string(n[1].e)); + printf("Disable %s\n", enum_string(n[1].e)); break; case OPCODE_ENABLE: - _mesa_printf("Enable %s\n", enum_string(n[1].e)); + printf("Enable %s\n", enum_string(n[1].e)); break; case OPCODE_FRUSTUM: - _mesa_printf("Frustum %g %g %g %g %g %g\n", + printf("Frustum %g %g %g %g %g %g\n", n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f); break; case OPCODE_LINE_STIPPLE: - _mesa_printf("LineStipple %d %x\n", n[1].i, (int) n[2].us); + printf("LineStipple %d %x\n", n[1].i, (int) n[2].us); break; case OPCODE_LOAD_IDENTITY: - _mesa_printf("LoadIdentity\n"); + printf("LoadIdentity\n"); break; case OPCODE_LOAD_MATRIX: - _mesa_printf("LoadMatrix\n"); - _mesa_printf(" %8f %8f %8f %8f\n", + printf("LoadMatrix\n"); + printf(" %8f %8f %8f %8f\n", n[1].f, n[5].f, n[9].f, n[13].f); - _mesa_printf(" %8f %8f %8f %8f\n", + printf(" %8f %8f %8f %8f\n", n[2].f, n[6].f, n[10].f, n[14].f); - _mesa_printf(" %8f %8f %8f %8f\n", + printf(" %8f %8f %8f %8f\n", n[3].f, n[7].f, n[11].f, n[15].f); - _mesa_printf(" %8f %8f %8f %8f\n", + printf(" %8f %8f %8f %8f\n", n[4].f, n[8].f, n[12].f, n[16].f); break; case OPCODE_MULT_MATRIX: - _mesa_printf("MultMatrix (or Rotate)\n"); - _mesa_printf(" %8f %8f %8f %8f\n", + printf("MultMatrix (or Rotate)\n"); + printf(" %8f %8f %8f %8f\n", n[1].f, n[5].f, n[9].f, n[13].f); - _mesa_printf(" %8f %8f %8f %8f\n", + printf(" %8f %8f %8f %8f\n", n[2].f, n[6].f, n[10].f, n[14].f); - _mesa_printf(" %8f %8f %8f %8f\n", + printf(" %8f %8f %8f %8f\n", n[3].f, n[7].f, n[11].f, n[15].f); - _mesa_printf(" %8f %8f %8f %8f\n", + printf(" %8f %8f %8f %8f\n", n[4].f, n[8].f, n[12].f, n[16].f); break; case OPCODE_ORTHO: - _mesa_printf("Ortho %g %g %g %g %g %g\n", + printf("Ortho %g %g %g %g %g %g\n", n[1].f, n[2].f, n[3].f, n[4].f, n[5].f, n[6].f); break; case OPCODE_POP_ATTRIB: - _mesa_printf("PopAttrib\n"); + printf("PopAttrib\n"); break; case OPCODE_POP_MATRIX: - _mesa_printf("PopMatrix\n"); + printf("PopMatrix\n"); break; case OPCODE_POP_NAME: - _mesa_printf("PopName\n"); + printf("PopName\n"); break; case OPCODE_PUSH_ATTRIB: - _mesa_printf("PushAttrib %x\n", n[1].bf); + printf("PushAttrib %x\n", n[1].bf); break; case OPCODE_PUSH_MATRIX: - _mesa_printf("PushMatrix\n"); + printf("PushMatrix\n"); break; case OPCODE_PUSH_NAME: - _mesa_printf("PushName %d\n", (int) n[1].ui); + printf("PushName %d\n", (int) n[1].ui); break; case OPCODE_RASTER_POS: - _mesa_printf("RasterPos %g %g %g %g\n", + printf("RasterPos %g %g %g %g\n", n[1].f, n[2].f, n[3].f, n[4].f); break; case OPCODE_ROTATE: - _mesa_printf("Rotate %g %g %g %g\n", + printf("Rotate %g %g %g %g\n", n[1].f, n[2].f, n[3].f, n[4].f); break; case OPCODE_SCALE: - _mesa_printf("Scale %g %g %g\n", n[1].f, n[2].f, n[3].f); + printf("Scale %g %g %g\n", n[1].f, n[2].f, n[3].f); break; case OPCODE_TRANSLATE: - _mesa_printf("Translate %g %g %g\n", n[1].f, n[2].f, n[3].f); + printf("Translate %g %g %g\n", n[1].f, n[2].f, n[3].f); break; case OPCODE_BIND_TEXTURE: - _mesa_printf("BindTexture %s %d\n", + printf("BindTexture %s %d\n", _mesa_lookup_enum_by_nr(n[1].ui), n[2].ui); break; case OPCODE_SHADE_MODEL: - _mesa_printf("ShadeModel %s\n", _mesa_lookup_enum_by_nr(n[1].ui)); + printf("ShadeModel %s\n", _mesa_lookup_enum_by_nr(n[1].ui)); break; case OPCODE_MAP1: - _mesa_printf("Map1 %s %.3f %.3f %d %d\n", + printf("Map1 %s %.3f %.3f %d %d\n", _mesa_lookup_enum_by_nr(n[1].ui), n[2].f, n[3].f, n[4].i, n[5].i); break; case OPCODE_MAP2: - _mesa_printf("Map2 %s %.3f %.3f %.3f %.3f %d %d %d %d\n", + printf("Map2 %s %.3f %.3f %.3f %.3f %d %d %d %d\n", _mesa_lookup_enum_by_nr(n[1].ui), n[2].f, n[3].f, n[4].f, n[5].f, n[6].i, n[7].i, n[8].i, n[9].i); break; case OPCODE_MAPGRID1: - _mesa_printf("MapGrid1 %d %.3f %.3f\n", n[1].i, n[2].f, n[3].f); + printf("MapGrid1 %d %.3f %.3f\n", n[1].i, n[2].f, n[3].f); break; case OPCODE_MAPGRID2: - _mesa_printf("MapGrid2 %d %.3f %.3f, %d %.3f %.3f\n", + printf("MapGrid2 %d %.3f %.3f, %d %.3f %.3f\n", n[1].i, n[2].f, n[3].f, n[4].i, n[5].f, n[6].f); break; case OPCODE_EVALMESH1: - _mesa_printf("EvalMesh1 %d %d\n", n[1].i, n[2].i); + printf("EvalMesh1 %d %d\n", n[1].i, n[2].i); break; case OPCODE_EVALMESH2: - _mesa_printf("EvalMesh2 %d %d %d %d\n", + printf("EvalMesh2 %d %d %d %d\n", n[1].i, n[2].i, n[3].i, n[4].i); break; case OPCODE_ATTR_1F_NV: - _mesa_printf("ATTR_1F_NV attr %d: %f\n", n[1].i, n[2].f); + printf("ATTR_1F_NV attr %d: %f\n", n[1].i, n[2].f); break; case OPCODE_ATTR_2F_NV: - _mesa_printf("ATTR_2F_NV attr %d: %f %f\n", + printf("ATTR_2F_NV attr %d: %f %f\n", n[1].i, n[2].f, n[3].f); break; case OPCODE_ATTR_3F_NV: - _mesa_printf("ATTR_3F_NV attr %d: %f %f %f\n", + printf("ATTR_3F_NV attr %d: %f %f %f\n", n[1].i, n[2].f, n[3].f, n[4].f); break; case OPCODE_ATTR_4F_NV: - _mesa_printf("ATTR_4F_NV attr %d: %f %f %f %f\n", + printf("ATTR_4F_NV attr %d: %f %f %f %f\n", n[1].i, n[2].f, n[3].f, n[4].f, n[5].f); break; case OPCODE_ATTR_1F_ARB: - _mesa_printf("ATTR_1F_ARB attr %d: %f\n", n[1].i, n[2].f); + printf("ATTR_1F_ARB attr %d: %f\n", n[1].i, n[2].f); break; case OPCODE_ATTR_2F_ARB: - _mesa_printf("ATTR_2F_ARB attr %d: %f %f\n", + printf("ATTR_2F_ARB attr %d: %f %f\n", n[1].i, n[2].f, n[3].f); break; case OPCODE_ATTR_3F_ARB: - _mesa_printf("ATTR_3F_ARB attr %d: %f %f %f\n", + printf("ATTR_3F_ARB attr %d: %f %f %f\n", n[1].i, n[2].f, n[3].f, n[4].f); break; case OPCODE_ATTR_4F_ARB: - _mesa_printf("ATTR_4F_ARB attr %d: %f %f %f %f\n", + printf("ATTR_4F_ARB attr %d: %f %f %f %f\n", n[1].i, n[2].f, n[3].f, n[4].f, n[5].f); break; case OPCODE_MATERIAL: - _mesa_printf("MATERIAL %x %x: %f %f %f %f\n", + printf("MATERIAL %x %x: %f %f %f %f\n", n[1].i, n[2].i, n[3].f, n[4].f, n[5].f, n[6].f); break; case OPCODE_BEGIN: - _mesa_printf("BEGIN %x\n", n[1].i); + printf("BEGIN %x\n", n[1].i); break; case OPCODE_END: - _mesa_printf("END\n"); + printf("END\n"); break; case OPCODE_RECTF: - _mesa_printf("RECTF %f %f %f %f\n", n[1].f, n[2].f, n[3].f, + printf("RECTF %f %f %f %f\n", n[1].f, n[2].f, n[3].f, n[4].f); break; case OPCODE_EVAL_C1: - _mesa_printf("EVAL_C1 %f\n", n[1].f); + printf("EVAL_C1 %f\n", n[1].f); break; case OPCODE_EVAL_C2: - _mesa_printf("EVAL_C2 %f %f\n", n[1].f, n[2].f); + printf("EVAL_C2 %f %f\n", n[1].f, n[2].f); break; case OPCODE_EVAL_P1: - _mesa_printf("EVAL_P1 %d\n", n[1].i); + printf("EVAL_P1 %d\n", n[1].i); break; case OPCODE_EVAL_P2: - _mesa_printf("EVAL_P2 %d %d\n", n[1].i, n[2].i); + printf("EVAL_P2 %d %d\n", n[1].i, n[2].i); break; case OPCODE_PROVOKING_VERTEX: - _mesa_printf("ProvokingVertex %s\n", + printf("ProvokingVertex %s\n", _mesa_lookup_enum_by_nr(n[1].ui)); break; @@ -9336,26 +9545,26 @@ print_list(GLcontext *ctx, GLuint list) * meta opcodes/commands */ case OPCODE_ERROR: - _mesa_printf("Error: %s %s\n", + printf("Error: %s %s\n", enum_string(n[1].e), (const char *) n[2].data); break; case OPCODE_CONTINUE: - _mesa_printf("DISPLAY-LIST-CONTINUE\n"); + printf("DISPLAY-LIST-CONTINUE\n"); n = (Node *) n[1].next; break; case OPCODE_END_OF_LIST: - _mesa_printf("END-LIST %u\n", list); + printf("END-LIST %u\n", list); done = GL_TRUE; break; default: if (opcode < 0 || opcode > OPCODE_END_OF_LIST) { - _mesa_printf + printf ("ERROR IN DISPLAY LIST: opcode = %d, address = %p\n", opcode, (void *) n); return; } else { - _mesa_printf("command %d, %u operands\n", opcode, + printf("command %d, %u operands\n", opcode, InstSize[opcode]); } } @@ -9508,7 +9717,7 @@ _mesa_init_display_list(GLcontext *ctx) /* zero-out the instruction size table, just once */ if (!tableInitialized) { - _mesa_bzero(InstSize, sizeof(InstSize)); + memset(InstSize, 0, sizeof(InstSize)); tableInitialized = GL_TRUE; } diff --git a/mesalib/src/mesa/main/dlopen.c b/mesalib/src/mesa/main/dlopen.c index 81e032081..658ac9e40 100644 --- a/mesalib/src/mesa/main/dlopen.c +++ b/mesalib/src/mesa/main/dlopen.c @@ -73,7 +73,7 @@ _mesa_dlsym(void *handle, const char *fname) /* need '_' prefix on symbol names */ char fname2[1000]; fname2[0] = '_'; - _mesa_strncpy(fname2 + 1, fname, 998); + strncpy(fname2 + 1, fname, 998); fname2[999] = 0; return (GenericFunc) dlsym(handle, fname2); #elif defined(_GNU_SOURCE) diff --git a/mesalib/src/mesa/main/drawpix.c b/mesalib/src/mesa/main/drawpix.c index 5d4b53af4..bf36a7e7a 100644 --- a/mesalib/src/mesa/main/drawpix.c +++ b/mesalib/src/mesa/main/drawpix.c @@ -30,10 +30,9 @@ #include "enums.h" #include "feedback.h" #include "framebuffer.h" -#include "image.h" #include "readpix.h" #include "state.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_drawpix @@ -128,7 +127,6 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, _mesa_feedback_vertex( ctx, ctx->Current.RasterPos, ctx->Current.RasterColor, - ctx->Current.RasterIndex, ctx->Current.RasterTexCoords[0] ); } else { @@ -214,7 +212,6 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, _mesa_feedback_vertex( ctx, ctx->Current.RasterPos, ctx->Current.RasterColor, - ctx->Current.RasterIndex, ctx->Current.RasterTexCoords[0] ); } else { @@ -294,7 +291,6 @@ _mesa_Bitmap( GLsizei width, GLsizei height, _mesa_feedback_vertex( ctx, ctx->Current.RasterPos, ctx->Current.RasterColor, - ctx->Current.RasterIndex, ctx->Current.RasterTexCoords[0] ); } else { diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c index 12ce14c5d..f5c88a63e 100644 --- a/mesalib/src/mesa/main/enable.c +++ b/mesalib/src/mesa/main/enable.c @@ -32,7 +32,6 @@ #include "context.h" #include "enable.h" #include "light.h" -#include "macros.h" #include "simple_list.h" #include "mtypes.h" #include "enums.h" @@ -278,10 +277,13 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state) ctx->Eval.AutoNormal = state; break; case GL_BLEND: - if (ctx->Color.BlendEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.BlendEnabled = state; + { + GLbitfield newEnabled = state * ((1 << ctx->Const.MaxDrawBuffers) - 1); + if (newEnabled != ctx->Color.BlendEnabled) { + FLUSH_VERTICES(ctx, _NEW_COLOR); + ctx->Color.BlendEnabled = newEnabled; + } + } break; #if FEATURE_userclip case GL_CLIP_PLANE0: @@ -1020,6 +1022,84 @@ _mesa_Disable( GLenum cap ) } + +/** + * Enable/disable an indexed state var. + */ +void +_mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state) +{ + ASSERT(state == 0 || state == 1); + switch (cap) { + case GL_BLEND: + if (!ctx->Extensions.EXT_draw_buffers2) { + goto bad_cap_error; + } + if (index >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", + state ? "glEnableIndexed" : "glDisableIndexed", index); + return; + } + if (((ctx->Color.BlendEnabled >> index) & 1) != state) { + FLUSH_VERTICES(ctx, _NEW_COLOR); + if (state) + ctx->Color.BlendEnabled |= (1 << index); + else + ctx->Color.BlendEnabled &= ~(1 << index); + } + break; + default: + goto bad_cap_error; + } + return; + +bad_cap_error: + _mesa_error(ctx, GL_INVALID_ENUM, "%s(cap=%s)", + state ? "glEnablei" : "glDisablei", + _mesa_lookup_enum_by_nr(cap)); +} + + +void GLAPIENTRY +_mesa_DisableIndexed( GLenum cap, GLuint index ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + _mesa_set_enablei(ctx, cap, index, GL_FALSE); +} + + +void GLAPIENTRY +_mesa_EnableIndexed( GLenum cap, GLuint index ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + _mesa_set_enablei(ctx, cap, index, GL_TRUE); +} + + +GLboolean GLAPIENTRY +_mesa_IsEnabledIndexed( GLenum cap, GLuint index ) +{ + GET_CURRENT_CONTEXT(ctx); + switch (cap) { + case GL_BLEND: + if (index >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glIsEnabledIndexed(index=%u)", + index); + return GL_FALSE; + } + return (ctx->Color.BlendEnabled >> index) & 1; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabledIndexed(cap=%s)", + _mesa_lookup_enum_by_nr(cap)); + return GL_FALSE; + } +} + + + + #undef CHECK_EXTENSION #define CHECK_EXTENSION(EXTNAME) \ if (!ctx->Extensions.EXTNAME) { \ @@ -1066,7 +1146,7 @@ _mesa_IsEnabled( GLenum cap ) case GL_AUTO_NORMAL: return ctx->Eval.AutoNormal; case GL_BLEND: - return ctx->Color.BlendEnabled; + return ctx->Color.BlendEnabled & 1; /* return state for buffer[0] */ case GL_CLIP_PLANE0: case GL_CLIP_PLANE1: case GL_CLIP_PLANE2: diff --git a/mesalib/src/mesa/main/enable.h b/mesalib/src/mesa/main/enable.h index 25c90b027..24e3181a8 100644 --- a/mesalib/src/mesa/main/enable.h +++ b/mesalib/src/mesa/main/enable.h @@ -47,6 +47,18 @@ _mesa_Enable( GLenum cap ); extern GLboolean GLAPIENTRY _mesa_IsEnabled( GLenum cap ); +extern void +_mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state); + +extern void GLAPIENTRY +_mesa_DisableIndexed( GLenum cap, GLuint index ); + +extern void GLAPIENTRY +_mesa_EnableIndexed( GLenum cap, GLuint index ); + +extern GLboolean GLAPIENTRY +_mesa_IsEnabledIndexed( GLenum cap, GLuint index ); + extern void GLAPIENTRY _mesa_EnableClientState( GLenum cap ); diff --git a/mesalib/src/mesa/main/enums.c b/mesalib/src/mesa/main/enums.c index f9f4bc785..06d51d4e5 100644 --- a/mesalib/src/mesa/main/enums.c +++ b/mesalib/src/mesa/main/enums.c @@ -25,10 +25,10 @@ * SOFTWARE. */ -#include "glheader.h" -#include "mfeatures.h" -#include "enums.h" -#include "imports.h" +#include "main/glheader.h" +#include "main/mfeatures.h" +#include "main/enums.h" +#include "main/imports.h" typedef struct { size_t offset; @@ -145,6 +145,7 @@ LONGSTRING static const char enum_string_table[] = "GL_BUFFER_MAPPED_ARB\0" "GL_BUFFER_MAP_POINTER\0" "GL_BUFFER_MAP_POINTER_ARB\0" + "GL_BUFFER_OBJECT_APPLE\0" "GL_BUFFER_SERIALIZED_MODIFY_APPLE\0" "GL_BUFFER_SIZE\0" "GL_BUFFER_SIZE_ARB\0" @@ -640,6 +641,7 @@ LONGSTRING static const char enum_string_table[] = "GL_GREEN_BIAS\0" "GL_GREEN_BITS\0" "GL_GREEN_SCALE\0" + "GL_HALF_FLOAT\0" "GL_HINT_BIT\0" "GL_HISTOGRAM\0" "GL_HISTOGRAM_ALPHA_SIZE\0" @@ -1319,6 +1321,7 @@ LONGSTRING static const char enum_string_table[] = "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0" "GL_PROXY_TEXTURE_RECTANGLE_ARB\0" "GL_PROXY_TEXTURE_RECTANGLE_NV\0" + "GL_PURGEABLE_APPLE\0" "GL_Q\0" "GL_QUADRATIC_ATTENUATION\0" "GL_QUADS\0" @@ -1326,12 +1329,16 @@ LONGSTRING static const char enum_string_table[] = "GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT\0" "GL_QUAD_MESH_SUN\0" "GL_QUAD_STRIP\0" + "GL_QUERY_BY_REGION_NO_WAIT_NV\0" + "GL_QUERY_BY_REGION_WAIT_NV\0" "GL_QUERY_COUNTER_BITS\0" "GL_QUERY_COUNTER_BITS_ARB\0" + "GL_QUERY_NO_WAIT_NV\0" "GL_QUERY_RESULT\0" "GL_QUERY_RESULT_ARB\0" "GL_QUERY_RESULT_AVAILABLE\0" "GL_QUERY_RESULT_AVAILABLE_ARB\0" + "GL_QUERY_WAIT_NV\0" "GL_R\0" "GL_R3_G3_B2\0" "GL_RASTER_POSITION_UNCLIPPED_IBM\0" @@ -1353,6 +1360,7 @@ LONGSTRING static const char enum_string_table[] = "GL_REFLECTION_MAP\0" "GL_REFLECTION_MAP_ARB\0" "GL_REFLECTION_MAP_NV\0" + "GL_RELEASED_APPLE\0" "GL_RENDER\0" "GL_RENDERBUFFER\0" "GL_RENDERBUFFER_ALPHA_SIZE\0" @@ -1380,6 +1388,7 @@ LONGSTRING static const char enum_string_table[] = "GL_REPLICATE_BORDER_HP\0" "GL_RESCALE_NORMAL\0" "GL_RESCALE_NORMAL_EXT\0" + "GL_RETAINED_APPLE\0" "GL_RETURN\0" "GL_RGB\0" "GL_RGB10\0" @@ -1787,7 +1796,6 @@ LONGSTRING static const char enum_string_table[] = "GL_TEXTURE_WRAP_S\0" "GL_TEXTURE_WRAP_T\0" "GL_TIMEOUT_EXPIRED\0" - "GL_TIMEOUT_IGNORED\0" "GL_TIME_ELAPSED_EXT\0" "GL_TRACK_MATRIX_NV\0" "GL_TRACK_MATRIX_TRANSFORM_NV\0" @@ -1807,6 +1815,7 @@ LONGSTRING static const char enum_string_table[] = "GL_TRIANGLE_MESH_SUN\0" "GL_TRIANGLE_STRIP\0" "GL_TRUE\0" + "GL_UNDEFINED_APPLE\0" "GL_UNPACK_ALIGNMENT\0" "GL_UNPACK_IMAGE_HEIGHT\0" "GL_UNPACK_LSB_FIRST\0" @@ -1899,6 +1908,7 @@ LONGSTRING static const char enum_string_table[] = "GL_VERTEX_STATE_PROGRAM_NV\0" "GL_VIEWPORT\0" "GL_VIEWPORT_BIT\0" + "GL_VOLATILE_APPLE\0" "GL_WAIT_FAILED\0" "GL_WEIGHT_ARRAY_ARB\0" "GL_WEIGHT_ARRAY_BUFFER_BINDING\0" @@ -1919,7 +1929,7 @@ LONGSTRING static const char enum_string_table[] = "GL_ZOOM_Y\0" ; -static const enum_elt all_enums[1881] = +static const enum_elt all_enums[1891] = { { 0, 0x00000600 }, /* GL_2D */ { 6, 0x00001407 }, /* GL_2_BYTES */ @@ -2030,3129 +2040,3149 @@ static const enum_elt all_enums[1881] = { 1755, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */ { 1776, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */ { 1798, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */ - { 1824, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */ - { 1858, 0x00008764 }, /* GL_BUFFER_SIZE */ - { 1873, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */ - { 1892, 0x00008765 }, /* GL_BUFFER_USAGE */ - { 1908, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */ - { 1928, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */ - { 1947, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */ - { 1973, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */ - { 1996, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */ - { 2024, 0x0000877C }, /* GL_BUMP_TARGET_ATI */ - { 2043, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */ - { 2065, 0x00001400 }, /* GL_BYTE */ - { 2073, 0x00002A24 }, /* GL_C3F_V3F */ - { 2084, 0x00002A26 }, /* GL_C4F_N3F_V3F */ - { 2099, 0x00002A22 }, /* GL_C4UB_V2F */ - { 2111, 0x00002A23 }, /* GL_C4UB_V3F */ - { 2123, 0x00000901 }, /* GL_CCW */ - { 2130, 0x00002900 }, /* GL_CLAMP */ - { 2139, 0x0000812D }, /* GL_CLAMP_TO_BORDER */ - { 2158, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */ - { 2181, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */ - { 2205, 0x0000812F }, /* GL_CLAMP_TO_EDGE */ - { 2222, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */ - { 2244, 0x00001500 }, /* GL_CLEAR */ - { 2253, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */ - { 2278, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */ - { 2307, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */ - { 2333, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ - { 2362, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */ - { 2388, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */ - { 2415, 0x00003000 }, /* GL_CLIP_PLANE0 */ - { 2430, 0x00003001 }, /* GL_CLIP_PLANE1 */ - { 2445, 0x00003002 }, /* GL_CLIP_PLANE2 */ - { 2460, 0x00003003 }, /* GL_CLIP_PLANE3 */ - { 2475, 0x00003004 }, /* GL_CLIP_PLANE4 */ - { 2490, 0x00003005 }, /* GL_CLIP_PLANE5 */ - { 2505, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ - { 2538, 0x00000A00 }, /* GL_COEFF */ - { 2547, 0x00001800 }, /* GL_COLOR */ - { 2556, 0x00008076 }, /* GL_COLOR_ARRAY */ - { 2571, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */ - { 2601, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */ - { 2635, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */ - { 2658, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */ - { 2678, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */ - { 2700, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */ - { 2720, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */ - { 2741, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */ - { 2766, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */ - { 2787, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */ - { 2809, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */ - { 2835, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */ - { 2857, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */ - { 2883, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */ - { 2905, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */ - { 2931, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */ - { 2953, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */ - { 2979, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */ - { 3001, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */ - { 3027, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */ - { 3049, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */ - { 3075, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */ - { 3100, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */ - { 3121, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */ - { 3146, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */ - { 3167, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */ - { 3192, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */ - { 3213, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */ - { 3238, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */ - { 3259, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */ - { 3284, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */ - { 3305, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */ - { 3330, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */ - { 3351, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */ - { 3376, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */ - { 3397, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */ - { 3422, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */ - { 3443, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */ - { 3468, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */ - { 3488, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */ - { 3509, 0x00001900 }, /* GL_COLOR_INDEX */ - { 3524, 0x00001603 }, /* GL_COLOR_INDEXES */ - { 3541, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */ - { 3559, 0x00000B57 }, /* GL_COLOR_MATERIAL */ - { 3577, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */ - { 3600, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */ - { 3628, 0x000080B1 }, /* GL_COLOR_MATRIX */ - { 3644, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */ - { 3664, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */ - { 3692, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */ - { 3724, 0x00008458 }, /* GL_COLOR_SUM */ - { 3737, 0x00008458 }, /* GL_COLOR_SUM_ARB */ - { 3754, 0x000080D0 }, /* GL_COLOR_TABLE */ - { 3769, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */ - { 3795, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */ - { 3825, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */ - { 3855, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */ - { 3875, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */ - { 3899, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */ - { 3924, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */ - { 3953, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */ - { 3982, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */ - { 4004, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */ - { 4030, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */ - { 4056, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */ - { 4082, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */ - { 4112, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */ - { 4142, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */ - { 4172, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */ - { 4206, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */ - { 4240, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ - { 4270, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */ - { 4304, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */ - { 4338, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */ - { 4362, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */ - { 4390, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */ - { 4418, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */ - { 4439, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */ - { 4464, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */ - { 4485, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */ - { 4510, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */ - { 4535, 0x00000C23 }, /* GL_COLOR_WRITEMASK */ - { 4554, 0x00008570 }, /* GL_COMBINE */ - { 4565, 0x00008503 }, /* GL_COMBINE4 */ - { 4577, 0x00008572 }, /* GL_COMBINE_ALPHA */ - { 4594, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */ - { 4615, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */ - { 4636, 0x00008570 }, /* GL_COMBINE_ARB */ - { 4651, 0x00008570 }, /* GL_COMBINE_EXT */ - { 4666, 0x00008571 }, /* GL_COMBINE_RGB */ - { 4681, 0x00008571 }, /* GL_COMBINE_RGB_ARB */ - { 4700, 0x00008571 }, /* GL_COMBINE_RGB_EXT */ - { 4719, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */ - { 4755, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */ - { 4779, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */ - { 4807, 0x00001300 }, /* GL_COMPILE */ - { 4818, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */ - { 4841, 0x00008B81 }, /* GL_COMPILE_STATUS */ - { 4859, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */ - { 4879, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */ - { 4903, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */ - { 4927, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */ - { 4955, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */ - { 4979, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */ - { 5009, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */ - { 5043, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */ - { 5071, 0x000084ED }, /* GL_COMPRESSED_RGB */ - { 5089, 0x000084EE }, /* GL_COMPRESSED_RGBA */ - { 5108, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */ - { 5131, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ - { 5160, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ - { 5193, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ - { 5226, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ - { 5259, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */ - { 5281, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */ - { 5309, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ - { 5341, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */ - { 5366, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */ - { 5397, 0x00008C48 }, /* GL_COMPRESSED_SRGB */ - { 5416, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */ - { 5441, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */ - { 5471, 0x0000911C }, /* GL_CONDITION_SATISFIED */ - { 5494, 0x00008576 }, /* GL_CONSTANT */ - { 5506, 0x00008003 }, /* GL_CONSTANT_ALPHA */ - { 5524, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */ - { 5546, 0x00008576 }, /* GL_CONSTANT_ARB */ - { 5562, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */ - { 5586, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */ - { 5608, 0x00008001 }, /* GL_CONSTANT_COLOR */ - { 5626, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */ - { 5648, 0x00008576 }, /* GL_CONSTANT_EXT */ - { 5664, 0x00008010 }, /* GL_CONVOLUTION_1D */ - { 5682, 0x00008011 }, /* GL_CONVOLUTION_2D */ - { 5700, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */ - { 5728, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */ - { 5759, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */ - { 5786, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */ - { 5817, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */ - { 5844, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */ - { 5875, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */ - { 5903, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */ - { 5935, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */ - { 5957, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */ - { 5983, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */ - { 6005, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */ - { 6031, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */ - { 6052, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */ - { 6077, 0x00008862 }, /* GL_COORD_REPLACE */ - { 6094, 0x00008862 }, /* GL_COORD_REPLACE_ARB */ - { 6115, 0x00008862 }, /* GL_COORD_REPLACE_NV */ - { 6135, 0x00001503 }, /* GL_COPY */ - { 6143, 0x0000150C }, /* GL_COPY_INVERTED */ - { 6160, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */ - { 6180, 0x00008F36 }, /* GL_COPY_READ_BUFFER */ - { 6200, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */ - { 6221, 0x00000B44 }, /* GL_CULL_FACE */ - { 6234, 0x00000B45 }, /* GL_CULL_FACE_MODE */ - { 6252, 0x000081AA }, /* GL_CULL_VERTEX_EXT */ - { 6271, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ - { 6303, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ - { 6338, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */ - { 6359, 0x00000001 }, /* GL_CURRENT_BIT */ - { 6374, 0x00000B00 }, /* GL_CURRENT_COLOR */ - { 6391, 0x00008453 }, /* GL_CURRENT_FOG_COORD */ - { 6412, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */ - { 6438, 0x00000B01 }, /* GL_CURRENT_INDEX */ - { 6455, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */ - { 6477, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */ - { 6505, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */ - { 6526, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ - { 6560, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */ - { 6593, 0x00000B02 }, /* GL_CURRENT_NORMAL */ - { 6611, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */ - { 6641, 0x00008B8D }, /* GL_CURRENT_PROGRAM */ - { 6660, 0x00008865 }, /* GL_CURRENT_QUERY */ - { 6677, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */ - { 6698, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */ - { 6722, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */ - { 6749, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */ - { 6773, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */ - { 6800, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */ - { 6833, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */ - { 6867, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ - { 6900, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */ - { 6927, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */ - { 6953, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */ - { 6978, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */ - { 7007, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */ - { 7029, 0x00000900 }, /* GL_CW */ - { 7035, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */ - { 7056, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */ - { 7077, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */ - { 7097, 0x00002101 }, /* GL_DECAL */ - { 7106, 0x00001E03 }, /* GL_DECR */ - { 7114, 0x00008508 }, /* GL_DECR_WRAP */ - { 7127, 0x00008508 }, /* GL_DECR_WRAP_EXT */ - { 7144, 0x00008B80 }, /* GL_DELETE_STATUS */ - { 7161, 0x00001801 }, /* GL_DEPTH */ - { 7170, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */ - { 7190, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */ - { 7214, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */ - { 7234, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */ - { 7258, 0x00000D1F }, /* GL_DEPTH_BIAS */ - { 7272, 0x00000D56 }, /* GL_DEPTH_BITS */ - { 7286, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */ - { 7306, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */ - { 7331, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */ - { 7351, 0x0000864F }, /* GL_DEPTH_CLAMP */ - { 7366, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */ - { 7384, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */ - { 7405, 0x00001902 }, /* GL_DEPTH_COMPONENT */ - { 7424, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */ - { 7445, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */ - { 7470, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */ - { 7496, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */ - { 7517, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */ - { 7542, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */ - { 7568, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */ - { 7589, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */ - { 7614, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */ - { 7640, 0x00000B74 }, /* GL_DEPTH_FUNC */ - { 7654, 0x00000B70 }, /* GL_DEPTH_RANGE */ - { 7669, 0x00000D1E }, /* GL_DEPTH_SCALE */ - { 7684, 0x000084F9 }, /* GL_DEPTH_STENCIL */ - { 7701, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */ - { 7729, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */ - { 7750, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */ - { 7770, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ - { 7798, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ - { 7826, 0x00000B71 }, /* GL_DEPTH_TEST */ - { 7840, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */ - { 7862, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */ - { 7888, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */ - { 7907, 0x00001201 }, /* GL_DIFFUSE */ - { 7918, 0x00000BD0 }, /* GL_DITHER */ - { 7928, 0x00000A02 }, /* GL_DOMAIN */ - { 7938, 0x00001100 }, /* GL_DONT_CARE */ - { 7951, 0x000086AE }, /* GL_DOT3_RGB */ - { 7963, 0x000086AF }, /* GL_DOT3_RGBA */ - { 7976, 0x000086AF }, /* GL_DOT3_RGBA_ARB */ - { 7993, 0x00008741 }, /* GL_DOT3_RGBA_EXT */ - { 8010, 0x000086AE }, /* GL_DOT3_RGB_ARB */ - { 8026, 0x00008740 }, /* GL_DOT3_RGB_EXT */ - { 8042, 0x0000140A }, /* GL_DOUBLE */ - { 8052, 0x00000C32 }, /* GL_DOUBLEBUFFER */ - { 8068, 0x00000C01 }, /* GL_DRAW_BUFFER */ - { 8083, 0x00008825 }, /* GL_DRAW_BUFFER0 */ - { 8099, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */ - { 8119, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */ - { 8139, 0x00008826 }, /* GL_DRAW_BUFFER1 */ - { 8155, 0x0000882F }, /* GL_DRAW_BUFFER10 */ - { 8172, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */ - { 8193, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */ - { 8214, 0x00008830 }, /* GL_DRAW_BUFFER11 */ - { 8231, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */ - { 8252, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */ - { 8273, 0x00008831 }, /* GL_DRAW_BUFFER12 */ - { 8290, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */ - { 8311, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */ - { 8332, 0x00008832 }, /* GL_DRAW_BUFFER13 */ - { 8349, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */ - { 8370, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */ - { 8391, 0x00008833 }, /* GL_DRAW_BUFFER14 */ - { 8408, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */ - { 8429, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */ - { 8450, 0x00008834 }, /* GL_DRAW_BUFFER15 */ - { 8467, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */ - { 8488, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */ - { 8509, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */ - { 8529, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */ - { 8549, 0x00008827 }, /* GL_DRAW_BUFFER2 */ - { 8565, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */ - { 8585, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */ - { 8605, 0x00008828 }, /* GL_DRAW_BUFFER3 */ - { 8621, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */ - { 8641, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */ - { 8661, 0x00008829 }, /* GL_DRAW_BUFFER4 */ - { 8677, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */ - { 8697, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */ - { 8717, 0x0000882A }, /* GL_DRAW_BUFFER5 */ - { 8733, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */ - { 8753, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */ - { 8773, 0x0000882B }, /* GL_DRAW_BUFFER6 */ - { 8789, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */ - { 8809, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */ - { 8829, 0x0000882C }, /* GL_DRAW_BUFFER7 */ - { 8845, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */ - { 8865, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */ - { 8885, 0x0000882D }, /* GL_DRAW_BUFFER8 */ - { 8901, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */ - { 8921, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */ - { 8941, 0x0000882E }, /* GL_DRAW_BUFFER9 */ - { 8957, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */ - { 8977, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */ - { 8997, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */ - { 9017, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */ - { 9045, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */ - { 9077, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */ - { 9101, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */ - { 9121, 0x00000304 }, /* GL_DST_ALPHA */ - { 9134, 0x00000306 }, /* GL_DST_COLOR */ - { 9147, 0x0000877A }, /* GL_DU8DV8_ATI */ - { 9161, 0x00008779 }, /* GL_DUDV_ATI */ - { 9173, 0x000088EA }, /* GL_DYNAMIC_COPY */ - { 9189, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */ - { 9209, 0x000088E8 }, /* GL_DYNAMIC_DRAW */ - { 9225, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */ - { 9245, 0x000088E9 }, /* GL_DYNAMIC_READ */ - { 9261, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */ - { 9281, 0x00000B43 }, /* GL_EDGE_FLAG */ - { 9294, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */ - { 9313, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ - { 9347, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */ - { 9385, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */ - { 9412, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */ - { 9438, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */ - { 9462, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ - { 9494, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */ - { 9530, 0x00001600 }, /* GL_EMISSION */ - { 9542, 0x00002000 }, /* GL_ENABLE_BIT */ - { 9556, 0x00000202 }, /* GL_EQUAL */ - { 9565, 0x00001509 }, /* GL_EQUIV */ - { 9574, 0x00010000 }, /* GL_EVAL_BIT */ - { 9586, 0x00000800 }, /* GL_EXP */ - { 9593, 0x00000801 }, /* GL_EXP2 */ - { 9601, 0x00001F03 }, /* GL_EXTENSIONS */ - { 9615, 0x00002400 }, /* GL_EYE_LINEAR */ - { 9629, 0x00002502 }, /* GL_EYE_PLANE */ - { 9642, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */ - { 9667, 0x0000855B }, /* GL_EYE_RADIAL_NV */ - { 9684, 0x00000000 }, /* GL_FALSE */ - { 9693, 0x00001101 }, /* GL_FASTEST */ - { 9704, 0x00001C01 }, /* GL_FEEDBACK */ - { 9716, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */ - { 9743, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */ - { 9767, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */ - { 9791, 0x00001B02 }, /* GL_FILL */ - { 9799, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */ - { 9826, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */ - { 9857, 0x00001D00 }, /* GL_FLAT */ - { 9865, 0x00001406 }, /* GL_FLOAT */ - { 9874, 0x00008B5A }, /* GL_FLOAT_MAT2 */ - { 9888, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */ - { 9906, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */ - { 9922, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */ - { 9938, 0x00008B5B }, /* GL_FLOAT_MAT3 */ - { 9952, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */ - { 9970, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */ - { 9986, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */ - { 10002, 0x00008B5C }, /* GL_FLOAT_MAT4 */ - { 10016, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */ - { 10034, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */ - { 10050, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */ - { 10066, 0x00008B50 }, /* GL_FLOAT_VEC2 */ - { 10080, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */ - { 10098, 0x00008B51 }, /* GL_FLOAT_VEC3 */ - { 10112, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */ - { 10130, 0x00008B52 }, /* GL_FLOAT_VEC4 */ - { 10144, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */ - { 10162, 0x00000B60 }, /* GL_FOG */ - { 10169, 0x00000080 }, /* GL_FOG_BIT */ - { 10180, 0x00000B66 }, /* GL_FOG_COLOR */ - { 10193, 0x00008451 }, /* GL_FOG_COORD */ - { 10206, 0x00008451 }, /* GL_FOG_COORDINATE */ - { 10224, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */ - { 10248, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ - { 10287, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */ - { 10330, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */ - { 10362, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ - { 10393, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */ - { 10422, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */ - { 10447, 0x00008457 }, /* GL_FOG_COORD_ARRAY */ - { 10466, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */ - { 10500, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */ - { 10527, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */ - { 10553, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */ - { 10577, 0x00008450 }, /* GL_FOG_COORD_SRC */ - { 10594, 0x00000B62 }, /* GL_FOG_DENSITY */ - { 10609, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */ - { 10633, 0x00000B64 }, /* GL_FOG_END */ - { 10644, 0x00000C54 }, /* GL_FOG_HINT */ - { 10656, 0x00000B61 }, /* GL_FOG_INDEX */ - { 10669, 0x00000B65 }, /* GL_FOG_MODE */ - { 10681, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */ - { 10700, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */ - { 10725, 0x00000B63 }, /* GL_FOG_START */ - { 10738, 0x00008452 }, /* GL_FRAGMENT_DEPTH */ - { 10756, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */ - { 10780, 0x00008B30 }, /* GL_FRAGMENT_SHADER */ - { 10799, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */ - { 10822, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */ - { 10857, 0x00008D40 }, /* GL_FRAMEBUFFER */ - { 10872, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ - { 10909, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ - { 10945, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ - { 10986, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ - { 11027, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ - { 11064, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ - { 11101, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ - { 11139, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */ - { 11181, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ - { 11219, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */ - { 11261, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ - { 11296, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ - { 11335, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */ - { 11384, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ - { 11432, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */ - { 11484, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ - { 11524, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ - { 11568, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ - { 11608, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */ - { 11652, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */ - { 11675, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */ - { 11702, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */ - { 11726, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */ - { 11754, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */ - { 11777, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */ - { 11796, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ - { 11833, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */ - { 11874, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ - { 11915, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ - { 11953, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */ - { 11995, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ - { 12046, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ - { 12084, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ - { 12129, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */ - { 12178, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ - { 12216, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */ - { 12258, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ - { 12296, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */ - { 12338, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ - { 12370, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */ - { 12395, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */ - { 12422, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */ - { 12453, 0x00000404 }, /* GL_FRONT */ - { 12462, 0x00000408 }, /* GL_FRONT_AND_BACK */ - { 12480, 0x00000B46 }, /* GL_FRONT_FACE */ - { 12494, 0x00000400 }, /* GL_FRONT_LEFT */ - { 12508, 0x00000401 }, /* GL_FRONT_RIGHT */ - { 12523, 0x00008006 }, /* GL_FUNC_ADD */ - { 12535, 0x00008006 }, /* GL_FUNC_ADD_EXT */ - { 12551, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */ - { 12576, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */ - { 12605, 0x0000800A }, /* GL_FUNC_SUBTRACT */ - { 12622, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */ - { 12643, 0x00008191 }, /* GL_GENERATE_MIPMAP */ - { 12662, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */ - { 12686, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */ - { 12715, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */ - { 12739, 0x00000206 }, /* GL_GEQUAL */ - { 12749, 0x00000204 }, /* GL_GREATER */ - { 12760, 0x00001904 }, /* GL_GREEN */ - { 12769, 0x00000D19 }, /* GL_GREEN_BIAS */ - { 12783, 0x00000D53 }, /* GL_GREEN_BITS */ - { 12797, 0x00000D18 }, /* GL_GREEN_SCALE */ - { 12812, 0x00008000 }, /* GL_HINT_BIT */ - { 12824, 0x00008024 }, /* GL_HISTOGRAM */ - { 12837, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */ - { 12861, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */ - { 12889, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */ - { 12912, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */ - { 12939, 0x00008024 }, /* GL_HISTOGRAM_EXT */ - { 12956, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */ - { 12976, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */ - { 13000, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */ - { 13024, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */ - { 13052, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */ - { 13080, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */ - { 13112, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */ - { 13134, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */ - { 13160, 0x0000802D }, /* GL_HISTOGRAM_SINK */ - { 13178, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */ - { 13200, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */ - { 13219, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */ - { 13242, 0x0000862A }, /* GL_IDENTITY_NV */ - { 13257, 0x00008150 }, /* GL_IGNORE_BORDER_HP */ - { 13277, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ - { 13317, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ - { 13355, 0x00001E02 }, /* GL_INCR */ - { 13363, 0x00008507 }, /* GL_INCR_WRAP */ - { 13376, 0x00008507 }, /* GL_INCR_WRAP_EXT */ - { 13393, 0x00008222 }, /* GL_INDEX */ - { 13402, 0x00008077 }, /* GL_INDEX_ARRAY */ - { 13417, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */ - { 13447, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */ - { 13481, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */ - { 13504, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */ - { 13526, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */ - { 13546, 0x00000D51 }, /* GL_INDEX_BITS */ - { 13560, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */ - { 13581, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */ - { 13599, 0x00000C30 }, /* GL_INDEX_MODE */ - { 13613, 0x00000D13 }, /* GL_INDEX_OFFSET */ - { 13629, 0x00000D12 }, /* GL_INDEX_SHIFT */ - { 13644, 0x00000C21 }, /* GL_INDEX_WRITEMASK */ - { 13663, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */ - { 13682, 0x00001404 }, /* GL_INT */ - { 13689, 0x00008049 }, /* GL_INTENSITY */ - { 13702, 0x0000804C }, /* GL_INTENSITY12 */ - { 13717, 0x0000804C }, /* GL_INTENSITY12_EXT */ - { 13736, 0x0000804D }, /* GL_INTENSITY16 */ - { 13751, 0x0000804D }, /* GL_INTENSITY16_EXT */ - { 13770, 0x0000804A }, /* GL_INTENSITY4 */ - { 13784, 0x0000804A }, /* GL_INTENSITY4_EXT */ - { 13802, 0x0000804B }, /* GL_INTENSITY8 */ - { 13816, 0x0000804B }, /* GL_INTENSITY8_EXT */ - { 13834, 0x00008049 }, /* GL_INTENSITY_EXT */ - { 13851, 0x00008575 }, /* GL_INTERPOLATE */ - { 13866, 0x00008575 }, /* GL_INTERPOLATE_ARB */ - { 13885, 0x00008575 }, /* GL_INTERPOLATE_EXT */ - { 13904, 0x00008B53 }, /* GL_INT_VEC2 */ - { 13916, 0x00008B53 }, /* GL_INT_VEC2_ARB */ - { 13932, 0x00008B54 }, /* GL_INT_VEC3 */ - { 13944, 0x00008B54 }, /* GL_INT_VEC3_ARB */ - { 13960, 0x00008B55 }, /* GL_INT_VEC4 */ - { 13972, 0x00008B55 }, /* GL_INT_VEC4_ARB */ - { 13988, 0x00000500 }, /* GL_INVALID_ENUM */ - { 14004, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */ - { 14037, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ - { 14074, 0x00000502 }, /* GL_INVALID_OPERATION */ - { 14095, 0x00000501 }, /* GL_INVALID_VALUE */ - { 14112, 0x0000862B }, /* GL_INVERSE_NV */ - { 14126, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */ - { 14150, 0x0000150A }, /* GL_INVERT */ - { 14160, 0x00001E00 }, /* GL_KEEP */ - { 14168, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */ - { 14194, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */ - { 14224, 0x00000406 }, /* GL_LEFT */ - { 14232, 0x00000203 }, /* GL_LEQUAL */ - { 14242, 0x00000201 }, /* GL_LESS */ - { 14250, 0x00004000 }, /* GL_LIGHT0 */ - { 14260, 0x00004001 }, /* GL_LIGHT1 */ - { 14270, 0x00004002 }, /* GL_LIGHT2 */ - { 14280, 0x00004003 }, /* GL_LIGHT3 */ - { 14290, 0x00004004 }, /* GL_LIGHT4 */ - { 14300, 0x00004005 }, /* GL_LIGHT5 */ - { 14310, 0x00004006 }, /* GL_LIGHT6 */ - { 14320, 0x00004007 }, /* GL_LIGHT7 */ - { 14330, 0x00000B50 }, /* GL_LIGHTING */ - { 14342, 0x00000040 }, /* GL_LIGHTING_BIT */ - { 14358, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */ - { 14381, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */ - { 14410, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */ - { 14443, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ - { 14471, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */ - { 14495, 0x00001B01 }, /* GL_LINE */ - { 14503, 0x00002601 }, /* GL_LINEAR */ - { 14513, 0x00001208 }, /* GL_LINEAR_ATTENUATION */ - { 14535, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ - { 14565, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ - { 14596, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */ - { 14620, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */ - { 14645, 0x00000001 }, /* GL_LINES */ - { 14654, 0x00000004 }, /* GL_LINE_BIT */ - { 14666, 0x00000002 }, /* GL_LINE_LOOP */ - { 14679, 0x00000707 }, /* GL_LINE_RESET_TOKEN */ - { 14699, 0x00000B20 }, /* GL_LINE_SMOOTH */ - { 14714, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */ - { 14734, 0x00000B24 }, /* GL_LINE_STIPPLE */ - { 14750, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */ - { 14774, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */ - { 14797, 0x00000003 }, /* GL_LINE_STRIP */ - { 14811, 0x00000702 }, /* GL_LINE_TOKEN */ - { 14825, 0x00000B21 }, /* GL_LINE_WIDTH */ - { 14839, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */ - { 14865, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */ - { 14885, 0x00008B82 }, /* GL_LINK_STATUS */ - { 14900, 0x00000B32 }, /* GL_LIST_BASE */ - { 14913, 0x00020000 }, /* GL_LIST_BIT */ - { 14925, 0x00000B33 }, /* GL_LIST_INDEX */ - { 14939, 0x00000B30 }, /* GL_LIST_MODE */ - { 14952, 0x00000101 }, /* GL_LOAD */ - { 14960, 0x00000BF1 }, /* GL_LOGIC_OP */ - { 14972, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */ - { 14989, 0x00008CA1 }, /* GL_LOWER_LEFT */ - { 15003, 0x00001909 }, /* GL_LUMINANCE */ - { 15016, 0x00008041 }, /* GL_LUMINANCE12 */ - { 15031, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */ - { 15054, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */ - { 15081, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */ - { 15103, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */ - { 15129, 0x00008041 }, /* GL_LUMINANCE12_EXT */ - { 15148, 0x00008042 }, /* GL_LUMINANCE16 */ - { 15163, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */ - { 15186, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */ - { 15213, 0x00008042 }, /* GL_LUMINANCE16_EXT */ - { 15232, 0x0000803F }, /* GL_LUMINANCE4 */ - { 15246, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */ - { 15267, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */ - { 15292, 0x0000803F }, /* GL_LUMINANCE4_EXT */ - { 15310, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */ - { 15331, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */ - { 15356, 0x00008040 }, /* GL_LUMINANCE8 */ - { 15370, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */ - { 15391, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */ - { 15416, 0x00008040 }, /* GL_LUMINANCE8_EXT */ - { 15434, 0x0000190A }, /* GL_LUMINANCE_ALPHA */ - { 15453, 0x00000D90 }, /* GL_MAP1_COLOR_4 */ - { 15469, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */ - { 15489, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */ - { 15511, 0x00000D91 }, /* GL_MAP1_INDEX */ - { 15525, 0x00000D92 }, /* GL_MAP1_NORMAL */ - { 15540, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */ - { 15564, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */ - { 15588, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */ - { 15612, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */ - { 15636, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */ - { 15653, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */ - { 15670, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ - { 15698, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ - { 15727, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ - { 15756, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ - { 15785, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ - { 15814, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ - { 15843, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ - { 15872, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ - { 15900, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ - { 15928, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ - { 15956, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ - { 15984, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ - { 16012, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ - { 16040, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ - { 16068, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ - { 16096, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ - { 16124, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */ - { 16140, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */ - { 16160, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */ - { 16182, 0x00000DB1 }, /* GL_MAP2_INDEX */ - { 16196, 0x00000DB2 }, /* GL_MAP2_NORMAL */ - { 16211, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */ - { 16235, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */ - { 16259, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */ - { 16283, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */ - { 16307, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */ - { 16324, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */ - { 16341, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ - { 16369, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ - { 16398, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ - { 16427, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ - { 16456, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ - { 16485, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ - { 16514, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ - { 16543, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ - { 16571, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ - { 16599, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ - { 16627, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ - { 16655, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ - { 16683, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ - { 16711, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */ - { 16739, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ - { 16767, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ - { 16795, 0x00000D10 }, /* GL_MAP_COLOR */ - { 16808, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */ - { 16834, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */ - { 16863, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */ - { 16891, 0x00000001 }, /* GL_MAP_READ_BIT */ - { 16907, 0x00000D11 }, /* GL_MAP_STENCIL */ - { 16922, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */ - { 16948, 0x00000002 }, /* GL_MAP_WRITE_BIT */ - { 16965, 0x000088C0 }, /* GL_MATRIX0_ARB */ - { 16980, 0x00008630 }, /* GL_MATRIX0_NV */ - { 16994, 0x000088CA }, /* GL_MATRIX10_ARB */ - { 17010, 0x000088CB }, /* GL_MATRIX11_ARB */ - { 17026, 0x000088CC }, /* GL_MATRIX12_ARB */ - { 17042, 0x000088CD }, /* GL_MATRIX13_ARB */ - { 17058, 0x000088CE }, /* GL_MATRIX14_ARB */ - { 17074, 0x000088CF }, /* GL_MATRIX15_ARB */ - { 17090, 0x000088D0 }, /* GL_MATRIX16_ARB */ - { 17106, 0x000088D1 }, /* GL_MATRIX17_ARB */ - { 17122, 0x000088D2 }, /* GL_MATRIX18_ARB */ - { 17138, 0x000088D3 }, /* GL_MATRIX19_ARB */ - { 17154, 0x000088C1 }, /* GL_MATRIX1_ARB */ - { 17169, 0x00008631 }, /* GL_MATRIX1_NV */ - { 17183, 0x000088D4 }, /* GL_MATRIX20_ARB */ - { 17199, 0x000088D5 }, /* GL_MATRIX21_ARB */ - { 17215, 0x000088D6 }, /* GL_MATRIX22_ARB */ - { 17231, 0x000088D7 }, /* GL_MATRIX23_ARB */ - { 17247, 0x000088D8 }, /* GL_MATRIX24_ARB */ - { 17263, 0x000088D9 }, /* GL_MATRIX25_ARB */ - { 17279, 0x000088DA }, /* GL_MATRIX26_ARB */ - { 17295, 0x000088DB }, /* GL_MATRIX27_ARB */ - { 17311, 0x000088DC }, /* GL_MATRIX28_ARB */ - { 17327, 0x000088DD }, /* GL_MATRIX29_ARB */ - { 17343, 0x000088C2 }, /* GL_MATRIX2_ARB */ - { 17358, 0x00008632 }, /* GL_MATRIX2_NV */ - { 17372, 0x000088DE }, /* GL_MATRIX30_ARB */ - { 17388, 0x000088DF }, /* GL_MATRIX31_ARB */ - { 17404, 0x000088C3 }, /* GL_MATRIX3_ARB */ - { 17419, 0x00008633 }, /* GL_MATRIX3_NV */ - { 17433, 0x000088C4 }, /* GL_MATRIX4_ARB */ - { 17448, 0x00008634 }, /* GL_MATRIX4_NV */ - { 17462, 0x000088C5 }, /* GL_MATRIX5_ARB */ - { 17477, 0x00008635 }, /* GL_MATRIX5_NV */ - { 17491, 0x000088C6 }, /* GL_MATRIX6_ARB */ - { 17506, 0x00008636 }, /* GL_MATRIX6_NV */ - { 17520, 0x000088C7 }, /* GL_MATRIX7_ARB */ - { 17535, 0x00008637 }, /* GL_MATRIX7_NV */ - { 17549, 0x000088C8 }, /* GL_MATRIX8_ARB */ - { 17564, 0x000088C9 }, /* GL_MATRIX9_ARB */ - { 17579, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */ - { 17605, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ - { 17639, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ - { 17670, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ - { 17703, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ - { 17734, 0x00000BA0 }, /* GL_MATRIX_MODE */ - { 17749, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */ - { 17771, 0x00008008 }, /* GL_MAX */ - { 17778, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */ - { 17801, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */ - { 17833, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */ - { 17859, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ - { 17892, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ - { 17918, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - { 17952, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */ - { 17971, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */ - { 17996, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ - { 18025, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ - { 18057, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */ - { 18093, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ - { 18129, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */ - { 18169, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */ - { 18195, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */ - { 18225, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */ - { 18250, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */ - { 18279, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ - { 18308, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */ - { 18341, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */ - { 18361, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */ - { 18385, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */ - { 18409, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */ - { 18433, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */ - { 18458, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */ - { 18476, 0x00008008 }, /* GL_MAX_EXT */ - { 18487, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ - { 18522, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */ - { 18561, 0x00000D31 }, /* GL_MAX_LIGHTS */ - { 18575, 0x00000B31 }, /* GL_MAX_LIST_NESTING */ - { 18595, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ - { 18633, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */ - { 18662, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */ - { 18686, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */ - { 18714, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */ - { 18737, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ - { 18774, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ - { 18810, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ - { 18837, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ - { 18866, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ - { 18900, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ - { 18936, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ - { 18963, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ - { 18995, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ - { 19031, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ - { 19060, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ - { 19089, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */ - { 19117, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ - { 19155, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - { 19199, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - { 19242, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ - { 19276, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - { 19315, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ - { 19352, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ - { 19390, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - { 19433, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - { 19476, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ - { 19506, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ - { 19537, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ - { 19573, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ - { 19609, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */ - { 19639, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ - { 19673, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */ - { 19706, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */ - { 19731, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ - { 19760, 0x00008D57 }, /* GL_MAX_SAMPLES */ - { 19775, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */ - { 19794, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */ - { 19821, 0x00008504 }, /* GL_MAX_SHININESS_NV */ - { 19841, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */ - { 19865, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */ - { 19887, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */ - { 19913, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */ - { 19940, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */ - { 19971, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */ - { 19995, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ - { 20029, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */ - { 20049, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */ - { 20076, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */ - { 20097, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */ - { 20122, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */ - { 20147, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */ - { 20182, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */ - { 20204, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */ - { 20230, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */ - { 20252, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */ - { 20278, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ - { 20312, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ - { 20350, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ - { 20383, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */ - { 20420, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */ - { 20444, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */ - { 20465, 0x00008007 }, /* GL_MIN */ - { 20472, 0x0000802E }, /* GL_MINMAX */ - { 20482, 0x0000802E }, /* GL_MINMAX_EXT */ - { 20496, 0x0000802F }, /* GL_MINMAX_FORMAT */ - { 20513, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */ - { 20534, 0x00008030 }, /* GL_MINMAX_SINK */ - { 20549, 0x00008030 }, /* GL_MINMAX_SINK_EXT */ - { 20568, 0x00008007 }, /* GL_MIN_EXT */ - { 20579, 0x00008370 }, /* GL_MIRRORED_REPEAT */ - { 20598, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */ - { 20621, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */ - { 20644, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */ - { 20664, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */ - { 20684, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ - { 20714, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */ - { 20742, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ - { 20770, 0x00001700 }, /* GL_MODELVIEW */ - { 20783, 0x00001700 }, /* GL_MODELVIEW0_ARB */ - { 20801, 0x0000872A }, /* GL_MODELVIEW10_ARB */ - { 20820, 0x0000872B }, /* GL_MODELVIEW11_ARB */ - { 20839, 0x0000872C }, /* GL_MODELVIEW12_ARB */ - { 20858, 0x0000872D }, /* GL_MODELVIEW13_ARB */ - { 20877, 0x0000872E }, /* GL_MODELVIEW14_ARB */ - { 20896, 0x0000872F }, /* GL_MODELVIEW15_ARB */ - { 20915, 0x00008730 }, /* GL_MODELVIEW16_ARB */ - { 20934, 0x00008731 }, /* GL_MODELVIEW17_ARB */ - { 20953, 0x00008732 }, /* GL_MODELVIEW18_ARB */ - { 20972, 0x00008733 }, /* GL_MODELVIEW19_ARB */ - { 20991, 0x0000850A }, /* GL_MODELVIEW1_ARB */ - { 21009, 0x00008734 }, /* GL_MODELVIEW20_ARB */ - { 21028, 0x00008735 }, /* GL_MODELVIEW21_ARB */ - { 21047, 0x00008736 }, /* GL_MODELVIEW22_ARB */ - { 21066, 0x00008737 }, /* GL_MODELVIEW23_ARB */ - { 21085, 0x00008738 }, /* GL_MODELVIEW24_ARB */ - { 21104, 0x00008739 }, /* GL_MODELVIEW25_ARB */ - { 21123, 0x0000873A }, /* GL_MODELVIEW26_ARB */ - { 21142, 0x0000873B }, /* GL_MODELVIEW27_ARB */ - { 21161, 0x0000873C }, /* GL_MODELVIEW28_ARB */ - { 21180, 0x0000873D }, /* GL_MODELVIEW29_ARB */ - { 21199, 0x00008722 }, /* GL_MODELVIEW2_ARB */ - { 21217, 0x0000873E }, /* GL_MODELVIEW30_ARB */ - { 21236, 0x0000873F }, /* GL_MODELVIEW31_ARB */ - { 21255, 0x00008723 }, /* GL_MODELVIEW3_ARB */ - { 21273, 0x00008724 }, /* GL_MODELVIEW4_ARB */ - { 21291, 0x00008725 }, /* GL_MODELVIEW5_ARB */ - { 21309, 0x00008726 }, /* GL_MODELVIEW6_ARB */ - { 21327, 0x00008727 }, /* GL_MODELVIEW7_ARB */ - { 21345, 0x00008728 }, /* GL_MODELVIEW8_ARB */ - { 21363, 0x00008729 }, /* GL_MODELVIEW9_ARB */ - { 21381, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */ - { 21401, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */ - { 21428, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */ - { 21453, 0x00002100 }, /* GL_MODULATE */ - { 21465, 0x00008744 }, /* GL_MODULATE_ADD_ATI */ - { 21485, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */ - { 21512, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */ - { 21537, 0x00000103 }, /* GL_MULT */ - { 21545, 0x0000809D }, /* GL_MULTISAMPLE */ - { 21560, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */ - { 21580, 0x0000809D }, /* GL_MULTISAMPLE_ARB */ - { 21599, 0x20000000 }, /* GL_MULTISAMPLE_BIT */ - { 21618, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */ - { 21642, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */ - { 21665, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */ - { 21695, 0x00002A25 }, /* GL_N3F_V3F */ - { 21706, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */ - { 21726, 0x0000150E }, /* GL_NAND */ - { 21734, 0x00002600 }, /* GL_NEAREST */ - { 21745, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ - { 21776, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ - { 21808, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */ - { 21833, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */ - { 21859, 0x00000200 }, /* GL_NEVER */ - { 21868, 0x00001102 }, /* GL_NICEST */ - { 21878, 0x00000000 }, /* GL_NONE */ - { 21886, 0x00001505 }, /* GL_NOOP */ - { 21894, 0x00001508 }, /* GL_NOR */ - { 21901, 0x00000BA1 }, /* GL_NORMALIZE */ - { 21914, 0x00008075 }, /* GL_NORMAL_ARRAY */ - { 21930, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ - { 21961, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */ - { 21996, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */ - { 22020, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */ - { 22043, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */ - { 22064, 0x00008511 }, /* GL_NORMAL_MAP */ - { 22078, 0x00008511 }, /* GL_NORMAL_MAP_ARB */ - { 22096, 0x00008511 }, /* GL_NORMAL_MAP_NV */ - { 22113, 0x00000205 }, /* GL_NOTEQUAL */ - { 22125, 0x00000000 }, /* GL_NO_ERROR */ - { 22137, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ - { 22171, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */ - { 22209, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */ - { 22241, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */ - { 22283, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */ - { 22313, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */ - { 22353, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */ - { 22384, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */ - { 22413, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */ - { 22441, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */ - { 22471, 0x00002401 }, /* GL_OBJECT_LINEAR */ - { 22488, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */ - { 22514, 0x00002501 }, /* GL_OBJECT_PLANE */ - { 22530, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */ - { 22565, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */ - { 22587, 0x00009112 }, /* GL_OBJECT_TYPE */ - { 22602, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */ - { 22621, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */ - { 22651, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */ - { 22672, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */ - { 22700, 0x00000001 }, /* GL_ONE */ - { 22707, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */ - { 22735, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */ - { 22767, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */ - { 22795, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */ - { 22827, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */ - { 22850, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */ - { 22873, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */ - { 22896, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */ - { 22919, 0x00008598 }, /* GL_OPERAND0_ALPHA */ - { 22937, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */ - { 22959, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */ - { 22981, 0x00008590 }, /* GL_OPERAND0_RGB */ - { 22997, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */ - { 23017, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */ - { 23037, 0x00008599 }, /* GL_OPERAND1_ALPHA */ - { 23055, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */ - { 23077, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */ - { 23099, 0x00008591 }, /* GL_OPERAND1_RGB */ - { 23115, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */ - { 23135, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */ - { 23155, 0x0000859A }, /* GL_OPERAND2_ALPHA */ - { 23173, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */ - { 23195, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */ - { 23217, 0x00008592 }, /* GL_OPERAND2_RGB */ - { 23233, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */ - { 23253, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */ - { 23273, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */ - { 23294, 0x00008593 }, /* GL_OPERAND3_RGB_NV */ - { 23313, 0x00001507 }, /* GL_OR */ - { 23319, 0x00000A01 }, /* GL_ORDER */ - { 23328, 0x0000150D }, /* GL_OR_INVERTED */ - { 23343, 0x0000150B }, /* GL_OR_REVERSE */ - { 23357, 0x00000505 }, /* GL_OUT_OF_MEMORY */ - { 23374, 0x00000D05 }, /* GL_PACK_ALIGNMENT */ - { 23392, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */ - { 23413, 0x00008758 }, /* GL_PACK_INVERT_MESA */ - { 23433, 0x00000D01 }, /* GL_PACK_LSB_FIRST */ - { 23451, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */ - { 23470, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */ - { 23490, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */ - { 23510, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */ - { 23528, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */ - { 23547, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */ - { 23572, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */ - { 23596, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */ - { 23617, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */ - { 23639, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */ - { 23661, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */ - { 23686, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */ - { 23710, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */ - { 23731, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */ - { 23753, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */ - { 23775, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */ - { 23797, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */ - { 23828, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */ - { 23848, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */ - { 23873, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */ - { 23893, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */ - { 23918, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */ - { 23938, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */ - { 23963, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */ - { 23983, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */ - { 24008, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */ - { 24028, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */ - { 24053, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */ - { 24073, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */ - { 24098, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */ - { 24118, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */ - { 24143, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */ - { 24163, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */ - { 24188, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */ - { 24208, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */ - { 24233, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */ - { 24253, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */ - { 24278, 0x00000020 }, /* GL_PIXEL_MODE_BIT */ - { 24296, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */ - { 24317, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */ - { 24346, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ - { 24379, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */ - { 24404, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */ - { 24427, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */ - { 24458, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ - { 24493, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */ - { 24520, 0x00001B00 }, /* GL_POINT */ - { 24529, 0x00000000 }, /* GL_POINTS */ - { 24539, 0x00000002 }, /* GL_POINT_BIT */ - { 24552, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */ - { 24582, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */ - { 24616, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */ - { 24650, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */ - { 24685, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */ - { 24714, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */ - { 24747, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */ - { 24780, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */ - { 24814, 0x00000B11 }, /* GL_POINT_SIZE */ - { 24828, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */ - { 24854, 0x00008127 }, /* GL_POINT_SIZE_MAX */ - { 24872, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */ - { 24894, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */ - { 24916, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */ - { 24939, 0x00008126 }, /* GL_POINT_SIZE_MIN */ - { 24957, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */ - { 24979, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */ - { 25001, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */ - { 25024, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */ - { 25044, 0x00000B10 }, /* GL_POINT_SMOOTH */ - { 25060, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */ - { 25081, 0x00008861 }, /* GL_POINT_SPRITE */ - { 25097, 0x00008861 }, /* GL_POINT_SPRITE_ARB */ - { 25117, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */ - { 25146, 0x00008861 }, /* GL_POINT_SPRITE_NV */ - { 25165, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */ - { 25191, 0x00000701 }, /* GL_POINT_TOKEN */ - { 25206, 0x00000009 }, /* GL_POLYGON */ - { 25217, 0x00000008 }, /* GL_POLYGON_BIT */ - { 25232, 0x00000B40 }, /* GL_POLYGON_MODE */ - { 25248, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */ - { 25271, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */ - { 25296, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */ - { 25319, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */ - { 25342, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */ - { 25366, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */ - { 25390, 0x00000B41 }, /* GL_POLYGON_SMOOTH */ - { 25408, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */ - { 25431, 0x00000B42 }, /* GL_POLYGON_STIPPLE */ - { 25450, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */ - { 25473, 0x00000703 }, /* GL_POLYGON_TOKEN */ - { 25490, 0x00001203 }, /* GL_POSITION */ - { 25502, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ - { 25534, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */ - { 25570, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ - { 25603, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */ - { 25640, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ - { 25671, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */ - { 25706, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ - { 25738, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */ - { 25774, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ - { 25807, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ - { 25839, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */ - { 25875, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ - { 25908, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */ - { 25945, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */ - { 25975, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */ - { 26009, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */ - { 26040, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */ - { 26075, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ - { 26106, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */ - { 26141, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ - { 26173, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */ - { 26209, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */ - { 26239, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */ - { 26273, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */ - { 26304, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */ - { 26339, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */ - { 26371, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */ - { 26402, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */ - { 26437, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */ - { 26469, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */ - { 26505, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */ - { 26534, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */ - { 26567, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */ - { 26597, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */ - { 26631, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ - { 26670, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ - { 26703, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ - { 26743, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ - { 26777, 0x00008578 }, /* GL_PREVIOUS */ - { 26789, 0x00008578 }, /* GL_PREVIOUS_ARB */ - { 26805, 0x00008578 }, /* GL_PREVIOUS_EXT */ - { 26821, 0x00008577 }, /* GL_PRIMARY_COLOR */ - { 26838, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */ - { 26859, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */ - { 26880, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ - { 26913, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ - { 26945, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */ - { 26968, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */ - { 26991, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */ - { 27021, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */ - { 27050, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */ - { 27078, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */ - { 27100, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */ - { 27128, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */ - { 27156, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */ - { 27178, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */ - { 27199, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - { 27239, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - { 27278, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ - { 27308, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - { 27343, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ - { 27376, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ - { 27410, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - { 27449, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - { 27488, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */ - { 27510, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */ - { 27536, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */ - { 27560, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */ - { 27583, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */ - { 27605, 0x00008628 }, /* GL_PROGRAM_STRING_NV */ - { 27626, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */ - { 27647, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */ - { 27674, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ - { 27706, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ - { 27738, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ - { 27773, 0x00001701 }, /* GL_PROJECTION */ - { 27787, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */ - { 27808, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */ - { 27834, 0x00008E4F }, /* GL_PROVOKING_VERTEX */ - { 27854, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */ - { 27878, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */ - { 27899, 0x00008025 }, /* GL_PROXY_HISTOGRAM */ - { 27918, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */ - { 27941, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ - { 27980, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ - { 28018, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */ - { 28038, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */ - { 28068, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */ - { 28092, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */ - { 28112, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */ - { 28142, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */ - { 28166, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */ - { 28186, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ - { 28219, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */ - { 28245, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */ - { 28275, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ - { 28306, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */ - { 28336, 0x00002003 }, /* GL_Q */ - { 28341, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */ - { 28366, 0x00000007 }, /* GL_QUADS */ - { 28375, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ - { 28419, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */ - { 28467, 0x00008614 }, /* GL_QUAD_MESH_SUN */ - { 28484, 0x00000008 }, /* GL_QUAD_STRIP */ - { 28498, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */ - { 28520, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */ - { 28546, 0x00008866 }, /* GL_QUERY_RESULT */ - { 28562, 0x00008866 }, /* GL_QUERY_RESULT_ARB */ - { 28582, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */ - { 28608, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */ - { 28638, 0x00002002 }, /* GL_R */ - { 28643, 0x00002A10 }, /* GL_R3_G3_B2 */ - { 28655, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ - { 28688, 0x00000C02 }, /* GL_READ_BUFFER */ - { 28703, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */ - { 28723, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */ - { 28751, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ - { 28783, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */ - { 28807, 0x000088B8 }, /* GL_READ_ONLY */ - { 28820, 0x000088B8 }, /* GL_READ_ONLY_ARB */ - { 28837, 0x000088BA }, /* GL_READ_WRITE */ - { 28851, 0x000088BA }, /* GL_READ_WRITE_ARB */ - { 28869, 0x00001903 }, /* GL_RED */ - { 28876, 0x00008016 }, /* GL_REDUCE */ - { 28886, 0x00008016 }, /* GL_REDUCE_EXT */ - { 28900, 0x00000D15 }, /* GL_RED_BIAS */ - { 28912, 0x00000D52 }, /* GL_RED_BITS */ - { 28924, 0x00000D14 }, /* GL_RED_SCALE */ - { 28937, 0x00008512 }, /* GL_REFLECTION_MAP */ - { 28955, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */ - { 28977, 0x00008512 }, /* GL_REFLECTION_MAP_NV */ - { 28998, 0x00001C00 }, /* GL_RENDER */ - { 29008, 0x00008D41 }, /* GL_RENDERBUFFER */ - { 29024, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */ - { 29051, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */ - { 29075, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */ - { 29103, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */ - { 29129, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */ - { 29156, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */ - { 29176, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */ - { 29203, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */ - { 29226, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */ - { 29253, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */ - { 29285, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ - { 29321, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */ - { 29346, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */ - { 29370, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */ - { 29398, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */ - { 29427, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */ - { 29449, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */ - { 29475, 0x00001F01 }, /* GL_RENDERER */ - { 29487, 0x00000C40 }, /* GL_RENDER_MODE */ - { 29502, 0x00002901 }, /* GL_REPEAT */ - { 29512, 0x00001E01 }, /* GL_REPLACE */ - { 29523, 0x00008062 }, /* GL_REPLACE_EXT */ - { 29538, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */ - { 29561, 0x0000803A }, /* GL_RESCALE_NORMAL */ - { 29579, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */ - { 29601, 0x00000102 }, /* GL_RETURN */ - { 29611, 0x00001907 }, /* GL_RGB */ - { 29618, 0x00008052 }, /* GL_RGB10 */ - { 29627, 0x00008059 }, /* GL_RGB10_A2 */ - { 29639, 0x00008059 }, /* GL_RGB10_A2_EXT */ - { 29655, 0x00008052 }, /* GL_RGB10_EXT */ - { 29668, 0x00008053 }, /* GL_RGB12 */ - { 29677, 0x00008053 }, /* GL_RGB12_EXT */ - { 29690, 0x00008054 }, /* GL_RGB16 */ - { 29699, 0x00008054 }, /* GL_RGB16_EXT */ - { 29712, 0x0000804E }, /* GL_RGB2_EXT */ - { 29724, 0x0000804F }, /* GL_RGB4 */ - { 29732, 0x0000804F }, /* GL_RGB4_EXT */ - { 29744, 0x000083A1 }, /* GL_RGB4_S3TC */ - { 29757, 0x00008050 }, /* GL_RGB5 */ - { 29765, 0x00008057 }, /* GL_RGB5_A1 */ - { 29776, 0x00008057 }, /* GL_RGB5_A1_EXT */ - { 29791, 0x00008050 }, /* GL_RGB5_EXT */ - { 29803, 0x00008051 }, /* GL_RGB8 */ - { 29811, 0x00008051 }, /* GL_RGB8_EXT */ - { 29823, 0x00001908 }, /* GL_RGBA */ - { 29831, 0x0000805A }, /* GL_RGBA12 */ - { 29841, 0x0000805A }, /* GL_RGBA12_EXT */ - { 29855, 0x0000805B }, /* GL_RGBA16 */ - { 29865, 0x0000805B }, /* GL_RGBA16_EXT */ - { 29879, 0x00008055 }, /* GL_RGBA2 */ - { 29888, 0x00008055 }, /* GL_RGBA2_EXT */ - { 29901, 0x00008056 }, /* GL_RGBA4 */ - { 29910, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */ - { 29929, 0x00008056 }, /* GL_RGBA4_EXT */ - { 29942, 0x000083A3 }, /* GL_RGBA4_S3TC */ - { 29956, 0x00008058 }, /* GL_RGBA8 */ - { 29965, 0x00008058 }, /* GL_RGBA8_EXT */ - { 29978, 0x00008F97 }, /* GL_RGBA8_SNORM */ - { 29993, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */ - { 30011, 0x00000C31 }, /* GL_RGBA_MODE */ - { 30024, 0x000083A2 }, /* GL_RGBA_S3TC */ - { 30037, 0x00008F93 }, /* GL_RGBA_SNORM */ - { 30051, 0x000083A0 }, /* GL_RGB_S3TC */ - { 30063, 0x00008573 }, /* GL_RGB_SCALE */ - { 30076, 0x00008573 }, /* GL_RGB_SCALE_ARB */ - { 30093, 0x00008573 }, /* GL_RGB_SCALE_EXT */ - { 30110, 0x00000407 }, /* GL_RIGHT */ - { 30119, 0x00002000 }, /* GL_S */ - { 30124, 0x00008B5D }, /* GL_SAMPLER_1D */ - { 30138, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */ - { 30159, 0x00008B5E }, /* GL_SAMPLER_2D */ - { 30173, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */ - { 30194, 0x00008B5F }, /* GL_SAMPLER_3D */ - { 30208, 0x00008B60 }, /* GL_SAMPLER_CUBE */ - { 30224, 0x000080A9 }, /* GL_SAMPLES */ - { 30235, 0x000086B4 }, /* GL_SAMPLES_3DFX */ - { 30251, 0x000080A9 }, /* GL_SAMPLES_ARB */ - { 30266, 0x00008914 }, /* GL_SAMPLES_PASSED */ - { 30284, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */ - { 30306, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ - { 30334, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */ - { 30366, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */ - { 30389, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */ - { 30416, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */ - { 30434, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */ - { 30457, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */ - { 30479, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */ - { 30498, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */ - { 30521, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */ - { 30547, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */ - { 30577, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */ - { 30602, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */ - { 30631, 0x00080000 }, /* GL_SCISSOR_BIT */ - { 30646, 0x00000C10 }, /* GL_SCISSOR_BOX */ - { 30661, 0x00000C11 }, /* GL_SCISSOR_TEST */ - { 30677, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */ - { 30702, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ - { 30742, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */ - { 30786, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ - { 30819, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ - { 30849, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ - { 30881, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ - { 30911, 0x00001C02 }, /* GL_SELECT */ - { 30921, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */ - { 30949, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */ - { 30974, 0x00008012 }, /* GL_SEPARABLE_2D */ - { 30990, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */ - { 31017, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */ - { 31048, 0x0000150F }, /* GL_SET */ - { 31055, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */ - { 31076, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */ - { 31100, 0x00008B4F }, /* GL_SHADER_TYPE */ - { 31115, 0x00000B54 }, /* GL_SHADE_MODEL */ - { 31130, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */ - { 31158, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */ - { 31181, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */ - { 31211, 0x00001601 }, /* GL_SHININESS */ - { 31224, 0x00001402 }, /* GL_SHORT */ - { 31233, 0x00009119 }, /* GL_SIGNALED */ - { 31245, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */ - { 31266, 0x000081F9 }, /* GL_SINGLE_COLOR */ - { 31282, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */ - { 31302, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */ - { 31321, 0x00008C46 }, /* GL_SLUMINANCE */ - { 31335, 0x00008C47 }, /* GL_SLUMINANCE8 */ - { 31350, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */ - { 31372, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */ - { 31392, 0x00001D01 }, /* GL_SMOOTH */ - { 31402, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */ - { 31435, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */ - { 31462, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */ - { 31495, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */ - { 31522, 0x00008588 }, /* GL_SOURCE0_ALPHA */ - { 31539, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */ - { 31560, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */ - { 31581, 0x00008580 }, /* GL_SOURCE0_RGB */ - { 31596, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */ - { 31615, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */ - { 31634, 0x00008589 }, /* GL_SOURCE1_ALPHA */ - { 31651, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */ - { 31672, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */ - { 31693, 0x00008581 }, /* GL_SOURCE1_RGB */ - { 31708, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */ - { 31727, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */ - { 31746, 0x0000858A }, /* GL_SOURCE2_ALPHA */ - { 31763, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */ - { 31784, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */ - { 31805, 0x00008582 }, /* GL_SOURCE2_RGB */ - { 31820, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */ - { 31839, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */ - { 31858, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */ - { 31878, 0x00008583 }, /* GL_SOURCE3_RGB_NV */ - { 31896, 0x00001202 }, /* GL_SPECULAR */ - { 31908, 0x00002402 }, /* GL_SPHERE_MAP */ - { 31922, 0x00001206 }, /* GL_SPOT_CUTOFF */ - { 31937, 0x00001204 }, /* GL_SPOT_DIRECTION */ - { 31955, 0x00001205 }, /* GL_SPOT_EXPONENT */ - { 31972, 0x00008588 }, /* GL_SRC0_ALPHA */ - { 31986, 0x00008580 }, /* GL_SRC0_RGB */ - { 31998, 0x00008589 }, /* GL_SRC1_ALPHA */ - { 32012, 0x00008581 }, /* GL_SRC1_RGB */ - { 32024, 0x0000858A }, /* GL_SRC2_ALPHA */ - { 32038, 0x00008582 }, /* GL_SRC2_RGB */ - { 32050, 0x00000302 }, /* GL_SRC_ALPHA */ - { 32063, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */ - { 32085, 0x00000300 }, /* GL_SRC_COLOR */ - { 32098, 0x00008C40 }, /* GL_SRGB */ - { 32106, 0x00008C41 }, /* GL_SRGB8 */ - { 32115, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */ - { 32131, 0x00008C42 }, /* GL_SRGB_ALPHA */ - { 32145, 0x00000503 }, /* GL_STACK_OVERFLOW */ - { 32163, 0x00000504 }, /* GL_STACK_UNDERFLOW */ - { 32182, 0x000088E6 }, /* GL_STATIC_COPY */ - { 32197, 0x000088E6 }, /* GL_STATIC_COPY_ARB */ - { 32216, 0x000088E4 }, /* GL_STATIC_DRAW */ - { 32231, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */ - { 32250, 0x000088E5 }, /* GL_STATIC_READ */ - { 32265, 0x000088E5 }, /* GL_STATIC_READ_ARB */ - { 32284, 0x00001802 }, /* GL_STENCIL */ - { 32295, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */ - { 32317, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */ - { 32343, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */ - { 32364, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */ - { 32389, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */ - { 32410, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */ - { 32435, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ - { 32467, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */ - { 32503, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ - { 32535, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */ - { 32571, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */ - { 32591, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */ - { 32618, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */ - { 32644, 0x00000D57 }, /* GL_STENCIL_BITS */ - { 32660, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */ - { 32682, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */ - { 32705, 0x00000B94 }, /* GL_STENCIL_FAIL */ - { 32721, 0x00000B92 }, /* GL_STENCIL_FUNC */ - { 32737, 0x00001901 }, /* GL_STENCIL_INDEX */ - { 32754, 0x00008D46 }, /* GL_STENCIL_INDEX1 */ - { 32772, 0x00008D49 }, /* GL_STENCIL_INDEX16 */ - { 32791, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */ - { 32814, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */ - { 32836, 0x00008D47 }, /* GL_STENCIL_INDEX4 */ - { 32854, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */ - { 32876, 0x00008D48 }, /* GL_STENCIL_INDEX8 */ - { 32894, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */ - { 32916, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */ - { 32937, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */ - { 32964, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */ - { 32991, 0x00000B97 }, /* GL_STENCIL_REF */ - { 33006, 0x00000B90 }, /* GL_STENCIL_TEST */ - { 33022, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ - { 33051, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */ - { 33073, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */ - { 33094, 0x00000C33 }, /* GL_STEREO */ - { 33104, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */ - { 33128, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */ - { 33153, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */ - { 33177, 0x000088E2 }, /* GL_STREAM_COPY */ - { 33192, 0x000088E2 }, /* GL_STREAM_COPY_ARB */ - { 33211, 0x000088E0 }, /* GL_STREAM_DRAW */ - { 33226, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */ - { 33245, 0x000088E1 }, /* GL_STREAM_READ */ - { 33260, 0x000088E1 }, /* GL_STREAM_READ_ARB */ - { 33279, 0x00000D50 }, /* GL_SUBPIXEL_BITS */ - { 33296, 0x000084E7 }, /* GL_SUBTRACT */ - { 33308, 0x000084E7 }, /* GL_SUBTRACT_ARB */ - { 33324, 0x00009113 }, /* GL_SYNC_CONDITION */ - { 33342, 0x00009116 }, /* GL_SYNC_FENCE */ - { 33356, 0x00009115 }, /* GL_SYNC_FLAGS */ - { 33370, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */ - { 33397, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */ - { 33427, 0x00009114 }, /* GL_SYNC_STATUS */ - { 33442, 0x00002001 }, /* GL_T */ - { 33447, 0x00002A2A }, /* GL_T2F_C3F_V3F */ - { 33462, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */ - { 33481, 0x00002A29 }, /* GL_T2F_C4UB_V3F */ - { 33497, 0x00002A2B }, /* GL_T2F_N3F_V3F */ - { 33512, 0x00002A27 }, /* GL_T2F_V3F */ - { 33523, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */ - { 33542, 0x00002A28 }, /* GL_T4F_V4F */ - { 33553, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */ - { 33576, 0x00001702 }, /* GL_TEXTURE */ - { 33587, 0x000084C0 }, /* GL_TEXTURE0 */ - { 33599, 0x000084C0 }, /* GL_TEXTURE0_ARB */ - { 33615, 0x000084C1 }, /* GL_TEXTURE1 */ - { 33627, 0x000084CA }, /* GL_TEXTURE10 */ - { 33640, 0x000084CA }, /* GL_TEXTURE10_ARB */ - { 33657, 0x000084CB }, /* GL_TEXTURE11 */ - { 33670, 0x000084CB }, /* GL_TEXTURE11_ARB */ - { 33687, 0x000084CC }, /* GL_TEXTURE12 */ - { 33700, 0x000084CC }, /* GL_TEXTURE12_ARB */ - { 33717, 0x000084CD }, /* GL_TEXTURE13 */ - { 33730, 0x000084CD }, /* GL_TEXTURE13_ARB */ - { 33747, 0x000084CE }, /* GL_TEXTURE14 */ - { 33760, 0x000084CE }, /* GL_TEXTURE14_ARB */ - { 33777, 0x000084CF }, /* GL_TEXTURE15 */ - { 33790, 0x000084CF }, /* GL_TEXTURE15_ARB */ - { 33807, 0x000084D0 }, /* GL_TEXTURE16 */ - { 33820, 0x000084D0 }, /* GL_TEXTURE16_ARB */ - { 33837, 0x000084D1 }, /* GL_TEXTURE17 */ - { 33850, 0x000084D1 }, /* GL_TEXTURE17_ARB */ - { 33867, 0x000084D2 }, /* GL_TEXTURE18 */ - { 33880, 0x000084D2 }, /* GL_TEXTURE18_ARB */ - { 33897, 0x000084D3 }, /* GL_TEXTURE19 */ - { 33910, 0x000084D3 }, /* GL_TEXTURE19_ARB */ - { 33927, 0x000084C1 }, /* GL_TEXTURE1_ARB */ - { 33943, 0x000084C2 }, /* GL_TEXTURE2 */ - { 33955, 0x000084D4 }, /* GL_TEXTURE20 */ - { 33968, 0x000084D4 }, /* GL_TEXTURE20_ARB */ - { 33985, 0x000084D5 }, /* GL_TEXTURE21 */ - { 33998, 0x000084D5 }, /* GL_TEXTURE21_ARB */ - { 34015, 0x000084D6 }, /* GL_TEXTURE22 */ - { 34028, 0x000084D6 }, /* GL_TEXTURE22_ARB */ - { 34045, 0x000084D7 }, /* GL_TEXTURE23 */ - { 34058, 0x000084D7 }, /* GL_TEXTURE23_ARB */ - { 34075, 0x000084D8 }, /* GL_TEXTURE24 */ - { 34088, 0x000084D8 }, /* GL_TEXTURE24_ARB */ - { 34105, 0x000084D9 }, /* GL_TEXTURE25 */ - { 34118, 0x000084D9 }, /* GL_TEXTURE25_ARB */ - { 34135, 0x000084DA }, /* GL_TEXTURE26 */ - { 34148, 0x000084DA }, /* GL_TEXTURE26_ARB */ - { 34165, 0x000084DB }, /* GL_TEXTURE27 */ - { 34178, 0x000084DB }, /* GL_TEXTURE27_ARB */ - { 34195, 0x000084DC }, /* GL_TEXTURE28 */ - { 34208, 0x000084DC }, /* GL_TEXTURE28_ARB */ - { 34225, 0x000084DD }, /* GL_TEXTURE29 */ - { 34238, 0x000084DD }, /* GL_TEXTURE29_ARB */ - { 34255, 0x000084C2 }, /* GL_TEXTURE2_ARB */ - { 34271, 0x000084C3 }, /* GL_TEXTURE3 */ - { 34283, 0x000084DE }, /* GL_TEXTURE30 */ - { 34296, 0x000084DE }, /* GL_TEXTURE30_ARB */ - { 34313, 0x000084DF }, /* GL_TEXTURE31 */ - { 34326, 0x000084DF }, /* GL_TEXTURE31_ARB */ - { 34343, 0x000084C3 }, /* GL_TEXTURE3_ARB */ - { 34359, 0x000084C4 }, /* GL_TEXTURE4 */ - { 34371, 0x000084C4 }, /* GL_TEXTURE4_ARB */ - { 34387, 0x000084C5 }, /* GL_TEXTURE5 */ - { 34399, 0x000084C5 }, /* GL_TEXTURE5_ARB */ - { 34415, 0x000084C6 }, /* GL_TEXTURE6 */ - { 34427, 0x000084C6 }, /* GL_TEXTURE6_ARB */ - { 34443, 0x000084C7 }, /* GL_TEXTURE7 */ - { 34455, 0x000084C7 }, /* GL_TEXTURE7_ARB */ - { 34471, 0x000084C8 }, /* GL_TEXTURE8 */ - { 34483, 0x000084C8 }, /* GL_TEXTURE8_ARB */ - { 34499, 0x000084C9 }, /* GL_TEXTURE9 */ - { 34511, 0x000084C9 }, /* GL_TEXTURE9_ARB */ - { 34527, 0x00000DE0 }, /* GL_TEXTURE_1D */ - { 34541, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */ - { 34565, 0x00000DE1 }, /* GL_TEXTURE_2D */ - { 34579, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */ - { 34603, 0x0000806F }, /* GL_TEXTURE_3D */ - { 34617, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */ - { 34639, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */ - { 34665, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */ - { 34687, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */ - { 34709, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */ - { 34741, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */ - { 34763, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */ - { 34795, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */ - { 34817, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */ - { 34845, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */ - { 34877, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ - { 34910, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */ - { 34942, 0x00040000 }, /* GL_TEXTURE_BIT */ - { 34957, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */ - { 34978, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */ - { 35003, 0x00001005 }, /* GL_TEXTURE_BORDER */ - { 35021, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */ - { 35045, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ - { 35076, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ - { 35106, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ - { 35136, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ - { 35171, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ - { 35202, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - { 35240, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */ - { 35267, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ - { 35299, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ - { 35333, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */ - { 35357, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */ - { 35385, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */ - { 35409, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */ - { 35437, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ - { 35470, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */ - { 35494, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */ - { 35516, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */ - { 35538, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */ - { 35564, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */ - { 35598, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ - { 35631, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */ - { 35668, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */ - { 35696, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */ - { 35728, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */ - { 35751, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ - { 35789, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */ - { 35831, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */ - { 35862, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */ - { 35890, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ - { 35920, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */ - { 35948, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */ - { 35968, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */ - { 35992, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ - { 36023, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */ - { 36058, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ - { 36089, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */ - { 36124, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ - { 36155, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */ - { 36190, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ - { 36221, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */ - { 36256, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ - { 36287, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */ - { 36322, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ - { 36353, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */ - { 36388, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */ - { 36417, 0x00008071 }, /* GL_TEXTURE_DEPTH */ - { 36434, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */ - { 36456, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */ - { 36482, 0x00002300 }, /* GL_TEXTURE_ENV */ - { 36497, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */ - { 36518, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */ - { 36538, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */ - { 36564, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */ - { 36584, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */ - { 36601, 0x00000C62 }, /* GL_TEXTURE_GEN_R */ - { 36618, 0x00000C60 }, /* GL_TEXTURE_GEN_S */ - { 36635, 0x00000C61 }, /* GL_TEXTURE_GEN_T */ - { 36652, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */ - { 36677, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */ - { 36699, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */ - { 36725, 0x00001001 }, /* GL_TEXTURE_HEIGHT */ - { 36743, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */ - { 36769, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */ - { 36795, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */ - { 36825, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */ - { 36852, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */ - { 36877, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */ - { 36897, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */ - { 36921, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ - { 36948, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ - { 36975, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ - { 37002, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */ - { 37028, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */ - { 37058, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */ - { 37080, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */ - { 37098, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ - { 37128, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ - { 37156, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ - { 37184, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ - { 37212, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */ - { 37233, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */ - { 37252, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */ - { 37274, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */ - { 37293, 0x00008066 }, /* GL_TEXTURE_PRIORITY */ - { 37313, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */ - { 37343, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */ - { 37374, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */ - { 37399, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */ - { 37423, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */ - { 37443, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */ - { 37467, 0x00008067 }, /* GL_TEXTURE_RESIDENT */ - { 37487, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */ - { 37510, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */ - { 37534, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */ - { 37562, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */ - { 37592, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */ - { 37617, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ - { 37651, 0x00001000 }, /* GL_TEXTURE_WIDTH */ - { 37668, 0x00008072 }, /* GL_TEXTURE_WRAP_R */ - { 37686, 0x00002802 }, /* GL_TEXTURE_WRAP_S */ - { 37704, 0x00002803 }, /* GL_TEXTURE_WRAP_T */ - { 37722, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */ - { 37741, 0xFFFFFFFFFFFFFFFF }, /* GL_TIMEOUT_IGNORED */ - { 37760, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */ - { 37780, 0x00008648 }, /* GL_TRACK_MATRIX_NV */ - { 37799, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - { 37828, 0x00001000 }, /* GL_TRANSFORM_BIT */ - { 37845, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */ - { 37871, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */ - { 37901, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ - { 37933, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - { 37963, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */ - { 37997, 0x0000862C }, /* GL_TRANSPOSE_NV */ - { 38013, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - { 38044, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */ - { 38079, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - { 38107, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */ - { 38139, 0x00000004 }, /* GL_TRIANGLES */ - { 38152, 0x00000006 }, /* GL_TRIANGLE_FAN */ - { 38168, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */ - { 38189, 0x00000005 }, /* GL_TRIANGLE_STRIP */ - { 38207, 0x00000001 }, /* GL_TRUE */ - { 38215, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */ - { 38235, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */ - { 38258, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */ - { 38278, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */ - { 38299, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */ - { 38321, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */ - { 38343, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */ - { 38363, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */ - { 38384, 0x00009118 }, /* GL_UNSIGNALED */ - { 38398, 0x00001401 }, /* GL_UNSIGNED_BYTE */ - { 38415, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - { 38442, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */ - { 38465, 0x00001405 }, /* GL_UNSIGNED_INT */ - { 38481, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */ - { 38508, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */ - { 38529, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */ - { 38554, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */ - { 38578, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */ - { 38609, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */ - { 38633, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - { 38661, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */ - { 38684, 0x00001403 }, /* GL_UNSIGNED_SHORT */ - { 38702, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - { 38732, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - { 38758, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - { 38788, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - { 38814, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */ - { 38838, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - { 38866, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - { 38894, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */ - { 38921, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ - { 38953, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */ - { 38984, 0x00008CA2 }, /* GL_UPPER_LEFT */ - { 38998, 0x00002A20 }, /* GL_V2F */ - { 39005, 0x00002A21 }, /* GL_V3F */ - { 39012, 0x00008B83 }, /* GL_VALIDATE_STATUS */ - { 39031, 0x00001F00 }, /* GL_VENDOR */ - { 39041, 0x00001F02 }, /* GL_VERSION */ - { 39052, 0x00008074 }, /* GL_VERTEX_ARRAY */ - { 39068, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */ - { 39092, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */ - { 39122, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ - { 39153, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */ - { 39188, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */ - { 39212, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */ - { 39233, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */ - { 39256, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */ - { 39277, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - { 39304, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - { 39332, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - { 39360, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - { 39388, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - { 39416, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - { 39444, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ - { 39472, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - { 39499, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - { 39526, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - { 39553, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - { 39580, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - { 39607, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - { 39634, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - { 39661, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - { 39688, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - { 39715, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ - { 39753, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */ - { 39795, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ - { 39826, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ - { 39861, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ - { 39895, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ - { 39933, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ - { 39964, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ - { 39999, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ - { 40027, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ - { 40059, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ - { 40089, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ - { 40123, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ - { 40151, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ - { 40183, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */ - { 40203, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */ - { 40225, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */ - { 40254, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */ - { 40275, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */ - { 40304, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ - { 40337, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ - { 40369, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */ - { 40396, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ - { 40427, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ - { 40457, 0x00008B31 }, /* GL_VERTEX_SHADER */ - { 40474, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */ - { 40495, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */ - { 40522, 0x00000BA2 }, /* GL_VIEWPORT */ - { 40534, 0x00000800 }, /* GL_VIEWPORT_BIT */ - { 40550, 0x0000911D }, /* GL_WAIT_FAILED */ - { 40565, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */ - { 40585, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - { 40616, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */ - { 40651, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - { 40679, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - { 40704, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - { 40731, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - { 40756, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */ - { 40780, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */ - { 40799, 0x000088B9 }, /* GL_WRITE_ONLY */ - { 40813, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */ - { 40831, 0x00001506 }, /* GL_XOR */ - { 40838, 0x000085B9 }, /* GL_YCBCR_422_APPLE */ - { 40857, 0x00008757 }, /* GL_YCBCR_MESA */ - { 40871, 0x00000000 }, /* GL_ZERO */ - { 40879, 0x00000D16 }, /* GL_ZOOM_X */ - { 40889, 0x00000D17 }, /* GL_ZOOM_Y */ + { 1824, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */ + { 1847, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */ + { 1881, 0x00008764 }, /* GL_BUFFER_SIZE */ + { 1896, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */ + { 1915, 0x00008765 }, /* GL_BUFFER_USAGE */ + { 1931, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */ + { 1951, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */ + { 1970, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */ + { 1996, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */ + { 2019, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */ + { 2047, 0x0000877C }, /* GL_BUMP_TARGET_ATI */ + { 2066, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */ + { 2088, 0x00001400 }, /* GL_BYTE */ + { 2096, 0x00002A24 }, /* GL_C3F_V3F */ + { 2107, 0x00002A26 }, /* GL_C4F_N3F_V3F */ + { 2122, 0x00002A22 }, /* GL_C4UB_V2F */ + { 2134, 0x00002A23 }, /* GL_C4UB_V3F */ + { 2146, 0x00000901 }, /* GL_CCW */ + { 2153, 0x00002900 }, /* GL_CLAMP */ + { 2162, 0x0000812D }, /* GL_CLAMP_TO_BORDER */ + { 2181, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */ + { 2204, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */ + { 2228, 0x0000812F }, /* GL_CLAMP_TO_EDGE */ + { 2245, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */ + { 2267, 0x00001500 }, /* GL_CLEAR */ + { 2276, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */ + { 2301, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */ + { 2330, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */ + { 2356, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ + { 2385, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */ + { 2411, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */ + { 2438, 0x00003000 }, /* GL_CLIP_PLANE0 */ + { 2453, 0x00003001 }, /* GL_CLIP_PLANE1 */ + { 2468, 0x00003002 }, /* GL_CLIP_PLANE2 */ + { 2483, 0x00003003 }, /* GL_CLIP_PLANE3 */ + { 2498, 0x00003004 }, /* GL_CLIP_PLANE4 */ + { 2513, 0x00003005 }, /* GL_CLIP_PLANE5 */ + { 2528, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ + { 2561, 0x00000A00 }, /* GL_COEFF */ + { 2570, 0x00001800 }, /* GL_COLOR */ + { 2579, 0x00008076 }, /* GL_COLOR_ARRAY */ + { 2594, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */ + { 2624, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */ + { 2658, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */ + { 2681, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */ + { 2701, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */ + { 2723, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */ + { 2743, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */ + { 2764, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */ + { 2789, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */ + { 2810, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */ + { 2832, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */ + { 2858, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */ + { 2880, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */ + { 2906, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */ + { 2928, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */ + { 2954, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */ + { 2976, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */ + { 3002, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */ + { 3024, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */ + { 3050, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */ + { 3072, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */ + { 3098, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */ + { 3123, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */ + { 3144, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */ + { 3169, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */ + { 3190, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */ + { 3215, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */ + { 3236, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */ + { 3261, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */ + { 3282, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */ + { 3307, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */ + { 3328, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */ + { 3353, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */ + { 3374, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */ + { 3399, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */ + { 3420, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */ + { 3445, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */ + { 3466, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */ + { 3491, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */ + { 3511, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */ + { 3532, 0x00001900 }, /* GL_COLOR_INDEX */ + { 3547, 0x00001603 }, /* GL_COLOR_INDEXES */ + { 3564, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */ + { 3582, 0x00000B57 }, /* GL_COLOR_MATERIAL */ + { 3600, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */ + { 3623, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */ + { 3651, 0x000080B1 }, /* GL_COLOR_MATRIX */ + { 3667, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */ + { 3687, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */ + { 3715, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */ + { 3747, 0x00008458 }, /* GL_COLOR_SUM */ + { 3760, 0x00008458 }, /* GL_COLOR_SUM_ARB */ + { 3777, 0x000080D0 }, /* GL_COLOR_TABLE */ + { 3792, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */ + { 3818, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */ + { 3848, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */ + { 3878, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */ + { 3898, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */ + { 3922, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */ + { 3947, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */ + { 3976, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */ + { 4005, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */ + { 4027, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */ + { 4053, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */ + { 4079, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */ + { 4105, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */ + { 4135, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */ + { 4165, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */ + { 4195, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */ + { 4229, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */ + { 4263, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ + { 4293, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */ + { 4327, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */ + { 4361, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */ + { 4385, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */ + { 4413, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */ + { 4441, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */ + { 4462, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */ + { 4487, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */ + { 4508, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */ + { 4533, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */ + { 4558, 0x00000C23 }, /* GL_COLOR_WRITEMASK */ + { 4577, 0x00008570 }, /* GL_COMBINE */ + { 4588, 0x00008503 }, /* GL_COMBINE4 */ + { 4600, 0x00008572 }, /* GL_COMBINE_ALPHA */ + { 4617, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */ + { 4638, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */ + { 4659, 0x00008570 }, /* GL_COMBINE_ARB */ + { 4674, 0x00008570 }, /* GL_COMBINE_EXT */ + { 4689, 0x00008571 }, /* GL_COMBINE_RGB */ + { 4704, 0x00008571 }, /* GL_COMBINE_RGB_ARB */ + { 4723, 0x00008571 }, /* GL_COMBINE_RGB_EXT */ + { 4742, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */ + { 4778, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */ + { 4802, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */ + { 4830, 0x00001300 }, /* GL_COMPILE */ + { 4841, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */ + { 4864, 0x00008B81 }, /* GL_COMPILE_STATUS */ + { 4882, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */ + { 4902, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */ + { 4926, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */ + { 4950, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */ + { 4978, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */ + { 5002, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */ + { 5032, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */ + { 5066, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */ + { 5094, 0x000084ED }, /* GL_COMPRESSED_RGB */ + { 5112, 0x000084EE }, /* GL_COMPRESSED_RGBA */ + { 5131, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */ + { 5154, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ + { 5183, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ + { 5216, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ + { 5249, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ + { 5282, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */ + { 5304, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */ + { 5332, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ + { 5364, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */ + { 5389, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */ + { 5420, 0x00008C48 }, /* GL_COMPRESSED_SRGB */ + { 5439, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */ + { 5464, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */ + { 5494, 0x0000911C }, /* GL_CONDITION_SATISFIED */ + { 5517, 0x00008576 }, /* GL_CONSTANT */ + { 5529, 0x00008003 }, /* GL_CONSTANT_ALPHA */ + { 5547, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */ + { 5569, 0x00008576 }, /* GL_CONSTANT_ARB */ + { 5585, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */ + { 5609, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */ + { 5631, 0x00008001 }, /* GL_CONSTANT_COLOR */ + { 5649, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */ + { 5671, 0x00008576 }, /* GL_CONSTANT_EXT */ + { 5687, 0x00008010 }, /* GL_CONVOLUTION_1D */ + { 5705, 0x00008011 }, /* GL_CONVOLUTION_2D */ + { 5723, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */ + { 5751, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */ + { 5782, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */ + { 5809, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */ + { 5840, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */ + { 5867, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */ + { 5898, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */ + { 5926, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */ + { 5958, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */ + { 5980, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */ + { 6006, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */ + { 6028, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */ + { 6054, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */ + { 6075, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */ + { 6100, 0x00008862 }, /* GL_COORD_REPLACE */ + { 6117, 0x00008862 }, /* GL_COORD_REPLACE_ARB */ + { 6138, 0x00008862 }, /* GL_COORD_REPLACE_NV */ + { 6158, 0x00001503 }, /* GL_COPY */ + { 6166, 0x0000150C }, /* GL_COPY_INVERTED */ + { 6183, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */ + { 6203, 0x00008F36 }, /* GL_COPY_READ_BUFFER */ + { 6223, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */ + { 6244, 0x00000B44 }, /* GL_CULL_FACE */ + { 6257, 0x00000B45 }, /* GL_CULL_FACE_MODE */ + { 6275, 0x000081AA }, /* GL_CULL_VERTEX_EXT */ + { 6294, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ + { 6326, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ + { 6361, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */ + { 6382, 0x00000001 }, /* GL_CURRENT_BIT */ + { 6397, 0x00000B00 }, /* GL_CURRENT_COLOR */ + { 6414, 0x00008453 }, /* GL_CURRENT_FOG_COORD */ + { 6435, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */ + { 6461, 0x00000B01 }, /* GL_CURRENT_INDEX */ + { 6478, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */ + { 6500, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */ + { 6528, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */ + { 6549, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ + { 6583, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */ + { 6616, 0x00000B02 }, /* GL_CURRENT_NORMAL */ + { 6634, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */ + { 6664, 0x00008B8D }, /* GL_CURRENT_PROGRAM */ + { 6683, 0x00008865 }, /* GL_CURRENT_QUERY */ + { 6700, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */ + { 6721, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */ + { 6745, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */ + { 6772, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */ + { 6796, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */ + { 6823, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */ + { 6856, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */ + { 6890, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ + { 6923, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */ + { 6950, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */ + { 6976, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */ + { 7001, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */ + { 7030, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */ + { 7052, 0x00000900 }, /* GL_CW */ + { 7058, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */ + { 7079, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */ + { 7100, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */ + { 7120, 0x00002101 }, /* GL_DECAL */ + { 7129, 0x00001E03 }, /* GL_DECR */ + { 7137, 0x00008508 }, /* GL_DECR_WRAP */ + { 7150, 0x00008508 }, /* GL_DECR_WRAP_EXT */ + { 7167, 0x00008B80 }, /* GL_DELETE_STATUS */ + { 7184, 0x00001801 }, /* GL_DEPTH */ + { 7193, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */ + { 7213, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */ + { 7237, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */ + { 7257, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */ + { 7281, 0x00000D1F }, /* GL_DEPTH_BIAS */ + { 7295, 0x00000D56 }, /* GL_DEPTH_BITS */ + { 7309, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */ + { 7329, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */ + { 7354, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */ + { 7374, 0x0000864F }, /* GL_DEPTH_CLAMP */ + { 7389, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */ + { 7407, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */ + { 7428, 0x00001902 }, /* GL_DEPTH_COMPONENT */ + { 7447, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */ + { 7468, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */ + { 7493, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */ + { 7519, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */ + { 7540, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */ + { 7565, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */ + { 7591, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */ + { 7612, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */ + { 7637, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */ + { 7663, 0x00000B74 }, /* GL_DEPTH_FUNC */ + { 7677, 0x00000B70 }, /* GL_DEPTH_RANGE */ + { 7692, 0x00000D1E }, /* GL_DEPTH_SCALE */ + { 7707, 0x000084F9 }, /* GL_DEPTH_STENCIL */ + { 7724, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */ + { 7752, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */ + { 7773, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */ + { 7793, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ + { 7821, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ + { 7849, 0x00000B71 }, /* GL_DEPTH_TEST */ + { 7863, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */ + { 7885, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */ + { 7911, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */ + { 7930, 0x00001201 }, /* GL_DIFFUSE */ + { 7941, 0x00000BD0 }, /* GL_DITHER */ + { 7951, 0x00000A02 }, /* GL_DOMAIN */ + { 7961, 0x00001100 }, /* GL_DONT_CARE */ + { 7974, 0x000086AE }, /* GL_DOT3_RGB */ + { 7986, 0x000086AF }, /* GL_DOT3_RGBA */ + { 7999, 0x000086AF }, /* GL_DOT3_RGBA_ARB */ + { 8016, 0x00008741 }, /* GL_DOT3_RGBA_EXT */ + { 8033, 0x000086AE }, /* GL_DOT3_RGB_ARB */ + { 8049, 0x00008740 }, /* GL_DOT3_RGB_EXT */ + { 8065, 0x0000140A }, /* GL_DOUBLE */ + { 8075, 0x00000C32 }, /* GL_DOUBLEBUFFER */ + { 8091, 0x00000C01 }, /* GL_DRAW_BUFFER */ + { 8106, 0x00008825 }, /* GL_DRAW_BUFFER0 */ + { 8122, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */ + { 8142, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */ + { 8162, 0x00008826 }, /* GL_DRAW_BUFFER1 */ + { 8178, 0x0000882F }, /* GL_DRAW_BUFFER10 */ + { 8195, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */ + { 8216, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */ + { 8237, 0x00008830 }, /* GL_DRAW_BUFFER11 */ + { 8254, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */ + { 8275, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */ + { 8296, 0x00008831 }, /* GL_DRAW_BUFFER12 */ + { 8313, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */ + { 8334, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */ + { 8355, 0x00008832 }, /* GL_DRAW_BUFFER13 */ + { 8372, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */ + { 8393, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */ + { 8414, 0x00008833 }, /* GL_DRAW_BUFFER14 */ + { 8431, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */ + { 8452, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */ + { 8473, 0x00008834 }, /* GL_DRAW_BUFFER15 */ + { 8490, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */ + { 8511, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */ + { 8532, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */ + { 8552, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */ + { 8572, 0x00008827 }, /* GL_DRAW_BUFFER2 */ + { 8588, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */ + { 8608, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */ + { 8628, 0x00008828 }, /* GL_DRAW_BUFFER3 */ + { 8644, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */ + { 8664, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */ + { 8684, 0x00008829 }, /* GL_DRAW_BUFFER4 */ + { 8700, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */ + { 8720, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */ + { 8740, 0x0000882A }, /* GL_DRAW_BUFFER5 */ + { 8756, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */ + { 8776, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */ + { 8796, 0x0000882B }, /* GL_DRAW_BUFFER6 */ + { 8812, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */ + { 8832, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */ + { 8852, 0x0000882C }, /* GL_DRAW_BUFFER7 */ + { 8868, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */ + { 8888, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */ + { 8908, 0x0000882D }, /* GL_DRAW_BUFFER8 */ + { 8924, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */ + { 8944, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */ + { 8964, 0x0000882E }, /* GL_DRAW_BUFFER9 */ + { 8980, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */ + { 9000, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */ + { 9020, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */ + { 9040, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */ + { 9068, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */ + { 9100, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */ + { 9124, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */ + { 9144, 0x00000304 }, /* GL_DST_ALPHA */ + { 9157, 0x00000306 }, /* GL_DST_COLOR */ + { 9170, 0x0000877A }, /* GL_DU8DV8_ATI */ + { 9184, 0x00008779 }, /* GL_DUDV_ATI */ + { 9196, 0x000088EA }, /* GL_DYNAMIC_COPY */ + { 9212, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */ + { 9232, 0x000088E8 }, /* GL_DYNAMIC_DRAW */ + { 9248, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */ + { 9268, 0x000088E9 }, /* GL_DYNAMIC_READ */ + { 9284, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */ + { 9304, 0x00000B43 }, /* GL_EDGE_FLAG */ + { 9317, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */ + { 9336, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ + { 9370, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */ + { 9408, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */ + { 9435, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */ + { 9461, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */ + { 9485, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ + { 9517, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */ + { 9553, 0x00001600 }, /* GL_EMISSION */ + { 9565, 0x00002000 }, /* GL_ENABLE_BIT */ + { 9579, 0x00000202 }, /* GL_EQUAL */ + { 9588, 0x00001509 }, /* GL_EQUIV */ + { 9597, 0x00010000 }, /* GL_EVAL_BIT */ + { 9609, 0x00000800 }, /* GL_EXP */ + { 9616, 0x00000801 }, /* GL_EXP2 */ + { 9624, 0x00001F03 }, /* GL_EXTENSIONS */ + { 9638, 0x00002400 }, /* GL_EYE_LINEAR */ + { 9652, 0x00002502 }, /* GL_EYE_PLANE */ + { 9665, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */ + { 9690, 0x0000855B }, /* GL_EYE_RADIAL_NV */ + { 9707, 0x00000000 }, /* GL_FALSE */ + { 9716, 0x00001101 }, /* GL_FASTEST */ + { 9727, 0x00001C01 }, /* GL_FEEDBACK */ + { 9739, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */ + { 9766, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */ + { 9790, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */ + { 9814, 0x00001B02 }, /* GL_FILL */ + { 9822, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */ + { 9849, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */ + { 9880, 0x00001D00 }, /* GL_FLAT */ + { 9888, 0x00001406 }, /* GL_FLOAT */ + { 9897, 0x00008B5A }, /* GL_FLOAT_MAT2 */ + { 9911, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */ + { 9929, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */ + { 9945, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */ + { 9961, 0x00008B5B }, /* GL_FLOAT_MAT3 */ + { 9975, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */ + { 9993, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */ + { 10009, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */ + { 10025, 0x00008B5C }, /* GL_FLOAT_MAT4 */ + { 10039, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */ + { 10057, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */ + { 10073, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */ + { 10089, 0x00008B50 }, /* GL_FLOAT_VEC2 */ + { 10103, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */ + { 10121, 0x00008B51 }, /* GL_FLOAT_VEC3 */ + { 10135, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */ + { 10153, 0x00008B52 }, /* GL_FLOAT_VEC4 */ + { 10167, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */ + { 10185, 0x00000B60 }, /* GL_FOG */ + { 10192, 0x00000080 }, /* GL_FOG_BIT */ + { 10203, 0x00000B66 }, /* GL_FOG_COLOR */ + { 10216, 0x00008451 }, /* GL_FOG_COORD */ + { 10229, 0x00008451 }, /* GL_FOG_COORDINATE */ + { 10247, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */ + { 10271, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ + { 10310, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */ + { 10353, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */ + { 10385, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ + { 10416, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */ + { 10445, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */ + { 10470, 0x00008457 }, /* GL_FOG_COORD_ARRAY */ + { 10489, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */ + { 10523, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */ + { 10550, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */ + { 10576, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */ + { 10600, 0x00008450 }, /* GL_FOG_COORD_SRC */ + { 10617, 0x00000B62 }, /* GL_FOG_DENSITY */ + { 10632, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */ + { 10656, 0x00000B64 }, /* GL_FOG_END */ + { 10667, 0x00000C54 }, /* GL_FOG_HINT */ + { 10679, 0x00000B61 }, /* GL_FOG_INDEX */ + { 10692, 0x00000B65 }, /* GL_FOG_MODE */ + { 10704, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */ + { 10723, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */ + { 10748, 0x00000B63 }, /* GL_FOG_START */ + { 10761, 0x00008452 }, /* GL_FRAGMENT_DEPTH */ + { 10779, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */ + { 10803, 0x00008B30 }, /* GL_FRAGMENT_SHADER */ + { 10822, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */ + { 10845, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */ + { 10880, 0x00008D40 }, /* GL_FRAMEBUFFER */ + { 10895, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ + { 10932, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ + { 10968, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ + { 11009, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ + { 11050, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ + { 11087, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ + { 11124, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ + { 11162, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */ + { 11204, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ + { 11242, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */ + { 11284, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ + { 11319, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ + { 11358, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */ + { 11407, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ + { 11455, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */ + { 11507, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ + { 11547, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ + { 11591, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ + { 11631, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */ + { 11675, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */ + { 11698, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */ + { 11725, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */ + { 11749, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */ + { 11777, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */ + { 11800, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */ + { 11819, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ + { 11856, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */ + { 11897, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ + { 11938, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ + { 11976, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */ + { 12018, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ + { 12069, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ + { 12107, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ + { 12152, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */ + { 12201, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ + { 12239, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */ + { 12281, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ + { 12319, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */ + { 12361, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ + { 12393, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */ + { 12418, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */ + { 12445, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */ + { 12476, 0x00000404 }, /* GL_FRONT */ + { 12485, 0x00000408 }, /* GL_FRONT_AND_BACK */ + { 12503, 0x00000B46 }, /* GL_FRONT_FACE */ + { 12517, 0x00000400 }, /* GL_FRONT_LEFT */ + { 12531, 0x00000401 }, /* GL_FRONT_RIGHT */ + { 12546, 0x00008006 }, /* GL_FUNC_ADD */ + { 12558, 0x00008006 }, /* GL_FUNC_ADD_EXT */ + { 12574, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */ + { 12599, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */ + { 12628, 0x0000800A }, /* GL_FUNC_SUBTRACT */ + { 12645, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */ + { 12666, 0x00008191 }, /* GL_GENERATE_MIPMAP */ + { 12685, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */ + { 12709, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */ + { 12738, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */ + { 12762, 0x00000206 }, /* GL_GEQUAL */ + { 12772, 0x00000204 }, /* GL_GREATER */ + { 12783, 0x00001904 }, /* GL_GREEN */ + { 12792, 0x00000D19 }, /* GL_GREEN_BIAS */ + { 12806, 0x00000D53 }, /* GL_GREEN_BITS */ + { 12820, 0x00000D18 }, /* GL_GREEN_SCALE */ + { 12835, 0x0000140B }, /* GL_HALF_FLOAT */ + { 12849, 0x00008000 }, /* GL_HINT_BIT */ + { 12861, 0x00008024 }, /* GL_HISTOGRAM */ + { 12874, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */ + { 12898, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */ + { 12926, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */ + { 12949, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */ + { 12976, 0x00008024 }, /* GL_HISTOGRAM_EXT */ + { 12993, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */ + { 13013, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */ + { 13037, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */ + { 13061, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */ + { 13089, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */ + { 13117, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */ + { 13149, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */ + { 13171, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */ + { 13197, 0x0000802D }, /* GL_HISTOGRAM_SINK */ + { 13215, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */ + { 13237, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */ + { 13256, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */ + { 13279, 0x0000862A }, /* GL_IDENTITY_NV */ + { 13294, 0x00008150 }, /* GL_IGNORE_BORDER_HP */ + { 13314, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ + { 13354, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ + { 13392, 0x00001E02 }, /* GL_INCR */ + { 13400, 0x00008507 }, /* GL_INCR_WRAP */ + { 13413, 0x00008507 }, /* GL_INCR_WRAP_EXT */ + { 13430, 0x00008222 }, /* GL_INDEX */ + { 13439, 0x00008077 }, /* GL_INDEX_ARRAY */ + { 13454, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */ + { 13484, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */ + { 13518, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */ + { 13541, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */ + { 13563, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */ + { 13583, 0x00000D51 }, /* GL_INDEX_BITS */ + { 13597, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */ + { 13618, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */ + { 13636, 0x00000C30 }, /* GL_INDEX_MODE */ + { 13650, 0x00000D13 }, /* GL_INDEX_OFFSET */ + { 13666, 0x00000D12 }, /* GL_INDEX_SHIFT */ + { 13681, 0x00000C21 }, /* GL_INDEX_WRITEMASK */ + { 13700, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */ + { 13719, 0x00001404 }, /* GL_INT */ + { 13726, 0x00008049 }, /* GL_INTENSITY */ + { 13739, 0x0000804C }, /* GL_INTENSITY12 */ + { 13754, 0x0000804C }, /* GL_INTENSITY12_EXT */ + { 13773, 0x0000804D }, /* GL_INTENSITY16 */ + { 13788, 0x0000804D }, /* GL_INTENSITY16_EXT */ + { 13807, 0x0000804A }, /* GL_INTENSITY4 */ + { 13821, 0x0000804A }, /* GL_INTENSITY4_EXT */ + { 13839, 0x0000804B }, /* GL_INTENSITY8 */ + { 13853, 0x0000804B }, /* GL_INTENSITY8_EXT */ + { 13871, 0x00008049 }, /* GL_INTENSITY_EXT */ + { 13888, 0x00008575 }, /* GL_INTERPOLATE */ + { 13903, 0x00008575 }, /* GL_INTERPOLATE_ARB */ + { 13922, 0x00008575 }, /* GL_INTERPOLATE_EXT */ + { 13941, 0x00008B53 }, /* GL_INT_VEC2 */ + { 13953, 0x00008B53 }, /* GL_INT_VEC2_ARB */ + { 13969, 0x00008B54 }, /* GL_INT_VEC3 */ + { 13981, 0x00008B54 }, /* GL_INT_VEC3_ARB */ + { 13997, 0x00008B55 }, /* GL_INT_VEC4 */ + { 14009, 0x00008B55 }, /* GL_INT_VEC4_ARB */ + { 14025, 0x00000500 }, /* GL_INVALID_ENUM */ + { 14041, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */ + { 14074, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ + { 14111, 0x00000502 }, /* GL_INVALID_OPERATION */ + { 14132, 0x00000501 }, /* GL_INVALID_VALUE */ + { 14149, 0x0000862B }, /* GL_INVERSE_NV */ + { 14163, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */ + { 14187, 0x0000150A }, /* GL_INVERT */ + { 14197, 0x00001E00 }, /* GL_KEEP */ + { 14205, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */ + { 14231, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */ + { 14261, 0x00000406 }, /* GL_LEFT */ + { 14269, 0x00000203 }, /* GL_LEQUAL */ + { 14279, 0x00000201 }, /* GL_LESS */ + { 14287, 0x00004000 }, /* GL_LIGHT0 */ + { 14297, 0x00004001 }, /* GL_LIGHT1 */ + { 14307, 0x00004002 }, /* GL_LIGHT2 */ + { 14317, 0x00004003 }, /* GL_LIGHT3 */ + { 14327, 0x00004004 }, /* GL_LIGHT4 */ + { 14337, 0x00004005 }, /* GL_LIGHT5 */ + { 14347, 0x00004006 }, /* GL_LIGHT6 */ + { 14357, 0x00004007 }, /* GL_LIGHT7 */ + { 14367, 0x00000B50 }, /* GL_LIGHTING */ + { 14379, 0x00000040 }, /* GL_LIGHTING_BIT */ + { 14395, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */ + { 14418, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */ + { 14447, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */ + { 14480, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ + { 14508, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */ + { 14532, 0x00001B01 }, /* GL_LINE */ + { 14540, 0x00002601 }, /* GL_LINEAR */ + { 14550, 0x00001208 }, /* GL_LINEAR_ATTENUATION */ + { 14572, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ + { 14602, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ + { 14633, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */ + { 14657, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */ + { 14682, 0x00000001 }, /* GL_LINES */ + { 14691, 0x00000004 }, /* GL_LINE_BIT */ + { 14703, 0x00000002 }, /* GL_LINE_LOOP */ + { 14716, 0x00000707 }, /* GL_LINE_RESET_TOKEN */ + { 14736, 0x00000B20 }, /* GL_LINE_SMOOTH */ + { 14751, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */ + { 14771, 0x00000B24 }, /* GL_LINE_STIPPLE */ + { 14787, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */ + { 14811, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */ + { 14834, 0x00000003 }, /* GL_LINE_STRIP */ + { 14848, 0x00000702 }, /* GL_LINE_TOKEN */ + { 14862, 0x00000B21 }, /* GL_LINE_WIDTH */ + { 14876, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */ + { 14902, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */ + { 14922, 0x00008B82 }, /* GL_LINK_STATUS */ + { 14937, 0x00000B32 }, /* GL_LIST_BASE */ + { 14950, 0x00020000 }, /* GL_LIST_BIT */ + { 14962, 0x00000B33 }, /* GL_LIST_INDEX */ + { 14976, 0x00000B30 }, /* GL_LIST_MODE */ + { 14989, 0x00000101 }, /* GL_LOAD */ + { 14997, 0x00000BF1 }, /* GL_LOGIC_OP */ + { 15009, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */ + { 15026, 0x00008CA1 }, /* GL_LOWER_LEFT */ + { 15040, 0x00001909 }, /* GL_LUMINANCE */ + { 15053, 0x00008041 }, /* GL_LUMINANCE12 */ + { 15068, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */ + { 15091, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */ + { 15118, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */ + { 15140, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */ + { 15166, 0x00008041 }, /* GL_LUMINANCE12_EXT */ + { 15185, 0x00008042 }, /* GL_LUMINANCE16 */ + { 15200, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */ + { 15223, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */ + { 15250, 0x00008042 }, /* GL_LUMINANCE16_EXT */ + { 15269, 0x0000803F }, /* GL_LUMINANCE4 */ + { 15283, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */ + { 15304, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */ + { 15329, 0x0000803F }, /* GL_LUMINANCE4_EXT */ + { 15347, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */ + { 15368, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */ + { 15393, 0x00008040 }, /* GL_LUMINANCE8 */ + { 15407, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */ + { 15428, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */ + { 15453, 0x00008040 }, /* GL_LUMINANCE8_EXT */ + { 15471, 0x0000190A }, /* GL_LUMINANCE_ALPHA */ + { 15490, 0x00000D90 }, /* GL_MAP1_COLOR_4 */ + { 15506, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */ + { 15526, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */ + { 15548, 0x00000D91 }, /* GL_MAP1_INDEX */ + { 15562, 0x00000D92 }, /* GL_MAP1_NORMAL */ + { 15577, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */ + { 15601, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */ + { 15625, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */ + { 15649, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */ + { 15673, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */ + { 15690, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */ + { 15707, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ + { 15735, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ + { 15764, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ + { 15793, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ + { 15822, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ + { 15851, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ + { 15880, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ + { 15909, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ + { 15937, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ + { 15965, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ + { 15993, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ + { 16021, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ + { 16049, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ + { 16077, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ + { 16105, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ + { 16133, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ + { 16161, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */ + { 16177, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */ + { 16197, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */ + { 16219, 0x00000DB1 }, /* GL_MAP2_INDEX */ + { 16233, 0x00000DB2 }, /* GL_MAP2_NORMAL */ + { 16248, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */ + { 16272, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */ + { 16296, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */ + { 16320, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */ + { 16344, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */ + { 16361, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */ + { 16378, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ + { 16406, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ + { 16435, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ + { 16464, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ + { 16493, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ + { 16522, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ + { 16551, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ + { 16580, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ + { 16608, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ + { 16636, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ + { 16664, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ + { 16692, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ + { 16720, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ + { 16748, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */ + { 16776, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ + { 16804, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ + { 16832, 0x00000D10 }, /* GL_MAP_COLOR */ + { 16845, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */ + { 16871, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */ + { 16900, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */ + { 16928, 0x00000001 }, /* GL_MAP_READ_BIT */ + { 16944, 0x00000D11 }, /* GL_MAP_STENCIL */ + { 16959, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */ + { 16985, 0x00000002 }, /* GL_MAP_WRITE_BIT */ + { 17002, 0x000088C0 }, /* GL_MATRIX0_ARB */ + { 17017, 0x00008630 }, /* GL_MATRIX0_NV */ + { 17031, 0x000088CA }, /* GL_MATRIX10_ARB */ + { 17047, 0x000088CB }, /* GL_MATRIX11_ARB */ + { 17063, 0x000088CC }, /* GL_MATRIX12_ARB */ + { 17079, 0x000088CD }, /* GL_MATRIX13_ARB */ + { 17095, 0x000088CE }, /* GL_MATRIX14_ARB */ + { 17111, 0x000088CF }, /* GL_MATRIX15_ARB */ + { 17127, 0x000088D0 }, /* GL_MATRIX16_ARB */ + { 17143, 0x000088D1 }, /* GL_MATRIX17_ARB */ + { 17159, 0x000088D2 }, /* GL_MATRIX18_ARB */ + { 17175, 0x000088D3 }, /* GL_MATRIX19_ARB */ + { 17191, 0x000088C1 }, /* GL_MATRIX1_ARB */ + { 17206, 0x00008631 }, /* GL_MATRIX1_NV */ + { 17220, 0x000088D4 }, /* GL_MATRIX20_ARB */ + { 17236, 0x000088D5 }, /* GL_MATRIX21_ARB */ + { 17252, 0x000088D6 }, /* GL_MATRIX22_ARB */ + { 17268, 0x000088D7 }, /* GL_MATRIX23_ARB */ + { 17284, 0x000088D8 }, /* GL_MATRIX24_ARB */ + { 17300, 0x000088D9 }, /* GL_MATRIX25_ARB */ + { 17316, 0x000088DA }, /* GL_MATRIX26_ARB */ + { 17332, 0x000088DB }, /* GL_MATRIX27_ARB */ + { 17348, 0x000088DC }, /* GL_MATRIX28_ARB */ + { 17364, 0x000088DD }, /* GL_MATRIX29_ARB */ + { 17380, 0x000088C2 }, /* GL_MATRIX2_ARB */ + { 17395, 0x00008632 }, /* GL_MATRIX2_NV */ + { 17409, 0x000088DE }, /* GL_MATRIX30_ARB */ + { 17425, 0x000088DF }, /* GL_MATRIX31_ARB */ + { 17441, 0x000088C3 }, /* GL_MATRIX3_ARB */ + { 17456, 0x00008633 }, /* GL_MATRIX3_NV */ + { 17470, 0x000088C4 }, /* GL_MATRIX4_ARB */ + { 17485, 0x00008634 }, /* GL_MATRIX4_NV */ + { 17499, 0x000088C5 }, /* GL_MATRIX5_ARB */ + { 17514, 0x00008635 }, /* GL_MATRIX5_NV */ + { 17528, 0x000088C6 }, /* GL_MATRIX6_ARB */ + { 17543, 0x00008636 }, /* GL_MATRIX6_NV */ + { 17557, 0x000088C7 }, /* GL_MATRIX7_ARB */ + { 17572, 0x00008637 }, /* GL_MATRIX7_NV */ + { 17586, 0x000088C8 }, /* GL_MATRIX8_ARB */ + { 17601, 0x000088C9 }, /* GL_MATRIX9_ARB */ + { 17616, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */ + { 17642, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ + { 17676, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ + { 17707, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ + { 17740, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ + { 17771, 0x00000BA0 }, /* GL_MATRIX_MODE */ + { 17786, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */ + { 17808, 0x00008008 }, /* GL_MAX */ + { 17815, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */ + { 17838, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */ + { 17870, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */ + { 17896, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ + { 17929, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ + { 17955, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + { 17989, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */ + { 18008, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */ + { 18033, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ + { 18062, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ + { 18094, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */ + { 18130, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ + { 18166, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */ + { 18206, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */ + { 18232, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */ + { 18262, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */ + { 18287, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */ + { 18316, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ + { 18345, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */ + { 18378, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */ + { 18398, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */ + { 18422, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */ + { 18446, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */ + { 18470, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */ + { 18495, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */ + { 18513, 0x00008008 }, /* GL_MAX_EXT */ + { 18524, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ + { 18559, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */ + { 18598, 0x00000D31 }, /* GL_MAX_LIGHTS */ + { 18612, 0x00000B31 }, /* GL_MAX_LIST_NESTING */ + { 18632, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ + { 18670, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */ + { 18699, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */ + { 18723, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */ + { 18751, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */ + { 18774, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ + { 18811, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ + { 18847, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ + { 18874, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ + { 18903, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ + { 18937, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ + { 18973, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ + { 19000, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ + { 19032, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ + { 19068, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ + { 19097, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ + { 19126, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */ + { 19154, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ + { 19192, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + { 19236, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + { 19279, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ + { 19313, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + { 19352, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ + { 19389, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ + { 19427, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + { 19470, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + { 19513, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ + { 19543, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ + { 19574, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ + { 19610, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ + { 19646, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */ + { 19676, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ + { 19710, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */ + { 19743, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */ + { 19768, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ + { 19797, 0x00008D57 }, /* GL_MAX_SAMPLES */ + { 19812, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */ + { 19831, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */ + { 19858, 0x00008504 }, /* GL_MAX_SHININESS_NV */ + { 19878, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */ + { 19902, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */ + { 19924, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */ + { 19950, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */ + { 19977, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */ + { 20008, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */ + { 20032, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ + { 20066, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */ + { 20086, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */ + { 20113, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */ + { 20134, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */ + { 20159, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */ + { 20184, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */ + { 20219, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */ + { 20241, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */ + { 20267, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */ + { 20289, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */ + { 20315, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ + { 20349, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ + { 20387, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ + { 20420, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */ + { 20457, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */ + { 20481, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */ + { 20502, 0x00008007 }, /* GL_MIN */ + { 20509, 0x0000802E }, /* GL_MINMAX */ + { 20519, 0x0000802E }, /* GL_MINMAX_EXT */ + { 20533, 0x0000802F }, /* GL_MINMAX_FORMAT */ + { 20550, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */ + { 20571, 0x00008030 }, /* GL_MINMAX_SINK */ + { 20586, 0x00008030 }, /* GL_MINMAX_SINK_EXT */ + { 20605, 0x00008007 }, /* GL_MIN_EXT */ + { 20616, 0x00008370 }, /* GL_MIRRORED_REPEAT */ + { 20635, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */ + { 20658, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */ + { 20681, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */ + { 20701, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */ + { 20721, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ + { 20751, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */ + { 20779, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ + { 20807, 0x00001700 }, /* GL_MODELVIEW */ + { 20820, 0x00001700 }, /* GL_MODELVIEW0_ARB */ + { 20838, 0x0000872A }, /* GL_MODELVIEW10_ARB */ + { 20857, 0x0000872B }, /* GL_MODELVIEW11_ARB */ + { 20876, 0x0000872C }, /* GL_MODELVIEW12_ARB */ + { 20895, 0x0000872D }, /* GL_MODELVIEW13_ARB */ + { 20914, 0x0000872E }, /* GL_MODELVIEW14_ARB */ + { 20933, 0x0000872F }, /* GL_MODELVIEW15_ARB */ + { 20952, 0x00008730 }, /* GL_MODELVIEW16_ARB */ + { 20971, 0x00008731 }, /* GL_MODELVIEW17_ARB */ + { 20990, 0x00008732 }, /* GL_MODELVIEW18_ARB */ + { 21009, 0x00008733 }, /* GL_MODELVIEW19_ARB */ + { 21028, 0x0000850A }, /* GL_MODELVIEW1_ARB */ + { 21046, 0x00008734 }, /* GL_MODELVIEW20_ARB */ + { 21065, 0x00008735 }, /* GL_MODELVIEW21_ARB */ + { 21084, 0x00008736 }, /* GL_MODELVIEW22_ARB */ + { 21103, 0x00008737 }, /* GL_MODELVIEW23_ARB */ + { 21122, 0x00008738 }, /* GL_MODELVIEW24_ARB */ + { 21141, 0x00008739 }, /* GL_MODELVIEW25_ARB */ + { 21160, 0x0000873A }, /* GL_MODELVIEW26_ARB */ + { 21179, 0x0000873B }, /* GL_MODELVIEW27_ARB */ + { 21198, 0x0000873C }, /* GL_MODELVIEW28_ARB */ + { 21217, 0x0000873D }, /* GL_MODELVIEW29_ARB */ + { 21236, 0x00008722 }, /* GL_MODELVIEW2_ARB */ + { 21254, 0x0000873E }, /* GL_MODELVIEW30_ARB */ + { 21273, 0x0000873F }, /* GL_MODELVIEW31_ARB */ + { 21292, 0x00008723 }, /* GL_MODELVIEW3_ARB */ + { 21310, 0x00008724 }, /* GL_MODELVIEW4_ARB */ + { 21328, 0x00008725 }, /* GL_MODELVIEW5_ARB */ + { 21346, 0x00008726 }, /* GL_MODELVIEW6_ARB */ + { 21364, 0x00008727 }, /* GL_MODELVIEW7_ARB */ + { 21382, 0x00008728 }, /* GL_MODELVIEW8_ARB */ + { 21400, 0x00008729 }, /* GL_MODELVIEW9_ARB */ + { 21418, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */ + { 21438, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */ + { 21465, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */ + { 21490, 0x00002100 }, /* GL_MODULATE */ + { 21502, 0x00008744 }, /* GL_MODULATE_ADD_ATI */ + { 21522, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */ + { 21549, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */ + { 21574, 0x00000103 }, /* GL_MULT */ + { 21582, 0x0000809D }, /* GL_MULTISAMPLE */ + { 21597, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */ + { 21617, 0x0000809D }, /* GL_MULTISAMPLE_ARB */ + { 21636, 0x20000000 }, /* GL_MULTISAMPLE_BIT */ + { 21655, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */ + { 21679, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */ + { 21702, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */ + { 21732, 0x00002A25 }, /* GL_N3F_V3F */ + { 21743, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */ + { 21763, 0x0000150E }, /* GL_NAND */ + { 21771, 0x00002600 }, /* GL_NEAREST */ + { 21782, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ + { 21813, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ + { 21845, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */ + { 21870, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */ + { 21896, 0x00000200 }, /* GL_NEVER */ + { 21905, 0x00001102 }, /* GL_NICEST */ + { 21915, 0x00000000 }, /* GL_NONE */ + { 21923, 0x00001505 }, /* GL_NOOP */ + { 21931, 0x00001508 }, /* GL_NOR */ + { 21938, 0x00000BA1 }, /* GL_NORMALIZE */ + { 21951, 0x00008075 }, /* GL_NORMAL_ARRAY */ + { 21967, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ + { 21998, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */ + { 22033, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */ + { 22057, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */ + { 22080, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */ + { 22101, 0x00008511 }, /* GL_NORMAL_MAP */ + { 22115, 0x00008511 }, /* GL_NORMAL_MAP_ARB */ + { 22133, 0x00008511 }, /* GL_NORMAL_MAP_NV */ + { 22150, 0x00000205 }, /* GL_NOTEQUAL */ + { 22162, 0x00000000 }, /* GL_NO_ERROR */ + { 22174, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ + { 22208, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */ + { 22246, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */ + { 22278, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */ + { 22320, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */ + { 22350, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */ + { 22390, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */ + { 22421, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */ + { 22450, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */ + { 22478, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */ + { 22508, 0x00002401 }, /* GL_OBJECT_LINEAR */ + { 22525, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */ + { 22551, 0x00002501 }, /* GL_OBJECT_PLANE */ + { 22567, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */ + { 22602, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */ + { 22624, 0x00009112 }, /* GL_OBJECT_TYPE */ + { 22639, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */ + { 22658, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */ + { 22688, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */ + { 22709, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */ + { 22737, 0x00000001 }, /* GL_ONE */ + { 22744, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */ + { 22772, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */ + { 22804, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */ + { 22832, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */ + { 22864, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */ + { 22887, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */ + { 22910, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */ + { 22933, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */ + { 22956, 0x00008598 }, /* GL_OPERAND0_ALPHA */ + { 22974, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */ + { 22996, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */ + { 23018, 0x00008590 }, /* GL_OPERAND0_RGB */ + { 23034, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */ + { 23054, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */ + { 23074, 0x00008599 }, /* GL_OPERAND1_ALPHA */ + { 23092, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */ + { 23114, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */ + { 23136, 0x00008591 }, /* GL_OPERAND1_RGB */ + { 23152, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */ + { 23172, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */ + { 23192, 0x0000859A }, /* GL_OPERAND2_ALPHA */ + { 23210, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */ + { 23232, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */ + { 23254, 0x00008592 }, /* GL_OPERAND2_RGB */ + { 23270, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */ + { 23290, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */ + { 23310, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */ + { 23331, 0x00008593 }, /* GL_OPERAND3_RGB_NV */ + { 23350, 0x00001507 }, /* GL_OR */ + { 23356, 0x00000A01 }, /* GL_ORDER */ + { 23365, 0x0000150D }, /* GL_OR_INVERTED */ + { 23380, 0x0000150B }, /* GL_OR_REVERSE */ + { 23394, 0x00000505 }, /* GL_OUT_OF_MEMORY */ + { 23411, 0x00000D05 }, /* GL_PACK_ALIGNMENT */ + { 23429, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */ + { 23450, 0x00008758 }, /* GL_PACK_INVERT_MESA */ + { 23470, 0x00000D01 }, /* GL_PACK_LSB_FIRST */ + { 23488, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */ + { 23507, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */ + { 23527, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */ + { 23547, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */ + { 23565, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */ + { 23584, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */ + { 23609, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */ + { 23633, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */ + { 23654, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */ + { 23676, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */ + { 23698, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */ + { 23723, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */ + { 23747, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */ + { 23768, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */ + { 23790, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */ + { 23812, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */ + { 23834, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */ + { 23865, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */ + { 23885, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */ + { 23910, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */ + { 23930, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */ + { 23955, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */ + { 23975, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */ + { 24000, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */ + { 24020, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */ + { 24045, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */ + { 24065, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */ + { 24090, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */ + { 24110, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */ + { 24135, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */ + { 24155, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */ + { 24180, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */ + { 24200, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */ + { 24225, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */ + { 24245, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */ + { 24270, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */ + { 24290, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */ + { 24315, 0x00000020 }, /* GL_PIXEL_MODE_BIT */ + { 24333, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */ + { 24354, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */ + { 24383, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ + { 24416, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */ + { 24441, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */ + { 24464, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */ + { 24495, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ + { 24530, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */ + { 24557, 0x00001B00 }, /* GL_POINT */ + { 24566, 0x00000000 }, /* GL_POINTS */ + { 24576, 0x00000002 }, /* GL_POINT_BIT */ + { 24589, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */ + { 24619, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */ + { 24653, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */ + { 24687, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */ + { 24722, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */ + { 24751, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */ + { 24784, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */ + { 24817, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */ + { 24851, 0x00000B11 }, /* GL_POINT_SIZE */ + { 24865, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */ + { 24891, 0x00008127 }, /* GL_POINT_SIZE_MAX */ + { 24909, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */ + { 24931, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */ + { 24953, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */ + { 24976, 0x00008126 }, /* GL_POINT_SIZE_MIN */ + { 24994, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */ + { 25016, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */ + { 25038, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */ + { 25061, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */ + { 25081, 0x00000B10 }, /* GL_POINT_SMOOTH */ + { 25097, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */ + { 25118, 0x00008861 }, /* GL_POINT_SPRITE */ + { 25134, 0x00008861 }, /* GL_POINT_SPRITE_ARB */ + { 25154, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */ + { 25183, 0x00008861 }, /* GL_POINT_SPRITE_NV */ + { 25202, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */ + { 25228, 0x00000701 }, /* GL_POINT_TOKEN */ + { 25243, 0x00000009 }, /* GL_POLYGON */ + { 25254, 0x00000008 }, /* GL_POLYGON_BIT */ + { 25269, 0x00000B40 }, /* GL_POLYGON_MODE */ + { 25285, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */ + { 25308, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */ + { 25333, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */ + { 25356, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */ + { 25379, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */ + { 25403, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */ + { 25427, 0x00000B41 }, /* GL_POLYGON_SMOOTH */ + { 25445, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */ + { 25468, 0x00000B42 }, /* GL_POLYGON_STIPPLE */ + { 25487, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */ + { 25510, 0x00000703 }, /* GL_POLYGON_TOKEN */ + { 25527, 0x00001203 }, /* GL_POSITION */ + { 25539, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ + { 25571, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */ + { 25607, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ + { 25640, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */ + { 25677, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ + { 25708, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */ + { 25743, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ + { 25775, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */ + { 25811, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ + { 25844, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ + { 25876, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */ + { 25912, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ + { 25945, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */ + { 25982, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */ + { 26012, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */ + { 26046, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */ + { 26077, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */ + { 26112, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ + { 26143, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */ + { 26178, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ + { 26210, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */ + { 26246, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */ + { 26276, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */ + { 26310, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */ + { 26341, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */ + { 26376, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */ + { 26408, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */ + { 26439, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */ + { 26474, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */ + { 26506, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */ + { 26542, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */ + { 26571, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */ + { 26604, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */ + { 26634, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */ + { 26668, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ + { 26707, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ + { 26740, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ + { 26780, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ + { 26814, 0x00008578 }, /* GL_PREVIOUS */ + { 26826, 0x00008578 }, /* GL_PREVIOUS_ARB */ + { 26842, 0x00008578 }, /* GL_PREVIOUS_EXT */ + { 26858, 0x00008577 }, /* GL_PRIMARY_COLOR */ + { 26875, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */ + { 26896, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */ + { 26917, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ + { 26950, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ + { 26982, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */ + { 27005, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */ + { 27028, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */ + { 27058, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */ + { 27087, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */ + { 27115, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */ + { 27137, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */ + { 27165, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */ + { 27193, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */ + { 27215, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */ + { 27236, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + { 27276, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + { 27315, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ + { 27345, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + { 27380, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ + { 27413, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ + { 27447, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + { 27486, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + { 27525, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */ + { 27547, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */ + { 27573, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */ + { 27597, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */ + { 27620, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */ + { 27642, 0x00008628 }, /* GL_PROGRAM_STRING_NV */ + { 27663, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */ + { 27684, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */ + { 27711, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ + { 27743, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ + { 27775, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ + { 27810, 0x00001701 }, /* GL_PROJECTION */ + { 27824, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */ + { 27845, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */ + { 27871, 0x00008E4F }, /* GL_PROVOKING_VERTEX */ + { 27891, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */ + { 27915, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */ + { 27936, 0x00008025 }, /* GL_PROXY_HISTOGRAM */ + { 27955, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */ + { 27978, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ + { 28017, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ + { 28055, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */ + { 28075, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */ + { 28105, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */ + { 28129, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */ + { 28149, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */ + { 28179, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */ + { 28203, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */ + { 28223, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ + { 28256, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */ + { 28282, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */ + { 28312, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ + { 28343, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */ + { 28373, 0x00008A1D }, /* GL_PURGEABLE_APPLE */ + { 28392, 0x00002003 }, /* GL_Q */ + { 28397, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */ + { 28422, 0x00000007 }, /* GL_QUADS */ + { 28431, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ + { 28475, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */ + { 28523, 0x00008614 }, /* GL_QUAD_MESH_SUN */ + { 28540, 0x00000008 }, /* GL_QUAD_STRIP */ + { 28554, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */ + { 28584, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */ + { 28611, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */ + { 28633, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */ + { 28659, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */ + { 28679, 0x00008866 }, /* GL_QUERY_RESULT */ + { 28695, 0x00008866 }, /* GL_QUERY_RESULT_ARB */ + { 28715, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */ + { 28741, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */ + { 28771, 0x00008E13 }, /* GL_QUERY_WAIT_NV */ + { 28788, 0x00002002 }, /* GL_R */ + { 28793, 0x00002A10 }, /* GL_R3_G3_B2 */ + { 28805, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ + { 28838, 0x00000C02 }, /* GL_READ_BUFFER */ + { 28853, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */ + { 28873, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */ + { 28901, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ + { 28933, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */ + { 28957, 0x000088B8 }, /* GL_READ_ONLY */ + { 28970, 0x000088B8 }, /* GL_READ_ONLY_ARB */ + { 28987, 0x000088BA }, /* GL_READ_WRITE */ + { 29001, 0x000088BA }, /* GL_READ_WRITE_ARB */ + { 29019, 0x00001903 }, /* GL_RED */ + { 29026, 0x00008016 }, /* GL_REDUCE */ + { 29036, 0x00008016 }, /* GL_REDUCE_EXT */ + { 29050, 0x00000D15 }, /* GL_RED_BIAS */ + { 29062, 0x00000D52 }, /* GL_RED_BITS */ + { 29074, 0x00000D14 }, /* GL_RED_SCALE */ + { 29087, 0x00008512 }, /* GL_REFLECTION_MAP */ + { 29105, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */ + { 29127, 0x00008512 }, /* GL_REFLECTION_MAP_NV */ + { 29148, 0x00008A19 }, /* GL_RELEASED_APPLE */ + { 29166, 0x00001C00 }, /* GL_RENDER */ + { 29176, 0x00008D41 }, /* GL_RENDERBUFFER */ + { 29192, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */ + { 29219, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */ + { 29243, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */ + { 29271, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */ + { 29297, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */ + { 29324, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */ + { 29344, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */ + { 29371, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */ + { 29394, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */ + { 29421, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */ + { 29453, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ + { 29489, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */ + { 29514, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */ + { 29538, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */ + { 29566, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */ + { 29595, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */ + { 29617, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */ + { 29643, 0x00001F01 }, /* GL_RENDERER */ + { 29655, 0x00000C40 }, /* GL_RENDER_MODE */ + { 29670, 0x00002901 }, /* GL_REPEAT */ + { 29680, 0x00001E01 }, /* GL_REPLACE */ + { 29691, 0x00008062 }, /* GL_REPLACE_EXT */ + { 29706, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */ + { 29729, 0x0000803A }, /* GL_RESCALE_NORMAL */ + { 29747, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */ + { 29769, 0x00008A1B }, /* GL_RETAINED_APPLE */ + { 29787, 0x00000102 }, /* GL_RETURN */ + { 29797, 0x00001907 }, /* GL_RGB */ + { 29804, 0x00008052 }, /* GL_RGB10 */ + { 29813, 0x00008059 }, /* GL_RGB10_A2 */ + { 29825, 0x00008059 }, /* GL_RGB10_A2_EXT */ + { 29841, 0x00008052 }, /* GL_RGB10_EXT */ + { 29854, 0x00008053 }, /* GL_RGB12 */ + { 29863, 0x00008053 }, /* GL_RGB12_EXT */ + { 29876, 0x00008054 }, /* GL_RGB16 */ + { 29885, 0x00008054 }, /* GL_RGB16_EXT */ + { 29898, 0x0000804E }, /* GL_RGB2_EXT */ + { 29910, 0x0000804F }, /* GL_RGB4 */ + { 29918, 0x0000804F }, /* GL_RGB4_EXT */ + { 29930, 0x000083A1 }, /* GL_RGB4_S3TC */ + { 29943, 0x00008050 }, /* GL_RGB5 */ + { 29951, 0x00008057 }, /* GL_RGB5_A1 */ + { 29962, 0x00008057 }, /* GL_RGB5_A1_EXT */ + { 29977, 0x00008050 }, /* GL_RGB5_EXT */ + { 29989, 0x00008051 }, /* GL_RGB8 */ + { 29997, 0x00008051 }, /* GL_RGB8_EXT */ + { 30009, 0x00001908 }, /* GL_RGBA */ + { 30017, 0x0000805A }, /* GL_RGBA12 */ + { 30027, 0x0000805A }, /* GL_RGBA12_EXT */ + { 30041, 0x0000805B }, /* GL_RGBA16 */ + { 30051, 0x0000805B }, /* GL_RGBA16_EXT */ + { 30065, 0x00008055 }, /* GL_RGBA2 */ + { 30074, 0x00008055 }, /* GL_RGBA2_EXT */ + { 30087, 0x00008056 }, /* GL_RGBA4 */ + { 30096, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */ + { 30115, 0x00008056 }, /* GL_RGBA4_EXT */ + { 30128, 0x000083A3 }, /* GL_RGBA4_S3TC */ + { 30142, 0x00008058 }, /* GL_RGBA8 */ + { 30151, 0x00008058 }, /* GL_RGBA8_EXT */ + { 30164, 0x00008F97 }, /* GL_RGBA8_SNORM */ + { 30179, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */ + { 30197, 0x00000C31 }, /* GL_RGBA_MODE */ + { 30210, 0x000083A2 }, /* GL_RGBA_S3TC */ + { 30223, 0x00008F93 }, /* GL_RGBA_SNORM */ + { 30237, 0x000083A0 }, /* GL_RGB_S3TC */ + { 30249, 0x00008573 }, /* GL_RGB_SCALE */ + { 30262, 0x00008573 }, /* GL_RGB_SCALE_ARB */ + { 30279, 0x00008573 }, /* GL_RGB_SCALE_EXT */ + { 30296, 0x00000407 }, /* GL_RIGHT */ + { 30305, 0x00002000 }, /* GL_S */ + { 30310, 0x00008B5D }, /* GL_SAMPLER_1D */ + { 30324, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */ + { 30345, 0x00008B5E }, /* GL_SAMPLER_2D */ + { 30359, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */ + { 30380, 0x00008B5F }, /* GL_SAMPLER_3D */ + { 30394, 0x00008B60 }, /* GL_SAMPLER_CUBE */ + { 30410, 0x000080A9 }, /* GL_SAMPLES */ + { 30421, 0x000086B4 }, /* GL_SAMPLES_3DFX */ + { 30437, 0x000080A9 }, /* GL_SAMPLES_ARB */ + { 30452, 0x00008914 }, /* GL_SAMPLES_PASSED */ + { 30470, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */ + { 30492, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ + { 30520, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */ + { 30552, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */ + { 30575, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */ + { 30602, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */ + { 30620, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */ + { 30643, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */ + { 30665, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */ + { 30684, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */ + { 30707, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */ + { 30733, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */ + { 30763, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */ + { 30788, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */ + { 30817, 0x00080000 }, /* GL_SCISSOR_BIT */ + { 30832, 0x00000C10 }, /* GL_SCISSOR_BOX */ + { 30847, 0x00000C11 }, /* GL_SCISSOR_TEST */ + { 30863, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */ + { 30888, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ + { 30928, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */ + { 30972, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ + { 31005, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ + { 31035, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ + { 31067, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ + { 31097, 0x00001C02 }, /* GL_SELECT */ + { 31107, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */ + { 31135, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */ + { 31160, 0x00008012 }, /* GL_SEPARABLE_2D */ + { 31176, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */ + { 31203, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */ + { 31234, 0x0000150F }, /* GL_SET */ + { 31241, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */ + { 31262, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */ + { 31286, 0x00008B4F }, /* GL_SHADER_TYPE */ + { 31301, 0x00000B54 }, /* GL_SHADE_MODEL */ + { 31316, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */ + { 31344, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */ + { 31367, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */ + { 31397, 0x00001601 }, /* GL_SHININESS */ + { 31410, 0x00001402 }, /* GL_SHORT */ + { 31419, 0x00009119 }, /* GL_SIGNALED */ + { 31431, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */ + { 31452, 0x000081F9 }, /* GL_SINGLE_COLOR */ + { 31468, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */ + { 31488, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */ + { 31507, 0x00008C46 }, /* GL_SLUMINANCE */ + { 31521, 0x00008C47 }, /* GL_SLUMINANCE8 */ + { 31536, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */ + { 31558, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */ + { 31578, 0x00001D01 }, /* GL_SMOOTH */ + { 31588, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */ + { 31621, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */ + { 31648, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */ + { 31681, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */ + { 31708, 0x00008588 }, /* GL_SOURCE0_ALPHA */ + { 31725, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */ + { 31746, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */ + { 31767, 0x00008580 }, /* GL_SOURCE0_RGB */ + { 31782, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */ + { 31801, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */ + { 31820, 0x00008589 }, /* GL_SOURCE1_ALPHA */ + { 31837, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */ + { 31858, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */ + { 31879, 0x00008581 }, /* GL_SOURCE1_RGB */ + { 31894, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */ + { 31913, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */ + { 31932, 0x0000858A }, /* GL_SOURCE2_ALPHA */ + { 31949, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */ + { 31970, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */ + { 31991, 0x00008582 }, /* GL_SOURCE2_RGB */ + { 32006, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */ + { 32025, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */ + { 32044, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */ + { 32064, 0x00008583 }, /* GL_SOURCE3_RGB_NV */ + { 32082, 0x00001202 }, /* GL_SPECULAR */ + { 32094, 0x00002402 }, /* GL_SPHERE_MAP */ + { 32108, 0x00001206 }, /* GL_SPOT_CUTOFF */ + { 32123, 0x00001204 }, /* GL_SPOT_DIRECTION */ + { 32141, 0x00001205 }, /* GL_SPOT_EXPONENT */ + { 32158, 0x00008588 }, /* GL_SRC0_ALPHA */ + { 32172, 0x00008580 }, /* GL_SRC0_RGB */ + { 32184, 0x00008589 }, /* GL_SRC1_ALPHA */ + { 32198, 0x00008581 }, /* GL_SRC1_RGB */ + { 32210, 0x0000858A }, /* GL_SRC2_ALPHA */ + { 32224, 0x00008582 }, /* GL_SRC2_RGB */ + { 32236, 0x00000302 }, /* GL_SRC_ALPHA */ + { 32249, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */ + { 32271, 0x00000300 }, /* GL_SRC_COLOR */ + { 32284, 0x00008C40 }, /* GL_SRGB */ + { 32292, 0x00008C41 }, /* GL_SRGB8 */ + { 32301, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */ + { 32317, 0x00008C42 }, /* GL_SRGB_ALPHA */ + { 32331, 0x00000503 }, /* GL_STACK_OVERFLOW */ + { 32349, 0x00000504 }, /* GL_STACK_UNDERFLOW */ + { 32368, 0x000088E6 }, /* GL_STATIC_COPY */ + { 32383, 0x000088E6 }, /* GL_STATIC_COPY_ARB */ + { 32402, 0x000088E4 }, /* GL_STATIC_DRAW */ + { 32417, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */ + { 32436, 0x000088E5 }, /* GL_STATIC_READ */ + { 32451, 0x000088E5 }, /* GL_STATIC_READ_ARB */ + { 32470, 0x00001802 }, /* GL_STENCIL */ + { 32481, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */ + { 32503, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */ + { 32529, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */ + { 32550, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */ + { 32575, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */ + { 32596, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */ + { 32621, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ + { 32653, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */ + { 32689, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ + { 32721, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */ + { 32757, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */ + { 32777, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */ + { 32804, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */ + { 32830, 0x00000D57 }, /* GL_STENCIL_BITS */ + { 32846, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */ + { 32868, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */ + { 32891, 0x00000B94 }, /* GL_STENCIL_FAIL */ + { 32907, 0x00000B92 }, /* GL_STENCIL_FUNC */ + { 32923, 0x00001901 }, /* GL_STENCIL_INDEX */ + { 32940, 0x00008D46 }, /* GL_STENCIL_INDEX1 */ + { 32958, 0x00008D49 }, /* GL_STENCIL_INDEX16 */ + { 32977, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */ + { 33000, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */ + { 33022, 0x00008D47 }, /* GL_STENCIL_INDEX4 */ + { 33040, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */ + { 33062, 0x00008D48 }, /* GL_STENCIL_INDEX8 */ + { 33080, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */ + { 33102, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */ + { 33123, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */ + { 33150, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */ + { 33177, 0x00000B97 }, /* GL_STENCIL_REF */ + { 33192, 0x00000B90 }, /* GL_STENCIL_TEST */ + { 33208, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ + { 33237, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */ + { 33259, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */ + { 33280, 0x00000C33 }, /* GL_STEREO */ + { 33290, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */ + { 33314, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */ + { 33339, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */ + { 33363, 0x000088E2 }, /* GL_STREAM_COPY */ + { 33378, 0x000088E2 }, /* GL_STREAM_COPY_ARB */ + { 33397, 0x000088E0 }, /* GL_STREAM_DRAW */ + { 33412, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */ + { 33431, 0x000088E1 }, /* GL_STREAM_READ */ + { 33446, 0x000088E1 }, /* GL_STREAM_READ_ARB */ + { 33465, 0x00000D50 }, /* GL_SUBPIXEL_BITS */ + { 33482, 0x000084E7 }, /* GL_SUBTRACT */ + { 33494, 0x000084E7 }, /* GL_SUBTRACT_ARB */ + { 33510, 0x00009113 }, /* GL_SYNC_CONDITION */ + { 33528, 0x00009116 }, /* GL_SYNC_FENCE */ + { 33542, 0x00009115 }, /* GL_SYNC_FLAGS */ + { 33556, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */ + { 33583, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */ + { 33613, 0x00009114 }, /* GL_SYNC_STATUS */ + { 33628, 0x00002001 }, /* GL_T */ + { 33633, 0x00002A2A }, /* GL_T2F_C3F_V3F */ + { 33648, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */ + { 33667, 0x00002A29 }, /* GL_T2F_C4UB_V3F */ + { 33683, 0x00002A2B }, /* GL_T2F_N3F_V3F */ + { 33698, 0x00002A27 }, /* GL_T2F_V3F */ + { 33709, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */ + { 33728, 0x00002A28 }, /* GL_T4F_V4F */ + { 33739, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */ + { 33762, 0x00001702 }, /* GL_TEXTURE */ + { 33773, 0x000084C0 }, /* GL_TEXTURE0 */ + { 33785, 0x000084C0 }, /* GL_TEXTURE0_ARB */ + { 33801, 0x000084C1 }, /* GL_TEXTURE1 */ + { 33813, 0x000084CA }, /* GL_TEXTURE10 */ + { 33826, 0x000084CA }, /* GL_TEXTURE10_ARB */ + { 33843, 0x000084CB }, /* GL_TEXTURE11 */ + { 33856, 0x000084CB }, /* GL_TEXTURE11_ARB */ + { 33873, 0x000084CC }, /* GL_TEXTURE12 */ + { 33886, 0x000084CC }, /* GL_TEXTURE12_ARB */ + { 33903, 0x000084CD }, /* GL_TEXTURE13 */ + { 33916, 0x000084CD }, /* GL_TEXTURE13_ARB */ + { 33933, 0x000084CE }, /* GL_TEXTURE14 */ + { 33946, 0x000084CE }, /* GL_TEXTURE14_ARB */ + { 33963, 0x000084CF }, /* GL_TEXTURE15 */ + { 33976, 0x000084CF }, /* GL_TEXTURE15_ARB */ + { 33993, 0x000084D0 }, /* GL_TEXTURE16 */ + { 34006, 0x000084D0 }, /* GL_TEXTURE16_ARB */ + { 34023, 0x000084D1 }, /* GL_TEXTURE17 */ + { 34036, 0x000084D1 }, /* GL_TEXTURE17_ARB */ + { 34053, 0x000084D2 }, /* GL_TEXTURE18 */ + { 34066, 0x000084D2 }, /* GL_TEXTURE18_ARB */ + { 34083, 0x000084D3 }, /* GL_TEXTURE19 */ + { 34096, 0x000084D3 }, /* GL_TEXTURE19_ARB */ + { 34113, 0x000084C1 }, /* GL_TEXTURE1_ARB */ + { 34129, 0x000084C2 }, /* GL_TEXTURE2 */ + { 34141, 0x000084D4 }, /* GL_TEXTURE20 */ + { 34154, 0x000084D4 }, /* GL_TEXTURE20_ARB */ + { 34171, 0x000084D5 }, /* GL_TEXTURE21 */ + { 34184, 0x000084D5 }, /* GL_TEXTURE21_ARB */ + { 34201, 0x000084D6 }, /* GL_TEXTURE22 */ + { 34214, 0x000084D6 }, /* GL_TEXTURE22_ARB */ + { 34231, 0x000084D7 }, /* GL_TEXTURE23 */ + { 34244, 0x000084D7 }, /* GL_TEXTURE23_ARB */ + { 34261, 0x000084D8 }, /* GL_TEXTURE24 */ + { 34274, 0x000084D8 }, /* GL_TEXTURE24_ARB */ + { 34291, 0x000084D9 }, /* GL_TEXTURE25 */ + { 34304, 0x000084D9 }, /* GL_TEXTURE25_ARB */ + { 34321, 0x000084DA }, /* GL_TEXTURE26 */ + { 34334, 0x000084DA }, /* GL_TEXTURE26_ARB */ + { 34351, 0x000084DB }, /* GL_TEXTURE27 */ + { 34364, 0x000084DB }, /* GL_TEXTURE27_ARB */ + { 34381, 0x000084DC }, /* GL_TEXTURE28 */ + { 34394, 0x000084DC }, /* GL_TEXTURE28_ARB */ + { 34411, 0x000084DD }, /* GL_TEXTURE29 */ + { 34424, 0x000084DD }, /* GL_TEXTURE29_ARB */ + { 34441, 0x000084C2 }, /* GL_TEXTURE2_ARB */ + { 34457, 0x000084C3 }, /* GL_TEXTURE3 */ + { 34469, 0x000084DE }, /* GL_TEXTURE30 */ + { 34482, 0x000084DE }, /* GL_TEXTURE30_ARB */ + { 34499, 0x000084DF }, /* GL_TEXTURE31 */ + { 34512, 0x000084DF }, /* GL_TEXTURE31_ARB */ + { 34529, 0x000084C3 }, /* GL_TEXTURE3_ARB */ + { 34545, 0x000084C4 }, /* GL_TEXTURE4 */ + { 34557, 0x000084C4 }, /* GL_TEXTURE4_ARB */ + { 34573, 0x000084C5 }, /* GL_TEXTURE5 */ + { 34585, 0x000084C5 }, /* GL_TEXTURE5_ARB */ + { 34601, 0x000084C6 }, /* GL_TEXTURE6 */ + { 34613, 0x000084C6 }, /* GL_TEXTURE6_ARB */ + { 34629, 0x000084C7 }, /* GL_TEXTURE7 */ + { 34641, 0x000084C7 }, /* GL_TEXTURE7_ARB */ + { 34657, 0x000084C8 }, /* GL_TEXTURE8 */ + { 34669, 0x000084C8 }, /* GL_TEXTURE8_ARB */ + { 34685, 0x000084C9 }, /* GL_TEXTURE9 */ + { 34697, 0x000084C9 }, /* GL_TEXTURE9_ARB */ + { 34713, 0x00000DE0 }, /* GL_TEXTURE_1D */ + { 34727, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */ + { 34751, 0x00000DE1 }, /* GL_TEXTURE_2D */ + { 34765, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */ + { 34789, 0x0000806F }, /* GL_TEXTURE_3D */ + { 34803, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */ + { 34825, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */ + { 34851, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */ + { 34873, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */ + { 34895, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */ + { 34927, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */ + { 34949, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */ + { 34981, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */ + { 35003, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */ + { 35031, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */ + { 35063, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ + { 35096, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */ + { 35128, 0x00040000 }, /* GL_TEXTURE_BIT */ + { 35143, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */ + { 35164, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */ + { 35189, 0x00001005 }, /* GL_TEXTURE_BORDER */ + { 35207, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */ + { 35231, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ + { 35262, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ + { 35292, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ + { 35322, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ + { 35357, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ + { 35388, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + { 35426, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */ + { 35453, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ + { 35485, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ + { 35519, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */ + { 35543, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */ + { 35571, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */ + { 35595, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */ + { 35623, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ + { 35656, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */ + { 35680, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */ + { 35702, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */ + { 35724, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */ + { 35750, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */ + { 35784, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ + { 35817, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */ + { 35854, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */ + { 35882, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */ + { 35914, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */ + { 35937, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ + { 35975, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */ + { 36017, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */ + { 36048, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */ + { 36076, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ + { 36106, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */ + { 36134, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */ + { 36154, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */ + { 36178, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ + { 36209, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */ + { 36244, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ + { 36275, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */ + { 36310, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ + { 36341, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */ + { 36376, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ + { 36407, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */ + { 36442, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ + { 36473, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */ + { 36508, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ + { 36539, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */ + { 36574, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */ + { 36603, 0x00008071 }, /* GL_TEXTURE_DEPTH */ + { 36620, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */ + { 36642, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */ + { 36668, 0x00002300 }, /* GL_TEXTURE_ENV */ + { 36683, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */ + { 36704, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */ + { 36724, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */ + { 36750, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */ + { 36770, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */ + { 36787, 0x00000C62 }, /* GL_TEXTURE_GEN_R */ + { 36804, 0x00000C60 }, /* GL_TEXTURE_GEN_S */ + { 36821, 0x00000C61 }, /* GL_TEXTURE_GEN_T */ + { 36838, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */ + { 36863, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */ + { 36885, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */ + { 36911, 0x00001001 }, /* GL_TEXTURE_HEIGHT */ + { 36929, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */ + { 36955, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */ + { 36981, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */ + { 37011, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */ + { 37038, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */ + { 37063, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */ + { 37083, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */ + { 37107, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ + { 37134, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ + { 37161, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ + { 37188, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */ + { 37214, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */ + { 37244, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */ + { 37266, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */ + { 37284, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ + { 37314, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ + { 37342, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ + { 37370, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ + { 37398, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */ + { 37419, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */ + { 37438, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */ + { 37460, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */ + { 37479, 0x00008066 }, /* GL_TEXTURE_PRIORITY */ + { 37499, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */ + { 37529, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */ + { 37560, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */ + { 37585, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */ + { 37609, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */ + { 37629, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */ + { 37653, 0x00008067 }, /* GL_TEXTURE_RESIDENT */ + { 37673, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */ + { 37696, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */ + { 37720, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */ + { 37748, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */ + { 37778, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */ + { 37803, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ + { 37837, 0x00001000 }, /* GL_TEXTURE_WIDTH */ + { 37854, 0x00008072 }, /* GL_TEXTURE_WRAP_R */ + { 37872, 0x00002802 }, /* GL_TEXTURE_WRAP_S */ + { 37890, 0x00002803 }, /* GL_TEXTURE_WRAP_T */ + { 37908, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */ + { 37927, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */ + { 37947, 0x00008648 }, /* GL_TRACK_MATRIX_NV */ + { 37966, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */ + { 37995, 0x00001000 }, /* GL_TRANSFORM_BIT */ + { 38012, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */ + { 38038, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */ + { 38068, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ + { 38100, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ + { 38130, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */ + { 38164, 0x0000862C }, /* GL_TRANSPOSE_NV */ + { 38180, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */ + { 38211, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */ + { 38246, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */ + { 38274, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */ + { 38306, 0x00000004 }, /* GL_TRIANGLES */ + { 38319, 0x00000006 }, /* GL_TRIANGLE_FAN */ + { 38335, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */ + { 38356, 0x00000005 }, /* GL_TRIANGLE_STRIP */ + { 38374, 0x00000001 }, /* GL_TRUE */ + { 38382, 0x00008A1C }, /* GL_UNDEFINED_APPLE */ + { 38401, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */ + { 38421, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */ + { 38444, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */ + { 38464, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */ + { 38485, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */ + { 38507, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */ + { 38529, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */ + { 38549, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */ + { 38570, 0x00009118 }, /* GL_UNSIGNALED */ + { 38584, 0x00001401 }, /* GL_UNSIGNED_BYTE */ + { 38601, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */ + { 38628, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */ + { 38651, 0x00001405 }, /* GL_UNSIGNED_INT */ + { 38667, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */ + { 38694, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */ + { 38715, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */ + { 38740, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */ + { 38764, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */ + { 38795, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */ + { 38819, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */ + { 38847, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */ + { 38870, 0x00001403 }, /* GL_UNSIGNED_SHORT */ + { 38888, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ + { 38918, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */ + { 38944, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ + { 38974, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */ + { 39000, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */ + { 39024, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */ + { 39052, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */ + { 39080, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */ + { 39107, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ + { 39139, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */ + { 39170, 0x00008CA2 }, /* GL_UPPER_LEFT */ + { 39184, 0x00002A20 }, /* GL_V2F */ + { 39191, 0x00002A21 }, /* GL_V3F */ + { 39198, 0x00008B83 }, /* GL_VALIDATE_STATUS */ + { 39217, 0x00001F00 }, /* GL_VENDOR */ + { 39227, 0x00001F02 }, /* GL_VERSION */ + { 39238, 0x00008074 }, /* GL_VERTEX_ARRAY */ + { 39254, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */ + { 39278, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */ + { 39308, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ + { 39339, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */ + { 39374, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */ + { 39398, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */ + { 39419, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */ + { 39442, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */ + { 39463, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ + { 39490, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ + { 39518, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ + { 39546, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ + { 39574, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ + { 39602, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ + { 39630, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ + { 39658, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ + { 39685, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ + { 39712, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ + { 39739, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ + { 39766, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ + { 39793, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ + { 39820, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ + { 39847, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ + { 39874, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ + { 39901, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ + { 39939, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */ + { 39981, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ + { 40012, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ + { 40047, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ + { 40081, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ + { 40119, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ + { 40150, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ + { 40185, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ + { 40213, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ + { 40245, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ + { 40275, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ + { 40309, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ + { 40337, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ + { 40369, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */ + { 40389, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */ + { 40411, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */ + { 40440, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */ + { 40461, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */ + { 40490, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ + { 40523, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ + { 40555, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */ + { 40582, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ + { 40613, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ + { 40643, 0x00008B31 }, /* GL_VERTEX_SHADER */ + { 40660, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */ + { 40681, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */ + { 40708, 0x00000BA2 }, /* GL_VIEWPORT */ + { 40720, 0x00000800 }, /* GL_VIEWPORT_BIT */ + { 40736, 0x00008A1A }, /* GL_VOLATILE_APPLE */ + { 40754, 0x0000911D }, /* GL_WAIT_FAILED */ + { 40769, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */ + { 40789, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ + { 40820, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */ + { 40855, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */ + { 40883, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */ + { 40908, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ + { 40935, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */ + { 40960, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */ + { 40984, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */ + { 41003, 0x000088B9 }, /* GL_WRITE_ONLY */ + { 41017, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */ + { 41035, 0x00001506 }, /* GL_XOR */ + { 41042, 0x000085B9 }, /* GL_YCBCR_422_APPLE */ + { 41061, 0x00008757 }, /* GL_YCBCR_MESA */ + { 41075, 0x00000000 }, /* GL_ZERO */ + { 41083, 0x00000D16 }, /* GL_ZOOM_X */ + { 41093, 0x00000D17 }, /* GL_ZOOM_Y */ }; -static const unsigned reduced_enums[1347] = +static const unsigned reduced_enums[1357] = { - 479, /* GL_FALSE */ - 701, /* GL_LINES */ - 703, /* GL_LINE_LOOP */ - 710, /* GL_LINE_STRIP */ - 1766, /* GL_TRIANGLES */ - 1769, /* GL_TRIANGLE_STRIP */ - 1767, /* GL_TRIANGLE_FAN */ - 1285, /* GL_QUADS */ - 1289, /* GL_QUAD_STRIP */ - 1171, /* GL_POLYGON */ - 1183, /* GL_POLYGON_STIPPLE_BIT */ - 1132, /* GL_PIXEL_MODE_BIT */ - 688, /* GL_LIGHTING_BIT */ - 509, /* GL_FOG_BIT */ + 480, /* GL_FALSE */ + 703, /* GL_LINES */ + 705, /* GL_LINE_LOOP */ + 712, /* GL_LINE_STRIP */ + 1774, /* GL_TRIANGLES */ + 1777, /* GL_TRIANGLE_STRIP */ + 1775, /* GL_TRIANGLE_FAN */ + 1288, /* GL_QUADS */ + 1292, /* GL_QUAD_STRIP */ + 1173, /* GL_POLYGON */ + 1185, /* GL_POLYGON_STIPPLE_BIT */ + 1134, /* GL_PIXEL_MODE_BIT */ + 690, /* GL_LIGHTING_BIT */ + 510, /* GL_FOG_BIT */ 8, /* GL_ACCUM */ - 720, /* GL_LOAD */ - 1344, /* GL_RETURN */ - 1004, /* GL_MULT */ + 722, /* GL_LOAD */ + 1353, /* GL_RETURN */ + 1006, /* GL_MULT */ 23, /* GL_ADD */ - 1020, /* GL_NEVER */ - 678, /* GL_LESS */ - 469, /* GL_EQUAL */ - 677, /* GL_LEQUAL */ - 599, /* GL_GREATER */ - 1035, /* GL_NOTEQUAL */ - 598, /* GL_GEQUAL */ + 1022, /* GL_NEVER */ + 680, /* GL_LESS */ + 470, /* GL_EQUAL */ + 679, /* GL_LEQUAL */ + 600, /* GL_GREATER */ + 1037, /* GL_NOTEQUAL */ + 599, /* GL_GEQUAL */ 47, /* GL_ALWAYS */ - 1485, /* GL_SRC_COLOR */ - 1065, /* GL_ONE_MINUS_SRC_COLOR */ - 1483, /* GL_SRC_ALPHA */ - 1064, /* GL_ONE_MINUS_SRC_ALPHA */ - 448, /* GL_DST_ALPHA */ - 1062, /* GL_ONE_MINUS_DST_ALPHA */ - 449, /* GL_DST_COLOR */ - 1063, /* GL_ONE_MINUS_DST_COLOR */ - 1484, /* GL_SRC_ALPHA_SATURATE */ - 586, /* GL_FRONT_LEFT */ - 587, /* GL_FRONT_RIGHT */ + 1494, /* GL_SRC_COLOR */ + 1067, /* GL_ONE_MINUS_SRC_COLOR */ + 1492, /* GL_SRC_ALPHA */ + 1066, /* GL_ONE_MINUS_SRC_ALPHA */ + 449, /* GL_DST_ALPHA */ + 1064, /* GL_ONE_MINUS_DST_ALPHA */ + 450, /* GL_DST_COLOR */ + 1065, /* GL_ONE_MINUS_DST_COLOR */ + 1493, /* GL_SRC_ALPHA_SATURATE */ + 587, /* GL_FRONT_LEFT */ + 588, /* GL_FRONT_RIGHT */ 69, /* GL_BACK_LEFT */ 70, /* GL_BACK_RIGHT */ - 583, /* GL_FRONT */ + 584, /* GL_FRONT */ 68, /* GL_BACK */ - 676, /* GL_LEFT */ - 1386, /* GL_RIGHT */ - 584, /* GL_FRONT_AND_BACK */ + 678, /* GL_LEFT */ + 1395, /* GL_RIGHT */ + 585, /* GL_FRONT_AND_BACK */ 63, /* GL_AUX0 */ 64, /* GL_AUX1 */ 65, /* GL_AUX2 */ 66, /* GL_AUX3 */ - 665, /* GL_INVALID_ENUM */ - 669, /* GL_INVALID_VALUE */ - 668, /* GL_INVALID_OPERATION */ - 1490, /* GL_STACK_OVERFLOW */ - 1491, /* GL_STACK_UNDERFLOW */ - 1090, /* GL_OUT_OF_MEMORY */ - 666, /* GL_INVALID_FRAMEBUFFER_OPERATION */ + 667, /* GL_INVALID_ENUM */ + 671, /* GL_INVALID_VALUE */ + 670, /* GL_INVALID_OPERATION */ + 1499, /* GL_STACK_OVERFLOW */ + 1500, /* GL_STACK_UNDERFLOW */ + 1092, /* GL_OUT_OF_MEMORY */ + 668, /* GL_INVALID_FRAMEBUFFER_OPERATION */ 0, /* GL_2D */ 2, /* GL_3D */ 3, /* GL_3D_COLOR */ 4, /* GL_3D_COLOR_TEXTURE */ 6, /* GL_4D_COLOR_TEXTURE */ - 1110, /* GL_PASS_THROUGH_TOKEN */ - 1170, /* GL_POINT_TOKEN */ - 711, /* GL_LINE_TOKEN */ - 1184, /* GL_POLYGON_TOKEN */ + 1112, /* GL_PASS_THROUGH_TOKEN */ + 1172, /* GL_POINT_TOKEN */ + 713, /* GL_LINE_TOKEN */ + 1186, /* GL_POLYGON_TOKEN */ 74, /* GL_BITMAP_TOKEN */ - 447, /* GL_DRAW_PIXEL_TOKEN */ - 301, /* GL_COPY_PIXEL_TOKEN */ - 704, /* GL_LINE_RESET_TOKEN */ - 472, /* GL_EXP */ - 473, /* GL_EXP2 */ - 337, /* GL_CW */ - 125, /* GL_CCW */ - 146, /* GL_COEFF */ - 1087, /* GL_ORDER */ - 384, /* GL_DOMAIN */ - 311, /* GL_CURRENT_COLOR */ - 314, /* GL_CURRENT_INDEX */ - 320, /* GL_CURRENT_NORMAL */ - 333, /* GL_CURRENT_TEXTURE_COORDS */ - 325, /* GL_CURRENT_RASTER_COLOR */ - 327, /* GL_CURRENT_RASTER_INDEX */ - 331, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ - 328, /* GL_CURRENT_RASTER_POSITION */ - 329, /* GL_CURRENT_RASTER_POSITION_VALID */ - 326, /* GL_CURRENT_RASTER_DISTANCE */ - 1163, /* GL_POINT_SMOOTH */ - 1152, /* GL_POINT_SIZE */ - 1162, /* GL_POINT_SIZE_RANGE */ - 1153, /* GL_POINT_SIZE_GRANULARITY */ - 705, /* GL_LINE_SMOOTH */ - 712, /* GL_LINE_WIDTH */ - 714, /* GL_LINE_WIDTH_RANGE */ - 713, /* GL_LINE_WIDTH_GRANULARITY */ - 707, /* GL_LINE_STIPPLE */ - 708, /* GL_LINE_STIPPLE_PATTERN */ - 709, /* GL_LINE_STIPPLE_REPEAT */ - 719, /* GL_LIST_MODE */ - 885, /* GL_MAX_LIST_NESTING */ - 716, /* GL_LIST_BASE */ - 718, /* GL_LIST_INDEX */ - 1173, /* GL_POLYGON_MODE */ - 1180, /* GL_POLYGON_SMOOTH */ - 1182, /* GL_POLYGON_STIPPLE */ - 458, /* GL_EDGE_FLAG */ - 304, /* GL_CULL_FACE */ - 305, /* GL_CULL_FACE_MODE */ - 585, /* GL_FRONT_FACE */ - 687, /* GL_LIGHTING */ - 692, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ - 693, /* GL_LIGHT_MODEL_TWO_SIDE */ - 689, /* GL_LIGHT_MODEL_AMBIENT */ - 1432, /* GL_SHADE_MODEL */ - 193, /* GL_COLOR_MATERIAL_FACE */ - 194, /* GL_COLOR_MATERIAL_PARAMETER */ - 192, /* GL_COLOR_MATERIAL */ - 508, /* GL_FOG */ - 530, /* GL_FOG_INDEX */ - 526, /* GL_FOG_DENSITY */ - 534, /* GL_FOG_START */ - 528, /* GL_FOG_END */ - 531, /* GL_FOG_MODE */ - 510, /* GL_FOG_COLOR */ - 370, /* GL_DEPTH_RANGE */ - 378, /* GL_DEPTH_TEST */ - 381, /* GL_DEPTH_WRITEMASK */ - 358, /* GL_DEPTH_CLEAR_VALUE */ - 369, /* GL_DEPTH_FUNC */ + 448, /* GL_DRAW_PIXEL_TOKEN */ + 302, /* GL_COPY_PIXEL_TOKEN */ + 706, /* GL_LINE_RESET_TOKEN */ + 473, /* GL_EXP */ + 474, /* GL_EXP2 */ + 338, /* GL_CW */ + 126, /* GL_CCW */ + 147, /* GL_COEFF */ + 1089, /* GL_ORDER */ + 385, /* GL_DOMAIN */ + 312, /* GL_CURRENT_COLOR */ + 315, /* GL_CURRENT_INDEX */ + 321, /* GL_CURRENT_NORMAL */ + 334, /* GL_CURRENT_TEXTURE_COORDS */ + 326, /* GL_CURRENT_RASTER_COLOR */ + 328, /* GL_CURRENT_RASTER_INDEX */ + 332, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ + 329, /* GL_CURRENT_RASTER_POSITION */ + 330, /* GL_CURRENT_RASTER_POSITION_VALID */ + 327, /* GL_CURRENT_RASTER_DISTANCE */ + 1165, /* GL_POINT_SMOOTH */ + 1154, /* GL_POINT_SIZE */ + 1164, /* GL_POINT_SIZE_RANGE */ + 1155, /* GL_POINT_SIZE_GRANULARITY */ + 707, /* GL_LINE_SMOOTH */ + 714, /* GL_LINE_WIDTH */ + 716, /* GL_LINE_WIDTH_RANGE */ + 715, /* GL_LINE_WIDTH_GRANULARITY */ + 709, /* GL_LINE_STIPPLE */ + 710, /* GL_LINE_STIPPLE_PATTERN */ + 711, /* GL_LINE_STIPPLE_REPEAT */ + 721, /* GL_LIST_MODE */ + 887, /* GL_MAX_LIST_NESTING */ + 718, /* GL_LIST_BASE */ + 720, /* GL_LIST_INDEX */ + 1175, /* GL_POLYGON_MODE */ + 1182, /* GL_POLYGON_SMOOTH */ + 1184, /* GL_POLYGON_STIPPLE */ + 459, /* GL_EDGE_FLAG */ + 305, /* GL_CULL_FACE */ + 306, /* GL_CULL_FACE_MODE */ + 586, /* GL_FRONT_FACE */ + 689, /* GL_LIGHTING */ + 694, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ + 695, /* GL_LIGHT_MODEL_TWO_SIDE */ + 691, /* GL_LIGHT_MODEL_AMBIENT */ + 1441, /* GL_SHADE_MODEL */ + 194, /* GL_COLOR_MATERIAL_FACE */ + 195, /* GL_COLOR_MATERIAL_PARAMETER */ + 193, /* GL_COLOR_MATERIAL */ + 509, /* GL_FOG */ + 531, /* GL_FOG_INDEX */ + 527, /* GL_FOG_DENSITY */ + 535, /* GL_FOG_START */ + 529, /* GL_FOG_END */ + 532, /* GL_FOG_MODE */ + 511, /* GL_FOG_COLOR */ + 371, /* GL_DEPTH_RANGE */ + 379, /* GL_DEPTH_TEST */ + 382, /* GL_DEPTH_WRITEMASK */ + 359, /* GL_DEPTH_CLEAR_VALUE */ + 370, /* GL_DEPTH_FUNC */ 12, /* GL_ACCUM_CLEAR_VALUE */ - 1530, /* GL_STENCIL_TEST */ - 1514, /* GL_STENCIL_CLEAR_VALUE */ - 1516, /* GL_STENCIL_FUNC */ - 1532, /* GL_STENCIL_VALUE_MASK */ - 1515, /* GL_STENCIL_FAIL */ - 1527, /* GL_STENCIL_PASS_DEPTH_FAIL */ - 1528, /* GL_STENCIL_PASS_DEPTH_PASS */ - 1529, /* GL_STENCIL_REF */ - 1533, /* GL_STENCIL_WRITEMASK */ - 853, /* GL_MATRIX_MODE */ - 1025, /* GL_NORMALIZE */ - 1861, /* GL_VIEWPORT */ - 999, /* GL_MODELVIEW_STACK_DEPTH */ - 1263, /* GL_PROJECTION_STACK_DEPTH */ - 1740, /* GL_TEXTURE_STACK_DEPTH */ - 997, /* GL_MODELVIEW_MATRIX */ - 1262, /* GL_PROJECTION_MATRIX */ - 1723, /* GL_TEXTURE_MATRIX */ + 1539, /* GL_STENCIL_TEST */ + 1523, /* GL_STENCIL_CLEAR_VALUE */ + 1525, /* GL_STENCIL_FUNC */ + 1541, /* GL_STENCIL_VALUE_MASK */ + 1524, /* GL_STENCIL_FAIL */ + 1536, /* GL_STENCIL_PASS_DEPTH_FAIL */ + 1537, /* GL_STENCIL_PASS_DEPTH_PASS */ + 1538, /* GL_STENCIL_REF */ + 1542, /* GL_STENCIL_WRITEMASK */ + 855, /* GL_MATRIX_MODE */ + 1027, /* GL_NORMALIZE */ + 1870, /* GL_VIEWPORT */ + 1001, /* GL_MODELVIEW_STACK_DEPTH */ + 1265, /* GL_PROJECTION_STACK_DEPTH */ + 1749, /* GL_TEXTURE_STACK_DEPTH */ + 999, /* GL_MODELVIEW_MATRIX */ + 1264, /* GL_PROJECTION_MATRIX */ + 1732, /* GL_TEXTURE_MATRIX */ 61, /* GL_ATTRIB_STACK_DEPTH */ - 136, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ + 137, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ 43, /* GL_ALPHA_TEST */ 44, /* GL_ALPHA_TEST_FUNC */ 45, /* GL_ALPHA_TEST_REF */ - 383, /* GL_DITHER */ + 384, /* GL_DITHER */ 78, /* GL_BLEND_DST */ 87, /* GL_BLEND_SRC */ 75, /* GL_BLEND */ - 722, /* GL_LOGIC_OP_MODE */ - 639, /* GL_INDEX_LOGIC_OP */ - 191, /* GL_COLOR_LOGIC_OP */ + 724, /* GL_LOGIC_OP_MODE */ + 641, /* GL_INDEX_LOGIC_OP */ + 192, /* GL_COLOR_LOGIC_OP */ 67, /* GL_AUX_BUFFERS */ - 394, /* GL_DRAW_BUFFER */ - 1299, /* GL_READ_BUFFER */ - 1413, /* GL_SCISSOR_BOX */ - 1414, /* GL_SCISSOR_TEST */ - 638, /* GL_INDEX_CLEAR_VALUE */ - 643, /* GL_INDEX_WRITEMASK */ - 188, /* GL_COLOR_CLEAR_VALUE */ - 230, /* GL_COLOR_WRITEMASK */ - 640, /* GL_INDEX_MODE */ - 1379, /* GL_RGBA_MODE */ - 393, /* GL_DOUBLEBUFFER */ - 1534, /* GL_STEREO */ - 1337, /* GL_RENDER_MODE */ - 1111, /* GL_PERSPECTIVE_CORRECTION_HINT */ - 1164, /* GL_POINT_SMOOTH_HINT */ - 706, /* GL_LINE_SMOOTH_HINT */ - 1181, /* GL_POLYGON_SMOOTH_HINT */ - 529, /* GL_FOG_HINT */ - 1704, /* GL_TEXTURE_GEN_S */ - 1705, /* GL_TEXTURE_GEN_T */ - 1703, /* GL_TEXTURE_GEN_R */ - 1702, /* GL_TEXTURE_GEN_Q */ - 1124, /* GL_PIXEL_MAP_I_TO_I */ - 1130, /* GL_PIXEL_MAP_S_TO_S */ - 1126, /* GL_PIXEL_MAP_I_TO_R */ - 1122, /* GL_PIXEL_MAP_I_TO_G */ - 1120, /* GL_PIXEL_MAP_I_TO_B */ - 1118, /* GL_PIXEL_MAP_I_TO_A */ - 1128, /* GL_PIXEL_MAP_R_TO_R */ - 1116, /* GL_PIXEL_MAP_G_TO_G */ - 1114, /* GL_PIXEL_MAP_B_TO_B */ - 1112, /* GL_PIXEL_MAP_A_TO_A */ - 1125, /* GL_PIXEL_MAP_I_TO_I_SIZE */ - 1131, /* GL_PIXEL_MAP_S_TO_S_SIZE */ - 1127, /* GL_PIXEL_MAP_I_TO_R_SIZE */ - 1123, /* GL_PIXEL_MAP_I_TO_G_SIZE */ - 1121, /* GL_PIXEL_MAP_I_TO_B_SIZE */ - 1119, /* GL_PIXEL_MAP_I_TO_A_SIZE */ - 1129, /* GL_PIXEL_MAP_R_TO_R_SIZE */ - 1117, /* GL_PIXEL_MAP_G_TO_G_SIZE */ - 1115, /* GL_PIXEL_MAP_B_TO_B_SIZE */ - 1113, /* GL_PIXEL_MAP_A_TO_A_SIZE */ - 1778, /* GL_UNPACK_SWAP_BYTES */ - 1773, /* GL_UNPACK_LSB_FIRST */ - 1774, /* GL_UNPACK_ROW_LENGTH */ - 1777, /* GL_UNPACK_SKIP_ROWS */ - 1776, /* GL_UNPACK_SKIP_PIXELS */ - 1771, /* GL_UNPACK_ALIGNMENT */ - 1099, /* GL_PACK_SWAP_BYTES */ - 1094, /* GL_PACK_LSB_FIRST */ - 1095, /* GL_PACK_ROW_LENGTH */ - 1098, /* GL_PACK_SKIP_ROWS */ - 1097, /* GL_PACK_SKIP_PIXELS */ - 1091, /* GL_PACK_ALIGNMENT */ - 800, /* GL_MAP_COLOR */ - 805, /* GL_MAP_STENCIL */ - 642, /* GL_INDEX_SHIFT */ - 641, /* GL_INDEX_OFFSET */ - 1313, /* GL_RED_SCALE */ - 1311, /* GL_RED_BIAS */ - 1879, /* GL_ZOOM_X */ - 1880, /* GL_ZOOM_Y */ - 603, /* GL_GREEN_SCALE */ - 601, /* GL_GREEN_BIAS */ + 395, /* GL_DRAW_BUFFER */ + 1306, /* GL_READ_BUFFER */ + 1422, /* GL_SCISSOR_BOX */ + 1423, /* GL_SCISSOR_TEST */ + 640, /* GL_INDEX_CLEAR_VALUE */ + 645, /* GL_INDEX_WRITEMASK */ + 189, /* GL_COLOR_CLEAR_VALUE */ + 231, /* GL_COLOR_WRITEMASK */ + 642, /* GL_INDEX_MODE */ + 1388, /* GL_RGBA_MODE */ + 394, /* GL_DOUBLEBUFFER */ + 1543, /* GL_STEREO */ + 1345, /* GL_RENDER_MODE */ + 1113, /* GL_PERSPECTIVE_CORRECTION_HINT */ + 1166, /* GL_POINT_SMOOTH_HINT */ + 708, /* GL_LINE_SMOOTH_HINT */ + 1183, /* GL_POLYGON_SMOOTH_HINT */ + 530, /* GL_FOG_HINT */ + 1713, /* GL_TEXTURE_GEN_S */ + 1714, /* GL_TEXTURE_GEN_T */ + 1712, /* GL_TEXTURE_GEN_R */ + 1711, /* GL_TEXTURE_GEN_Q */ + 1126, /* GL_PIXEL_MAP_I_TO_I */ + 1132, /* GL_PIXEL_MAP_S_TO_S */ + 1128, /* GL_PIXEL_MAP_I_TO_R */ + 1124, /* GL_PIXEL_MAP_I_TO_G */ + 1122, /* GL_PIXEL_MAP_I_TO_B */ + 1120, /* GL_PIXEL_MAP_I_TO_A */ + 1130, /* GL_PIXEL_MAP_R_TO_R */ + 1118, /* GL_PIXEL_MAP_G_TO_G */ + 1116, /* GL_PIXEL_MAP_B_TO_B */ + 1114, /* GL_PIXEL_MAP_A_TO_A */ + 1127, /* GL_PIXEL_MAP_I_TO_I_SIZE */ + 1133, /* GL_PIXEL_MAP_S_TO_S_SIZE */ + 1129, /* GL_PIXEL_MAP_I_TO_R_SIZE */ + 1125, /* GL_PIXEL_MAP_I_TO_G_SIZE */ + 1123, /* GL_PIXEL_MAP_I_TO_B_SIZE */ + 1121, /* GL_PIXEL_MAP_I_TO_A_SIZE */ + 1131, /* GL_PIXEL_MAP_R_TO_R_SIZE */ + 1119, /* GL_PIXEL_MAP_G_TO_G_SIZE */ + 1117, /* GL_PIXEL_MAP_B_TO_B_SIZE */ + 1115, /* GL_PIXEL_MAP_A_TO_A_SIZE */ + 1787, /* GL_UNPACK_SWAP_BYTES */ + 1782, /* GL_UNPACK_LSB_FIRST */ + 1783, /* GL_UNPACK_ROW_LENGTH */ + 1786, /* GL_UNPACK_SKIP_ROWS */ + 1785, /* GL_UNPACK_SKIP_PIXELS */ + 1780, /* GL_UNPACK_ALIGNMENT */ + 1101, /* GL_PACK_SWAP_BYTES */ + 1096, /* GL_PACK_LSB_FIRST */ + 1097, /* GL_PACK_ROW_LENGTH */ + 1100, /* GL_PACK_SKIP_ROWS */ + 1099, /* GL_PACK_SKIP_PIXELS */ + 1093, /* GL_PACK_ALIGNMENT */ + 802, /* GL_MAP_COLOR */ + 807, /* GL_MAP_STENCIL */ + 644, /* GL_INDEX_SHIFT */ + 643, /* GL_INDEX_OFFSET */ + 1320, /* GL_RED_SCALE */ + 1318, /* GL_RED_BIAS */ + 1889, /* GL_ZOOM_X */ + 1890, /* GL_ZOOM_Y */ + 604, /* GL_GREEN_SCALE */ + 602, /* GL_GREEN_BIAS */ 93, /* GL_BLUE_SCALE */ 91, /* GL_BLUE_BIAS */ 42, /* GL_ALPHA_SCALE */ 40, /* GL_ALPHA_BIAS */ - 371, /* GL_DEPTH_SCALE */ - 351, /* GL_DEPTH_BIAS */ - 880, /* GL_MAX_EVAL_ORDER */ - 884, /* GL_MAX_LIGHTS */ - 862, /* GL_MAX_CLIP_PLANES */ - 932, /* GL_MAX_TEXTURE_SIZE */ - 890, /* GL_MAX_PIXEL_MAP_TABLE */ - 858, /* GL_MAX_ATTRIB_STACK_DEPTH */ - 887, /* GL_MAX_MODELVIEW_STACK_DEPTH */ - 888, /* GL_MAX_NAME_STACK_DEPTH */ - 916, /* GL_MAX_PROJECTION_STACK_DEPTH */ - 933, /* GL_MAX_TEXTURE_STACK_DEPTH */ - 947, /* GL_MAX_VIEWPORT_DIMS */ - 859, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ - 1544, /* GL_SUBPIXEL_BITS */ - 637, /* GL_INDEX_BITS */ - 1312, /* GL_RED_BITS */ - 602, /* GL_GREEN_BITS */ + 372, /* GL_DEPTH_SCALE */ + 352, /* GL_DEPTH_BIAS */ + 882, /* GL_MAX_EVAL_ORDER */ + 886, /* GL_MAX_LIGHTS */ + 864, /* GL_MAX_CLIP_PLANES */ + 934, /* GL_MAX_TEXTURE_SIZE */ + 892, /* GL_MAX_PIXEL_MAP_TABLE */ + 860, /* GL_MAX_ATTRIB_STACK_DEPTH */ + 889, /* GL_MAX_MODELVIEW_STACK_DEPTH */ + 890, /* GL_MAX_NAME_STACK_DEPTH */ + 918, /* GL_MAX_PROJECTION_STACK_DEPTH */ + 935, /* GL_MAX_TEXTURE_STACK_DEPTH */ + 949, /* GL_MAX_VIEWPORT_DIMS */ + 861, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ + 1553, /* GL_SUBPIXEL_BITS */ + 639, /* GL_INDEX_BITS */ + 1319, /* GL_RED_BITS */ + 603, /* GL_GREEN_BITS */ 92, /* GL_BLUE_BITS */ 41, /* GL_ALPHA_BITS */ - 352, /* GL_DEPTH_BITS */ - 1512, /* GL_STENCIL_BITS */ + 353, /* GL_DEPTH_BITS */ + 1521, /* GL_STENCIL_BITS */ 14, /* GL_ACCUM_RED_BITS */ 13, /* GL_ACCUM_GREEN_BITS */ 10, /* GL_ACCUM_BLUE_BITS */ 9, /* GL_ACCUM_ALPHA_BITS */ - 1013, /* GL_NAME_STACK_DEPTH */ + 1015, /* GL_NAME_STACK_DEPTH */ 62, /* GL_AUTO_NORMAL */ - 746, /* GL_MAP1_COLOR_4 */ - 749, /* GL_MAP1_INDEX */ - 750, /* GL_MAP1_NORMAL */ - 751, /* GL_MAP1_TEXTURE_COORD_1 */ - 752, /* GL_MAP1_TEXTURE_COORD_2 */ - 753, /* GL_MAP1_TEXTURE_COORD_3 */ - 754, /* GL_MAP1_TEXTURE_COORD_4 */ - 755, /* GL_MAP1_VERTEX_3 */ - 756, /* GL_MAP1_VERTEX_4 */ - 773, /* GL_MAP2_COLOR_4 */ - 776, /* GL_MAP2_INDEX */ - 777, /* GL_MAP2_NORMAL */ - 778, /* GL_MAP2_TEXTURE_COORD_1 */ - 779, /* GL_MAP2_TEXTURE_COORD_2 */ - 780, /* GL_MAP2_TEXTURE_COORD_3 */ - 781, /* GL_MAP2_TEXTURE_COORD_4 */ - 782, /* GL_MAP2_VERTEX_3 */ - 783, /* GL_MAP2_VERTEX_4 */ - 747, /* GL_MAP1_GRID_DOMAIN */ - 748, /* GL_MAP1_GRID_SEGMENTS */ - 774, /* GL_MAP2_GRID_DOMAIN */ - 775, /* GL_MAP2_GRID_SEGMENTS */ - 1627, /* GL_TEXTURE_1D */ - 1629, /* GL_TEXTURE_2D */ - 482, /* GL_FEEDBACK_BUFFER_POINTER */ - 483, /* GL_FEEDBACK_BUFFER_SIZE */ - 484, /* GL_FEEDBACK_BUFFER_TYPE */ - 1423, /* GL_SELECTION_BUFFER_POINTER */ - 1424, /* GL_SELECTION_BUFFER_SIZE */ - 1746, /* GL_TEXTURE_WIDTH */ - 1709, /* GL_TEXTURE_HEIGHT */ - 1664, /* GL_TEXTURE_COMPONENTS */ - 1648, /* GL_TEXTURE_BORDER_COLOR */ - 1647, /* GL_TEXTURE_BORDER */ - 385, /* GL_DONT_CARE */ - 480, /* GL_FASTEST */ - 1021, /* GL_NICEST */ + 748, /* GL_MAP1_COLOR_4 */ + 751, /* GL_MAP1_INDEX */ + 752, /* GL_MAP1_NORMAL */ + 753, /* GL_MAP1_TEXTURE_COORD_1 */ + 754, /* GL_MAP1_TEXTURE_COORD_2 */ + 755, /* GL_MAP1_TEXTURE_COORD_3 */ + 756, /* GL_MAP1_TEXTURE_COORD_4 */ + 757, /* GL_MAP1_VERTEX_3 */ + 758, /* GL_MAP1_VERTEX_4 */ + 775, /* GL_MAP2_COLOR_4 */ + 778, /* GL_MAP2_INDEX */ + 779, /* GL_MAP2_NORMAL */ + 780, /* GL_MAP2_TEXTURE_COORD_1 */ + 781, /* GL_MAP2_TEXTURE_COORD_2 */ + 782, /* GL_MAP2_TEXTURE_COORD_3 */ + 783, /* GL_MAP2_TEXTURE_COORD_4 */ + 784, /* GL_MAP2_VERTEX_3 */ + 785, /* GL_MAP2_VERTEX_4 */ + 749, /* GL_MAP1_GRID_DOMAIN */ + 750, /* GL_MAP1_GRID_SEGMENTS */ + 776, /* GL_MAP2_GRID_DOMAIN */ + 777, /* GL_MAP2_GRID_SEGMENTS */ + 1636, /* GL_TEXTURE_1D */ + 1638, /* GL_TEXTURE_2D */ + 483, /* GL_FEEDBACK_BUFFER_POINTER */ + 484, /* GL_FEEDBACK_BUFFER_SIZE */ + 485, /* GL_FEEDBACK_BUFFER_TYPE */ + 1432, /* GL_SELECTION_BUFFER_POINTER */ + 1433, /* GL_SELECTION_BUFFER_SIZE */ + 1755, /* GL_TEXTURE_WIDTH */ + 1718, /* GL_TEXTURE_HEIGHT */ + 1673, /* GL_TEXTURE_COMPONENTS */ + 1657, /* GL_TEXTURE_BORDER_COLOR */ + 1656, /* GL_TEXTURE_BORDER */ + 386, /* GL_DONT_CARE */ + 481, /* GL_FASTEST */ + 1023, /* GL_NICEST */ 48, /* GL_AMBIENT */ - 382, /* GL_DIFFUSE */ - 1472, /* GL_SPECULAR */ - 1185, /* GL_POSITION */ - 1475, /* GL_SPOT_DIRECTION */ - 1476, /* GL_SPOT_EXPONENT */ - 1474, /* GL_SPOT_CUTOFF */ - 275, /* GL_CONSTANT_ATTENUATION */ - 696, /* GL_LINEAR_ATTENUATION */ - 1284, /* GL_QUADRATIC_ATTENUATION */ - 244, /* GL_COMPILE */ - 245, /* GL_COMPILE_AND_EXECUTE */ - 120, /* GL_BYTE */ - 1780, /* GL_UNSIGNED_BYTE */ - 1437, /* GL_SHORT */ - 1792, /* GL_UNSIGNED_SHORT */ - 645, /* GL_INT */ - 1783, /* GL_UNSIGNED_INT */ - 489, /* GL_FLOAT */ + 383, /* GL_DIFFUSE */ + 1481, /* GL_SPECULAR */ + 1187, /* GL_POSITION */ + 1484, /* GL_SPOT_DIRECTION */ + 1485, /* GL_SPOT_EXPONENT */ + 1483, /* GL_SPOT_CUTOFF */ + 276, /* GL_CONSTANT_ATTENUATION */ + 698, /* GL_LINEAR_ATTENUATION */ + 1287, /* GL_QUADRATIC_ATTENUATION */ + 245, /* GL_COMPILE */ + 246, /* GL_COMPILE_AND_EXECUTE */ + 121, /* GL_BYTE */ + 1789, /* GL_UNSIGNED_BYTE */ + 1446, /* GL_SHORT */ + 1801, /* GL_UNSIGNED_SHORT */ + 647, /* GL_INT */ + 1792, /* GL_UNSIGNED_INT */ + 490, /* GL_FLOAT */ 1, /* GL_2_BYTES */ 5, /* GL_3_BYTES */ 7, /* GL_4_BYTES */ - 392, /* GL_DOUBLE */ - 132, /* GL_CLEAR */ + 393, /* GL_DOUBLE */ + 605, /* GL_HALF_FLOAT */ + 133, /* GL_CLEAR */ 50, /* GL_AND */ 52, /* GL_AND_REVERSE */ - 299, /* GL_COPY */ + 300, /* GL_COPY */ 51, /* GL_AND_INVERTED */ - 1023, /* GL_NOOP */ - 1875, /* GL_XOR */ - 1086, /* GL_OR */ - 1024, /* GL_NOR */ - 470, /* GL_EQUIV */ - 672, /* GL_INVERT */ - 1089, /* GL_OR_REVERSE */ - 300, /* GL_COPY_INVERTED */ - 1088, /* GL_OR_INVERTED */ - 1014, /* GL_NAND */ - 1428, /* GL_SET */ - 467, /* GL_EMISSION */ - 1436, /* GL_SHININESS */ + 1025, /* GL_NOOP */ + 1885, /* GL_XOR */ + 1088, /* GL_OR */ + 1026, /* GL_NOR */ + 471, /* GL_EQUIV */ + 674, /* GL_INVERT */ + 1091, /* GL_OR_REVERSE */ + 301, /* GL_COPY_INVERTED */ + 1090, /* GL_OR_INVERTED */ + 1016, /* GL_NAND */ + 1437, /* GL_SET */ + 468, /* GL_EMISSION */ + 1445, /* GL_SHININESS */ 49, /* GL_AMBIENT_AND_DIFFUSE */ - 190, /* GL_COLOR_INDEXES */ - 964, /* GL_MODELVIEW */ - 1261, /* GL_PROJECTION */ - 1562, /* GL_TEXTURE */ - 147, /* GL_COLOR */ - 346, /* GL_DEPTH */ - 1498, /* GL_STENCIL */ - 189, /* GL_COLOR_INDEX */ - 1517, /* GL_STENCIL_INDEX */ - 359, /* GL_DEPTH_COMPONENT */ - 1308, /* GL_RED */ - 600, /* GL_GREEN */ + 191, /* GL_COLOR_INDEXES */ + 966, /* GL_MODELVIEW */ + 1263, /* GL_PROJECTION */ + 1571, /* GL_TEXTURE */ + 148, /* GL_COLOR */ + 347, /* GL_DEPTH */ + 1507, /* GL_STENCIL */ + 190, /* GL_COLOR_INDEX */ + 1526, /* GL_STENCIL_INDEX */ + 360, /* GL_DEPTH_COMPONENT */ + 1315, /* GL_RED */ + 601, /* GL_GREEN */ 90, /* GL_BLUE */ 31, /* GL_ALPHA */ - 1345, /* GL_RGB */ - 1364, /* GL_RGBA */ - 724, /* GL_LUMINANCE */ - 745, /* GL_LUMINANCE_ALPHA */ + 1354, /* GL_RGB */ + 1373, /* GL_RGBA */ + 726, /* GL_LUMINANCE */ + 747, /* GL_LUMINANCE_ALPHA */ 73, /* GL_BITMAP */ - 1141, /* GL_POINT */ - 694, /* GL_LINE */ - 485, /* GL_FILL */ - 1317, /* GL_RENDER */ - 481, /* GL_FEEDBACK */ - 1422, /* GL_SELECT */ - 488, /* GL_FLAT */ - 1447, /* GL_SMOOTH */ - 673, /* GL_KEEP */ - 1339, /* GL_REPLACE */ - 627, /* GL_INCR */ - 342, /* GL_DECR */ - 1807, /* GL_VENDOR */ - 1336, /* GL_RENDERER */ - 1808, /* GL_VERSION */ - 474, /* GL_EXTENSIONS */ - 1387, /* GL_S */ - 1553, /* GL_T */ - 1296, /* GL_R */ - 1283, /* GL_Q */ - 1000, /* GL_MODULATE */ - 341, /* GL_DECAL */ - 1699, /* GL_TEXTURE_ENV_MODE */ - 1698, /* GL_TEXTURE_ENV_COLOR */ - 1697, /* GL_TEXTURE_ENV */ - 475, /* GL_EYE_LINEAR */ - 1047, /* GL_OBJECT_LINEAR */ - 1473, /* GL_SPHERE_MAP */ - 1701, /* GL_TEXTURE_GEN_MODE */ - 1049, /* GL_OBJECT_PLANE */ - 476, /* GL_EYE_PLANE */ - 1015, /* GL_NEAREST */ - 695, /* GL_LINEAR */ - 1019, /* GL_NEAREST_MIPMAP_NEAREST */ - 700, /* GL_LINEAR_MIPMAP_NEAREST */ - 1018, /* GL_NEAREST_MIPMAP_LINEAR */ - 699, /* GL_LINEAR_MIPMAP_LINEAR */ - 1722, /* GL_TEXTURE_MAG_FILTER */ - 1730, /* GL_TEXTURE_MIN_FILTER */ - 1748, /* GL_TEXTURE_WRAP_S */ - 1749, /* GL_TEXTURE_WRAP_T */ - 126, /* GL_CLAMP */ - 1338, /* GL_REPEAT */ - 1179, /* GL_POLYGON_OFFSET_UNITS */ - 1178, /* GL_POLYGON_OFFSET_POINT */ - 1177, /* GL_POLYGON_OFFSET_LINE */ - 1297, /* GL_R3_G3_B2 */ - 1804, /* GL_V2F */ - 1805, /* GL_V3F */ - 123, /* GL_C4UB_V2F */ - 124, /* GL_C4UB_V3F */ - 121, /* GL_C3F_V3F */ - 1012, /* GL_N3F_V3F */ - 122, /* GL_C4F_N3F_V3F */ - 1558, /* GL_T2F_V3F */ - 1560, /* GL_T4F_V4F */ - 1556, /* GL_T2F_C4UB_V3F */ - 1554, /* GL_T2F_C3F_V3F */ - 1557, /* GL_T2F_N3F_V3F */ - 1555, /* GL_T2F_C4F_N3F_V3F */ - 1559, /* GL_T4F_C4F_N3F_V4F */ - 139, /* GL_CLIP_PLANE0 */ - 140, /* GL_CLIP_PLANE1 */ - 141, /* GL_CLIP_PLANE2 */ - 142, /* GL_CLIP_PLANE3 */ - 143, /* GL_CLIP_PLANE4 */ - 144, /* GL_CLIP_PLANE5 */ - 679, /* GL_LIGHT0 */ - 680, /* GL_LIGHT1 */ - 681, /* GL_LIGHT2 */ - 682, /* GL_LIGHT3 */ - 683, /* GL_LIGHT4 */ - 684, /* GL_LIGHT5 */ - 685, /* GL_LIGHT6 */ - 686, /* GL_LIGHT7 */ - 604, /* GL_HINT_BIT */ - 277, /* GL_CONSTANT_COLOR */ - 1060, /* GL_ONE_MINUS_CONSTANT_COLOR */ - 272, /* GL_CONSTANT_ALPHA */ - 1058, /* GL_ONE_MINUS_CONSTANT_ALPHA */ + 1143, /* GL_POINT */ + 696, /* GL_LINE */ + 486, /* GL_FILL */ + 1325, /* GL_RENDER */ + 482, /* GL_FEEDBACK */ + 1431, /* GL_SELECT */ + 489, /* GL_FLAT */ + 1456, /* GL_SMOOTH */ + 675, /* GL_KEEP */ + 1347, /* GL_REPLACE */ + 629, /* GL_INCR */ + 343, /* GL_DECR */ + 1816, /* GL_VENDOR */ + 1344, /* GL_RENDERER */ + 1817, /* GL_VERSION */ + 475, /* GL_EXTENSIONS */ + 1396, /* GL_S */ + 1562, /* GL_T */ + 1303, /* GL_R */ + 1286, /* GL_Q */ + 1002, /* GL_MODULATE */ + 342, /* GL_DECAL */ + 1708, /* GL_TEXTURE_ENV_MODE */ + 1707, /* GL_TEXTURE_ENV_COLOR */ + 1706, /* GL_TEXTURE_ENV */ + 476, /* GL_EYE_LINEAR */ + 1049, /* GL_OBJECT_LINEAR */ + 1482, /* GL_SPHERE_MAP */ + 1710, /* GL_TEXTURE_GEN_MODE */ + 1051, /* GL_OBJECT_PLANE */ + 477, /* GL_EYE_PLANE */ + 1017, /* GL_NEAREST */ + 697, /* GL_LINEAR */ + 1021, /* GL_NEAREST_MIPMAP_NEAREST */ + 702, /* GL_LINEAR_MIPMAP_NEAREST */ + 1020, /* GL_NEAREST_MIPMAP_LINEAR */ + 701, /* GL_LINEAR_MIPMAP_LINEAR */ + 1731, /* GL_TEXTURE_MAG_FILTER */ + 1739, /* GL_TEXTURE_MIN_FILTER */ + 1757, /* GL_TEXTURE_WRAP_S */ + 1758, /* GL_TEXTURE_WRAP_T */ + 127, /* GL_CLAMP */ + 1346, /* GL_REPEAT */ + 1181, /* GL_POLYGON_OFFSET_UNITS */ + 1180, /* GL_POLYGON_OFFSET_POINT */ + 1179, /* GL_POLYGON_OFFSET_LINE */ + 1304, /* GL_R3_G3_B2 */ + 1813, /* GL_V2F */ + 1814, /* GL_V3F */ + 124, /* GL_C4UB_V2F */ + 125, /* GL_C4UB_V3F */ + 122, /* GL_C3F_V3F */ + 1014, /* GL_N3F_V3F */ + 123, /* GL_C4F_N3F_V3F */ + 1567, /* GL_T2F_V3F */ + 1569, /* GL_T4F_V4F */ + 1565, /* GL_T2F_C4UB_V3F */ + 1563, /* GL_T2F_C3F_V3F */ + 1566, /* GL_T2F_N3F_V3F */ + 1564, /* GL_T2F_C4F_N3F_V3F */ + 1568, /* GL_T4F_C4F_N3F_V4F */ + 140, /* GL_CLIP_PLANE0 */ + 141, /* GL_CLIP_PLANE1 */ + 142, /* GL_CLIP_PLANE2 */ + 143, /* GL_CLIP_PLANE3 */ + 144, /* GL_CLIP_PLANE4 */ + 145, /* GL_CLIP_PLANE5 */ + 681, /* GL_LIGHT0 */ + 682, /* GL_LIGHT1 */ + 683, /* GL_LIGHT2 */ + 684, /* GL_LIGHT3 */ + 685, /* GL_LIGHT4 */ + 686, /* GL_LIGHT5 */ + 687, /* GL_LIGHT6 */ + 688, /* GL_LIGHT7 */ + 606, /* GL_HINT_BIT */ + 278, /* GL_CONSTANT_COLOR */ + 1062, /* GL_ONE_MINUS_CONSTANT_COLOR */ + 273, /* GL_CONSTANT_ALPHA */ + 1060, /* GL_ONE_MINUS_CONSTANT_ALPHA */ 76, /* GL_BLEND_COLOR */ - 588, /* GL_FUNC_ADD */ - 948, /* GL_MIN */ - 855, /* GL_MAX */ + 589, /* GL_FUNC_ADD */ + 950, /* GL_MIN */ + 857, /* GL_MAX */ 81, /* GL_BLEND_EQUATION */ - 592, /* GL_FUNC_SUBTRACT */ - 590, /* GL_FUNC_REVERSE_SUBTRACT */ - 280, /* GL_CONVOLUTION_1D */ - 281, /* GL_CONVOLUTION_2D */ - 1425, /* GL_SEPARABLE_2D */ - 284, /* GL_CONVOLUTION_BORDER_MODE */ - 288, /* GL_CONVOLUTION_FILTER_SCALE */ - 286, /* GL_CONVOLUTION_FILTER_BIAS */ - 1309, /* GL_REDUCE */ - 290, /* GL_CONVOLUTION_FORMAT */ - 294, /* GL_CONVOLUTION_WIDTH */ - 292, /* GL_CONVOLUTION_HEIGHT */ - 871, /* GL_MAX_CONVOLUTION_WIDTH */ - 869, /* GL_MAX_CONVOLUTION_HEIGHT */ - 1218, /* GL_POST_CONVOLUTION_RED_SCALE */ - 1214, /* GL_POST_CONVOLUTION_GREEN_SCALE */ - 1209, /* GL_POST_CONVOLUTION_BLUE_SCALE */ - 1205, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ - 1216, /* GL_POST_CONVOLUTION_RED_BIAS */ - 1212, /* GL_POST_CONVOLUTION_GREEN_BIAS */ - 1207, /* GL_POST_CONVOLUTION_BLUE_BIAS */ - 1203, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ - 605, /* GL_HISTOGRAM */ - 1267, /* GL_PROXY_HISTOGRAM */ - 621, /* GL_HISTOGRAM_WIDTH */ - 611, /* GL_HISTOGRAM_FORMAT */ - 617, /* GL_HISTOGRAM_RED_SIZE */ - 613, /* GL_HISTOGRAM_GREEN_SIZE */ - 608, /* GL_HISTOGRAM_BLUE_SIZE */ - 606, /* GL_HISTOGRAM_ALPHA_SIZE */ - 615, /* GL_HISTOGRAM_LUMINANCE_SIZE */ - 619, /* GL_HISTOGRAM_SINK */ - 949, /* GL_MINMAX */ - 951, /* GL_MINMAX_FORMAT */ - 953, /* GL_MINMAX_SINK */ - 1561, /* GL_TABLE_TOO_LARGE_EXT */ - 1782, /* GL_UNSIGNED_BYTE_3_3_2 */ - 1794, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - 1796, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - 1789, /* GL_UNSIGNED_INT_8_8_8_8 */ - 1784, /* GL_UNSIGNED_INT_10_10_10_2 */ - 1176, /* GL_POLYGON_OFFSET_FILL */ - 1175, /* GL_POLYGON_OFFSET_FACTOR */ - 1174, /* GL_POLYGON_OFFSET_BIAS */ - 1342, /* GL_RESCALE_NORMAL */ + 593, /* GL_FUNC_SUBTRACT */ + 591, /* GL_FUNC_REVERSE_SUBTRACT */ + 281, /* GL_CONVOLUTION_1D */ + 282, /* GL_CONVOLUTION_2D */ + 1434, /* GL_SEPARABLE_2D */ + 285, /* GL_CONVOLUTION_BORDER_MODE */ + 289, /* GL_CONVOLUTION_FILTER_SCALE */ + 287, /* GL_CONVOLUTION_FILTER_BIAS */ + 1316, /* GL_REDUCE */ + 291, /* GL_CONVOLUTION_FORMAT */ + 295, /* GL_CONVOLUTION_WIDTH */ + 293, /* GL_CONVOLUTION_HEIGHT */ + 873, /* GL_MAX_CONVOLUTION_WIDTH */ + 871, /* GL_MAX_CONVOLUTION_HEIGHT */ + 1220, /* GL_POST_CONVOLUTION_RED_SCALE */ + 1216, /* GL_POST_CONVOLUTION_GREEN_SCALE */ + 1211, /* GL_POST_CONVOLUTION_BLUE_SCALE */ + 1207, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ + 1218, /* GL_POST_CONVOLUTION_RED_BIAS */ + 1214, /* GL_POST_CONVOLUTION_GREEN_BIAS */ + 1209, /* GL_POST_CONVOLUTION_BLUE_BIAS */ + 1205, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ + 607, /* GL_HISTOGRAM */ + 1269, /* GL_PROXY_HISTOGRAM */ + 623, /* GL_HISTOGRAM_WIDTH */ + 613, /* GL_HISTOGRAM_FORMAT */ + 619, /* GL_HISTOGRAM_RED_SIZE */ + 615, /* GL_HISTOGRAM_GREEN_SIZE */ + 610, /* GL_HISTOGRAM_BLUE_SIZE */ + 608, /* GL_HISTOGRAM_ALPHA_SIZE */ + 617, /* GL_HISTOGRAM_LUMINANCE_SIZE */ + 621, /* GL_HISTOGRAM_SINK */ + 951, /* GL_MINMAX */ + 953, /* GL_MINMAX_FORMAT */ + 955, /* GL_MINMAX_SINK */ + 1570, /* GL_TABLE_TOO_LARGE_EXT */ + 1791, /* GL_UNSIGNED_BYTE_3_3_2 */ + 1803, /* GL_UNSIGNED_SHORT_4_4_4_4 */ + 1805, /* GL_UNSIGNED_SHORT_5_5_5_1 */ + 1798, /* GL_UNSIGNED_INT_8_8_8_8 */ + 1793, /* GL_UNSIGNED_INT_10_10_10_2 */ + 1178, /* GL_POLYGON_OFFSET_FILL */ + 1177, /* GL_POLYGON_OFFSET_FACTOR */ + 1176, /* GL_POLYGON_OFFSET_BIAS */ + 1350, /* GL_RESCALE_NORMAL */ 36, /* GL_ALPHA4 */ 38, /* GL_ALPHA8 */ 32, /* GL_ALPHA12 */ 34, /* GL_ALPHA16 */ - 735, /* GL_LUMINANCE4 */ - 741, /* GL_LUMINANCE8 */ - 725, /* GL_LUMINANCE12 */ - 731, /* GL_LUMINANCE16 */ - 736, /* GL_LUMINANCE4_ALPHA4 */ - 739, /* GL_LUMINANCE6_ALPHA2 */ - 742, /* GL_LUMINANCE8_ALPHA8 */ - 728, /* GL_LUMINANCE12_ALPHA4 */ - 726, /* GL_LUMINANCE12_ALPHA12 */ - 732, /* GL_LUMINANCE16_ALPHA16 */ - 646, /* GL_INTENSITY */ - 651, /* GL_INTENSITY4 */ - 653, /* GL_INTENSITY8 */ - 647, /* GL_INTENSITY12 */ - 649, /* GL_INTENSITY16 */ - 1354, /* GL_RGB2_EXT */ - 1355, /* GL_RGB4 */ - 1358, /* GL_RGB5 */ - 1362, /* GL_RGB8 */ - 1346, /* GL_RGB10 */ - 1350, /* GL_RGB12 */ - 1352, /* GL_RGB16 */ - 1369, /* GL_RGBA2 */ - 1371, /* GL_RGBA4 */ - 1359, /* GL_RGB5_A1 */ - 1375, /* GL_RGBA8 */ - 1347, /* GL_RGB10_A2 */ - 1365, /* GL_RGBA12 */ - 1367, /* GL_RGBA16 */ - 1737, /* GL_TEXTURE_RED_SIZE */ - 1707, /* GL_TEXTURE_GREEN_SIZE */ - 1645, /* GL_TEXTURE_BLUE_SIZE */ - 1632, /* GL_TEXTURE_ALPHA_SIZE */ - 1720, /* GL_TEXTURE_LUMINANCE_SIZE */ - 1711, /* GL_TEXTURE_INTENSITY_SIZE */ - 1340, /* GL_REPLACE_EXT */ - 1271, /* GL_PROXY_TEXTURE_1D */ - 1274, /* GL_PROXY_TEXTURE_2D */ - 1744, /* GL_TEXTURE_TOO_LARGE_EXT */ - 1732, /* GL_TEXTURE_PRIORITY */ - 1739, /* GL_TEXTURE_RESIDENT */ - 1635, /* GL_TEXTURE_BINDING_1D */ - 1637, /* GL_TEXTURE_BINDING_2D */ - 1639, /* GL_TEXTURE_BINDING_3D */ - 1096, /* GL_PACK_SKIP_IMAGES */ - 1092, /* GL_PACK_IMAGE_HEIGHT */ - 1775, /* GL_UNPACK_SKIP_IMAGES */ - 1772, /* GL_UNPACK_IMAGE_HEIGHT */ - 1631, /* GL_TEXTURE_3D */ - 1277, /* GL_PROXY_TEXTURE_3D */ - 1694, /* GL_TEXTURE_DEPTH */ - 1747, /* GL_TEXTURE_WRAP_R */ - 856, /* GL_MAX_3D_TEXTURE_SIZE */ - 1809, /* GL_VERTEX_ARRAY */ - 1026, /* GL_NORMAL_ARRAY */ - 148, /* GL_COLOR_ARRAY */ - 631, /* GL_INDEX_ARRAY */ - 1672, /* GL_TEXTURE_COORD_ARRAY */ - 459, /* GL_EDGE_FLAG_ARRAY */ - 1815, /* GL_VERTEX_ARRAY_SIZE */ - 1817, /* GL_VERTEX_ARRAY_TYPE */ - 1816, /* GL_VERTEX_ARRAY_STRIDE */ - 1031, /* GL_NORMAL_ARRAY_TYPE */ - 1030, /* GL_NORMAL_ARRAY_STRIDE */ - 152, /* GL_COLOR_ARRAY_SIZE */ - 154, /* GL_COLOR_ARRAY_TYPE */ - 153, /* GL_COLOR_ARRAY_STRIDE */ - 636, /* GL_INDEX_ARRAY_TYPE */ - 635, /* GL_INDEX_ARRAY_STRIDE */ - 1676, /* GL_TEXTURE_COORD_ARRAY_SIZE */ - 1678, /* GL_TEXTURE_COORD_ARRAY_TYPE */ - 1677, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ - 463, /* GL_EDGE_FLAG_ARRAY_STRIDE */ - 1814, /* GL_VERTEX_ARRAY_POINTER */ - 1029, /* GL_NORMAL_ARRAY_POINTER */ - 151, /* GL_COLOR_ARRAY_POINTER */ - 634, /* GL_INDEX_ARRAY_POINTER */ - 1675, /* GL_TEXTURE_COORD_ARRAY_POINTER */ - 462, /* GL_EDGE_FLAG_ARRAY_POINTER */ - 1005, /* GL_MULTISAMPLE */ - 1399, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ - 1401, /* GL_SAMPLE_ALPHA_TO_ONE */ - 1406, /* GL_SAMPLE_COVERAGE */ - 1403, /* GL_SAMPLE_BUFFERS */ - 1394, /* GL_SAMPLES */ - 1410, /* GL_SAMPLE_COVERAGE_VALUE */ - 1408, /* GL_SAMPLE_COVERAGE_INVERT */ - 195, /* GL_COLOR_MATRIX */ - 197, /* GL_COLOR_MATRIX_STACK_DEPTH */ - 865, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ - 1201, /* GL_POST_COLOR_MATRIX_RED_SCALE */ - 1197, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ - 1192, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ - 1188, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ - 1199, /* GL_POST_COLOR_MATRIX_RED_BIAS */ - 1195, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ - 1190, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ - 1186, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ - 1655, /* GL_TEXTURE_COLOR_TABLE_SGI */ - 1278, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ - 1657, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ + 737, /* GL_LUMINANCE4 */ + 743, /* GL_LUMINANCE8 */ + 727, /* GL_LUMINANCE12 */ + 733, /* GL_LUMINANCE16 */ + 738, /* GL_LUMINANCE4_ALPHA4 */ + 741, /* GL_LUMINANCE6_ALPHA2 */ + 744, /* GL_LUMINANCE8_ALPHA8 */ + 730, /* GL_LUMINANCE12_ALPHA4 */ + 728, /* GL_LUMINANCE12_ALPHA12 */ + 734, /* GL_LUMINANCE16_ALPHA16 */ + 648, /* GL_INTENSITY */ + 653, /* GL_INTENSITY4 */ + 655, /* GL_INTENSITY8 */ + 649, /* GL_INTENSITY12 */ + 651, /* GL_INTENSITY16 */ + 1363, /* GL_RGB2_EXT */ + 1364, /* GL_RGB4 */ + 1367, /* GL_RGB5 */ + 1371, /* GL_RGB8 */ + 1355, /* GL_RGB10 */ + 1359, /* GL_RGB12 */ + 1361, /* GL_RGB16 */ + 1378, /* GL_RGBA2 */ + 1380, /* GL_RGBA4 */ + 1368, /* GL_RGB5_A1 */ + 1384, /* GL_RGBA8 */ + 1356, /* GL_RGB10_A2 */ + 1374, /* GL_RGBA12 */ + 1376, /* GL_RGBA16 */ + 1746, /* GL_TEXTURE_RED_SIZE */ + 1716, /* GL_TEXTURE_GREEN_SIZE */ + 1654, /* GL_TEXTURE_BLUE_SIZE */ + 1641, /* GL_TEXTURE_ALPHA_SIZE */ + 1729, /* GL_TEXTURE_LUMINANCE_SIZE */ + 1720, /* GL_TEXTURE_INTENSITY_SIZE */ + 1348, /* GL_REPLACE_EXT */ + 1273, /* GL_PROXY_TEXTURE_1D */ + 1276, /* GL_PROXY_TEXTURE_2D */ + 1753, /* GL_TEXTURE_TOO_LARGE_EXT */ + 1741, /* GL_TEXTURE_PRIORITY */ + 1748, /* GL_TEXTURE_RESIDENT */ + 1644, /* GL_TEXTURE_BINDING_1D */ + 1646, /* GL_TEXTURE_BINDING_2D */ + 1648, /* GL_TEXTURE_BINDING_3D */ + 1098, /* GL_PACK_SKIP_IMAGES */ + 1094, /* GL_PACK_IMAGE_HEIGHT */ + 1784, /* GL_UNPACK_SKIP_IMAGES */ + 1781, /* GL_UNPACK_IMAGE_HEIGHT */ + 1640, /* GL_TEXTURE_3D */ + 1279, /* GL_PROXY_TEXTURE_3D */ + 1703, /* GL_TEXTURE_DEPTH */ + 1756, /* GL_TEXTURE_WRAP_R */ + 858, /* GL_MAX_3D_TEXTURE_SIZE */ + 1818, /* GL_VERTEX_ARRAY */ + 1028, /* GL_NORMAL_ARRAY */ + 149, /* GL_COLOR_ARRAY */ + 633, /* GL_INDEX_ARRAY */ + 1681, /* GL_TEXTURE_COORD_ARRAY */ + 460, /* GL_EDGE_FLAG_ARRAY */ + 1824, /* GL_VERTEX_ARRAY_SIZE */ + 1826, /* GL_VERTEX_ARRAY_TYPE */ + 1825, /* GL_VERTEX_ARRAY_STRIDE */ + 1033, /* GL_NORMAL_ARRAY_TYPE */ + 1032, /* GL_NORMAL_ARRAY_STRIDE */ + 153, /* GL_COLOR_ARRAY_SIZE */ + 155, /* GL_COLOR_ARRAY_TYPE */ + 154, /* GL_COLOR_ARRAY_STRIDE */ + 638, /* GL_INDEX_ARRAY_TYPE */ + 637, /* GL_INDEX_ARRAY_STRIDE */ + 1685, /* GL_TEXTURE_COORD_ARRAY_SIZE */ + 1687, /* GL_TEXTURE_COORD_ARRAY_TYPE */ + 1686, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ + 464, /* GL_EDGE_FLAG_ARRAY_STRIDE */ + 1823, /* GL_VERTEX_ARRAY_POINTER */ + 1031, /* GL_NORMAL_ARRAY_POINTER */ + 152, /* GL_COLOR_ARRAY_POINTER */ + 636, /* GL_INDEX_ARRAY_POINTER */ + 1684, /* GL_TEXTURE_COORD_ARRAY_POINTER */ + 463, /* GL_EDGE_FLAG_ARRAY_POINTER */ + 1007, /* GL_MULTISAMPLE */ + 1408, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ + 1410, /* GL_SAMPLE_ALPHA_TO_ONE */ + 1415, /* GL_SAMPLE_COVERAGE */ + 1412, /* GL_SAMPLE_BUFFERS */ + 1403, /* GL_SAMPLES */ + 1419, /* GL_SAMPLE_COVERAGE_VALUE */ + 1417, /* GL_SAMPLE_COVERAGE_INVERT */ + 196, /* GL_COLOR_MATRIX */ + 198, /* GL_COLOR_MATRIX_STACK_DEPTH */ + 867, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ + 1203, /* GL_POST_COLOR_MATRIX_RED_SCALE */ + 1199, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ + 1194, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ + 1190, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ + 1201, /* GL_POST_COLOR_MATRIX_RED_BIAS */ + 1197, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ + 1192, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ + 1188, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ + 1664, /* GL_TEXTURE_COLOR_TABLE_SGI */ + 1280, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ + 1666, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ 80, /* GL_BLEND_DST_RGB */ 89, /* GL_BLEND_SRC_RGB */ 79, /* GL_BLEND_DST_ALPHA */ 88, /* GL_BLEND_SRC_ALPHA */ - 201, /* GL_COLOR_TABLE */ - 1211, /* GL_POST_CONVOLUTION_COLOR_TABLE */ - 1194, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ - 1266, /* GL_PROXY_COLOR_TABLE */ - 1270, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ - 1269, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ - 225, /* GL_COLOR_TABLE_SCALE */ - 205, /* GL_COLOR_TABLE_BIAS */ - 210, /* GL_COLOR_TABLE_FORMAT */ - 227, /* GL_COLOR_TABLE_WIDTH */ - 222, /* GL_COLOR_TABLE_RED_SIZE */ - 213, /* GL_COLOR_TABLE_GREEN_SIZE */ - 207, /* GL_COLOR_TABLE_BLUE_SIZE */ - 202, /* GL_COLOR_TABLE_ALPHA_SIZE */ - 219, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ - 216, /* GL_COLOR_TABLE_INTENSITY_SIZE */ + 202, /* GL_COLOR_TABLE */ + 1213, /* GL_POST_CONVOLUTION_COLOR_TABLE */ + 1196, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ + 1268, /* GL_PROXY_COLOR_TABLE */ + 1272, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ + 1271, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ + 226, /* GL_COLOR_TABLE_SCALE */ + 206, /* GL_COLOR_TABLE_BIAS */ + 211, /* GL_COLOR_TABLE_FORMAT */ + 228, /* GL_COLOR_TABLE_WIDTH */ + 223, /* GL_COLOR_TABLE_RED_SIZE */ + 214, /* GL_COLOR_TABLE_GREEN_SIZE */ + 208, /* GL_COLOR_TABLE_BLUE_SIZE */ + 203, /* GL_COLOR_TABLE_ALPHA_SIZE */ + 220, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ + 217, /* GL_COLOR_TABLE_INTENSITY_SIZE */ 71, /* GL_BGR */ 72, /* GL_BGRA */ - 879, /* GL_MAX_ELEMENTS_VERTICES */ - 878, /* GL_MAX_ELEMENTS_INDICES */ - 1710, /* GL_TEXTURE_INDEX_SIZE_EXT */ - 145, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ - 1158, /* GL_POINT_SIZE_MIN */ - 1154, /* GL_POINT_SIZE_MAX */ - 1148, /* GL_POINT_FADE_THRESHOLD_SIZE */ - 1144, /* GL_POINT_DISTANCE_ATTENUATION */ - 127, /* GL_CLAMP_TO_BORDER */ - 130, /* GL_CLAMP_TO_EDGE */ - 1731, /* GL_TEXTURE_MIN_LOD */ - 1729, /* GL_TEXTURE_MAX_LOD */ - 1634, /* GL_TEXTURE_BASE_LEVEL */ - 1728, /* GL_TEXTURE_MAX_LEVEL */ - 624, /* GL_IGNORE_BORDER_HP */ - 276, /* GL_CONSTANT_BORDER_HP */ - 1341, /* GL_REPLICATE_BORDER_HP */ - 282, /* GL_CONVOLUTION_BORDER_COLOR */ - 1055, /* GL_OCCLUSION_TEST_HP */ - 1056, /* GL_OCCLUSION_TEST_RESULT_HP */ - 697, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ - 1649, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ - 1651, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ - 1653, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ - 1654, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - 1652, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ - 1650, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ - 860, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ - 861, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - 1221, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ - 1223, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ - 1220, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ - 1222, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ - 1718, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ - 1719, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ - 1717, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ - 594, /* GL_GENERATE_MIPMAP */ - 595, /* GL_GENERATE_MIPMAP_HINT */ - 532, /* GL_FOG_OFFSET_SGIX */ - 533, /* GL_FOG_OFFSET_VALUE_SGIX */ - 1663, /* GL_TEXTURE_COMPARE_SGIX */ - 1662, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ - 1714, /* GL_TEXTURE_LEQUAL_R_SGIX */ - 1706, /* GL_TEXTURE_GEQUAL_R_SGIX */ - 360, /* GL_DEPTH_COMPONENT16 */ - 363, /* GL_DEPTH_COMPONENT24 */ - 366, /* GL_DEPTH_COMPONENT32 */ - 306, /* GL_CULL_VERTEX_EXT */ - 308, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ - 307, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ - 1872, /* GL_WRAP_BORDER_SUN */ - 1656, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ - 690, /* GL_LIGHT_MODEL_COLOR_CONTROL */ - 1440, /* GL_SINGLE_COLOR */ - 1426, /* GL_SEPARATE_SPECULAR_COLOR */ - 1435, /* GL_SHARED_TEXTURE_PALETTE_EXT */ - 543, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ - 544, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ - 551, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ - 546, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ - 542, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ - 541, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ - 545, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ - 552, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ - 564, /* GL_FRAMEBUFFER_DEFAULT */ - 580, /* GL_FRAMEBUFFER_UNDEFINED */ - 373, /* GL_DEPTH_STENCIL_ATTACHMENT */ - 630, /* GL_INDEX */ - 1781, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - 1797, /* GL_UNSIGNED_SHORT_5_6_5 */ - 1798, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - 1795, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - 1793, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - 1790, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - 1788, /* GL_UNSIGNED_INT_2_10_10_10_REV */ - 1726, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ - 1727, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ - 1725, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ - 956, /* GL_MIRRORED_REPEAT */ - 1382, /* GL_RGB_S3TC */ - 1357, /* GL_RGB4_S3TC */ - 1380, /* GL_RGBA_S3TC */ - 1374, /* GL_RGBA4_S3TC */ - 1378, /* GL_RGBA_DXT5_S3TC */ - 1372, /* GL_RGBA4_DXT5_S3TC */ - 264, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ - 259, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ - 260, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ - 261, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ - 1017, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ - 1016, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ - 698, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ - 519, /* GL_FOG_COORDINATE_SOURCE */ - 511, /* GL_FOG_COORD */ - 535, /* GL_FRAGMENT_DEPTH */ - 312, /* GL_CURRENT_FOG_COORD */ - 518, /* GL_FOG_COORDINATE_ARRAY_TYPE */ - 517, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ - 516, /* GL_FOG_COORDINATE_ARRAY_POINTER */ - 513, /* GL_FOG_COORDINATE_ARRAY */ - 199, /* GL_COLOR_SUM */ - 332, /* GL_CURRENT_SECONDARY_COLOR */ - 1419, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ - 1421, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ - 1420, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ - 1418, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ - 1415, /* GL_SECONDARY_COLOR_ARRAY */ - 330, /* GL_CURRENT_RASTER_SECONDARY_COLOR */ + 881, /* GL_MAX_ELEMENTS_VERTICES */ + 880, /* GL_MAX_ELEMENTS_INDICES */ + 1719, /* GL_TEXTURE_INDEX_SIZE_EXT */ + 146, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ + 1160, /* GL_POINT_SIZE_MIN */ + 1156, /* GL_POINT_SIZE_MAX */ + 1150, /* GL_POINT_FADE_THRESHOLD_SIZE */ + 1146, /* GL_POINT_DISTANCE_ATTENUATION */ + 128, /* GL_CLAMP_TO_BORDER */ + 131, /* GL_CLAMP_TO_EDGE */ + 1740, /* GL_TEXTURE_MIN_LOD */ + 1738, /* GL_TEXTURE_MAX_LOD */ + 1643, /* GL_TEXTURE_BASE_LEVEL */ + 1737, /* GL_TEXTURE_MAX_LEVEL */ + 626, /* GL_IGNORE_BORDER_HP */ + 277, /* GL_CONSTANT_BORDER_HP */ + 1349, /* GL_REPLICATE_BORDER_HP */ + 283, /* GL_CONVOLUTION_BORDER_COLOR */ + 1057, /* GL_OCCLUSION_TEST_HP */ + 1058, /* GL_OCCLUSION_TEST_RESULT_HP */ + 699, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ + 1658, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ + 1660, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ + 1662, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ + 1663, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + 1661, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ + 1659, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ + 862, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ + 863, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ + 1223, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ + 1225, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ + 1222, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ + 1224, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ + 1727, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ + 1728, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ + 1726, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ + 595, /* GL_GENERATE_MIPMAP */ + 596, /* GL_GENERATE_MIPMAP_HINT */ + 533, /* GL_FOG_OFFSET_SGIX */ + 534, /* GL_FOG_OFFSET_VALUE_SGIX */ + 1672, /* GL_TEXTURE_COMPARE_SGIX */ + 1671, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ + 1723, /* GL_TEXTURE_LEQUAL_R_SGIX */ + 1715, /* GL_TEXTURE_GEQUAL_R_SGIX */ + 361, /* GL_DEPTH_COMPONENT16 */ + 364, /* GL_DEPTH_COMPONENT24 */ + 367, /* GL_DEPTH_COMPONENT32 */ + 307, /* GL_CULL_VERTEX_EXT */ + 309, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ + 308, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ + 1882, /* GL_WRAP_BORDER_SUN */ + 1665, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ + 692, /* GL_LIGHT_MODEL_COLOR_CONTROL */ + 1449, /* GL_SINGLE_COLOR */ + 1435, /* GL_SEPARATE_SPECULAR_COLOR */ + 1444, /* GL_SHARED_TEXTURE_PALETTE_EXT */ + 544, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ + 545, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ + 552, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ + 547, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ + 543, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ + 542, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ + 546, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ + 553, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ + 565, /* GL_FRAMEBUFFER_DEFAULT */ + 581, /* GL_FRAMEBUFFER_UNDEFINED */ + 374, /* GL_DEPTH_STENCIL_ATTACHMENT */ + 632, /* GL_INDEX */ + 1790, /* GL_UNSIGNED_BYTE_2_3_3_REV */ + 1806, /* GL_UNSIGNED_SHORT_5_6_5 */ + 1807, /* GL_UNSIGNED_SHORT_5_6_5_REV */ + 1804, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ + 1802, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ + 1799, /* GL_UNSIGNED_INT_8_8_8_8_REV */ + 1797, /* GL_UNSIGNED_INT_2_10_10_10_REV */ + 1735, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ + 1736, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ + 1734, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ + 958, /* GL_MIRRORED_REPEAT */ + 1391, /* GL_RGB_S3TC */ + 1366, /* GL_RGB4_S3TC */ + 1389, /* GL_RGBA_S3TC */ + 1383, /* GL_RGBA4_S3TC */ + 1387, /* GL_RGBA_DXT5_S3TC */ + 1381, /* GL_RGBA4_DXT5_S3TC */ + 265, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ + 260, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ + 261, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ + 262, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ + 1019, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ + 1018, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ + 700, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ + 520, /* GL_FOG_COORDINATE_SOURCE */ + 512, /* GL_FOG_COORD */ + 536, /* GL_FRAGMENT_DEPTH */ + 313, /* GL_CURRENT_FOG_COORD */ + 519, /* GL_FOG_COORDINATE_ARRAY_TYPE */ + 518, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ + 517, /* GL_FOG_COORDINATE_ARRAY_POINTER */ + 514, /* GL_FOG_COORDINATE_ARRAY */ + 200, /* GL_COLOR_SUM */ + 333, /* GL_CURRENT_SECONDARY_COLOR */ + 1428, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ + 1430, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ + 1429, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ + 1427, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ + 1424, /* GL_SECONDARY_COLOR_ARRAY */ + 331, /* GL_CURRENT_RASTER_SECONDARY_COLOR */ 28, /* GL_ALIASED_POINT_SIZE_RANGE */ 27, /* GL_ALIASED_LINE_WIDTH_RANGE */ - 1563, /* GL_TEXTURE0 */ - 1565, /* GL_TEXTURE1 */ - 1587, /* GL_TEXTURE2 */ - 1609, /* GL_TEXTURE3 */ - 1615, /* GL_TEXTURE4 */ - 1617, /* GL_TEXTURE5 */ - 1619, /* GL_TEXTURE6 */ - 1621, /* GL_TEXTURE7 */ - 1623, /* GL_TEXTURE8 */ - 1625, /* GL_TEXTURE9 */ - 1566, /* GL_TEXTURE10 */ - 1568, /* GL_TEXTURE11 */ - 1570, /* GL_TEXTURE12 */ - 1572, /* GL_TEXTURE13 */ - 1574, /* GL_TEXTURE14 */ - 1576, /* GL_TEXTURE15 */ - 1578, /* GL_TEXTURE16 */ - 1580, /* GL_TEXTURE17 */ - 1582, /* GL_TEXTURE18 */ - 1584, /* GL_TEXTURE19 */ - 1588, /* GL_TEXTURE20 */ - 1590, /* GL_TEXTURE21 */ - 1592, /* GL_TEXTURE22 */ - 1594, /* GL_TEXTURE23 */ - 1596, /* GL_TEXTURE24 */ - 1598, /* GL_TEXTURE25 */ - 1600, /* GL_TEXTURE26 */ - 1602, /* GL_TEXTURE27 */ - 1604, /* GL_TEXTURE28 */ - 1606, /* GL_TEXTURE29 */ - 1610, /* GL_TEXTURE30 */ - 1612, /* GL_TEXTURE31 */ + 1572, /* GL_TEXTURE0 */ + 1574, /* GL_TEXTURE1 */ + 1596, /* GL_TEXTURE2 */ + 1618, /* GL_TEXTURE3 */ + 1624, /* GL_TEXTURE4 */ + 1626, /* GL_TEXTURE5 */ + 1628, /* GL_TEXTURE6 */ + 1630, /* GL_TEXTURE7 */ + 1632, /* GL_TEXTURE8 */ + 1634, /* GL_TEXTURE9 */ + 1575, /* GL_TEXTURE10 */ + 1577, /* GL_TEXTURE11 */ + 1579, /* GL_TEXTURE12 */ + 1581, /* GL_TEXTURE13 */ + 1583, /* GL_TEXTURE14 */ + 1585, /* GL_TEXTURE15 */ + 1587, /* GL_TEXTURE16 */ + 1589, /* GL_TEXTURE17 */ + 1591, /* GL_TEXTURE18 */ + 1593, /* GL_TEXTURE19 */ + 1597, /* GL_TEXTURE20 */ + 1599, /* GL_TEXTURE21 */ + 1601, /* GL_TEXTURE22 */ + 1603, /* GL_TEXTURE23 */ + 1605, /* GL_TEXTURE24 */ + 1607, /* GL_TEXTURE25 */ + 1609, /* GL_TEXTURE26 */ + 1611, /* GL_TEXTURE27 */ + 1613, /* GL_TEXTURE28 */ + 1615, /* GL_TEXTURE29 */ + 1619, /* GL_TEXTURE30 */ + 1621, /* GL_TEXTURE31 */ 18, /* GL_ACTIVE_TEXTURE */ - 133, /* GL_CLIENT_ACTIVE_TEXTURE */ - 934, /* GL_MAX_TEXTURE_UNITS */ - 1759, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - 1762, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - 1764, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - 1756, /* GL_TRANSPOSE_COLOR_MATRIX */ - 1545, /* GL_SUBTRACT */ - 919, /* GL_MAX_RENDERBUFFER_SIZE */ - 247, /* GL_COMPRESSED_ALPHA */ - 251, /* GL_COMPRESSED_LUMINANCE */ - 252, /* GL_COMPRESSED_LUMINANCE_ALPHA */ - 249, /* GL_COMPRESSED_INTENSITY */ - 255, /* GL_COMPRESSED_RGB */ - 256, /* GL_COMPRESSED_RGBA */ - 1670, /* GL_TEXTURE_COMPRESSION_HINT */ - 1735, /* GL_TEXTURE_RECTANGLE_ARB */ - 1642, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ - 1281, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ - 917, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ - 372, /* GL_DEPTH_STENCIL */ - 1785, /* GL_UNSIGNED_INT_24_8 */ - 930, /* GL_MAX_TEXTURE_LOD_BIAS */ - 1724, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ - 931, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ - 1700, /* GL_TEXTURE_FILTER_CONTROL */ - 1715, /* GL_TEXTURE_LOD_BIAS */ - 232, /* GL_COMBINE4 */ - 924, /* GL_MAX_SHININESS_NV */ - 925, /* GL_MAX_SPOT_EXPONENT_NV */ - 628, /* GL_INCR_WRAP */ - 343, /* GL_DECR_WRAP */ - 976, /* GL_MODELVIEW1_ARB */ - 1032, /* GL_NORMAL_MAP */ - 1314, /* GL_REFLECTION_MAP */ - 1679, /* GL_TEXTURE_CUBE_MAP */ - 1640, /* GL_TEXTURE_BINDING_CUBE_MAP */ - 1687, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ - 1681, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ - 1689, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ - 1683, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ - 1691, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ - 1685, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ - 1279, /* GL_PROXY_TEXTURE_CUBE_MAP */ - 873, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ - 1011, /* GL_MULTISAMPLE_FILTER_HINT_NV */ - 527, /* GL_FOG_DISTANCE_MODE_NV */ - 478, /* GL_EYE_RADIAL_NV */ - 477, /* GL_EYE_PLANE_ABSOLUTE_NV */ - 231, /* GL_COMBINE */ - 238, /* GL_COMBINE_RGB */ - 233, /* GL_COMBINE_ALPHA */ - 1383, /* GL_RGB_SCALE */ + 134, /* GL_CLIENT_ACTIVE_TEXTURE */ + 936, /* GL_MAX_TEXTURE_UNITS */ + 1767, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ + 1770, /* GL_TRANSPOSE_PROJECTION_MATRIX */ + 1772, /* GL_TRANSPOSE_TEXTURE_MATRIX */ + 1764, /* GL_TRANSPOSE_COLOR_MATRIX */ + 1554, /* GL_SUBTRACT */ + 921, /* GL_MAX_RENDERBUFFER_SIZE */ + 248, /* GL_COMPRESSED_ALPHA */ + 252, /* GL_COMPRESSED_LUMINANCE */ + 253, /* GL_COMPRESSED_LUMINANCE_ALPHA */ + 250, /* GL_COMPRESSED_INTENSITY */ + 256, /* GL_COMPRESSED_RGB */ + 257, /* GL_COMPRESSED_RGBA */ + 1679, /* GL_TEXTURE_COMPRESSION_HINT */ + 1744, /* GL_TEXTURE_RECTANGLE_ARB */ + 1651, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ + 1283, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ + 919, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ + 373, /* GL_DEPTH_STENCIL */ + 1794, /* GL_UNSIGNED_INT_24_8 */ + 932, /* GL_MAX_TEXTURE_LOD_BIAS */ + 1733, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ + 933, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ + 1709, /* GL_TEXTURE_FILTER_CONTROL */ + 1724, /* GL_TEXTURE_LOD_BIAS */ + 233, /* GL_COMBINE4 */ + 926, /* GL_MAX_SHININESS_NV */ + 927, /* GL_MAX_SPOT_EXPONENT_NV */ + 630, /* GL_INCR_WRAP */ + 344, /* GL_DECR_WRAP */ + 978, /* GL_MODELVIEW1_ARB */ + 1034, /* GL_NORMAL_MAP */ + 1321, /* GL_REFLECTION_MAP */ + 1688, /* GL_TEXTURE_CUBE_MAP */ + 1649, /* GL_TEXTURE_BINDING_CUBE_MAP */ + 1696, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ + 1690, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ + 1698, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ + 1692, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ + 1700, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ + 1694, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ + 1281, /* GL_PROXY_TEXTURE_CUBE_MAP */ + 875, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ + 1013, /* GL_MULTISAMPLE_FILTER_HINT_NV */ + 528, /* GL_FOG_DISTANCE_MODE_NV */ + 479, /* GL_EYE_RADIAL_NV */ + 478, /* GL_EYE_PLANE_ABSOLUTE_NV */ + 232, /* GL_COMBINE */ + 239, /* GL_COMBINE_RGB */ + 234, /* GL_COMBINE_ALPHA */ + 1392, /* GL_RGB_SCALE */ 24, /* GL_ADD_SIGNED */ - 656, /* GL_INTERPOLATE */ - 271, /* GL_CONSTANT */ - 1227, /* GL_PRIMARY_COLOR */ - 1224, /* GL_PREVIOUS */ - 1455, /* GL_SOURCE0_RGB */ - 1461, /* GL_SOURCE1_RGB */ - 1467, /* GL_SOURCE2_RGB */ - 1471, /* GL_SOURCE3_RGB_NV */ - 1452, /* GL_SOURCE0_ALPHA */ - 1458, /* GL_SOURCE1_ALPHA */ - 1464, /* GL_SOURCE2_ALPHA */ - 1470, /* GL_SOURCE3_ALPHA_NV */ - 1069, /* GL_OPERAND0_RGB */ - 1075, /* GL_OPERAND1_RGB */ - 1081, /* GL_OPERAND2_RGB */ - 1085, /* GL_OPERAND3_RGB_NV */ - 1066, /* GL_OPERAND0_ALPHA */ - 1072, /* GL_OPERAND1_ALPHA */ - 1078, /* GL_OPERAND2_ALPHA */ - 1084, /* GL_OPERAND3_ALPHA_NV */ - 1810, /* GL_VERTEX_ARRAY_BINDING */ - 1733, /* GL_TEXTURE_RANGE_LENGTH_APPLE */ - 1734, /* GL_TEXTURE_RANGE_POINTER_APPLE */ - 1876, /* GL_YCBCR_422_APPLE */ - 1799, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - 1801, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ - 1743, /* GL_TEXTURE_STORAGE_HINT_APPLE */ - 1536, /* GL_STORAGE_PRIVATE_APPLE */ - 1535, /* GL_STORAGE_CACHED_APPLE */ - 1537, /* GL_STORAGE_SHARED_APPLE */ - 1442, /* GL_SLICE_ACCUM_SUN */ - 1288, /* GL_QUAD_MESH_SUN */ - 1768, /* GL_TRIANGLE_MESH_SUN */ - 1849, /* GL_VERTEX_PROGRAM_ARB */ - 1860, /* GL_VERTEX_STATE_PROGRAM_NV */ - 1836, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ - 1842, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ - 1844, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ - 1846, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ - 334, /* GL_CURRENT_VERTEX_ATTRIB */ - 1240, /* GL_PROGRAM_LENGTH_ARB */ - 1254, /* GL_PROGRAM_STRING_ARB */ - 998, /* GL_MODELVIEW_PROJECTION_NV */ - 623, /* GL_IDENTITY_NV */ - 670, /* GL_INVERSE_NV */ - 1761, /* GL_TRANSPOSE_NV */ - 671, /* GL_INVERSE_TRANSPOSE_NV */ - 903, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ - 902, /* GL_MAX_PROGRAM_MATRICES_ARB */ - 809, /* GL_MATRIX0_NV */ - 821, /* GL_MATRIX1_NV */ - 833, /* GL_MATRIX2_NV */ - 837, /* GL_MATRIX3_NV */ - 839, /* GL_MATRIX4_NV */ - 841, /* GL_MATRIX5_NV */ - 843, /* GL_MATRIX6_NV */ - 845, /* GL_MATRIX7_NV */ - 318, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ - 315, /* GL_CURRENT_MATRIX_ARB */ - 1852, /* GL_VERTEX_PROGRAM_POINT_SIZE */ - 1855, /* GL_VERTEX_PROGRAM_TWO_SIDE */ - 1252, /* GL_PROGRAM_PARAMETER_NV */ - 1840, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ - 1256, /* GL_PROGRAM_TARGET_NV */ - 1253, /* GL_PROGRAM_RESIDENT_NV */ - 1753, /* GL_TRACK_MATRIX_NV */ - 1754, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - 1850, /* GL_VERTEX_PROGRAM_BINDING_NV */ - 1234, /* GL_PROGRAM_ERROR_POSITION_ARB */ - 356, /* GL_DEPTH_CLAMP */ - 1818, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - 1825, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - 1826, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - 1827, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - 1828, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - 1829, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - 1830, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - 1831, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - 1832, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - 1833, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - 1819, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - 1820, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - 1821, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - 1822, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - 1823, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - 1824, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ - 757, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ - 764, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ - 765, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ - 766, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ - 767, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ - 768, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ - 769, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ - 770, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ - 771, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ - 772, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ - 758, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ - 759, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ - 760, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ - 761, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ - 762, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ - 763, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ - 784, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ - 791, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ - 792, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ - 793, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ - 794, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ - 795, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ - 796, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ - 1233, /* GL_PROGRAM_BINDING_ARB */ - 798, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ - 799, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ - 785, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ - 786, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ - 787, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ - 788, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ - 789, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ - 790, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ - 1668, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ - 1665, /* GL_TEXTURE_COMPRESSED */ - 1037, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ - 269, /* GL_COMPRESSED_TEXTURE_FORMATS */ - 946, /* GL_MAX_VERTEX_UNITS_ARB */ + 658, /* GL_INTERPOLATE */ + 272, /* GL_CONSTANT */ + 1229, /* GL_PRIMARY_COLOR */ + 1226, /* GL_PREVIOUS */ + 1464, /* GL_SOURCE0_RGB */ + 1470, /* GL_SOURCE1_RGB */ + 1476, /* GL_SOURCE2_RGB */ + 1480, /* GL_SOURCE3_RGB_NV */ + 1461, /* GL_SOURCE0_ALPHA */ + 1467, /* GL_SOURCE1_ALPHA */ + 1473, /* GL_SOURCE2_ALPHA */ + 1479, /* GL_SOURCE3_ALPHA_NV */ + 1071, /* GL_OPERAND0_RGB */ + 1077, /* GL_OPERAND1_RGB */ + 1083, /* GL_OPERAND2_RGB */ + 1087, /* GL_OPERAND3_RGB_NV */ + 1068, /* GL_OPERAND0_ALPHA */ + 1074, /* GL_OPERAND1_ALPHA */ + 1080, /* GL_OPERAND2_ALPHA */ + 1086, /* GL_OPERAND3_ALPHA_NV */ + 109, /* GL_BUFFER_OBJECT_APPLE */ + 1819, /* GL_VERTEX_ARRAY_BINDING */ + 1742, /* GL_TEXTURE_RANGE_LENGTH_APPLE */ + 1743, /* GL_TEXTURE_RANGE_POINTER_APPLE */ + 1886, /* GL_YCBCR_422_APPLE */ + 1808, /* GL_UNSIGNED_SHORT_8_8_APPLE */ + 1810, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ + 1752, /* GL_TEXTURE_STORAGE_HINT_APPLE */ + 1545, /* GL_STORAGE_PRIVATE_APPLE */ + 1544, /* GL_STORAGE_CACHED_APPLE */ + 1546, /* GL_STORAGE_SHARED_APPLE */ + 1451, /* GL_SLICE_ACCUM_SUN */ + 1291, /* GL_QUAD_MESH_SUN */ + 1776, /* GL_TRIANGLE_MESH_SUN */ + 1858, /* GL_VERTEX_PROGRAM_ARB */ + 1869, /* GL_VERTEX_STATE_PROGRAM_NV */ + 1845, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ + 1851, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ + 1853, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ + 1855, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ + 335, /* GL_CURRENT_VERTEX_ATTRIB */ + 1242, /* GL_PROGRAM_LENGTH_ARB */ + 1256, /* GL_PROGRAM_STRING_ARB */ + 1000, /* GL_MODELVIEW_PROJECTION_NV */ + 625, /* GL_IDENTITY_NV */ + 672, /* GL_INVERSE_NV */ + 1769, /* GL_TRANSPOSE_NV */ + 673, /* GL_INVERSE_TRANSPOSE_NV */ + 905, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ + 904, /* GL_MAX_PROGRAM_MATRICES_ARB */ + 811, /* GL_MATRIX0_NV */ + 823, /* GL_MATRIX1_NV */ + 835, /* GL_MATRIX2_NV */ + 839, /* GL_MATRIX3_NV */ + 841, /* GL_MATRIX4_NV */ + 843, /* GL_MATRIX5_NV */ + 845, /* GL_MATRIX6_NV */ + 847, /* GL_MATRIX7_NV */ + 319, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ + 316, /* GL_CURRENT_MATRIX_ARB */ + 1861, /* GL_VERTEX_PROGRAM_POINT_SIZE */ + 1864, /* GL_VERTEX_PROGRAM_TWO_SIDE */ + 1254, /* GL_PROGRAM_PARAMETER_NV */ + 1849, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ + 1258, /* GL_PROGRAM_TARGET_NV */ + 1255, /* GL_PROGRAM_RESIDENT_NV */ + 1761, /* GL_TRACK_MATRIX_NV */ + 1762, /* GL_TRACK_MATRIX_TRANSFORM_NV */ + 1859, /* GL_VERTEX_PROGRAM_BINDING_NV */ + 1236, /* GL_PROGRAM_ERROR_POSITION_ARB */ + 357, /* GL_DEPTH_CLAMP */ + 1827, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ + 1834, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ + 1835, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ + 1836, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ + 1837, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ + 1838, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ + 1839, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ + 1840, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ + 1841, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ + 1842, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ + 1828, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ + 1829, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ + 1830, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ + 1831, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ + 1832, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ + 1833, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ + 759, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ + 766, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ + 767, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ + 768, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ + 769, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ + 770, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ + 771, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ + 772, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ + 773, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ + 774, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ + 760, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ + 761, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ + 762, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ + 763, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ + 764, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ + 765, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ + 786, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ + 793, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ + 794, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ + 795, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ + 796, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ + 797, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ + 798, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ + 1235, /* GL_PROGRAM_BINDING_ARB */ + 800, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ + 801, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ + 787, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ + 788, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ + 789, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ + 790, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ + 791, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ + 792, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ + 1677, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ + 1674, /* GL_TEXTURE_COMPRESSED */ + 1039, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ + 270, /* GL_COMPRESSED_TEXTURE_FORMATS */ + 948, /* GL_MAX_VERTEX_UNITS_ARB */ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */ - 1871, /* GL_WEIGHT_SUM_UNITY_ARB */ - 1848, /* GL_VERTEX_BLEND_ARB */ - 336, /* GL_CURRENT_WEIGHT_ARB */ - 1870, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - 1869, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - 1868, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - 1867, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - 1864, /* GL_WEIGHT_ARRAY_ARB */ - 386, /* GL_DOT3_RGB */ - 387, /* GL_DOT3_RGBA */ - 263, /* GL_COMPRESSED_RGB_FXT1_3DFX */ - 258, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ - 1006, /* GL_MULTISAMPLE_3DFX */ - 1404, /* GL_SAMPLE_BUFFERS_3DFX */ - 1395, /* GL_SAMPLES_3DFX */ - 987, /* GL_MODELVIEW2_ARB */ - 990, /* GL_MODELVIEW3_ARB */ - 991, /* GL_MODELVIEW4_ARB */ - 992, /* GL_MODELVIEW5_ARB */ - 993, /* GL_MODELVIEW6_ARB */ - 994, /* GL_MODELVIEW7_ARB */ - 995, /* GL_MODELVIEW8_ARB */ - 996, /* GL_MODELVIEW9_ARB */ - 966, /* GL_MODELVIEW10_ARB */ - 967, /* GL_MODELVIEW11_ARB */ - 968, /* GL_MODELVIEW12_ARB */ - 969, /* GL_MODELVIEW13_ARB */ - 970, /* GL_MODELVIEW14_ARB */ - 971, /* GL_MODELVIEW15_ARB */ - 972, /* GL_MODELVIEW16_ARB */ - 973, /* GL_MODELVIEW17_ARB */ - 974, /* GL_MODELVIEW18_ARB */ - 975, /* GL_MODELVIEW19_ARB */ - 977, /* GL_MODELVIEW20_ARB */ - 978, /* GL_MODELVIEW21_ARB */ - 979, /* GL_MODELVIEW22_ARB */ - 980, /* GL_MODELVIEW23_ARB */ - 981, /* GL_MODELVIEW24_ARB */ - 982, /* GL_MODELVIEW25_ARB */ - 983, /* GL_MODELVIEW26_ARB */ - 984, /* GL_MODELVIEW27_ARB */ - 985, /* GL_MODELVIEW28_ARB */ - 986, /* GL_MODELVIEW29_ARB */ - 988, /* GL_MODELVIEW30_ARB */ - 989, /* GL_MODELVIEW31_ARB */ - 391, /* GL_DOT3_RGB_EXT */ - 389, /* GL_DOT3_RGBA_EXT */ - 960, /* GL_MIRROR_CLAMP_EXT */ - 963, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ - 1001, /* GL_MODULATE_ADD_ATI */ - 1002, /* GL_MODULATE_SIGNED_ADD_ATI */ - 1003, /* GL_MODULATE_SUBTRACT_ATI */ - 1877, /* GL_YCBCR_MESA */ - 1093, /* GL_PACK_INVERT_MESA */ - 339, /* GL_DEBUG_OBJECT_MESA */ - 340, /* GL_DEBUG_PRINT_MESA */ - 338, /* GL_DEBUG_ASSERT_MESA */ - 110, /* GL_BUFFER_SIZE */ - 112, /* GL_BUFFER_USAGE */ - 116, /* GL_BUMP_ROT_MATRIX_ATI */ - 117, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */ - 115, /* GL_BUMP_NUM_TEX_UNITS_ATI */ - 119, /* GL_BUMP_TEX_UNITS_ATI */ - 451, /* GL_DUDV_ATI */ - 450, /* GL_DU8DV8_ATI */ - 114, /* GL_BUMP_ENVMAP_ATI */ - 118, /* GL_BUMP_TARGET_ATI */ - 1503, /* GL_STENCIL_BACK_FUNC */ - 1501, /* GL_STENCIL_BACK_FAIL */ - 1505, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ - 1507, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ - 536, /* GL_FRAGMENT_PROGRAM_ARB */ - 1231, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ - 1259, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ - 1258, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ - 1243, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - 1249, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - 1248, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - 892, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ - 915, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ - 914, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ - 905, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - 911, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - 910, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - 875, /* GL_MAX_DRAW_BUFFERS */ - 395, /* GL_DRAW_BUFFER0 */ - 398, /* GL_DRAW_BUFFER1 */ - 419, /* GL_DRAW_BUFFER2 */ - 422, /* GL_DRAW_BUFFER3 */ - 425, /* GL_DRAW_BUFFER4 */ - 428, /* GL_DRAW_BUFFER5 */ - 431, /* GL_DRAW_BUFFER6 */ - 434, /* GL_DRAW_BUFFER7 */ - 437, /* GL_DRAW_BUFFER8 */ - 440, /* GL_DRAW_BUFFER9 */ - 399, /* GL_DRAW_BUFFER10 */ - 402, /* GL_DRAW_BUFFER11 */ - 405, /* GL_DRAW_BUFFER12 */ - 408, /* GL_DRAW_BUFFER13 */ - 411, /* GL_DRAW_BUFFER14 */ - 414, /* GL_DRAW_BUFFER15 */ + 1881, /* GL_WEIGHT_SUM_UNITY_ARB */ + 1857, /* GL_VERTEX_BLEND_ARB */ + 337, /* GL_CURRENT_WEIGHT_ARB */ + 1880, /* GL_WEIGHT_ARRAY_TYPE_ARB */ + 1879, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ + 1878, /* GL_WEIGHT_ARRAY_SIZE_ARB */ + 1877, /* GL_WEIGHT_ARRAY_POINTER_ARB */ + 1874, /* GL_WEIGHT_ARRAY_ARB */ + 387, /* GL_DOT3_RGB */ + 388, /* GL_DOT3_RGBA */ + 264, /* GL_COMPRESSED_RGB_FXT1_3DFX */ + 259, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ + 1008, /* GL_MULTISAMPLE_3DFX */ + 1413, /* GL_SAMPLE_BUFFERS_3DFX */ + 1404, /* GL_SAMPLES_3DFX */ + 989, /* GL_MODELVIEW2_ARB */ + 992, /* GL_MODELVIEW3_ARB */ + 993, /* GL_MODELVIEW4_ARB */ + 994, /* GL_MODELVIEW5_ARB */ + 995, /* GL_MODELVIEW6_ARB */ + 996, /* GL_MODELVIEW7_ARB */ + 997, /* GL_MODELVIEW8_ARB */ + 998, /* GL_MODELVIEW9_ARB */ + 968, /* GL_MODELVIEW10_ARB */ + 969, /* GL_MODELVIEW11_ARB */ + 970, /* GL_MODELVIEW12_ARB */ + 971, /* GL_MODELVIEW13_ARB */ + 972, /* GL_MODELVIEW14_ARB */ + 973, /* GL_MODELVIEW15_ARB */ + 974, /* GL_MODELVIEW16_ARB */ + 975, /* GL_MODELVIEW17_ARB */ + 976, /* GL_MODELVIEW18_ARB */ + 977, /* GL_MODELVIEW19_ARB */ + 979, /* GL_MODELVIEW20_ARB */ + 980, /* GL_MODELVIEW21_ARB */ + 981, /* GL_MODELVIEW22_ARB */ + 982, /* GL_MODELVIEW23_ARB */ + 983, /* GL_MODELVIEW24_ARB */ + 984, /* GL_MODELVIEW25_ARB */ + 985, /* GL_MODELVIEW26_ARB */ + 986, /* GL_MODELVIEW27_ARB */ + 987, /* GL_MODELVIEW28_ARB */ + 988, /* GL_MODELVIEW29_ARB */ + 990, /* GL_MODELVIEW30_ARB */ + 991, /* GL_MODELVIEW31_ARB */ + 392, /* GL_DOT3_RGB_EXT */ + 390, /* GL_DOT3_RGBA_EXT */ + 962, /* GL_MIRROR_CLAMP_EXT */ + 965, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ + 1003, /* GL_MODULATE_ADD_ATI */ + 1004, /* GL_MODULATE_SIGNED_ADD_ATI */ + 1005, /* GL_MODULATE_SUBTRACT_ATI */ + 1887, /* GL_YCBCR_MESA */ + 1095, /* GL_PACK_INVERT_MESA */ + 340, /* GL_DEBUG_OBJECT_MESA */ + 341, /* GL_DEBUG_PRINT_MESA */ + 339, /* GL_DEBUG_ASSERT_MESA */ + 111, /* GL_BUFFER_SIZE */ + 113, /* GL_BUFFER_USAGE */ + 117, /* GL_BUMP_ROT_MATRIX_ATI */ + 118, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */ + 116, /* GL_BUMP_NUM_TEX_UNITS_ATI */ + 120, /* GL_BUMP_TEX_UNITS_ATI */ + 452, /* GL_DUDV_ATI */ + 451, /* GL_DU8DV8_ATI */ + 115, /* GL_BUMP_ENVMAP_ATI */ + 119, /* GL_BUMP_TARGET_ATI */ + 1512, /* GL_STENCIL_BACK_FUNC */ + 1510, /* GL_STENCIL_BACK_FAIL */ + 1514, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ + 1516, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ + 537, /* GL_FRAGMENT_PROGRAM_ARB */ + 1233, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ + 1261, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ + 1260, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ + 1245, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + 1251, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + 1250, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + 894, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ + 917, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ + 916, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ + 907, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ + 913, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ + 912, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ + 877, /* GL_MAX_DRAW_BUFFERS */ + 396, /* GL_DRAW_BUFFER0 */ + 399, /* GL_DRAW_BUFFER1 */ + 420, /* GL_DRAW_BUFFER2 */ + 423, /* GL_DRAW_BUFFER3 */ + 426, /* GL_DRAW_BUFFER4 */ + 429, /* GL_DRAW_BUFFER5 */ + 432, /* GL_DRAW_BUFFER6 */ + 435, /* GL_DRAW_BUFFER7 */ + 438, /* GL_DRAW_BUFFER8 */ + 441, /* GL_DRAW_BUFFER9 */ + 400, /* GL_DRAW_BUFFER10 */ + 403, /* GL_DRAW_BUFFER11 */ + 406, /* GL_DRAW_BUFFER12 */ + 409, /* GL_DRAW_BUFFER13 */ + 412, /* GL_DRAW_BUFFER14 */ + 415, /* GL_DRAW_BUFFER15 */ 82, /* GL_BLEND_EQUATION_ALPHA */ - 854, /* GL_MATRIX_PALETTE_ARB */ - 886, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ - 889, /* GL_MAX_PALETTE_MATRICES_ARB */ - 321, /* GL_CURRENT_PALETTE_MATRIX_ARB */ - 848, /* GL_MATRIX_INDEX_ARRAY_ARB */ - 316, /* GL_CURRENT_MATRIX_INDEX_ARB */ - 850, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ - 852, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ - 851, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ - 849, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ - 1695, /* GL_TEXTURE_DEPTH_SIZE */ - 379, /* GL_DEPTH_TEXTURE_MODE */ - 1660, /* GL_TEXTURE_COMPARE_MODE */ - 1658, /* GL_TEXTURE_COMPARE_FUNC */ - 242, /* GL_COMPARE_R_TO_TEXTURE */ - 1165, /* GL_POINT_SPRITE */ - 296, /* GL_COORD_REPLACE */ - 1169, /* GL_POINT_SPRITE_R_MODE_NV */ - 1290, /* GL_QUERY_COUNTER_BITS */ - 323, /* GL_CURRENT_QUERY */ - 1292, /* GL_QUERY_RESULT */ - 1294, /* GL_QUERY_RESULT_AVAILABLE */ - 940, /* GL_MAX_VERTEX_ATTRIBS */ - 1838, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ - 377, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ - 376, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ - 926, /* GL_MAX_TEXTURE_COORDS */ - 928, /* GL_MAX_TEXTURE_IMAGE_UNITS */ - 1236, /* GL_PROGRAM_ERROR_STRING_ARB */ - 1238, /* GL_PROGRAM_FORMAT_ASCII_ARB */ - 1237, /* GL_PROGRAM_FORMAT_ARB */ - 1745, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ - 354, /* GL_DEPTH_BOUNDS_TEST_EXT */ - 353, /* GL_DEPTH_BOUNDS_EXT */ + 856, /* GL_MATRIX_PALETTE_ARB */ + 888, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ + 891, /* GL_MAX_PALETTE_MATRICES_ARB */ + 322, /* GL_CURRENT_PALETTE_MATRIX_ARB */ + 850, /* GL_MATRIX_INDEX_ARRAY_ARB */ + 317, /* GL_CURRENT_MATRIX_INDEX_ARB */ + 852, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ + 854, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ + 853, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ + 851, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ + 1704, /* GL_TEXTURE_DEPTH_SIZE */ + 380, /* GL_DEPTH_TEXTURE_MODE */ + 1669, /* GL_TEXTURE_COMPARE_MODE */ + 1667, /* GL_TEXTURE_COMPARE_FUNC */ + 243, /* GL_COMPARE_R_TO_TEXTURE */ + 1167, /* GL_POINT_SPRITE */ + 297, /* GL_COORD_REPLACE */ + 1171, /* GL_POINT_SPRITE_R_MODE_NV */ + 1295, /* GL_QUERY_COUNTER_BITS */ + 324, /* GL_CURRENT_QUERY */ + 1298, /* GL_QUERY_RESULT */ + 1300, /* GL_QUERY_RESULT_AVAILABLE */ + 942, /* GL_MAX_VERTEX_ATTRIBS */ + 1847, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ + 378, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ + 377, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ + 928, /* GL_MAX_TEXTURE_COORDS */ + 930, /* GL_MAX_TEXTURE_IMAGE_UNITS */ + 1238, /* GL_PROGRAM_ERROR_STRING_ARB */ + 1240, /* GL_PROGRAM_FORMAT_ASCII_ARB */ + 1239, /* GL_PROGRAM_FORMAT_ARB */ + 1754, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ + 355, /* GL_DEPTH_BOUNDS_TEST_EXT */ + 354, /* GL_DEPTH_BOUNDS_EXT */ 53, /* GL_ARRAY_BUFFER */ - 464, /* GL_ELEMENT_ARRAY_BUFFER */ + 465, /* GL_ELEMENT_ARRAY_BUFFER */ 54, /* GL_ARRAY_BUFFER_BINDING */ - 465, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ - 1812, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ - 1027, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ - 149, /* GL_COLOR_ARRAY_BUFFER_BINDING */ - 632, /* GL_INDEX_ARRAY_BUFFER_BINDING */ - 1673, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ - 460, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ - 1416, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ - 514, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ - 1865, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - 1834, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ - 1239, /* GL_PROGRAM_INSTRUCTIONS_ARB */ - 898, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ - 1245, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - 907, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - 1257, /* GL_PROGRAM_TEMPORARIES_ARB */ - 913, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ - 1247, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ - 909, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ - 1251, /* GL_PROGRAM_PARAMETERS_ARB */ - 912, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ - 1246, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ - 908, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ - 1232, /* GL_PROGRAM_ATTRIBS_ARB */ - 893, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ - 1244, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ - 906, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ - 1230, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ - 891, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ - 1242, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - 904, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - 899, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ - 895, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ - 1260, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ - 1758, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ - 1304, /* GL_READ_ONLY */ - 1873, /* GL_WRITE_ONLY */ - 1306, /* GL_READ_WRITE */ + 466, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ + 1821, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ + 1029, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ + 150, /* GL_COLOR_ARRAY_BUFFER_BINDING */ + 634, /* GL_INDEX_ARRAY_BUFFER_BINDING */ + 1682, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ + 461, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ + 1425, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ + 515, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ + 1875, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ + 1843, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ + 1241, /* GL_PROGRAM_INSTRUCTIONS_ARB */ + 900, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ + 1247, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + 909, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ + 1259, /* GL_PROGRAM_TEMPORARIES_ARB */ + 915, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ + 1249, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ + 911, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ + 1253, /* GL_PROGRAM_PARAMETERS_ARB */ + 914, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ + 1248, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ + 910, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ + 1234, /* GL_PROGRAM_ATTRIBS_ARB */ + 895, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ + 1246, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ + 908, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ + 1232, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ + 893, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ + 1244, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + 906, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ + 901, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ + 897, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ + 1262, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ + 1766, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ + 1311, /* GL_READ_ONLY */ + 1883, /* GL_WRITE_ONLY */ + 1313, /* GL_READ_WRITE */ 102, /* GL_BUFFER_ACCESS */ 105, /* GL_BUFFER_MAPPED */ 107, /* GL_BUFFER_MAP_POINTER */ - 1752, /* GL_TIME_ELAPSED_EXT */ - 808, /* GL_MATRIX0_ARB */ - 820, /* GL_MATRIX1_ARB */ - 832, /* GL_MATRIX2_ARB */ - 836, /* GL_MATRIX3_ARB */ - 838, /* GL_MATRIX4_ARB */ - 840, /* GL_MATRIX5_ARB */ - 842, /* GL_MATRIX6_ARB */ - 844, /* GL_MATRIX7_ARB */ - 846, /* GL_MATRIX8_ARB */ - 847, /* GL_MATRIX9_ARB */ - 810, /* GL_MATRIX10_ARB */ - 811, /* GL_MATRIX11_ARB */ - 812, /* GL_MATRIX12_ARB */ - 813, /* GL_MATRIX13_ARB */ - 814, /* GL_MATRIX14_ARB */ - 815, /* GL_MATRIX15_ARB */ - 816, /* GL_MATRIX16_ARB */ - 817, /* GL_MATRIX17_ARB */ - 818, /* GL_MATRIX18_ARB */ - 819, /* GL_MATRIX19_ARB */ - 822, /* GL_MATRIX20_ARB */ - 823, /* GL_MATRIX21_ARB */ - 824, /* GL_MATRIX22_ARB */ - 825, /* GL_MATRIX23_ARB */ - 826, /* GL_MATRIX24_ARB */ - 827, /* GL_MATRIX25_ARB */ - 828, /* GL_MATRIX26_ARB */ - 829, /* GL_MATRIX27_ARB */ - 830, /* GL_MATRIX28_ARB */ - 831, /* GL_MATRIX29_ARB */ - 834, /* GL_MATRIX30_ARB */ - 835, /* GL_MATRIX31_ARB */ - 1540, /* GL_STREAM_DRAW */ - 1542, /* GL_STREAM_READ */ - 1538, /* GL_STREAM_COPY */ - 1494, /* GL_STATIC_DRAW */ - 1496, /* GL_STATIC_READ */ - 1492, /* GL_STATIC_COPY */ - 454, /* GL_DYNAMIC_DRAW */ - 456, /* GL_DYNAMIC_READ */ - 452, /* GL_DYNAMIC_COPY */ - 1133, /* GL_PIXEL_PACK_BUFFER */ - 1137, /* GL_PIXEL_UNPACK_BUFFER */ - 1134, /* GL_PIXEL_PACK_BUFFER_BINDING */ - 1138, /* GL_PIXEL_UNPACK_BUFFER_BINDING */ - 347, /* GL_DEPTH24_STENCIL8 */ - 1741, /* GL_TEXTURE_STENCIL_SIZE */ - 1693, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */ - 894, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ - 897, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ - 901, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ - 900, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ - 857, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */ - 1531, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ + 1760, /* GL_TIME_ELAPSED_EXT */ + 810, /* GL_MATRIX0_ARB */ + 822, /* GL_MATRIX1_ARB */ + 834, /* GL_MATRIX2_ARB */ + 838, /* GL_MATRIX3_ARB */ + 840, /* GL_MATRIX4_ARB */ + 842, /* GL_MATRIX5_ARB */ + 844, /* GL_MATRIX6_ARB */ + 846, /* GL_MATRIX7_ARB */ + 848, /* GL_MATRIX8_ARB */ + 849, /* GL_MATRIX9_ARB */ + 812, /* GL_MATRIX10_ARB */ + 813, /* GL_MATRIX11_ARB */ + 814, /* GL_MATRIX12_ARB */ + 815, /* GL_MATRIX13_ARB */ + 816, /* GL_MATRIX14_ARB */ + 817, /* GL_MATRIX15_ARB */ + 818, /* GL_MATRIX16_ARB */ + 819, /* GL_MATRIX17_ARB */ + 820, /* GL_MATRIX18_ARB */ + 821, /* GL_MATRIX19_ARB */ + 824, /* GL_MATRIX20_ARB */ + 825, /* GL_MATRIX21_ARB */ + 826, /* GL_MATRIX22_ARB */ + 827, /* GL_MATRIX23_ARB */ + 828, /* GL_MATRIX24_ARB */ + 829, /* GL_MATRIX25_ARB */ + 830, /* GL_MATRIX26_ARB */ + 831, /* GL_MATRIX27_ARB */ + 832, /* GL_MATRIX28_ARB */ + 833, /* GL_MATRIX29_ARB */ + 836, /* GL_MATRIX30_ARB */ + 837, /* GL_MATRIX31_ARB */ + 1549, /* GL_STREAM_DRAW */ + 1551, /* GL_STREAM_READ */ + 1547, /* GL_STREAM_COPY */ + 1503, /* GL_STATIC_DRAW */ + 1505, /* GL_STATIC_READ */ + 1501, /* GL_STATIC_COPY */ + 455, /* GL_DYNAMIC_DRAW */ + 457, /* GL_DYNAMIC_READ */ + 453, /* GL_DYNAMIC_COPY */ + 1135, /* GL_PIXEL_PACK_BUFFER */ + 1139, /* GL_PIXEL_UNPACK_BUFFER */ + 1136, /* GL_PIXEL_PACK_BUFFER_BINDING */ + 1140, /* GL_PIXEL_UNPACK_BUFFER_BINDING */ + 348, /* GL_DEPTH24_STENCIL8 */ + 1750, /* GL_TEXTURE_STENCIL_SIZE */ + 1702, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */ + 896, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ + 899, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ + 903, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ + 902, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ + 859, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */ + 1540, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ 17, /* GL_ACTIVE_STENCIL_FACE_EXT */ - 961, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ - 1397, /* GL_SAMPLES_PASSED */ - 109, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */ + 963, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ + 1406, /* GL_SAMPLES_PASSED */ + 110, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */ 104, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */ - 537, /* GL_FRAGMENT_SHADER */ - 1858, /* GL_VERTEX_SHADER */ - 1250, /* GL_PROGRAM_OBJECT_ARB */ - 1429, /* GL_SHADER_OBJECT_ARB */ - 882, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ - 944, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ - 938, /* GL_MAX_VARYING_FLOATS */ - 942, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ - 867, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ - 1053, /* GL_OBJECT_TYPE_ARB */ - 1431, /* GL_SHADER_TYPE */ - 502, /* GL_FLOAT_VEC2 */ - 504, /* GL_FLOAT_VEC3 */ - 506, /* GL_FLOAT_VEC4 */ - 659, /* GL_INT_VEC2 */ - 661, /* GL_INT_VEC3 */ - 663, /* GL_INT_VEC4 */ + 1324, /* GL_RELEASED_APPLE */ + 1872, /* GL_VOLATILE_APPLE */ + 1352, /* GL_RETAINED_APPLE */ + 1779, /* GL_UNDEFINED_APPLE */ + 1285, /* GL_PURGEABLE_APPLE */ + 538, /* GL_FRAGMENT_SHADER */ + 1867, /* GL_VERTEX_SHADER */ + 1252, /* GL_PROGRAM_OBJECT_ARB */ + 1438, /* GL_SHADER_OBJECT_ARB */ + 884, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ + 946, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ + 940, /* GL_MAX_VARYING_FLOATS */ + 944, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ + 869, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ + 1055, /* GL_OBJECT_TYPE_ARB */ + 1440, /* GL_SHADER_TYPE */ + 503, /* GL_FLOAT_VEC2 */ + 505, /* GL_FLOAT_VEC3 */ + 507, /* GL_FLOAT_VEC4 */ + 661, /* GL_INT_VEC2 */ + 663, /* GL_INT_VEC3 */ + 665, /* GL_INT_VEC4 */ 94, /* GL_BOOL */ 96, /* GL_BOOL_VEC2 */ 98, /* GL_BOOL_VEC3 */ 100, /* GL_BOOL_VEC4 */ - 490, /* GL_FLOAT_MAT2 */ - 494, /* GL_FLOAT_MAT3 */ - 498, /* GL_FLOAT_MAT4 */ - 1388, /* GL_SAMPLER_1D */ - 1390, /* GL_SAMPLER_2D */ - 1392, /* GL_SAMPLER_3D */ - 1393, /* GL_SAMPLER_CUBE */ - 1389, /* GL_SAMPLER_1D_SHADOW */ - 1391, /* GL_SAMPLER_2D_SHADOW */ - 492, /* GL_FLOAT_MAT2x3 */ - 493, /* GL_FLOAT_MAT2x4 */ - 496, /* GL_FLOAT_MAT3x2 */ - 497, /* GL_FLOAT_MAT3x4 */ - 500, /* GL_FLOAT_MAT4x2 */ - 501, /* GL_FLOAT_MAT4x3 */ - 345, /* GL_DELETE_STATUS */ - 246, /* GL_COMPILE_STATUS */ - 715, /* GL_LINK_STATUS */ - 1806, /* GL_VALIDATE_STATUS */ - 644, /* GL_INFO_LOG_LENGTH */ + 491, /* GL_FLOAT_MAT2 */ + 495, /* GL_FLOAT_MAT3 */ + 499, /* GL_FLOAT_MAT4 */ + 1397, /* GL_SAMPLER_1D */ + 1399, /* GL_SAMPLER_2D */ + 1401, /* GL_SAMPLER_3D */ + 1402, /* GL_SAMPLER_CUBE */ + 1398, /* GL_SAMPLER_1D_SHADOW */ + 1400, /* GL_SAMPLER_2D_SHADOW */ + 493, /* GL_FLOAT_MAT2x3 */ + 494, /* GL_FLOAT_MAT2x4 */ + 497, /* GL_FLOAT_MAT3x2 */ + 498, /* GL_FLOAT_MAT3x4 */ + 501, /* GL_FLOAT_MAT4x2 */ + 502, /* GL_FLOAT_MAT4x3 */ + 346, /* GL_DELETE_STATUS */ + 247, /* GL_COMPILE_STATUS */ + 717, /* GL_LINK_STATUS */ + 1815, /* GL_VALIDATE_STATUS */ + 646, /* GL_INFO_LOG_LENGTH */ 56, /* GL_ATTACHED_SHADERS */ 20, /* GL_ACTIVE_UNIFORMS */ 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */ - 1430, /* GL_SHADER_SOURCE_LENGTH */ + 1439, /* GL_SHADER_SOURCE_LENGTH */ 15, /* GL_ACTIVE_ATTRIBUTES */ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */ - 539, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */ - 1433, /* GL_SHADING_LANGUAGE_VERSION */ - 322, /* GL_CURRENT_PROGRAM */ - 1102, /* GL_PALETTE4_RGB8_OES */ - 1104, /* GL_PALETTE4_RGBA8_OES */ - 1100, /* GL_PALETTE4_R5_G6_B5_OES */ - 1103, /* GL_PALETTE4_RGBA4_OES */ - 1101, /* GL_PALETTE4_RGB5_A1_OES */ - 1107, /* GL_PALETTE8_RGB8_OES */ - 1109, /* GL_PALETTE8_RGBA8_OES */ - 1105, /* GL_PALETTE8_R5_G6_B5_OES */ - 1108, /* GL_PALETTE8_RGBA4_OES */ - 1106, /* GL_PALETTE8_RGB5_A1_OES */ - 626, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ - 625, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ - 1791, /* GL_UNSIGNED_NORMALIZED */ - 1628, /* GL_TEXTURE_1D_ARRAY_EXT */ - 1272, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */ - 1630, /* GL_TEXTURE_2D_ARRAY_EXT */ - 1275, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */ - 1636, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */ - 1638, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */ - 1486, /* GL_SRGB */ - 1487, /* GL_SRGB8 */ - 1489, /* GL_SRGB_ALPHA */ - 1488, /* GL_SRGB8_ALPHA8 */ - 1446, /* GL_SLUMINANCE_ALPHA */ - 1445, /* GL_SLUMINANCE8_ALPHA8 */ - 1443, /* GL_SLUMINANCE */ - 1444, /* GL_SLUMINANCE8 */ - 267, /* GL_COMPRESSED_SRGB */ - 268, /* GL_COMPRESSED_SRGB_ALPHA */ - 265, /* GL_COMPRESSED_SLUMINANCE */ - 266, /* GL_COMPRESSED_SLUMINANCE_ALPHA */ - 1167, /* GL_POINT_SPRITE_COORD_ORIGIN */ - 723, /* GL_LOWER_LEFT */ - 1803, /* GL_UPPER_LEFT */ - 1509, /* GL_STENCIL_BACK_REF */ - 1510, /* GL_STENCIL_BACK_VALUE_MASK */ - 1511, /* GL_STENCIL_BACK_WRITEMASK */ - 444, /* GL_DRAW_FRAMEBUFFER_BINDING */ - 1320, /* GL_RENDERBUFFER_BINDING */ - 1300, /* GL_READ_FRAMEBUFFER */ - 443, /* GL_DRAW_FRAMEBUFFER */ - 1301, /* GL_READ_FRAMEBUFFER_BINDING */ - 1331, /* GL_RENDERBUFFER_SAMPLES */ - 549, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ - 547, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ - 558, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ - 554, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ - 556, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ - 562, /* GL_FRAMEBUFFER_COMPLETE */ - 566, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ - 573, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ - 571, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ - 568, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ - 572, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ - 569, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ - 577, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ - 581, /* GL_FRAMEBUFFER_UNSUPPORTED */ - 579, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ - 863, /* GL_MAX_COLOR_ATTACHMENTS */ - 155, /* GL_COLOR_ATTACHMENT0 */ - 157, /* GL_COLOR_ATTACHMENT1 */ - 171, /* GL_COLOR_ATTACHMENT2 */ - 173, /* GL_COLOR_ATTACHMENT3 */ - 175, /* GL_COLOR_ATTACHMENT4 */ - 177, /* GL_COLOR_ATTACHMENT5 */ - 179, /* GL_COLOR_ATTACHMENT6 */ - 181, /* GL_COLOR_ATTACHMENT7 */ - 183, /* GL_COLOR_ATTACHMENT8 */ - 185, /* GL_COLOR_ATTACHMENT9 */ - 158, /* GL_COLOR_ATTACHMENT10 */ - 160, /* GL_COLOR_ATTACHMENT11 */ - 162, /* GL_COLOR_ATTACHMENT12 */ - 164, /* GL_COLOR_ATTACHMENT13 */ - 166, /* GL_COLOR_ATTACHMENT14 */ - 168, /* GL_COLOR_ATTACHMENT15 */ - 349, /* GL_DEPTH_ATTACHMENT */ - 1499, /* GL_STENCIL_ATTACHMENT */ - 540, /* GL_FRAMEBUFFER */ - 1318, /* GL_RENDERBUFFER */ - 1334, /* GL_RENDERBUFFER_WIDTH */ - 1326, /* GL_RENDERBUFFER_HEIGHT */ - 1328, /* GL_RENDERBUFFER_INTERNAL_FORMAT */ - 1526, /* GL_STENCIL_INDEX_EXT */ - 1518, /* GL_STENCIL_INDEX1 */ - 1522, /* GL_STENCIL_INDEX4 */ - 1524, /* GL_STENCIL_INDEX8 */ - 1519, /* GL_STENCIL_INDEX16 */ - 1330, /* GL_RENDERBUFFER_RED_SIZE */ - 1325, /* GL_RENDERBUFFER_GREEN_SIZE */ - 1322, /* GL_RENDERBUFFER_BLUE_SIZE */ - 1319, /* GL_RENDERBUFFER_ALPHA_SIZE */ - 1323, /* GL_RENDERBUFFER_DEPTH_SIZE */ - 1333, /* GL_RENDERBUFFER_STENCIL_SIZE */ - 575, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ - 921, /* GL_MAX_SAMPLES */ - 1286, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ - 486, /* GL_FIRST_VERTEX_CONVENTION */ - 674, /* GL_LAST_VERTEX_CONVENTION */ - 1264, /* GL_PROVOKING_VERTEX */ - 302, /* GL_COPY_READ_BUFFER */ - 303, /* GL_COPY_WRITE_BUFFER */ - 1381, /* GL_RGBA_SNORM */ - 1377, /* GL_RGBA8_SNORM */ - 1439, /* GL_SIGNED_NORMALIZED */ - 923, /* GL_MAX_SERVER_WAIT_TIMEOUT */ - 1052, /* GL_OBJECT_TYPE */ - 1547, /* GL_SYNC_CONDITION */ - 1552, /* GL_SYNC_STATUS */ - 1549, /* GL_SYNC_FLAGS */ - 1548, /* GL_SYNC_FENCE */ - 1551, /* GL_SYNC_GPU_COMMANDS_COMPLETE */ - 1779, /* GL_UNSIGNALED */ - 1438, /* GL_SIGNALED */ + 540, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */ + 1442, /* GL_SHADING_LANGUAGE_VERSION */ + 323, /* GL_CURRENT_PROGRAM */ + 1104, /* GL_PALETTE4_RGB8_OES */ + 1106, /* GL_PALETTE4_RGBA8_OES */ + 1102, /* GL_PALETTE4_R5_G6_B5_OES */ + 1105, /* GL_PALETTE4_RGBA4_OES */ + 1103, /* GL_PALETTE4_RGB5_A1_OES */ + 1109, /* GL_PALETTE8_RGB8_OES */ + 1111, /* GL_PALETTE8_RGBA8_OES */ + 1107, /* GL_PALETTE8_R5_G6_B5_OES */ + 1110, /* GL_PALETTE8_RGBA4_OES */ + 1108, /* GL_PALETTE8_RGB5_A1_OES */ + 628, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ + 627, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ + 1800, /* GL_UNSIGNED_NORMALIZED */ + 1637, /* GL_TEXTURE_1D_ARRAY_EXT */ + 1274, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */ + 1639, /* GL_TEXTURE_2D_ARRAY_EXT */ + 1277, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */ + 1645, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */ + 1647, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */ + 1495, /* GL_SRGB */ + 1496, /* GL_SRGB8 */ + 1498, /* GL_SRGB_ALPHA */ + 1497, /* GL_SRGB8_ALPHA8 */ + 1455, /* GL_SLUMINANCE_ALPHA */ + 1454, /* GL_SLUMINANCE8_ALPHA8 */ + 1452, /* GL_SLUMINANCE */ + 1453, /* GL_SLUMINANCE8 */ + 268, /* GL_COMPRESSED_SRGB */ + 269, /* GL_COMPRESSED_SRGB_ALPHA */ + 266, /* GL_COMPRESSED_SLUMINANCE */ + 267, /* GL_COMPRESSED_SLUMINANCE_ALPHA */ + 1169, /* GL_POINT_SPRITE_COORD_ORIGIN */ + 725, /* GL_LOWER_LEFT */ + 1812, /* GL_UPPER_LEFT */ + 1518, /* GL_STENCIL_BACK_REF */ + 1519, /* GL_STENCIL_BACK_VALUE_MASK */ + 1520, /* GL_STENCIL_BACK_WRITEMASK */ + 445, /* GL_DRAW_FRAMEBUFFER_BINDING */ + 1328, /* GL_RENDERBUFFER_BINDING */ + 1307, /* GL_READ_FRAMEBUFFER */ + 444, /* GL_DRAW_FRAMEBUFFER */ + 1308, /* GL_READ_FRAMEBUFFER_BINDING */ + 1339, /* GL_RENDERBUFFER_SAMPLES */ + 550, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ + 548, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ + 559, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ + 555, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ + 557, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ + 563, /* GL_FRAMEBUFFER_COMPLETE */ + 567, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ + 574, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ + 572, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ + 569, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ + 573, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ + 570, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ + 578, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ + 582, /* GL_FRAMEBUFFER_UNSUPPORTED */ + 580, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ + 865, /* GL_MAX_COLOR_ATTACHMENTS */ + 156, /* GL_COLOR_ATTACHMENT0 */ + 158, /* GL_COLOR_ATTACHMENT1 */ + 172, /* GL_COLOR_ATTACHMENT2 */ + 174, /* GL_COLOR_ATTACHMENT3 */ + 176, /* GL_COLOR_ATTACHMENT4 */ + 178, /* GL_COLOR_ATTACHMENT5 */ + 180, /* GL_COLOR_ATTACHMENT6 */ + 182, /* GL_COLOR_ATTACHMENT7 */ + 184, /* GL_COLOR_ATTACHMENT8 */ + 186, /* GL_COLOR_ATTACHMENT9 */ + 159, /* GL_COLOR_ATTACHMENT10 */ + 161, /* GL_COLOR_ATTACHMENT11 */ + 163, /* GL_COLOR_ATTACHMENT12 */ + 165, /* GL_COLOR_ATTACHMENT13 */ + 167, /* GL_COLOR_ATTACHMENT14 */ + 169, /* GL_COLOR_ATTACHMENT15 */ + 350, /* GL_DEPTH_ATTACHMENT */ + 1508, /* GL_STENCIL_ATTACHMENT */ + 541, /* GL_FRAMEBUFFER */ + 1326, /* GL_RENDERBUFFER */ + 1342, /* GL_RENDERBUFFER_WIDTH */ + 1334, /* GL_RENDERBUFFER_HEIGHT */ + 1336, /* GL_RENDERBUFFER_INTERNAL_FORMAT */ + 1535, /* GL_STENCIL_INDEX_EXT */ + 1527, /* GL_STENCIL_INDEX1 */ + 1531, /* GL_STENCIL_INDEX4 */ + 1533, /* GL_STENCIL_INDEX8 */ + 1528, /* GL_STENCIL_INDEX16 */ + 1338, /* GL_RENDERBUFFER_RED_SIZE */ + 1333, /* GL_RENDERBUFFER_GREEN_SIZE */ + 1330, /* GL_RENDERBUFFER_BLUE_SIZE */ + 1327, /* GL_RENDERBUFFER_ALPHA_SIZE */ + 1331, /* GL_RENDERBUFFER_DEPTH_SIZE */ + 1341, /* GL_RENDERBUFFER_STENCIL_SIZE */ + 576, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ + 923, /* GL_MAX_SAMPLES */ + 1302, /* GL_QUERY_WAIT_NV */ + 1297, /* GL_QUERY_NO_WAIT_NV */ + 1294, /* GL_QUERY_BY_REGION_WAIT_NV */ + 1293, /* GL_QUERY_BY_REGION_NO_WAIT_NV */ + 1289, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ + 487, /* GL_FIRST_VERTEX_CONVENTION */ + 676, /* GL_LAST_VERTEX_CONVENTION */ + 1266, /* GL_PROVOKING_VERTEX */ + 303, /* GL_COPY_READ_BUFFER */ + 304, /* GL_COPY_WRITE_BUFFER */ + 1390, /* GL_RGBA_SNORM */ + 1386, /* GL_RGBA8_SNORM */ + 1448, /* GL_SIGNED_NORMALIZED */ + 925, /* GL_MAX_SERVER_WAIT_TIMEOUT */ + 1054, /* GL_OBJECT_TYPE */ + 1556, /* GL_SYNC_CONDITION */ + 1561, /* GL_SYNC_STATUS */ + 1558, /* GL_SYNC_FLAGS */ + 1557, /* GL_SYNC_FENCE */ + 1560, /* GL_SYNC_GPU_COMMANDS_COMPLETE */ + 1788, /* GL_UNSIGNALED */ + 1447, /* GL_SIGNALED */ 46, /* GL_ALREADY_SIGNALED */ - 1750, /* GL_TIMEOUT_EXPIRED */ - 270, /* GL_CONDITION_SATISFIED */ - 1863, /* GL_WAIT_FAILED */ - 471, /* GL_EVAL_BIT */ - 1298, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ - 717, /* GL_LIST_BIT */ - 1644, /* GL_TEXTURE_BIT */ - 1412, /* GL_SCISSOR_BIT */ + 1759, /* GL_TIMEOUT_EXPIRED */ + 271, /* GL_CONDITION_SATISFIED */ + 1873, /* GL_WAIT_FAILED */ + 472, /* GL_EVAL_BIT */ + 1305, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ + 719, /* GL_LIST_BIT */ + 1653, /* GL_TEXTURE_BIT */ + 1421, /* GL_SCISSOR_BIT */ 29, /* GL_ALL_ATTRIB_BITS */ - 1008, /* GL_MULTISAMPLE_BIT */ + 1010, /* GL_MULTISAMPLE_BIT */ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */ - 1751, /* GL_TIMEOUT_IGNORED */ }; typedef int (*cfunc)(const void *, const void *); @@ -5169,7 +5199,7 @@ typedef int (*cfunc)(const void *, const void *); */ static int compar_name( const char *a, const enum_elt *b ) { - return _mesa_strcmp( a, & enum_string_table[ b->offset ] ); + return strcmp( a, & enum_string_table[ b->offset ] ); } /** @@ -5204,7 +5234,7 @@ const char *_mesa_lookup_enum_by_nr( int nr ) } else { /* this is not re-entrant safe, no big deal here */ - _mesa_sprintf(token_tmp, "0x%x", nr); + sprintf(token_tmp, "0x%x", nr); return token_tmp; } } diff --git a/mesalib/src/mesa/main/eval.c b/mesalib/src/mesa/main/eval.c index 95d6e2318..bd2e1177f 100644 --- a/mesalib/src/mesa/main/eval.c +++ b/mesalib/src/mesa/main/eval.c @@ -44,7 +44,7 @@ #include "eval.h" #include "macros.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_evaluators @@ -894,7 +894,7 @@ void _mesa_init_eval( GLcontext *ctx ) ctx->Eval.Map1TextureCoord4 = GL_FALSE; ctx->Eval.Map1Vertex3 = GL_FALSE; ctx->Eval.Map1Vertex4 = GL_FALSE; - MEMSET(ctx->Eval.Map1Attrib, 0, sizeof(ctx->Eval.Map1Attrib)); + memset(ctx->Eval.Map1Attrib, 0, sizeof(ctx->Eval.Map1Attrib)); ctx->Eval.Map2Color4 = GL_FALSE; ctx->Eval.Map2Index = GL_FALSE; ctx->Eval.Map2Normal = GL_FALSE; @@ -904,7 +904,7 @@ void _mesa_init_eval( GLcontext *ctx ) ctx->Eval.Map2TextureCoord4 = GL_FALSE; ctx->Eval.Map2Vertex3 = GL_FALSE; ctx->Eval.Map2Vertex4 = GL_FALSE; - MEMSET(ctx->Eval.Map2Attrib, 0, sizeof(ctx->Eval.Map2Attrib)); + memset(ctx->Eval.Map2Attrib, 0, sizeof(ctx->Eval.Map2Attrib)); ctx->Eval.AutoNormal = GL_FALSE; ctx->Eval.MapGrid1un = 1; ctx->Eval.MapGrid1u1 = 0.0; diff --git a/mesalib/src/mesa/main/execmem.c b/mesalib/src/mesa/main/execmem.c index 4c6139985..ccd6ab43f 100644 --- a/mesalib/src/mesa/main/execmem.c +++ b/mesalib/src/mesa/main/execmem.c @@ -106,7 +106,7 @@ _mesa_exec_malloc(GLuint size) if (block) addr = exec_mem + block->ofs; else - _mesa_printf("_mesa_exec_malloc failed\n"); + printf("_mesa_exec_malloc failed\n"); bail: _glthread_UNLOCK_MUTEX(exec_mutex); @@ -140,14 +140,14 @@ _mesa_exec_free(void *addr) void * _mesa_exec_malloc(GLuint size) { - return _mesa_malloc( size ); + return malloc( size ); } void _mesa_exec_free(void *addr) { - _mesa_free(addr); + free(addr); } diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c index 2138bfe40..30245d6aa 100644 --- a/mesalib/src/mesa/main/extensions.c +++ b/mesalib/src/mesa/main/extensions.c @@ -50,11 +50,13 @@ static const struct { { OFF, "GL_ARB_depth_clamp", F(ARB_depth_clamp) }, { ON, "GL_ARB_draw_buffers", F(ARB_draw_buffers) }, { OFF, "GL_ARB_draw_elements_base_vertex", F(ARB_draw_elements_base_vertex) }, + { OFF, "GL_ARB_fragment_coord_conventions", F(ARB_fragment_coord_conventions) }, { OFF, "GL_ARB_fragment_program", F(ARB_fragment_program) }, { OFF, "GL_ARB_fragment_program_shadow", F(ARB_fragment_program_shadow) }, { OFF, "GL_ARB_fragment_shader", F(ARB_fragment_shader) }, { OFF, "GL_ARB_framebuffer_object", F(ARB_framebuffer_object) }, { OFF, "GL_ARB_half_float_pixel", F(ARB_half_float_pixel) }, + { OFF, "GL_ARB_half_float_vertex", F(ARB_half_float_vertex) }, { OFF, "GL_ARB_imaging", F(ARB_imaging) }, { OFF, "GL_ARB_map_buffer_range", F(ARB_map_buffer_range) }, { ON, "GL_ARB_multisample", F(ARB_multisample) }, @@ -103,6 +105,7 @@ static const struct { { OFF, "GL_EXT_convolution", F(EXT_convolution) }, { ON, "GL_EXT_copy_texture", F(EXT_copy_texture) }, { OFF, "GL_EXT_depth_bounds_test", F(EXT_depth_bounds_test) }, + { OFF, "GL_EXT_draw_buffers2", F(EXT_draw_buffers2) }, { ON, "GL_EXT_draw_range_elements", F(EXT_draw_range_elements) }, { OFF, "GL_EXT_framebuffer_blit", F(EXT_framebuffer_blit) }, { OFF, "GL_EXT_framebuffer_multisample", F(EXT_framebuffer_multisample) }, @@ -128,7 +131,9 @@ static const struct { { ON, "GL_EXT_subtexture", F(EXT_subtexture) }, { ON, "GL_EXT_texture", F(EXT_texture) }, { ON, "GL_EXT_texture3D", F(EXT_texture3D) }, + { OFF, "GL_EXT_texture_array", F(EXT_texture_array) }, { OFF, "GL_EXT_texture_compression_s3tc", F(EXT_texture_compression_s3tc) }, + { OFF, "GL_EXT_texture_cube_map", F(ARB_texture_cube_map) }, { ON, "GL_EXT_texture_edge_clamp", F(SGIS_texture_edge_clamp) }, { OFF, "GL_EXT_texture_env_add", F(EXT_texture_env_add) }, { OFF, "GL_EXT_texture_env_combine", F(EXT_texture_env_combine) }, @@ -148,6 +153,7 @@ static const struct { { OFF, "GL_APPLE_client_storage", F(APPLE_client_storage) }, { ON, "GL_APPLE_packed_pixels", F(APPLE_packed_pixels) }, { OFF, "GL_APPLE_vertex_array_object", F(APPLE_vertex_array_object) }, + { OFF, "GL_APPLE_object_purgeable", F(APPLE_object_purgeable) }, { OFF, "GL_ATI_blend_equation_separate", F(EXT_blend_equation_separate) }, { OFF, "GL_ATI_envmap_bumpmap", F(ATI_envmap_bumpmap) }, { OFF, "GL_ATI_texture_env_combine3", F(ATI_texture_env_combine3)}, @@ -166,6 +172,7 @@ static const struct { { OFF, "GL_MESA_ycbcr_texture", F(MESA_ycbcr_texture) }, { ON, "GL_MESA_window_pos", F(ARB_window_pos) }, { OFF, "GL_NV_blend_square", F(NV_blend_square) }, + { OFF, "GL_NV_conditional_render", F(NV_conditional_render) }, { OFF, "GL_NV_depth_clamp", F(ARB_depth_clamp) }, { OFF, "GL_NV_fragment_program", F(NV_fragment_program) }, { OFF, "GL_NV_fragment_program_option", F(NV_fragment_program_option) }, @@ -187,6 +194,9 @@ static const struct { { ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) }, { ON, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) }, { OFF, "GL_S3_s3tc", F(S3_s3tc) }, +#if FEATURE_OES_draw_texture + { OFF, "GL_OES_draw_texture", F(OES_draw_texture) }, +#endif /* FEATURE_OES_draw_texture */ }; @@ -203,6 +213,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) ctx->Extensions.ARB_depth_texture = GL_TRUE; /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/ ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE; + ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE; #if FEATURE_ARB_fragment_program ctx->Extensions.ARB_fragment_program = GL_TRUE; ctx->Extensions.ARB_fragment_program_shadow = GL_TRUE; @@ -214,6 +225,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) ctx->Extensions.ARB_framebuffer_object = GL_TRUE; #endif ctx->Extensions.ARB_half_float_pixel = GL_TRUE; + ctx->Extensions.ARB_half_float_vertex = GL_TRUE; ctx->Extensions.ARB_imaging = GL_TRUE; ctx->Extensions.ARB_map_buffer_range = GL_TRUE; ctx->Extensions.ARB_multitexture = GL_TRUE; @@ -254,6 +266,9 @@ _mesa_enable_sw_extensions(GLcontext *ctx) ctx->Extensions.ARB_sync = GL_TRUE; #endif ctx->Extensions.APPLE_vertex_array_object = GL_TRUE; +#if FEATURE_APPLE_object_purgeable + ctx->Extensions.APPLE_object_purgeable = GL_TRUE; +#endif ctx->Extensions.ATI_envmap_bumpmap = GL_TRUE; #if FEATURE_ATI_fragment_shader ctx->Extensions.ATI_fragment_shader = GL_TRUE; @@ -269,6 +284,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) ctx->Extensions.EXT_blend_subtract = GL_TRUE; ctx->Extensions.EXT_convolution = GL_TRUE; ctx->Extensions.EXT_depth_bounds_test = GL_TRUE; + ctx->Extensions.EXT_draw_buffers2 = GL_TRUE; ctx->Extensions.EXT_fog_coord = GL_TRUE; #if FEATURE_EXT_framebuffer_object ctx->Extensions.EXT_framebuffer_object = GL_TRUE; @@ -293,6 +309,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) ctx->Extensions.EXT_shared_texture_palette = GL_TRUE; ctx->Extensions.EXT_stencil_wrap = GL_TRUE; ctx->Extensions.EXT_stencil_two_side = GL_TRUE; + ctx->Extensions.EXT_texture_array = GL_TRUE; ctx->Extensions.EXT_texture_env_add = GL_TRUE; ctx->Extensions.EXT_texture_env_combine = GL_TRUE; ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; @@ -309,6 +326,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx) ctx->Extensions.MESA_texture_array = GL_TRUE; ctx->Extensions.MESA_ycbcr_texture = GL_TRUE; ctx->Extensions.NV_blend_square = GL_TRUE; + ctx->Extensions.NV_conditional_render = GL_TRUE; /*ctx->Extensions.NV_light_max_exponent = GL_TRUE;*/ ctx->Extensions.NV_point_sprite = GL_TRUE; ctx->Extensions.NV_texture_env_combine4 = GL_TRUE; @@ -486,7 +504,7 @@ set_extension( GLcontext *ctx, const char *name, GLboolean state ) } for (i = 0 ; i < Elements(default_extensions) ; i++) { - if (_mesa_strcmp(default_extensions[i].name, name) == 0) { + if (strcmp(default_extensions[i].name, name) == 0) { if (default_extensions[i].flag_offset) { GLboolean *enabled = base + default_extensions[i].flag_offset; *enabled = state; @@ -522,20 +540,34 @@ _mesa_disable_extension( GLcontext *ctx, const char *name ) } +/** + * Check if the i-th extension is enabled. + */ +static GLboolean +extension_enabled(GLcontext *ctx, GLuint index) +{ + const GLboolean *base = (const GLboolean *) &ctx->Extensions; + if (!default_extensions[index].flag_offset || + *(base + default_extensions[index].flag_offset)) { + return GL_TRUE; + } + else { + return GL_FALSE; + } +} + + /** * Test if the named extension is enabled in this context. */ GLboolean _mesa_extension_is_enabled( GLcontext *ctx, const char *name ) { - const GLboolean *base = (const GLboolean *) &ctx->Extensions; GLuint i; for (i = 0 ; i < Elements(default_extensions) ; i++) { - if (_mesa_strcmp(default_extensions[i].name, name) == 0) { - if (!default_extensions[i].flag_offset) - return GL_TRUE; - return *(base + default_extensions[i].flag_offset); + if (strcmp(default_extensions[i].name, name) == 0) { + return extension_enabled(ctx, i); } } return GL_FALSE; @@ -548,18 +580,18 @@ _mesa_extension_is_enabled( GLcontext *ctx, const char *name ) static char * append(const char *a, const char *b) { - const GLuint aLen = a ? _mesa_strlen(a) : 0; - const GLuint bLen = b ? _mesa_strlen(b) : 0; - char *s = _mesa_calloc(aLen + bLen + 1); + const GLuint aLen = a ? strlen(a) : 0; + const GLuint bLen = b ? strlen(b) : 0; + char *s = calloc(1, aLen + bLen + 1); if (s) { if (a) - _mesa_memcpy(s, a, aLen); + memcpy(s, a, aLen); if (b) - _mesa_memcpy(s + aLen, b, bLen); + memcpy(s + aLen, b, bLen); s[aLen + bLen] = '\0'; } if (a) - _mesa_free((void *) a); + free((void *) a); return s; } @@ -643,7 +675,6 @@ _mesa_init_extensions( GLcontext *ctx ) GLubyte * _mesa_make_extension_string( GLcontext *ctx ) { - const GLboolean *base = (const GLboolean *) &ctx->Extensions; const char *extraExt = get_extension_override(ctx); GLuint extStrLen = 0; char *s; @@ -651,27 +682,25 @@ _mesa_make_extension_string( GLcontext *ctx ) /* first, compute length of the extension string */ for (i = 0 ; i < Elements(default_extensions) ; i++) { - if (!default_extensions[i].flag_offset || - *(base + default_extensions[i].flag_offset)) { - extStrLen += (GLuint)_mesa_strlen(default_extensions[i].name) + 1; + if (extension_enabled(ctx, i)) { + extStrLen += (GLuint) strlen(default_extensions[i].name) + 1; } } if (extraExt) - extStrLen += _mesa_strlen(extraExt) + 1; /* +1 for space */ + extStrLen += strlen(extraExt) + 1; /* +1 for space */ /* allocate the extension string */ - s = (char *) _mesa_malloc(extStrLen); + s = (char *) malloc(extStrLen); if (!s) return NULL; /* second, build the extension string */ extStrLen = 0; for (i = 0 ; i < Elements(default_extensions) ; i++) { - if (!default_extensions[i].flag_offset || - *(base + default_extensions[i].flag_offset)) { - GLuint len = (GLuint)_mesa_strlen(default_extensions[i].name); - _mesa_memcpy(s + extStrLen, default_extensions[i].name, len); + if (extension_enabled(ctx, i)) { + GLuint len = (GLuint) strlen(default_extensions[i].name); + memcpy(s + extStrLen, default_extensions[i].name, len); extStrLen += len; s[extStrLen] = ' '; extStrLen++; @@ -688,3 +717,48 @@ _mesa_make_extension_string( GLcontext *ctx ) return (GLubyte *) s; } + + +/** + * Return number of enabled extensions. + */ +GLuint +_mesa_get_extension_count(GLcontext *ctx) +{ + GLuint i; + + /* only count once */ + if (!ctx->Extensions.Count) { + for (i = 0; i < Elements(default_extensions); i++) { + if (extension_enabled(ctx, i)) { + ctx->Extensions.Count++; + } + } + } + + if (0) + _mesa_debug(ctx, "%u of %d extensions enabled\n", ctx->Extensions.Count, + Elements(default_extensions)); + + return ctx->Extensions.Count; +} + + +/** + * Return name of i-th enabled extension + */ +const GLubyte * +_mesa_get_enabled_extension(GLcontext *ctx, GLuint index) +{ + GLuint i; + + for (i = 0; i < Elements(default_extensions); i++) { + if (extension_enabled(ctx, i)) { + if (index == 0) + return (const GLubyte *) default_extensions[i].name; + index--; + } + } + + return NULL; +} diff --git a/mesalib/src/mesa/main/extensions.h b/mesalib/src/mesa/main/extensions.h index 05ad859a2..a25472440 100644 --- a/mesalib/src/mesa/main/extensions.h +++ b/mesalib/src/mesa/main/extensions.h @@ -64,6 +64,13 @@ extern void _mesa_init_extensions(GLcontext *ctx); extern GLubyte *_mesa_make_extension_string(GLcontext *ctx); +extern GLuint +_mesa_get_extension_count(GLcontext *ctx); + +extern const GLubyte * +_mesa_get_enabled_extension(GLcontext *ctx, GLuint index); + + #else /** No-op */ diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index 7b3599f93..14c533e0d 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -40,13 +40,10 @@ #include "framebuffer.h" #include "hash.h" #include "macros.h" -#include "mipmap.h" #include "renderbuffer.h" #include "state.h" #include "teximage.h" #include "texobj.h" -#include "texstore.h" -#include "texstate.h" /** Set this to 1 to help debug FBO incompleteness problems */ @@ -377,8 +374,8 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format, } if (texImage->Width < 1 || texImage->Height < 1) { att_incomplete("teximage width/height=0"); - _mesa_printf("texobj = %u\n", texObj->Name); - _mesa_printf("level = %d\n", att->TextureLevel); + printf("texobj = %u\n", texObj->Name); + printf("level = %d\n", att->TextureLevel); att->Complete = GL_FALSE; return; } @@ -861,6 +858,9 @@ _mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers) * * \return one of GL_RGB, GL_RGBA, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT * GL_DEPTH_STENCIL_EXT or zero if error. + * + * XXX in the future when we support red-only and red-green formats + * we'll also return GL_RED and GL_RG. */ GLenum _mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat) @@ -954,7 +954,7 @@ renderbuffer_storage(GLenum target, GLenum internalFormat, /* NumSamples == 0 indicates non-multisampling */ samples = 0; } - else if (samples > ctx->Const.MaxSamples) { + else if (samples > (GLsizei) ctx->Const.MaxSamples) { /* note: driver may choose to use more samples than what's requested */ _mesa_error(ctx, GL_INVALID_VALUE, "%s(samples)", func); return; @@ -987,7 +987,7 @@ renderbuffer_storage(GLenum target, GLenum internalFormat, assert(rb->Width == (GLuint) width); assert(rb->Height == (GLuint) height); rb->InternalFormat = internalFormat; - rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat); + rb->_BaseFormat = baseFormat; assert(rb->_BaseFormat != 0); } else { @@ -1008,6 +1008,30 @@ renderbuffer_storage(GLenum target, GLenum internalFormat, */ } +#if FEATURE_OES_EGL_image +void GLAPIENTRY +_mesa_EGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image) +{ + struct gl_renderbuffer *rb; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (target != GL_RENDERBUFFER) { + _mesa_error(ctx, GL_INVALID_ENUM, "EGLImageTargetRenderbufferStorageOES"); + return; + } + + rb = ctx->CurrentRenderbuffer; + if (!rb) { + _mesa_error(ctx, GL_INVALID_OPERATION, "EGLImageTargetRenderbufferStorageOES"); + return; + } + + FLUSH_VERTICES(ctx, _NEW_BUFFERS); + + ctx->Driver.EGLImageTargetRenderbufferStorage(ctx, rb, image); +} +#endif /** * Helper function for _mesa_GetRenderbufferParameterivEXT() and @@ -1353,15 +1377,26 @@ _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers) ASSERT(fb == &DummyFramebuffer || fb->Name == framebuffers[i]); /* check if deleting currently bound framebuffer object */ - if (fb == ctx->DrawBuffer) { - /* bind default */ - ASSERT(fb->RefCount >= 2); - _mesa_BindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0); + if (ctx->Extensions.EXT_framebuffer_blit) { + /* separate draw/read binding points */ + if (fb == ctx->DrawBuffer) { + /* bind default */ + ASSERT(fb->RefCount >= 2); + _mesa_BindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0); + } + if (fb == ctx->ReadBuffer) { + /* bind default */ + ASSERT(fb->RefCount >= 2); + _mesa_BindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0); + } } - if (fb == ctx->ReadBuffer) { - /* bind default */ - ASSERT(fb->RefCount >= 2); - _mesa_BindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0); + else { + /* only one binding point for read/draw buffers */ + if (fb == ctx->DrawBuffer || fb == ctx->ReadBuffer) { + /* bind default */ + ASSERT(fb->RefCount >= 2); + _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + } } /* remove from hash table immediately, to free the ID */ @@ -2128,39 +2163,39 @@ _mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, /* Debug code */ if (DEBUG_BLIT) { - _mesa_printf("glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d," - " 0x%x, 0x%x)\n", - srcX0, srcY0, srcX1, srcY1, - dstX0, dstY0, dstX1, dstY1, - mask, filter); + printf("glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d," + " 0x%x, 0x%x)\n", + srcX0, srcY0, srcX1, srcY1, + dstX0, dstY0, dstX1, dstY1, + mask, filter); if (colorReadRb) { const struct gl_renderbuffer_attachment *att; att = find_attachment(readFb, colorReadRb); - _mesa_printf(" Src FBO %u RB %u (%dx%d) ", - readFb->Name, colorReadRb->Name, - colorReadRb->Width, colorReadRb->Height); + printf(" Src FBO %u RB %u (%dx%d) ", + readFb->Name, colorReadRb->Name, + colorReadRb->Width, colorReadRb->Height); if (att && att->Texture) { - _mesa_printf("Tex %u tgt 0x%x level %u face %u", - att->Texture->Name, - att->Texture->Target, - att->TextureLevel, - att->CubeMapFace); + printf("Tex %u tgt 0x%x level %u face %u", + att->Texture->Name, + att->Texture->Target, + att->TextureLevel, + att->CubeMapFace); } - _mesa_printf("\n"); + printf("\n"); att = find_attachment(drawFb, colorDrawRb); - _mesa_printf(" Dst FBO %u RB %u (%dx%d) ", - drawFb->Name, colorDrawRb->Name, - colorDrawRb->Width, colorDrawRb->Height); + printf(" Dst FBO %u RB %u (%dx%d) ", + drawFb->Name, colorDrawRb->Name, + colorDrawRb->Width, colorDrawRb->Height); if (att && att->Texture) { - _mesa_printf("Tex %u tgt 0x%x level %u face %u", - att->Texture->Name, - att->Texture->Target, - att->TextureLevel, - att->CubeMapFace); + printf("Tex %u tgt 0x%x level %u face %u", + att->Texture->Name, + att->Texture->Target, + att->TextureLevel, + att->CubeMapFace); } - _mesa_printf("\n"); + printf("\n"); } } diff --git a/mesalib/src/mesa/main/fbobject.h b/mesalib/src/mesa/main/fbobject.h index 540939407..28f75dfca 100644 --- a/mesalib/src/mesa/main/fbobject.h +++ b/mesalib/src/mesa/main/fbobject.h @@ -88,6 +88,9 @@ _mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +extern void GLAPIENTRY +_mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image); + extern void GLAPIENTRY _mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params); diff --git a/mesalib/src/mesa/main/feedback.c b/mesalib/src/mesa/main/feedback.c index fcdbb75fc..c72b91280 100644 --- a/mesalib/src/mesa/main/feedback.c +++ b/mesalib/src/mesa/main/feedback.c @@ -36,7 +36,7 @@ #include "feedback.h" #include "macros.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_feedback @@ -44,9 +44,8 @@ #define FB_3D 0x01 #define FB_4D 0x02 -#define FB_INDEX 0x04 -#define FB_COLOR 0x08 -#define FB_TEXTURE 0X10 +#define FB_COLOR 0x04 +#define FB_TEXTURE 0X08 @@ -78,18 +77,13 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) ctx->Feedback._Mask = FB_3D; break; case GL_3D_COLOR: - ctx->Feedback._Mask = (FB_3D | - (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX)); + ctx->Feedback._Mask = (FB_3D | FB_COLOR); break; case GL_3D_COLOR_TEXTURE: - ctx->Feedback._Mask = (FB_3D | - (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) | - FB_TEXTURE); + ctx->Feedback._Mask = (FB_3D | FB_COLOR | FB_TEXTURE); break; case GL_4D_COLOR_TEXTURE: - ctx->Feedback._Mask = (FB_3D | FB_4D | - (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) | - FB_TEXTURE); + ctx->Feedback._Mask = (FB_3D | FB_4D | FB_COLOR | FB_TEXTURE); break; default: _mesa_error( ctx, GL_INVALID_ENUM, "glFeedbackBuffer" ); @@ -125,7 +119,6 @@ void _mesa_feedback_vertex(GLcontext *ctx, const GLfloat win[4], const GLfloat color[4], - GLfloat index, const GLfloat texcoord[4]) { _mesa_feedback_token( ctx, win[0] ); @@ -136,9 +129,6 @@ _mesa_feedback_vertex(GLcontext *ctx, if (ctx->Feedback._Mask & FB_4D) { _mesa_feedback_token( ctx, win[3] ); } - if (ctx->Feedback._Mask & FB_INDEX) { - _mesa_feedback_token( ctx, (GLfloat) index ); - } if (ctx->Feedback._Mask & FB_COLOR) { _mesa_feedback_token( ctx, color[0] ); _mesa_feedback_token( ctx, color[1] ); diff --git a/mesalib/src/mesa/main/feedback.h b/mesalib/src/mesa/main/feedback.h index 7a648f444..3e8283ed2 100644 --- a/mesalib/src/mesa/main/feedback.h +++ b/mesalib/src/mesa/main/feedback.h @@ -41,7 +41,6 @@ extern void _mesa_feedback_vertex( GLcontext *ctx, const GLfloat win[4], const GLfloat color[4], - GLfloat index, const GLfloat texcoord[4] ); @@ -70,7 +69,6 @@ static INLINE void _mesa_feedback_vertex( GLcontext *ctx, const GLfloat win[4], const GLfloat color[4], - GLfloat index, const GLfloat texcoord[4] ) { /* render mode is always GL_RENDER */ diff --git a/mesalib/src/mesa/main/ffvertex_prog.c b/mesalib/src/mesa/main/ffvertex_prog.c index fe2416d89..ba94a3877 100644 --- a/mesalib/src/mesa/main/ffvertex_prog.c +++ b/mesalib/src/mesa/main/ffvertex_prog.c @@ -357,7 +357,7 @@ static struct ureg get_temp( struct tnl_program *p ) int bit = _mesa_ffs( ~p->temp_in_use ); if (!bit) { _mesa_problem(NULL, "%s: out of temporaries\n", __FILE__); - _mesa_exit(1); + exit(1); } if ((GLuint) bit > p->program->Base.NumTemporaries) @@ -523,7 +523,6 @@ static void emit_dst( struct prog_dst_register *dst, dst->CondMask = COND_TR; /* always pass cond test */ dst->CondSwizzle = SWIZZLE_NOOP; dst->CondSrc = 0; - dst->pad = 0; /* Check that bitfield sizes aren't exceeded */ ASSERT(dst->Index == reg.idx); } @@ -537,10 +536,10 @@ static void debug_insn( struct prog_instruction *inst, const char *fn, if (fn != last_fn) { last_fn = fn; - _mesa_printf("%s:\n", fn); + printf("%s:\n", fn); } - _mesa_printf("%d:\t", line); + printf("%d:\t", line); _mesa_print_instruction(inst); } } @@ -1497,7 +1496,7 @@ static void build_texture_transform( struct tnl_program *p ) static void build_atten_pointsize( struct tnl_program *p ) { struct ureg eye = get_eye_position_z(p); - struct ureg state_size = register_param1(p, STATE_POINT_SIZE); + struct ureg state_size = register_param2(p, STATE_INTERNAL, STATE_POINT_SIZE_CLAMPED); struct ureg state_attenuation = register_param1(p, STATE_POINT_ATTENUATION); struct ureg out = register_output(p, VERT_RESULT_PSIZ); struct ureg ut = get_temp(p); @@ -1578,7 +1577,7 @@ static void build_tnl_program( struct tnl_program *p ) /* Disassemble: */ if (DISASSEM) { - _mesa_printf ("\n"); + printf ("\n"); } } @@ -1591,7 +1590,7 @@ create_new_program( const struct state_key *key, { struct tnl_program p; - _mesa_memset(&p, 0, sizeof(p)); + memset(&p, 0, sizeof(p)); p.state = key; p.program = program; p.eye_position = undef; @@ -1648,7 +1647,7 @@ _mesa_get_fixed_func_vertex_program(GLcontext *ctx) if (!prog) { /* OK, we'll have to build a new one */ if (0) - _mesa_printf("Build new TNL program\n"); + printf("Build new TNL program\n"); prog = (struct gl_vertex_program *) ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0); diff --git a/mesalib/src/mesa/main/formats.c b/mesalib/src/mesa/main/formats.c index 329b79507..d0c9c0028 100644 --- a/mesalib/src/mesa/main/formats.c +++ b/mesalib/src/mesa/main/formats.c @@ -27,7 +27,6 @@ #include "imports.h" #include "formats.h" #include "config.h" -#include "texstore.h" /** @@ -910,6 +909,7 @@ _mesa_test_formats(void) GLuint t = info->RedBits + info->GreenBits + info->BlueBits + info->AlphaBits; assert(t / 8 == info->BytesPerBlock); + (void) t; } } diff --git a/mesalib/src/mesa/main/framebuffer.c b/mesalib/src/mesa/main/framebuffer.c index d958dbf7d..6a85162d5 100644 --- a/mesalib/src/mesa/main/framebuffer.c +++ b/mesalib/src/mesa/main/framebuffer.c @@ -88,7 +88,7 @@ _mesa_create_framebuffer(const GLvisual *visual) struct gl_framebuffer *fb = CALLOC_STRUCT(gl_framebuffer); assert(visual); if (fb) { - _mesa_initialize_framebuffer(fb, visual); + _mesa_initialize_window_framebuffer(fb, visual); } return fb; } @@ -109,15 +109,7 @@ _mesa_new_framebuffer(GLcontext *ctx, GLuint name) assert(name != 0); fb = CALLOC_STRUCT(gl_framebuffer); if (fb) { - fb->Name = name; - fb->RefCount = 1; - fb->_NumColorDrawBuffers = 1; - fb->ColorDrawBuffer[0] = GL_COLOR_ATTACHMENT0_EXT; - fb->_ColorDrawBufferIndexes[0] = BUFFER_COLOR0; - fb->ColorReadBuffer = GL_COLOR_ATTACHMENT0_EXT; - fb->_ColorReadBufferIndex = BUFFER_COLOR0; - fb->Delete = _mesa_destroy_framebuffer; - _glthread_INIT_MUTEX(fb->Mutex); + _mesa_initialize_user_framebuffer(fb, name); } return fb; } @@ -126,15 +118,16 @@ _mesa_new_framebuffer(GLcontext *ctx, GLuint name) /** * Initialize a gl_framebuffer object. Typically used to initialize * window system-created framebuffers, not user-created framebuffers. - * \sa _mesa_create_framebuffer + * \sa _mesa_initialize_user_framebuffer */ void -_mesa_initialize_framebuffer(struct gl_framebuffer *fb, const GLvisual *visual) +_mesa_initialize_window_framebuffer(struct gl_framebuffer *fb, + const GLvisual *visual) { assert(fb); assert(visual); - _mesa_bzero(fb, sizeof(struct gl_framebuffer)); + memset(fb, 0, sizeof(struct gl_framebuffer)); _glthread_INIT_MUTEX(fb->Mutex); @@ -166,6 +159,30 @@ _mesa_initialize_framebuffer(struct gl_framebuffer *fb, const GLvisual *visual) } +/** + * Initialize a user-created gl_framebuffer object. + * \sa _mesa_initialize_window_framebuffer + */ +void +_mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name) +{ + assert(fb); + assert(name); + + memset(fb, 0, sizeof(struct gl_framebuffer)); + + fb->Name = name; + fb->RefCount = 1; + fb->_NumColorDrawBuffers = 1; + fb->ColorDrawBuffer[0] = GL_COLOR_ATTACHMENT0_EXT; + fb->_ColorDrawBufferIndexes[0] = BUFFER_COLOR0; + fb->ColorReadBuffer = GL_COLOR_ATTACHMENT0_EXT; + fb->_ColorReadBufferIndex = BUFFER_COLOR0; + fb->Delete = _mesa_destroy_framebuffer; + _glthread_INIT_MUTEX(fb->Mutex); +} + + /** * Deallocate buffer and everything attached to it. * Typically called via the gl_framebuffer->Delete() method. @@ -175,7 +192,7 @@ _mesa_destroy_framebuffer(struct gl_framebuffer *fb) { if (fb) { _mesa_free_framebuffer_data(fb); - _mesa_free(fb); + free(fb); } } @@ -509,7 +526,7 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb) { GLuint i; - _mesa_bzero(&fb->Visual, sizeof(fb->Visual)); + memset(&fb->Visual, 0, sizeof(fb->Visual)); fb->Visual.rgbMode = GL_TRUE; /* assume this */ #if 0 /* this _might_ be needed */ @@ -519,7 +536,7 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb) } #endif - /* find first RGB or CI renderbuffer */ + /* find first RGB renderbuffer */ for (i = 0; i < BUFFER_COUNT; i++) { if (fb->Attachment[i].Renderbuffer) { const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer; @@ -537,11 +554,6 @@ _mesa_update_framebuffer_visual(struct gl_framebuffer *fb) fb->Visual.samples = rb->NumSamples; break; } - else if (baseFormat == GL_COLOR_INDEX) { - fb->Visual.indexBits = _mesa_get_format_bits(fmt, GL_INDEX_BITS); - fb->Visual.rgbMode = GL_FALSE; - break; - } } } @@ -812,8 +824,12 @@ update_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) void _mesa_update_framebuffer(GLcontext *ctx) { - struct gl_framebuffer *drawFb = ctx->DrawBuffer; - struct gl_framebuffer *readFb = ctx->ReadBuffer; + struct gl_framebuffer *drawFb; + struct gl_framebuffer *readFb; + + assert(ctx); + drawFb = ctx->DrawBuffer; + readFb = ctx->ReadBuffer; update_framebuffer(ctx, drawFb); if (readFb != drawFb) diff --git a/mesalib/src/mesa/main/framebuffer.h b/mesalib/src/mesa/main/framebuffer.h index ef21dd98e..960513812 100644 --- a/mesalib/src/mesa/main/framebuffer.h +++ b/mesalib/src/mesa/main/framebuffer.h @@ -34,7 +34,11 @@ extern struct gl_framebuffer * _mesa_new_framebuffer(GLcontext *ctx, GLuint name); extern void -_mesa_initialize_framebuffer(struct gl_framebuffer *fb, const GLvisual *visual); +_mesa_initialize_window_framebuffer(struct gl_framebuffer *fb, + const GLvisual *visual); + +extern void +_mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name); extern void _mesa_destroy_framebuffer(struct gl_framebuffer *buffer); diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index 3f6b03c88..edc440091 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -7,7 +7,6 @@ #include "context.h" #include "enable.h" #include "extensions.h" -#include "fbobject.h" #include "get.h" #include "macros.h" #include "mtypes.h" @@ -132,7 +131,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers); break; case GL_BLEND: - params[0] = ctx->Color.BlendEnabled; + params[0] = (ctx->Color.BlendEnabled & 1); break; case GL_BLEND_DST: params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB); @@ -210,10 +209,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode); break; case GL_COLOR_WRITEMASK: - params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0); - params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0); - params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0); - params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0); + params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][RCOMP] ? 1 : 0); + params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][GCOMP] ? 1 : 0); + params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][BCOMP] ? 1 : 0); + params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][ACOMP] ? 1 : 0); break; case GL_CULL_FACE: params[0] = ctx->Polygon.CullFlag; @@ -254,7 +253,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterDistance); break; case GL_CURRENT_RASTER_INDEX: - params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterIndex); + params[0] = FLOAT_TO_BOOLEAN(1.0); break; case GL_CURRENT_RASTER_POSITION: params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterPos[0]); @@ -270,11 +269,16 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) break; case GL_CURRENT_RASTER_TEXTURE_COORDS: { - const GLuint texUnit = ctx->Texture.CurrentUnit; - params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][0]); - params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][1]); - params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][2]); - params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[texUnit][3]); + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(raster tex coords, unit %u)", unit); + return; + } + params[0] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[unit][0]); + params[1] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[unit][1]); + params[2] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[unit][2]); + params[3] = FLOAT_TO_BOOLEAN(ctx->Current.RasterTexCoords[unit][3]); } break; case GL_CURRENT_RASTER_POSITION_VALID: @@ -282,12 +286,17 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) break; case GL_CURRENT_TEXTURE_COORDS: { - const GLuint texUnit = ctx->Texture.CurrentUnit; + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(current tex coords, unit %u)", unit); + return; + } FLUSH_CURRENT(ctx, 0); - params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]); - params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]); - params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]); - params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]); + params[0] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0]); + params[1] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1]); + params[2] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2]); + params[3] = FLOAT_TO_BOOLEAN(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3]); } break; case GL_DEPTH_BIAS: @@ -382,7 +391,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = INT_TO_BOOLEAN(ctx->Color.ClearIndex); break; case GL_INDEX_MODE: - params[0] = !ctx->DrawBuffer->Visual.rgbMode; + params[0] = GL_FALSE; break; case GL_INDEX_OFFSET: params[0] = INT_TO_BOOLEAN(ctx->Pixel.IndexOffset); @@ -818,7 +827,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) params[0] = ctx->Transform.RescaleNormals; break; case GL_RGBA_MODE: - params[0] = ctx->DrawBuffer->Visual.rgbMode; + params[0] = GL_TRUE; break; case GL_SCISSOR_BOX: params[0] = INT_TO_BOOLEAN(ctx->Scissor.X); @@ -922,7 +931,14 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) break; case GL_TEXTURE_MATRIX: { - const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m; + const GLfloat *matrix; + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGet(texture matrix %u)", + unit); + return; + } + matrix = ctx->TextureMatrixStack[unit].Top->m; params[0] = FLOAT_TO_BOOLEAN(matrix[0]); params[1] = FLOAT_TO_BOOLEAN(matrix[1]); params[2] = FLOAT_TO_BOOLEAN(matrix[2]); @@ -942,7 +958,15 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) } break; case GL_TEXTURE_STACK_DEPTH: - params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1); + { + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(texture stack depth, unit %u)", unit); + return; + } + params[0] = INT_TO_BOOLEAN(ctx->TextureMatrixStack[unit].Depth + 1); + } break; case GL_UNPACK_ALIGNMENT: params[0] = INT_TO_BOOLEAN(ctx->Unpack.Alignment); @@ -1877,7 +1901,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) break; case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetBooleanv"); - params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS); + params[0] = INT_TO_BOOLEAN(ctx->Const.MaxCombinedTextureImageUnits); break; case GL_CURRENT_PROGRAM: CHECK_EXT1(ARB_shader_objects, "GetBooleanv"); @@ -1899,6 +1923,15 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) CHECK_EXT1(ARB_sync, "GetBooleanv"); params[0] = INT64_TO_BOOLEAN(ctx->Const.MaxServerWaitTimeout); break; + case GL_NUM_EXTENSIONS: + params[0] = INT_TO_BOOLEAN(_mesa_get_extension_count(ctx)); + break; + case GL_MAJOR_VERSION: + params[0] = INT_TO_BOOLEAN(ctx->VersionMajor); + break; + case GL_MINOR_VERSION: + params[0] = INT_TO_BOOLEAN(ctx->VersionMinor); + break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname); } @@ -1967,7 +2000,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers); break; case GL_BLEND: - params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled); + params[0] = BOOLEAN_TO_FLOAT((ctx->Color.BlendEnabled & 1)); break; case GL_BLEND_DST: params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB); @@ -2045,10 +2078,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode); break; case GL_COLOR_WRITEMASK: - params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0); - params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0); - params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0); - params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0); + params[0] = (GLfloat)(ctx->Color.ColorMask[0][RCOMP] ? 1 : 0); + params[1] = (GLfloat)(ctx->Color.ColorMask[0][GCOMP] ? 1 : 0); + params[2] = (GLfloat)(ctx->Color.ColorMask[0][BCOMP] ? 1 : 0); + params[3] = (GLfloat)(ctx->Color.ColorMask[0][ACOMP] ? 1 : 0); break; case GL_CULL_FACE: params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag); @@ -2089,7 +2122,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = ctx->Current.RasterDistance; break; case GL_CURRENT_RASTER_INDEX: - params[0] = ctx->Current.RasterIndex; + params[0] = 1.0; break; case GL_CURRENT_RASTER_POSITION: params[0] = ctx->Current.RasterPos[0]; @@ -2105,11 +2138,16 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) break; case GL_CURRENT_RASTER_TEXTURE_COORDS: { - const GLuint texUnit = ctx->Texture.CurrentUnit; - params[0] = ctx->Current.RasterTexCoords[texUnit][0]; - params[1] = ctx->Current.RasterTexCoords[texUnit][1]; - params[2] = ctx->Current.RasterTexCoords[texUnit][2]; - params[3] = ctx->Current.RasterTexCoords[texUnit][3]; + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(raster tex coords, unit %u)", unit); + return; + } + params[0] = ctx->Current.RasterTexCoords[unit][0]; + params[1] = ctx->Current.RasterTexCoords[unit][1]; + params[2] = ctx->Current.RasterTexCoords[unit][2]; + params[3] = ctx->Current.RasterTexCoords[unit][3]; } break; case GL_CURRENT_RASTER_POSITION_VALID: @@ -2117,12 +2155,17 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) break; case GL_CURRENT_TEXTURE_COORDS: { - const GLuint texUnit = ctx->Texture.CurrentUnit; + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(current tex coords, unit %u)", unit); + return; + } FLUSH_CURRENT(ctx, 0); - params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]; - params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]; - params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]; - params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]; + params[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0]; + params[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1]; + params[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2]; + params[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3]; } break; case GL_DEPTH_BIAS: @@ -2217,7 +2260,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = (GLfloat)(ctx->Color.ClearIndex); break; case GL_INDEX_MODE: - params[0] = BOOLEAN_TO_FLOAT(!ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_FLOAT(GL_FALSE); break; case GL_INDEX_OFFSET: params[0] = (GLfloat)(ctx->Pixel.IndexOffset); @@ -2653,7 +2696,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.RescaleNormals); break; case GL_RGBA_MODE: - params[0] = BOOLEAN_TO_FLOAT(ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_FLOAT(GL_TRUE); break; case GL_SCISSOR_BOX: params[0] = (GLfloat)(ctx->Scissor.X); @@ -2757,7 +2800,14 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) break; case GL_TEXTURE_MATRIX: { - const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m; + const GLfloat *matrix; + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGet(texture matrix %u)", + unit); + return; + } + matrix = ctx->TextureMatrixStack[unit].Top->m; params[0] = matrix[0]; params[1] = matrix[1]; params[2] = matrix[2]; @@ -2777,7 +2827,15 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) } break; case GL_TEXTURE_STACK_DEPTH: - params[0] = (GLfloat)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1); + { + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(texture stack depth, unit %u)", unit); + return; + } + params[0] = (GLfloat)(ctx->TextureMatrixStack[unit].Depth + 1); + } break; case GL_UNPACK_ALIGNMENT: params[0] = (GLfloat)(ctx->Unpack.Alignment); @@ -3712,7 +3770,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) break; case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetFloatv"); - params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS); + params[0] = (GLfloat)(ctx->Const.MaxCombinedTextureImageUnits); break; case GL_CURRENT_PROGRAM: CHECK_EXT1(ARB_shader_objects, "GetFloatv"); @@ -3734,6 +3792,15 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) CHECK_EXT1(ARB_sync, "GetFloatv"); params[0] = (GLfloat)(ctx->Const.MaxServerWaitTimeout); break; + case GL_NUM_EXTENSIONS: + params[0] = (GLfloat)(_mesa_get_extension_count(ctx)); + break; + case GL_MAJOR_VERSION: + params[0] = (GLfloat)(ctx->VersionMajor); + break; + case GL_MINOR_VERSION: + params[0] = (GLfloat)(ctx->VersionMinor); + break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname); } @@ -3802,7 +3869,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = ctx->DrawBuffer->Visual.numAuxBuffers; break; case GL_BLEND: - params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled); + params[0] = BOOLEAN_TO_INT((ctx->Color.BlendEnabled & 1)); break; case GL_BLEND_DST: params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB); @@ -3880,10 +3947,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = ENUM_TO_INT(ctx->Light.ColorMaterialMode); break; case GL_COLOR_WRITEMASK: - params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0; - params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0; - params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0; - params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0; + params[0] = ctx->Color.ColorMask[0][RCOMP] ? 1 : 0; + params[1] = ctx->Color.ColorMask[0][GCOMP] ? 1 : 0; + params[2] = ctx->Color.ColorMask[0][BCOMP] ? 1 : 0; + params[3] = ctx->Color.ColorMask[0][ACOMP] ? 1 : 0; break; case GL_CULL_FACE: params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag); @@ -3924,7 +3991,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = IROUND(ctx->Current.RasterDistance); break; case GL_CURRENT_RASTER_INDEX: - params[0] = IROUND(ctx->Current.RasterIndex); + params[0] = IROUND(1.0); break; case GL_CURRENT_RASTER_POSITION: params[0] = IROUND(ctx->Current.RasterPos[0]); @@ -3940,11 +4007,16 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) break; case GL_CURRENT_RASTER_TEXTURE_COORDS: { - const GLuint texUnit = ctx->Texture.CurrentUnit; - params[0] = IROUND(ctx->Current.RasterTexCoords[texUnit][0]); - params[1] = IROUND(ctx->Current.RasterTexCoords[texUnit][1]); - params[2] = IROUND(ctx->Current.RasterTexCoords[texUnit][2]); - params[3] = IROUND(ctx->Current.RasterTexCoords[texUnit][3]); + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(raster tex coords, unit %u)", unit); + return; + } + params[0] = IROUND(ctx->Current.RasterTexCoords[unit][0]); + params[1] = IROUND(ctx->Current.RasterTexCoords[unit][1]); + params[2] = IROUND(ctx->Current.RasterTexCoords[unit][2]); + params[3] = IROUND(ctx->Current.RasterTexCoords[unit][3]); } break; case GL_CURRENT_RASTER_POSITION_VALID: @@ -3952,12 +4024,17 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) break; case GL_CURRENT_TEXTURE_COORDS: { - const GLuint texUnit = ctx->Texture.CurrentUnit; + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(current tex coords, unit %u)", unit); + return; + } FLUSH_CURRENT(ctx, 0); - params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]); - params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]); - params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]); - params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]); + params[0] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0]); + params[1] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1]); + params[2] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2]); + params[3] = IROUND(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3]); } break; case GL_DEPTH_BIAS: @@ -4052,7 +4129,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = ctx->Color.ClearIndex; break; case GL_INDEX_MODE: - params[0] = BOOLEAN_TO_INT(!ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_INT(GL_FALSE); break; case GL_INDEX_OFFSET: params[0] = ctx->Pixel.IndexOffset; @@ -4488,7 +4565,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) params[0] = BOOLEAN_TO_INT(ctx->Transform.RescaleNormals); break; case GL_RGBA_MODE: - params[0] = BOOLEAN_TO_INT(ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_INT(GL_TRUE); break; case GL_SCISSOR_BOX: params[0] = ctx->Scissor.X; @@ -4592,7 +4669,14 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) break; case GL_TEXTURE_MATRIX: { - const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m; + const GLfloat *matrix; + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGet(texture matrix %u)", + unit); + return; + } + matrix = ctx->TextureMatrixStack[unit].Top->m; params[0] = IROUND(matrix[0]); params[1] = IROUND(matrix[1]); params[2] = IROUND(matrix[2]); @@ -4612,7 +4696,15 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) } break; case GL_TEXTURE_STACK_DEPTH: - params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1; + { + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(texture stack depth, unit %u)", unit); + return; + } + params[0] = ctx->TextureMatrixStack[unit].Depth + 1; + } break; case GL_UNPACK_ALIGNMENT: params[0] = ctx->Unpack.Alignment; @@ -5547,7 +5639,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) break; case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetIntegerv"); - params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS; + params[0] = ctx->Const.MaxCombinedTextureImageUnits; break; case GL_CURRENT_PROGRAM: CHECK_EXT1(ARB_shader_objects, "GetIntegerv"); @@ -5569,6 +5661,15 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) CHECK_EXT1(ARB_sync, "GetIntegerv"); params[0] = INT64_TO_INT(ctx->Const.MaxServerWaitTimeout); break; + case GL_NUM_EXTENSIONS: + params[0] = _mesa_get_extension_count(ctx); + break; + case GL_MAJOR_VERSION: + params[0] = ctx->VersionMajor; + break; + case GL_MINOR_VERSION: + params[0] = ctx->VersionMinor; + break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname); } @@ -5638,7 +5739,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) params[0] = (GLint64)(ctx->DrawBuffer->Visual.numAuxBuffers); break; case GL_BLEND: - params[0] = BOOLEAN_TO_INT64(ctx->Color.BlendEnabled); + params[0] = BOOLEAN_TO_INT64((ctx->Color.BlendEnabled & 1)); break; case GL_BLEND_DST: params[0] = ENUM_TO_INT64(ctx->Color.BlendDstRGB); @@ -5716,10 +5817,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) params[0] = ENUM_TO_INT64(ctx->Light.ColorMaterialMode); break; case GL_COLOR_WRITEMASK: - params[0] = (GLint64)(ctx->Color.ColorMask[RCOMP] ? 1 : 0); - params[1] = (GLint64)(ctx->Color.ColorMask[GCOMP] ? 1 : 0); - params[2] = (GLint64)(ctx->Color.ColorMask[BCOMP] ? 1 : 0); - params[3] = (GLint64)(ctx->Color.ColorMask[ACOMP] ? 1 : 0); + params[0] = (GLint64)(ctx->Color.ColorMask[0][RCOMP] ? 1 : 0); + params[1] = (GLint64)(ctx->Color.ColorMask[0][GCOMP] ? 1 : 0); + params[2] = (GLint64)(ctx->Color.ColorMask[0][BCOMP] ? 1 : 0); + params[3] = (GLint64)(ctx->Color.ColorMask[0][ACOMP] ? 1 : 0); break; case GL_CULL_FACE: params[0] = BOOLEAN_TO_INT64(ctx->Polygon.CullFlag); @@ -5760,7 +5861,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) params[0] = IROUND64(ctx->Current.RasterDistance); break; case GL_CURRENT_RASTER_INDEX: - params[0] = IROUND64(ctx->Current.RasterIndex); + params[0] = IROUND64(1.0); break; case GL_CURRENT_RASTER_POSITION: params[0] = IROUND64(ctx->Current.RasterPos[0]); @@ -5776,11 +5877,16 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) break; case GL_CURRENT_RASTER_TEXTURE_COORDS: { - const GLuint texUnit = ctx->Texture.CurrentUnit; - params[0] = IROUND64(ctx->Current.RasterTexCoords[texUnit][0]); - params[1] = IROUND64(ctx->Current.RasterTexCoords[texUnit][1]); - params[2] = IROUND64(ctx->Current.RasterTexCoords[texUnit][2]); - params[3] = IROUND64(ctx->Current.RasterTexCoords[texUnit][3]); + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(raster tex coords, unit %u)", unit); + return; + } + params[0] = IROUND64(ctx->Current.RasterTexCoords[unit][0]); + params[1] = IROUND64(ctx->Current.RasterTexCoords[unit][1]); + params[2] = IROUND64(ctx->Current.RasterTexCoords[unit][2]); + params[3] = IROUND64(ctx->Current.RasterTexCoords[unit][3]); } break; case GL_CURRENT_RASTER_POSITION_VALID: @@ -5788,12 +5894,17 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) break; case GL_CURRENT_TEXTURE_COORDS: { - const GLuint texUnit = ctx->Texture.CurrentUnit; + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(current tex coords, unit %u)", unit); + return; + } FLUSH_CURRENT(ctx, 0); - params[0] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]); - params[1] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]); - params[2] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]); - params[3] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]); + params[0] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0]); + params[1] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1]); + params[2] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2]); + params[3] = IROUND64(ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3]); } break; case GL_DEPTH_BIAS: @@ -5888,7 +5999,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) params[0] = (GLint64)(ctx->Color.ClearIndex); break; case GL_INDEX_MODE: - params[0] = BOOLEAN_TO_INT64(!ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_INT64(GL_FALSE); break; case GL_INDEX_OFFSET: params[0] = (GLint64)(ctx->Pixel.IndexOffset); @@ -6324,7 +6435,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) params[0] = BOOLEAN_TO_INT64(ctx->Transform.RescaleNormals); break; case GL_RGBA_MODE: - params[0] = BOOLEAN_TO_INT64(ctx->DrawBuffer->Visual.rgbMode); + params[0] = BOOLEAN_TO_INT64(GL_TRUE); break; case GL_SCISSOR_BOX: params[0] = (GLint64)(ctx->Scissor.X); @@ -6428,7 +6539,14 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) break; case GL_TEXTURE_MATRIX: { - const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m; + const GLfloat *matrix; + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGet(texture matrix %u)", + unit); + return; + } + matrix = ctx->TextureMatrixStack[unit].Top->m; params[0] = IROUND64(matrix[0]); params[1] = IROUND64(matrix[1]); params[2] = IROUND64(matrix[2]); @@ -6448,7 +6566,15 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) } break; case GL_TEXTURE_STACK_DEPTH: - params[0] = (GLint64)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1); + { + const GLuint unit = ctx->Texture.CurrentUnit; + if (unit >= ctx->Const.MaxTextureCoordUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGet(texture stack depth, unit %u)", unit); + return; + } + params[0] = (GLint64)(ctx->TextureMatrixStack[unit].Depth + 1); + } break; case GL_UNPACK_ALIGNMENT: params[0] = (GLint64)(ctx->Unpack.Alignment); @@ -7383,7 +7509,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) break; case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB: CHECK_EXT1(ARB_vertex_shader, "GetInteger64v"); - params[0] = (GLint64)(MAX_COMBINED_TEXTURE_IMAGE_UNITS); + params[0] = (GLint64)(ctx->Const.MaxCombinedTextureImageUnits); break; case GL_CURRENT_PROGRAM: CHECK_EXT1(ARB_shader_objects, "GetInteger64v"); @@ -7405,6 +7531,15 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ) CHECK_EXT1(ARB_sync, "GetInteger64v"); params[0] = ctx->Const.MaxServerWaitTimeout; break; + case GL_NUM_EXTENSIONS: + params[0] = (GLint64)(_mesa_get_extension_count(ctx)); + break; + case GL_MAJOR_VERSION: + params[0] = (GLint64)(ctx->VersionMajor); + break; + case GL_MINOR_VERSION: + params[0] = (GLint64)(ctx->VersionMinor); + break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetInteger64v(pname=0x%x)", pname); } @@ -7434,3 +7569,110 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) params[i] = (GLdouble) values[i]; } +void GLAPIENTRY +_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (!params) + return; + + if (ctx->NewState) + _mesa_update_state(ctx); + + switch (pname) { + case GL_BLEND: + CHECK_EXT1(EXT_draw_buffers2, "GetBooleanIndexedv"); + if (index >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetBooleanIndexedv(index=%u), index", pname); + } + params[0] = INT_TO_BOOLEAN(((ctx->Color.BlendEnabled >> index) & 1)); + break; + case GL_COLOR_WRITEMASK: + CHECK_EXT1(EXT_draw_buffers2, "GetBooleanIndexedv"); + if (index >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetBooleanIndexedv(index=%u), index", pname); + } + params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][RCOMP] ? 1 : 0); + params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][GCOMP] ? 1 : 0); + params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][BCOMP] ? 1 : 0); + params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][ACOMP] ? 1 : 0); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanIndexedv(pname=0x%x)", pname); + } +} + +void GLAPIENTRY +_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (!params) + return; + + if (ctx->NewState) + _mesa_update_state(ctx); + + switch (pname) { + case GL_BLEND: + CHECK_EXT1(EXT_draw_buffers2, "GetIntegerIndexedv"); + if (index >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetIntegerIndexedv(index=%u), index", pname); + } + params[0] = ((ctx->Color.BlendEnabled >> index) & 1); + break; + case GL_COLOR_WRITEMASK: + CHECK_EXT1(EXT_draw_buffers2, "GetIntegerIndexedv"); + if (index >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetIntegerIndexedv(index=%u), index", pname); + } + params[0] = ctx->Color.ColorMask[index][RCOMP] ? 1 : 0; + params[1] = ctx->Color.ColorMask[index][GCOMP] ? 1 : 0; + params[2] = ctx->Color.ColorMask[index][BCOMP] ? 1 : 0; + params[3] = ctx->Color.ColorMask[index][ACOMP] ? 1 : 0; + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerIndexedv(pname=0x%x)", pname); + } +} + +#if FEATURE_ARB_sync +void GLAPIENTRY +_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (!params) + return; + + if (ctx->NewState) + _mesa_update_state(ctx); + + switch (pname) { + case GL_BLEND: + CHECK_EXT1(EXT_draw_buffers2, "GetInteger64Indexedv"); + if (index >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetInteger64Indexedv(index=%u), index", pname); + } + params[0] = (GLint64)(((ctx->Color.BlendEnabled >> index) & 1)); + break; + case GL_COLOR_WRITEMASK: + CHECK_EXT1(EXT_draw_buffers2, "GetInteger64Indexedv"); + if (index >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetInteger64Indexedv(index=%u), index", pname); + } + params[0] = (GLint64)(ctx->Color.ColorMask[index][RCOMP] ? 1 : 0); + params[1] = (GLint64)(ctx->Color.ColorMask[index][GCOMP] ? 1 : 0); + params[2] = (GLint64)(ctx->Color.ColorMask[index][BCOMP] ? 1 : 0); + params[3] = (GLint64)(ctx->Color.ColorMask[index][ACOMP] ? 1 : 0); + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glGetInteger64Indexedv(pname=0x%x)", pname); + } +} +#endif /* FEATURE_ARB_sync */ + diff --git a/mesalib/src/mesa/main/get.h b/mesalib/src/mesa/main/get.h index 77a9a7d04..cc426fc0f 100644 --- a/mesalib/src/mesa/main/get.h +++ b/mesalib/src/mesa/main/get.h @@ -50,12 +50,24 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ); extern void GLAPIENTRY _mesa_GetInteger64v( GLenum pname, GLint64 *params ); +extern void GLAPIENTRY +_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params ); + +extern void GLAPIENTRY +_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params ); + +extern void GLAPIENTRY +_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params ); + extern void GLAPIENTRY _mesa_GetPointerv( GLenum pname, GLvoid **params ); extern const GLubyte * GLAPIENTRY _mesa_GetString( GLenum name ); +extern const GLubyte * GLAPIENTRY +_mesa_GetStringi(GLenum name, GLuint index); + extern GLenum GLAPIENTRY _mesa_GetError( void ); diff --git a/mesalib/src/mesa/main/getstring.c b/mesalib/src/mesa/main/getstring.c index 6599ed969..51dd5f779 100644 --- a/mesalib/src/mesa/main/getstring.c +++ b/mesalib/src/mesa/main/getstring.c @@ -27,90 +27,10 @@ #include "glheader.h" #include "context.h" #include "get.h" -#include "version.h" #include "enums.h" #include "extensions.h" -/** - * Examine enabled GL extensions to determine GL version. - * \return version string - */ -static const char * -compute_version(const GLcontext *ctx) -{ - static const char *version_1_2 = "1.2 Mesa " MESA_VERSION_STRING; - static const char *version_1_3 = "1.3 Mesa " MESA_VERSION_STRING; - static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING; - static const char *version_1_5 = "1.5 Mesa " MESA_VERSION_STRING; - static const char *version_2_0 = "2.0 Mesa " MESA_VERSION_STRING; - static const char *version_2_1 = "2.1 Mesa " MESA_VERSION_STRING; - - const GLboolean ver_1_3 = (ctx->Extensions.ARB_multisample && - ctx->Extensions.ARB_multitexture && - ctx->Extensions.ARB_texture_border_clamp && - ctx->Extensions.ARB_texture_compression && - ctx->Extensions.ARB_texture_cube_map && - ctx->Extensions.EXT_texture_env_add && - ctx->Extensions.ARB_texture_env_combine && - ctx->Extensions.ARB_texture_env_dot3); - const GLboolean ver_1_4 = (ver_1_3 && - ctx->Extensions.ARB_depth_texture && - ctx->Extensions.ARB_shadow && - ctx->Extensions.ARB_texture_env_crossbar && - ctx->Extensions.ARB_texture_mirrored_repeat && - ctx->Extensions.ARB_window_pos && - ctx->Extensions.EXT_blend_color && - ctx->Extensions.EXT_blend_func_separate && - ctx->Extensions.EXT_blend_minmax && - ctx->Extensions.EXT_blend_subtract && - ctx->Extensions.EXT_fog_coord && - ctx->Extensions.EXT_multi_draw_arrays && - ctx->Extensions.EXT_point_parameters && - ctx->Extensions.EXT_secondary_color && - ctx->Extensions.EXT_stencil_wrap && - ctx->Extensions.EXT_texture_lod_bias && - ctx->Extensions.SGIS_generate_mipmap); - const GLboolean ver_1_5 = (ver_1_4 && - ctx->Extensions.ARB_occlusion_query && - ctx->Extensions.ARB_vertex_buffer_object && - ctx->Extensions.EXT_shadow_funcs); - const GLboolean ver_2_0 = (ver_1_5 && - ctx->Extensions.ARB_draw_buffers && - ctx->Extensions.ARB_point_sprite && - ctx->Extensions.ARB_shader_objects && - ctx->Extensions.ARB_vertex_shader && - ctx->Extensions.ARB_fragment_shader && - ctx->Extensions.ARB_texture_non_power_of_two && - ctx->Extensions.EXT_blend_equation_separate && - - /* Technically, 2.0 requires the functionality - * of the EXT version. Enable 2.0 if either - * extension is available, and assume that a - * driver that only exposes the ATI extension - * will fallback to software when necessary. - */ - (ctx->Extensions.EXT_stencil_two_side - || ctx->Extensions.ATI_separate_stencil)); - const GLboolean ver_2_1 = (ver_2_0 && - ctx->Extensions.ARB_shading_language_120 && - ctx->Extensions.EXT_pixel_buffer_object && - ctx->Extensions.EXT_texture_sRGB); - if (ver_2_1) - return version_2_1; - if (ver_2_0) - return version_2_0; - if (ver_1_5) - return version_1_5; - if (ver_1_4) - return version_1_4; - if (ver_1_3) - return version_1_3; - return version_1_2; -} - - - /** * Query string-valued state. The return value should _not_ be freed by * the caller. @@ -149,7 +69,7 @@ _mesa_GetString( GLenum name ) case GL_RENDERER: return (const GLubyte *) renderer; case GL_VERSION: - return (const GLubyte *) compute_version(ctx); + return (const GLubyte *) ctx->VersionString; case GL_EXTENSIONS: if (!ctx->Extensions.String) ctx->Extensions.String = _mesa_make_extension_string(ctx); @@ -183,6 +103,34 @@ _mesa_GetString( GLenum name ) } +/** + * GL3 + */ +const GLubyte * GLAPIENTRY +_mesa_GetStringi(GLenum name, GLuint index) +{ + GET_CURRENT_CONTEXT(ctx); + + if (!ctx) + return NULL; + + ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL); + + switch (name) { + case GL_EXTENSIONS: + if (index >= _mesa_get_extension_count(ctx)) { + _mesa_error(ctx, GL_INVALID_VALUE, "glGetStringi(index=%u)", index); + return (const GLubyte *) 0; + } + return _mesa_get_enabled_extension(ctx, index); + default: + _mesa_error( ctx, GL_INVALID_ENUM, "glGetString" ); + return (const GLubyte *) 0; + } +} + + + /** * Return pointer-valued state, such as a vertex array pointer. * @@ -242,6 +190,11 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params ) case GL_SELECTION_BUFFER_POINTER: *params = ctx->Select.Buffer; break; +#if FEATURE_point_size_array + case GL_POINT_SIZE_ARRAY_POINTER_OES: + *params = (GLvoid *) ctx->Array.ArrayObj->PointSize.Ptr; + break; +#endif default: _mesa_error( ctx, GL_INVALID_ENUM, "glGetPointerv" ); return; diff --git a/mesalib/src/mesa/main/glheader.h b/mesalib/src/mesa/main/glheader.h index 81d4ccf91..77544c88c 100644 --- a/mesalib/src/mesa/main/glheader.h +++ b/mesalib/src/mesa/main/glheader.h @@ -57,6 +57,13 @@ #ifndef GL_FIXED #define GL_FIXED 0x140C +typedef int GLfixed; +typedef int GLclampx; +#endif + + +#ifndef GL_OES_EGL_image +typedef void *GLeglImageOES; #endif diff --git a/mesalib/src/mesa/main/hash.c b/mesalib/src/mesa/main/hash.c index 08c64568c..b624e6eca 100644 --- a/mesalib/src/mesa/main/hash.c +++ b/mesalib/src/mesa/main/hash.c @@ -108,27 +108,23 @@ _mesa_DeleteHashTable(struct _mesa_HashTable *table) _mesa_problem(NULL, "In _mesa_DeleteHashTable, found non-freed data"); } - _mesa_free(entry); + free(entry); entry = next; } } _glthread_DESTROY_MUTEX(table->Mutex); _glthread_DESTROY_MUTEX(table->WalkMutex); - _mesa_free(table); + free(table); } /** - * Lookup an entry in the hash table. - * - * \param table the hash table. - * \param key the key. - * - * \return pointer to user's data or NULL if key not in table + * Lookup an entry in the hash table, without locking. + * \sa _mesa_HashLookup */ -void * -_mesa_HashLookup(const struct _mesa_HashTable *table, GLuint key) +static INLINE void * +_mesa_HashLookup_unlocked(struct _mesa_HashTable *table, GLuint key) { GLuint pos; const struct HashEntry *entry; @@ -140,7 +136,7 @@ _mesa_HashLookup(const struct _mesa_HashTable *table, GLuint key) entry = table->Table[pos]; while (entry) { if (entry->Key == key) { - return entry->Data; + return entry->Data; } entry = entry->Next; } @@ -148,6 +144,25 @@ _mesa_HashLookup(const struct _mesa_HashTable *table, GLuint key) } +/** + * Lookup an entry in the hash table. + * + * \param table the hash table. + * \param key the key. + * + * \return pointer to user's data or NULL if key not in table + */ +void * +_mesa_HashLookup(struct _mesa_HashTable *table, GLuint key) +{ + void *res; + assert(table); + _glthread_LOCK_MUTEX(table->Mutex); + res = _mesa_HashLookup_unlocked(table, key); + _glthread_UNLOCK_MUTEX(table->Mutex); + return res; +} + /** * Insert a key/pointer pair into the hash table. @@ -191,10 +206,12 @@ _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data) /* alloc and insert new table entry */ entry = MALLOC_STRUCT(HashEntry); - entry->Key = key; - entry->Data = data; - entry->Next = table->Table[pos]; - table->Table[pos] = entry; + if (entry) { + entry->Key = key; + entry->Data = data; + entry->Next = table->Table[pos]; + table->Table[pos] = entry; + } _glthread_UNLOCK_MUTEX(table->Mutex); } @@ -240,7 +257,7 @@ _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key) else { table->Table[pos] = entry->Next; } - _mesa_free(entry); + free(entry); _glthread_UNLOCK_MUTEX(table->Mutex); return; } @@ -277,7 +294,7 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table, for (entry = table->Table[pos]; entry; entry = next) { callback(entry->Key, entry->Data, userData); next = entry->Next; - _mesa_free(entry); + free(entry); } table->Table[pos] = NULL; } @@ -442,7 +459,7 @@ _mesa_HashFindFreeKeyBlock(struct _mesa_HashTable *table, GLuint numKeys) GLuint freeStart = 1; GLuint key; for (key = 1; key != maxKey; key++) { - if (_mesa_HashLookup(table, key)) { + if (_mesa_HashLookup_unlocked(table, key)) { /* darn, this key is already in use */ freeCount = 0; freeStart = key+1; diff --git a/mesalib/src/mesa/main/hash.h b/mesalib/src/mesa/main/hash.h index d18db76ab..4f916f9d0 100644 --- a/mesalib/src/mesa/main/hash.h +++ b/mesalib/src/mesa/main/hash.h @@ -39,7 +39,7 @@ extern struct _mesa_HashTable *_mesa_NewHashTable(void); extern void _mesa_DeleteHashTable(struct _mesa_HashTable *table); -extern void *_mesa_HashLookup(const struct _mesa_HashTable *table, GLuint key); +extern void *_mesa_HashLookup(struct _mesa_HashTable *table, GLuint key); extern void _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data); diff --git a/mesalib/src/mesa/main/histogram.c b/mesalib/src/mesa/main/histogram.c index c7304e8dd..3a65bb192 100644 --- a/mesalib/src/mesa/main/histogram.c +++ b/mesalib/src/mesa/main/histogram.c @@ -29,7 +29,7 @@ #include "context.h" #include "image.h" #include "histogram.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_histogram diff --git a/mesalib/src/mesa/main/image.c b/mesalib/src/mesa/main/image.c index 139e56a96..dc8d97728 100644 --- a/mesalib/src/mesa/main/image.c +++ b/mesalib/src/mesa/main/image.c @@ -33,10 +33,10 @@ #include "glheader.h" #include "colormac.h" #include "context.h" +#include "enums.h" #include "image.h" #include "imports.h" #include "macros.h" -#include "pixel.h" /** @@ -1038,7 +1038,7 @@ _mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32], | (p[3] ); p += 4; } - _mesa_free(ptrn); + free(ptrn); } } @@ -1083,7 +1083,7 @@ _mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels, /* Alloc dest storage */ bytes = ((width + 7) / 8 * height); - buffer = (GLubyte *) _mesa_malloc( bytes ); + buffer = (GLubyte *) malloc( bytes ); if (!buffer) return NULL; @@ -1094,12 +1094,12 @@ _mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels, _mesa_image_address2d(packing, pixels, width, height, GL_COLOR_INDEX, GL_BITMAP, row, 0); if (!src) { - _mesa_free(buffer); + free(buffer); return NULL; } if ((packing->SkipPixels & 7) == 0) { - _mesa_memcpy( dst, src, width_in_bytes ); + memcpy( dst, src, width_in_bytes ); if (packing->LsbFirst) { flip_bytes( dst, width_in_bytes ); } @@ -1191,7 +1191,7 @@ _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source, return; if ((packing->SkipPixels & 7) == 0) { - _mesa_memcpy( dst, src, width_in_bytes ); + memcpy( dst, src, width_in_bytes ); if (packing->LsbFirst) { flip_bytes( dst, width_in_bytes ); } @@ -3228,6 +3228,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], srcFormat == GL_RGBA || srcFormat == GL_BGRA || srcFormat == GL_ABGR_EXT || + srcFormat == GL_DU8DV8_ATI || srcFormat == GL_DUDV_ATI); ASSERT(srcType == GL_UNSIGNED_BYTE || @@ -3343,6 +3344,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], aComp = 0; stride = 4; break; + case GL_DU8DV8_ATI: case GL_DUDV_ATI: redIndex = 0; greenIndex = 1; @@ -3351,7 +3353,8 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], stride = 2; break; default: - _mesa_problem(NULL, "bad srcFormat in extract float data"); + _mesa_problem(NULL, "bad srcFormat %s in extract float data", + _mesa_lookup_enum_by_nr(srcFormat)); return; } @@ -3791,7 +3794,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx, if (srcType == CHAN_TYPE) { if (dstFormat == GL_RGBA) { if (srcFormat == GL_RGBA) { - _mesa_memcpy( dest, source, n * 4 * sizeof(GLchan) ); + memcpy( dest, source, n * 4 * sizeof(GLchan) ); return; } else if (srcFormat == GL_RGB) { @@ -3811,7 +3814,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx, } else if (dstFormat == GL_RGB) { if (srcFormat == GL_RGB) { - _mesa_memcpy( dest, source, n * 3 * sizeof(GLchan) ); + memcpy( dest, source, n * 3 * sizeof(GLchan) ); return; } else if (srcFormat == GL_RGBA) { @@ -3831,7 +3834,7 @@ _mesa_unpack_color_span_chan( GLcontext *ctx, else if (dstFormat == srcFormat) { GLint comps = _mesa_components_in_format(srcFormat); assert(comps > 0); - _mesa_memcpy( dest, source, n * comps * sizeof(GLchan) ); + memcpy( dest, source, n * comps * sizeof(GLchan) ); return; } } @@ -4378,11 +4381,11 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n, */ if (transferOps == 0 && srcType == GL_UNSIGNED_BYTE && dstType == GL_UNSIGNED_BYTE) { - _mesa_memcpy(dest, source, n * sizeof(GLubyte)); + memcpy(dest, source, n * sizeof(GLubyte)); } else if (transferOps == 0 && srcType == GL_UNSIGNED_INT && dstType == GL_UNSIGNED_INT && !srcPacking->SwapBytes) { - _mesa_memcpy(dest, source, n * sizeof(GLuint)); + memcpy(dest, source, n * sizeof(GLuint)); } else { /* @@ -4418,7 +4421,7 @@ _mesa_unpack_index_span( const GLcontext *ctx, GLuint n, } break; case GL_UNSIGNED_INT: - _mesa_memcpy(dest, indexes, n * sizeof(GLuint)); + memcpy(dest, indexes, n * sizeof(GLuint)); break; default: _mesa_problem(ctx, "bad dstType in _mesa_unpack_index_span"); @@ -4441,7 +4444,7 @@ _mesa_pack_index_span( const GLcontext *ctx, GLuint n, if (transferOps & (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT)) { /* make a copy of input */ - _mesa_memcpy(indexes, source, n * sizeof(GLuint)); + memcpy(indexes, source, n * sizeof(GLuint)); _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes); source = indexes; } @@ -4589,14 +4592,14 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, !ctx->Pixel.MapStencilFlag && srcType == GL_UNSIGNED_BYTE && dstType == GL_UNSIGNED_BYTE) { - _mesa_memcpy(dest, source, n * sizeof(GLubyte)); + memcpy(dest, source, n * sizeof(GLubyte)); } else if (transferOps == 0 && !ctx->Pixel.MapStencilFlag && srcType == GL_UNSIGNED_INT && dstType == GL_UNSIGNED_INT && !srcPacking->SwapBytes) { - _mesa_memcpy(dest, source, n * sizeof(GLuint)); + memcpy(dest, source, n * sizeof(GLuint)); } else { /* @@ -4643,7 +4646,7 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n, } break; case GL_UNSIGNED_INT: - _mesa_memcpy(dest, indexes, n * sizeof(GLuint)); + memcpy(dest, indexes, n * sizeof(GLuint)); break; default: _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span"); @@ -4664,7 +4667,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset || ctx->Pixel.MapStencilFlag) { /* make a copy of input */ - _mesa_memcpy(stencil, source, n * sizeof(GLstencil)); + memcpy(stencil, source, n * sizeof(GLstencil)); _mesa_apply_stencil_transfer_ops(ctx, n, stencil); source = stencil; } @@ -4672,7 +4675,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n, switch (dstType) { case GL_UNSIGNED_BYTE: if (sizeof(GLstencil) == 1) { - _mesa_memcpy( dest, source, n ); + memcpy( dest, source, n ); } else { GLubyte *dst = (GLubyte *) dest; @@ -5036,7 +5039,7 @@ _mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest, ASSERT(n <= MAX_WIDTH); if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) { - _mesa_memcpy(depthCopy, depthSpan, n * sizeof(GLfloat)); + memcpy(depthCopy, depthSpan, n * sizeof(GLfloat)); _mesa_scale_and_bias_depth(ctx, n, depthCopy); depthSpan = depthCopy; } @@ -5155,7 +5158,7 @@ _mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest, ASSERT(n <= MAX_WIDTH); if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) { - _mesa_memcpy(depthCopy, depthVals, n * sizeof(GLfloat)); + memcpy(depthCopy, depthVals, n * sizeof(GLfloat)); _mesa_scale_and_bias_depth(ctx, n, depthCopy); depthVals = depthCopy; } @@ -5163,7 +5166,7 @@ _mesa_pack_depth_stencil_span(const GLcontext *ctx, GLuint n, GLuint *dest, if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset || ctx->Pixel.MapStencilFlag) { - _mesa_memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil)); + memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil)); _mesa_apply_stencil_transfer_ops(ctx, n, stencilCopy); stencilVals = stencilCopy; } @@ -5229,7 +5232,7 @@ _mesa_unpack_image( GLuint dimensions, { GLubyte *destBuffer - = (GLubyte *) _mesa_malloc(bytesPerRow * height * depth); + = (GLubyte *) malloc(bytesPerRow * height * depth); GLubyte *dst; GLint img, row; if (!destBuffer) @@ -5300,7 +5303,7 @@ _mesa_unpack_image( GLuint dimensions, } } else { - _mesa_memcpy(dst, src, bytesPerRow); + memcpy(dst, src, bytesPerRow); } /* byte flipping/swapping */ @@ -5353,7 +5356,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort)); } else { const GLubyte (*src1)[4] = (const GLubyte (*)[4]) src; @@ -5369,7 +5372,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat)); } break; case GL_UNSIGNED_SHORT: @@ -5386,7 +5389,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte)); } else { const GLushort (*src2)[4] = (const GLushort (*)[4]) src; @@ -5402,7 +5405,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLfloat)); } break; case GL_FLOAT: @@ -5419,7 +5422,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLubyte)); } else { const GLfloat (*src4)[4] = (const GLfloat (*)[4]) src; @@ -5435,7 +5438,7 @@ _mesa_convert_colors(GLenum srcType, const GLvoid *src, } } if (useTemp) - _mesa_memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort)); + memcpy(dst, tempBuffer, count * 4 * sizeof(GLushort)); } break; default: @@ -5659,7 +5662,7 @@ clip_right_or_top(GLint *srcX0, GLint *srcX1, /* chop off [t, 1] part */ ASSERT(t >= 0.0 && t <= 1.0); *dstX1 = maxValue; - bias = (*srcX0 < *srcX1) ? 0.5 : -0.5; + bias = (*srcX0 < *srcX1) ? 0.5F : -0.5F; *srcX1 = *srcX0 + (GLint) (t * (*srcX1 - *srcX0) + bias); } else if (*dstX0 > maxValue) { @@ -5669,7 +5672,7 @@ clip_right_or_top(GLint *srcX0, GLint *srcX1, /* chop off [t, 1] part */ ASSERT(t >= 0.0 && t <= 1.0); *dstX0 = maxValue; - bias = (*srcX0 < *srcX1) ? -0.5 : 0.5; + bias = (*srcX0 < *srcX1) ? -0.5F : 0.5F; *srcX0 = *srcX1 + (GLint) (t * (*srcX0 - *srcX1) + bias); } } @@ -5692,7 +5695,7 @@ clip_left_or_bottom(GLint *srcX0, GLint *srcX1, /* chop off [0, t] part */ ASSERT(t >= 0.0 && t <= 1.0); *dstX0 = minValue; - bias = (*srcX0 < *srcX1) ? 0.5 : -0.5; /* flipped??? */ + bias = (*srcX0 < *srcX1) ? 0.5F : -0.5F; /* flipped??? */ *srcX0 = *srcX0 + (GLint) (t * (*srcX1 - *srcX0) + bias); } else if (*dstX1 < minValue) { @@ -5702,7 +5705,7 @@ clip_left_or_bottom(GLint *srcX0, GLint *srcX1, /* chop off [0, t] part */ ASSERT(t >= 0.0 && t <= 1.0); *dstX1 = minValue; - bias = (*srcX0 < *srcX1) ? 0.5 : -0.5; + bias = (*srcX0 < *srcX1) ? 0.5F : -0.5F; *srcX1 = *srcX1 + (GLint) (t * (*srcX0 - *srcX1) + bias); } } diff --git a/mesalib/src/mesa/main/image.h b/mesalib/src/mesa/main/image.h index 72717d678..9b34be0df 100644 --- a/mesalib/src/mesa/main/image.h +++ b/mesalib/src/mesa/main/image.h @@ -303,7 +303,7 @@ _mesa_clip_drawpixels(const GLcontext *ctx, extern GLboolean _mesa_clip_readpixels(const GLcontext *ctx, - GLint *destX, GLint *destY, + GLint *srcX, GLint *srcY, GLsizei *width, GLsizei *height, struct gl_pixelstore_attrib *pack); diff --git a/mesalib/src/mesa/main/imports.c b/mesalib/src/mesa/main/imports.c index 46ffb929b..1ae085336 100644 --- a/mesalib/src/mesa/main/imports.c +++ b/mesalib/src/mesa/main/imports.c @@ -71,27 +71,6 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg); /** \name Memory */ /*@{*/ -/** Wrapper around malloc() */ -void * -_mesa_malloc(size_t bytes) -{ - return malloc(bytes); -} - -/** Wrapper around calloc() */ -void * -_mesa_calloc(size_t bytes) -{ - return calloc(1, bytes); -} - -/** Wrapper around free() */ -void -_mesa_free(void *ptr) -{ - free(ptr); -} - /** * Allocate aligned memory. * @@ -118,7 +97,7 @@ _mesa_align_malloc(size_t bytes, unsigned long alignment) ASSERT( alignment > 0 ); - ptr = (uintptr_t) _mesa_malloc(bytes + alignment + sizeof(void *)); + ptr = (uintptr_t) malloc(bytes + alignment + sizeof(void *)); if (!ptr) return NULL; @@ -138,8 +117,8 @@ _mesa_align_malloc(size_t bytes, unsigned long alignment) } /** - * Same as _mesa_align_malloc(), but using _mesa_calloc() instead of - * _mesa_malloc() + * Same as _mesa_align_malloc(), but using calloc(1, ) instead of + * malloc() */ void * _mesa_align_calloc(size_t bytes, unsigned long alignment) @@ -167,7 +146,7 @@ _mesa_align_calloc(size_t bytes, unsigned long alignment) ASSERT( alignment > 0 ); - ptr = (uintptr_t) _mesa_calloc(bytes + alignment + sizeof(void *)); + ptr = (uintptr_t) calloc(1, bytes + alignment + sizeof(void *)); if (!ptr) return NULL; @@ -203,7 +182,7 @@ _mesa_align_free(void *ptr) #else void **cubbyHole = (void **) ((char *) ptr - sizeof(void *)); void *realAddr = *cubbyHole; - _mesa_free(realAddr); + free(realAddr); #endif /* defined(HAVE_POSIX_MEMALIGN) */ } @@ -221,7 +200,7 @@ _mesa_align_realloc(void *oldBuffer, size_t oldSize, size_t newSize, const size_t copySize = (oldSize < newSize) ? oldSize : newSize; void *newBuf = _mesa_align_malloc(newSize, alignment); if (newBuf && oldBuffer && copySize > 0) { - _mesa_memcpy(newBuf, oldBuffer, copySize); + memcpy(newBuf, oldBuffer, copySize); } if (oldBuffer) _mesa_align_free(oldBuffer); @@ -236,36 +215,14 @@ void * _mesa_realloc(void *oldBuffer, size_t oldSize, size_t newSize) { const size_t copySize = (oldSize < newSize) ? oldSize : newSize; - void *newBuffer = _mesa_malloc(newSize); + void *newBuffer = malloc(newSize); if (newBuffer && oldBuffer && copySize > 0) - _mesa_memcpy(newBuffer, oldBuffer, copySize); + memcpy(newBuffer, oldBuffer, copySize); if (oldBuffer) - _mesa_free(oldBuffer); + free(oldBuffer); return newBuffer; } -/** memcpy wrapper */ -void * -_mesa_memcpy(void *dest, const void *src, size_t n) -{ -#if defined(SUNOS4) - return memcpy((char *) dest, (char *) src, (int) n); -#else - return memcpy(dest, src, n); -#endif -} - -/** Wrapper around memset() */ -void -_mesa_memset( void *dst, int val, size_t n ) -{ -#if defined(SUNOS4) - memset( (char *) dst, (int) val, (int) n ); -#else - memset(dst, val, n); -#endif -} - /** * Fill memory with a constant 16bit word. * \param dst destination pointer. @@ -279,28 +236,6 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n ) *dst++ = val; } -/** Wrapper around either memset() or bzero() */ -void -_mesa_bzero( void *dst, size_t n ) -{ -#if defined(__FreeBSD__) - bzero( dst, n ); -#else - memset( dst, 0, n ); -#endif -} - -/** Wrapper around memcmp() */ -int -_mesa_memcmp( const void *s1, const void *s2, size_t n ) -{ -#if defined(SUNOS4) - return memcmp( (char *) s1, (char *) s2, (int) n ); -#else - return memcmp(s1, s2, n); -#endif -} - /*@}*/ @@ -460,7 +395,7 @@ _mesa_inv_sqrtf(float n) #if 0 /* not used, see below -BP */ float r3, x3, y3; #endif - union { float f; unsigned int i; } u; + fi_type u; unsigned int magic; /* @@ -629,11 +564,15 @@ _mesa_ffsll(int64_t val) unsigned int _mesa_bitcount(unsigned int n) { +#if defined(__GNUC__) + return __builtin_popcount(n); +#else unsigned int bits; for (bits = 0; n > 0; n = n >> 1) { bits += (n & 1); } return bits; +#endif } @@ -645,10 +584,10 @@ _mesa_bitcount(unsigned int n) GLhalfARB _mesa_float_to_half(float val) { - const int flt = *((int *) (void *) &val); - const int flt_m = flt & 0x7fffff; - const int flt_e = (flt >> 23) & 0xff; - const int flt_s = (flt >> 31) & 0x1; + const fi_type fi = {val}; + const int flt_m = fi.i & 0x7fffff; + const int flt_e = (fi.i >> 23) & 0xff; + const int flt_s = (fi.i >> 31) & 0x1; int s, e, m = 0; GLhalfARB result; @@ -735,7 +674,8 @@ _mesa_half_to_float(GLhalfARB val) const int m = val & 0x3ff; const int e = (val >> 10) & 0x1f; const int s = (val >> 15) & 0x1; - int flt_m, flt_e, flt_s, flt; + int flt_m, flt_e, flt_s; + fi_type fi; float result; /* sign bit */ @@ -770,8 +710,8 @@ _mesa_half_to_float(GLhalfARB val) flt_m = m << 13; } - flt = (flt_s << 31) | (flt_e << 23) | flt_m; - result = *((float *) (void *) &flt); + fi.i = (flt_s << 31) | (flt_e << 23) | flt_m; + result = fi.f; return result; } @@ -836,67 +776,18 @@ _mesa_getenv( const char *var ) /** \name String */ /*@{*/ -/** Wrapper around strstr() */ -char * -_mesa_strstr( const char *haystack, const char *needle ) -{ - return strstr(haystack, needle); -} - -/** Wrapper around strncat() */ -char * -_mesa_strncat( char *dest, const char *src, size_t n ) -{ - return strncat(dest, src, n); -} - -/** Wrapper around strcpy() */ -char * -_mesa_strcpy( char *dest, const char *src ) -{ - return strcpy(dest, src); -} - -/** Wrapper around strncpy() */ -char * -_mesa_strncpy( char *dest, const char *src, size_t n ) -{ - return strncpy(dest, src, n); -} - -/** Wrapper around strlen() */ -size_t -_mesa_strlen( const char *s ) -{ - return strlen(s); -} - -/** Wrapper around strcmp() */ -int -_mesa_strcmp( const char *s1, const char *s2 ) -{ - return strcmp(s1, s2); -} - -/** Wrapper around strncmp() */ -int -_mesa_strncmp( const char *s1, const char *s2, size_t n ) -{ - return strncmp(s1, s2, n); -} - /** - * Implemented using _mesa_malloc() and _mesa_strcpy. + * Implemented using malloc() and strcpy. * Note that NULL is handled accordingly. */ char * _mesa_strdup( const char *s ) { if (s) { - size_t l = _mesa_strlen(s); - char *s2 = (char *) _mesa_malloc(l + 1); + size_t l = strlen(s); + char *s2 = (char *) malloc(l + 1); if (s2) - _mesa_strcpy(s2, s); + strcpy(s2, s); return s2; } else { @@ -904,25 +795,20 @@ _mesa_strdup( const char *s ) } } -/** Wrapper around atoi() */ -int -_mesa_atoi(const char *s) -{ - return atoi(s); -} - -/** Wrapper around strtod() */ -double -_mesa_strtod( const char *s, char **end ) +/** Wrapper around strtof() */ +float +_mesa_strtof( const char *s, char **end ) { #ifdef _GNU_SOURCE static locale_t loc = NULL; if (!loc) { loc = newlocale(LC_CTYPE_MASK, "C", NULL); } - return strtod_l(s, end, loc); + return strtof_l(s, end, loc); +#elif defined(_ISOC99_SOURCE) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) + return strtof(s, end); #else - return strtod(s, end); + return (float)strtod(s, end); #endif } @@ -943,22 +829,6 @@ _mesa_str_checksum(const char *str) /*@}*/ -/**********************************************************************/ -/** \name I/O */ -/*@{*/ - -/** Wrapper around vsprintf() */ -int -_mesa_sprintf( char *str, const char *fmt, ... ) -{ - int r; - va_list args; - va_start( args, fmt ); - r = vsprintf( str, fmt, args ); - va_end( args ); - return r; -} - /** Wrapper around vsnprintf() */ int _mesa_snprintf( char *str, size_t size, const char *fmt, ... ) @@ -971,38 +841,6 @@ _mesa_snprintf( char *str, size_t size, const char *fmt, ... ) return r; } -/** Wrapper around printf(), using vsprintf() for the formatting. */ -void -_mesa_printf( const char *fmtString, ... ) -{ - va_list args; - va_start( args, fmtString ); - vfprintf(stderr, fmtString, args); - va_end( args ); -} - -/** Wrapper around fprintf(), using vsprintf() for the formatting. */ -void -_mesa_fprintf( FILE *f, const char *fmtString, ... ) -{ - char s[MAXSTRING]; - va_list args; - va_start( args, fmtString ); - vsnprintf(s, MAXSTRING, fmtString, args); - va_end( args ); - fprintf(f, "%s", s); -} - - -/** Wrapper around vsprintf() */ -int -_mesa_vsprintf( char *str, const char *fmt, va_list args ) -{ - return vsprintf( str, fmt, args ); -} - -/*@}*/ - /**********************************************************************/ /** \name Diagnostics */ @@ -1026,7 +864,7 @@ output_if_debug(const char *prefixString, const char *outputString, * set *to any value*. */ #ifdef DEBUG - debug = (env != NULL && _mesa_atoi(env) == 0) ? 0 : 1; + debug = (env != NULL && atoi(env) == 0) ? 0 : 1; #else debug = (env != NULL) ? 1 : 0; #endif @@ -1172,7 +1010,7 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *fmtString, ... ) const char *debugEnv = _mesa_getenv("MESA_DEBUG"); #ifdef DEBUG - if (debugEnv && _mesa_strstr(debugEnv, "silent")) + if (debugEnv && strstr(debugEnv, "silent")) debug = GL_FALSE; else debug = GL_TRUE; @@ -1234,13 +1072,3 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... ) } /*@}*/ - - -/** - * Wrapper for exit(). - */ -void -_mesa_exit( int status ) -{ - exit(status); -} diff --git a/mesalib/src/mesa/main/imports.h b/mesalib/src/mesa/main/imports.h index 7d4012a85..d28f4ad12 100644 --- a/mesalib/src/mesa/main/imports.h +++ b/mesalib/src/mesa/main/imports.h @@ -50,31 +50,15 @@ extern "C" { /*@{*/ /** Allocate \p BYTES bytes */ -#define MALLOC(BYTES) _mesa_malloc(BYTES) +#define MALLOC(BYTES) malloc(BYTES) /** Allocate and zero \p BYTES bytes */ -#define CALLOC(BYTES) _mesa_calloc(BYTES) +#define CALLOC(BYTES) calloc(1, BYTES) /** Allocate a structure of type \p T */ -#define MALLOC_STRUCT(T) (struct T *) _mesa_malloc(sizeof(struct T)) +#define MALLOC_STRUCT(T) (struct T *) malloc(sizeof(struct T)) /** Allocate and zero a structure of type \p T */ -#define CALLOC_STRUCT(T) (struct T *) _mesa_calloc(sizeof(struct T)) +#define CALLOC_STRUCT(T) (struct T *) calloc(1, sizeof(struct T)) /** Free memory */ -#define FREE(PTR) _mesa_free(PTR) - -/** Allocate \p BYTES aligned at \p N bytes */ -#define ALIGN_MALLOC(BYTES, N) _mesa_align_malloc(BYTES, N) -/** Allocate and zero \p BYTES bytes aligned at \p N bytes */ -#define ALIGN_CALLOC(BYTES, N) _mesa_align_calloc(BYTES, N) -/** Allocate a structure of type \p T aligned at \p N bytes */ -#define ALIGN_MALLOC_STRUCT(T, N) (struct T *) _mesa_align_malloc(sizeof(struct T), N) -/** Allocate and zero a structure of type \p T aligned at \p N bytes */ -#define ALIGN_CALLOC_STRUCT(T, N) (struct T *) _mesa_align_calloc(sizeof(struct T), N) -/** Free aligned memory */ -#define ALIGN_FREE(PTR) _mesa_align_free(PTR) - -/** Copy \p BYTES bytes from \p SRC into \p DST */ -#define MEMCPY( DST, SRC, BYTES) _mesa_memcpy(DST, SRC, BYTES) -/** Set \p N bytes in \p DST to \p VAL */ -#define MEMSET( DST, VAL, N ) _mesa_memset(DST, VAL, N) +#define FREE(PTR) free(PTR) /*@}*/ @@ -256,9 +240,7 @@ static INLINE int GET_FLOAT_BITS( float x ) /*** *** IROUND: return (as an integer) float rounded to nearest integer ***/ -#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \ - (!(defined(__BEOS__) || defined(__HAIKU__)) || \ - (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))) +#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) static INLINE int iround(float f) { int r; @@ -405,6 +387,60 @@ _mesa_is_pow_two(int x) return !(x & (x - 1)); } +/** + * Round given integer to next higer power of two + * If X is zero result is undefined. + * + * Source for the fallback implementation is + * Sean Eron Anderson's webpage "Bit Twiddling Hacks" + * http://graphics.stanford.edu/~seander/bithacks.html + * + * When using builtin function have to do some work + * for case when passed values 1 to prevent hiting + * undefined result from __builtin_clz. Undefined + * results would be different depending on optimization + * level used for build. + */ +static INLINE int32_t +_mesa_next_pow_two_32(uint32_t x) +{ +#ifdef __GNUC__ + uint32_t y = (x != 1); + return (1 + y) << ((__builtin_clz(x - y) ^ 31) ); +#else + x--; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + x++; + return x; +#endif +} + +static INLINE int64_t +_mesa_next_pow_two_64(uint64_t x) +{ +#ifdef __GNUC__ + uint64_t y = (x != 1); + if (sizeof(x) == sizeof(long)) + return (1 + y) << ((__builtin_clzl(x - y) ^ 63)); + else + return (1 + y) << ((__builtin_clzll(x - y) ^ 63)); +#else + x--; + x |= x >> 1; + x |= x >> 2; + x |= x >> 4; + x |= x >> 8; + x |= x >> 16; + x |= x >> 32; + x++; + return x; +#endif +} + /*** *** UNCLAMPED_FLOAT_TO_UBYTE: clamp float to [0,1] and map to ubyte in [0,255] @@ -458,15 +494,6 @@ _mesa_little_endian(void) * Functions */ -extern void * -_mesa_malloc( size_t bytes ); - -extern void * -_mesa_calloc( size_t bytes ); - -extern void -_mesa_free( void *ptr ); - extern void * _mesa_align_malloc( size_t bytes, unsigned long alignment ); @@ -489,21 +516,9 @@ _mesa_exec_free( void *addr ); extern void * _mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize ); -extern void * -_mesa_memcpy( void *dest, const void *src, size_t n ); - -extern void -_mesa_memset( void *dst, int val, size_t n ); - extern void _mesa_memset16( unsigned short *dst, unsigned short val, size_t n ); -extern void -_mesa_bzero( void *dst, size_t n ); - -extern int -_mesa_memcmp( const void *s1, const void *s2, size_t n ); - extern double _mesa_sin(double a); @@ -557,55 +572,18 @@ _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, extern char * _mesa_getenv( const char *var ); -extern char * -_mesa_strstr( const char *haystack, const char *needle ); - -extern char * -_mesa_strncat( char *dest, const char *src, size_t n ); - -extern char * -_mesa_strcpy( char *dest, const char *src ); - -extern char * -_mesa_strncpy( char *dest, const char *src, size_t n ); - -extern size_t -_mesa_strlen( const char *s ); - -extern int -_mesa_strcmp( const char *s1, const char *s2 ); - -extern int -_mesa_strncmp( const char *s1, const char *s2, size_t n ); - extern char * _mesa_strdup( const char *s ); -extern int -_mesa_atoi( const char *s ); - -extern double -_mesa_strtod( const char *s, char **end ); +extern float +_mesa_strtof( const char *s, char **end ); extern unsigned int _mesa_str_checksum(const char *str); -extern int -_mesa_sprintf( char *str, const char *fmt, ... ); - extern int _mesa_snprintf( char *str, size_t size, const char *fmt, ... ); -extern void -_mesa_printf( const char *fmtString, ... ); - -extern void -_mesa_fprintf( FILE *f, const char *fmtString, ... ); - -extern int -_mesa_vsprintf( char *str, const char *fmt, va_list args ); - - extern void _mesa_warning( __GLcontext *gc, const char *fmtString, ... ); @@ -618,10 +596,6 @@ _mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... ); extern void _mesa_debug( const __GLcontext *ctx, const char *fmtString, ... ); -extern void -_mesa_exit( int status ); - - #ifdef __cplusplus } #endif diff --git a/mesalib/src/mesa/main/light.c b/mesalib/src/mesa/main/light.c index 654faa5c7..19dc96892 100644 --- a/mesalib/src/mesa/main/light.c +++ b/mesalib/src/mesa/main/light.c @@ -1093,31 +1093,22 @@ _mesa_update_lighting( GLcontext *ctx ) * FLUSH_UPDATE_CURRENT, as when any outstanding material changes * are flushed, they will update the derived state at that time. */ - if (ctx->Visual.rgbMode) { - if (ctx->Light.Model.TwoSide) - _mesa_update_material( ctx, - MAT_BIT_FRONT_EMISSION | - MAT_BIT_FRONT_AMBIENT | - MAT_BIT_FRONT_DIFFUSE | - MAT_BIT_FRONT_SPECULAR | - MAT_BIT_BACK_EMISSION | - MAT_BIT_BACK_AMBIENT | - MAT_BIT_BACK_DIFFUSE | - MAT_BIT_BACK_SPECULAR); - else - _mesa_update_material( ctx, - MAT_BIT_FRONT_EMISSION | - MAT_BIT_FRONT_AMBIENT | - MAT_BIT_FRONT_DIFFUSE | - MAT_BIT_FRONT_SPECULAR); - } - else { - static const GLfloat ci[3] = { .30F, .59F, .11F }; - foreach(light, &ctx->Light.EnabledList) { - light->_dli = DOT3(ci, light->Diffuse); - light->_sli = DOT3(ci, light->Specular); - } - } + if (ctx->Light.Model.TwoSide) + _mesa_update_material(ctx, + MAT_BIT_FRONT_EMISSION | + MAT_BIT_FRONT_AMBIENT | + MAT_BIT_FRONT_DIFFUSE | + MAT_BIT_FRONT_SPECULAR | + MAT_BIT_BACK_EMISSION | + MAT_BIT_BACK_AMBIENT | + MAT_BIT_BACK_DIFFUSE | + MAT_BIT_BACK_SPECULAR); + else + _mesa_update_material(ctx, + MAT_BIT_FRONT_EMISSION | + MAT_BIT_FRONT_AMBIENT | + MAT_BIT_FRONT_DIFFUSE | + MAT_BIT_FRONT_SPECULAR); } @@ -1433,7 +1424,7 @@ _mesa_free_lighting_data( GLcontext *ctx ) /* Free lighting shininess exponentiation table */ foreach_s( s, tmps, ctx->_ShineTabList ) { - _mesa_free( s ); + free( s ); } - _mesa_free( ctx->_ShineTabList ); + free( ctx->_ShineTabList ); } diff --git a/mesalib/src/mesa/main/lines.c b/mesalib/src/mesa/main/lines.c index 81d0d33ab..cc63a759e 100644 --- a/mesalib/src/mesa/main/lines.c +++ b/mesalib/src/mesa/main/lines.c @@ -25,10 +25,8 @@ #include "glheader.h" #include "context.h" -#include "depth.h" #include "lines.h" #include "macros.h" -#include "texstate.h" #include "mtypes.h" diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h index 3d9a1aba9..a8624574d 100644 --- a/mesalib/src/mesa/main/macros.h +++ b/mesalib/src/mesa/main/macros.h @@ -83,14 +83,14 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256]; /** Convert GLuint in [0,4294967295] to GLfloat in [0.0,1.0] */ -#define UINT_TO_FLOAT(U) ((GLfloat) (U) * (1.0F / 4294967295.0)) +#define UINT_TO_FLOAT(U) ((GLfloat) ((U) * (1.0F / 4294967295.0))) /** Convert GLfloat in [0.0,1.0] to GLuint in [0,4294967295] */ #define FLOAT_TO_UINT(X) ((GLuint) ((X) * 4294967295.0)) /** Convert GLint in [-2147483648,2147483647] to GLfloat in [-1.0,1.0] */ -#define INT_TO_FLOAT(I) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0)) +#define INT_TO_FLOAT(I) ((GLfloat) ((2.0F * (I) + 1.0F) * (1.0F/4294967294.0))) /** Convert GLfloat in [-1.0,1.0] to GLint in [-2147483648,2147483647] */ /* causes overflow: @@ -202,17 +202,12 @@ do { \ #endif /** - * Copy a 4-element float vector (avoid using FPU registers) - * XXX Could use two 64-bit moves on 64-bit systems + * Copy a 4-element float vector + * memcpy seems to be most efficient */ #define COPY_4FV( DST, SRC ) \ do { \ - const GLuint *_s = (const GLuint *) (SRC); \ - GLuint *_d = (GLuint *) (DST); \ - _d[0] = _s[0]; \ - _d[1] = _s[1]; \ - _d[2] = _s[2]; \ - _d[3] = _s[3]; \ + memcpy(DST, SRC, sizeof(GLfloat) * 4); \ } while (0) /** Copy \p SZ elements into a 4-element vector */ @@ -631,12 +626,6 @@ do { \ /** Clamp X to [MIN,MAX] */ #define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) ) -/** Assign X to CLAMP(X, MIN, MAX) */ -#define CLAMP_SELF(x, mn, mx) \ - ( (x)<(mn) ? ((x) = (mn)) : ((x)>(mx) ? ((x)=(mx)) : (x)) ) - - - /** Minimum of two values: */ #define MIN2( A, B ) ( (A)<(B) ? (A) : (B) ) diff --git a/mesalib/src/mesa/main/matrix.c b/mesalib/src/mesa/main/matrix.c index ebc3cbd59..4b8c00b5b 100644 --- a/mesalib/src/mesa/main/matrix.c +++ b/mesalib/src/mesa/main/matrix.c @@ -322,7 +322,7 @@ _mesa_LoadIdentity( void ) ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glLoadIdentity()"); + _mesa_debug(ctx, "glLoadIdentity()\n"); _math_matrix_set_identity( ctx->CurrentStack->Top ); ctx->NewState |= ctx->CurrentStack->DirtyFlag; @@ -726,10 +726,10 @@ void _mesa_init_matrix( GLcontext * ctx ) _NEW_PROJECTION); init_matrix_stack(&ctx->ColorMatrixStack, MAX_COLOR_STACK_DEPTH, _NEW_COLOR_MATRIX); - for (i = 0; i < MAX_TEXTURE_UNITS; i++) + for (i = 0; i < Elements(ctx->TextureMatrixStack); i++) init_matrix_stack(&ctx->TextureMatrixStack[i], MAX_TEXTURE_STACK_DEPTH, _NEW_TEXTURE_MATRIX); - for (i = 0; i < MAX_PROGRAM_MATRICES; i++) + for (i = 0; i < Elements(ctx->ProgramMatrixStack); i++) init_matrix_stack(&ctx->ProgramMatrixStack[i], MAX_PROGRAM_MATRIX_STACK_DEPTH, _NEW_TRACK_MATRIX); ctx->CurrentStack = &ctx->ModelviewMatrixStack; @@ -754,9 +754,9 @@ void _mesa_free_matrix_data( GLcontext *ctx ) free_matrix_stack(&ctx->ModelviewMatrixStack); free_matrix_stack(&ctx->ProjectionMatrixStack); free_matrix_stack(&ctx->ColorMatrixStack); - for (i = 0; i < MAX_TEXTURE_UNITS; i++) + for (i = 0; i < Elements(ctx->TextureMatrixStack); i++) free_matrix_stack(&ctx->TextureMatrixStack[i]); - for (i = 0; i < MAX_PROGRAM_MATRICES; i++) + for (i = 0; i < Elements(ctx->ProgramMatrixStack); i++) free_matrix_stack(&ctx->ProgramMatrixStack[i]); /* combined Modelview*Projection matrix */ _math_matrix_dtr( &ctx->_ModelProjectMatrix ); diff --git a/mesalib/src/mesa/main/mfeatures.h b/mesalib/src/mesa/main/mfeatures.h index 4e68bc15d..cb96c4d1d 100644 --- a/mesalib/src/mesa/main/mfeatures.h +++ b/mesalib/src/mesa/main/mfeatures.h @@ -116,11 +116,14 @@ #define FEATURE_EXT_framebuffer_blit _HAVE_FULL_GL #define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL #define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL +#define FEATURE_APPLE_object_purgeable _HAVE_FULL_GL #define FEATURE_EXT_texture_sRGB _HAVE_FULL_GL #define FEATURE_ATI_fragment_shader _HAVE_FULL_GL #define FEATURE_NV_fence _HAVE_FULL_GL #define FEATURE_NV_fragment_program _HAVE_FULL_GL #define FEATURE_NV_vertex_program _HAVE_FULL_GL +#define FEATURE_OES_EGL_image _HAVE_FULL_GL + #endif /* FEATURES_H */ diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c index 7350c7a3d..51f7edfab 100644 --- a/mesalib/src/mesa/main/mipmap.c +++ b/mesalib/src/mesa/main/mipmap.c @@ -30,7 +30,6 @@ #include "imports.h" #include "formats.h" #include "mipmap.h" -#include "texcompress.h" #include "teximage.h" #include "texstore.h" #include "image.h" @@ -980,9 +979,11 @@ make_1d_mipmap(GLenum datatype, GLuint comps, GLint border, if (border) { /* copy left-most pixel from source */ - MEMCPY(dstPtr, srcPtr, bpt); + assert(dstPtr); + assert(srcPtr); + memcpy(dstPtr, srcPtr, bpt); /* copy right-most pixel from source */ - MEMCPY(dstPtr + (dstWidth - 1) * bpt, + memcpy(dstPtr + (dstWidth - 1) * bpt, srcPtr + (srcWidth - 1) * bpt, bpt); } @@ -1026,15 +1027,17 @@ make_2d_mipmap(GLenum datatype, GLuint comps, GLint border, if (border > 0) { /* fill in dest border */ /* lower-left border pixel */ - MEMCPY(dstPtr, srcPtr, bpt); + assert(dstPtr); + assert(srcPtr); + memcpy(dstPtr, srcPtr, bpt); /* lower-right border pixel */ - MEMCPY(dstPtr + (dstWidth - 1) * bpt, + memcpy(dstPtr + (dstWidth - 1) * bpt, srcPtr + (srcWidth - 1) * bpt, bpt); /* upper-left border pixel */ - MEMCPY(dstPtr + dstWidth * (dstHeight - 1) * bpt, + memcpy(dstPtr + dstWidth * (dstHeight - 1) * bpt, srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt); /* upper-right border pixel */ - MEMCPY(dstPtr + (dstWidth * dstHeight - 1) * bpt, + memcpy(dstPtr + (dstWidth * dstHeight - 1) * bpt, srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt); /* lower border */ do_row(datatype, comps, srcWidthNB, @@ -1051,9 +1054,9 @@ make_2d_mipmap(GLenum datatype, GLuint comps, GLint border, if (srcHeight == dstHeight) { /* copy border pixel from src to dst */ for (row = 1; row < srcHeight; row++) { - MEMCPY(dstPtr + dstWidth * row * bpt, + memcpy(dstPtr + dstWidth * row * bpt, srcPtr + srcWidth * row * bpt, bpt); - MEMCPY(dstPtr + (dstWidth * row + dstWidth - 1) * bpt, + memcpy(dstPtr + (dstWidth * row + dstWidth - 1) * bpt, srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt); } } @@ -1116,7 +1119,7 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border, */ /* - _mesa_printf("mip3d %d x %d x %d -> %d x %d x %d\n", + printf("mip3d %d x %d x %d -> %d x %d x %d\n", srcWidth, srcHeight, srcDepth, dstWidth, dstHeight, dstDepth); */ @@ -1175,28 +1178,28 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border, /* do border along [img][row=0][col=0] */ src = srcPtr + (img + 1) * bytesPerSrcImage; dst = dstPtr + (img + 1) * bytesPerDstImage; - MEMCPY(dst, src, bpt); + memcpy(dst, src, bpt); /* do border along [img][row=dstHeight-1][col=0] */ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage + (srcHeight - 1) * bytesPerSrcRow; dst = dstPtr + (img + 1) * bytesPerDstImage + (dstHeight - 1) * bytesPerDstRow; - MEMCPY(dst, src, bpt); + memcpy(dst, src, bpt); /* do border along [img][row=0][col=dstWidth-1] */ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage + (srcWidth - 1) * bpt; dst = dstPtr + (img + 1) * bytesPerDstImage + (dstWidth - 1) * bpt; - MEMCPY(dst, src, bpt); + memcpy(dst, src, bpt); /* do border along [img][row=dstHeight-1][col=dstWidth-1] */ src = srcPtr + (img * 2 + 1) * bytesPerSrcImage + (bytesPerSrcImage - bpt); dst = dstPtr + (img + 1) * bytesPerDstImage + (bytesPerDstImage - bpt); - MEMCPY(dst, src, bpt); + memcpy(dst, src, bpt); } } else { @@ -1266,9 +1269,11 @@ make_1d_stack_mipmap(GLenum datatype, GLuint comps, GLint border, if (border) { /* copy left-most pixel from source */ - MEMCPY(dstPtr, srcPtr, bpt); + assert(dstPtr); + assert(srcPtr); + memcpy(dstPtr, srcPtr, bpt); /* copy right-most pixel from source */ - MEMCPY(dstPtr + (dstWidth - 1) * bpt, + memcpy(dstPtr + (dstWidth - 1) * bpt, srcPtr + (srcWidth - 1) * bpt, bpt); } @@ -1320,15 +1325,17 @@ make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border, if (border > 0) { /* fill in dest border */ /* lower-left border pixel */ - MEMCPY(dstPtr, srcPtr, bpt); + assert(dstPtr); + assert(srcPtr); + memcpy(dstPtr, srcPtr, bpt); /* lower-right border pixel */ - MEMCPY(dstPtr + (dstWidth - 1) * bpt, + memcpy(dstPtr + (dstWidth - 1) * bpt, srcPtr + (srcWidth - 1) * bpt, bpt); /* upper-left border pixel */ - MEMCPY(dstPtr + dstWidth * (dstHeight - 1) * bpt, + memcpy(dstPtr + dstWidth * (dstHeight - 1) * bpt, srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt); /* upper-right border pixel */ - MEMCPY(dstPtr + (dstWidth * dstHeight - 1) * bpt, + memcpy(dstPtr + (dstWidth * dstHeight - 1) * bpt, srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt); /* lower border */ do_row(datatype, comps, srcWidthNB, @@ -1345,9 +1352,9 @@ make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border, if (srcHeight == dstHeight) { /* copy border pixel from src to dst */ for (row = 1; row < srcHeight; row++) { - MEMCPY(dstPtr + dstWidth * row * bpt, + memcpy(dstPtr + dstWidth * row * bpt, srcPtr + srcWidth * row * bpt, bpt); - MEMCPY(dstPtr + (dstWidth * row + dstWidth - 1) * bpt, + memcpy(dstPtr + (dstWidth * row + dstWidth - 1) * bpt, srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt); } } @@ -1538,15 +1545,15 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, size = _mesa_bytes_per_pixel(srcImage->_BaseFormat, CHAN_TYPE) * srcImage->Width * srcImage->Height * srcImage->Depth + 20; /* 20 extra bytes, just be safe when calling last FetchTexel */ - srcData = (GLubyte *) _mesa_malloc(size); + srcData = (GLubyte *) malloc(size); if (!srcData) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps"); return; } - dstData = (GLubyte *) _mesa_malloc(size / 2); /* 1/4 would probably be OK */ + dstData = (GLubyte *) malloc(size / 2); /* 1/4 would probably be OK */ if (!dstData) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps"); - _mesa_free((void *) srcData); + free((void *) srcData); return; } @@ -1591,8 +1598,8 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, if (!nextLevel) { /* all done */ if (_mesa_is_format_compressed(srcImage->TexFormat)) { - _mesa_free((void *) srcData); - _mesa_free(dstData); + free((void *) srcData); + free(dstData); } return; } diff --git a/mesalib/src/mesa/main/mm.c b/mesalib/src/mesa/main/mm.c index d430bcdb8..3ef38e94b 100644 --- a/mesalib/src/mesa/main/mm.c +++ b/mesalib/src/mesa/main/mm.c @@ -60,13 +60,13 @@ mmInit(unsigned ofs, unsigned size) if (!size) return NULL; - heap = (struct mem_block *) _mesa_calloc(sizeof(struct mem_block)); + heap = (struct mem_block *) calloc(1, sizeof(struct mem_block)); if (!heap) return NULL; - block = (struct mem_block *) _mesa_calloc(sizeof(struct mem_block)); + block = (struct mem_block *) calloc(1, sizeof(struct mem_block)); if (!block) { - _mesa_free(heap); + free(heap); return NULL; } @@ -98,7 +98,7 @@ SliceBlock(struct mem_block *p, /* break left [p, newblock, p->next], then p = newblock */ if (startofs > p->ofs) { - newblock = (struct mem_block*) _mesa_calloc(sizeof(struct mem_block)); + newblock = (struct mem_block*) calloc(1, sizeof(struct mem_block)); if (!newblock) return NULL; newblock->ofs = startofs; @@ -122,7 +122,7 @@ SliceBlock(struct mem_block *p, /* break right, also [p, newblock, p->next] */ if (size < p->size) { - newblock = (struct mem_block*) _mesa_calloc(sizeof(struct mem_block)); + newblock = (struct mem_block*) calloc(1, sizeof(struct mem_block)); if (!newblock) return NULL; newblock->ofs = startofs + size; @@ -225,7 +225,7 @@ Join2Blocks(struct mem_block *p) q->next_free->prev_free = q->prev_free; q->prev_free->next_free = q->next_free; - _mesa_free(q); + free(q); return 1; } return 0; @@ -270,9 +270,9 @@ mmDestroy(struct mem_block *heap) for (p = heap->next; p != heap; ) { struct mem_block *next = p->next; - _mesa_free(p); + free(p); p = next; } - _mesa_free(heap); + free(heap); } diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index cde2f5fe0..9d9b475dd 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -564,7 +564,7 @@ struct gl_colorbuffer_attrib GLclampf ClearColor[4]; /**< Color to use for glClear */ GLuint IndexMask; /**< Color index write mask */ - GLubyte ColorMask[4]; /**< Each flag is 0xff or 0x0 */ + GLubyte ColorMask[MAX_DRAW_BUFFERS][4];/**< Each flag is 0xff or 0x0 */ GLenum DrawBuffer[MAX_DRAW_BUFFERS]; /**< Which buffer to draw into */ @@ -581,7 +581,7 @@ struct gl_colorbuffer_attrib * \name Blending */ /*@{*/ - GLboolean BlendEnabled; /**< Blending enabled flag */ + GLbitfield BlendEnabled; /**< Per-buffer blend enable flags */ GLenum BlendSrcRGB; /**< Blending source operator */ GLenum BlendDstRGB; /**< Blending destination operator */ GLenum BlendSrcA; /**< GL_INGR_blend_func_separate */ @@ -630,8 +630,7 @@ struct gl_current_attrib GLfloat RasterDistance; GLfloat RasterColor[4]; GLfloat RasterSecondaryColor[4]; - GLfloat RasterIndex; - GLfloat RasterTexCoords[MAX_TEXTURE_UNITS][4]; + GLfloat RasterTexCoords[MAX_TEXTURE_COORD_UNITS][4]; GLboolean RasterPosValid; /*@}*/ }; @@ -963,7 +962,7 @@ struct gl_point_attrib GLfloat Threshold; /**< GL_EXT_point_parameters */ GLboolean _Attenuated; /**< True if Params != [1, 0, 0] */ GLboolean PointSprite; /**< GL_NV/ARB_point_sprite */ - GLboolean CoordReplace[MAX_TEXTURE_UNITS]; /**< GL_ARB_point_sprite */ + GLboolean CoordReplace[MAX_TEXTURE_COORD_UNITS]; /**< GL_ARB_point_sprite*/ GLenum SpriteRMode; /**< GL_NV_point_sprite (only!) */ GLenum SpriteOrigin; /**< GL_ARB_point_sprite */ }; @@ -1217,7 +1216,11 @@ struct gl_texture_object GLuint Name; /**< the user-visible texture object ID */ GLenum Target; /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */ GLfloat Priority; /**< in [0,1] */ - GLfloat BorderColor[4]; /**< unclamped */ + union { + GLfloat f[4]; + GLuint ui[4]; + GLint i[4]; + } BorderColor; /**< Interpreted according to texture format */ GLenum WrapS; /**< S-axis texture image wrap mode */ GLenum WrapT; /**< T-axis texture image wrap mode */ GLenum WrapR; /**< R-axis texture image wrap mode */ @@ -1241,6 +1244,7 @@ struct gl_texture_object GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */ GLboolean _Complete; /**< Is texture object complete? */ GLboolean _RenderToTexture; /**< Any rendering to this texture? */ + GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */ /** Actual texture images, indexed by [cube face] and [mipmap level] */ struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS]; @@ -1357,7 +1361,7 @@ struct gl_texture_unit struct gl_texture_attrib { GLuint CurrentUnit; /**< GL_ACTIVE_TEXTURE */ - struct gl_texture_unit Unit[MAX_TEXTURE_UNITS]; + struct gl_texture_unit Unit[MAX_COMBINED_TEXTURE_IMAGE_UNITS]; struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS]; @@ -1422,6 +1426,7 @@ struct gl_viewport_attrib */ struct gl_buffer_object { + _glthread_Mutex Mutex; GLint RefCount; GLuint Name; GLenum Usage; /**< GL_STREAM_DRAW_ARB, GL_STREAM_READ_ARB, etc. */ @@ -1435,6 +1440,7 @@ struct gl_buffer_object GLsizeiptr Length; /**< Mapped length */ /*@}*/ GLboolean Written; /**< Ever written to? (for debugging) */ + GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */ }; @@ -1758,6 +1764,8 @@ struct gl_fragment_program struct gl_program Base; /**< base class */ GLenum FogOption; GLboolean UsesKill; /**< shader uses KIL instruction */ + GLboolean OriginUpperLeft; + GLboolean PixelCenterInteger; }; @@ -1899,6 +1907,10 @@ struct gl_query_state struct _mesa_HashTable *QueryObjects; struct gl_query_object *CurrentOcclusionObject; /* GL_ARB_occlusion_query */ struct gl_query_object *CurrentTimerObject; /* GL_EXT_timer_query */ + + /** GL_NV_conditional_render */ + struct gl_query_object *CondRenderQuery; + GLenum CondRenderMode; }; @@ -2094,6 +2106,7 @@ struct gl_renderbuffer GLuint Name; GLint RefCount; GLuint Width, Height; + GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */ GLenum InternalFormat; /**< The user-specified format */ GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or @@ -2319,6 +2332,7 @@ struct gl_constants GLuint MaxTextureCoordUnits; GLuint MaxTextureImageUnits; GLuint MaxVertexTextureImageUnits; + GLuint MaxCombinedTextureImageUnits; GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */ GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */ GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */ @@ -2386,11 +2400,13 @@ struct gl_extensions GLboolean ARB_depth_clamp; GLboolean ARB_draw_buffers; GLboolean ARB_draw_elements_base_vertex; + GLboolean ARB_fragment_coord_conventions; GLboolean ARB_fragment_program; GLboolean ARB_fragment_program_shadow; GLboolean ARB_fragment_shader; GLboolean ARB_framebuffer_object; GLboolean ARB_half_float_pixel; + GLboolean ARB_half_float_vertex; GLboolean ARB_imaging; GLboolean ARB_map_buffer_range; GLboolean ARB_multisample; @@ -2433,6 +2449,7 @@ struct gl_extensions GLboolean EXT_compiled_vertex_array; GLboolean EXT_copy_texture; GLboolean EXT_depth_bounds_test; + GLboolean EXT_draw_buffers2; GLboolean EXT_draw_range_elements; GLboolean EXT_fog_coord; GLboolean EXT_framebuffer_blit; @@ -2459,6 +2476,7 @@ struct gl_extensions GLboolean EXT_texture; GLboolean EXT_texture_object; GLboolean EXT_texture3D; + GLboolean EXT_texture_array; GLboolean EXT_texture_compression_s3tc; GLboolean EXT_texture_env_add; GLboolean EXT_texture_env_combine; @@ -2476,6 +2494,7 @@ struct gl_extensions GLboolean APPLE_client_storage; GLboolean APPLE_packed_pixels; GLboolean APPLE_vertex_array_object; + GLboolean APPLE_object_purgeable; GLboolean ATI_envmap_bumpmap; GLboolean ATI_texture_mirror_once; GLboolean ATI_texture_env_combine3; @@ -2490,6 +2509,7 @@ struct gl_extensions GLboolean MESA_texture_array; GLboolean MESA_texture_signed_rgba; GLboolean NV_blend_square; + GLboolean NV_conditional_render; GLboolean NV_fragment_program; GLboolean NV_fragment_program_option; GLboolean NV_light_max_exponent; @@ -2508,8 +2528,13 @@ struct gl_extensions GLboolean SGIS_texture_lod; GLboolean TDFX_texture_compression_FXT1; GLboolean S3_s3tc; +#if FEATURE_OES_draw_texture + GLboolean OES_draw_texture; +#endif /* FEATURE_OES_draw_texture */ /** The extension string */ const GLubyte *String; + /** Number of supported extensions */ + GLuint Count; }; @@ -2851,6 +2876,10 @@ struct __GLcontextRec /** Extension information */ struct gl_extensions Extensions; + /** Version info */ + GLuint VersionMajor, VersionMinor; + char *VersionString; + /** \name State attribute stack (for glPush/PopAttrib) */ /*@{*/ GLuint AttribStackDepth; diff --git a/mesalib/src/mesa/main/pixel.c b/mesalib/src/mesa/main/pixel.c index 3820ebd88..675e933ca 100644 --- a/mesalib/src/mesa/main/pixel.c +++ b/mesalib/src/mesa/main/pixel.c @@ -32,11 +32,10 @@ #include "bufferobj.h" #include "colormac.h" #include "context.h" -#include "image.h" #include "macros.h" #include "pixel.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_pixel_transfer @@ -151,13 +150,17 @@ validate_pbo_access(GLcontext *ctx, struct gl_pixelstore_attrib *pack, GLboolean ok; /* Note, need to use DefaultPacking and Unpack's buffer object */ - ctx->DefaultPacking.BufferObj = pack->BufferObj; + _mesa_reference_buffer_object(ctx, + &ctx->DefaultPacking.BufferObj, + pack->BufferObj); ok = _mesa_validate_pbo_access(1, &ctx->DefaultPacking, mapsize, 1, 1, format, type, ptr); /* restore */ - ctx->DefaultPacking.BufferObj = ctx->Shared->NullBufferObj; + _mesa_reference_buffer_object(ctx, + &ctx->DefaultPacking.BufferObj, + ctx->Shared->NullBufferObj); if (!ok) { _mesa_error(ctx, GL_INVALID_OPERATION, @@ -359,7 +362,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values ) } } else { - MEMCPY(values, pm->Map, mapsize * sizeof(GLfloat)); + memcpy(values, pm->Map, mapsize * sizeof(GLfloat)); } _mesa_unmap_pbo_dest(ctx, &ctx->Pack); @@ -398,7 +401,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values ) if (map == GL_PIXEL_MAP_S_TO_S) { /* special case */ - MEMCPY(values, ctx->PixelMaps.StoS.Map, mapsize * sizeof(GLint)); + memcpy(values, ctx->PixelMaps.StoS.Map, mapsize * sizeof(GLint)); } else { for (i = 0; i < mapsize; i++) { @@ -424,7 +427,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values ) _mesa_error(ctx, GL_INVALID_ENUM, "glGetPixelMapusv(map)"); return; } - mapsize = pm ? pm->Size : 0; + mapsize = pm->Size; if (!validate_pbo_access(ctx, &ctx->Pack, mapsize, GL_INTENSITY, GL_UNSIGNED_SHORT, values)) { diff --git a/mesalib/src/mesa/main/pixelstore.c b/mesalib/src/mesa/main/pixelstore.c index 6a641f83f..ec585ef0c 100644 --- a/mesalib/src/mesa/main/pixelstore.c +++ b/mesalib/src/mesa/main/pixelstore.c @@ -30,10 +30,7 @@ #include "glheader.h" #include "bufferobj.h" -#include "colormac.h" #include "context.h" -#include "image.h" -#include "macros.h" #include "pixelstore.h" #include "mtypes.h" diff --git a/mesalib/src/mesa/main/points.c b/mesalib/src/mesa/main/points.c index dcaeccd90..eab9d13d6 100644 --- a/mesalib/src/mesa/main/points.c +++ b/mesalib/src/mesa/main/points.c @@ -32,7 +32,6 @@ #include "context.h" #include "macros.h" #include "points.h" -#include "texstate.h" #include "mtypes.h" @@ -267,7 +266,7 @@ _mesa_init_point(GLcontext *ctx) ctx->Point.PointSprite = GL_FALSE; /* GL_ARB/NV_point_sprite */ ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */ ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */ - for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { + for (i = 0; i < Elements(ctx->Point.CoordReplace); i++) { ctx->Point.CoordReplace[i] = GL_FALSE; /* GL_ARB/NV_point_sprite */ } } diff --git a/mesalib/src/mesa/main/polygon.c b/mesalib/src/mesa/main/polygon.c index 376a87a39..30e4a606b 100644 --- a/mesalib/src/mesa/main/polygon.c +++ b/mesalib/src/mesa/main/polygon.c @@ -34,7 +34,6 @@ #include "context.h" #include "image.h" #include "enums.h" -#include "macros.h" #include "polygon.h" #include "mtypes.h" @@ -316,7 +315,7 @@ void _mesa_init_polygon( GLcontext * ctx ) /* Polygon Stipple group */ - MEMSET( ctx->PolygonStipple, 0xff, 32*sizeof(GLuint) ); + memset( ctx->PolygonStipple, 0xff, 32*sizeof(GLuint) ); } /*@}*/ diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c index f6eb4ee7e..e14511a38 100644 --- a/mesalib/src/mesa/main/queryobj.c +++ b/mesalib/src/mesa/main/queryobj.c @@ -29,7 +29,7 @@ #include "imports.h" #include "queryobj.h" #include "mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_queryobj @@ -114,19 +114,10 @@ _mesa_check_query(GLcontext *ctx, struct gl_query_object *q) static void _mesa_delete_query(GLcontext *ctx, struct gl_query_object *q) { - _mesa_free(q); + free(q); } -static struct gl_query_object * -lookup_query_object(GLcontext *ctx, GLuint id) -{ - return (struct gl_query_object *) - _mesa_HashLookup(ctx->Query.QueryObjects, id); -} - - - void _mesa_init_query_object_functions(struct dd_function_table *driver) { @@ -196,7 +187,7 @@ _mesa_DeleteQueriesARB(GLsizei n, const GLuint *ids) for (i = 0; i < n; i++) { if (ids[i] > 0) { - struct gl_query_object *q = lookup_query_object(ctx, ids[i]); + struct gl_query_object *q = _mesa_lookup_query_object(ctx, ids[i]); if (q) { ASSERT(!q->Active); /* should be caught earlier */ _mesa_HashRemove(ctx->Query.QueryObjects, ids[i]); @@ -213,7 +204,7 @@ _mesa_IsQueryARB(GLuint id) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (id && lookup_query_object(ctx, id)) + if (id && _mesa_lookup_query_object(ctx, id)) return GL_TRUE; else return GL_FALSE; @@ -260,7 +251,7 @@ _mesa_BeginQueryARB(GLenum target, GLuint id) return; } - q = lookup_query_object(ctx, id); + q = _mesa_lookup_query_object(ctx, id); if (!q) { /* create new object */ q = ctx->Driver.NewQueryObject(ctx, id); @@ -386,7 +377,7 @@ _mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params) ASSERT_OUTSIDE_BEGIN_END(ctx); if (id) - q = lookup_query_object(ctx, id); + q = _mesa_lookup_query_object(ctx, id); if (!q || q->Active) { _mesa_error(ctx, GL_INVALID_OPERATION, @@ -426,7 +417,7 @@ _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params) ASSERT_OUTSIDE_BEGIN_END(ctx); if (id) - q = lookup_query_object(ctx, id); + q = _mesa_lookup_query_object(ctx, id); if (!q || q->Active) { _mesa_error(ctx, GL_INVALID_OPERATION, @@ -469,7 +460,7 @@ _mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params) ASSERT_OUTSIDE_BEGIN_END(ctx); if (id) - q = lookup_query_object(ctx, id); + q = _mesa_lookup_query_object(ctx, id); if (!q || q->Active) { _mesa_error(ctx, GL_INVALID_OPERATION, @@ -506,7 +497,7 @@ _mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params) ASSERT_OUTSIDE_BEGIN_END(ctx); if (id) - q = lookup_query_object(ctx, id); + q = _mesa_lookup_query_object(ctx, id); if (!q || q->Active) { _mesa_error(ctx, GL_INVALID_OPERATION, diff --git a/mesalib/src/mesa/main/queryobj.h b/mesalib/src/mesa/main/queryobj.h index 6cf3c76d7..ba8b5dd00 100644 --- a/mesalib/src/mesa/main/queryobj.h +++ b/mesalib/src/mesa/main/queryobj.h @@ -28,6 +28,7 @@ #include "main/mtypes.h" +#include "main/hash.h" #if FEATURE_queryobj @@ -42,6 +43,15 @@ (driver)->CheckQuery = impl ## CheckQuery; \ } while (0) + +static INLINE struct gl_query_object * +_mesa_lookup_query_object(GLcontext *ctx, GLuint id) +{ + return (struct gl_query_object *) + _mesa_HashLookup(ctx->Query.QueryObjects, id); +} + + extern void GLAPIENTRY _mesa_GenQueriesARB(GLsizei n, GLuint *ids); diff --git a/mesalib/src/mesa/main/rastpos.c b/mesalib/src/mesa/main/rastpos.c index 703b47ec7..75c67f269 100644 --- a/mesalib/src/mesa/main/rastpos.c +++ b/mesalib/src/mesa/main/rastpos.c @@ -34,7 +34,7 @@ #include "macros.h" #include "rastpos.h" #include "state.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_rastpos @@ -246,33 +246,28 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z) ctx->Current.RasterDistance = 0.0; /* raster color = current color or index */ - if (ctx->Visual.rgbMode) { - ctx->Current.RasterColor[0] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F); - ctx->Current.RasterColor[1] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F); - ctx->Current.RasterColor[2] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F); - ctx->Current.RasterColor[3] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F); - ctx->Current.RasterSecondaryColor[0] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F); - ctx->Current.RasterSecondaryColor[1] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F); - ctx->Current.RasterSecondaryColor[2] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F); - ctx->Current.RasterSecondaryColor[3] - = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F); - } - else { - ctx->Current.RasterIndex - = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]; - } + ctx->Current.RasterColor[0] + = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F); + ctx->Current.RasterColor[1] + = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F); + ctx->Current.RasterColor[2] + = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F); + ctx->Current.RasterColor[3] + = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F); + ctx->Current.RasterSecondaryColor[0] + = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F); + ctx->Current.RasterSecondaryColor[1] + = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F); + ctx->Current.RasterSecondaryColor[2] + = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F); + ctx->Current.RasterSecondaryColor[3] + = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F); /* raster texcoord = current texcoord */ { GLuint texSet; for (texSet = 0; texSet < ctx->Const.MaxTextureCoordUnits; texSet++) { + assert(texSet < Elements(ctx->Current.RasterTexCoords)); COPY_4FV( ctx->Current.RasterTexCoords[texSet], ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texSet] ); } @@ -561,8 +556,7 @@ void _mesa_init_rastpos( GLcontext * ctx ) ctx->Current.RasterDistance = 0.0; ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 ); ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 ); - ctx->Current.RasterIndex = 1.0; - for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) + for (i = 0; i < Elements(ctx->Current.RasterTexCoords); i++) ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 ); ctx->Current.RasterPosValid = GL_TRUE; } diff --git a/mesalib/src/mesa/main/readpix.c b/mesalib/src/mesa/main/readpix.c index feea1d375..f4d74e8be 100644 --- a/mesalib/src/mesa/main/readpix.c +++ b/mesalib/src/mesa/main/readpix.c @@ -77,14 +77,7 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type, case GL_RGBA: case GL_BGRA: case GL_ABGR_EXT: - if (drawing) { - if (!ctx->DrawBuffer->Visual.rgbMode) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawPixels(drawing RGB pixels into color index buffer)"); - return GL_TRUE; - } - } - else { + if (!drawing) { /* reading */ if (!_mesa_source_buffer_exists(ctx, GL_COLOR)) { _mesa_error(ctx, GL_INVALID_OPERATION, @@ -95,10 +88,9 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type, break; case GL_COLOR_INDEX: if (drawing) { - if (ctx->DrawBuffer->Visual.rgbMode && - (ctx->PixelMaps.ItoR.Size == 0 || - ctx->PixelMaps.ItoG.Size == 0 || - ctx->PixelMaps.ItoB.Size == 0)) { + if (ctx->PixelMaps.ItoR.Size == 0 || + ctx->PixelMaps.ItoG.Size == 0 || + ctx->PixelMaps.ItoB.Size == 0) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(drawing color index pixels into RGB buffer)"); return GL_TRUE; diff --git a/mesalib/src/mesa/main/remap.c b/mesalib/src/mesa/main/remap.c index 0385ae8d7..8d9df6b83 100644 --- a/mesalib/src/mesa/main/remap.c +++ b/mesalib/src/mesa/main/remap.c @@ -38,14 +38,14 @@ #include "remap.h" #include "imports.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_remap_table #define need_MESA_remap_table -#include "remap_helper.h" +#include "main/remap_helper.h" #define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) #define MAX_ENTRY_POINTS 16 @@ -183,7 +183,7 @@ _mesa_map_static_functions(void) /** * Initialize the remap table. This is called in one_time_init(). * The remap table needs to be initialized before calling the - * CALL/GET/SET macros defined in glapi/dispatch.h. + * CALL/GET/SET macros defined in main/dispatch.h. */ void _mesa_init_remap_table(void) diff --git a/mesalib/src/mesa/main/remap_helper.h b/mesalib/src/mesa/main/remap_helper.h index c80a524b4..ee898efa5 100644 --- a/mesalib/src/mesa/main/remap_helper.h +++ b/mesalib/src/mesa/main/remap_helper.h @@ -25,7 +25,7 @@ * SOFTWARE. */ -#include "glapi/dispatch.h" +#include "main/dispatch.h" struct gl_function_remap { GLint func_index; @@ -605,3722 +605,3774 @@ static const char _mesa_function_pool[] = "glFogCoordd\0" "glFogCoorddEXT\0" "\0" - /* _mesa_function_pool[4074]: Color4ubVertex3fSUN (dynamic) */ + /* _mesa_function_pool[4074]: BeginConditionalRenderNV (will be remapped) */ + "ii\0" + "glBeginConditionalRenderNV\0" + "\0" + /* _mesa_function_pool[4105]: Color4ubVertex3fSUN (dynamic) */ "iiiifff\0" "glColor4ubVertex3fSUN\0" "\0" - /* _mesa_function_pool[4105]: FogCoordfEXT (will be remapped) */ + /* _mesa_function_pool[4136]: FogCoordfEXT (will be remapped) */ "f\0" "glFogCoordf\0" "glFogCoordfEXT\0" "\0" - /* _mesa_function_pool[4135]: PointSize (offset 173) */ + /* _mesa_function_pool[4166]: PointSize (offset 173) */ "f\0" "glPointSize\0" "\0" - /* _mesa_function_pool[4150]: TexCoord2fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[4181]: TexCoord2fVertex3fSUN (dynamic) */ "fffff\0" "glTexCoord2fVertex3fSUN\0" "\0" - /* _mesa_function_pool[4181]: PopName (offset 200) */ + /* _mesa_function_pool[4212]: PopName (offset 200) */ "\0" "glPopName\0" "\0" - /* _mesa_function_pool[4193]: GlobalAlphaFactoriSUN (dynamic) */ + /* _mesa_function_pool[4224]: GlobalAlphaFactoriSUN (dynamic) */ "i\0" "glGlobalAlphaFactoriSUN\0" "\0" - /* _mesa_function_pool[4220]: VertexAttrib2dNV (will be remapped) */ + /* _mesa_function_pool[4251]: VertexAttrib2dNV (will be remapped) */ "idd\0" "glVertexAttrib2dNV\0" "\0" - /* _mesa_function_pool[4244]: GetProgramInfoLog (will be remapped) */ + /* _mesa_function_pool[4275]: GetProgramInfoLog (will be remapped) */ "iipp\0" "glGetProgramInfoLog\0" "\0" - /* _mesa_function_pool[4270]: VertexAttrib4NbvARB (will be remapped) */ + /* _mesa_function_pool[4301]: VertexAttrib4NbvARB (will be remapped) */ "ip\0" "glVertexAttrib4Nbv\0" "glVertexAttrib4NbvARB\0" "\0" - /* _mesa_function_pool[4315]: GetActiveAttribARB (will be remapped) */ + /* _mesa_function_pool[4346]: GetActiveAttribARB (will be remapped) */ "iiipppp\0" "glGetActiveAttrib\0" "glGetActiveAttribARB\0" "\0" - /* _mesa_function_pool[4363]: Vertex4sv (offset 149) */ + /* _mesa_function_pool[4394]: Vertex4sv (offset 149) */ "p\0" "glVertex4sv\0" "\0" - /* _mesa_function_pool[4378]: VertexAttrib4ubNV (will be remapped) */ + /* _mesa_function_pool[4409]: VertexAttrib4ubNV (will be remapped) */ "iiiii\0" "glVertexAttrib4ubNV\0" "\0" - /* _mesa_function_pool[4405]: TextureRangeAPPLE (will be remapped) */ + /* _mesa_function_pool[4436]: TextureRangeAPPLE (will be remapped) */ "iip\0" "glTextureRangeAPPLE\0" "\0" - /* _mesa_function_pool[4430]: GetTexEnvfv (offset 276) */ + /* _mesa_function_pool[4461]: GetTexEnvfv (offset 276) */ "iip\0" "glGetTexEnvfv\0" "\0" - /* _mesa_function_pool[4449]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[4480]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */ "ffffffffffff\0" "glTexCoord2fColor4fNormal3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[4502]: Indexub (offset 315) */ + /* _mesa_function_pool[4533]: Indexub (offset 315) */ "i\0" "glIndexub\0" "\0" - /* _mesa_function_pool[4515]: TexEnvi (offset 186) */ + /* _mesa_function_pool[4546]: TexEnvi (offset 186) */ "iii\0" "glTexEnvi\0" "\0" - /* _mesa_function_pool[4530]: GetClipPlane (offset 259) */ + /* _mesa_function_pool[4561]: GetClipPlane (offset 259) */ "ip\0" "glGetClipPlane\0" "\0" - /* _mesa_function_pool[4549]: CombinerParameterfvNV (will be remapped) */ + /* _mesa_function_pool[4580]: CombinerParameterfvNV (will be remapped) */ "ip\0" "glCombinerParameterfvNV\0" "\0" - /* _mesa_function_pool[4577]: VertexAttribs3dvNV (will be remapped) */ + /* _mesa_function_pool[4608]: VertexAttribs3dvNV (will be remapped) */ "iip\0" "glVertexAttribs3dvNV\0" "\0" - /* _mesa_function_pool[4603]: VertexAttribs4fvNV (will be remapped) */ + /* _mesa_function_pool[4634]: VertexAttribs4fvNV (will be remapped) */ "iip\0" "glVertexAttribs4fvNV\0" "\0" - /* _mesa_function_pool[4629]: VertexArrayRangeNV (will be remapped) */ + /* _mesa_function_pool[4660]: VertexArrayRangeNV (will be remapped) */ "ip\0" "glVertexArrayRangeNV\0" "\0" - /* _mesa_function_pool[4654]: FragmentLightiSGIX (dynamic) */ + /* _mesa_function_pool[4685]: FragmentLightiSGIX (dynamic) */ "iii\0" "glFragmentLightiSGIX\0" "\0" - /* _mesa_function_pool[4680]: PolygonOffsetEXT (will be remapped) */ + /* _mesa_function_pool[4711]: PolygonOffsetEXT (will be remapped) */ "ff\0" "glPolygonOffsetEXT\0" "\0" - /* _mesa_function_pool[4703]: PollAsyncSGIX (dynamic) */ + /* _mesa_function_pool[4734]: PollAsyncSGIX (dynamic) */ "p\0" "glPollAsyncSGIX\0" "\0" - /* _mesa_function_pool[4722]: DeleteFragmentShaderATI (will be remapped) */ + /* _mesa_function_pool[4753]: DeleteFragmentShaderATI (will be remapped) */ "i\0" "glDeleteFragmentShaderATI\0" "\0" - /* _mesa_function_pool[4751]: Scaled (offset 301) */ + /* _mesa_function_pool[4782]: Scaled (offset 301) */ "ddd\0" "glScaled\0" "\0" - /* _mesa_function_pool[4765]: Scalef (offset 302) */ + /* _mesa_function_pool[4796]: Scalef (offset 302) */ "fff\0" "glScalef\0" "\0" - /* _mesa_function_pool[4779]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[4810]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */ "ppp\0" "glTexCoord2fNormal3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[4817]: MultTransposeMatrixdARB (will be remapped) */ + /* _mesa_function_pool[4848]: MultTransposeMatrixdARB (will be remapped) */ "p\0" "glMultTransposeMatrixd\0" "glMultTransposeMatrixdARB\0" "\0" - /* _mesa_function_pool[4869]: AlphaFunc (offset 240) */ + /* _mesa_function_pool[4900]: ObjectUnpurgeableAPPLE (will be remapped) */ + "iii\0" + "glObjectUnpurgeableAPPLE\0" + "\0" + /* _mesa_function_pool[4930]: AlphaFunc (offset 240) */ "if\0" "glAlphaFunc\0" "\0" - /* _mesa_function_pool[4885]: WindowPos2svMESA (will be remapped) */ + /* _mesa_function_pool[4946]: WindowPos2svMESA (will be remapped) */ "p\0" "glWindowPos2sv\0" "glWindowPos2svARB\0" "glWindowPos2svMESA\0" "\0" - /* _mesa_function_pool[4940]: EdgeFlag (offset 41) */ + /* _mesa_function_pool[5001]: EdgeFlag (offset 41) */ "i\0" "glEdgeFlag\0" "\0" - /* _mesa_function_pool[4954]: TexCoord2iv (offset 107) */ + /* _mesa_function_pool[5015]: TexCoord2iv (offset 107) */ "p\0" "glTexCoord2iv\0" "\0" - /* _mesa_function_pool[4971]: CompressedTexImage1DARB (will be remapped) */ + /* _mesa_function_pool[5032]: CompressedTexImage1DARB (will be remapped) */ "iiiiiip\0" "glCompressedTexImage1D\0" "glCompressedTexImage1DARB\0" "\0" - /* _mesa_function_pool[5029]: Rotated (offset 299) */ + /* _mesa_function_pool[5090]: Rotated (offset 299) */ "dddd\0" "glRotated\0" "\0" - /* _mesa_function_pool[5045]: VertexAttrib2sNV (will be remapped) */ + /* _mesa_function_pool[5106]: VertexAttrib2sNV (will be remapped) */ "iii\0" "glVertexAttrib2sNV\0" "\0" - /* _mesa_function_pool[5069]: ReadPixels (offset 256) */ + /* _mesa_function_pool[5130]: ReadPixels (offset 256) */ "iiiiiip\0" "glReadPixels\0" "\0" - /* _mesa_function_pool[5091]: EdgeFlagv (offset 42) */ + /* _mesa_function_pool[5152]: EdgeFlagv (offset 42) */ "p\0" "glEdgeFlagv\0" "\0" - /* _mesa_function_pool[5106]: NormalPointerListIBM (dynamic) */ + /* _mesa_function_pool[5167]: NormalPointerListIBM (dynamic) */ "iipi\0" "glNormalPointerListIBM\0" "\0" - /* _mesa_function_pool[5135]: IndexPointerEXT (will be remapped) */ + /* _mesa_function_pool[5196]: IndexPointerEXT (will be remapped) */ "iiip\0" "glIndexPointerEXT\0" "\0" - /* _mesa_function_pool[5159]: Color4iv (offset 32) */ + /* _mesa_function_pool[5220]: Color4iv (offset 32) */ "p\0" "glColor4iv\0" "\0" - /* _mesa_function_pool[5173]: TexParameterf (offset 178) */ + /* _mesa_function_pool[5234]: TexParameterf (offset 178) */ "iif\0" "glTexParameterf\0" "\0" - /* _mesa_function_pool[5194]: TexParameteri (offset 180) */ + /* _mesa_function_pool[5255]: TexParameteri (offset 180) */ "iii\0" "glTexParameteri\0" "\0" - /* _mesa_function_pool[5215]: NormalPointerEXT (will be remapped) */ + /* _mesa_function_pool[5276]: NormalPointerEXT (will be remapped) */ "iiip\0" "glNormalPointerEXT\0" "\0" - /* _mesa_function_pool[5240]: MultiTexCoord3dARB (offset 392) */ + /* _mesa_function_pool[5301]: MultiTexCoord3dARB (offset 392) */ "iddd\0" "glMultiTexCoord3d\0" "glMultiTexCoord3dARB\0" "\0" - /* _mesa_function_pool[5285]: MultiTexCoord2iARB (offset 388) */ + /* _mesa_function_pool[5346]: MultiTexCoord2iARB (offset 388) */ "iii\0" "glMultiTexCoord2i\0" "glMultiTexCoord2iARB\0" "\0" - /* _mesa_function_pool[5329]: DrawPixels (offset 257) */ + /* _mesa_function_pool[5390]: DrawPixels (offset 257) */ "iiiip\0" "glDrawPixels\0" "\0" - /* _mesa_function_pool[5349]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[5410]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */ "iffffffff\0" "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[5409]: MultiTexCoord2svARB (offset 391) */ + /* _mesa_function_pool[5470]: MultiTexCoord2svARB (offset 391) */ "ip\0" "glMultiTexCoord2sv\0" "glMultiTexCoord2svARB\0" "\0" - /* _mesa_function_pool[5454]: ReplacementCodeubvSUN (dynamic) */ + /* _mesa_function_pool[5515]: ReplacementCodeubvSUN (dynamic) */ "p\0" "glReplacementCodeubvSUN\0" "\0" - /* _mesa_function_pool[5481]: Uniform3iARB (will be remapped) */ + /* _mesa_function_pool[5542]: Uniform3iARB (will be remapped) */ "iiii\0" "glUniform3i\0" "glUniform3iARB\0" "\0" - /* _mesa_function_pool[5514]: GetFragmentMaterialfvSGIX (dynamic) */ + /* _mesa_function_pool[5575]: GetFragmentMaterialfvSGIX (dynamic) */ "iip\0" "glGetFragmentMaterialfvSGIX\0" "\0" - /* _mesa_function_pool[5547]: GetShaderInfoLog (will be remapped) */ + /* _mesa_function_pool[5608]: GetShaderInfoLog (will be remapped) */ "iipp\0" "glGetShaderInfoLog\0" "\0" - /* _mesa_function_pool[5572]: WeightivARB (dynamic) */ + /* _mesa_function_pool[5633]: WeightivARB (dynamic) */ "ip\0" "glWeightivARB\0" "\0" - /* _mesa_function_pool[5590]: PollInstrumentsSGIX (dynamic) */ + /* _mesa_function_pool[5651]: PollInstrumentsSGIX (dynamic) */ "p\0" "glPollInstrumentsSGIX\0" "\0" - /* _mesa_function_pool[5615]: GlobalAlphaFactordSUN (dynamic) */ + /* _mesa_function_pool[5676]: GlobalAlphaFactordSUN (dynamic) */ "d\0" "glGlobalAlphaFactordSUN\0" "\0" - /* _mesa_function_pool[5642]: GetFinalCombinerInputParameterfvNV (will be remapped) */ + /* _mesa_function_pool[5703]: GetFinalCombinerInputParameterfvNV (will be remapped) */ "iip\0" "glGetFinalCombinerInputParameterfvNV\0" "\0" - /* _mesa_function_pool[5684]: GenerateMipmapEXT (will be remapped) */ + /* _mesa_function_pool[5745]: GenerateMipmapEXT (will be remapped) */ "i\0" "glGenerateMipmap\0" "glGenerateMipmapEXT\0" "\0" - /* _mesa_function_pool[5724]: GenLists (offset 5) */ + /* _mesa_function_pool[5785]: GenLists (offset 5) */ "i\0" "glGenLists\0" "\0" - /* _mesa_function_pool[5738]: SetFragmentShaderConstantATI (will be remapped) */ + /* _mesa_function_pool[5799]: SetFragmentShaderConstantATI (will be remapped) */ "ip\0" "glSetFragmentShaderConstantATI\0" "\0" - /* _mesa_function_pool[5773]: GetMapAttribParameterivNV (dynamic) */ + /* _mesa_function_pool[5834]: GetMapAttribParameterivNV (dynamic) */ "iiip\0" "glGetMapAttribParameterivNV\0" "\0" - /* _mesa_function_pool[5807]: CreateShaderObjectARB (will be remapped) */ + /* _mesa_function_pool[5868]: CreateShaderObjectARB (will be remapped) */ "i\0" "glCreateShaderObjectARB\0" "\0" - /* _mesa_function_pool[5834]: GetSharpenTexFuncSGIS (dynamic) */ + /* _mesa_function_pool[5895]: GetSharpenTexFuncSGIS (dynamic) */ "ip\0" "glGetSharpenTexFuncSGIS\0" "\0" - /* _mesa_function_pool[5862]: BufferDataARB (will be remapped) */ + /* _mesa_function_pool[5923]: BufferDataARB (will be remapped) */ "iipi\0" "glBufferData\0" "glBufferDataARB\0" "\0" - /* _mesa_function_pool[5897]: FlushVertexArrayRangeNV (will be remapped) */ + /* _mesa_function_pool[5958]: FlushVertexArrayRangeNV (will be remapped) */ "\0" "glFlushVertexArrayRangeNV\0" "\0" - /* _mesa_function_pool[5925]: MapGrid2d (offset 226) */ + /* _mesa_function_pool[5986]: MapGrid2d (offset 226) */ "iddidd\0" "glMapGrid2d\0" "\0" - /* _mesa_function_pool[5945]: MapGrid2f (offset 227) */ + /* _mesa_function_pool[6006]: MapGrid2f (offset 227) */ "iffiff\0" "glMapGrid2f\0" "\0" - /* _mesa_function_pool[5965]: SampleMapATI (will be remapped) */ + /* _mesa_function_pool[6026]: SampleMapATI (will be remapped) */ "iii\0" "glSampleMapATI\0" "\0" - /* _mesa_function_pool[5985]: VertexPointerEXT (will be remapped) */ + /* _mesa_function_pool[6046]: VertexPointerEXT (will be remapped) */ "iiiip\0" "glVertexPointerEXT\0" "\0" - /* _mesa_function_pool[6011]: GetTexFilterFuncSGIS (dynamic) */ + /* _mesa_function_pool[6072]: GetTexFilterFuncSGIS (dynamic) */ "iip\0" "glGetTexFilterFuncSGIS\0" "\0" - /* _mesa_function_pool[6039]: Scissor (offset 176) */ + /* _mesa_function_pool[6100]: Scissor (offset 176) */ "iiii\0" "glScissor\0" "\0" - /* _mesa_function_pool[6055]: Fogf (offset 153) */ + /* _mesa_function_pool[6116]: Fogf (offset 153) */ "if\0" "glFogf\0" "\0" - /* _mesa_function_pool[6066]: GetCombinerOutputParameterfvNV (will be remapped) */ + /* _mesa_function_pool[6127]: GetCombinerOutputParameterfvNV (will be remapped) */ "iiip\0" "glGetCombinerOutputParameterfvNV\0" "\0" - /* _mesa_function_pool[6105]: TexSubImage1D (offset 332) */ + /* _mesa_function_pool[6166]: TexSubImage1D (offset 332) */ "iiiiiip\0" "glTexSubImage1D\0" "glTexSubImage1DEXT\0" "\0" - /* _mesa_function_pool[6149]: VertexAttrib1sARB (will be remapped) */ + /* _mesa_function_pool[6210]: VertexAttrib1sARB (will be remapped) */ "ii\0" "glVertexAttrib1s\0" "glVertexAttrib1sARB\0" "\0" - /* _mesa_function_pool[6190]: FenceSync (will be remapped) */ + /* _mesa_function_pool[6251]: FenceSync (will be remapped) */ "ii\0" "glFenceSync\0" "\0" - /* _mesa_function_pool[6206]: Color4usv (offset 40) */ + /* _mesa_function_pool[6267]: Color4usv (offset 40) */ "p\0" "glColor4usv\0" "\0" - /* _mesa_function_pool[6221]: Fogi (offset 155) */ + /* _mesa_function_pool[6282]: Fogi (offset 155) */ "ii\0" "glFogi\0" "\0" - /* _mesa_function_pool[6232]: DepthRange (offset 288) */ + /* _mesa_function_pool[6293]: DepthRange (offset 288) */ "dd\0" "glDepthRange\0" "\0" - /* _mesa_function_pool[6249]: RasterPos3iv (offset 75) */ + /* _mesa_function_pool[6310]: RasterPos3iv (offset 75) */ "p\0" "glRasterPos3iv\0" "\0" - /* _mesa_function_pool[6267]: FinalCombinerInputNV (will be remapped) */ + /* _mesa_function_pool[6328]: FinalCombinerInputNV (will be remapped) */ "iiii\0" "glFinalCombinerInputNV\0" "\0" - /* _mesa_function_pool[6296]: TexCoord2i (offset 106) */ + /* _mesa_function_pool[6357]: TexCoord2i (offset 106) */ "ii\0" "glTexCoord2i\0" "\0" - /* _mesa_function_pool[6313]: PixelMapfv (offset 251) */ + /* _mesa_function_pool[6374]: PixelMapfv (offset 251) */ "iip\0" "glPixelMapfv\0" "\0" - /* _mesa_function_pool[6331]: Color4ui (offset 37) */ + /* _mesa_function_pool[6392]: Color4ui (offset 37) */ "iiii\0" "glColor4ui\0" "\0" - /* _mesa_function_pool[6348]: RasterPos3s (offset 76) */ + /* _mesa_function_pool[6409]: RasterPos3s (offset 76) */ "iii\0" "glRasterPos3s\0" "\0" - /* _mesa_function_pool[6367]: Color3usv (offset 24) */ + /* _mesa_function_pool[6428]: Color3usv (offset 24) */ "p\0" "glColor3usv\0" "\0" - /* _mesa_function_pool[6382]: FlushRasterSGIX (dynamic) */ + /* _mesa_function_pool[6443]: FlushRasterSGIX (dynamic) */ "\0" "glFlushRasterSGIX\0" "\0" - /* _mesa_function_pool[6402]: TexCoord2f (offset 104) */ + /* _mesa_function_pool[6463]: TexCoord2f (offset 104) */ "ff\0" "glTexCoord2f\0" "\0" - /* _mesa_function_pool[6419]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[6480]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */ "ifffff\0" "glReplacementCodeuiTexCoord2fVertex3fSUN\0" "\0" - /* _mesa_function_pool[6468]: TexCoord2d (offset 102) */ + /* _mesa_function_pool[6529]: TexCoord2d (offset 102) */ "dd\0" "glTexCoord2d\0" "\0" - /* _mesa_function_pool[6485]: RasterPos3d (offset 70) */ + /* _mesa_function_pool[6546]: RasterPos3d (offset 70) */ "ddd\0" "glRasterPos3d\0" "\0" - /* _mesa_function_pool[6504]: RasterPos3f (offset 72) */ + /* _mesa_function_pool[6565]: RasterPos3f (offset 72) */ "fff\0" "glRasterPos3f\0" "\0" - /* _mesa_function_pool[6523]: Uniform1fARB (will be remapped) */ + /* _mesa_function_pool[6584]: Uniform1fARB (will be remapped) */ "if\0" "glUniform1f\0" "glUniform1fARB\0" "\0" - /* _mesa_function_pool[6554]: AreTexturesResident (offset 322) */ + /* _mesa_function_pool[6615]: AreTexturesResident (offset 322) */ "ipp\0" "glAreTexturesResident\0" "glAreTexturesResidentEXT\0" "\0" - /* _mesa_function_pool[6606]: TexCoord2s (offset 108) */ + /* _mesa_function_pool[6667]: TexCoord2s (offset 108) */ "ii\0" "glTexCoord2s\0" "\0" - /* _mesa_function_pool[6623]: StencilOpSeparate (will be remapped) */ + /* _mesa_function_pool[6684]: StencilOpSeparate (will be remapped) */ "iiii\0" "glStencilOpSeparate\0" "glStencilOpSeparateATI\0" "\0" - /* _mesa_function_pool[6672]: ColorTableParameteriv (offset 341) */ + /* _mesa_function_pool[6733]: ColorTableParameteriv (offset 341) */ "iip\0" "glColorTableParameteriv\0" "glColorTableParameterivSGI\0" "\0" - /* _mesa_function_pool[6728]: FogCoordPointerListIBM (dynamic) */ + /* _mesa_function_pool[6789]: FogCoordPointerListIBM (dynamic) */ "iipi\0" "glFogCoordPointerListIBM\0" "\0" - /* _mesa_function_pool[6759]: WindowPos3dMESA (will be remapped) */ + /* _mesa_function_pool[6820]: WindowPos3dMESA (will be remapped) */ "ddd\0" "glWindowPos3d\0" "glWindowPos3dARB\0" "glWindowPos3dMESA\0" "\0" - /* _mesa_function_pool[6813]: Color4us (offset 39) */ + /* _mesa_function_pool[6874]: Color4us (offset 39) */ "iiii\0" "glColor4us\0" "\0" - /* _mesa_function_pool[6830]: PointParameterfvEXT (will be remapped) */ + /* _mesa_function_pool[6891]: PointParameterfvEXT (will be remapped) */ "ip\0" "glPointParameterfv\0" "glPointParameterfvARB\0" "glPointParameterfvEXT\0" "glPointParameterfvSGIS\0" "\0" - /* _mesa_function_pool[6920]: Color3bv (offset 10) */ + /* _mesa_function_pool[6981]: Color3bv (offset 10) */ "p\0" "glColor3bv\0" "\0" - /* _mesa_function_pool[6934]: WindowPos2fvMESA (will be remapped) */ + /* _mesa_function_pool[6995]: WindowPos2fvMESA (will be remapped) */ "p\0" "glWindowPos2fv\0" "glWindowPos2fvARB\0" "glWindowPos2fvMESA\0" "\0" - /* _mesa_function_pool[6989]: SecondaryColor3bvEXT (will be remapped) */ + /* _mesa_function_pool[7050]: SecondaryColor3bvEXT (will be remapped) */ "p\0" "glSecondaryColor3bv\0" "glSecondaryColor3bvEXT\0" "\0" - /* _mesa_function_pool[7035]: VertexPointerListIBM (dynamic) */ + /* _mesa_function_pool[7096]: VertexPointerListIBM (dynamic) */ "iiipi\0" "glVertexPointerListIBM\0" "\0" - /* _mesa_function_pool[7065]: GetProgramLocalParameterfvARB (will be remapped) */ + /* _mesa_function_pool[7126]: GetProgramLocalParameterfvARB (will be remapped) */ "iip\0" "glGetProgramLocalParameterfvARB\0" "\0" - /* _mesa_function_pool[7102]: FragmentMaterialfSGIX (dynamic) */ + /* _mesa_function_pool[7163]: FragmentMaterialfSGIX (dynamic) */ "iif\0" "glFragmentMaterialfSGIX\0" "\0" - /* _mesa_function_pool[7131]: TexCoord2fNormal3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[7192]: TexCoord2fNormal3fVertex3fSUN (dynamic) */ "ffffffff\0" "glTexCoord2fNormal3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[7173]: RenderbufferStorageEXT (will be remapped) */ + /* _mesa_function_pool[7234]: RenderbufferStorageEXT (will be remapped) */ "iiii\0" "glRenderbufferStorage\0" "glRenderbufferStorageEXT\0" "\0" - /* _mesa_function_pool[7226]: IsFenceNV (will be remapped) */ + /* _mesa_function_pool[7287]: IsFenceNV (will be remapped) */ "i\0" "glIsFenceNV\0" "\0" - /* _mesa_function_pool[7241]: AttachObjectARB (will be remapped) */ + /* _mesa_function_pool[7302]: AttachObjectARB (will be remapped) */ "ii\0" "glAttachObjectARB\0" "\0" - /* _mesa_function_pool[7263]: GetFragmentLightivSGIX (dynamic) */ + /* _mesa_function_pool[7324]: GetFragmentLightivSGIX (dynamic) */ "iip\0" "glGetFragmentLightivSGIX\0" "\0" - /* _mesa_function_pool[7293]: UniformMatrix2fvARB (will be remapped) */ + /* _mesa_function_pool[7354]: UniformMatrix2fvARB (will be remapped) */ "iiip\0" "glUniformMatrix2fv\0" "glUniformMatrix2fvARB\0" "\0" - /* _mesa_function_pool[7340]: MultiTexCoord2fARB (offset 386) */ + /* _mesa_function_pool[7401]: MultiTexCoord2fARB (offset 386) */ "iff\0" "glMultiTexCoord2f\0" "glMultiTexCoord2fARB\0" "\0" - /* _mesa_function_pool[7384]: ColorTable (offset 339) */ + /* _mesa_function_pool[7445]: ColorTable (offset 339) */ "iiiiip\0" "glColorTable\0" "glColorTableSGI\0" "glColorTableEXT\0" "\0" - /* _mesa_function_pool[7437]: IndexPointer (offset 314) */ + /* _mesa_function_pool[7498]: IndexPointer (offset 314) */ "iip\0" "glIndexPointer\0" "\0" - /* _mesa_function_pool[7457]: Accum (offset 213) */ + /* _mesa_function_pool[7518]: Accum (offset 213) */ "if\0" "glAccum\0" "\0" - /* _mesa_function_pool[7469]: GetTexImage (offset 281) */ + /* _mesa_function_pool[7530]: GetTexImage (offset 281) */ "iiiip\0" "glGetTexImage\0" "\0" - /* _mesa_function_pool[7490]: MapControlPointsNV (dynamic) */ + /* _mesa_function_pool[7551]: MapControlPointsNV (dynamic) */ "iiiiiiiip\0" "glMapControlPointsNV\0" "\0" - /* _mesa_function_pool[7522]: ConvolutionFilter2D (offset 349) */ + /* _mesa_function_pool[7583]: ConvolutionFilter2D (offset 349) */ "iiiiiip\0" "glConvolutionFilter2D\0" "glConvolutionFilter2DEXT\0" "\0" - /* _mesa_function_pool[7578]: Finish (offset 216) */ + /* _mesa_function_pool[7639]: Finish (offset 216) */ "\0" "glFinish\0" "\0" - /* _mesa_function_pool[7589]: MapParameterfvNV (dynamic) */ + /* _mesa_function_pool[7650]: MapParameterfvNV (dynamic) */ "iip\0" "glMapParameterfvNV\0" "\0" - /* _mesa_function_pool[7613]: ClearStencil (offset 207) */ + /* _mesa_function_pool[7674]: ClearStencil (offset 207) */ "i\0" "glClearStencil\0" "\0" - /* _mesa_function_pool[7631]: VertexAttrib3dvARB (will be remapped) */ + /* _mesa_function_pool[7692]: VertexAttrib3dvARB (will be remapped) */ "ip\0" "glVertexAttrib3dv\0" "glVertexAttrib3dvARB\0" "\0" - /* _mesa_function_pool[7674]: HintPGI (dynamic) */ + /* _mesa_function_pool[7735]: HintPGI (dynamic) */ "ii\0" "glHintPGI\0" "\0" - /* _mesa_function_pool[7688]: ConvolutionParameteriv (offset 353) */ + /* _mesa_function_pool[7749]: ConvolutionParameteriv (offset 353) */ "iip\0" "glConvolutionParameteriv\0" "glConvolutionParameterivEXT\0" "\0" - /* _mesa_function_pool[7746]: Color4s (offset 33) */ + /* _mesa_function_pool[7807]: Color4s (offset 33) */ "iiii\0" "glColor4s\0" "\0" - /* _mesa_function_pool[7762]: InterleavedArrays (offset 317) */ + /* _mesa_function_pool[7823]: InterleavedArrays (offset 317) */ "iip\0" "glInterleavedArrays\0" "\0" - /* _mesa_function_pool[7787]: RasterPos2fv (offset 65) */ + /* _mesa_function_pool[7848]: RasterPos2fv (offset 65) */ "p\0" "glRasterPos2fv\0" "\0" - /* _mesa_function_pool[7805]: TexCoord1fv (offset 97) */ + /* _mesa_function_pool[7866]: TexCoord1fv (offset 97) */ "p\0" "glTexCoord1fv\0" "\0" - /* _mesa_function_pool[7822]: Vertex2d (offset 126) */ + /* _mesa_function_pool[7883]: Vertex2d (offset 126) */ "dd\0" "glVertex2d\0" "\0" - /* _mesa_function_pool[7837]: CullParameterdvEXT (will be remapped) */ + /* _mesa_function_pool[7898]: CullParameterdvEXT (will be remapped) */ "ip\0" "glCullParameterdvEXT\0" "\0" - /* _mesa_function_pool[7862]: ProgramNamedParameter4fNV (will be remapped) */ + /* _mesa_function_pool[7923]: ProgramNamedParameter4fNV (will be remapped) */ "iipffff\0" "glProgramNamedParameter4fNV\0" "\0" - /* _mesa_function_pool[7899]: Color3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[7960]: Color3fVertex3fSUN (dynamic) */ "ffffff\0" "glColor3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[7928]: ProgramEnvParameter4fvARB (will be remapped) */ + /* _mesa_function_pool[7989]: ProgramEnvParameter4fvARB (will be remapped) */ "iip\0" "glProgramEnvParameter4fvARB\0" "glProgramParameter4fvNV\0" "\0" - /* _mesa_function_pool[7985]: Color4i (offset 31) */ + /* _mesa_function_pool[8046]: Color4i (offset 31) */ "iiii\0" "glColor4i\0" "\0" - /* _mesa_function_pool[8001]: Color4f (offset 29) */ + /* _mesa_function_pool[8062]: Color4f (offset 29) */ "ffff\0" "glColor4f\0" "\0" - /* _mesa_function_pool[8017]: RasterPos4fv (offset 81) */ + /* _mesa_function_pool[8078]: RasterPos4fv (offset 81) */ "p\0" "glRasterPos4fv\0" "\0" - /* _mesa_function_pool[8035]: Color4d (offset 27) */ + /* _mesa_function_pool[8096]: Color4d (offset 27) */ "dddd\0" "glColor4d\0" "\0" - /* _mesa_function_pool[8051]: ClearIndex (offset 205) */ + /* _mesa_function_pool[8112]: ClearIndex (offset 205) */ "f\0" "glClearIndex\0" "\0" - /* _mesa_function_pool[8067]: Color4b (offset 25) */ + /* _mesa_function_pool[8128]: Color4b (offset 25) */ "iiii\0" "glColor4b\0" "\0" - /* _mesa_function_pool[8083]: LoadMatrixd (offset 292) */ + /* _mesa_function_pool[8144]: LoadMatrixd (offset 292) */ "p\0" "glLoadMatrixd\0" "\0" - /* _mesa_function_pool[8100]: FragmentLightModeliSGIX (dynamic) */ + /* _mesa_function_pool[8161]: FragmentLightModeliSGIX (dynamic) */ "ii\0" "glFragmentLightModeliSGIX\0" "\0" - /* _mesa_function_pool[8130]: RasterPos2dv (offset 63) */ + /* _mesa_function_pool[8191]: RasterPos2dv (offset 63) */ "p\0" "glRasterPos2dv\0" "\0" - /* _mesa_function_pool[8148]: ConvolutionParameterfv (offset 351) */ + /* _mesa_function_pool[8209]: ConvolutionParameterfv (offset 351) */ "iip\0" "glConvolutionParameterfv\0" "glConvolutionParameterfvEXT\0" "\0" - /* _mesa_function_pool[8206]: TbufferMask3DFX (dynamic) */ + /* _mesa_function_pool[8267]: TbufferMask3DFX (dynamic) */ "i\0" "glTbufferMask3DFX\0" "\0" - /* _mesa_function_pool[8227]: GetTexGendv (offset 278) */ + /* _mesa_function_pool[8288]: GetTexGendv (offset 278) */ "iip\0" "glGetTexGendv\0" "\0" - /* _mesa_function_pool[8246]: LoadProgramNV (will be remapped) */ + /* _mesa_function_pool[8307]: ColorMaskIndexedEXT (will be remapped) */ + "iiiii\0" + "glColorMaskIndexedEXT\0" + "\0" + /* _mesa_function_pool[8336]: LoadProgramNV (will be remapped) */ "iiip\0" "glLoadProgramNV\0" "\0" - /* _mesa_function_pool[8268]: WaitSync (will be remapped) */ + /* _mesa_function_pool[8358]: WaitSync (will be remapped) */ "iii\0" "glWaitSync\0" "\0" - /* _mesa_function_pool[8284]: EndList (offset 1) */ + /* _mesa_function_pool[8374]: EndList (offset 1) */ "\0" "glEndList\0" "\0" - /* _mesa_function_pool[8296]: VertexAttrib4fvNV (will be remapped) */ + /* _mesa_function_pool[8386]: VertexAttrib4fvNV (will be remapped) */ "ip\0" "glVertexAttrib4fvNV\0" "\0" - /* _mesa_function_pool[8320]: GetAttachedObjectsARB (will be remapped) */ + /* _mesa_function_pool[8410]: GetAttachedObjectsARB (will be remapped) */ "iipp\0" "glGetAttachedObjectsARB\0" "\0" - /* _mesa_function_pool[8350]: Uniform3fvARB (will be remapped) */ + /* _mesa_function_pool[8440]: Uniform3fvARB (will be remapped) */ "iip\0" "glUniform3fv\0" "glUniform3fvARB\0" "\0" - /* _mesa_function_pool[8384]: EvalCoord1fv (offset 231) */ + /* _mesa_function_pool[8474]: EvalCoord1fv (offset 231) */ "p\0" "glEvalCoord1fv\0" "\0" - /* _mesa_function_pool[8402]: DrawRangeElements (offset 338) */ + /* _mesa_function_pool[8492]: DrawRangeElements (offset 338) */ "iiiiip\0" "glDrawRangeElements\0" "glDrawRangeElementsEXT\0" "\0" - /* _mesa_function_pool[8453]: EvalMesh2 (offset 238) */ + /* _mesa_function_pool[8543]: EvalMesh2 (offset 238) */ "iiiii\0" "glEvalMesh2\0" "\0" - /* _mesa_function_pool[8472]: Vertex4fv (offset 145) */ + /* _mesa_function_pool[8562]: Vertex4fv (offset 145) */ "p\0" "glVertex4fv\0" "\0" - /* _mesa_function_pool[8487]: SpriteParameterfvSGIX (dynamic) */ + /* _mesa_function_pool[8577]: SpriteParameterfvSGIX (dynamic) */ "ip\0" "glSpriteParameterfvSGIX\0" "\0" - /* _mesa_function_pool[8515]: CheckFramebufferStatusEXT (will be remapped) */ + /* _mesa_function_pool[8605]: CheckFramebufferStatusEXT (will be remapped) */ "i\0" "glCheckFramebufferStatus\0" "glCheckFramebufferStatusEXT\0" "\0" - /* _mesa_function_pool[8571]: GlobalAlphaFactoruiSUN (dynamic) */ + /* _mesa_function_pool[8661]: GlobalAlphaFactoruiSUN (dynamic) */ "i\0" "glGlobalAlphaFactoruiSUN\0" "\0" - /* _mesa_function_pool[8599]: GetHandleARB (will be remapped) */ + /* _mesa_function_pool[8689]: GetHandleARB (will be remapped) */ "i\0" "glGetHandleARB\0" "\0" - /* _mesa_function_pool[8617]: GetVertexAttribivARB (will be remapped) */ + /* _mesa_function_pool[8707]: GetVertexAttribivARB (will be remapped) */ "iip\0" "glGetVertexAttribiv\0" "glGetVertexAttribivARB\0" "\0" - /* _mesa_function_pool[8665]: GetCombinerInputParameterfvNV (will be remapped) */ + /* _mesa_function_pool[8755]: GetCombinerInputParameterfvNV (will be remapped) */ "iiiip\0" "glGetCombinerInputParameterfvNV\0" "\0" - /* _mesa_function_pool[8704]: CreateProgram (will be remapped) */ + /* _mesa_function_pool[8794]: CreateProgram (will be remapped) */ "\0" "glCreateProgram\0" "\0" - /* _mesa_function_pool[8722]: LoadTransposeMatrixdARB (will be remapped) */ + /* _mesa_function_pool[8812]: LoadTransposeMatrixdARB (will be remapped) */ "p\0" "glLoadTransposeMatrixd\0" "glLoadTransposeMatrixdARB\0" "\0" - /* _mesa_function_pool[8774]: GetMinmax (offset 364) */ + /* _mesa_function_pool[8864]: GetMinmax (offset 364) */ "iiiip\0" "glGetMinmax\0" "glGetMinmaxEXT\0" "\0" - /* _mesa_function_pool[8808]: StencilFuncSeparate (will be remapped) */ + /* _mesa_function_pool[8898]: StencilFuncSeparate (will be remapped) */ "iiii\0" "glStencilFuncSeparate\0" "\0" - /* _mesa_function_pool[8836]: SecondaryColor3sEXT (will be remapped) */ + /* _mesa_function_pool[8926]: SecondaryColor3sEXT (will be remapped) */ "iii\0" "glSecondaryColor3s\0" "glSecondaryColor3sEXT\0" "\0" - /* _mesa_function_pool[8882]: Color3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[8972]: Color3fVertex3fvSUN (dynamic) */ "pp\0" "glColor3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[8908]: Normal3fv (offset 57) */ + /* _mesa_function_pool[8998]: Normal3fv (offset 57) */ "p\0" "glNormal3fv\0" "\0" - /* _mesa_function_pool[8923]: GlobalAlphaFactorbSUN (dynamic) */ + /* _mesa_function_pool[9013]: GlobalAlphaFactorbSUN (dynamic) */ "i\0" "glGlobalAlphaFactorbSUN\0" "\0" - /* _mesa_function_pool[8950]: Color3us (offset 23) */ + /* _mesa_function_pool[9040]: Color3us (offset 23) */ "iii\0" "glColor3us\0" "\0" - /* _mesa_function_pool[8966]: ImageTransformParameterfvHP (dynamic) */ + /* _mesa_function_pool[9056]: ImageTransformParameterfvHP (dynamic) */ "iip\0" "glImageTransformParameterfvHP\0" "\0" - /* _mesa_function_pool[9001]: VertexAttrib4ivARB (will be remapped) */ + /* _mesa_function_pool[9091]: VertexAttrib4ivARB (will be remapped) */ "ip\0" "glVertexAttrib4iv\0" "glVertexAttrib4ivARB\0" "\0" - /* _mesa_function_pool[9044]: End (offset 43) */ + /* _mesa_function_pool[9134]: End (offset 43) */ "\0" "glEnd\0" "\0" - /* _mesa_function_pool[9052]: VertexAttrib3fNV (will be remapped) */ + /* _mesa_function_pool[9142]: VertexAttrib3fNV (will be remapped) */ "ifff\0" "glVertexAttrib3fNV\0" "\0" - /* _mesa_function_pool[9077]: VertexAttribs2dvNV (will be remapped) */ + /* _mesa_function_pool[9167]: VertexAttribs2dvNV (will be remapped) */ "iip\0" "glVertexAttribs2dvNV\0" "\0" - /* _mesa_function_pool[9103]: GetQueryObjectui64vEXT (will be remapped) */ + /* _mesa_function_pool[9193]: GetQueryObjectui64vEXT (will be remapped) */ "iip\0" "glGetQueryObjectui64vEXT\0" "\0" - /* _mesa_function_pool[9133]: MultiTexCoord3fvARB (offset 395) */ + /* _mesa_function_pool[9223]: MultiTexCoord3fvARB (offset 395) */ "ip\0" "glMultiTexCoord3fv\0" "glMultiTexCoord3fvARB\0" "\0" - /* _mesa_function_pool[9178]: SecondaryColor3dEXT (will be remapped) */ + /* _mesa_function_pool[9268]: SecondaryColor3dEXT (will be remapped) */ "ddd\0" "glSecondaryColor3d\0" "glSecondaryColor3dEXT\0" "\0" - /* _mesa_function_pool[9224]: Color3ub (offset 19) */ + /* _mesa_function_pool[9314]: Color3ub (offset 19) */ "iii\0" "glColor3ub\0" "\0" - /* _mesa_function_pool[9240]: GetProgramParameterfvNV (will be remapped) */ + /* _mesa_function_pool[9330]: GetProgramParameterfvNV (will be remapped) */ "iiip\0" "glGetProgramParameterfvNV\0" "\0" - /* _mesa_function_pool[9272]: TangentPointerEXT (dynamic) */ + /* _mesa_function_pool[9362]: TangentPointerEXT (dynamic) */ "iip\0" "glTangentPointerEXT\0" "\0" - /* _mesa_function_pool[9297]: Color4fNormal3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[9387]: Color4fNormal3fVertex3fvSUN (dynamic) */ "ppp\0" "glColor4fNormal3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[9332]: GetInstrumentsSGIX (dynamic) */ + /* _mesa_function_pool[9422]: GetInstrumentsSGIX (dynamic) */ "\0" "glGetInstrumentsSGIX\0" "\0" - /* _mesa_function_pool[9355]: Color3ui (offset 21) */ + /* _mesa_function_pool[9445]: Color3ui (offset 21) */ "iii\0" "glColor3ui\0" "\0" - /* _mesa_function_pool[9371]: EvalMapsNV (dynamic) */ + /* _mesa_function_pool[9461]: EvalMapsNV (dynamic) */ "ii\0" "glEvalMapsNV\0" "\0" - /* _mesa_function_pool[9388]: TexSubImage2D (offset 333) */ + /* _mesa_function_pool[9478]: TexSubImage2D (offset 333) */ "iiiiiiiip\0" "glTexSubImage2D\0" "glTexSubImage2DEXT\0" "\0" - /* _mesa_function_pool[9434]: FragmentLightivSGIX (dynamic) */ + /* _mesa_function_pool[9524]: FragmentLightivSGIX (dynamic) */ "iip\0" "glFragmentLightivSGIX\0" "\0" - /* _mesa_function_pool[9461]: GetTexParameterPointervAPPLE (will be remapped) */ + /* _mesa_function_pool[9551]: GetTexParameterPointervAPPLE (will be remapped) */ "iip\0" "glGetTexParameterPointervAPPLE\0" "\0" - /* _mesa_function_pool[9497]: TexGenfv (offset 191) */ + /* _mesa_function_pool[9587]: TexGenfv (offset 191) */ "iip\0" "glTexGenfv\0" "\0" - /* _mesa_function_pool[9513]: PixelTransformParameterfvEXT (dynamic) */ + /* _mesa_function_pool[9603]: PixelTransformParameterfvEXT (dynamic) */ "iip\0" "glPixelTransformParameterfvEXT\0" "\0" - /* _mesa_function_pool[9549]: VertexAttrib4bvARB (will be remapped) */ + /* _mesa_function_pool[9639]: VertexAttrib4bvARB (will be remapped) */ "ip\0" "glVertexAttrib4bv\0" "glVertexAttrib4bvARB\0" "\0" - /* _mesa_function_pool[9592]: AlphaFragmentOp2ATI (will be remapped) */ + /* _mesa_function_pool[9682]: AlphaFragmentOp2ATI (will be remapped) */ "iiiiiiiii\0" "glAlphaFragmentOp2ATI\0" "\0" - /* _mesa_function_pool[9625]: MultiTexCoord4sARB (offset 406) */ + /* _mesa_function_pool[9715]: GetIntegerIndexedvEXT (will be remapped) */ + "iip\0" + "glGetIntegerIndexedvEXT\0" + "\0" + /* _mesa_function_pool[9744]: MultiTexCoord4sARB (offset 406) */ "iiiii\0" "glMultiTexCoord4s\0" "glMultiTexCoord4sARB\0" "\0" - /* _mesa_function_pool[9671]: GetFragmentMaterialivSGIX (dynamic) */ + /* _mesa_function_pool[9790]: GetFragmentMaterialivSGIX (dynamic) */ "iip\0" "glGetFragmentMaterialivSGIX\0" "\0" - /* _mesa_function_pool[9704]: WindowPos4dMESA (will be remapped) */ + /* _mesa_function_pool[9823]: WindowPos4dMESA (will be remapped) */ "dddd\0" "glWindowPos4dMESA\0" "\0" - /* _mesa_function_pool[9728]: WeightPointerARB (dynamic) */ + /* _mesa_function_pool[9847]: WeightPointerARB (dynamic) */ "iiip\0" "glWeightPointerARB\0" "\0" - /* _mesa_function_pool[9753]: WindowPos2dMESA (will be remapped) */ + /* _mesa_function_pool[9872]: WindowPos2dMESA (will be remapped) */ "dd\0" "glWindowPos2d\0" "glWindowPos2dARB\0" "glWindowPos2dMESA\0" "\0" - /* _mesa_function_pool[9806]: FramebufferTexture3DEXT (will be remapped) */ + /* _mesa_function_pool[9925]: FramebufferTexture3DEXT (will be remapped) */ "iiiiii\0" "glFramebufferTexture3D\0" "glFramebufferTexture3DEXT\0" "\0" - /* _mesa_function_pool[9863]: BlendEquation (offset 337) */ + /* _mesa_function_pool[9982]: BlendEquation (offset 337) */ "i\0" "glBlendEquation\0" "glBlendEquationEXT\0" "\0" - /* _mesa_function_pool[9901]: VertexAttrib3dNV (will be remapped) */ + /* _mesa_function_pool[10020]: VertexAttrib3dNV (will be remapped) */ "iddd\0" "glVertexAttrib3dNV\0" "\0" - /* _mesa_function_pool[9926]: VertexAttrib3dARB (will be remapped) */ + /* _mesa_function_pool[10045]: VertexAttrib3dARB (will be remapped) */ "iddd\0" "glVertexAttrib3d\0" "glVertexAttrib3dARB\0" "\0" - /* _mesa_function_pool[9969]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[10088]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */ "ppppp\0" "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[10033]: VertexAttrib4fARB (will be remapped) */ + /* _mesa_function_pool[10152]: VertexAttrib4fARB (will be remapped) */ "iffff\0" "glVertexAttrib4f\0" "glVertexAttrib4fARB\0" "\0" - /* _mesa_function_pool[10077]: GetError (offset 261) */ + /* _mesa_function_pool[10196]: GetError (offset 261) */ "\0" "glGetError\0" "\0" - /* _mesa_function_pool[10090]: IndexFuncEXT (dynamic) */ + /* _mesa_function_pool[10209]: IndexFuncEXT (dynamic) */ "if\0" "glIndexFuncEXT\0" "\0" - /* _mesa_function_pool[10109]: TexCoord3dv (offset 111) */ + /* _mesa_function_pool[10228]: TexCoord3dv (offset 111) */ "p\0" "glTexCoord3dv\0" "\0" - /* _mesa_function_pool[10126]: Indexdv (offset 45) */ + /* _mesa_function_pool[10245]: Indexdv (offset 45) */ "p\0" "glIndexdv\0" "\0" - /* _mesa_function_pool[10139]: FramebufferTexture2DEXT (will be remapped) */ + /* _mesa_function_pool[10258]: FramebufferTexture2DEXT (will be remapped) */ "iiiii\0" "glFramebufferTexture2D\0" "glFramebufferTexture2DEXT\0" "\0" - /* _mesa_function_pool[10195]: Normal3s (offset 60) */ + /* _mesa_function_pool[10314]: Normal3s (offset 60) */ "iii\0" "glNormal3s\0" "\0" - /* _mesa_function_pool[10211]: PushName (offset 201) */ + /* _mesa_function_pool[10330]: GetObjectParameterivAPPLE (will be remapped) */ + "iiip\0" + "glGetObjectParameterivAPPLE\0" + "\0" + /* _mesa_function_pool[10364]: PushName (offset 201) */ "i\0" "glPushName\0" "\0" - /* _mesa_function_pool[10225]: MultiTexCoord2dvARB (offset 385) */ + /* _mesa_function_pool[10378]: MultiTexCoord2dvARB (offset 385) */ "ip\0" "glMultiTexCoord2dv\0" "glMultiTexCoord2dvARB\0" "\0" - /* _mesa_function_pool[10270]: CullParameterfvEXT (will be remapped) */ + /* _mesa_function_pool[10423]: CullParameterfvEXT (will be remapped) */ "ip\0" "glCullParameterfvEXT\0" "\0" - /* _mesa_function_pool[10295]: Normal3i (offset 58) */ + /* _mesa_function_pool[10448]: Normal3i (offset 58) */ "iii\0" "glNormal3i\0" "\0" - /* _mesa_function_pool[10311]: ProgramNamedParameter4fvNV (will be remapped) */ + /* _mesa_function_pool[10464]: ProgramNamedParameter4fvNV (will be remapped) */ "iipp\0" "glProgramNamedParameter4fvNV\0" "\0" - /* _mesa_function_pool[10346]: SecondaryColorPointerEXT (will be remapped) */ + /* _mesa_function_pool[10499]: SecondaryColorPointerEXT (will be remapped) */ "iiip\0" "glSecondaryColorPointer\0" "glSecondaryColorPointerEXT\0" "\0" - /* _mesa_function_pool[10403]: VertexAttrib4fvARB (will be remapped) */ + /* _mesa_function_pool[10556]: VertexAttrib4fvARB (will be remapped) */ "ip\0" "glVertexAttrib4fv\0" "glVertexAttrib4fvARB\0" "\0" - /* _mesa_function_pool[10446]: ColorPointerListIBM (dynamic) */ + /* _mesa_function_pool[10599]: ColorPointerListIBM (dynamic) */ "iiipi\0" "glColorPointerListIBM\0" "\0" - /* _mesa_function_pool[10475]: GetActiveUniformARB (will be remapped) */ + /* _mesa_function_pool[10628]: GetActiveUniformARB (will be remapped) */ "iiipppp\0" "glGetActiveUniform\0" "glGetActiveUniformARB\0" "\0" - /* _mesa_function_pool[10525]: ImageTransformParameteriHP (dynamic) */ + /* _mesa_function_pool[10678]: ImageTransformParameteriHP (dynamic) */ "iii\0" "glImageTransformParameteriHP\0" "\0" - /* _mesa_function_pool[10559]: Normal3b (offset 52) */ + /* _mesa_function_pool[10712]: Normal3b (offset 52) */ "iii\0" "glNormal3b\0" "\0" - /* _mesa_function_pool[10575]: Normal3d (offset 54) */ + /* _mesa_function_pool[10728]: Normal3d (offset 54) */ "ddd\0" "glNormal3d\0" "\0" - /* _mesa_function_pool[10591]: Normal3f (offset 56) */ + /* _mesa_function_pool[10744]: Normal3f (offset 56) */ "fff\0" "glNormal3f\0" "\0" - /* _mesa_function_pool[10607]: MultiTexCoord1svARB (offset 383) */ + /* _mesa_function_pool[10760]: MultiTexCoord1svARB (offset 383) */ "ip\0" "glMultiTexCoord1sv\0" "glMultiTexCoord1svARB\0" "\0" - /* _mesa_function_pool[10652]: Indexi (offset 48) */ + /* _mesa_function_pool[10805]: Indexi (offset 48) */ "i\0" "glIndexi\0" "\0" - /* _mesa_function_pool[10664]: EndQueryARB (will be remapped) */ + /* _mesa_function_pool[10817]: EGLImageTargetTexture2DOES (will be remapped) */ + "ip\0" + "glEGLImageTargetTexture2DOES\0" + "\0" + /* _mesa_function_pool[10850]: EndQueryARB (will be remapped) */ "i\0" "glEndQuery\0" "glEndQueryARB\0" "\0" - /* _mesa_function_pool[10692]: DeleteFencesNV (will be remapped) */ + /* _mesa_function_pool[10878]: DeleteFencesNV (will be remapped) */ "ip\0" "glDeleteFencesNV\0" "\0" - /* _mesa_function_pool[10713]: DeformationMap3dSGIX (dynamic) */ - "iddiiddiiddiip\0" - "glDeformationMap3dSGIX\0" - "\0" - /* _mesa_function_pool[10752]: DepthMask (offset 211) */ + /* _mesa_function_pool[10899]: DepthMask (offset 211) */ "i\0" "glDepthMask\0" "\0" - /* _mesa_function_pool[10767]: IsShader (will be remapped) */ + /* _mesa_function_pool[10914]: IsShader (will be remapped) */ "i\0" "glIsShader\0" "\0" - /* _mesa_function_pool[10781]: Indexf (offset 46) */ + /* _mesa_function_pool[10928]: Indexf (offset 46) */ "f\0" "glIndexf\0" "\0" - /* _mesa_function_pool[10793]: GetImageTransformParameterivHP (dynamic) */ + /* _mesa_function_pool[10940]: GetImageTransformParameterivHP (dynamic) */ "iip\0" "glGetImageTransformParameterivHP\0" "\0" - /* _mesa_function_pool[10831]: Indexd (offset 44) */ + /* _mesa_function_pool[10978]: Indexd (offset 44) */ "d\0" "glIndexd\0" "\0" - /* _mesa_function_pool[10843]: GetMaterialiv (offset 270) */ + /* _mesa_function_pool[10990]: GetMaterialiv (offset 270) */ "iip\0" "glGetMaterialiv\0" "\0" - /* _mesa_function_pool[10864]: StencilOp (offset 244) */ + /* _mesa_function_pool[11011]: StencilOp (offset 244) */ "iii\0" "glStencilOp\0" "\0" - /* _mesa_function_pool[10881]: WindowPos4ivMESA (will be remapped) */ + /* _mesa_function_pool[11028]: WindowPos4ivMESA (will be remapped) */ "p\0" "glWindowPos4ivMESA\0" "\0" - /* _mesa_function_pool[10903]: MultiTexCoord3svARB (offset 399) */ + /* _mesa_function_pool[11050]: MultiTexCoord3svARB (offset 399) */ "ip\0" "glMultiTexCoord3sv\0" "glMultiTexCoord3svARB\0" "\0" - /* _mesa_function_pool[10948]: TexEnvfv (offset 185) */ + /* _mesa_function_pool[11095]: TexEnvfv (offset 185) */ "iip\0" "glTexEnvfv\0" "\0" - /* _mesa_function_pool[10964]: MultiTexCoord4iARB (offset 404) */ + /* _mesa_function_pool[11111]: MultiTexCoord4iARB (offset 404) */ "iiiii\0" "glMultiTexCoord4i\0" "glMultiTexCoord4iARB\0" "\0" - /* _mesa_function_pool[11010]: Indexs (offset 50) */ + /* _mesa_function_pool[11157]: Indexs (offset 50) */ "i\0" "glIndexs\0" "\0" - /* _mesa_function_pool[11022]: Binormal3ivEXT (dynamic) */ + /* _mesa_function_pool[11169]: Binormal3ivEXT (dynamic) */ "p\0" "glBinormal3ivEXT\0" "\0" - /* _mesa_function_pool[11042]: ResizeBuffersMESA (will be remapped) */ + /* _mesa_function_pool[11189]: ResizeBuffersMESA (will be remapped) */ "\0" "glResizeBuffersMESA\0" "\0" - /* _mesa_function_pool[11064]: GetUniformivARB (will be remapped) */ + /* _mesa_function_pool[11211]: GetUniformivARB (will be remapped) */ "iip\0" "glGetUniformiv\0" "glGetUniformivARB\0" "\0" - /* _mesa_function_pool[11102]: PixelTexGenParameteriSGIS (will be remapped) */ + /* _mesa_function_pool[11249]: PixelTexGenParameteriSGIS (will be remapped) */ "ii\0" "glPixelTexGenParameteriSGIS\0" "\0" - /* _mesa_function_pool[11134]: VertexPointervINTEL (dynamic) */ + /* _mesa_function_pool[11281]: VertexPointervINTEL (dynamic) */ "iip\0" "glVertexPointervINTEL\0" "\0" - /* _mesa_function_pool[11161]: Vertex2i (offset 130) */ + /* _mesa_function_pool[11308]: Vertex2i (offset 130) */ "ii\0" "glVertex2i\0" "\0" - /* _mesa_function_pool[11176]: LoadMatrixf (offset 291) */ + /* _mesa_function_pool[11323]: LoadMatrixf (offset 291) */ "p\0" "glLoadMatrixf\0" "\0" - /* _mesa_function_pool[11193]: Vertex2f (offset 128) */ + /* _mesa_function_pool[11340]: Vertex2f (offset 128) */ "ff\0" "glVertex2f\0" "\0" - /* _mesa_function_pool[11208]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[11355]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */ "pppp\0" "glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[11261]: Color4bv (offset 26) */ + /* _mesa_function_pool[11408]: Color4bv (offset 26) */ "p\0" "glColor4bv\0" "\0" - /* _mesa_function_pool[11275]: VertexPointer (offset 321) */ + /* _mesa_function_pool[11422]: VertexPointer (offset 321) */ "iiip\0" "glVertexPointer\0" "\0" - /* _mesa_function_pool[11297]: SecondaryColor3uiEXT (will be remapped) */ + /* _mesa_function_pool[11444]: SecondaryColor3uiEXT (will be remapped) */ "iii\0" "glSecondaryColor3ui\0" "glSecondaryColor3uiEXT\0" "\0" - /* _mesa_function_pool[11345]: StartInstrumentsSGIX (dynamic) */ + /* _mesa_function_pool[11492]: StartInstrumentsSGIX (dynamic) */ "\0" "glStartInstrumentsSGIX\0" "\0" - /* _mesa_function_pool[11370]: SecondaryColor3usvEXT (will be remapped) */ + /* _mesa_function_pool[11517]: SecondaryColor3usvEXT (will be remapped) */ "p\0" "glSecondaryColor3usv\0" "glSecondaryColor3usvEXT\0" "\0" - /* _mesa_function_pool[11418]: VertexAttrib2fvNV (will be remapped) */ + /* _mesa_function_pool[11565]: VertexAttrib2fvNV (will be remapped) */ "ip\0" "glVertexAttrib2fvNV\0" "\0" - /* _mesa_function_pool[11442]: ProgramLocalParameter4dvARB (will be remapped) */ + /* _mesa_function_pool[11589]: ProgramLocalParameter4dvARB (will be remapped) */ "iip\0" "glProgramLocalParameter4dvARB\0" "\0" - /* _mesa_function_pool[11477]: DeleteLists (offset 4) */ + /* _mesa_function_pool[11624]: DeleteLists (offset 4) */ "ii\0" "glDeleteLists\0" "\0" - /* _mesa_function_pool[11495]: LogicOp (offset 242) */ + /* _mesa_function_pool[11642]: LogicOp (offset 242) */ "i\0" "glLogicOp\0" "\0" - /* _mesa_function_pool[11508]: MatrixIndexuivARB (dynamic) */ + /* _mesa_function_pool[11655]: MatrixIndexuivARB (dynamic) */ "ip\0" "glMatrixIndexuivARB\0" "\0" - /* _mesa_function_pool[11532]: Vertex2s (offset 132) */ + /* _mesa_function_pool[11679]: Vertex2s (offset 132) */ "ii\0" "glVertex2s\0" "\0" - /* _mesa_function_pool[11547]: RenderbufferStorageMultisample (will be remapped) */ + /* _mesa_function_pool[11694]: RenderbufferStorageMultisample (will be remapped) */ "iiiii\0" "glRenderbufferStorageMultisample\0" "glRenderbufferStorageMultisampleEXT\0" "\0" - /* _mesa_function_pool[11623]: TexCoord4fv (offset 121) */ + /* _mesa_function_pool[11770]: TexCoord4fv (offset 121) */ "p\0" "glTexCoord4fv\0" "\0" - /* _mesa_function_pool[11640]: Tangent3sEXT (dynamic) */ + /* _mesa_function_pool[11787]: Tangent3sEXT (dynamic) */ "iii\0" "glTangent3sEXT\0" "\0" - /* _mesa_function_pool[11660]: GlobalAlphaFactorfSUN (dynamic) */ + /* _mesa_function_pool[11807]: GlobalAlphaFactorfSUN (dynamic) */ "f\0" "glGlobalAlphaFactorfSUN\0" "\0" - /* _mesa_function_pool[11687]: MultiTexCoord3iARB (offset 396) */ + /* _mesa_function_pool[11834]: MultiTexCoord3iARB (offset 396) */ "iiii\0" "glMultiTexCoord3i\0" "glMultiTexCoord3iARB\0" "\0" - /* _mesa_function_pool[11732]: IsProgram (will be remapped) */ + /* _mesa_function_pool[11879]: IsProgram (will be remapped) */ "i\0" "glIsProgram\0" "\0" - /* _mesa_function_pool[11747]: TexCoordPointerListIBM (dynamic) */ + /* _mesa_function_pool[11894]: TexCoordPointerListIBM (dynamic) */ "iiipi\0" "glTexCoordPointerListIBM\0" "\0" - /* _mesa_function_pool[11779]: GlobalAlphaFactorusSUN (dynamic) */ + /* _mesa_function_pool[11926]: GlobalAlphaFactorusSUN (dynamic) */ "i\0" "glGlobalAlphaFactorusSUN\0" "\0" - /* _mesa_function_pool[11807]: VertexAttrib2dvNV (will be remapped) */ + /* _mesa_function_pool[11954]: VertexAttrib2dvNV (will be remapped) */ "ip\0" "glVertexAttrib2dvNV\0" "\0" - /* _mesa_function_pool[11831]: FramebufferRenderbufferEXT (will be remapped) */ + /* _mesa_function_pool[11978]: FramebufferRenderbufferEXT (will be remapped) */ "iiii\0" "glFramebufferRenderbuffer\0" "glFramebufferRenderbufferEXT\0" "\0" - /* _mesa_function_pool[11892]: VertexAttrib1dvNV (will be remapped) */ + /* _mesa_function_pool[12039]: VertexAttrib1dvNV (will be remapped) */ "ip\0" "glVertexAttrib1dvNV\0" "\0" - /* _mesa_function_pool[11916]: GenTextures (offset 328) */ + /* _mesa_function_pool[12063]: GenTextures (offset 328) */ "ip\0" "glGenTextures\0" "glGenTexturesEXT\0" "\0" - /* _mesa_function_pool[11951]: SetFenceNV (will be remapped) */ + /* _mesa_function_pool[12098]: SetFenceNV (will be remapped) */ "ii\0" "glSetFenceNV\0" "\0" - /* _mesa_function_pool[11968]: FramebufferTexture1DEXT (will be remapped) */ + /* _mesa_function_pool[12115]: FramebufferTexture1DEXT (will be remapped) */ "iiiii\0" "glFramebufferTexture1D\0" "glFramebufferTexture1DEXT\0" "\0" - /* _mesa_function_pool[12024]: GetCombinerOutputParameterivNV (will be remapped) */ + /* _mesa_function_pool[12171]: GetCombinerOutputParameterivNV (will be remapped) */ "iiip\0" "glGetCombinerOutputParameterivNV\0" "\0" - /* _mesa_function_pool[12063]: PixelTexGenParameterivSGIS (will be remapped) */ + /* _mesa_function_pool[12210]: MultiModeDrawArraysIBM (will be remapped) */ + "pppii\0" + "glMultiModeDrawArraysIBM\0" + "\0" + /* _mesa_function_pool[12242]: PixelTexGenParameterivSGIS (will be remapped) */ "ip\0" "glPixelTexGenParameterivSGIS\0" "\0" - /* _mesa_function_pool[12096]: TextureNormalEXT (dynamic) */ + /* _mesa_function_pool[12275]: TextureNormalEXT (dynamic) */ "i\0" "glTextureNormalEXT\0" "\0" - /* _mesa_function_pool[12118]: IndexPointerListIBM (dynamic) */ + /* _mesa_function_pool[12297]: IndexPointerListIBM (dynamic) */ "iipi\0" "glIndexPointerListIBM\0" "\0" - /* _mesa_function_pool[12146]: WeightfvARB (dynamic) */ + /* _mesa_function_pool[12325]: WeightfvARB (dynamic) */ "ip\0" "glWeightfvARB\0" "\0" - /* _mesa_function_pool[12164]: RasterPos2sv (offset 69) */ + /* _mesa_function_pool[12343]: RasterPos2sv (offset 69) */ "p\0" "glRasterPos2sv\0" "\0" - /* _mesa_function_pool[12182]: Color4ubv (offset 36) */ + /* _mesa_function_pool[12361]: Color4ubv (offset 36) */ "p\0" "glColor4ubv\0" "\0" - /* _mesa_function_pool[12197]: DrawBuffer (offset 202) */ + /* _mesa_function_pool[12376]: DrawBuffer (offset 202) */ "i\0" "glDrawBuffer\0" "\0" - /* _mesa_function_pool[12213]: TexCoord2fv (offset 105) */ + /* _mesa_function_pool[12392]: TexCoord2fv (offset 105) */ "p\0" "glTexCoord2fv\0" "\0" - /* _mesa_function_pool[12230]: WindowPos4fMESA (will be remapped) */ + /* _mesa_function_pool[12409]: WindowPos4fMESA (will be remapped) */ "ffff\0" "glWindowPos4fMESA\0" "\0" - /* _mesa_function_pool[12254]: TexCoord1sv (offset 101) */ + /* _mesa_function_pool[12433]: TexCoord1sv (offset 101) */ "p\0" "glTexCoord1sv\0" "\0" - /* _mesa_function_pool[12271]: WindowPos3dvMESA (will be remapped) */ + /* _mesa_function_pool[12450]: WindowPos3dvMESA (will be remapped) */ "p\0" "glWindowPos3dv\0" "glWindowPos3dvARB\0" "glWindowPos3dvMESA\0" "\0" - /* _mesa_function_pool[12326]: DepthFunc (offset 245) */ + /* _mesa_function_pool[12505]: DepthFunc (offset 245) */ "i\0" "glDepthFunc\0" "\0" - /* _mesa_function_pool[12341]: PixelMapusv (offset 253) */ + /* _mesa_function_pool[12520]: PixelMapusv (offset 253) */ "iip\0" "glPixelMapusv\0" "\0" - /* _mesa_function_pool[12360]: GetQueryObjecti64vEXT (will be remapped) */ + /* _mesa_function_pool[12539]: GetQueryObjecti64vEXT (will be remapped) */ "iip\0" "glGetQueryObjecti64vEXT\0" "\0" - /* _mesa_function_pool[12389]: MultiTexCoord1dARB (offset 376) */ + /* _mesa_function_pool[12568]: MultiTexCoord1dARB (offset 376) */ "id\0" "glMultiTexCoord1d\0" "glMultiTexCoord1dARB\0" "\0" - /* _mesa_function_pool[12432]: PointParameterivNV (will be remapped) */ + /* _mesa_function_pool[12611]: PointParameterivNV (will be remapped) */ "ip\0" "glPointParameteriv\0" "glPointParameterivNV\0" "\0" - /* _mesa_function_pool[12476]: BlendFunc (offset 241) */ + /* _mesa_function_pool[12655]: BlendFunc (offset 241) */ "ii\0" "glBlendFunc\0" "\0" - /* _mesa_function_pool[12492]: Uniform2fvARB (will be remapped) */ + /* _mesa_function_pool[12671]: Uniform2fvARB (will be remapped) */ "iip\0" "glUniform2fv\0" "glUniform2fvARB\0" "\0" - /* _mesa_function_pool[12526]: BufferParameteriAPPLE (will be remapped) */ + /* _mesa_function_pool[12705]: BufferParameteriAPPLE (will be remapped) */ "iii\0" "glBufferParameteriAPPLE\0" "\0" - /* _mesa_function_pool[12555]: MultiTexCoord3dvARB (offset 393) */ + /* _mesa_function_pool[12734]: MultiTexCoord3dvARB (offset 393) */ "ip\0" "glMultiTexCoord3dv\0" "glMultiTexCoord3dvARB\0" "\0" - /* _mesa_function_pool[12600]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[12779]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */ "pppp\0" "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[12656]: DeleteObjectARB (will be remapped) */ + /* _mesa_function_pool[12835]: DeleteObjectARB (will be remapped) */ "i\0" "glDeleteObjectARB\0" "\0" - /* _mesa_function_pool[12677]: MatrixIndexPointerARB (dynamic) */ + /* _mesa_function_pool[12856]: MatrixIndexPointerARB (dynamic) */ "iiip\0" "glMatrixIndexPointerARB\0" "\0" - /* _mesa_function_pool[12707]: ProgramNamedParameter4dvNV (will be remapped) */ + /* _mesa_function_pool[12886]: ProgramNamedParameter4dvNV (will be remapped) */ "iipp\0" "glProgramNamedParameter4dvNV\0" "\0" - /* _mesa_function_pool[12742]: Tangent3fvEXT (dynamic) */ + /* _mesa_function_pool[12921]: Tangent3fvEXT (dynamic) */ "p\0" "glTangent3fvEXT\0" "\0" - /* _mesa_function_pool[12761]: Flush (offset 217) */ + /* _mesa_function_pool[12940]: Flush (offset 217) */ "\0" "glFlush\0" "\0" - /* _mesa_function_pool[12771]: Color4uiv (offset 38) */ + /* _mesa_function_pool[12950]: Color4uiv (offset 38) */ "p\0" "glColor4uiv\0" "\0" - /* _mesa_function_pool[12786]: GenVertexArrays (will be remapped) */ + /* _mesa_function_pool[12965]: GenVertexArrays (will be remapped) */ "ip\0" "glGenVertexArrays\0" "\0" - /* _mesa_function_pool[12808]: RasterPos3sv (offset 77) */ + /* _mesa_function_pool[12987]: RasterPos3sv (offset 77) */ "p\0" "glRasterPos3sv\0" "\0" - /* _mesa_function_pool[12826]: BindFramebufferEXT (will be remapped) */ + /* _mesa_function_pool[13005]: BindFramebufferEXT (will be remapped) */ "ii\0" "glBindFramebuffer\0" "glBindFramebufferEXT\0" "\0" - /* _mesa_function_pool[12869]: ReferencePlaneSGIX (dynamic) */ + /* _mesa_function_pool[13048]: ReferencePlaneSGIX (dynamic) */ "p\0" "glReferencePlaneSGIX\0" "\0" - /* _mesa_function_pool[12893]: PushAttrib (offset 219) */ + /* _mesa_function_pool[13072]: PushAttrib (offset 219) */ "i\0" "glPushAttrib\0" "\0" - /* _mesa_function_pool[12909]: RasterPos2i (offset 66) */ + /* _mesa_function_pool[13088]: RasterPos2i (offset 66) */ "ii\0" "glRasterPos2i\0" "\0" - /* _mesa_function_pool[12927]: ValidateProgramARB (will be remapped) */ + /* _mesa_function_pool[13106]: ValidateProgramARB (will be remapped) */ "i\0" "glValidateProgram\0" "glValidateProgramARB\0" "\0" - /* _mesa_function_pool[12969]: TexParameteriv (offset 181) */ + /* _mesa_function_pool[13148]: TexParameteriv (offset 181) */ "iip\0" "glTexParameteriv\0" "\0" - /* _mesa_function_pool[12991]: UnlockArraysEXT (will be remapped) */ + /* _mesa_function_pool[13170]: UnlockArraysEXT (will be remapped) */ "\0" "glUnlockArraysEXT\0" "\0" - /* _mesa_function_pool[13011]: TexCoord2fColor3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[13190]: TexCoord2fColor3fVertex3fSUN (dynamic) */ "ffffffff\0" "glTexCoord2fColor3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[13052]: WindowPos3fvMESA (will be remapped) */ + /* _mesa_function_pool[13231]: WindowPos3fvMESA (will be remapped) */ "p\0" "glWindowPos3fv\0" "glWindowPos3fvARB\0" "glWindowPos3fvMESA\0" "\0" - /* _mesa_function_pool[13107]: RasterPos2f (offset 64) */ + /* _mesa_function_pool[13286]: RasterPos2f (offset 64) */ "ff\0" "glRasterPos2f\0" "\0" - /* _mesa_function_pool[13125]: VertexAttrib1svNV (will be remapped) */ + /* _mesa_function_pool[13304]: VertexAttrib1svNV (will be remapped) */ "ip\0" "glVertexAttrib1svNV\0" "\0" - /* _mesa_function_pool[13149]: RasterPos2d (offset 62) */ + /* _mesa_function_pool[13328]: RasterPos2d (offset 62) */ "dd\0" "glRasterPos2d\0" "\0" - /* _mesa_function_pool[13167]: RasterPos3fv (offset 73) */ + /* _mesa_function_pool[13346]: RasterPos3fv (offset 73) */ "p\0" "glRasterPos3fv\0" "\0" - /* _mesa_function_pool[13185]: CopyTexSubImage3D (offset 373) */ + /* _mesa_function_pool[13364]: CopyTexSubImage3D (offset 373) */ "iiiiiiiii\0" "glCopyTexSubImage3D\0" "glCopyTexSubImage3DEXT\0" "\0" - /* _mesa_function_pool[13239]: VertexAttrib2dARB (will be remapped) */ + /* _mesa_function_pool[13418]: VertexAttrib2dARB (will be remapped) */ "idd\0" "glVertexAttrib2d\0" "glVertexAttrib2dARB\0" "\0" - /* _mesa_function_pool[13281]: Color4ub (offset 35) */ + /* _mesa_function_pool[13460]: Color4ub (offset 35) */ "iiii\0" "glColor4ub\0" "\0" - /* _mesa_function_pool[13298]: GetInteger64v (will be remapped) */ + /* _mesa_function_pool[13477]: GetInteger64v (will be remapped) */ "ip\0" "glGetInteger64v\0" "\0" - /* _mesa_function_pool[13318]: TextureColorMaskSGIS (dynamic) */ + /* _mesa_function_pool[13497]: TextureColorMaskSGIS (dynamic) */ "iiii\0" "glTextureColorMaskSGIS\0" "\0" - /* _mesa_function_pool[13347]: RasterPos2s (offset 68) */ + /* _mesa_function_pool[13526]: RasterPos2s (offset 68) */ "ii\0" "glRasterPos2s\0" "\0" - /* _mesa_function_pool[13365]: GetColorTable (offset 343) */ + /* _mesa_function_pool[13544]: GetColorTable (offset 343) */ "iiip\0" "glGetColorTable\0" "glGetColorTableSGI\0" "glGetColorTableEXT\0" "\0" - /* _mesa_function_pool[13425]: SelectBuffer (offset 195) */ + /* _mesa_function_pool[13604]: SelectBuffer (offset 195) */ "ip\0" "glSelectBuffer\0" "\0" - /* _mesa_function_pool[13444]: Indexiv (offset 49) */ + /* _mesa_function_pool[13623]: Indexiv (offset 49) */ "p\0" "glIndexiv\0" "\0" - /* _mesa_function_pool[13457]: TexCoord3i (offset 114) */ + /* _mesa_function_pool[13636]: TexCoord3i (offset 114) */ "iii\0" "glTexCoord3i\0" "\0" - /* _mesa_function_pool[13475]: CopyColorTable (offset 342) */ + /* _mesa_function_pool[13654]: CopyColorTable (offset 342) */ "iiiii\0" "glCopyColorTable\0" "glCopyColorTableSGI\0" "\0" - /* _mesa_function_pool[13519]: GetHistogramParameterfv (offset 362) */ + /* _mesa_function_pool[13698]: GetHistogramParameterfv (offset 362) */ "iip\0" "glGetHistogramParameterfv\0" "glGetHistogramParameterfvEXT\0" "\0" - /* _mesa_function_pool[13579]: Frustum (offset 289) */ + /* _mesa_function_pool[13758]: Frustum (offset 289) */ "dddddd\0" "glFrustum\0" "\0" - /* _mesa_function_pool[13597]: GetString (offset 275) */ + /* _mesa_function_pool[13776]: GetString (offset 275) */ "i\0" "glGetString\0" "\0" - /* _mesa_function_pool[13612]: ColorPointervINTEL (dynamic) */ + /* _mesa_function_pool[13791]: ColorPointervINTEL (dynamic) */ "iip\0" "glColorPointervINTEL\0" "\0" - /* _mesa_function_pool[13638]: TexEnvf (offset 184) */ + /* _mesa_function_pool[13817]: TexEnvf (offset 184) */ "iif\0" "glTexEnvf\0" "\0" - /* _mesa_function_pool[13653]: TexCoord3d (offset 110) */ + /* _mesa_function_pool[13832]: TexCoord3d (offset 110) */ "ddd\0" "glTexCoord3d\0" "\0" - /* _mesa_function_pool[13671]: AlphaFragmentOp1ATI (will be remapped) */ + /* _mesa_function_pool[13850]: AlphaFragmentOp1ATI (will be remapped) */ "iiiiii\0" "glAlphaFragmentOp1ATI\0" "\0" - /* _mesa_function_pool[13701]: TexCoord3f (offset 112) */ + /* _mesa_function_pool[13880]: TexCoord3f (offset 112) */ "fff\0" "glTexCoord3f\0" "\0" - /* _mesa_function_pool[13719]: MultiTexCoord3ivARB (offset 397) */ + /* _mesa_function_pool[13898]: MultiTexCoord3ivARB (offset 397) */ "ip\0" "glMultiTexCoord3iv\0" "glMultiTexCoord3ivARB\0" "\0" - /* _mesa_function_pool[13764]: MultiTexCoord2sARB (offset 390) */ + /* _mesa_function_pool[13943]: MultiTexCoord2sARB (offset 390) */ "iii\0" "glMultiTexCoord2s\0" "glMultiTexCoord2sARB\0" "\0" - /* _mesa_function_pool[13808]: VertexAttrib1dvARB (will be remapped) */ + /* _mesa_function_pool[13987]: VertexAttrib1dvARB (will be remapped) */ "ip\0" "glVertexAttrib1dv\0" "glVertexAttrib1dvARB\0" "\0" - /* _mesa_function_pool[13851]: DeleteTextures (offset 327) */ + /* _mesa_function_pool[14030]: DeleteTextures (offset 327) */ "ip\0" "glDeleteTextures\0" "glDeleteTexturesEXT\0" "\0" - /* _mesa_function_pool[13892]: TexCoordPointerEXT (will be remapped) */ + /* _mesa_function_pool[14071]: TexCoordPointerEXT (will be remapped) */ "iiiip\0" "glTexCoordPointerEXT\0" "\0" - /* _mesa_function_pool[13920]: TexSubImage4DSGIS (dynamic) */ + /* _mesa_function_pool[14099]: TexSubImage4DSGIS (dynamic) */ "iiiiiiiiiiiip\0" "glTexSubImage4DSGIS\0" "\0" - /* _mesa_function_pool[13955]: TexCoord3s (offset 116) */ + /* _mesa_function_pool[14134]: TexCoord3s (offset 116) */ "iii\0" "glTexCoord3s\0" "\0" - /* _mesa_function_pool[13973]: GetTexLevelParameteriv (offset 285) */ + /* _mesa_function_pool[14152]: GetTexLevelParameteriv (offset 285) */ "iiip\0" "glGetTexLevelParameteriv\0" "\0" - /* _mesa_function_pool[14004]: CombinerStageParameterfvNV (dynamic) */ + /* _mesa_function_pool[14183]: CombinerStageParameterfvNV (dynamic) */ "iip\0" "glCombinerStageParameterfvNV\0" "\0" - /* _mesa_function_pool[14038]: StopInstrumentsSGIX (dynamic) */ + /* _mesa_function_pool[14217]: StopInstrumentsSGIX (dynamic) */ "i\0" "glStopInstrumentsSGIX\0" "\0" - /* _mesa_function_pool[14063]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */ + /* _mesa_function_pool[14242]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */ "fffffffffffffff\0" "glTexCoord4fColor4fNormal3fVertex4fSUN\0" "\0" - /* _mesa_function_pool[14119]: ClearAccum (offset 204) */ + /* _mesa_function_pool[14298]: ClearAccum (offset 204) */ "ffff\0" "glClearAccum\0" "\0" - /* _mesa_function_pool[14138]: DeformSGIX (dynamic) */ + /* _mesa_function_pool[14317]: DeformSGIX (dynamic) */ "i\0" "glDeformSGIX\0" "\0" - /* _mesa_function_pool[14154]: GetVertexAttribfvARB (will be remapped) */ + /* _mesa_function_pool[14333]: GetVertexAttribfvARB (will be remapped) */ "iip\0" "glGetVertexAttribfv\0" "glGetVertexAttribfvARB\0" "\0" - /* _mesa_function_pool[14202]: SecondaryColor3ivEXT (will be remapped) */ + /* _mesa_function_pool[14381]: SecondaryColor3ivEXT (will be remapped) */ "p\0" "glSecondaryColor3iv\0" "glSecondaryColor3ivEXT\0" "\0" - /* _mesa_function_pool[14248]: TexCoord4iv (offset 123) */ + /* _mesa_function_pool[14427]: TexCoord4iv (offset 123) */ "p\0" "glTexCoord4iv\0" "\0" - /* _mesa_function_pool[14265]: UniformMatrix4x2fv (will be remapped) */ + /* _mesa_function_pool[14444]: UniformMatrix4x2fv (will be remapped) */ "iiip\0" "glUniformMatrix4x2fv\0" "\0" - /* _mesa_function_pool[14292]: GetDetailTexFuncSGIS (dynamic) */ + /* _mesa_function_pool[14471]: GetDetailTexFuncSGIS (dynamic) */ "ip\0" "glGetDetailTexFuncSGIS\0" "\0" - /* _mesa_function_pool[14319]: GetCombinerStageParameterfvNV (dynamic) */ + /* _mesa_function_pool[14498]: GetCombinerStageParameterfvNV (dynamic) */ "iip\0" "glGetCombinerStageParameterfvNV\0" "\0" - /* _mesa_function_pool[14356]: PolygonOffset (offset 319) */ + /* _mesa_function_pool[14535]: PolygonOffset (offset 319) */ "ff\0" "glPolygonOffset\0" "\0" - /* _mesa_function_pool[14376]: BindVertexArray (will be remapped) */ + /* _mesa_function_pool[14555]: BindVertexArray (will be remapped) */ "i\0" "glBindVertexArray\0" "\0" - /* _mesa_function_pool[14397]: Color4ubVertex2fvSUN (dynamic) */ + /* _mesa_function_pool[14576]: Color4ubVertex2fvSUN (dynamic) */ "pp\0" "glColor4ubVertex2fvSUN\0" "\0" - /* _mesa_function_pool[14424]: Rectd (offset 86) */ + /* _mesa_function_pool[14603]: Rectd (offset 86) */ "dddd\0" "glRectd\0" "\0" - /* _mesa_function_pool[14438]: TexFilterFuncSGIS (dynamic) */ + /* _mesa_function_pool[14617]: TexFilterFuncSGIS (dynamic) */ "iiip\0" "glTexFilterFuncSGIS\0" "\0" - /* _mesa_function_pool[14464]: SampleMaskSGIS (will be remapped) */ + /* _mesa_function_pool[14643]: SampleMaskSGIS (will be remapped) */ "fi\0" "glSampleMaskSGIS\0" "glSampleMaskEXT\0" "\0" - /* _mesa_function_pool[14501]: GetAttribLocationARB (will be remapped) */ + /* _mesa_function_pool[14680]: GetAttribLocationARB (will be remapped) */ "ip\0" "glGetAttribLocation\0" "glGetAttribLocationARB\0" "\0" - /* _mesa_function_pool[14548]: RasterPos3i (offset 74) */ + /* _mesa_function_pool[14727]: RasterPos3i (offset 74) */ "iii\0" "glRasterPos3i\0" "\0" - /* _mesa_function_pool[14567]: VertexAttrib4ubvARB (will be remapped) */ + /* _mesa_function_pool[14746]: VertexAttrib4ubvARB (will be remapped) */ "ip\0" "glVertexAttrib4ubv\0" "glVertexAttrib4ubvARB\0" "\0" - /* _mesa_function_pool[14612]: DetailTexFuncSGIS (dynamic) */ + /* _mesa_function_pool[14791]: DetailTexFuncSGIS (dynamic) */ "iip\0" "glDetailTexFuncSGIS\0" "\0" - /* _mesa_function_pool[14637]: Normal3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[14816]: Normal3fVertex3fSUN (dynamic) */ "ffffff\0" "glNormal3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[14667]: CopyTexImage2D (offset 324) */ + /* _mesa_function_pool[14846]: CopyTexImage2D (offset 324) */ "iiiiiiii\0" "glCopyTexImage2D\0" "glCopyTexImage2DEXT\0" "\0" - /* _mesa_function_pool[14714]: GetBufferPointervARB (will be remapped) */ + /* _mesa_function_pool[14893]: GetBufferPointervARB (will be remapped) */ "iip\0" "glGetBufferPointerv\0" "glGetBufferPointervARB\0" "\0" - /* _mesa_function_pool[14762]: ProgramEnvParameter4fARB (will be remapped) */ + /* _mesa_function_pool[14941]: ProgramEnvParameter4fARB (will be remapped) */ "iiffff\0" "glProgramEnvParameter4fARB\0" "glProgramParameter4fNV\0" "\0" - /* _mesa_function_pool[14820]: Uniform3ivARB (will be remapped) */ + /* _mesa_function_pool[14999]: Uniform3ivARB (will be remapped) */ "iip\0" "glUniform3iv\0" "glUniform3ivARB\0" "\0" - /* _mesa_function_pool[14854]: Lightfv (offset 160) */ + /* _mesa_function_pool[15033]: Lightfv (offset 160) */ "iip\0" "glLightfv\0" "\0" - /* _mesa_function_pool[14869]: ClearDepth (offset 208) */ + /* _mesa_function_pool[15048]: ClearDepth (offset 208) */ "d\0" "glClearDepth\0" "\0" - /* _mesa_function_pool[14885]: GetFenceivNV (will be remapped) */ + /* _mesa_function_pool[15064]: GetFenceivNV (will be remapped) */ "iip\0" "glGetFenceivNV\0" "\0" - /* _mesa_function_pool[14905]: WindowPos4dvMESA (will be remapped) */ + /* _mesa_function_pool[15084]: WindowPos4dvMESA (will be remapped) */ "p\0" "glWindowPos4dvMESA\0" "\0" - /* _mesa_function_pool[14927]: ColorSubTable (offset 346) */ + /* _mesa_function_pool[15106]: ColorSubTable (offset 346) */ "iiiiip\0" "glColorSubTable\0" "glColorSubTableEXT\0" "\0" - /* _mesa_function_pool[14970]: Color4fv (offset 30) */ + /* _mesa_function_pool[15149]: Color4fv (offset 30) */ "p\0" "glColor4fv\0" "\0" - /* _mesa_function_pool[14984]: MultiTexCoord4ivARB (offset 405) */ + /* _mesa_function_pool[15163]: MultiTexCoord4ivARB (offset 405) */ "ip\0" "glMultiTexCoord4iv\0" "glMultiTexCoord4ivARB\0" "\0" - /* _mesa_function_pool[15029]: ProgramLocalParameters4fvEXT (will be remapped) */ + /* _mesa_function_pool[15208]: ProgramLocalParameters4fvEXT (will be remapped) */ "iiip\0" "glProgramLocalParameters4fvEXT\0" "\0" - /* _mesa_function_pool[15066]: ColorPointer (offset 308) */ + /* _mesa_function_pool[15245]: ColorPointer (offset 308) */ "iiip\0" "glColorPointer\0" "\0" - /* _mesa_function_pool[15087]: Rects (offset 92) */ + /* _mesa_function_pool[15266]: Rects (offset 92) */ "iiii\0" "glRects\0" "\0" - /* _mesa_function_pool[15101]: GetMapAttribParameterfvNV (dynamic) */ + /* _mesa_function_pool[15280]: GetMapAttribParameterfvNV (dynamic) */ "iiip\0" "glGetMapAttribParameterfvNV\0" "\0" - /* _mesa_function_pool[15135]: Lightiv (offset 162) */ + /* _mesa_function_pool[15314]: Lightiv (offset 162) */ "iip\0" "glLightiv\0" "\0" - /* _mesa_function_pool[15150]: VertexAttrib4sARB (will be remapped) */ + /* _mesa_function_pool[15329]: VertexAttrib4sARB (will be remapped) */ "iiiii\0" "glVertexAttrib4s\0" "glVertexAttrib4sARB\0" "\0" - /* _mesa_function_pool[15194]: GetQueryObjectuivARB (will be remapped) */ + /* _mesa_function_pool[15373]: GetQueryObjectuivARB (will be remapped) */ "iip\0" "glGetQueryObjectuiv\0" "glGetQueryObjectuivARB\0" "\0" - /* _mesa_function_pool[15242]: GetTexParameteriv (offset 283) */ + /* _mesa_function_pool[15421]: GetTexParameteriv (offset 283) */ "iip\0" "glGetTexParameteriv\0" "\0" - /* _mesa_function_pool[15267]: MapParameterivNV (dynamic) */ + /* _mesa_function_pool[15446]: MapParameterivNV (dynamic) */ "iip\0" "glMapParameterivNV\0" "\0" - /* _mesa_function_pool[15291]: GenRenderbuffersEXT (will be remapped) */ + /* _mesa_function_pool[15470]: GenRenderbuffersEXT (will be remapped) */ "ip\0" "glGenRenderbuffers\0" "glGenRenderbuffersEXT\0" "\0" - /* _mesa_function_pool[15336]: VertexAttrib2dvARB (will be remapped) */ + /* _mesa_function_pool[15515]: VertexAttrib2dvARB (will be remapped) */ "ip\0" "glVertexAttrib2dv\0" "glVertexAttrib2dvARB\0" "\0" - /* _mesa_function_pool[15379]: EdgeFlagPointerEXT (will be remapped) */ + /* _mesa_function_pool[15558]: EdgeFlagPointerEXT (will be remapped) */ "iip\0" "glEdgeFlagPointerEXT\0" "\0" - /* _mesa_function_pool[15405]: VertexAttribs2svNV (will be remapped) */ + /* _mesa_function_pool[15584]: VertexAttribs2svNV (will be remapped) */ "iip\0" "glVertexAttribs2svNV\0" "\0" - /* _mesa_function_pool[15431]: WeightbvARB (dynamic) */ + /* _mesa_function_pool[15610]: WeightbvARB (dynamic) */ "ip\0" "glWeightbvARB\0" "\0" - /* _mesa_function_pool[15449]: VertexAttrib2fvARB (will be remapped) */ + /* _mesa_function_pool[15628]: VertexAttrib2fvARB (will be remapped) */ "ip\0" "glVertexAttrib2fv\0" "glVertexAttrib2fvARB\0" "\0" - /* _mesa_function_pool[15492]: GetBufferParameterivARB (will be remapped) */ + /* _mesa_function_pool[15671]: GetBufferParameterivARB (will be remapped) */ "iip\0" "glGetBufferParameteriv\0" "glGetBufferParameterivARB\0" "\0" - /* _mesa_function_pool[15546]: Rectdv (offset 87) */ + /* _mesa_function_pool[15725]: Rectdv (offset 87) */ "pp\0" "glRectdv\0" "\0" - /* _mesa_function_pool[15559]: ListParameteriSGIX (dynamic) */ + /* _mesa_function_pool[15738]: ListParameteriSGIX (dynamic) */ "iii\0" "glListParameteriSGIX\0" "\0" - /* _mesa_function_pool[15585]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[15764]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */ "iffffffffff\0" "glReplacementCodeuiColor4fNormal3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[15644]: InstrumentsBufferSGIX (dynamic) */ + /* _mesa_function_pool[15823]: InstrumentsBufferSGIX (dynamic) */ "ip\0" "glInstrumentsBufferSGIX\0" "\0" - /* _mesa_function_pool[15672]: VertexAttrib4NivARB (will be remapped) */ + /* _mesa_function_pool[15851]: VertexAttrib4NivARB (will be remapped) */ "ip\0" "glVertexAttrib4Niv\0" "glVertexAttrib4NivARB\0" "\0" - /* _mesa_function_pool[15717]: GetAttachedShaders (will be remapped) */ + /* _mesa_function_pool[15896]: GetAttachedShaders (will be remapped) */ "iipp\0" "glGetAttachedShaders\0" "\0" - /* _mesa_function_pool[15744]: GenVertexArraysAPPLE (will be remapped) */ + /* _mesa_function_pool[15923]: GenVertexArraysAPPLE (will be remapped) */ "ip\0" "glGenVertexArraysAPPLE\0" "\0" - /* _mesa_function_pool[15771]: Materialiv (offset 172) */ + /* _mesa_function_pool[15950]: Materialiv (offset 172) */ "iip\0" "glMaterialiv\0" "\0" - /* _mesa_function_pool[15789]: PushClientAttrib (offset 335) */ + /* _mesa_function_pool[15968]: PushClientAttrib (offset 335) */ "i\0" "glPushClientAttrib\0" "\0" - /* _mesa_function_pool[15811]: ProgramEnvParameters4fvEXT (will be remapped) */ + /* _mesa_function_pool[15990]: ProgramEnvParameters4fvEXT (will be remapped) */ "iiip\0" "glProgramEnvParameters4fvEXT\0" "\0" - /* _mesa_function_pool[15846]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[16025]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */ "pppp\0" "glTexCoord2fColor4fNormal3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[15892]: WindowPos2iMESA (will be remapped) */ + /* _mesa_function_pool[16071]: WindowPos2iMESA (will be remapped) */ "ii\0" "glWindowPos2i\0" "glWindowPos2iARB\0" "glWindowPos2iMESA\0" "\0" - /* _mesa_function_pool[15945]: SecondaryColor3fvEXT (will be remapped) */ + /* _mesa_function_pool[16124]: SecondaryColor3fvEXT (will be remapped) */ "p\0" "glSecondaryColor3fv\0" "glSecondaryColor3fvEXT\0" "\0" - /* _mesa_function_pool[15991]: PolygonMode (offset 174) */ + /* _mesa_function_pool[16170]: PolygonMode (offset 174) */ "ii\0" "glPolygonMode\0" "\0" - /* _mesa_function_pool[16009]: CompressedTexSubImage1DARB (will be remapped) */ + /* _mesa_function_pool[16188]: CompressedTexSubImage1DARB (will be remapped) */ "iiiiiip\0" "glCompressedTexSubImage1D\0" "glCompressedTexSubImage1DARB\0" "\0" - /* _mesa_function_pool[16073]: GetVertexAttribivNV (will be remapped) */ + /* _mesa_function_pool[16252]: GetVertexAttribivNV (will be remapped) */ "iip\0" "glGetVertexAttribivNV\0" "\0" - /* _mesa_function_pool[16100]: GetProgramStringARB (will be remapped) */ + /* _mesa_function_pool[16279]: GetProgramStringARB (will be remapped) */ "iip\0" "glGetProgramStringARB\0" "\0" - /* _mesa_function_pool[16127]: TexBumpParameterfvATI (will be remapped) */ + /* _mesa_function_pool[16306]: TexBumpParameterfvATI (will be remapped) */ "ip\0" "glTexBumpParameterfvATI\0" "\0" - /* _mesa_function_pool[16155]: CompileShaderARB (will be remapped) */ + /* _mesa_function_pool[16334]: CompileShaderARB (will be remapped) */ "i\0" "glCompileShader\0" "glCompileShaderARB\0" "\0" - /* _mesa_function_pool[16193]: DeleteShader (will be remapped) */ + /* _mesa_function_pool[16372]: DeleteShader (will be remapped) */ "i\0" "glDeleteShader\0" "\0" - /* _mesa_function_pool[16211]: DisableClientState (offset 309) */ + /* _mesa_function_pool[16390]: DisableClientState (offset 309) */ "i\0" "glDisableClientState\0" "\0" - /* _mesa_function_pool[16235]: TexGeni (offset 192) */ + /* _mesa_function_pool[16414]: TexGeni (offset 192) */ "iii\0" "glTexGeni\0" "\0" - /* _mesa_function_pool[16250]: TexGenf (offset 190) */ + /* _mesa_function_pool[16429]: TexGenf (offset 190) */ "iif\0" "glTexGenf\0" "\0" - /* _mesa_function_pool[16265]: Uniform3fARB (will be remapped) */ + /* _mesa_function_pool[16444]: Uniform3fARB (will be remapped) */ "ifff\0" "glUniform3f\0" "glUniform3fARB\0" "\0" - /* _mesa_function_pool[16298]: TexGend (offset 188) */ + /* _mesa_function_pool[16477]: TexGend (offset 188) */ "iid\0" "glTexGend\0" "\0" - /* _mesa_function_pool[16313]: ListParameterfvSGIX (dynamic) */ + /* _mesa_function_pool[16492]: ListParameterfvSGIX (dynamic) */ "iip\0" "glListParameterfvSGIX\0" "\0" - /* _mesa_function_pool[16340]: GetPolygonStipple (offset 274) */ + /* _mesa_function_pool[16519]: GetPolygonStipple (offset 274) */ "p\0" "glGetPolygonStipple\0" "\0" - /* _mesa_function_pool[16363]: Tangent3dvEXT (dynamic) */ + /* _mesa_function_pool[16542]: Tangent3dvEXT (dynamic) */ "p\0" "glTangent3dvEXT\0" "\0" - /* _mesa_function_pool[16382]: GetVertexAttribfvNV (will be remapped) */ + /* _mesa_function_pool[16561]: GetVertexAttribfvNV (will be remapped) */ "iip\0" "glGetVertexAttribfvNV\0" "\0" - /* _mesa_function_pool[16409]: WindowPos3sMESA (will be remapped) */ + /* _mesa_function_pool[16588]: WindowPos3sMESA (will be remapped) */ "iii\0" "glWindowPos3s\0" "glWindowPos3sARB\0" "glWindowPos3sMESA\0" "\0" - /* _mesa_function_pool[16463]: VertexAttrib2svNV (will be remapped) */ + /* _mesa_function_pool[16642]: VertexAttrib2svNV (will be remapped) */ "ip\0" "glVertexAttrib2svNV\0" "\0" - /* _mesa_function_pool[16487]: VertexAttribs1fvNV (will be remapped) */ + /* _mesa_function_pool[16666]: VertexAttribs1fvNV (will be remapped) */ "iip\0" "glVertexAttribs1fvNV\0" "\0" - /* _mesa_function_pool[16513]: TexCoord2fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[16692]: TexCoord2fVertex3fvSUN (dynamic) */ "pp\0" "glTexCoord2fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[16542]: WindowPos4sMESA (will be remapped) */ + /* _mesa_function_pool[16721]: WindowPos4sMESA (will be remapped) */ "iiii\0" "glWindowPos4sMESA\0" "\0" - /* _mesa_function_pool[16566]: VertexAttrib4NuivARB (will be remapped) */ + /* _mesa_function_pool[16745]: VertexAttrib4NuivARB (will be remapped) */ "ip\0" "glVertexAttrib4Nuiv\0" "glVertexAttrib4NuivARB\0" "\0" - /* _mesa_function_pool[16613]: ClientActiveTextureARB (offset 375) */ + /* _mesa_function_pool[16792]: ClientActiveTextureARB (offset 375) */ "i\0" "glClientActiveTexture\0" "glClientActiveTextureARB\0" "\0" - /* _mesa_function_pool[16663]: PixelTexGenSGIX (will be remapped) */ + /* _mesa_function_pool[16842]: PixelTexGenSGIX (will be remapped) */ "i\0" "glPixelTexGenSGIX\0" "\0" - /* _mesa_function_pool[16684]: ReplacementCodeusvSUN (dynamic) */ + /* _mesa_function_pool[16863]: ReplacementCodeusvSUN (dynamic) */ "p\0" "glReplacementCodeusvSUN\0" "\0" - /* _mesa_function_pool[16711]: Uniform4fARB (will be remapped) */ + /* _mesa_function_pool[16890]: Uniform4fARB (will be remapped) */ "iffff\0" "glUniform4f\0" "glUniform4fARB\0" "\0" - /* _mesa_function_pool[16745]: Color4sv (offset 34) */ + /* _mesa_function_pool[16924]: Color4sv (offset 34) */ "p\0" "glColor4sv\0" "\0" - /* _mesa_function_pool[16759]: FlushMappedBufferRange (will be remapped) */ + /* _mesa_function_pool[16938]: FlushMappedBufferRange (will be remapped) */ "iii\0" "glFlushMappedBufferRange\0" "\0" - /* _mesa_function_pool[16789]: IsProgramNV (will be remapped) */ + /* _mesa_function_pool[16968]: IsProgramNV (will be remapped) */ "i\0" "glIsProgramARB\0" "glIsProgramNV\0" "\0" - /* _mesa_function_pool[16821]: FlushMappedBufferRangeAPPLE (will be remapped) */ + /* _mesa_function_pool[17000]: FlushMappedBufferRangeAPPLE (will be remapped) */ "iii\0" "glFlushMappedBufferRangeAPPLE\0" "\0" - /* _mesa_function_pool[16856]: PixelZoom (offset 246) */ + /* _mesa_function_pool[17035]: PixelZoom (offset 246) */ "ff\0" "glPixelZoom\0" "\0" - /* _mesa_function_pool[16872]: ReplacementCodePointerSUN (dynamic) */ + /* _mesa_function_pool[17051]: ReplacementCodePointerSUN (dynamic) */ "iip\0" "glReplacementCodePointerSUN\0" "\0" - /* _mesa_function_pool[16905]: ProgramEnvParameter4dARB (will be remapped) */ + /* _mesa_function_pool[17084]: ProgramEnvParameter4dARB (will be remapped) */ "iidddd\0" "glProgramEnvParameter4dARB\0" "glProgramParameter4dNV\0" "\0" - /* _mesa_function_pool[16963]: ColorTableParameterfv (offset 340) */ + /* _mesa_function_pool[17142]: ColorTableParameterfv (offset 340) */ "iip\0" "glColorTableParameterfv\0" "glColorTableParameterfvSGI\0" "\0" - /* _mesa_function_pool[17019]: FragmentLightModelfSGIX (dynamic) */ + /* _mesa_function_pool[17198]: FragmentLightModelfSGIX (dynamic) */ "if\0" "glFragmentLightModelfSGIX\0" "\0" - /* _mesa_function_pool[17049]: Binormal3bvEXT (dynamic) */ + /* _mesa_function_pool[17228]: Binormal3bvEXT (dynamic) */ "p\0" "glBinormal3bvEXT\0" "\0" - /* _mesa_function_pool[17069]: PixelMapuiv (offset 252) */ + /* _mesa_function_pool[17248]: PixelMapuiv (offset 252) */ "iip\0" "glPixelMapuiv\0" "\0" - /* _mesa_function_pool[17088]: Color3dv (offset 12) */ + /* _mesa_function_pool[17267]: Color3dv (offset 12) */ "p\0" "glColor3dv\0" "\0" - /* _mesa_function_pool[17102]: IsTexture (offset 330) */ + /* _mesa_function_pool[17281]: IsTexture (offset 330) */ "i\0" "glIsTexture\0" "glIsTextureEXT\0" "\0" - /* _mesa_function_pool[17132]: VertexWeightfvEXT (dynamic) */ + /* _mesa_function_pool[17311]: VertexWeightfvEXT (dynamic) */ "p\0" "glVertexWeightfvEXT\0" "\0" - /* _mesa_function_pool[17155]: VertexAttrib1dARB (will be remapped) */ + /* _mesa_function_pool[17334]: VertexAttrib1dARB (will be remapped) */ "id\0" "glVertexAttrib1d\0" "glVertexAttrib1dARB\0" "\0" - /* _mesa_function_pool[17196]: ImageTransformParameterivHP (dynamic) */ + /* _mesa_function_pool[17375]: ImageTransformParameterivHP (dynamic) */ "iip\0" "glImageTransformParameterivHP\0" "\0" - /* _mesa_function_pool[17231]: TexCoord4i (offset 122) */ + /* _mesa_function_pool[17410]: TexCoord4i (offset 122) */ "iiii\0" "glTexCoord4i\0" "\0" - /* _mesa_function_pool[17250]: DeleteQueriesARB (will be remapped) */ + /* _mesa_function_pool[17429]: DeleteQueriesARB (will be remapped) */ "ip\0" "glDeleteQueries\0" "glDeleteQueriesARB\0" "\0" - /* _mesa_function_pool[17289]: Color4ubVertex2fSUN (dynamic) */ + /* _mesa_function_pool[17468]: Color4ubVertex2fSUN (dynamic) */ "iiiiff\0" "glColor4ubVertex2fSUN\0" "\0" - /* _mesa_function_pool[17319]: FragmentColorMaterialSGIX (dynamic) */ + /* _mesa_function_pool[17498]: FragmentColorMaterialSGIX (dynamic) */ "ii\0" "glFragmentColorMaterialSGIX\0" "\0" - /* _mesa_function_pool[17351]: CurrentPaletteMatrixARB (dynamic) */ + /* _mesa_function_pool[17530]: CurrentPaletteMatrixARB (dynamic) */ "i\0" "glCurrentPaletteMatrixARB\0" "\0" - /* _mesa_function_pool[17380]: GetMapdv (offset 266) */ + /* _mesa_function_pool[17559]: GetMapdv (offset 266) */ "iip\0" "glGetMapdv\0" "\0" - /* _mesa_function_pool[17396]: SamplePatternSGIS (will be remapped) */ + /* _mesa_function_pool[17575]: ObjectPurgeableAPPLE (will be remapped) */ + "iii\0" + "glObjectPurgeableAPPLE\0" + "\0" + /* _mesa_function_pool[17603]: SamplePatternSGIS (will be remapped) */ "i\0" "glSamplePatternSGIS\0" "glSamplePatternEXT\0" "\0" - /* _mesa_function_pool[17438]: PixelStoref (offset 249) */ + /* _mesa_function_pool[17645]: PixelStoref (offset 249) */ "if\0" "glPixelStoref\0" "\0" - /* _mesa_function_pool[17456]: IsQueryARB (will be remapped) */ + /* _mesa_function_pool[17663]: IsQueryARB (will be remapped) */ "i\0" "glIsQuery\0" "glIsQueryARB\0" "\0" - /* _mesa_function_pool[17482]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */ + /* _mesa_function_pool[17689]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */ "iiiiifff\0" "glReplacementCodeuiColor4ubVertex3fSUN\0" "\0" - /* _mesa_function_pool[17531]: PixelStorei (offset 250) */ + /* _mesa_function_pool[17738]: PixelStorei (offset 250) */ "ii\0" "glPixelStorei\0" "\0" - /* _mesa_function_pool[17549]: VertexAttrib4usvARB (will be remapped) */ + /* _mesa_function_pool[17756]: VertexAttrib4usvARB (will be remapped) */ "ip\0" "glVertexAttrib4usv\0" "glVertexAttrib4usvARB\0" "\0" - /* _mesa_function_pool[17594]: LinkProgramARB (will be remapped) */ + /* _mesa_function_pool[17801]: LinkProgramARB (will be remapped) */ "i\0" "glLinkProgram\0" "glLinkProgramARB\0" "\0" - /* _mesa_function_pool[17628]: VertexAttrib2fNV (will be remapped) */ + /* _mesa_function_pool[17835]: VertexAttrib2fNV (will be remapped) */ "iff\0" "glVertexAttrib2fNV\0" "\0" - /* _mesa_function_pool[17652]: ShaderSourceARB (will be remapped) */ + /* _mesa_function_pool[17859]: ShaderSourceARB (will be remapped) */ "iipp\0" "glShaderSource\0" "glShaderSourceARB\0" "\0" - /* _mesa_function_pool[17691]: FragmentMaterialiSGIX (dynamic) */ + /* _mesa_function_pool[17898]: FragmentMaterialiSGIX (dynamic) */ "iii\0" "glFragmentMaterialiSGIX\0" "\0" - /* _mesa_function_pool[17720]: EvalCoord2dv (offset 233) */ + /* _mesa_function_pool[17927]: EvalCoord2dv (offset 233) */ "p\0" "glEvalCoord2dv\0" "\0" - /* _mesa_function_pool[17738]: VertexAttrib3svARB (will be remapped) */ + /* _mesa_function_pool[17945]: VertexAttrib3svARB (will be remapped) */ "ip\0" "glVertexAttrib3sv\0" "glVertexAttrib3svARB\0" "\0" - /* _mesa_function_pool[17781]: ColorMaterial (offset 151) */ + /* _mesa_function_pool[17988]: ColorMaterial (offset 151) */ "ii\0" "glColorMaterial\0" "\0" - /* _mesa_function_pool[17801]: CompressedTexSubImage3DARB (will be remapped) */ + /* _mesa_function_pool[18008]: CompressedTexSubImage3DARB (will be remapped) */ "iiiiiiiiiip\0" "glCompressedTexSubImage3D\0" "glCompressedTexSubImage3DARB\0" "\0" - /* _mesa_function_pool[17869]: WindowPos2ivMESA (will be remapped) */ + /* _mesa_function_pool[18076]: WindowPos2ivMESA (will be remapped) */ "p\0" "glWindowPos2iv\0" "glWindowPos2ivARB\0" "glWindowPos2ivMESA\0" "\0" - /* _mesa_function_pool[17924]: IsFramebufferEXT (will be remapped) */ + /* _mesa_function_pool[18131]: IsFramebufferEXT (will be remapped) */ "i\0" "glIsFramebuffer\0" "glIsFramebufferEXT\0" "\0" - /* _mesa_function_pool[17962]: Uniform4ivARB (will be remapped) */ + /* _mesa_function_pool[18169]: Uniform4ivARB (will be remapped) */ "iip\0" "glUniform4iv\0" "glUniform4ivARB\0" "\0" - /* _mesa_function_pool[17996]: GetVertexAttribdvARB (will be remapped) */ + /* _mesa_function_pool[18203]: GetVertexAttribdvARB (will be remapped) */ "iip\0" "glGetVertexAttribdv\0" "glGetVertexAttribdvARB\0" "\0" - /* _mesa_function_pool[18044]: TexBumpParameterivATI (will be remapped) */ + /* _mesa_function_pool[18251]: TexBumpParameterivATI (will be remapped) */ "ip\0" "glTexBumpParameterivATI\0" "\0" - /* _mesa_function_pool[18072]: GetSeparableFilter (offset 359) */ + /* _mesa_function_pool[18279]: GetSeparableFilter (offset 359) */ "iiippp\0" "glGetSeparableFilter\0" "glGetSeparableFilterEXT\0" "\0" - /* _mesa_function_pool[18125]: Binormal3dEXT (dynamic) */ + /* _mesa_function_pool[18332]: Binormal3dEXT (dynamic) */ "ddd\0" "glBinormal3dEXT\0" "\0" - /* _mesa_function_pool[18146]: SpriteParameteriSGIX (dynamic) */ + /* _mesa_function_pool[18353]: SpriteParameteriSGIX (dynamic) */ "ii\0" "glSpriteParameteriSGIX\0" "\0" - /* _mesa_function_pool[18173]: RequestResidentProgramsNV (will be remapped) */ + /* _mesa_function_pool[18380]: RequestResidentProgramsNV (will be remapped) */ "ip\0" "glRequestResidentProgramsNV\0" "\0" - /* _mesa_function_pool[18205]: TagSampleBufferSGIX (dynamic) */ + /* _mesa_function_pool[18412]: TagSampleBufferSGIX (dynamic) */ "\0" "glTagSampleBufferSGIX\0" "\0" - /* _mesa_function_pool[18229]: ReplacementCodeusSUN (dynamic) */ + /* _mesa_function_pool[18436]: ReplacementCodeusSUN (dynamic) */ "i\0" "glReplacementCodeusSUN\0" "\0" - /* _mesa_function_pool[18255]: FeedbackBuffer (offset 194) */ + /* _mesa_function_pool[18462]: FeedbackBuffer (offset 194) */ "iip\0" "glFeedbackBuffer\0" "\0" - /* _mesa_function_pool[18277]: RasterPos2iv (offset 67) */ + /* _mesa_function_pool[18484]: RasterPos2iv (offset 67) */ "p\0" "glRasterPos2iv\0" "\0" - /* _mesa_function_pool[18295]: TexImage1D (offset 182) */ + /* _mesa_function_pool[18502]: TexImage1D (offset 182) */ "iiiiiiip\0" "glTexImage1D\0" "\0" - /* _mesa_function_pool[18318]: ListParameterivSGIX (dynamic) */ + /* _mesa_function_pool[18525]: ListParameterivSGIX (dynamic) */ "iip\0" "glListParameterivSGIX\0" "\0" - /* _mesa_function_pool[18345]: MultiDrawElementsEXT (will be remapped) */ + /* _mesa_function_pool[18552]: MultiDrawElementsEXT (will be remapped) */ "ipipi\0" "glMultiDrawElements\0" "glMultiDrawElementsEXT\0" "\0" - /* _mesa_function_pool[18395]: Color3s (offset 17) */ + /* _mesa_function_pool[18602]: Color3s (offset 17) */ "iii\0" "glColor3s\0" "\0" - /* _mesa_function_pool[18410]: Uniform1ivARB (will be remapped) */ + /* _mesa_function_pool[18617]: Uniform1ivARB (will be remapped) */ "iip\0" "glUniform1iv\0" "glUniform1ivARB\0" "\0" - /* _mesa_function_pool[18444]: WindowPos2sMESA (will be remapped) */ + /* _mesa_function_pool[18651]: WindowPos2sMESA (will be remapped) */ "ii\0" "glWindowPos2s\0" "glWindowPos2sARB\0" "glWindowPos2sMESA\0" "\0" - /* _mesa_function_pool[18497]: WeightusvARB (dynamic) */ + /* _mesa_function_pool[18704]: WeightusvARB (dynamic) */ "ip\0" "glWeightusvARB\0" "\0" - /* _mesa_function_pool[18516]: TexCoordPointer (offset 320) */ + /* _mesa_function_pool[18723]: TexCoordPointer (offset 320) */ "iiip\0" "glTexCoordPointer\0" "\0" - /* _mesa_function_pool[18540]: FogCoordPointerEXT (will be remapped) */ + /* _mesa_function_pool[18747]: FogCoordPointerEXT (will be remapped) */ "iip\0" "glFogCoordPointer\0" "glFogCoordPointerEXT\0" "\0" - /* _mesa_function_pool[18584]: IndexMaterialEXT (dynamic) */ + /* _mesa_function_pool[18791]: IndexMaterialEXT (dynamic) */ "ii\0" "glIndexMaterialEXT\0" "\0" - /* _mesa_function_pool[18607]: Color3i (offset 15) */ + /* _mesa_function_pool[18814]: Color3i (offset 15) */ "iii\0" "glColor3i\0" "\0" - /* _mesa_function_pool[18622]: FrontFace (offset 157) */ + /* _mesa_function_pool[18829]: FrontFace (offset 157) */ "i\0" "glFrontFace\0" "\0" - /* _mesa_function_pool[18637]: EvalCoord2d (offset 232) */ + /* _mesa_function_pool[18844]: EvalCoord2d (offset 232) */ "dd\0" "glEvalCoord2d\0" "\0" - /* _mesa_function_pool[18655]: SecondaryColor3ubvEXT (will be remapped) */ + /* _mesa_function_pool[18862]: SecondaryColor3ubvEXT (will be remapped) */ "p\0" "glSecondaryColor3ubv\0" "glSecondaryColor3ubvEXT\0" "\0" - /* _mesa_function_pool[18703]: EvalCoord2f (offset 234) */ + /* _mesa_function_pool[18910]: EvalCoord2f (offset 234) */ "ff\0" "glEvalCoord2f\0" "\0" - /* _mesa_function_pool[18721]: VertexAttrib4dvARB (will be remapped) */ + /* _mesa_function_pool[18928]: VertexAttrib4dvARB (will be remapped) */ "ip\0" "glVertexAttrib4dv\0" "glVertexAttrib4dvARB\0" "\0" - /* _mesa_function_pool[18764]: BindAttribLocationARB (will be remapped) */ + /* _mesa_function_pool[18971]: BindAttribLocationARB (will be remapped) */ "iip\0" "glBindAttribLocation\0" "glBindAttribLocationARB\0" "\0" - /* _mesa_function_pool[18814]: Color3b (offset 9) */ + /* _mesa_function_pool[19021]: Color3b (offset 9) */ "iii\0" "glColor3b\0" "\0" - /* _mesa_function_pool[18829]: MultiTexCoord2dARB (offset 384) */ + /* _mesa_function_pool[19036]: MultiTexCoord2dARB (offset 384) */ "idd\0" "glMultiTexCoord2d\0" "glMultiTexCoord2dARB\0" "\0" - /* _mesa_function_pool[18873]: ExecuteProgramNV (will be remapped) */ + /* _mesa_function_pool[19080]: ExecuteProgramNV (will be remapped) */ "iip\0" "glExecuteProgramNV\0" "\0" - /* _mesa_function_pool[18897]: Color3f (offset 13) */ + /* _mesa_function_pool[19104]: Color3f (offset 13) */ "fff\0" "glColor3f\0" "\0" - /* _mesa_function_pool[18912]: LightEnviSGIX (dynamic) */ + /* _mesa_function_pool[19119]: LightEnviSGIX (dynamic) */ "ii\0" "glLightEnviSGIX\0" "\0" - /* _mesa_function_pool[18932]: Color3d (offset 11) */ + /* _mesa_function_pool[19139]: Color3d (offset 11) */ "ddd\0" "glColor3d\0" "\0" - /* _mesa_function_pool[18947]: Normal3dv (offset 55) */ + /* _mesa_function_pool[19154]: Normal3dv (offset 55) */ "p\0" "glNormal3dv\0" "\0" - /* _mesa_function_pool[18962]: Lightf (offset 159) */ + /* _mesa_function_pool[19169]: Lightf (offset 159) */ "iif\0" "glLightf\0" "\0" - /* _mesa_function_pool[18976]: ReplacementCodeuiSUN (dynamic) */ + /* _mesa_function_pool[19183]: ReplacementCodeuiSUN (dynamic) */ "i\0" "glReplacementCodeuiSUN\0" "\0" - /* _mesa_function_pool[19002]: MatrixMode (offset 293) */ + /* _mesa_function_pool[19209]: MatrixMode (offset 293) */ "i\0" "glMatrixMode\0" "\0" - /* _mesa_function_pool[19018]: GetPixelMapusv (offset 273) */ + /* _mesa_function_pool[19225]: GetPixelMapusv (offset 273) */ "ip\0" "glGetPixelMapusv\0" "\0" - /* _mesa_function_pool[19039]: Lighti (offset 161) */ + /* _mesa_function_pool[19246]: Lighti (offset 161) */ "iii\0" "glLighti\0" "\0" - /* _mesa_function_pool[19053]: VertexAttribPointerNV (will be remapped) */ + /* _mesa_function_pool[19260]: VertexAttribPointerNV (will be remapped) */ "iiiip\0" "glVertexAttribPointerNV\0" "\0" - /* _mesa_function_pool[19084]: GetFramebufferAttachmentParameterivEXT (will be remapped) */ + /* _mesa_function_pool[19291]: GetBooleanIndexedvEXT (will be remapped) */ + "iip\0" + "glGetBooleanIndexedvEXT\0" + "\0" + /* _mesa_function_pool[19320]: GetFramebufferAttachmentParameterivEXT (will be remapped) */ "iiip\0" "glGetFramebufferAttachmentParameteriv\0" "glGetFramebufferAttachmentParameterivEXT\0" "\0" - /* _mesa_function_pool[19169]: PixelTransformParameterfEXT (dynamic) */ + /* _mesa_function_pool[19405]: PixelTransformParameterfEXT (dynamic) */ "iif\0" "glPixelTransformParameterfEXT\0" "\0" - /* _mesa_function_pool[19204]: MultiTexCoord4dvARB (offset 401) */ + /* _mesa_function_pool[19440]: MultiTexCoord4dvARB (offset 401) */ "ip\0" "glMultiTexCoord4dv\0" "glMultiTexCoord4dvARB\0" "\0" - /* _mesa_function_pool[19249]: PixelTransformParameteriEXT (dynamic) */ + /* _mesa_function_pool[19485]: PixelTransformParameteriEXT (dynamic) */ "iii\0" "glPixelTransformParameteriEXT\0" "\0" - /* _mesa_function_pool[19284]: GetDoublev (offset 260) */ + /* _mesa_function_pool[19520]: GetDoublev (offset 260) */ "ip\0" "glGetDoublev\0" "\0" - /* _mesa_function_pool[19301]: MultMatrixd (offset 295) */ + /* _mesa_function_pool[19537]: MultMatrixd (offset 295) */ "p\0" "glMultMatrixd\0" "\0" - /* _mesa_function_pool[19318]: MultMatrixf (offset 294) */ + /* _mesa_function_pool[19554]: MultMatrixf (offset 294) */ "p\0" "glMultMatrixf\0" "\0" - /* _mesa_function_pool[19335]: TexCoord2fColor4ubVertex3fSUN (dynamic) */ + /* _mesa_function_pool[19571]: TexCoord2fColor4ubVertex3fSUN (dynamic) */ "ffiiiifff\0" "glTexCoord2fColor4ubVertex3fSUN\0" "\0" - /* _mesa_function_pool[19378]: Uniform1iARB (will be remapped) */ + /* _mesa_function_pool[19614]: Uniform1iARB (will be remapped) */ "ii\0" "glUniform1i\0" "glUniform1iARB\0" "\0" - /* _mesa_function_pool[19409]: VertexAttribPointerARB (will be remapped) */ + /* _mesa_function_pool[19645]: VertexAttribPointerARB (will be remapped) */ "iiiiip\0" "glVertexAttribPointer\0" "glVertexAttribPointerARB\0" "\0" - /* _mesa_function_pool[19464]: SharpenTexFuncSGIS (dynamic) */ + /* _mesa_function_pool[19700]: SharpenTexFuncSGIS (dynamic) */ "iip\0" "glSharpenTexFuncSGIS\0" "\0" - /* _mesa_function_pool[19490]: MultiTexCoord4fvARB (offset 403) */ + /* _mesa_function_pool[19726]: MultiTexCoord4fvARB (offset 403) */ "ip\0" "glMultiTexCoord4fv\0" "glMultiTexCoord4fvARB\0" "\0" - /* _mesa_function_pool[19535]: UniformMatrix2x3fv (will be remapped) */ + /* _mesa_function_pool[19771]: UniformMatrix2x3fv (will be remapped) */ "iiip\0" "glUniformMatrix2x3fv\0" "\0" - /* _mesa_function_pool[19562]: TrackMatrixNV (will be remapped) */ + /* _mesa_function_pool[19798]: TrackMatrixNV (will be remapped) */ "iiii\0" "glTrackMatrixNV\0" "\0" - /* _mesa_function_pool[19584]: CombinerParameteriNV (will be remapped) */ + /* _mesa_function_pool[19820]: CombinerParameteriNV (will be remapped) */ "ii\0" "glCombinerParameteriNV\0" "\0" - /* _mesa_function_pool[19611]: DeleteAsyncMarkersSGIX (dynamic) */ + /* _mesa_function_pool[19847]: DeleteAsyncMarkersSGIX (dynamic) */ "ii\0" "glDeleteAsyncMarkersSGIX\0" "\0" - /* _mesa_function_pool[19640]: IsAsyncMarkerSGIX (dynamic) */ + /* _mesa_function_pool[19876]: IsAsyncMarkerSGIX (dynamic) */ "i\0" "glIsAsyncMarkerSGIX\0" "\0" - /* _mesa_function_pool[19663]: FrameZoomSGIX (dynamic) */ + /* _mesa_function_pool[19899]: FrameZoomSGIX (dynamic) */ "i\0" "glFrameZoomSGIX\0" "\0" - /* _mesa_function_pool[19682]: Normal3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[19918]: Normal3fVertex3fvSUN (dynamic) */ "pp\0" "glNormal3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[19709]: RasterPos4sv (offset 85) */ + /* _mesa_function_pool[19945]: RasterPos4sv (offset 85) */ "p\0" "glRasterPos4sv\0" "\0" - /* _mesa_function_pool[19727]: VertexAttrib4NsvARB (will be remapped) */ + /* _mesa_function_pool[19963]: VertexAttrib4NsvARB (will be remapped) */ "ip\0" "glVertexAttrib4Nsv\0" "glVertexAttrib4NsvARB\0" "\0" - /* _mesa_function_pool[19772]: VertexAttrib3fvARB (will be remapped) */ + /* _mesa_function_pool[20008]: VertexAttrib3fvARB (will be remapped) */ "ip\0" "glVertexAttrib3fv\0" "glVertexAttrib3fvARB\0" "\0" - /* _mesa_function_pool[19815]: ClearColor (offset 206) */ + /* _mesa_function_pool[20051]: ClearColor (offset 206) */ "ffff\0" "glClearColor\0" "\0" - /* _mesa_function_pool[19834]: GetSynciv (will be remapped) */ + /* _mesa_function_pool[20070]: GetSynciv (will be remapped) */ "iiipp\0" "glGetSynciv\0" "\0" - /* _mesa_function_pool[19853]: DeleteFramebuffersEXT (will be remapped) */ + /* _mesa_function_pool[20089]: DeleteFramebuffersEXT (will be remapped) */ "ip\0" "glDeleteFramebuffers\0" "glDeleteFramebuffersEXT\0" "\0" - /* _mesa_function_pool[19902]: GlobalAlphaFactorsSUN (dynamic) */ + /* _mesa_function_pool[20138]: GlobalAlphaFactorsSUN (dynamic) */ "i\0" "glGlobalAlphaFactorsSUN\0" "\0" - /* _mesa_function_pool[19929]: TexEnviv (offset 187) */ + /* _mesa_function_pool[20165]: IsEnabledIndexedEXT (will be remapped) */ + "ii\0" + "glIsEnabledIndexedEXT\0" + "\0" + /* _mesa_function_pool[20191]: TexEnviv (offset 187) */ "iip\0" "glTexEnviv\0" "\0" - /* _mesa_function_pool[19945]: TexSubImage3D (offset 372) */ + /* _mesa_function_pool[20207]: TexSubImage3D (offset 372) */ "iiiiiiiiiip\0" "glTexSubImage3D\0" "glTexSubImage3DEXT\0" "\0" - /* _mesa_function_pool[19993]: Tangent3fEXT (dynamic) */ + /* _mesa_function_pool[20255]: Tangent3fEXT (dynamic) */ "fff\0" "glTangent3fEXT\0" "\0" - /* _mesa_function_pool[20013]: SecondaryColor3uivEXT (will be remapped) */ + /* _mesa_function_pool[20275]: SecondaryColor3uivEXT (will be remapped) */ "p\0" "glSecondaryColor3uiv\0" "glSecondaryColor3uivEXT\0" "\0" - /* _mesa_function_pool[20061]: MatrixIndexubvARB (dynamic) */ + /* _mesa_function_pool[20323]: MatrixIndexubvARB (dynamic) */ "ip\0" "glMatrixIndexubvARB\0" "\0" - /* _mesa_function_pool[20085]: Color4fNormal3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[20347]: Color4fNormal3fVertex3fSUN (dynamic) */ "ffffffffff\0" "glColor4fNormal3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[20126]: PixelTexGenParameterfSGIS (will be remapped) */ + /* _mesa_function_pool[20388]: PixelTexGenParameterfSGIS (will be remapped) */ "if\0" "glPixelTexGenParameterfSGIS\0" "\0" - /* _mesa_function_pool[20158]: CreateShader (will be remapped) */ + /* _mesa_function_pool[20420]: CreateShader (will be remapped) */ "i\0" "glCreateShader\0" "\0" - /* _mesa_function_pool[20176]: GetColorTableParameterfv (offset 344) */ + /* _mesa_function_pool[20438]: GetColorTableParameterfv (offset 344) */ "iip\0" "glGetColorTableParameterfv\0" "glGetColorTableParameterfvSGI\0" "glGetColorTableParameterfvEXT\0" "\0" - /* _mesa_function_pool[20268]: FragmentLightModelfvSGIX (dynamic) */ + /* _mesa_function_pool[20530]: FragmentLightModelfvSGIX (dynamic) */ "ip\0" "glFragmentLightModelfvSGIX\0" "\0" - /* _mesa_function_pool[20299]: Bitmap (offset 8) */ + /* _mesa_function_pool[20561]: Bitmap (offset 8) */ "iiffffp\0" "glBitmap\0" "\0" - /* _mesa_function_pool[20317]: MultiTexCoord3fARB (offset 394) */ + /* _mesa_function_pool[20579]: MultiTexCoord3fARB (offset 394) */ "ifff\0" "glMultiTexCoord3f\0" "glMultiTexCoord3fARB\0" "\0" - /* _mesa_function_pool[20362]: GetTexLevelParameterfv (offset 284) */ + /* _mesa_function_pool[20624]: GetTexLevelParameterfv (offset 284) */ "iiip\0" "glGetTexLevelParameterfv\0" "\0" - /* _mesa_function_pool[20393]: GetPixelTexGenParameterfvSGIS (will be remapped) */ + /* _mesa_function_pool[20655]: GetPixelTexGenParameterfvSGIS (will be remapped) */ "ip\0" "glGetPixelTexGenParameterfvSGIS\0" "\0" - /* _mesa_function_pool[20429]: GenFramebuffersEXT (will be remapped) */ + /* _mesa_function_pool[20691]: GenFramebuffersEXT (will be remapped) */ "ip\0" "glGenFramebuffers\0" "glGenFramebuffersEXT\0" "\0" - /* _mesa_function_pool[20472]: GetProgramParameterdvNV (will be remapped) */ + /* _mesa_function_pool[20734]: GetProgramParameterdvNV (will be remapped) */ "iiip\0" "glGetProgramParameterdvNV\0" "\0" - /* _mesa_function_pool[20504]: Vertex2sv (offset 133) */ + /* _mesa_function_pool[20766]: Vertex2sv (offset 133) */ "p\0" "glVertex2sv\0" "\0" - /* _mesa_function_pool[20519]: GetIntegerv (offset 263) */ + /* _mesa_function_pool[20781]: GetIntegerv (offset 263) */ "ip\0" "glGetIntegerv\0" "\0" - /* _mesa_function_pool[20537]: IsVertexArrayAPPLE (will be remapped) */ + /* _mesa_function_pool[20799]: IsVertexArrayAPPLE (will be remapped) */ "i\0" "glIsVertexArray\0" "glIsVertexArrayAPPLE\0" "\0" - /* _mesa_function_pool[20577]: FragmentLightfvSGIX (dynamic) */ + /* _mesa_function_pool[20839]: FragmentLightfvSGIX (dynamic) */ "iip\0" "glFragmentLightfvSGIX\0" "\0" - /* _mesa_function_pool[20604]: DetachShader (will be remapped) */ + /* _mesa_function_pool[20866]: DetachShader (will be remapped) */ "ii\0" "glDetachShader\0" "\0" - /* _mesa_function_pool[20623]: VertexAttrib4NubARB (will be remapped) */ + /* _mesa_function_pool[20885]: VertexAttrib4NubARB (will be remapped) */ "iiiii\0" "glVertexAttrib4Nub\0" "glVertexAttrib4NubARB\0" "\0" - /* _mesa_function_pool[20671]: GetProgramEnvParameterfvARB (will be remapped) */ + /* _mesa_function_pool[20933]: GetProgramEnvParameterfvARB (will be remapped) */ "iip\0" "glGetProgramEnvParameterfvARB\0" "\0" - /* _mesa_function_pool[20706]: GetTrackMatrixivNV (will be remapped) */ + /* _mesa_function_pool[20968]: GetTrackMatrixivNV (will be remapped) */ "iiip\0" "glGetTrackMatrixivNV\0" "\0" - /* _mesa_function_pool[20733]: VertexAttrib3svNV (will be remapped) */ + /* _mesa_function_pool[20995]: VertexAttrib3svNV (will be remapped) */ "ip\0" "glVertexAttrib3svNV\0" "\0" - /* _mesa_function_pool[20757]: Uniform4fvARB (will be remapped) */ + /* _mesa_function_pool[21019]: Uniform4fvARB (will be remapped) */ "iip\0" "glUniform4fv\0" "glUniform4fvARB\0" "\0" - /* _mesa_function_pool[20791]: MultTransposeMatrixfARB (will be remapped) */ + /* _mesa_function_pool[21053]: MultTransposeMatrixfARB (will be remapped) */ "p\0" "glMultTransposeMatrixf\0" "glMultTransposeMatrixfARB\0" "\0" - /* _mesa_function_pool[20843]: GetTexEnviv (offset 277) */ + /* _mesa_function_pool[21105]: GetTexEnviv (offset 277) */ "iip\0" "glGetTexEnviv\0" "\0" - /* _mesa_function_pool[20862]: ColorFragmentOp1ATI (will be remapped) */ + /* _mesa_function_pool[21124]: ColorFragmentOp1ATI (will be remapped) */ "iiiiiii\0" "glColorFragmentOp1ATI\0" "\0" - /* _mesa_function_pool[20893]: GetUniformfvARB (will be remapped) */ + /* _mesa_function_pool[21155]: GetUniformfvARB (will be remapped) */ "iip\0" "glGetUniformfv\0" "glGetUniformfvARB\0" "\0" - /* _mesa_function_pool[20931]: PopClientAttrib (offset 334) */ + /* _mesa_function_pool[21193]: EGLImageTargetRenderbufferStorageOES (will be remapped) */ + "ip\0" + "glEGLImageTargetRenderbufferStorageOES\0" + "\0" + /* _mesa_function_pool[21236]: PopClientAttrib (offset 334) */ "\0" "glPopClientAttrib\0" "\0" - /* _mesa_function_pool[20951]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[21256]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */ "iffffffffffff\0" "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[21022]: DetachObjectARB (will be remapped) */ + /* _mesa_function_pool[21327]: DetachObjectARB (will be remapped) */ "ii\0" "glDetachObjectARB\0" "\0" - /* _mesa_function_pool[21044]: VertexBlendARB (dynamic) */ + /* _mesa_function_pool[21349]: VertexBlendARB (dynamic) */ "i\0" "glVertexBlendARB\0" "\0" - /* _mesa_function_pool[21064]: WindowPos3iMESA (will be remapped) */ + /* _mesa_function_pool[21369]: WindowPos3iMESA (will be remapped) */ "iii\0" "glWindowPos3i\0" "glWindowPos3iARB\0" "glWindowPos3iMESA\0" "\0" - /* _mesa_function_pool[21118]: SeparableFilter2D (offset 360) */ + /* _mesa_function_pool[21423]: SeparableFilter2D (offset 360) */ "iiiiiipp\0" "glSeparableFilter2D\0" "glSeparableFilter2DEXT\0" "\0" - /* _mesa_function_pool[21171]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[21476]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */ "ppp\0" "glReplacementCodeuiColor4ubVertex3fvSUN\0" "\0" - /* _mesa_function_pool[21216]: Map1d (offset 220) */ + /* _mesa_function_pool[21521]: Map1d (offset 220) */ "iddiip\0" "glMap1d\0" "\0" - /* _mesa_function_pool[21232]: Map1f (offset 221) */ + /* _mesa_function_pool[21537]: Map1f (offset 221) */ "iffiip\0" "glMap1f\0" "\0" - /* _mesa_function_pool[21248]: CompressedTexImage2DARB (will be remapped) */ + /* _mesa_function_pool[21553]: CompressedTexImage2DARB (will be remapped) */ "iiiiiiip\0" "glCompressedTexImage2D\0" "glCompressedTexImage2DARB\0" "\0" - /* _mesa_function_pool[21307]: ArrayElement (offset 306) */ + /* _mesa_function_pool[21612]: ArrayElement (offset 306) */ "i\0" "glArrayElement\0" "glArrayElementEXT\0" "\0" - /* _mesa_function_pool[21343]: TexImage2D (offset 183) */ + /* _mesa_function_pool[21648]: TexImage2D (offset 183) */ "iiiiiiiip\0" "glTexImage2D\0" "\0" - /* _mesa_function_pool[21367]: DepthBoundsEXT (will be remapped) */ + /* _mesa_function_pool[21672]: DepthBoundsEXT (will be remapped) */ "dd\0" "glDepthBoundsEXT\0" "\0" - /* _mesa_function_pool[21388]: ProgramParameters4fvNV (will be remapped) */ + /* _mesa_function_pool[21693]: ProgramParameters4fvNV (will be remapped) */ "iiip\0" "glProgramParameters4fvNV\0" "\0" - /* _mesa_function_pool[21419]: DeformationMap3fSGIX (dynamic) */ + /* _mesa_function_pool[21724]: DeformationMap3fSGIX (dynamic) */ "iffiiffiiffiip\0" "glDeformationMap3fSGIX\0" "\0" - /* _mesa_function_pool[21458]: GetProgramivNV (will be remapped) */ + /* _mesa_function_pool[21763]: GetProgramivNV (will be remapped) */ "iip\0" "glGetProgramivNV\0" "\0" - /* _mesa_function_pool[21480]: GetMinmaxParameteriv (offset 366) */ + /* _mesa_function_pool[21785]: GetMinmaxParameteriv (offset 366) */ "iip\0" "glGetMinmaxParameteriv\0" "glGetMinmaxParameterivEXT\0" "\0" - /* _mesa_function_pool[21534]: PixelTransferf (offset 247) */ + /* _mesa_function_pool[21839]: PixelTransferf (offset 247) */ "if\0" "glPixelTransferf\0" "\0" - /* _mesa_function_pool[21555]: CopyTexImage1D (offset 323) */ + /* _mesa_function_pool[21860]: CopyTexImage1D (offset 323) */ "iiiiiii\0" "glCopyTexImage1D\0" "glCopyTexImage1DEXT\0" "\0" - /* _mesa_function_pool[21601]: PushMatrix (offset 298) */ + /* _mesa_function_pool[21906]: PushMatrix (offset 298) */ "\0" "glPushMatrix\0" "\0" - /* _mesa_function_pool[21616]: Fogiv (offset 156) */ + /* _mesa_function_pool[21921]: Fogiv (offset 156) */ "ip\0" "glFogiv\0" "\0" - /* _mesa_function_pool[21628]: TexCoord1dv (offset 95) */ + /* _mesa_function_pool[21933]: TexCoord1dv (offset 95) */ "p\0" "glTexCoord1dv\0" "\0" - /* _mesa_function_pool[21645]: AlphaFragmentOp3ATI (will be remapped) */ + /* _mesa_function_pool[21950]: AlphaFragmentOp3ATI (will be remapped) */ "iiiiiiiiiiii\0" "glAlphaFragmentOp3ATI\0" "\0" - /* _mesa_function_pool[21681]: PixelTransferi (offset 248) */ + /* _mesa_function_pool[21986]: PixelTransferi (offset 248) */ "ii\0" "glPixelTransferi\0" "\0" - /* _mesa_function_pool[21702]: GetVertexAttribdvNV (will be remapped) */ + /* _mesa_function_pool[22007]: GetVertexAttribdvNV (will be remapped) */ "iip\0" "glGetVertexAttribdvNV\0" "\0" - /* _mesa_function_pool[21729]: VertexAttrib3fvNV (will be remapped) */ + /* _mesa_function_pool[22034]: VertexAttrib3fvNV (will be remapped) */ "ip\0" "glVertexAttrib3fvNV\0" "\0" - /* _mesa_function_pool[21753]: Rotatef (offset 300) */ + /* _mesa_function_pool[22058]: Rotatef (offset 300) */ "ffff\0" "glRotatef\0" "\0" - /* _mesa_function_pool[21769]: GetFinalCombinerInputParameterivNV (will be remapped) */ + /* _mesa_function_pool[22074]: GetFinalCombinerInputParameterivNV (will be remapped) */ "iip\0" "glGetFinalCombinerInputParameterivNV\0" "\0" - /* _mesa_function_pool[21811]: Vertex3i (offset 138) */ + /* _mesa_function_pool[22116]: Vertex3i (offset 138) */ "iii\0" "glVertex3i\0" "\0" - /* _mesa_function_pool[21827]: Vertex3f (offset 136) */ + /* _mesa_function_pool[22132]: Vertex3f (offset 136) */ "fff\0" "glVertex3f\0" "\0" - /* _mesa_function_pool[21843]: Clear (offset 203) */ + /* _mesa_function_pool[22148]: Clear (offset 203) */ "i\0" "glClear\0" "\0" - /* _mesa_function_pool[21854]: Vertex3d (offset 134) */ + /* _mesa_function_pool[22159]: Vertex3d (offset 134) */ "ddd\0" "glVertex3d\0" "\0" - /* _mesa_function_pool[21870]: GetMapParameterivNV (dynamic) */ + /* _mesa_function_pool[22175]: GetMapParameterivNV (dynamic) */ "iip\0" "glGetMapParameterivNV\0" "\0" - /* _mesa_function_pool[21897]: Uniform4iARB (will be remapped) */ + /* _mesa_function_pool[22202]: Uniform4iARB (will be remapped) */ "iiiii\0" "glUniform4i\0" "glUniform4iARB\0" "\0" - /* _mesa_function_pool[21931]: ReadBuffer (offset 254) */ + /* _mesa_function_pool[22236]: ReadBuffer (offset 254) */ "i\0" "glReadBuffer\0" "\0" - /* _mesa_function_pool[21947]: ConvolutionParameteri (offset 352) */ + /* _mesa_function_pool[22252]: ConvolutionParameteri (offset 352) */ "iii\0" "glConvolutionParameteri\0" "glConvolutionParameteriEXT\0" "\0" - /* _mesa_function_pool[22003]: Ortho (offset 296) */ + /* _mesa_function_pool[22308]: Ortho (offset 296) */ "dddddd\0" "glOrtho\0" "\0" - /* _mesa_function_pool[22019]: Binormal3sEXT (dynamic) */ + /* _mesa_function_pool[22324]: Binormal3sEXT (dynamic) */ "iii\0" "glBinormal3sEXT\0" "\0" - /* _mesa_function_pool[22040]: ListBase (offset 6) */ + /* _mesa_function_pool[22345]: ListBase (offset 6) */ "i\0" "glListBase\0" "\0" - /* _mesa_function_pool[22054]: Vertex3s (offset 140) */ + /* _mesa_function_pool[22359]: Vertex3s (offset 140) */ "iii\0" "glVertex3s\0" "\0" - /* _mesa_function_pool[22070]: ConvolutionParameterf (offset 350) */ + /* _mesa_function_pool[22375]: ConvolutionParameterf (offset 350) */ "iif\0" "glConvolutionParameterf\0" "glConvolutionParameterfEXT\0" "\0" - /* _mesa_function_pool[22126]: GetColorTableParameteriv (offset 345) */ + /* _mesa_function_pool[22431]: GetColorTableParameteriv (offset 345) */ "iip\0" "glGetColorTableParameteriv\0" "glGetColorTableParameterivSGI\0" "glGetColorTableParameterivEXT\0" "\0" - /* _mesa_function_pool[22218]: ProgramEnvParameter4dvARB (will be remapped) */ + /* _mesa_function_pool[22523]: ProgramEnvParameter4dvARB (will be remapped) */ "iip\0" "glProgramEnvParameter4dvARB\0" "glProgramParameter4dvNV\0" "\0" - /* _mesa_function_pool[22275]: ShadeModel (offset 177) */ + /* _mesa_function_pool[22580]: ShadeModel (offset 177) */ "i\0" "glShadeModel\0" "\0" - /* _mesa_function_pool[22291]: VertexAttribs2fvNV (will be remapped) */ + /* _mesa_function_pool[22596]: VertexAttribs2fvNV (will be remapped) */ "iip\0" "glVertexAttribs2fvNV\0" "\0" - /* _mesa_function_pool[22317]: Rectiv (offset 91) */ + /* _mesa_function_pool[22622]: Rectiv (offset 91) */ "pp\0" "glRectiv\0" "\0" - /* _mesa_function_pool[22330]: UseProgramObjectARB (will be remapped) */ + /* _mesa_function_pool[22635]: UseProgramObjectARB (will be remapped) */ "i\0" "glUseProgram\0" "glUseProgramObjectARB\0" "\0" - /* _mesa_function_pool[22368]: GetMapParameterfvNV (dynamic) */ + /* _mesa_function_pool[22673]: GetMapParameterfvNV (dynamic) */ "iip\0" "glGetMapParameterfvNV\0" "\0" - /* _mesa_function_pool[22395]: PassTexCoordATI (will be remapped) */ + /* _mesa_function_pool[22700]: EndConditionalRenderNV (will be remapped) */ + "\0" + "glEndConditionalRenderNV\0" + "\0" + /* _mesa_function_pool[22727]: PassTexCoordATI (will be remapped) */ "iii\0" "glPassTexCoordATI\0" "\0" - /* _mesa_function_pool[22418]: DeleteProgram (will be remapped) */ + /* _mesa_function_pool[22750]: DeleteProgram (will be remapped) */ "i\0" "glDeleteProgram\0" "\0" - /* _mesa_function_pool[22437]: Tangent3ivEXT (dynamic) */ + /* _mesa_function_pool[22769]: Tangent3ivEXT (dynamic) */ "p\0" "glTangent3ivEXT\0" "\0" - /* _mesa_function_pool[22456]: Tangent3dEXT (dynamic) */ + /* _mesa_function_pool[22788]: Tangent3dEXT (dynamic) */ "ddd\0" "glTangent3dEXT\0" "\0" - /* _mesa_function_pool[22476]: SecondaryColor3dvEXT (will be remapped) */ + /* _mesa_function_pool[22808]: SecondaryColor3dvEXT (will be remapped) */ "p\0" "glSecondaryColor3dv\0" "glSecondaryColor3dvEXT\0" "\0" - /* _mesa_function_pool[22522]: Vertex2fv (offset 129) */ + /* _mesa_function_pool[22854]: Vertex2fv (offset 129) */ "p\0" "glVertex2fv\0" "\0" - /* _mesa_function_pool[22537]: MultiDrawArraysEXT (will be remapped) */ + /* _mesa_function_pool[22869]: MultiDrawArraysEXT (will be remapped) */ "ippi\0" "glMultiDrawArrays\0" "glMultiDrawArraysEXT\0" "\0" - /* _mesa_function_pool[22582]: BindRenderbufferEXT (will be remapped) */ + /* _mesa_function_pool[22914]: BindRenderbufferEXT (will be remapped) */ "ii\0" "glBindRenderbuffer\0" "glBindRenderbufferEXT\0" "\0" - /* _mesa_function_pool[22627]: MultiTexCoord4dARB (offset 400) */ + /* _mesa_function_pool[22959]: MultiTexCoord4dARB (offset 400) */ "idddd\0" "glMultiTexCoord4d\0" "glMultiTexCoord4dARB\0" "\0" - /* _mesa_function_pool[22673]: Vertex3sv (offset 141) */ + /* _mesa_function_pool[23005]: Vertex3sv (offset 141) */ "p\0" "glVertex3sv\0" "\0" - /* _mesa_function_pool[22688]: SecondaryColor3usEXT (will be remapped) */ + /* _mesa_function_pool[23020]: SecondaryColor3usEXT (will be remapped) */ "iii\0" "glSecondaryColor3us\0" "glSecondaryColor3usEXT\0" "\0" - /* _mesa_function_pool[22736]: ProgramLocalParameter4fvARB (will be remapped) */ + /* _mesa_function_pool[23068]: ProgramLocalParameter4fvARB (will be remapped) */ "iip\0" "glProgramLocalParameter4fvARB\0" "\0" - /* _mesa_function_pool[22771]: DeleteProgramsNV (will be remapped) */ + /* _mesa_function_pool[23103]: DeleteProgramsNV (will be remapped) */ "ip\0" "glDeleteProgramsARB\0" "glDeleteProgramsNV\0" "\0" - /* _mesa_function_pool[22814]: EvalMesh1 (offset 236) */ + /* _mesa_function_pool[23146]: EvalMesh1 (offset 236) */ "iii\0" "glEvalMesh1\0" "\0" - /* _mesa_function_pool[22831]: MultiTexCoord1sARB (offset 382) */ + /* _mesa_function_pool[23163]: MultiTexCoord1sARB (offset 382) */ "ii\0" "glMultiTexCoord1s\0" "glMultiTexCoord1sARB\0" "\0" - /* _mesa_function_pool[22874]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */ + /* _mesa_function_pool[23206]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */ "iffffff\0" "glReplacementCodeuiColor3fVertex3fSUN\0" "\0" - /* _mesa_function_pool[22921]: GetVertexAttribPointervNV (will be remapped) */ + /* _mesa_function_pool[23253]: GetVertexAttribPointervNV (will be remapped) */ "iip\0" "glGetVertexAttribPointerv\0" "glGetVertexAttribPointervARB\0" "glGetVertexAttribPointervNV\0" "\0" - /* _mesa_function_pool[23009]: MultiTexCoord1dvARB (offset 377) */ + /* _mesa_function_pool[23341]: DisableIndexedEXT (will be remapped) */ + "ii\0" + "glDisableIndexedEXT\0" + "\0" + /* _mesa_function_pool[23365]: MultiTexCoord1dvARB (offset 377) */ "ip\0" "glMultiTexCoord1dv\0" "glMultiTexCoord1dvARB\0" "\0" - /* _mesa_function_pool[23054]: Uniform2iARB (will be remapped) */ + /* _mesa_function_pool[23410]: Uniform2iARB (will be remapped) */ "iii\0" "glUniform2i\0" "glUniform2iARB\0" "\0" - /* _mesa_function_pool[23086]: Vertex2iv (offset 131) */ + /* _mesa_function_pool[23442]: Vertex2iv (offset 131) */ "p\0" "glVertex2iv\0" "\0" - /* _mesa_function_pool[23101]: GetProgramStringNV (will be remapped) */ + /* _mesa_function_pool[23457]: GetProgramStringNV (will be remapped) */ "iip\0" "glGetProgramStringNV\0" "\0" - /* _mesa_function_pool[23127]: ColorPointerEXT (will be remapped) */ + /* _mesa_function_pool[23483]: ColorPointerEXT (will be remapped) */ "iiiip\0" "glColorPointerEXT\0" "\0" - /* _mesa_function_pool[23152]: LineWidth (offset 168) */ + /* _mesa_function_pool[23508]: LineWidth (offset 168) */ "f\0" "glLineWidth\0" "\0" - /* _mesa_function_pool[23167]: MapBufferARB (will be remapped) */ + /* _mesa_function_pool[23523]: MapBufferARB (will be remapped) */ "ii\0" "glMapBuffer\0" "glMapBufferARB\0" "\0" - /* _mesa_function_pool[23198]: MultiDrawElementsBaseVertex (will be remapped) */ + /* _mesa_function_pool[23554]: MultiDrawElementsBaseVertex (will be remapped) */ "ipipip\0" "glMultiDrawElementsBaseVertex\0" "\0" - /* _mesa_function_pool[23236]: Binormal3svEXT (dynamic) */ + /* _mesa_function_pool[23592]: Binormal3svEXT (dynamic) */ "p\0" "glBinormal3svEXT\0" "\0" - /* _mesa_function_pool[23256]: ApplyTextureEXT (dynamic) */ + /* _mesa_function_pool[23612]: ApplyTextureEXT (dynamic) */ "i\0" "glApplyTextureEXT\0" "\0" - /* _mesa_function_pool[23277]: TexGendv (offset 189) */ + /* _mesa_function_pool[23633]: TexGendv (offset 189) */ "iip\0" "glTexGendv\0" "\0" - /* _mesa_function_pool[23293]: TextureMaterialEXT (dynamic) */ + /* _mesa_function_pool[23649]: EnableIndexedEXT (will be remapped) */ + "ii\0" + "glEnableIndexedEXT\0" + "\0" + /* _mesa_function_pool[23672]: TextureMaterialEXT (dynamic) */ "ii\0" "glTextureMaterialEXT\0" "\0" - /* _mesa_function_pool[23318]: TextureLightEXT (dynamic) */ + /* _mesa_function_pool[23697]: TextureLightEXT (dynamic) */ "i\0" "glTextureLightEXT\0" "\0" - /* _mesa_function_pool[23339]: ResetMinmax (offset 370) */ + /* _mesa_function_pool[23718]: ResetMinmax (offset 370) */ "i\0" "glResetMinmax\0" "glResetMinmaxEXT\0" "\0" - /* _mesa_function_pool[23373]: SpriteParameterfSGIX (dynamic) */ + /* _mesa_function_pool[23752]: SpriteParameterfSGIX (dynamic) */ "if\0" "glSpriteParameterfSGIX\0" "\0" - /* _mesa_function_pool[23400]: EnableClientState (offset 313) */ + /* _mesa_function_pool[23779]: EnableClientState (offset 313) */ "i\0" "glEnableClientState\0" "\0" - /* _mesa_function_pool[23423]: VertexAttrib4sNV (will be remapped) */ + /* _mesa_function_pool[23802]: VertexAttrib4sNV (will be remapped) */ "iiiii\0" "glVertexAttrib4sNV\0" "\0" - /* _mesa_function_pool[23449]: GetConvolutionParameterfv (offset 357) */ + /* _mesa_function_pool[23828]: GetConvolutionParameterfv (offset 357) */ "iip\0" "glGetConvolutionParameterfv\0" "glGetConvolutionParameterfvEXT\0" "\0" - /* _mesa_function_pool[23513]: VertexAttribs4dvNV (will be remapped) */ + /* _mesa_function_pool[23892]: VertexAttribs4dvNV (will be remapped) */ "iip\0" "glVertexAttribs4dvNV\0" "\0" - /* _mesa_function_pool[23539]: MultiModeDrawArraysIBM (will be remapped) */ - "pppii\0" - "glMultiModeDrawArraysIBM\0" - "\0" - /* _mesa_function_pool[23571]: VertexAttrib4dARB (will be remapped) */ + /* _mesa_function_pool[23918]: VertexAttrib4dARB (will be remapped) */ "idddd\0" "glVertexAttrib4d\0" "glVertexAttrib4dARB\0" "\0" - /* _mesa_function_pool[23615]: GetTexBumpParameterfvATI (will be remapped) */ + /* _mesa_function_pool[23962]: GetTexBumpParameterfvATI (will be remapped) */ "ip\0" "glGetTexBumpParameterfvATI\0" "\0" - /* _mesa_function_pool[23646]: ProgramNamedParameter4dNV (will be remapped) */ + /* _mesa_function_pool[23993]: ProgramNamedParameter4dNV (will be remapped) */ "iipdddd\0" "glProgramNamedParameter4dNV\0" "\0" - /* _mesa_function_pool[23683]: GetMaterialfv (offset 269) */ + /* _mesa_function_pool[24030]: GetMaterialfv (offset 269) */ "iip\0" "glGetMaterialfv\0" "\0" - /* _mesa_function_pool[23704]: VertexWeightfEXT (dynamic) */ + /* _mesa_function_pool[24051]: VertexWeightfEXT (dynamic) */ "f\0" "glVertexWeightfEXT\0" "\0" - /* _mesa_function_pool[23726]: Binormal3fEXT (dynamic) */ + /* _mesa_function_pool[24073]: Binormal3fEXT (dynamic) */ "fff\0" "glBinormal3fEXT\0" "\0" - /* _mesa_function_pool[23747]: CallList (offset 2) */ + /* _mesa_function_pool[24094]: CallList (offset 2) */ "i\0" "glCallList\0" "\0" - /* _mesa_function_pool[23761]: Materialfv (offset 170) */ + /* _mesa_function_pool[24108]: Materialfv (offset 170) */ "iip\0" "glMaterialfv\0" "\0" - /* _mesa_function_pool[23779]: TexCoord3fv (offset 113) */ + /* _mesa_function_pool[24126]: TexCoord3fv (offset 113) */ "p\0" "glTexCoord3fv\0" "\0" - /* _mesa_function_pool[23796]: FogCoordfvEXT (will be remapped) */ + /* _mesa_function_pool[24143]: FogCoordfvEXT (will be remapped) */ "p\0" "glFogCoordfv\0" "glFogCoordfvEXT\0" "\0" - /* _mesa_function_pool[23828]: MultiTexCoord1ivARB (offset 381) */ + /* _mesa_function_pool[24175]: MultiTexCoord1ivARB (offset 381) */ "ip\0" "glMultiTexCoord1iv\0" "glMultiTexCoord1ivARB\0" "\0" - /* _mesa_function_pool[23873]: SecondaryColor3ubEXT (will be remapped) */ + /* _mesa_function_pool[24220]: SecondaryColor3ubEXT (will be remapped) */ "iii\0" "glSecondaryColor3ub\0" "glSecondaryColor3ubEXT\0" "\0" - /* _mesa_function_pool[23921]: MultiTexCoord2ivARB (offset 389) */ + /* _mesa_function_pool[24268]: MultiTexCoord2ivARB (offset 389) */ "ip\0" "glMultiTexCoord2iv\0" "glMultiTexCoord2ivARB\0" "\0" - /* _mesa_function_pool[23966]: FogFuncSGIS (dynamic) */ + /* _mesa_function_pool[24313]: FogFuncSGIS (dynamic) */ "ip\0" "glFogFuncSGIS\0" "\0" - /* _mesa_function_pool[23984]: CopyTexSubImage2D (offset 326) */ + /* _mesa_function_pool[24331]: CopyTexSubImage2D (offset 326) */ "iiiiiiii\0" "glCopyTexSubImage2D\0" "glCopyTexSubImage2DEXT\0" "\0" - /* _mesa_function_pool[24037]: GetObjectParameterivARB (will be remapped) */ + /* _mesa_function_pool[24384]: GetObjectParameterivARB (will be remapped) */ "iip\0" "glGetObjectParameterivARB\0" "\0" - /* _mesa_function_pool[24068]: Color3iv (offset 16) */ + /* _mesa_function_pool[24415]: Color3iv (offset 16) */ "p\0" "glColor3iv\0" "\0" - /* _mesa_function_pool[24082]: TexCoord4fVertex4fSUN (dynamic) */ + /* _mesa_function_pool[24429]: TexCoord4fVertex4fSUN (dynamic) */ "ffffffff\0" "glTexCoord4fVertex4fSUN\0" "\0" - /* _mesa_function_pool[24116]: DrawElements (offset 311) */ + /* _mesa_function_pool[24463]: DrawElements (offset 311) */ "iiip\0" "glDrawElements\0" "\0" - /* _mesa_function_pool[24137]: BindVertexArrayAPPLE (will be remapped) */ + /* _mesa_function_pool[24484]: BindVertexArrayAPPLE (will be remapped) */ "i\0" "glBindVertexArrayAPPLE\0" "\0" - /* _mesa_function_pool[24163]: GetProgramLocalParameterdvARB (will be remapped) */ + /* _mesa_function_pool[24510]: GetProgramLocalParameterdvARB (will be remapped) */ "iip\0" "glGetProgramLocalParameterdvARB\0" "\0" - /* _mesa_function_pool[24200]: GetHistogramParameteriv (offset 363) */ + /* _mesa_function_pool[24547]: GetHistogramParameteriv (offset 363) */ "iip\0" "glGetHistogramParameteriv\0" "glGetHistogramParameterivEXT\0" "\0" - /* _mesa_function_pool[24260]: MultiTexCoord1iARB (offset 380) */ + /* _mesa_function_pool[24607]: MultiTexCoord1iARB (offset 380) */ "ii\0" "glMultiTexCoord1i\0" "glMultiTexCoord1iARB\0" "\0" - /* _mesa_function_pool[24303]: GetConvolutionFilter (offset 356) */ + /* _mesa_function_pool[24650]: GetConvolutionFilter (offset 356) */ "iiip\0" "glGetConvolutionFilter\0" "glGetConvolutionFilterEXT\0" "\0" - /* _mesa_function_pool[24358]: GetProgramivARB (will be remapped) */ + /* _mesa_function_pool[24705]: GetProgramivARB (will be remapped) */ "iip\0" "glGetProgramivARB\0" "\0" - /* _mesa_function_pool[24381]: BlendFuncSeparateEXT (will be remapped) */ + /* _mesa_function_pool[24728]: BlendFuncSeparateEXT (will be remapped) */ "iiii\0" "glBlendFuncSeparate\0" "glBlendFuncSeparateEXT\0" "glBlendFuncSeparateINGR\0" "\0" - /* _mesa_function_pool[24454]: MapBufferRange (will be remapped) */ + /* _mesa_function_pool[24801]: MapBufferRange (will be remapped) */ "iiii\0" "glMapBufferRange\0" "\0" - /* _mesa_function_pool[24477]: ProgramParameters4dvNV (will be remapped) */ + /* _mesa_function_pool[24824]: ProgramParameters4dvNV (will be remapped) */ "iiip\0" "glProgramParameters4dvNV\0" "\0" - /* _mesa_function_pool[24508]: TexCoord2fColor3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[24855]: TexCoord2fColor3fVertex3fvSUN (dynamic) */ "ppp\0" "glTexCoord2fColor3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[24545]: EvalPoint2 (offset 239) */ + /* _mesa_function_pool[24892]: EvalPoint2 (offset 239) */ "ii\0" "glEvalPoint2\0" "\0" - /* _mesa_function_pool[24562]: EvalPoint1 (offset 237) */ + /* _mesa_function_pool[24909]: EvalPoint1 (offset 237) */ "i\0" "glEvalPoint1\0" "\0" - /* _mesa_function_pool[24578]: Binormal3dvEXT (dynamic) */ + /* _mesa_function_pool[24925]: Binormal3dvEXT (dynamic) */ "p\0" "glBinormal3dvEXT\0" "\0" - /* _mesa_function_pool[24598]: PopMatrix (offset 297) */ + /* _mesa_function_pool[24945]: PopMatrix (offset 297) */ "\0" "glPopMatrix\0" "\0" - /* _mesa_function_pool[24612]: FinishFenceNV (will be remapped) */ + /* _mesa_function_pool[24959]: FinishFenceNV (will be remapped) */ "i\0" "glFinishFenceNV\0" "\0" - /* _mesa_function_pool[24631]: GetFogFuncSGIS (dynamic) */ + /* _mesa_function_pool[24978]: GetFogFuncSGIS (dynamic) */ "p\0" "glGetFogFuncSGIS\0" "\0" - /* _mesa_function_pool[24651]: GetUniformLocationARB (will be remapped) */ + /* _mesa_function_pool[24998]: GetUniformLocationARB (will be remapped) */ "ip\0" "glGetUniformLocation\0" "glGetUniformLocationARB\0" "\0" - /* _mesa_function_pool[24700]: SecondaryColor3fEXT (will be remapped) */ + /* _mesa_function_pool[25047]: SecondaryColor3fEXT (will be remapped) */ "fff\0" "glSecondaryColor3f\0" "glSecondaryColor3fEXT\0" "\0" - /* _mesa_function_pool[24746]: GetTexGeniv (offset 280) */ + /* _mesa_function_pool[25093]: GetTexGeniv (offset 280) */ "iip\0" "glGetTexGeniv\0" "\0" - /* _mesa_function_pool[24765]: CombinerInputNV (will be remapped) */ + /* _mesa_function_pool[25112]: CombinerInputNV (will be remapped) */ "iiiiii\0" "glCombinerInputNV\0" "\0" - /* _mesa_function_pool[24791]: VertexAttrib3sARB (will be remapped) */ + /* _mesa_function_pool[25138]: VertexAttrib3sARB (will be remapped) */ "iiii\0" "glVertexAttrib3s\0" "glVertexAttrib3sARB\0" "\0" - /* _mesa_function_pool[24834]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */ + /* _mesa_function_pool[25181]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */ "ppp\0" "glReplacementCodeuiNormal3fVertex3fvSUN\0" "\0" - /* _mesa_function_pool[24879]: Map2d (offset 222) */ + /* _mesa_function_pool[25226]: Map2d (offset 222) */ "iddiiddiip\0" "glMap2d\0" "\0" - /* _mesa_function_pool[24899]: Map2f (offset 223) */ + /* _mesa_function_pool[25246]: Map2f (offset 223) */ "iffiiffiip\0" "glMap2f\0" "\0" - /* _mesa_function_pool[24919]: ProgramStringARB (will be remapped) */ + /* _mesa_function_pool[25266]: ProgramStringARB (will be remapped) */ "iiip\0" "glProgramStringARB\0" "\0" - /* _mesa_function_pool[24944]: Vertex4s (offset 148) */ + /* _mesa_function_pool[25291]: Vertex4s (offset 148) */ "iiii\0" "glVertex4s\0" "\0" - /* _mesa_function_pool[24961]: TexCoord4fVertex4fvSUN (dynamic) */ + /* _mesa_function_pool[25308]: TexCoord4fVertex4fvSUN (dynamic) */ "pp\0" "glTexCoord4fVertex4fvSUN\0" "\0" - /* _mesa_function_pool[24990]: VertexAttrib3sNV (will be remapped) */ + /* _mesa_function_pool[25337]: VertexAttrib3sNV (will be remapped) */ "iiii\0" "glVertexAttrib3sNV\0" "\0" - /* _mesa_function_pool[25015]: VertexAttrib1fNV (will be remapped) */ + /* _mesa_function_pool[25362]: VertexAttrib1fNV (will be remapped) */ "if\0" "glVertexAttrib1fNV\0" "\0" - /* _mesa_function_pool[25038]: Vertex4f (offset 144) */ + /* _mesa_function_pool[25385]: Vertex4f (offset 144) */ "ffff\0" "glVertex4f\0" "\0" - /* _mesa_function_pool[25055]: EvalCoord1d (offset 228) */ + /* _mesa_function_pool[25402]: EvalCoord1d (offset 228) */ "d\0" "glEvalCoord1d\0" "\0" - /* _mesa_function_pool[25072]: Vertex4d (offset 142) */ + /* _mesa_function_pool[25419]: Vertex4d (offset 142) */ "dddd\0" "glVertex4d\0" "\0" - /* _mesa_function_pool[25089]: RasterPos4dv (offset 79) */ + /* _mesa_function_pool[25436]: RasterPos4dv (offset 79) */ "p\0" "glRasterPos4dv\0" "\0" - /* _mesa_function_pool[25107]: FragmentLightfSGIX (dynamic) */ + /* _mesa_function_pool[25454]: FragmentLightfSGIX (dynamic) */ "iif\0" "glFragmentLightfSGIX\0" "\0" - /* _mesa_function_pool[25133]: GetCompressedTexImageARB (will be remapped) */ + /* _mesa_function_pool[25480]: GetCompressedTexImageARB (will be remapped) */ "iip\0" "glGetCompressedTexImage\0" "glGetCompressedTexImageARB\0" "\0" - /* _mesa_function_pool[25189]: GetTexGenfv (offset 279) */ + /* _mesa_function_pool[25536]: GetTexGenfv (offset 279) */ "iip\0" "glGetTexGenfv\0" "\0" - /* _mesa_function_pool[25208]: Vertex4i (offset 146) */ + /* _mesa_function_pool[25555]: Vertex4i (offset 146) */ "iiii\0" "glVertex4i\0" "\0" - /* _mesa_function_pool[25225]: VertexWeightPointerEXT (dynamic) */ + /* _mesa_function_pool[25572]: VertexWeightPointerEXT (dynamic) */ "iiip\0" "glVertexWeightPointerEXT\0" "\0" - /* _mesa_function_pool[25256]: GetHistogram (offset 361) */ + /* _mesa_function_pool[25603]: GetHistogram (offset 361) */ "iiiip\0" "glGetHistogram\0" "glGetHistogramEXT\0" "\0" - /* _mesa_function_pool[25296]: ActiveStencilFaceEXT (will be remapped) */ + /* _mesa_function_pool[25643]: ActiveStencilFaceEXT (will be remapped) */ "i\0" "glActiveStencilFaceEXT\0" "\0" - /* _mesa_function_pool[25322]: StencilFuncSeparateATI (will be remapped) */ + /* _mesa_function_pool[25669]: StencilFuncSeparateATI (will be remapped) */ "iiii\0" "glStencilFuncSeparateATI\0" "\0" - /* _mesa_function_pool[25353]: Materialf (offset 169) */ + /* _mesa_function_pool[25700]: Materialf (offset 169) */ "iif\0" "glMaterialf\0" "\0" - /* _mesa_function_pool[25370]: GetShaderSourceARB (will be remapped) */ + /* _mesa_function_pool[25717]: GetShaderSourceARB (will be remapped) */ "iipp\0" "glGetShaderSource\0" "glGetShaderSourceARB\0" "\0" - /* _mesa_function_pool[25415]: IglooInterfaceSGIX (dynamic) */ + /* _mesa_function_pool[25762]: IglooInterfaceSGIX (dynamic) */ "ip\0" "glIglooInterfaceSGIX\0" "\0" - /* _mesa_function_pool[25440]: Materiali (offset 171) */ + /* _mesa_function_pool[25787]: Materiali (offset 171) */ "iii\0" "glMateriali\0" "\0" - /* _mesa_function_pool[25457]: VertexAttrib4dNV (will be remapped) */ + /* _mesa_function_pool[25804]: VertexAttrib4dNV (will be remapped) */ "idddd\0" "glVertexAttrib4dNV\0" "\0" - /* _mesa_function_pool[25483]: MultiModeDrawElementsIBM (will be remapped) */ + /* _mesa_function_pool[25830]: MultiModeDrawElementsIBM (will be remapped) */ "ppipii\0" "glMultiModeDrawElementsIBM\0" "\0" - /* _mesa_function_pool[25518]: Indexsv (offset 51) */ + /* _mesa_function_pool[25865]: Indexsv (offset 51) */ "p\0" "glIndexsv\0" "\0" - /* _mesa_function_pool[25531]: MultiTexCoord4svARB (offset 407) */ + /* _mesa_function_pool[25878]: MultiTexCoord4svARB (offset 407) */ "ip\0" "glMultiTexCoord4sv\0" "glMultiTexCoord4svARB\0" "\0" - /* _mesa_function_pool[25576]: LightModelfv (offset 164) */ + /* _mesa_function_pool[25923]: LightModelfv (offset 164) */ "ip\0" "glLightModelfv\0" "\0" - /* _mesa_function_pool[25595]: TexCoord2dv (offset 103) */ + /* _mesa_function_pool[25942]: TexCoord2dv (offset 103) */ "p\0" "glTexCoord2dv\0" "\0" - /* _mesa_function_pool[25612]: GenQueriesARB (will be remapped) */ + /* _mesa_function_pool[25959]: GenQueriesARB (will be remapped) */ "ip\0" "glGenQueries\0" "glGenQueriesARB\0" "\0" - /* _mesa_function_pool[25645]: EvalCoord1dv (offset 229) */ + /* _mesa_function_pool[25992]: EvalCoord1dv (offset 229) */ "p\0" "glEvalCoord1dv\0" "\0" - /* _mesa_function_pool[25663]: ReplacementCodeuiVertex3fSUN (dynamic) */ + /* _mesa_function_pool[26010]: ReplacementCodeuiVertex3fSUN (dynamic) */ "ifff\0" "glReplacementCodeuiVertex3fSUN\0" "\0" - /* _mesa_function_pool[25700]: Translated (offset 303) */ + /* _mesa_function_pool[26047]: Translated (offset 303) */ "ddd\0" "glTranslated\0" "\0" - /* _mesa_function_pool[25718]: Translatef (offset 304) */ + /* _mesa_function_pool[26065]: Translatef (offset 304) */ "fff\0" "glTranslatef\0" "\0" - /* _mesa_function_pool[25736]: StencilMask (offset 209) */ + /* _mesa_function_pool[26083]: StencilMask (offset 209) */ "i\0" "glStencilMask\0" "\0" - /* _mesa_function_pool[25753]: Tangent3iEXT (dynamic) */ + /* _mesa_function_pool[26100]: Tangent3iEXT (dynamic) */ "iii\0" "glTangent3iEXT\0" "\0" - /* _mesa_function_pool[25773]: GetLightiv (offset 265) */ + /* _mesa_function_pool[26120]: GetLightiv (offset 265) */ "iip\0" "glGetLightiv\0" "\0" - /* _mesa_function_pool[25791]: DrawMeshArraysSUN (dynamic) */ + /* _mesa_function_pool[26138]: DrawMeshArraysSUN (dynamic) */ "iiii\0" "glDrawMeshArraysSUN\0" "\0" - /* _mesa_function_pool[25817]: IsList (offset 287) */ + /* _mesa_function_pool[26164]: IsList (offset 287) */ "i\0" "glIsList\0" "\0" - /* _mesa_function_pool[25829]: IsSync (will be remapped) */ + /* _mesa_function_pool[26176]: IsSync (will be remapped) */ "i\0" "glIsSync\0" "\0" - /* _mesa_function_pool[25841]: RenderMode (offset 196) */ + /* _mesa_function_pool[26188]: RenderMode (offset 196) */ "i\0" "glRenderMode\0" "\0" - /* _mesa_function_pool[25857]: GetMapControlPointsNV (dynamic) */ + /* _mesa_function_pool[26204]: GetMapControlPointsNV (dynamic) */ "iiiiiip\0" "glGetMapControlPointsNV\0" "\0" - /* _mesa_function_pool[25890]: DrawBuffersARB (will be remapped) */ + /* _mesa_function_pool[26237]: DrawBuffersARB (will be remapped) */ "ip\0" "glDrawBuffers\0" "glDrawBuffersARB\0" "glDrawBuffersATI\0" "\0" - /* _mesa_function_pool[25942]: ProgramLocalParameter4fARB (will be remapped) */ + /* _mesa_function_pool[26289]: ProgramLocalParameter4fARB (will be remapped) */ "iiffff\0" "glProgramLocalParameter4fARB\0" "\0" - /* _mesa_function_pool[25979]: SpriteParameterivSGIX (dynamic) */ + /* _mesa_function_pool[26326]: SpriteParameterivSGIX (dynamic) */ "ip\0" "glSpriteParameterivSGIX\0" "\0" - /* _mesa_function_pool[26007]: ProvokingVertexEXT (will be remapped) */ + /* _mesa_function_pool[26354]: ProvokingVertexEXT (will be remapped) */ "i\0" "glProvokingVertexEXT\0" "glProvokingVertex\0" "\0" - /* _mesa_function_pool[26049]: MultiTexCoord1fARB (offset 378) */ + /* _mesa_function_pool[26396]: MultiTexCoord1fARB (offset 378) */ "if\0" "glMultiTexCoord1f\0" "glMultiTexCoord1fARB\0" "\0" - /* _mesa_function_pool[26092]: LoadName (offset 198) */ + /* _mesa_function_pool[26439]: LoadName (offset 198) */ "i\0" "glLoadName\0" "\0" - /* _mesa_function_pool[26106]: VertexAttribs4ubvNV (will be remapped) */ + /* _mesa_function_pool[26453]: VertexAttribs4ubvNV (will be remapped) */ "iip\0" "glVertexAttribs4ubvNV\0" "\0" - /* _mesa_function_pool[26133]: WeightsvARB (dynamic) */ + /* _mesa_function_pool[26480]: WeightsvARB (dynamic) */ "ip\0" "glWeightsvARB\0" "\0" - /* _mesa_function_pool[26151]: Uniform1fvARB (will be remapped) */ + /* _mesa_function_pool[26498]: Uniform1fvARB (will be remapped) */ "iip\0" "glUniform1fv\0" "glUniform1fvARB\0" "\0" - /* _mesa_function_pool[26185]: CopyTexSubImage1D (offset 325) */ + /* _mesa_function_pool[26532]: CopyTexSubImage1D (offset 325) */ "iiiiii\0" "glCopyTexSubImage1D\0" "glCopyTexSubImage1DEXT\0" "\0" - /* _mesa_function_pool[26236]: CullFace (offset 152) */ + /* _mesa_function_pool[26583]: CullFace (offset 152) */ "i\0" "glCullFace\0" "\0" - /* _mesa_function_pool[26250]: BindTexture (offset 307) */ + /* _mesa_function_pool[26597]: BindTexture (offset 307) */ "ii\0" "glBindTexture\0" "glBindTextureEXT\0" "\0" - /* _mesa_function_pool[26285]: BeginFragmentShaderATI (will be remapped) */ + /* _mesa_function_pool[26632]: BeginFragmentShaderATI (will be remapped) */ "\0" "glBeginFragmentShaderATI\0" "\0" - /* _mesa_function_pool[26312]: MultiTexCoord4fARB (offset 402) */ + /* _mesa_function_pool[26659]: MultiTexCoord4fARB (offset 402) */ "iffff\0" "glMultiTexCoord4f\0" "glMultiTexCoord4fARB\0" "\0" - /* _mesa_function_pool[26358]: VertexAttribs3svNV (will be remapped) */ + /* _mesa_function_pool[26705]: VertexAttribs3svNV (will be remapped) */ "iip\0" "glVertexAttribs3svNV\0" "\0" - /* _mesa_function_pool[26384]: StencilFunc (offset 243) */ + /* _mesa_function_pool[26731]: StencilFunc (offset 243) */ "iii\0" "glStencilFunc\0" "\0" - /* _mesa_function_pool[26403]: CopyPixels (offset 255) */ + /* _mesa_function_pool[26750]: CopyPixels (offset 255) */ "iiiii\0" "glCopyPixels\0" "\0" - /* _mesa_function_pool[26423]: Rectsv (offset 93) */ + /* _mesa_function_pool[26770]: Rectsv (offset 93) */ "pp\0" "glRectsv\0" "\0" - /* _mesa_function_pool[26436]: ReplacementCodeuivSUN (dynamic) */ + /* _mesa_function_pool[26783]: ReplacementCodeuivSUN (dynamic) */ "p\0" "glReplacementCodeuivSUN\0" "\0" - /* _mesa_function_pool[26463]: EnableVertexAttribArrayARB (will be remapped) */ + /* _mesa_function_pool[26810]: EnableVertexAttribArrayARB (will be remapped) */ "i\0" "glEnableVertexAttribArray\0" "glEnableVertexAttribArrayARB\0" "\0" - /* _mesa_function_pool[26521]: NormalPointervINTEL (dynamic) */ + /* _mesa_function_pool[26868]: NormalPointervINTEL (dynamic) */ "ip\0" "glNormalPointervINTEL\0" "\0" - /* _mesa_function_pool[26547]: CopyConvolutionFilter2D (offset 355) */ + /* _mesa_function_pool[26894]: CopyConvolutionFilter2D (offset 355) */ "iiiiii\0" "glCopyConvolutionFilter2D\0" "glCopyConvolutionFilter2DEXT\0" "\0" - /* _mesa_function_pool[26610]: WindowPos3ivMESA (will be remapped) */ + /* _mesa_function_pool[26957]: WindowPos3ivMESA (will be remapped) */ "p\0" "glWindowPos3iv\0" "glWindowPos3ivARB\0" "glWindowPos3ivMESA\0" "\0" - /* _mesa_function_pool[26665]: CopyBufferSubData (will be remapped) */ + /* _mesa_function_pool[27012]: CopyBufferSubData (will be remapped) */ "iiiii\0" "glCopyBufferSubData\0" "\0" - /* _mesa_function_pool[26692]: NormalPointer (offset 318) */ + /* _mesa_function_pool[27039]: NormalPointer (offset 318) */ "iip\0" "glNormalPointer\0" "\0" - /* _mesa_function_pool[26713]: TexParameterfv (offset 179) */ + /* _mesa_function_pool[27060]: TexParameterfv (offset 179) */ "iip\0" "glTexParameterfv\0" "\0" - /* _mesa_function_pool[26735]: IsBufferARB (will be remapped) */ + /* _mesa_function_pool[27082]: IsBufferARB (will be remapped) */ "i\0" "glIsBuffer\0" "glIsBufferARB\0" "\0" - /* _mesa_function_pool[26763]: WindowPos4iMESA (will be remapped) */ + /* _mesa_function_pool[27110]: WindowPos4iMESA (will be remapped) */ "iiii\0" "glWindowPos4iMESA\0" "\0" - /* _mesa_function_pool[26787]: VertexAttrib4uivARB (will be remapped) */ + /* _mesa_function_pool[27134]: VertexAttrib4uivARB (will be remapped) */ "ip\0" "glVertexAttrib4uiv\0" "glVertexAttrib4uivARB\0" "\0" - /* _mesa_function_pool[26832]: Tangent3bvEXT (dynamic) */ + /* _mesa_function_pool[27179]: Tangent3bvEXT (dynamic) */ "p\0" "glTangent3bvEXT\0" "\0" - /* _mesa_function_pool[26851]: UniformMatrix3x4fv (will be remapped) */ + /* _mesa_function_pool[27198]: UniformMatrix3x4fv (will be remapped) */ "iiip\0" "glUniformMatrix3x4fv\0" "\0" - /* _mesa_function_pool[26878]: ClipPlane (offset 150) */ + /* _mesa_function_pool[27225]: ClipPlane (offset 150) */ "ip\0" "glClipPlane\0" "\0" - /* _mesa_function_pool[26894]: Recti (offset 90) */ + /* _mesa_function_pool[27241]: Recti (offset 90) */ "iiii\0" "glRecti\0" "\0" - /* _mesa_function_pool[26908]: DrawRangeElementsBaseVertex (will be remapped) */ + /* _mesa_function_pool[27255]: DrawRangeElementsBaseVertex (will be remapped) */ "iiiiipi\0" "glDrawRangeElementsBaseVertex\0" "\0" - /* _mesa_function_pool[26947]: TexCoordPointervINTEL (dynamic) */ + /* _mesa_function_pool[27294]: TexCoordPointervINTEL (dynamic) */ "iip\0" "glTexCoordPointervINTEL\0" "\0" - /* _mesa_function_pool[26976]: DeleteBuffersARB (will be remapped) */ + /* _mesa_function_pool[27323]: DeleteBuffersARB (will be remapped) */ "ip\0" "glDeleteBuffers\0" "glDeleteBuffersARB\0" "\0" - /* _mesa_function_pool[27015]: WindowPos4fvMESA (will be remapped) */ + /* _mesa_function_pool[27362]: WindowPos4fvMESA (will be remapped) */ "p\0" "glWindowPos4fvMESA\0" "\0" - /* _mesa_function_pool[27037]: GetPixelMapuiv (offset 272) */ + /* _mesa_function_pool[27384]: GetPixelMapuiv (offset 272) */ "ip\0" "glGetPixelMapuiv\0" "\0" - /* _mesa_function_pool[27058]: Rectf (offset 88) */ + /* _mesa_function_pool[27405]: Rectf (offset 88) */ "ffff\0" "glRectf\0" "\0" - /* _mesa_function_pool[27072]: VertexAttrib1sNV (will be remapped) */ + /* _mesa_function_pool[27419]: VertexAttrib1sNV (will be remapped) */ "ii\0" "glVertexAttrib1sNV\0" "\0" - /* _mesa_function_pool[27095]: Indexfv (offset 47) */ + /* _mesa_function_pool[27442]: Indexfv (offset 47) */ "p\0" "glIndexfv\0" "\0" - /* _mesa_function_pool[27108]: SecondaryColor3svEXT (will be remapped) */ + /* _mesa_function_pool[27455]: SecondaryColor3svEXT (will be remapped) */ "p\0" "glSecondaryColor3sv\0" "glSecondaryColor3svEXT\0" "\0" - /* _mesa_function_pool[27154]: LoadTransposeMatrixfARB (will be remapped) */ + /* _mesa_function_pool[27501]: LoadTransposeMatrixfARB (will be remapped) */ "p\0" "glLoadTransposeMatrixf\0" "glLoadTransposeMatrixfARB\0" "\0" - /* _mesa_function_pool[27206]: GetPointerv (offset 329) */ + /* _mesa_function_pool[27553]: GetPointerv (offset 329) */ "ip\0" "glGetPointerv\0" "glGetPointervEXT\0" "\0" - /* _mesa_function_pool[27241]: Tangent3bEXT (dynamic) */ + /* _mesa_function_pool[27588]: Tangent3bEXT (dynamic) */ "iii\0" "glTangent3bEXT\0" "\0" - /* _mesa_function_pool[27261]: CombinerParameterfNV (will be remapped) */ + /* _mesa_function_pool[27608]: CombinerParameterfNV (will be remapped) */ "if\0" "glCombinerParameterfNV\0" "\0" - /* _mesa_function_pool[27288]: IndexMask (offset 212) */ + /* _mesa_function_pool[27635]: IndexMask (offset 212) */ "i\0" "glIndexMask\0" "\0" - /* _mesa_function_pool[27303]: BindProgramNV (will be remapped) */ + /* _mesa_function_pool[27650]: BindProgramNV (will be remapped) */ "ii\0" "glBindProgramARB\0" "glBindProgramNV\0" "\0" - /* _mesa_function_pool[27340]: VertexAttrib4svARB (will be remapped) */ + /* _mesa_function_pool[27687]: VertexAttrib4svARB (will be remapped) */ "ip\0" "glVertexAttrib4sv\0" "glVertexAttrib4svARB\0" "\0" - /* _mesa_function_pool[27383]: GetFloatv (offset 262) */ + /* _mesa_function_pool[27730]: GetFloatv (offset 262) */ "ip\0" "glGetFloatv\0" "\0" - /* _mesa_function_pool[27399]: CreateDebugObjectMESA (dynamic) */ + /* _mesa_function_pool[27746]: CreateDebugObjectMESA (dynamic) */ "\0" "glCreateDebugObjectMESA\0" "\0" - /* _mesa_function_pool[27425]: GetShaderiv (will be remapped) */ + /* _mesa_function_pool[27772]: GetShaderiv (will be remapped) */ "iip\0" "glGetShaderiv\0" "\0" - /* _mesa_function_pool[27444]: ClientWaitSync (will be remapped) */ + /* _mesa_function_pool[27791]: ClientWaitSync (will be remapped) */ "iii\0" "glClientWaitSync\0" "\0" - /* _mesa_function_pool[27466]: TexCoord4s (offset 124) */ + /* _mesa_function_pool[27813]: TexCoord4s (offset 124) */ "iiii\0" "glTexCoord4s\0" "\0" - /* _mesa_function_pool[27485]: TexCoord3sv (offset 117) */ + /* _mesa_function_pool[27832]: TexCoord3sv (offset 117) */ "p\0" "glTexCoord3sv\0" "\0" - /* _mesa_function_pool[27502]: BindFragmentShaderATI (will be remapped) */ + /* _mesa_function_pool[27849]: BindFragmentShaderATI (will be remapped) */ "i\0" "glBindFragmentShaderATI\0" "\0" - /* _mesa_function_pool[27529]: PopAttrib (offset 218) */ + /* _mesa_function_pool[27876]: PopAttrib (offset 218) */ "\0" "glPopAttrib\0" "\0" - /* _mesa_function_pool[27543]: Fogfv (offset 154) */ + /* _mesa_function_pool[27890]: Fogfv (offset 154) */ "ip\0" "glFogfv\0" "\0" - /* _mesa_function_pool[27555]: UnmapBufferARB (will be remapped) */ + /* _mesa_function_pool[27902]: UnmapBufferARB (will be remapped) */ "i\0" "glUnmapBuffer\0" "glUnmapBufferARB\0" "\0" - /* _mesa_function_pool[27589]: InitNames (offset 197) */ + /* _mesa_function_pool[27936]: InitNames (offset 197) */ "\0" "glInitNames\0" "\0" - /* _mesa_function_pool[27603]: Normal3sv (offset 61) */ + /* _mesa_function_pool[27950]: Normal3sv (offset 61) */ "p\0" "glNormal3sv\0" "\0" - /* _mesa_function_pool[27618]: Minmax (offset 368) */ + /* _mesa_function_pool[27965]: Minmax (offset 368) */ "iii\0" "glMinmax\0" "glMinmaxEXT\0" "\0" - /* _mesa_function_pool[27644]: TexCoord4d (offset 118) */ + /* _mesa_function_pool[27991]: TexCoord4d (offset 118) */ "dddd\0" "glTexCoord4d\0" "\0" - /* _mesa_function_pool[27663]: TexCoord4f (offset 120) */ + /* _mesa_function_pool[28010]: DeformationMap3dSGIX (dynamic) */ + "iddiiddiiddiip\0" + "glDeformationMap3dSGIX\0" + "\0" + /* _mesa_function_pool[28049]: TexCoord4f (offset 120) */ "ffff\0" "glTexCoord4f\0" "\0" - /* _mesa_function_pool[27682]: FogCoorddvEXT (will be remapped) */ + /* _mesa_function_pool[28068]: FogCoorddvEXT (will be remapped) */ "p\0" "glFogCoorddv\0" "glFogCoorddvEXT\0" "\0" - /* _mesa_function_pool[27714]: FinishTextureSUNX (dynamic) */ + /* _mesa_function_pool[28100]: FinishTextureSUNX (dynamic) */ "\0" "glFinishTextureSUNX\0" "\0" - /* _mesa_function_pool[27736]: GetFragmentLightfvSGIX (dynamic) */ + /* _mesa_function_pool[28122]: GetFragmentLightfvSGIX (dynamic) */ "iip\0" "glGetFragmentLightfvSGIX\0" "\0" - /* _mesa_function_pool[27766]: Binormal3fvEXT (dynamic) */ + /* _mesa_function_pool[28152]: Binormal3fvEXT (dynamic) */ "p\0" "glBinormal3fvEXT\0" "\0" - /* _mesa_function_pool[27786]: GetBooleanv (offset 258) */ + /* _mesa_function_pool[28172]: GetBooleanv (offset 258) */ "ip\0" "glGetBooleanv\0" "\0" - /* _mesa_function_pool[27804]: ColorFragmentOp3ATI (will be remapped) */ + /* _mesa_function_pool[28190]: ColorFragmentOp3ATI (will be remapped) */ "iiiiiiiiiiiii\0" "glColorFragmentOp3ATI\0" "\0" - /* _mesa_function_pool[27841]: Hint (offset 158) */ + /* _mesa_function_pool[28227]: Hint (offset 158) */ "ii\0" "glHint\0" "\0" - /* _mesa_function_pool[27852]: Color4dv (offset 28) */ + /* _mesa_function_pool[28238]: Color4dv (offset 28) */ "p\0" "glColor4dv\0" "\0" - /* _mesa_function_pool[27866]: VertexAttrib2svARB (will be remapped) */ + /* _mesa_function_pool[28252]: VertexAttrib2svARB (will be remapped) */ "ip\0" "glVertexAttrib2sv\0" "glVertexAttrib2svARB\0" "\0" - /* _mesa_function_pool[27909]: AreProgramsResidentNV (will be remapped) */ + /* _mesa_function_pool[28295]: AreProgramsResidentNV (will be remapped) */ "ipp\0" "glAreProgramsResidentNV\0" "\0" - /* _mesa_function_pool[27938]: WindowPos3svMESA (will be remapped) */ + /* _mesa_function_pool[28324]: WindowPos3svMESA (will be remapped) */ "p\0" "glWindowPos3sv\0" "glWindowPos3svARB\0" "glWindowPos3svMESA\0" "\0" - /* _mesa_function_pool[27993]: CopyColorSubTable (offset 347) */ + /* _mesa_function_pool[28379]: CopyColorSubTable (offset 347) */ "iiiii\0" "glCopyColorSubTable\0" "glCopyColorSubTableEXT\0" "\0" - /* _mesa_function_pool[28043]: WeightdvARB (dynamic) */ + /* _mesa_function_pool[28429]: WeightdvARB (dynamic) */ "ip\0" "glWeightdvARB\0" "\0" - /* _mesa_function_pool[28061]: DeleteRenderbuffersEXT (will be remapped) */ + /* _mesa_function_pool[28447]: DeleteRenderbuffersEXT (will be remapped) */ "ip\0" "glDeleteRenderbuffers\0" "glDeleteRenderbuffersEXT\0" "\0" - /* _mesa_function_pool[28112]: VertexAttrib4NubvARB (will be remapped) */ + /* _mesa_function_pool[28498]: VertexAttrib4NubvARB (will be remapped) */ "ip\0" "glVertexAttrib4Nubv\0" "glVertexAttrib4NubvARB\0" "\0" - /* _mesa_function_pool[28159]: VertexAttrib3dvNV (will be remapped) */ + /* _mesa_function_pool[28545]: VertexAttrib3dvNV (will be remapped) */ "ip\0" "glVertexAttrib3dvNV\0" "\0" - /* _mesa_function_pool[28183]: GetObjectParameterfvARB (will be remapped) */ + /* _mesa_function_pool[28569]: GetObjectParameterfvARB (will be remapped) */ "iip\0" "glGetObjectParameterfvARB\0" "\0" - /* _mesa_function_pool[28214]: Vertex4iv (offset 147) */ + /* _mesa_function_pool[28600]: Vertex4iv (offset 147) */ "p\0" "glVertex4iv\0" "\0" - /* _mesa_function_pool[28229]: GetProgramEnvParameterdvARB (will be remapped) */ + /* _mesa_function_pool[28615]: GetProgramEnvParameterdvARB (will be remapped) */ "iip\0" "glGetProgramEnvParameterdvARB\0" "\0" - /* _mesa_function_pool[28264]: TexCoord4dv (offset 119) */ + /* _mesa_function_pool[28650]: TexCoord4dv (offset 119) */ "p\0" "glTexCoord4dv\0" "\0" - /* _mesa_function_pool[28281]: LockArraysEXT (will be remapped) */ + /* _mesa_function_pool[28667]: LockArraysEXT (will be remapped) */ "ii\0" "glLockArraysEXT\0" "\0" - /* _mesa_function_pool[28301]: Begin (offset 7) */ + /* _mesa_function_pool[28687]: Begin (offset 7) */ "i\0" "glBegin\0" "\0" - /* _mesa_function_pool[28312]: LightModeli (offset 165) */ + /* _mesa_function_pool[28698]: LightModeli (offset 165) */ "ii\0" "glLightModeli\0" "\0" - /* _mesa_function_pool[28330]: Rectfv (offset 89) */ + /* _mesa_function_pool[28716]: Rectfv (offset 89) */ "pp\0" "glRectfv\0" "\0" - /* _mesa_function_pool[28343]: LightModelf (offset 163) */ + /* _mesa_function_pool[28729]: LightModelf (offset 163) */ "if\0" "glLightModelf\0" "\0" - /* _mesa_function_pool[28361]: GetTexParameterfv (offset 282) */ + /* _mesa_function_pool[28747]: GetTexParameterfv (offset 282) */ "iip\0" "glGetTexParameterfv\0" "\0" - /* _mesa_function_pool[28386]: GetLightfv (offset 264) */ + /* _mesa_function_pool[28772]: GetLightfv (offset 264) */ "iip\0" "glGetLightfv\0" "\0" - /* _mesa_function_pool[28404]: PixelTransformParameterivEXT (dynamic) */ + /* _mesa_function_pool[28790]: PixelTransformParameterivEXT (dynamic) */ "iip\0" "glPixelTransformParameterivEXT\0" "\0" - /* _mesa_function_pool[28440]: BinormalPointerEXT (dynamic) */ + /* _mesa_function_pool[28826]: BinormalPointerEXT (dynamic) */ "iip\0" "glBinormalPointerEXT\0" "\0" - /* _mesa_function_pool[28466]: VertexAttrib1dNV (will be remapped) */ + /* _mesa_function_pool[28852]: VertexAttrib1dNV (will be remapped) */ "id\0" "glVertexAttrib1dNV\0" "\0" - /* _mesa_function_pool[28489]: GetCombinerInputParameterivNV (will be remapped) */ + /* _mesa_function_pool[28875]: GetCombinerInputParameterivNV (will be remapped) */ "iiiip\0" "glGetCombinerInputParameterivNV\0" "\0" - /* _mesa_function_pool[28528]: Disable (offset 214) */ + /* _mesa_function_pool[28914]: Disable (offset 214) */ "i\0" "glDisable\0" "\0" - /* _mesa_function_pool[28541]: MultiTexCoord2fvARB (offset 387) */ + /* _mesa_function_pool[28927]: MultiTexCoord2fvARB (offset 387) */ "ip\0" "glMultiTexCoord2fv\0" "glMultiTexCoord2fvARB\0" "\0" - /* _mesa_function_pool[28586]: GetRenderbufferParameterivEXT (will be remapped) */ + /* _mesa_function_pool[28972]: GetRenderbufferParameterivEXT (will be remapped) */ "iip\0" "glGetRenderbufferParameteriv\0" "glGetRenderbufferParameterivEXT\0" "\0" - /* _mesa_function_pool[28652]: CombinerParameterivNV (will be remapped) */ + /* _mesa_function_pool[29038]: CombinerParameterivNV (will be remapped) */ "ip\0" "glCombinerParameterivNV\0" "\0" - /* _mesa_function_pool[28680]: GenFragmentShadersATI (will be remapped) */ + /* _mesa_function_pool[29066]: GenFragmentShadersATI (will be remapped) */ "i\0" "glGenFragmentShadersATI\0" "\0" - /* _mesa_function_pool[28707]: DrawArrays (offset 310) */ + /* _mesa_function_pool[29093]: DrawArrays (offset 310) */ "iii\0" "glDrawArrays\0" "glDrawArraysEXT\0" "\0" - /* _mesa_function_pool[28741]: WeightuivARB (dynamic) */ + /* _mesa_function_pool[29127]: WeightuivARB (dynamic) */ "ip\0" "glWeightuivARB\0" "\0" - /* _mesa_function_pool[28760]: VertexAttrib2sARB (will be remapped) */ + /* _mesa_function_pool[29146]: VertexAttrib2sARB (will be remapped) */ "iii\0" "glVertexAttrib2s\0" "glVertexAttrib2sARB\0" "\0" - /* _mesa_function_pool[28802]: ColorMask (offset 210) */ + /* _mesa_function_pool[29188]: ColorMask (offset 210) */ "iiii\0" "glColorMask\0" "\0" - /* _mesa_function_pool[28820]: GenAsyncMarkersSGIX (dynamic) */ + /* _mesa_function_pool[29206]: GenAsyncMarkersSGIX (dynamic) */ "i\0" "glGenAsyncMarkersSGIX\0" "\0" - /* _mesa_function_pool[28845]: Tangent3svEXT (dynamic) */ + /* _mesa_function_pool[29231]: Tangent3svEXT (dynamic) */ "p\0" "glTangent3svEXT\0" "\0" - /* _mesa_function_pool[28864]: GetListParameterivSGIX (dynamic) */ + /* _mesa_function_pool[29250]: GetListParameterivSGIX (dynamic) */ "iip\0" "glGetListParameterivSGIX\0" "\0" - /* _mesa_function_pool[28894]: BindBufferARB (will be remapped) */ + /* _mesa_function_pool[29280]: BindBufferARB (will be remapped) */ "ii\0" "glBindBuffer\0" "glBindBufferARB\0" "\0" - /* _mesa_function_pool[28927]: GetInfoLogARB (will be remapped) */ + /* _mesa_function_pool[29313]: GetInfoLogARB (will be remapped) */ "iipp\0" "glGetInfoLogARB\0" "\0" - /* _mesa_function_pool[28949]: RasterPos4iv (offset 83) */ + /* _mesa_function_pool[29335]: RasterPos4iv (offset 83) */ "p\0" "glRasterPos4iv\0" "\0" - /* _mesa_function_pool[28967]: Enable (offset 215) */ + /* _mesa_function_pool[29353]: Enable (offset 215) */ "i\0" "glEnable\0" "\0" - /* _mesa_function_pool[28979]: LineStipple (offset 167) */ + /* _mesa_function_pool[29365]: LineStipple (offset 167) */ "ii\0" "glLineStipple\0" "\0" - /* _mesa_function_pool[28997]: VertexAttribs4svNV (will be remapped) */ + /* _mesa_function_pool[29383]: VertexAttribs4svNV (will be remapped) */ "iip\0" "glVertexAttribs4svNV\0" "\0" - /* _mesa_function_pool[29023]: EdgeFlagPointerListIBM (dynamic) */ + /* _mesa_function_pool[29409]: EdgeFlagPointerListIBM (dynamic) */ "ipi\0" "glEdgeFlagPointerListIBM\0" "\0" - /* _mesa_function_pool[29053]: UniformMatrix3x2fv (will be remapped) */ + /* _mesa_function_pool[29439]: UniformMatrix3x2fv (will be remapped) */ "iiip\0" "glUniformMatrix3x2fv\0" "\0" - /* _mesa_function_pool[29080]: GetMinmaxParameterfv (offset 365) */ + /* _mesa_function_pool[29466]: GetMinmaxParameterfv (offset 365) */ "iip\0" "glGetMinmaxParameterfv\0" "glGetMinmaxParameterfvEXT\0" "\0" - /* _mesa_function_pool[29134]: VertexAttrib1fvARB (will be remapped) */ + /* _mesa_function_pool[29520]: VertexAttrib1fvARB (will be remapped) */ "ip\0" "glVertexAttrib1fv\0" "glVertexAttrib1fvARB\0" "\0" - /* _mesa_function_pool[29177]: GenBuffersARB (will be remapped) */ + /* _mesa_function_pool[29563]: GenBuffersARB (will be remapped) */ "ip\0" "glGenBuffers\0" "glGenBuffersARB\0" "\0" - /* _mesa_function_pool[29210]: VertexAttribs1svNV (will be remapped) */ + /* _mesa_function_pool[29596]: VertexAttribs1svNV (will be remapped) */ "iip\0" "glVertexAttribs1svNV\0" "\0" - /* _mesa_function_pool[29236]: Vertex3fv (offset 137) */ + /* _mesa_function_pool[29622]: Vertex3fv (offset 137) */ "p\0" "glVertex3fv\0" "\0" - /* _mesa_function_pool[29251]: GetTexBumpParameterivATI (will be remapped) */ + /* _mesa_function_pool[29637]: GetTexBumpParameterivATI (will be remapped) */ "ip\0" "glGetTexBumpParameterivATI\0" "\0" - /* _mesa_function_pool[29282]: Binormal3bEXT (dynamic) */ + /* _mesa_function_pool[29668]: Binormal3bEXT (dynamic) */ "iii\0" "glBinormal3bEXT\0" "\0" - /* _mesa_function_pool[29303]: FragmentMaterialivSGIX (dynamic) */ + /* _mesa_function_pool[29689]: FragmentMaterialivSGIX (dynamic) */ "iip\0" "glFragmentMaterialivSGIX\0" "\0" - /* _mesa_function_pool[29333]: IsRenderbufferEXT (will be remapped) */ + /* _mesa_function_pool[29719]: IsRenderbufferEXT (will be remapped) */ "i\0" "glIsRenderbuffer\0" "glIsRenderbufferEXT\0" "\0" - /* _mesa_function_pool[29373]: GenProgramsNV (will be remapped) */ + /* _mesa_function_pool[29759]: GenProgramsNV (will be remapped) */ "ip\0" "glGenProgramsARB\0" "glGenProgramsNV\0" "\0" - /* _mesa_function_pool[29410]: VertexAttrib4dvNV (will be remapped) */ + /* _mesa_function_pool[29796]: VertexAttrib4dvNV (will be remapped) */ "ip\0" "glVertexAttrib4dvNV\0" "\0" - /* _mesa_function_pool[29434]: EndFragmentShaderATI (will be remapped) */ + /* _mesa_function_pool[29820]: EndFragmentShaderATI (will be remapped) */ "\0" "glEndFragmentShaderATI\0" "\0" - /* _mesa_function_pool[29459]: Binormal3iEXT (dynamic) */ + /* _mesa_function_pool[29845]: Binormal3iEXT (dynamic) */ "iii\0" "glBinormal3iEXT\0" "\0" - /* _mesa_function_pool[29480]: WindowPos2fMESA (will be remapped) */ + /* _mesa_function_pool[29866]: WindowPos2fMESA (will be remapped) */ "ff\0" "glWindowPos2f\0" "glWindowPos2fARB\0" @@ -4334,392 +4386,405 @@ static const struct { GLint remap_index; } MESA_remap_table_functions[] = { { 1461, AttachShader_remap_index }, - { 8704, CreateProgram_remap_index }, - { 20158, CreateShader_remap_index }, - { 22418, DeleteProgram_remap_index }, - { 16193, DeleteShader_remap_index }, - { 20604, DetachShader_remap_index }, - { 15717, GetAttachedShaders_remap_index }, - { 4244, GetProgramInfoLog_remap_index }, + { 8794, CreateProgram_remap_index }, + { 20420, CreateShader_remap_index }, + { 22750, DeleteProgram_remap_index }, + { 16372, DeleteShader_remap_index }, + { 20866, DetachShader_remap_index }, + { 15896, GetAttachedShaders_remap_index }, + { 4275, GetProgramInfoLog_remap_index }, { 361, GetProgramiv_remap_index }, - { 5547, GetShaderInfoLog_remap_index }, - { 27425, GetShaderiv_remap_index }, - { 11732, IsProgram_remap_index }, - { 10767, IsShader_remap_index }, - { 8808, StencilFuncSeparate_remap_index }, + { 5608, GetShaderInfoLog_remap_index }, + { 27772, GetShaderiv_remap_index }, + { 11879, IsProgram_remap_index }, + { 10914, IsShader_remap_index }, + { 8898, StencilFuncSeparate_remap_index }, { 3487, StencilMaskSeparate_remap_index }, - { 6623, StencilOpSeparate_remap_index }, - { 19535, UniformMatrix2x3fv_remap_index }, + { 6684, StencilOpSeparate_remap_index }, + { 19771, UniformMatrix2x3fv_remap_index }, { 2615, UniformMatrix2x4fv_remap_index }, - { 29053, UniformMatrix3x2fv_remap_index }, - { 26851, UniformMatrix3x4fv_remap_index }, - { 14265, UniformMatrix4x2fv_remap_index }, + { 29439, UniformMatrix3x2fv_remap_index }, + { 27198, UniformMatrix3x4fv_remap_index }, + { 14444, UniformMatrix4x2fv_remap_index }, { 2937, UniformMatrix4x3fv_remap_index }, - { 8722, LoadTransposeMatrixdARB_remap_index }, - { 27154, LoadTransposeMatrixfARB_remap_index }, - { 4817, MultTransposeMatrixdARB_remap_index }, - { 20791, MultTransposeMatrixfARB_remap_index }, + { 8812, LoadTransposeMatrixdARB_remap_index }, + { 27501, LoadTransposeMatrixfARB_remap_index }, + { 4848, MultTransposeMatrixdARB_remap_index }, + { 21053, MultTransposeMatrixfARB_remap_index }, { 172, SampleCoverageARB_remap_index }, - { 4971, CompressedTexImage1DARB_remap_index }, - { 21248, CompressedTexImage2DARB_remap_index }, + { 5032, CompressedTexImage1DARB_remap_index }, + { 21553, CompressedTexImage2DARB_remap_index }, { 3550, CompressedTexImage3DARB_remap_index }, - { 16009, CompressedTexSubImage1DARB_remap_index }, + { 16188, CompressedTexSubImage1DARB_remap_index }, { 1880, CompressedTexSubImage2DARB_remap_index }, - { 17801, CompressedTexSubImage3DARB_remap_index }, - { 25133, GetCompressedTexImageARB_remap_index }, + { 18008, CompressedTexSubImage3DARB_remap_index }, + { 25480, GetCompressedTexImageARB_remap_index }, { 3395, DisableVertexAttribArrayARB_remap_index }, - { 26463, EnableVertexAttribArrayARB_remap_index }, - { 28229, GetProgramEnvParameterdvARB_remap_index }, - { 20671, GetProgramEnvParameterfvARB_remap_index }, - { 24163, GetProgramLocalParameterdvARB_remap_index }, - { 7065, GetProgramLocalParameterfvARB_remap_index }, - { 16100, GetProgramStringARB_remap_index }, - { 24358, GetProgramivARB_remap_index }, - { 17996, GetVertexAttribdvARB_remap_index }, - { 14154, GetVertexAttribfvARB_remap_index }, - { 8617, GetVertexAttribivARB_remap_index }, - { 16905, ProgramEnvParameter4dARB_remap_index }, - { 22218, ProgramEnvParameter4dvARB_remap_index }, - { 14762, ProgramEnvParameter4fARB_remap_index }, - { 7928, ProgramEnvParameter4fvARB_remap_index }, + { 26810, EnableVertexAttribArrayARB_remap_index }, + { 28615, GetProgramEnvParameterdvARB_remap_index }, + { 20933, GetProgramEnvParameterfvARB_remap_index }, + { 24510, GetProgramLocalParameterdvARB_remap_index }, + { 7126, GetProgramLocalParameterfvARB_remap_index }, + { 16279, GetProgramStringARB_remap_index }, + { 24705, GetProgramivARB_remap_index }, + { 18203, GetVertexAttribdvARB_remap_index }, + { 14333, GetVertexAttribfvARB_remap_index }, + { 8707, GetVertexAttribivARB_remap_index }, + { 17084, ProgramEnvParameter4dARB_remap_index }, + { 22523, ProgramEnvParameter4dvARB_remap_index }, + { 14941, ProgramEnvParameter4fARB_remap_index }, + { 7989, ProgramEnvParameter4fvARB_remap_index }, { 3513, ProgramLocalParameter4dARB_remap_index }, - { 11442, ProgramLocalParameter4dvARB_remap_index }, - { 25942, ProgramLocalParameter4fARB_remap_index }, - { 22736, ProgramLocalParameter4fvARB_remap_index }, - { 24919, ProgramStringARB_remap_index }, - { 17155, VertexAttrib1dARB_remap_index }, - { 13808, VertexAttrib1dvARB_remap_index }, + { 11589, ProgramLocalParameter4dvARB_remap_index }, + { 26289, ProgramLocalParameter4fARB_remap_index }, + { 23068, ProgramLocalParameter4fvARB_remap_index }, + { 25266, ProgramStringARB_remap_index }, + { 17334, VertexAttrib1dARB_remap_index }, + { 13987, VertexAttrib1dvARB_remap_index }, { 3688, VertexAttrib1fARB_remap_index }, - { 29134, VertexAttrib1fvARB_remap_index }, - { 6149, VertexAttrib1sARB_remap_index }, + { 29520, VertexAttrib1fvARB_remap_index }, + { 6210, VertexAttrib1sARB_remap_index }, { 2054, VertexAttrib1svARB_remap_index }, - { 13239, VertexAttrib2dARB_remap_index }, - { 15336, VertexAttrib2dvARB_remap_index }, + { 13418, VertexAttrib2dARB_remap_index }, + { 15515, VertexAttrib2dvARB_remap_index }, { 1480, VertexAttrib2fARB_remap_index }, - { 15449, VertexAttrib2fvARB_remap_index }, - { 28760, VertexAttrib2sARB_remap_index }, - { 27866, VertexAttrib2svARB_remap_index }, - { 9926, VertexAttrib3dARB_remap_index }, - { 7631, VertexAttrib3dvARB_remap_index }, + { 15628, VertexAttrib2fvARB_remap_index }, + { 29146, VertexAttrib2sARB_remap_index }, + { 28252, VertexAttrib2svARB_remap_index }, + { 10045, VertexAttrib3dARB_remap_index }, + { 7692, VertexAttrib3dvARB_remap_index }, { 1567, VertexAttrib3fARB_remap_index }, - { 19772, VertexAttrib3fvARB_remap_index }, - { 24791, VertexAttrib3sARB_remap_index }, - { 17738, VertexAttrib3svARB_remap_index }, - { 4270, VertexAttrib4NbvARB_remap_index }, - { 15672, VertexAttrib4NivARB_remap_index }, - { 19727, VertexAttrib4NsvARB_remap_index }, - { 20623, VertexAttrib4NubARB_remap_index }, - { 28112, VertexAttrib4NubvARB_remap_index }, - { 16566, VertexAttrib4NuivARB_remap_index }, + { 20008, VertexAttrib3fvARB_remap_index }, + { 25138, VertexAttrib3sARB_remap_index }, + { 17945, VertexAttrib3svARB_remap_index }, + { 4301, VertexAttrib4NbvARB_remap_index }, + { 15851, VertexAttrib4NivARB_remap_index }, + { 19963, VertexAttrib4NsvARB_remap_index }, + { 20885, VertexAttrib4NubARB_remap_index }, + { 28498, VertexAttrib4NubvARB_remap_index }, + { 16745, VertexAttrib4NuivARB_remap_index }, { 2810, VertexAttrib4NusvARB_remap_index }, - { 9549, VertexAttrib4bvARB_remap_index }, - { 23571, VertexAttrib4dARB_remap_index }, - { 18721, VertexAttrib4dvARB_remap_index }, - { 10033, VertexAttrib4fARB_remap_index }, - { 10403, VertexAttrib4fvARB_remap_index }, - { 9001, VertexAttrib4ivARB_remap_index }, - { 15150, VertexAttrib4sARB_remap_index }, - { 27340, VertexAttrib4svARB_remap_index }, - { 14567, VertexAttrib4ubvARB_remap_index }, - { 26787, VertexAttrib4uivARB_remap_index }, - { 17549, VertexAttrib4usvARB_remap_index }, - { 19409, VertexAttribPointerARB_remap_index }, - { 28894, BindBufferARB_remap_index }, - { 5862, BufferDataARB_remap_index }, + { 9639, VertexAttrib4bvARB_remap_index }, + { 23918, VertexAttrib4dARB_remap_index }, + { 18928, VertexAttrib4dvARB_remap_index }, + { 10152, VertexAttrib4fARB_remap_index }, + { 10556, VertexAttrib4fvARB_remap_index }, + { 9091, VertexAttrib4ivARB_remap_index }, + { 15329, VertexAttrib4sARB_remap_index }, + { 27687, VertexAttrib4svARB_remap_index }, + { 14746, VertexAttrib4ubvARB_remap_index }, + { 27134, VertexAttrib4uivARB_remap_index }, + { 17756, VertexAttrib4usvARB_remap_index }, + { 19645, VertexAttribPointerARB_remap_index }, + { 29280, BindBufferARB_remap_index }, + { 5923, BufferDataARB_remap_index }, { 1382, BufferSubDataARB_remap_index }, - { 26976, DeleteBuffersARB_remap_index }, - { 29177, GenBuffersARB_remap_index }, - { 15492, GetBufferParameterivARB_remap_index }, - { 14714, GetBufferPointervARB_remap_index }, + { 27323, DeleteBuffersARB_remap_index }, + { 29563, GenBuffersARB_remap_index }, + { 15671, GetBufferParameterivARB_remap_index }, + { 14893, GetBufferPointervARB_remap_index }, { 1335, GetBufferSubDataARB_remap_index }, - { 26735, IsBufferARB_remap_index }, - { 23167, MapBufferARB_remap_index }, - { 27555, UnmapBufferARB_remap_index }, + { 27082, IsBufferARB_remap_index }, + { 23523, MapBufferARB_remap_index }, + { 27902, UnmapBufferARB_remap_index }, { 268, BeginQueryARB_remap_index }, - { 17250, DeleteQueriesARB_remap_index }, - { 10664, EndQueryARB_remap_index }, - { 25612, GenQueriesARB_remap_index }, + { 17429, DeleteQueriesARB_remap_index }, + { 10850, EndQueryARB_remap_index }, + { 25959, GenQueriesARB_remap_index }, { 1772, GetQueryObjectivARB_remap_index }, - { 15194, GetQueryObjectuivARB_remap_index }, + { 15373, GetQueryObjectuivARB_remap_index }, { 1624, GetQueryivARB_remap_index }, - { 17456, IsQueryARB_remap_index }, - { 7241, AttachObjectARB_remap_index }, - { 16155, CompileShaderARB_remap_index }, + { 17663, IsQueryARB_remap_index }, + { 7302, AttachObjectARB_remap_index }, + { 16334, CompileShaderARB_remap_index }, { 2879, CreateProgramObjectARB_remap_index }, - { 5807, CreateShaderObjectARB_remap_index }, - { 12656, DeleteObjectARB_remap_index }, - { 21022, DetachObjectARB_remap_index }, - { 10475, GetActiveUniformARB_remap_index }, - { 8320, GetAttachedObjectsARB_remap_index }, - { 8599, GetHandleARB_remap_index }, - { 28927, GetInfoLogARB_remap_index }, - { 28183, GetObjectParameterfvARB_remap_index }, - { 24037, GetObjectParameterivARB_remap_index }, - { 25370, GetShaderSourceARB_remap_index }, - { 24651, GetUniformLocationARB_remap_index }, - { 20893, GetUniformfvARB_remap_index }, - { 11064, GetUniformivARB_remap_index }, - { 17594, LinkProgramARB_remap_index }, - { 17652, ShaderSourceARB_remap_index }, - { 6523, Uniform1fARB_remap_index }, - { 26151, Uniform1fvARB_remap_index }, - { 19378, Uniform1iARB_remap_index }, - { 18410, Uniform1ivARB_remap_index }, + { 5868, CreateShaderObjectARB_remap_index }, + { 12835, DeleteObjectARB_remap_index }, + { 21327, DetachObjectARB_remap_index }, + { 10628, GetActiveUniformARB_remap_index }, + { 8410, GetAttachedObjectsARB_remap_index }, + { 8689, GetHandleARB_remap_index }, + { 29313, GetInfoLogARB_remap_index }, + { 28569, GetObjectParameterfvARB_remap_index }, + { 24384, GetObjectParameterivARB_remap_index }, + { 25717, GetShaderSourceARB_remap_index }, + { 24998, GetUniformLocationARB_remap_index }, + { 21155, GetUniformfvARB_remap_index }, + { 11211, GetUniformivARB_remap_index }, + { 17801, LinkProgramARB_remap_index }, + { 17859, ShaderSourceARB_remap_index }, + { 6584, Uniform1fARB_remap_index }, + { 26498, Uniform1fvARB_remap_index }, + { 19614, Uniform1iARB_remap_index }, + { 18617, Uniform1ivARB_remap_index }, { 2003, Uniform2fARB_remap_index }, - { 12492, Uniform2fvARB_remap_index }, - { 23054, Uniform2iARB_remap_index }, + { 12671, Uniform2fvARB_remap_index }, + { 23410, Uniform2iARB_remap_index }, { 2123, Uniform2ivARB_remap_index }, - { 16265, Uniform3fARB_remap_index }, - { 8350, Uniform3fvARB_remap_index }, - { 5481, Uniform3iARB_remap_index }, - { 14820, Uniform3ivARB_remap_index }, - { 16711, Uniform4fARB_remap_index }, - { 20757, Uniform4fvARB_remap_index }, - { 21897, Uniform4iARB_remap_index }, - { 17962, Uniform4ivARB_remap_index }, - { 7293, UniformMatrix2fvARB_remap_index }, + { 16444, Uniform3fARB_remap_index }, + { 8440, Uniform3fvARB_remap_index }, + { 5542, Uniform3iARB_remap_index }, + { 14999, Uniform3ivARB_remap_index }, + { 16890, Uniform4fARB_remap_index }, + { 21019, Uniform4fvARB_remap_index }, + { 22202, Uniform4iARB_remap_index }, + { 18169, Uniform4ivARB_remap_index }, + { 7354, UniformMatrix2fvARB_remap_index }, { 17, UniformMatrix3fvARB_remap_index }, { 2475, UniformMatrix4fvARB_remap_index }, - { 22330, UseProgramObjectARB_remap_index }, - { 12927, ValidateProgramARB_remap_index }, - { 18764, BindAttribLocationARB_remap_index }, - { 4315, GetActiveAttribARB_remap_index }, - { 14501, GetAttribLocationARB_remap_index }, - { 25890, DrawBuffersARB_remap_index }, - { 11547, RenderbufferStorageMultisample_remap_index }, - { 16759, FlushMappedBufferRange_remap_index }, - { 24454, MapBufferRange_remap_index }, - { 14376, BindVertexArray_remap_index }, - { 12786, GenVertexArrays_remap_index }, - { 26665, CopyBufferSubData_remap_index }, - { 27444, ClientWaitSync_remap_index }, + { 22635, UseProgramObjectARB_remap_index }, + { 13106, ValidateProgramARB_remap_index }, + { 18971, BindAttribLocationARB_remap_index }, + { 4346, GetActiveAttribARB_remap_index }, + { 14680, GetAttribLocationARB_remap_index }, + { 26237, DrawBuffersARB_remap_index }, + { 11694, RenderbufferStorageMultisample_remap_index }, + { 16938, FlushMappedBufferRange_remap_index }, + { 24801, MapBufferRange_remap_index }, + { 14555, BindVertexArray_remap_index }, + { 12965, GenVertexArrays_remap_index }, + { 27012, CopyBufferSubData_remap_index }, + { 27791, ClientWaitSync_remap_index }, { 2394, DeleteSync_remap_index }, - { 6190, FenceSync_remap_index }, - { 13298, GetInteger64v_remap_index }, - { 19834, GetSynciv_remap_index }, - { 25829, IsSync_remap_index }, - { 8268, WaitSync_remap_index }, + { 6251, FenceSync_remap_index }, + { 13477, GetInteger64v_remap_index }, + { 20070, GetSynciv_remap_index }, + { 26176, IsSync_remap_index }, + { 8358, WaitSync_remap_index }, { 3363, DrawElementsBaseVertex_remap_index }, - { 26908, DrawRangeElementsBaseVertex_remap_index }, - { 23198, MultiDrawElementsBaseVertex_remap_index }, - { 4680, PolygonOffsetEXT_remap_index }, - { 20393, GetPixelTexGenParameterfvSGIS_remap_index }, + { 27255, DrawRangeElementsBaseVertex_remap_index }, + { 23554, MultiDrawElementsBaseVertex_remap_index }, + { 4711, PolygonOffsetEXT_remap_index }, + { 20655, GetPixelTexGenParameterfvSGIS_remap_index }, { 3895, GetPixelTexGenParameterivSGIS_remap_index }, - { 20126, PixelTexGenParameterfSGIS_remap_index }, + { 20388, PixelTexGenParameterfSGIS_remap_index }, { 580, PixelTexGenParameterfvSGIS_remap_index }, - { 11102, PixelTexGenParameteriSGIS_remap_index }, - { 12063, PixelTexGenParameterivSGIS_remap_index }, - { 14464, SampleMaskSGIS_remap_index }, - { 17396, SamplePatternSGIS_remap_index }, - { 23127, ColorPointerEXT_remap_index }, - { 15379, EdgeFlagPointerEXT_remap_index }, - { 5135, IndexPointerEXT_remap_index }, - { 5215, NormalPointerEXT_remap_index }, - { 13892, TexCoordPointerEXT_remap_index }, - { 5985, VertexPointerEXT_remap_index }, + { 11249, PixelTexGenParameteriSGIS_remap_index }, + { 12242, PixelTexGenParameterivSGIS_remap_index }, + { 14643, SampleMaskSGIS_remap_index }, + { 17603, SamplePatternSGIS_remap_index }, + { 23483, ColorPointerEXT_remap_index }, + { 15558, EdgeFlagPointerEXT_remap_index }, + { 5196, IndexPointerEXT_remap_index }, + { 5276, NormalPointerEXT_remap_index }, + { 14071, TexCoordPointerEXT_remap_index }, + { 6046, VertexPointerEXT_remap_index }, { 3165, PointParameterfEXT_remap_index }, - { 6830, PointParameterfvEXT_remap_index }, - { 28281, LockArraysEXT_remap_index }, - { 12991, UnlockArraysEXT_remap_index }, - { 7837, CullParameterdvEXT_remap_index }, - { 10270, CullParameterfvEXT_remap_index }, + { 6891, PointParameterfvEXT_remap_index }, + { 28667, LockArraysEXT_remap_index }, + { 13170, UnlockArraysEXT_remap_index }, + { 7898, CullParameterdvEXT_remap_index }, + { 10423, CullParameterfvEXT_remap_index }, { 1151, SecondaryColor3bEXT_remap_index }, - { 6989, SecondaryColor3bvEXT_remap_index }, - { 9178, SecondaryColor3dEXT_remap_index }, - { 22476, SecondaryColor3dvEXT_remap_index }, - { 24700, SecondaryColor3fEXT_remap_index }, - { 15945, SecondaryColor3fvEXT_remap_index }, + { 7050, SecondaryColor3bvEXT_remap_index }, + { 9268, SecondaryColor3dEXT_remap_index }, + { 22808, SecondaryColor3dvEXT_remap_index }, + { 25047, SecondaryColor3fEXT_remap_index }, + { 16124, SecondaryColor3fvEXT_remap_index }, { 426, SecondaryColor3iEXT_remap_index }, - { 14202, SecondaryColor3ivEXT_remap_index }, - { 8836, SecondaryColor3sEXT_remap_index }, - { 27108, SecondaryColor3svEXT_remap_index }, - { 23873, SecondaryColor3ubEXT_remap_index }, - { 18655, SecondaryColor3ubvEXT_remap_index }, - { 11297, SecondaryColor3uiEXT_remap_index }, - { 20013, SecondaryColor3uivEXT_remap_index }, - { 22688, SecondaryColor3usEXT_remap_index }, - { 11370, SecondaryColor3usvEXT_remap_index }, - { 10346, SecondaryColorPointerEXT_remap_index }, - { 22537, MultiDrawArraysEXT_remap_index }, - { 18345, MultiDrawElementsEXT_remap_index }, - { 18540, FogCoordPointerEXT_remap_index }, + { 14381, SecondaryColor3ivEXT_remap_index }, + { 8926, SecondaryColor3sEXT_remap_index }, + { 27455, SecondaryColor3svEXT_remap_index }, + { 24220, SecondaryColor3ubEXT_remap_index }, + { 18862, SecondaryColor3ubvEXT_remap_index }, + { 11444, SecondaryColor3uiEXT_remap_index }, + { 20275, SecondaryColor3uivEXT_remap_index }, + { 23020, SecondaryColor3usEXT_remap_index }, + { 11517, SecondaryColor3usvEXT_remap_index }, + { 10499, SecondaryColorPointerEXT_remap_index }, + { 22869, MultiDrawArraysEXT_remap_index }, + { 18552, MultiDrawElementsEXT_remap_index }, + { 18747, FogCoordPointerEXT_remap_index }, { 4044, FogCoorddEXT_remap_index }, - { 27682, FogCoorddvEXT_remap_index }, - { 4105, FogCoordfEXT_remap_index }, - { 23796, FogCoordfvEXT_remap_index }, - { 16663, PixelTexGenSGIX_remap_index }, - { 24381, BlendFuncSeparateEXT_remap_index }, - { 5897, FlushVertexArrayRangeNV_remap_index }, - { 4629, VertexArrayRangeNV_remap_index }, - { 24765, CombinerInputNV_remap_index }, + { 28068, FogCoorddvEXT_remap_index }, + { 4136, FogCoordfEXT_remap_index }, + { 24143, FogCoordfvEXT_remap_index }, + { 16842, PixelTexGenSGIX_remap_index }, + { 24728, BlendFuncSeparateEXT_remap_index }, + { 5958, FlushVertexArrayRangeNV_remap_index }, + { 4660, VertexArrayRangeNV_remap_index }, + { 25112, CombinerInputNV_remap_index }, { 1946, CombinerOutputNV_remap_index }, - { 27261, CombinerParameterfNV_remap_index }, - { 4549, CombinerParameterfvNV_remap_index }, - { 19584, CombinerParameteriNV_remap_index }, - { 28652, CombinerParameterivNV_remap_index }, - { 6267, FinalCombinerInputNV_remap_index }, - { 8665, GetCombinerInputParameterfvNV_remap_index }, - { 28489, GetCombinerInputParameterivNV_remap_index }, - { 6066, GetCombinerOutputParameterfvNV_remap_index }, - { 12024, GetCombinerOutputParameterivNV_remap_index }, - { 5642, GetFinalCombinerInputParameterfvNV_remap_index }, - { 21769, GetFinalCombinerInputParameterivNV_remap_index }, - { 11042, ResizeBuffersMESA_remap_index }, - { 9753, WindowPos2dMESA_remap_index }, + { 27608, CombinerParameterfNV_remap_index }, + { 4580, CombinerParameterfvNV_remap_index }, + { 19820, CombinerParameteriNV_remap_index }, + { 29038, CombinerParameterivNV_remap_index }, + { 6328, FinalCombinerInputNV_remap_index }, + { 8755, GetCombinerInputParameterfvNV_remap_index }, + { 28875, GetCombinerInputParameterivNV_remap_index }, + { 6127, GetCombinerOutputParameterfvNV_remap_index }, + { 12171, GetCombinerOutputParameterivNV_remap_index }, + { 5703, GetFinalCombinerInputParameterfvNV_remap_index }, + { 22074, GetFinalCombinerInputParameterivNV_remap_index }, + { 11189, ResizeBuffersMESA_remap_index }, + { 9872, WindowPos2dMESA_remap_index }, { 944, WindowPos2dvMESA_remap_index }, - { 29480, WindowPos2fMESA_remap_index }, - { 6934, WindowPos2fvMESA_remap_index }, - { 15892, WindowPos2iMESA_remap_index }, - { 17869, WindowPos2ivMESA_remap_index }, - { 18444, WindowPos2sMESA_remap_index }, - { 4885, WindowPos2svMESA_remap_index }, - { 6759, WindowPos3dMESA_remap_index }, - { 12271, WindowPos3dvMESA_remap_index }, + { 29866, WindowPos2fMESA_remap_index }, + { 6995, WindowPos2fvMESA_remap_index }, + { 16071, WindowPos2iMESA_remap_index }, + { 18076, WindowPos2ivMESA_remap_index }, + { 18651, WindowPos2sMESA_remap_index }, + { 4946, WindowPos2svMESA_remap_index }, + { 6820, WindowPos3dMESA_remap_index }, + { 12450, WindowPos3dvMESA_remap_index }, { 472, WindowPos3fMESA_remap_index }, - { 13052, WindowPos3fvMESA_remap_index }, - { 21064, WindowPos3iMESA_remap_index }, - { 26610, WindowPos3ivMESA_remap_index }, - { 16409, WindowPos3sMESA_remap_index }, - { 27938, WindowPos3svMESA_remap_index }, - { 9704, WindowPos4dMESA_remap_index }, - { 14905, WindowPos4dvMESA_remap_index }, - { 12230, WindowPos4fMESA_remap_index }, - { 27015, WindowPos4fvMESA_remap_index }, - { 26763, WindowPos4iMESA_remap_index }, - { 10881, WindowPos4ivMESA_remap_index }, - { 16542, WindowPos4sMESA_remap_index }, + { 13231, WindowPos3fvMESA_remap_index }, + { 21369, WindowPos3iMESA_remap_index }, + { 26957, WindowPos3ivMESA_remap_index }, + { 16588, WindowPos3sMESA_remap_index }, + { 28324, WindowPos3svMESA_remap_index }, + { 9823, WindowPos4dMESA_remap_index }, + { 15084, WindowPos4dvMESA_remap_index }, + { 12409, WindowPos4fMESA_remap_index }, + { 27362, WindowPos4fvMESA_remap_index }, + { 27110, WindowPos4iMESA_remap_index }, + { 11028, WindowPos4ivMESA_remap_index }, + { 16721, WindowPos4sMESA_remap_index }, { 2857, WindowPos4svMESA_remap_index }, - { 23539, MultiModeDrawArraysIBM_remap_index }, - { 25483, MultiModeDrawElementsIBM_remap_index }, - { 10692, DeleteFencesNV_remap_index }, - { 24612, FinishFenceNV_remap_index }, + { 12210, MultiModeDrawArraysIBM_remap_index }, + { 25830, MultiModeDrawElementsIBM_remap_index }, + { 10878, DeleteFencesNV_remap_index }, + { 24959, FinishFenceNV_remap_index }, { 3287, GenFencesNV_remap_index }, - { 14885, GetFenceivNV_remap_index }, - { 7226, IsFenceNV_remap_index }, - { 11951, SetFenceNV_remap_index }, + { 15064, GetFenceivNV_remap_index }, + { 7287, IsFenceNV_remap_index }, + { 12098, SetFenceNV_remap_index }, { 3744, TestFenceNV_remap_index }, - { 27909, AreProgramsResidentNV_remap_index }, - { 27303, BindProgramNV_remap_index }, - { 22771, DeleteProgramsNV_remap_index }, - { 18873, ExecuteProgramNV_remap_index }, - { 29373, GenProgramsNV_remap_index }, - { 20472, GetProgramParameterdvNV_remap_index }, - { 9240, GetProgramParameterfvNV_remap_index }, - { 23101, GetProgramStringNV_remap_index }, - { 21458, GetProgramivNV_remap_index }, - { 20706, GetTrackMatrixivNV_remap_index }, - { 22921, GetVertexAttribPointervNV_remap_index }, - { 21702, GetVertexAttribdvNV_remap_index }, - { 16382, GetVertexAttribfvNV_remap_index }, - { 16073, GetVertexAttribivNV_remap_index }, - { 16789, IsProgramNV_remap_index }, - { 8246, LoadProgramNV_remap_index }, - { 24477, ProgramParameters4dvNV_remap_index }, - { 21388, ProgramParameters4fvNV_remap_index }, - { 18173, RequestResidentProgramsNV_remap_index }, - { 19562, TrackMatrixNV_remap_index }, - { 28466, VertexAttrib1dNV_remap_index }, - { 11892, VertexAttrib1dvNV_remap_index }, - { 25015, VertexAttrib1fNV_remap_index }, + { 28295, AreProgramsResidentNV_remap_index }, + { 27650, BindProgramNV_remap_index }, + { 23103, DeleteProgramsNV_remap_index }, + { 19080, ExecuteProgramNV_remap_index }, + { 29759, GenProgramsNV_remap_index }, + { 20734, GetProgramParameterdvNV_remap_index }, + { 9330, GetProgramParameterfvNV_remap_index }, + { 23457, GetProgramStringNV_remap_index }, + { 21763, GetProgramivNV_remap_index }, + { 20968, GetTrackMatrixivNV_remap_index }, + { 23253, GetVertexAttribPointervNV_remap_index }, + { 22007, GetVertexAttribdvNV_remap_index }, + { 16561, GetVertexAttribfvNV_remap_index }, + { 16252, GetVertexAttribivNV_remap_index }, + { 16968, IsProgramNV_remap_index }, + { 8336, LoadProgramNV_remap_index }, + { 24824, ProgramParameters4dvNV_remap_index }, + { 21693, ProgramParameters4fvNV_remap_index }, + { 18380, RequestResidentProgramsNV_remap_index }, + { 19798, TrackMatrixNV_remap_index }, + { 28852, VertexAttrib1dNV_remap_index }, + { 12039, VertexAttrib1dvNV_remap_index }, + { 25362, VertexAttrib1fNV_remap_index }, { 2245, VertexAttrib1fvNV_remap_index }, - { 27072, VertexAttrib1sNV_remap_index }, - { 13125, VertexAttrib1svNV_remap_index }, - { 4220, VertexAttrib2dNV_remap_index }, - { 11807, VertexAttrib2dvNV_remap_index }, - { 17628, VertexAttrib2fNV_remap_index }, - { 11418, VertexAttrib2fvNV_remap_index }, - { 5045, VertexAttrib2sNV_remap_index }, - { 16463, VertexAttrib2svNV_remap_index }, - { 9901, VertexAttrib3dNV_remap_index }, - { 28159, VertexAttrib3dvNV_remap_index }, - { 9052, VertexAttrib3fNV_remap_index }, - { 21729, VertexAttrib3fvNV_remap_index }, - { 24990, VertexAttrib3sNV_remap_index }, - { 20733, VertexAttrib3svNV_remap_index }, - { 25457, VertexAttrib4dNV_remap_index }, - { 29410, VertexAttrib4dvNV_remap_index }, + { 27419, VertexAttrib1sNV_remap_index }, + { 13304, VertexAttrib1svNV_remap_index }, + { 4251, VertexAttrib2dNV_remap_index }, + { 11954, VertexAttrib2dvNV_remap_index }, + { 17835, VertexAttrib2fNV_remap_index }, + { 11565, VertexAttrib2fvNV_remap_index }, + { 5106, VertexAttrib2sNV_remap_index }, + { 16642, VertexAttrib2svNV_remap_index }, + { 10020, VertexAttrib3dNV_remap_index }, + { 28545, VertexAttrib3dvNV_remap_index }, + { 9142, VertexAttrib3fNV_remap_index }, + { 22034, VertexAttrib3fvNV_remap_index }, + { 25337, VertexAttrib3sNV_remap_index }, + { 20995, VertexAttrib3svNV_remap_index }, + { 25804, VertexAttrib4dNV_remap_index }, + { 29796, VertexAttrib4dvNV_remap_index }, { 3945, VertexAttrib4fNV_remap_index }, - { 8296, VertexAttrib4fvNV_remap_index }, - { 23423, VertexAttrib4sNV_remap_index }, + { 8386, VertexAttrib4fvNV_remap_index }, + { 23802, VertexAttrib4sNV_remap_index }, { 1293, VertexAttrib4svNV_remap_index }, - { 4378, VertexAttrib4ubNV_remap_index }, + { 4409, VertexAttrib4ubNV_remap_index }, { 734, VertexAttrib4ubvNV_remap_index }, - { 19053, VertexAttribPointerNV_remap_index }, + { 19260, VertexAttribPointerNV_remap_index }, { 2097, VertexAttribs1dvNV_remap_index }, - { 16487, VertexAttribs1fvNV_remap_index }, - { 29210, VertexAttribs1svNV_remap_index }, - { 9077, VertexAttribs2dvNV_remap_index }, - { 22291, VertexAttribs2fvNV_remap_index }, - { 15405, VertexAttribs2svNV_remap_index }, - { 4577, VertexAttribs3dvNV_remap_index }, + { 16666, VertexAttribs1fvNV_remap_index }, + { 29596, VertexAttribs1svNV_remap_index }, + { 9167, VertexAttribs2dvNV_remap_index }, + { 22596, VertexAttribs2fvNV_remap_index }, + { 15584, VertexAttribs2svNV_remap_index }, + { 4608, VertexAttribs3dvNV_remap_index }, { 1977, VertexAttribs3fvNV_remap_index }, - { 26358, VertexAttribs3svNV_remap_index }, - { 23513, VertexAttribs4dvNV_remap_index }, - { 4603, VertexAttribs4fvNV_remap_index }, - { 28997, VertexAttribs4svNV_remap_index }, - { 26106, VertexAttribs4ubvNV_remap_index }, - { 23615, GetTexBumpParameterfvATI_remap_index }, - { 29251, GetTexBumpParameterivATI_remap_index }, - { 16127, TexBumpParameterfvATI_remap_index }, - { 18044, TexBumpParameterivATI_remap_index }, - { 13671, AlphaFragmentOp1ATI_remap_index }, - { 9592, AlphaFragmentOp2ATI_remap_index }, - { 21645, AlphaFragmentOp3ATI_remap_index }, - { 26285, BeginFragmentShaderATI_remap_index }, - { 27502, BindFragmentShaderATI_remap_index }, - { 20862, ColorFragmentOp1ATI_remap_index }, + { 26705, VertexAttribs3svNV_remap_index }, + { 23892, VertexAttribs4dvNV_remap_index }, + { 4634, VertexAttribs4fvNV_remap_index }, + { 29383, VertexAttribs4svNV_remap_index }, + { 26453, VertexAttribs4ubvNV_remap_index }, + { 23962, GetTexBumpParameterfvATI_remap_index }, + { 29637, GetTexBumpParameterivATI_remap_index }, + { 16306, TexBumpParameterfvATI_remap_index }, + { 18251, TexBumpParameterivATI_remap_index }, + { 13850, AlphaFragmentOp1ATI_remap_index }, + { 9682, AlphaFragmentOp2ATI_remap_index }, + { 21950, AlphaFragmentOp3ATI_remap_index }, + { 26632, BeginFragmentShaderATI_remap_index }, + { 27849, BindFragmentShaderATI_remap_index }, + { 21124, ColorFragmentOp1ATI_remap_index }, { 3823, ColorFragmentOp2ATI_remap_index }, - { 27804, ColorFragmentOp3ATI_remap_index }, - { 4722, DeleteFragmentShaderATI_remap_index }, - { 29434, EndFragmentShaderATI_remap_index }, - { 28680, GenFragmentShadersATI_remap_index }, - { 22395, PassTexCoordATI_remap_index }, - { 5965, SampleMapATI_remap_index }, - { 5738, SetFragmentShaderConstantATI_remap_index }, + { 28190, ColorFragmentOp3ATI_remap_index }, + { 4753, DeleteFragmentShaderATI_remap_index }, + { 29820, EndFragmentShaderATI_remap_index }, + { 29066, GenFragmentShadersATI_remap_index }, + { 22727, PassTexCoordATI_remap_index }, + { 6026, SampleMapATI_remap_index }, + { 5799, SetFragmentShaderConstantATI_remap_index }, { 319, PointParameteriNV_remap_index }, - { 12432, PointParameterivNV_remap_index }, - { 25296, ActiveStencilFaceEXT_remap_index }, - { 24137, BindVertexArrayAPPLE_remap_index }, + { 12611, PointParameterivNV_remap_index }, + { 25643, ActiveStencilFaceEXT_remap_index }, + { 24484, BindVertexArrayAPPLE_remap_index }, { 2522, DeleteVertexArraysAPPLE_remap_index }, - { 15744, GenVertexArraysAPPLE_remap_index }, - { 20537, IsVertexArrayAPPLE_remap_index }, + { 15923, GenVertexArraysAPPLE_remap_index }, + { 20799, IsVertexArrayAPPLE_remap_index }, { 775, GetProgramNamedParameterdvNV_remap_index }, { 3128, GetProgramNamedParameterfvNV_remap_index }, - { 23646, ProgramNamedParameter4dNV_remap_index }, - { 12707, ProgramNamedParameter4dvNV_remap_index }, - { 7862, ProgramNamedParameter4fNV_remap_index }, - { 10311, ProgramNamedParameter4fvNV_remap_index }, - { 21367, DepthBoundsEXT_remap_index }, + { 23993, ProgramNamedParameter4dNV_remap_index }, + { 12886, ProgramNamedParameter4dvNV_remap_index }, + { 7923, ProgramNamedParameter4fNV_remap_index }, + { 10464, ProgramNamedParameter4fvNV_remap_index }, + { 21672, DepthBoundsEXT_remap_index }, { 1043, BlendEquationSeparateEXT_remap_index }, - { 12826, BindFramebufferEXT_remap_index }, - { 22582, BindRenderbufferEXT_remap_index }, - { 8515, CheckFramebufferStatusEXT_remap_index }, - { 19853, DeleteFramebuffersEXT_remap_index }, - { 28061, DeleteRenderbuffersEXT_remap_index }, - { 11831, FramebufferRenderbufferEXT_remap_index }, - { 11968, FramebufferTexture1DEXT_remap_index }, - { 10139, FramebufferTexture2DEXT_remap_index }, - { 9806, FramebufferTexture3DEXT_remap_index }, - { 20429, GenFramebuffersEXT_remap_index }, - { 15291, GenRenderbuffersEXT_remap_index }, - { 5684, GenerateMipmapEXT_remap_index }, - { 19084, GetFramebufferAttachmentParameterivEXT_remap_index }, - { 28586, GetRenderbufferParameterivEXT_remap_index }, - { 17924, IsFramebufferEXT_remap_index }, - { 29333, IsRenderbufferEXT_remap_index }, - { 7173, RenderbufferStorageEXT_remap_index }, + { 13005, BindFramebufferEXT_remap_index }, + { 22914, BindRenderbufferEXT_remap_index }, + { 8605, CheckFramebufferStatusEXT_remap_index }, + { 20089, DeleteFramebuffersEXT_remap_index }, + { 28447, DeleteRenderbuffersEXT_remap_index }, + { 11978, FramebufferRenderbufferEXT_remap_index }, + { 12115, FramebufferTexture1DEXT_remap_index }, + { 10258, FramebufferTexture2DEXT_remap_index }, + { 9925, FramebufferTexture3DEXT_remap_index }, + { 20691, GenFramebuffersEXT_remap_index }, + { 15470, GenRenderbuffersEXT_remap_index }, + { 5745, GenerateMipmapEXT_remap_index }, + { 19320, GetFramebufferAttachmentParameterivEXT_remap_index }, + { 28972, GetRenderbufferParameterivEXT_remap_index }, + { 18131, IsFramebufferEXT_remap_index }, + { 29719, IsRenderbufferEXT_remap_index }, + { 7234, RenderbufferStorageEXT_remap_index }, { 651, BlitFramebufferEXT_remap_index }, - { 12526, BufferParameteriAPPLE_remap_index }, - { 16821, FlushMappedBufferRangeAPPLE_remap_index }, + { 12705, BufferParameteriAPPLE_remap_index }, + { 17000, FlushMappedBufferRangeAPPLE_remap_index }, { 2701, FramebufferTextureLayerEXT_remap_index }, - { 26007, ProvokingVertexEXT_remap_index }, - { 9461, GetTexParameterPointervAPPLE_remap_index }, - { 4405, TextureRangeAPPLE_remap_index }, - { 25322, StencilFuncSeparateATI_remap_index }, - { 15811, ProgramEnvParameters4fvEXT_remap_index }, - { 15029, ProgramLocalParameters4fvEXT_remap_index }, - { 12360, GetQueryObjecti64vEXT_remap_index }, - { 9103, GetQueryObjectui64vEXT_remap_index }, + { 8307, ColorMaskIndexedEXT_remap_index }, + { 23341, DisableIndexedEXT_remap_index }, + { 23649, EnableIndexedEXT_remap_index }, + { 19291, GetBooleanIndexedvEXT_remap_index }, + { 9715, GetIntegerIndexedvEXT_remap_index }, + { 20165, IsEnabledIndexedEXT_remap_index }, + { 4074, BeginConditionalRenderNV_remap_index }, + { 22700, EndConditionalRenderNV_remap_index }, + { 26354, ProvokingVertexEXT_remap_index }, + { 9551, GetTexParameterPointervAPPLE_remap_index }, + { 4436, TextureRangeAPPLE_remap_index }, + { 10330, GetObjectParameterivAPPLE_remap_index }, + { 17575, ObjectPurgeableAPPLE_remap_index }, + { 4900, ObjectUnpurgeableAPPLE_remap_index }, + { 25669, StencilFuncSeparateATI_remap_index }, + { 15990, ProgramEnvParameters4fvEXT_remap_index }, + { 15208, ProgramLocalParameters4fvEXT_remap_index }, + { 12539, GetQueryObjecti64vEXT_remap_index }, + { 9193, GetQueryObjectui64vEXT_remap_index }, + { 21193, EGLImageTargetRenderbufferStorageOES_remap_index }, + { 10817, EGLImageTargetTexture2DOES_remap_index }, { -1, -1 } }; @@ -4728,108 +4793,108 @@ static const struct gl_function_remap MESA_alt_functions[] = { /* from GL_EXT_blend_color */ { 2440, _gloffset_BlendColor }, /* from GL_EXT_blend_minmax */ - { 9863, _gloffset_BlendEquation }, + { 9982, _gloffset_BlendEquation }, /* from GL_EXT_color_subtable */ - { 14927, _gloffset_ColorSubTable }, - { 27993, _gloffset_CopyColorSubTable }, + { 15106, _gloffset_ColorSubTable }, + { 28379, _gloffset_CopyColorSubTable }, /* from GL_EXT_convolution */ { 213, _gloffset_ConvolutionFilter1D }, { 2284, _gloffset_CopyConvolutionFilter1D }, { 3624, _gloffset_GetConvolutionParameteriv }, - { 7522, _gloffset_ConvolutionFilter2D }, - { 7688, _gloffset_ConvolutionParameteriv }, - { 8148, _gloffset_ConvolutionParameterfv }, - { 18072, _gloffset_GetSeparableFilter }, - { 21118, _gloffset_SeparableFilter2D }, - { 21947, _gloffset_ConvolutionParameteri }, - { 22070, _gloffset_ConvolutionParameterf }, - { 23449, _gloffset_GetConvolutionParameterfv }, - { 24303, _gloffset_GetConvolutionFilter }, - { 26547, _gloffset_CopyConvolutionFilter2D }, + { 7583, _gloffset_ConvolutionFilter2D }, + { 7749, _gloffset_ConvolutionParameteriv }, + { 8209, _gloffset_ConvolutionParameterfv }, + { 18279, _gloffset_GetSeparableFilter }, + { 21423, _gloffset_SeparableFilter2D }, + { 22252, _gloffset_ConvolutionParameteri }, + { 22375, _gloffset_ConvolutionParameterf }, + { 23828, _gloffset_GetConvolutionParameterfv }, + { 24650, _gloffset_GetConvolutionFilter }, + { 26894, _gloffset_CopyConvolutionFilter2D }, /* from GL_EXT_copy_texture */ - { 13185, _gloffset_CopyTexSubImage3D }, - { 14667, _gloffset_CopyTexImage2D }, - { 21555, _gloffset_CopyTexImage1D }, - { 23984, _gloffset_CopyTexSubImage2D }, - { 26185, _gloffset_CopyTexSubImage1D }, + { 13364, _gloffset_CopyTexSubImage3D }, + { 14846, _gloffset_CopyTexImage2D }, + { 21860, _gloffset_CopyTexImage1D }, + { 24331, _gloffset_CopyTexSubImage2D }, + { 26532, _gloffset_CopyTexSubImage1D }, /* from GL_EXT_draw_range_elements */ - { 8402, _gloffset_DrawRangeElements }, + { 8492, _gloffset_DrawRangeElements }, /* from GL_EXT_histogram */ { 812, _gloffset_Histogram }, { 3088, _gloffset_ResetHistogram }, - { 8774, _gloffset_GetMinmax }, - { 13519, _gloffset_GetHistogramParameterfv }, - { 21480, _gloffset_GetMinmaxParameteriv }, - { 23339, _gloffset_ResetMinmax }, - { 24200, _gloffset_GetHistogramParameteriv }, - { 25256, _gloffset_GetHistogram }, - { 27618, _gloffset_Minmax }, - { 29080, _gloffset_GetMinmaxParameterfv }, + { 8864, _gloffset_GetMinmax }, + { 13698, _gloffset_GetHistogramParameterfv }, + { 21785, _gloffset_GetMinmaxParameteriv }, + { 23718, _gloffset_ResetMinmax }, + { 24547, _gloffset_GetHistogramParameteriv }, + { 25603, _gloffset_GetHistogram }, + { 27965, _gloffset_Minmax }, + { 29466, _gloffset_GetMinmaxParameterfv }, /* from GL_EXT_paletted_texture */ - { 7384, _gloffset_ColorTable }, - { 13365, _gloffset_GetColorTable }, - { 20176, _gloffset_GetColorTableParameterfv }, - { 22126, _gloffset_GetColorTableParameteriv }, + { 7445, _gloffset_ColorTable }, + { 13544, _gloffset_GetColorTable }, + { 20438, _gloffset_GetColorTableParameterfv }, + { 22431, _gloffset_GetColorTableParameteriv }, /* from GL_EXT_subtexture */ - { 6105, _gloffset_TexSubImage1D }, - { 9388, _gloffset_TexSubImage2D }, + { 6166, _gloffset_TexSubImage1D }, + { 9478, _gloffset_TexSubImage2D }, /* from GL_EXT_texture3D */ { 1658, _gloffset_TexImage3D }, - { 19945, _gloffset_TexSubImage3D }, + { 20207, _gloffset_TexSubImage3D }, /* from GL_EXT_texture_object */ { 2964, _gloffset_PrioritizeTextures }, - { 6554, _gloffset_AreTexturesResident }, - { 11916, _gloffset_GenTextures }, - { 13851, _gloffset_DeleteTextures }, - { 17102, _gloffset_IsTexture }, - { 26250, _gloffset_BindTexture }, + { 6615, _gloffset_AreTexturesResident }, + { 12063, _gloffset_GenTextures }, + { 14030, _gloffset_DeleteTextures }, + { 17281, _gloffset_IsTexture }, + { 26597, _gloffset_BindTexture }, /* from GL_EXT_vertex_array */ - { 21307, _gloffset_ArrayElement }, - { 27206, _gloffset_GetPointerv }, - { 28707, _gloffset_DrawArrays }, + { 21612, _gloffset_ArrayElement }, + { 27553, _gloffset_GetPointerv }, + { 29093, _gloffset_DrawArrays }, /* from GL_SGI_color_table */ - { 6672, _gloffset_ColorTableParameteriv }, - { 7384, _gloffset_ColorTable }, - { 13365, _gloffset_GetColorTable }, - { 13475, _gloffset_CopyColorTable }, - { 16963, _gloffset_ColorTableParameterfv }, - { 20176, _gloffset_GetColorTableParameterfv }, - { 22126, _gloffset_GetColorTableParameteriv }, + { 6733, _gloffset_ColorTableParameteriv }, + { 7445, _gloffset_ColorTable }, + { 13544, _gloffset_GetColorTable }, + { 13654, _gloffset_CopyColorTable }, + { 17142, _gloffset_ColorTableParameterfv }, + { 20438, _gloffset_GetColorTableParameterfv }, + { 22431, _gloffset_GetColorTableParameteriv }, /* from GL_VERSION_1_3 */ { 381, _gloffset_MultiTexCoord3sARB }, { 613, _gloffset_ActiveTextureARB }, { 3761, _gloffset_MultiTexCoord1fvARB }, - { 5240, _gloffset_MultiTexCoord3dARB }, - { 5285, _gloffset_MultiTexCoord2iARB }, - { 5409, _gloffset_MultiTexCoord2svARB }, - { 7340, _gloffset_MultiTexCoord2fARB }, - { 9133, _gloffset_MultiTexCoord3fvARB }, - { 9625, _gloffset_MultiTexCoord4sARB }, - { 10225, _gloffset_MultiTexCoord2dvARB }, - { 10607, _gloffset_MultiTexCoord1svARB }, - { 10903, _gloffset_MultiTexCoord3svARB }, - { 10964, _gloffset_MultiTexCoord4iARB }, - { 11687, _gloffset_MultiTexCoord3iARB }, - { 12389, _gloffset_MultiTexCoord1dARB }, - { 12555, _gloffset_MultiTexCoord3dvARB }, - { 13719, _gloffset_MultiTexCoord3ivARB }, - { 13764, _gloffset_MultiTexCoord2sARB }, - { 14984, _gloffset_MultiTexCoord4ivARB }, - { 16613, _gloffset_ClientActiveTextureARB }, - { 18829, _gloffset_MultiTexCoord2dARB }, - { 19204, _gloffset_MultiTexCoord4dvARB }, - { 19490, _gloffset_MultiTexCoord4fvARB }, - { 20317, _gloffset_MultiTexCoord3fARB }, - { 22627, _gloffset_MultiTexCoord4dARB }, - { 22831, _gloffset_MultiTexCoord1sARB }, - { 23009, _gloffset_MultiTexCoord1dvARB }, - { 23828, _gloffset_MultiTexCoord1ivARB }, - { 23921, _gloffset_MultiTexCoord2ivARB }, - { 24260, _gloffset_MultiTexCoord1iARB }, - { 25531, _gloffset_MultiTexCoord4svARB }, - { 26049, _gloffset_MultiTexCoord1fARB }, - { 26312, _gloffset_MultiTexCoord4fARB }, - { 28541, _gloffset_MultiTexCoord2fvARB }, + { 5301, _gloffset_MultiTexCoord3dARB }, + { 5346, _gloffset_MultiTexCoord2iARB }, + { 5470, _gloffset_MultiTexCoord2svARB }, + { 7401, _gloffset_MultiTexCoord2fARB }, + { 9223, _gloffset_MultiTexCoord3fvARB }, + { 9744, _gloffset_MultiTexCoord4sARB }, + { 10378, _gloffset_MultiTexCoord2dvARB }, + { 10760, _gloffset_MultiTexCoord1svARB }, + { 11050, _gloffset_MultiTexCoord3svARB }, + { 11111, _gloffset_MultiTexCoord4iARB }, + { 11834, _gloffset_MultiTexCoord3iARB }, + { 12568, _gloffset_MultiTexCoord1dARB }, + { 12734, _gloffset_MultiTexCoord3dvARB }, + { 13898, _gloffset_MultiTexCoord3ivARB }, + { 13943, _gloffset_MultiTexCoord2sARB }, + { 15163, _gloffset_MultiTexCoord4ivARB }, + { 16792, _gloffset_ClientActiveTextureARB }, + { 19036, _gloffset_MultiTexCoord2dARB }, + { 19440, _gloffset_MultiTexCoord4dvARB }, + { 19726, _gloffset_MultiTexCoord4fvARB }, + { 20579, _gloffset_MultiTexCoord3fARB }, + { 22959, _gloffset_MultiTexCoord4dARB }, + { 23163, _gloffset_MultiTexCoord1sARB }, + { 23365, _gloffset_MultiTexCoord1dvARB }, + { 24175, _gloffset_MultiTexCoord1ivARB }, + { 24268, _gloffset_MultiTexCoord2ivARB }, + { 24607, _gloffset_MultiTexCoord1iARB }, + { 25878, _gloffset_MultiTexCoord4svARB }, + { 26396, _gloffset_MultiTexCoord1fARB }, + { 26659, _gloffset_MultiTexCoord4fARB }, + { 28927, _gloffset_MultiTexCoord2fvARB }, { -1, -1 } }; @@ -4837,7 +4902,7 @@ static const struct gl_function_remap MESA_alt_functions[] = { #if defined(need_GL_3DFX_tbuffer) static const struct gl_function_remap GL_3DFX_tbuffer_functions[] = { - { 8206, -1 }, /* TbufferMask3DFX */ + { 8267, -1 }, /* TbufferMask3DFX */ { -1, -1 } }; #endif @@ -4849,6 +4914,13 @@ static const struct gl_function_remap GL_APPLE_flush_buffer_range_functions[] = }; #endif +#if defined(need_GL_APPLE_object_purgeable) +/* functions defined in MESA_remap_table_functions are excluded */ +static const struct gl_function_remap GL_APPLE_object_purgeable_functions[] = { + { -1, -1 } +}; +#endif + #if defined(need_GL_APPLE_texture_range) /* functions defined in MESA_remap_table_functions are excluded */ static const struct gl_function_remap GL_APPLE_texture_range_functions[] = { @@ -4901,10 +4973,10 @@ static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = { #if defined(need_GL_ARB_matrix_palette) static const struct gl_function_remap GL_ARB_matrix_palette_functions[] = { { 3339, -1 }, /* MatrixIndexusvARB */ - { 11508, -1 }, /* MatrixIndexuivARB */ - { 12677, -1 }, /* MatrixIndexPointerARB */ - { 17351, -1 }, /* CurrentPaletteMatrixARB */ - { 20061, -1 }, /* MatrixIndexubvARB */ + { 11655, -1 }, /* MatrixIndexuivARB */ + { 12856, -1 }, /* MatrixIndexPointerARB */ + { 17530, -1 }, /* CurrentPaletteMatrixARB */ + { 20323, -1 }, /* MatrixIndexubvARB */ { -1, -1 } }; #endif @@ -4975,15 +5047,15 @@ static const struct gl_function_remap GL_ARB_vertex_array_object_functions[] = { #if defined(need_GL_ARB_vertex_blend) static const struct gl_function_remap GL_ARB_vertex_blend_functions[] = { { 2226, -1 }, /* WeightubvARB */ - { 5572, -1 }, /* WeightivARB */ - { 9728, -1 }, /* WeightPointerARB */ - { 12146, -1 }, /* WeightfvARB */ - { 15431, -1 }, /* WeightbvARB */ - { 18497, -1 }, /* WeightusvARB */ - { 21044, -1 }, /* VertexBlendARB */ - { 26133, -1 }, /* WeightsvARB */ - { 28043, -1 }, /* WeightdvARB */ - { 28741, -1 }, /* WeightuivARB */ + { 5633, -1 }, /* WeightivARB */ + { 9847, -1 }, /* WeightPointerARB */ + { 12325, -1 }, /* WeightfvARB */ + { 15610, -1 }, /* WeightbvARB */ + { 18704, -1 }, /* WeightusvARB */ + { 21349, -1 }, /* VertexBlendARB */ + { 26480, -1 }, /* WeightsvARB */ + { 28429, -1 }, /* WeightdvARB */ + { 29127, -1 }, /* WeightuivARB */ { -1, -1 } }; #endif @@ -5074,15 +5146,15 @@ static const struct gl_function_remap GL_EXT_blend_func_separate_functions[] = { #if defined(need_GL_EXT_blend_minmax) static const struct gl_function_remap GL_EXT_blend_minmax_functions[] = { - { 9863, _gloffset_BlendEquation }, + { 9982, _gloffset_BlendEquation }, { -1, -1 } }; #endif #if defined(need_GL_EXT_color_subtable) static const struct gl_function_remap GL_EXT_color_subtable_functions[] = { - { 14927, _gloffset_ColorSubTable }, - { 27993, _gloffset_CopyColorSubTable }, + { 15106, _gloffset_ColorSubTable }, + { 28379, _gloffset_CopyColorSubTable }, { -1, -1 } }; #endif @@ -5099,55 +5171,55 @@ static const struct gl_function_remap GL_EXT_convolution_functions[] = { { 213, _gloffset_ConvolutionFilter1D }, { 2284, _gloffset_CopyConvolutionFilter1D }, { 3624, _gloffset_GetConvolutionParameteriv }, - { 7522, _gloffset_ConvolutionFilter2D }, - { 7688, _gloffset_ConvolutionParameteriv }, - { 8148, _gloffset_ConvolutionParameterfv }, - { 18072, _gloffset_GetSeparableFilter }, - { 21118, _gloffset_SeparableFilter2D }, - { 21947, _gloffset_ConvolutionParameteri }, - { 22070, _gloffset_ConvolutionParameterf }, - { 23449, _gloffset_GetConvolutionParameterfv }, - { 24303, _gloffset_GetConvolutionFilter }, - { 26547, _gloffset_CopyConvolutionFilter2D }, + { 7583, _gloffset_ConvolutionFilter2D }, + { 7749, _gloffset_ConvolutionParameteriv }, + { 8209, _gloffset_ConvolutionParameterfv }, + { 18279, _gloffset_GetSeparableFilter }, + { 21423, _gloffset_SeparableFilter2D }, + { 22252, _gloffset_ConvolutionParameteri }, + { 22375, _gloffset_ConvolutionParameterf }, + { 23828, _gloffset_GetConvolutionParameterfv }, + { 24650, _gloffset_GetConvolutionFilter }, + { 26894, _gloffset_CopyConvolutionFilter2D }, { -1, -1 } }; #endif #if defined(need_GL_EXT_coordinate_frame) static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = { - { 9272, -1 }, /* TangentPointerEXT */ - { 11022, -1 }, /* Binormal3ivEXT */ - { 11640, -1 }, /* Tangent3sEXT */ - { 12742, -1 }, /* Tangent3fvEXT */ - { 16363, -1 }, /* Tangent3dvEXT */ - { 17049, -1 }, /* Binormal3bvEXT */ - { 18125, -1 }, /* Binormal3dEXT */ - { 19993, -1 }, /* Tangent3fEXT */ - { 22019, -1 }, /* Binormal3sEXT */ - { 22437, -1 }, /* Tangent3ivEXT */ - { 22456, -1 }, /* Tangent3dEXT */ - { 23236, -1 }, /* Binormal3svEXT */ - { 23726, -1 }, /* Binormal3fEXT */ - { 24578, -1 }, /* Binormal3dvEXT */ - { 25753, -1 }, /* Tangent3iEXT */ - { 26832, -1 }, /* Tangent3bvEXT */ - { 27241, -1 }, /* Tangent3bEXT */ - { 27766, -1 }, /* Binormal3fvEXT */ - { 28440, -1 }, /* BinormalPointerEXT */ - { 28845, -1 }, /* Tangent3svEXT */ - { 29282, -1 }, /* Binormal3bEXT */ - { 29459, -1 }, /* Binormal3iEXT */ + { 9362, -1 }, /* TangentPointerEXT */ + { 11169, -1 }, /* Binormal3ivEXT */ + { 11787, -1 }, /* Tangent3sEXT */ + { 12921, -1 }, /* Tangent3fvEXT */ + { 16542, -1 }, /* Tangent3dvEXT */ + { 17228, -1 }, /* Binormal3bvEXT */ + { 18332, -1 }, /* Binormal3dEXT */ + { 20255, -1 }, /* Tangent3fEXT */ + { 22324, -1 }, /* Binormal3sEXT */ + { 22769, -1 }, /* Tangent3ivEXT */ + { 22788, -1 }, /* Tangent3dEXT */ + { 23592, -1 }, /* Binormal3svEXT */ + { 24073, -1 }, /* Binormal3fEXT */ + { 24925, -1 }, /* Binormal3dvEXT */ + { 26100, -1 }, /* Tangent3iEXT */ + { 27179, -1 }, /* Tangent3bvEXT */ + { 27588, -1 }, /* Tangent3bEXT */ + { 28152, -1 }, /* Binormal3fvEXT */ + { 28826, -1 }, /* BinormalPointerEXT */ + { 29231, -1 }, /* Tangent3svEXT */ + { 29668, -1 }, /* Binormal3bEXT */ + { 29845, -1 }, /* Binormal3iEXT */ { -1, -1 } }; #endif #if defined(need_GL_EXT_copy_texture) static const struct gl_function_remap GL_EXT_copy_texture_functions[] = { - { 13185, _gloffset_CopyTexSubImage3D }, - { 14667, _gloffset_CopyTexImage2D }, - { 21555, _gloffset_CopyTexImage1D }, - { 23984, _gloffset_CopyTexSubImage2D }, - { 26185, _gloffset_CopyTexSubImage1D }, + { 13364, _gloffset_CopyTexSubImage3D }, + { 14846, _gloffset_CopyTexImage2D }, + { 21860, _gloffset_CopyTexImage1D }, + { 24331, _gloffset_CopyTexSubImage2D }, + { 26532, _gloffset_CopyTexSubImage1D }, { -1, -1 } }; #endif @@ -5166,9 +5238,16 @@ static const struct gl_function_remap GL_EXT_depth_bounds_test_functions[] = { }; #endif +#if defined(need_GL_EXT_draw_buffers2) +/* functions defined in MESA_remap_table_functions are excluded */ +static const struct gl_function_remap GL_EXT_draw_buffers2_functions[] = { + { -1, -1 } +}; +#endif + #if defined(need_GL_EXT_draw_range_elements) static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = { - { 8402, _gloffset_DrawRangeElements }, + { 8492, _gloffset_DrawRangeElements }, { -1, -1 } }; #endif @@ -5212,37 +5291,37 @@ static const struct gl_function_remap GL_EXT_gpu_program_parameters_functions[] static const struct gl_function_remap GL_EXT_histogram_functions[] = { { 812, _gloffset_Histogram }, { 3088, _gloffset_ResetHistogram }, - { 8774, _gloffset_GetMinmax }, - { 13519, _gloffset_GetHistogramParameterfv }, - { 21480, _gloffset_GetMinmaxParameteriv }, - { 23339, _gloffset_ResetMinmax }, - { 24200, _gloffset_GetHistogramParameteriv }, - { 25256, _gloffset_GetHistogram }, - { 27618, _gloffset_Minmax }, - { 29080, _gloffset_GetMinmaxParameterfv }, + { 8864, _gloffset_GetMinmax }, + { 13698, _gloffset_GetHistogramParameterfv }, + { 21785, _gloffset_GetMinmaxParameteriv }, + { 23718, _gloffset_ResetMinmax }, + { 24547, _gloffset_GetHistogramParameteriv }, + { 25603, _gloffset_GetHistogram }, + { 27965, _gloffset_Minmax }, + { 29466, _gloffset_GetMinmaxParameterfv }, { -1, -1 } }; #endif #if defined(need_GL_EXT_index_func) static const struct gl_function_remap GL_EXT_index_func_functions[] = { - { 10090, -1 }, /* IndexFuncEXT */ + { 10209, -1 }, /* IndexFuncEXT */ { -1, -1 } }; #endif #if defined(need_GL_EXT_index_material) static const struct gl_function_remap GL_EXT_index_material_functions[] = { - { 18584, -1 }, /* IndexMaterialEXT */ + { 18791, -1 }, /* IndexMaterialEXT */ { -1, -1 } }; #endif #if defined(need_GL_EXT_light_texture) static const struct gl_function_remap GL_EXT_light_texture_functions[] = { - { 23256, -1 }, /* ApplyTextureEXT */ - { 23293, -1 }, /* TextureMaterialEXT */ - { 23318, -1 }, /* TextureLightEXT */ + { 23612, -1 }, /* ApplyTextureEXT */ + { 23672, -1 }, /* TextureMaterialEXT */ + { 23697, -1 }, /* TextureLightEXT */ { -1, -1 } }; #endif @@ -5263,20 +5342,20 @@ static const struct gl_function_remap GL_EXT_multisample_functions[] = { #if defined(need_GL_EXT_paletted_texture) static const struct gl_function_remap GL_EXT_paletted_texture_functions[] = { - { 7384, _gloffset_ColorTable }, - { 13365, _gloffset_GetColorTable }, - { 20176, _gloffset_GetColorTableParameterfv }, - { 22126, _gloffset_GetColorTableParameteriv }, + { 7445, _gloffset_ColorTable }, + { 13544, _gloffset_GetColorTable }, + { 20438, _gloffset_GetColorTableParameterfv }, + { 22431, _gloffset_GetColorTableParameteriv }, { -1, -1 } }; #endif #if defined(need_GL_EXT_pixel_transform) static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = { - { 9513, -1 }, /* PixelTransformParameterfvEXT */ - { 19169, -1 }, /* PixelTransformParameterfEXT */ - { 19249, -1 }, /* PixelTransformParameteriEXT */ - { 28404, -1 }, /* PixelTransformParameterivEXT */ + { 9603, -1 }, /* PixelTransformParameterfvEXT */ + { 19405, -1 }, /* PixelTransformParameterfEXT */ + { 19485, -1 }, /* PixelTransformParameteriEXT */ + { 28790, -1 }, /* PixelTransformParameterivEXT */ { -1, -1 } }; #endif @@ -5318,8 +5397,8 @@ static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = { #if defined(need_GL_EXT_subtexture) static const struct gl_function_remap GL_EXT_subtexture_functions[] = { - { 6105, _gloffset_TexSubImage1D }, - { 9388, _gloffset_TexSubImage2D }, + { 6166, _gloffset_TexSubImage1D }, + { 9478, _gloffset_TexSubImage2D }, { -1, -1 } }; #endif @@ -5327,7 +5406,7 @@ static const struct gl_function_remap GL_EXT_subtexture_functions[] = { #if defined(need_GL_EXT_texture3D) static const struct gl_function_remap GL_EXT_texture3D_functions[] = { { 1658, _gloffset_TexImage3D }, - { 19945, _gloffset_TexSubImage3D }, + { 20207, _gloffset_TexSubImage3D }, { -1, -1 } }; #endif @@ -5342,18 +5421,18 @@ static const struct gl_function_remap GL_EXT_texture_array_functions[] = { #if defined(need_GL_EXT_texture_object) static const struct gl_function_remap GL_EXT_texture_object_functions[] = { { 2964, _gloffset_PrioritizeTextures }, - { 6554, _gloffset_AreTexturesResident }, - { 11916, _gloffset_GenTextures }, - { 13851, _gloffset_DeleteTextures }, - { 17102, _gloffset_IsTexture }, - { 26250, _gloffset_BindTexture }, + { 6615, _gloffset_AreTexturesResident }, + { 12063, _gloffset_GenTextures }, + { 14030, _gloffset_DeleteTextures }, + { 17281, _gloffset_IsTexture }, + { 26597, _gloffset_BindTexture }, { -1, -1 } }; #endif #if defined(need_GL_EXT_texture_perturb_normal) static const struct gl_function_remap GL_EXT_texture_perturb_normal_functions[] = { - { 12096, -1 }, /* TextureNormalEXT */ + { 12275, -1 }, /* TextureNormalEXT */ { -1, -1 } }; #endif @@ -5368,18 +5447,18 @@ static const struct gl_function_remap GL_EXT_timer_query_functions[] = { #if defined(need_GL_EXT_vertex_array) /* functions defined in MESA_remap_table_functions are excluded */ static const struct gl_function_remap GL_EXT_vertex_array_functions[] = { - { 21307, _gloffset_ArrayElement }, - { 27206, _gloffset_GetPointerv }, - { 28707, _gloffset_DrawArrays }, + { 21612, _gloffset_ArrayElement }, + { 27553, _gloffset_GetPointerv }, + { 29093, _gloffset_DrawArrays }, { -1, -1 } }; #endif #if defined(need_GL_EXT_vertex_weighting) static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = { - { 17132, -1 }, /* VertexWeightfvEXT */ - { 23704, -1 }, /* VertexWeightfEXT */ - { 25225, -1 }, /* VertexWeightPointerEXT */ + { 17311, -1 }, /* VertexWeightfvEXT */ + { 24051, -1 }, /* VertexWeightfEXT */ + { 25572, -1 }, /* VertexWeightPointerEXT */ { -1, -1 } }; #endif @@ -5388,10 +5467,10 @@ static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = { static const struct gl_function_remap GL_HP_image_transform_functions[] = { { 2157, -1 }, /* GetImageTransformParameterfvHP */ { 3305, -1 }, /* ImageTransformParameterfHP */ - { 8966, -1 }, /* ImageTransformParameterfvHP */ - { 10525, -1 }, /* ImageTransformParameteriHP */ - { 10793, -1 }, /* GetImageTransformParameterivHP */ - { 17196, -1 }, /* ImageTransformParameterivHP */ + { 9056, -1 }, /* ImageTransformParameterfvHP */ + { 10678, -1 }, /* ImageTransformParameteriHP */ + { 10940, -1 }, /* GetImageTransformParameterivHP */ + { 17375, -1 }, /* ImageTransformParameterivHP */ { -1, -1 } }; #endif @@ -5406,13 +5485,13 @@ static const struct gl_function_remap GL_IBM_multimode_draw_arrays_functions[] = #if defined(need_GL_IBM_vertex_array_lists) static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = { { 3857, -1 }, /* SecondaryColorPointerListIBM */ - { 5106, -1 }, /* NormalPointerListIBM */ - { 6728, -1 }, /* FogCoordPointerListIBM */ - { 7035, -1 }, /* VertexPointerListIBM */ - { 10446, -1 }, /* ColorPointerListIBM */ - { 11747, -1 }, /* TexCoordPointerListIBM */ - { 12118, -1 }, /* IndexPointerListIBM */ - { 29023, -1 }, /* EdgeFlagPointerListIBM */ + { 5167, -1 }, /* NormalPointerListIBM */ + { 6789, -1 }, /* FogCoordPointerListIBM */ + { 7096, -1 }, /* VertexPointerListIBM */ + { 10599, -1 }, /* ColorPointerListIBM */ + { 11894, -1 }, /* TexCoordPointerListIBM */ + { 12297, -1 }, /* IndexPointerListIBM */ + { 29409, -1 }, /* EdgeFlagPointerListIBM */ { -1, -1 } }; #endif @@ -5426,10 +5505,10 @@ static const struct gl_function_remap GL_INGR_blend_func_separate_functions[] = #if defined(need_GL_INTEL_parallel_arrays) static const struct gl_function_remap GL_INTEL_parallel_arrays_functions[] = { - { 11134, -1 }, /* VertexPointervINTEL */ - { 13612, -1 }, /* ColorPointervINTEL */ - { 26521, -1 }, /* NormalPointervINTEL */ - { 26947, -1 }, /* TexCoordPointervINTEL */ + { 11281, -1 }, /* VertexPointervINTEL */ + { 13791, -1 }, /* ColorPointervINTEL */ + { 26868, -1 }, /* NormalPointervINTEL */ + { 27294, -1 }, /* TexCoordPointervINTEL */ { -1, -1 } }; #endif @@ -5446,7 +5525,7 @@ static const struct gl_function_remap GL_MESA_shader_debug_functions[] = { { 1522, -1 }, /* GetDebugLogLengthMESA */ { 3063, -1 }, /* ClearDebugLogMESA */ { 4018, -1 }, /* GetDebugLogMESA */ - { 27399, -1 }, /* CreateDebugObjectMESA */ + { 27746, -1 }, /* CreateDebugObjectMESA */ { -1, -1 } }; #endif @@ -5458,17 +5537,24 @@ static const struct gl_function_remap GL_MESA_window_pos_functions[] = { }; #endif +#if defined(need_GL_NV_condtitional_render) +/* functions defined in MESA_remap_table_functions are excluded */ +static const struct gl_function_remap GL_NV_condtitional_render_functions[] = { + { -1, -1 } +}; +#endif + #if defined(need_GL_NV_evaluators) static const struct gl_function_remap GL_NV_evaluators_functions[] = { - { 5773, -1 }, /* GetMapAttribParameterivNV */ - { 7490, -1 }, /* MapControlPointsNV */ - { 7589, -1 }, /* MapParameterfvNV */ - { 9371, -1 }, /* EvalMapsNV */ - { 15101, -1 }, /* GetMapAttribParameterfvNV */ - { 15267, -1 }, /* MapParameterivNV */ - { 21870, -1 }, /* GetMapParameterivNV */ - { 22368, -1 }, /* GetMapParameterfvNV */ - { 25857, -1 }, /* GetMapControlPointsNV */ + { 5834, -1 }, /* GetMapAttribParameterivNV */ + { 7551, -1 }, /* MapControlPointsNV */ + { 7650, -1 }, /* MapParameterfvNV */ + { 9461, -1 }, /* EvalMapsNV */ + { 15280, -1 }, /* GetMapAttribParameterfvNV */ + { 15446, -1 }, /* MapParameterivNV */ + { 22175, -1 }, /* GetMapParameterivNV */ + { 22673, -1 }, /* GetMapParameterfvNV */ + { 26204, -1 }, /* GetMapControlPointsNV */ { -1, -1 } }; #endif @@ -5503,8 +5589,8 @@ static const struct gl_function_remap GL_NV_register_combiners_functions[] = { #if defined(need_GL_NV_register_combiners2) static const struct gl_function_remap GL_NV_register_combiners2_functions[] = { - { 14004, -1 }, /* CombinerStageParameterfvNV */ - { 14319, -1 }, /* GetCombinerStageParameterfvNV */ + { 14183, -1 }, /* CombinerStageParameterfvNV */ + { 14498, -1 }, /* GetCombinerStageParameterfvNV */ { -1, -1 } }; #endif @@ -5523,25 +5609,32 @@ static const struct gl_function_remap GL_NV_vertex_program_functions[] = { }; #endif +#if defined(need_GL_OES_EGL_image) +/* functions defined in MESA_remap_table_functions are excluded */ +static const struct gl_function_remap GL_OES_EGL_image_functions[] = { + { -1, -1 } +}; +#endif + #if defined(need_GL_PGI_misc_hints) static const struct gl_function_remap GL_PGI_misc_hints_functions[] = { - { 7674, -1 }, /* HintPGI */ + { 7735, -1 }, /* HintPGI */ { -1, -1 } }; #endif #if defined(need_GL_SGIS_detail_texture) static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = { - { 14292, -1 }, /* GetDetailTexFuncSGIS */ - { 14612, -1 }, /* DetailTexFuncSGIS */ + { 14471, -1 }, /* GetDetailTexFuncSGIS */ + { 14791, -1 }, /* DetailTexFuncSGIS */ { -1, -1 } }; #endif #if defined(need_GL_SGIS_fog_function) static const struct gl_function_remap GL_SGIS_fog_function_functions[] = { - { 23966, -1 }, /* FogFuncSGIS */ - { 24631, -1 }, /* GetFogFuncSGIS */ + { 24313, -1 }, /* FogFuncSGIS */ + { 24978, -1 }, /* GetFogFuncSGIS */ { -1, -1 } }; #endif @@ -5569,8 +5662,8 @@ static const struct gl_function_remap GL_SGIS_point_parameters_functions[] = { #if defined(need_GL_SGIS_sharpen_texture) static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = { - { 5834, -1 }, /* GetSharpenTexFuncSGIS */ - { 19464, -1 }, /* SharpenTexFuncSGIS */ + { 5895, -1 }, /* GetSharpenTexFuncSGIS */ + { 19700, -1 }, /* SharpenTexFuncSGIS */ { -1, -1 } }; #endif @@ -5578,22 +5671,22 @@ static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = { #if defined(need_GL_SGIS_texture4D) static const struct gl_function_remap GL_SGIS_texture4D_functions[] = { { 894, -1 }, /* TexImage4DSGIS */ - { 13920, -1 }, /* TexSubImage4DSGIS */ + { 14099, -1 }, /* TexSubImage4DSGIS */ { -1, -1 } }; #endif #if defined(need_GL_SGIS_texture_color_mask) static const struct gl_function_remap GL_SGIS_texture_color_mask_functions[] = { - { 13318, -1 }, /* TextureColorMaskSGIS */ + { 13497, -1 }, /* TextureColorMaskSGIS */ { -1, -1 } }; #endif #if defined(need_GL_SGIS_texture_filter4) static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = { - { 6011, -1 }, /* GetTexFilterFuncSGIS */ - { 14438, -1 }, /* TexFilterFuncSGIS */ + { 6072, -1 }, /* GetTexFilterFuncSGIS */ + { 14617, -1 }, /* TexFilterFuncSGIS */ { -1, -1 } }; #endif @@ -5602,17 +5695,17 @@ static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = { static const struct gl_function_remap GL_SGIX_async_functions[] = { { 3014, -1 }, /* AsyncMarkerSGIX */ { 3997, -1 }, /* FinishAsyncSGIX */ - { 4703, -1 }, /* PollAsyncSGIX */ - { 19611, -1 }, /* DeleteAsyncMarkersSGIX */ - { 19640, -1 }, /* IsAsyncMarkerSGIX */ - { 28820, -1 }, /* GenAsyncMarkersSGIX */ + { 4734, -1 }, /* PollAsyncSGIX */ + { 19847, -1 }, /* DeleteAsyncMarkersSGIX */ + { 19876, -1 }, /* IsAsyncMarkerSGIX */ + { 29206, -1 }, /* GenAsyncMarkersSGIX */ { -1, -1 } }; #endif #if defined(need_GL_SGIX_flush_raster) static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = { - { 6382, -1 }, /* FlushRasterSGIX */ + { 6443, -1 }, /* FlushRasterSGIX */ { -1, -1 } }; #endif @@ -5621,36 +5714,36 @@ static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = { static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = { { 2410, -1 }, /* FragmentMaterialfvSGIX */ { 2906, -1 }, /* FragmentLightModelivSGIX */ - { 4654, -1 }, /* FragmentLightiSGIX */ - { 5514, -1 }, /* GetFragmentMaterialfvSGIX */ - { 7102, -1 }, /* FragmentMaterialfSGIX */ - { 7263, -1 }, /* GetFragmentLightivSGIX */ - { 8100, -1 }, /* FragmentLightModeliSGIX */ - { 9434, -1 }, /* FragmentLightivSGIX */ - { 9671, -1 }, /* GetFragmentMaterialivSGIX */ - { 17019, -1 }, /* FragmentLightModelfSGIX */ - { 17319, -1 }, /* FragmentColorMaterialSGIX */ - { 17691, -1 }, /* FragmentMaterialiSGIX */ - { 18912, -1 }, /* LightEnviSGIX */ - { 20268, -1 }, /* FragmentLightModelfvSGIX */ - { 20577, -1 }, /* FragmentLightfvSGIX */ - { 25107, -1 }, /* FragmentLightfSGIX */ - { 27736, -1 }, /* GetFragmentLightfvSGIX */ - { 29303, -1 }, /* FragmentMaterialivSGIX */ + { 4685, -1 }, /* FragmentLightiSGIX */ + { 5575, -1 }, /* GetFragmentMaterialfvSGIX */ + { 7163, -1 }, /* FragmentMaterialfSGIX */ + { 7324, -1 }, /* GetFragmentLightivSGIX */ + { 8161, -1 }, /* FragmentLightModeliSGIX */ + { 9524, -1 }, /* FragmentLightivSGIX */ + { 9790, -1 }, /* GetFragmentMaterialivSGIX */ + { 17198, -1 }, /* FragmentLightModelfSGIX */ + { 17498, -1 }, /* FragmentColorMaterialSGIX */ + { 17898, -1 }, /* FragmentMaterialiSGIX */ + { 19119, -1 }, /* LightEnviSGIX */ + { 20530, -1 }, /* FragmentLightModelfvSGIX */ + { 20839, -1 }, /* FragmentLightfvSGIX */ + { 25454, -1 }, /* FragmentLightfSGIX */ + { 28122, -1 }, /* GetFragmentLightfvSGIX */ + { 29689, -1 }, /* FragmentMaterialivSGIX */ { -1, -1 } }; #endif #if defined(need_GL_SGIX_framezoom) static const struct gl_function_remap GL_SGIX_framezoom_functions[] = { - { 19663, -1 }, /* FrameZoomSGIX */ + { 19899, -1 }, /* FrameZoomSGIX */ { -1, -1 } }; #endif #if defined(need_GL_SGIX_igloo_interface) static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = { - { 25415, -1 }, /* IglooInterfaceSGIX */ + { 25762, -1 }, /* IglooInterfaceSGIX */ { -1, -1 } }; #endif @@ -5658,11 +5751,11 @@ static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = { #if defined(need_GL_SGIX_instruments) static const struct gl_function_remap GL_SGIX_instruments_functions[] = { { 2573, -1 }, /* ReadInstrumentsSGIX */ - { 5590, -1 }, /* PollInstrumentsSGIX */ - { 9332, -1 }, /* GetInstrumentsSGIX */ - { 11345, -1 }, /* StartInstrumentsSGIX */ - { 14038, -1 }, /* StopInstrumentsSGIX */ - { 15644, -1 }, /* InstrumentsBufferSGIX */ + { 5651, -1 }, /* PollInstrumentsSGIX */ + { 9422, -1 }, /* GetInstrumentsSGIX */ + { 11492, -1 }, /* StartInstrumentsSGIX */ + { 14217, -1 }, /* StopInstrumentsSGIX */ + { 15823, -1 }, /* InstrumentsBufferSGIX */ { -1, -1 } }; #endif @@ -5671,10 +5764,10 @@ static const struct gl_function_remap GL_SGIX_instruments_functions[] = { static const struct gl_function_remap GL_SGIX_list_priority_functions[] = { { 1125, -1 }, /* ListParameterfSGIX */ { 2763, -1 }, /* GetListParameterfvSGIX */ - { 15559, -1 }, /* ListParameteriSGIX */ - { 16313, -1 }, /* ListParameterfvSGIX */ - { 18318, -1 }, /* ListParameterivSGIX */ - { 28864, -1 }, /* GetListParameterivSGIX */ + { 15738, -1 }, /* ListParameteriSGIX */ + { 16492, -1 }, /* ListParameterfvSGIX */ + { 18525, -1 }, /* ListParameterivSGIX */ + { 29250, -1 }, /* GetListParameterivSGIX */ { -1, -1 } }; #endif @@ -5689,53 +5782,53 @@ static const struct gl_function_remap GL_SGIX_pixel_texture_functions[] = { #if defined(need_GL_SGIX_polynomial_ffd) static const struct gl_function_remap GL_SGIX_polynomial_ffd_functions[] = { { 3251, -1 }, /* LoadIdentityDeformationMapSGIX */ - { 10713, -1 }, /* DeformationMap3dSGIX */ - { 14138, -1 }, /* DeformSGIX */ - { 21419, -1 }, /* DeformationMap3fSGIX */ + { 14317, -1 }, /* DeformSGIX */ + { 21724, -1 }, /* DeformationMap3fSGIX */ + { 28010, -1 }, /* DeformationMap3dSGIX */ { -1, -1 } }; #endif #if defined(need_GL_SGIX_reference_plane) static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = { - { 12869, -1 }, /* ReferencePlaneSGIX */ + { 13048, -1 }, /* ReferencePlaneSGIX */ { -1, -1 } }; #endif #if defined(need_GL_SGIX_sprite) static const struct gl_function_remap GL_SGIX_sprite_functions[] = { - { 8487, -1 }, /* SpriteParameterfvSGIX */ - { 18146, -1 }, /* SpriteParameteriSGIX */ - { 23373, -1 }, /* SpriteParameterfSGIX */ - { 25979, -1 }, /* SpriteParameterivSGIX */ + { 8577, -1 }, /* SpriteParameterfvSGIX */ + { 18353, -1 }, /* SpriteParameteriSGIX */ + { 23752, -1 }, /* SpriteParameterfSGIX */ + { 26326, -1 }, /* SpriteParameterivSGIX */ { -1, -1 } }; #endif #if defined(need_GL_SGIX_tag_sample_buffer) static const struct gl_function_remap GL_SGIX_tag_sample_buffer_functions[] = { - { 18205, -1 }, /* TagSampleBufferSGIX */ + { 18412, -1 }, /* TagSampleBufferSGIX */ { -1, -1 } }; #endif #if defined(need_GL_SGI_color_table) static const struct gl_function_remap GL_SGI_color_table_functions[] = { - { 6672, _gloffset_ColorTableParameteriv }, - { 7384, _gloffset_ColorTable }, - { 13365, _gloffset_GetColorTable }, - { 13475, _gloffset_CopyColorTable }, - { 16963, _gloffset_ColorTableParameterfv }, - { 20176, _gloffset_GetColorTableParameterfv }, - { 22126, _gloffset_GetColorTableParameteriv }, + { 6733, _gloffset_ColorTableParameteriv }, + { 7445, _gloffset_ColorTable }, + { 13544, _gloffset_GetColorTable }, + { 13654, _gloffset_CopyColorTable }, + { 17142, _gloffset_ColorTableParameterfv }, + { 20438, _gloffset_GetColorTableParameterfv }, + { 22431, _gloffset_GetColorTableParameteriv }, { -1, -1 } }; #endif #if defined(need_GL_SUNX_constant_data) static const struct gl_function_remap GL_SUNX_constant_data_functions[] = { - { 27714, -1 }, /* FinishTextureSUNX */ + { 28100, -1 }, /* FinishTextureSUNX */ { -1, -1 } }; #endif @@ -5743,20 +5836,20 @@ static const struct gl_function_remap GL_SUNX_constant_data_functions[] = { #if defined(need_GL_SUN_global_alpha) static const struct gl_function_remap GL_SUN_global_alpha_functions[] = { { 3035, -1 }, /* GlobalAlphaFactorubSUN */ - { 4193, -1 }, /* GlobalAlphaFactoriSUN */ - { 5615, -1 }, /* GlobalAlphaFactordSUN */ - { 8571, -1 }, /* GlobalAlphaFactoruiSUN */ - { 8923, -1 }, /* GlobalAlphaFactorbSUN */ - { 11660, -1 }, /* GlobalAlphaFactorfSUN */ - { 11779, -1 }, /* GlobalAlphaFactorusSUN */ - { 19902, -1 }, /* GlobalAlphaFactorsSUN */ + { 4224, -1 }, /* GlobalAlphaFactoriSUN */ + { 5676, -1 }, /* GlobalAlphaFactordSUN */ + { 8661, -1 }, /* GlobalAlphaFactoruiSUN */ + { 9013, -1 }, /* GlobalAlphaFactorbSUN */ + { 11807, -1 }, /* GlobalAlphaFactorfSUN */ + { 11926, -1 }, /* GlobalAlphaFactorusSUN */ + { 20138, -1 }, /* GlobalAlphaFactorsSUN */ { -1, -1 } }; #endif #if defined(need_GL_SUN_mesh_array) static const struct gl_function_remap GL_SUN_mesh_array_functions[] = { - { 25791, -1 }, /* DrawMeshArraysSUN */ + { 26138, -1 }, /* DrawMeshArraysSUN */ { -1, -1 } }; #endif @@ -5764,12 +5857,12 @@ static const struct gl_function_remap GL_SUN_mesh_array_functions[] = { #if defined(need_GL_SUN_triangle_list) static const struct gl_function_remap GL_SUN_triangle_list_functions[] = { { 3971, -1 }, /* ReplacementCodeubSUN */ - { 5454, -1 }, /* ReplacementCodeubvSUN */ - { 16684, -1 }, /* ReplacementCodeusvSUN */ - { 16872, -1 }, /* ReplacementCodePointerSUN */ - { 18229, -1 }, /* ReplacementCodeusSUN */ - { 18976, -1 }, /* ReplacementCodeuiSUN */ - { 26436, -1 }, /* ReplacementCodeuivSUN */ + { 5515, -1 }, /* ReplacementCodeubvSUN */ + { 16863, -1 }, /* ReplacementCodeusvSUN */ + { 17051, -1 }, /* ReplacementCodePointerSUN */ + { 18436, -1 }, /* ReplacementCodeusSUN */ + { 19183, -1 }, /* ReplacementCodeuiSUN */ + { 26783, -1 }, /* ReplacementCodeuivSUN */ { -1, -1 } }; #endif @@ -5783,39 +5876,39 @@ static const struct gl_function_remap GL_SUN_vertex_functions[] = { { 1833, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */ { 2346, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */ { 2642, -1 }, /* Color4ubVertex3fvSUN */ - { 4074, -1 }, /* Color4ubVertex3fSUN */ - { 4150, -1 }, /* TexCoord2fVertex3fSUN */ - { 4449, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */ - { 4779, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */ - { 5349, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */ - { 6419, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */ - { 7131, -1 }, /* TexCoord2fNormal3fVertex3fSUN */ - { 7899, -1 }, /* Color3fVertex3fSUN */ - { 8882, -1 }, /* Color3fVertex3fvSUN */ - { 9297, -1 }, /* Color4fNormal3fVertex3fvSUN */ - { 9969, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */ - { 11208, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */ - { 12600, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */ - { 13011, -1 }, /* TexCoord2fColor3fVertex3fSUN */ - { 14063, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */ - { 14397, -1 }, /* Color4ubVertex2fvSUN */ - { 14637, -1 }, /* Normal3fVertex3fSUN */ - { 15585, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */ - { 15846, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */ - { 16513, -1 }, /* TexCoord2fVertex3fvSUN */ - { 17289, -1 }, /* Color4ubVertex2fSUN */ - { 17482, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */ - { 19335, -1 }, /* TexCoord2fColor4ubVertex3fSUN */ - { 19682, -1 }, /* Normal3fVertex3fvSUN */ - { 20085, -1 }, /* Color4fNormal3fVertex3fSUN */ - { 20951, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */ - { 21171, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */ - { 22874, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */ - { 24082, -1 }, /* TexCoord4fVertex4fSUN */ - { 24508, -1 }, /* TexCoord2fColor3fVertex3fvSUN */ - { 24834, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */ - { 24961, -1 }, /* TexCoord4fVertex4fvSUN */ - { 25663, -1 }, /* ReplacementCodeuiVertex3fSUN */ + { 4105, -1 }, /* Color4ubVertex3fSUN */ + { 4181, -1 }, /* TexCoord2fVertex3fSUN */ + { 4480, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */ + { 4810, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */ + { 5410, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */ + { 6480, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */ + { 7192, -1 }, /* TexCoord2fNormal3fVertex3fSUN */ + { 7960, -1 }, /* Color3fVertex3fSUN */ + { 8972, -1 }, /* Color3fVertex3fvSUN */ + { 9387, -1 }, /* Color4fNormal3fVertex3fvSUN */ + { 10088, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */ + { 11355, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */ + { 12779, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */ + { 13190, -1 }, /* TexCoord2fColor3fVertex3fSUN */ + { 14242, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */ + { 14576, -1 }, /* Color4ubVertex2fvSUN */ + { 14816, -1 }, /* Normal3fVertex3fSUN */ + { 15764, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */ + { 16025, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */ + { 16692, -1 }, /* TexCoord2fVertex3fvSUN */ + { 17468, -1 }, /* Color4ubVertex2fSUN */ + { 17689, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */ + { 19571, -1 }, /* TexCoord2fColor4ubVertex3fSUN */ + { 19918, -1 }, /* Normal3fVertex3fvSUN */ + { 20347, -1 }, /* Color4fNormal3fVertex3fSUN */ + { 21256, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */ + { 21476, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */ + { 23206, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */ + { 24429, -1 }, /* TexCoord4fVertex4fSUN */ + { 24855, -1 }, /* TexCoord2fColor3fVertex3fvSUN */ + { 25181, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */ + { 25308, -1 }, /* TexCoord4fVertex4fvSUN */ + { 26010, -1 }, /* ReplacementCodeuiVertex3fSUN */ { -1, -1 } }; #endif @@ -5826,37 +5919,37 @@ static const struct gl_function_remap GL_VERSION_1_3_functions[] = { { 381, _gloffset_MultiTexCoord3sARB }, { 613, _gloffset_ActiveTextureARB }, { 3761, _gloffset_MultiTexCoord1fvARB }, - { 5240, _gloffset_MultiTexCoord3dARB }, - { 5285, _gloffset_MultiTexCoord2iARB }, - { 5409, _gloffset_MultiTexCoord2svARB }, - { 7340, _gloffset_MultiTexCoord2fARB }, - { 9133, _gloffset_MultiTexCoord3fvARB }, - { 9625, _gloffset_MultiTexCoord4sARB }, - { 10225, _gloffset_MultiTexCoord2dvARB }, - { 10607, _gloffset_MultiTexCoord1svARB }, - { 10903, _gloffset_MultiTexCoord3svARB }, - { 10964, _gloffset_MultiTexCoord4iARB }, - { 11687, _gloffset_MultiTexCoord3iARB }, - { 12389, _gloffset_MultiTexCoord1dARB }, - { 12555, _gloffset_MultiTexCoord3dvARB }, - { 13719, _gloffset_MultiTexCoord3ivARB }, - { 13764, _gloffset_MultiTexCoord2sARB }, - { 14984, _gloffset_MultiTexCoord4ivARB }, - { 16613, _gloffset_ClientActiveTextureARB }, - { 18829, _gloffset_MultiTexCoord2dARB }, - { 19204, _gloffset_MultiTexCoord4dvARB }, - { 19490, _gloffset_MultiTexCoord4fvARB }, - { 20317, _gloffset_MultiTexCoord3fARB }, - { 22627, _gloffset_MultiTexCoord4dARB }, - { 22831, _gloffset_MultiTexCoord1sARB }, - { 23009, _gloffset_MultiTexCoord1dvARB }, - { 23828, _gloffset_MultiTexCoord1ivARB }, - { 23921, _gloffset_MultiTexCoord2ivARB }, - { 24260, _gloffset_MultiTexCoord1iARB }, - { 25531, _gloffset_MultiTexCoord4svARB }, - { 26049, _gloffset_MultiTexCoord1fARB }, - { 26312, _gloffset_MultiTexCoord4fARB }, - { 28541, _gloffset_MultiTexCoord2fvARB }, + { 5301, _gloffset_MultiTexCoord3dARB }, + { 5346, _gloffset_MultiTexCoord2iARB }, + { 5470, _gloffset_MultiTexCoord2svARB }, + { 7401, _gloffset_MultiTexCoord2fARB }, + { 9223, _gloffset_MultiTexCoord3fvARB }, + { 9744, _gloffset_MultiTexCoord4sARB }, + { 10378, _gloffset_MultiTexCoord2dvARB }, + { 10760, _gloffset_MultiTexCoord1svARB }, + { 11050, _gloffset_MultiTexCoord3svARB }, + { 11111, _gloffset_MultiTexCoord4iARB }, + { 11834, _gloffset_MultiTexCoord3iARB }, + { 12568, _gloffset_MultiTexCoord1dARB }, + { 12734, _gloffset_MultiTexCoord3dvARB }, + { 13898, _gloffset_MultiTexCoord3ivARB }, + { 13943, _gloffset_MultiTexCoord2sARB }, + { 15163, _gloffset_MultiTexCoord4ivARB }, + { 16792, _gloffset_ClientActiveTextureARB }, + { 19036, _gloffset_MultiTexCoord2dARB }, + { 19440, _gloffset_MultiTexCoord4dvARB }, + { 19726, _gloffset_MultiTexCoord4fvARB }, + { 20579, _gloffset_MultiTexCoord3fARB }, + { 22959, _gloffset_MultiTexCoord4dARB }, + { 23163, _gloffset_MultiTexCoord1sARB }, + { 23365, _gloffset_MultiTexCoord1dvARB }, + { 24175, _gloffset_MultiTexCoord1ivARB }, + { 24268, _gloffset_MultiTexCoord2ivARB }, + { 24607, _gloffset_MultiTexCoord1iARB }, + { 25878, _gloffset_MultiTexCoord4svARB }, + { 26396, _gloffset_MultiTexCoord1fARB }, + { 26659, _gloffset_MultiTexCoord4fARB }, + { 28927, _gloffset_MultiTexCoord2fvARB }, { -1, -1 } }; #endif diff --git a/mesalib/src/mesa/main/renderbuffer.c b/mesalib/src/mesa/main/renderbuffer.c index 3bb062bae..4d7b0aff0 100644 --- a/mesalib/src/mesa/main/renderbuffer.c +++ b/mesalib/src/mesa/main/renderbuffer.c @@ -87,7 +87,7 @@ get_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, { const GLubyte *src = (const GLubyte *) rb->Data + y * rb->Width + x; ASSERT(rb->DataType == GL_UNSIGNED_BYTE); - _mesa_memcpy(values, src, count * sizeof(GLubyte)); + memcpy(values, src, count * sizeof(GLubyte)); } @@ -121,7 +121,7 @@ put_row_ubyte(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, values, count * sizeof(GLubyte)); + memcpy(dst, values, count * sizeof(GLubyte)); } } @@ -207,7 +207,7 @@ get_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, { const void *src = rb->GetPointer(ctx, rb, x, y); ASSERT(rb->DataType == GL_UNSIGNED_SHORT); - _mesa_memcpy(values, src, count * sizeof(GLushort)); + memcpy(values, src, count * sizeof(GLushort)); } @@ -241,7 +241,7 @@ put_row_ushort(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, count * sizeof(GLushort)); + memcpy(dst, src, count * sizeof(GLushort)); } } @@ -337,7 +337,7 @@ get_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, const void *src = rb->GetPointer(ctx, rb, x, y); ASSERT(rb->DataType == GL_UNSIGNED_INT || rb->DataType == GL_UNSIGNED_INT_24_8_EXT); - _mesa_memcpy(values, src, count * sizeof(GLuint)); + memcpy(values, src, count * sizeof(GLuint)); } @@ -373,7 +373,7 @@ put_row_uint(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, count * sizeof(GLuint)); + memcpy(dst, src, count * sizeof(GLuint)); } } @@ -548,7 +548,7 @@ put_mono_row_ubyte3(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, ASSERT(rb->DataType == GL_UNSIGNED_BYTE); if (!mask && val0 == val1 && val1 == val2) { /* optimized case */ - _mesa_memset(dst, val0, 3 * count); + memset(dst, val0, 3 * count); } else { GLuint i; @@ -631,7 +631,7 @@ get_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, const GLubyte *src = (const GLubyte *) rb->Data + 4 * (y * rb->Width + x); ASSERT(rb->DataType == GL_UNSIGNED_BYTE); ASSERT(rb->Format == MESA_FORMAT_RGBA8888); - _mesa_memcpy(values, src, 4 * count * sizeof(GLubyte)); + memcpy(values, src, 4 * count * sizeof(GLubyte)); } @@ -669,7 +669,7 @@ put_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, 4 * count * sizeof(GLubyte)); + memcpy(dst, src, 4 * count * sizeof(GLubyte)); } } @@ -706,7 +706,7 @@ put_mono_row_ubyte4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, ASSERT(rb->Format == MESA_FORMAT_RGBA8888); if (!mask && val == 0) { /* common case */ - _mesa_bzero(dst, count * 4 * sizeof(GLubyte)); + memset(dst, 0, count * 4 * sizeof(GLubyte)); } else { /* general case */ @@ -788,7 +788,7 @@ get_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, { const GLshort *src = (const GLshort *) rb->Data + 4 * (y * rb->Width + x); ASSERT(rb->DataType == GL_UNSIGNED_SHORT || rb->DataType == GL_SHORT); - _mesa_memcpy(values, src, 4 * count * sizeof(GLshort)); + memcpy(values, src, 4 * count * sizeof(GLshort)); } @@ -826,7 +826,7 @@ put_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, 4 * count * sizeof(GLushort)); + memcpy(dst, src, 4 * count * sizeof(GLushort)); } } @@ -851,7 +851,7 @@ put_row_rgb_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } else { - _mesa_memcpy(dst, src, 4 * count * sizeof(GLushort)); + memcpy(dst, src, 4 * count * sizeof(GLushort)); } } @@ -868,7 +868,7 @@ put_mono_row_ushort4(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, ASSERT(rb->DataType == GL_UNSIGNED_SHORT || rb->DataType == GL_SHORT); if (!mask && val0 == 0 && val1 == 0 && val2 == 0 && val3 == 0) { /* common case for clearing accum buffer */ - _mesa_bzero(dst, count * 4 * sizeof(GLushort)); + memset(dst, 0, count * 4 * sizeof(GLushort)); } else { GLuint i; @@ -1122,7 +1122,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, /* free old buffer storage */ if (rb->Data) { - _mesa_free(rb->Data); + free(rb->Data); rb->Data = NULL; } @@ -1142,7 +1142,8 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, rb->Width = width; rb->Height = height; - rb->_BaseFormat = _mesa_base_fbo_format(ctx, rb->InternalFormat); + rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat); + ASSERT(rb->_BaseFormat); return GL_TRUE; } @@ -1179,10 +1180,10 @@ alloc_storage_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, /* next, resize my alpha buffer */ if (arb->Data) { - _mesa_free(arb->Data); + free(arb->Data); } - arb->Data = _mesa_malloc(width * height * sizeof(GLubyte)); + arb->Data = malloc(width * height * sizeof(GLubyte)); if (arb->Data == NULL) { arb->Width = 0; arb->Height = 0; @@ -1204,13 +1205,13 @@ static void delete_renderbuffer_alpha8(struct gl_renderbuffer *arb) { if (arb->Data) { - _mesa_free(arb->Data); + free(arb->Data); } ASSERT(arb->Wrapped); ASSERT(arb != arb->Wrapped); arb->Wrapped->Delete(arb->Wrapped); arb->Wrapped = NULL; - _mesa_free(arb); + free(arb); } @@ -1319,7 +1320,7 @@ put_mono_row_alpha8(GLcontext *ctx, struct gl_renderbuffer *arb, GLuint count, } } else { - _mesa_memset(dst, val, count); + memset(dst, val, count); } } @@ -1374,7 +1375,7 @@ copy_buffer_alpha8(struct gl_renderbuffer* dst, struct gl_renderbuffer* src) ASSERT(dst->Width == src->Width); ASSERT(dst->Height == src->Height); - _mesa_memcpy(dst->Data, src->Data, dst->Width * dst->Height * sizeof(GLubyte)); + memcpy(dst->Data, src->Data, dst->Width * dst->Height * sizeof(GLubyte)); } @@ -1460,9 +1461,9 @@ void _mesa_delete_renderbuffer(struct gl_renderbuffer *rb) { if (rb->Data) { - _mesa_free(rb->Data); + free(rb->Data); } - _mesa_free(rb); + free(rb); } @@ -1551,62 +1552,6 @@ _mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, } -/** - * Add software-based color index renderbuffers to the given framebuffer. - * This is a helper routine for device drivers when creating a - * window system framebuffer (not a user-created render/framebuffer). - * Once this function is called, you can basically forget about this - * renderbuffer; core Mesa will handle all the buffer management and - * rendering! - */ -GLboolean -_mesa_add_color_index_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, - GLuint indexBits, - GLboolean frontLeft, GLboolean backLeft, - GLboolean frontRight, GLboolean backRight) -{ - GLuint b; - - if (indexBits > 8) { - _mesa_problem(ctx, - "Unsupported bit depth in _mesa_add_color_index_renderbuffers"); - return GL_FALSE; - } - - assert(MAX_COLOR_ATTACHMENTS >= 4); - - for (b = BUFFER_FRONT_LEFT; b <= BUFFER_BACK_RIGHT; b++) { - struct gl_renderbuffer *rb; - - if (b == BUFFER_FRONT_LEFT && !frontLeft) - continue; - else if (b == BUFFER_BACK_LEFT && !backLeft) - continue; - else if (b == BUFFER_FRONT_RIGHT && !frontRight) - continue; - else if (b == BUFFER_BACK_RIGHT && !backRight) - continue; - - assert(fb->Attachment[b].Renderbuffer == NULL); - - rb = _mesa_new_renderbuffer(ctx, 0); - if (!rb) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating color buffer"); - return GL_FALSE; - } - - assert(indexBits <= 8); - rb->Format = MESA_FORMAT_CI8; - rb->InternalFormat = GL_COLOR_INDEX; - - rb->AllocStorage = _mesa_soft_renderbuffer_storage; - _mesa_add_renderbuffer(fb, b, rb); - } - - return GL_TRUE; -} - - /** * Add software-based alpha renderbuffers to the given framebuffer. * This is a helper routine for device drivers when creating a @@ -1906,21 +1851,13 @@ _mesa_add_soft_renderbuffers(struct gl_framebuffer *fb, GLboolean backRight = fb->Visual.stereoMode && fb->Visual.doubleBufferMode; if (color) { - if (fb->Visual.rgbMode) { - assert(fb->Visual.redBits == fb->Visual.greenBits); - assert(fb->Visual.redBits == fb->Visual.blueBits); - _mesa_add_color_renderbuffers(NULL, fb, - fb->Visual.redBits, - fb->Visual.alphaBits, - frontLeft, backLeft, - frontRight, backRight); - } - else { - _mesa_add_color_index_renderbuffers(NULL, fb, - fb->Visual.indexBits, - frontLeft, backLeft, - frontRight, backRight); - } + assert(fb->Visual.redBits == fb->Visual.greenBits); + assert(fb->Visual.redBits == fb->Visual.blueBits); + _mesa_add_color_renderbuffers(NULL, fb, + fb->Visual.redBits, + fb->Visual.alphaBits, + frontLeft, backLeft, + frontRight, backRight); } if (depth) { @@ -1934,7 +1871,6 @@ _mesa_add_soft_renderbuffers(struct gl_framebuffer *fb, } if (accum) { - assert(fb->Visual.rgbMode); assert(fb->Visual.accumRedBits > 0); assert(fb->Visual.accumGreenBits > 0); assert(fb->Visual.accumBlueBits > 0); @@ -1946,14 +1882,12 @@ _mesa_add_soft_renderbuffers(struct gl_framebuffer *fb, } if (aux) { - assert(fb->Visual.rgbMode); assert(fb->Visual.numAuxBuffers > 0); _mesa_add_aux_renderbuffers(NULL, fb, fb->Visual.redBits, fb->Visual.numAuxBuffers); } if (alpha) { - assert(fb->Visual.rgbMode); assert(fb->Visual.alphaBits > 0); _mesa_add_alpha_renderbuffers(NULL, fb, fb->Visual.alphaBits, frontLeft, backLeft, diff --git a/mesalib/src/mesa/main/renderbuffer.h b/mesalib/src/mesa/main/renderbuffer.h index c9bf88854..7c205e141 100644 --- a/mesalib/src/mesa/main/renderbuffer.h +++ b/mesalib/src/mesa/main/renderbuffer.h @@ -52,12 +52,6 @@ _mesa_add_color_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, GLboolean frontLeft, GLboolean backLeft, GLboolean frontRight, GLboolean backRight); -extern GLboolean -_mesa_add_color_index_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, - GLuint indexBits, - GLboolean frontLeft, GLboolean backLeft, - GLboolean frontRight, GLboolean backRight); - extern GLboolean _mesa_add_alpha_renderbuffers(GLcontext *ctx, struct gl_framebuffer *fb, GLuint alphaBits, diff --git a/mesalib/src/mesa/main/scissor.c b/mesalib/src/mesa/main/scissor.c index b5f4cde78..523f3c3ab 100644 --- a/mesalib/src/mesa/main/scissor.c +++ b/mesalib/src/mesa/main/scissor.c @@ -37,14 +37,14 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height); + if (width < 0 || height < 0) { _mesa_error( ctx, GL_INVALID_VALUE, "glScissor" ); return; } - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height); - _mesa_set_scissor(ctx, x, y, width, height); } diff --git a/mesalib/src/mesa/main/shaders.c b/mesalib/src/mesa/main/shaders.c index d0dc7e551..f382680b4 100644 --- a/mesalib/src/mesa/main/shaders.c +++ b/mesalib/src/mesa/main/shaders.c @@ -434,7 +434,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, * This array holds offsets of where the appropriate string ends, thus the * last element will be set to the total length of the source code. */ - offsets = (GLint *) _mesa_malloc(count * sizeof(GLint)); + offsets = (GLint *) malloc(count * sizeof(GLint)); if (offsets == NULL) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); return; @@ -442,12 +442,12 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, for (i = 0; i < count; i++) { if (string[i] == NULL) { - _mesa_free((GLvoid *) offsets); + free((GLvoid *) offsets); _mesa_error(ctx, GL_INVALID_OPERATION, "glShaderSourceARB(null string)"); return; } if (length == NULL || length[i] < 0) - offsets[i] = _mesa_strlen(string[i]); + offsets[i] = strlen(string[i]); else offsets[i] = length[i]; /* accumulate string lengths */ @@ -460,17 +460,17 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, * valgrind warnings in the parser/grammer code. */ totalLength = offsets[count - 1] + 2; - source = (GLcharARB *) _mesa_malloc(totalLength * sizeof(GLcharARB)); + source = (GLcharARB *) malloc(totalLength * sizeof(GLcharARB)); if (source == NULL) { - _mesa_free((GLvoid *) offsets); + free((GLvoid *) offsets); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glShaderSourceARB"); return; } for (i = 0; i < count; i++) { GLint start = (i > 0) ? offsets[i - 1] : 0; - _mesa_memcpy(source + start, string[i], - (offsets[i] - start) * sizeof(GLcharARB)); + memcpy(source + start, string[i], + (offsets[i] - start) * sizeof(GLcharARB)); } source[totalLength - 1] = '\0'; source[totalLength - 2] = '\0'; @@ -489,9 +489,9 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, newSource = _mesa_read_shader(filename); if (newSource) { - _mesa_fprintf(stderr, "Mesa: Replacing shader %u chksum=%d with %s\n", + fprintf(stderr, "Mesa: Replacing shader %u chksum=%d with %s\n", shaderObj, checksum, filename); - _mesa_free(source); + free(source); source = newSource; } } @@ -504,7 +504,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, sh->SourceChecksum = checksum; /* save original checksum */ } - _mesa_free(offsets); + free(offsets); } diff --git a/mesalib/src/mesa/main/shared.c b/mesalib/src/mesa/main/shared.c index 4d01e8abc..e364e2404 100644 --- a/mesalib/src/mesa/main/shared.c +++ b/mesalib/src/mesa/main/shared.c @@ -93,12 +93,8 @@ _mesa_alloc_shared_state(GLcontext *ctx) shared->BufferObjects = _mesa_NewHashTable(); #endif - /* Allocate the default buffer object and set refcount so high that - * it never gets deleted. - * XXX with recent/improved refcounting this may not longer be needed. - */ + /* Allocate the default buffer object */ shared->NullBufferObj = ctx->Driver.NewBufferObject(ctx, 0, 0); - shared->NullBufferObj->RefCount = 1000 * 1000 * 1000; /* Create default texture objects */ for (i = 0; i < NUM_TEXTURE_TARGETS; i++) { @@ -202,7 +198,7 @@ delete_bufferobj_cb(GLuint id, void *data, void *userData) ctx->Driver.UnmapBuffer(ctx, 0, bufObj); bufObj->Pointer = NULL; } - ctx->Driver.DeleteBuffer(ctx, bufObj); + _mesa_reference_buffer_object(ctx, &bufObj, NULL); } @@ -288,8 +284,8 @@ delete_renderbuffer_cb(GLuint id, void *data, void *userData) * * \sa alloc_shared_state(). */ -void -_mesa_free_shared_state(GLcontext *ctx, struct gl_shared_state *shared) +static void +free_shared_state(GLcontext *ctx, struct gl_shared_state *shared) { GLuint i; @@ -335,7 +331,7 @@ _mesa_free_shared_state(GLcontext *ctx, struct gl_shared_state *shared) #endif #if FEATURE_ARB_vertex_buffer_object - ctx->Driver.DeleteBuffer(ctx, shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &shared->NullBufferObj, NULL); #endif #if FEATURE_ARB_sync @@ -366,5 +362,32 @@ _mesa_free_shared_state(GLcontext *ctx, struct gl_shared_state *shared) _glthread_DESTROY_MUTEX(shared->Mutex); _glthread_DESTROY_MUTEX(shared->TexMutex); - _mesa_free(shared); + free(shared); +} + + +/** + * Decrement shared state object reference count and potentially free it + * and all children structures. + * + * \param ctx GL context. + * \param shared shared state pointer. + * + * \sa free_shared_state(). + */ +void +_mesa_release_shared_state(GLcontext *ctx, struct gl_shared_state *shared) +{ + GLint RefCount; + + _glthread_LOCK_MUTEX(shared->Mutex); + RefCount = --shared->RefCount; + _glthread_UNLOCK_MUTEX(shared->Mutex); + + assert(RefCount >= 0); + + if (RefCount == 0) { + /* free shared state */ + free_shared_state( ctx, shared ); + } } diff --git a/mesalib/src/mesa/main/shared.h b/mesalib/src/mesa/main/shared.h index e59177e96..ef164a145 100644 --- a/mesalib/src/mesa/main/shared.h +++ b/mesalib/src/mesa/main/shared.h @@ -31,7 +31,7 @@ _mesa_alloc_shared_state(GLcontext *ctx); void -_mesa_free_shared_state(GLcontext *ctx, struct gl_shared_state *shared); +_mesa_release_shared_state(GLcontext *ctx, struct gl_shared_state *shared); #endif diff --git a/mesalib/src/mesa/main/state.c b/mesalib/src/mesa/main/state.c index f10e6b04b..589029db5 100644 --- a/mesalib/src/mesa/main/state.c +++ b/mesalib/src/mesa/main/state.c @@ -48,7 +48,6 @@ #include "texenvprogram.h" #include "texobj.h" #include "texstate.h" -#include "viewport.h" static void @@ -83,12 +82,6 @@ compute_max_element(struct gl_client_array *array) } else { array->_MaxElement = 0; } - /* Compute the max element we can access in the VBO without going - * out of bounds. - */ - array->_MaxElement = ((GLsizeiptrARB) array->BufferObj->Size - - (GLsizeiptrARB) array->Ptr + array->StrideB - - array->_ElementSize) / array->StrideB; } else { /* user-space array, no idea how big it is */ @@ -689,7 +682,7 @@ _mesa_set_varying_vp_inputs( GLcontext *ctx, if (ctx->varying_vp_inputs != varying_inputs) { ctx->varying_vp_inputs = varying_inputs; ctx->NewState |= _NEW_ARRAY; - /*_mesa_printf("%s %x\n", __FUNCTION__, varying_inputs);*/ + /*printf("%s %x\n", __FUNCTION__, varying_inputs);*/ } } diff --git a/mesalib/src/mesa/main/syncobj.c b/mesalib/src/mesa/main/syncobj.c index ac3f9eb17..1bff30817 100644 --- a/mesalib/src/mesa/main/syncobj.c +++ b/mesalib/src/mesa/main/syncobj.c @@ -78,7 +78,7 @@ static void _mesa_delete_sync_object(GLcontext *ctx, struct gl_sync_object *syncObj) { (void) ctx; - _mesa_free(syncObj); + free(syncObj); } @@ -398,7 +398,7 @@ _mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, if (size > 0) { const GLsizei copy_count = MIN2(size, bufSize); - _mesa_memcpy(values, v, sizeof(GLint) * copy_count); + memcpy(values, v, sizeof(GLint) * copy_count); } if (length != NULL) { diff --git a/mesalib/src/mesa/main/texcompress.c b/mesalib/src/mesa/main/texcompress.c index a4f1926ab..cff6de89e 100644 --- a/mesalib/src/mesa/main/texcompress.c +++ b/mesalib/src/mesa/main/texcompress.c @@ -35,10 +35,7 @@ #include "colormac.h" #include "context.h" #include "formats.h" -#include "image.h" -#include "mipmap.h" #include "texcompress.h" -#include "texstore.h" /** diff --git a/mesalib/src/mesa/main/texcompress_fxt1.c b/mesalib/src/mesa/main/texcompress_fxt1.c index 85becb80d..04acf05e5 100644 --- a/mesalib/src/mesa/main/texcompress_fxt1.c +++ b/mesalib/src/mesa/main/texcompress_fxt1.c @@ -105,7 +105,7 @@ _mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS) dst, dstRowStride); if (tempImage) - _mesa_free((void*) tempImage); + free((void*) tempImage); return GL_TRUE; } @@ -162,7 +162,7 @@ _mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS) dst, dstRowStride); if (tempImage) - _mesa_free((void*) tempImage); + free((void*) tempImage); return GL_TRUE; } @@ -406,7 +406,7 @@ fxt1_choose (GLfloat vec[][MAX_COMP], GLint nv, } hist[N_TEXELS]; GLint lenh = 0; - _mesa_memset(hist, 0, sizeof(hist)); + memset(hist, 0, sizeof(hist)); for (k = 0; k < n; k++) { GLint l; @@ -476,7 +476,7 @@ fxt1_lloyd (GLfloat vec[][MAX_COMP], GLint nv, * for each sample color * sort to nearest vector. * - * replace each vector with the centroid of it's matching colors. + * replace each vector with the centroid of its matching colors. * * repeat until RMS doesn't improve. * @@ -528,6 +528,7 @@ fxt1_lloyd (GLfloat vec[][MAX_COMP], GLint nv, #else GLint best = fxt1_bestcol(vec, nv, input[k], nc, &err); #endif + assert(best >= 0); /* add in closest color */ for (i = 0; i < nc; i++) { sum[best][i] += input[k][i]; @@ -1211,7 +1212,7 @@ fxt1_quantize (GLuint *cc, const GLubyte *lines[], GLint comps) if (comps == 3) { /* make the whole block opaque */ - _mesa_memset(input, -1, sizeof(input)); + memset(input, -1, sizeof(input)); } /* 8 texels each line */ @@ -1305,7 +1306,7 @@ fxt1_encode (GLuint width, GLuint height, GLint comps, if ((width & 7) | (height & 3)) { GLint newWidth = (width + 7) & ~7; GLint newHeight = (height + 3) & ~3; - newSource = _mesa_malloc(comps * newWidth * newHeight * sizeof(GLchan)); + newSource = malloc(comps * newWidth * newHeight * sizeof(GLchan)); if (!newSource) { GET_CURRENT_CONTEXT(ctx); _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture compression"); @@ -1324,7 +1325,7 @@ fxt1_encode (GLuint width, GLuint height, GLint comps, if (CHAN_TYPE != GL_UNSIGNED_BYTE) { const GLuint n = width * height * comps; const GLchan *src = (const GLchan *) source; - GLubyte *dest = (GLubyte *) _mesa_malloc(n * sizeof(GLubyte)); + GLubyte *dest = (GLubyte *) malloc(n * sizeof(GLubyte)); GLuint i; if (!dest) { GET_CURRENT_CONTEXT(ctx); @@ -1335,7 +1336,7 @@ fxt1_encode (GLuint width, GLuint height, GLint comps, dest[i] = CHAN_TO_UBYTE(src[i]); } if (newSource != NULL) { - _mesa_free(newSource); + free(newSource); } newSource = dest; /* we'll free this buffer before returning */ source = dest; /* the new, GLubyte incoming image */ @@ -1361,7 +1362,7 @@ fxt1_encode (GLuint width, GLuint height, GLint comps, cleanUp: if (newSource != NULL) { - _mesa_free(newSource); + free(newSource); } } diff --git a/mesalib/src/mesa/main/texcompress_s3tc.c b/mesalib/src/mesa/main/texcompress_s3tc.c index b271a539a..fcd28a4b4 100644 --- a/mesalib/src/mesa/main/texcompress_s3tc.c +++ b/mesalib/src/mesa/main/texcompress_s3tc.c @@ -213,7 +213,7 @@ _mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS) } if (tempImage) - _mesa_free((void *) tempImage); + free((void *) tempImage); return GL_TRUE; } @@ -275,7 +275,7 @@ _mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS) } if (tempImage) - _mesa_free((void*) tempImage); + free((void*) tempImage); return GL_TRUE; } @@ -336,7 +336,7 @@ _mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS) } if (tempImage) - _mesa_free((void *) tempImage); + free((void *) tempImage); return GL_TRUE; } @@ -397,7 +397,7 @@ _mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS) } if (tempImage) - _mesa_free((void *) tempImage); + free((void *) tempImage); return GL_TRUE; } diff --git a/mesalib/src/mesa/main/texenvprogram.c b/mesalib/src/mesa/main/texenvprogram.c index f439d4add..7b8a8b85f 100644 --- a/mesalib/src/mesa/main/texenvprogram.c +++ b/mesalib/src/mesa/main/texenvprogram.c @@ -113,6 +113,8 @@ struct state_key { GLuint NumArgsA:3; /**< up to MAX_COMBINER_TERMS */ GLuint ModeA:5; /**< MODE_x */ + GLuint texture_cyl_wrap:1; /**< For gallium test/debug only */ + struct mode_opt OptRGB[MAX_COMBINER_TERMS]; struct mode_opt OptA[MAX_COMBINER_TERMS]; } unit[MAX_TEXTURE_UNITS]; @@ -464,6 +466,10 @@ static GLuint make_state_key( GLcontext *ctx, struct state_key *key ) key->unit[i].OptRGB[1].Operand = OPR_SRC_COLOR; key->unit[i].OptRGB[1].Source = texUnit->BumpTarget - GL_TEXTURE0 + SRC_TEXTURE0; } + + /* this is a back-door for enabling cylindrical texture wrap mode */ + if (texObj->Priority == 0.125) + key->unit[i].texture_cyl_wrap = 1; } /* _NEW_LIGHT | _NEW_FOG */ @@ -606,7 +612,7 @@ static struct ureg get_temp( struct texenv_fragment_program *p ) if (!bit) { _mesa_problem(NULL, "%s: out of temporaries\n", __FILE__); - _mesa_exit(1); + exit(1); } if ((GLuint) bit > p->program->Base.NumTemporaries) @@ -634,7 +640,7 @@ static struct ureg get_tex_temp( struct texenv_fragment_program *p ) if (!bit) { _mesa_problem(NULL, "%s: out of temporaries\n", __FILE__); - _mesa_exit(1); + exit(1); } if ((GLuint) bit > p->program->Base.NumTemporaries) @@ -1040,8 +1046,6 @@ static struct ureg emit_combine( struct texenv_fragment_program *p, assert(nr <= MAX_COMBINER_TERMS); - tmp = undef; /* silence warning (bug 5318) */ - for (i = 0; i < nr; i++) src[i] = emit_combine_source( p, mask, unit, opt[i].Source, opt[i].Operand ); @@ -1091,7 +1095,7 @@ static struct ureg emit_combine( struct texenv_fragment_program *p, emit_arith( p, OPCODE_MAD, tmp0, WRITEMASK_XYZW, 0, two, src[0], neg1); - if (_mesa_memcmp(&src[0], &src[1], sizeof(struct ureg)) == 0) + if (memcmp(&src[0], &src[1], sizeof(struct ureg)) == 0) tmp1 = tmp0; else emit_arith( p, OPCODE_MAD, tmp1, WRITEMASK_XYZW, 0, @@ -1304,6 +1308,12 @@ static void load_texture( struct texenv_fragment_program *p, GLuint unit ) } else p->src_texture[unit] = get_zero(p); + + if (p->state->unit[unit].texture_cyl_wrap) { + /* set flag which is checked by Mesa->Gallium program translation */ + p->program->Base.InputFlags[0] |= PROG_PARAM_BIT_CYL_WRAP; + } + } } @@ -1406,7 +1416,7 @@ create_new_program(GLcontext *ctx, struct state_key *key, GLuint unit; struct ureg cf, out; - _mesa_memset(&p, 0, sizeof(p)); + memset(&p, 0, sizeof(p)); p.state = key; p.program = program; @@ -1484,7 +1494,7 @@ create_new_program(GLcontext *ctx, struct state_key *key, emit_arith( &p, OPCODE_ADD, out, WRITEMASK_XYZ, 0, cf, s, undef ); emit_arith( &p, OPCODE_MOV, out, WRITEMASK_W, 0, cf, undef, undef ); } - else if (_mesa_memcmp(&cf, &out, sizeof(cf)) != 0) { + else if (memcmp(&cf, &out, sizeof(cf)) != 0) { /* Will wind up in here if no texture enabled or a couple of * other scenarios (GL_REPLACE for instance). */ @@ -1537,13 +1547,20 @@ create_new_program(GLcontext *ctx, struct state_key *key, /* Notify driver the fragment program has (actually) changed. */ if (ctx->Driver.ProgramStringNotify) { - ctx->Driver.ProgramStringNotify( ctx, GL_FRAGMENT_PROGRAM_ARB, - &p.program->Base ); + GLboolean ok = ctx->Driver.ProgramStringNotify(ctx, + GL_FRAGMENT_PROGRAM_ARB, + &p.program->Base); + /* Driver should be able to handle any texenv programs as long as + * the driver correctly reported max number of texture units correctly, + * etc. + */ + ASSERT(ok); + (void) ok; /* silence unused var warning */ } if (DISASSEM) { _mesa_print_program(&p.program->Base); - _mesa_printf("\n"); + printf("\n"); } } diff --git a/mesalib/src/mesa/main/texformat.c b/mesalib/src/mesa/main/texformat.c index 1a374e7be..096945a64 100644 --- a/mesalib/src/mesa/main/texformat.c +++ b/mesalib/src/mesa/main/texformat.c @@ -35,8 +35,6 @@ #include "context.h" #include "texcompress.h" -#include "texcompress_fxt1.h" -#include "texcompress_s3tc.h" #include "texformat.h" diff --git a/mesalib/src/mesa/main/texgen.c b/mesalib/src/mesa/main/texgen.c index be4e03bc5..e70ea3029 100644 --- a/mesalib/src/mesa/main/texgen.c +++ b/mesalib/src/mesa/main/texgen.c @@ -37,7 +37,7 @@ #include "main/texgen.h" #include "main/texstate.h" #include "math/m_matrix.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #if FEATURE_texgen @@ -210,7 +210,7 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params ) } -static void GLAPIENTRY +void GLAPIENTRY _mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ) { GLfloat p[4]; @@ -269,7 +269,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) -static void GLAPIENTRY +void GLAPIENTRY _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) { struct gl_texture_unit *texUnit; diff --git a/mesalib/src/mesa/main/texgen.h b/mesalib/src/mesa/main/texgen.h index f6924ef72..eb4626033 100644 --- a/mesalib/src/mesa/main/texgen.h +++ b/mesalib/src/mesa/main/texgen.h @@ -40,9 +40,15 @@ extern void GLAPIENTRY _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); +extern void GLAPIENTRY +_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ); + extern void GLAPIENTRY _mesa_TexGeni( GLenum coord, GLenum pname, GLint param ); +extern void GLAPIENTRY +_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); + extern void _mesa_init_texgen_dispatch(struct _glapi_table *disp); diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c index 23765d275..7ad91805b 100644 --- a/mesalib/src/mesa/main/texgetimage.c +++ b/mesalib/src/mesa/main/texgetimage.c @@ -35,37 +35,11 @@ #include "context.h" #include "formats.h" #include "image.h" -#include "texcompress.h" #include "texgetimage.h" #include "teximage.h" -#include "texstate.h" -#if FEATURE_EXT_texture_sRGB - -/** - * Convert a float value from linear space to a - * non-linear sRGB value in [0, 255]. - * Not terribly efficient. - */ -static INLINE GLfloat -linear_to_nonlinear(GLfloat cl) -{ - /* can't have values outside [0, 1] */ - GLfloat cs; - if (cl < 0.0031308f) { - cs = 12.92f * cl; - } - else { - cs = (GLfloat)(1.055 * _mesa_pow(cl, 0.41666) - 0.055); - } - return cs; -} - -#endif /* FEATURE_EXT_texture_sRGB */ - - /** * Can the given type represent negative values? */ @@ -103,7 +77,7 @@ get_tex_color_index(GLcontext *ctx, GLuint dimensions, for (img = 0; img < depth; img++) { for (row = 0; row < height; row++) { - GLuint indexRow[MAX_WIDTH]; + GLuint indexRow[MAX_WIDTH] = { 0 }; void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, width, height, format, type, img, row, 0); @@ -182,7 +156,7 @@ get_tex_depth_stencil(GLcontext *ctx, GLuint dimensions, void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, width, height, format, type, img, row, 0); - _mesa_memcpy(dest, src, width * sizeof(GLuint)); + memcpy(dest, src, width * sizeof(GLuint)); if (ctx->Pack.SwapBytes) { _mesa_swap4((GLuint *) dest, width); } @@ -213,7 +187,7 @@ get_tex_ycbcr(GLcontext *ctx, GLuint dimensions, void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, width, height, format, type, img, row, 0); - _mesa_memcpy(dest, src, width * sizeof(GLushort)); + memcpy(dest, src, width * sizeof(GLushort)); /* check for byte swapping */ if ((texImage->TexFormat == MESA_FORMAT_YCBCR @@ -233,6 +207,29 @@ get_tex_ycbcr(GLcontext *ctx, GLuint dimensions, } +#if FEATURE_EXT_texture_sRGB + + +/** + * Convert a float value from linear space to a + * non-linear sRGB value in [0, 255]. + * Not terribly efficient. + */ +static INLINE GLfloat +linear_to_nonlinear(GLfloat cl) +{ + /* can't have values outside [0, 1] */ + GLfloat cs; + if (cl < 0.0031308f) { + cs = 12.92f * cl; + } + else { + cs = (GLfloat)(1.055 * _mesa_pow(cl, 0.41666) - 0.055); + } + return cs; +} + + /** * glGetTexImagefor sRGB pixels; */ @@ -284,6 +281,21 @@ get_tex_srgb(GLcontext *ctx, GLuint dimensions, } +#else /* FEATURE_EXT_texture_sRGB */ + + +static INLINE void +get_tex_srgb(GLcontext *ctx, GLuint dimensions, + GLenum format, GLenum type, GLvoid *pixels, + const struct gl_texture_image *texImage) +{ + ASSERT_NO_FEATURE(); +} + + +#endif /* FEATURE_EXT_texture_sRGB */ + + /** * glGetTexImagefor RGBA, Luminance, etc. pixels. * This is the slow way since we use texture sampling. @@ -548,14 +560,15 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level, texImage->Width, texImage->Height, texImage->Depth); - _mesa_memcpy(img, texImage->Data, size); + memcpy(img, texImage->Data, size); } else { GLuint bw, bh; _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh); for (i = 0; i < (texImage->Height + bh - 1) / bh; i++) { memcpy((GLubyte *)img + i * row_stride, - (GLubyte *)texImage->Data + i * row_stride_stored, row_stride); + (GLubyte *)texImage->Data + i * row_stride_stored, + row_stride); } } @@ -577,7 +590,7 @@ getteximage_error_check(GLcontext *ctx, GLenum target, GLint level, { struct gl_texture_object *texObj; struct gl_texture_image *texImage; - const GLuint maxLevels = _mesa_max_texture_levels(ctx, target); + const GLint maxLevels = _mesa_max_texture_levels(ctx, target); GLenum baseFormat; if (maxLevels == 0) { @@ -763,7 +776,7 @@ getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level, { struct gl_texture_object *texObj; struct gl_texture_image *texImage; - const GLuint maxLevels = _mesa_max_texture_levels(ctx, target); + const GLint maxLevels = _mesa_max_texture_levels(ctx, target); if (maxLevels == 0) { _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImage(target=0x%x)", diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index b946f3c69..d72e91b3a 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -46,7 +46,6 @@ #include "texfetch.h" #include "teximage.h" #include "texstate.h" -#include "texstore.h" #include "mtypes.h" @@ -489,8 +488,8 @@ _mesa_delete_texture_image( GLcontext *ctx, struct gl_texture_image *texImage ) ASSERT(texImage->Data == NULL); if (texImage->ImageOffsets) - _mesa_free(texImage->ImageOffsets); - _mesa_free(texImage); + free(texImage->ImageOffsets); + free(texImage); } @@ -844,7 +843,7 @@ clear_teximage_fields(struct gl_texture_image *img) img->Depth = 0; img->RowStride = 0; if (img->ImageOffsets) { - _mesa_free(img->ImageOffsets); + free(img->ImageOffsets); img->ImageOffsets = NULL; } img->Width2 = 0; @@ -933,8 +932,8 @@ _mesa_init_teximage_fields(GLcontext *ctx, GLenum target, * case code in the texstore routines. */ if (img->ImageOffsets) - _mesa_free(img->ImageOffsets); - img->ImageOffsets = (GLuint *) _mesa_malloc(depth * sizeof(GLuint)); + free(img->ImageOffsets); + img->ImageOffsets = (GLuint *) malloc(depth * sizeof(GLuint)); for (i = 0; i < depth; i++) { img->ImageOffsets[i] = i * width * height; } @@ -1308,7 +1307,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (type != GL_UNSIGNED_SHORT_8_8_MESA && type != GL_UNSIGNED_SHORT_8_8_REV_MESA) { char message[100]; - _mesa_sprintf(message, + sprintf(message, "glTexImage%d(format/type YCBCR mismatch", dimensions); _mesa_error(ctx, GL_INVALID_ENUM, message); return GL_TRUE; /* error */ @@ -1324,7 +1323,7 @@ texture_error_check( GLcontext *ctx, GLenum target, if (border != 0) { if (!isProxy) { char message[100]; - _mesa_sprintf(message, + sprintf(message, "glTexImage%d(format=GL_YCBCR_MESA and border=%d)", dimensions, border); _mesa_error(ctx, GL_INVALID_VALUE, message); @@ -2449,6 +2448,47 @@ _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalFormat, } +#if FEATURE_OES_EGL_image +void GLAPIENTRY +_mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image) +{ + struct gl_texture_object *texObj; + struct gl_texture_image *texImage; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + if (target != GL_TEXTURE_2D) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glEGLImageTargetTexture2D(target=%d)", target); + return; + } + + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) + _mesa_update_state(ctx); + + texObj = _mesa_get_current_tex_object(ctx, target); + _mesa_lock_texture(ctx, texObj); + + texImage = _mesa_get_tex_image(ctx, texObj, target, 0); + if (!texImage) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glEGLImageTargetTexture2D"); + } else { + if (texImage->Data) + ctx->Driver.FreeTexImageData( ctx, texImage ); + + ASSERT(texImage->Data == NULL); + ctx->Driver.EGLImageTargetTexture2D(ctx, target, + texObj, texImage, image); + + /* state update */ + texObj->_Complete = GL_FALSE; + ctx->NewState |= _NEW_TEXTURE; + } + _mesa_unlock_texture(ctx, texObj); + +} +#endif + void GLAPIENTRY _mesa_TexSubImage1D( GLenum target, GLint level, @@ -3225,8 +3265,8 @@ compressed_subtexture_error_check2(GLcontext *ctx, GLuint dims, } if (((width == 1 || width == 2) && - (GLuint) width != texImage->Width) || - (width > texImage->Width)) { + width != (GLsizei) texImage->Width) || + (width > (GLsizei) texImage->Width)) { _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage%uD(width=%d)", dims, width); return GL_TRUE; @@ -3234,8 +3274,8 @@ compressed_subtexture_error_check2(GLcontext *ctx, GLuint dims, if (dims >= 2) { if (((height == 1 || height == 2) && - (GLuint) height != texImage->Height) || - (height > texImage->Height)) { + height != (GLsizei) texImage->Height) || + (height > (GLsizei) texImage->Height)) { _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage%uD(height=%d)", dims, height); return GL_TRUE; @@ -3244,8 +3284,8 @@ compressed_subtexture_error_check2(GLcontext *ctx, GLuint dims, if (dims >= 3) { if (((depth == 1 || depth == 2) && - (GLuint) depth != texImage->Depth) || - (depth > texImage->Depth)) { + depth != (GLsizei) texImage->Depth) || + (depth > (GLsizei) texImage->Depth)) { _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage%uD(depth=%d)", dims, depth); return GL_TRUE; diff --git a/mesalib/src/mesa/main/teximage.h b/mesalib/src/mesa/main/teximage.h index 97c901831..d82cc9852 100644 --- a/mesalib/src/mesa/main/teximage.h +++ b/mesalib/src/mesa/main/teximage.h @@ -165,6 +165,8 @@ _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalformat, GLint border, GLenum format, GLenum type, const GLvoid *pixels ); +extern void GLAPIENTRY +_mesa_EGLImageTargetTexture2DOES( GLenum target, GLeglImageOES image ); extern void GLAPIENTRY _mesa_TexSubImage1D( GLenum target, GLint level, GLint xoffset, diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c index 237b6eb00..2753b55c3 100644 --- a/mesalib/src/mesa/main/texobj.c +++ b/mesalib/src/mesa/main/texobj.c @@ -38,7 +38,6 @@ #include "imports.h" #include "macros.h" #include "teximage.h" -#include "texstate.h" #include "texobj.h" #include "mtypes.h" #include "shader/prog_instruction.h" @@ -107,7 +106,7 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj, target == GL_TEXTURE_1D_ARRAY_EXT || target == GL_TEXTURE_2D_ARRAY_EXT); - _mesa_bzero(obj, sizeof(*obj)); + memset(obj, 0, sizeof(*obj)); /* init the non-zero fields */ _glthread_INIT_MUTEX(obj->Mutex); obj->RefCount = 1; @@ -208,7 +207,7 @@ _mesa_delete_texture_object( GLcontext *ctx, struct gl_texture_object *texObj ) _glthread_DESTROY_MUTEX(texObj->Mutex); /* free this object */ - _mesa_free(texObj); + free(texObj); } @@ -228,10 +227,10 @@ _mesa_copy_texture_object( struct gl_texture_object *dest, dest->Target = src->Target; dest->Name = src->Name; dest->Priority = src->Priority; - dest->BorderColor[0] = src->BorderColor[0]; - dest->BorderColor[1] = src->BorderColor[1]; - dest->BorderColor[2] = src->BorderColor[2]; - dest->BorderColor[3] = src->BorderColor[3]; + dest->BorderColor.f[0] = src->BorderColor.f[0]; + dest->BorderColor.f[1] = src->BorderColor.f[1]; + dest->BorderColor.f[2] = src->BorderColor.f[2]; + dest->BorderColor.f[3] = src->BorderColor.f[3]; dest->WrapS = src->WrapS; dest->WrapT = src->WrapT; dest->WrapR = src->WrapR; @@ -384,7 +383,7 @@ _mesa_reference_texobj(struct gl_texture_object **ptr, static void incomplete(const struct gl_texture_object *t, const char *why) { - _mesa_printf("Texture Obj %d incomplete because: %s\n", t->Name, why); + printf("Texture Obj %d incomplete because: %s\n", t->Name, why); } #else #define incomplete(t, why) @@ -417,7 +416,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx, */ if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS)) { char s[100]; - _mesa_sprintf(s, "base level = %d is invalid", baseLevel); + sprintf(s, "base level = %d is invalid", baseLevel); incomplete(t, s); t->_Complete = GL_FALSE; return; @@ -426,7 +425,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx, /* Always need the base level image */ if (!t->Image[0][baseLevel]) { char s[100]; - _mesa_sprintf(s, "Image[baseLevel=%d] == NULL", baseLevel); + sprintf(s, "Image[baseLevel=%d] == NULL", baseLevel); incomplete(t, s); t->_Complete = GL_FALSE; return; @@ -940,7 +939,8 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures) /** * Convert a GL texture target enum such as GL_TEXTURE_2D or GL_TEXTURE_3D * into the corresponding Mesa texture target index. - * Return -1 if target is invalid. + * Note that proxy targets are not valid here. + * \return TEXTURE_x_INDEX or -1 if target is invalid */ static GLint target_enum_to_index(GLenum target) diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c index db4c7a5ed..0fde89b50 100644 --- a/mesalib/src/mesa/main/texparam.c +++ b/mesalib/src/mesa/main/texparam.c @@ -33,7 +33,6 @@ #include "main/glheader.h" #include "main/colormac.h" #include "main/context.h" -#include "main/enums.h" #include "main/formats.h" #include "main/macros.h" #include "main/texcompress.h" @@ -78,17 +77,19 @@ validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap) /** * Get current texture object for given target. - * Return NULL if any error. + * Return NULL if any error (and record the error). * Note that this is different from _mesa_select_tex_object() in that proxy * targets are not accepted. + * Only the glGetTexLevelParameter() functions accept proxy targets. */ static struct gl_texture_object * -get_texobj(GLcontext *ctx, GLenum target) +get_texobj(GLcontext *ctx, GLenum target, GLboolean get) { struct gl_texture_unit *texUnit; - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureImageUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(current unit)"); + if (ctx->Texture.CurrentUnit >= ctx->Const.MaxCombinedTextureImageUnits) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "gl%sTexParameter(current unit)", get ? "Get" : ""); return NULL; } @@ -125,7 +126,8 @@ get_texobj(GLcontext *ctx, GLenum target) ; } - _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(target)"); + _mesa_error(ctx, GL_INVALID_ENUM, + "gl%sTexParameter(target)", get ? "Get" : ""); return NULL; } @@ -508,10 +510,10 @@ set_tex_parameterf(GLcontext *ctx, case GL_TEXTURE_BORDER_COLOR: flush(ctx, texObj); - texObj->BorderColor[RCOMP] = params[0]; - texObj->BorderColor[GCOMP] = params[1]; - texObj->BorderColor[BCOMP] = params[2]; - texObj->BorderColor[ACOMP] = params[3]; + texObj->BorderColor.f[RCOMP] = params[0]; + texObj->BorderColor.f[GCOMP] = params[1]; + texObj->BorderColor.f[BCOMP] = params[2]; + texObj->BorderColor.f[ACOMP] = params[3]; return GL_TRUE; default: @@ -529,7 +531,7 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - texObj = get_texobj(ctx, target); + texObj = get_texobj(ctx, target, GL_FALSE); if (!texObj) return; @@ -577,7 +579,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - texObj = get_texobj(ctx, target); + texObj = get_texobj(ctx, target, GL_FALSE); if (!texObj) return; @@ -635,7 +637,7 @@ _mesa_TexParameteri(GLenum target, GLenum pname, GLint param) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - texObj = get_texobj(ctx, target); + texObj = get_texobj(ctx, target, GL_FALSE); if (!texObj) return; @@ -679,7 +681,7 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - texObj = get_texobj(ctx, target); + texObj = get_texobj(ctx, target, GL_FALSE); if (!texObj) return; @@ -728,6 +730,68 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params) } +/** + * Set tex parameter to integer value(s). Primarily intended to set + * integer-valued texture border color (for integer-valued textures). + * New in GL 3.0. + */ +void GLAPIENTRY +_mesa_TexParameterIiv(GLenum target, GLenum pname, const GLint *params) +{ + struct gl_texture_object *texObj; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + texObj = get_texobj(ctx, target, GL_FALSE); + if (!texObj) + return; + + switch (pname) { + case GL_TEXTURE_BORDER_COLOR: + FLUSH_VERTICES(ctx, _NEW_TEXTURE); + /* set the integer-valued border color */ + COPY_4V(texObj->BorderColor.i, params); + break; + default: + _mesa_TexParameteriv(target, pname, params); + break; + } + /* XXX no driver hook for TexParameterIiv() yet */ +} + + +/** + * Set tex parameter to unsigned integer value(s). Primarily intended to set + * uint-valued texture border color (for integer-valued textures). + * New in GL 3.0 + */ +void GLAPIENTRY +_mesa_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params) +{ + struct gl_texture_object *texObj; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + texObj = get_texobj(ctx, target, GL_FALSE); + if (!texObj) + return; + + switch (pname) { + case GL_TEXTURE_BORDER_COLOR: + FLUSH_VERTICES(ctx, _NEW_TEXTURE); + /* set the unsigned integer-valued border color */ + COPY_4V(texObj->BorderColor.ui, params); + break; + default: + _mesa_TexParameteriv(target, pname, (const GLint *) params); + break; + } + /* XXX no driver hook for TexParameterIuiv() yet */ +} + + + + void GLAPIENTRY _mesa_GetTexLevelParameterfv( GLenum target, GLint level, GLenum pname, GLfloat *params ) @@ -751,7 +815,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureImageUnits) { + if (ctx->Texture.CurrentUnit >= ctx->Const.MaxCombinedTextureImageUnits) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexLevelParameteriv(current unit)"); return; @@ -978,25 +1042,14 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, void GLAPIENTRY _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) { - struct gl_texture_unit *texUnit; struct gl_texture_object *obj; GLboolean error = GL_FALSE; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureImageUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetTexParameterfv(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); - - obj = _mesa_select_tex_object(ctx, texUnit, target); - if (!obj) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(target)"); + obj = get_texobj(ctx, target, GL_TRUE); + if (!obj) return; - } _mesa_lock_texture(ctx, obj); switch (pname) { @@ -1016,10 +1069,10 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = ENUM_TO_FLOAT(obj->WrapR); break; case GL_TEXTURE_BORDER_COLOR: - params[0] = CLAMP(obj->BorderColor[0], 0.0F, 1.0F); - params[1] = CLAMP(obj->BorderColor[1], 0.0F, 1.0F); - params[2] = CLAMP(obj->BorderColor[2], 0.0F, 1.0F); - params[3] = CLAMP(obj->BorderColor[3], 0.0F, 1.0F); + params[0] = CLAMP(obj->BorderColor.f[0], 0.0F, 1.0F); + params[1] = CLAMP(obj->BorderColor.f[1], 0.0F, 1.0F); + params[2] = CLAMP(obj->BorderColor.f[2], 0.0F, 1.0F); + params[3] = CLAMP(obj->BorderColor.f[3], 0.0F, 1.0F); break; case GL_TEXTURE_RESIDENT: { @@ -1145,26 +1198,16 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) void GLAPIENTRY _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) { - struct gl_texture_unit *texUnit; struct gl_texture_object *obj; GLboolean error = GL_FALSE; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureImageUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetTexParameteriv(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); - - obj = _mesa_select_tex_object(ctx, texUnit, target); - if (!obj) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(target)"); - return; - } + obj = get_texobj(ctx, target, GL_TRUE); + if (!obj) + return; + _mesa_lock_texture(ctx, obj); switch (pname) { case GL_TEXTURE_MAG_FILTER: *params = (GLint) obj->MagFilter; @@ -1184,10 +1227,10 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) case GL_TEXTURE_BORDER_COLOR: { GLfloat b[4]; - b[0] = CLAMP(obj->BorderColor[0], 0.0F, 1.0F); - b[1] = CLAMP(obj->BorderColor[1], 0.0F, 1.0F); - b[2] = CLAMP(obj->BorderColor[2], 0.0F, 1.0F); - b[3] = CLAMP(obj->BorderColor[3], 0.0F, 1.0F); + b[0] = CLAMP(obj->BorderColor.f[0], 0.0F, 1.0F); + b[1] = CLAMP(obj->BorderColor.f[1], 0.0F, 1.0F); + b[2] = CLAMP(obj->BorderColor.f[2], 0.0F, 1.0F); + b[3] = CLAMP(obj->BorderColor.f[3], 0.0F, 1.0F); params[0] = FLOAT_TO_INT(b[0]); params[1] = FLOAT_TO_INT(b[1]); params[2] = FLOAT_TO_INT(b[2]); @@ -1315,3 +1358,53 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) _mesa_unlock_texture(ctx, obj); } + + +/** New in GL 3.0 */ +void GLAPIENTRY +_mesa_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params) +{ + struct gl_texture_object *texObj; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + texObj = get_texobj(ctx, target, GL_TRUE); + + switch (pname) { + case GL_TEXTURE_BORDER_COLOR: + COPY_4V(params, texObj->BorderColor.i); + break; + default: + _mesa_GetTexParameteriv(target, pname, params); + } +} + + +/** New in GL 3.0 */ +void GLAPIENTRY +_mesa_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params) +{ + struct gl_texture_object *texObj; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + texObj = get_texobj(ctx, target, GL_TRUE); + + switch (pname) { + case GL_TEXTURE_BORDER_COLOR: + COPY_4V(params, texObj->BorderColor.i); + break; + default: + { + GLint ip[4]; + _mesa_GetTexParameteriv(target, pname, ip); + params[0] = ip[0]; + if (pname == GL_TEXTURE_SWIZZLE_RGBA_EXT || + pname == GL_TEXTURE_CROP_RECT_OES) { + params[1] = ip[1]; + params[2] = ip[2]; + params[3] = ip[3]; + } + } + } +} diff --git a/mesalib/src/mesa/main/texparam.h b/mesalib/src/mesa/main/texparam.h index 454b96350..19b4116c0 100644 --- a/mesalib/src/mesa/main/texparam.h +++ b/mesalib/src/mesa/main/texparam.h @@ -44,6 +44,11 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ); extern void GLAPIENTRY _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ); +extern void GLAPIENTRY +_mesa_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params); + +extern void GLAPIENTRY +_mesa_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params); extern void GLAPIENTRY @@ -60,4 +65,11 @@ extern void GLAPIENTRY _mesa_TexParameteriv( GLenum target, GLenum pname, const GLint *params ); +extern void GLAPIENTRY +_mesa_TexParameterIiv(GLenum target, GLenum pname, const GLint *params); + +extern void GLAPIENTRY +_mesa_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params); + + #endif /* TEXPARAM_H */ diff --git a/mesalib/src/mesa/main/texrender.c b/mesalib/src/mesa/main/texrender.c index e2432be6c..d29af5a5b 100644 --- a/mesalib/src/mesa/main/texrender.c +++ b/mesalib/src/mesa/main/texrender.c @@ -1,7 +1,6 @@ #include "context.h" #include "colormac.h" -#include "fbobject.h" #include "texfetch.h" #include "texrender.h" #include "renderbuffer.h" @@ -85,6 +84,14 @@ texture_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, zValues[i] = ((GLuint) (flt * 0xffffff)) << 8; } } + else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) { + GLuint *zValues = (GLuint *) values; + for (i = 0; i < count; i++) { + GLfloat flt; + trb->TexImage->FetchTexelf(trb->TexImage, x + i, y, z, &flt); + zValues[i] = (GLuint) (flt * 0xffffff); + } + } else { _mesa_problem(ctx, "invalid rb->DataType in texture_get_row"); } @@ -140,6 +147,15 @@ texture_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, zValues[i] = ((GLuint) (flt * 0xffffff)) << 8; } } + else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) { + GLuint *zValues = (GLuint *) values; + for (i = 0; i < count; i++) { + GLfloat flt; + trb->TexImage->FetchTexelf(trb->TexImage, x[i], y[i] + trb->Yoffset, + z, &flt); + zValues[i] = (GLuint) (flt * 0xffffff); + } + } else { _mesa_problem(ctx, "invalid rb->DataType in texture_get_values"); } @@ -194,6 +210,15 @@ texture_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } } + else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) { + const GLuint *zValues = (const GLuint *) values; + for (i = 0; i < count; i++) { + if (!mask || mask[i]) { + GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff)); + trb->Store(trb->TexImage, x + i, y, z, &flt); + } + } + } else { _mesa_problem(ctx, "invalid rb->DataType in texture_put_row"); } @@ -247,6 +272,15 @@ texture_put_row_rgb(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } } + else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) { + const GLuint *zValues = (const GLuint *) values; + for (i = 0; i < count; i++) { + if (!mask || mask[i]) { + GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff)); + trb->Store(trb->TexImage, x + i, y, z, &flt); + } + } + } else { _mesa_problem(ctx, "invalid rb->DataType in texture_put_row"); } @@ -297,6 +331,15 @@ texture_put_mono_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } } + else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) { + const GLuint zValue = *((const GLuint *) value); + const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff)); + for (i = 0; i < count; i++) { + if (!mask || mask[i]) { + trb->Store(trb->TexImage, x + i, y, z, &flt); + } + } + } else { _mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_row"); } @@ -347,6 +390,15 @@ texture_put_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, } } } + else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) { + const GLuint *zValues = (const GLuint *) values; + for (i = 0; i < count; i++) { + if (!mask || mask[i]) { + GLfloat flt = (GLfloat) ((zValues[i] & 0xffffff) * (1.0 / 0xffffff)); + trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt); + } + } + } else { _mesa_problem(ctx, "invalid rb->DataType in texture_put_values"); } @@ -396,6 +448,15 @@ texture_put_mono_values(GLcontext *ctx, struct gl_renderbuffer *rb, } } } + else if (rb->DataType == GL_UNSIGNED_INT_8_24_REV_MESA) { + const GLuint zValue = *((const GLuint *) value); + const GLfloat flt = (GLfloat) ((zValue & 0xffffff) * (1.0 / 0xffffff)); + for (i = 0; i < count; i++) { + if (!mask || mask[i]) { + trb->Store(trb->TexImage, x[i], y[i] + trb->Yoffset, z, &flt); + } + } + } else { _mesa_problem(ctx, "invalid rb->DataType in texture_put_mono_values"); } @@ -414,7 +475,7 @@ static void delete_texture_wrapper(struct gl_renderbuffer *rb) { ASSERT(rb->RefCount == 0); - _mesa_free(rb); + free(rb); } @@ -467,7 +528,6 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att) { struct texture_renderbuffer *trb = (struct texture_renderbuffer *) att->Renderbuffer; - gl_format texFormat; (void) ctx; ASSERT(trb); @@ -490,30 +550,42 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att) trb->Zoffset = att->Zoffset; } - texFormat = trb->TexImage->TexFormat; - trb->Base.Width = trb->TexImage->Width; trb->Base.Height = trb->TexImage->Height; trb->Base.InternalFormat = trb->TexImage->InternalFormat; + trb->Base.Format = trb->TexImage->TexFormat; + /* XXX may need more special cases here */ - if (trb->TexImage->TexFormat == MESA_FORMAT_Z24_S8) { - trb->Base.Format = MESA_FORMAT_Z24_S8; + switch (trb->TexImage->TexFormat) { + case MESA_FORMAT_Z24_S8: trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT; - } - else if (trb->TexImage->TexFormat == MESA_FORMAT_Z16) { - trb->Base.Format = MESA_FORMAT_Z16; + trb->Base._BaseFormat = GL_DEPTH_STENCIL; + break; + case MESA_FORMAT_S8_Z24: + trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA; + trb->Base._BaseFormat = GL_DEPTH_STENCIL; + break; + case MESA_FORMAT_Z24_X8: + trb->Base.DataType = GL_UNSIGNED_INT_24_8_EXT; + trb->Base._BaseFormat = GL_DEPTH_COMPONENT; + break; + case MESA_FORMAT_X8_Z24: + trb->Base.DataType = GL_UNSIGNED_INT_8_24_REV_MESA; + trb->Base._BaseFormat = GL_DEPTH_COMPONENT; + break; + case MESA_FORMAT_Z16: trb->Base.DataType = GL_UNSIGNED_SHORT; - } - else if (trb->TexImage->TexFormat == MESA_FORMAT_Z32) { - trb->Base.Format = MESA_FORMAT_Z32; + trb->Base._BaseFormat = GL_DEPTH_COMPONENT; + break; + case MESA_FORMAT_Z32: trb->Base.DataType = GL_UNSIGNED_INT; - } - else { - trb->Base.Format = trb->TexImage->TexFormat; + trb->Base._BaseFormat = GL_DEPTH_COMPONENT; + break; + default: trb->Base.DataType = CHAN_TYPE; + trb->Base._BaseFormat = GL_RGBA; } trb->Base.Data = trb->TexImage->Data; - trb->Base._BaseFormat = _mesa_base_fbo_format(ctx, trb->Base.InternalFormat); } diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c index c735e18af..fce17c2b6 100644 --- a/mesalib/src/mesa/main/texstate.c +++ b/mesalib/src/mesa/main/texstate.c @@ -35,11 +35,9 @@ #include "context.h" #include "enums.h" #include "macros.h" -#include "texcompress.h" #include "texobj.h" #include "teximage.h" #include "texstate.h" -#include "texenvprogram.h" #include "mtypes.h" @@ -79,7 +77,7 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ) dst->Texture.SharedPalette = src->Texture.SharedPalette; /* per-unit state */ - for (u = 0; u < src->Const.MaxTextureImageUnits; u++) { + for (u = 0; u < src->Const.MaxCombinedTextureImageUnits; u++) { dst->Texture.Unit[u].Enabled = src->Texture.Unit[u].Enabled; dst->Texture.Unit[u].EnvMode = src->Texture.Unit[u].EnvMode; COPY_4V(dst->Texture.Unit[u].EnvColor, src->Texture.Unit[u].EnvColor); @@ -124,25 +122,25 @@ void _mesa_print_texunit_state( GLcontext *ctx, GLuint unit ) { const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit; - _mesa_printf("Texture Unit %d\n", unit); - _mesa_printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode)); - _mesa_printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeRGB)); - _mesa_printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeA)); - _mesa_printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[0])); - _mesa_printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[1])); - _mesa_printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[2])); - _mesa_printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[0])); - _mesa_printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[1])); - _mesa_printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[2])); - _mesa_printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[0])); - _mesa_printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[1])); - _mesa_printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[2])); - _mesa_printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[0])); - _mesa_printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[1])); - _mesa_printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[2])); - _mesa_printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftRGB); - _mesa_printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftA); - _mesa_printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]); + printf("Texture Unit %d\n", unit); + printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode)); + printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeRGB)); + printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeA)); + printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[0])); + printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[1])); + printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[2])); + printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[0])); + printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[1])); + printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[2])); + printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[0])); + printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[1])); + printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[2])); + printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[0])); + printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[1])); + printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[2])); + printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftRGB); + printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftA); + printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]); } @@ -284,16 +282,25 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state, void GLAPIENTRY _mesa_ActiveTextureARB(GLenum texture) { - GET_CURRENT_CONTEXT(ctx); const GLuint texUnit = texture - GL_TEXTURE0; + GLuint k; + GET_CURRENT_CONTEXT(ctx); + + /* See OpenGL spec for glActiveTexture: */ + k = MAX2(ctx->Const.MaxCombinedTextureImageUnits, + ctx->Const.MaxTextureCoordUnits); + + ASSERT(k <= Elements(ctx->Texture.Unit)); + ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) _mesa_debug(ctx, "glActiveTexture %s\n", _mesa_lookup_enum_by_nr(texture)); - if (texUnit >= ctx->Const.MaxTextureImageUnits) { - _mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(texture)"); + if (texUnit >= k) { + _mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(texture=%s)", + _mesa_lookup_enum_by_nr(texture)); return; } @@ -357,6 +364,7 @@ update_texture_matrices( GLcontext *ctx ) ctx->Texture._TexMatEnabled = 0x0; for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { + ASSERT(u < Elements(ctx->TextureMatrixStack)); if (_math_matrix_is_dirty(ctx->TextureMatrixStack[u].Top)) { _math_matrix_analyse( ctx->TextureMatrixStack[u].Top ); @@ -510,7 +518,7 @@ update_texture_state( GLcontext *ctx ) /* * Update texture unit state. */ - for (unit = 0; unit < ctx->Const.MaxTextureImageUnits; unit++) { + for (unit = 0; unit < ctx->Const.MaxCombinedTextureImageUnits; unit++) { struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; GLbitfield enabledVertTargets = 0x0; GLbitfield enabledFragTargets = 0x0; @@ -628,6 +636,7 @@ update_texture_state( GLcontext *ctx ) ctx->Texture._GenFlags |= texUnit->_GenFlags; } + ASSERT(unit < Elements(ctx->TextureMatrixStack)); if (ctx->TextureMatrixStack[unit].Top->type != MATRIX_IDENTITY) ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit); } @@ -759,14 +768,15 @@ _mesa_init_texture(GLcontext *ctx) ctx->Texture.SharedPalette = GL_FALSE; _mesa_init_colortable(&ctx->Texture.Palette); - for (u = 0; u < MAX_TEXTURE_UNITS; u++) + for (u = 0; u < Elements(ctx->Texture.Unit); u++) init_texture_unit(ctx, u); /* After we're done initializing the context's texture state the default - * texture objects' refcounts should be at least MAX_TEXTURE_UNITS + 1. + * texture objects' refcounts should be at least + * MAX_COMBINED_TEXTURE_IMAGE_UNITS + 1. */ assert(ctx->Shared->DefaultTex[TEXTURE_1D_INDEX]->RefCount - >= MAX_TEXTURE_UNITS + 1); + >= MAX_COMBINED_TEXTURE_IMAGE_UNITS + 1); /* Allocate proxy textures */ if (!alloc_proxy_textures( ctx )) @@ -785,7 +795,7 @@ _mesa_free_texture_data(GLcontext *ctx) GLuint u, tgt; /* unreference current textures */ - for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) { + for (u = 0; u < Elements(ctx->Texture.Unit); u++) { /* The _Current texture could account for another reference */ _mesa_reference_texobj(&ctx->Texture.Unit[u]._Current, NULL); @@ -798,7 +808,7 @@ _mesa_free_texture_data(GLcontext *ctx) for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]); - for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) + for (u = 0; u < Elements(ctx->Texture.Unit); u++) _mesa_free_colortable_data(&ctx->Texture.Unit[u].ColorTable); } @@ -813,7 +823,7 @@ _mesa_update_default_objects_texture(GLcontext *ctx) { GLuint u, tex; - for (u = 0; u < MAX_TEXTURE_UNITS; u++) { + for (u = 0; u < Elements(ctx->Texture.Unit); u++) { struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u]; for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { _mesa_reference_texobj(&texUnit->CurrentTex[tex], diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c index 792c83141..65e3fcaa9 100644 --- a/mesalib/src/mesa/main/texstore.c +++ b/mesalib/src/mesa/main/texstore.c @@ -263,17 +263,17 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat, map[ZERO] = ZERO; map[ONE] = ONE; -/* - _mesa_printf("from %x/%s to %x/%s map %d %d %d %d %d %d\n", - inFormat, _mesa_lookup_enum_by_nr(inFormat), - outFormat, _mesa_lookup_enum_by_nr(outFormat), - map[0], - map[1], - map[2], - map[3], - map[4], - map[5]); -*/ +#if 0 + printf("from %x/%s to %x/%s map %d %d %d %d %d %d\n", + inFormat, _mesa_lookup_enum_by_nr(inFormat), + outFormat, _mesa_lookup_enum_by_nr(outFormat), + map[0], + map[1], + map[2], + map[3], + map[4], + map[5]); +#endif } @@ -347,16 +347,16 @@ make_temp_float_image(GLcontext *ctx, GLuint dims, GLfloat *convImage; /* pre-convolution image buffer (3D) */ - tempImage = (GLfloat *) _mesa_malloc(srcWidth * srcHeight * srcDepth + tempImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth * 4 * sizeof(GLfloat)); if (!tempImage) return NULL; /* post-convolution image buffer (2D) */ - convImage = (GLfloat *) _mesa_malloc(srcWidth * srcHeight + convImage = (GLfloat *) malloc(srcWidth * srcHeight * 4 * sizeof(GLfloat)); if (!convImage) { - _mesa_free(tempImage); + free(tempImage); return NULL; } @@ -419,7 +419,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims, } } /* loop over 3D image slices */ - _mesa_free(convImage); + free(convImage); /* might need these below */ srcWidth = convWidth; @@ -433,7 +433,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims, GLfloat *dst; GLint img, row; - tempImage = (GLfloat *) _mesa_malloc(srcWidth * srcHeight * srcDepth + tempImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth * components * sizeof(GLfloat)); if (!tempImage) return NULL; @@ -472,10 +472,10 @@ make_temp_float_image(GLcontext *ctx, GLuint dims, */ ASSERT(texComponents >= logComponents); - newImage = (GLfloat *) _mesa_malloc(srcWidth * srcHeight * srcDepth + newImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth * texComponents * sizeof(GLfloat)); if (!newImage) { - _mesa_free(tempImage); + free(tempImage); return NULL; } @@ -495,7 +495,7 @@ make_temp_float_image(GLcontext *ctx, GLuint dims, } } - _mesa_free(tempImage); + free(tempImage); tempImage = newImage; } @@ -582,11 +582,11 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims, #endif /* unpack and transfer the source image */ - tempImage = (GLchan *) _mesa_malloc(srcWidth * srcHeight * srcDepth + tempImage = (GLchan *) malloc(srcWidth * srcHeight * srcDepth * components * sizeof(GLchan)); if (!tempImage) { if (freeSrcImage) { - _mesa_free((void *) srcAddr); + free((void *) srcAddr); } return NULL; } @@ -611,7 +611,7 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims, /* If we made a temporary image for convolution, free it here */ if (freeSrcImage) { - _mesa_free((void *) srcAddr); + free((void *) srcAddr); } if (logicalBaseFormat != textureBaseFormat) { @@ -631,10 +631,10 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims, */ ASSERT(texComponents >= logComponents); - newImage = (GLchan *) _mesa_malloc(srcWidth * srcHeight * srcDepth + newImage = (GLchan *) malloc(srcWidth * srcHeight * srcDepth * texComponents * sizeof(GLchan)); if (!newImage) { - _mesa_free(tempImage); + free(tempImage); return NULL; } @@ -654,7 +654,7 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims, } } - _mesa_free(tempImage); + free(tempImage); tempImage = newImage; } @@ -884,7 +884,7 @@ _mesa_swizzle_ubyte_image(GLcontext *ctx, for (i = 0; i < 4; i++) map[i] = srctype2ubyte[swap[src2base[base2rgba[rgba2dst[i]]]]]; -/* _mesa_printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]); */ +/* printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]); */ if (srcComponents == dstComponents && srcRowStride == dstRowStride && @@ -1267,7 +1267,7 @@ _mesa_texstore_rgb565(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -1395,7 +1395,7 @@ _mesa_texstore_rgba8888(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -1606,7 +1606,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -1733,7 +1733,7 @@ _mesa_texstore_rgb888(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -1841,7 +1841,7 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -1912,7 +1912,7 @@ _mesa_texstore_argb4444(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -1970,7 +1970,7 @@ _mesa_texstore_rgba5551(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -2040,7 +2040,7 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -2143,7 +2143,7 @@ _mesa_texstore_al88(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -2218,7 +2218,7 @@ _mesa_texstore_al1616(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -2273,7 +2273,7 @@ _mesa_texstore_rgb332(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -2360,7 +2360,7 @@ _mesa_texstore_a8(TEXSTORE_PARAMS) src += srcWidth; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -2518,7 +2518,7 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS) GLbyte *tempImage, *dst, *src; GLint row; - tempImage = (GLbyte *) _mesa_malloc(srcWidth * srcHeight * srcDepth + tempImage = (GLbyte *) malloc(srcWidth * srcHeight * srcDepth * components * sizeof(GLbyte)); if (!tempImage) return GL_FALSE; @@ -2546,7 +2546,7 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS) dst += dstRowStride; src += srcWidth * texelBytes; } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -2667,7 +2667,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS) dstRow += dstRowStride; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -2678,7 +2678,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS) static GLboolean _mesa_texstore_z24_s8(TEXSTORE_PARAMS) { - const GLfloat depthScale = (GLfloat) 0xffffff; + const GLuint depthScale = 0xffffff; const GLint srcRowStride = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType) / sizeof(GLuint); @@ -2752,7 +2752,7 @@ _mesa_texstore_z24_s8(TEXSTORE_PARAMS) _mesa_unpack_depth_span(ctx, srcWidth, GL_UNSIGNED_INT_24_8_EXT, /* dst type */ dstRow, /* dst addr */ - (GLuint) depthScale, + depthScale, srcType, src, srcPacking); /* get the 8-bit stencil values */ _mesa_unpack_stencil_span(ctx, srcWidth, @@ -2919,13 +2919,13 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS) + dstYoffset * dstRowStride + dstXoffset * texelBytes; for (row = 0; row < srcHeight; row++) { - _mesa_memcpy(dstRow, srcRow, bytesPerRow); + memcpy(dstRow, srcRow, bytesPerRow); dstRow += dstRowStride; srcRow += srcWidth * components; } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -2996,7 +2996,7 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS) } } - _mesa_free((void *) tempImage); + free((void *) tempImage); } return GL_TRUE; } @@ -3716,7 +3716,7 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level, return; /* copy the data */ - MEMCPY(texImage->Data, data, imageSize); + memcpy(texImage->Data, data, imageSize); _mesa_unmap_teximage_pbo(ctx, &ctx->Unpack); } @@ -3823,7 +3823,7 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target, /* copy rows of blocks */ for (i = 0; i < rows; i++) { - MEMCPY(dest, src, bytesPerRow); + memcpy(dest, src, bytesPerRow); dest += destRowStride; src += srcRowStride; } diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c index c2193074c..b4128f84d 100644 --- a/mesalib/src/mesa/main/varray.c +++ b/mesalib/src/mesa/main/varray.c @@ -34,7 +34,7 @@ #include "mtypes.h" #include "varray.h" #include "arrayobj.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** @@ -121,6 +121,9 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) case GL_DOUBLE: elementSize = size * sizeof(GLdouble); break; + case GL_HALF_FLOAT: + elementSize = size * sizeof(GLhalfARB); + break; #if FEATURE_fixedpt case GL_FIXED: elementSize = size * sizeof(GLfixed); @@ -174,6 +177,9 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr ) case GL_DOUBLE: elementSize = 3 * sizeof(GLdouble); break; + case GL_HALF_FLOAT: + elementSize = 3 * sizeof(GLhalfARB); + break; #if FEATURE_fixedpt case GL_FIXED: elementSize = 3 * sizeof(GLfixed); @@ -250,6 +256,9 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) case GL_DOUBLE: elementSize = size * sizeof(GLdouble); break; + case GL_HALF_FLOAT: + elementSize = size * sizeof(GLhalfARB); + break; #if FEATURE_fixedpt case GL_FIXED: elementSize = size * sizeof(GLfixed); @@ -285,6 +294,9 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr) case GL_DOUBLE: elementSize = sizeof(GLdouble); break; + case GL_HALF_FLOAT: + elementSize = sizeof(GLhalfARB); + break; default: _mesa_error( ctx, GL_INVALID_ENUM, "glFogCoordPointer(type)" ); return; @@ -394,6 +406,9 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type, case GL_DOUBLE: elementSize = size * sizeof(GLdouble); break; + case GL_HALF_FLOAT: + elementSize = size * sizeof(GLhalfARB); + break; default: _mesa_error( ctx, GL_INVALID_ENUM, "glSecondaryColorPointer(type=%s)", _mesa_lookup_enum_by_nr(type)); @@ -441,6 +456,9 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, case GL_DOUBLE: elementSize = size * sizeof(GLdouble); break; + case GL_HALF_FLOAT: + elementSize = size * sizeof(GLhalfARB); + break; #if FEATURE_fixedpt case GL_FIXED: elementSize = size * sizeof(GLfixed); @@ -457,6 +475,8 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, return; } + ASSERT(unit < Elements(ctx->Array.ArrayObj->TexCoord)); + update_array(ctx, &ctx->Array.ArrayObj->TexCoord[unit], _NEW_ARRAY_TEXCOORD(unit), elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr); @@ -670,6 +690,9 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type, case GL_DOUBLE: elementSize = size * sizeof(GLdouble); break; + case GL_HALF_FLOAT: + elementSize = size * sizeof(GLhalfARB); + break; #if FEATURE_fixedpt case GL_FIXED: elementSize = size * sizeof(GLfixed); @@ -1060,14 +1083,14 @@ static void print_array(const char *name, GLint index, const struct gl_client_array *array) { if (index >= 0) - _mesa_printf(" %s[%d]: ", name, index); + printf(" %s[%d]: ", name, index); else - _mesa_printf(" %s: ", name); - _mesa_printf("Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %u), MaxElem=%u\n", - array->Ptr, array->Type, array->Size, - array->_ElementSize, array->StrideB, - array->BufferObj->Name, array->BufferObj->Size, - array->_MaxElement); + printf(" %s: ", name); + printf("Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %u), MaxElem=%u\n", + array->Ptr, array->Type, array->Size, + array->_ElementSize, array->StrideB, + array->BufferObj->Name, array->BufferObj->Size, + array->_MaxElement); } @@ -1082,7 +1105,7 @@ _mesa_print_arrays(GLcontext *ctx) _mesa_update_array_object_max_element(ctx, arrayObj); - _mesa_printf("Array Object %u\n", arrayObj->Name); + printf("Array Object %u\n", arrayObj->Name); if (arrayObj->Vertex.Enabled) print_array("Vertex", -1, &arrayObj->Vertex); if (arrayObj->Normal.Enabled) @@ -1095,7 +1118,7 @@ _mesa_print_arrays(GLcontext *ctx) for (i = 0; i < Elements(arrayObj->VertexAttrib); i++) if (arrayObj->VertexAttrib[i].Enabled) print_array("Attrib", i, &arrayObj->VertexAttrib[i]); - _mesa_printf(" _MaxElement = %u\n", arrayObj->_MaxElement); + printf(" _MaxElement = %u\n", arrayObj->_MaxElement); } diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c new file mode 100644 index 000000000..a39b68065 --- /dev/null +++ b/mesalib/src/mesa/main/version.c @@ -0,0 +1,130 @@ +/* + * Mesa 3-D graphics library + * + * Copyright (C) 2010 VMware, Inc. All Rights Reserved. + * + * 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 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 "context.h" +#include "version.h" + + + +/** + * Examine enabled GL extensions to determine GL version. + * Return major and minor version numbers. + */ +static void +compute_version(const GLcontext *ctx, GLuint *major, GLuint *minor) +{ + const GLboolean ver_1_3 = (ctx->Extensions.ARB_multisample && + ctx->Extensions.ARB_multitexture && + ctx->Extensions.ARB_texture_border_clamp && + ctx->Extensions.ARB_texture_compression && + ctx->Extensions.ARB_texture_cube_map && + ctx->Extensions.EXT_texture_env_add && + ctx->Extensions.ARB_texture_env_combine && + ctx->Extensions.ARB_texture_env_dot3); + const GLboolean ver_1_4 = (ver_1_3 && + ctx->Extensions.ARB_depth_texture && + ctx->Extensions.ARB_shadow && + ctx->Extensions.ARB_texture_env_crossbar && + ctx->Extensions.ARB_texture_mirrored_repeat && + ctx->Extensions.ARB_window_pos && + ctx->Extensions.EXT_blend_color && + ctx->Extensions.EXT_blend_func_separate && + ctx->Extensions.EXT_blend_minmax && + ctx->Extensions.EXT_blend_subtract && + ctx->Extensions.EXT_fog_coord && + ctx->Extensions.EXT_multi_draw_arrays && + ctx->Extensions.EXT_point_parameters && + ctx->Extensions.EXT_secondary_color && + ctx->Extensions.EXT_stencil_wrap && + ctx->Extensions.EXT_texture_lod_bias && + ctx->Extensions.SGIS_generate_mipmap); + const GLboolean ver_1_5 = (ver_1_4 && + ctx->Extensions.ARB_occlusion_query && + ctx->Extensions.ARB_vertex_buffer_object && + ctx->Extensions.EXT_shadow_funcs); + const GLboolean ver_2_0 = (ver_1_5 && + ctx->Extensions.ARB_draw_buffers && + ctx->Extensions.ARB_point_sprite && + ctx->Extensions.ARB_shader_objects && + ctx->Extensions.ARB_vertex_shader && + ctx->Extensions.ARB_fragment_shader && + ctx->Extensions.ARB_texture_non_power_of_two && + ctx->Extensions.EXT_blend_equation_separate && + + /* Technically, 2.0 requires the functionality + * of the EXT version. Enable 2.0 if either + * extension is available, and assume that a + * driver that only exposes the ATI extension + * will fallback to software when necessary. + */ + (ctx->Extensions.EXT_stencil_two_side + || ctx->Extensions.ATI_separate_stencil)); + const GLboolean ver_2_1 = (ver_2_0 && + ctx->Extensions.ARB_shading_language_120 && + ctx->Extensions.EXT_pixel_buffer_object && + ctx->Extensions.EXT_texture_sRGB); + if (ver_2_1) { + *major = 2; + *minor = 1; + } + else if (ver_2_0) { + *major = 2; + *minor = 0; + } + else if (ver_1_5) { + *major = 1; + *minor = 5; + } + else if (ver_1_4) { + *major = 1; + *minor = 4; + } + else if (ver_1_3) { + *major = 1; + *minor = 3; + } + else { + *major = 1; + *minor = 2; + } +} + + +/** + * Set the context's VersionMajor, VersionMinor, VersionString fields. + * This should only be called once as part of context initialization. + */ +void +_mesa_compute_version(GLcontext *ctx) +{ + static const int max = 100; + + compute_version(ctx, &ctx->VersionMajor, &ctx->VersionMinor); + + ctx->VersionString = (char *) malloc(max); + if (ctx->VersionString) { + _mesa_snprintf(ctx->VersionString, max, "%u.%u Mesa " MESA_VERSION_STRING, + ctx->VersionMajor, ctx->VersionMinor); + } +} diff --git a/mesalib/src/mesa/main/version.h b/mesalib/src/mesa/main/version.h index 9c758ce3b..2e1d70c46 100644 --- a/mesalib/src/mesa/main/version.h +++ b/mesalib/src/mesa/main/version.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.7 + * Version: 7.8 * * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. * Copyright (C) 2009 VMware, Inc. All Rights Reserved. @@ -28,11 +28,14 @@ #define VERSION_H +#include "mtypes.h" + + /* Mesa version */ #define MESA_MAJOR 7 -#define MESA_MINOR 7 +#define MESA_MINOR 8 #define MESA_PATCH 0 -#define MESA_VERSION_STRING "7.7" +#define MESA_VERSION_STRING "7.8" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) @@ -50,4 +53,8 @@ #define OPENGL_VERSION_CODE OPENGL_VERSION(OPENGL_MAJOR, OPENGL_MINOR, OPENGL_PATCH) +extern void +_mesa_compute_version(GLcontext *ctx); + + #endif /* VERSION_H */ diff --git a/mesalib/src/mesa/main/vtxfmt.c b/mesalib/src/mesa/main/vtxfmt.c index c9eea8ab8..0dd3e5e52 100644 --- a/mesalib/src/mesa/main/vtxfmt.c +++ b/mesalib/src/mesa/main/vtxfmt.c @@ -28,11 +28,9 @@ #include "glheader.h" #include "api_arrayelt.h" -#include "api_loopback.h" #include "context.h" #include "imports.h" #include "mtypes.h" -#include "state.h" #include "vtxfmt.h" #include "eval.h" #include "dlist.h" diff --git a/mesalib/src/mesa/main/vtxfmt_tmp.h b/mesalib/src/mesa/main/vtxfmt_tmp.h index ae636fb24..037c4b188 100644 --- a/mesalib/src/mesa/main/vtxfmt_tmp.h +++ b/mesalib/src/mesa/main/vtxfmt_tmp.h @@ -29,7 +29,7 @@ #define PRE_LOOPBACK( FUNC ) #endif -#include "glapi/dispatch.h" +#include "main/dispatch.h" static void GLAPIENTRY TAG(ArrayElement)( GLint i ) { diff --git a/mesalib/src/mesa/math/m_debug_clip.c b/mesalib/src/mesa/math/m_debug_clip.c index 95ae5a347..7ea5428aa 100644 --- a/mesalib/src/mesa/math/m_debug_clip.c +++ b/mesalib/src/mesa/math/m_debug_clip.c @@ -270,20 +270,20 @@ static int test_cliptest_function( clip_func func, int np, } if ( dco != rco ) { - _mesa_printf( "\n-----------------------------\n" ); - _mesa_printf( "dco = 0x%02x rco = 0x%02x\n", dco, rco ); + printf( "\n-----------------------------\n" ); + printf( "dco = 0x%02x rco = 0x%02x\n", dco, rco ); return 0; } if ( dca != rca ) { - _mesa_printf( "\n-----------------------------\n" ); - _mesa_printf( "dca = 0x%02x rca = 0x%02x\n", dca, rca ); + printf( "\n-----------------------------\n" ); + printf( "dca = 0x%02x rca = 0x%02x\n", dca, rca ); return 0; } for ( i = 0 ; i < TEST_COUNT ; i++ ) { if ( dm[i] != rm[i] ) { - _mesa_printf( "\n-----------------------------\n" ); - _mesa_printf( "(i = %i)\n", i ); - _mesa_printf( "dm = 0x%02x rm = 0x%02x\n", dm[i], rm[i] ); + printf( "\n-----------------------------\n" ); + printf( "(i = %i)\n", i ); + printf( "dm = 0x%02x rm = 0x%02x\n", dm[i], rm[i] ); return 0; } } @@ -297,19 +297,19 @@ static int test_cliptest_function( clip_func func, int np, for ( i = 0 ; i < TEST_COUNT ; i++ ) { for ( j = 0 ; j < 4 ; j++ ) { if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf( "\n-----------------------------\n" ); - _mesa_printf( "(i = %i, j = %i) dm = 0x%02x rm = 0x%02x\n", + printf( "\n-----------------------------\n" ); + printf( "(i = %i, j = %i) dm = 0x%02x rm = 0x%02x\n", i, j, dm[i], rm[i] ); - _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n", + printf( "%f \t %f \t [diff = %e - %i bit missed]\n", d[i][0], r[i][0], r[i][0]-d[i][0], MAX_PRECISION - significand_match( d[i][0], r[i][0] ) ); - _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n", + printf( "%f \t %f \t [diff = %e - %i bit missed]\n", d[i][1], r[i][1], r[i][1]-d[i][1], MAX_PRECISION - significand_match( d[i][1], r[i][1] ) ); - _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n", + printf( "%f \t %f \t [diff = %e - %i bit missed]\n", d[i][2], r[i][2], r[i][2]-d[i][2], MAX_PRECISION - significand_match( d[i][2], r[i][2] ) ); - _mesa_printf( "%f \t %f \t [diff = %e - %i bit missed]\n", + printf( "%f \t %f \t [diff = %e - %i bit missed]\n", d[i][3], r[i][3], r[i][3]-d[i][3], MAX_PRECISION - significand_match( d[i][3], r[i][3] ) ); return 0; @@ -335,19 +335,19 @@ void _math_test_all_cliptest_functions( char *description ) if ( mesa_profile ) { if ( !counter_overhead ) { INIT_COUNTER(); - _mesa_printf( "counter overhead: %ld cycles\n\n", counter_overhead ); + printf( "counter overhead: %ld cycles\n\n", counter_overhead ); } - _mesa_printf( "cliptest results after hooking in %s functions:\n", description ); + printf( "cliptest results after hooking in %s functions:\n", description ); } #endif #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) { - _mesa_printf( "\n\t" ); + printf( "\n\t" ); for ( psize = 2 ; psize <= 4 ; psize++ ) { - _mesa_printf( " p%d\t", psize ); + printf( " p%d\t", psize ); } - _mesa_printf( "\n--------------------------------------------------------\n\t" ); + printf( "\n--------------------------------------------------------\n\t" ); } #endif @@ -358,23 +358,23 @@ void _math_test_all_cliptest_functions( char *description ) if ( test_cliptest_function( func, np, psize, cycles ) == 0 ) { char buf[100]; - _mesa_sprintf( buf, "%s[%d] failed test (%s)", + sprintf( buf, "%s[%d] failed test (%s)", cnames[np], psize, description ); _mesa_problem( NULL, buf ); } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) - _mesa_printf( " %li\t", benchmark_tab[np][psize-1] ); + printf( " %li\t", benchmark_tab[np][psize-1] ); #endif } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) - _mesa_printf( " | [%s]\n\t", cstrings[np] ); + printf( " | [%s]\n\t", cstrings[np] ); #endif } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) - _mesa_printf( "\n" ); + printf( "\n" ); #endif } diff --git a/mesalib/src/mesa/math/m_debug_norm.c b/mesalib/src/mesa/math/m_debug_norm.c index 89c632e7d..710bad14d 100644 --- a/mesalib/src/mesa/math/m_debug_norm.c +++ b/mesalib/src/mesa/math/m_debug_norm.c @@ -208,7 +208,7 @@ static int test_norm_function( normal_func func, int mtype, long *cycles ) (void) cycles; - mat->m = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); + mat->m = (GLfloat *) _mesa_align_malloc( 16 * sizeof(GLfloat), 16 ); mat->inv = m = mat->m; init_matrix( m ); @@ -230,7 +230,7 @@ static int test_norm_function( normal_func func, int mtype, long *cycles ) case VAR: break; default: - _mesa_exit(1); + exit(1); } } } @@ -294,15 +294,15 @@ static int test_norm_function( normal_func func, int mtype, long *cycles ) for ( i = 0 ; i < TEST_COUNT ; i++ ) { for ( j = 0 ; j < 3 ; j++ ) { if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf( "-----------------------------\n" ); - _mesa_printf( "(i = %i, j = %i)\n", i, j ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", + printf( "-----------------------------\n" ); + printf( "(i = %i, j = %i)\n", i, j ); + printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d[i][0], r[i][0], r[i][0]/d[i][0], MAX_PRECISION - significand_match( d[i][0], r[i][0] ) ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", + printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d[i][1], r[i][1], r[i][1]/d[i][1], MAX_PRECISION - significand_match( d[i][1], r[i][1] ) ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", + printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d[i][2], r[i][2], r[i][2]/d[i][2], MAX_PRECISION - significand_match( d[i][2], r[i][2] ) ); return 0; @@ -310,15 +310,15 @@ static int test_norm_function( normal_func func, int mtype, long *cycles ) if ( norm_normalize_types[mtype] != 0 ) { if ( significand_match( d2[i][j], r2[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf( "------------------- precalculated length case ------\n" ); - _mesa_printf( "(i = %i, j = %i)\n", i, j ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", + printf( "------------------- precalculated length case ------\n" ); + printf( "(i = %i, j = %i)\n", i, j ); + printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d2[i][0], r2[i][0], r2[i][0]/d2[i][0], MAX_PRECISION - significand_match( d2[i][0], r2[i][0] ) ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", + printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d2[i][1], r2[i][1], r2[i][1]/d2[i][1], MAX_PRECISION - significand_match( d2[i][1], r2[i][1] ) ); - _mesa_printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", + printf( "%f \t %f \t [ratio = %e - %i bit missed]\n", d2[i][2], r2[i][2], r2[i][2]/d2[i][2], MAX_PRECISION - significand_match( d2[i][2], r2[i][2] ) ); return 0; @@ -327,7 +327,7 @@ static int test_norm_function( normal_func func, int mtype, long *cycles ) } } - ALIGN_FREE( mat->m ); + _mesa_align_free( mat->m ); return 1; } @@ -346,11 +346,11 @@ void _math_test_all_normal_transform_functions( char *description ) if ( mesa_profile ) { if ( !counter_overhead ) { INIT_COUNTER(); - _mesa_printf( "counter overhead: %ld cycles\n\n", counter_overhead ); + printf( "counter overhead: %ld cycles\n\n", counter_overhead ); } - _mesa_printf( "normal transform results after hooking in %s functions:\n", + printf( "normal transform results after hooking in %s functions:\n", description ); - _mesa_printf( "\n-------------------------------------------------------\n" ); + printf( "\n-------------------------------------------------------\n" ); } #endif @@ -360,21 +360,21 @@ void _math_test_all_normal_transform_functions( char *description ) if ( test_norm_function( func, mtype, cycles ) == 0 ) { char buf[100]; - _mesa_sprintf( buf, "_mesa_normal_tab[0][%s] failed test (%s)", + sprintf( buf, "_mesa_normal_tab[0][%s] failed test (%s)", norm_strings[mtype], description ); _mesa_problem( NULL, buf ); } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) { - _mesa_printf( " %li\t", benchmark_tab[mtype] ); - _mesa_printf( " | [%s]\n", norm_strings[mtype] ); + printf( " %li\t", benchmark_tab[mtype] ); + printf( " | [%s]\n", norm_strings[mtype] ); } #endif } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) { - _mesa_printf( "\n" ); + printf( "\n" ); } #endif } diff --git a/mesalib/src/mesa/math/m_debug_util.h b/mesalib/src/mesa/math/m_debug_util.h index 2e67db8e5..ed11c849e 100644 --- a/mesalib/src/mesa/math/m_debug_util.h +++ b/mesalib/src/mesa/math/m_debug_util.h @@ -61,7 +61,7 @@ extern long counter_overhead; */ extern char *mesa_profile; -/* Modify the the number of tests if you like. +/* Modify the number of tests if you like. * We take the minimum of all results, because every error should be * positive (time used by other processes, task switches etc). * It is assumed that all calculations are done in the cache. diff --git a/mesalib/src/mesa/math/m_debug_xform.c b/mesalib/src/mesa/math/m_debug_xform.c index df8cc066b..46bd45451 100644 --- a/mesalib/src/mesa/math/m_debug_xform.c +++ b/mesalib/src/mesa/math/m_debug_xform.c @@ -183,7 +183,7 @@ static int test_transform_function( transform_func func, int psize, return 0; } - mat->m = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); + mat->m = (GLfloat *) _mesa_align_malloc( 16 * sizeof(GLfloat), 16 ); mat->type = mtypes[mtype]; m = mat->m; @@ -254,18 +254,18 @@ static int test_transform_function( transform_func func, int psize, for ( i = 0 ; i < TEST_COUNT ; i++ ) { for ( j = 0 ; j < 4 ; j++ ) { if ( significand_match( d[i][j], r[i][j] ) < REQUIRED_PRECISION ) { - _mesa_printf("-----------------------------\n" ); - _mesa_printf("(i = %i, j = %i)\n", i, j ); - _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n", + printf("-----------------------------\n" ); + printf("(i = %i, j = %i)\n", i, j ); + printf("%f \t %f \t [diff = %e - %i bit missed]\n", d[i][0], r[i][0], r[i][0]-d[i][0], MAX_PRECISION - significand_match( d[i][0], r[i][0] ) ); - _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n", + printf("%f \t %f \t [diff = %e - %i bit missed]\n", d[i][1], r[i][1], r[i][1]-d[i][1], MAX_PRECISION - significand_match( d[i][1], r[i][1] ) ); - _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n", + printf("%f \t %f \t [diff = %e - %i bit missed]\n", d[i][2], r[i][2], r[i][2]-d[i][2], MAX_PRECISION - significand_match( d[i][2], r[i][2] ) ); - _mesa_printf("%f \t %f \t [diff = %e - %i bit missed]\n", + printf("%f \t %f \t [diff = %e - %i bit missed]\n", d[i][3], r[i][3], r[i][3]-d[i][3], MAX_PRECISION - significand_match( d[i][3], r[i][3] ) ); return 0; @@ -273,7 +273,7 @@ static int test_transform_function( transform_func func, int psize, } } - ALIGN_FREE( mat->m ); + _mesa_align_free( mat->m ); return 1; } @@ -292,19 +292,19 @@ void _math_test_all_transform_functions( char *description ) if ( mesa_profile ) { if ( !counter_overhead ) { INIT_COUNTER(); - _mesa_printf("counter overhead: %lu cycles\n\n", counter_overhead ); + printf("counter overhead: %lu cycles\n\n", counter_overhead ); } - _mesa_printf("transform results after hooking in %s functions:\n", description ); + printf("transform results after hooking in %s functions:\n", description ); } #endif #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) { - _mesa_printf("\n" ); + printf("\n" ); for ( psize = 1 ; psize <= 4 ; psize++ ) { - _mesa_printf(" p%d\t", psize ); + printf(" p%d\t", psize ); } - _mesa_printf("\n--------------------------------------------------------\n" ); + printf("\n--------------------------------------------------------\n" ); } #endif @@ -315,23 +315,23 @@ void _math_test_all_transform_functions( char *description ) if ( test_transform_function( func, psize, mtype, cycles ) == 0 ) { char buf[100]; - _mesa_sprintf(buf, "_mesa_transform_tab[0][%d][%s] failed test (%s)", - psize, mstrings[mtype], description ); + sprintf(buf, "_mesa_transform_tab[0][%d][%s] failed test (%s)", + psize, mstrings[mtype], description ); _mesa_problem( NULL, buf ); } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) - _mesa_printf(" %li\t", benchmark_tab[psize-1][mtype] ); + printf(" %li\t", benchmark_tab[psize-1][mtype] ); #endif } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) - _mesa_printf(" | [%s]\n", mstrings[mtype] ); + printf(" | [%s]\n", mstrings[mtype] ); #endif } #ifdef RUN_DEBUG_BENCHMARK if ( mesa_profile ) - _mesa_printf( "\n" ); + printf( "\n" ); #endif } diff --git a/mesalib/src/mesa/math/m_matrix.c b/mesalib/src/mesa/math/m_matrix.c index da6956efe..4b33d0bbb 100644 --- a/mesalib/src/mesa/math/m_matrix.c +++ b/mesalib/src/mesa/math/m_matrix.c @@ -599,7 +599,7 @@ static GLboolean invert_matrix_3d( GLmatrix *mat ) } else { /* pure translation */ - MEMCPY( out, Identity, sizeof(Identity) ); + memcpy( out, Identity, sizeof(Identity) ); MAT(out,0,3) = - MAT(in,0,3); MAT(out,1,3) = - MAT(in,1,3); MAT(out,2,3) = - MAT(in,2,3); @@ -637,7 +637,7 @@ static GLboolean invert_matrix_3d( GLmatrix *mat ) */ static GLboolean invert_matrix_identity( GLmatrix *mat ) { - MEMCPY( mat->inv, Identity, sizeof(Identity) ); + memcpy( mat->inv, Identity, sizeof(Identity) ); return GL_TRUE; } @@ -659,7 +659,7 @@ static GLboolean invert_matrix_3d_no_rot( GLmatrix *mat ) if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0 || MAT(in,2,2) == 0 ) return GL_FALSE; - MEMCPY( out, Identity, 16 * sizeof(GLfloat) ); + memcpy( out, Identity, 16 * sizeof(GLfloat) ); MAT(out,0,0) = 1.0F / MAT(in,0,0); MAT(out,1,1) = 1.0F / MAT(in,1,1); MAT(out,2,2) = 1.0F / MAT(in,2,2); @@ -692,7 +692,7 @@ static GLboolean invert_matrix_2d_no_rot( GLmatrix *mat ) if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0) return GL_FALSE; - MEMCPY( out, Identity, 16 * sizeof(GLfloat) ); + memcpy( out, Identity, 16 * sizeof(GLfloat) ); MAT(out,0,0) = 1.0F / MAT(in,0,0); MAT(out,1,1) = 1.0F / MAT(in,1,1); @@ -714,7 +714,7 @@ static GLboolean invert_matrix_perspective( GLmatrix *mat ) if (MAT(in,2,3) == 0) return GL_FALSE; - MEMCPY( out, Identity, 16 * sizeof(GLfloat) ); + memcpy( out, Identity, 16 * sizeof(GLfloat) ); MAT(out,0,0) = 1.0F / MAT(in,0,0); MAT(out,1,1) = 1.0F / MAT(in,1,1); @@ -776,7 +776,7 @@ static GLboolean matrix_invert( GLmatrix *mat ) return GL_TRUE; } else { mat->flags |= MAT_FLAG_SINGULAR; - MEMCPY( mat->inv, Identity, sizeof(Identity) ); + memcpy( mat->inv, Identity, sizeof(Identity) ); return GL_FALSE; } } @@ -807,7 +807,7 @@ _math_matrix_rotate( GLmatrix *mat, s = (GLfloat) _mesa_sin( angle * DEG2RAD ); c = (GLfloat) _mesa_cos( angle * DEG2RAD ); - MEMCPY(m, Identity, sizeof(GLfloat)*16); + memcpy(m, Identity, sizeof(GLfloat)*16); optimized = GL_FALSE; #define M(row,col) m[col*4+row] @@ -889,7 +889,7 @@ _math_matrix_rotate( GLmatrix *mat, * Y-axis to bring the axis vector parallel with the X-axis. The * rotation about the X-axis is then performed. Ry and Rz are * simply the respective inverse transforms to bring the arbitrary - * axis back to it's original orientation. The first transforms + * axis back to its original orientation. The first transforms * Rz' and Ry' are considered inverses, since the data from the * arbitrary axis gives you info on how to get to it, not how * to get away from it, and an inverse must be applied. @@ -1141,10 +1141,10 @@ _math_matrix_viewport(GLmatrix *m, GLint x, GLint y, GLint width, GLint height, void _math_matrix_set_identity( GLmatrix *mat ) { - MEMCPY( mat->m, Identity, 16*sizeof(GLfloat) ); + memcpy( mat->m, Identity, 16*sizeof(GLfloat) ); if (mat->inv) - MEMCPY( mat->inv, Identity, 16*sizeof(GLfloat) ); + memcpy( mat->inv, Identity, 16*sizeof(GLfloat) ); mat->type = MATRIX_IDENTITY; mat->flags &= ~(MAT_DIRTY_FLAGS| @@ -1444,7 +1444,7 @@ _math_matrix_is_dirty( const GLmatrix *m ) void _math_matrix_copy( GLmatrix *to, const GLmatrix *from ) { - MEMCPY( to->m, from->m, sizeof(Identity) ); + memcpy( to->m, from->m, sizeof(Identity) ); to->flags = from->flags; to->type = from->type; @@ -1453,7 +1453,7 @@ _math_matrix_copy( GLmatrix *to, const GLmatrix *from ) matrix_invert( to ); } else { - MEMCPY(to->inv, from->inv, sizeof(GLfloat)*16); + memcpy(to->inv, from->inv, sizeof(GLfloat)*16); } } } @@ -1470,7 +1470,7 @@ _math_matrix_copy( GLmatrix *to, const GLmatrix *from ) void _math_matrix_loadf( GLmatrix *mat, const GLfloat *m ) { - MEMCPY( mat->m, m, 16*sizeof(GLfloat) ); + memcpy( mat->m, m, 16*sizeof(GLfloat) ); mat->flags = (MAT_FLAG_GENERAL | MAT_DIRTY); } @@ -1484,9 +1484,9 @@ _math_matrix_loadf( GLmatrix *mat, const GLfloat *m ) void _math_matrix_ctr( GLmatrix *m ) { - m->m = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); + m->m = (GLfloat *) _mesa_align_malloc( 16 * sizeof(GLfloat), 16 ); if (m->m) - MEMCPY( m->m, Identity, sizeof(Identity) ); + memcpy( m->m, Identity, sizeof(Identity) ); m->inv = NULL; m->type = MATRIX_IDENTITY; m->flags = 0; @@ -1503,11 +1503,11 @@ void _math_matrix_dtr( GLmatrix *m ) { if (m->m) { - ALIGN_FREE( m->m ); + _mesa_align_free( m->m ); m->m = NULL; } if (m->inv) { - ALIGN_FREE( m->inv ); + _mesa_align_free( m->inv ); m->inv = NULL; } } @@ -1523,9 +1523,9 @@ void _math_matrix_alloc_inv( GLmatrix *m ) { if (!m->inv) { - m->inv = (GLfloat *) ALIGN_MALLOC( 16 * sizeof(GLfloat), 16 ); + m->inv = (GLfloat *) _mesa_align_malloc( 16 * sizeof(GLfloat), 16 ); if (m->inv) - MEMCPY( m->inv, Identity, 16 * sizeof(GLfloat) ); + memcpy( m->inv, Identity, 16 * sizeof(GLfloat) ); } } diff --git a/mesalib/src/mesa/math/m_translate.c b/mesalib/src/mesa/math/m_translate.c index 4a20f45ee..b12b07957 100644 --- a/mesalib/src/mesa/math/m_translate.c +++ b/mesalib/src/mesa/math/m_translate.c @@ -556,13 +556,13 @@ static void trans_4_GLubyte_4ub_raw(GLubyte (*t)[4], static void init_translate_raw(void) { - MEMSET( TAB(_1ui), 0, sizeof(TAB(_1ui)) ); - MEMSET( TAB(_1ub), 0, sizeof(TAB(_1ub)) ); - MEMSET( TAB(_3fn), 0, sizeof(TAB(_3fn)) ); - MEMSET( TAB(_4ub), 0, sizeof(TAB(_4ub)) ); - MEMSET( TAB(_4us), 0, sizeof(TAB(_4us)) ); - MEMSET( TAB(_4f), 0, sizeof(TAB(_4f)) ); - MEMSET( TAB(_4fn), 0, sizeof(TAB(_4fn)) ); + memset( TAB(_1ui), 0, sizeof(TAB(_1ui)) ); + memset( TAB(_1ub), 0, sizeof(TAB(_1ub)) ); + memset( TAB(_3fn), 0, sizeof(TAB(_3fn)) ); + memset( TAB(_4ub), 0, sizeof(TAB(_4ub)) ); + memset( TAB(_4us), 0, sizeof(TAB(_4us)) ); + memset( TAB(_4f), 0, sizeof(TAB(_4f)) ); + memset( TAB(_4fn), 0, sizeof(TAB(_4fn)) ); init_trans_4_GLbyte_raw(); init_trans_3_GLbyte_raw(); diff --git a/mesalib/src/mesa/math/m_vector.c b/mesalib/src/mesa/math/m_vector.c index 4cbab11a3..fbd63fd92 100644 --- a/mesalib/src/mesa/math/m_vector.c +++ b/mesalib/src/mesa/math/m_vector.c @@ -101,7 +101,7 @@ _mesa_vector4f_alloc( GLvector4f *v, GLbitfield flags, GLuint count, { v->stride = 4 * sizeof(GLfloat); v->size = 2; - v->storage = ALIGN_MALLOC( count * 4 * sizeof(GLfloat), alignment ); + v->storage = _mesa_align_malloc( count * 4 * sizeof(GLfloat), alignment ); v->storage_count = count; v->start = (GLfloat *) v->storage; v->data = (GLfloat (*)[4]) v->storage; @@ -119,7 +119,7 @@ void _mesa_vector4f_free( GLvector4f *v ) { if (v->flags & VEC_MALLOC) { - ALIGN_FREE( v->storage ); + _mesa_align_free( v->storage ); v->data = NULL; v->start = NULL; v->storage = NULL; @@ -148,27 +148,27 @@ _mesa_vector4f_print( const GLvector4f *v, const GLubyte *cullmask, GLfloat *d = (GLfloat *)v->data; GLuint j, i = 0, count; - _mesa_printf("data-start\n"); + printf("data-start\n"); for (; d != v->start; STRIDE_F(d, v->stride), i++) - _mesa_printf(t, i, d[0], d[1], d[2], d[3]); + printf(t, i, d[0], d[1], d[2], d[3]); - _mesa_printf("start-count(%u)\n", v->count); + printf("start-count(%u)\n", v->count); count = i + v->count; if (culling) { for (; i < count; STRIDE_F(d, v->stride), i++) if (cullmask[i]) - _mesa_printf(t, i, d[0], d[1], d[2], d[3]); + printf(t, i, d[0], d[1], d[2], d[3]); } else { for (; i < count; STRIDE_F(d, v->stride), i++) - _mesa_printf(t, i, d[0], d[1], d[2], d[3]); + printf(t, i, d[0], d[1], d[2], d[3]); } for (j = v->size; j < 4; j++) { if ((v->flags & (1<data; i < count && d[j] == c[j]; @@ -177,9 +177,9 @@ _mesa_vector4f_print( const GLvector4f *v, const GLubyte *cullmask, } if (i == count) - _mesa_printf(" --> ok\n"); + printf(" --> ok\n"); else - _mesa_printf(" --> Failed at %u ******\n", i); + printf(" --> Failed at %u ******\n", i); } } } diff --git a/mesalib/src/mesa/shader/arbprogparse.c b/mesalib/src/mesa/shader/arbprogparse.c index dd732b666..6373529e4 100644 --- a/mesalib/src/mesa/shader/arbprogparse.c +++ b/mesalib/src/mesa/shader/arbprogparse.c @@ -54,11 +54,8 @@ having three separate program parameter arrays. #include "main/glheader.h" #include "main/imports.h" #include "main/context.h" -#include "main/macros.h" #include "main/mtypes.h" -#include "shader/grammar/grammar_mesa.h" #include "arbprogparse.h" -#include "program.h" #include "programopt.h" #include "prog_parameter.h" #include "prog_statevars.h" @@ -88,7 +85,7 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target, } if (program->Base.String != NULL) - _mesa_free(program->Base.String); + free(program->Base.String); /* Copy the relevant contents of the arb_program struct into the * fragment_program struct. @@ -124,6 +121,8 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target, case OPTION_FOG_LINEAR: program->FogOption = GL_LINEAR; break; default: program->FogOption = GL_NONE; break; } + program->OriginUpperLeft = state.option.OriginUpperLeft; + program->PixelCenterInteger = state.option.PixelCenterInteger; program->UsesKill = state.fragment.UsesKill; @@ -131,7 +130,7 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target, program->Base.InputsRead |= FRAG_BIT_FOGC; if (program->Base.Instructions) - _mesa_free(program->Base.Instructions); + free(program->Base.Instructions); program->Base.Instructions = prog.Instructions; if (program->Base.Parameters) @@ -149,7 +148,7 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target, } #if DEBUG_FP - _mesa_printf("____________Fragment program %u ________\n", program->Base.Id); + printf("____________Fragment program %u ________\n", program->Base.Id); _mesa_print_program(&program->Base); #endif } @@ -182,7 +181,7 @@ _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target, } if (program->Base.String != NULL) - _mesa_free(program->Base.String); + free(program->Base.String); /* Copy the relevant contents of the arb_program struct into the * vertex_program struct. @@ -204,7 +203,7 @@ _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target, ? GL_TRUE : GL_FALSE; if (program->Base.Instructions) - _mesa_free(program->Base.Instructions); + free(program->Base.Instructions); program->Base.Instructions = prog.Instructions; if (program->Base.Parameters) @@ -212,7 +211,7 @@ _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target, program->Base.Parameters = prog.Parameters; #if DEBUG_VP - _mesa_printf("____________Vertex program %u __________\n", program->Base.Id); + printf("____________Vertex program %u __________\n", program->Base.Id); _mesa_print_program(&program->Base); #endif } diff --git a/mesalib/src/mesa/shader/arbprogram.c b/mesalib/src/mesa/shader/arbprogram.c index eb537cd1b..75b4274bf 100644 --- a/mesalib/src/mesa/shader/arbprogram.c +++ b/mesalib/src/mesa/shader/arbprogram.c @@ -180,23 +180,24 @@ _mesa_DeletePrograms(GLsizei n, const GLuint *ids) } else if (prog) { /* Unbind program if necessary */ - if (prog->Target == GL_VERTEX_PROGRAM_ARB || /* == GL_VERTEX_PROGRAM_NV */ - prog->Target == GL_VERTEX_STATE_PROGRAM_NV) { + switch (prog->Target) { + case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */ + case GL_VERTEX_STATE_PROGRAM_NV: if (ctx->VertexProgram.Current && ctx->VertexProgram.Current->Base.Id == ids[i]) { /* unbind this currently bound program */ _mesa_BindProgram(prog->Target, 0); } - } - else if (prog->Target == GL_FRAGMENT_PROGRAM_NV || - prog->Target == GL_FRAGMENT_PROGRAM_ARB) { + break; + case GL_FRAGMENT_PROGRAM_NV: + case GL_FRAGMENT_PROGRAM_ARB: if (ctx->FragmentProgram.Current && ctx->FragmentProgram.Current->Base.Id == ids[i]) { /* unbind this currently bound program */ _mesa_BindProgram(prog->Target, 0); } - } - else { + break; + default: _mesa_problem(ctx, "bad target in glDeleteProgramsNV"); return; } @@ -488,8 +489,13 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len, return; } - if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify) - ctx->Driver.ProgramStringNotify( ctx, target, base ); + if (ctx->Program.ErrorPos == -1) { + /* finally, give the program to the driver for translation/checking */ + if (!ctx->Driver.ProgramStringNotify(ctx, target, base)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glProgramStringARB(rejected by driver"); + } + } } @@ -561,6 +567,8 @@ _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index, } } + + /** * Set a program env parameter register. * \note Called from the GL API dispatcher. @@ -569,10 +577,35 @@ _mesa_ProgramEnvParameter4fARB(GLenum target, GLuint index, */ void GLAPIENTRY _mesa_ProgramEnvParameter4fvARB(GLenum target, GLuint index, - const GLfloat *params) + const GLfloat *params) { - _mesa_ProgramEnvParameter4fARB(target, index, params[0], params[1], - params[2], params[3]); + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS); + + if (target == GL_FRAGMENT_PROGRAM_ARB + && ctx->Extensions.ARB_fragment_program) { + if (index >= ctx->Const.FragmentProgram.MaxEnvParams) { + _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter4fv(index)"); + return; + } + memcpy(ctx->FragmentProgram.Parameters[index], params, + 4 * sizeof(GLfloat)); + } + else if (target == GL_VERTEX_PROGRAM_ARB /* == GL_VERTEX_PROGRAM_NV */ + && (ctx->Extensions.ARB_vertex_program || ctx->Extensions.NV_vertex_program)) { + if (index >= ctx->Const.VertexProgram.MaxEnvParams) { + _mesa_error(ctx, GL_INVALID_VALUE, "glProgramEnvParameter4fv(index)"); + return; + } + memcpy(ctx->VertexProgram.Parameters[index], params, + 4 * sizeof(GLfloat)); + } + else { + _mesa_error(ctx, GL_INVALID_ENUM, "glProgramEnvParameter4fv(target)"); + return; + } } @@ -581,7 +614,6 @@ _mesa_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count, const GLfloat *params) { GET_CURRENT_CONTEXT(ctx); - GLint i; GLfloat * dest; ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -612,11 +644,7 @@ _mesa_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count, return; } - for ( i = 0 ; i < count ; i++ ) { - COPY_4V(dest, params); - params += 4; - dest += 4; - } + memcpy(dest, params, count * 4 * sizeof(GLfloat)); } @@ -729,8 +757,7 @@ _mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count, const GLfloat *params) { GET_CURRENT_CONTEXT(ctx); - struct gl_program *prog; - GLint i; + GLfloat *dest; ASSERT_OUTSIDE_BEGIN_END(ctx); FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS); @@ -745,7 +772,7 @@ _mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count, _mesa_error(ctx, GL_INVALID_VALUE, "glProgramLocalParameters4fvEXT(index + count)"); return; } - prog = &(ctx->FragmentProgram.Current->Base); + dest = ctx->FragmentProgram.Current->Base.LocalParams[index]; } else if (target == GL_VERTEX_PROGRAM_ARB && ctx->Extensions.ARB_vertex_program) { @@ -753,18 +780,14 @@ _mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count, _mesa_error(ctx, GL_INVALID_VALUE, "glProgramLocalParameters4fvEXT(index + count)"); return; } - prog = &(ctx->VertexProgram.Current->Base); + dest = ctx->VertexProgram.Current->Base.LocalParams[index]; } else { _mesa_error(ctx, GL_INVALID_ENUM, "glProgramLocalParameters4fvEXT(target)"); return; } - for (i = 0; i < count; i++) { - ASSERT((index + i) < MAX_PROGRAM_LOCAL_PARAMS); - COPY_4V(prog->LocalParams[index + i], params); - params += 4; - } + memcpy(dest, params, count * 4 * sizeof(GLfloat)); } @@ -887,7 +910,7 @@ _mesa_GetProgramivARB(GLenum target, GLenum pname, GLint *params) switch (pname) { case GL_PROGRAM_LENGTH_ARB: *params - = prog->String ? (GLint) _mesa_strlen((char *) prog->String) : 0; + = prog->String ? (GLint) strlen((char *) prog->String) : 0; return; case GL_PROGRAM_FORMAT_ARB: *params = prog->Format; @@ -1068,7 +1091,7 @@ _mesa_GetProgramStringARB(GLenum target, GLenum pname, GLvoid *string) } if (prog->String) - _mesa_memcpy(dst, prog->String, _mesa_strlen((char *) prog->String)); + memcpy(dst, prog->String, strlen((char *) prog->String)); else *dst = '\0'; } diff --git a/mesalib/src/mesa/shader/atifragshader.c b/mesalib/src/mesa/shader/atifragshader.c index ac087d415..870f77e30 100644 --- a/mesalib/src/mesa/shader/atifragshader.c +++ b/mesalib/src/mesa/shader/atifragshader.c @@ -60,11 +60,11 @@ _mesa_delete_ati_fragment_shader(GLcontext *ctx, struct ati_fragment_shader *s) GLuint i; for (i = 0; i < MAX_NUM_PASSES_ATI; i++) { if (s->Instructions[i]) - _mesa_free(s->Instructions[i]); + free(s->Instructions[i]); if (s->SetupInst[i]) - _mesa_free(s->SetupInst[i]); + free(s->SetupInst[i]); } - _mesa_free(s); + free(s); } @@ -96,27 +96,27 @@ create_dst_mod_str(GLuint mod) { static char ret_str[1024]; - _mesa_memset(ret_str, 0, 1024); + memset(ret_str, 0, 1024); if (mod & GL_2X_BIT_ATI) - _mesa_strncat(ret_str, "|2X", 1024); + strncat(ret_str, "|2X", 1024); if (mod & GL_4X_BIT_ATI) - _mesa_strncat(ret_str, "|4X", 1024); + strncat(ret_str, "|4X", 1024); if (mod & GL_8X_BIT_ATI) - _mesa_strncat(ret_str, "|8X", 1024); + strncat(ret_str, "|8X", 1024); if (mod & GL_HALF_BIT_ATI) - _mesa_strncat(ret_str, "|HA", 1024); + strncat(ret_str, "|HA", 1024); if (mod & GL_QUARTER_BIT_ATI) - _mesa_strncat(ret_str, "|QU", 1024); + strncat(ret_str, "|QU", 1024); if (mod & GL_EIGHTH_BIT_ATI) - _mesa_strncat(ret_str, "|EI", 1024); + strncat(ret_str, "|EI", 1024); if (mod & GL_SATURATE_BIT_ATI) - _mesa_strncat(ret_str, "|SAT", 1024); + strncat(ret_str, "|SAT", 1024); - if (_mesa_strlen(ret_str) == 0) - _mesa_strncat(ret_str, "NONE", 1024); + if (strlen(ret_str) == 0) + strncat(ret_str, "NONE", 1024); return ret_str; } @@ -290,9 +290,11 @@ _mesa_DeleteFragmentShaderATI(GLuint id) /* The ID is immediately available for re-use now */ _mesa_HashRemove(ctx->Shared->ATIShaders, id); - prog->RefCount--; - if (prog->RefCount <= 0) { - _mesa_free(prog); + if (prog) { + prog->RefCount--; + if (prog->RefCount <= 0) { + free(prog); + } } } } @@ -316,9 +318,9 @@ _mesa_BeginFragmentShaderATI(void) /* no idea if it's allowed to redefine a shader */ for (i = 0; i < MAX_NUM_PASSES_ATI; i++) { if (ctx->ATIFragmentShader.Current->Instructions[i]) - _mesa_free(ctx->ATIFragmentShader.Current->Instructions[i]); + free(ctx->ATIFragmentShader.Current->Instructions[i]); if (ctx->ATIFragmentShader.Current->SetupInst[i]) - _mesa_free(ctx->ATIFragmentShader.Current->SetupInst[i]); + free(ctx->ATIFragmentShader.Current->SetupInst[i]); } /* malloc the instructions here - not sure if the best place but its @@ -326,11 +328,11 @@ _mesa_BeginFragmentShaderATI(void) for (i = 0; i < MAX_NUM_PASSES_ATI; i++) { ctx->ATIFragmentShader.Current->Instructions[i] = (struct atifs_instruction *) - _mesa_calloc(sizeof(struct atifs_instruction) * + calloc(1, sizeof(struct atifs_instruction) * (MAX_NUM_INSTRUCTIONS_PER_PASS_ATI)); ctx->ATIFragmentShader.Current->SetupInst[i] = (struct atifs_setupinst *) - _mesa_calloc(sizeof(struct atifs_setupinst) * + calloc(1, sizeof(struct atifs_setupinst) * (MAX_NUM_FRAGMENT_REGISTERS_ATI)); } @@ -376,8 +378,11 @@ _mesa_EndFragmentShaderATI(void) } if (ctx->ATIFragmentShader.Current->cur_pass > 1) ctx->ATIFragmentShader.Current->NumPasses = 2; - else ctx->ATIFragmentShader.Current->NumPasses = 1; - ctx->ATIFragmentShader.Current->cur_pass=0; + else + ctx->ATIFragmentShader.Current->NumPasses = 1; + + ctx->ATIFragmentShader.Current->cur_pass = 0; + #if MESA_DEBUG_ATI_FS for (j = 0; j < MAX_NUM_PASSES_ATI; j++) { for (i = 0; i < MAX_NUM_FRAGMENT_REGISTERS_ATI; i++) { @@ -400,8 +405,13 @@ _mesa_EndFragmentShaderATI(void) } } #endif - if (ctx->Driver.ProgramStringNotify) - ctx->Driver.ProgramStringNotify( ctx, GL_FRAGMENT_SHADER_ATI, NULL ); + + if (!ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_SHADER_ATI, NULL)) { + ctx->ATIFragmentShader.Current->isValid = GL_FALSE; + /* XXX is this the right error? */ + _mesa_error(ctx, GL_INVALID_OPERATION, + "glEndFragmentShaderATI(driver rejected shader)"); + } } void GLAPIENTRY diff --git a/mesalib/src/mesa/shader/descrip.mms b/mesalib/src/mesa/shader/descrip.mms index 19bafd483..59730020d 100644 --- a/mesalib/src/mesa/shader/descrip.mms +++ b/mesalib/src/mesa/shader/descrip.mms @@ -16,7 +16,7 @@ VPATH = RCS -INCDIR = [---.include],[.grammar],[-.main],[-.glapi],[.slang] +INCDIR = [---.include],[-.main],[-.glapi],[.slang] LIBDIR = [---.lib] CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1,"__extension__=")/name=(as_is,short)/float=ieee/ieee=denorm @@ -64,8 +64,6 @@ all : $(MMS)$(MMSQUALIFIERS) $(LIBDIR)$(GL_LIB) set def [.slang] $(MMS)$(MMSQUALIFIERS) - set def [-.grammar] - $(MMS)$(MMSQUALIFIERS) set def [-] # Make the library diff --git a/mesalib/src/mesa/shader/grammar/grammar.c b/mesalib/src/mesa/shader/grammar/grammar.c deleted file mode 100644 index a9775961d..000000000 --- a/mesalib/src/mesa/shader/grammar/grammar.c +++ /dev/null @@ -1,3178 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/** - * \file grammar.c - * syntax parsing engine - * \author Michal Krol - */ - -#ifndef GRAMMAR_PORT_BUILD -#error Do not build this file directly, build your grammar_XXX.c instead, which includes this file -#endif - -/* -*/ - -/* - INTRODUCTION - ------------ - - The task is to check the syntax of an input string. Input string is a stream of ASCII - characters terminated with a null-character ('\0'). Checking it using C language is - difficult and hard to implement without bugs. It is hard to maintain and make changes when - the syntax changes. - - This is because of a high redundancy of the C code. Large blocks of code are duplicated with - only small changes. Even use of macros does not solve the problem because macros cannot - erase the complexity of the problem. - - The resolution is to create a new language that will be highly oriented to our task. Once - we describe a particular syntax, we are done. We can then focus on the code that implements - the language. The size and complexity of it is relatively small than the code that directly - checks the syntax. - - First, we must implement our new language. Here, the language is implemented in C, but it - could also be implemented in any other language. The code is listed below. We must take - a good care that it is bug free. This is simple because the code is simple and clean. - - Next, we must describe the syntax of our new language in itself. Once created and checked - manually that it is correct, we can use it to check another scripts. - - Note that our new language loading code does not have to check the syntax. It is because we - assume that the script describing itself is correct, and other scripts can be syntactically - checked by the former script. The loading code must only do semantic checking which leads us to - simple resolving references. - - THE LANGUAGE - ------------ - - Here I will describe the syntax of the new language (further called "Synek"). It is mainly a - sequence of declarations terminated by a semicolon. The declaration consists of a symbol, - which is an identifier, and its definition. A definition is in turn a sequence of specifiers - connected with ".and" or ".or" operator. These operators cannot be mixed together in a one - definition. Specifier can be a symbol, string, character, character range or a special - keyword ".true" or ".false". - - On the very beginning of the script there is a declaration of a root symbol and is in the form: - .syntax ; - The must be on of the symbols in declaration sequence. The syntax is correct if - the root symbol evaluates to true. A symbol evaluates to true if the definition associated with - the symbol evaluates to true. Definition evaluation depends on the operator used to connect - specifiers in the definition. If ".and" operator is used, definition evaluates to true if and - only if all the specifiers evaluate to true. If ".or" operator is used, definition evalutes to - true if any of the specifiers evaluates to true. If definition contains only one specifier, - it is evaluated as if it was connected with ".true" keyword by ".and" operator. - - If specifier is a ".true" keyword, it always evaluates to true. - - If specifier is a ".false" keyword, it always evaluates to false. Specifier evaluates to false - when it does not evaluate to true. - - Character range specifier is in the form: - '' - '' - If specifier is a character range, it evaluates to true if character in the stream is greater - or equal to and less or equal to . In that situation - the stream pointer is advanced to point to next character in the stream. All C-style escape - sequences are supported although trigraph sequences are not. The comparisions are performed - on 8-bit unsigned integers. - - Character specifier is in the form: - '' - It evaluates to true if the following character range specifier evaluates to true: - '' - '' - - String specifier is in the form: - "" - Let N be the number of characters in . Let [i] designate i-th character in - . Then the string specifier evaluates to true if and only if for i in the range [0, N) - the following character specifier evaluates to true: - '[i]' - If [i] is a quotation mark, '[i]' is replaced with '\[i]'. - - Symbol specifier can be optionally preceded by a ".loop" keyword in the form: - .loop (1) - where is defined as follows: - ; (2) - Construction (1) is replaced by the following code: - - and declaration (2) is replaced by the following: - .or .true; - .and ; - ; - - Synek supports also a register mechanizm. User can, in its SYN file, declare a number of - registers that can be accessed in the syn body. Each reg has its name and a default value. - The register is one byte wide. The C code can change the default value by calling - grammar_set_reg8() with grammar id, register name and a new value. As we know, each rule is - a sequence of specifiers joined with .and or .or operator. And now each specifier can be - prefixed with a condition expression in a form ".if ( )" - where can be == or !=. If the condition evaluates to false, the specifier - evaluates to .false. Otherwise it evalutes to the specifier. - - ESCAPE SEQUENCES - ---------------- - - Synek supports all escape sequences in character specifiers. The mapping table is listed below. - All occurences of the characters in the first column are replaced with the corresponding - character in the second column. - - Escape sequence Represents - ------------------------------------------------------------------------------------------------ - \a Bell (alert) - \b Backspace - \f Formfeed - \n New line - \r Carriage return - \t Horizontal tab - \v Vertical tab - \' Single quotation mark - \" Double quotation mark - \\ Backslash - \? Literal question mark - \ooo ASCII character in octal notation - \xhhh ASCII character in hexadecimal notation - ------------------------------------------------------------------------------------------------ - - RAISING ERRORS - -------------- - - Any specifier can be followed by a special construction that is executed when the specifier - evaluates to false. The construction is in the form: - .error - is an identifier declared earlier by error text declaration. The declaration is - in the form: - .errtext "" - When specifier evaluates to false and this construction is present, parsing is stopped - immediately and is returned as a result of parsing. The error position is also - returned and it is meant as an offset from the beggining of the stream to the character that - was valid so far. Example: - - (**** syntax script ****) - - .syntax program; - .errtext MISSING_SEMICOLON "missing ';'" - program declaration .and .loop space .and ';' .error MISSING_SEMICOLON .and - .loop space .and '\0'; - declaration "declare" .and .loop space .and identifier; - space ' '; - - (**** sample code ****) - - declare foo , - - In the example above checking the sample code will result in error message "missing ';'" and - error position 12. The sample code is not correct. Note the presence of '\0' specifier to - assure that there is no code after semicolon - only spaces. - can optionally contain identifier surrounded by dollar signs $. In such a case, - the identifier and dollar signs are replaced by a string retrieved by invoking symbol with - the identifier name. The starting position is the error position. The lenght of the resulting - string is the position after invoking the symbol. - - PRODUCTION - ---------- - - Synek not only checks the syntax but it can also produce (emit) bytes associated with specifiers - that evaluate to true. That is, every specifier and optional error construction can be followed - by a number of emit constructions that are in the form: - .emit - can be a HEX number, identifier, a star * or a dollar $. HEX number is preceded by - 0x or 0X. If is an identifier, it must be earlier declared by emit code declaration - in the form: - .emtcode - - When given specifier evaluates to true, all emits associated with the specifier are output - in order they were declared. A star means that last-read character should be output instead - of constant value. Example: - - (**** syntax script ****) - - .syntax foobar; - .emtcode WORD_FOO 0x01 - .emtcode WORD_BAR 0x02 - foobar FOO .emit WORD_FOO .or BAR .emit WORD_BAR .or .true .emit 0x00; - FOO "foo" .and SPACE; - BAR "bar" .and SPACE; - SPACE ' ' .or '\0'; - - (**** sample text 1 ****) - - foo - - (**** sample text 2 ****) - - foobar - - For both samples the result will be one-element array. For first sample text it will be - value 1, for second - 0. Note that every text will be accepted because of presence of - .true as an alternative. - - Another example: - - (**** syntax script ****) - - .syntax declaration; - .emtcode VARIABLE 0x01 - declaration "declare" .and .loop space .and - identifier .emit VARIABLE .and (1) - .true .emit 0x00 .and (2) - .loop space .and ';'; - space ' ' .or '\t'; - identifier .loop id_char .emit *; (3) - id_char 'a'-'z' .or 'A'-'Z' .or '_'; - - (**** sample code ****) - - declare fubar; - - In specifier (1) symbol is followed by .emit VARIABLE. If it evaluates to - true, VARIABLE constant and then production of the symbol is output. Specifier (2) is used - to terminate the string with null to signal when the string ends. Specifier (3) outputs - all characters that make declared identifier. The result of sample code will be the - following array: - { 1, 'f', 'u', 'b', 'a', 'r', 0 } - - If .emit is followed by dollar $, it means that current position should be output. Current - position is a 32-bit unsigned integer distance from the very beginning of the parsed string to - first character consumed by the specifier associated with the .emit instruction. Current - position is stored in the output buffer in Little-Endian convention (the lowest byte comes - first). -*/ - -#include - -static void mem_free (void **); - -/* - internal error messages -*/ -static const byte *OUT_OF_MEMORY = (byte *) "internal error 1001: out of physical memory"; -static const byte *UNRESOLVED_REFERENCE = (byte *) "internal error 1002: unresolved reference '$'"; -static const byte *INVALID_GRAMMAR_ID = (byte *) "internal error 1003: invalid grammar object"; -static const byte *INVALID_REGISTER_NAME = (byte *) "internal error 1004: invalid register name: '$'"; -/*static const byte *DUPLICATE_IDENTIFIER = (byte *) "internal error 1005: identifier '$' already defined";*/ -static const byte *UNREFERENCED_IDENTIFIER =(byte *) "internal error 1006: unreferenced identifier '$'"; - -static const byte *error_message = NULL; /* points to one of the error messages above */ -static byte *error_param = NULL; /* this is inserted into error_message in place of $ */ -static int error_position = -1; - -static byte *unknown = (byte *) "???"; - -static void clear_last_error (void) -{ - /* reset error message */ - error_message = NULL; - - /* free error parameter - if error_param is a "???" don't free it - it's static */ - if (error_param != unknown) - mem_free ((void **) (void *) &error_param); - else - error_param = NULL; - - /* reset error position */ - error_position = -1; -} - -static void set_last_error (const byte *msg, byte *param, int pos) -{ - /* error message can be set only once */ - if (error_message != NULL) - { - mem_free ((void **) (void *) ¶m); - return; - } - - error_message = msg; - - /* if param is NULL, set error_param to unknown ("???") */ - /* note: do not try to strdup the "???" - it may be that we are here because of */ - /* out of memory error so strdup can fail */ - if (param != NULL) - error_param = param; - else - error_param = unknown; - - error_position = pos; -} - -/* - memory management routines -*/ -static void *mem_alloc (size_t size) -{ - void *ptr = grammar_alloc_malloc (size); - if (ptr == NULL) - set_last_error (OUT_OF_MEMORY, NULL, -1); - return ptr; -} - -static void *mem_copy (void *dst, const void *src, size_t size) -{ - return grammar_memory_copy (dst, src, size); -} - -static void mem_free (void **ptr) -{ - grammar_alloc_free (*ptr); - *ptr = NULL; -} - -static void *mem_realloc (void *ptr, size_t old_size, size_t new_size) -{ - void *ptr2 = grammar_alloc_realloc (ptr, old_size, new_size); - if (ptr2 == NULL) - set_last_error (OUT_OF_MEMORY, NULL, -1); - return ptr2; -} - -static byte *str_copy_n (byte *dst, const byte *src, size_t max_len) -{ - return grammar_string_copy_n (dst, src, max_len); -} - -static byte *str_duplicate (const byte *str) -{ - byte *new_str = grammar_string_duplicate (str); - if (new_str == NULL) - set_last_error (OUT_OF_MEMORY, NULL, -1); - return new_str; -} - -static int str_equal (const byte *str1, const byte *str2) -{ - return grammar_string_compare (str1, str2) == 0; -} - -static int str_equal_n (const byte *str1, const byte *str2, unsigned int n) -{ - return grammar_string_compare_n (str1, str2, n) == 0; -} - -static int -str_length (const byte *str) -{ - return (int) (grammar_string_length (str)); -} - -/* - useful macros -*/ -#define GRAMMAR_IMPLEMENT_LIST_APPEND(_Ty)\ - static void _Ty##_append (_Ty **x, _Ty *nx) {\ - while (*x) x = &(**x).next;\ - *x = nx;\ - } - -/* - string to byte map typedef -*/ -typedef struct map_byte_ -{ - byte *key; - byte data; - struct map_byte_ *next; -} map_byte; - -static void map_byte_create (map_byte **ma) -{ - *ma = (map_byte *) mem_alloc (sizeof (map_byte)); - if (*ma) - { - (**ma).key = NULL; - (**ma).data = '\0'; - (**ma).next = NULL; - } -} - -static void map_byte_destroy (map_byte **ma) -{ - if (*ma) - { - map_byte_destroy (&(**ma).next); - mem_free ((void **) &(**ma).key); - mem_free ((void **) ma); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(map_byte) - -/* - searches the map for the specified key, - returns pointer to the element with the specified key if it exists - returns NULL otherwise -*/ -static map_byte *map_byte_locate (map_byte **ma, const byte *key) -{ - while (*ma) - { - if (str_equal ((**ma).key, key)) - return *ma; - - ma = &(**ma).next; - } - - set_last_error (UNRESOLVED_REFERENCE, str_duplicate (key), -1); - return NULL; -} - -/* - searches the map for specified key, - if the key is matched, *data is filled with data associated with the key, - returns 0 if the key is matched, - returns 1 otherwise -*/ -static int map_byte_find (map_byte **ma, const byte *key, byte *data) -{ - map_byte *found = map_byte_locate (ma, key); - if (found != NULL) - { - *data = found->data; - - return 0; - } - - return 1; -} - -/* - regbyte context typedef - - Each regbyte consists of its name and a default value. These are static and created at - grammar script compile-time, for example the following line: - .regbyte vertex_blend 0x00 - adds a new regbyte named "vertex_blend" to the static list and initializes it to 0. - When the script is executed, this regbyte can be accessed by name for read and write. When a - particular regbyte is written, a new regbyte_ctx entry is added to the top of the regbyte_ctx - stack. The new entry contains information abot which regbyte it references and its new value. - When a given regbyte is accessed for read, the stack is searched top-down to find an - entry that references the regbyte. The first matching entry is used to return the current - value it holds. If no entry is found, the default value is returned. -*/ -typedef struct regbyte_ctx_ -{ - map_byte *m_regbyte; - byte m_current_value; - struct regbyte_ctx_ *m_prev; -} regbyte_ctx; - -static void regbyte_ctx_create (regbyte_ctx **re) -{ - *re = (regbyte_ctx *) mem_alloc (sizeof (regbyte_ctx)); - if (*re) - { - (**re).m_regbyte = NULL; - (**re).m_prev = NULL; - } -} - -static void regbyte_ctx_destroy (regbyte_ctx **re) -{ - if (*re) - { - mem_free ((void **) re); - } -} - -static byte regbyte_ctx_extract (regbyte_ctx **re, map_byte *reg) -{ - /* first lookup in the register stack */ - while (*re != NULL) - { - if ((**re).m_regbyte == reg) - return (**re).m_current_value; - - re = &(**re).m_prev; - } - - /* if not found - return the default value */ - return reg->data; -} - -/* - emit type typedef -*/ -typedef enum emit_type_ -{ - et_byte, /* explicit number */ - et_stream, /* eaten character */ - et_position /* current position */ -} emit_type; - -/* - emit destination typedef -*/ -typedef enum emit_dest_ -{ - ed_output, /* write to the output buffer */ - ed_regbyte /* write a particular regbyte */ -} emit_dest; - -/* - emit typedef -*/ -typedef struct emit_ -{ - emit_dest m_emit_dest; - emit_type m_emit_type; /* ed_output */ - byte m_byte; /* et_byte */ - map_byte *m_regbyte; /* ed_regbyte */ - byte *m_regname; /* ed_regbyte - temporary */ - struct emit_ *m_next; -} emit; - -static void emit_create (emit **em) -{ - *em = (emit *) mem_alloc (sizeof (emit)); - if (*em) - { - (**em).m_emit_dest = ed_output; - (**em).m_emit_type = et_byte; - (**em).m_byte = '\0'; - (**em).m_regbyte = NULL; - (**em).m_regname = NULL; - (**em).m_next = NULL; - } -} - -static void emit_destroy (emit **em) -{ - if (*em) - { - emit_destroy (&(**em).m_next); - mem_free ((void **) &(**em).m_regname); - mem_free ((void **) em); - } -} - -static unsigned int emit_size (emit *_E) -{ - unsigned int n = 0; - - while (_E != NULL) - { - if (_E->m_emit_dest == ed_output) - { - if (_E->m_emit_type == et_position) - n += 4; /* position is a 32-bit unsigned integer */ - else - n++; - } - _E = _E->m_next; - } - - return n; -} - -static int emit_push (emit *_E, byte *_P, byte c, unsigned int _Pos, regbyte_ctx **_Ctx) -{ - while (_E != NULL) - { - if (_E->m_emit_dest == ed_output) - { - if (_E->m_emit_type == et_byte) - *_P++ = _E->m_byte; - else if (_E->m_emit_type == et_stream) - *_P++ = c; - else /* _Em->type == et_position */ - { - *_P++ = (byte) (_Pos); - *_P++ = (byte) (_Pos >> 8); - *_P++ = (byte) (_Pos >> 16); - *_P++ = (byte) (_Pos >> 24); - } - } - else - { - regbyte_ctx *new_rbc; - regbyte_ctx_create (&new_rbc); - if (new_rbc == NULL) - return 1; - - new_rbc->m_prev = *_Ctx; - new_rbc->m_regbyte = _E->m_regbyte; - *_Ctx = new_rbc; - - if (_E->m_emit_type == et_byte) - new_rbc->m_current_value = _E->m_byte; - else if (_E->m_emit_type == et_stream) - new_rbc->m_current_value = c; - } - - _E = _E->m_next; - } - - return 0; -} - -/* - error typedef -*/ -typedef struct error_ -{ - byte *m_text; - byte *m_token_name; - struct rule_ *m_token; -} error; - -static void error_create (error **er) -{ - *er = (error *) mem_alloc (sizeof (error)); - if (*er) - { - (**er).m_text = NULL; - (**er).m_token_name = NULL; - (**er).m_token = NULL; - } -} - -static void error_destroy (error **er) -{ - if (*er) - { - mem_free ((void **) &(**er).m_text); - mem_free ((void **) &(**er).m_token_name); - mem_free ((void **) er); - } -} - -struct dict_; - -static byte * -error_get_token (error *, struct dict_ *, const byte *, int); - -/* - condition operand type typedef -*/ -typedef enum cond_oper_type_ -{ - cot_byte, /* constant 8-bit unsigned integer */ - cot_regbyte /* pointer to byte register containing the current value */ -} cond_oper_type; - -/* - condition operand typedef -*/ -typedef struct cond_oper_ -{ - cond_oper_type m_type; - byte m_byte; /* cot_byte */ - map_byte *m_regbyte; /* cot_regbyte */ - byte *m_regname; /* cot_regbyte - temporary */ -} cond_oper; - -/* - condition type typedef -*/ -typedef enum cond_type_ -{ - ct_equal, - ct_not_equal -} cond_type; - -/* - condition typedef -*/ -typedef struct cond_ -{ - cond_type m_type; - cond_oper m_operands[2]; -} cond; - -static void cond_create (cond **co) -{ - *co = (cond *) mem_alloc (sizeof (cond)); - if (*co) - { - (**co).m_operands[0].m_regname = NULL; - (**co).m_operands[1].m_regname = NULL; - } -} - -static void cond_destroy (cond **co) -{ - if (*co) - { - mem_free ((void **) &(**co).m_operands[0].m_regname); - mem_free ((void **) &(**co).m_operands[1].m_regname); - mem_free ((void **) co); - } -} - -/* - specifier type typedef -*/ -typedef enum spec_type_ -{ - st_false, - st_true, - st_byte, - st_byte_range, - st_string, - st_identifier, - st_identifier_loop, - st_debug -} spec_type; - -/* - specifier typedef -*/ -typedef struct spec_ -{ - spec_type m_spec_type; - byte m_byte[2]; /* st_byte, st_byte_range */ - byte *m_string; /* st_string */ - struct rule_ *m_rule; /* st_identifier, st_identifier_loop */ - emit *m_emits; - error *m_errtext; - cond *m_cond; - struct spec_ *next; -} spec; - -static void spec_create (spec **sp) -{ - *sp = (spec *) mem_alloc (sizeof (spec)); - if (*sp) - { - (**sp).m_spec_type = st_false; - (**sp).m_byte[0] = '\0'; - (**sp).m_byte[1] = '\0'; - (**sp).m_string = NULL; - (**sp).m_rule = NULL; - (**sp).m_emits = NULL; - (**sp).m_errtext = NULL; - (**sp).m_cond = NULL; - (**sp).next = NULL; - } -} - -static void spec_destroy (spec **sp) -{ - if (*sp) - { - spec_destroy (&(**sp).next); - emit_destroy (&(**sp).m_emits); - error_destroy (&(**sp).m_errtext); - mem_free ((void **) &(**sp).m_string); - cond_destroy (&(**sp).m_cond); - mem_free ((void **) sp); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(spec) - -/* - operator typedef -*/ -typedef enum oper_ -{ - op_none, - op_and, - op_or -} oper; - -/* - rule typedef -*/ -typedef struct rule_ -{ - oper m_oper; - spec *m_specs; - struct rule_ *next; - int m_referenced; -} rule; - -static void rule_create (rule **ru) -{ - *ru = (rule *) mem_alloc (sizeof (rule)); - if (*ru) - { - (**ru).m_oper = op_none; - (**ru).m_specs = NULL; - (**ru).next = NULL; - (**ru).m_referenced = 0; - } -} - -static void rule_destroy (rule **ru) -{ - if (*ru) - { - rule_destroy (&(**ru).next); - spec_destroy (&(**ru).m_specs); - mem_free ((void **) ru); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(rule) - -/* - returns unique grammar id -*/ -static grammar next_valid_grammar_id (void) -{ - static grammar id = 0; - - return ++id; -} - -/* - dictionary typedef -*/ -typedef struct dict_ -{ - rule *m_rulez; - rule *m_syntax; - rule *m_string; - map_byte *m_regbytes; - grammar m_id; - struct dict_ *next; -} dict; - -static void dict_create (dict **di) -{ - *di = (dict *) mem_alloc (sizeof (dict)); - if (*di) - { - (**di).m_rulez = NULL; - (**di).m_syntax = NULL; - (**di).m_string = NULL; - (**di).m_regbytes = NULL; - (**di).m_id = next_valid_grammar_id (); - (**di).next = NULL; - } -} - -static void dict_destroy (dict **di) -{ - if (*di) - { - rule_destroy (&(**di).m_rulez); - map_byte_destroy (&(**di).m_regbytes); - mem_free ((void **) di); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(dict) - -static void dict_find (dict **di, grammar key, dict **data) -{ - while (*di) - { - if ((**di).m_id == key) - { - *data = *di; - return; - } - - di = &(**di).next; - } - - *data = NULL; -} - -static dict *g_dicts = NULL; - -/* - byte array typedef -*/ -typedef struct barray_ -{ - byte *data; - unsigned int len; -} barray; - -static void barray_create (barray **ba) -{ - *ba = (barray *) mem_alloc (sizeof (barray)); - if (*ba) - { - (**ba).data = NULL; - (**ba).len = 0; - } -} - -static void barray_destroy (barray **ba) -{ - if (*ba) - { - mem_free ((void **) &(**ba).data); - mem_free ((void **) ba); - } -} - -/* - reallocates byte array to requested size, - returns 0 on success, - returns 1 otherwise -*/ -static int barray_resize (barray **ba, unsigned int nlen) -{ - byte *new_pointer; - - if (nlen == 0) - { - mem_free ((void **) &(**ba).data); - (**ba).data = NULL; - (**ba).len = 0; - - return 0; - } - else - { - new_pointer = (byte *) mem_realloc ((**ba).data, (**ba).len * sizeof (byte), - nlen * sizeof (byte)); - if (new_pointer) - { - (**ba).data = new_pointer; - (**ba).len = nlen; - - return 0; - } - } - - return 1; -} - -/* - adds byte array pointed by *nb to the end of array pointed by *ba, - returns 0 on success, - returns 1 otherwise -*/ -static int barray_append (barray **ba, barray **nb) -{ - const unsigned int len = (**ba).len; - - if (barray_resize (ba, (**ba).len + (**nb).len)) - return 1; - - mem_copy ((**ba).data + len, (**nb).data, (**nb).len); - - return 0; -} - -/* - adds emit chain pointed by em to the end of array pointed by *ba, - returns 0 on success, - returns 1 otherwise -*/ -static int barray_push (barray **ba, emit *em, byte c, unsigned int pos, regbyte_ctx **rbc) -{ - unsigned int count = emit_size (em); - - if (barray_resize (ba, (**ba).len + count)) - return 1; - - return emit_push (em, (**ba).data + ((**ba).len - count), c, pos, rbc); -} - -/* - byte pool typedef -*/ -typedef struct bytepool_ -{ - byte *_F; - unsigned int _Siz; -} bytepool; - -static void bytepool_destroy (bytepool **by) -{ - if (*by != NULL) - { - mem_free ((void **) &(**by)._F); - mem_free ((void **) by); - } -} - -static void bytepool_create (bytepool **by, int len) -{ - *by = (bytepool *) (mem_alloc (sizeof (bytepool))); - if (*by != NULL) - { - (**by)._F = (byte *) (mem_alloc (sizeof (byte) * len)); - (**by)._Siz = len; - - if ((**by)._F == NULL) - bytepool_destroy (by); - } -} - -static int bytepool_reserve (bytepool *by, unsigned int n) -{ - byte *_P; - - if (n <= by->_Siz) - return 0; - - /* byte pool can only grow and at least by doubling its size */ - n = n >= by->_Siz * 2 ? n : by->_Siz * 2; - - /* reallocate the memory and adjust pointers to the new memory location */ - _P = (byte *) (mem_realloc (by->_F, sizeof (byte) * by->_Siz, sizeof (byte) * n)); - if (_P != NULL) - { - by->_F = _P; - by->_Siz = n; - return 0; - } - - return 1; -} - -/* - string to string map typedef -*/ -typedef struct map_str_ -{ - byte *key; - byte *data; - struct map_str_ *next; -} map_str; - -static void map_str_create (map_str **ma) -{ - *ma = (map_str *) mem_alloc (sizeof (map_str)); - if (*ma) - { - (**ma).key = NULL; - (**ma).data = NULL; - (**ma).next = NULL; - } -} - -static void map_str_destroy (map_str **ma) -{ - if (*ma) - { - map_str_destroy (&(**ma).next); - mem_free ((void **) &(**ma).key); - mem_free ((void **) &(**ma).data); - mem_free ((void **) ma); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(map_str) - -/* - searches the map for specified key, - if the key is matched, *data is filled with data associated with the key, - returns 0 if the key is matched, - returns 1 otherwise -*/ -static int map_str_find (map_str **ma, const byte *key, byte **data) -{ - while (*ma) - { - if (str_equal ((**ma).key, key)) - { - *data = str_duplicate ((**ma).data); - if (*data == NULL) - return 1; - - return 0; - } - - ma = &(**ma).next; - } - - set_last_error (UNRESOLVED_REFERENCE, str_duplicate (key), -1); - return 1; -} - -/* - string to rule map typedef -*/ -typedef struct map_rule_ -{ - byte *key; - rule *data; - struct map_rule_ *next; -} map_rule; - -static void map_rule_create (map_rule **ma) -{ - *ma = (map_rule *) mem_alloc (sizeof (map_rule)); - if (*ma) - { - (**ma).key = NULL; - (**ma).data = NULL; - (**ma).next = NULL; - } -} - -static void map_rule_destroy (map_rule **ma) -{ - if (*ma) - { - map_rule_destroy (&(**ma).next); - mem_free ((void **) &(**ma).key); - mem_free ((void **) ma); - } -} - -GRAMMAR_IMPLEMENT_LIST_APPEND(map_rule) - -/* - searches the map for specified key, - if the key is matched, *data is filled with data associated with the key, - returns 0 if the is matched, - returns 1 otherwise -*/ -static int map_rule_find (map_rule **ma, const byte *key, rule **data) -{ - while (*ma) - { - if (str_equal ((**ma).key, key)) - { - *data = (**ma).data; - - return 0; - } - - ma = &(**ma).next; - } - - set_last_error (UNRESOLVED_REFERENCE, str_duplicate (key), -1); - return 1; -} - -/* - returns 1 if given character is a white space, - returns 0 otherwise -*/ -static int is_space (byte c) -{ - return c == ' ' || c == '\t' || c == '\n' || c == '\r'; -} - -/* - advances text pointer by 1 if character pointed by *text is a space, - returns 1 if a space has been eaten, - returns 0 otherwise -*/ -static int eat_space (const byte **text) -{ - if (is_space (**text)) - { - (*text)++; - - return 1; - } - - return 0; -} - -/* - returns 1 if text points to C-style comment start string, - returns 0 otherwise -*/ -static int is_comment_start (const byte *text) -{ - return text[0] == '/' && text[1] == '*'; -} - -/* - advances text pointer to first character after C-style comment block - if any, - returns 1 if C-style comment block has been encountered and eaten, - returns 0 otherwise -*/ -static int eat_comment (const byte **text) -{ - if (is_comment_start (*text)) - { - /* *text points to comment block - skip two characters to enter comment body */ - *text += 2; - /* skip any character except consecutive '*' and '/' */ - while (!((*text)[0] == '*' && (*text)[1] == '/')) - (*text)++; - /* skip those two terminating characters */ - *text += 2; - - return 1; - } - - return 0; -} - -/* - advances text pointer to first character that is neither space nor C-style comment block -*/ -static void eat_spaces (const byte **text) -{ - while (eat_space (text) || eat_comment (text)) - ; -} - -/* - resizes string pointed by *ptr to successfully add character c to the end of the string, - returns 0 on success, - returns 1 otherwise -*/ -static int string_grow (byte **ptr, unsigned int *len, byte c) -{ - /* reallocate the string in 16-byte increments */ - if ((*len & 0x0F) == 0x0F || *ptr == NULL) - { - byte *tmp = (byte *) mem_realloc (*ptr, ((*len + 1) & ~0x0F) * sizeof (byte), - ((*len + 1 + 0x10) & ~0x0F) * sizeof (byte)); - if (tmp == NULL) - return 1; - - *ptr = tmp; - } - - if (c) - { - /* append given character */ - (*ptr)[*len] = c; - (*len)++; - } - (*ptr)[*len] = '\0'; - - return 0; -} - -/* - returns 1 if given character is a valid identifier character a-z, A-Z, 0-9 or _ - returns 0 otherwise -*/ -static int is_identifier (byte c) -{ - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_'; -} - -/* - copies characters from *text to *id until non-identifier character is encountered, - assumes that *id points to NULL object - caller is responsible for later freeing the string, - text pointer is advanced to point past the copied identifier, - returns 0 if identifier was successfully copied, - returns 1 otherwise -*/ -static int get_identifier (const byte **text, byte **id) -{ - const byte *t = *text; - byte *p = NULL; - unsigned int len = 0; - - if (string_grow (&p, &len, '\0')) - return 1; - - /* loop while next character in buffer is valid for identifiers */ - while (is_identifier (*t)) - { - if (string_grow (&p, &len, *t++)) - { - mem_free ((void **) (void *) &p); - return 1; - } - } - - *text = t; - *id = p; - - return 0; -} - -/* - converts sequence of DEC digits pointed by *text until non-DEC digit is encountered, - advances text pointer past the converted sequence, - returns the converted value -*/ -static unsigned int dec_convert (const byte **text) -{ - unsigned int value = 0; - - while (**text >= '0' && **text <= '9') - { - value = value * 10 + **text - '0'; - (*text)++; - } - - return value; -} - -/* - returns 1 if given character is HEX digit 0-9, A-F or a-f, - returns 0 otherwise -*/ -static int is_hex (byte c) -{ - return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); -} - -/* - returns value of passed character as if it was HEX digit -*/ -static unsigned int hex2dec (byte c) -{ - if (c >= '0' && c <= '9') - return c - '0'; - if (c >= 'A' && c <= 'F') - return c - 'A' + 10; - return c - 'a' + 10; -} - -/* - converts sequence of HEX digits pointed by *text until non-HEX digit is encountered, - advances text pointer past the converted sequence, - returns the converted value -*/ -static unsigned int hex_convert (const byte **text) -{ - unsigned int value = 0; - - while (is_hex (**text)) - { - value = value * 0x10 + hex2dec (**text); - (*text)++; - } - - return value; -} - -/* - returns 1 if given character is OCT digit 0-7, - returns 0 otherwise -*/ -static int is_oct (byte c) -{ - return c >= '0' && c <= '7'; -} - -/* - returns value of passed character as if it was OCT digit -*/ -static int oct2dec (byte c) -{ - return c - '0'; -} - -static byte get_escape_sequence (const byte **text) -{ - int value = 0; - - /* skip '\' character */ - (*text)++; - - switch (*(*text)++) - { - case '\'': - return '\''; - case '"': - return '\"'; - case '?': - return '\?'; - case '\\': - return '\\'; - case 'a': - return '\a'; - case 'b': - return '\b'; - case 'f': - return '\f'; - case 'n': - return '\n'; - case 'r': - return '\r'; - case 't': - return '\t'; - case 'v': - return '\v'; - case 'x': - return (byte) hex_convert (text); - } - - (*text)--; - if (is_oct (**text)) - { - value = oct2dec (*(*text)++); - if (is_oct (**text)) - { - value = value * 010 + oct2dec (*(*text)++); - if (is_oct (**text)) - value = value * 010 + oct2dec (*(*text)++); - } - } - - return (byte) value; -} - -/* - copies characters from *text to *str until " or ' character is encountered, - assumes that *str points to NULL object - caller is responsible for later freeing the string, - assumes that *text points to " or ' character that starts the string, - text pointer is advanced to point past the " or ' character, - returns 0 if string was successfully copied, - returns 1 otherwise -*/ -static int get_string (const byte **text, byte **str) -{ - const byte *t = *text; - byte *p = NULL; - unsigned int len = 0; - byte term_char; - - if (string_grow (&p, &len, '\0')) - return 1; - - /* read " or ' character that starts the string */ - term_char = *t++; - /* while next character is not the terminating character */ - while (*t && *t != term_char) - { - byte c; - - if (*t == '\\') - c = get_escape_sequence (&t); - else - c = *t++; - - if (string_grow (&p, &len, c)) - { - mem_free ((void **) (void *) &p); - return 1; - } - } - /* skip " or ' character that ends the string */ - t++; - - *text = t; - *str = p; - return 0; -} - -/* - gets emit code, the syntax is: - ".emtcode" " " " " (("0x" | "0X") ) | | - assumes that *text already points to , - returns 0 if emit code is successfully read, - returns 1 otherwise -*/ -static int get_emtcode (const byte **text, map_byte **ma) -{ - const byte *t = *text; - map_byte *m = NULL; - - map_byte_create (&m); - if (m == NULL) - return 1; - - if (get_identifier (&t, &m->key)) - { - map_byte_destroy (&m); - return 1; - } - eat_spaces (&t); - - if (*t == '\'') - { - byte *c; - - if (get_string (&t, &c)) - { - map_byte_destroy (&m); - return 1; - } - - m->data = (byte) c[0]; - mem_free ((void **) (void *) &c); - } - else if (t[0] == '0' && (t[1] == 'x' || t[1] == 'X')) - { - /* skip HEX "0x" or "0X" prefix */ - t += 2; - m->data = (byte) hex_convert (&t); - } - else - { - m->data = (byte) dec_convert (&t); - } - - eat_spaces (&t); - - *text = t; - *ma = m; - return 0; -} - -/* - gets regbyte declaration, the syntax is: - ".regbyte" " " " " (("0x" | "0X") ) | | - assumes that *text already points to , - returns 0 if regbyte is successfully read, - returns 1 otherwise -*/ -static int get_regbyte (const byte **text, map_byte **ma) -{ - /* pass it to the emtcode parser as it has the same syntax starting at */ - return get_emtcode (text, ma); -} - -/* - returns 0 on success, - returns 1 otherwise -*/ -static int get_errtext (const byte **text, map_str **ma) -{ - const byte *t = *text; - map_str *m = NULL; - - map_str_create (&m); - if (m == NULL) - return 1; - - if (get_identifier (&t, &m->key)) - { - map_str_destroy (&m); - return 1; - } - eat_spaces (&t); - - if (get_string (&t, &m->data)) - { - map_str_destroy (&m); - return 1; - } - eat_spaces (&t); - - *text = t; - *ma = m; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int get_error (const byte **text, error **er, map_str *maps) -{ - const byte *t = *text; - byte *temp = NULL; - - if (*t != '.') - return 0; - - t++; - if (get_identifier (&t, &temp)) - return 1; - eat_spaces (&t); - - if (!str_equal ((byte *) "error", temp)) - { - mem_free ((void **) (void *) &temp); - return 0; - } - - mem_free ((void **) (void *) &temp); - - error_create (er); - if (*er == NULL) - return 1; - - if (*t == '\"') - { - if (get_string (&t, &(**er).m_text)) - { - error_destroy (er); - return 1; - } - eat_spaces (&t); - } - else - { - if (get_identifier (&t, &temp)) - { - error_destroy (er); - return 1; - } - eat_spaces (&t); - - if (map_str_find (&maps, temp, &(**er).m_text)) - { - mem_free ((void **) (void *) &temp); - error_destroy (er); - return 1; - } - - mem_free ((void **) (void *) &temp); - } - - /* try to extract "token" from "...$token$..." */ - { - byte *processed = NULL; - unsigned int len = 0; - int i = 0; - - if (string_grow (&processed, &len, '\0')) - { - error_destroy (er); - return 1; - } - - while (i < str_length ((**er).m_text)) - { - /* check if the dollar sign is repeated - if so skip it */ - if ((**er).m_text[i] == '$' && (**er).m_text[i + 1] == '$') - { - if (string_grow (&processed, &len, '$')) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - i += 2; - } - else if ((**er).m_text[i] != '$') - { - if (string_grow (&processed, &len, (**er).m_text[i])) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - i++; - } - else - { - if (string_grow (&processed, &len, '$')) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - { - /* length of token being extracted */ - unsigned int tlen = 0; - - if (string_grow (&(**er).m_token_name, &tlen, '\0')) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - /* skip the dollar sign */ - i++; - - while ((**er).m_text[i] != '$') - { - if (string_grow (&(**er).m_token_name, &tlen, (**er).m_text[i])) - { - mem_free ((void **) (void *) &processed); - error_destroy (er); - return 1; - } - - i++; - } - - /* skip the dollar sign */ - i++; - } - } - } - - mem_free ((void **) &(**er).m_text); - (**er).m_text = processed; - } - - *text = t; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int get_emits (const byte **text, emit **em, map_byte *mapb) -{ - const byte *t = *text; - byte *temp = NULL; - emit *e = NULL; - emit_dest dest; - - if (*t != '.') - return 0; - - t++; - if (get_identifier (&t, &temp)) - return 1; - eat_spaces (&t); - - /* .emit */ - if (str_equal ((byte *) "emit", temp)) - dest = ed_output; - /* .load */ - else if (str_equal ((byte *) "load", temp)) - dest = ed_regbyte; - else - { - mem_free ((void **) (void *) &temp); - return 0; - } - - mem_free ((void **) (void *) &temp); - - emit_create (&e); - if (e == NULL) - return 1; - - e->m_emit_dest = dest; - - if (dest == ed_regbyte) - { - if (get_identifier (&t, &e->m_regname)) - { - emit_destroy (&e); - return 1; - } - eat_spaces (&t); - } - - /* 0xNN */ - if (*t == '0' && (t[1] == 'x' || t[1] == 'X')) - { - t += 2; - e->m_byte = (byte) hex_convert (&t); - - e->m_emit_type = et_byte; - } - /* NNN */ - else if (*t >= '0' && *t <= '9') - { - e->m_byte = (byte) dec_convert (&t); - - e->m_emit_type = et_byte; - } - /* * */ - else if (*t == '*') - { - t++; - - e->m_emit_type = et_stream; - } - /* $ */ - else if (*t == '$') - { - t++; - - e->m_emit_type = et_position; - } - /* 'c' */ - else if (*t == '\'') - { - if (get_string (&t, &temp)) - { - emit_destroy (&e); - return 1; - } - e->m_byte = (byte) temp[0]; - - mem_free ((void **) (void *) &temp); - - e->m_emit_type = et_byte; - } - else - { - if (get_identifier (&t, &temp)) - { - emit_destroy (&e); - return 1; - } - - if (map_byte_find (&mapb, temp, &e->m_byte)) - { - mem_free ((void **) (void *) &temp); - emit_destroy (&e); - return 1; - } - - mem_free ((void **) (void *) &temp); - - e->m_emit_type = et_byte; - } - - eat_spaces (&t); - - if (get_emits (&t, &e->m_next, mapb)) - { - emit_destroy (&e); - return 1; - } - - *text = t; - *em = e; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb) -{ - const byte *t = *text; - spec *s = NULL; - - spec_create (&s); - if (s == NULL) - return 1; - - /* first - read optional .if statement */ - if (*t == '.') - { - const byte *u = t; - byte *keyword = NULL; - - /* skip the dot */ - u++; - - if (get_identifier (&u, &keyword)) - { - spec_destroy (&s); - return 1; - } - - /* .if */ - if (str_equal ((byte *) "if", keyword)) - { - cond_create (&s->m_cond); - if (s->m_cond == NULL) - { - spec_destroy (&s); - return 1; - } - - /* skip the left paren */ - eat_spaces (&u); - u++; - - /* get the left operand */ - eat_spaces (&u); - if (get_identifier (&u, &s->m_cond->m_operands[0].m_regname)) - { - spec_destroy (&s); - return 1; - } - s->m_cond->m_operands[0].m_type = cot_regbyte; - - /* get the operator (!= or ==) */ - eat_spaces (&u); - if (*u == '!') - s->m_cond->m_type = ct_not_equal; - else - s->m_cond->m_type = ct_equal; - u += 2; - eat_spaces (&u); - - if (u[0] == '0' && (u[1] == 'x' || u[1] == 'X')) - { - /* skip the 0x prefix */ - u += 2; - - /* get the right operand */ - s->m_cond->m_operands[1].m_byte = hex_convert (&u); - s->m_cond->m_operands[1].m_type = cot_byte; - } - else /*if (*u >= '0' && *u <= '9')*/ - { - /* get the right operand */ - s->m_cond->m_operands[1].m_byte = dec_convert (&u); - s->m_cond->m_operands[1].m_type = cot_byte; - } - - /* skip the right paren */ - eat_spaces (&u); - u++; - - eat_spaces (&u); - - t = u; - } - - mem_free ((void **) (void *) &keyword); - } - - if (*t == '\'') - { - byte *temp = NULL; - - if (get_string (&t, &temp)) - { - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - if (*t == '-') - { - byte *temp2 = NULL; - - /* skip the '-' character */ - t++; - eat_spaces (&t); - - if (get_string (&t, &temp2)) - { - mem_free ((void **) (void *) &temp); - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - s->m_spec_type = st_byte_range; - s->m_byte[0] = *temp; - s->m_byte[1] = *temp2; - - mem_free ((void **) (void *) &temp2); - } - else - { - s->m_spec_type = st_byte; - *s->m_byte = *temp; - } - - mem_free ((void **) (void *) &temp); - } - else if (*t == '"') - { - if (get_string (&t, &s->m_string)) - { - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - s->m_spec_type = st_string; - } - else if (*t == '.') - { - byte *keyword = NULL; - - /* skip the dot */ - t++; - - if (get_identifier (&t, &keyword)) - { - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - /* .true */ - if (str_equal ((byte *) "true", keyword)) - { - s->m_spec_type = st_true; - } - /* .false */ - else if (str_equal ((byte *) "false", keyword)) - { - s->m_spec_type = st_false; - } - /* .debug */ - else if (str_equal ((byte *) "debug", keyword)) - { - s->m_spec_type = st_debug; - } - /* .loop */ - else if (str_equal ((byte *) "loop", keyword)) - { - if (get_identifier (&t, &s->m_string)) - { - mem_free ((void **) (void *) &keyword); - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - s->m_spec_type = st_identifier_loop; - } - mem_free ((void **) (void *) &keyword); - } - else - { - if (get_identifier (&t, &s->m_string)) - { - spec_destroy (&s); - return 1; - } - eat_spaces (&t); - - s->m_spec_type = st_identifier; - } - - if (get_error (&t, &s->m_errtext, maps)) - { - spec_destroy (&s); - return 1; - } - - if (get_emits (&t, &s->m_emits, mapb)) - { - spec_destroy (&s); - return 1; - } - - *text = t; - *sp = s; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int get_rule (const byte **text, rule **ru, map_str *maps, map_byte *mapb) -{ - const byte *t = *text; - rule *r = NULL; - - rule_create (&r); - if (r == NULL) - return 1; - - if (get_spec (&t, &r->m_specs, maps, mapb)) - { - rule_destroy (&r); - return 1; - } - - while (*t != ';') - { - byte *op = NULL; - spec *sp = NULL; - - /* skip the dot that precedes "and" or "or" */ - t++; - - /* read "and" or "or" keyword */ - if (get_identifier (&t, &op)) - { - rule_destroy (&r); - return 1; - } - eat_spaces (&t); - - if (r->m_oper == op_none) - { - /* .and */ - if (str_equal ((byte *) "and", op)) - r->m_oper = op_and; - /* .or */ - else - r->m_oper = op_or; - } - - mem_free ((void **) (void *) &op); - - if (get_spec (&t, &sp, maps, mapb)) - { - rule_destroy (&r); - return 1; - } - - spec_append (&r->m_specs, sp); - } - - /* skip the semicolon */ - t++; - eat_spaces (&t); - - *text = t; - *ru = r; - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int update_dependency (map_rule *mapr, byte *symbol, rule **ru) -{ - if (map_rule_find (&mapr, symbol, ru)) - return 1; - - (**ru).m_referenced = 1; - - return 0; -} - -/* - returns 0 on success, - returns 1 otherwise, -*/ -static int update_dependencies (dict *di, map_rule *mapr, byte **syntax_symbol, - byte **string_symbol, map_byte *regbytes) -{ - rule *rulez = di->m_rulez; - - /* update dependecies for the root and lexer symbols */ - if (update_dependency (mapr, *syntax_symbol, &di->m_syntax) || - (*string_symbol != NULL && update_dependency (mapr, *string_symbol, &di->m_string))) - return 1; - - mem_free ((void **) syntax_symbol); - mem_free ((void **) string_symbol); - - /* update dependecies for the rest of the rules */ - while (rulez) - { - spec *sp = rulez->m_specs; - - /* iterate through all the specifiers */ - while (sp) - { - /* update dependency for identifier */ - if (sp->m_spec_type == st_identifier || sp->m_spec_type == st_identifier_loop) - { - if (update_dependency (mapr, sp->m_string, &sp->m_rule)) - return 1; - - mem_free ((void **) &sp->m_string); - } - - /* some errtexts reference to a rule */ - if (sp->m_errtext && sp->m_errtext->m_token_name) - { - if (update_dependency (mapr, sp->m_errtext->m_token_name, &sp->m_errtext->m_token)) - return 1; - - mem_free ((void **) &sp->m_errtext->m_token_name); - } - - /* update dependency for condition */ - if (sp->m_cond) - { - int i; - for (i = 0; i < 2; i++) - if (sp->m_cond->m_operands[i].m_type == cot_regbyte) - { - sp->m_cond->m_operands[i].m_regbyte = map_byte_locate (®bytes, - sp->m_cond->m_operands[i].m_regname); - - if (sp->m_cond->m_operands[i].m_regbyte == NULL) - return 1; - - mem_free ((void **) &sp->m_cond->m_operands[i].m_regname); - } - } - - /* update dependency for all .load instructions */ - if (sp->m_emits) - { - emit *em = sp->m_emits; - while (em != NULL) - { - if (em->m_emit_dest == ed_regbyte) - { - em->m_regbyte = map_byte_locate (®bytes, em->m_regname); - - if (em->m_regbyte == NULL) - return 1; - - mem_free ((void **) &em->m_regname); - } - - em = em->m_next; - } - } - - sp = sp->next; - } - - rulez = rulez->next; - } - - /* check for unreferenced symbols */ - rulez = di->m_rulez; - while (rulez != NULL) - { - if (!rulez->m_referenced) - { - map_rule *ma = mapr; - while (ma) - { - if (ma->data == rulez) - { - set_last_error (UNREFERENCED_IDENTIFIER, str_duplicate (ma->key), -1); - return 1; - } - ma = ma->next; - } - } - rulez = rulez->next; - } - - return 0; -} - -static int satisfies_condition (cond *co, regbyte_ctx *ctx) -{ - byte values[2]; - int i; - - if (co == NULL) - return 1; - - for (i = 0; i < 2; i++) - switch (co->m_operands[i].m_type) - { - case cot_byte: - values[i] = co->m_operands[i].m_byte; - break; - case cot_regbyte: - values[i] = regbyte_ctx_extract (&ctx, co->m_operands[i].m_regbyte); - break; - } - - switch (co->m_type) - { - case ct_equal: - return values[0] == values[1]; - case ct_not_equal: - return values[0] != values[1]; - } - - return 0; -} - -static void free_regbyte_ctx_stack (regbyte_ctx *top, regbyte_ctx *limit) -{ - while (top != limit) - { - regbyte_ctx *rbc = top->m_prev; - regbyte_ctx_destroy (&top); - top = rbc; - } -} - -typedef enum match_result_ -{ - mr_not_matched, /* the examined string does not match */ - mr_matched, /* the examined string matches */ - mr_error_raised, /* mr_not_matched + error has been raised */ - mr_dont_emit, /* used by identifier loops only */ - mr_internal_error /* an internal error has occured such as out of memory */ -} match_result; - -/* - * This function does the main job. It parses the text and generates output data. - */ -static match_result -match (dict *di, const byte *text, int *index, rule *ru, barray **ba, int filtering_string, - regbyte_ctx **rbc) -{ - int ind = *index; - match_result status = mr_not_matched; - spec *sp = ru->m_specs; - regbyte_ctx *ctx = *rbc; - - /* for every specifier in the rule */ - while (sp) - { - int i, len, save_ind = ind; - barray *array = NULL; - - if (satisfies_condition (sp->m_cond, ctx)) - { - switch (sp->m_spec_type) - { - case st_identifier: - barray_create (&array); - if (array == NULL) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - status = match (di, text, &ind, sp->m_rule, &array, filtering_string, &ctx); - - if (status == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - break; - case st_string: - len = str_length (sp->m_string); - - /* prefilter the stream */ - if (!filtering_string && di->m_string) - { - barray *ba; - int filter_index = 0; - match_result result; - regbyte_ctx *null_ctx = NULL; - - barray_create (&ba); - if (ba == NULL) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - result = match (di, text + ind, &filter_index, di->m_string, &ba, 1, &null_ctx); - - if (result == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&ba); - return mr_internal_error; - } - - if (result != mr_matched) - { - barray_destroy (&ba); - status = mr_not_matched; - break; - } - - barray_destroy (&ba); - - if (filter_index != len || !str_equal_n (sp->m_string, text + ind, len)) - { - status = mr_not_matched; - break; - } - - status = mr_matched; - ind += len; - } - else - { - status = mr_matched; - for (i = 0; status == mr_matched && i < len; i++) - if (text[ind + i] != sp->m_string[i]) - status = mr_not_matched; - - if (status == mr_matched) - ind += len; - } - break; - case st_byte: - status = text[ind] == *sp->m_byte ? mr_matched : mr_not_matched; - if (status == mr_matched) - ind++; - break; - case st_byte_range: - status = (text[ind] >= sp->m_byte[0] && text[ind] <= sp->m_byte[1]) ? - mr_matched : mr_not_matched; - if (status == mr_matched) - ind++; - break; - case st_true: - status = mr_matched; - break; - case st_false: - status = mr_not_matched; - break; - case st_debug: - status = ru->m_oper == op_and ? mr_matched : mr_not_matched; - break; - case st_identifier_loop: - barray_create (&array); - if (array == NULL) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - status = mr_dont_emit; - for (;;) - { - match_result result; - - save_ind = ind; - result = match (di, text, &ind, sp->m_rule, &array, filtering_string, &ctx); - - if (result == mr_error_raised) - { - status = result; - break; - } - else if (result == mr_matched) - { - if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx) || - barray_append (ba, &array)) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - barray_destroy (&array); - barray_create (&array); - if (array == NULL) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - } - else if (result == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - else - break; - } - break; - } - } - else - { - status = mr_not_matched; - } - - if (status == mr_error_raised) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - - return mr_error_raised; - } - - if (ru->m_oper == op_and && status != mr_matched && status != mr_dont_emit) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - - if (sp->m_errtext) - { - set_last_error (sp->m_errtext->m_text, error_get_token (sp->m_errtext, di, text, - ind), ind); - - return mr_error_raised; - } - - return mr_not_matched; - } - - if (status == mr_matched) - { - if (sp->m_emits) - if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx)) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - - if (array) - if (barray_append (ba, &array)) - { - free_regbyte_ctx_stack (ctx, *rbc); - barray_destroy (&array); - return mr_internal_error; - } - } - - barray_destroy (&array); - - /* if the rule operator is a logical or, we pick up the first matching specifier */ - if (ru->m_oper == op_or && (status == mr_matched || status == mr_dont_emit)) - { - *index = ind; - *rbc = ctx; - return mr_matched; - } - - sp = sp->next; - } - - /* everything went fine - all specifiers match up */ - if (ru->m_oper == op_and && (status == mr_matched || status == mr_dont_emit)) - { - *index = ind; - *rbc = ctx; - return mr_matched; - } - - free_regbyte_ctx_stack (ctx, *rbc); - return mr_not_matched; -} - -static match_result -fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool *_BP, - int filtering_string, regbyte_ctx **rbc) -{ - int ind = *index; - int _P = filtering_string ? 0 : *_PP; - int _P2; - match_result status = mr_not_matched; - spec *sp = ru->m_specs; - regbyte_ctx *ctx = *rbc; - - /* for every specifier in the rule */ - while (sp) - { - int i, len, save_ind = ind; - - _P2 = _P + (sp->m_emits ? emit_size (sp->m_emits) : 0); - if (bytepool_reserve (_BP, _P2)) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - if (satisfies_condition (sp->m_cond, ctx)) - { - switch (sp->m_spec_type) - { - case st_identifier: - status = fast_match (di, text, &ind, sp->m_rule, &_P2, _BP, filtering_string, &ctx); - - if (status == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - break; - case st_string: - len = str_length (sp->m_string); - - /* prefilter the stream */ - if (!filtering_string && di->m_string) - { - int filter_index = 0; - match_result result; - regbyte_ctx *null_ctx = NULL; - - result = fast_match (di, text + ind, &filter_index, di->m_string, NULL, _BP, 1, &null_ctx); - - if (result == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - if (result != mr_matched) - { - status = mr_not_matched; - break; - } - - if (filter_index != len || !str_equal_n (sp->m_string, text + ind, len)) - { - status = mr_not_matched; - break; - } - - status = mr_matched; - ind += len; - } - else - { - status = mr_matched; - for (i = 0; status == mr_matched && i < len; i++) - if (text[ind + i] != sp->m_string[i]) - status = mr_not_matched; - - if (status == mr_matched) - ind += len; - } - break; - case st_byte: - status = text[ind] == *sp->m_byte ? mr_matched : mr_not_matched; - if (status == mr_matched) - ind++; - break; - case st_byte_range: - status = (text[ind] >= sp->m_byte[0] && text[ind] <= sp->m_byte[1]) ? - mr_matched : mr_not_matched; - if (status == mr_matched) - ind++; - break; - case st_true: - status = mr_matched; - break; - case st_false: - status = mr_not_matched; - break; - case st_debug: - status = ru->m_oper == op_and ? mr_matched : mr_not_matched; - break; - case st_identifier_loop: - status = mr_dont_emit; - for (;;) - { - match_result result; - - save_ind = ind; - result = fast_match (di, text, &ind, sp->m_rule, &_P2, _BP, filtering_string, &ctx); - - if (result == mr_error_raised) - { - status = result; - break; - } - else if (result == mr_matched) - { - if (!filtering_string) - { - if (sp->m_emits != NULL) - { - if (emit_push (sp->m_emits, _BP->_F + _P, text[ind - 1], save_ind, &ctx)) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - } - - _P = _P2; - _P2 += sp->m_emits ? emit_size (sp->m_emits) : 0; - if (bytepool_reserve (_BP, _P2)) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - } - } - else if (result == mr_internal_error) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - else - break; - } - break; - } - } - else - { - status = mr_not_matched; - } - - if (status == mr_error_raised) - { - free_regbyte_ctx_stack (ctx, *rbc); - - return mr_error_raised; - } - - if (ru->m_oper == op_and && status != mr_matched && status != mr_dont_emit) - { - free_regbyte_ctx_stack (ctx, *rbc); - - if (sp->m_errtext) - { - set_last_error (sp->m_errtext->m_text, error_get_token (sp->m_errtext, di, text, - ind), ind); - - return mr_error_raised; - } - - return mr_not_matched; - } - - if (status == mr_matched) - { - if (sp->m_emits != NULL) { - const byte ch = (ind <= 0) ? 0 : text[ind - 1]; - if (emit_push (sp->m_emits, _BP->_F + _P, ch, save_ind, &ctx)) - { - free_regbyte_ctx_stack (ctx, *rbc); - return mr_internal_error; - } - - } - _P = _P2; - } - - /* if the rule operator is a logical or, we pick up the first matching specifier */ - if (ru->m_oper == op_or && (status == mr_matched || status == mr_dont_emit)) - { - *index = ind; - *rbc = ctx; - if (!filtering_string) - *_PP = _P; - return mr_matched; - } - - sp = sp->next; - } - - /* everything went fine - all specifiers match up */ - if (ru->m_oper == op_and && (status == mr_matched || status == mr_dont_emit)) - { - *index = ind; - *rbc = ctx; - if (!filtering_string) - *_PP = _P; - return mr_matched; - } - - free_regbyte_ctx_stack (ctx, *rbc); - return mr_not_matched; -} - -static byte * -error_get_token (error *er, dict *di, const byte *text, int ind) -{ - byte *str = NULL; - - if (er->m_token) - { - barray *ba; - int filter_index = 0; - regbyte_ctx *ctx = NULL; - - barray_create (&ba); - if (ba != NULL) - { - if (match (di, text + ind, &filter_index, er->m_token, &ba, 0, &ctx) == mr_matched && - filter_index) - { - str = (byte *) mem_alloc (filter_index + 1); - if (str != NULL) - { - str_copy_n (str, text + ind, filter_index); - str[filter_index] = '\0'; - } - } - barray_destroy (&ba); - } - } - - return str; -} - -typedef struct grammar_load_state_ -{ - dict *di; - byte *syntax_symbol; - byte *string_symbol; - map_str *maps; - map_byte *mapb; - map_rule *mapr; -} grammar_load_state; - -static void grammar_load_state_create (grammar_load_state **gr) -{ - *gr = (grammar_load_state *) mem_alloc (sizeof (grammar_load_state)); - if (*gr) - { - (**gr).di = NULL; - (**gr).syntax_symbol = NULL; - (**gr).string_symbol = NULL; - (**gr).maps = NULL; - (**gr).mapb = NULL; - (**gr).mapr = NULL; - } -} - -static void grammar_load_state_destroy (grammar_load_state **gr) -{ - if (*gr) - { - dict_destroy (&(**gr).di); - mem_free ((void **) &(**gr).syntax_symbol); - mem_free ((void **) &(**gr).string_symbol); - map_str_destroy (&(**gr).maps); - map_byte_destroy (&(**gr).mapb); - map_rule_destroy (&(**gr).mapr); - mem_free ((void **) gr); - } -} - - -static void error_msg(int line, const char *msg) -{ - fprintf(stderr, "Error in grammar_load_from_text() at line %d: %s\n", line, msg); -} - - -/* - the API -*/ -grammar grammar_load_from_text (const byte *text) -{ - grammar_load_state *g = NULL; - grammar id = 0; - - clear_last_error (); - - grammar_load_state_create (&g); - if (g == NULL) { - error_msg(__LINE__, ""); - return 0; - } - - dict_create (&g->di); - if (g->di == NULL) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - eat_spaces (&text); - - /* skip ".syntax" keyword */ - text += 7; - eat_spaces (&text); - - /* retrieve root symbol */ - if (get_identifier (&text, &g->syntax_symbol)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - eat_spaces (&text); - - /* skip semicolon */ - text++; - eat_spaces (&text); - - while (*text) - { - byte *symbol = NULL; - int is_dot = *text == '.'; - - if (is_dot) - text++; - - if (get_identifier (&text, &symbol)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - eat_spaces (&text); - - /* .emtcode */ - if (is_dot && str_equal (symbol, (byte *) "emtcode")) - { - map_byte *ma = NULL; - - mem_free ((void **) (void *) &symbol); - - if (get_emtcode (&text, &ma)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - map_byte_append (&g->mapb, ma); - } - /* .regbyte */ - else if (is_dot && str_equal (symbol, (byte *) "regbyte")) - { - map_byte *ma = NULL; - - mem_free ((void **) (void *) &symbol); - - if (get_regbyte (&text, &ma)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - map_byte_append (&g->di->m_regbytes, ma); - } - /* .errtext */ - else if (is_dot && str_equal (symbol, (byte *) "errtext")) - { - map_str *ma = NULL; - - mem_free ((void **) (void *) &symbol); - - if (get_errtext (&text, &ma)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - map_str_append (&g->maps, ma); - } - /* .string */ - else if (is_dot && str_equal (symbol, (byte *) "string")) - { - mem_free ((void **) (void *) &symbol); - - if (g->di->m_string != NULL) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - if (get_identifier (&text, &g->string_symbol)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - /* skip semicolon */ - eat_spaces (&text); - text++; - eat_spaces (&text); - } - else - { - rule *ru = NULL; - map_rule *ma = NULL; - - if (get_rule (&text, &ru, g->maps, g->mapb)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - rule_append (&g->di->m_rulez, ru); - - /* if a rule consist of only one specifier, give it an ".and" operator */ - if (ru->m_oper == op_none) - ru->m_oper = op_and; - - map_rule_create (&ma); - if (ma == NULL) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, ""); - return 0; - } - - ma->key = symbol; - ma->data = ru; - map_rule_append (&g->mapr, ma); - } - } - - if (update_dependencies (g->di, g->mapr, &g->syntax_symbol, &g->string_symbol, - g->di->m_regbytes)) - { - grammar_load_state_destroy (&g); - error_msg(__LINE__, "update_dependencies() failed"); - return 0; - } - - dict_append (&g_dicts, g->di); - id = g->di->m_id; - g->di = NULL; - - grammar_load_state_destroy (&g); - - return id; -} - -int grammar_set_reg8 (grammar id, const byte *name, byte value) -{ - dict *di = NULL; - map_byte *reg = NULL; - - clear_last_error (); - - dict_find (&g_dicts, id, &di); - if (di == NULL) - { - set_last_error (INVALID_GRAMMAR_ID, NULL, -1); - return 0; - } - - reg = map_byte_locate (&di->m_regbytes, name); - if (reg == NULL) - { - set_last_error (INVALID_REGISTER_NAME, str_duplicate (name), -1); - return 0; - } - - reg->data = value; - return 1; -} - -/* - internal checking function used by both grammar_check and grammar_fast_check functions -*/ -static int _grammar_check (grammar id, const byte *text, byte **prod, unsigned int *size, - unsigned int estimate_prod_size, int use_fast_path) -{ - dict *di = NULL; - int index = 0; - - clear_last_error (); - - dict_find (&g_dicts, id, &di); - if (di == NULL) - { - set_last_error (INVALID_GRAMMAR_ID, NULL, -1); - return 0; - } - - *prod = NULL; - *size = 0; - - if (use_fast_path) - { - regbyte_ctx *rbc = NULL; - bytepool *bp = NULL; - int _P = 0; - - bytepool_create (&bp, estimate_prod_size); - if (bp == NULL) - return 0; - - if (fast_match (di, text, &index, di->m_syntax, &_P, bp, 0, &rbc) != mr_matched) - { - bytepool_destroy (&bp); - free_regbyte_ctx_stack (rbc, NULL); - return 0; - } - - free_regbyte_ctx_stack (rbc, NULL); - - *prod = bp->_F; - *size = _P; - bp->_F = NULL; - bytepool_destroy (&bp); - } - else - { - regbyte_ctx *rbc = NULL; - barray *ba = NULL; - - barray_create (&ba); - if (ba == NULL) - return 0; - - if (match (di, text, &index, di->m_syntax, &ba, 0, &rbc) != mr_matched) - { - barray_destroy (&ba); - free_regbyte_ctx_stack (rbc, NULL); - return 0; - } - - free_regbyte_ctx_stack (rbc, NULL); - - *prod = (byte *) mem_alloc (ba->len * sizeof (byte)); - if (*prod == NULL) - { - barray_destroy (&ba); - return 0; - } - - mem_copy (*prod, ba->data, ba->len * sizeof (byte)); - *size = ba->len; - barray_destroy (&ba); - } - - return 1; -} - -int grammar_check (grammar id, const byte *text, byte **prod, unsigned int *size) -{ - return _grammar_check (id, text, prod, size, 0, 0); -} - -int grammar_fast_check (grammar id, const byte *text, byte **prod, unsigned int *size, - unsigned int estimate_prod_size) -{ - return _grammar_check (id, text, prod, size, estimate_prod_size, 1); -} - -int grammar_destroy (grammar id) -{ - dict **di = &g_dicts; - - clear_last_error (); - - while (*di != NULL) - { - if ((**di).m_id == id) - { - dict *tmp = *di; - *di = (**di).next; - dict_destroy (&tmp); - return 1; - } - - di = &(**di).next; - } - - set_last_error (INVALID_GRAMMAR_ID, NULL, -1); - return 0; -} - -static void append_character (const char x, byte *text, int *dots_made, int *len, int size) -{ - if (*dots_made == 0) - { - if (*len < size - 1) - { - text[(*len)++] = x; - text[*len] = '\0'; - } - else - { - int i; - for (i = 0; i < 3; i++) - if (--(*len) >= 0) - text[*len] = '.'; - *dots_made = 1; - } - } -} - -void grammar_get_last_error (byte *text, unsigned int size, int *pos) -{ - int len = 0, dots_made = 0; - const byte *p = error_message; - - *text = '\0'; - - if (p) - { - while (*p) - { - if (*p == '$') - { - const byte *r = error_param; - - while (*r) - { - append_character (*r++, text, &dots_made, &len, (int) size); - } - - p++; - } - else - { - append_character (*p++, text, &dots_made, &len, size); - } - } - } - - *pos = error_position; -} diff --git a/mesalib/src/mesa/shader/grammar/grammar.h b/mesalib/src/mesa/shader/grammar/grammar.h deleted file mode 100644 index 591e38aef..000000000 --- a/mesalib/src/mesa/shader/grammar/grammar.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.2 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -#ifndef GRAMMAR_H -#define GRAMMAR_H - - -#ifndef GRAMMAR_PORT_INCLUDE -#error Do not include this file directly, include your grammar_XXX.h instead -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -void grammar_alloc_free (void *); -void *grammar_alloc_malloc (size_t); -void *grammar_alloc_realloc (void *, size_t, size_t); -void *grammar_memory_copy (void *, const void *, size_t); -int grammar_string_compare (const byte *, const byte *); -int grammar_string_compare_n (const byte *, const byte *, size_t); -byte *grammar_string_copy (byte *, const byte *); -byte *grammar_string_copy_n (byte *, const byte *, size_t); -byte *grammar_string_duplicate (const byte *); -unsigned int grammar_string_length (const byte *); - -/* - loads grammar script from null-terminated ASCII - returns unique grammar id to grammar object - returns 0 if an error occurs (call grammar_get_last_error to retrieve the error text) -*/ -grammar grammar_load_from_text (const byte *text); - -/* - sets a new to a register for grammar - returns 0 on error (call grammar_get_last_error to retrieve the error text) - returns 1 on success -*/ -int grammar_set_reg8 (grammar id, const byte *name, byte value); - -/* - this function is obsolete, use only for debugging purposes - - checks if a null-terminated matches given grammar - returns 0 on error (call grammar_get_last_error to retrieve the error text) - returns 1 on success, the points to newly allocated buffer with production and - is filled with the production size - call grammar_alloc_free to free the memory block pointed by -*/ -int grammar_check (grammar id, const byte *text, byte **prod, unsigned int *size); - -/* - does the same what grammar_check does but much more (approx. 4 times) faster - use this function instead of grammar_check - is a hint - the initial production buffer size will be of this size, - but if more room is needed it will be safely resized; set it to 0x1000 or so -*/ -int grammar_fast_check (grammar id, const byte *text, byte **prod, unsigned int *size, - unsigned int estimate_prod_size); - -/* - destroys grammar object identified by - returns 0 on error (call grammar_get_last_error to retrieve the error text) - returns 1 on success -*/ -int grammar_destroy (grammar id); - -/* - retrieves last grammar error reported either by grammar_load_from_text, grammar_check - or grammar_destroy - the user allocated buffer receives error description, points to error position, - is the size of the text buffer to fill in - it must be at least 4 bytes long, -*/ -void grammar_get_last_error (byte *text, unsigned int size, int *pos); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/mesalib/src/mesa/shader/grammar/grammar_crt.c b/mesalib/src/mesa/shader/grammar/grammar_crt.c deleted file mode 100644 index d2c95d1c8..000000000 --- a/mesalib/src/mesa/shader/grammar/grammar_crt.c +++ /dev/null @@ -1,64 +0,0 @@ -#include "grammar_crt.h" - -#define GRAMMAR_PORT_BUILD 1 -#include "grammar.c" -#undef GRAMMAR_PORT_BUILD - - -void grammar_alloc_free (void *ptr) -{ - free (ptr); -} - -void *grammar_alloc_malloc (size_t size) -{ - return malloc (size); -} - -void *grammar_alloc_realloc (void *ptr, size_t old_size, size_t size) -{ - return realloc (ptr, size); -} - -void *grammar_memory_copy (void *dst, const void * src, size_t size) -{ - return memcpy (dst, src, size); -} - -int grammar_string_compare (const byte *str1, const byte *str2) -{ - return strcmp ((const char *) str1, (const char *) str2); -} - -int grammar_string_compare_n (const byte *str1, const byte *str2, size_t n) -{ - return strncmp ((const char *) str1, (const char *) str2, n); -} - -byte *grammar_string_copy (byte *dst, const byte *src) -{ - return (byte *) strcpy ((char *) dst, (const char *) src); -} - -byte *grammar_string_copy_n (byte *dst, const byte *src, size_t n) -{ - return (byte *) strncpy ((char *) dst, (const char *) src, n); -} - -unsigned int grammar_string_length (const byte *str) -{ - return strlen ((const char *) str); -} - -byte *grammar_string_duplicate (const byte *src) -{ - const unsigned int size = grammar_string_length (src); - byte *str = grammar_alloc_malloc (size + 1); - if (str != NULL) - { - grammar_memory_copy (str, src, size); - str[size] = '\0'; - } - return str; -} - diff --git a/mesalib/src/mesa/shader/grammar/grammar_crt.h b/mesalib/src/mesa/shader/grammar/grammar_crt.h deleted file mode 100644 index 492711e96..000000000 --- a/mesalib/src/mesa/shader/grammar/grammar_crt.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef GRAMMAR_CRT_H -#define GRAMMAR_CRT_H - - -#include -#include -#include - - -typedef unsigned long grammar; -typedef unsigned char byte; - - -#define GRAMMAR_PORT_INCLUDE 1 -#include "grammar.h" -#undef GRAMMAR_PORT_INCLUDE - - -#endif - diff --git a/mesalib/src/mesa/shader/grammar/grammar_mesa.c b/mesalib/src/mesa/shader/grammar/grammar_mesa.c deleted file mode 100644 index eb962505b..000000000 --- a/mesalib/src/mesa/shader/grammar/grammar_mesa.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/** - * \file grammar_mesa.c - * mesa3d port to syntax parsing engine - * \author Michal Krol - */ - -#include "grammar_mesa.h" - -#define GRAMMAR_PORT_BUILD 1 -#include "grammar.c" -#undef GRAMMAR_PORT_BUILD - - -void grammar_alloc_free (void *ptr) -{ - _mesa_free (ptr); -} - -void *grammar_alloc_malloc (size_t size) -{ - return _mesa_malloc (size); -} - -void *grammar_alloc_realloc (void *ptr, size_t old_size, size_t size) -{ - return _mesa_realloc (ptr, old_size, size); -} - -void *grammar_memory_copy (void *dst, const void * src, size_t size) -{ - return _mesa_memcpy (dst, src, size); -} - -int grammar_string_compare (const byte *str1, const byte *str2) -{ - return _mesa_strcmp ((const char *) str1, (const char *) str2); -} - -int grammar_string_compare_n (const byte *str1, const byte *str2, size_t n) -{ - return _mesa_strncmp ((const char *) str1, (const char *) str2, n); -} - -byte *grammar_string_copy (byte *dst, const byte *src) -{ - return (byte *) _mesa_strcpy ((char *) dst, (const char *) src); -} - -byte *grammar_string_copy_n (byte *dst, const byte *src, size_t n) -{ - return (byte *) _mesa_strncpy ((char *) dst, (const char *) src, n); -} - -byte *grammar_string_duplicate (const byte *src) -{ - return (byte *) _mesa_strdup ((const char *) src); -} - -unsigned int grammar_string_length (const byte *str) -{ - return (unsigned int)_mesa_strlen ((const char *) str); -} - diff --git a/mesalib/src/mesa/shader/grammar/grammar_mesa.h b/mesalib/src/mesa/shader/grammar/grammar_mesa.h deleted file mode 100644 index 6c92c5812..000000000 --- a/mesalib/src/mesa/shader/grammar/grammar_mesa.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.1 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -#ifndef GRAMMAR_MESA_H -#define GRAMMAR_MESA_H - - -#include "main/imports.h" -/* NOTE: include Mesa 3-D specific headers here */ - - -typedef GLuint grammar; -typedef GLubyte byte; - - -#define GRAMMAR_PORT_INCLUDE 1 -#include "grammar.h" -#undef GRAMMAR_PORT_INCLUDE - - -#endif - diff --git a/mesalib/src/mesa/shader/grammar/grammar_syn.h b/mesalib/src/mesa/shader/grammar/grammar_syn.h deleted file mode 100644 index 840a1ab62..000000000 --- a/mesalib/src/mesa/shader/grammar/grammar_syn.h +++ /dev/null @@ -1,202 +0,0 @@ -".syntax grammar;\n" -".emtcode DECLARATION_END 0\n" -".emtcode DECLARATION_EMITCODE 1\n" -".emtcode DECLARATION_ERRORTEXT 2\n" -".emtcode DECLARATION_REGBYTE 3\n" -".emtcode DECLARATION_LEXER 4\n" -".emtcode DECLARATION_RULE 5\n" -".emtcode SPECIFIER_END 0\n" -".emtcode SPECIFIER_AND_TAG 1\n" -".emtcode SPECIFIER_OR_TAG 2\n" -".emtcode SPECIFIER_CHARACTER_RANGE 3\n" -".emtcode SPECIFIER_CHARACTER 4\n" -".emtcode SPECIFIER_STRING 5\n" -".emtcode SPECIFIER_IDENTIFIER 6\n" -".emtcode SPECIFIER_TRUE 7\n" -".emtcode SPECIFIER_FALSE 8\n" -".emtcode SPECIFIER_DEBUG 9\n" -".emtcode IDENTIFIER_SIMPLE 0\n" -".emtcode IDENTIFIER_LOOP 1\n" -".emtcode ERROR_NOT_PRESENT 0\n" -".emtcode ERROR_PRESENT 1\n" -".emtcode EMIT_NULL 0\n" -".emtcode EMIT_INTEGER 1\n" -".emtcode EMIT_IDENTIFIER 2\n" -".emtcode EMIT_CHARACTER 3\n" -".emtcode EMIT_LAST_CHARACTER 4\n" -".emtcode EMIT_CURRENT_POSITION 5\n" -".errtext INVALID_GRAMMAR \"internal error 2001: invalid grammar script\"\n" -".errtext SYNTAX_EXPECTED \"internal error 2002: '.syntax' keyword expected\"\n" -".errtext IDENTIFIER_EXPECTED \"internal error 2003: identifier expected\"\n" -".errtext MISSING_SEMICOLON \"internal error 2004: missing ';'\"\n" -".errtext INTEGER_EXPECTED \"internal error 2005: integer value expected\"\n" -".errtext STRING_EXPECTED \"internal error 2006: string expected\"\n" -"grammar\n" -" grammar_1 .error INVALID_GRAMMAR;\n" -"grammar_1\n" -" optional_space .and \".syntax\" .error SYNTAX_EXPECTED .and space .and identifier .and\n" -" semicolon .and declaration_list .and optional_space .and '\\0' .emit DECLARATION_END;\n" -"optional_space\n" -" space .or .true;\n" -"space\n" -" single_space .and .loop single_space;\n" -"single_space\n" -" white_char .or comment_block;\n" -"white_char\n" -" ' ' .or '\\t' .or '\\n' .or '\\r';\n" -"comment_block\n" -" '/' .and '*' .and comment_rest;\n" -"comment_rest\n" -" .loop comment_char_no_star .and comment_rest_1;\n" -"comment_rest_1\n" -" comment_end .or comment_rest_2;\n" -"comment_rest_2\n" -" '*' .and comment_rest;\n" -"comment_char_no_star\n" -" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n" -"comment_end\n" -" '*' .and '/';\n" -"identifier\n" -" identifier_ne .error IDENTIFIER_EXPECTED;\n" -"identifier_ne\n" -" first_idchar .emit * .and .loop follow_idchar .emit * .and .true .emit '\\0';\n" -"first_idchar\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"follow_idchar\n" -" first_idchar .or digit_dec;\n" -"digit_dec\n" -" '0'-'9';\n" -"semicolon\n" -" optional_space .and ';' .error MISSING_SEMICOLON .and optional_space;\n" -"declaration_list\n" -" declaration .and .loop declaration;\n" -"declaration\n" -" emitcode_definition .emit DECLARATION_EMITCODE .or\n" -" errortext_definition .emit DECLARATION_ERRORTEXT .or\n" -" regbyte_definition .emit DECLARATION_REGBYTE .or\n" -" lexer_definition .emit DECLARATION_LEXER .or\n" -" rule_definition .emit DECLARATION_RULE;\n" -"emitcode_definition\n" -" \".emtcode\" .and space .and identifier .and space .and integer .and space_or_null;\n" -"integer\n" -" integer_ne .error INTEGER_EXPECTED;\n" -"integer_ne\n" -" hex_integer .emit 0x10 .or dec_integer .emit 10;\n" -"hex_integer\n" -" hex_prefix .and digit_hex .emit * .and .loop digit_hex .emit * .and .true .emit '\\0';\n" -"hex_prefix\n" -" '0' .and hex_prefix_1;\n" -"hex_prefix_1\n" -" 'x' .or 'X';\n" -"digit_hex\n" -" '0'-'9' .or 'a'-'f' .or 'A'-'F';\n" -"dec_integer\n" -" digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" -"space_or_null\n" -" space .or '\\0';\n" -"errortext_definition\n" -" \".errtext\" .and space .and identifier .and space .and string .and space_or_null;\n" -"string\n" -" string_ne .error STRING_EXPECTED;\n" -"string_ne\n" -" '\"' .and .loop string_char_double_quotes .and '\"' .emit '\\0';\n" -"string_char_double_quotes\n" -" escape_sequence .or string_char .emit * .or '\\'' .emit *;\n" -"string_char\n" -" '\\x5D'-'\\xFF' .or '\\x28'-'\\x5B' .or '\\x23'-'\\x26' .or '\\x0E'-'\\x21' .or '\\x0B'-'\\x0C' .or\n" -" '\\x01'-'\\x09';\n" -"escape_sequence\n" -" '\\\\' .emit * .and escape_code;\n" -"escape_code\n" -" simple_escape_code .emit * .or hex_escape_code .or oct_escape_code;\n" -"simple_escape_code\n" -" '\\'' .or '\"' .or '?' .or '\\\\' .or 'a' .or 'b' .or 'f' .or 'n' .or 'r' .or 't' .or 'v';\n" -"hex_escape_code\n" -" 'x' .emit * .and digit_hex .emit * .and .loop digit_hex .emit *;\n" -"oct_escape_code\n" -" digit_oct .emit * .and optional_digit_oct .and optional_digit_oct;\n" -"digit_oct\n" -" '0'-'7';\n" -"optional_digit_oct\n" -" digit_oct .emit * .or .true;\n" -"regbyte_definition\n" -" \".regbyte\" .and space .and identifier .and space .and integer .and space_or_null;\n" -"lexer_definition\n" -" \".string\" .and space .and identifier .and semicolon;\n" -"rule_definition\n" -" identifier_ne .and space .and definition;\n" -"definition\n" -" specifier .and optional_specifiers_and_or .and semicolon .emit SPECIFIER_END;\n" -"optional_specifiers_and_or\n" -" and_specifiers .emit SPECIFIER_AND_TAG .or or_specifiers .emit SPECIFIER_OR_TAG .or .true;\n" -"specifier\n" -" specifier_condition .and optional_space .and specifier_rule;\n" -"specifier_condition\n" -" specifier_condition_1 .or .true;\n" -"specifier_condition_1\n" -" \".if\" .and optional_space .and '(' .and optional_space .and left_operand .and operator .and\n" -" right_operand .and optional_space .and ')';\n" -"left_operand\n" -" identifier;\n" -"operator\n" -" operator_1 .or operator_2;\n" -"operator_1\n" -" optional_space .and '!' .and '=' .and optional_space;\n" -"operator_2\n" -" optional_space .and '=' .and '=' .and optional_space;\n" -"right_operand\n" -" integer;\n" -"specifier_rule\n" -" specifier_rule_1 .and optional_error .and .loop emit .and .true .emit EMIT_NULL;\n" -"specifier_rule_1\n" -" character_range .emit SPECIFIER_CHARACTER_RANGE .or\n" -" character .emit SPECIFIER_CHARACTER .or\n" -" string_ne .emit SPECIFIER_STRING .or\n" -" \".true\" .emit SPECIFIER_TRUE .or\n" -" \".false\" .emit SPECIFIER_FALSE .or\n" -" \".debug\" .emit SPECIFIER_DEBUG .or\n" -" advanced_identifier .emit SPECIFIER_IDENTIFIER;\n" -"character\n" -" '\\'' .and string_char_single_quotes .and '\\'' .emit '\\0';\n" -"string_char_single_quotes\n" -" escape_sequence .or string_char .emit * .or '\"' .emit *;\n" -"character_range\n" -" character .and optional_space .and '-' .and optional_space .and character;\n" -"advanced_identifier\n" -" optional_loop .and identifier;\n" -"optional_loop\n" -" optional_loop_1 .emit IDENTIFIER_LOOP .or .true .emit IDENTIFIER_SIMPLE;\n" -"optional_loop_1\n" -" \".loop\" .and space;\n" -"optional_error\n" -" error .emit ERROR_PRESENT .or .true .emit ERROR_NOT_PRESENT;\n" -"error\n" -" space .and \".error\" .and space .and identifier;\n" -"emit\n" -" emit_output .or emit_regbyte;\n" -"emit_output\n" -" space .and \".emit\" .and space .and emit_param;\n" -"emit_param\n" -" integer_ne .emit EMIT_INTEGER .or\n" -" identifier_ne .emit EMIT_IDENTIFIER .or\n" -" character .emit EMIT_CHARACTER .or\n" -" '*' .emit EMIT_LAST_CHARACTER .or\n" -" '$' .emit EMIT_CURRENT_POSITION;\n" -"emit_regbyte\n" -" space .and \".load\" .and space .and identifier .and space .and emit_param;\n" -"and_specifiers\n" -" and_specifier .and .loop and_specifier;\n" -"or_specifiers\n" -" or_specifier .and .loop or_specifier;\n" -"and_specifier\n" -" space .and \".and\" .and space .and specifier;\n" -"or_specifier\n" -" space .and \".or\" .and space .and specifier;\n" -".string __string_filter;\n" -"__string_filter\n" -" __first_identifier_char .and .loop __next_identifier_char;\n" -"__first_identifier_char\n" -" 'a'-'z' .or 'A'-'Z' .or '_' .or '.';\n" -"__next_identifier_char\n" -" 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\n" -"" diff --git a/mesalib/src/mesa/shader/hash_table.c b/mesalib/src/mesa/shader/hash_table.c index e89a2564d..fa6ba2bfd 100644 --- a/mesalib/src/mesa/shader/hash_table.c +++ b/mesalib/src/mesa/shader/hash_table.c @@ -65,7 +65,7 @@ hash_table_ctor(unsigned num_buckets, hash_func_t hash, num_buckets = 16; } - ht = _mesa_malloc(sizeof(*ht) + ((num_buckets - 1) + ht = malloc(sizeof(*ht) + ((num_buckets - 1) * sizeof(ht->buckets[0]))); if (ht != NULL) { ht->hash = hash; @@ -85,7 +85,7 @@ void hash_table_dtor(struct hash_table *ht) { hash_table_clear(ht); - _mesa_free(ht); + free(ht); } @@ -100,7 +100,7 @@ hash_table_clear(struct hash_table *ht) for (i = 0; i < ht->num_buckets; i++) { foreach_s(node, temp, & ht->buckets[i]) { remove_from_list(node); - _mesa_free(node); + free(node); } assert(is_empty_list(& ht->buckets[i])); @@ -134,7 +134,7 @@ hash_table_insert(struct hash_table *ht, void *data, const void *key) const unsigned bucket = hash_value % ht->num_buckets; struct hash_node *node; - node = _mesa_calloc(sizeof(*node)); + node = calloc(1, sizeof(*node)); node->data = data; node->key = key; diff --git a/mesalib/src/mesa/shader/lex.yy.c b/mesalib/src/mesa/shader/lex.yy.c index 68543ae2e..4c5c644a6 100644 --- a/mesalib/src/mesa/shader/lex.yy.c +++ b/mesalib/src/mesa/shader/lex.yy.c @@ -53,6 +53,7 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -83,8 +84,6 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif -#endif /* ! C99 */ - #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -158,15 +157,7 @@ typedef void* yyscan_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else #define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -1043,12 +1034,12 @@ static yyconst flex_int16_t yy_chk[1368] = */ #include "main/glheader.h" #include "main/imports.h" -#include "prog_instruction.h" -#include "prog_statevars.h" +#include "shader/prog_instruction.h" +#include "shader/prog_statevars.h" -#include "symbol_table.h" -#include "program_parser.h" -#include "program_parse.tab.h" +#include "shader/symbol_table.h" +#include "shader/program_parser.h" +#include "shader/program_parse.tab.h" #define require_ARB_vp (yyextra->mode == ARB_vertex) #define require_ARB_fp (yyextra->mode == ARB_fragment) @@ -1161,7 +1152,7 @@ handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval) } while(0); #define YY_EXTRA_TYPE struct asm_parser_state * -#line 1165 "lex.yy.c" +#line 1156 "lex.yy.c" #define INITIAL 0 @@ -1298,12 +1289,7 @@ static int input (yyscan_t yyscanner ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else #define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -1311,7 +1297,7 @@ static int input (yyscan_t yyscanner ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -1322,7 +1308,7 @@ static int input (yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - size_t n; \ + unsigned n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -1410,7 +1396,7 @@ YY_DECL #line 157 "program_lexer.l" -#line 1414 "lex.yy.c" +#line 1400 "lex.yy.c" yylval = yylval_param; @@ -2212,7 +2198,7 @@ case 142: YY_RULE_SETUP #line 326 "program_lexer.l" { - yylval->real = _mesa_strtod(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return REAL; } YY_BREAK @@ -2224,7 +2210,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 330 "program_lexer.l" { - yylval->real = _mesa_strtod(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return REAL; } YY_BREAK @@ -2232,7 +2218,7 @@ case 144: YY_RULE_SETUP #line 334 "program_lexer.l" { - yylval->real = _mesa_strtod(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return REAL; } YY_BREAK @@ -2240,7 +2226,7 @@ case 145: YY_RULE_SETUP #line 338 "program_lexer.l" { - yylval->real = _mesa_strtod(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return REAL; } YY_BREAK @@ -2474,7 +2460,7 @@ YY_RULE_SETUP #line 481 "program_lexer.l" ECHO; YY_BREAK -#line 2478 "lex.yy.c" +#line 2464 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3242,8 +3228,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param yybytes the byte buffer to scan - * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ diff --git a/mesalib/src/mesa/shader/nvfragparse.c b/mesalib/src/mesa/shader/nvfragparse.c index b739a6aa0..0de3c5804 100644 --- a/mesalib/src/mesa/shader/nvfragparse.c +++ b/mesalib/src/mesa/shader/nvfragparse.c @@ -171,7 +171,7 @@ record_error(struct parse_state *parseState, const char *msg, int lineNo) _mesa_debug(parseState->ctx, "nvfragparse.c(%d): line %d, column %d:%s (%s)\n", lineNo, line, column, (char *) lineStr, msg); - _mesa_free((void *) lineStr); + free((void *) lineStr); #else (void) lineNo; #endif @@ -200,7 +200,7 @@ do { \ #define RETURN_ERROR2(msg1, msg2) \ do { \ char err[1000]; \ - _mesa_sprintf(err, "%s %s", msg1, msg2); \ + sprintf(err, "%s %s", msg1, msg2); \ record_error(parseState, err, __LINE__); \ return GL_FALSE; \ } while(0) @@ -224,7 +224,7 @@ MatchInstruction(const GLubyte *token) result.suffixes = 0; for (inst = Instructions; inst->name; inst++) { - if (_mesa_strncmp((const char *) token, inst->name, 3) == 0) { + if (strncmp((const char *) token, inst->name, 3) == 0) { /* matched! */ int i = 3; result = *inst; @@ -378,7 +378,7 @@ Peek_Token(struct parse_state *parseState, GLubyte *token) parseState->pos += (-i); return GL_FALSE; } - len = (GLint)_mesa_strlen((const char *) token); + len = (GLint) strlen((const char *) token); parseState->pos += (i - len); return GL_TRUE; } @@ -456,7 +456,7 @@ Parse_ScalarConstant(struct parse_state *parseState, GLfloat *number) { char *end = NULL; - *number = (GLfloat) _mesa_strtod((const char *) parseState->pos, &end); + *number = (GLfloat) _mesa_strtof((const char *) parseState->pos, &end); if (end && end > (char *) parseState->pos) { /* got a number */ @@ -580,7 +580,7 @@ Parse_TextureImageId(struct parse_state *parseState, imageSrc[2] != 'X') { RETURN_ERROR1("Expected TEX# source"); } - unit = _mesa_atoi((const char *) imageSrc + 3); + unit = atoi((const char *) imageSrc + 3); if ((unit < 0 || unit > MAX_TEXTURE_IMAGE_UNITS) || (unit == 0 && (imageSrc[3] != '0' || imageSrc[4] != 0))) { RETURN_ERROR1("Invalied TEX# source index"); @@ -642,7 +642,7 @@ Parse_SwizzleSuffix(const GLubyte *token, GLuint swizzle[4]) else { /* 4-component swizzle (vector) */ GLint k; - for (k = 0; token[k] && k < 4; k++) { + for (k = 0; k < 4 && token[k]; k++) { if (token[k] == 'x') swizzle[k] = 0; else if (token[k] == 'y') @@ -717,7 +717,7 @@ Parse_TempReg(struct parse_state *parseState, GLint *tempRegNum) RETURN_ERROR1("Expected R## or H##"); if (IsDigit(token[1])) { - GLint reg = _mesa_atoi((const char *) (token + 1)); + GLint reg = atoi((const char *) (token + 1)); if (token[0] == 'H') reg += 32; if (reg >= MAX_NV_FRAGMENT_PROGRAM_TEMPS) @@ -768,7 +768,7 @@ Parse_ProgramParamReg(struct parse_state *parseState, GLint *regNum) if (IsDigit(token[0])) { /* a numbered program parameter register */ - GLint reg = _mesa_atoi((const char *) token); + GLint reg = atoi((const char *) token); if (reg >= MAX_NV_FRAGMENT_PROGRAM_PARAMS) RETURN_ERROR1("Invalid constant program number"); *regNum = reg; @@ -802,7 +802,7 @@ Parse_FragReg(struct parse_state *parseState, GLint *tempRegNum) RETURN_ERROR; } for (j = 0; InputRegisters[j]; j++) { - if (_mesa_strcmp((const char *) token, InputRegisters[j]) == 0) { + if (strcmp((const char *) token, InputRegisters[j]) == 0) { *tempRegNum = j; parseState->inputsRead |= (1 << j); break; @@ -835,13 +835,13 @@ Parse_OutputReg(struct parse_state *parseState, GLint *outputRegNum) RETURN_ERROR; /* try to match an output register name */ - if (_mesa_strcmp((char *) token, "COLR") == 0 || - _mesa_strcmp((char *) token, "COLH") == 0) { + if (strcmp((char *) token, "COLR") == 0 || + strcmp((char *) token, "COLH") == 0) { /* note that we don't distinguish between COLR and COLH */ *outputRegNum = FRAG_RESULT_COLOR; parseState->outputsWritten |= (1 << FRAG_RESULT_COLOR); } - else if (_mesa_strcmp((char *) token, "DEPR") == 0) { + else if (strcmp((char *) token, "DEPR") == 0) { *outputRegNum = FRAG_RESULT_DEPTH; parseState->outputsWritten |= (1 << FRAG_RESULT_DEPTH); } @@ -868,8 +868,8 @@ Parse_MaskedDstReg(struct parse_state *parseState, if (!Peek_Token(parseState, token)) RETURN_ERROR; - if (_mesa_strcmp((const char *) token, "RC") == 0 || - _mesa_strcmp((const char *) token, "HC") == 0) { + if (strcmp((const char *) token, "RC") == 0 || + strcmp((const char *) token, "HC") == 0) { /* a write-only register */ dstReg->File = PROGRAM_WRITE_ONLY; if (!Parse_DummyReg(parseState, &idx)) @@ -1231,9 +1231,9 @@ Parse_PrintInstruction(struct parse_state *parseState, for (len = 0; str[len] != '\''; len++) /* find closing quote */ ; parseState->pos += len + 1; - msg = (GLubyte*) _mesa_malloc(len + 1); + msg = (GLubyte*) malloc(len + 1); - _mesa_memcpy(msg, str, len); + memcpy(msg, str, len); msg[len] = 0; inst->Data = msg; @@ -1479,11 +1479,11 @@ _mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum dstTarget, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); return; } - MEMCPY(programString, str, len); + memcpy(programString, str, len); programString[len] = 0; /* Get ready to parse */ - _mesa_bzero(&parseState, sizeof(struct parse_state)); + memset(&parseState, 0, sizeof(struct parse_state)); parseState.ctx = ctx; parseState.start = programString; parseState.program = program; @@ -1495,11 +1495,11 @@ _mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum dstTarget, _mesa_set_program_error(ctx, -1, NULL); /* check the program header */ - if (_mesa_strncmp((const char *) programString, "!!FP1.0", 7) == 0) { + if (strncmp((const char *) programString, "!!FP1.0", 7) == 0) { target = GL_FRAGMENT_PROGRAM_NV; parseState.pos = programString + 7; } - else if (_mesa_strncmp((const char *) programString, "!!FCP1.0", 8) == 0) { + else if (strncmp((const char *) programString, "!!FCP1.0", 8) == 0) { /* fragment / register combiner program - not supported */ _mesa_set_program_error(ctx, 0, "Invalid fragment program header"); _mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV(bad header)"); @@ -1548,7 +1548,7 @@ _mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum dstTarget, program->Base.String = programString; program->Base.Format = GL_PROGRAM_FORMAT_ASCII_ARB; if (program->Base.Instructions) { - _mesa_free(program->Base.Instructions); + free(program->Base.Instructions); } program->Base.Instructions = newInst; program->Base.NumInstructions = parseState.numInst; @@ -1566,9 +1566,9 @@ _mesa_parse_nv_fragment_program(GLcontext *ctx, GLenum dstTarget, #endif #ifdef DEBUG_foo - _mesa_printf("--- glLoadProgramNV(%d) result ---\n", program->Base.Id); + printf("--- glLoadProgramNV(%d) result ---\n", program->Base.Id); _mesa_fprint_program_opt(stdout, &program->Base, PROG_PRINT_NV, 0); - _mesa_printf("----------------------------------\n"); + printf("----------------------------------\n"); #endif } else { diff --git a/mesalib/src/mesa/shader/nvprogram.c b/mesalib/src/mesa/shader/nvprogram.c index fd6cbb0f4..19020be42 100644 --- a/mesalib/src/mesa/shader/nvprogram.c +++ b/mesalib/src/mesa/shader/nvprogram.c @@ -260,7 +260,7 @@ _mesa_GetProgramivNV(GLuint id, GLenum pname, GLint *params) *params = prog->Target; return; case GL_PROGRAM_LENGTH_NV: - *params = prog->String ?(GLint)_mesa_strlen((char *) prog->String) : 0; + *params = prog->String ?(GLint) strlen((char *) prog->String) : 0; return; case GL_PROGRAM_RESIDENT_NV: *params = prog->Resident; @@ -297,7 +297,7 @@ _mesa_GetProgramStringNV(GLuint id, GLenum pname, GLubyte *program) } if (prog->String) { - MEMCPY(program, prog->String, _mesa_strlen((char *) prog->String)); + memcpy(program, prog->String, strlen((char *) prog->String)); } else { program[0] = 0; @@ -515,7 +515,7 @@ _mesa_emit_nv_temp_initialization(GLcontext *ctx, struct gl_program *program) { struct prog_instruction *inst; - int i; + GLuint i; if (!ctx->Shader.EmitNVTempInitialization) return; @@ -559,7 +559,7 @@ _mesa_emit_nv_temp_initialization(GLcontext *ctx, void _mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program) { - int i; + GLuint i; program->NumTemporaries = 0; for (i = 0; i < program->NumInstructions; i++) { @@ -570,15 +570,15 @@ _mesa_setup_nv_temporary_count(GLcontext *ctx, struct gl_program *program) inst->DstReg.Index + 1); } if (inst->SrcReg[0].File == PROGRAM_TEMPORARY) { - program->NumTemporaries = MAX2(program->NumTemporaries, + program->NumTemporaries = MAX2((GLint)program->NumTemporaries, inst->SrcReg[0].Index + 1); } if (inst->SrcReg[1].File == PROGRAM_TEMPORARY) { - program->NumTemporaries = MAX2(program->NumTemporaries, + program->NumTemporaries = MAX2((GLint)program->NumTemporaries, inst->SrcReg[1].Index + 1); } if (inst->SrcReg[2].File == PROGRAM_TEMPORARY) { - program->NumTemporaries = MAX2(program->NumTemporaries, + program->NumTemporaries = MAX2((GLint)program->NumTemporaries, inst->SrcReg[2].Index + 1); } } diff --git a/mesalib/src/mesa/shader/nvvertparse.c b/mesalib/src/mesa/shader/nvvertparse.c index 857401605..631b315af 100644 --- a/mesalib/src/mesa/shader/nvvertparse.c +++ b/mesalib/src/mesa/shader/nvvertparse.c @@ -40,7 +40,6 @@ #include "main/glheader.h" #include "main/context.h" #include "main/imports.h" -#include "main/macros.h" #include "nvprogram.h" #include "nvvertparse.h" #include "prog_instruction.h" @@ -83,7 +82,7 @@ record_error(struct parse_state *parseState, const char *msg, int lineNo) _mesa_debug(parseState->ctx, "nvfragparse.c(%d): line %d, column %d:%s (%s)\n", lineNo, line, column, (char *) lineStr, msg); - _mesa_free((void *) lineStr); + free((void *) lineStr); #else (void) lineNo; #endif @@ -112,7 +111,7 @@ do { \ #define RETURN_ERROR2(msg1, msg2) \ do { \ char err[1000]; \ - _mesa_sprintf(err, "%s %s", msg1, msg2); \ + sprintf(err, "%s %s", msg1, msg2); \ record_error(parseState, err, __LINE__); \ return GL_FALSE; \ } while(0) @@ -233,7 +232,7 @@ Peek_Token(struct parse_state *parseState, GLubyte *token) parseState->pos += (-i); return GL_FALSE; } - len = (GLint)_mesa_strlen((const char *) token); + len = (GLint) strlen((const char *) token); parseState->pos += (i - len); return GL_TRUE; } @@ -310,7 +309,7 @@ Parse_TempReg(struct parse_state *parseState, GLint *tempRegNum) RETURN_ERROR1("Expected R##"); if (IsDigit(token[1])) { - GLint reg = _mesa_atoi((char *) (token + 1)); + GLint reg = atoi((char *) (token + 1)); if (reg >= MAX_NV_VERTEX_PROGRAM_TEMPS) RETURN_ERROR1("Bad temporary register name"); *tempRegNum = reg; @@ -364,7 +363,7 @@ Parse_AbsParamReg(struct parse_state *parseState, GLint *regNum) if (IsDigit(token[0])) { /* a numbered program parameter register */ - GLint reg = _mesa_atoi((char *) token); + GLint reg = atoi((char *) token); if (reg >= MAX_NV_VERTEX_PROGRAM_PARAMS) RETURN_ERROR1("Bad program parameter number"); *regNum = reg; @@ -398,13 +397,13 @@ Parse_ParamReg(struct parse_state *parseState, struct prog_src_register *srcReg) /* a numbered program parameter register */ GLint reg; (void) Parse_Token(parseState, token); - reg = _mesa_atoi((char *) token); + reg = atoi((char *) token); if (reg >= MAX_NV_VERTEX_PROGRAM_PARAMS) RETURN_ERROR1("Bad program parameter number"); srcReg->File = PROGRAM_ENV_PARAM; srcReg->Index = reg; } - else if (_mesa_strcmp((const char *) token, "A0") == 0) { + else if (strcmp((const char *) token, "A0") == 0) { /* address register "A0.x" */ if (!Parse_AddrReg(parseState)) RETURN_ERROR; @@ -424,7 +423,7 @@ Parse_ParamReg(struct parse_state *parseState, struct prog_src_register *srcReg) RETURN_ERROR; if (IsDigit(token[0])) { - const GLint k = _mesa_atoi((char *) token); + const GLint k = atoi((char *) token); if (sign == '-') { if (k > 64) RETURN_ERROR1("Bad address offset"); @@ -481,14 +480,14 @@ Parse_AttribReg(struct parse_state *parseState, GLint *tempRegNum) RETURN_ERROR1("Only v[0] accessible in vertex state programs"); if (IsDigit(token[0])) { - GLint reg = _mesa_atoi((char *) token); + GLint reg = atoi((char *) token); if (reg >= MAX_NV_VERTEX_PROGRAM_INPUTS) RETURN_ERROR1("Bad vertex attribute register name"); *tempRegNum = reg; } else { for (j = 0; InputRegisters[j]; j++) { - if (_mesa_strcmp((const char *) token, InputRegisters[j]) == 0) { + if (strcmp((const char *) token, InputRegisters[j]) == 0) { *tempRegNum = j; break; } @@ -532,7 +531,7 @@ Parse_OutputReg(struct parse_state *parseState, GLint *outputRegNum) /* try to match an output register name */ for (j = start; OutputRegisters[j]; j++) { - if (_mesa_strcmp((const char *) token, OutputRegisters[j]) == 0) { + if (strcmp((const char *) token, OutputRegisters[j]) == 0) { *outputRegNum = j; break; } @@ -1049,9 +1048,9 @@ Parse_PrintInstruction(struct parse_state *parseState, struct prog_instruction * for (len = 0; str[len] != '\''; len++) /* find closing quote */ ; parseState->pos += len + 1; - msg = (GLubyte*) _mesa_malloc(len + 1); + msg = (GLubyte*) malloc(len + 1); - _mesa_memcpy(msg, str, len); + memcpy(msg, str, len); msg[len] = 0; inst->Data = msg; @@ -1297,7 +1296,7 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); return; } - MEMCPY(programString, str, len); + memcpy(programString, str, len); programString[len] = 0; /* Get ready to parse */ @@ -1314,18 +1313,18 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, _mesa_set_program_error(ctx, -1, NULL); /* check the program header */ - if (_mesa_strncmp((const char *) programString, "!!VP1.0", 7) == 0) { + if (strncmp((const char *) programString, "!!VP1.0", 7) == 0) { target = GL_VERTEX_PROGRAM_NV; parseState.pos = programString + 7; parseState.isStateProgram = GL_FALSE; } - else if (_mesa_strncmp((const char *) programString, "!!VP1.1", 7) == 0) { + else if (strncmp((const char *) programString, "!!VP1.1", 7) == 0) { target = GL_VERTEX_PROGRAM_NV; parseState.pos = programString + 7; parseState.isStateProgram = GL_FALSE; parseState.isVersion1_1 = GL_TRUE; } - else if (_mesa_strncmp((const char *) programString, "!!VSP1.0", 8) == 0) { + else if (strncmp((const char *) programString, "!!VSP1.0", 8) == 0) { target = GL_VERTEX_STATE_PROGRAM_NV; parseState.pos = programString + 8; parseState.isStateProgram = GL_TRUE; @@ -1373,7 +1372,7 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, newInst = _mesa_alloc_instructions(parseState.numInst); if (!newInst) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); - _mesa_free(programString); + free(programString); return; /* out of memory */ } _mesa_copy_instructions(newInst, instBuffer, parseState.numInst); @@ -1381,12 +1380,12 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, /* install the program */ program->Base.Target = target; if (program->Base.String) { - _mesa_free(program->Base.String); + free(program->Base.String); } program->Base.String = programString; program->Base.Format = GL_PROGRAM_FORMAT_ASCII_ARB; if (program->Base.Instructions) { - _mesa_free(program->Base.Instructions); + free(program->Base.Instructions); } program->Base.Instructions = newInst; program->Base.InputsRead = parseState.inputsRead; @@ -1398,9 +1397,9 @@ _mesa_parse_nv_vertex_program(GLcontext *ctx, GLenum dstTarget, program->IsNVProgram = GL_TRUE; #ifdef DEBUG_foo - _mesa_printf("--- glLoadProgramNV result ---\n"); + printf("--- glLoadProgramNV result ---\n"); _mesa_fprint_program_opt(stdout, &program->Base, PROG_PRINT_NV, 0); - _mesa_printf("------------------------------\n"); + printf("------------------------------\n"); #endif if (program->Base.Parameters) diff --git a/mesalib/src/mesa/shader/prog_cache.c b/mesalib/src/mesa/shader/prog_cache.c index 9437e5961..e5b602fc0 100644 --- a/mesalib/src/mesa/shader/prog_cache.c +++ b/mesalib/src/mesa/shader/prog_cache.c @@ -87,8 +87,8 @@ rehash(struct gl_program_cache *cache) cache->last = NULL; size = cache->size * 3; - items = (struct cache_item**) _mesa_malloc(size * sizeof(*items)); - _mesa_memset(items, 0, size * sizeof(*items)); + items = (struct cache_item**) malloc(size * sizeof(*items)); + memset(items, 0, size * sizeof(*items)); for (i = 0; i < cache->size; i++) for (c = cache->items[i]; c; c = next) { @@ -97,7 +97,7 @@ rehash(struct gl_program_cache *cache) items[c->hash % size] = c; } - _mesa_free(cache->items); + free(cache->items); cache->items = items; cache->size = size; } @@ -114,9 +114,9 @@ clear_cache(GLcontext *ctx, struct gl_program_cache *cache) for (i = 0; i < cache->size; i++) { for (c = cache->items[i]; c; c = next) { next = c->next; - _mesa_free(c->key); + free(c->key); _mesa_reference_program(ctx, &c->program, NULL); - _mesa_free(c); + free(c); } cache->items[i] = NULL; } @@ -134,9 +134,9 @@ _mesa_new_program_cache(void) if (cache) { cache->size = 17; cache->items = (struct cache_item **) - _mesa_calloc(cache->size * sizeof(struct cache_item)); + calloc(1, cache->size * sizeof(struct cache_item)); if (!cache->items) { - _mesa_free(cache); + free(cache); return NULL; } } @@ -148,8 +148,8 @@ void _mesa_delete_program_cache(GLcontext *ctx, struct gl_program_cache *cache) { clear_cache(ctx, cache); - _mesa_free(cache->items); - _mesa_free(cache); + free(cache->items); + free(cache); } @@ -188,7 +188,7 @@ _mesa_program_cache_insert(GLcontext *ctx, c->hash = hash; - c->key = _mesa_malloc(keysize); + c->key = malloc(keysize); memcpy(c->key, key, keysize); c->program = program; /* no refcount change */ diff --git a/mesalib/src/mesa/shader/prog_execute.c b/mesalib/src/mesa/shader/prog_execute.c index 192d39aed..37750cc33 100644 --- a/mesalib/src/mesa/shader/prog_execute.c +++ b/mesalib/src/mesa/shader/prog_execute.c @@ -38,7 +38,6 @@ #include "main/glheader.h" #include "main/colormac.h" #include "main/context.h" -#include "program.h" #include "prog_execute.h" #include "prog_instruction.h" #include "prog_parameter.h" @@ -54,8 +53,18 @@ * Set x to positive or negative infinity. */ #if defined(USE_IEEE) || defined(_WIN32) -#define SET_POS_INFINITY(x) ( *((GLuint *) (void *)&x) = 0x7F800000 ) -#define SET_NEG_INFINITY(x) ( *((GLuint *) (void *)&x) = 0xFF800000 ) +#define SET_POS_INFINITY(x) \ + do { \ + fi_type fi; \ + fi.i = 0x7F800000; \ + x = fi.f; \ + } while (0) +#define SET_NEG_INFINITY(x) \ + do { \ + fi_type fi; \ + 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 @@ -342,6 +351,15 @@ fetch_vector1(const struct prog_src_register *source, } +static GLuint +fetch_vector1ui(const struct prog_src_register *source, + const struct gl_program_machine *machine) +{ + const GLuint *src = (GLuint *) get_src_register_pointer(source, machine); + return src[GET_SWZ(source->Swizzle, 0)]; +} + + /** * Fetch texel from texture. Use partial derivatives when possible. */ @@ -568,13 +586,13 @@ store_vector4ui(const struct prog_instruction *inst, if (inst->CondUpdate) { if (writeMask & WRITEMASK_X) - machine->CondCodes[0] = generate_cc(value[0]); + machine->CondCodes[0] = generate_cc((float)value[0]); if (writeMask & WRITEMASK_Y) - machine->CondCodes[1] = generate_cc(value[1]); + machine->CondCodes[1] = generate_cc((float)value[1]); if (writeMask & WRITEMASK_Z) - machine->CondCodes[2] = generate_cc(value[2]); + machine->CondCodes[2] = generate_cc((float)value[2]); if (writeMask & WRITEMASK_W) - machine->CondCodes[3] = generate_cc(value[3]); + machine->CondCodes[3] = generate_cc((float)value[3]); #if DEBUG_PROG printf("CondCodes=(%s,%s,%s,%s) for:\n", _mesa_condcode_string(machine->CondCodes[0]), @@ -670,13 +688,20 @@ _mesa_execute_program(GLcontext * ctx, GLfloat t[4]; fetch_vector4(&inst->SrcReg[0], machine, t); machine->AddressReg[0][0] = IFLOOR(t[0]); + if (DEBUG_PROG) { + printf("ARL %d\n", machine->AddressReg[0][0]); + } } break; case OPCODE_BGNLOOP: /* no-op */ + ASSERT(program->Instructions[inst->BranchTarget].Opcode + == OPCODE_ENDLOOP); break; case OPCODE_ENDLOOP: /* subtract 1 here since pc is incremented by for(pc) loop */ + ASSERT(program->Instructions[inst->BranchTarget].Opcode + == OPCODE_BGNLOOP); pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */ break; case OPCODE_BGNSUB: /* begin subroutine */ @@ -684,12 +709,26 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_ENDSUB: /* end subroutine */ break; case OPCODE_BRA: /* branch (conditional) */ - /* fall-through */ + if (eval_condition(machine, inst)) { + /* take branch */ + /* Subtract 1 here since we'll do pc++ below */ + pc = inst->BranchTarget - 1; + } + break; case OPCODE_BRK: /* break out of loop (conditional) */ - /* fall-through */ + ASSERT(program->Instructions[inst->BranchTarget].Opcode + == OPCODE_ENDLOOP); + if (eval_condition(machine, inst)) { + /* break out of loop */ + /* pc++ at end of for-loop will put us after the ENDLOOP inst */ + pc = inst->BranchTarget; + } + break; case OPCODE_CONT: /* continue loop (conditional) */ + ASSERT(program->Instructions[inst->BranchTarget].Opcode + == OPCODE_ENDLOOP); if (eval_condition(machine, inst)) { - /* take branch */ + /* continue at ENDLOOP */ /* Subtract 1 here since we'll do pc++ at end of for-loop */ pc = inst->BranchTarget - 1; } @@ -882,6 +921,10 @@ _mesa_execute_program(GLcontext * ctx, case OPCODE_IF: { GLboolean cond; + ASSERT(program->Instructions[inst->BranchTarget].Opcode + == OPCODE_ELSE || + program->Instructions[inst->BranchTarget].Opcode + == OPCODE_ENDIF); /* eval condition */ if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) { GLfloat a[4]; @@ -901,14 +944,16 @@ _mesa_execute_program(GLcontext * ctx, else { /* go to the instruction after ELSE or ENDIF */ assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; + pc = inst->BranchTarget; } } break; case OPCODE_ELSE: /* goto ENDIF */ + ASSERT(program->Instructions[inst->BranchTarget].Opcode + == OPCODE_ENDIF); assert(inst->BranchTarget >= 0); - pc = inst->BranchTarget - 1; + pc = inst->BranchTarget; break; case OPCODE_ENDIF: /* nothing */ @@ -942,7 +987,7 @@ _mesa_execute_program(GLcontext * ctx, val = -FLT_MAX; } else { - val = log(a[0]) * 1.442695F; + val = (float)(log(a[0]) * 1.442695F); } result[0] = result[1] = result[2] = result[3] = val; store_vector4(inst, machine, result); @@ -962,12 +1007,12 @@ _mesa_execute_program(GLcontext * ctx, /* XXX we could probably just use pow() here */ if (a[0] > 0.0F) { if (a[1] == 0.0 && a[3] == 0.0) - result[2] = 1.0; + result[2] = 1.0F; else result[2] = (GLfloat) _mesa_pow(a[1], a[3]); } else { - result[2] = 0.0; + result[2] = 0.0F; } result[3] = 1.0F; store_vector4(inst, machine, result); @@ -1007,7 +1052,7 @@ _mesa_execute_program(GLcontext * ctx, /* The fast LOG2 macro doesn't meet the precision * requirements. */ - q[2] = (log(t[0]) * 1.442695F); + q[2] = (float)(log(t[0]) * 1.442695F); } } else { @@ -1634,12 +1679,11 @@ _mesa_execute_program(GLcontext * ctx, break; case OPCODE_UP2H: /* unpack two 16-bit floats */ { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - GLhalfNV hx, hy; - fetch_vector1(&inst->SrcReg[0], machine, a); - hx = rawBits[0] & 0xffff; - hy = rawBits[0] >> 16; + const GLuint raw = fetch_vector1ui(&inst->SrcReg[0], machine); + GLfloat result[4]; + GLushort hx, hy; + hx = raw & 0xffff; + hy = raw >> 16; result[0] = result[2] = _mesa_half_to_float(hx); result[1] = result[3] = _mesa_half_to_float(hy); store_vector4(inst, machine, result); @@ -1647,12 +1691,11 @@ _mesa_execute_program(GLcontext * ctx, break; case OPCODE_UP2US: /* unpack two GLushorts */ { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; + const GLuint raw = fetch_vector1ui(&inst->SrcReg[0], machine); + GLfloat result[4]; GLushort usx, usy; - fetch_vector1(&inst->SrcReg[0], machine, a); - usx = rawBits[0] & 0xffff; - usy = rawBits[0] >> 16; + usx = raw & 0xffff; + usy = raw >> 16; result[0] = result[2] = usx * (1.0f / 65535.0f); result[1] = result[3] = usy * (1.0f / 65535.0f); store_vector4(inst, machine, result); @@ -1660,25 +1703,23 @@ _mesa_execute_program(GLcontext * ctx, break; case OPCODE_UP4B: /* unpack four GLbytes */ { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - fetch_vector1(&inst->SrcReg[0], machine, a); - result[0] = (((rawBits[0] >> 0) & 0xff) - 128) / 127.0F; - result[1] = (((rawBits[0] >> 8) & 0xff) - 128) / 127.0F; - result[2] = (((rawBits[0] >> 16) & 0xff) - 128) / 127.0F; - result[3] = (((rawBits[0] >> 24) & 0xff) - 128) / 127.0F; + const GLuint raw = fetch_vector1ui(&inst->SrcReg[0], machine); + GLfloat result[4]; + result[0] = (((raw >> 0) & 0xff) - 128) / 127.0F; + result[1] = (((raw >> 8) & 0xff) - 128) / 127.0F; + result[2] = (((raw >> 16) & 0xff) - 128) / 127.0F; + result[3] = (((raw >> 24) & 0xff) - 128) / 127.0F; store_vector4(inst, machine, result); } break; case OPCODE_UP4UB: /* unpack four GLubytes */ { - GLfloat a[4], result[4]; - const GLuint *rawBits = (const GLuint *) a; - fetch_vector1(&inst->SrcReg[0], machine, a); - result[0] = ((rawBits[0] >> 0) & 0xff) / 255.0F; - result[1] = ((rawBits[0] >> 8) & 0xff) / 255.0F; - result[2] = ((rawBits[0] >> 16) & 0xff) / 255.0F; - result[3] = ((rawBits[0] >> 24) & 0xff) / 255.0F; + const GLuint raw = fetch_vector1ui(&inst->SrcReg[0], machine); + GLfloat result[4]; + result[0] = ((raw >> 0) & 0xff) / 255.0F; + result[1] = ((raw >> 8) & 0xff) / 255.0F; + result[2] = ((raw >> 16) & 0xff) / 255.0F; + result[3] = ((raw >> 24) & 0xff) / 255.0F; store_vector4(inst, machine, result); } break; @@ -1729,11 +1770,11 @@ _mesa_execute_program(GLcontext * ctx, if (inst->SrcReg[0].File != -1) { GLfloat a[4]; fetch_vector4(&inst->SrcReg[0], machine, a); - _mesa_printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, + printf("%s%g, %g, %g, %g\n", (const char *) inst->Data, a[0], a[1], a[2], a[3]); } else { - _mesa_printf("%s\n", (const char *) inst->Data); + printf("%s\n", (const char *) inst->Data); } } break; diff --git a/mesalib/src/mesa/shader/prog_instruction.c b/mesalib/src/mesa/shader/prog_instruction.c index 44c961927..81099cb99 100644 --- a/mesalib/src/mesa/shader/prog_instruction.c +++ b/mesalib/src/mesa/shader/prog_instruction.c @@ -40,7 +40,7 @@ _mesa_init_instructions(struct prog_instruction *inst, GLuint count) { GLuint i; - _mesa_bzero(inst, count * sizeof(struct prog_instruction)); + memset(inst, 0, count * sizeof(struct prog_instruction)); for (i = 0; i < count; i++) { inst[i].SrcReg[0].File = PROGRAM_UNDEFINED; @@ -70,7 +70,7 @@ struct prog_instruction * _mesa_alloc_instructions(GLuint numInst) { return (struct prog_instruction *) - _mesa_calloc(numInst * sizeof(struct prog_instruction)); + calloc(1, numInst * sizeof(struct prog_instruction)); } @@ -110,7 +110,7 @@ _mesa_copy_instructions(struct prog_instruction *dest, const struct prog_instruction *src, GLuint n) { GLuint i; - _mesa_memcpy(dest, src, n * sizeof(struct prog_instruction)); + memcpy(dest, src, n * sizeof(struct prog_instruction)); for (i = 0; i < n; i++) { if (src[i].Comment) dest[i].Comment = _mesa_strdup(src[i].Comment); @@ -128,11 +128,11 @@ _mesa_free_instructions(struct prog_instruction *inst, GLuint count) GLuint i; for (i = 0; i < count; i++) { if (inst[i].Data) - _mesa_free(inst[i].Data); + free(inst[i].Data); if (inst[i].Comment) - _mesa_free((char *) inst[i].Comment); + free((char *) inst[i].Comment); } - _mesa_free(inst); + free(inst); } diff --git a/mesalib/src/mesa/shader/prog_instruction.h b/mesalib/src/mesa/shader/prog_instruction.h index 1c687bc16..28c797a4b 100644 --- a/mesalib/src/mesa/shader/prog_instruction.h +++ b/mesalib/src/mesa/shader/prog_instruction.h @@ -97,8 +97,8 @@ #define COND_EQ 2 /**< equal to zero */ #define COND_LT 3 /**< less than zero */ #define COND_UN 4 /**< unordered (NaN) */ -#define COND_GE 5 /**< greater then or equal to zero */ -#define COND_LE 6 /**< less then or equal to zero */ +#define COND_GE 5 /**< greater than or equal to zero */ +#define COND_LE 6 /**< less than or equal to zero */ #define COND_NE 7 /**< not equal to zero */ #define COND_TR 8 /**< always true */ #define COND_FL 9 /**< always false */ @@ -312,7 +312,6 @@ struct prog_dst_register */ GLuint CondSrc:1; /*@}*/ - GLuint pad:28; }; diff --git a/mesalib/src/mesa/shader/prog_optimize.c b/mesalib/src/mesa/shader/prog_optimize.c index 4fe351251..2941a17da 100644 --- a/mesalib/src/mesa/shader/prog_optimize.c +++ b/mesalib/src/mesa/shader/prog_optimize.c @@ -111,7 +111,6 @@ remove_instructions(struct gl_program *prog, const GLboolean *removeFlags) if (removeCount > 0) { GLint removeStart = removeEnd - removeCount + 1; _mesa_delete_instructions(prog, removeStart, removeCount); - removeStart = removeCount = 0; /* reset removal info */ } return totalRemoved; } @@ -160,7 +159,7 @@ _mesa_consolidate_registers(struct gl_program *prog) GLuint tempMax = 0, i; if (dbg) { - _mesa_printf("Optimize: Begin register consolidation\n"); + printf("Optimize: Begin register consolidation\n"); } memset(tempUsed, 0, sizeof(tempUsed)); @@ -197,7 +196,7 @@ _mesa_consolidate_registers(struct gl_program *prog) for (i = 0; i <= tempMax; i++) { if (tempUsed[i]) { tempMap[i] = freeTemp++; - /*_mesa_printf("replace %u with %u\n", i, tempMap[i]);*/ + /*printf("replace %u with %u\n", i, tempMap[i]);*/ } } if (freeTemp == tempMax + 1) { @@ -205,14 +204,14 @@ _mesa_consolidate_registers(struct gl_program *prog) return; } if (dbg) { - _mesa_printf("Replace regs 0..%u with 0..%u\n", tempMax, freeTemp-1); + printf("Replace regs 0..%u with 0..%u\n", tempMax, freeTemp-1); } } replace_regs(prog, PROGRAM_TEMPORARY, tempMap); if (dbg) { - _mesa_printf("Optimize: End register consolidation\n"); + printf("Optimize: End register consolidation\n"); } } @@ -233,12 +232,12 @@ _mesa_remove_dead_code(struct gl_program *prog) memset(tempRead, 0, sizeof(tempRead)); if (dbg) { - _mesa_printf("Optimize: Begin dead code removal\n"); + printf("Optimize: Begin dead code removal\n"); /*_mesa_print_program(prog);*/ } removeInst = (GLboolean *) - _mesa_calloc(prog->NumInstructions * sizeof(GLboolean)); + calloc(1, prog->NumInstructions * sizeof(GLboolean)); /* Determine which temps are read and written */ for (i = 0; i < prog->NumInstructions; i++) { @@ -256,7 +255,7 @@ _mesa_remove_dead_code(struct gl_program *prog) if (inst->SrcReg[j].RelAddr) { if (dbg) - _mesa_printf("abort remove dead code (indirect temp)\n"); + printf("abort remove dead code (indirect temp)\n"); goto done; } @@ -291,7 +290,7 @@ _mesa_remove_dead_code(struct gl_program *prog) if (inst->DstReg.RelAddr) { if (dbg) - _mesa_printf("abort remove dead code (indirect temp)\n"); + printf("abort remove dead code (indirect temp)\n"); goto done; } @@ -320,7 +319,7 @@ _mesa_remove_dead_code(struct gl_program *prog) if (!tempRead[index][chan] && inst->DstReg.WriteMask & (1 << chan)) { if (dbg) { - _mesa_printf("Remove writemask on %u.%c\n", i, + printf("Remove writemask on %u.%c\n", i, chan == 3 ? 'w' : 'x' + chan); } inst->DstReg.WriteMask &= ~(1 << chan); @@ -331,7 +330,7 @@ _mesa_remove_dead_code(struct gl_program *prog) if (inst->DstReg.WriteMask == 0) { /* If we cleared all writes, the instruction can be removed. */ if (dbg) - _mesa_printf("Remove instruction %u: \n", i); + printf("Remove instruction %u: \n", i); removeInst[i] = GL_TRUE; } } @@ -341,14 +340,14 @@ _mesa_remove_dead_code(struct gl_program *prog) rem = remove_instructions(prog, removeInst); if (dbg) { - _mesa_printf("Optimize: End dead code removal.\n"); - _mesa_printf(" %u channel writes removed\n", rem); - _mesa_printf(" %u instructions removed\n", rem); + printf("Optimize: End dead code removal.\n"); + printf(" %u channel writes removed\n", rem); + printf(" %u instructions removed\n", rem); /*_mesa_print_program(prog);*/ } done: - _mesa_free(removeInst); + free(removeInst); } @@ -428,7 +427,7 @@ _mesa_remove_extra_move_use(struct gl_program *prog) GLuint i, j; if (dbg) { - _mesa_printf("Optimize: Begin remove extra move use\n"); + printf("Optimize: Begin remove extra move use\n"); _mesa_print_program(prog); } @@ -460,7 +459,7 @@ _mesa_remove_extra_move_use(struct gl_program *prog) */ for (j = i + 1; j < prog->NumInstructions; j++) { struct prog_instruction *inst2 = prog->Instructions + j; - int arg; + GLuint arg; if (_mesa_is_flow_control_opcode(inst2->Opcode)) break; @@ -519,7 +518,7 @@ _mesa_remove_extra_move_use(struct gl_program *prog) } if (dbg) { - _mesa_printf("Optimize: End remove extra move use.\n"); + printf("Optimize: End remove extra move use.\n"); /*_mesa_print_program(prog);*/ } } @@ -534,12 +533,12 @@ _mesa_remove_extra_moves(struct gl_program *prog) GLuint i, rem, loopNesting = 0, subroutineNesting = 0; if (dbg) { - _mesa_printf("Optimize: Begin remove extra moves\n"); + printf("Optimize: Begin remove extra moves\n"); _mesa_print_program(prog); } removeInst = (GLboolean *) - _mesa_calloc(prog->NumInstructions * sizeof(GLboolean)); + calloc(1, prog->NumInstructions * sizeof(GLboolean)); /* * Look for sequences such as this: @@ -578,7 +577,7 @@ _mesa_remove_extra_moves(struct gl_program *prog) /* get pointer to previous instruction */ prevI = i - 1; - while (removeInst[prevI] && prevI > 0) + while (prevI > 0 && removeInst[prevI]) prevI--; prevInst = prog->Instructions + prevI; @@ -606,8 +605,8 @@ _mesa_remove_extra_moves(struct gl_program *prog) removeInst[i] = GL_TRUE; if (dbg) { - _mesa_printf("Remove MOV at %u\n", i); - _mesa_printf("new prev inst %u: ", prevI); + printf("Remove MOV at %u\n", i); + printf("new prev inst %u: ", prevI); _mesa_print_instruction(prevInst); } } @@ -622,10 +621,10 @@ _mesa_remove_extra_moves(struct gl_program *prog) /* now remove the instructions which aren't needed */ rem = remove_instructions(prog, removeInst); - _mesa_free(removeInst); + free(removeInst); if (dbg) { - _mesa_printf("Optimize: End remove extra moves. %u instructions removed\n", rem); + printf("Optimize: End remove extra moves. %u instructions removed\n", rem); /*_mesa_print_program(prog);*/ } } @@ -838,7 +837,7 @@ find_live_intervals(struct gl_program *prog, */ if (dbg) { - _mesa_printf("Optimize: Begin find intervals\n"); + printf("Optimize: Begin find intervals\n"); } /* build intermediate arrays */ @@ -865,16 +864,16 @@ find_live_intervals(struct gl_program *prog, /* print interval info */ for (i = 0; i < liveIntervals->Num; i++) { const struct interval *inv = liveIntervals->Intervals + i; - _mesa_printf("Reg[%d] live [%d, %d]:", + printf("Reg[%d] live [%d, %d]:", inv->Reg, inv->Start, inv->End); if (1) { - int j; + GLuint j; for (j = 0; j < inv->Start; j++) - _mesa_printf(" "); + printf(" "); for (j = inv->Start; j <= inv->End; j++) - _mesa_printf("x"); + printf("x"); } - _mesa_printf("\n"); + printf("\n"); } } @@ -915,7 +914,7 @@ _mesa_reallocate_registers(struct gl_program *prog) GLint maxTemp = -1; if (dbg) { - _mesa_printf("Optimize: Begin live-interval register reallocation\n"); + printf("Optimize: Begin live-interval register reallocation\n"); _mesa_print_program(prog); } @@ -926,7 +925,7 @@ _mesa_reallocate_registers(struct gl_program *prog) if (!find_live_intervals(prog, &liveIntervals)) { if (dbg) - _mesa_printf("Aborting register reallocation\n"); + printf("Aborting register reallocation\n"); return; } @@ -939,14 +938,14 @@ _mesa_reallocate_registers(struct gl_program *prog) const struct interval *live = liveIntervals.Intervals + i; if (dbg) - _mesa_printf("Consider register %u\n", live->Reg); + printf("Consider register %u\n", live->Reg); /* Expire old intervals. Intervals which have ended with respect * to the live interval can have their remapped registers freed. */ { GLint j; - for (j = 0; j < activeIntervals.Num; j++) { + for (j = 0; j < (GLint) activeIntervals.Num; j++) { const struct interval *inv = activeIntervals.Intervals + j; if (inv->End >= live->Start) { /* Stop now. Since the activeInterval list is sorted @@ -960,7 +959,7 @@ _mesa_reallocate_registers(struct gl_program *prog) ASSERT(regNew >= 0); if (dbg) - _mesa_printf(" expire interval for reg %u\n", inv->Reg); + printf(" expire interval for reg %u\n", inv->Reg); /* remove interval j from active list */ remove_interval(&activeIntervals, inv); @@ -968,7 +967,7 @@ _mesa_reallocate_registers(struct gl_program *prog) /* return register regNew to the free pool */ if (dbg) - _mesa_printf(" free reg %d\n", regNew); + printf(" free reg %d\n", regNew); ASSERT(usedRegs[regNew] == GL_TRUE); usedRegs[regNew] = GL_FALSE; } @@ -985,7 +984,7 @@ _mesa_reallocate_registers(struct gl_program *prog) registerMap[live->Reg] = k; maxTemp = MAX2(maxTemp, k); if (dbg) - _mesa_printf(" remap register %u -> %d\n", live->Reg, k); + printf(" remap register %u -> %d\n", live->Reg, k); } /* Insert this live interval into the active list which is sorted @@ -995,7 +994,7 @@ _mesa_reallocate_registers(struct gl_program *prog) } } - if (maxTemp + 1 < liveIntervals.Num) { + if (maxTemp + 1 < (GLint) liveIntervals.Num) { /* OK, we've reduced the number of registers needed. * Scan the program and replace all the old temporary register * indexes with the new indexes. @@ -1006,8 +1005,8 @@ _mesa_reallocate_registers(struct gl_program *prog) } if (dbg) { - _mesa_printf("Optimize: End live-interval register reallocation\n"); - _mesa_printf("Num temp regs before: %u after: %u\n", + printf("Optimize: End live-interval register reallocation\n"); + printf("Num temp regs before: %u after: %u\n", liveIntervals.Num, maxTemp + 1); _mesa_print_program(prog); } diff --git a/mesalib/src/mesa/shader/prog_parameter.c b/mesalib/src/mesa/shader/prog_parameter.c index f22492e02..25bb4f3d4 100644 --- a/mesalib/src/mesa/shader/prog_parameter.c +++ b/mesalib/src/mesa/shader/prog_parameter.c @@ -54,16 +54,16 @@ _mesa_new_parameter_list_sized(unsigned size) /* alloc arrays */ p->Parameters = (struct gl_program_parameter *) - _mesa_calloc(size * sizeof(struct gl_program_parameter)); + calloc(1, size * sizeof(struct gl_program_parameter)); p->ParameterValues = (GLfloat (*)[4]) _mesa_align_malloc(size * 4 *sizeof(GLfloat), 16); if ((p->Parameters == NULL) || (p->ParameterValues == NULL)) { - _mesa_free(p->Parameters); + free(p->Parameters); _mesa_align_free(p->ParameterValues); - _mesa_free(p); + free(p); p = NULL; } } @@ -81,12 +81,12 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList) GLuint i; for (i = 0; i < paramList->NumParameters; i++) { if (paramList->Parameters[i].Name) - _mesa_free((void *) paramList->Parameters[i].Name); + free((void *) paramList->Parameters[i].Name); } - _mesa_free(paramList->Parameters); + free(paramList->Parameters); if (paramList->ParameterValues) _mesa_align_free(paramList->ParameterValues); - _mesa_free(paramList); + free(paramList); } @@ -146,8 +146,8 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList, paramList->NumParameters = oldNum + sz4; - _mesa_memset(¶mList->Parameters[oldNum], 0, - sz4 * sizeof(struct gl_program_parameter)); + memset(¶mList->Parameters[oldNum], 0, + sz4 * sizeof(struct gl_program_parameter)); for (i = 0; i < sz4; i++) { struct gl_program_parameter *p = paramList->Parameters + oldNum + i; @@ -209,13 +209,13 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, { /* first check if this is a duplicate constant */ GLint pos; - for (pos = 0; pos < paramList->NumParameters; pos++) { + for (pos = 0; pos < (GLint)paramList->NumParameters; pos++) { const GLfloat *pvals = paramList->ParameterValues[pos]; if (pvals[0] == values[0] && pvals[1] == values[1] && pvals[2] == values[2] && pvals[3] == values[3] && - _mesa_strcmp(paramList->Parameters[pos].Name, name) == 0) { + strcmp(paramList->Parameters[pos].Name, name) == 0) { /* Same name and value is already in the param list - reuse it */ return pos; } @@ -230,9 +230,8 @@ _mesa_add_named_constant(struct gl_program_parameter_list *paramList, * Add a new unnamed constant to the parameter list. This will be used * when a fragment/vertex program contains something like this: * MOV r, { 0, 1, 2, 3 }; - * We'll search the parameter list for an existing instance of the - * constant. If swizzleOut is non-null, we'll try swizzling when - * looking for a match. + * If swizzleOut is non-null we'll search the parameter list for an + * existing instance of the constant which matches with a swizzle. * * \param paramList the parameter list * \param values four float values @@ -248,7 +247,8 @@ _mesa_add_unnamed_constant(struct gl_program_parameter_list *paramList, ASSERT(size >= 1); ASSERT(size <= 4); - if (_mesa_lookup_parameter_constant(paramList, values, + if (swizzleOut && + _mesa_lookup_parameter_constant(paramList, values, size, &pos, swizzleOut)) { return pos; } @@ -325,7 +325,7 @@ _mesa_use_uniform(struct gl_program_parameter_list *paramList, for (i = 0; i < paramList->NumParameters; i++) { struct gl_program_parameter *p = paramList->Parameters + i; if ((p->Type == PROGRAM_UNIFORM || p->Type == PROGRAM_SAMPLER) && - _mesa_strcmp(p->Name, name) == 0) { + strcmp(p->Name, name) == 0) { p->Used = GL_TRUE; /* Note that large uniforms may occupy several slots so we're * not done searching yet. @@ -486,7 +486,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, paramList->StateFlags |= _mesa_program_state_flags(stateTokens); /* free name string here since we duplicated it in add_parameter() */ - _mesa_free(name); + free(name); return index; } @@ -529,7 +529,7 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, /* name is null-terminated */ for (i = 0; i < (GLint) paramList->NumParameters; i++) { if (paramList->Parameters[i].Name && - _mesa_strcmp(paramList->Parameters[i].Name, name) == 0) + strcmp(paramList->Parameters[i].Name, name) == 0) return i; } } @@ -537,8 +537,8 @@ _mesa_lookup_parameter_index(const struct gl_program_parameter_list *paramList, /* name is not null-terminated, use nameLen */ for (i = 0; i < (GLint) paramList->NumParameters; i++) { if (paramList->Parameters[i].Name && - _mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 - && _mesa_strlen(paramList->Parameters[i].Name) == (size_t)nameLen) + strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 + && strlen(paramList->Parameters[i].Name) == (size_t)nameLen) return i; } } @@ -723,7 +723,7 @@ _mesa_longest_parameter_name(const struct gl_program_parameter_list *list, return 0; for (i = 0; i < list->NumParameters; i++) { if (list->Parameters[i].Type == type) { - GLuint len = _mesa_strlen(list->Parameters[i].Name); + GLuint len = strlen(list->Parameters[i].Name); if (len > maxLen) maxLen = len; } diff --git a/mesalib/src/mesa/shader/prog_parameter.h b/mesalib/src/mesa/shader/prog_parameter.h index 699cb0c73..1111c8597 100644 --- a/mesalib/src/mesa/shader/prog_parameter.h +++ b/mesalib/src/mesa/shader/prog_parameter.h @@ -43,6 +43,7 @@ #define PROG_PARAM_BIT_INVARIANT 0x2 /**< for varying vars (GLSL 1.20) */ #define PROG_PARAM_BIT_FLAT 0x4 /**< for varying vars (GLSL 1.30) */ #define PROG_PARAM_BIT_LINEAR 0x8 /**< for varying vars (GLSL 1.30) */ +#define PROG_PARAM_BIT_CYL_WRAP 0x10 /**< XXX gallium debug */ /*@}*/ diff --git a/mesalib/src/mesa/shader/prog_parameter_layout.c b/mesalib/src/mesa/shader/prog_parameter_layout.c index 1c37b3a7a..a88857383 100644 --- a/mesalib/src/mesa/shader/prog_parameter_layout.c +++ b/mesalib/src/mesa/shader/prog_parameter_layout.c @@ -72,14 +72,11 @@ copy_indirect_accessed_array(struct gl_program_parameter_list *src, unsigned first, unsigned count) { const int base = dst->NumParameters; - unsigned i; - unsigned j; - + unsigned i, j; for (i = first; i < (first + count); i++) { struct gl_program_parameter *curr = & src->Parameters[i]; - if (curr->Type == PROGRAM_CONSTANT) { j = dst->NumParameters; } else { @@ -93,10 +90,15 @@ copy_indirect_accessed_array(struct gl_program_parameter_list *src, assert(j == dst->NumParameters); + /* copy src parameter [i] to dest parameter [j] */ memcpy(& dst->Parameters[j], curr, sizeof(dst->Parameters[j])); memcpy(dst->ParameterValues[j], src->ParameterValues[i], sizeof(GLfloat) * 4); + + /* Pointer to the string name was copied. Null-out src param name + * to prevent double free later. + */ curr->Name = NULL; dst->NumParameters++; @@ -117,11 +119,9 @@ _mesa_layout_parameters(struct asm_parser_state *state) struct asm_instruction *inst; unsigned i; - layout = _mesa_new_parameter_list_sized(state->prog->Parameters->NumParameters); - /* PASS 1: Move any parameters that are accessed indirectly from the * original parameter list to the new parameter list. */ @@ -155,7 +155,6 @@ _mesa_layout_parameters(struct asm_parser_state *state) } } - /* PASS 2: Move any parameters that are not accessed indirectly from the * original parameter list to the new parameter list. */ @@ -165,7 +164,6 @@ _mesa_layout_parameters(struct asm_parser_state *state) const int idx = inst->SrcReg[i].Base.Index; unsigned swizzle = SWIZZLE_NOOP; - /* All relative addressed operands were processed on the first * pass. Just skip them here. */ @@ -173,7 +171,6 @@ _mesa_layout_parameters(struct asm_parser_state *state) continue; } - if ((inst->SrcReg[i].Base.File <= PROGRAM_VARYING ) || (inst->SrcReg[i].Base.File >= PROGRAM_WRITE_ONLY)) { continue; @@ -209,7 +206,6 @@ _mesa_layout_parameters(struct asm_parser_state *state) } } - _mesa_free_parameter_list(state->prog->Parameters); state->prog->Parameters = layout; diff --git a/mesalib/src/mesa/shader/prog_print.c b/mesalib/src/mesa/shader/prog_print.c index 52c102cba..f66c240ce 100644 --- a/mesalib/src/mesa/shader/prog_print.c +++ b/mesalib/src/mesa/shader/prog_print.c @@ -150,6 +150,10 @@ arb_input_attrib_string(GLint index, GLenum progType) "fragment.varying[7]" }; + /* sanity checks */ + assert(strcmp(vertAttribs[VERT_ATTRIB_TEX0], "vertex.texcoord[0]") == 0); + assert(strcmp(vertAttribs[VERT_ATTRIB_GENERIC15], "vertex.attrib[15]") == 0); + if (progType == GL_VERTEX_PROGRAM_ARB) { assert(index < sizeof(vertAttribs) / sizeof(vertAttribs[0])); return vertAttribs[index]; @@ -161,6 +165,43 @@ arb_input_attrib_string(GLint index, GLenum progType) } +/** + * Print a vertex program's InputsRead field in human-readable format. + * For debugging. + */ +void +_mesa_print_vp_inputs(GLbitfield inputs) +{ + printf("VP Inputs 0x%x: \n", inputs); + while (inputs) { + GLint attr = _mesa_ffs(inputs) - 1; + const char *name = arb_input_attrib_string(attr, + GL_VERTEX_PROGRAM_ARB); + printf(" %d: %s\n", attr, name); + inputs &= ~(1 << attr); + } +} + + +/** + * Print a fragment program's InputsRead field in human-readable format. + * For debugging. + */ +void +_mesa_print_fp_inputs(GLbitfield inputs) +{ + printf("FP Inputs 0x%x: \n", inputs); + while (inputs) { + GLint attr = _mesa_ffs(inputs) - 1; + const char *name = arb_input_attrib_string(attr, + GL_FRAGMENT_PROGRAM_ARB); + printf(" %d: %s\n", attr, name); + inputs &= ~(1 << attr); + } +} + + + /** * Return ARB_v/f_prog-style output attrib string. */ @@ -233,46 +274,46 @@ reg_string(gl_register_file f, GLint index, gl_prog_print_mode mode, switch (mode) { case PROG_PRINT_DEBUG: - _mesa_sprintf(str, "%s[%s%d]", file_string(f, mode), addr, index); + sprintf(str, "%s[%s%d]", file_string(f, mode), addr, index); break; case PROG_PRINT_ARB: switch (f) { case PROGRAM_INPUT: - _mesa_sprintf(str, "%s", arb_input_attrib_string(index, prog->Target)); + sprintf(str, "%s", arb_input_attrib_string(index, prog->Target)); break; case PROGRAM_OUTPUT: - _mesa_sprintf(str, "%s", arb_output_attrib_string(index, prog->Target)); + sprintf(str, "%s", arb_output_attrib_string(index, prog->Target)); break; case PROGRAM_TEMPORARY: - _mesa_sprintf(str, "temp%d", index); + sprintf(str, "temp%d", index); break; case PROGRAM_ENV_PARAM: - _mesa_sprintf(str, "program.env[%s%d]", addr, index); + sprintf(str, "program.env[%s%d]", addr, index); break; case PROGRAM_LOCAL_PARAM: - _mesa_sprintf(str, "program.local[%s%d]", addr, index); + sprintf(str, "program.local[%s%d]", addr, index); break; case PROGRAM_VARYING: /* extension */ - _mesa_sprintf(str, "varying[%s%d]", addr, index); + sprintf(str, "varying[%s%d]", addr, index); break; case PROGRAM_CONSTANT: /* extension */ - _mesa_sprintf(str, "constant[%s%d]", addr, index); + sprintf(str, "constant[%s%d]", addr, index); break; case PROGRAM_UNIFORM: /* extension */ - _mesa_sprintf(str, "uniform[%s%d]", addr, index); + sprintf(str, "uniform[%s%d]", addr, index); break; case PROGRAM_STATE_VAR: { struct gl_program_parameter *param = prog->Parameters->Parameters + index; char *state = _mesa_program_state_string(param->StateIndexes); - _mesa_sprintf(str, state); - _mesa_free(state); + sprintf(str, "%s", state); + free(state); } break; case PROGRAM_ADDRESS: - _mesa_sprintf(str, "A%d", index); + sprintf(str, "A%d", index); break; default: _mesa_problem(NULL, "bad file in reg_string()"); @@ -283,30 +324,30 @@ reg_string(gl_register_file f, GLint index, gl_prog_print_mode mode, switch (f) { case PROGRAM_INPUT: if (prog->Target == GL_VERTEX_PROGRAM_ARB) - _mesa_sprintf(str, "v[%d]", index); + sprintf(str, "v[%d]", index); else - _mesa_sprintf(str, "f[%d]", index); + sprintf(str, "f[%d]", index); break; case PROGRAM_OUTPUT: - _mesa_sprintf(str, "o[%d]", index); + sprintf(str, "o[%d]", index); break; case PROGRAM_TEMPORARY: - _mesa_sprintf(str, "R%d", index); + sprintf(str, "R%d", index); break; case PROGRAM_ENV_PARAM: - _mesa_sprintf(str, "c[%d]", index); + sprintf(str, "c[%d]", index); break; case PROGRAM_VARYING: /* extension */ - _mesa_sprintf(str, "varying[%s%d]", addr, index); + sprintf(str, "varying[%s%d]", addr, index); break; case PROGRAM_UNIFORM: /* extension */ - _mesa_sprintf(str, "uniform[%s%d]", addr, index); + sprintf(str, "uniform[%s%d]", addr, index); break; case PROGRAM_CONSTANT: /* extension */ - _mesa_sprintf(str, "constant[%s%d]", addr, index); + sprintf(str, "constant[%s%d]", addr, index); break; case PROGRAM_STATE_VAR: /* extension */ - _mesa_sprintf(str, "state[%s%d]", addr, index); + sprintf(str, "state[%s%d]", addr, index); break; default: _mesa_problem(NULL, "bad file in reg_string()"); @@ -378,11 +419,11 @@ void _mesa_print_swizzle(GLuint swizzle) { if (swizzle == SWIZZLE_XYZW) { - _mesa_printf(".xyzw\n"); + printf(".xyzw\n"); } else { const char *s = _mesa_swizzle_string(swizzle, 0, 0); - _mesa_printf("%s\n", s); + printf("%s\n", s); } } @@ -435,23 +476,23 @@ fprint_dst_reg(FILE * f, gl_prog_print_mode mode, const struct gl_program *prog) { - _mesa_fprintf(f, "%s%s", - reg_string((gl_register_file) dstReg->File, - dstReg->Index, mode, dstReg->RelAddr, prog), - _mesa_writemask_string(dstReg->WriteMask)); - + fprintf(f, "%s%s", + reg_string((gl_register_file) dstReg->File, + dstReg->Index, mode, dstReg->RelAddr, prog), + _mesa_writemask_string(dstReg->WriteMask)); + if (dstReg->CondMask != COND_TR) { - _mesa_fprintf(f, " (%s.%s)", - _mesa_condcode_string(dstReg->CondMask), - _mesa_swizzle_string(dstReg->CondSwizzle, - GL_FALSE, GL_FALSE)); + fprintf(f, " (%s.%s)", + _mesa_condcode_string(dstReg->CondMask), + _mesa_swizzle_string(dstReg->CondSwizzle, + GL_FALSE, GL_FALSE)); } #if 0 - _mesa_fprintf(f, "%s[%d]%s", - file_string((gl_register_file) dstReg->File, mode), - dstReg->Index, - _mesa_writemask_string(dstReg->WriteMask)); + fprintf(f, "%s[%d]%s", + file_string((gl_register_file) dstReg->File, mode), + dstReg->Index, + _mesa_writemask_string(dstReg->WriteMask)); #endif } @@ -464,19 +505,19 @@ fprint_src_reg(FILE *f, { const char *abs = srcReg->Abs ? "|" : ""; - _mesa_fprintf(f, "%s%s%s%s", - abs, - reg_string((gl_register_file) srcReg->File, - srcReg->Index, mode, srcReg->RelAddr, prog), - _mesa_swizzle_string(srcReg->Swizzle, - srcReg->Negate, GL_FALSE), - abs); + fprintf(f, "%s%s%s%s", + abs, + reg_string((gl_register_file) srcReg->File, + srcReg->Index, mode, srcReg->RelAddr, prog), + _mesa_swizzle_string(srcReg->Swizzle, + srcReg->Negate, GL_FALSE), + abs); #if 0 - _mesa_fprintf(f, "%s[%d]%s", - file_string((gl_register_file) srcReg->File, mode), - srcReg->Index, - _mesa_swizzle_string(srcReg->Swizzle, - srcReg->Negate, GL_FALSE)); + fprintf(f, "%s[%d]%s", + file_string((gl_register_file) srcReg->File, mode), + srcReg->Index, + _mesa_swizzle_string(srcReg->Swizzle, + srcReg->Negate, GL_FALSE)); #endif } @@ -485,9 +526,9 @@ static void fprint_comment(FILE *f, const struct prog_instruction *inst) { if (inst->Comment) - _mesa_fprintf(f, "; # %s\n", inst->Comment); + fprintf(f, "; # %s\n", inst->Comment); else - _mesa_fprintf(f, ";\n"); + fprintf(f, ";\n"); } @@ -500,29 +541,29 @@ fprint_alu_instruction(FILE *f, { GLuint j; - _mesa_fprintf(f, "%s", opcode_string); + fprintf(f, "%s", opcode_string); if (inst->CondUpdate) - _mesa_fprintf(f, ".C"); + fprintf(f, ".C"); /* frag prog only */ if (inst->SaturateMode == SATURATE_ZERO_ONE) - _mesa_fprintf(f, "_SAT"); + fprintf(f, "_SAT"); - _mesa_fprintf(f, " "); + fprintf(f, " "); if (inst->DstReg.File != PROGRAM_UNDEFINED) { fprint_dst_reg(f, &inst->DstReg, mode, prog); } else { - _mesa_fprintf(f, " ???"); + fprintf(f, " ???"); } if (numRegs > 0) - _mesa_fprintf(f, ", "); + fprintf(f, ", "); for (j = 0; j < numRegs; j++) { fprint_src_reg(f, inst->SrcReg + j, mode, prog); if (j + 1 < numRegs) - _mesa_fprintf(f, ", "); + fprintf(f, ", "); } fprint_comment(f, inst); @@ -557,177 +598,179 @@ _mesa_fprint_instruction_opt(FILE *f, indent -= 3; } for (i = 0; i < indent; i++) { - _mesa_fprintf(f, " "); + fprintf(f, " "); } switch (inst->Opcode) { case OPCODE_PRINT: - _mesa_fprintf(f, "PRINT '%s'", inst->Data); + fprintf(f, "PRINT '%s'", (char *) inst->Data); if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) { - _mesa_fprintf(f, ", "); - _mesa_fprintf(f, "%s[%d]%s", - file_string((gl_register_file) inst->SrcReg[0].File, - mode), - inst->SrcReg[0].Index, - _mesa_swizzle_string(inst->SrcReg[0].Swizzle, - inst->SrcReg[0].Negate, GL_FALSE)); + fprintf(f, ", "); + fprintf(f, "%s[%d]%s", + file_string((gl_register_file) inst->SrcReg[0].File, + mode), + inst->SrcReg[0].Index, + _mesa_swizzle_string(inst->SrcReg[0].Swizzle, + inst->SrcReg[0].Negate, GL_FALSE)); } if (inst->Comment) - _mesa_fprintf(f, " # %s", inst->Comment); + fprintf(f, " # %s", inst->Comment); fprint_comment(f, inst); break; case OPCODE_SWZ: - _mesa_fprintf(f, "SWZ"); + fprintf(f, "SWZ"); if (inst->SaturateMode == SATURATE_ZERO_ONE) - _mesa_fprintf(f, "_SAT"); - _mesa_fprintf(f, " "); + fprintf(f, "_SAT"); + fprintf(f, " "); fprint_dst_reg(f, &inst->DstReg, mode, prog); - _mesa_fprintf(f, ", %s[%d], %s", - file_string((gl_register_file) inst->SrcReg[0].File, - mode), - inst->SrcReg[0].Index, - _mesa_swizzle_string(inst->SrcReg[0].Swizzle, - inst->SrcReg[0].Negate, GL_TRUE)); + fprintf(f, ", %s[%d], %s", + file_string((gl_register_file) inst->SrcReg[0].File, + mode), + inst->SrcReg[0].Index, + _mesa_swizzle_string(inst->SrcReg[0].Swizzle, + inst->SrcReg[0].Negate, GL_TRUE)); fprint_comment(f, inst); break; case OPCODE_TEX: case OPCODE_TXP: case OPCODE_TXL: case OPCODE_TXB: - _mesa_fprintf(f, "%s", _mesa_opcode_string(inst->Opcode)); + fprintf(f, "%s", _mesa_opcode_string(inst->Opcode)); if (inst->SaturateMode == SATURATE_ZERO_ONE) - _mesa_fprintf(f, "_SAT"); - _mesa_fprintf(f, " "); + fprintf(f, "_SAT"); + fprintf(f, " "); fprint_dst_reg(f, &inst->DstReg, mode, prog); - _mesa_fprintf(f, ", "); + fprintf(f, ", "); fprint_src_reg(f, &inst->SrcReg[0], mode, prog); - _mesa_fprintf(f, ", texture[%d], ", inst->TexSrcUnit); + fprintf(f, ", texture[%d], ", inst->TexSrcUnit); switch (inst->TexSrcTarget) { - case TEXTURE_1D_INDEX: _mesa_fprintf(f, "1D"); break; - case TEXTURE_2D_INDEX: _mesa_fprintf(f, "2D"); break; - case TEXTURE_3D_INDEX: _mesa_fprintf(f, "3D"); break; - case TEXTURE_CUBE_INDEX: _mesa_fprintf(f, "CUBE"); break; - case TEXTURE_RECT_INDEX: _mesa_fprintf(f, "RECT"); break; + case TEXTURE_1D_INDEX: fprintf(f, "1D"); break; + case TEXTURE_2D_INDEX: fprintf(f, "2D"); break; + case TEXTURE_3D_INDEX: fprintf(f, "3D"); break; + case TEXTURE_CUBE_INDEX: fprintf(f, "CUBE"); break; + case TEXTURE_RECT_INDEX: fprintf(f, "RECT"); break; + case TEXTURE_1D_ARRAY_INDEX: fprintf(f, "1D_ARRAY"); break; + case TEXTURE_2D_ARRAY_INDEX: fprintf(f, "2D_ARRAY"); break; default: ; } if (inst->TexShadow) - _mesa_fprintf(f, " SHADOW"); + fprintf(f, " SHADOW"); fprint_comment(f, inst); break; case OPCODE_KIL: - _mesa_fprintf(f, "%s", _mesa_opcode_string(inst->Opcode)); - _mesa_fprintf(f, " "); + fprintf(f, "%s", _mesa_opcode_string(inst->Opcode)); + fprintf(f, " "); fprint_src_reg(f, &inst->SrcReg[0], mode, prog); fprint_comment(f, inst); break; case OPCODE_KIL_NV: - _mesa_fprintf(f, "%s", _mesa_opcode_string(inst->Opcode)); - _mesa_fprintf(f, " "); - _mesa_fprintf(f, "%s.%s", - _mesa_condcode_string(inst->DstReg.CondMask), - _mesa_swizzle_string(inst->DstReg.CondSwizzle, - GL_FALSE, GL_FALSE)); + fprintf(f, "%s", _mesa_opcode_string(inst->Opcode)); + fprintf(f, " "); + fprintf(f, "%s.%s", + _mesa_condcode_string(inst->DstReg.CondMask), + _mesa_swizzle_string(inst->DstReg.CondSwizzle, + GL_FALSE, GL_FALSE)); fprint_comment(f, inst); break; case OPCODE_ARL: - _mesa_fprintf(f, "ARL "); + fprintf(f, "ARL "); fprint_dst_reg(f, &inst->DstReg, mode, prog); - _mesa_fprintf(f, ", "); + fprintf(f, ", "); fprint_src_reg(f, &inst->SrcReg[0], mode, prog); fprint_comment(f, inst); break; case OPCODE_BRA: - _mesa_fprintf(f, "BRA %d (%s%s)", - inst->BranchTarget, - _mesa_condcode_string(inst->DstReg.CondMask), - _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); + fprintf(f, "BRA %d (%s%s)", + inst->BranchTarget, + _mesa_condcode_string(inst->DstReg.CondMask), + _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); fprint_comment(f, inst); break; case OPCODE_IF: if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) { /* Use ordinary register */ - _mesa_fprintf(f, "IF "); + fprintf(f, "IF "); fprint_src_reg(f, &inst->SrcReg[0], mode, prog); - _mesa_fprintf(f, "; "); + fprintf(f, "; "); } else { /* Use cond codes */ - _mesa_fprintf(f, "IF (%s%s);", - _mesa_condcode_string(inst->DstReg.CondMask), - _mesa_swizzle_string(inst->DstReg.CondSwizzle, - 0, GL_FALSE)); + fprintf(f, "IF (%s%s);", + _mesa_condcode_string(inst->DstReg.CondMask), + _mesa_swizzle_string(inst->DstReg.CondSwizzle, + 0, GL_FALSE)); } - _mesa_fprintf(f, " # (if false, goto %d)", inst->BranchTarget); + fprintf(f, " # (if false, goto %d)", inst->BranchTarget); fprint_comment(f, inst); return indent + 3; case OPCODE_ELSE: - _mesa_fprintf(f, "ELSE; # (goto %d)\n", inst->BranchTarget); + fprintf(f, "ELSE; # (goto %d)\n", inst->BranchTarget); return indent + 3; case OPCODE_ENDIF: - _mesa_fprintf(f, "ENDIF;\n"); + fprintf(f, "ENDIF;\n"); break; case OPCODE_BGNLOOP: - _mesa_fprintf(f, "BGNLOOP; # (end at %d)\n", inst->BranchTarget); + fprintf(f, "BGNLOOP; # (end at %d)\n", inst->BranchTarget); return indent + 3; case OPCODE_ENDLOOP: - _mesa_fprintf(f, "ENDLOOP; # (goto %d)\n", inst->BranchTarget); + fprintf(f, "ENDLOOP; # (goto %d)\n", inst->BranchTarget); break; case OPCODE_BRK: case OPCODE_CONT: - _mesa_fprintf(f, "%s (%s%s); # (goto %d)", - _mesa_opcode_string(inst->Opcode), - _mesa_condcode_string(inst->DstReg.CondMask), - _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), - inst->BranchTarget); + fprintf(f, "%s (%s%s); # (goto %d)", + _mesa_opcode_string(inst->Opcode), + _mesa_condcode_string(inst->DstReg.CondMask), + _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE), + inst->BranchTarget); fprint_comment(f, inst); break; case OPCODE_BGNSUB: if (mode == PROG_PRINT_NV) { - _mesa_fprintf(f, "%s:\n", inst->Comment); /* comment is label */ + fprintf(f, "%s:\n", inst->Comment); /* comment is label */ return indent; } else { - _mesa_fprintf(f, "BGNSUB"); + fprintf(f, "BGNSUB"); fprint_comment(f, inst); return indent + 3; } case OPCODE_ENDSUB: if (mode == PROG_PRINT_DEBUG) { - _mesa_fprintf(f, "ENDSUB"); + fprintf(f, "ENDSUB"); fprint_comment(f, inst); } break; case OPCODE_CAL: if (mode == PROG_PRINT_NV) { - _mesa_fprintf(f, "CAL %s; # (goto %d)\n", inst->Comment, inst->BranchTarget); + fprintf(f, "CAL %s; # (goto %d)\n", inst->Comment, inst->BranchTarget); } else { - _mesa_fprintf(f, "CAL %u", inst->BranchTarget); + fprintf(f, "CAL %u", inst->BranchTarget); fprint_comment(f, inst); } break; case OPCODE_RET: - _mesa_fprintf(f, "RET (%s%s)", - _mesa_condcode_string(inst->DstReg.CondMask), - _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); + fprintf(f, "RET (%s%s)", + _mesa_condcode_string(inst->DstReg.CondMask), + _mesa_swizzle_string(inst->DstReg.CondSwizzle, 0, GL_FALSE)); fprint_comment(f, inst); break; case OPCODE_END: - _mesa_fprintf(f, "END\n"); + fprintf(f, "END\n"); break; case OPCODE_NOP: if (mode == PROG_PRINT_DEBUG) { - _mesa_fprintf(f, "NOP"); + fprintf(f, "NOP"); fprint_comment(f, inst); } else if (inst->Comment) { /* ARB/NV extensions don't have NOP instruction */ - _mesa_fprintf(f, "# %s\n", inst->Comment); + fprintf(f, "# %s\n", inst->Comment); } break; /* XXX may need other special-case instructions */ @@ -784,26 +827,26 @@ _mesa_fprint_program_opt(FILE *f, switch (prog->Target) { case GL_VERTEX_PROGRAM_ARB: if (mode == PROG_PRINT_ARB) - _mesa_fprintf(f, "!!ARBvp1.0\n"); + fprintf(f, "!!ARBvp1.0\n"); else if (mode == PROG_PRINT_NV) - _mesa_fprintf(f, "!!VP1.0\n"); + fprintf(f, "!!VP1.0\n"); else - _mesa_fprintf(f, "# Vertex Program/Shader %u\n", prog->Id); + fprintf(f, "# Vertex Program/Shader %u\n", prog->Id); break; case GL_FRAGMENT_PROGRAM_ARB: case GL_FRAGMENT_PROGRAM_NV: if (mode == PROG_PRINT_ARB) - _mesa_fprintf(f, "!!ARBfp1.0\n"); + fprintf(f, "!!ARBfp1.0\n"); else if (mode == PROG_PRINT_NV) - _mesa_fprintf(f, "!!FP1.0\n"); + fprintf(f, "!!FP1.0\n"); else - _mesa_fprintf(f, "# Fragment Program/Shader %u\n", prog->Id); + fprintf(f, "# Fragment Program/Shader %u\n", prog->Id); break; } for (i = 0; i < prog->NumInstructions; i++) { if (lineNumbers) - _mesa_fprintf(f, "%3d: ", i); + fprintf(f, "%3d: ", i); indent = _mesa_fprint_instruction_opt(f, prog->Instructions + i, indent, mode, prog); } @@ -821,8 +864,10 @@ _mesa_print_program(const struct gl_program *prog) /** - * Return binary representation of value (as a string). + * Return binary representation of 64-bit value (as a string). * Insert a comma to separate each group of 8 bits. + * Note we return a pointer to local static storage so this is not + * re-entrant, etc. * XXX move to imports.[ch] if useful elsewhere. */ static const char * @@ -831,7 +876,7 @@ binary(GLbitfield64 val) static char buf[80]; GLint i, len = 0; for (i = 63; i >= 0; --i) { - if (val & (1 << i)) + if (val & (1ULL << i)) buf[len++] = '1'; else if (len > 0 || i == 0) buf[len++] = '0'; @@ -853,30 +898,30 @@ _mesa_fprint_program_parameters(FILE *f, { GLuint i; - _mesa_fprintf(f, "InputsRead: 0x%x (0b%s)\n", + fprintf(f, "InputsRead: 0x%x (0b%s)\n", prog->InputsRead, binary(prog->InputsRead)); - _mesa_fprintf(f, "OutputsWritten: 0x%x (0b%s)\n", + fprintf(f, "OutputsWritten: 0x%llx (0b%s)\n", prog->OutputsWritten, binary(prog->OutputsWritten)); - _mesa_fprintf(f, "NumInstructions=%d\n", prog->NumInstructions); - _mesa_fprintf(f, "NumTemporaries=%d\n", prog->NumTemporaries); - _mesa_fprintf(f, "NumParameters=%d\n", prog->NumParameters); - _mesa_fprintf(f, "NumAttributes=%d\n", prog->NumAttributes); - _mesa_fprintf(f, "NumAddressRegs=%d\n", prog->NumAddressRegs); - _mesa_fprintf(f, "SamplersUsed: 0x%x (0b%s)\n", + fprintf(f, "NumInstructions=%d\n", prog->NumInstructions); + fprintf(f, "NumTemporaries=%d\n", prog->NumTemporaries); + fprintf(f, "NumParameters=%d\n", prog->NumParameters); + fprintf(f, "NumAttributes=%d\n", prog->NumAttributes); + fprintf(f, "NumAddressRegs=%d\n", prog->NumAddressRegs); + fprintf(f, "SamplersUsed: 0x%x (0b%s)\n", prog->SamplersUsed, binary(prog->SamplersUsed)); - _mesa_fprintf(f, "Samplers=[ "); + fprintf(f, "Samplers=[ "); for (i = 0; i < MAX_SAMPLERS; i++) { - _mesa_fprintf(f, "%d ", prog->SamplerUnits[i]); + fprintf(f, "%d ", prog->SamplerUnits[i]); } - _mesa_fprintf(f, "]\n"); + fprintf(f, "]\n"); _mesa_load_state_parameters(ctx, prog->Parameters); #if 0 - _mesa_fprintf(f, "Local Params:\n"); + fprintf(f, "Local Params:\n"); for (i = 0; i < MAX_PROGRAM_LOCAL_PARAMS; i++){ const GLfloat *p = prog->LocalParams[i]; - _mesa_fprintf(f, "%2d: %f, %f, %f, %f\n", i, p[0], p[1], p[2], p[3]); + fprintf(f, "%2d: %f, %f, %f, %f\n", i, p[0], p[1], p[2], p[3]); } #endif _mesa_print_parameter_list(prog->Parameters); @@ -907,24 +952,24 @@ _mesa_fprint_parameter_list(FILE *f, return; if (0) - _mesa_fprintf(f, "param list %p\n", (void *) list); - _mesa_fprintf(f, "dirty state flags: 0x%x\n", list->StateFlags); + fprintf(f, "param list %p\n", (void *) list); + fprintf(f, "dirty state flags: 0x%x\n", list->StateFlags); for (i = 0; i < list->NumParameters; i++){ struct gl_program_parameter *param = list->Parameters + i; const GLfloat *v = list->ParameterValues[i]; - _mesa_fprintf(f, "param[%d] sz=%d %s %s = {%.3g, %.3g, %.3g, %.3g}", - i, param->Size, - file_string(list->Parameters[i].Type, mode), - param->Name, v[0], v[1], v[2], v[3]); + fprintf(f, "param[%d] sz=%d %s %s = {%.3g, %.3g, %.3g, %.3g}", + i, param->Size, + file_string(list->Parameters[i].Type, mode), + param->Name, v[0], v[1], v[2], v[3]); if (param->Flags & PROG_PARAM_BIT_CENTROID) - _mesa_fprintf(f, " Centroid"); + fprintf(f, " Centroid"); if (param->Flags & PROG_PARAM_BIT_INVARIANT) - _mesa_fprintf(f, " Invariant"); + fprintf(f, " Invariant"); if (param->Flags & PROG_PARAM_BIT_FLAT) - _mesa_fprintf(f, " Flat"); + fprintf(f, " Flat"); if (param->Flags & PROG_PARAM_BIT_LINEAR) - _mesa_fprintf(f, " Linear"); - _mesa_fprintf(f, "\n"); + fprintf(f, " Linear"); + fprintf(f, "\n"); } } diff --git a/mesalib/src/mesa/shader/prog_print.h b/mesalib/src/mesa/shader/prog_print.h index fc286ded5..9ab745601 100644 --- a/mesalib/src/mesa/shader/prog_print.h +++ b/mesalib/src/mesa/shader/prog_print.h @@ -37,6 +37,12 @@ typedef enum { } gl_prog_print_mode; +extern void +_mesa_print_vp_inputs(GLbitfield inputs); + +extern void +_mesa_print_fp_inputs(GLbitfield inputs); + extern const char * _mesa_condcode_string(GLuint condcode); diff --git a/mesalib/src/mesa/shader/prog_statevars.c b/mesalib/src/mesa/shader/prog_statevars.c index 058d4bbaf..ead3ece95 100644 --- a/mesalib/src/mesa/shader/prog_statevars.c +++ b/mesalib/src/mesa/shader/prog_statevars.c @@ -31,7 +31,6 @@ #include "main/glheader.h" #include "main/context.h" -#include "main/hash.h" #include "main/imports.h" #include "main/macros.h" #include "main/mtypes.h" @@ -303,9 +302,11 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], matrix = &ctx->_ModelProjectMatrix; } else if (mat == STATE_TEXTURE_MATRIX) { + ASSERT(index < Elements(ctx->TextureMatrixStack)); matrix = ctx->TextureMatrixStack[index].Top; } else if (mat == STATE_PROGRAM_MATRIX) { + ASSERT(index < Elements(ctx->ProgramMatrixStack)); matrix = ctx->ProgramMatrixStack[index].Top; } else if (mat == STATE_COLOR_MATRIX) { @@ -444,6 +445,61 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[], value[3] = (GLfloat)(ctx->Fog.Density * ONE_DIV_SQRT_LN2); return; + case STATE_POINT_SIZE_CLAMPED: + { + /* this includes implementation dependent limits, to avoid + * another potentially necessary clamp. + * Note: for sprites, point smooth (point AA) is ignored + * and we'll clamp to MinPointSizeAA and MaxPointSize, because we + * expect drivers will want to say their minimum for AA size is 0.0 + * but for non-AA it's 1.0 (because normal points with size below 1.0 + * need to get rounded up to 1.0, hence never disappear). GL does + * not specify max clamp size for sprites, other than it needs to be + * at least as large as max AA size, hence use non-AA size there. + */ + GLfloat minImplSize; + GLfloat maxImplSize; + if (ctx->Point.PointSprite) { + minImplSize = ctx->Const.MinPointSizeAA; + maxImplSize = ctx->Const.MaxPointSize; + } + else if (ctx->Point.SmoothFlag || ctx->Multisample._Enabled) { + minImplSize = ctx->Const.MinPointSizeAA; + maxImplSize = ctx->Const.MaxPointSizeAA; + } + else { + minImplSize = ctx->Const.MinPointSize; + maxImplSize = ctx->Const.MaxPointSize; + } + value[0] = ctx->Point.Size; + value[1] = ctx->Point.MinSize >= minImplSize ? ctx->Point.MinSize : minImplSize; + value[2] = ctx->Point.MaxSize <= maxImplSize ? ctx->Point.MaxSize : maxImplSize; + value[3] = ctx->Point.Threshold; + } + return; + case STATE_POINT_SIZE_IMPL_CLAMP: + { + /* for implementation clamp only in vs */ + GLfloat minImplSize; + GLfloat maxImplSize; + if (ctx->Point.PointSprite) { + minImplSize = ctx->Const.MinPointSizeAA; + maxImplSize = ctx->Const.MaxPointSize; + } + else if (ctx->Point.SmoothFlag || ctx->Multisample._Enabled) { + minImplSize = ctx->Const.MinPointSizeAA; + maxImplSize = ctx->Const.MaxPointSizeAA; + } + else { + minImplSize = ctx->Const.MinPointSize; + maxImplSize = ctx->Const.MaxPointSize; + } + value[0] = ctx->Point.Size; + value[1] = minImplSize; + value[2] = maxImplSize; + value[3] = ctx->Point.Threshold; + } + return; case STATE_LIGHT_SPOT_DIR_NORMALIZED: { /* here, state[2] is the light number */ @@ -639,6 +695,9 @@ _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]) return _NEW_TEXTURE; case STATE_FOG_PARAMS_OPTIMIZED: return _NEW_FOG; + case STATE_POINT_SIZE_CLAMPED: + case STATE_POINT_SIZE_IMPL_CLAMP: + return _NEW_POINT | _NEW_MULTISAMPLE; case STATE_LIGHT_SPOT_DIR_NORMALIZED: case STATE_LIGHT_POSITION: case STATE_LIGHT_POSITION_NORMALIZED: @@ -830,6 +889,12 @@ append_token(char *dst, gl_state_index k) case STATE_FOG_PARAMS_OPTIMIZED: append(dst, "fogParamsOptimized"); break; + case STATE_POINT_SIZE_CLAMPED: + append(dst, "pointSizeClamped"); + break; + case STATE_POINT_SIZE_IMPL_CLAMP: + append(dst, "pointSizeImplClamp"); + break; case STATE_LIGHT_SPOT_DIR_NORMALIZED: append(dst, "lightSpotDirNormalized"); break; @@ -885,14 +950,14 @@ static void append_index(char *dst, GLint index) { char s[20]; - _mesa_sprintf(s, "[%d]", index); + sprintf(s, "[%d]", index); append(dst, s); } /** * Make a string from the given state vector. * For example, return "state.matrix.texture[2].inverse". - * Use _mesa_free() to deallocate the string. + * Use free() to deallocate the string. */ char * _mesa_program_state_string(const gl_state_index state[STATE_LENGTH]) @@ -964,9 +1029,9 @@ _mesa_program_state_string(const gl_state_index state[STATE_LENGTH]) if (modifier) append_token(str, modifier); if (firstRow == lastRow) - _mesa_sprintf(tmp, ".row[%d]", firstRow); + sprintf(tmp, ".row[%d]", firstRow); else - _mesa_sprintf(tmp, ".row[%d..%d]", firstRow, lastRow); + sprintf(tmp, ".row[%d..%d]", firstRow, lastRow); append(str, tmp); } break; @@ -1052,7 +1117,7 @@ static void load_transpose_matrix(GLfloat registers[][4], GLuint pos, const GLfloat mat[16]) { - MEMCPY(registers[pos], mat, 16 * sizeof(GLfloat)); + memcpy(registers[pos], mat, 16 * sizeof(GLfloat)); } @@ -1076,7 +1141,9 @@ _mesa_load_tracked_matrices(GLcontext *ctx) mat = ctx->ProjectionMatrixStack.Top; } else if (ctx->VertexProgram.TrackMatrix[i] == GL_TEXTURE) { - mat = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top; + GLuint unit = MIN2(ctx->Texture.CurrentUnit, + Elements(ctx->TextureMatrixStack) - 1); + mat = ctx->TextureMatrixStack[unit].Top; } else if (ctx->VertexProgram.TrackMatrix[i] == GL_COLOR) { mat = ctx->ColorMatrixStack.Top; @@ -1088,7 +1155,7 @@ _mesa_load_tracked_matrices(GLcontext *ctx) else if (ctx->VertexProgram.TrackMatrix[i] >= GL_MATRIX0_NV && ctx->VertexProgram.TrackMatrix[i] <= GL_MATRIX7_NV) { GLuint n = ctx->VertexProgram.TrackMatrix[i] - GL_MATRIX0_NV; - ASSERT(n < MAX_PROGRAM_MATRICES); + ASSERT(n < Elements(ctx->ProgramMatrixStack)); mat = ctx->ProgramMatrixStack[n].Top; } else { diff --git a/mesalib/src/mesa/shader/prog_statevars.h b/mesalib/src/mesa/shader/prog_statevars.h index 1180d9eaa..1753471ff 100644 --- a/mesalib/src/mesa/shader/prog_statevars.h +++ b/mesalib/src/mesa/shader/prog_statevars.h @@ -108,6 +108,8 @@ typedef enum gl_state_index_ { STATE_NORMAL_SCALE, STATE_TEXRECT_SCALE, STATE_FOG_PARAMS_OPTIMIZED, /* for faster fog calc */ + STATE_POINT_SIZE_CLAMPED, /* includes implementation dependent size clamp */ + STATE_POINT_SIZE_IMPL_CLAMP, /* for implementation clamp only in vs */ STATE_LIGHT_SPOT_DIR_NORMALIZED, /* pre-normalized spot dir */ STATE_LIGHT_POSITION, /* object vs eye space */ STATE_LIGHT_POSITION_NORMALIZED, /* object vs eye space */ diff --git a/mesalib/src/mesa/shader/prog_uniform.c b/mesalib/src/mesa/shader/prog_uniform.c index 064271314..c408a8492 100644 --- a/mesalib/src/mesa/shader/prog_uniform.c +++ b/mesalib/src/mesa/shader/prog_uniform.c @@ -45,10 +45,10 @@ _mesa_free_uniform_list(struct gl_uniform_list *list) { GLuint i; for (i = 0; i < list->NumUniforms; i++) { - _mesa_free((void *) list->Uniforms[i].Name); + free((void *) list->Uniforms[i].Name); } - _mesa_free(list->Uniforms); - _mesa_free(list); + free(list->Uniforms); + free(list); } @@ -128,7 +128,7 @@ _mesa_lookup_uniform(const struct gl_uniform_list *list, const char *name) { GLuint i; for (i = 0; list && i < list->NumUniforms; i++) { - if (!_mesa_strcmp(list->Uniforms[i].Name, name)) { + if (!strcmp(list->Uniforms[i].Name, name)) { return i; } } @@ -142,7 +142,7 @@ _mesa_longest_uniform_name(const struct gl_uniform_list *list) GLint max = 0; GLuint i; for (i = 0; list && i < list->NumUniforms; i++) { - GLint len = (GLint)_mesa_strlen(list->Uniforms[i].Name); + GLint len = (GLint) strlen(list->Uniforms[i].Name); if (len > max) max = len; } diff --git a/mesalib/src/mesa/shader/program.c b/mesalib/src/mesa/shader/program.c index 6b8d94e66..f4f701b54 100644 --- a/mesalib/src/mesa/shader/program.c +++ b/mesalib/src/mesa/shader/program.c @@ -127,11 +127,11 @@ _mesa_free_program_data(GLcontext *ctx) if (ctx->ATIFragmentShader.Current) { ctx->ATIFragmentShader.Current->RefCount--; if (ctx->ATIFragmentShader.Current->RefCount <= 0) { - _mesa_free(ctx->ATIFragmentShader.Current); + free(ctx->ATIFragmentShader.Current); } } #endif - _mesa_free((void *) ctx->Program.ErrorString); + free((void *) ctx->Program.ErrorString); } @@ -162,7 +162,7 @@ _mesa_update_default_objects_program(GLcontext *ctx) if (ctx->ATIFragmentShader.Current) { ctx->ATIFragmentShader.Current->RefCount--; if (ctx->ATIFragmentShader.Current->RefCount <= 0) { - _mesa_free(ctx->ATIFragmentShader.Current); + free(ctx->ATIFragmentShader.Current); } } ctx->ATIFragmentShader.Current = (struct ati_fragment_shader *) ctx->Shared->DefaultFragmentShader; @@ -180,7 +180,7 @@ void _mesa_set_program_error(GLcontext *ctx, GLint pos, const char *string) { ctx->Program.ErrorPos = pos; - _mesa_free((void *) ctx->Program.ErrorString); + free((void *) ctx->Program.ErrorString); if (!string) string = ""; ctx->Program.ErrorString = _mesa_strdup(string); @@ -190,7 +190,7 @@ _mesa_set_program_error(GLcontext *ctx, GLint pos, const char *string) /** * Find the line number and column for 'pos' within 'string'. * Return a copy of the line which contains 'pos'. Free the line with - * _mesa_free(). + * free(). * \param string the program string * \param pos the position within the string * \param line returns the line number corresponding to 'pos'. @@ -222,8 +222,8 @@ _mesa_find_line_column(const GLubyte *string, const GLubyte *pos, while (*p != 0 && *p != '\n') p++; len = p - lineStart; - s = (GLubyte *) _mesa_malloc(len + 1); - _mesa_memcpy(s, lineStart, len); + s = (GLubyte *) malloc(len + 1); + memcpy(s, lineStart, len); s[len] = 0; return s; @@ -240,7 +240,7 @@ _mesa_init_program_struct( GLcontext *ctx, struct gl_program *prog, (void) ctx; if (prog) { GLuint i; - _mesa_bzero(prog, sizeof(*prog)); + memset(prog, 0, sizeof(*prog)); prog->Id = id; prog->Target = target; prog->Resident = GL_TRUE; @@ -337,7 +337,7 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog) return; if (prog->String) - _mesa_free(prog->String); + free(prog->String); _mesa_free_instructions(prog->Instructions, prog->NumInstructions); @@ -351,7 +351,7 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog) _mesa_free_parameter_list(prog->Attributes); } - _mesa_free(prog); + free(prog); } @@ -505,6 +505,8 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) struct gl_fragment_program *fpc = (struct gl_fragment_program *) clone; fpc->FogOption = fp->FogOption; fpc->UsesKill = fp->UsesKill; + fpc->OriginUpperLeft = fp->OriginUpperLeft; + fpc->PixelCenterInteger = fp->PixelCenterInteger; } break; default: @@ -580,7 +582,7 @@ _mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count) for (i = 0; i < prog->NumInstructions; i++) { struct prog_instruction *inst = prog->Instructions + i; if (inst->BranchTarget > 0) { - if (inst->BranchTarget > start) { + if (inst->BranchTarget > (GLint) start) { inst->BranchTarget -= count; } } @@ -677,6 +679,8 @@ _mesa_combine_programs(GLcontext *ctx, const GLuint lenB = progB->NumInstructions; const GLuint numParamsA = _mesa_num_parameters(progA->Parameters); const GLuint newLength = lenA + lenB; + GLboolean usedTemps[MAX_PROGRAM_TEMPS]; + GLuint firstTemp = 0; GLbitfield inputsB; GLuint i; @@ -698,6 +702,10 @@ _mesa_combine_programs(GLcontext *ctx, newProg->Instructions = newInst; newProg->NumInstructions = newLength; + /* find used temp regs (we may need new temps below) */ + _mesa_find_used_registers(newProg, PROGRAM_TEMPORARY, + usedTemps, MAX_PROGRAM_TEMPS); + if (newProg->Target == GL_FRAGMENT_PROGRAM_ARB) { struct gl_fragment_program *fprogA, *fprogB, *newFprog; GLbitfield progB_inputsRead = progB->InputsRead; @@ -741,12 +749,15 @@ _mesa_combine_programs(GLcontext *ctx, */ if ((progA->OutputsWritten & (1 << FRAG_RESULT_COLOR)) && (progB_inputsRead & FRAG_BIT_COL0)) { - GLint tempReg = _mesa_find_free_register(newProg, PROGRAM_TEMPORARY); + GLint tempReg = _mesa_find_free_register(usedTemps, MAX_PROGRAM_TEMPS, + firstTemp); if (tempReg < 0) { _mesa_problem(ctx, "No free temp regs found in " "_mesa_combine_programs(), using 31"); tempReg = 31; } + firstTemp = tempReg + 1; + /* replace writes to result.color[0] with tempReg */ replace_registers(newInst, lenA, PROGRAM_OUTPUT, FRAG_RESULT_COLOR, @@ -784,53 +795,64 @@ _mesa_combine_programs(GLcontext *ctx, } - - /** - * Scan the given program to find a free register of the given type. - * \param regFile - PROGRAM_INPUT, PROGRAM_OUTPUT or PROGRAM_TEMPORARY + * Populate the 'used' array with flags indicating which registers (TEMPs, + * INPUTs, OUTPUTs, etc, are used by the given program. + * \param file type of register to scan for + * \param used returns true/false flags for in use / free + * \param usedSize size of the 'used' array */ -GLint -_mesa_find_free_register(const struct gl_program *prog, GLuint regFile) +void +_mesa_find_used_registers(const struct gl_program *prog, + gl_register_file file, + GLboolean used[], GLuint usedSize) { - GLboolean used[MAX_PROGRAM_TEMPS]; - GLuint i, k; - - assert(regFile == PROGRAM_INPUT || - regFile == PROGRAM_OUTPUT || - regFile == PROGRAM_TEMPORARY); + GLuint i, j; - _mesa_memset(used, 0, sizeof(used)); + memset(used, 0, usedSize); for (i = 0; i < prog->NumInstructions; i++) { const struct prog_instruction *inst = prog->Instructions + i; const GLuint n = _mesa_num_inst_src_regs(inst->Opcode); - /* check dst reg first */ - if (inst->DstReg.File == regFile) { + if (inst->DstReg.File == file) { used[inst->DstReg.Index] = GL_TRUE; } - else { - /* check src regs otherwise */ - for (k = 0; k < n; k++) { - if (inst->SrcReg[k].File == regFile) { - used[inst->SrcReg[k].Index] = GL_TRUE; - break; - } + + for (j = 0; j < n; j++) { + if (inst->SrcReg[j].File == file) { + used[inst->SrcReg[j].Index] = GL_TRUE; } } } +} - for (i = 0; i < MAX_PROGRAM_TEMPS; i++) { + +/** + * Scan the given 'used' register flag array for the first entry + * that's >= firstReg. + * \param used vector of flags indicating registers in use (as returned + * by _mesa_find_used_registers()) + * \param usedSize size of the 'used' array + * \param firstReg first register to start searching at + * \return index of unused register, or -1 if none. + */ +GLint +_mesa_find_free_register(const GLboolean used[], + GLuint usedSize, GLuint firstReg) +{ + GLuint i; + + assert(firstReg < usedSize); + + for (i = firstReg; i < usedSize; i++) if (!used[i]) return i; - } return -1; } - /** * "Post-process" a GPU program. This is intended to be used for debugging. * Example actions include no-op'ing instructions or changing instruction diff --git a/mesalib/src/mesa/shader/program.h b/mesalib/src/mesa/shader/program.h index 56a4191f5..af9f4170d 100644 --- a/mesalib/src/mesa/shader/program.h +++ b/mesalib/src/mesa/shader/program.h @@ -108,6 +108,22 @@ _mesa_reference_fragprog(GLcontext *ctx, extern struct gl_program * _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog); +static INLINE struct gl_vertex_program * +_mesa_clone_vertex_program(GLcontext *ctx, + const struct gl_vertex_program *prog) +{ + return (struct gl_vertex_program *) _mesa_clone_program(ctx, &prog->Base); +} + + +static INLINE struct gl_fragment_program * +_mesa_clone_fragment_program(GLcontext *ctx, + const struct gl_fragment_program *prog) +{ + return (struct gl_fragment_program *) _mesa_clone_program(ctx, &prog->Base); +} + + extern GLboolean _mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count); @@ -119,8 +135,14 @@ _mesa_combine_programs(GLcontext *ctx, const struct gl_program *progA, const struct gl_program *progB); +extern void +_mesa_find_used_registers(const struct gl_program *prog, + gl_register_file file, + GLboolean used[], GLuint usedSize); + extern GLint -_mesa_find_free_register(const struct gl_program *prog, GLuint regFile); +_mesa_find_free_register(const GLboolean used[], + GLuint maxRegs, GLuint firstReg); extern void _mesa_postprocess_program(GLcontext *ctx, struct gl_program *prog); diff --git a/mesalib/src/mesa/shader/program_lexer.l b/mesalib/src/mesa/shader/program_lexer.l index e2acb3c0c..fe18272cd 100644 --- a/mesalib/src/mesa/shader/program_lexer.l +++ b/mesalib/src/mesa/shader/program_lexer.l @@ -23,12 +23,12 @@ */ #include "main/glheader.h" #include "main/imports.h" -#include "prog_instruction.h" -#include "prog_statevars.h" +#include "shader/prog_instruction.h" +#include "shader/prog_statevars.h" -#include "symbol_table.h" -#include "program_parser.h" -#include "program_parse.tab.h" +#include "shader/symbol_table.h" +#include "shader/program_parser.h" +#include "shader/program_parse.tab.h" #define require_ARB_vp (yyextra->mode == ARB_vertex) #define require_ARB_fp (yyextra->mode == ARB_fragment) @@ -324,19 +324,19 @@ ARRAYSHADOW2D { return_token_or_IDENTIFIER(require_ARB_fp && require return INTEGER; } {num}?{frac}{exp}? { - yylval->real = _mesa_strtod(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return REAL; } {num}"."/[^.] { - yylval->real = _mesa_strtod(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return REAL; } {num}{exp} { - yylval->real = _mesa_strtod(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return REAL; } {num}"."{exp} { - yylval->real = _mesa_strtod(yytext, NULL); + yylval->real = _mesa_strtof(yytext, NULL); return REAL; } diff --git a/mesalib/src/mesa/shader/program_parse.tab.c b/mesalib/src/mesa/shader/program_parse.tab.c index d4f842948..5679b6497 100644 --- a/mesalib/src/mesa/shader/program_parse.tab.c +++ b/mesalib/src/mesa/shader/program_parse.tab.c @@ -98,14 +98,14 @@ #include "main/mtypes.h" #include "main/imports.h" -#include "program.h" -#include "prog_parameter.h" -#include "prog_parameter_layout.h" -#include "prog_statevars.h" -#include "prog_instruction.h" +#include "shader/program.h" +#include "shader/prog_parameter.h" +#include "shader/prog_parameter_layout.h" +#include "shader/prog_statevars.h" +#include "shader/prog_instruction.h" -#include "symbol_table.h" -#include "program_parser.h" +#include "shader/symbol_table.h" +#include "shader/program_parser.h" extern void *yy_scan_string(char *); extern void yy_delete_buffer(void *); @@ -123,7 +123,8 @@ static int initialize_symbol_from_param(struct gl_program *prog, struct asm_symbol *param_var, const gl_state_index tokens[STATE_LENGTH]); static int initialize_symbol_from_const(struct gl_program *prog, - struct asm_symbol *param_var, const struct asm_vector *vec); + struct asm_symbol *param_var, const struct asm_vector *vec, + GLboolean allowSwizzle); static int yyparse(struct asm_parser_state *state); @@ -145,6 +146,9 @@ static void init_src_reg(struct asm_src_register *r); static void set_src_reg(struct asm_src_register *r, gl_register_file file, GLint index); +static void set_src_reg_swz(struct asm_src_register *r, + gl_register_file file, GLint index, GLuint swizzle); + static void asm_instruction_set_operands(struct asm_instruction *inst, const struct prog_dst_register *dst, const struct asm_src_register *src0, const struct asm_src_register *src1, const struct asm_src_register *src2); @@ -185,7 +189,7 @@ static struct asm_instruction *asm_instruction_copy_ctor( /* Line 189 of yacc.c */ -#line 189 "program_parse.tab.c" +#line 193 "program_parse.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -327,7 +331,7 @@ typedef union YYSTYPE { /* Line 214 of yacc.c */ -#line 122 "program_parse.y" +#line 126 "program_parse.y" struct asm_instruction *inst; struct asm_symbol *sym; @@ -356,7 +360,7 @@ typedef union YYSTYPE /* Line 214 of yacc.c */ -#line 360 "program_parse.tab.c" +#line 364 "program_parse.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -380,14 +384,14 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ /* Line 264 of yacc.c */ -#line 267 "program_parse.y" +#line 271 "program_parse.y" extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, void *yyscanner); /* Line 264 of yacc.c */ -#line 391 "program_parse.tab.c" +#line 395 "program_parse.tab.c" #ifdef short # undef short @@ -788,35 +792,35 @@ static const yytype_int16 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 274, 274, 277, 285, 297, 298, 301, 325, 326, - 329, 344, 347, 352, 359, 360, 361, 362, 363, 364, - 365, 368, 369, 370, 373, 379, 385, 391, 398, 404, - 411, 455, 460, 470, 514, 520, 521, 522, 523, 524, - 525, 526, 527, 528, 529, 530, 531, 534, 546, 554, - 571, 578, 595, 606, 626, 651, 658, 691, 698, 713, - 768, 809, 818, 839, 848, 852, 881, 900, 900, 902, - 909, 921, 922, 923, 926, 940, 954, 974, 985, 997, - 999, 1000, 1001, 1002, 1005, 1005, 1005, 1005, 1006, 1009, - 1013, 1018, 1025, 1032, 1039, 1062, 1085, 1086, 1087, 1088, - 1089, 1090, 1093, 1112, 1116, 1122, 1126, 1130, 1134, 1143, - 1152, 1156, 1161, 1167, 1178, 1178, 1179, 1181, 1185, 1189, - 1193, 1199, 1199, 1201, 1218, 1243, 1246, 1257, 1263, 1269, - 1270, 1277, 1283, 1289, 1297, 1303, 1309, 1317, 1323, 1329, - 1337, 1338, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, - 1349, 1350, 1351, 1354, 1363, 1367, 1371, 1377, 1386, 1390, - 1394, 1403, 1407, 1413, 1419, 1426, 1431, 1439, 1449, 1451, - 1459, 1465, 1469, 1473, 1479, 1490, 1499, 1503, 1508, 1512, - 1516, 1520, 1526, 1533, 1537, 1543, 1551, 1562, 1569, 1573, - 1579, 1589, 1600, 1604, 1622, 1631, 1634, 1640, 1644, 1648, - 1654, 1665, 1670, 1675, 1680, 1685, 1690, 1698, 1701, 1706, - 1719, 1727, 1738, 1746, 1746, 1748, 1748, 1750, 1760, 1765, - 1772, 1782, 1791, 1796, 1803, 1813, 1823, 1835, 1835, 1836, - 1836, 1838, 1848, 1856, 1866, 1874, 1882, 1891, 1902, 1906, - 1912, 1913, 1914, 1917, 1917, 1920, 1955, 1959, 1959, 1962, - 1969, 1978, 1992, 2001, 2010, 2014, 2023, 2032, 2043, 2050, - 2055, 2064, 2076, 2079, 2088, 2099, 2100, 2101, 2104, 2105, - 2106, 2109, 2110, 2113, 2114, 2117, 2118, 2121, 2132, 2143, - 2154, 2180, 2181 + 0, 278, 278, 281, 289, 301, 302, 305, 329, 330, + 333, 348, 351, 356, 363, 364, 365, 366, 367, 368, + 369, 372, 373, 374, 377, 383, 389, 395, 402, 408, + 415, 459, 464, 474, 518, 524, 525, 526, 527, 528, + 529, 530, 531, 532, 533, 534, 535, 538, 550, 558, + 575, 582, 601, 612, 632, 657, 664, 697, 704, 719, + 774, 817, 826, 847, 857, 861, 890, 909, 909, 911, + 918, 930, 931, 932, 935, 949, 963, 983, 994, 1006, + 1008, 1009, 1010, 1011, 1014, 1014, 1014, 1014, 1015, 1018, + 1022, 1027, 1034, 1041, 1048, 1071, 1094, 1095, 1096, 1097, + 1098, 1099, 1102, 1121, 1125, 1131, 1135, 1139, 1143, 1152, + 1161, 1165, 1170, 1176, 1187, 1187, 1188, 1190, 1194, 1198, + 1202, 1208, 1208, 1210, 1228, 1254, 1257, 1268, 1274, 1280, + 1281, 1288, 1294, 1300, 1308, 1314, 1320, 1328, 1334, 1340, + 1348, 1349, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, + 1360, 1361, 1362, 1365, 1374, 1378, 1382, 1388, 1397, 1401, + 1405, 1414, 1418, 1424, 1430, 1437, 1442, 1450, 1460, 1462, + 1470, 1476, 1480, 1484, 1490, 1501, 1510, 1514, 1519, 1523, + 1527, 1531, 1537, 1544, 1548, 1554, 1562, 1573, 1580, 1584, + 1590, 1600, 1611, 1615, 1633, 1642, 1645, 1651, 1655, 1659, + 1665, 1676, 1681, 1686, 1691, 1696, 1701, 1709, 1712, 1717, + 1730, 1738, 1749, 1757, 1757, 1759, 1759, 1761, 1771, 1776, + 1783, 1793, 1802, 1807, 1814, 1824, 1834, 1846, 1846, 1847, + 1847, 1849, 1859, 1867, 1877, 1885, 1893, 1902, 1913, 1917, + 1923, 1924, 1925, 1928, 1928, 1931, 1966, 1970, 1970, 1973, + 1980, 1989, 2003, 2012, 2021, 2025, 2034, 2043, 2054, 2061, + 2066, 2075, 2087, 2090, 2099, 2110, 2111, 2112, 2115, 2116, + 2117, 2120, 2121, 2124, 2125, 2128, 2129, 2132, 2143, 2154, + 2165, 2191, 2192 }; #endif @@ -2125,7 +2129,7 @@ yyreduce: case 3: /* Line 1455 of yacc.c */ -#line 278 "program_parse.y" +#line 282 "program_parse.y" { if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) { yyerror(& (yylsp[(1) - (1)]), state, "invalid fragment program header"); @@ -2138,7 +2142,7 @@ yyreduce: case 4: /* Line 1455 of yacc.c */ -#line 286 "program_parse.y" +#line 290 "program_parse.y" { if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex program header"); @@ -2153,7 +2157,7 @@ yyreduce: case 7: /* Line 1455 of yacc.c */ -#line 302 "program_parse.y" +#line 306 "program_parse.y" { int valid = 0; @@ -2180,7 +2184,7 @@ yyreduce: case 10: /* Line 1455 of yacc.c */ -#line 330 "program_parse.y" +#line 334 "program_parse.y" { if ((yyvsp[(1) - (2)].inst) != NULL) { if (state->inst_tail == NULL) { @@ -2200,7 +2204,7 @@ yyreduce: case 12: /* Line 1455 of yacc.c */ -#line 348 "program_parse.y" +#line 352 "program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); state->prog->NumAluInstructions++; @@ -2210,7 +2214,7 @@ yyreduce: case 13: /* Line 1455 of yacc.c */ -#line 353 "program_parse.y" +#line 357 "program_parse.y" { (yyval.inst) = (yyvsp[(1) - (1)].inst); state->prog->NumTexInstructions++; @@ -2220,7 +2224,7 @@ yyreduce: case 24: /* Line 1455 of yacc.c */ -#line 374 "program_parse.y" +#line 378 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2229,7 +2233,7 @@ yyreduce: case 25: /* Line 1455 of yacc.c */ -#line 380 "program_parse.y" +#line 384 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2238,7 +2242,7 @@ yyreduce: case 26: /* Line 1455 of yacc.c */ -#line 386 "program_parse.y" +#line 390 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); ;} @@ -2247,7 +2251,7 @@ yyreduce: case 27: /* Line 1455 of yacc.c */ -#line 392 "program_parse.y" +#line 396 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); ;} @@ -2256,7 +2260,7 @@ yyreduce: case 28: /* Line 1455 of yacc.c */ -#line 399 "program_parse.y" +#line 403 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); ;} @@ -2265,7 +2269,7 @@ yyreduce: case 29: /* Line 1455 of yacc.c */ -#line 406 "program_parse.y" +#line 410 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg)); ;} @@ -2274,7 +2278,7 @@ yyreduce: case 30: /* Line 1455 of yacc.c */ -#line 412 "program_parse.y" +#line 416 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL); if ((yyval.inst) != NULL) { @@ -2321,7 +2325,7 @@ yyreduce: case 31: /* Line 1455 of yacc.c */ -#line 456 "program_parse.y" +#line 460 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL); state->fragment.UsesKill = 1; @@ -2331,7 +2335,7 @@ yyreduce: case 32: /* Line 1455 of yacc.c */ -#line 461 "program_parse.y" +#line 465 "program_parse.y" { (yyval.inst) = asm_instruction_ctor(OPCODE_KIL_NV, NULL, NULL, NULL, NULL); (yyval.inst)->Base.DstReg.CondMask = (yyvsp[(2) - (2)].dst_reg).CondMask; @@ -2344,7 +2348,7 @@ yyreduce: case 33: /* Line 1455 of yacc.c */ -#line 471 "program_parse.y" +#line 475 "program_parse.y" { (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (12)].temp_inst), & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg)); if ((yyval.inst) != NULL) { @@ -2391,7 +2395,7 @@ yyreduce: case 34: /* Line 1455 of yacc.c */ -#line 515 "program_parse.y" +#line 519 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} @@ -2400,91 +2404,91 @@ yyreduce: case 35: /* Line 1455 of yacc.c */ -#line 520 "program_parse.y" +#line 524 "program_parse.y" { (yyval.integer) = TEXTURE_1D_INDEX; ;} break; case 36: /* Line 1455 of yacc.c */ -#line 521 "program_parse.y" +#line 525 "program_parse.y" { (yyval.integer) = TEXTURE_2D_INDEX; ;} break; case 37: /* Line 1455 of yacc.c */ -#line 522 "program_parse.y" +#line 526 "program_parse.y" { (yyval.integer) = TEXTURE_3D_INDEX; ;} break; case 38: /* Line 1455 of yacc.c */ -#line 523 "program_parse.y" +#line 527 "program_parse.y" { (yyval.integer) = TEXTURE_CUBE_INDEX; ;} break; case 39: /* Line 1455 of yacc.c */ -#line 524 "program_parse.y" +#line 528 "program_parse.y" { (yyval.integer) = TEXTURE_RECT_INDEX; ;} break; case 40: /* Line 1455 of yacc.c */ -#line 525 "program_parse.y" +#line 529 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_INDEX; ;} break; case 41: /* Line 1455 of yacc.c */ -#line 526 "program_parse.y" +#line 530 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_INDEX; ;} break; case 42: /* Line 1455 of yacc.c */ -#line 527 "program_parse.y" +#line 531 "program_parse.y" { (yyval.integer) = -TEXTURE_RECT_INDEX; ;} break; case 43: /* Line 1455 of yacc.c */ -#line 528 "program_parse.y" +#line 532 "program_parse.y" { (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;} break; case 44: /* Line 1455 of yacc.c */ -#line 529 "program_parse.y" +#line 533 "program_parse.y" { (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;} break; case 45: /* Line 1455 of yacc.c */ -#line 530 "program_parse.y" +#line 534 "program_parse.y" { (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;} break; case 46: /* Line 1455 of yacc.c */ -#line 531 "program_parse.y" +#line 535 "program_parse.y" { (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;} break; case 47: /* Line 1455 of yacc.c */ -#line 535 "program_parse.y" +#line 539 "program_parse.y" { /* FIXME: Is this correct? Should the extenedSwizzle be applied * FIXME: to the existing swizzle? @@ -2499,7 +2503,7 @@ yyreduce: case 48: /* Line 1455 of yacc.c */ -#line 547 "program_parse.y" +#line 551 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (2)].src_reg); @@ -2512,7 +2516,7 @@ yyreduce: case 49: /* Line 1455 of yacc.c */ -#line 555 "program_parse.y" +#line 559 "program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (4)].src_reg); @@ -2532,7 +2536,7 @@ yyreduce: case 50: /* Line 1455 of yacc.c */ -#line 572 "program_parse.y" +#line 576 "program_parse.y" { (yyval.src_reg) = (yyvsp[(1) - (2)].src_reg); @@ -2544,7 +2548,7 @@ yyreduce: case 51: /* Line 1455 of yacc.c */ -#line 579 "program_parse.y" +#line 583 "program_parse.y" { struct asm_symbol temp_sym; @@ -2555,16 +2559,18 @@ yyreduce: memset(& temp_sym, 0, sizeof(temp_sym)); temp_sym.param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & temp_sym, & (yyvsp[(1) - (1)].vector)); + initialize_symbol_from_const(state->prog, & temp_sym, & (yyvsp[(1) - (1)].vector), GL_TRUE); - set_src_reg(& (yyval.src_reg), PROGRAM_CONSTANT, temp_sym.param_binding_begin); + set_src_reg_swz(& (yyval.src_reg), PROGRAM_CONSTANT, + temp_sym.param_binding_begin, + temp_sym.param_binding_swizzle); ;} break; case 52: /* Line 1455 of yacc.c */ -#line 596 "program_parse.y" +#line 602 "program_parse.y" { (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); @@ -2580,7 +2586,7 @@ yyreduce: case 53: /* Line 1455 of yacc.c */ -#line 607 "program_parse.y" +#line 613 "program_parse.y" { (yyval.src_reg) = (yyvsp[(3) - (5)].src_reg); @@ -2602,7 +2608,7 @@ yyreduce: case 54: /* Line 1455 of yacc.c */ -#line 627 "program_parse.y" +#line 633 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (3)].dst_reg); (yyval.dst_reg).WriteMask = (yyvsp[(2) - (3)].swiz_mask).mask; @@ -2630,7 +2636,7 @@ yyreduce: case 55: /* Line 1455 of yacc.c */ -#line 652 "program_parse.y" +#line 658 "program_parse.y" { set_dst_reg(& (yyval.dst_reg), PROGRAM_ADDRESS, 0); (yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask; @@ -2640,7 +2646,7 @@ yyreduce: case 56: /* Line 1455 of yacc.c */ -#line 659 "program_parse.y" +#line 665 "program_parse.y" { const unsigned xyzw_valid = ((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0) @@ -2676,7 +2682,7 @@ yyreduce: case 57: /* Line 1455 of yacc.c */ -#line 692 "program_parse.y" +#line 698 "program_parse.y" { (yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle); (yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0; @@ -2686,7 +2692,7 @@ yyreduce: case 58: /* Line 1455 of yacc.c */ -#line 699 "program_parse.y" +#line 705 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) { yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); @@ -2706,7 +2712,7 @@ yyreduce: case 59: /* Line 1455 of yacc.c */ -#line 714 "program_parse.y" +#line 720 "program_parse.y" { char s; @@ -2764,7 +2770,7 @@ yyreduce: case 60: /* Line 1455 of yacc.c */ -#line 769 "program_parse.y" +#line 775 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2789,7 +2795,9 @@ yyreduce: set_src_reg(& (yyval.src_reg), PROGRAM_TEMPORARY, s->temp_binding); break; case at_param: - set_src_reg(& (yyval.src_reg), s->param_binding_type, s->param_binding_begin); + set_src_reg_swz(& (yyval.src_reg), s->param_binding_type, + s->param_binding_begin, + s->param_binding_swizzle); break; case at_attrib: set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, s->attrib_binding); @@ -2810,7 +2818,7 @@ yyreduce: case 61: /* Line 1455 of yacc.c */ -#line 810 "program_parse.y" +#line 818 "program_parse.y" { set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, (yyvsp[(1) - (1)].attrib)); state->prog->InputsRead |= (1U << (yyval.src_reg).Base.Index); @@ -2824,7 +2832,7 @@ yyreduce: case 62: /* Line 1455 of yacc.c */ -#line 819 "program_parse.y" +#line 827 "program_parse.y" { if (! (yyvsp[(3) - (4)].src_reg).Base.RelAddr && ((unsigned) (yyvsp[(3) - (4)].src_reg).Base.Index >= (yyvsp[(1) - (4)].sym)->param_binding_length)) { @@ -2850,19 +2858,20 @@ yyreduce: case 63: /* Line 1455 of yacc.c */ -#line 840 "program_parse.y" +#line 848 "program_parse.y" { gl_register_file file = ((yyvsp[(1) - (1)].temp_sym).name != NULL) ? (yyvsp[(1) - (1)].temp_sym).param_binding_type : PROGRAM_CONSTANT; - set_src_reg(& (yyval.src_reg), file, (yyvsp[(1) - (1)].temp_sym).param_binding_begin); + set_src_reg_swz(& (yyval.src_reg), file, (yyvsp[(1) - (1)].temp_sym).param_binding_begin, + (yyvsp[(1) - (1)].temp_sym).param_binding_swizzle); ;} break; case 64: /* Line 1455 of yacc.c */ -#line 849 "program_parse.y" +#line 858 "program_parse.y" { set_dst_reg(& (yyval.dst_reg), PROGRAM_OUTPUT, (yyvsp[(1) - (1)].result)); ;} @@ -2871,7 +2880,7 @@ yyreduce: case 65: /* Line 1455 of yacc.c */ -#line 853 "program_parse.y" +#line 862 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2903,7 +2912,7 @@ yyreduce: case 66: /* Line 1455 of yacc.c */ -#line 882 "program_parse.y" +#line 891 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -2925,7 +2934,7 @@ yyreduce: case 69: /* Line 1455 of yacc.c */ -#line 903 "program_parse.y" +#line 912 "program_parse.y" { init_src_reg(& (yyval.src_reg)); (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer); @@ -2935,7 +2944,7 @@ yyreduce: case 70: /* Line 1455 of yacc.c */ -#line 910 "program_parse.y" +#line 919 "program_parse.y" { /* FINISHME: Add support for multiple address registers. */ @@ -2950,28 +2959,28 @@ yyreduce: case 71: /* Line 1455 of yacc.c */ -#line 921 "program_parse.y" +#line 930 "program_parse.y" { (yyval.integer) = 0; ;} break; case 72: /* Line 1455 of yacc.c */ -#line 922 "program_parse.y" +#line 931 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 73: /* Line 1455 of yacc.c */ -#line 923 "program_parse.y" +#line 932 "program_parse.y" { (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;} break; case 74: /* Line 1455 of yacc.c */ -#line 927 "program_parse.y" +#line 936 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) { char s[100]; @@ -2988,7 +2997,7 @@ yyreduce: case 75: /* Line 1455 of yacc.c */ -#line 941 "program_parse.y" +#line 950 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) { char s[100]; @@ -3005,7 +3014,7 @@ yyreduce: case 76: /* Line 1455 of yacc.c */ -#line 955 "program_parse.y" +#line 964 "program_parse.y" { struct asm_symbol *const s = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); @@ -3028,7 +3037,7 @@ yyreduce: case 77: /* Line 1455 of yacc.c */ -#line 975 "program_parse.y" +#line 984 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector"); @@ -3042,7 +3051,7 @@ yyreduce: case 78: /* Line 1455 of yacc.c */ -#line 986 "program_parse.y" +#line 995 "program_parse.y" { if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { yyerror(& (yylsp[(1) - (1)]), state, @@ -3057,21 +3066,21 @@ yyreduce: case 83: /* Line 1455 of yacc.c */ -#line 1002 "program_parse.y" +#line 1011 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 88: /* Line 1455 of yacc.c */ -#line 1006 "program_parse.y" +#line 1015 "program_parse.y" { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;} break; case 89: /* Line 1455 of yacc.c */ -#line 1010 "program_parse.y" +#line 1019 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); ;} @@ -3080,7 +3089,7 @@ yyreduce: case 90: /* Line 1455 of yacc.c */ -#line 1014 "program_parse.y" +#line 1023 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); ;} @@ -3089,7 +3098,7 @@ yyreduce: case 91: /* Line 1455 of yacc.c */ -#line 1018 "program_parse.y" +#line 1027 "program_parse.y" { (yyval.dst_reg).CondMask = COND_TR; (yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP; @@ -3100,7 +3109,7 @@ yyreduce: case 92: /* Line 1455 of yacc.c */ -#line 1026 "program_parse.y" +#line 1035 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle; @@ -3110,7 +3119,7 @@ yyreduce: case 93: /* Line 1455 of yacc.c */ -#line 1033 "program_parse.y" +#line 1042 "program_parse.y" { (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle; @@ -3120,7 +3129,7 @@ yyreduce: case 94: /* Line 1455 of yacc.c */ -#line 1040 "program_parse.y" +#line 1049 "program_parse.y" { const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) { @@ -3131,7 +3140,7 @@ yyreduce: ? err_str : "invalid condition code"); if (err_str != NULL) { - _mesa_free(err_str); + free(err_str); } YYERROR; @@ -3146,7 +3155,7 @@ yyreduce: case 95: /* Line 1455 of yacc.c */ -#line 1063 "program_parse.y" +#line 1072 "program_parse.y" { const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) { @@ -3157,7 +3166,7 @@ yyreduce: ? err_str : "invalid condition code"); if (err_str != NULL) { - _mesa_free(err_str); + free(err_str); } YYERROR; @@ -3172,7 +3181,7 @@ yyreduce: case 102: /* Line 1455 of yacc.c */ -#line 1094 "program_parse.y" +#line 1103 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)])); @@ -3194,7 +3203,7 @@ yyreduce: case 103: /* Line 1455 of yacc.c */ -#line 1113 "program_parse.y" +#line 1122 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} @@ -3203,7 +3212,7 @@ yyreduce: case 104: /* Line 1455 of yacc.c */ -#line 1117 "program_parse.y" +#line 1126 "program_parse.y" { (yyval.attrib) = (yyvsp[(2) - (2)].attrib); ;} @@ -3212,7 +3221,7 @@ yyreduce: case 105: /* Line 1455 of yacc.c */ -#line 1123 "program_parse.y" +#line 1132 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_POS; ;} @@ -3221,7 +3230,7 @@ yyreduce: case 106: /* Line 1455 of yacc.c */ -#line 1127 "program_parse.y" +#line 1136 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_WEIGHT; ;} @@ -3230,7 +3239,7 @@ yyreduce: case 107: /* Line 1455 of yacc.c */ -#line 1131 "program_parse.y" +#line 1140 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_NORMAL; ;} @@ -3239,7 +3248,7 @@ yyreduce: case 108: /* Line 1455 of yacc.c */ -#line 1135 "program_parse.y" +#line 1144 "program_parse.y" { if (!state->ctx->Extensions.EXT_secondary_color) { yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported"); @@ -3253,7 +3262,7 @@ yyreduce: case 109: /* Line 1455 of yacc.c */ -#line 1144 "program_parse.y" +#line 1153 "program_parse.y" { if (!state->ctx->Extensions.EXT_fog_coord) { yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported"); @@ -3267,7 +3276,7 @@ yyreduce: case 110: /* Line 1455 of yacc.c */ -#line 1153 "program_parse.y" +#line 1162 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} @@ -3276,7 +3285,7 @@ yyreduce: case 111: /* Line 1455 of yacc.c */ -#line 1157 "program_parse.y" +#line 1166 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -3286,7 +3295,7 @@ yyreduce: case 112: /* Line 1455 of yacc.c */ -#line 1162 "program_parse.y" +#line 1171 "program_parse.y" { (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); ;} @@ -3295,7 +3304,7 @@ yyreduce: case 113: /* Line 1455 of yacc.c */ -#line 1168 "program_parse.y" +#line 1177 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference"); @@ -3309,7 +3318,7 @@ yyreduce: case 117: /* Line 1455 of yacc.c */ -#line 1182 "program_parse.y" +#line 1191 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_WPOS; ;} @@ -3318,7 +3327,7 @@ yyreduce: case 118: /* Line 1455 of yacc.c */ -#line 1186 "program_parse.y" +#line 1195 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); ;} @@ -3327,7 +3336,7 @@ yyreduce: case 119: /* Line 1455 of yacc.c */ -#line 1190 "program_parse.y" +#line 1199 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_FOGC; ;} @@ -3336,7 +3345,7 @@ yyreduce: case 120: /* Line 1455 of yacc.c */ -#line 1194 "program_parse.y" +#line 1203 "program_parse.y" { (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); ;} @@ -3345,7 +3354,7 @@ yyreduce: case 123: /* Line 1455 of yacc.c */ -#line 1202 "program_parse.y" +#line 1211 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)])); @@ -3357,6 +3366,7 @@ yyreduce: s->param_binding_type = (yyvsp[(3) - (3)].temp_sym).param_binding_type; s->param_binding_begin = (yyvsp[(3) - (3)].temp_sym).param_binding_begin; s->param_binding_length = (yyvsp[(3) - (3)].temp_sym).param_binding_length; + s->param_binding_swizzle = SWIZZLE_XYZW; s->param_is_array = 0; } ;} @@ -3365,7 +3375,7 @@ yyreduce: case 124: /* Line 1455 of yacc.c */ -#line 1219 "program_parse.y" +#line 1229 "program_parse.y" { if (((yyvsp[(4) - (6)].integer) != 0) && ((unsigned) (yyvsp[(4) - (6)].integer) != (yyvsp[(6) - (6)].temp_sym).param_binding_length)) { free((yyvsp[(2) - (6)].string)); @@ -3383,6 +3393,7 @@ yyreduce: s->param_binding_type = (yyvsp[(6) - (6)].temp_sym).param_binding_type; s->param_binding_begin = (yyvsp[(6) - (6)].temp_sym).param_binding_begin; s->param_binding_length = (yyvsp[(6) - (6)].temp_sym).param_binding_length; + s->param_binding_swizzle = SWIZZLE_XYZW; s->param_is_array = 1; } } @@ -3392,7 +3403,7 @@ yyreduce: case 125: /* Line 1455 of yacc.c */ -#line 1243 "program_parse.y" +#line 1254 "program_parse.y" { (yyval.integer) = 0; ;} @@ -3401,7 +3412,7 @@ yyreduce: case 126: /* Line 1455 of yacc.c */ -#line 1247 "program_parse.y" +#line 1258 "program_parse.y" { if (((yyvsp[(1) - (1)].integer) < 1) || ((unsigned) (yyvsp[(1) - (1)].integer) > state->limits->MaxParameters)) { yyerror(& (yylsp[(1) - (1)]), state, "invalid parameter array size"); @@ -3415,7 +3426,7 @@ yyreduce: case 127: /* Line 1455 of yacc.c */ -#line 1258 "program_parse.y" +#line 1269 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); ;} @@ -3424,7 +3435,7 @@ yyreduce: case 128: /* Line 1455 of yacc.c */ -#line 1264 "program_parse.y" +#line 1275 "program_parse.y" { (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); ;} @@ -3433,7 +3444,7 @@ yyreduce: case 130: /* Line 1455 of yacc.c */ -#line 1271 "program_parse.y" +#line 1282 "program_parse.y" { (yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length; (yyval.temp_sym) = (yyvsp[(1) - (3)].temp_sym); @@ -3443,7 +3454,7 @@ yyreduce: case 131: /* Line 1455 of yacc.c */ -#line 1278 "program_parse.y" +#line 1289 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3454,7 +3465,7 @@ yyreduce: case 132: /* Line 1455 of yacc.c */ -#line 1284 "program_parse.y" +#line 1295 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3465,18 +3476,18 @@ yyreduce: case 133: /* Line 1455 of yacc.c */ -#line 1290 "program_parse.y" +#line 1301 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & (yyval.temp_sym), & (yyvsp[(1) - (1)].vector)); + initialize_symbol_from_const(state->prog, & (yyval.temp_sym), & (yyvsp[(1) - (1)].vector), GL_TRUE); ;} break; case 134: /* Line 1455 of yacc.c */ -#line 1298 "program_parse.y" +#line 1309 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3487,7 +3498,7 @@ yyreduce: case 135: /* Line 1455 of yacc.c */ -#line 1304 "program_parse.y" +#line 1315 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3498,18 +3509,18 @@ yyreduce: case 136: /* Line 1455 of yacc.c */ -#line 1310 "program_parse.y" +#line 1321 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & (yyval.temp_sym), & (yyvsp[(1) - (1)].vector)); + initialize_symbol_from_const(state->prog, & (yyval.temp_sym), & (yyvsp[(1) - (1)].vector), GL_TRUE); ;} break; case 137: /* Line 1455 of yacc.c */ -#line 1318 "program_parse.y" +#line 1329 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3520,7 +3531,7 @@ yyreduce: case 138: /* Line 1455 of yacc.c */ -#line 1324 "program_parse.y" +#line 1335 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; @@ -3531,109 +3542,109 @@ yyreduce: case 139: /* Line 1455 of yacc.c */ -#line 1330 "program_parse.y" +#line 1341 "program_parse.y" { memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & (yyval.temp_sym), & (yyvsp[(1) - (1)].vector)); + initialize_symbol_from_const(state->prog, & (yyval.temp_sym), & (yyvsp[(1) - (1)].vector), GL_FALSE); ;} break; case 140: /* Line 1455 of yacc.c */ -#line 1337 "program_parse.y" +#line 1348 "program_parse.y" { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;} break; case 141: /* Line 1455 of yacc.c */ -#line 1338 "program_parse.y" +#line 1349 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 142: /* Line 1455 of yacc.c */ -#line 1341 "program_parse.y" +#line 1352 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 143: /* Line 1455 of yacc.c */ -#line 1342 "program_parse.y" +#line 1353 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 144: /* Line 1455 of yacc.c */ -#line 1343 "program_parse.y" +#line 1354 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 145: /* Line 1455 of yacc.c */ -#line 1344 "program_parse.y" +#line 1355 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 146: /* Line 1455 of yacc.c */ -#line 1345 "program_parse.y" +#line 1356 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 147: /* Line 1455 of yacc.c */ -#line 1346 "program_parse.y" +#line 1357 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 148: /* Line 1455 of yacc.c */ -#line 1347 "program_parse.y" +#line 1358 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 149: /* Line 1455 of yacc.c */ -#line 1348 "program_parse.y" +#line 1359 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 150: /* Line 1455 of yacc.c */ -#line 1349 "program_parse.y" +#line 1360 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 151: /* Line 1455 of yacc.c */ -#line 1350 "program_parse.y" +#line 1361 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 152: /* Line 1455 of yacc.c */ -#line 1351 "program_parse.y" +#line 1362 "program_parse.y" { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;} break; case 153: /* Line 1455 of yacc.c */ -#line 1355 "program_parse.y" +#line 1366 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_MATERIAL; @@ -3645,7 +3656,7 @@ yyreduce: case 154: /* Line 1455 of yacc.c */ -#line 1364 "program_parse.y" +#line 1375 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3654,7 +3665,7 @@ yyreduce: case 155: /* Line 1455 of yacc.c */ -#line 1368 "program_parse.y" +#line 1379 "program_parse.y" { (yyval.integer) = STATE_EMISSION; ;} @@ -3663,7 +3674,7 @@ yyreduce: case 156: /* Line 1455 of yacc.c */ -#line 1372 "program_parse.y" +#line 1383 "program_parse.y" { (yyval.integer) = STATE_SHININESS; ;} @@ -3672,7 +3683,7 @@ yyreduce: case 157: /* Line 1455 of yacc.c */ -#line 1378 "program_parse.y" +#line 1389 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHT; @@ -3684,7 +3695,7 @@ yyreduce: case 158: /* Line 1455 of yacc.c */ -#line 1387 "program_parse.y" +#line 1398 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -3693,7 +3704,7 @@ yyreduce: case 159: /* Line 1455 of yacc.c */ -#line 1391 "program_parse.y" +#line 1402 "program_parse.y" { (yyval.integer) = STATE_POSITION; ;} @@ -3702,7 +3713,7 @@ yyreduce: case 160: /* Line 1455 of yacc.c */ -#line 1395 "program_parse.y" +#line 1406 "program_parse.y" { if (!state->ctx->Extensions.EXT_point_parameters) { yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported"); @@ -3716,7 +3727,7 @@ yyreduce: case 161: /* Line 1455 of yacc.c */ -#line 1404 "program_parse.y" +#line 1415 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} @@ -3725,7 +3736,7 @@ yyreduce: case 162: /* Line 1455 of yacc.c */ -#line 1408 "program_parse.y" +#line 1419 "program_parse.y" { (yyval.integer) = STATE_HALF_VECTOR; ;} @@ -3734,7 +3745,7 @@ yyreduce: case 163: /* Line 1455 of yacc.c */ -#line 1414 "program_parse.y" +#line 1425 "program_parse.y" { (yyval.integer) = STATE_SPOT_DIRECTION; ;} @@ -3743,7 +3754,7 @@ yyreduce: case 164: /* Line 1455 of yacc.c */ -#line 1420 "program_parse.y" +#line 1431 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (2)].state)[1]; @@ -3753,7 +3764,7 @@ yyreduce: case 165: /* Line 1455 of yacc.c */ -#line 1427 "program_parse.y" +#line 1438 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; @@ -3763,7 +3774,7 @@ yyreduce: case 166: /* Line 1455 of yacc.c */ -#line 1432 "program_parse.y" +#line 1443 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; @@ -3774,7 +3785,7 @@ yyreduce: case 167: /* Line 1455 of yacc.c */ -#line 1440 "program_parse.y" +#line 1451 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_LIGHTPROD; @@ -3787,7 +3798,7 @@ yyreduce: case 169: /* Line 1455 of yacc.c */ -#line 1452 "program_parse.y" +#line 1463 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(3) - (3)].integer); @@ -3798,7 +3809,7 @@ yyreduce: case 170: /* Line 1455 of yacc.c */ -#line 1460 "program_parse.y" +#line 1471 "program_parse.y" { (yyval.integer) = STATE_TEXENV_COLOR; ;} @@ -3807,7 +3818,7 @@ yyreduce: case 171: /* Line 1455 of yacc.c */ -#line 1466 "program_parse.y" +#line 1477 "program_parse.y" { (yyval.integer) = STATE_AMBIENT; ;} @@ -3816,7 +3827,7 @@ yyreduce: case 172: /* Line 1455 of yacc.c */ -#line 1470 "program_parse.y" +#line 1481 "program_parse.y" { (yyval.integer) = STATE_DIFFUSE; ;} @@ -3825,7 +3836,7 @@ yyreduce: case 173: /* Line 1455 of yacc.c */ -#line 1474 "program_parse.y" +#line 1485 "program_parse.y" { (yyval.integer) = STATE_SPECULAR; ;} @@ -3834,7 +3845,7 @@ yyreduce: case 174: /* Line 1455 of yacc.c */ -#line 1480 "program_parse.y" +#line 1491 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector"); @@ -3848,7 +3859,7 @@ yyreduce: case 175: /* Line 1455 of yacc.c */ -#line 1491 "program_parse.y" +#line 1502 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_TEXGEN; @@ -3860,7 +3871,7 @@ yyreduce: case 176: /* Line 1455 of yacc.c */ -#line 1500 "program_parse.y" +#line 1511 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S; ;} @@ -3869,7 +3880,7 @@ yyreduce: case 177: /* Line 1455 of yacc.c */ -#line 1504 "program_parse.y" +#line 1515 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_OBJECT_S; ;} @@ -3878,7 +3889,7 @@ yyreduce: case 178: /* Line 1455 of yacc.c */ -#line 1509 "program_parse.y" +#line 1520 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; ;} @@ -3887,7 +3898,7 @@ yyreduce: case 179: /* Line 1455 of yacc.c */ -#line 1513 "program_parse.y" +#line 1524 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; ;} @@ -3896,7 +3907,7 @@ yyreduce: case 180: /* Line 1455 of yacc.c */ -#line 1517 "program_parse.y" +#line 1528 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; ;} @@ -3905,7 +3916,7 @@ yyreduce: case 181: /* Line 1455 of yacc.c */ -#line 1521 "program_parse.y" +#line 1532 "program_parse.y" { (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; ;} @@ -3914,7 +3925,7 @@ yyreduce: case 182: /* Line 1455 of yacc.c */ -#line 1527 "program_parse.y" +#line 1538 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); @@ -3924,7 +3935,7 @@ yyreduce: case 183: /* Line 1455 of yacc.c */ -#line 1534 "program_parse.y" +#line 1545 "program_parse.y" { (yyval.integer) = STATE_FOG_COLOR; ;} @@ -3933,7 +3944,7 @@ yyreduce: case 184: /* Line 1455 of yacc.c */ -#line 1538 "program_parse.y" +#line 1549 "program_parse.y" { (yyval.integer) = STATE_FOG_PARAMS; ;} @@ -3942,7 +3953,7 @@ yyreduce: case 185: /* Line 1455 of yacc.c */ -#line 1544 "program_parse.y" +#line 1555 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_CLIPPLANE; @@ -3953,7 +3964,7 @@ yyreduce: case 186: /* Line 1455 of yacc.c */ -#line 1552 "program_parse.y" +#line 1563 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector"); @@ -3967,7 +3978,7 @@ yyreduce: case 187: /* Line 1455 of yacc.c */ -#line 1563 "program_parse.y" +#line 1574 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = (yyvsp[(2) - (2)].integer); @@ -3977,7 +3988,7 @@ yyreduce: case 188: /* Line 1455 of yacc.c */ -#line 1570 "program_parse.y" +#line 1581 "program_parse.y" { (yyval.integer) = STATE_POINT_SIZE; ;} @@ -3986,7 +3997,7 @@ yyreduce: case 189: /* Line 1455 of yacc.c */ -#line 1574 "program_parse.y" +#line 1585 "program_parse.y" { (yyval.integer) = STATE_POINT_ATTENUATION; ;} @@ -3995,7 +4006,7 @@ yyreduce: case 190: /* Line 1455 of yacc.c */ -#line 1580 "program_parse.y" +#line 1591 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (5)].state)[1]; @@ -4008,7 +4019,7 @@ yyreduce: case 191: /* Line 1455 of yacc.c */ -#line 1590 "program_parse.y" +#line 1601 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; (yyval.state)[1] = (yyvsp[(1) - (2)].state)[1]; @@ -4021,7 +4032,7 @@ yyreduce: case 192: /* Line 1455 of yacc.c */ -#line 1600 "program_parse.y" +#line 1611 "program_parse.y" { (yyval.state)[2] = 0; (yyval.state)[3] = 3; @@ -4031,7 +4042,7 @@ yyreduce: case 193: /* Line 1455 of yacc.c */ -#line 1605 "program_parse.y" +#line 1616 "program_parse.y" { /* It seems logical that the matrix row range specifier would have * to specify a range or more than one row (i.e., $5 > $3). @@ -4052,7 +4063,7 @@ yyreduce: case 194: /* Line 1455 of yacc.c */ -#line 1623 "program_parse.y" +#line 1634 "program_parse.y" { (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; (yyval.state)[1] = (yyvsp[(2) - (3)].state)[1]; @@ -4063,7 +4074,7 @@ yyreduce: case 195: /* Line 1455 of yacc.c */ -#line 1631 "program_parse.y" +#line 1642 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4072,7 +4083,7 @@ yyreduce: case 196: /* Line 1455 of yacc.c */ -#line 1635 "program_parse.y" +#line 1646 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} @@ -4081,7 +4092,7 @@ yyreduce: case 197: /* Line 1455 of yacc.c */ -#line 1641 "program_parse.y" +#line 1652 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVERSE; ;} @@ -4090,7 +4101,7 @@ yyreduce: case 198: /* Line 1455 of yacc.c */ -#line 1645 "program_parse.y" +#line 1656 "program_parse.y" { (yyval.integer) = STATE_MATRIX_TRANSPOSE; ;} @@ -4099,7 +4110,7 @@ yyreduce: case 199: /* Line 1455 of yacc.c */ -#line 1649 "program_parse.y" +#line 1660 "program_parse.y" { (yyval.integer) = STATE_MATRIX_INVTRANS; ;} @@ -4108,7 +4119,7 @@ yyreduce: case 200: /* Line 1455 of yacc.c */ -#line 1655 "program_parse.y" +#line 1666 "program_parse.y" { if ((yyvsp[(1) - (1)].integer) > 3) { yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference"); @@ -4122,7 +4133,7 @@ yyreduce: case 201: /* Line 1455 of yacc.c */ -#line 1666 "program_parse.y" +#line 1677 "program_parse.y" { (yyval.state)[0] = STATE_MODELVIEW_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); @@ -4132,7 +4143,7 @@ yyreduce: case 202: /* Line 1455 of yacc.c */ -#line 1671 "program_parse.y" +#line 1682 "program_parse.y" { (yyval.state)[0] = STATE_PROJECTION_MATRIX; (yyval.state)[1] = 0; @@ -4142,7 +4153,7 @@ yyreduce: case 203: /* Line 1455 of yacc.c */ -#line 1676 "program_parse.y" +#line 1687 "program_parse.y" { (yyval.state)[0] = STATE_MVP_MATRIX; (yyval.state)[1] = 0; @@ -4152,7 +4163,7 @@ yyreduce: case 204: /* Line 1455 of yacc.c */ -#line 1681 "program_parse.y" +#line 1692 "program_parse.y" { (yyval.state)[0] = STATE_TEXTURE_MATRIX; (yyval.state)[1] = (yyvsp[(2) - (2)].integer); @@ -4162,7 +4173,7 @@ yyreduce: case 205: /* Line 1455 of yacc.c */ -#line 1686 "program_parse.y" +#line 1697 "program_parse.y" { yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); YYERROR; @@ -4172,7 +4183,7 @@ yyreduce: case 206: /* Line 1455 of yacc.c */ -#line 1691 "program_parse.y" +#line 1702 "program_parse.y" { (yyval.state)[0] = STATE_PROGRAM_MATRIX; (yyval.state)[1] = (yyvsp[(3) - (4)].integer); @@ -4182,7 +4193,7 @@ yyreduce: case 207: /* Line 1455 of yacc.c */ -#line 1698 "program_parse.y" +#line 1709 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4191,7 +4202,7 @@ yyreduce: case 208: /* Line 1455 of yacc.c */ -#line 1702 "program_parse.y" +#line 1713 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} @@ -4200,7 +4211,7 @@ yyreduce: case 209: /* Line 1455 of yacc.c */ -#line 1707 "program_parse.y" +#line 1718 "program_parse.y" { /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix * zero is valid. @@ -4217,7 +4228,7 @@ yyreduce: case 210: /* Line 1455 of yacc.c */ -#line 1720 "program_parse.y" +#line 1731 "program_parse.y" { /* Since GL_ARB_matrix_palette isn't supported, just let any value * through here. The error will be generated later. @@ -4229,7 +4240,7 @@ yyreduce: case 211: /* Line 1455 of yacc.c */ -#line 1728 "program_parse.y" +#line 1739 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector"); @@ -4243,7 +4254,7 @@ yyreduce: case 212: /* Line 1455 of yacc.c */ -#line 1739 "program_parse.y" +#line 1750 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = STATE_DEPTH_RANGE; @@ -4253,7 +4264,7 @@ yyreduce: case 217: /* Line 1455 of yacc.c */ -#line 1751 "program_parse.y" +#line 1762 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4266,7 +4277,7 @@ yyreduce: case 218: /* Line 1455 of yacc.c */ -#line 1761 "program_parse.y" +#line 1772 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); @@ -4276,7 +4287,7 @@ yyreduce: case 219: /* Line 1455 of yacc.c */ -#line 1766 "program_parse.y" +#line 1777 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); @@ -4286,7 +4297,7 @@ yyreduce: case 220: /* Line 1455 of yacc.c */ -#line 1773 "program_parse.y" +#line 1784 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4299,7 +4310,7 @@ yyreduce: case 221: /* Line 1455 of yacc.c */ -#line 1783 "program_parse.y" +#line 1794 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4312,7 +4323,7 @@ yyreduce: case 222: /* Line 1455 of yacc.c */ -#line 1792 "program_parse.y" +#line 1803 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (1)].integer); (yyval.state)[1] = (yyvsp[(1) - (1)].integer); @@ -4322,7 +4333,7 @@ yyreduce: case 223: /* Line 1455 of yacc.c */ -#line 1797 "program_parse.y" +#line 1808 "program_parse.y" { (yyval.state)[0] = (yyvsp[(1) - (3)].integer); (yyval.state)[1] = (yyvsp[(3) - (3)].integer); @@ -4332,7 +4343,7 @@ yyreduce: case 224: /* Line 1455 of yacc.c */ -#line 1804 "program_parse.y" +#line 1815 "program_parse.y" { memset((yyval.state), 0, sizeof((yyval.state))); (yyval.state)[0] = state->state_param_enum; @@ -4345,7 +4356,7 @@ yyreduce: case 225: /* Line 1455 of yacc.c */ -#line 1814 "program_parse.y" +#line 1825 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference"); @@ -4358,7 +4369,7 @@ yyreduce: case 226: /* Line 1455 of yacc.c */ -#line 1824 "program_parse.y" +#line 1835 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference"); @@ -4371,7 +4382,7 @@ yyreduce: case 231: /* Line 1455 of yacc.c */ -#line 1839 "program_parse.y" +#line 1850 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4384,7 +4395,7 @@ yyreduce: case 232: /* Line 1455 of yacc.c */ -#line 1849 "program_parse.y" +#line 1860 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (yyvsp[(1) - (1)].real); @@ -4397,7 +4408,7 @@ yyreduce: case 233: /* Line 1455 of yacc.c */ -#line 1857 "program_parse.y" +#line 1868 "program_parse.y" { (yyval.vector).count = 1; (yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer); @@ -4410,7 +4421,7 @@ yyreduce: case 234: /* Line 1455 of yacc.c */ -#line 1867 "program_parse.y" +#line 1878 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (3)].real); @@ -4423,7 +4434,7 @@ yyreduce: case 235: /* Line 1455 of yacc.c */ -#line 1875 "program_parse.y" +#line 1886 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (5)].real); @@ -4436,7 +4447,7 @@ yyreduce: case 236: /* Line 1455 of yacc.c */ -#line 1884 "program_parse.y" +#line 1895 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (7)].real); @@ -4449,7 +4460,7 @@ yyreduce: case 237: /* Line 1455 of yacc.c */ -#line 1893 "program_parse.y" +#line 1904 "program_parse.y" { (yyval.vector).count = 4; (yyval.vector).data[0] = (yyvsp[(2) - (9)].real); @@ -4462,7 +4473,7 @@ yyreduce: case 238: /* Line 1455 of yacc.c */ -#line 1903 "program_parse.y" +#line 1914 "program_parse.y" { (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); ;} @@ -4471,7 +4482,7 @@ yyreduce: case 239: /* Line 1455 of yacc.c */ -#line 1907 "program_parse.y" +#line 1918 "program_parse.y" { (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); ;} @@ -4480,35 +4491,35 @@ yyreduce: case 240: /* Line 1455 of yacc.c */ -#line 1912 "program_parse.y" +#line 1923 "program_parse.y" { (yyval.negate) = FALSE; ;} break; case 241: /* Line 1455 of yacc.c */ -#line 1913 "program_parse.y" +#line 1924 "program_parse.y" { (yyval.negate) = TRUE; ;} break; case 242: /* Line 1455 of yacc.c */ -#line 1914 "program_parse.y" +#line 1925 "program_parse.y" { (yyval.negate) = FALSE; ;} break; case 243: /* Line 1455 of yacc.c */ -#line 1917 "program_parse.y" +#line 1928 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (2)].integer); ;} break; case 245: /* Line 1455 of yacc.c */ -#line 1921 "program_parse.y" +#line 1932 "program_parse.y" { /* NV_fragment_program_option defines the size qualifiers in a * fairly broken way. "SHORT" or "LONG" can optionally be used @@ -4536,7 +4547,7 @@ yyreduce: ? err_str : "invalid storage size specifier"); if (err_str != NULL) { - _mesa_free(err_str); + free(err_str); } YYERROR; @@ -4547,7 +4558,7 @@ yyreduce: case 246: /* Line 1455 of yacc.c */ -#line 1955 "program_parse.y" +#line 1966 "program_parse.y" { ;} break; @@ -4555,14 +4566,14 @@ yyreduce: case 247: /* Line 1455 of yacc.c */ -#line 1959 "program_parse.y" +#line 1970 "program_parse.y" { (yyval.integer) = (yyvsp[(1) - (1)].integer); ;} break; case 249: /* Line 1455 of yacc.c */ -#line 1963 "program_parse.y" +#line 1974 "program_parse.y" { if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { free((yyvsp[(3) - (3)].string)); @@ -4574,7 +4585,7 @@ yyreduce: case 250: /* Line 1455 of yacc.c */ -#line 1970 "program_parse.y" +#line 1981 "program_parse.y" { if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { free((yyvsp[(1) - (1)].string)); @@ -4586,7 +4597,7 @@ yyreduce: case 251: /* Line 1455 of yacc.c */ -#line 1979 "program_parse.y" +#line 1990 "program_parse.y" { struct asm_symbol *const s = declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)])); @@ -4603,7 +4614,7 @@ yyreduce: case 252: /* Line 1455 of yacc.c */ -#line 1993 "program_parse.y" +#line 2004 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_HPOS; @@ -4617,7 +4628,7 @@ yyreduce: case 253: /* Line 1455 of yacc.c */ -#line 2002 "program_parse.y" +#line 2013 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_FOGC; @@ -4631,7 +4642,7 @@ yyreduce: case 254: /* Line 1455 of yacc.c */ -#line 2011 "program_parse.y" +#line 2022 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (2)].result); ;} @@ -4640,7 +4651,7 @@ yyreduce: case 255: /* Line 1455 of yacc.c */ -#line 2015 "program_parse.y" +#line 2026 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_PSIZ; @@ -4654,7 +4665,7 @@ yyreduce: case 256: /* Line 1455 of yacc.c */ -#line 2024 "program_parse.y" +#line 2035 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); @@ -4668,7 +4679,7 @@ yyreduce: case 257: /* Line 1455 of yacc.c */ -#line 2033 "program_parse.y" +#line 2044 "program_parse.y" { if (state->mode == ARB_fragment) { (yyval.result) = FRAG_RESULT_DEPTH; @@ -4682,7 +4693,7 @@ yyreduce: case 258: /* Line 1455 of yacc.c */ -#line 2044 "program_parse.y" +#line 2055 "program_parse.y" { (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); ;} @@ -4691,7 +4702,7 @@ yyreduce: case 259: /* Line 1455 of yacc.c */ -#line 2050 "program_parse.y" +#line 2061 "program_parse.y" { (yyval.integer) = (state->mode == ARB_vertex) ? VERT_RESULT_COL0 @@ -4702,7 +4713,7 @@ yyreduce: case 260: /* Line 1455 of yacc.c */ -#line 2056 "program_parse.y" +#line 2067 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_COL0; @@ -4716,7 +4727,7 @@ yyreduce: case 261: /* Line 1455 of yacc.c */ -#line 2065 "program_parse.y" +#line 2076 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = VERT_RESULT_BFC0; @@ -4730,7 +4741,7 @@ yyreduce: case 262: /* Line 1455 of yacc.c */ -#line 2076 "program_parse.y" +#line 2087 "program_parse.y" { (yyval.integer) = 0; ;} @@ -4739,7 +4750,7 @@ yyreduce: case 263: /* Line 1455 of yacc.c */ -#line 2080 "program_parse.y" +#line 2091 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 0; @@ -4753,7 +4764,7 @@ yyreduce: case 264: /* Line 1455 of yacc.c */ -#line 2089 "program_parse.y" +#line 2100 "program_parse.y" { if (state->mode == ARB_vertex) { (yyval.integer) = 1; @@ -4767,91 +4778,91 @@ yyreduce: case 265: /* Line 1455 of yacc.c */ -#line 2099 "program_parse.y" +#line 2110 "program_parse.y" { (yyval.integer) = 0; ;} break; case 266: /* Line 1455 of yacc.c */ -#line 2100 "program_parse.y" +#line 2111 "program_parse.y" { (yyval.integer) = 0; ;} break; case 267: /* Line 1455 of yacc.c */ -#line 2101 "program_parse.y" +#line 2112 "program_parse.y" { (yyval.integer) = 1; ;} break; case 268: /* Line 1455 of yacc.c */ -#line 2104 "program_parse.y" +#line 2115 "program_parse.y" { (yyval.integer) = 0; ;} break; case 269: /* Line 1455 of yacc.c */ -#line 2105 "program_parse.y" +#line 2116 "program_parse.y" { (yyval.integer) = 0; ;} break; case 270: /* Line 1455 of yacc.c */ -#line 2106 "program_parse.y" +#line 2117 "program_parse.y" { (yyval.integer) = 1; ;} break; case 271: /* Line 1455 of yacc.c */ -#line 2109 "program_parse.y" +#line 2120 "program_parse.y" { (yyval.integer) = 0; ;} break; case 272: /* Line 1455 of yacc.c */ -#line 2110 "program_parse.y" +#line 2121 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 273: /* Line 1455 of yacc.c */ -#line 2113 "program_parse.y" +#line 2124 "program_parse.y" { (yyval.integer) = 0; ;} break; case 274: /* Line 1455 of yacc.c */ -#line 2114 "program_parse.y" +#line 2125 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 275: /* Line 1455 of yacc.c */ -#line 2117 "program_parse.y" +#line 2128 "program_parse.y" { (yyval.integer) = 0; ;} break; case 276: /* Line 1455 of yacc.c */ -#line 2118 "program_parse.y" +#line 2129 "program_parse.y" { (yyval.integer) = (yyvsp[(2) - (3)].integer); ;} break; case 277: /* Line 1455 of yacc.c */ -#line 2122 "program_parse.y" +#line 2133 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); @@ -4865,7 +4876,7 @@ yyreduce: case 278: /* Line 1455 of yacc.c */ -#line 2133 "program_parse.y" +#line 2144 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); @@ -4879,7 +4890,7 @@ yyreduce: case 279: /* Line 1455 of yacc.c */ -#line 2144 "program_parse.y" +#line 2155 "program_parse.y" { if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); @@ -4893,7 +4904,7 @@ yyreduce: case 280: /* Line 1455 of yacc.c */ -#line 2155 "program_parse.y" +#line 2166 "program_parse.y" { struct asm_symbol *exist = (struct asm_symbol *) _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); @@ -4922,7 +4933,7 @@ yyreduce: /* Line 1455 of yacc.c */ -#line 4926 "program_parse.tab.c" +#line 4937 "program_parse.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -5141,7 +5152,7 @@ yyreturn: /* Line 1675 of yacc.c */ -#line 2184 "program_parse.y" +#line 2195 "program_parse.y" void @@ -5248,7 +5259,9 @@ set_dst_reg(struct prog_dst_register *r, gl_register_file file, GLint index) const GLint maxIndex = 1 << INST_INDEX_BITS; const GLint minIndex = 0; ASSERT(index >= minIndex); + (void) minIndex; ASSERT(index <= maxIndex); + (void) maxIndex; ASSERT(file == PROGRAM_TEMPORARY || file == PROGRAM_ADDRESS || file == PROGRAM_OUTPUT); @@ -5271,19 +5284,31 @@ init_src_reg(struct asm_src_register *r) } -/** Like init_src_reg() but set the File and Index fields. */ +/** Like init_src_reg() but set the File and Index fields. + * \return GL_TRUE if a valid src register, GL_FALSE otherwise + */ void set_src_reg(struct asm_src_register *r, gl_register_file file, GLint index) +{ + set_src_reg_swz(r, file, index, SWIZZLE_XYZW); +} + + +void +set_src_reg_swz(struct asm_src_register *r, gl_register_file file, GLint index, + GLuint swizzle) { const GLint maxIndex = (1 << INST_INDEX_BITS) - 1; const GLint minIndex = -(1 << INST_INDEX_BITS); + ASSERT(file < PROGRAM_FILE_MAX); ASSERT(index >= minIndex); + (void) minIndex; ASSERT(index <= maxIndex); - ASSERT(file < PROGRAM_FILE_MAX); + (void) maxIndex; memset(r, 0, sizeof(*r)); r->Base.File = file; r->Base.Index = index; - r->Base.Swizzle = SWIZZLE_NOOP; + r->Base.Swizzle = swizzle; r->Symbol = NULL; } @@ -5378,7 +5403,7 @@ int add_state_reference(struct gl_program_parameter_list *param_list, param_list->StateFlags |= _mesa_program_state_flags(tokens); /* free name string here since we duplicated it in add_parameter() */ - _mesa_free(name); + free(name); return index; } @@ -5415,15 +5440,20 @@ initialize_symbol_from_state(struct gl_program *prog, state_tokens[2] = state_tokens[3] = row; idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = SWIZZLE_XYZW; + } + param_var->param_binding_length++; } } else { idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = SWIZZLE_XYZW; + } param_var->param_binding_length++; } @@ -5447,9 +5477,12 @@ initialize_symbol_from_param(struct gl_program *prog, assert((state_tokens[1] == STATE_ENV) || (state_tokens[1] == STATE_LOCAL)); + /* + * The param type is STATE_VAR. The program parameter entry will + * effectively be a pointer into the LOCAL or ENV parameter array. + */ param_var->type = at_param; - param_var->param_binding_type = (state_tokens[1] == STATE_ENV) - ? PROGRAM_ENV_PARAM : PROGRAM_LOCAL_PARAM; + param_var->param_binding_type = PROGRAM_STATE_VAR; /* If we are adding a STATE_ENV or STATE_LOCAL that has multiple elements, * we need to unroll it and call add_state_reference() for each row @@ -5463,15 +5496,19 @@ initialize_symbol_from_param(struct gl_program *prog, state_tokens[2] = state_tokens[3] = row; idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = SWIZZLE_XYZW; + } param_var->param_binding_length++; } } else { idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = SWIZZLE_XYZW; + } param_var->param_binding_length++; } @@ -5479,20 +5516,34 @@ initialize_symbol_from_param(struct gl_program *prog, } +/** + * Put a float/vector constant/literal into the parameter list. + * \param param_var returns info about the parameter/constant's location, + * binding, type, etc. + * \param vec the vector/constant to add + * \param allowSwizzle if true, try to consolidate constants which only differ + * by a swizzle. We don't want to do this when building + * arrays of constants that may be indexed indirectly. + * \return index of the constant in the parameter list. + */ int initialize_symbol_from_const(struct gl_program *prog, struct asm_symbol *param_var, - const struct asm_vector *vec) + const struct asm_vector *vec, + GLboolean allowSwizzle) { - const int idx = _mesa_add_parameter(prog->Parameters, PROGRAM_CONSTANT, - NULL, vec->count, GL_NONE, vec->data, - NULL, 0x0); + unsigned swizzle; + const int idx = _mesa_add_unnamed_constant(prog->Parameters, + vec->data, vec->count, + allowSwizzle ? &swizzle : NULL); param_var->type = at_param; param_var->param_binding_type = PROGRAM_CONSTANT; - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = allowSwizzle ? swizzle : SWIZZLE_XYZW; + } param_var->param_binding_length++; return idx; @@ -5509,7 +5560,7 @@ make_error_string(const char *fmt, ...) va_start(args, fmt); /* Call vsnprintf once to determine how large the final string is. Call it - * again to do the actual formatting. from the vsnprintf manual page: + * again to do the actual formatting. from the v_mesa_snprintf manual page: * * Upon successful return, these functions return the number of * characters printed (not including the trailing '\0' used to end @@ -5517,7 +5568,7 @@ make_error_string(const char *fmt, ...) */ length = 1 + vsnprintf(NULL, 0, fmt, args); - str = _mesa_malloc(length); + str = malloc(length); if (str) { vsnprintf(str, length, fmt, args); } @@ -5537,7 +5588,7 @@ yyerror(YYLTYPE *locp, struct asm_parser_state *state, const char *s) err_str = make_error_string("glProgramStringARB(%s)\n", s); if (err_str) { _mesa_error(state->ctx, GL_INVALID_OPERATION, err_str); - _mesa_free(err_str); + free(err_str); } err_str = make_error_string("line %u, char %u: error: %s\n", @@ -5545,7 +5596,7 @@ yyerror(YYLTYPE *locp, struct asm_parser_state *state, const char *s) _mesa_set_program_error(state->ctx, locp->position, err_str); if (err_str) { - _mesa_free(err_str); + free(err_str); } } @@ -5567,12 +5618,12 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str, /* Make a copy of the program string and force it to be NUL-terminated. */ - strz = (GLubyte *) _mesa_malloc(len + 1); + strz = (GLubyte *) malloc(len + 1); if (strz == NULL) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB"); return GL_FALSE; } - _mesa_memcpy (strz, str, len); + memcpy (strz, str, len); strz[len] = '\0'; state->prog->String = strz; @@ -5655,7 +5706,7 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str, error: for (inst = state->inst_head; inst != NULL; inst = temp) { temp = inst->next; - _mesa_free(inst); + free(inst); } state->inst_head = NULL; @@ -5664,8 +5715,8 @@ error: for (sym = state->sym; sym != NULL; sym = temp) { temp = sym->next; - _mesa_free((void *) sym->name); - _mesa_free(sym); + free((void *) sym->name); + free(sym); } state->sym = NULL; diff --git a/mesalib/src/mesa/shader/program_parse.tab.h b/mesalib/src/mesa/shader/program_parse.tab.h index 406100c85..045241d9e 100644 --- a/mesalib/src/mesa/shader/program_parse.tab.h +++ b/mesalib/src/mesa/shader/program_parse.tab.h @@ -154,7 +154,7 @@ typedef union YYSTYPE { /* Line 1676 of yacc.c */ -#line 122 "program_parse.y" +#line 126 "program_parse.y" struct asm_instruction *inst; struct asm_symbol *sym; diff --git a/mesalib/src/mesa/shader/program_parse.y b/mesalib/src/mesa/shader/program_parse.y index 8ca6f9805..d5fb0fac3 100644 --- a/mesalib/src/mesa/shader/program_parse.y +++ b/mesalib/src/mesa/shader/program_parse.y @@ -27,14 +27,14 @@ #include "main/mtypes.h" #include "main/imports.h" -#include "program.h" -#include "prog_parameter.h" -#include "prog_parameter_layout.h" -#include "prog_statevars.h" -#include "prog_instruction.h" +#include "shader/program.h" +#include "shader/prog_parameter.h" +#include "shader/prog_parameter_layout.h" +#include "shader/prog_statevars.h" +#include "shader/prog_instruction.h" -#include "symbol_table.h" -#include "program_parser.h" +#include "shader/symbol_table.h" +#include "shader/program_parser.h" extern void *yy_scan_string(char *); extern void yy_delete_buffer(void *); @@ -52,7 +52,8 @@ static int initialize_symbol_from_param(struct gl_program *prog, struct asm_symbol *param_var, const gl_state_index tokens[STATE_LENGTH]); static int initialize_symbol_from_const(struct gl_program *prog, - struct asm_symbol *param_var, const struct asm_vector *vec); + struct asm_symbol *param_var, const struct asm_vector *vec, + GLboolean allowSwizzle); static int yyparse(struct asm_parser_state *state); @@ -74,6 +75,9 @@ static void init_src_reg(struct asm_src_register *r); static void set_src_reg(struct asm_src_register *r, gl_register_file file, GLint index); +static void set_src_reg_swz(struct asm_src_register *r, + gl_register_file file, GLint index, GLuint swizzle); + static void asm_instruction_set_operands(struct asm_instruction *inst, const struct prog_dst_register *dst, const struct asm_src_register *src0, const struct asm_src_register *src1, const struct asm_src_register *src2); @@ -586,9 +590,11 @@ scalarUse: srcReg scalarSuffix memset(& temp_sym, 0, sizeof(temp_sym)); temp_sym.param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & temp_sym, & $1); + initialize_symbol_from_const(state->prog, & temp_sym, & $1, GL_TRUE); - set_src_reg(& $$, PROGRAM_CONSTANT, temp_sym.param_binding_begin); + set_src_reg_swz(& $$, PROGRAM_CONSTANT, + temp_sym.param_binding_begin, + temp_sym.param_binding_swizzle); } ; @@ -790,7 +796,9 @@ srcReg: USED_IDENTIFIER /* temporaryReg | progParamSingle */ set_src_reg(& $$, PROGRAM_TEMPORARY, s->temp_binding); break; case at_param: - set_src_reg(& $$, s->param_binding_type, s->param_binding_begin); + set_src_reg_swz(& $$, s->param_binding_type, + s->param_binding_begin, + s->param_binding_swizzle); break; case at_attrib: set_src_reg(& $$, PROGRAM_INPUT, s->attrib_binding); @@ -841,7 +849,8 @@ srcReg: USED_IDENTIFIER /* temporaryReg | progParamSingle */ gl_register_file file = ($1.name != NULL) ? $1.param_binding_type : PROGRAM_CONSTANT; - set_src_reg(& $$, file, $1.param_binding_begin); + set_src_reg_swz(& $$, file, $1.param_binding_begin, + $1.param_binding_swizzle); } ; @@ -1047,7 +1056,7 @@ ccMaskRule: IDENTIFIER ? err_str : "invalid condition code"); if (err_str != NULL) { - _mesa_free(err_str); + free(err_str); } YYERROR; @@ -1070,7 +1079,7 @@ ccMaskRule2: USED_IDENTIFIER ? err_str : "invalid condition code"); if (err_str != NULL) { - _mesa_free(err_str); + free(err_str); } YYERROR; @@ -1210,6 +1219,7 @@ PARAM_singleStmt: PARAM IDENTIFIER paramSingleInit s->param_binding_type = $3.param_binding_type; s->param_binding_begin = $3.param_binding_begin; s->param_binding_length = $3.param_binding_length; + s->param_binding_swizzle = SWIZZLE_XYZW; s->param_is_array = 0; } } @@ -1233,6 +1243,7 @@ PARAM_multipleStmt: PARAM IDENTIFIER '[' optArraySize ']' paramMultipleInit s->param_binding_type = $6.param_binding_type; s->param_binding_begin = $6.param_binding_begin; s->param_binding_length = $6.param_binding_length; + s->param_binding_swizzle = SWIZZLE_XYZW; s->param_is_array = 1; } } @@ -1290,7 +1301,7 @@ paramSingleItemDecl: stateSingleItem { memset(& $$, 0, sizeof($$)); $$.param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & $$, & $1); + initialize_symbol_from_const(state->prog, & $$, & $1, GL_TRUE); } ; @@ -1310,7 +1321,7 @@ paramSingleItemUse: stateSingleItem { memset(& $$, 0, sizeof($$)); $$.param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & $$, & $1); + initialize_symbol_from_const(state->prog, & $$, & $1, GL_TRUE); } ; @@ -1330,7 +1341,7 @@ paramMultipleItem: stateMultipleItem { memset(& $$, 0, sizeof($$)); $$.param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & $$, & $1); + initialize_symbol_from_const(state->prog, & $$, & $1, GL_FALSE); } ; @@ -1945,7 +1956,7 @@ optVarSize: string ? err_str : "invalid storage size specifier"); if (err_str != NULL) { - _mesa_free(err_str); + free(err_str); } YYERROR; @@ -2287,7 +2298,9 @@ set_dst_reg(struct prog_dst_register *r, gl_register_file file, GLint index) const GLint maxIndex = 1 << INST_INDEX_BITS; const GLint minIndex = 0; ASSERT(index >= minIndex); + (void) minIndex; ASSERT(index <= maxIndex); + (void) maxIndex; ASSERT(file == PROGRAM_TEMPORARY || file == PROGRAM_ADDRESS || file == PROGRAM_OUTPUT); @@ -2310,19 +2323,31 @@ init_src_reg(struct asm_src_register *r) } -/** Like init_src_reg() but set the File and Index fields. */ +/** Like init_src_reg() but set the File and Index fields. + * \return GL_TRUE if a valid src register, GL_FALSE otherwise + */ void set_src_reg(struct asm_src_register *r, gl_register_file file, GLint index) +{ + set_src_reg_swz(r, file, index, SWIZZLE_XYZW); +} + + +void +set_src_reg_swz(struct asm_src_register *r, gl_register_file file, GLint index, + GLuint swizzle) { const GLint maxIndex = (1 << INST_INDEX_BITS) - 1; const GLint minIndex = -(1 << INST_INDEX_BITS); + ASSERT(file < PROGRAM_FILE_MAX); ASSERT(index >= minIndex); + (void) minIndex; ASSERT(index <= maxIndex); - ASSERT(file < PROGRAM_FILE_MAX); + (void) maxIndex; memset(r, 0, sizeof(*r)); r->Base.File = file; r->Base.Index = index; - r->Base.Swizzle = SWIZZLE_NOOP; + r->Base.Swizzle = swizzle; r->Symbol = NULL; } @@ -2417,7 +2442,7 @@ int add_state_reference(struct gl_program_parameter_list *param_list, param_list->StateFlags |= _mesa_program_state_flags(tokens); /* free name string here since we duplicated it in add_parameter() */ - _mesa_free(name); + free(name); return index; } @@ -2454,15 +2479,20 @@ initialize_symbol_from_state(struct gl_program *prog, state_tokens[2] = state_tokens[3] = row; idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = SWIZZLE_XYZW; + } + param_var->param_binding_length++; } } else { idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = SWIZZLE_XYZW; + } param_var->param_binding_length++; } @@ -2486,9 +2516,12 @@ initialize_symbol_from_param(struct gl_program *prog, assert((state_tokens[1] == STATE_ENV) || (state_tokens[1] == STATE_LOCAL)); + /* + * The param type is STATE_VAR. The program parameter entry will + * effectively be a pointer into the LOCAL or ENV parameter array. + */ param_var->type = at_param; - param_var->param_binding_type = (state_tokens[1] == STATE_ENV) - ? PROGRAM_ENV_PARAM : PROGRAM_LOCAL_PARAM; + param_var->param_binding_type = PROGRAM_STATE_VAR; /* If we are adding a STATE_ENV or STATE_LOCAL that has multiple elements, * we need to unroll it and call add_state_reference() for each row @@ -2502,15 +2535,19 @@ initialize_symbol_from_param(struct gl_program *prog, state_tokens[2] = state_tokens[3] = row; idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = SWIZZLE_XYZW; + } param_var->param_binding_length++; } } else { idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = SWIZZLE_XYZW; + } param_var->param_binding_length++; } @@ -2518,20 +2555,34 @@ initialize_symbol_from_param(struct gl_program *prog, } +/** + * Put a float/vector constant/literal into the parameter list. + * \param param_var returns info about the parameter/constant's location, + * binding, type, etc. + * \param vec the vector/constant to add + * \param allowSwizzle if true, try to consolidate constants which only differ + * by a swizzle. We don't want to do this when building + * arrays of constants that may be indexed indirectly. + * \return index of the constant in the parameter list. + */ int initialize_symbol_from_const(struct gl_program *prog, struct asm_symbol *param_var, - const struct asm_vector *vec) + const struct asm_vector *vec, + GLboolean allowSwizzle) { - const int idx = _mesa_add_parameter(prog->Parameters, PROGRAM_CONSTANT, - NULL, vec->count, GL_NONE, vec->data, - NULL, 0x0); + unsigned swizzle; + const int idx = _mesa_add_unnamed_constant(prog->Parameters, + vec->data, vec->count, + allowSwizzle ? &swizzle : NULL); param_var->type = at_param; param_var->param_binding_type = PROGRAM_CONSTANT; - if (param_var->param_binding_begin == ~0U) + if (param_var->param_binding_begin == ~0U) { param_var->param_binding_begin = idx; + param_var->param_binding_swizzle = allowSwizzle ? swizzle : SWIZZLE_XYZW; + } param_var->param_binding_length++; return idx; @@ -2548,7 +2599,7 @@ make_error_string(const char *fmt, ...) va_start(args, fmt); /* Call vsnprintf once to determine how large the final string is. Call it - * again to do the actual formatting. from the vsnprintf manual page: + * again to do the actual formatting. from the v_mesa_snprintf manual page: * * Upon successful return, these functions return the number of * characters printed (not including the trailing '\0' used to end @@ -2556,7 +2607,7 @@ make_error_string(const char *fmt, ...) */ length = 1 + vsnprintf(NULL, 0, fmt, args); - str = _mesa_malloc(length); + str = malloc(length); if (str) { vsnprintf(str, length, fmt, args); } @@ -2576,7 +2627,7 @@ yyerror(YYLTYPE *locp, struct asm_parser_state *state, const char *s) err_str = make_error_string("glProgramStringARB(%s)\n", s); if (err_str) { _mesa_error(state->ctx, GL_INVALID_OPERATION, err_str); - _mesa_free(err_str); + free(err_str); } err_str = make_error_string("line %u, char %u: error: %s\n", @@ -2584,7 +2635,7 @@ yyerror(YYLTYPE *locp, struct asm_parser_state *state, const char *s) _mesa_set_program_error(state->ctx, locp->position, err_str); if (err_str) { - _mesa_free(err_str); + free(err_str); } } @@ -2606,12 +2657,12 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str, /* Make a copy of the program string and force it to be NUL-terminated. */ - strz = (GLubyte *) _mesa_malloc(len + 1); + strz = (GLubyte *) malloc(len + 1); if (strz == NULL) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB"); return GL_FALSE; } - _mesa_memcpy (strz, str, len); + memcpy (strz, str, len); strz[len] = '\0'; state->prog->String = strz; @@ -2694,7 +2745,7 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str, error: for (inst = state->inst_head; inst != NULL; inst = temp) { temp = inst->next; - _mesa_free(inst); + free(inst); } state->inst_head = NULL; @@ -2703,8 +2754,8 @@ error: for (sym = state->sym; sym != NULL; sym = temp) { temp = sym->next; - _mesa_free((void *) sym->name); - _mesa_free(sym); + free((void *) sym->name); + free(sym); } state->sym = NULL; diff --git a/mesalib/src/mesa/shader/program_parse_extra.c b/mesalib/src/mesa/shader/program_parse_extra.c index 0656c5eaa..ae98b782b 100644 --- a/mesalib/src/mesa/shader/program_parse_extra.c +++ b/mesalib/src/mesa/shader/program_parse_extra.c @@ -216,6 +216,18 @@ _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option) state->option.Shadow = 1; return 1; } + } else if (strncmp(option, "fragment_coord_", 15) == 0) { + option += 15; + if (state->ctx->Extensions.ARB_fragment_coord_conventions) { + if (strcmp(option, "origin_upper_left") == 0) { + state->option.OriginUpperLeft = 1; + return 1; + } + else if (strcmp(option, "pixel_center_integer") == 0) { + state->option.PixelCenterInteger = 1; + return 1; + } + } } } else if (strncmp(option, "NV_fragment_program", 19) == 0) { option += 19; diff --git a/mesalib/src/mesa/shader/program_parser.h b/mesalib/src/mesa/shader/program_parser.h index c170948f7..be952d4b9 100644 --- a/mesalib/src/mesa/shader/program_parser.h +++ b/mesalib/src/mesa/shader/program_parser.h @@ -56,7 +56,13 @@ struct asm_symbol { */ unsigned param_binding_begin; - /* This is how many entries in the the program_parameter_list we take up + /** + * Constants put into the parameter list may be swizzled. This + * field contain's the symbol's swizzle. (SWIZZLE_X/Y/Z/W) + */ + unsigned param_binding_swizzle; + + /* This is how many entries in the program_parameter_list we take up * with our state tokens or constants. Note that this is _not_ the same as * the number of param registers we eventually use. */ @@ -203,6 +209,8 @@ struct asm_parser_state { unsigned TexRect:1; unsigned TexArray:1; unsigned NV_fragment:1; + unsigned OriginUpperLeft:1; + unsigned PixelCenterInteger:1; } option; struct { diff --git a/mesalib/src/mesa/shader/programopt.c b/mesalib/src/mesa/shader/programopt.c index 951454570..fb2ebe633 100644 --- a/mesalib/src/mesa/shader/programopt.c +++ b/mesalib/src/mesa/shader/programopt.c @@ -495,6 +495,11 @@ _mesa_remove_output_reads(struct gl_program *prog, gl_register_file type) GLuint i; GLint outputMap[VERT_RESULT_MAX]; GLuint numVaryingReads = 0; + GLboolean usedTemps[MAX_PROGRAM_TEMPS]; + GLuint firstTemp = 0; + + _mesa_find_used_registers(prog, PROGRAM_TEMPORARY, + usedTemps, MAX_PROGRAM_TEMPS); assert(type == PROGRAM_VARYING || type == PROGRAM_OUTPUT); assert(prog->Target == GL_VERTEX_PROGRAM_ARB || type != PROGRAM_VARYING); @@ -513,8 +518,10 @@ _mesa_remove_output_reads(struct gl_program *prog, gl_register_file type) const GLuint var = inst->SrcReg[j].Index; if (outputMap[var] == -1) { numVaryingReads++; - outputMap[var] = _mesa_find_free_register(prog, - PROGRAM_TEMPORARY); + outputMap[var] = _mesa_find_free_register(usedTemps, + MAX_PROGRAM_TEMPS, + firstTemp); + firstTemp = outputMap[var] + 1; } inst->SrcReg[j].File = PROGRAM_TEMPORARY; inst->SrcReg[j].Index = outputMap[var]; diff --git a/mesalib/src/mesa/shader/shader_api.c b/mesalib/src/mesa/shader/shader_api.c index 453cd3964..940fe2d03 100644 --- a/mesalib/src/mesa/shader/shader_api.c +++ b/mesalib/src/mesa/shader/shader_api.c @@ -39,16 +39,14 @@ #include "main/glheader.h" #include "main/context.h" #include "main/hash.h" -#include "main/macros.h" #include "shader/program.h" #include "shader/prog_parameter.h" -#include "shader/prog_print.h" #include "shader/prog_statevars.h" #include "shader/prog_uniform.h" #include "shader/shader_api.h" #include "shader/slang/slang_compile.h" #include "shader/slang/slang_link.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" /** @@ -117,12 +115,12 @@ _mesa_free_shader_program_data(GLcontext *ctx, shProg->NumShaders = 0; if (shProg->Shaders) { - _mesa_free(shProg->Shaders); + free(shProg->Shaders); shProg->Shaders = NULL; } if (shProg->InfoLog) { - _mesa_free(shProg->InfoLog); + free(shProg->InfoLog); shProg->InfoLog = NULL; } } @@ -136,7 +134,7 @@ _mesa_free_shader_program(GLcontext *ctx, struct gl_shader_program *shProg) { _mesa_free_shader_program_data(ctx, shProg); - _mesa_free(shProg); + free(shProg); } @@ -264,11 +262,11 @@ void _mesa_free_shader(GLcontext *ctx, struct gl_shader *sh) { if (sh->Source) - _mesa_free((void *) sh->Source); + free((void *) sh->Source); if (sh->InfoLog) - _mesa_free(sh->InfoLog); + free(sh->InfoLog); _mesa_reference_program(ctx, &sh->Program, NULL); - _mesa_free(sh); + free(sh); } @@ -376,21 +374,21 @@ get_shader_flags(void) const char *env = _mesa_getenv("MESA_GLSL"); if (env) { - if (_mesa_strstr(env, "dump")) + if (strstr(env, "dump")) flags |= GLSL_DUMP; - if (_mesa_strstr(env, "log")) + if (strstr(env, "log")) flags |= GLSL_LOG; - if (_mesa_strstr(env, "nopvert")) + if (strstr(env, "nopvert")) flags |= GLSL_NOP_VERT; - if (_mesa_strstr(env, "nopfrag")) + if (strstr(env, "nopfrag")) flags |= GLSL_NOP_FRAG; - if (_mesa_strstr(env, "nopt")) + if (strstr(env, "nopt")) flags |= GLSL_NO_OPT; - else if (_mesa_strstr(env, "opt")) + else if (strstr(env, "opt")) flags |= GLSL_OPT; - if (_mesa_strstr(env, "uniform")) + if (strstr(env, "uniform")) flags |= GLSL_UNIFORMS; - if (_mesa_strstr(env, "useprog")) + if (strstr(env, "useprog")) flags |= GLSL_USE_PROG; } @@ -711,7 +709,7 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) /* alloc new, smaller array */ newList = (struct gl_shader **) - _mesa_malloc((n - 1) * sizeof(struct gl_shader *)); + malloc((n - 1) * sizeof(struct gl_shader *)); if (!newList) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDetachShader"); return; @@ -721,7 +719,7 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader) } while (++i < n) newList[j++] = shProg->Shaders[i]; - _mesa_free(shProg->Shaders); + free(shProg->Shaders); shProg->Shaders = newList; shProg->NumShaders = n - 1; @@ -771,6 +769,8 @@ sizeof_glsl_type(GLenum type) case GL_SAMPLER_2D_SHADOW: case GL_SAMPLER_2D_RECT_ARB: case GL_SAMPLER_2D_RECT_SHADOW_ARB: + case GL_SAMPLER_1D_ARRAY_EXT: + case GL_SAMPLER_2D_ARRAY_EXT: case GL_SAMPLER_1D_ARRAY_SHADOW_EXT: case GL_SAMPLER_2D_ARRAY_SHADOW_EXT: case GL_SAMPLER_CUBE_SHADOW_EXT: @@ -850,6 +850,8 @@ is_sampler_type(GLenum type) case GL_SAMPLER_2D_RECT_SHADOW_ARB: case GL_SAMPLER_1D_ARRAY_EXT: case GL_SAMPLER_2D_ARRAY_EXT: + case GL_SAMPLER_1D_ARRAY_SHADOW_EXT: + case GL_SAMPLER_2D_ARRAY_SHADOW_EXT: return GL_TRUE; default: return GL_FALSE; @@ -957,7 +959,7 @@ _mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index, if (size) { GLint typeSize = sizeof_glsl_type(param->DataType); - if (param->Size > typeSize) { + if ((GLint) param->Size > typeSize) { /* This is an array. * Array elements are placed on vector[4] boundaries so they're * a multiple of four floats. We round typeSize up to next multiple @@ -1379,15 +1381,15 @@ _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) if (c) { /* truncate name at [ */ const GLint len = c - name; - GLchar *newName = _mesa_malloc(len + 1); + GLchar *newName = malloc(len + 1); if (!newName) return -1; /* out of mem */ - _mesa_memcpy(newName, name, len); + memcpy(newName, name, len); newName[len] = 0; location = _mesa_lookup_uniform(shProg->Uniforms, newName); if (location >= 0) { - const GLint element = _mesa_atoi(c + 1); + const GLint element = atoi(c + 1); if (element > 0) { /* get type of the uniform array element */ struct gl_program_parameter *p; @@ -1402,7 +1404,7 @@ _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name) } } - _mesa_free(newName); + free(newName); } } @@ -1433,7 +1435,7 @@ _mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source) /* free old shader source string and install new one */ if (sh->Source) { - _mesa_free((void *) sh->Source); + free((void *) sh->Source); } sh->Source = source; sh->CompileStatus = GL_FALSE; @@ -1485,12 +1487,12 @@ _mesa_link_program(GLcontext *ctx, GLuint program) if (0) { GLuint i; - _mesa_printf("Link %u shaders in program %u: %s\n", + printf("Link %u shaders in program %u: %s\n", shProg->NumShaders, shProg->Name, shProg->LinkStatus ? "Success" : "Failed"); for (i = 0; i < shProg->NumShaders; i++) { - _mesa_printf(" shader %u, type 0x%x\n", + printf(" shader %u, type 0x%x\n", shProg->Shaders[i]->Name, shProg->Shaders[i]->Type); } @@ -1506,7 +1508,7 @@ print_shader_info(const struct gl_shader_program *shProg) { GLuint i; - _mesa_printf("Mesa: glUseProgram(%u)\n", shProg->Name); + printf("Mesa: glUseProgram(%u)\n", shProg->Name); for (i = 0; i < shProg->NumShaders; i++) { const char *s; switch (shProg->Shaders[i]->Type) { @@ -1522,14 +1524,14 @@ print_shader_info(const struct gl_shader_program *shProg) default: s = ""; } - _mesa_printf(" %s shader %u, checksum %u\n", s, - shProg->Shaders[i]->Name, - shProg->Shaders[i]->SourceChecksum); + printf(" %s shader %u, checksum %u\n", s, + shProg->Shaders[i]->Name, + shProg->Shaders[i]->SourceChecksum); } if (shProg->VertexProgram) - _mesa_printf(" vert prog %u\n", shProg->VertexProgram->Base.Id); + printf(" vert prog %u\n", shProg->VertexProgram->Base.Id); if (shProg->FragmentProgram) - _mesa_printf(" frag prog %u\n", shProg->FragmentProgram->Base.Id); + printf(" frag prog %u\n", shProg->FragmentProgram->Base.Id); } @@ -1699,8 +1701,8 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program, /* This maps a sampler to a texture unit: */ if (sampler < MAX_SAMPLERS) { #if 0 - _mesa_printf("Set program %p sampler %d '%s' to unit %u\n", - program, sampler, param->Name, texUnit); + printf("Set program %p sampler %d '%s' to unit %u\n", + program, sampler, param->Name, texUnit); #endif if (program->SamplerUnits[sampler] != texUnit) { program->SamplerUnits[sampler] = texUnit; @@ -1717,7 +1719,11 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program, */ FLUSH_VERTICES(ctx, _NEW_TEXTURE | _NEW_PROGRAM); _mesa_update_shader_textures_used(program); - ctx->Driver.ProgramStringNotify(ctx, program->Target, program); + /* Do we need to care about the return value here? + * This should not be the first time the driver was notified of + * this program. + */ + (void) ctx->Driver.ProgramStringNotify(ctx, program->Target, program); } } else { @@ -1728,7 +1734,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program, const GLint typeSize = sizeof_glsl_type(param->DataType); GLsizei k, i; - if (param->Size > typeSize) { + if ((GLint) param->Size > typeSize) { /* an array */ /* we'll ignore extra data below */ } @@ -1859,21 +1865,21 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count, if (ctx->Shader.Flags & GLSL_UNIFORMS) { GLint i; - _mesa_printf("Mesa: set program %u uniform %s (loc %d) to: ", - shProg->Name, uniform->Name, location); + printf("Mesa: set program %u uniform %s (loc %d) to: ", + shProg->Name, uniform->Name, location); if (basicType == GL_INT) { const GLint *v = (const GLint *) values; for (i = 0; i < count * elems; i++) { - _mesa_printf("%d ", v[i]); + printf("%d ", v[i]); } } else { const GLfloat *v = (const GLfloat *) values; for (i = 0; i < count * elems; i++) { - _mesa_printf("%g ", v[i]); + printf("%g ", v[i]); } } - _mesa_printf("\n"); + printf("\n"); } /* A uniform var may be used by both a vertex shader and a fragment @@ -1913,7 +1919,7 @@ set_program_uniform_matrix(GLcontext *ctx, struct gl_program *program, GLuint mat, row, col; GLuint src = 0; const struct gl_program_parameter * param = &program->Parameters->Parameters[index]; - const GLint slots = (param->Size + 3) / 4; + const GLuint slots = (param->Size + 3) / 4; const GLint typeSize = sizeof_glsl_type(param->DataType); GLint nr, nc; @@ -1925,7 +1931,7 @@ set_program_uniform_matrix(GLcontext *ctx, struct gl_program *program, return; } - if (param->Size <= typeSize) { + if ((GLint) param->Size <= typeSize) { /* non-array: count must be at most one; count == 0 is handled by the loop below */ if (count > 1) { _mesa_error(ctx, GL_INVALID_OPERATION, @@ -2075,8 +2081,8 @@ validate_samplers(GLcontext *ctx, const struct gl_program *prog, char *errMsg) target = prog->SamplerTargets[sampler]; if (targetUsed[unit] != -1 && targetUsed[unit] != target) { _mesa_snprintf(errMsg, 100, - "Texture unit %d is accessed both as %s and %s", - unit, targetName[targetUsed[unit]], targetName[target]); + "Texture unit %d is accessed both as %s and %s", + unit, targetName[targetUsed[unit]], targetName[target]); return GL_FALSE; } targetUsed[unit] = target; @@ -2153,7 +2159,7 @@ _mesa_validate_program(GLcontext *ctx, GLuint program) if (!shProg->Validated) { /* update info log */ if (shProg->InfoLog) { - _mesa_free(shProg->InfoLog); + free(shProg->InfoLog); } shProg->InfoLog = _mesa_strdup(errMsg); } diff --git a/mesalib/src/mesa/shader/slang/descrip.mms b/mesalib/src/mesa/shader/slang/descrip.mms index 6eefbcf5b..674b786ac 100644 --- a/mesalib/src/mesa/shader/slang/descrip.mms +++ b/mesalib/src/mesa/shader/slang/descrip.mms @@ -17,12 +17,12 @@ VPATH = RCS -INCDIR = [----.include],[--.main],[--.glapi],[-.slang],[-.grammar],[-] +INCDIR = [----.include],[--.main],[--.glapi],[-.slang],[-] LIBDIR = [----.lib] CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ieee/ieee=denorm SOURCES = \ - slang_compile.c,slang_preprocess.c + slang_compile.c OBJECTS = slang_builtin.obj,slang_codegen.obj,slang_compile.obj,\ slang_compile_function.obj,slang_compile_operation.obj,\ @@ -59,7 +59,6 @@ slang_library_noise.obj : slang_library_noise.c slang_link.obj : slang_link.c slang_log.obj : slang_log.c slang_mem.obj : slang_mem.c -slang_preprocess.obj : slang_preprocess.c slang_print.obj : slang_print.c slang_simplify.obj : slang_simplify.c slang_storage.obj : slang_storage.c diff --git a/mesalib/src/mesa/shader/slang/library/Makefile b/mesalib/src/mesa/shader/slang/library/Makefile index 0e03fac2e..c6964512b 100644 --- a/mesalib/src/mesa/shader/slang/library/Makefile +++ b/mesalib/src/mesa/shader/slang/library/Makefile @@ -4,9 +4,7 @@ TOP = ../../../../.. include $(TOP)/configs/current -INCDIR = $(TOP)/include - -LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) +GLSL_CL = $(TOP)/src/glsl/apps/compile # # targets @@ -14,41 +12,13 @@ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) .PHONY: default clean -default: syntax builtin +default: builtin clean: - -rm -f syn_to_c gc_to_bin *_syn.h *_gc.h - -syntax: slang_pp_directives_syn.h slang_pp_expression_syn.h slang_shader_syn.h slang_pp_version_syn.h + -rm -f *_gc.h builtin: builtin_110 builtin_120 -# -# executables -# - -syn_to_c: syn_to_c.c - $(CC) syn_to_c.c -o syn_to_c - -gc_to_bin: gc_to_bin.c slang_shader_syn.h - $(CC) gc_to_bin.c -o gc_to_bin - -# -# syntax scripts -# - -slang_pp_directives_syn.h: syn_to_c slang_pp_directives.syn - ./syn_to_c slang_pp_directives.syn > slang_pp_directives_syn.h - -slang_pp_expression_syn.h: syn_to_c slang_pp_expression.syn - ./syn_to_c slang_pp_expression.syn > slang_pp_expression_syn.h - -slang_shader_syn.h: syn_to_c slang_shader.syn - ./syn_to_c slang_shader.syn > slang_shader_syn.h - -slang_pp_version_syn.h: syn_to_c slang_pp_version.syn - ./syn_to_c slang_pp_version.syn > slang_pp_version_syn.h - # # builtin library sources # @@ -58,24 +28,24 @@ builtin_110: slang_common_builtin_gc.h slang_core_gc.h slang_fragment_builtin_gc builtin_120: slang_120_core_gc.h slang_builtin_120_common_gc.h slang_builtin_120_fragment_gc.h -slang_120_core_gc.h: gc_to_bin slang_120_core.gc - ./gc_to_bin 1 slang_120_core.gc slang_120_core_gc.h +slang_120_core_gc.h: slang_120_core.gc + $(GLSL_CL) fragment slang_120_core.gc slang_120_core_gc.h -slang_builtin_120_common_gc.h: gc_to_bin slang_builtin_120_common.gc - ./gc_to_bin 1 slang_builtin_120_common.gc slang_builtin_120_common_gc.h +slang_builtin_120_common_gc.h: slang_builtin_120_common.gc + $(GLSL_CL) fragment slang_builtin_120_common.gc slang_builtin_120_common_gc.h -slang_builtin_120_fragment_gc.h: gc_to_bin slang_builtin_120_fragment.gc - ./gc_to_bin 1 slang_builtin_120_fragment.gc slang_builtin_120_fragment_gc.h +slang_builtin_120_fragment_gc.h: slang_builtin_120_fragment.gc + $(GLSL_CL) fragment slang_builtin_120_fragment.gc slang_builtin_120_fragment_gc.h -slang_common_builtin_gc.h: gc_to_bin slang_common_builtin.gc - ./gc_to_bin 1 slang_common_builtin.gc slang_common_builtin_gc.h +slang_common_builtin_gc.h: slang_common_builtin.gc + $(GLSL_CL) fragment slang_common_builtin.gc slang_common_builtin_gc.h -slang_core_gc.h: gc_to_bin slang_core.gc - ./gc_to_bin 1 slang_core.gc slang_core_gc.h +slang_core_gc.h: slang_core.gc + $(GLSL_CL) fragment slang_core.gc slang_core_gc.h -slang_fragment_builtin_gc.h: gc_to_bin slang_fragment_builtin.gc - ./gc_to_bin 1 slang_fragment_builtin.gc slang_fragment_builtin_gc.h +slang_fragment_builtin_gc.h: slang_fragment_builtin.gc + $(GLSL_CL) fragment slang_fragment_builtin.gc slang_fragment_builtin_gc.h -slang_vertex_builtin_gc.h: gc_to_bin slang_vertex_builtin.gc - ./gc_to_bin 2 slang_vertex_builtin.gc slang_vertex_builtin_gc.h +slang_vertex_builtin_gc.h: slang_vertex_builtin.gc + $(GLSL_CL) vertex slang_vertex_builtin.gc slang_vertex_builtin_gc.h diff --git a/mesalib/src/mesa/shader/slang/library/gc_to_bin.c b/mesalib/src/mesa/shader/slang/library/gc_to_bin.c deleted file mode 100644 index 8aef7b541..000000000 --- a/mesalib/src/mesa/shader/slang/library/gc_to_bin.c +++ /dev/null @@ -1,85 +0,0 @@ -#include "../../grammar/grammar_crt.h" -#include "../../grammar/grammar_crt.c" -#include -#include - -static const char *slang_shader_syn = -#include "slang_shader_syn.h" -; - -static int gc_to_bin (grammar id, const char *in, const char *out) -{ - FILE *f; - byte *source, *prod; - unsigned int size, i, line = 0; - - printf ("Precompiling %s\n", in); - - f = fopen (in, "r"); - if (f == NULL) - return 1; - fseek (f, 0, SEEK_END); - size = ftell (f); - fseek (f, 0, SEEK_SET); - source = (byte *) grammar_alloc_malloc (size + 1); - source[fread (source, 1, size, f)] = '\0'; - fclose (f); - - if (!grammar_fast_check (id, source, &prod, &size, 65536)) - { - grammar_alloc_free (source); - return 1; - } - - f = fopen (out, "w"); - fprintf (f, "\n"); - fprintf (f, "/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */\n"); - fprintf (f, "/* %s */\n", in); - fprintf (f, "\n"); - for (i = 0; i < size; i++) - { - unsigned int a; - if (prod[i] < 10) - a = 1; - else if (prod[i] < 100) - a = 2; - else - a = 3; - if (i < size - 1) - a++; - if (line + a >= 100) - { - fprintf (f, "\n"); - line = 0; - } - line += a; - fprintf (f, "%d", prod[i]); - if (i < size - 1) - fprintf (f, ","); - } - fprintf (f, "\n"); - fclose (f); - grammar_alloc_free (prod); - return 0; -} - -int main (int argc, char *argv[]) -{ - grammar id; - - id = grammar_load_from_text ((const byte *) slang_shader_syn); - if (id == 0) { - fprintf(stderr, "Error loading grammar from text\n"); - return 1; - } - grammar_set_reg8 (id, (const byte *) "parsing_builtin", 1); - grammar_set_reg8 (id, (const byte *) "shader_type", atoi (argv[1])); - if (gc_to_bin (id, argv[2], argv[3])) { - fprintf(stderr, "Error in gc_to_bin %s %s\n", argv[2], argv[3]); - grammar_destroy (id); - return 1; - } - grammar_destroy (id); - return 0; -} - diff --git a/mesalib/src/mesa/shader/slang/library/slang_120_core_gc.h b/mesalib/src/mesa/shader/slang/library/slang_120_core_gc.h deleted file mode 100644 index 1fdbddf7c..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_120_core_gc.h +++ /dev/null @@ -1,764 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_120_core.gc */ - -5,1,90,95,0,0,26,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0, -1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,50,49,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0, -18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,49,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,9,0,102,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,102,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0, -5,0,105,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0, -1,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0, -11,0,99,48,0,0,1,1,0,0,11,0,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99,48, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0, -0,9,0,102,48,48,0,0,1,1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,1,1,0,0,9,0,102,51,48,0,0, -1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,50,49,0,0,1,1,0,0,9,0,102,51, -49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,59,122,0,18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119, -0,18,102,51,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,49,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,59,119,0,18,102,51,49,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0, -0,28,0,1,1,1,0,0,5,0,105,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0, -0,0,0,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0, -0,28,0,1,1,1,0,0,1,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0, -0,0,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0, -28,0,1,1,1,0,0,12,0,99,48,0,0,1,1,0,0,12,0,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,90,95, -0,0,27,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9, -0,102,49,49,0,0,1,1,0,0,9,0,102,48,50,0,0,1,1,0,0,9,0,102,49,50,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48, -49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,121,0,18,102,49,50,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0, -0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,5,0,105,0,0,0, -1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,101,116,86, -97,108,0,58,109,97,116,51,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,1,0,98,0,0,0,1, -3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,51,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,10,0,99,48,0,0,1, -1,0,0,10,0,99,49,0,0,1,1,0,0,10,0,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0, -0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,1,1,0,0,9,0,102,51,48,0,0,1,1,0,0,9,0,102,48,49,0,0, -1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,50,49,0,0,1,1,0,0,9,0,102,51,49,0,0,1,1,0,0,9,0,102,48, -50,0,0,1,1,0,0,9,0,102,49,50,0,0,1,1,0,0,9,0,102,50,50,0,0,1,1,0,0,9,0,102,51,50,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59, -122,0,18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,18,102,51,48,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,49,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119, -0,18,102,51,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,102,49,50,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,50,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,50,0,57,59,119,0,18,102,51,50,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0, -17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17, -48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,5,0,105,0,0,0,1,3,2, -90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,51,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,1,0,98,0,0,0,1,3, -2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,51,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,12,0,99,48,0,0,1, -1,0,0,12,0,99,49,0,0,1,1,0,0,12,0,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0, -0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,48,50,0,0, -1,1,0,0,9,0,102,49,50,0,0,1,1,0,0,9,0,102,48,51,0,0,1,1,0,0,9,0,102,49,51,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120, -0,18,102,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,59,121,0,18,102,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,59,120,0,18,102,48,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0, -18,102,49,51,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,58,109,97,116,52,120,50,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,16,10,52,0,0,17,48,0,48, -0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,5,0, -105,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114, -101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,1,0, -98,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114, -101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,10, -0,99,48,0,0,1,1,0,0,10,0,99,49,0,0,1,1,0,0,10,0,99,50,0,0,1,1,0,0,10,0,99,51,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,9,0,102,48,48,0,0,1, -1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49, -0,0,1,1,0,0,9,0,102,50,49,0,0,1,1,0,0,9,0,102,48,50,0,0,1,1,0,0,9,0,102,49,50,0,0,1,1,0,0,9,0,102, -50,50,0,0,1,1,0,0,9,0,102,48,51,0,0,1,1,0,0,9,0,102,49,51,0,0,1,1,0,0,9,0,102,50,51,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -59,122,0,18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48, -49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -59,121,0,18,102,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,50, -50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,18,102,48,51,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,18,102,49,51,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,59,122,0,18,102,50,51,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0, -0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17, -48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,5,0,105,0,0,0, -1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,101,116,86, -97,108,0,58,109,97,116,52,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,1,0,98,0,0,0,1, -3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,52,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,11,0,99,48,0,0,1, -1,0,0,11,0,99,49,0,0,1,1,0,0,11,0,99,50,0,0,1,1,0,0,11,0,99,51,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1, -90,95,0,0,13,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,0,0, -18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,26,0,109,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0, -18,109,0,16,10,49,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16, -10,49,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57, -59,120,121,0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121, -0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,0,20,0,0, -1,90,95,0,0,13,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,0, -0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0, -26,0,1,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,26, -0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,109, -0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,31,0,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16, -10,49,0,57,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59, -120,121,122,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57, -59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0, -57,59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59, -121,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48, -0,48,0,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,17, -48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0, -0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,17,48,0,48,0,0, -0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,0,20,0,0,1, -90,95,0,0,28,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90, -95,0,0,28,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52, -0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,15,0,109, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,0,18, -109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59, -121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109, -0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,122,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0, -28,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18, -109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,17, -48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10, -49,0,57,59,122,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0, -16,8,48,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57, -59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,122,0,0,17,48,0,48,0,0,0,0, -20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0, -0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0, -48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57, -59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0, -57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,29,0,109,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0, -18,109,0,16,8,48,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0, -0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,27,0,1, -1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,27,0,1,1,1, -0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,109,0,16,8, -48,0,57,0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,14, -0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57, -0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,30,0,109,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,59,120, -0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59, -121,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,121,0,0,0,20,0,0,1,90,95,0,0, -27,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18, -109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,120,0,0, -18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,121, -0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16, -10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0, -1,90,95,0,0,27,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51, -120,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,58,118,101,99,50,0,0,17,48,0,48,0,0,0, -0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16, -10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0, -1,90,95,0,0,27,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51, -120,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0, -57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95, -0,0,14,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0, -14,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0, -16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0, -0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57, -59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,18,109,0,16,10,50,0,57,59,120,121,122, -0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0, -18,109,0,16,10,50,0,57,59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,26,0,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0, -57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,28,0,109,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0, -18,109,0,16,10,49,0,57,59,120,121,122,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90, -95,0,0,14,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18, -109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0, -17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0, -0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,13,0,109,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18, -109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0, -30,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,30, -0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109, -0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1, -0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8, -48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,48,0,0, -0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0, -18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10, -49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1, -0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8, -48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0, -0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0, -16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,0,0,0,0,0, -20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17, -48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0, -30,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18, -109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0, -0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,29, -0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,31,0, -109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57, -59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,18,109,0,16,10,50,0,57,59,120,121,0,0,18,109, -0,16,10,51,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16, -10,49,0,57,59,120,121,0,0,18,109,0,16,10,50,0,57,59,120,121,0,0,18,109,0,16,10,51,0,57,59,120,121, -0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0, -0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,18, -109,0,16,10,50,0,57,59,120,121,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0, -30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0, -57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,18,109,0,16,10,50,0,57,59,120,121,0,0,17, -48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,17,48, -0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,26,0,109,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120, -121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0, -0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109, -97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,17, -48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,31,0,109, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,15,0,109,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,59,120, -121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,18,109,0,16,10,50,0,57,59,120,121,122,0,0,18, -109,0,16,10,51,0,57,59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10, -49,0,57,0,18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0, -31,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18, -109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,18,109,0,16,10,50, -0,57,59,120,121,122,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1, -0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8, -48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0, -0,0,18,109,0,16,10,51,0,57,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,26,0,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16, -10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0, -20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97, -116,52,120,51,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18, -109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0, -31,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18, -109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,17,48,0,0,0,0,17, -48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1, -0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8, -48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0, -0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,15,0,109,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,30,0,109,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0, -57,0,18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1, -90,95,0,0,15,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0, -18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0, -57,0,17,48,0,0,0,0,18,109,0,16,10,51,0,57,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,28,0, -109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,18,109, -0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0, -0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0, -18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48, -0,0,0,0,18,109,0,16,10,51,0,57,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0, -14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0, -17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,17,48, -0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,26,0,109,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0, -18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17, -48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,27,0,109, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0, -0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17, -49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95, -0,0,15,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109, -0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0, -17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0, -17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1, -90,95,0,0,0,0,2,1,1,0,2,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2, -0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21, -0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,30,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10, -51,0,57,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0, -16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1, -90,95,0,0,0,0,2,2,1,0,2,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2, -0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18, -109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,27,0,109,0,0,1,1,0,0, -27,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,90,95,0,0,0,0,2, -2,1,0,2,0,30,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0, -9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0, -57,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,90, -95,0,0,0,0,2,2,1,0,2,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110, -0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,90,95,0,0,0,0,2,4,1, -0,2,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,28,0,109,0,0,1,1, -0,0,28,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,30,0,109,0, -0,1,1,0,0,30,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49, -0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,90,95,0, -0,0,0,2,4,1,0,2,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0, -31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9, -18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,26,0,109,0,0,1, -1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8, -48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0, -18,109,0,16,10,49,0,57,59,121,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59, -120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,20, -0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,28,0,109,0,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0, -16,10,49,0,57,59,120,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18, -109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118, -0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0, -18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59, -119,0,48,46,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,27,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59, -121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,48, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121, -0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0, -57,59,121,0,48,46,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118, -0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0, -48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59, -121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10, -50,0,57,59,121,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,120,0,18,109,0, -16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,118,0,59,122,0, -18,109,0,16,10,50,0,57,59,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,118,0,59, -120,0,18,109,0,16,8,48,0,57,59,119,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,48,46,18, -118,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,48,46,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,29,0,109, -0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109, -0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122, -0,18,109,0,16,10,50,0,57,59,120,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,48,46,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48, -18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57, -59,121,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,48,46,20,0,0,1,90,95,0,0,11,0,2, -21,1,1,0,0,31,0,109,0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18, -118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0, -48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51, -0,57,59,120,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16, -8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18, -109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,48,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,48,18, -118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59, -122,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,48,46,20,0,0,1,90,95,0,0,27,0,2,21,1, -1,0,0,13,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109, -0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0, -16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50, -0,57,48,20,0,0,1,90,95,0,0,29,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, -0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0, -13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1, -90,95,0,0,14,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,29,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,28,0,2,21,1,1, -0,0,28,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0, -16,10,49,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,28,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,15,0,2,21,1,1,0,0, -28,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18, -110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16, -10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20, -0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,27,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,27,0,2,21,1,1,0,0,27,0,109,0,0,1, -1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90, -95,0,0,29,0,2,21,1,1,0,0,27,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109, -0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110, -0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21, -1,1,0,0,14,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18, -110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16, -10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0, -57,48,20,0,0,1,90,95,0,0,28,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,30, -0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110, -0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49, -0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48, -20,0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18, -109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,29,0,109,0,0,1,1,0,0,28,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0, -0,27,0,2,21,1,1,0,0,29,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18, -110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,29,0,2,21,1,1,0,0,29,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,31,0, -109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0, -16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0, -57,48,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,31,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,31,0,109,0,0, -1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48, -0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0, -28,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,30,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,0,0,2, -3,1,0,2,0,26,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,90,95,0,0, -0,0,2,3,1,0,2,0,28,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,90, -95,0,0,0,0,2,3,1,0,2,0,27,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, -0,1,90,95,0,0,0,0,2,3,1,0,2,0,30,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0, -48,20,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,29,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,18,109,0,18, -110,0,48,20,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,31,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,18, -109,0,18,110,0,48,20,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,27,0,109,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10, -50,0,57,0,0,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10, -51,0,57,0,0,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20, -0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0, -20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90, -95,0,0,11,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0, -0,0,0,2,1,1,0,2,0,26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18, -109,0,16,10,49,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1, -9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1, -0,2,0,27,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49, -0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,30,0,109,0,0, -1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0, -9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10, -50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,31,0,109, -0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0, -21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0, -2,2,1,0,2,0,26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16, -10,49,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109, -0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,27, -0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18, -97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,30,0,109,0,0,1,1,0,0, -9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109, -0,16,10,50,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9, -18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57, -18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,31,0,109,0,0,1,1, -0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18, -109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,3,1,0,2, -0,26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0, -57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,27,0,109, -0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0, -23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,30,0,109,0,0,1,1,0,0,9,0, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0, -16,10,50,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18, -109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18, -97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,31,0,109,0,0,1,1,0,0, -9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109, -0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0, -26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57, -18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48, -0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,27,0,109,0,0, -1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0, -9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,30,0,109,0,0,1,1,0,0,9,0,97,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10, -50,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0, -16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0, -24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,31,0,109,0,0,1,1,0,0,9,0, -97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0, -16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,90,95,0,0,26,0,2,26,1,1,0,0, -26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0, -16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,90,95,0,0,28,0,2,26,1, -1,0,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,90,95,0,0,27,0, -2,26,1,1,0,0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48, -0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10, -50,0,57,18,110,0,16,10,50,0,57,46,0,0,0,0,1,90,95,0,0,30,0,2,26,1,1,0,0,30,0,109,0,0,1,1,0,0,30,0, -110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,0,0, -0,1,90,95,0,0,29,0,2,26,1,1,0,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0, -0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,46,0,0,0,0,1,90,95,0,0,31,0,2,26,1,1,0,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,8,58,109,97,116, -52,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16, -10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,18,109,0,16,10,51,0,57,18,110,0, -16,10,51,0,57,46,0,0,0,0,1,90,95,0,0,26,0,2,27,1,1,0,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58, -109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,47,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0, -0,1,8,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,90,95,0,0,27,0,2,27,1,1,0,0,27,0,109,0,0,1,1,0,0,27,0, -110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0, -0,1,90,95,0,0,30,0,2,27,1,1,0,0,30,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0, -0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0,0,1,90,95,0,0,29,0,2,27,1,1,0,0,29,0, -109,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,47,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,31,0,2,27,1,1, -0,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57, -18,110,0,16,10,50,0,57,47,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0, -26,0,2,22,1,1,0,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16, -8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,90, -95,0,0,28,0,2,22,1,1,0,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0, -0,0,1,90,95,0,0,27,0,2,22,1,1,0,0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50, -0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,0,0,0,1,90,95,0,0,30,0,2,22,1,1,0,0,30,0, -109,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8, -48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16, -10,50,0,57,49,0,0,0,0,1,90,95,0,0,29,0,2,22,1,1,0,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109, -97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18, -110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16,10,51,0,57, -18,110,0,16,10,51,0,57,49,0,0,0,0,1,90,95,0,0,31,0,2,22,1,1,0,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0, -0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10, -49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16, -10,51,0,57,18,110,0,16,10,51,0,57,49,0,0,0,0,1,90,95,0,0,26,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,26,0, -110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16, -10,49,0,57,46,0,0,0,0,1,90,95,0,0,26,0,2,26,1,1,0,0,26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109, -97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0, -1,90,95,0,0,28,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,28,0,110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18, -97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,90,95,0,0,28,0,2,26,1, -1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18, -98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,27,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0, -0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110, -0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,90,95,0,0,27,0,2,26,1,1,0,0,27,0, -109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18, -109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,30,0,2,26,1, -1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,97,0,18,110,0,16,8,48,0, -57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,90,95,0,0, -30,0,2,26,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8, -48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0, -1,90,95,0,0,29,0,2,26,1,1,0,0,29,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18, -109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0, -46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,29,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,29, -0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16, -10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,90, -95,0,0,31,0,2,26,1,1,0,0,31,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109, -0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46, -0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,31,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,31,0, -110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16, -10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,90, -95,0,0,26,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,97,0, -18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,90,95,0,0,26,0,2,27,1,1,0,0, -26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,98,0,47, -0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,28,0, -110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16, -10,49,0,57,47,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109, -97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0, -1,90,95,0,0,27,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18, -97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, -47,0,0,0,0,1,90,95,0,0,27,0,2,27,1,1,0,0,27,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,51, -120,50,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10, -50,0,57,18,98,0,47,0,0,0,0,1,90,95,0,0,30,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58, -109,97,116,51,120,52,0,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18, -97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,90,95,0,0,30,0,2,27,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,0, -0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18, -98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,90,95,0,0,29,0,2,27,1,1,0,0,29,0,109,0,0,1,1, -0,0,9,0,98,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10, -49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0, -1,90,95,0,0,29,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18, -97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, -47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,31,0,2,27,1,1,0,0,31,0,109,0,0,1,1,0,0, -9,0,98,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49, -0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1, -90,95,0,0,31,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,31,0,110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18, -97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57, -47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,26, -0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90, -95,0,0,26,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,90,95,0,0,28,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,28,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0, -28,0,2,21,1,1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,18,98,0,48,20,0,0,1,90,95,0,0,27,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,27,0,110,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,27,0,2,21,1,1,0, -0,27,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, -8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48, -20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,95,95,114,101,116,86, -97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57, -18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18, -95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,90,95,0,0,29,0,2,21,1, -1,0,0,29,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0, -1,90,95,0,0,29,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0, -16,10,51,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,31,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0, -0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2, -22,1,1,0,0,9,0,97,0,0,1,1,0,0,26,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0, -18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0, -57,48,20,0,0,1,90,95,0,0,26,0,2,22,1,1,0,0,26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1, -105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,28,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,28, -0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,97,0,49,0,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,28,0,2,22, -1,1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18, -98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,105,110,118,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,105,110,118,0, -48,20,0,0,1,90,95,0,0,27,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,27,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1, -105,110,118,0,2,17,49,0,48,0,0,18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -105,110,118,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -105,110,118,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -105,110,118,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,27,0,2,22,1,1,0,0,27,0,109,0,0,1,1,0,0, -9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,30,0,2, -22,1,1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0, -18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,105,110,118,0,18,110,0,16,10,50,0, -57,48,20,0,0,1,90,95,0,0,30,0,2,22,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1, -105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,29,0,2,22,1,1,0,0,29,0,109,0,0,1,1,0,0, -9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,29,0,2, -22,1,1,0,0,9,0,97,0,0,1,1,0,0,29,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0, -18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,105,110,118,0,18,110,0,16,10,50,0, -57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,105,110,118,0,18,110,0,16,10,51,0, -57,48,20,0,0,1,90,95,0,0,31,0,2,22,1,1,0,0,31,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1, -105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18, -109,0,16,10,51,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,31,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,31, -0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,97,0,49,0,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,50,0,57,18,105,110,118,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,51,0,57,18,105,110,118,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,27, -1,1,0,0,26,0,109,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10, -49,0,57,54,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,28,0,109,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18, -109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,90,95,0,0,27,0,2,27,1,1,0,0,27,0,109,0, -0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109, -0,16,10,50,0,57,54,0,0,0,0,1,90,95,0,0,30,0,2,27,1,1,0,0,30,0,109,0,0,0,1,8,58,109,97,116,51,120, -52,0,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1, -90,95,0,0,29,0,2,27,1,1,0,0,29,0,109,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57, -54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1, -90,95,0,0,31,0,2,27,1,1,0,0,31,0,109,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57, -54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1, -90,95,0,0,0,0,2,25,1,0,2,0,26,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57, -52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,28,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10, -49,0,57,52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,27,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109, -0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,30,0,109,0,0,0,1, -9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,90,95, -0,0,0,0,2,25,1,0,2,0,29,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9, -18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,31,0,109, -0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9, -18,109,0,16,10,51,0,57,52,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,26,0,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,28,0,109,0,0,0,1,9,18,109,0, -16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,27,0,109,0,0,0,1,9, -18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,90,95,0, -0,0,0,2,24,1,0,2,0,30,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9, -18,109,0,16,10,50,0,57,51,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,29,0,109,0,0,0,1,9,18,109,0,16,8,48,0, -57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0, -0,1,90,95,0,0,0,0,2,24,1,0,2,0,31,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0, -57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,0 diff --git a/mesalib/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h b/mesalib/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h deleted file mode 100644 index c397b9f0f..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h +++ /dev/null @@ -1,108 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_builtin_120_common.gc */ - -5,1,90,95,0,0,26,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,26,0,109,0,0,1, -0,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57, -48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,0,0,0,1,90,95,0,0,28,0,0,109,97,116,114, -105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,28,0,109,0,0,1,0,0,0,28,0,110,0,0,0,1,8,58,109,97, -116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,48,0,0,0,0,1,90,95,0,0,27,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0, -1,0,0,0,27,0,109,0,0,1,0,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,48,0,0,0,0,1,90,95,0,0,30,0,0,109,97,116,114,105,120,67,111,109,112,77, -117,108,116,0,1,0,0,0,30,0,109,0,0,1,0,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109, -0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,0,0,0,1,90,95,0,0,29,0,0,109,97,116,114,105,120,67,111, -109,112,77,117,108,116,0,1,0,0,0,29,0,109,0,0,1,0,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0, -0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57, -48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0, -57,48,0,0,0,0,1,90,95,0,0,31,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,31, -0,109,0,0,1,0,0,0,31,0,110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0, -16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,90,95,0,0,13,0,0,111, -117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,10,0,99,0,0,1,0,0,0,10,0,114,0,0,0,1,8,58,109, -97,116,50,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18, -99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,0,0,0,1,90,95,0,0,14, -0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,11,0,99,0,0,1,0,0,0,11,0,114,0,0,0,1,8, -58,109,97,116,51,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48, -0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0, -18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0, -48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,0,0,0,1,90,95, -0,0,15,0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,12,0,99,0,0,1,0,0,0,12,0,114,0, -0,0,1,8,58,109,97,116,52,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59, -120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0, -59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0, -59,121,0,48,0,18,99,0,59,119,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,48,0,18, -99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,18,99,0,59,119,0,18, -114,0,59,122,0,48,0,18,99,0,59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,121,0,18,114,0,59,119,0,48, -0,18,99,0,59,122,0,18,114,0,59,119,0,48,0,18,99,0,59,119,0,18,114,0,59,119,0,48,0,0,0,0,1,90,95,0, -0,26,0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,11,0,99,0,0,1,0,0,0,10,0,114,0,0, -0,1,8,58,109,97,116,50,120,51,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114, -0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18, -99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,0,0,0,1,90,95,0,0,27, -0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,10,0,99,0,0,1,0,0,0,11,0,114,0,0,0,1,8, -58,109,97,116,51,120,50,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59, -120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0, -59,120,0,18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,0,0,0,1,90,95,0,0,28,0,0, -111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,12,0,99,0,0,1,0,0,0,10,0,114,0,0,0,1,8,58, -109,97,116,50,120,52,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120, -0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0,59, -120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59, -121,0,48,0,18,99,0,59,119,0,18,114,0,59,121,0,48,0,0,0,0,1,90,95,0,0,29,0,0,111,117,116,101,114,80, -114,111,100,117,99,116,0,1,0,0,0,10,0,99,0,0,1,0,0,0,12,0,114,0,0,0,1,8,58,109,97,116,52,120,50,0, -0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0, -18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0, -48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,120,0,18,114,0,59,119,0,48,0,18,99,0,59, -121,0,18,114,0,59,119,0,48,0,0,0,0,1,90,95,0,0,30,0,0,111,117,116,101,114,80,114,111,100,117,99, -116,0,1,0,0,0,12,0,99,0,0,1,0,0,0,11,0,114,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,99,0,59,120,0, -18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0, -48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59, -121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,119,0,18,114,0,59, -121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0, -59,122,0,18,114,0,59,122,0,48,0,18,99,0,59,119,0,18,114,0,59,122,0,48,0,0,0,0,1,90,95,0,0,31,0,0, -111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,11,0,99,0,0,1,0,0,0,12,0,114,0,0,0,1,8,58, -109,97,116,52,120,51,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120, -0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59, -121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59, -122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,18,99,0, -59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,121,0,18,114,0,59,119,0,48,0,18,99,0,59,122,0,18,114,0, -59,119,0,48,0,0,0,0,1,90,95,0,0,13,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,13,0,109,0,0,0, -1,8,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109, -0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,0,0,0,1,90,95,0,0,14,0,0,116,114,97, -110,115,112,111,115,101,0,1,0,0,0,14,0,109,0,0,0,1,8,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,59, -120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57, -59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,8,48,0, -57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,0,0,0,1,90,95,0, -0,15,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,15,0,109,0,0,0,1,8,58,109,97,116,52,0,0,18, -109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0, -18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0, -0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122, -0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,10,51,0,57,59, -122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119,0,0,18,109,0,16,10,50,0,57, -59,119,0,0,18,109,0,16,10,51,0,57,59,119,0,0,0,0,0,1,90,95,0,0,26,0,0,116,114,97,110,115,112,111, -115,101,0,1,0,0,0,27,0,109,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0, -18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0, -0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,0,0,0,1,90,95,0,0,27,0,0,116, -114,97,110,115,112,111,115,101,0,1,0,0,0,26,0,109,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0, -16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109, -0,16,10,49,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0,0,0,0, -0,1,90,95,0,0,28,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,29,0,109,0,0,0,1,8,58,109,97,116, -50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50, -0,57,59,120,0,0,18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10, -49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,0,0,0,1,90, -95,0,0,29,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,28,0,109,0,0,0,1,8,58,109,97,116,52,120, -50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59, -121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57, -59,122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119,0,0,0,0,0,1,90,95,0,0,30, -0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,31,0,109,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18, -109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0, -18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0, -0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122, -0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,10,51,0,57,59, -122,0,0,0,0,0,1,90,95,0,0,31,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,30,0,109,0,0,0,1,8, -58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18, -109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0, -18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0, -0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119, -0,0,18,109,0,16,10,50,0,57,59,119,0,0,0,0,0,0 diff --git a/mesalib/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h b/mesalib/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h deleted file mode 100644 index add3b5aea..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h +++ /dev/null @@ -1,5 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_builtin_120_fragment.gc */ - -5,2,2,90,95,3,0,10,0,1,103,108,95,80,111,105,110,116,67,111,111,114,100,0,0,0,0 diff --git a/mesalib/src/mesa/shader/slang/library/slang_common_builtin.gc b/mesalib/src/mesa/shader/slang/library/slang_common_builtin.gc index 56de47ee8..a25ca55bc 100644 --- a/mesalib/src/mesa/shader/slang/library/slang_common_builtin.gc +++ b/mesalib/src/mesa/shader/slang/library/slang_common_builtin.gc @@ -695,7 +695,7 @@ vec3 normalize(const vec3 v) { // const float s = inversesqrt(dot(v, v)); // __retVal = v * s; -// XXX note, we _could_ use __retVal.w instead of tmp and and save a +// XXX note, we _could_ use __retVal.w instead of tmp and save a // register, but that's actually a compilation error because v is a vec3 // and the .w suffix is illegal. Oh well. float tmp; @@ -1769,6 +1769,18 @@ vec4 shadow2DRectProj(const sampler2DRectShadow sampler, const vec4 coord) +//// GL_EXT_texture_array +vec4 texture1DArray(const sampler1DArray sampler, const vec2 coord) +{ + __asm vec4_tex_1d_array __retVal, sampler, coord; +} + +vec4 texture2DArray(const sampler2DArray sampler, const vec3 coord) +{ + __asm vec4_tex_2d_array __retVal, sampler, coord; +} + + // // 8.9 Noise Functions // diff --git a/mesalib/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/mesalib/src/mesa/shader/slang/library/slang_common_builtin_gc.h deleted file mode 100644 index 3c3666e4e..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_common_builtin_gc.h +++ /dev/null @@ -1,880 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_common_builtin.gc */ - -5,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,76,105,103,104,116,115,0,2,16,10,56,0,0,0,2,2,90,95,1,0, -5,0,1,103,108,95,77,97,120,67,108,105,112,80,108,97,110,101,115,0,2,16,10,54,0,0,0,2,2,90,95,1,0,5, -0,1,103,108,95,77,97,120,84,101,120,116,117,114,101,85,110,105,116,115,0,2,16,10,56,0,0,0,2,2,90, -95,1,0,5,0,1,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,2,16,10,56,0, -0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,86,101,114,116,101,120,65,116,116,114,105,98,115,0,2, -16,10,49,54,0,0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,86,101,114,116,101,120,85,110,105,102, -111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,16,10,53,49,50,0,0,0,2,2,90,95,1,0,5,0,1, -103,108,95,77,97,120,86,97,114,121,105,110,103,70,108,111,97,116,115,0,2,16,10,51,50,0,0,0,2,2,90, -95,1,0,5,0,1,103,108,95,77,97,120,86,101,114,116,101,120,84,101,120,116,117,114,101,73,109,97,103, -101,85,110,105,116,115,0,2,16,8,48,0,0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,67,111,109,98, -105,110,101,100,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,2,16,10,50,0,0,0, -2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105, -116,115,0,2,16,10,50,0,0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,70,114,97,103,109,101,110,116, -85,110,105,102,111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,16,10,54,52,0,0,0,2,2,90,95, -1,0,5,0,1,103,108,95,77,97,120,68,114,97,119,66,117,102,102,101,114,115,0,2,16,10,49,0,0,0,2,2,90, -95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,0,0,0,2,2,90,95,4, -0,15,0,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,0,0,2,2,90,95,4, -0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97, -116,114,105,120,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105, -120,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95, -4,0,14,0,1,103,108,95,78,111,114,109,97,108,77,97,116,114,105,120,0,0,0,2,2,90,95,4,0,15,0,1,103, -108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2, -2,90,95,4,0,15,0,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110, -118,101,114,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114, -111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2,2,90,95,4, -0,15,0,1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105,120,73,110,118,101,114,115,101,0, -3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,15, -0,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,84,114,97,110,115,112,111, -115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114, -105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108, -86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,84,114,97,110,115,112, -111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105,120, -84,114,97,110,115,112,111,115,101,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111, -111,114,100,115,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116, -114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0, -1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115, -101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,86, -105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101, -84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,84,101,120,116,117,114,101, -77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,3,18,103,108, -95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,9,0,1,103,108, -95,78,111,114,109,97,108,83,99,97,108,101,0,0,0,2,2,90,95,0,0,24,103,108,95,68,101,112,116,104,82, -97,110,103,101,80,97,114,97,109,101,116,101,114,115,0,9,0,110,101,97,114,0,0,0,1,9,0,102,97,114,0, -0,0,1,9,0,100,105,102,102,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,68,101,112,116,104,82,97,110, -103,101,80,97,114,97,109,101,116,101,114,115,0,0,1,103,108,95,68,101,112,116,104,82,97,110,103,101, -0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,67,108,105,112,80,108,97,110,101,0,3,18,103,108,95,77,97,120, -67,108,105,112,80,108,97,110,101,115,0,0,0,2,2,90,95,0,0,24,103,108,95,80,111,105,110,116,80,97, -114,97,109,101,116,101,114,115,0,9,0,115,105,122,101,0,0,0,1,9,0,115,105,122,101,77,105,110,0,0,0, -1,9,0,115,105,122,101,77,97,120,0,0,0,1,9,0,102,97,100,101,84,104,114,101,115,104,111,108,100,83, -105,122,101,0,0,0,1,9,0,100,105,115,116,97,110,99,101,67,111,110,115,116,97,110,116,65,116,116,101, -110,117,97,116,105,111,110,0,0,0,1,9,0,100,105,115,116,97,110,99,101,76,105,110,101,97,114,65,116, -116,101,110,117,97,116,105,111,110,0,0,0,1,9,0,100,105,115,116,97,110,99,101,81,117,97,100,114,97, -116,105,99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,80, -111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,0,1,103,108,95,80,111,105,110,116,0,0,0,2,2, -90,95,0,0,24,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,12,0, -101,109,105,115,115,105,111,110,0,0,0,1,12,0,97,109,98,105,101,110,116,0,0,0,1,12,0,100,105,102, -102,117,115,101,0,0,0,1,12,0,115,112,101,99,117,108,97,114,0,0,0,1,9,0,115,104,105,110,105,110,101, -115,115,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109, -101,116,101,114,115,0,0,1,103,108,95,70,114,111,110,116,77,97,116,101,114,105,97,108,0,0,0,2,2,90, -95,4,0,25,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,0,1,103, -108,95,66,97,99,107,77,97,116,101,114,105,97,108,0,0,0,2,2,90,95,0,0,24,103,108,95,76,105,103,104, -116,83,111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,12,0,97,109,98,105,101,110,116,0, -0,0,1,12,0,100,105,102,102,117,115,101,0,0,0,1,12,0,115,112,101,99,117,108,97,114,0,0,0,1,12,0,112, -111,115,105,116,105,111,110,0,0,0,1,12,0,104,97,108,102,86,101,99,116,111,114,0,0,0,1,11,0,115,112, -111,116,68,105,114,101,99,116,105,111,110,0,0,0,1,9,0,115,112,111,116,67,111,115,67,117,116,111, -102,102,0,0,0,1,9,0,99,111,110,115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0, -1,9,0,108,105,110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,0,113,117,97,100, -114,97,116,105,99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,0,115,112,111,116,69,120,112, -111,110,101,110,116,0,0,0,1,9,0,115,112,111,116,67,117,116,111,102,102,0,0,0,0,0,0,0,2,2,90,95,4,0, -25,103,108,95,76,105,103,104,116,83,111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,0,1, -103,108,95,76,105,103,104,116,83,111,117,114,99,101,0,3,18,103,108,95,77,97,120,76,105,103,104,116, -115,0,0,0,2,2,90,95,0,0,24,103,108,95,76,105,103,104,116,77,111,100,101,108,80,97,114,97,109,101, -116,101,114,115,0,12,0,97,109,98,105,101,110,116,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,76,105, -103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101,114,115,0,0,1,103,108,95,76,105,103, -104,116,77,111,100,101,108,0,0,0,2,2,90,95,0,0,24,103,108,95,76,105,103,104,116,77,111,100,101,108, -80,114,111,100,117,99,116,115,0,12,0,115,99,101,110,101,67,111,108,111,114,0,0,0,0,0,0,0,2,2,90,95, -4,0,25,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,0,1,103, -108,95,70,114,111,110,116,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2, -2,90,95,4,0,25,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,0, -1,103,108,95,66,97,99,107,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2, -2,90,95,0,0,24,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,12,0,97,109,98,105, -101,110,116,0,0,0,1,12,0,100,105,102,102,117,115,101,0,0,0,1,12,0,115,112,101,99,117,108,97,114,0, -0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,0,1,103, -108,95,70,114,111,110,116,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120, -76,105,103,104,116,115,0,0,0,2,2,90,95,4,0,25,103,108,95,76,105,103,104,116,80,114,111,100,117,99, -116,115,0,0,1,103,108,95,66,97,99,107,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108, -95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,84,101,120,116,117,114, -101,69,110,118,67,111,108,111,114,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97, -103,101,85,110,105,116,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,69,121,101,80,108,97,110,101,83,0, -3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12, -0,1,103,108,95,69,121,101,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114, -101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,69,121,101,80,108,97,110,101,82,0, -3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12, -0,1,103,108,95,69,121,101,80,108,97,110,101,81,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114, -101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,79,98,106,101,99,116,80,108,97, -110,101,83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2, -90,95,4,0,12,0,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120, -84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,79,98,106, -101,99,116,80,108,97,110,101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111, -114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,81,0,3,18, -103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,0,0,24,103, -108,95,70,111,103,80,97,114,97,109,101,116,101,114,115,0,12,0,99,111,108,111,114,0,0,0,1,9,0,100, -101,110,115,105,116,121,0,0,0,1,9,0,115,116,97,114,116,0,0,0,1,9,0,101,110,100,0,0,0,1,9,0,115,99, -97,108,101,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,70,111,103,80,97,114,97,109,101,116,101,114, -115,0,0,1,103,108,95,70,111,103,0,0,0,1,90,95,0,0,9,0,0,114,97,100,105,97,110,115,0,1,1,0,0,9,0, -100,101,103,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0, -0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0, -18,100,101,103,0,0,18,99,0,0,0,0,1,90,95,0,0,10,0,0,114,97,100,105,97,110,115,0,1,1,0,0,10,0,100, -101,103,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0, -49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,100,101,103,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,90,95,0,0,11,0,0,114,97, -100,105,97,110,115,0,1,1,0,0,11,0,100,101,103,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49, -53,57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,100,101,103,0,59,120,121,122,0,0,18,99,0,59, -120,120,120,0,0,0,0,1,90,95,0,0,12,0,0,114,97,100,105,97,110,115,0,1,1,0,0,12,0,100,101,103,0,0,0, -1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0,4,118, -101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,100,101,103,0, -0,18,99,0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,9,0,0,100,101,103,114,101,101,115,0,1,1,0,0,9,0, -114,97,100,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52,49,53,57,50,54,0, -0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0, -18,114,97,100,0,0,18,99,0,0,0,0,1,90,95,0,0,10,0,0,100,101,103,114,101,101,115,0,1,1,0,0,10,0,114, -97,100,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52,49,53,57,50,54,0,0,49, -0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,114,97,100,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,90,95,0,0,11,0,0,100,101,103, -114,101,101,115,0,1,1,0,0,11,0,114,97,100,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0, -17,51,0,49,52,49,53,57,50,54,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,114,97,100,0,59,120,121,122,0,0,18,99,0,59,120, -120,120,0,0,0,0,1,90,95,0,0,12,0,0,100,101,103,114,101,101,115,0,1,1,0,0,12,0,114,97,100,0,0,0,1,3, -2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52,49,53,57,50,54,0,0,49,0,0,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,114,97,100,0,0,18,99, -0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,9,0,0,115,105,110,0,1,1,0,0,9,0,114,97,100,105,97,110,115, -0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,114,97,100, -105,97,110,115,0,0,0,0,1,90,95,0,0,10,0,0,115,105,110,0,1,1,0,0,10,0,114,97,100,105,97,110,115,0,0, -0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114, -97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101, -116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,115, -105,110,0,1,1,0,0,11,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0, -18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108, -111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97, -110,115,0,59,121,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0, -59,122,0,0,18,114,97,100,105,97,110,115,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,115,105,110,0,1,1,0,0, -12,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101, -116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,115, -105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0, -0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114, -97,100,105,97,110,115,0,59,122,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101, -116,86,97,108,0,59,119,0,0,18,114,97,100,105,97,110,115,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,99,111, -115,0,1,1,0,0,9,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101, -0,18,95,95,114,101,116,86,97,108,0,0,18,114,97,100,105,97,110,115,0,0,0,0,1,90,95,0,0,10,0,0,99, -111,115,0,1,1,0,0,10,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0, -4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -114,97,100,105,97,110,115,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,99,111,115,0,1,1,0,0,11,0,114,97,100, -105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,99,111,115, -105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0, -0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0, -18,114,97,100,105,97,110,115,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,99,111,115,0,1,1,0,0,12,0,114,97, -100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116, -86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,99,111, -115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59, -121,0,0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122, -0,0,18,114,97,100,105,97,110,115,0,59,122,0,0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0, -18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,97,100,105,97,110,115,0,59,119,0,0,0,0,1,90,95, -0,0,9,0,0,116,97,110,0,1,1,0,0,9,0,97,110,103,108,101,0,0,0,1,3,2,90,95,1,0,9,0,1,115,0,2,58,115, -105,110,0,0,18,97,110,103,108,101,0,0,0,0,0,3,2,90,95,1,0,9,0,1,99,0,2,58,99,111,115,0,0,18,97,110, -103,108,101,0,0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,90,95,0,0,10,0,0,116,97,110,0,1,1,0,0,10,0,97, -110,103,108,101,0,0,0,1,3,2,90,95,1,0,10,0,1,115,0,2,58,115,105,110,0,0,18,97,110,103,108,101,0,0, -0,0,0,3,2,90,95,1,0,10,0,1,99,0,2,58,99,111,115,0,0,18,97,110,103,108,101,0,0,0,0,0,8,18,115,0,18, -99,0,49,0,0,1,90,95,0,0,11,0,0,116,97,110,0,1,1,0,0,11,0,97,110,103,108,101,0,0,0,1,3,2,90,95,1,0, -11,0,1,115,0,2,58,115,105,110,0,0,18,97,110,103,108,101,0,0,0,0,0,3,2,90,95,1,0,11,0,1,99,0,2,58, -99,111,115,0,0,18,97,110,103,108,101,0,0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,90,95,0,0,12,0,0,116,97, -110,0,1,1,0,0,12,0,97,110,103,108,101,0,0,0,1,3,2,90,95,1,0,12,0,1,115,0,2,58,115,105,110,0,0,18, -97,110,103,108,101,0,0,0,0,0,3,2,90,95,1,0,12,0,1,99,0,2,58,99,111,115,0,0,18,97,110,103,108,101,0, -0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,90,95,0,0,9,0,0,97,115,105,110,0,1,1,0,0,9,0,120,0,0,0,1,3,2, -90,95,1,0,9,0,1,97,48,0,2,17,49,0,53,55,48,55,50,56,56,0,0,0,0,3,2,90,95,1,0,9,0,1,97,49,0,2,17,48, -0,50,49,50,49,49,52,52,0,0,54,0,0,3,2,90,95,1,0,9,0,1,97,50,0,2,17,48,0,48,55,52,50,54,49,48,0,0,0, -0,3,2,90,95,1,0,9,0,1,104,97,108,102,80,105,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,48,0,53,0,0,48, -0,0,3,2,90,95,1,0,9,0,1,121,0,2,58,97,98,115,0,0,18,120,0,0,0,0,0,9,18,95,95,114,101,116,86,97,108, -0,18,104,97,108,102,80,105,0,58,115,113,114,116,0,0,17,49,0,48,0,0,18,121,0,47,0,0,18,97,48,0,18, -121,0,18,97,49,0,18,97,50,0,18,121,0,48,46,48,46,48,47,58,115,105,103,110,0,0,18,120,0,0,0,48,20,0, -0,1,90,95,0,0,10,0,0,97,115,105,110,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -59,120,0,58,97,115,105,110,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -121,0,58,97,115,105,110,0,0,18,118,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,115,105,110,0,1,1,0, -0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,115,105,110,0,0,18,118,0,59, -120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,115,105,110,0,0,18,118,0,59,121,0, -0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,115,105,110,0,0,18,118,0,59,122,0,0,0, -20,0,0,1,90,95,0,0,12,0,0,97,115,105,110,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,97,115,105,110,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -59,121,0,58,97,115,105,110,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -122,0,58,97,115,105,110,0,0,18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0, -58,97,115,105,110,0,0,18,118,0,59,119,0,0,0,20,0,0,1,90,95,0,0,9,0,0,97,99,111,115,0,1,1,0,0,9,0, -120,0,0,0,1,3,2,90,95,1,0,9,0,1,104,97,108,102,80,105,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,48,0, -53,0,0,48,0,0,9,18,95,95,114,101,116,86,97,108,0,18,104,97,108,102,80,105,0,58,97,115,105,110,0,0, -18,120,0,0,0,47,20,0,0,1,90,95,0,0,10,0,0,97,99,111,115,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,97,99,111,115,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,121,0,58,97,99,111,115,0,0,18,118,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97, -99,111,115,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,99,111,115, -0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,99,111,115,0,0,18, -118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,99,111,115,0,0,18,118,0, -59,122,0,0,0,20,0,0,1,90,95,0,0,12,0,0,97,99,111,115,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,59,120,0,58,97,99,111,115,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,121,0,58,97,99,111,115,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,59,122,0,58,97,99,111,115,0,0,18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -119,0,58,97,99,111,115,0,0,18,118,0,59,119,0,0,0,20,0,0,1,90,95,0,0,9,0,0,97,116,97,110,0,1,1,0,0, -9,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,97,115,105,110,0,0,18,120,0,58,105,110,118, -101,114,115,101,115,113,114,116,0,0,18,120,0,18,120,0,48,17,49,0,48,0,0,46,0,0,48,0,0,20,0,0,1,90, -95,0,0,10,0,0,97,116,97,110,0,1,1,0,0,10,0,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95, -120,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,116,97,110,0,1,1,0,0,11,0,121,95,111,118,101,114, -95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,121,95,111,118, -101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0, -0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0, -58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,122,0,0,0,20,0,0,1,90,95,0,0,12,0,0,97, -116,97,110,0,1,1,0,0,12,0,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -59,120,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0, -20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95, -120,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,97,116,97,110,0,0,18,121,95, -111,118,101,114,95,120,0,59,119,0,0,0,20,0,0,1,90,95,0,0,9,0,0,97,116,97,110,0,1,1,0,0,9,0,121,0,0, -1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,10,58,97,98,115,0,0,18,120,0,0,0,17,49,0,48, -0,45,52,0,41,0,2,9,18,114,0,58,97,116,97,110,0,0,18,121,0,18,120,0,49,0,0,20,0,10,18,120,0,17,48,0, -48,0,0,40,0,2,9,18,114,0,18,114,0,58,115,105,103,110,0,0,18,121,0,0,0,17,51,0,49,52,49,53,57,51,0, -0,48,46,20,0,0,9,14,0,0,2,9,18,114,0,58,115,105,103,110,0,0,18,121,0,0,0,17,49,0,53,55,48,55,57,54, -53,0,0,48,20,0,0,8,18,114,0,0,0,1,90,95,0,0,10,0,0,97,116,97,110,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10, -0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,117,0,59,120,0,0, -18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,0,18,117, -0,59,121,0,0,18,118,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,116,97,110,0,1,1,0,0,11,0,117,0,0, -1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,117,0, -59,120,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110, -0,0,18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58, -97,116,97,110,0,0,18,117,0,59,122,0,0,18,118,0,59,122,0,0,0,20,0,0,1,90,95,0,0,12,0,0,97,116,97, -110,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, -97,116,97,110,0,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108, -0,59,121,0,58,97,116,97,110,0,0,18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,122,0,58,97,116,97,110,0,0,18,117,0,59,122,0,0,18,118,0,59,122,0,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,119,0,58,97,116,97,110,0,0,18,117,0,59,119,0,0,18,118,0,59,119,0, -0,0,20,0,0,1,90,95,0,0,9,0,0,112,111,119,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,102,108,111, -97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95, -0,0,10,0,0,112,111,119,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,4,102,108,111,97,116,95,112, -111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0, -0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -97,0,59,121,0,0,18,98,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,112,111,119,0,1,1,0,0,11,0,97,0,0,1,1,0, -0,11,0,98,0,0,0,1,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0, -59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0, -18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111, -97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,18, -98,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,112,111,119,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4, -102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59, -120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86, -97,108,0,59,121,0,0,18,97,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,112,111,119, -101,114,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,18,98,0,59,122,0,0,0,4, -102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,97,0,59, -119,0,0,18,98,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,101,120,112,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0, -0,9,0,1,116,0,2,18,97,0,17,49,0,52,52,50,54,57,53,48,50,0,0,48,0,0,4,102,108,111,97,116,95,101,120, -112,50,0,18,95,95,114,101,116,86,97,108,0,0,18,116,0,0,0,0,1,90,95,0,0,10,0,0,101,120,112,0,1,1,0, -0,10,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,116,0,2,18,97,0,17,49,0,52,52,50,54,57,53,48,50,0,0,48,0,0, -4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,116,0,59, -120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18, -116,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,101,120,112,0,1,1,0,0,11,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1, -116,0,2,18,97,0,17,49,0,52,52,50,54,57,53,48,50,0,0,48,0,0,4,102,108,111,97,116,95,101,120,112,50, -0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,116,0,59,120,0,0,0,4,102,108,111,97,116,95,101, -120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,116,0,59,121,0,0,0,4,102,108,111,97, -116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,116,0,59,122,0,0,0,0,1,90, -95,0,0,12,0,0,101,120,112,0,1,1,0,0,12,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,116,0,2,18,97,0,17,49,0, -52,52,50,54,57,53,48,50,0,0,48,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116, -86,97,108,0,59,120,0,0,18,116,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114, -101,116,86,97,108,0,59,121,0,0,18,116,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18, -95,95,114,101,116,86,97,108,0,59,122,0,0,18,116,0,59,122,0,0,0,4,102,108,111,97,116,95,101,120,112, -50,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,116,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,108,111, -103,50,0,1,1,0,0,9,0,120,0,0,0,1,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86, -97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,108,111,103,50,0,1,1,0,0,10,0,118,0,0,0,1,4,102,108, -111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4, -102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121, -0,0,0,0,1,90,95,0,0,11,0,0,108,111,103,50,0,1,1,0,0,11,0,118,0,0,0,1,4,102,108,111,97,116,95,108, -111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97, -116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102, -108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0, -0,0,1,90,95,0,0,12,0,0,108,111,103,50,0,1,1,0,0,12,0,118,0,0,0,1,4,102,108,111,97,116,95,108,111, -103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95, -108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108,111, -97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,4,102, -108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,59,119,0,0, -0,0,1,90,95,0,0,9,0,0,108,111,103,0,1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54, -57,51,49,52,55,49,56,49,0,0,0,0,8,58,108,111,103,50,0,0,18,120,0,0,0,18,99,0,48,0,0,1,90,95,0,0,10, -0,0,108,111,103,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,57,51,49,52,55,49, -56,49,0,0,0,0,8,58,108,111,103,50,0,0,18,118,0,0,0,18,99,0,48,0,0,1,90,95,0,0,11,0,0,108,111,103,0, -1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,57,51,49,52,55,49,56,49,0,0,0,0,8, -58,108,111,103,50,0,0,18,118,0,0,0,18,99,0,48,0,0,1,90,95,0,0,12,0,0,108,111,103,0,1,1,0,0,12,0, -118,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,57,51,49,52,55,49,56,49,0,0,0,0,8,58,108,111,103, -50,0,0,18,118,0,0,0,18,99,0,48,0,0,1,90,95,0,0,9,0,0,101,120,112,50,0,1,1,0,0,9,0,97,0,0,0,1,4,102, -108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10, -0,0,101,120,112,50,0,1,1,0,0,10,0,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95, -95,114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,101,120,112,50,0,1, -1,0,0,11,0,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97, -108,0,59,121,0,0,18,97,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101, -116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,101,120,112,50,0,1,1,0,0,12,0, -97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121, -0,0,18,97,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0, -59,122,0,0,18,97,0,59,122,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86, -97,108,0,59,119,0,0,18,97,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,115,113,114,116,0,1,1,0,0,9,0,120,0,0, -0,1,3,2,90,95,1,0,9,0,1,110,120,0,2,18,120,0,54,0,0,3,2,90,95,0,0,9,0,1,114,0,0,0,4,102,108,111,97, -116,95,114,115,113,0,18,114,0,0,18,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,0,18, -114,0,0,0,4,118,101,99,52,95,99,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114, -0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,10,0,0,115,113,114,116,0,1,1,0,0,10,0,120,0,0,0,1,3,2,90,95,1, -0,10,0,1,110,120,0,2,18,120,0,54,0,1,1,122,101,114,111,0,2,58,118,101,99,50,0,0,17,48,0,48,0,0,0,0, -0,0,3,2,90,95,0,0,10,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18, -120,0,59,120,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0,18,114,0,59,120,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0,0,4,118,101,99,52,95,99,109,112,0,18, -95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0,0,0,0,1,90,95,0,0, -11,0,0,115,113,114,116,0,1,1,0,0,11,0,120,0,0,0,1,3,2,90,95,1,0,11,0,1,110,120,0,2,18,120,0,54,0,1, -1,122,101,114,111,0,2,58,118,101,99,51,0,0,17,48,0,48,0,0,0,0,0,0,3,2,90,95,0,0,11,0,1,114,0,0,0,4, -102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18,120,0,59,120,0,0,0,4,102,108,111,97,116, -95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0,4,102,108,111,97,116,95,114,115,113,0, -18,114,0,59,122,0,0,18,120,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0, -18,114,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,122,0,0,18,114,0,59,122,0,0,0,4,118,101,99,52, -95,99,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0, -0,0,0,1,90,95,0,0,12,0,0,115,113,114,116,0,1,1,0,0,12,0,120,0,0,0,1,3,2,90,95,1,0,12,0,1,110,120,0, -2,18,120,0,54,0,1,1,122,101,114,111,0,2,58,118,101,99,52,0,0,17,48,0,48,0,0,0,0,0,0,3,2,90,95,0,0, -12,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18,120,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,115,113,0,18,114,0,59,122,0,0,18,120,0,59,122,0,0,0,4,102,108,111,97,116,95,114,115,113,0, -18,114,0,59,119,0,0,18,120,0,59,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0, -18,114,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0, -0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,122,0,0,18,114,0,59,122,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,114,0,59,119,0,0,18,114,0,59,119,0,0,0,4,118,101,99,52,95,99,109,112,0,18, -95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0,0,0,0,1,90,95,0,0,9, -0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,9,0,120,0,0,0,1,4,102,108,111,97,116,95, -114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,105, -110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,10,0,118,0,0,0,1,4,102,108,111,97,116,95,114,115, -113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95, -114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,0,1,90,95,0,0,11,0, -0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,11,0,118,0,0,0,1,4,102,108,111,97,116,95, -114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97, -116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108, -111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,0,1, -90,95,0,0,12,0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,12,0,118,0,0,0,1,4,102,108, -111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4, -102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0, -0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59, -122,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118, -0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,9,0,120,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,17,49,0,48,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,114,109,97,108, -105,122,101,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,115,0,2,58,105,110,118,101,114,115,101, -115,113,114,116,0,0,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0,0,0,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,115,0,0,0, -0,1,90,95,0,0,11,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0,9, -0,1,116,109,112,0,0,0,4,118,101,99,51,95,100,111,116,0,18,116,109,112,0,0,18,118,0,0,18,118,0,0,0, -4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, -18,116,109,112,0,0,0,0,1,90,95,0,0,12,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,12,0,118,0, -0,0,1,3,2,90,95,0,0,9,0,1,116,109,112,0,0,0,4,118,101,99,52,95,100,111,116,0,18,116,109,112,0,0,18, -118,0,0,18,118,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0, -4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,118,0,0,18,116,109,112,0,0,0,0,1,90,95,0,0,9,0,0,97,98,115,0,1,1,0,0,9,0,97,0,0,0,1,4, -118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0, -97,98,115,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,0,0,18,97,0,0,0,0,1,90,95,0,0,11,0,0,97,98,115,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101,99, -52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,90,95,0,0,12, -0,0,97,98,115,0,1,1,0,0,12,0,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97, -108,0,0,18,97,0,0,0,0,1,90,95,0,0,9,0,0,115,105,103,110,0,1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,0,0,9, -0,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,0,18,120,0,0,17,48,0,48,0,0,0, -0,4,118,101,99,52,95,115,103,116,0,18,110,0,0,17,48,0,48,0,0,0,18,120,0,0,0,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,18,110,0,0,0,0,1,90,95,0, -0,10,0,0,115,105,103,110,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,10,0,1,112,0,0,1,1,110,0,0,0,4, -118,101,99,52,95,115,103,116,0,18,112,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99, -52,95,115,103,116,0,18,110,0,59,120,121,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,112,0,0,18,110,0,0,0, -0,1,90,95,0,0,11,0,0,115,105,103,110,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0,11,0,1,112,0,0,1,1, -110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0, -0,4,118,101,99,52,95,115,103,116,0,18,110,0,59,120,121,122,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -112,0,0,18,110,0,0,0,0,1,90,95,0,0,12,0,0,115,105,103,110,0,1,1,0,0,12,0,118,0,0,0,1,3,2,90,95,0,0, -12,0,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,0,18,118,0,0,17,48,0,48,0,0, -0,0,4,118,101,99,52,95,115,103,116,0,18,110,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95, -115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,18,110,0,0,0,0,1,90, -95,0,0,9,0,0,102,108,111,111,114,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0,102,108,111,111,114,0,1,1,0,0, -10,0,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,97,0,0,0,0,1,90,95,0,0,11,0,0,102,108,111,111,114,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101, -99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1, -90,95,0,0,12,0,0,102,108,111,111,114,0,1,1,0,0,12,0,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111, -114,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,9,0,0,99,101,105,108,0,1,1,0,0, -9,0,97,0,0,0,1,3,2,90,95,0,0,9,0,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0, -18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,54,20,0,0,1,90,95,0,0,10,0,0,99, -101,105,108,0,1,1,0,0,10,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52, -95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18, -98,0,54,20,0,0,1,90,95,0,0,11,0,0,99,101,105,108,0,1,1,0,0,11,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,98, -0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,18,98,0,54,20,0,0,1,90,95,0,0,12,0,0,99,101,105,108,0,1,1,0,0, -12,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114, -0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,54,20,0,0,1,90,95,0,0,9,0,0,102, -114,97,99,116,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86, -97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0,102,114,97,99,116,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101, -99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,0,0,1,90,95,0,0, -11,0,0,102,114,97,99,116,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,90,95,0,0,12,0,0,102,114,97,99,116,0,1,1,0, -0,12,0,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0, -0,0,1,90,95,0,0,9,0,0,109,111,100,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1, -111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101, -114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58,102,108,111,111,114,0, -0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,10,0,0,109,111,100,0, -1,1,0,0,10,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,111,110,101,79,118,101,114,66,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,18,97,0,18,98,0,58,102,108,111,111,114,0,0,18,97,0,18,111,110, -101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,11,0,0,109,111,100,0,1,1,0,0,11,0,97,0,0,1, -1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,18,97,0,18,98,0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101, -114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,12,0,0,109,111,100,0,1,1,0,0,12,0,97,0,0,1,1,0,0,9,0,98,0, -0,0,1,3,2,90,95,0,0,9,0,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0, -18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98, -0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90, -95,0,0,10,0,0,109,111,100,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,3,2,90,95,0,0,10,0,1,111, -110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114, -66,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118, -101,114,66,0,59,121,0,0,18,98,0,59,121,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58, -102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0, -11,0,0,109,111,100,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,3,2,90,95,0,0,11,0,1,111,110,101, -79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,59, -120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66, -0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101, -114,66,0,59,122,0,0,18,98,0,59,122,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58,102, -108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,12, -0,0,109,111,100,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,3,2,90,95,0,0,12,0,1,111,110,101,79, -118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,59, -120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66, -0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101, -114,66,0,59,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79, -118,101,114,66,0,59,119,0,0,18,98,0,59,119,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98, -0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90, -95,0,0,9,0,0,109,105,110,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105, -110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,0,109,105,110,0, -1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,121,0,0,0,0,1,90,95,0,0,11,0,0, -109,105,110,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,120,121,122,0, -0,0,0,1,90,95,0,0,12,0,0,109,105,110,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4,118,101,99,52, -95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,0,109, -105,110,0,1,1,0,0,10,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114, -101,116,86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,0,109,105,110,0,1,1,0, -0,11,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97, -108,0,0,18,97,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,0,109,105,110,0,1,1,0,0,12,0,97, -0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18, -97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,0,109,97,120,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4, -118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0, -0,10,0,0,109,97,120,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,121,0,0,0,0, -1,90,95,0,0,11,0,0,109,97,120,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,4,118,101,99,52,95,109, -97,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59, -120,121,122,0,0,0,0,1,90,95,0,0,12,0,0,109,97,120,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4, -118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0, -0,10,0,0,109,97,120,0,1,1,0,0,10,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,0,109,97, -120,0,1,1,0,0,11,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101, -116,86,97,108,0,0,18,97,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,0,109,97,120,0,1,1,0,0, -12,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108, -0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,0,99,108,97,109,112,0,1,1,0,0,9,0,118,97,108,0,0,1,1,0, -0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,99,108, -97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,18, -109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,10,0,0,99,108,97,109,112,0,1,1,0,0,10,0,118,97,108,0,0,1, -1,0,0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,99, -108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0, -18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,11,0,0,99,108,97,109,112,0,1,1,0,0,11,0,118,97,108,0,0, -1,1,0,0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95, -99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108, -0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,12,0,0,99,108,97,109,112,0,1,1,0,0,12,0,118,97,108, -0,0,1,1,0,0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52, -95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97, -108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,10,0,0,99,108,97,109,112,0,1,1,0,0,10,0,118,97, -108,0,0,1,1,0,0,10,0,109,105,110,86,97,108,0,0,1,1,0,0,10,0,109,97,120,86,97,108,0,0,0,1,4,118,101, -99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110, -86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,11,0,0,99,108,97,109,112,0,1,1,0,0,11,0, -118,97,108,0,0,1,1,0,0,11,0,109,105,110,86,97,108,0,0,1,1,0,0,11,0,109,97,120,86,97,108,0,0,0,1,4, -118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109, -105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,12,0,0,99,108,97,109,112,0,1,1,0, -0,12,0,118,97,108,0,0,1,1,0,0,12,0,109,105,110,86,97,108,0,0,1,1,0,0,12,0,109,97,120,86,97,108,0,0, -0,1,4,118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18, -109,105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,9,0,0,109,105,120,0,1,1,0,0, -9,0,120,0,0,1,1,0,0,9,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95, -114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,109,105,120,0,1,1, -0,0,10,0,120,0,0,1,1,0,0,10,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18, -95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,11,0,0,109,105,120, -0,1,1,0,0,11,0,120,0,0,1,1,0,0,11,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,114,112, -0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,12,0,0,109, -105,120,0,1,1,0,0,12,0,120,0,0,1,1,0,0,12,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108, -114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0, -0,109,105,120,0,1,1,0,0,10,0,120,0,0,1,1,0,0,10,0,121,0,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101,99,52, -95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0, -0,11,0,0,109,105,120,0,1,1,0,0,11,0,120,0,0,1,1,0,0,11,0,121,0,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101, -99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90, -95,0,0,12,0,0,109,105,120,0,1,1,0,0,12,0,120,0,0,1,1,0,0,12,0,121,0,0,1,1,0,0,12,0,97,0,0,0,1,4, -118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0, -0,0,1,90,95,0,0,9,0,0,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,0,0,1,1,0,0,9,0,120,0,0,0,1,4, -118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,18,101,100,103,101,0, -0,0,0,1,90,95,0,0,10,0,0,115,116,101,112,0,1,1,0,0,10,0,101,100,103,101,0,0,1,1,0,0,10,0,120,0,0,0, -1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,120,0,0,18, -101,100,103,101,0,0,0,0,1,90,95,0,0,11,0,0,115,116,101,112,0,1,1,0,0,11,0,101,100,103,101,0,0,1,1, -0,0,11,0,120,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,90,95,0,0,12,0,0,115,116,101,112,0,1,1,0,0,12,0, -101,100,103,101,0,0,1,1,0,0,12,0,120,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116, -86,97,108,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,90,95,0,0,10,0,0,115,116,101,112,0,1,1,0,0,9, -0,101,100,103,101,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,101,100,103,101,0,0,0,0,1,90,95,0,0,11,0,0,115,116, -101,112,0,1,1,0,0,9,0,101,100,103,101,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,101,100,103,101,0,0,0,0,1,90, -95,0,0,12,0,0,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101, -99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,101,100,103,101,0,0,0,0,1, -90,95,0,0,9,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,48,0,0,1,1,0, -0,9,0,101,100,103,101,49,0,0,1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,0,0,9,0,1,116,0,2,58,99,108,97,109, -112,0,0,18,120,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49, -0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18, -116,0,48,47,48,0,0,1,90,95,0,0,10,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,10,0,101, -100,103,101,48,0,0,1,1,0,0,10,0,101,100,103,101,49,0,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,10,0, -1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18, -101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51, -0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,11,0,0,115,109,111,111,116,104,115,116, -101,112,0,1,1,0,0,11,0,101,100,103,101,48,0,0,1,1,0,0,11,0,101,100,103,101,49,0,0,1,1,0,0,11,0,118, -0,0,0,1,3,2,90,95,0,0,11,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47, -18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8, -18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,12,0,0,115, -109,111,111,116,104,115,116,101,112,0,1,1,0,0,12,0,101,100,103,101,48,0,0,1,1,0,0,12,0,101,100,103, -101,49,0,0,1,1,0,0,12,0,118,0,0,0,1,3,2,90,95,0,0,12,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0, -18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0, -0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0, -0,1,90,95,0,0,10,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,48,0,0, -1,1,0,0,9,0,101,100,103,101,49,0,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,10,0,1,116,0,2,58,99,108, -97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0, -47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0, -0,18,116,0,48,47,48,0,0,1,90,95,0,0,11,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,9,0, -101,100,103,101,48,0,0,1,1,0,0,9,0,101,100,103,101,49,0,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0, -11,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49, -0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48, -17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,12,0,0,115,109,111,111,116,104,115, -116,101,112,0,1,1,0,0,9,0,101,100,103,101,48,0,0,1,1,0,0,9,0,101,100,103,101,49,0,0,1,1,0,0,12,0, -118,0,0,0,1,3,2,90,95,0,0,12,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0, -47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0, -8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,9,0,0,108, -101,110,103,116,104,0,1,1,0,0,9,0,120,0,0,0,1,8,58,97,98,115,0,0,18,120,0,0,0,0,0,1,90,95,0,0,9,0, -0,108,101,110,103,116,104,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,3,2,90,95,1,0,9, -0,1,112,0,2,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0, -18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59, -120,0,0,18,114,0,0,0,0,1,90,95,0,0,9,0,0,108,101,110,103,116,104,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90, -95,0,0,9,0,1,114,0,0,0,3,2,90,95,1,0,9,0,1,112,0,2,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0, -4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0, -18,95,95,114,101,116,86,97,108,0,0,18,114,0,0,0,0,1,90,95,0,0,9,0,0,108,101,110,103,116,104,0,1,1, -0,0,12,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,3,2,90,95,1,0,9,0,1,112,0,2,58,100,111,116,0,0, -18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,112,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,0,18,114,0,0,0,0,1,90,95,0,0,9,0,0, -100,105,115,116,97,110,99,101,0,1,1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,0,1,3,2,90,95,1,0,9,0,1, -100,0,2,18,120,0,18,121,0,47,0,0,9,18,95,95,114,101,116,86,97,108,0,58,108,101,110,103,116,104,0,0, -18,100,0,0,0,20,0,0,1,90,95,0,0,9,0,0,100,105,115,116,97,110,99,101,0,1,1,0,0,10,0,118,0,0,1,1,0,0, -10,0,117,0,0,0,1,3,2,90,95,1,0,10,0,1,100,50,0,2,18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116, -86,97,108,0,58,108,101,110,103,116,104,0,0,18,100,50,0,0,0,20,0,0,1,90,95,0,0,9,0,0,100,105,115, -116,97,110,99,101,0,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,3,2,90,95,1,0,11,0,1,100,51,0,2, -18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116,86,97,108,0,58,108,101,110,103,116,104,0,0,18,100, -51,0,0,0,20,0,0,1,90,95,0,0,9,0,0,100,105,115,116,97,110,99,101,0,1,1,0,0,12,0,118,0,0,1,1,0,0,12, -0,117,0,0,0,1,3,2,90,95,1,0,12,0,1,100,52,0,2,18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116,86, -97,108,0,58,108,101,110,103,116,104,0,0,18,100,52,0,0,0,20,0,0,1,90,95,0,0,11,0,0,99,114,111,115, -115,0,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,51,95,99,114,111,115,115,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,9,0,0,102,97, -99,101,102,111,114,119,97,114,100,0,1,1,0,0,9,0,78,0,0,1,1,0,0,9,0,73,0,0,1,1,0,0,9,0,78,114,101, -102,0,0,0,1,3,2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3, -2,90,95,0,0,9,0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0, -0,0,8,58,109,105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,10,0,0,102,97,99,101, -102,111,114,119,97,114,100,0,1,1,0,0,10,0,78,0,0,1,1,0,0,10,0,73,0,0,1,1,0,0,10,0,78,114,101,102,0, -0,0,1,3,2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,90, -95,0,0,9,0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8, -58,109,105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,11,0,0,102,97,99,101,102, -111,114,119,97,114,100,0,1,1,0,0,11,0,78,0,0,1,1,0,0,11,0,73,0,0,1,1,0,0,11,0,78,114,101,102,0,0,0, -1,3,2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,90,95,0, -0,9,0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58, -109,105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,12,0,0,102,97,99,101,102,111, -114,119,97,114,100,0,1,1,0,0,12,0,78,0,0,1,1,0,0,12,0,73,0,0,1,1,0,0,12,0,78,114,101,102,0,0,0,1,3, -2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9, -0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109, -105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,9,0,0,114,101,102,108,101,99,116,0, -1,1,0,0,9,0,73,0,0,1,1,0,0,9,0,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18, -73,0,0,0,48,18,78,0,48,47,0,0,1,90,95,0,0,10,0,0,114,101,102,108,101,99,116,0,1,1,0,0,10,0,73,0,0, -1,1,0,0,10,0,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,48,18,78, -0,48,47,0,0,1,90,95,0,0,11,0,0,114,101,102,108,101,99,116,0,1,1,0,0,11,0,73,0,0,1,1,0,0,11,0,78,0, -0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,90, -95,0,0,12,0,0,114,101,102,108,101,99,116,0,1,1,0,0,12,0,73,0,0,1,1,0,0,12,0,78,0,0,0,1,8,18,73,0, -17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,90,95,0,0,9,0,0,114, -101,102,114,97,99,116,0,1,1,0,0,9,0,73,0,0,1,1,0,0,9,0,78,0,0,1,1,0,0,9,0,101,116,97,0,0,0,1,3,2, -90,95,0,0,9,0,1,110,95,100,111,116,95,105,0,2,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,0,0,3,2,90, -95,0,0,9,0,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,18,110,95, -100,111,116,95,105,0,18,110,95,100,111,116,95,105,0,48,47,48,47,0,0,3,2,90,95,0,0,9,0,1,114,101, -116,118,97,108,0,0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,114,101,116,118,97,108,0,17,48,0,48,0,0, -20,0,9,18,114,101,116,118,97,108,0,18,101,116,97,0,18,73,0,48,18,101,116,97,0,18,110,95,100,111, -116,95,105,0,48,58,115,113,114,116,0,0,18,107,0,0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,118,97, -108,0,0,0,1,90,95,0,0,10,0,0,114,101,102,114,97,99,116,0,1,1,0,0,10,0,73,0,0,1,1,0,0,10,0,78,0,0,1, -1,0,0,9,0,101,116,97,0,0,0,1,3,2,90,95,0,0,9,0,1,110,95,100,111,116,95,105,0,2,58,100,111,116,0,0, -18,78,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,0,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97, -0,48,17,49,0,48,0,0,18,110,95,100,111,116,95,105,0,18,110,95,100,111,116,95,105,0,48,47,48,47,0,0, -3,2,90,95,0,0,10,0,1,114,101,116,118,97,108,0,0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,114,101,116, -118,97,108,0,58,118,101,99,50,0,0,17,48,0,48,0,0,0,0,20,0,9,18,114,101,116,118,97,108,0,18,101,116, -97,0,18,73,0,48,18,101,116,97,0,18,110,95,100,111,116,95,105,0,48,58,115,113,114,116,0,0,18,107,0, -0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,118,97,108,0,0,0,1,90,95,0,0,11,0,0,114,101,102,114,97, -99,116,0,1,1,0,0,11,0,73,0,0,1,1,0,0,11,0,78,0,0,1,1,0,0,9,0,101,116,97,0,0,0,1,3,2,90,95,0,0,9,0, -1,110,95,100,111,116,95,105,0,2,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,0,1, -107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,18,110,95,100,111,116,95, -105,0,18,110,95,100,111,116,95,105,0,48,47,48,47,0,0,3,2,90,95,0,0,11,0,1,114,101,116,118,97,108,0, -0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,114,101,116,118,97,108,0,58,118,101,99,51,0,0,17,48,0,48, -0,0,0,0,20,0,9,18,114,101,116,118,97,108,0,18,101,116,97,0,18,73,0,48,18,101,116,97,0,18,110,95, -100,111,116,95,105,0,48,58,115,113,114,116,0,0,18,107,0,0,0,46,18,78,0,48,47,20,0,8,18,114,101,116, -118,97,108,0,0,0,1,90,95,0,0,12,0,0,114,101,102,114,97,99,116,0,1,1,0,0,12,0,73,0,0,1,1,0,0,12,0, -78,0,0,1,1,0,0,9,0,101,116,97,0,0,0,1,3,2,90,95,0,0,9,0,1,110,95,100,111,116,95,105,0,2,58,100,111, -116,0,0,18,78,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,0,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18, -101,116,97,0,48,17,49,0,48,0,0,18,110,95,100,111,116,95,105,0,18,110,95,100,111,116,95,105,0,48,47, -48,47,0,0,3,2,90,95,0,0,12,0,1,114,101,116,118,97,108,0,0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18, -114,101,116,118,97,108,0,58,118,101,99,52,0,0,17,48,0,48,0,0,0,0,20,0,9,18,114,101,116,118,97,108, -0,18,101,116,97,0,18,73,0,48,18,101,116,97,0,18,110,95,100,111,116,95,105,0,48,58,115,113,114,116, -0,0,18,107,0,0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,118,97,108,0,0,0,1,90,95,0,0,13,0,0,109,97, -116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,13,0,109,0,0,1,0,0,0,13,0,110,0,0,0,1,8,58, -109,97,116,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0, -16,10,49,0,57,48,0,0,0,0,1,90,95,0,0,14,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0, -1,0,0,0,14,0,109,0,0,1,0,0,0,14,0,110,0,0,0,1,8,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,18,110, -0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18, -110,0,16,10,50,0,57,48,0,0,0,0,1,90,95,0,0,15,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108, -116,0,1,0,0,0,15,0,109,0,0,1,0,0,0,15,0,110,0,0,0,1,8,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0, -57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,90,95,0, -0,2,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99, -52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90, -95,0,0,3,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118, -101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0, -0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0, -0,1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0, -1,90,95,0,0,2,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4, -118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0, -0,0,0,1,90,95,0,0,3,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,7,0,117,0,0,1,1,0,0,7,0,118,0,0,0, -1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0, -18,118,0,0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0, -118,0,0,0,1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118, -0,0,0,0,1,90,95,0,0,2,0,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,0,10,0,117,0,0,1, -1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,108,101,115,115,84,104,97,110,69,113,117,97, -108,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,108,101,115,115, -84,104,97,110,69,113,117,97,108,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95, -115,108,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,108, -101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118, -101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0, -0,1,90,95,0,0,3,0,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0, -7,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1, -1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86, -97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,103,114,101,97,116,101,114,84,104,97,110,0, -1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,103,114,101,97,116,101, -114,84,104,97,110,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0, -103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101, -99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2, -0,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118, -101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,59,120,121,0,0, -18,118,0,59,120,121,0,0,0,0,1,90,95,0,0,3,0,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,0,7, -0,117,0,0,1,1,0,0,7,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,103,114,101,97,116,101,114,84,104, -97,110,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114, -101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,103,114,101,97,116,101,114,84, -104,97,110,69,113,117,97,108,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95, -115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0, -0,3,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,0,11,0,117,0,0,1,1,0,0, -11,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122, -0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113, -117,97,108,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95, -95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,103,114,101,97,116,101, -114,84,104,97,110,69,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118,101,99,52, -95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95, -0,0,3,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0, -7,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117, -97,108,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114, -101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,101,113,117,97,108,0,1,1,0,0,10, -0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,101,113,117,97,108,0,1,1,0,0,11,0,117, -0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,101,113,117,97,108,0,1,1,0,0,12,0,117, -0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0, -18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,101,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0, -118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,101,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0,7,0,118, -0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18, -117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,101,113,117,97,108,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118, -0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0, -0,0,1,90,95,0,0,2,0,0,101,113,117,97,108,0,1,1,0,0,2,0,117,0,0,1,1,0,0,2,0,118,0,0,0,1,4,118,101, -99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, -90,95,0,0,3,0,0,101,113,117,97,108,0,1,1,0,0,3,0,117,0,0,1,1,0,0,3,0,118,0,0,0,1,4,118,101,99,52, -95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1, -90,95,0,0,4,0,0,101,113,117,97,108,0,1,1,0,0,4,0,117,0,0,1,1,0,0,4,0,118,0,0,0,1,4,118,101,99,52, -95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0, -110,111,116,69,113,117,97,108,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95, -115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0, -0,3,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99, -52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0, -1,90,95,0,0,4,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90, -95,0,0,2,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118,101, -99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1, -90,95,0,0,3,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0,7,0,118,0,0,0,1,4,118, -101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0, -0,0,0,1,90,95,0,0,4,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0, -1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1, -90,95,0,0,2,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,2,0,117,0,0,1,1,0,0,2,0,118,0,0,0,1,4,118, -101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0, -0,1,90,95,0,0,3,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,3,0,117,0,0,1,1,0,0,3,0,118,0,0,0,1,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18, -118,0,0,0,0,1,90,95,0,0,4,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,4,0,117,0,0,1,1,0,0,4,0,118, -0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0, -0,0,1,90,95,0,0,1,0,0,97,110,121,0,1,1,0,0,2,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,115,117,109,0,0,0,4, -118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0, -0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59, -120,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,110,121,0,1,1,0,0,3,0,118,0,0,0,1,3,2,90,95,0,0, -9,0,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59, -120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115, -117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116, -86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,110, -121,0,1,1,0,0,4,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100,100, -0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97,100, -100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99, -52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,119,0,0,0,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120, -0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,108,108,0,1,1,0,0,2,0,118,0,0,0,1,3,2,90,95,0,0,9,0, -1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0, -0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116, -86,97,108,0,0,18,112,114,111,100,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,108,108,0,1,1,0,0,3, -0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,112,114,111,100,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109, -117,108,116,105,112,108,121,0,18,112,114,111,100,0,0,18,112,114,111,100,0,0,18,118,0,59,122,0,0,0, -4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,112,114,111,100,0,0,17,48,0, -48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,108,108,0,1,1,0,0,4,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,112,114, -111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,0,18,118,0, -59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114, -111,100,0,0,18,112,114,111,100,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,112,114,111,100,0,0,18,112,114,111,100,0,0,18,118,0,59,119,0,0,0,4,118,101,99,52, -95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,112,114,111,100,0,0,17,48,0,48,0,0,0,0,0,1, -90,95,0,0,2,0,0,110,111,116,0,1,1,0,0,2,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,0,110,111, -116,0,1,1,0,0,3,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,0,110,111,116,0,1,1,0,0,4,0,118,0, -0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0, -0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,0,1,1,0,0,16,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,9,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,49,100,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95, -0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,0,16,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,49,100,95,112, -114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111, -114,100,0,59,120,121,121,121,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114, -111,106,0,1,1,0,0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4, -118,101,99,52,95,116,101,120,95,49,100,95,112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18, -115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116, -117,114,101,50,68,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0, -0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101, -50,68,80,114,111,106,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100, -0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,112,114,111,106,0,18,95,95,114,101,116,86,97, -108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,120,121,122,122,0,0,0,0,1,90, -95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,0,17,0,115,97,109,112,108, -101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95, -112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111, -111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,0,1,1,0,0,18,0,115,97,109, -112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,51, -100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0, -0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1,0,0,18,0,115,97, -109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95, -51,100,95,112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0, -18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,67,117,98,101,0,1,1,0, -0,19,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95, -116,101,120,95,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0, -0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,0,1,1,0,0,20,0,115, -97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120, -95,49,100,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,80,114,111, -106,0,1,1,0,0,20,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118, -101,99,52,95,116,101,120,95,49,100,95,112,114,111,106,95,115,104,97,100,111,119,0,18,95,95,114,101, -116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0, -0,115,104,97,100,111,119,50,68,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111, -111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,115,104,97,100,111,119,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95, -0,0,12,0,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0, -0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,112,114,111, -106,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0, -0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,82,101,99,116, -0,1,1,0,0,22,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,0,1,4,118,101,99, -52,95,116,101,120,95,114,101,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,82,101, -99,116,80,114,111,106,0,1,1,0,0,22,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114, -100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,114,101,99,116,95,112,114,111,106,0,18,95,95,114,101, -116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,120,121,122,122,0,0, -0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,82,101,99,116,80,114,111,106,0,1,1,0,0,22, -0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116, -101,120,95,114,101,99,116,95,112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,99,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,50, -68,82,101,99,116,0,1,1,0,0,23,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0, -0,1,4,118,101,99,52,95,116,101,120,95,114,101,99,116,95,115,104,97,100,111,119,0,18,95,95,114,101, -116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0, -0,115,104,97,100,111,119,50,68,82,101,99,116,80,114,111,106,0,1,1,0,0,23,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,114,101,99,116, -95,112,114,111,106,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109, -112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,9,0,0,110,111,105,115,101,49,0,1,1,0, -0,9,0,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,95,95,114,101,116,86,97,108, -0,0,18,120,0,0,0,0,1,90,95,0,0,9,0,0,110,111,105,115,101,49,0,1,1,0,0,10,0,120,0,0,0,1,4,102,108, -111,97,116,95,110,111,105,115,101,50,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0, -0,9,0,0,110,111,105,115,101,49,0,1,1,0,0,11,0,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115, -101,51,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,9,0,0,110,111,105,115,101, -49,0,1,1,0,0,12,0,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,52,0,18,95,95,114,101, -116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,9,0,120,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18, -95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,17,49,57,0,51,52,0,0, -46,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,10,0,120,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,49,57,0,51, -52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0, -11,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120, -0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58, -118,101,99,51,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,0,1, -90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,12,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,49,57,0,51,52,0,0,0,17,55, -0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110,111, -105,115,101,51,0,1,1,0,0,9,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111, -105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105, -115,101,49,0,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122, -0,58,110,111,105,115,101,49,0,0,18,120,0,17,53,0,52,55,0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110, -111,105,115,101,51,0,1,1,0,0,10,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110, -111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111, -105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0, -0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118, -101,99,50,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110, -111,105,115,101,51,0,1,1,0,0,11,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110, -111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111, -105,115,101,49,0,0,18,120,0,58,118,101,99,51,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51, -0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49, -0,0,18,120,0,58,118,101,99,51,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0, -0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110,111,105,115,101,51,0,1,1,0,0,12,0,120,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,49,57, -0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,53, -0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,20,0,0, -1,90,95,0,0,12,0,0,110,111,105,115,101,52,0,1,1,0,0,9,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0, -59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,17,53,0,52,55,0,0,46,0,0,20,0, -9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,0,17,50,51,0,53, -52,0,0,46,0,0,20,0,0,1,90,95,0,0,12,0,0,110,111,105,115,101,52,0,1,1,0,0,10,0,120,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,49,57, -0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110, -111,105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0, -46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,0,58, -118,101,99,50,0,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,12,0,0, -110,111,105,115,101,52,0,1,1,0,0,11,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58, -110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110, -111,105,115,101,49,0,0,18,120,0,58,118,101,99,51,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17, -51,0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101, -49,0,0,18,120,0,58,118,101,99,51,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0, -0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120, -0,58,118,101,99,51,0,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0,46,0, -0,20,0,0,1,90,95,0,0,12,0,0,110,111,105,115,101,52,0,1,1,0,0,12,0,120,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,49,57,0,51,52,0,0, -0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,53,0,52,55,0,0, -0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,50, -51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0,0,20, -0,0,0 diff --git a/mesalib/src/mesa/shader/slang/library/slang_core_gc.h b/mesalib/src/mesa/shader/slang/library/slang_core_gc.h deleted file mode 100644 index b3d3e87cf..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_core_gc.h +++ /dev/null @@ -1,869 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_core.gc */ - -5,1,90,95,0,0,5,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18, -95,95,114,101,116,86,97,108,0,0,18,102,0,0,0,0,1,90,95,0,0,5,0,1,1,1,0,0,1,0,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,18,98,0,20,0,0,1,90,95,0,0,5,0,1,1,1,0,0,5,0,105,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,105,0,20,0,0,1,90,95,0,0,1,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95, -115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,1, -1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,102, -0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,1,1,1,0,0,1,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,18,98,0,20,0,0,1,90,95,0,0,9,0,1,1,1,0,0,5,0,105,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118, -101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,0,1,90,95,0,0,9,0,1,1,1,0,0,1,0,98,0,0, -0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,98,0,0, -0,0,1,90,95,0,0,9,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,102,0,20,0,0,1, -90,95,0,0,10,0,1,1,1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, -120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,0,1,90,95,0,0,10,0,1, -1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,102,0,0,0,0,1,90,95,0,0,10,0,1,1,1,0,0,5,0,105,0,0,0,1,4,105,118,101,99,52,95,116, -111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,0,0,0,1,90,95,0,0, -10,0,1,1,1,0,0,1,0,98,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,1,1,1,0,0,2,0,98,0,0,0,1,4,105,118, -101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,0, -0,0,1,90,95,0,0,10,0,1,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,1,1,1,0,0,12,0,118, -0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -118,0,59,120,121,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,1,1,0,0,9,0, -122,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,0,1,90,95,0, -0,11,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,102,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,5,0,105,0,0,0,1,4,105,118,101, -99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,0, -0,0,1,90,95,0,0,11,0,1,1,1,0,0,1,0,98,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,3,0,98,0, -0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,109,111, -118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,0,0,1,90,95,0,0,12,0,1,1, -1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,1,1,0,0,9,0,122,0,0,1,1,0,0,9,0,119,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20, -0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -119,0,18,119,0,20,0,0,1,90,95,0,0,12,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,109,111,118, -101,0,18,95,95,114,101,116,86,97,108,0,0,18,102,0,0,0,0,1,90,95,0,0,12,0,1,1,1,0,0,5,0,105,0,0,0,1, -4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0, -0,1,90,95,0,0,12,0,1,1,1,0,0,1,0,98,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18, -95,95,114,101,116,86,97,108,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,1,1,1,0,0,4,0,98,0,0,0,1,4,105,118, -101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,98,0,0,0,0,1,90,95,0, -0,12,0,1,1,1,0,0,8,0,105,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114, -101,116,86,97,108,0,0,18,105,0,0,0,0,1,90,95,0,0,12,0,1,1,1,0,0,11,0,118,51,0,0,1,1,0,0,9,0,102,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,119,0,18,102,0,20,0,0,1,90,95,0,0,12,0,1,1,1,0,0,10,0,118,50,0,0,1,1,0,0,9,0,102,49, -0,0,1,1,0,0,9,0,102,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,118,50,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,59,122,0,18,102,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59, -119,0,18,102,50,0,20,0,0,1,90,95,0,0,6,0,1,1,1,0,0,5,0,105,0,0,1,1,0,0,5,0,106,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,59,120,0,18,105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106, -0,20,0,0,1,90,95,0,0,6,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,0,0,0,1,90,95,0,0,6,0,1,1,1,0,0,9,0,102,0,0,0,1,4, -118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18, -102,0,0,0,0,1,90,95,0,0,6,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99, -52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,7,0,1,1,1,0,0,5,0, -105,0,0,1,1,0,0,5,0,106,0,0,1,1,0,0,5,0,107,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18, -105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,122,0,18,107,0,20,0,0,1,90,95,0,0,7,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,109, -111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,0,0,0,1,90,95,0,0,7,0,1, -1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,95,95,114,101,116,86, -97,108,0,59,120,121,122,0,0,18,102,0,0,0,0,1,90,95,0,0,7,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99, -52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95, -0,0,8,0,1,1,1,0,0,5,0,120,0,0,1,1,0,0,5,0,121,0,0,1,1,0,0,5,0,122,0,0,1,1,0,0,5,0,119,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0, -18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86, -97,108,0,59,119,0,18,119,0,20,0,0,1,90,95,0,0,8,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,109, -111,118,101,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,0,1,90,95,0,0,8,0,1,1,1,0,0,9,0,102, -0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18, -102,0,0,0,0,1,90,95,0,0,8,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99, -52,0,18,95,95,114,101,116,86,97,108,0,0,18,98,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,1,0,98,49,0,0,1,1, -0,0,1,0,98,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,121,0,18,98,50,0,20,0,0,1,90,95,0,0,2,0,1,1,1,0,0,5,0,105,49,0,0,1,1,0,0,5, -0,105,50,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18, -105,49,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, -121,0,0,18,105,50,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99, -52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0, -2,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99, -52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,0,17,48,0,48,0,0,0,0, -0,1,90,95,0,0,2,0,1,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,6,0,118,0,0,0, -1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17, -48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,1,0,98,49,0,0,1,1,0,0,1,0,98,50,0,0,1,1,0,0,1,0,98,51, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,121,0,18,98,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,98,51,0,20,0,0,1,90, -95,0,0,3,0,1,1,1,0,0,9,0,102,49,0,0,1,1,0,0,9,0,102,50,0,0,1,1,0,0,9,0,102,51,0,0,0,1,4,118,101,99, -52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,102,49,0,0,17,48,0,48,0,0,0,0,4, -118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,102,50,0,0,17,48,0, -48,0,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,102,51, -0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,109,111,118, -101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0, -9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0, -0,18,102,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,115, -110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,0,17,48,0,48,0,0,0,0,0,1,90, -95,0,0,3,0,1,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,7,0,118,0,0,0,1, -4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,17, -48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,1,0,98,49,0,0,1,1,0,0,1,0,98,50,0,0,1,1,0,0,1,0,98,51, -0,0,1,1,0,0,1,0,98,52,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,59,121,0,18,98,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18, -98,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,98,52,0,20,0,0,1,90,95,0,0,4,0,1,1,1,0, -0,9,0,102,49,0,0,1,1,0,0,9,0,102,50,0,0,1,1,0,0,9,0,102,51,0,0,1,1,0,0,9,0,102,52,0,0,0,1,3,2,90, -95,1,0,9,0,1,122,101,114,111,0,2,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,102,49,0,0,18,122,101,114,111,0,0,0,4,118,101,99,52,95,115,110, -101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,102,50,0,0,18,122,101,114,111,0,0,0,4,118,101, -99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,102,51,0,0,18,122,101,114, -111,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,102,52,0, -0,18,122,101,114,111,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,109,111, -118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,98,0,0,0,0,1,90,95,0,0,4,0,1, -1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,119,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118, -101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,105,0,0,17, -48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,4, -0,1,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59, -120,121,122,119,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,13,0,1,1,1,0,0,9,0,109,48,48,0,0,1, -1,0,0,9,0,109,49,48,0,0,1,1,0,0,9,0,109,48,49,0,0,1,1,0,0,9,0,109,49,49,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18, -109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,0,1, -90,95,0,0,13,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0, -18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,17,48,0,48,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,59,121,0,18,102,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,5,0,105,0,0,0,1,8,58,109, -97,116,50,0,0,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,0,0,1,90,95,0,0,13,0,1,1,1,0,0,1,0,98,0,0, -0,1,8,58,109,97,116,50,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,0,0,1,90,95,0,0,13,0,1,1,1,0, -0,10,0,99,48,0,0,1,1,0,0,10,0,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99, -48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,90,95,0,0,14,0,1,1, -1,0,0,9,0,109,48,48,0,0,1,1,0,0,9,0,109,49,48,0,0,1,1,0,0,9,0,109,50,48,0,0,1,1,0,0,9,0,109,48,49, -0,0,1,1,0,0,9,0,109,49,49,0,0,1,1,0,0,9,0,109,50,49,0,0,1,1,0,0,9,0,109,48,50,0,0,1,1,0,0,9,0,109, -49,50,0,0,1,1,0,0,9,0,109,50,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0, -18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49, -0,57,59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109, -50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,9,0,102,0,0,0,1,3,2, -90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,0,9,18,95,95,114,101, -116,86,97,108,0,16,8,48,0,57,18,118,0,59,120,121,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,49,0,57,18,118,0,59,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,118, -0,59,121,121,120,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,5,0,105,0,0,0,1,8,58,109,97,116,51,0,0,58,102, -108,111,97,116,0,0,18,105,0,0,0,0,0,0,0,1,90,95,0,0,14,0,1,1,1,0,0,1,0,98,0,0,0,1,8,58,109,97,116, -51,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,0,0,1,90,95,0,0,14,0,1,1,1,0,0,11,0,99,48,0,0,1,1, -0,0,11,0,99,49,0,0,1,1,0,0,11,0,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,9,0,109,48,48,0,0,1,1,0, -0,9,0,109,49,48,0,0,1,1,0,0,9,0,109,50,48,0,0,1,1,0,0,9,0,109,51,48,0,0,1,1,0,0,9,0,109,48,49,0,0, -1,1,0,0,9,0,109,49,49,0,0,1,1,0,0,9,0,109,50,49,0,0,1,1,0,0,9,0,109,51,49,0,0,1,1,0,0,9,0,109,48, -50,0,0,1,1,0,0,9,0,109,49,50,0,0,1,1,0,0,9,0,109,50,50,0,0,1,1,0,0,9,0,109,51,50,0,0,1,1,0,0,9,0, -109,48,51,0,0,1,1,0,0,9,0,109,49,51,0,0,1,1,0,0,9,0,109,50,51,0,0,1,1,0,0,9,0,109,51,51,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,18,109,51, -48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,59,122,0,18,109,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -59,119,0,18,109,51,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48, -50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,59,119,0,18,109,51,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57, -59,120,0,18,109,48,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,18,109,49, -51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,18,109,50,51,0,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,18,109,51,51,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,9, -0,102,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,0, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,118,0,59,120,121,121,121,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,118,0,59,121,120,121,121,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,118,0,59,121,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51, -0,57,18,118,0,59,121,121,121,120,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,5,0,105,0,0,0,1,8,58,109,97, -116,52,0,0,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,0,0,1,90,95,0,0,15,0,1,1,1,0,0,1,0,98,0,0,0, -1,8,58,109,97,116,52,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,0,0,1,90,95,0,0,15,0,1,1,1,0,0, -12,0,99,48,0,0,1,1,0,0,12,0,99,49,0,0,1,1,0,0,12,0,99,50,0,0,1,1,0,0,12,0,99,51,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,90,95,0,0,5,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0, -0,5,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18, -98,0,0,0,0,1,90,95,0,0,5,0,2,27,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0, -5,0,2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,5,0,2,22,1,1,0,0,5,0, -97,0,0,1,1,0,0,5,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,98,73,110,118,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,105,118,101,99, -52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,6,0,2,26,1,1,0,0,6,0,97,0,0,1,1, -0,0,6,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18, -98,0,0,0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,6,0,97,0,0,1,1,0,0,6,0,98,0,0,0,1,4,118,101,99,52,95,115, -117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0, -6,0,2,21,1,1,0,0,6,0,97,0,0,1,1,0,0,6,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,6,0,2,22,1,1,0,0,6,0, -97,0,0,1,1,0,0,6,0,98,0,0,0,1,3,2,90,95,0,0,10,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,105, -118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,7,0,2,26,1,1,0,0,7,0, -97,0,0,1,1,0,0,7,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0, -18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,7,0,2,27,1,1,0,0,7,0,97,0,0,1,1,0,0,7,0,98,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0, -1,90,95,0,0,7,0,2,21,1,1,0,0,7,0,97,0,0,1,1,0,0,7,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,7,0,2,22, -1,1,0,0,7,0,97,0,0,1,1,0,0,7,0,98,0,0,0,1,3,2,90,95,0,0,11,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,98,73,110,118,0,59,122,0,0,18,98,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95, -105,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,8,0,2,26,1,1,0,0, -8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0, -0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,8,0,2,27,1,1,0,0,8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,4,118,101, -99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0, -1,90,95,0,0,8,0,2,21,1,1,0,0,8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,8,0,2,22, -1,1,0,0,8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,3,2,90,95,0,0,12,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4, -102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108, -111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116, -95,114,99,112,0,18,98,73,110,118,0,59,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,98,73,110,118,0,59,119,0,0,18,98,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,105,118, -101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,9,0,2,26,1,1,0,0,9,0,97, -0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18, -97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99, -52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1, -90,95,0,0,9,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,2,22, -1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,98,73,110,118,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116, -105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,73,110,118,0,0,0,0,1,90,95,0, -0,10,0,2,26,1,1,0,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95, -114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,10, -0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,10,0, -118,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,10,0,2,22,1,1,0,0,10,0, -118,0,0,1,1,0,0,10,0,117,0,0,0,1,3,2,90,95,0,0,10,0,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112, -0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0, -0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,90,95,0,0,11,0,2,26,1,1,0,0,11,0,118,0,0,1, -1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,11,0,2,27,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0, -0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121, -122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0, -0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120, -121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,11,0,2,22,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117, -0,0,0,1,3,2,90,95,0,0,11,0,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18, -117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0, -18,119,0,0,0,0,1,90,95,0,0,12,0,2,26,1,1,0,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52, -95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,27, -1,1,0,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, -95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,12,0,118,0, -0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,22,1,1,0,0,12,0,118,0,0,1,1,0,0,12, -0,117,0,0,0,1,3,2,90,95,0,0,12,0,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120, -0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121, -0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108, -116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,90,95,0,0,10, -0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,18,117,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,26,1,1, -0,0,10,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,9,0,97,0, -0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116, -86,97,108,0,59,120,121,0,0,18,97,0,0,18,117,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,10, -0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114, -101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,2,21,1,1, -0,0,9,0,97,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95, -95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,18,117,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2, -21,1,1,0,0,10,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121, -0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0, -0,10,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,10,0,117,0,0,0,1,3,2,90,95,0,0,10,0,1,105,110,118,85,0,0,0, -4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102, -108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99, -52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0, -18,105,110,118,85,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,22,1,1,0,0,10,0,118,0,0,1,1,0,0,9,0,98,0, -0,0,1,3,2,90,95,0,0,9,0,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118, -66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,0,0,0,1,90,95,0,0,11,0,2,26,1,1,0, -0,9,0,97,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,97,0,0,18,117,0,59,120,121,122,0,0,0,0,1,90,95,0,0,11,0,2,26,1,1,0,0, -11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,2,27,1,1,0,0,9,0, -97,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101, -116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,18,117,0,59,120,121,122,0,0,0,0,1,90,95,0,0,11,0,2,27, -1,1,0,0,11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18, -95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95, -0,0,11,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,18,117,0,59,120,121, -122,0,0,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95, -109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59, -120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,11,0,117,0,0,0,1,3, -2,90,95,0,0,11,0,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0, -59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0, -0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117, -0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108, -0,59,120,121,122,0,0,18,97,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,90,95,0,0,11,0,2,22,1, -1,0,0,11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,105,110,118,66,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18, -105,110,118,66,0,0,0,0,1,90,95,0,0,12,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101, -99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0, -2,26,1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101, -116,86,97,108,0,0,18,118,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,12,0, -117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0, -18,97,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,27,1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118, -101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0, -0,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,95,109,117, -108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,117,0,0,0,0,1,90,95,0,0, -12,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112, -108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,2,22,1,1,0, -0,9,0,97,0,0,1,1,0,0,12,0,117,0,0,0,1,3,2,90,95,0,0,12,0,1,105,110,118,85,0,0,0,4,102,108,111,97, -116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95, -114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99, -112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18, -105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108, -121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,105,110,118,85,0,0,0,0,1,90,95,0,0,12,0,2,22, -1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,105,110,118,66,0,0,0,4,102,108,111, -97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105, -112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,0,0,0,1,90,95,0,0, -6,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118, -101,99,50,0,0,18,97,0,0,0,18,117,0,46,20,0,0,1,90,95,0,0,6,0,2,26,1,1,0,0,6,0,118,0,0,1,1,0,0,5,0, -98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,0,18,98,0,0,0,46,20, -0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,58,105,118,101,99,50,0,0,18,97,0,0,0,18,117,0,47,20,0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,6,0,118, -0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,0,18, -98,0,0,0,47,20,0,0,1,90,95,0,0,6,0,2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,58,105,118,101,99,50,0,0,18,97,0,0,0,18,117,0,48,20,0,0,1,90,95,0,0,6,0,2,21,1, -1,0,0,6,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118, -101,99,50,0,0,18,98,0,0,0,48,20,0,0,1,90,95,0,0,6,0,2,22,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,50,0,0,18,97,0,0,0,18,117,0,49,20,0,0,1,90, -95,0,0,6,0,2,22,1,1,0,0,6,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,58,105,118,101,99,50,0,0,18,98,0,0,0,49,20,0,0,1,90,95,0,0,7,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0, -0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,0,18,97,0,0,0,18,117,0, -46,20,0,0,1,90,95,0,0,7,0,2,26,1,1,0,0,7,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,0,0,46,20,0,0,1,90,95,0,0,7,0,2,27,1,1,0,0,5, -0,97,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,0,18,97, -0,0,0,18,117,0,47,20,0,0,1,90,95,0,0,7,0,2,27,1,1,0,0,7,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,0,0,47,20,0,0,1,90,95,0,0,7,0, -2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101, -99,51,0,0,18,97,0,0,0,18,117,0,48,20,0,0,1,90,95,0,0,7,0,2,21,1,1,0,0,7,0,118,0,0,1,1,0,0,5,0,98,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,0,0,48,20,0,0,1, -90,95,0,0,7,0,2,22,1,1,0,0,5,0,97,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -58,105,118,101,99,51,0,0,18,97,0,0,0,18,117,0,49,20,0,0,1,90,95,0,0,7,0,2,22,1,1,0,0,7,0,118,0,0,1, -1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0, -0,0,49,20,0,0,1,90,95,0,0,8,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,0,18,117,0,46,20,0,0,1,90,95,0,0,8,0,2,26,1,1,0, -0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99, -52,0,0,18,98,0,0,0,46,20,0,0,1,90,95,0,0,8,0,2,27,1,1,0,0,5,0,97,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,0,18,117,0,47,20,0,0,1,90,95,0,0, -8,0,2,27,1,1,0,0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58, -105,118,101,99,52,0,0,18,98,0,0,0,47,20,0,0,1,90,95,0,0,8,0,2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,8,0, -117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,0,18,117,0,48,20, -0,0,1,90,95,0,0,8,0,2,21,1,1,0,0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,118,0,58,105,118,101,99,52,0,0,18,98,0,0,0,48,20,0,0,1,90,95,0,0,8,0,2,22,1,1,0,0,5,0,97, -0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0, -0,18,117,0,49,20,0,0,1,90,95,0,0,8,0,2,22,1,1,0,0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,52,0,0,18,98,0,0,0,49,20,0,0,1,90,95,0,0,5,0,2, -27,1,1,0,0,5,0,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,0,0,18,97,0,0,0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,6,0,118,0,0,0,1,4,118,101,99,52,95,110, -101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,90,95,0,0,7,0,2,27,1,1,0, -0,7,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0, -18,118,0,0,0,0,1,90,95,0,0,8,0,2,27,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116, -101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,90,95,0,0,9,0,2,27,1,1,0,0,9,0,97,0,0,0, -1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0, -0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0, -18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,90,95,0,0,11,0,2,27, -1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97, -108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,90,95,0,0,12,0,2,27,1,1,0,0,12,0,118,0, -0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0, -0,1,90,95,0,0,13,0,2,27,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,54,20,0,0,1,90,95,0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54, -20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,90,95,0,0,9,0,0, -100,111,116,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0, -18,98,0,48,20,0,0,1,90,95,0,0,9,0,0,100,111,116,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121, -0,48,46,20,0,0,1,90,95,0,0,9,0,0,100,111,116,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,4,118, -101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0, -9,0,0,100,111,116,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0, -18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,5,0,2,1,1,0,2,0,5,0,97,0,0, -1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,46,20,0,8,18,97,0,0,0,1,90,95,0,0,5,0,2,2,1,0,2,0, -5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,5,0, -2,3,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90, -95,0,0,5,0,2,4,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97, -0,0,0,1,90,95,0,0,6,0,2,1,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0, -46,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,2,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,118,0, -18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0, -0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,4,1,0,2,0,6,0,118,0,0, -1,1,0,0,6,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,1,1, -0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90, -95,0,0,7,0,2,2,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8, -18,118,0,0,0,1,90,95,0,0,7,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0, -18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9, -18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0, -8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,2,1,0,2,0,8, -0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0, -8,0,2,3,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18,118, -0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0, -49,20,0,8,18,118,0,0,0,1,90,95,0,0,9,0,2,1,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18, -97,0,18,98,0,46,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,2,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9, -18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,3,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0, -98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,4,1,0,2,0,9,0,97,0,0, -1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97,0,0,0,1,90,95,0,0,10,0,2,1,1,0,2, -0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90, -95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0, -8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18, -118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0, -0,0,1,9,18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,1,1,0,2,0,11,0,118,0, -0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2, -2,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0, -0,1,90,95,0,0,11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0, -48,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118, -0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0, -117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,2,1,0,2,0,12,0, -118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0, -12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18, -118,0,0,0,1,90,95,0,0,12,0,2,4,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0, -18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,1,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,2, -1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0, -0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0, -18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,4,1,0,2,0,6, -0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,49,20,0, -8,18,118,0,0,0,1,90,95,0,0,7,0,2,1,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0, -58,105,118,101,99,51,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,2,1,0,2,0,7,0,118,0, -0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,18,97,0,0,0,47,20,0,8,18,118, -0,0,0,1,90,95,0,0,7,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105, -118,101,99,51,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0, -0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1, -90,95,0,0,8,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99, -52,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,2,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0, -0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0, -8,0,2,3,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,18, -97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9, -18,118,0,18,118,0,58,105,118,101,99,52,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,1, -1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,18,97,0,0,0, -46,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0, -18,118,0,58,118,101,99,50,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0, -118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,18,97,0,0,0,48,20,0,8,18, -118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58, -118,101,99,50,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,1,1,0,2,0,11,0,118,0,0,1,1, -0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1, -90,95,0,0,11,0,2,2,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99, -51,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97, -0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,11, -0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0, -0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18, -118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,2,1,0,2, -0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,47,20,0, -8,18,118,0,0,0,1,90,95,0,0,12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118, -0,58,118,101,99,52,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,4,1,0,2,0,12,0,118,0, -0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0, -0,1,90,95,0,0,13,0,2,26,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,90,95,0,0,13,0,2, -27,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57, -18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109, -0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,59,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,0,48, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0, -57,59,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,59,121,121,0,48,46,20,0,0,1,90,95, -0,0,13,0,2,22,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16, -8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,90,95,0,0,14,0,2,26,1,1,0, -0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0, -16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109, -0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,90,95,0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,1, -1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50, -0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0, -57,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,121,0,48,46,18,109, -0,16,10,50,0,57,18,110,0,16,8,48,0,57,59,122,122,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,0,48,18,109,0,16,10,49, -0,57,18,110,0,16,10,49,0,57,59,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,49,0,57, -59,122,122,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57, -18,110,0,16,10,50,0,57,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121, -121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,0,48,46,20,0,0,1,90, -95,0,0,14,0,2,22,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,90,95,0,0,15,0,2,26, -1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57, -18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50, -0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0, -15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16, -8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0, -57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,15,0,109, -0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57, -18,110,0,16,8,48,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121, -121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,8,48,0,57,59,122,122,122,122,0,48,46,18,109, -0,16,10,51,0,57,18,110,0,16,8,48,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,120,0,48,18,109,0, -16,10,49,0,57,18,110,0,16,10,49,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16, -10,49,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,49,0,57,59,119,119,119, -119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57,18,110,0, -16,10,50,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121,121,121, -121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,122,0,48,46,18,109,0,16, -10,51,0,57,18,110,0,16,10,50,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108, -0,16,10,51,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,51,0,57,59,120,120,120,120,0,48,18,109,0,16, -10,49,0,57,18,110,0,16,10,51,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10, -51,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,59,119,119,119, -119,0,48,46,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95, -114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95, -95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20, -0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57, -49,20,0,0,1,90,95,0,0,13,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116, -86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,90,95,0,0,13,0,2,26,1,1,0,0,13,0,109,0,0, -1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0, -0,1,90,95,0,0,13,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,90,95,0,0,13,0,2,27,1,1,0,0,13,0,109,0,0,1,1,0, -0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1, -90,95,0,0,13,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0, -98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,90,95,0, -0,13,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48, -0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97, -0,18,110,0,16,10,49,0,57,49,20,0,0,1,90,95,0,0,13,0,2,22,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0,98,0,0,0, -1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,90,95,0,0,14,0,2, -26,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110, -0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50, -0,57,46,20,0,0,1,90,95,0,0,14,0,2,26,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,90,95,0,0,14,0,2,27,1,1,0,0,9,0,97,0,0,1, -1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0, -57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,90,95, -0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18, -109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,98,0,47,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,14,0, -109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0, -48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0, -1,90,95,0,0,14,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0, -18,110,0,16,10,50,0,57,49,20,0,0,1,90,95,0,0,14,0,2,22,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,90,95,0,0,15,0,2,26,1,1,0, -0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18, -110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10, -49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46, -20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1, -90,95,0,0,15,0,2,26,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109, -0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51, -0,57,18,98,0,46,20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97, -108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16, -10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,15,0,109,0,0,1,1, -0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0, -47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9, -18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,90,95,0,0,15,0,2, -21,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18, -97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110, -0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50, -0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20, -0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18, -109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16, -10,51,0,57,18,98,0,48,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9, -18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114, -101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86, -97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0, -16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0, -1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98, -0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0, -9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95, -114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,90,95,0,0,10,0,2, -21,1,1,0,0,13,0,109,0,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8, -48,0,57,18,118,0,59,120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,0,48,46,20,0,0,1,90,95, -0,0,10,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59, -120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97, -108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,11,0,2, -21,1,1,0,0,14,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8, -48,0,57,18,118,0,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,121,0,48,46,18,109, -0,16,10,50,0,57,18,118,0,59,122,122,122,0,48,46,20,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0, -1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0, -18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18, -118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116, -0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0, -0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8,48,0,57,18,118,0,59,120,120, -120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18, -118,0,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,118,0,59,119,119,119,119,0,48,46,20,0,0, -1,90,95,0,0,12,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116, -86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114, -101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,18,95, -95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0, -0,1,90,95,0,0,13,0,2,1,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -18,110,0,16,10,49,0,57,46,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,13, -0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,109, -0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,8,18,109,0,0,0,1,90,95,0,0, -13,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,8,18, -109,0,0,0,1,90,95,0,0,13,0,2,4,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,18,110,0,16,10,49,0,57,49,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0, -0,14,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9, -18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,109,0,16,10,50,0, -57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,2,1,0,2, -0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16, -8,48,0,57,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9, -18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,8,18,109,0,0,0,1,90, -95,0,0,14,0,2,3,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0, -8,18,109,0,0,0,1,90,95,0,0,14,0,2,4,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,16,8, -48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16, -10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0, -16,10,50,0,57,49,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,1,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,109,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0, -16,10,51,0,57,46,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,2,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0, -0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,109,0,16,10, -49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0, -16,10,51,0,57,47,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,3,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0, -0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,4,1,0,2,0,15,0,109,0, -0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49, -20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,109,0,16, -10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,109,0,16,10,51,0,57,18,109,0, -16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,1,1,0,2,0,13,0,109, -0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18, -109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10, -49,0,57,18,118,0,46,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0, -0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18, -109,0,16,8,48,0,57,18,118,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,47,20, -0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10, -0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90, -95,0,0,13,0,2,4,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118, -101,99,50,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18, -118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90, -95,0,0,14,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118, -101,99,51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9,18, -109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,18,118,0,46,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,2,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0, -97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99,51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0, -57,18,109,0,16,8,48,0,57,18,118,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0, -47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,47,20,0,8,18,109,0,0,0,1,90,95,0, -0,14,0,2,3,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99, -51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0, -16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0, -57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,4,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0, -1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99,51,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,8,18,109,0,0, -0,1,90,95,0,0,15,0,2,1,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,118,0,2,58, -118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9, -18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0, -16,10,50,0,57,18,118,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,118,0,46,20,0,8, -18,109,0,0,0,1,90,95,0,0,15,0,2,2,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1, -118,0,2,58,118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118, -0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,47,20,0,9,18,109,0,16,10,50,0, -57,18,109,0,16,10,50,0,57,18,118,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,118, -0,47,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,3,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90, -95,0,0,12,0,1,118,0,2,58,118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,9,18,109, -0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51, -0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,4,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0, -0,1,3,2,90,95,0,0,12,0,1,118,0,2,58,118,101,99,52,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0, -16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0, -57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,9,18,109,0,16, -10,51,0,57,18,109,0,16,10,51,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10, -0,118,0,0,1,1,0,0,13,0,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0, -11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,14,0,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,8,18, -118,0,0,0,1,90,95,0,0,12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,15,0,109,0,0,0,1,9,18,118,0,18,118,0, -18,109,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,5,0,2,25,1,0,2,0,5,0,97,0,0,0,1,9,18,97,0,18,97,0,16, -10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,90,95,0,0,6,0,2,25,1,0,2,0,6,0, -118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101, -116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,7,0,2,25,1,0,2,0,7,0,118,0,0,0,1,9,18,118,0,18,118,0, -58,105,118,101,99,51,0,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0, -1,90,95,0,0,8,0,2,25,1,0,2,0,8,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,16,10,49, -0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,9,0,2,25,1,0,2,0,9,0, -97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20, -0,0,1,90,95,0,0,10,0,2,25,1,0,2,0,10,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49, -0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,11,0,2,25,1,0, -2,0,11,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,12,0,2,25,1,0,2,0,12,0,118,0,0,0,1,9,18,118, -0,18,118,0,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,0,1,90,95,0,0,13,0,2,25,1,0,2,0,13,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8, -48,0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49, -0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0, -20,0,0,1,90,95,0,0,14,0,2,25,1,0,2,0,14,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0, -57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57, -58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58, -118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1, -90,95,0,0,15,0,2,25,1,0,2,0,15,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118, -101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118, -101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118, -101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118, -101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90, -95,0,0,5,0,2,24,1,0,2,0,5,0,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114,101,116, -86,97,108,0,18,97,0,20,0,0,1,90,95,0,0,6,0,2,24,1,0,2,0,6,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105, -118,101,99,50,0,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90, -95,0,0,7,0,2,24,1,0,2,0,7,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,16,10,49,0,0, -0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,8,0,2,24,1,0,2,0,8,0,118, -0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116, -86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,9,0,2,24,1,0,2,0,9,0,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0, -48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,90,95,0,0,10,0,2,24,1,0,2,0,10, -0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,11,0,2,24,1,0,2,0,11,0,118,0,0,0,1,9,18,118,0,18, -118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,0,1,90,95,0,0,12,0,2,24,1,0,2,0,12,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,17, -49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,13,0,2,24,1, -0,2,0,13,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,0,17,49,0, -48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,0,17,49,0,48, -0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,14,0,2,24,1,0,2,0, -14,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0, -0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0, -0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0, -46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,15,0,2,24,1,0,2,0,15,0,109, -0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46, -20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20, -0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0, -9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9, -18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,5,0,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,0,5,0,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16, -10,49,0,47,20,0,0,1,90,95,0,0,6,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,6,0,118,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,16, -10,49,0,0,0,47,20,0,0,1,90,95,0,0,7,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,7,0,118,0,0, -0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0, -16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,8,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,8,0,118,0, -0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0, -0,16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,9,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,9,0,97, -0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,0, -1,90,95,0,0,10,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,10,0,118,0,0,0,1,9,18,95,95,114, -101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,47, -20,0,0,1,90,95,0,0,11,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,11,0,118,0,0,0,1,9,18,95, -95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0, -0,47,20,0,0,1,90,95,0,0,12,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,12,0,118,0,0,0,1,9,18, -95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,0,17,49,0,48,0, -0,0,0,47,20,0,0,1,90,95,0,0,13,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,13,0,109,0,0,0,1, -9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58, -118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58, -118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,14,0,0,95,95,112,111,115,116,68,101,99, -114,0,1,0,2,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48, -0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0, -57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57, -18,109,0,16,10,50,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,15,0,0,95,95, -112,111,115,116,68,101,99,114,0,1,0,2,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109, -0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20, -0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0, -9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9, -18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,0,1, -90,95,0,0,9,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,9,0,97,0,0,0,1,9,18,95,95,114,101, -116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,90,95,0,0,10,0,0,95,95,112, -111,115,116,73,110,99,114,0,1,0,2,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0, -20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0,11,0,0,95, -95,112,111,115,116,73,110,99,114,0,1,0,2,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18, -118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0,12,0, -0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108, -0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0, -5,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,5,0,97,0,0,0,1,9,18,95,95,114,101,116,86,97, -108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,90,95,0,0,6,0,0,95,95,112,111,115,116, -73,110,99,114,0,1,0,2,0,6,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118, -0,18,118,0,58,105,118,101,99,50,0,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,7,0,0,95,95,112,111,115, -116,73,110,99,114,0,1,0,2,0,7,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18, -118,0,18,118,0,58,105,118,101,99,51,0,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,8,0,0,95,95,112,111, -115,116,73,110,99,114,0,1,0,2,0,8,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9, -18,118,0,18,118,0,58,105,118,101,99,51,0,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,13,0,0,95,95,112, -111,115,116,73,110,99,114,0,1,0,2,0,13,0,109,0,0,0,1,3,2,90,95,0,0,13,0,1,110,0,2,18,109,0,0,0,9, -18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18, -109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,8,18, -110,0,0,0,1,90,95,0,0,14,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,14,0,109,0,0,0,1,3,2,90, -95,0,0,14,0,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51, -0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0, -0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,0, -17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,15,0,0,95,95,112,111,115,116,73,110,99,114,0, -1,0,2,0,15,0,109,0,0,0,1,3,2,90,95,0,0,15,0,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109, -0,16,8,48,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0, -16,10,49,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16, -10,50,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10, -51,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,1,0,2,15,1,1,0, -0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97, -108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,90,95,0,0,1,0,2,15,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0, -0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,40,0,0,1,90,95, -0,0,1,0,2,16,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,1,99,0,0,0,4,102,108,111, -97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,90,95,0,0,1,0,2,16,1,1, -0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97, -116,0,0,18,98,0,0,0,41,0,0,1,90,95,0,0,1,0,2,18,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90, -95,0,0,1,0,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0, -18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103, -0,18,101,0,32,0,0,1,90,95,0,0,1,0,2,18,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111, -97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,43,0,0,1,90,95,0,0,1,0,2,17,1,1,0,0,9, -0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95, -108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18, -101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,90,95,0,0,1,0,2,17,1,1,0,0,5,0,97,0,0,1, -1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0, -42,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,9,0,102,0,0,0,1,4,102,108,111, -97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,0,5,0,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,90,95,0,0,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,0,1,0,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0, -18,98,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,10,0,118,0,0,0,1,9,58, -112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0, -0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,11,0,118,0, -0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77, -69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0, -0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,12,0,118,0,0,0,1,9,58,112,114, -105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18, -118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69, -83,65,0,1,1,0,0,6,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9, -58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110, -116,77,69,83,65,0,1,1,0,0,7,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120, -0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116, -77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1, -0,0,8,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18, -118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0, -0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,2,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69, -83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0, -0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,3,0,118,0,0,0,1,9,58,112,114,105,110, -116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59, -121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0, -112,114,105,110,116,77,69,83,65,0,1,1,0,0,4,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0, -18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112, -114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0, -18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,13,0,109,0,0, -0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116, -77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0, -1,1,0,0,14,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58, -112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83, -65,0,0,18,109,0,16,10,50,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0, -15,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114, -105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0, -18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,51,0,57,0,0,0, -0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,16,0,101,0,0,0,1,4,105,110,116,95, -112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0, -17,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,0,18,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,19,0,101,0,0,0,1,4,105,110,116, -95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0, -0,20,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114, -105,110,116,77,69,83,65,0,1,1,0,0,21,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0, -0,0,0,0 diff --git a/mesalib/src/mesa/shader/slang/library/slang_fragment_builtin.gc b/mesalib/src/mesa/shader/slang/library/slang_fragment_builtin.gc index 2e063e641..54a80ea0e 100644 --- a/mesalib/src/mesa/shader/slang/library/slang_fragment_builtin.gc +++ b/mesalib/src/mesa/shader/slang/library/slang_fragment_builtin.gc @@ -165,6 +165,70 @@ vec4 shadow2DProj(const sampler2DShadow sampler, const vec4 coord, const float b +//// GL_EXT_texture_array + +vec4 texture1DArray(const sampler1DArray sampler, const vec2 coord) +{ + vec4 coord4; + coord4.xy = coord; + __asm vec4_tex_1d_array __retVal, sampler, coord4; +} + +vec4 texture1DArray(const sampler1DArray sampler, const vec2 coord, const float bias) +{ + vec4 coord4; + coord4.xy = coord; + coord4.w = bias; + __asm vec4_tex_1d_array_bias __retVal, sampler, coord4; +} + +vec4 texure2DArray(const sampler2DArray sampler, const vec3 coord) +{ + vec4 coord4; + coord4.xyz = coord; + __asm vec4_tex_2d_array __retVal, sampler, coord4; +} + +vec4 texture2DArray(const sampler2DArray sampler, const vec3 coord, const float bias) +{ + vec4 coord4; + coord4.xyz = coord; + coord4.w = bias; + __asm vec4_tex_2d_array_bias __retVal, sampler, coord4; +} + +vec4 shadow1DArray(const sampler1DArrayShadow sampler, const vec2 coord) +{ + vec4 coord4; + coord4.xy = coord; + __asm vec4_tex_1d_array_shadow __retVal, sampler, coord4; +} + +vec4 shadow1DArray(const sampler1DArrayShadow sampler, const vec2 coord, const float bias) +{ + vec4 coord4; + coord4.xy = coord; + coord4.w = bias; + __asm vec4_tex_1d_array_bias_shadow __retVal, sampler, coord4; +} + +vec4 shadow2DArray(const sampler2DArrayShadow sampler, const vec3 coord) +{ + vec4 coord4; + coord4.xyz = coord; + __asm vec4_tex_2d_array_shadow __retVal, sampler, coord4; +} + +vec4 shadow2DArray(const sampler2DArrayShadow sampler, const vec3 coord, const float bias) +{ + vec4 coord4; + coord4.xyz = coord; + coord4.w = bias; + __asm vec4_tex_2d_array_bias_shadow __retVal, sampler, coord4; +} + + + // // 8.8 Fragment Processing Functions // diff --git a/mesalib/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h b/mesalib/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h deleted file mode 100644 index c5a1cce2a..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h +++ /dev/null @@ -1,110 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_fragment_builtin.gc */ - -5,2,2,90,95,6,0,12,0,1,103,108,95,70,114,97,103,67,111,111,114,100,0,0,0,2,2,90,95,6,0,1,0,1,103, -108,95,70,114,111,110,116,70,97,99,105,110,103,0,0,0,2,2,90,95,5,0,12,0,1,103,108,95,70,114,97,103, -67,111,108,111,114,0,0,0,2,2,90,95,5,0,12,0,1,103,108,95,70,114,97,103,68,97,116,97,0,3,18,103,108, -95,77,97,120,68,114,97,119,66,117,102,102,101,114,115,0,0,0,2,2,90,95,5,0,9,0,1,103,108,95,70,114, -97,103,68,101,112,116,104,0,0,0,2,2,90,95,3,0,12,0,1,103,108,95,67,111,108,111,114,0,0,0,2,2,90,95, -3,0,12,0,1,103,108,95,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0, -1,103,108,95,84,101,120,67,111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101, -67,111,111,114,100,115,0,0,0,2,2,90,95,3,0,9,0,1,103,108,95,70,111,103,70,114,97,103,67,111,111, -114,100,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,0,1,1,0,0,16,0,115,97,109,112, -108,101,114,0,0,1,1,0,0,9,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0, -12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100,0, -20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120, -95,49,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0, -18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111, -106,0,1,1,0,0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0, -98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114, -100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,121,0,49,20,0,9,18,112, -99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95, -98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111, -111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,0, -16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115, -0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0, -18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114, -100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,0, -18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0, -0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,0,1,1,0,0,17,0,115,97,109,112,108,101,114, -0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,99, -111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,120, -121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116, -101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80, -114,111,106,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1, -0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111, -111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,122,0, -49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101, -120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, -0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80,114, -111,106,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0, -9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111, -114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,119,0,49,20, -0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95, -50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18, -112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,0,1,1,0,0,18,0, -115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0, -1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0, -18,99,111,111,114,100,0,59,120,121,122,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97, -115,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97, -108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116, -101,120,116,117,114,101,51,68,80,114,111,106,0,1,1,0,0,18,0,115,97,109,112,108,101,114,0,0,1,1,0,0, -12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111, -114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121, -122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97, -115,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97, -108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116, -101,120,116,117,114,101,67,117,98,101,0,1,1,0,0,19,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0, -99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100, -52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111, -111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,99,117,98,101, -0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0, -0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,0,1,1,0,0,20,0,115,97,109,112,108,101,114,0, -0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,99, -111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20, -0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95, -49,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97, -109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119, -49,68,80,114,111,106,0,1,1,0,0,20,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100, -0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112, -99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49, -20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111, -111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105, -97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,50,68,0,1,1,0, -0,21,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97, -115,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120, -121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20, -0,4,118,101,99,52,95,116,101,120,95,50,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90, -95,0,0,12,0,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,1,0,0,21,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1, -112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59, -120,121,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99, -111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4, -118,101,99,52,95,116,101,120,95,50,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114, -101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95, -0,0,9,0,0,100,70,100,120,0,1,1,0,0,9,0,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114, -101,116,86,97,108,0,59,120,0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,10,0,0,100,70,100, -120,0,1,1,0,0,10,0,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0, -59,120,121,0,0,18,112,0,59,120,121,121,121,0,0,0,0,1,90,95,0,0,11,0,0,100,70,100,120,0,1,1,0,0,11, -0,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0, -18,112,0,59,120,121,122,122,0,0,0,0,1,90,95,0,0,12,0,0,100,70,100,120,0,1,1,0,0,12,0,112,0,0,0,1,4, -118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,0,0,1,90,95,0,0,9,0,0, -100,70,100,121,0,1,1,0,0,9,0,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86, -97,108,0,59,120,0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,10,0,0,100,70,100,121,0,1,1,0, -0,10,0,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0, -0,18,112,0,59,120,121,121,121,0,0,0,0,1,90,95,0,0,11,0,0,100,70,100,121,0,1,1,0,0,11,0,112,0,0,0,1, -4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,112,0,59, -120,121,122,122,0,0,0,0,1,90,95,0,0,12,0,0,100,70,100,121,0,1,1,0,0,12,0,112,0,0,0,1,4,118,101,99, -52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,0,0,1,90,95,0,0,9,0,0,102,119, -105,100,116,104,0,1,1,0,0,9,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0, -0,58,97,98,115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,1,90,95,0,0,10,0,0,102,119,105, -100,116,104,0,1,1,0,0,10,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,0, -58,97,98,115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,1,90,95,0,0,11,0,0,102,119,105,100, -116,104,0,1,1,0,0,11,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,0,58,97, -98,115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,1,90,95,0,0,12,0,0,102,119,105,100,116, -104,0,1,1,0,0,12,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,0,58,97,98, -115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,0 diff --git a/mesalib/src/mesa/shader/slang/library/slang_pp_directives.syn b/mesalib/src/mesa/shader/slang/library/slang_pp_directives.syn deleted file mode 100644 index b51d168cc..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_pp_directives.syn +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/** - * \file slang_pp_directives.syn - * slang preprocessor directives parser - * \author Michal Krol - */ - -.syntax source; - -/* - * This syntax script preprocesses a GLSL shader. - * It is assumed, that the #version directive has been parsed. Separate pass for parsing - * version gives better control on behavior depending on the version number given. - * - * The output is a source string with comments and directives removed. White spaces and comments - * are replaced with on or more spaces. All new-lines are preserved and converted to Linux format. - * Directives are escaped with a null character. The end of the source string is marked by - * two consecutive null characters. The consumer is responsible for executing the escaped - * directives, removing dead portions of code and expanding macros. - */ - -.emtcode ESCAPE_TOKEN 0 - -/* - * The TOKEN_* symbols follow the ESCAPE_TOKEN. - * - * NOTE: - * There is no TOKEN_IFDEF and neither is TOKEN_IFNDEF. They are handled with TOKEN_IF and - * operator defined. - * The "#ifdef SYMBOL" is replaced with "#if defined SYMBOL" - * The "#ifndef SYMBOL" is replaced with "#if !defined SYMBOL" - */ -.emtcode TOKEN_END 0 -.emtcode TOKEN_DEFINE 1 -.emtcode TOKEN_UNDEF 2 -.emtcode TOKEN_IF 3 -.emtcode TOKEN_ELSE 4 -.emtcode TOKEN_ELIF 5 -.emtcode TOKEN_ENDIF 6 -.emtcode TOKEN_ERROR 7 -.emtcode TOKEN_PRAGMA 8 -.emtcode TOKEN_EXTENSION 9 -.emtcode TOKEN_LINE 10 - -/* - * The PARAM_* symbols follow the TOKEN_DEFINE. - */ -.emtcode PARAM_END 0 -.emtcode PARAM_PARAMETER 1 - -/* - * The BEHAVIOR_* symbols follow the TOKEN_EXTENSION. - */ -.emtcode BEHAVIOR_REQUIRE 1 -.emtcode BEHAVIOR_ENABLE 2 -.emtcode BEHAVIOR_WARN 3 -.emtcode BEHAVIOR_DISABLE 4 - -/* - * The PRAGMA_* symbols follow TOKEN_PRAGMA - */ -.emtcode PRAGMA_NO_PARAM 0 -.emtcode PRAGMA_PARAM 1 - -source - optional_directive .and .loop source_element .and '\0' .emit ESCAPE_TOKEN .emit TOKEN_END; - -source_element - c_style_comment_block .or cpp_style_comment_block .or new_line_directive .or source_token; - -c_style_comment_block - '/' .and '*' .and c_style_comment_rest .and .true .emit ' '; - -c_style_comment_rest - .loop c_style_comment_body .and c_style_comment_end; - -c_style_comment_body - c_style_comment_char_nostar .or c_style_comment_char_star_noslashstar; - -c_style_comment_char_nostar - new_line .or '\x2B'-'\xFF' .or '\x01'-'\x29'; - -c_style_comment_char_star_noslashstar - '*' .and c_style_comment_char_star_noslashstar_1; -c_style_comment_char_star_noslashstar_1 - c_style_comment_char_noslashstar .or c_style_comment_char_star_noslashstar; - -c_style_comment_char_noslashstar - new_line .or '\x30'-'\xFF' .or '\x01'-'\x29' .or '\x2B'-'\x2E'; - -c_style_comment_end - '*' .and .loop c_style_comment_char_star .and '/'; - -c_style_comment_char_star - '*'; - -cpp_style_comment_block - '/' .and '/' .and cpp_style_comment_block_1; -cpp_style_comment_block_1 - cpp_style_comment_block_2 .or cpp_style_comment_block_3; -cpp_style_comment_block_2 - .loop cpp_style_comment_char .and new_line_directive; -cpp_style_comment_block_3 - .loop cpp_style_comment_char; - -cpp_style_comment_char - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -new_line_directive - new_line .and optional_directive; - -new_line - generic_new_line .emit '\n'; - -generic_new_line - carriage_return_line_feed .or line_feed_carriage_return .or '\n' .or '\r'; - -carriage_return_line_feed - '\r' .and '\n'; - -line_feed_carriage_return - '\n' .and '\r'; - -optional_directive - directive .emit ESCAPE_TOKEN .or .true; - -directive - dir_define .emit TOKEN_DEFINE .or - dir_undef .emit TOKEN_UNDEF .or - dir_if .emit TOKEN_IF .or - dir_ifdef .emit TOKEN_IF .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' .emit 'd' - .emit ' ' .or - dir_ifndef .emit TOKEN_IF .emit '!' .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' - .emit 'd' .emit ' ' .or - dir_else .emit TOKEN_ELSE .or - dir_elif .emit TOKEN_ELIF .or - dir_endif .emit TOKEN_ENDIF .or - dir_ext .emit TOKEN_EXTENSION .or - dir_pragma .emit TOKEN_PRAGMA .or - dir_line .emit TOKEN_LINE; - -dir_define - optional_space .and '#' .and optional_space .and "define" .and symbol .and opt_parameters .and - definition; - -dir_undef - optional_space .and '#' .and optional_space .and "undef" .and symbol; - -dir_if - optional_space .and '#' .and optional_space .and "if" .and expression; - -dir_ifdef - optional_space .and '#' .and optional_space .and "ifdef" .and symbol; - -dir_ifndef - optional_space .and '#' .and optional_space .and "ifndef" .and symbol; - -dir_else - optional_space .and '#' .and optional_space .and "else"; - -dir_elif - optional_space .and '#' .and optional_space .and "elif" .and expression; - -dir_endif - optional_space .and '#' .and optional_space .and "endif"; - -dir_ext - optional_space .and '#' .and optional_space .and "extension" .and space .and extension_name .and - optional_space .and ':' .and optional_space .and extension_behavior; - -dir_line - optional_space .and '#' .and optional_space .and "line" .and expression; - -dir_pragma - optional_space .and '#' .and optional_space .and "pragma" .and symbol .and opt_pragma_param; - - -opt_pragma_param - pragma_param .or .true .emit PRAGMA_NO_PARAM; - -pragma_param - optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')'; - -symbol_no_space - symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0'; - -symbol - space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0'; - -opt_parameters - parameters .or .true .emit PARAM_END; - -parameters - '(' .and parameters_1 .and optional_space .and ')' .emit PARAM_END; -parameters_1 - parameters_2 .or .true; -parameters_2 - parameter .emit PARAM_PARAMETER .and .loop parameters_3; -parameters_3 - optional_space .and ',' .and parameter .emit PARAM_PARAMETER; - -parameter - optional_space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and - .true .emit '\0'; - -definition - .loop definition_character .emit * .and .true .emit '\0'; - -definition_character - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -expression - expression_element .and .loop expression_element .and .true .emit '\0'; - -expression_element - expression_character .emit *; - -expression_character - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -extension_name - symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0'; - -extension_behavior - "require" .emit BEHAVIOR_REQUIRE .or - "enable" .emit BEHAVIOR_ENABLE .or - "warn" .emit BEHAVIOR_WARN .or - "disable" .emit BEHAVIOR_DISABLE; - -optional_space - .loop single_space; - -space - single_space .and .loop single_space; - -single_space - ' ' .or '\t'; - -source_token - space .emit ' ' .or complex_token .or source_token_1; -source_token_1 - simple_token .emit ' ' .and .true .emit ' '; - -/* - * All possible tokens. - */ - -complex_token - identifier .or number; - -simple_token - increment .or decrement .or lequal .or gequal .or equal .or nequal .or and .or xor .or or .or - addto .or subtractfrom .or multiplyto .or divideto .or other; - -identifier - identifier_char1 .emit * .and .loop identifier_char2 .emit *; -identifier_char1 - 'a'-'z' .or 'A'-'Z' .or '_'; -identifier_char2 - 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_'; - -number - float .or integer; - -digit_oct - '0'-'7'; - -digit_dec - '0'-'9'; - -digit_hex - '0'-'9' .or 'A'-'F' .or 'a'-'f'; - -float - float_1 .or float_2; -float_1 - float_fractional_constant .and float_optional_exponent_part; -float_2 - float_digit_sequence .and float_exponent_part; - -float_fractional_constant - float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3; -float_fractional_constant_1 - float_digit_sequence .and '.' .emit '.' .and float_digit_sequence; -float_fractional_constant_2 - float_digit_sequence .and '.' .emit '.'; -float_fractional_constant_3 - '.' .emit '.' .and float_digit_sequence; - -float_optional_exponent_part - float_exponent_part .or .true; - -float_digit_sequence - digit_dec .emit * .and .loop digit_dec .emit *; - -float_exponent_part - float_exponent_part_1 .or float_exponent_part_2; -float_exponent_part_1 - 'e' .emit 'e' .and float_optional_sign .and float_digit_sequence; -float_exponent_part_2 - 'E' .emit 'E' .and float_optional_sign .and float_digit_sequence; - -float_optional_sign - '+' .emit '+' .or '-' .emit '-' .or .true; - -integer - integer_hex .or integer_oct .or integer_dec; - -integer_hex - '0' .emit '0' .and integer_hex_1 .emit * .and digit_hex .emit * .and - .loop digit_hex .emit *; -integer_hex_1 - 'x' .or 'X'; - -integer_oct - '0' .emit '0' .and .loop digit_oct .emit *; - -integer_dec - digit_dec .emit * .and .loop digit_dec .emit *; - -increment - '+' .emit * .and '+' .emit *; - -decrement - '-' .emit * .and '-' .emit *; - -lequal - '<' .emit * .and '=' .emit *; - -gequal - '>' .emit * .and '=' .emit *; - -equal - '=' .emit * .and '=' .emit *; - -nequal - '!' .emit * .and '=' .emit *; - -and - '&' .emit * .and '&' .emit *; - -xor - '^' .emit * .and '^' .emit *; - -or - '|' .emit * .and '|' .emit *; - -addto - '+' .emit * .and '=' .emit *; - -subtractfrom - '-' .emit * .and '=' .emit *; - -multiplyto - '*' .emit * .and '=' .emit *; - -divideto - '/' .emit * .and '=' .emit *; - -/* - * All characters except '\0' and '#'. - */ -other - '\x24'-'\xFF' .emit * .or '\x01'-'\x22' .emit *; - -symbol_character - 'A'-'Z' .or 'a'-'z' .or '_'; - -symbol_character2 - 'A'-'Z' .or 'a'-'z' .or '0'-'9' .or '_'; - -.string string_lexer; - -string_lexer - lex_first_identifier_character .and .loop lex_next_identifier_character; - -lex_first_identifier_character - 'a'-'z' .or 'A'-'Z' .or '_'; - -lex_next_identifier_character - 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_'; - diff --git a/mesalib/src/mesa/shader/slang/library/slang_pp_directives_syn.h b/mesalib/src/mesa/shader/slang/library/slang_pp_directives_syn.h deleted file mode 100644 index 430f8d821..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_pp_directives_syn.h +++ /dev/null @@ -1,250 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */ - -".syntax source;\n" -".emtcode ESCAPE_TOKEN 0\n" -".emtcode TOKEN_END 0\n" -".emtcode TOKEN_DEFINE 1\n" -".emtcode TOKEN_UNDEF 2\n" -".emtcode TOKEN_IF 3\n" -".emtcode TOKEN_ELSE 4\n" -".emtcode TOKEN_ELIF 5\n" -".emtcode TOKEN_ENDIF 6\n" -".emtcode TOKEN_ERROR 7\n" -".emtcode TOKEN_PRAGMA 8\n" -".emtcode TOKEN_EXTENSION 9\n" -".emtcode TOKEN_LINE 10\n" -".emtcode PARAM_END 0\n" -".emtcode PARAM_PARAMETER 1\n" -".emtcode BEHAVIOR_REQUIRE 1\n" -".emtcode BEHAVIOR_ENABLE 2\n" -".emtcode BEHAVIOR_WARN 3\n" -".emtcode BEHAVIOR_DISABLE 4\n" -".emtcode PRAGMA_NO_PARAM 0\n" -".emtcode PRAGMA_PARAM 1\n" -"source\n" -" optional_directive .and .loop source_element .and '\\0' .emit ESCAPE_TOKEN .emit TOKEN_END;\n" -"source_element\n" -" c_style_comment_block .or cpp_style_comment_block .or new_line_directive .or source_token;\n" -"c_style_comment_block\n" -" '/' .and '*' .and c_style_comment_rest .and .true .emit ' ';\n" -"c_style_comment_rest\n" -" .loop c_style_comment_body .and c_style_comment_end;\n" -"c_style_comment_body\n" -" c_style_comment_char_nostar .or c_style_comment_char_star_noslashstar;\n" -"c_style_comment_char_nostar\n" -" new_line .or '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n" -"c_style_comment_char_star_noslashstar\n" -" '*' .and c_style_comment_char_star_noslashstar_1;\n" -"c_style_comment_char_star_noslashstar_1\n" -" c_style_comment_char_noslashstar .or c_style_comment_char_star_noslashstar;\n" -"c_style_comment_char_noslashstar\n" -" new_line .or '\\x30'-'\\xFF' .or '\\x01'-'\\x29' .or '\\x2B'-'\\x2E';\n" -"c_style_comment_end\n" -" '*' .and .loop c_style_comment_char_star .and '/';\n" -"c_style_comment_char_star\n" -" '*';\n" -"cpp_style_comment_block\n" -" '/' .and '/' .and cpp_style_comment_block_1;\n" -"cpp_style_comment_block_1\n" -" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n" -"cpp_style_comment_block_2\n" -" .loop cpp_style_comment_char .and new_line_directive;\n" -"cpp_style_comment_block_3\n" -" .loop cpp_style_comment_char;\n" -"cpp_style_comment_char\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"new_line_directive\n" -" new_line .and optional_directive;\n" -"new_line\n" -" generic_new_line .emit '\\n';\n" -"generic_new_line\n" -" carriage_return_line_feed .or line_feed_carriage_return .or '\\n' .or '\\r';\n" -"carriage_return_line_feed\n" -" '\\r' .and '\\n';\n" -"line_feed_carriage_return\n" -" '\\n' .and '\\r';\n" -"optional_directive\n" -" directive .emit ESCAPE_TOKEN .or .true;\n" -"directive\n" -" dir_define .emit TOKEN_DEFINE .or\n" -" dir_undef .emit TOKEN_UNDEF .or\n" -" dir_if .emit TOKEN_IF .or\n" -" dir_ifdef .emit TOKEN_IF .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' .emit 'd'\n" -" .emit ' ' .or\n" -" dir_ifndef .emit TOKEN_IF .emit '!' .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e'\n" -" .emit 'd' .emit ' ' .or\n" -" dir_else .emit TOKEN_ELSE .or\n" -" dir_elif .emit TOKEN_ELIF .or\n" -" dir_endif .emit TOKEN_ENDIF .or\n" -" dir_ext .emit TOKEN_EXTENSION .or\n" -" dir_pragma .emit TOKEN_PRAGMA .or\n" -" dir_line .emit TOKEN_LINE;\n" -"dir_define\n" -" optional_space .and '#' .and optional_space .and \"define\" .and symbol .and opt_parameters .and\n" -" definition;\n" -"dir_undef\n" -" optional_space .and '#' .and optional_space .and \"undef\" .and symbol;\n" -"dir_if\n" -" optional_space .and '#' .and optional_space .and \"if\" .and expression;\n" -"dir_ifdef\n" -" optional_space .and '#' .and optional_space .and \"ifdef\" .and symbol;\n" -"dir_ifndef\n" -" optional_space .and '#' .and optional_space .and \"ifndef\" .and symbol;\n" -"dir_else\n" -" optional_space .and '#' .and optional_space .and \"else\";\n" -"dir_elif\n" -" optional_space .and '#' .and optional_space .and \"elif\" .and expression;\n" -"dir_endif\n" -" optional_space .and '#' .and optional_space .and \"endif\";\n" -"dir_ext\n" -" optional_space .and '#' .and optional_space .and \"extension\" .and space .and extension_name .and\n" -" optional_space .and ':' .and optional_space .and extension_behavior;\n" -"dir_line\n" -" optional_space .and '#' .and optional_space .and \"line\" .and expression;\n" -"dir_pragma\n" -" optional_space .and '#' .and optional_space .and \"pragma\" .and symbol .and opt_pragma_param;\n" -"opt_pragma_param\n" -" pragma_param .or .true .emit PRAGMA_NO_PARAM;\n" -"pragma_param\n" -" optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')';\n" -"symbol_no_space\n" -" symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n" -"symbol\n" -" space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n" -"opt_parameters\n" -" parameters .or .true .emit PARAM_END;\n" -"parameters\n" -" '(' .and parameters_1 .and optional_space .and ')' .emit PARAM_END;\n" -"parameters_1\n" -" parameters_2 .or .true;\n" -"parameters_2\n" -" parameter .emit PARAM_PARAMETER .and .loop parameters_3;\n" -"parameters_3\n" -" optional_space .and ',' .and parameter .emit PARAM_PARAMETER;\n" -"parameter\n" -" optional_space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and\n" -" .true .emit '\\0';\n" -"definition\n" -" .loop definition_character .emit * .and .true .emit '\\0';\n" -"definition_character\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"expression\n" -" expression_element .and .loop expression_element .and .true .emit '\\0';\n" -"expression_element\n" -" expression_character .emit *;\n" -"expression_character\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"extension_name\n" -" symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n" -"extension_behavior\n" -" \"require\" .emit BEHAVIOR_REQUIRE .or\n" -" \"enable\" .emit BEHAVIOR_ENABLE .or\n" -" \"warn\" .emit BEHAVIOR_WARN .or\n" -" \"disable\" .emit BEHAVIOR_DISABLE;\n" -"optional_space\n" -" .loop single_space;\n" -"space\n" -" single_space .and .loop single_space;\n" -"single_space\n" -" ' ' .or '\\t';\n" -"source_token\n" -" space .emit ' ' .or complex_token .or source_token_1;\n" -"source_token_1\n" -" simple_token .emit ' ' .and .true .emit ' ';\n" -"complex_token\n" -" identifier .or number;\n" -"simple_token\n" -" increment .or decrement .or lequal .or gequal .or equal .or nequal .or and .or xor .or or .or\n" -" addto .or subtractfrom .or multiplyto .or divideto .or other;\n" -"identifier\n" -" identifier_char1 .emit * .and .loop identifier_char2 .emit *;\n" -"identifier_char1\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"identifier_char2\n" -" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n" -"number\n" -" float .or integer;\n" -"digit_oct\n" -" '0'-'7';\n" -"digit_dec\n" -" '0'-'9';\n" -"digit_hex\n" -" '0'-'9' .or 'A'-'F' .or 'a'-'f';\n" -"float\n" -" float_1 .or float_2;\n" -"float_1\n" -" float_fractional_constant .and float_optional_exponent_part;\n" -"float_2\n" -" float_digit_sequence .and float_exponent_part;\n" -"float_fractional_constant\n" -" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n" -"float_fractional_constant_1\n" -" float_digit_sequence .and '.' .emit '.' .and float_digit_sequence;\n" -"float_fractional_constant_2\n" -" float_digit_sequence .and '.' .emit '.';\n" -"float_fractional_constant_3\n" -" '.' .emit '.' .and float_digit_sequence;\n" -"float_optional_exponent_part\n" -" float_exponent_part .or .true;\n" -"float_digit_sequence\n" -" digit_dec .emit * .and .loop digit_dec .emit *;\n" -"float_exponent_part\n" -" float_exponent_part_1 .or float_exponent_part_2;\n" -"float_exponent_part_1\n" -" 'e' .emit 'e' .and float_optional_sign .and float_digit_sequence;\n" -"float_exponent_part_2\n" -" 'E' .emit 'E' .and float_optional_sign .and float_digit_sequence;\n" -"float_optional_sign\n" -" '+' .emit '+' .or '-' .emit '-' .or .true;\n" -"integer\n" -" integer_hex .or integer_oct .or integer_dec;\n" -"integer_hex\n" -" '0' .emit '0' .and integer_hex_1 .emit * .and digit_hex .emit * .and\n" -" .loop digit_hex .emit *;\n" -"integer_hex_1\n" -" 'x' .or 'X';\n" -"integer_oct\n" -" '0' .emit '0' .and .loop digit_oct .emit *;\n" -"integer_dec\n" -" digit_dec .emit * .and .loop digit_dec .emit *;\n" -"increment\n" -" '+' .emit * .and '+' .emit *;\n" -"decrement\n" -" '-' .emit * .and '-' .emit *;\n" -"lequal\n" -" '<' .emit * .and '=' .emit *;\n" -"gequal\n" -" '>' .emit * .and '=' .emit *;\n" -"equal\n" -" '=' .emit * .and '=' .emit *;\n" -"nequal\n" -" '!' .emit * .and '=' .emit *;\n" -"and\n" -" '&' .emit * .and '&' .emit *;\n" -"xor\n" -" '^' .emit * .and '^' .emit *;\n" -"or\n" -" '|' .emit * .and '|' .emit *;\n" -"addto\n" -" '+' .emit * .and '=' .emit *;\n" -"subtractfrom\n" -" '-' .emit * .and '=' .emit *;\n" -"multiplyto\n" -" '*' .emit * .and '=' .emit *;\n" -"divideto\n" -" '/' .emit * .and '=' .emit *;\n" -"other\n" -" '\\x24'-'\\xFF' .emit * .or '\\x01'-'\\x22' .emit *;\n" -"symbol_character\n" -" 'A'-'Z' .or 'a'-'z' .or '_';\n" -"symbol_character2\n" -" 'A'-'Z' .or 'a'-'z' .or '0'-'9' .or '_';\n" -".string string_lexer;\n" -"string_lexer\n" -" lex_first_identifier_character .and .loop lex_next_identifier_character;\n" -"lex_first_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"lex_next_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n" -"" diff --git a/mesalib/src/mesa/shader/slang/library/slang_pp_expression.syn b/mesalib/src/mesa/shader/slang/library/slang_pp_expression.syn deleted file mode 100644 index bfdb220bf..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_pp_expression.syn +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 2006 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/** - * \file slang_pp_expression.syn - * slang preprocessor expression parser - * \author Michal Krol - */ - -/* - * Parses one or two (optional) expressions on literal integer constants. Those expressions come - * from #if #elif and #line directives. The preprocessor already parsed those directives and - * expanded the expression (expressions). All occurences of the operator "defined" are already - * replaced with either "0" or "1" literals. - */ - -.syntax expression; - -/* - * Those separate individual expressions. - * For #if/#elif case it is: EXP_EXPRESSION ... EXP_END - * For #line case it may be: EXP_EXPRESSION ... EXP_EXPRESSION ... EXP_END - */ -.emtcode EXP_END 0 -.emtcode EXP_EXPRESSION 1 - -.emtcode OP_END 0 -.emtcode OP_PUSHINT 1 -.emtcode OP_LOGICALOR 2 -.emtcode OP_LOGICALAND 3 -.emtcode OP_OR 4 -.emtcode OP_XOR 5 -.emtcode OP_AND 6 -.emtcode OP_EQUAL 7 -.emtcode OP_NOTEQUAL 8 -.emtcode OP_LESSEQUAL 9 -.emtcode OP_GREATEREQUAL 10 -.emtcode OP_LESS 11 -.emtcode OP_GREATER 12 -.emtcode OP_LEFTSHIFT 13 -.emtcode OP_RIGHTSHIFT 14 -.emtcode OP_ADD 15 -.emtcode OP_SUBTRACT 16 -.emtcode OP_MULTIPLY 17 -.emtcode OP_DIVIDE 18 -.emtcode OP_MODULUS 19 -.emtcode OP_PLUS 20 -.emtcode OP_MINUS 21 -.emtcode OP_NEGATE 22 -.emtcode OP_COMPLEMENT 23 - -expression - first_expression .and optional_second_expression .and optional_space .and '\0' .emit EXP_END; - -first_expression - optional_space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END; - -optional_second_expression - second_expression .or .true; - -second_expression - space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END; - -logical_or_expression - logical_and_expression .and .loop logical_or_expression_1; -logical_or_expression_1 - barbar .and logical_and_expression .and .true .emit OP_LOGICALOR; - -logical_and_expression - or_expression .and .loop logical_and_expression_1; -logical_and_expression_1 - ampersandampersand .and or_expression .and .true .emit OP_LOGICALAND; - -or_expression - xor_expression .and .loop or_expression_1; -or_expression_1 - bar .and xor_expression .and .true .emit OP_OR; - -xor_expression - and_expression .and .loop xor_expression_1; -xor_expression_1 - caret .and and_expression .and .true .emit OP_XOR; - -and_expression - equality_expression .and .loop and_expression_1; -and_expression_1 - ampersand .and equality_expression .and .true .emit OP_AND; - -equality_expression - relational_expression .and .loop equality_expression_1; -equality_expression_1 - equality_expression_2 .or equality_expression_3; -equality_expression_2 - equalsequals .and relational_expression .and .true .emit OP_EQUAL; -equality_expression_3 - bangequals .and relational_expression .and .true .emit OP_NOTEQUAL; - -relational_expression - shift_expression .and .loop relational_expression_1; -relational_expression_1 - relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or - relational_expression_5; -relational_expression_2 - lessequals .and shift_expression .and .true .emit OP_LESSEQUAL; -relational_expression_3 - greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL; -relational_expression_4 - less .and shift_expression .and .true .emit OP_LESS; -relational_expression_5 - greater .and shift_expression .and .true .emit OP_GREATER; - -shift_expression - additive_expression .and .loop shift_expression_1; -shift_expression_1 - shift_expression_2 .or shift_expression_3; -shift_expression_2 - lessless .and additive_expression .and .true .emit OP_LEFTSHIFT; -shift_expression_3 - greatergreater .and additive_expression .and .true .emit OP_RIGHTSHIFT; - -additive_expression - multiplicative_expression .and .loop additive_expression_1; -additive_expression_1 - additive_expression_2 .or additive_expression_3; -additive_expression_2 - plus .and multiplicative_expression .and .true .emit OP_ADD; -additive_expression_3 - dash .and multiplicative_expression .and .true .emit OP_SUBTRACT; - -multiplicative_expression - unary_expression .and .loop multiplicative_expression_1; -multiplicative_expression_1 - multiplicative_expression_2 .or multiplicative_expression_3 .or multiplicative_expression_4; -multiplicative_expression_2 - star .and unary_expression .and .true .emit OP_MULTIPLY; -multiplicative_expression_3 - slash .and unary_expression .and .true .emit OP_DIVIDE; -multiplicative_expression_4 - percent .and unary_expression .and .true .emit OP_MODULUS; - -unary_expression - primary_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or - unary_expression_4; -unary_expression_1 - plus .and unary_expression .and .true .emit OP_PLUS; -unary_expression_2 - dash .and unary_expression .and .true .emit OP_MINUS; -unary_expression_3 - bang .and unary_expression .and .true .emit OP_NEGATE; -unary_expression_4 - tilda .and unary_expression .and .true .emit OP_COMPLEMENT; - -primary_expression - intconstant .or primary_expression_1; -primary_expression_1 - lparen .and logical_or_expression .and rparen; - -intconstant - integer .emit OP_PUSHINT; - -integer - integer_dec; - -integer_dec - digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\0'; - -digit_dec - '0'-'9'; - -optional_space - .loop single_space; - -space - single_space .and .loop single_space; - -single_space - ' ' .or '\t'; - -ampersand - optional_space .and '&' .and optional_space; - -ampersandampersand - optional_space .and '&' .and '&' .and optional_space; - -bang - optional_space .and '!' .and optional_space; - -bangequals - optional_space .and '!' .and '=' .and optional_space; - -bar - optional_space .and '|' .and optional_space; - -barbar - optional_space .and '|' .and '|' .and optional_space; - -caret - optional_space .and '^' .and optional_space; - -dash - optional_space .and '-' .and optional_space; - -equalsequals - optional_space .and '=' .and '=' .and optional_space; - -greater - optional_space .and '>' .and optional_space; - -greaterequals - optional_space .and '>' .and '=' .and optional_space; - -greatergreater - optional_space .and '>' .and '>' .and optional_space; - -less - optional_space .and '<' .and optional_space; - -lessequals - optional_space .and '<' .and '=' .and optional_space; - -lessless - optional_space .and '<' .and '<' .and optional_space; - -lparen - optional_space .and '(' .and optional_space; - -percent - optional_space .and '%' .and optional_space; - -plus - optional_space .and '+' .and optional_space; - -rparen - optional_space .and ')' .and optional_space; - -slash - optional_space .and '/' .and optional_space; - -star - optional_space .and '*' .and optional_space; - -tilda - optional_space .and '~' .and optional_space; - diff --git a/mesalib/src/mesa/shader/slang/library/slang_pp_expression_syn.h b/mesalib/src/mesa/shader/slang/library/slang_pp_expression_syn.h deleted file mode 100644 index f3e9ef6b2..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_pp_expression_syn.h +++ /dev/null @@ -1,179 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */ - -".syntax expression;\n" -".emtcode EXP_END 0\n" -".emtcode EXP_EXPRESSION 1\n" -".emtcode OP_END 0\n" -".emtcode OP_PUSHINT 1\n" -".emtcode OP_LOGICALOR 2\n" -".emtcode OP_LOGICALAND 3\n" -".emtcode OP_OR 4\n" -".emtcode OP_XOR 5\n" -".emtcode OP_AND 6\n" -".emtcode OP_EQUAL 7\n" -".emtcode OP_NOTEQUAL 8\n" -".emtcode OP_LESSEQUAL 9\n" -".emtcode OP_GREATEREQUAL 10\n" -".emtcode OP_LESS 11\n" -".emtcode OP_GREATER 12\n" -".emtcode OP_LEFTSHIFT 13\n" -".emtcode OP_RIGHTSHIFT 14\n" -".emtcode OP_ADD 15\n" -".emtcode OP_SUBTRACT 16\n" -".emtcode OP_MULTIPLY 17\n" -".emtcode OP_DIVIDE 18\n" -".emtcode OP_MODULUS 19\n" -".emtcode OP_PLUS 20\n" -".emtcode OP_MINUS 21\n" -".emtcode OP_NEGATE 22\n" -".emtcode OP_COMPLEMENT 23\n" -"expression\n" -" first_expression .and optional_second_expression .and optional_space .and '\\0' .emit EXP_END;\n" -"first_expression\n" -" optional_space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END;\n" -"optional_second_expression\n" -" second_expression .or .true;\n" -"second_expression\n" -" space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END;\n" -"logical_or_expression\n" -" logical_and_expression .and .loop logical_or_expression_1;\n" -"logical_or_expression_1\n" -" barbar .and logical_and_expression .and .true .emit OP_LOGICALOR;\n" -"logical_and_expression\n" -" or_expression .and .loop logical_and_expression_1;\n" -"logical_and_expression_1\n" -" ampersandampersand .and or_expression .and .true .emit OP_LOGICALAND;\n" -"or_expression\n" -" xor_expression .and .loop or_expression_1;\n" -"or_expression_1\n" -" bar .and xor_expression .and .true .emit OP_OR;\n" -"xor_expression\n" -" and_expression .and .loop xor_expression_1;\n" -"xor_expression_1\n" -" caret .and and_expression .and .true .emit OP_XOR;\n" -"and_expression\n" -" equality_expression .and .loop and_expression_1;\n" -"and_expression_1\n" -" ampersand .and equality_expression .and .true .emit OP_AND;\n" -"equality_expression\n" -" relational_expression .and .loop equality_expression_1;\n" -"equality_expression_1\n" -" equality_expression_2 .or equality_expression_3;\n" -"equality_expression_2\n" -" equalsequals .and relational_expression .and .true .emit OP_EQUAL;\n" -"equality_expression_3\n" -" bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;\n" -"relational_expression\n" -" shift_expression .and .loop relational_expression_1;\n" -"relational_expression_1\n" -" relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or\n" -" relational_expression_5;\n" -"relational_expression_2\n" -" lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;\n" -"relational_expression_3\n" -" greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;\n" -"relational_expression_4\n" -" less .and shift_expression .and .true .emit OP_LESS;\n" -"relational_expression_5\n" -" greater .and shift_expression .and .true .emit OP_GREATER;\n" -"shift_expression\n" -" additive_expression .and .loop shift_expression_1;\n" -"shift_expression_1\n" -" shift_expression_2 .or shift_expression_3;\n" -"shift_expression_2\n" -" lessless .and additive_expression .and .true .emit OP_LEFTSHIFT;\n" -"shift_expression_3\n" -" greatergreater .and additive_expression .and .true .emit OP_RIGHTSHIFT;\n" -"additive_expression\n" -" multiplicative_expression .and .loop additive_expression_1;\n" -"additive_expression_1\n" -" additive_expression_2 .or additive_expression_3;\n" -"additive_expression_2\n" -" plus .and multiplicative_expression .and .true .emit OP_ADD;\n" -"additive_expression_3\n" -" dash .and multiplicative_expression .and .true .emit OP_SUBTRACT;\n" -"multiplicative_expression\n" -" unary_expression .and .loop multiplicative_expression_1;\n" -"multiplicative_expression_1\n" -" multiplicative_expression_2 .or multiplicative_expression_3 .or multiplicative_expression_4;\n" -"multiplicative_expression_2\n" -" star .and unary_expression .and .true .emit OP_MULTIPLY;\n" -"multiplicative_expression_3\n" -" slash .and unary_expression .and .true .emit OP_DIVIDE;\n" -"multiplicative_expression_4\n" -" percent .and unary_expression .and .true .emit OP_MODULUS;\n" -"unary_expression\n" -" primary_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or\n" -" unary_expression_4;\n" -"unary_expression_1\n" -" plus .and unary_expression .and .true .emit OP_PLUS;\n" -"unary_expression_2\n" -" dash .and unary_expression .and .true .emit OP_MINUS;\n" -"unary_expression_3\n" -" bang .and unary_expression .and .true .emit OP_NEGATE;\n" -"unary_expression_4\n" -" tilda .and unary_expression .and .true .emit OP_COMPLEMENT;\n" -"primary_expression\n" -" intconstant .or primary_expression_1;\n" -"primary_expression_1\n" -" lparen .and logical_or_expression .and rparen;\n" -"intconstant\n" -" integer .emit OP_PUSHINT;\n" -"integer\n" -" integer_dec;\n" -"integer_dec\n" -" digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" -"digit_dec\n" -" '0'-'9';\n" -"optional_space\n" -" .loop single_space;\n" -"space\n" -" single_space .and .loop single_space;\n" -"single_space\n" -" ' ' .or '\\t';\n" -"ampersand\n" -" optional_space .and '&' .and optional_space;\n" -"ampersandampersand\n" -" optional_space .and '&' .and '&' .and optional_space;\n" -"bang\n" -" optional_space .and '!' .and optional_space;\n" -"bangequals\n" -" optional_space .and '!' .and '=' .and optional_space;\n" -"bar\n" -" optional_space .and '|' .and optional_space;\n" -"barbar\n" -" optional_space .and '|' .and '|' .and optional_space;\n" -"caret\n" -" optional_space .and '^' .and optional_space;\n" -"dash\n" -" optional_space .and '-' .and optional_space;\n" -"equalsequals\n" -" optional_space .and '=' .and '=' .and optional_space;\n" -"greater\n" -" optional_space .and '>' .and optional_space;\n" -"greaterequals\n" -" optional_space .and '>' .and '=' .and optional_space;\n" -"greatergreater\n" -" optional_space .and '>' .and '>' .and optional_space;\n" -"less\n" -" optional_space .and '<' .and optional_space;\n" -"lessequals\n" -" optional_space .and '<' .and '=' .and optional_space;\n" -"lessless\n" -" optional_space .and '<' .and '<' .and optional_space;\n" -"lparen\n" -" optional_space .and '(' .and optional_space;\n" -"percent\n" -" optional_space .and '%' .and optional_space;\n" -"plus\n" -" optional_space .and '+' .and optional_space;\n" -"rparen\n" -" optional_space .and ')' .and optional_space;\n" -"slash\n" -" optional_space .and '/' .and optional_space;\n" -"star\n" -" optional_space .and '*' .and optional_space;\n" -"tilda\n" -" optional_space .and '~' .and optional_space;\n" -"" diff --git a/mesalib/src/mesa/shader/slang/library/slang_pp_version.syn b/mesalib/src/mesa/shader/slang/library/slang_pp_version.syn deleted file mode 100644 index 3fe1a57ba..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_pp_version.syn +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.6 - * - * Copyright (C) 2005-2006 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/** - * \file slang_pp_version.syn - * slang #version directive syntax - * \author Michal Krol - */ - -.syntax version_directive; - -version_directive - version_directive_1; -version_directive_1 - prior_optional_spaces .and optional_version_directive .and .true .emit $; - -optional_version_directive - version_directive_body .or .true .emit 10 .emit 1; - -version_directive_body - '#' .and optional_space .and "version" .and space .and version_number .and optional_space .and - new_line; - -version_number - version_number_100 .or version_number_110 .or version_number_120; - -version_number_100 - leading_zeroes .and "100" .emit 0 .emit 1; - -version_number_110 - leading_zeroes .and "110" .emit 10 .emit 1; - -version_number_120 - leading_zeroes .and "120" .emit 20 .emit 1; - -leading_zeroes - .loop zero; - -zero - '0'; - -space - single_space .and .loop single_space; - -optional_space - .loop single_space; - -single_space - ' ' .or '\t'; - -prior_optional_spaces - .loop prior_space; - -prior_space - c_style_comment_block .or cpp_style_comment_block .or space .or new_line; - -c_style_comment_block - '/' .and '*' .and c_style_comment_rest; - -c_style_comment_rest - .loop c_style_comment_char_no_star .and c_style_comment_rest_1; -c_style_comment_rest_1 - c_style_comment_end .or c_style_comment_rest_2; -c_style_comment_rest_2 - '*' .and c_style_comment_rest; - -c_style_comment_char_no_star - '\x2B'-'\xFF' .or '\x01'-'\x29'; - -c_style_comment_end - '*' .and '/'; - -cpp_style_comment_block - '/' .and '/' .and cpp_style_comment_block_1; -cpp_style_comment_block_1 - cpp_style_comment_block_2 .or cpp_style_comment_block_3; -cpp_style_comment_block_2 - .loop cpp_style_comment_char .and new_line; -cpp_style_comment_block_3 - .loop cpp_style_comment_char; - -cpp_style_comment_char - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -new_line - cr_lf .or lf_cr .or '\n' .or '\r'; - -cr_lf - '\r' .and '\n'; - -lf_cr - '\n' .and '\r'; - -.string __string_filter; - -__string_filter - .loop __identifier_char; - -__identifier_char - 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9'; - diff --git a/mesalib/src/mesa/shader/slang/library/slang_pp_version_syn.h b/mesalib/src/mesa/shader/slang/library/slang_pp_version_syn.h deleted file mode 100644 index 54aee3ff2..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_pp_version_syn.h +++ /dev/null @@ -1,69 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */ - -".syntax version_directive;\n" -"version_directive\n" -" version_directive_1;\n" -"version_directive_1\n" -" prior_optional_spaces .and optional_version_directive .and .true .emit $;\n" -"optional_version_directive\n" -" version_directive_body .or .true .emit 10 .emit 1;\n" -"version_directive_body\n" -" '#' .and optional_space .and \"version\" .and space .and version_number .and optional_space .and\n" -" new_line;\n" -"version_number\n" -" version_number_100 .or version_number_110 .or version_number_120;\n" -"version_number_100\n" -" leading_zeroes .and \"100\" .emit 0 .emit 1;\n" -"version_number_110\n" -" leading_zeroes .and \"110\" .emit 10 .emit 1;\n" -"version_number_120\n" -" leading_zeroes .and \"120\" .emit 20 .emit 1;\n" -"leading_zeroes\n" -" .loop zero;\n" -"zero\n" -" '0';\n" -"space\n" -" single_space .and .loop single_space;\n" -"optional_space\n" -" .loop single_space;\n" -"single_space\n" -" ' ' .or '\\t';\n" -"prior_optional_spaces\n" -" .loop prior_space;\n" -"prior_space\n" -" c_style_comment_block .or cpp_style_comment_block .or space .or new_line;\n" -"c_style_comment_block\n" -" '/' .and '*' .and c_style_comment_rest;\n" -"c_style_comment_rest\n" -" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n" -"c_style_comment_rest_1\n" -" c_style_comment_end .or c_style_comment_rest_2;\n" -"c_style_comment_rest_2\n" -" '*' .and c_style_comment_rest;\n" -"c_style_comment_char_no_star\n" -" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n" -"c_style_comment_end\n" -" '*' .and '/';\n" -"cpp_style_comment_block\n" -" '/' .and '/' .and cpp_style_comment_block_1;\n" -"cpp_style_comment_block_1\n" -" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n" -"cpp_style_comment_block_2\n" -" .loop cpp_style_comment_char .and new_line;\n" -"cpp_style_comment_block_3\n" -" .loop cpp_style_comment_char;\n" -"cpp_style_comment_char\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"new_line\n" -" cr_lf .or lf_cr .or '\\n' .or '\\r';\n" -"cr_lf\n" -" '\\r' .and '\\n';\n" -"lf_cr\n" -" '\\n' .and '\\r';\n" -".string __string_filter;\n" -"__string_filter\n" -" .loop __identifier_char;\n" -"__identifier_char\n" -" 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\n" -"" diff --git a/mesalib/src/mesa/shader/slang/library/slang_shader.syn b/mesalib/src/mesa/shader/slang/library/slang_shader.syn deleted file mode 100644 index cc5c70a02..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_shader.syn +++ /dev/null @@ -1,1716 +0,0 @@ -/* - * Mesa 3-D graphics library - * - * Copyright (C) 2004-2006 Brian Paul All Rights Reserved. - * Copyright (C) 2008 VMware, Inc. All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/* - * \file slang_shader.syn - * slang vertex/fragment shader syntax - * \author Michal Krol - */ - -/* - * usage: - * syn2c slang_shader.syn > slang_shader_syn.h - * - * when modifying or extending this file, several things must be taken into - * consideration: - * - * - when adding new operators that were marked as reserved in the - * initial specification, one must only uncomment particular lines of - * code that refer to operators being added; - * - * - when adding new shader targets, one must reserve a new value for - * shader_type register and use it in .if constructs for symbols that - * are exclusive for that shader; - * - * - some symbols mimic output of other symbols - the best example is - * the "for" construct: expression "for (foo(); ; bar())" is seen as - * "for (foo(); true; bar())" by the output processor - hence, special - * care must be taken when rearranging output of essential symbols; - * - * - order of single-quoted tokens does matter in alternatives - so do not - * parse "<" operator before "<<" and "<<" before "<<="; - * - * - all double-quoted tokens are internally preprocessed to eliminate - * problems with parsing strings that are prefixes of other strings, - * like "sampler1D" and "sampler1DShadow"; - */ - -.syntax translation_unit; - -/* revision number - increment after each change affecting emitted output */ -.emtcode REVISION 5 - -/* external declaration (or precision or invariant stmt) */ -.emtcode EXTERNAL_NULL 0 -.emtcode EXTERNAL_FUNCTION_DEFINITION 1 -.emtcode EXTERNAL_DECLARATION 2 -.emtcode DEFAULT_PRECISION 3 -.emtcode INVARIANT_STMT 4 - -/* precision */ -.emtcode PRECISION_DEFAULT 0 -.emtcode PRECISION_LOW 1 -.emtcode PRECISION_MEDIUM 2 -.emtcode PRECISION_HIGH 3 - -/* declaration */ -.emtcode DECLARATION_FUNCTION_PROTOTYPE 1 -.emtcode DECLARATION_INIT_DECLARATOR_LIST 2 - -/* function type */ -.emtcode FUNCTION_ORDINARY 0 -.emtcode FUNCTION_CONSTRUCTOR 1 -.emtcode FUNCTION_OPERATOR 2 - -/* function call type */ -.emtcode FUNCTION_CALL_NONARRAY 0 -.emtcode FUNCTION_CALL_ARRAY 1 - -/* operator type */ -.emtcode OPERATOR_ADDASSIGN 1 -.emtcode OPERATOR_SUBASSIGN 2 -.emtcode OPERATOR_MULASSIGN 3 -.emtcode OPERATOR_DIVASSIGN 4 -/*.emtcode OPERATOR_MODASSIGN 5*/ -/*.emtcode OPERATOR_LSHASSIGN 6*/ -/*.emtcode OPERATOR_RSHASSIGN 7*/ -/*.emtcode OPERATOR_ORASSIGN 8*/ -/*.emtcode OPERATOR_XORASSIGN 9*/ -/*.emtcode OPERATOR_ANDASSIGN 10*/ -.emtcode OPERATOR_LOGICALXOR 11 -/*.emtcode OPERATOR_BITOR 12*/ -/*.emtcode OPERATOR_BITXOR 13*/ -/*.emtcode OPERATOR_BITAND 14*/ -.emtcode OPERATOR_LESS 15 -.emtcode OPERATOR_GREATER 16 -.emtcode OPERATOR_LESSEQUAL 17 -.emtcode OPERATOR_GREATEREQUAL 18 -/*.emtcode OPERATOR_LSHIFT 19*/ -/*.emtcode OPERATOR_RSHIFT 20*/ -.emtcode OPERATOR_MULTIPLY 21 -.emtcode OPERATOR_DIVIDE 22 -/*.emtcode OPERATOR_MODULUS 23*/ -.emtcode OPERATOR_INCREMENT 24 -.emtcode OPERATOR_DECREMENT 25 -.emtcode OPERATOR_PLUS 26 -.emtcode OPERATOR_MINUS 27 -/*.emtcode OPERATOR_COMPLEMENT 28*/ -.emtcode OPERATOR_NOT 29 - -/* init declarator list */ -.emtcode DECLARATOR_NONE 0 -.emtcode DECLARATOR_NEXT 1 - -/* variable declaration */ -.emtcode VARIABLE_NONE 0 -.emtcode VARIABLE_IDENTIFIER 1 -.emtcode VARIABLE_INITIALIZER 2 -.emtcode VARIABLE_ARRAY_EXPLICIT 3 -.emtcode VARIABLE_ARRAY_UNKNOWN 4 - -/* type qualifier */ -.emtcode TYPE_QUALIFIER_NONE 0 -.emtcode TYPE_QUALIFIER_CONST 1 -.emtcode TYPE_QUALIFIER_ATTRIBUTE 2 -.emtcode TYPE_QUALIFIER_VARYING 3 -.emtcode TYPE_QUALIFIER_UNIFORM 4 -.emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5 -.emtcode TYPE_QUALIFIER_FIXEDINPUT 6 - -/* invariant qualifier */ -.emtcode TYPE_VARIANT 90 -.emtcode TYPE_INVARIANT 91 - -/* centroid qualifier */ -.emtcode TYPE_CENTER 95 -.emtcode TYPE_CENTROID 96 - -/* type specifier */ -.emtcode TYPE_SPECIFIER_VOID 0 -.emtcode TYPE_SPECIFIER_BOOL 1 -.emtcode TYPE_SPECIFIER_BVEC2 2 -.emtcode TYPE_SPECIFIER_BVEC3 3 -.emtcode TYPE_SPECIFIER_BVEC4 4 -.emtcode TYPE_SPECIFIER_INT 5 -.emtcode TYPE_SPECIFIER_IVEC2 6 -.emtcode TYPE_SPECIFIER_IVEC3 7 -.emtcode TYPE_SPECIFIER_IVEC4 8 -.emtcode TYPE_SPECIFIER_FLOAT 9 -.emtcode TYPE_SPECIFIER_VEC2 10 -.emtcode TYPE_SPECIFIER_VEC3 11 -.emtcode TYPE_SPECIFIER_VEC4 12 -.emtcode TYPE_SPECIFIER_MAT2 13 -.emtcode TYPE_SPECIFIER_MAT3 14 -.emtcode TYPE_SPECIFIER_MAT4 15 -.emtcode TYPE_SPECIFIER_SAMPLER1D 16 -.emtcode TYPE_SPECIFIER_SAMPLER2D 17 -.emtcode TYPE_SPECIFIER_SAMPLER3D 18 -.emtcode TYPE_SPECIFIER_SAMPLERCUBE 19 -.emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20 -.emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21 -.emtcode TYPE_SPECIFIER_SAMPLER2DRECT 22 -.emtcode TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23 -.emtcode TYPE_SPECIFIER_STRUCT 24 -.emtcode TYPE_SPECIFIER_TYPENAME 25 - -/* OpenGL 2.1 */ -.emtcode TYPE_SPECIFIER_MAT23 26 -.emtcode TYPE_SPECIFIER_MAT32 27 -.emtcode TYPE_SPECIFIER_MAT24 28 -.emtcode TYPE_SPECIFIER_MAT42 29 -.emtcode TYPE_SPECIFIER_MAT34 30 -.emtcode TYPE_SPECIFIER_MAT43 31 - -/* type specifier array */ -.emtcode TYPE_SPECIFIER_NONARRAY 0 -.emtcode TYPE_SPECIFIER_ARRAY 1 - -/* structure field */ -.emtcode FIELD_NONE 0 -.emtcode FIELD_NEXT 1 -.emtcode FIELD_ARRAY 2 - -/* operation */ -.emtcode OP_END 0 -.emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1 -.emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2 -.emtcode OP_DECLARE 3 -.emtcode OP_ASM 4 -.emtcode OP_BREAK 5 -.emtcode OP_CONTINUE 6 -.emtcode OP_DISCARD 7 -.emtcode OP_RETURN 8 -.emtcode OP_EXPRESSION 9 -.emtcode OP_IF 10 -.emtcode OP_WHILE 11 -.emtcode OP_DO 12 -.emtcode OP_FOR 13 -.emtcode OP_PUSH_VOID 14 -.emtcode OP_PUSH_BOOL 15 -.emtcode OP_PUSH_INT 16 -.emtcode OP_PUSH_FLOAT 17 -.emtcode OP_PUSH_IDENTIFIER 18 -.emtcode OP_SEQUENCE 19 -.emtcode OP_ASSIGN 20 -.emtcode OP_ADDASSIGN 21 -.emtcode OP_SUBASSIGN 22 -.emtcode OP_MULASSIGN 23 -.emtcode OP_DIVASSIGN 24 -/*.emtcode OP_MODASSIGN 25*/ -/*.emtcode OP_LSHASSIGN 26*/ -/*.emtcode OP_RSHASSIGN 27*/ -/*.emtcode OP_ORASSIGN 28*/ -/*.emtcode OP_XORASSIGN 29*/ -/*.emtcode OP_ANDASSIGN 30*/ -.emtcode OP_SELECT 31 -.emtcode OP_LOGICALOR 32 -.emtcode OP_LOGICALXOR 33 -.emtcode OP_LOGICALAND 34 -/*.emtcode OP_BITOR 35*/ -/*.emtcode OP_BITXOR 36*/ -/*.emtcode OP_BITAND 37*/ -.emtcode OP_EQUAL 38 -.emtcode OP_NOTEQUAL 39 -.emtcode OP_LESS 40 -.emtcode OP_GREATER 41 -.emtcode OP_LESSEQUAL 42 -.emtcode OP_GREATEREQUAL 43 -/*.emtcode OP_LSHIFT 44*/ -/*.emtcode OP_RSHIFT 45*/ -.emtcode OP_ADD 46 -.emtcode OP_SUBTRACT 47 -.emtcode OP_MULTIPLY 48 -.emtcode OP_DIVIDE 49 -/*.emtcode OP_MODULUS 50*/ -.emtcode OP_PREINCREMENT 51 -.emtcode OP_PREDECREMENT 52 -.emtcode OP_PLUS 53 -.emtcode OP_MINUS 54 -/*.emtcode OP_COMPLEMENT 55*/ -.emtcode OP_NOT 56 -.emtcode OP_SUBSCRIPT 57 -.emtcode OP_CALL 58 -.emtcode OP_FIELD 59 -.emtcode OP_POSTINCREMENT 60 -.emtcode OP_POSTDECREMENT 61 -.emtcode OP_PRECISION 62 -.emtcode OP_METHOD 63 - -/* parameter qualifier */ -.emtcode PARAM_QUALIFIER_IN 0 -.emtcode PARAM_QUALIFIER_OUT 1 -.emtcode PARAM_QUALIFIER_INOUT 2 - -/* function parameter */ -.emtcode PARAMETER_NONE 0 -.emtcode PARAMETER_NEXT 1 - -/* function parameter array presence */ -.emtcode PARAMETER_ARRAY_NOT_PRESENT 0 -.emtcode PARAMETER_ARRAY_PRESENT 1 - -/* INVALID_EXTERNAL_DECLARATION seems to be reported when there's */ -/* any syntax errors... */ -.errtext INVALID_EXTERNAL_DECLARATION "2001: Syntax error." -.errtext INVALID_OPERATOR_OVERRIDE "2002: Invalid operator override." -.errtext LBRACE_EXPECTED "2003: '{' expected but '$err_token$' found." -.errtext LPAREN_EXPECTED "2004: '(' expected but '$err_token$' found." -.errtext RPAREN_EXPECTED "2005: ')' expected but '$err_token$' found." -.errtext INVALID_PRECISION "2006: Invalid precision specifier '$err_token$'." -.errtext INVALID_PRECISION_TYPE "2007: Invalid precision type '$err_token$'." - - -/* - * tells whether the shader that is being parsed is a built-in shader or not - * 0 - normal behaviour - * 1 - accepts constructor and operator definitions and __asm statements - * the implementation will set it to 1 when compiling internal built-in shaders - */ -.regbyte parsing_builtin 0 - -/* - * holds the type of the shader being parsed; possible values are - * listed below. - * FRAGMENT_SHADER 1 - * VERTEX_SHADER 2 - * shader type is set by the caller before parsing - */ -.regbyte shader_type 0 - -/* - * ::= - */ -variable_identifier - identifier .emit OP_PUSH_IDENTIFIER; - -/* - * ::= - * | - * | - * | - * | "(" ")" - */ -primary_expression - floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1; -primary_expression_1 - lparen .and expression .and rparen; - -/* - * ::= - * | "[" "]" - * | - * | "." - * | "++" - * | "--" - */ -postfix_expression - postfix_expression_1 .and .loop postfix_expression_2; -postfix_expression_1 - function_call .or primary_expression; -postfix_expression_2 - postfix_expression_3 .or postfix_expression_4 .or - plusplus .emit OP_POSTINCREMENT .or - minusminus .emit OP_POSTDECREMENT; -postfix_expression_3 - lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT; -postfix_expression_4 - dot .and field_selection .emit OP_FIELD; - -/* - * ::= - */ -integer_expression - expression; - -/* - * ::= - */ -function_call - function_call_or_method; - -/* - * ::= - * | "." - */ -function_call_or_method - regular_function_call .or method_call; - -/* - * ::= "." - */ -method_call - identifier .emit OP_METHOD .and dot .and function_call_generic .and .true .emit OP_END; - -/* - * ::= - */ -regular_function_call - function_call_generic .emit OP_CALL .and .true .emit OP_END; - -/* - * ::= ")" - * | ")" - */ -function_call_generic - function_call_generic_1 .or function_call_generic_2; -function_call_generic_1 - function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED; -function_call_generic_2 - function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED; - -/* - * ::= "void" - * | - */ -function_call_header_no_parameters - function_call_header .and function_call_header_no_parameters_1; -function_call_header_no_parameters_1 - "void" .or .true; - -/* - * ::= - * | "," - */ -function_call_header_with_parameters - function_call_header .and assignment_expression .and .true .emit OP_END .and - .loop function_call_header_with_parameters_1; -function_call_header_with_parameters_1 - comma .and assignment_expression .and .true .emit OP_END; - -/* - * ::= "(" - */ -function_call_header - function_identifier .and lparen; - -/* - * ::= - * | - * | - * - * note: and have been deleted - */ -function_identifier - identifier .and function_identifier_opt_array; -function_identifier_opt_array - function_identifier_array .emit FUNCTION_CALL_ARRAY .or - .true .emit FUNCTION_CALL_NONARRAY; -function_identifier_array - lbracket .and constant_expression .and rbracket; - -/* - * ::= - * | "++" - * | "--" - * | - * - * ::= "+" - * | "-" - * | "!" - * | "~" // reserved - */ -unary_expression - postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or - unary_expression_4 .or unary_expression_5/* .or unary_expression_6*/; -unary_expression_1 - plusplus .and unary_expression .and .true .emit OP_PREINCREMENT; -unary_expression_2 - minusminus .and unary_expression .and .true .emit OP_PREDECREMENT; -unary_expression_3 - plus .and unary_expression .and .true .emit OP_PLUS; -unary_expression_4 - minus .and unary_expression .and .true .emit OP_MINUS; -unary_expression_5 - bang .and unary_expression .and .true .emit OP_NOT; -/*unary_expression_6 - tilde .and unary_expression .and .true .emit OP_COMPLEMENT;*/ - -/* - * ::= - * | "*" - * | "/" - * | "%" // reserved - */ -multiplicative_expression - unary_expression .and .loop multiplicative_expression_1; -multiplicative_expression_1 - multiplicative_expression_2 .or multiplicative_expression_3/* .or multiplicative_expression_4*/; -multiplicative_expression_2 - star .and unary_expression .and .true .emit OP_MULTIPLY; -multiplicative_expression_3 - slash .and unary_expression .and .true .emit OP_DIVIDE; -/*multiplicative_expression_4 - percent .and unary_expression .and .true .emit OP_MODULUS;*/ - -/* - * ::= - * | "+" - * | "-" - */ -additive_expression - multiplicative_expression .and .loop additive_expression_1; -additive_expression_1 - additive_expression_2 .or additive_expression_3; -additive_expression_2 - plus .and multiplicative_expression .and .true .emit OP_ADD; -additive_expression_3 - minus .and multiplicative_expression .and .true .emit OP_SUBTRACT; - -/* - * ::= - * | "<<" // reserved - * | ">>" // reserved - */ -shift_expression - additive_expression/* .and .loop shift_expression_1*/; -/*shift_expression_1 - shift_expression_2 .or shift_expression_3;*/ -/*shift_expression_2 - lessless .and additive_expression .and .true .emit OP_LSHIFT;*/ -/*shift_expression_3 - greatergreater .and additive_expression .and .true .emit OP_RSHIFT;*/ - -/* - * ::= - * | "<" - * | ">" - * | "<=" - * | ">=" - */ -relational_expression - shift_expression .and .loop relational_expression_1; -relational_expression_1 - relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or - relational_expression_5; -relational_expression_2 - lessequals .and shift_expression .and .true .emit OP_LESSEQUAL; -relational_expression_3 - greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL; -relational_expression_4 - less .and shift_expression .and .true .emit OP_LESS; -relational_expression_5 - greater .and shift_expression .and .true .emit OP_GREATER; - -/* - * ::= - * | "==" - * | "!=" - */ -equality_expression - relational_expression .and .loop equality_expression_1; -equality_expression_1 - equality_expression_2 .or equality_expression_3; -equality_expression_2 - equalsequals .and relational_expression .and .true .emit OP_EQUAL; -equality_expression_3 - bangequals .and relational_expression .and .true .emit OP_NOTEQUAL; - -/* - * ::= - * | "&" // reserved - */ -and_expression - equality_expression/* .and .loop and_expression_1*/; -/*and_expression_1 - ampersand .and equality_expression .and .true .emit OP_BITAND;*/ - -/* - * ::= - * | "^" // reserved - */ -exclusive_or_expression - and_expression/* .and .loop exclusive_or_expression_1*/; -/*exclusive_or_expression_1 - caret .and and_expression .and .true .emit OP_BITXOR;*/ - -/* - * ::= - * | "|" // reserved - */ -inclusive_or_expression - exclusive_or_expression/* .and .loop inclusive_or_expression_1*/; -/*inclusive_or_expression_1 - bar .and exclusive_or_expression .and .true .emit OP_BITOR;*/ - -/* - * ::= - * | "&&" - */ -logical_and_expression - inclusive_or_expression .and .loop logical_and_expression_1; -logical_and_expression_1 - ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND; - -/* - * ::= - * | "^^" - */ -logical_xor_expression - logical_and_expression .and .loop logical_xor_expression_1; -logical_xor_expression_1 - caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR; - -/* - * ::= - * | "||" - */ -logical_or_expression - logical_xor_expression .and .loop logical_or_expression_1; -logical_or_expression_1 - barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR; - -/* - * ::= - * | "?" ":" - */ -conditional_expression - logical_or_expression .and .loop conditional_expression_1; -conditional_expression_1 - question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT; - -/* - * ::= - * | - * - * ::= "=" - * | "*=" - * | "/=" - * | "+=" - * | "-=" - * | "%=" // reserved - * | "<<=" // reserved - * | ">>=" // reserved - * | "&=" // reserved - * | "^=" // reserved - * | "|=" // reserved - */ -assignment_expression - assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or - assignment_expression_4 .or assignment_expression_5/* .or assignment_expression_6 .or - assignment_expression_7 .or assignment_expression_8 .or assignment_expression_9 .or - assignment_expression_10 .or assignment_expression_11*/ .or conditional_expression; -assignment_expression_1 - unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN; -assignment_expression_2 - unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN; -assignment_expression_3 - unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN; -assignment_expression_4 - unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN; -assignment_expression_5 - unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN; -/*assignment_expression_6 - unary_expression .and percentequals .and assignment_expression .and .true .emit OP_MODASSIGN;*/ -/*assignment_expression_7 - unary_expression .and lesslessequals .and assignment_expression .and .true .emit OP_LSHASSIGN;*/ -/*assignment_expression_8 - unary_expression .and greatergreaterequals .and assignment_expression .and - .true .emit OP_RSHASSIGN;*/ -/*assignment_expression_9 - unary_expression .and ampersandequals .and assignment_expression .and .true .emit OP_ANDASSIGN;*/ -/*assignment_expression_10 - unary_expression .and caretequals .and assignment_expression .and .true .emit OP_XORASSIGN;*/ -/*assignment_expression_11 - unary_expression .and barequals .and assignment_expression .and .true .emit OP_ORASSIGN;*/ - -/* - * ::= - * | "," - */ -expression - assignment_expression .and .loop expression_1; -expression_1 - comma .and assignment_expression .and .true .emit OP_SEQUENCE; - -/* - * ::= - */ -constant_expression - conditional_expression .and .true .emit OP_END; - -/* - * ::= ";" - * | ";" - */ -declaration - declaration_1 .or declaration_2; -declaration_1 - function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon; -declaration_2 - init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon; - -/* - * ::= "void" ")" - * | ")" - */ -function_prototype - function_prototype_1 .or function_prototype_2; -function_prototype_1 - function_header .and "void" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE; -function_prototype_2 - function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE; - -/* - * ::= - * | - */ -function_declarator - function_header_with_parameters .or function_header; - -/* - * ::= - * | "," - * - */ -function_header_with_parameters - function_header .and parameter_declaration .and .loop function_header_with_parameters_1; -function_header_with_parameters_1 - comma .and parameter_declaration; - -/* - * ::= "(" - */ -function_header - function_header_nospace .or function_header_space; -function_header_space - fully_specified_type_space .and space .and function_decl_identifier .and lparen; -function_header_nospace - fully_specified_type_nospace .and function_decl_identifier .and lparen; - -/* - * ::= "__constructor" - * | <__operator> - * | - * - * note: this is an extension to the standard language specification. - * normally slang disallows operator and constructor prototypes and definitions - */ -function_decl_identifier - .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or - .if (parsing_builtin != 0) "__constructor" .emit FUNCTION_CONSTRUCTOR .or - identifier .emit FUNCTION_ORDINARY; - -/* - * <__operator> ::= "__operator" - * - * note: this is an extension to the standard language specification. - * normally slang disallows operator prototypes and definitions - */ -__operator - "__operator" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE; - -/* - * ::= "=" - * | "+=" - * | "-=" - * | "*=" - * | "/=" - * | "%=" // reserved - * | "<<=" // reserved - * | ">>=" // reserved - * | "&=" // reserved - * | "^=" // reserved - * | "|=" // reserved - * | "^^" - * | "|" // reserved - * | "^" // reserved - * | "&" // reserved - * | "==" - * | "!=" - * | "<" - * | ">" - * | "<=" - * | ">=" - * | "<<" // reserved - * | ">>" // reserved - * | "*" - * | "/" - * | "%" // reserved - * | "++" - * | "--" - * | "+" - * | "-" - * | "~" // reserved - * | "!" - * - * note: this is an extension to the standard language specification. - * normally slang disallows operator prototypes and definitions - */ -overriden_operator - plusplus .emit OPERATOR_INCREMENT .or - plusequals .emit OPERATOR_ADDASSIGN .or - plus .emit OPERATOR_PLUS .or - minusminus .emit OPERATOR_DECREMENT .or - minusequals .emit OPERATOR_SUBASSIGN .or - minus .emit OPERATOR_MINUS .or - bang .emit OPERATOR_NOT .or - starequals .emit OPERATOR_MULASSIGN .or - star .emit OPERATOR_MULTIPLY .or - slashequals .emit OPERATOR_DIVASSIGN .or - slash .emit OPERATOR_DIVIDE .or - lessequals .emit OPERATOR_LESSEQUAL .or - /*lesslessequals .emit OPERATOR_LSHASSIGN .or*/ - /*lessless .emit OPERATOR_LSHIFT .or*/ - less .emit OPERATOR_LESS .or - greaterequals .emit OPERATOR_GREATEREQUAL .or - /*greatergreaterequals .emit OPERATOR_RSHASSIGN .or*/ - /*greatergreater .emit OPERATOR_RSHIFT .or*/ - greater .emit OPERATOR_GREATER .or - /*percentequals .emit OPERATOR_MODASSIGN .or*/ - /*percent .emit OPERATOR_MODULUS .or*/ - /*ampersandequals .emit OPERATOR_ANDASSIGN */ - /*ampersand .emit OPERATOR_BITAND .or*/ - /*barequals .emit OPERATOR_ORASSIGN .or*/ - /*bar .emit OPERATOR_BITOR .or*/ - /*tilde .emit OPERATOR_COMPLEMENT .or*/ - /*caretequals .emit OPERATOR_XORASSIGN .or*/ - caretcaret .emit OPERATOR_LOGICALXOR /*.or - caret .emit OPERATOR_BITXOR*/; - -/* - * ::= - * | "[" "]" - */ -parameter_declarator - parameter_declarator_nospace .or parameter_declarator_space; -parameter_declarator_nospace - type_specifier_nospace .and identifier .and parameter_declarator_1; -parameter_declarator_space - type_specifier_space .and space .and identifier .and parameter_declarator_1; -parameter_declarator_1 - parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or - .true .emit PARAMETER_ARRAY_NOT_PRESENT; -parameter_declarator_2 - lbracket .and constant_expression .and rbracket; - -/* - * ::= - * - * | - * - * | - * - * | - * - * | - * - * | - * - * | - * | - */ -parameter_declaration - parameter_declaration_1 .emit PARAMETER_NEXT; -parameter_declaration_1 - parameter_declaration_2 .or parameter_declaration_3; -parameter_declaration_2 - type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4; -parameter_declaration_3 - parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4; -parameter_declaration_4 - parameter_declaration_optprec .and parameter_declaration_rest; -parameter_declaration_optprec - parameter_declaration_prec .or .true .emit PRECISION_DEFAULT; -parameter_declaration_prec - precision .and space; -parameter_declaration_rest - parameter_declarator .or parameter_type_specifier; - -/* - * ::= "in" - * | "out" - * | "inout" - * | "" - */ -parameter_qualifier - parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN; -parameter_qualifier_1 - parameter_qualifier_2 .and space; -parameter_qualifier_2 - "in" .emit PARAM_QUALIFIER_IN .or - "out" .emit PARAM_QUALIFIER_OUT .or - "inout" .emit PARAM_QUALIFIER_INOUT; - -/* - * ::= - * | "[" "]" - */ -parameter_type_specifier - parameter_type_specifier_1 .and .true .emit '\0' .and parameter_type_specifier_2; -parameter_type_specifier_1 - type_specifier_nospace .or type_specifier_space; -parameter_type_specifier_2 - parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or - .true .emit PARAMETER_ARRAY_NOT_PRESENT; -parameter_type_specifier_3 - lbracket .and constant_expression .and rbracket; - -/* - * ::= - * | "," - * | "," "[" "]" - * | "," "[" "]" - * | "," "=" - */ -init_declarator_list - single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and - .true .emit DECLARATOR_NONE; -init_declarator_list_1 - comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2; -init_declarator_list_2 - init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE; -init_declarator_list_3 - equals .and initializer .emit VARIABLE_INITIALIZER; -init_declarator_list_4 - lbracket .and init_declarator_list_5 .and rbracket; -init_declarator_list_5 - constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN; - -/* - * ::= - * | - * | "[" "]" - * | "[" "]" - * | "=" - */ -single_declaration - single_declaration_nospace .or single_declaration_space; -single_declaration_space - fully_specified_type_space .and single_declaration_space_1; -single_declaration_nospace - fully_specified_type_nospace .and single_declaration_nospace_1; -single_declaration_space_1 - single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE; -single_declaration_nospace_1 - single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE; -single_declaration_space_2 - space .and identifier .and single_declaration_3; -single_declaration_nospace_2 - identifier .and single_declaration_3; -single_declaration_3 - single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE; -single_declaration_4 - equals .and initializer .emit VARIABLE_INITIALIZER; -single_declaration_5 - lbracket .and single_declaration_6 .and rbracket; -single_declaration_6 - constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN; - -/* - * ::= - * - * Example: "invariant varying highp vec3" - */ -fully_specified_type_space - fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_space; -fully_specified_type_nospace - fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_nospace; -fully_specified_type_optinvariant - fully_specified_type_invariant .or .true .emit TYPE_VARIANT; -fully_specified_type_invariant - invariant_qualifier .and space; -fully_specified_type_optcentroid - fully_specified_type_centroid .or .true .emit TYPE_CENTER; -fully_specified_type_centroid - centroid_qualifier .and space; -fully_specified_type_optqual - fully_specified_type_qual .or .true .emit TYPE_QUALIFIER_NONE; -fully_specified_type_qual - type_qualifier .and space; -fully_specified_type_optprec - fully_specified_type_prec .or .true .emit PRECISION_DEFAULT; -fully_specified_type_prec - precision .and space; - -/* - * ::= "invariant" - */ -invariant_qualifier - "invariant" .emit TYPE_INVARIANT; - -centroid_qualifier - "centroid" .emit TYPE_CENTROID; - - -/* - * ::= "const" - * | "attribute" // Vertex only. - * | "varying" - * | "uniform" - * | "__fixed_output" - * | "__fixed_input" - * - * note: this is an extension to the standard language specification, - * normally slang disallows __fixed_output and __fixed_input type qualifiers - */ -type_qualifier - "const" .emit TYPE_QUALIFIER_CONST .or - .if (shader_type == 2) "attribute" .emit TYPE_QUALIFIER_ATTRIBUTE .or - "varying" .emit TYPE_QUALIFIER_VARYING .or - "uniform" .emit TYPE_QUALIFIER_UNIFORM .or - .if (parsing_builtin != 0) "__fixed_output" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or - .if (parsing_builtin != 0) "__fixed_input" .emit TYPE_QUALIFIER_FIXEDINPUT; - -/* - * ::= "void" - * | "float" - * | "int" - * | "bool" - * | "vec2" - * | "vec3" - * | "vec4" - * | "bvec2" - * | "bvec3" - * | "bvec4" - * | "ivec2" - * | "ivec3" - * | "ivec4" - * | "mat2" - * | "mat3" - * | "mat4" - * | "mat2x3" - * | "mat3x2" - * | "mat2x4" - * | "mat4x2" - * | "mat3x4" - * | "mat4x3" - * | "sampler1D" - * | "sampler2D" - * | "sampler3D" - * | "samplerCube" - * | "sampler1DShadow" - * | "sampler2DShadow" - * | "sampler2DRect" - * | "sampler2DRectShadow" - * | - * | - */ -type_specifier_nonarray_space - "void" .emit TYPE_SPECIFIER_VOID .or - "float" .emit TYPE_SPECIFIER_FLOAT .or - "int" .emit TYPE_SPECIFIER_INT .or - "bool" .emit TYPE_SPECIFIER_BOOL .or - "vec2" .emit TYPE_SPECIFIER_VEC2 .or - "vec3" .emit TYPE_SPECIFIER_VEC3 .or - "vec4" .emit TYPE_SPECIFIER_VEC4 .or - "bvec2" .emit TYPE_SPECIFIER_BVEC2 .or - "bvec3" .emit TYPE_SPECIFIER_BVEC3 .or - "bvec4" .emit TYPE_SPECIFIER_BVEC4 .or - "ivec2" .emit TYPE_SPECIFIER_IVEC2 .or - "ivec3" .emit TYPE_SPECIFIER_IVEC3 .or - "ivec4" .emit TYPE_SPECIFIER_IVEC4 .or - "mat2" .emit TYPE_SPECIFIER_MAT2 .or - "mat3" .emit TYPE_SPECIFIER_MAT3 .or - "mat4" .emit TYPE_SPECIFIER_MAT4 .or - "mat2x3" .emit TYPE_SPECIFIER_MAT23 .or - "mat3x2" .emit TYPE_SPECIFIER_MAT32 .or - "mat2x4" .emit TYPE_SPECIFIER_MAT24 .or - "mat4x2" .emit TYPE_SPECIFIER_MAT42 .or - "mat3x4" .emit TYPE_SPECIFIER_MAT34 .or - "mat4x3" .emit TYPE_SPECIFIER_MAT43 .or - "sampler1D" .emit TYPE_SPECIFIER_SAMPLER1D .or - "sampler2D" .emit TYPE_SPECIFIER_SAMPLER2D .or - "sampler3D" .emit TYPE_SPECIFIER_SAMPLER3D .or - "samplerCube" .emit TYPE_SPECIFIER_SAMPLERCUBE .or - "sampler1DShadow" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or - "sampler2DShadow" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or - "sampler2DRect" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or - "sampler2DRectShadow" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW .or - type_name .emit TYPE_SPECIFIER_TYPENAME; -type_specifier_nonarray_nospace - struct_specifier .emit TYPE_SPECIFIER_STRUCT; -type_specifier_nonarray - type_specifier_nonarray_nospace .or type_specifier_nonarray_space; - -/* - * ::= - * | "[" "]" - */ -type_specifier_space - type_specifier_nonarray_space .and .true .emit TYPE_SPECIFIER_NONARRAY; -type_specifier_nospace - type_specifier_nospace_array .or type_specifier_nospace_1; -type_specifier_nospace_1 - type_specifier_nonarray_nospace .and .true .emit TYPE_SPECIFIER_NONARRAY; -type_specifier_nospace_array - type_specifier_nonarray .and lbracket .emit TYPE_SPECIFIER_ARRAY .and constant_expression .and rbracket; - -/* - * ::= "struct" "{" "}" - * | "struct" "{" "}" - */ -struct_specifier - "struct" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and - struct_declaration_list .and rbrace .emit FIELD_NONE; -struct_specifier_1 - struct_specifier_2 .or .true .emit '\0'; -struct_specifier_2 - space .and identifier; - -/* - * ::= - * | - */ -struct_declaration_list - struct_declaration .and .loop struct_declaration .emit FIELD_NEXT; - -/* - * ::= ";" - */ -struct_declaration - struct_declaration_nospace .or struct_declaration_space; -struct_declaration_space - type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE; -struct_declaration_nospace - type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE; - -/* - * ::= - * | "," - */ -struct_declarator_list - struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT; -struct_declarator_list_1 - comma .and struct_declarator; - -/* - * ::= - * | "[" "]" - */ -struct_declarator - identifier .and struct_declarator_1; -struct_declarator_1 - struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE; -struct_declarator_2 - lbracket .and constant_expression .and rbracket; - -/* - * ::= - */ -initializer - assignment_expression .and .true .emit OP_END; - -/* - * ::= - */ -declaration_statement - declaration; - -/* - * ::= - * | - */ -statement - compound_statement .or simple_statement; -statement_space - compound_statement .or statement_space_1; -statement_space_1 - space .and simple_statement; - -/* - * ::= <__asm_statement> - * | - * | - * | - * | - * | - * - * note: this is an extension to the standard language specification. - * normally slang disallows use of __asm statements - */ -simple_statement - .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or - selection_statement .or - iteration_statement .or - precision_stmt .emit OP_PRECISION .or - jump_statement .or - expression_statement .emit OP_EXPRESSION .or - declaration_statement .emit OP_DECLARE; - -/* - * ::= "{" "}" - * | "{" "}" - */ -compound_statement - compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END; -compound_statement_1 - compound_statement_2 .or compound_statement_3; -compound_statement_2 - lbrace .and rbrace; -compound_statement_3 - lbrace .and statement_list .and rbrace; - -/* - * ::= "{" "}" - * | "{" "}" - */ -compound_statement_no_new_scope - compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END; -compound_statement_no_new_scope_1 - compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3; -compound_statement_no_new_scope_2 - lbrace .and rbrace; -compound_statement_no_new_scope_3 - lbrace .and statement_list .and rbrace; - - -/* - * ::= - * | - */ -statement_list - statement .and .loop statement; - -/* - * ::= ";" - * | ";" - */ -expression_statement - expression_statement_1 .or expression_statement_2; -expression_statement_1 - semicolon .emit OP_PUSH_VOID .emit OP_END; -expression_statement_2 - expression .and semicolon .emit OP_END; - -/* - * ::= "if" "(" ")" - */ -selection_statement - "if" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and - rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement; - -/* - * ::= "else" - * | - */ -selection_rest_statement - statement .and selection_rest_statement_1; -selection_rest_statement_1 - selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END; -selection_rest_statement_2 - "else" .and optional_space .and statement; - -/* - * ::= - * | "=" - * - * note: if is executed, the emit format must - * match emit format - */ -condition - condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or - condition_3 .emit OP_EXPRESSION; -condition_1 - condition_1_nospace .or condition_1_space; -condition_1_nospace - fully_specified_type_nospace .and condition_2; -condition_1_space - fully_specified_type_space .and space .and condition_2; -condition_2 - identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and - initializer .and .true .emit DECLARATOR_NONE; -condition_3 - expression .and .true .emit OP_END; - -/* - * ::= "while" "(" ")" - * | "do" "while" "(" ")" ";" - * | "for" "(" ")" - */ -iteration_statement - iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3; -iteration_statement_1 - "while" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and - rparen .error RPAREN_EXPECTED .and statement; -iteration_statement_2 - "do" .emit OP_DO .and statement_space .and "while" .and lparen .error LPAREN_EXPECTED .and - expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon; -iteration_statement_3 - "for" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and - for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement; - -/* - * ::= - * | - */ -for_init_statement - expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE; - -/* - * ::= - * | "" - * - * note: is used only by "for" statement. - * if is ommitted, parser simulates default behaviour, - * that is simulates "true" expression - */ -conditionopt - condition .or - .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\0' .emit OP_END; - -/* - * ::= ";" - * | ";" - */ -for_rest_statement - conditionopt .and semicolon .and for_rest_statement_1; -for_rest_statement_1 - for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END; -for_rest_statement_2 - expression .and .true .emit OP_END; - -/* - * ::= "continue" ";" - * | "break" ";" - * | "return" ";" - * | "return" ";" - * | "discard" ";" // Fragment shader only. - */ -jump_statement - jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or - .if (shader_type == 1) jump_statement_5; -jump_statement_1 - "continue" .and semicolon .emit OP_CONTINUE; -jump_statement_2 - "break" .and semicolon .emit OP_BREAK; -jump_statement_3 - "return" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END; -jump_statement_4 - "return" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END; -jump_statement_5 - "discard" .and semicolon .emit OP_DISCARD; - -/* - * <__asm_statement> ::= "__asm" ";" - * - * note: this is an extension to the standard language specification. - * normally slang disallows __asm statements - */ -__asm_statement - "__asm" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END; - -/* - * ::= - * | "," - * - * note: this is an extension to the standard language specification. - * normally slang disallows __asm statements - */ -asm_arguments - asm_argument .and .true .emit OP_END .and .loop asm_arguments_1; -asm_arguments_1 - comma .and asm_argument .and .true .emit OP_END; - -/* - * ::= - * | - * - * note: this is an extension to the standard language specification. - * normally slang disallows __asm statements - */ -asm_argument - var_with_field .or - variable_identifier .or - floatconstant; - -var_with_field - variable_identifier .and dot .and field_selection .emit OP_FIELD; - - -/* - * ::= - * | - */ -translation_unit - optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and - .loop external_declaration .and optional_space .and - '\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL; - - -/* - * ::= - * | - */ -external_declaration - precision_stmt .emit DEFAULT_PRECISION .or - function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or - invariant_stmt .emit INVARIANT_STMT .or - declaration .emit EXTERNAL_DECLARATION; - - -/* - * ::= "precision" - */ -precision_stmt - "precision" .and space .and precision .error INVALID_PRECISION .and space .and prectype .error INVALID_PRECISION_TYPE .and semicolon; - -/* - * ::= "lowp" - * | "mediump" - * | "highp" - */ -precision - "lowp" .emit PRECISION_LOW .or - "mediump" .emit PRECISION_MEDIUM .or - "highp" .emit PRECISION_HIGH; - -/* - * ::= "int" - * | "float" - * | "a sampler type" - */ -prectype - "int" .emit TYPE_SPECIFIER_INT .or - "float" .emit TYPE_SPECIFIER_FLOAT .or - "sampler1D" .emit TYPE_SPECIFIER_SAMPLER1D .or - "sampler2D" .emit TYPE_SPECIFIER_SAMPLER2D .or - "sampler3D" .emit TYPE_SPECIFIER_SAMPLER3D .or - "samplerCube" .emit TYPE_SPECIFIER_SAMPLERCUBE .or - "sampler1DShadow" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or - "sampler2DShadow" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or - "sampler2DRect" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or - "sampler2DRectShadow" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW; - - -/* - * ::= "invariant" identifier; - */ -invariant_stmt - "invariant" .and space .and identifier .and semicolon; - - -/* - * :: - */ -function_definition - function_prototype .and compound_statement_no_new_scope; - - - -/* - * helper rules, not part of the official language syntax - */ - -digit_oct - '0'-'7'; - -digit_dec - '0'-'9'; - -digit_hex - '0'-'9' .or 'A'-'F' .or 'a'-'f'; - -id_character_first - 'a'-'z' .or 'A'-'Z' .or '_'; - -id_character_next - id_character_first .or digit_dec; - -identifier - id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\0'; - -float - float_1 .or float_2 .or float_3; -float_1 - float_fractional_constant .and float_optional_exponent_part .and optional_f_suffix; -float_2 - float_digit_sequence .and .true .emit '\0' .and float_exponent_part .and optional_f_suffix; -float_3 - float_digit_sequence .and .true .emit '\0' .and 'f' .emit '\0'; - -float_fractional_constant - float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3; -float_fractional_constant_1 - float_digit_sequence .and '.' .and float_digit_sequence; -float_fractional_constant_2 - float_digit_sequence .and '.' .and .true .emit '\0'; -float_fractional_constant_3 - '.' .emit '\0' .and float_digit_sequence; - -float_optional_exponent_part - float_exponent_part .or .true .emit '\0'; - -float_digit_sequence - digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\0'; - -float_exponent_part - float_exponent_part_1 .or float_exponent_part_2; -float_exponent_part_1 - 'e' .and float_optional_sign .and float_digit_sequence; -float_exponent_part_2 - 'E' .and float_optional_sign .and float_digit_sequence; - -float_optional_sign - float_sign .or .true; - -float_sign - '+' .or '-' .emit '-'; - -optional_f_suffix - 'f' .or .true; - - -integer - integer_hex .or integer_oct .or integer_dec; - -integer_hex - '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and - .true .emit '\0'; -integer_hex_1 - 'x' .or 'X'; - -integer_oct - '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\0'; - -integer_dec - digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\0'; - -boolean - "true" .emit 2 .emit '1' .emit '\0' .or - "false" .emit 2 .emit '0' .emit '\0'; - -type_name - identifier; - -field_selection - identifier; - -floatconstant - float .emit OP_PUSH_FLOAT; - -intconstant - integer .emit OP_PUSH_INT; - -boolconstant - boolean .emit OP_PUSH_BOOL; - -optional_space - .loop single_space; - -space - single_space .and .loop single_space; - -single_space - white_char .or c_style_comment_block .or cpp_style_comment_block; - -white_char - ' ' .or '\t' .or new_line .or '\v' .or '\f'; - -new_line - cr_lf .or lf_cr .or '\n' .or '\r'; - -cr_lf - '\r' .and '\n'; - -lf_cr - '\n' .and '\r'; - -c_style_comment_block - '/' .and '*' .and c_style_comment_rest; - -c_style_comment_rest - .loop c_style_comment_char_no_star .and c_style_comment_rest_1; -c_style_comment_rest_1 - c_style_comment_end .or c_style_comment_rest_2; -c_style_comment_rest_2 - '*' .and c_style_comment_rest; - -c_style_comment_char_no_star - '\x2B'-'\xFF' .or '\x01'-'\x29'; - -c_style_comment_end - '*' .and '/'; - -cpp_style_comment_block - '/' .and '/' .and cpp_style_comment_block_1; -cpp_style_comment_block_1 - cpp_style_comment_block_2 .or cpp_style_comment_block_3; -cpp_style_comment_block_2 - .loop cpp_style_comment_char .and new_line; -cpp_style_comment_block_3 - .loop cpp_style_comment_char; - -cpp_style_comment_char - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -/* lexical rules */ - -/*ampersand - optional_space .and '&' .and optional_space;*/ - -ampersandampersand - optional_space .and '&' .and '&' .and optional_space; - -/*ampersandequals - optional_space .and '&' .and '=' .and optional_space;*/ - -/*bar - optional_space .and '|' .and optional_space;*/ - -barbar - optional_space .and '|' .and '|' .and optional_space; - -/*barequals - optional_space .and '|' .and '=' .and optional_space;*/ - -bang - optional_space .and '!' .and optional_space; - -bangequals - optional_space .and '!' .and '=' .and optional_space; - -/*caret - optional_space .and '^' .and optional_space;*/ - -caretcaret - optional_space .and '^' .and '^' .and optional_space; - -/*caretequals - optional_space .and '^' .and '=' .and optional_space;*/ - -colon - optional_space .and ':' .and optional_space; - -comma - optional_space .and ',' .and optional_space; - -dot - optional_space .and '.' .and optional_space; - -equals - optional_space .and '=' .and optional_space; - -equalsequals - optional_space .and '=' .and '=' .and optional_space; - -greater - optional_space .and '>' .and optional_space; - -greaterequals - optional_space .and '>' .and '=' .and optional_space; - -/*greatergreater - optional_space .and '>' .and '>' .and optional_space;*/ - -/*greatergreaterequals - optional_space .and '>' .and '>' .and '=' .and optional_space;*/ - -lbrace - optional_space .and '{' .and optional_space; - -lbracket - optional_space .and '[' .and optional_space; - -less - optional_space .and '<' .and optional_space; - -lessequals - optional_space .and '<' .and '=' .and optional_space; - -/*lessless - optional_space .and '<' .and '<' .and optional_space;*/ - -/*lesslessequals - optional_space .and '<' .and '<' .and '=' .and optional_space;*/ - -lparen - optional_space .and '(' .and optional_space; - -minus - optional_space .and '-' .and optional_space; - -minusequals - optional_space .and '-' .and '=' .and optional_space; - -minusminus - optional_space .and '-' .and '-' .and optional_space; - -/*percent - optional_space .and '%' .and optional_space;*/ - -/*percentequals - optional_space .and '%' .and '=' .and optional_space;*/ - -plus - optional_space .and '+' .and optional_space; - -plusequals - optional_space .and '+' .and '=' .and optional_space; - -plusplus - optional_space .and '+' .and '+' .and optional_space; - -question - optional_space .and '?' .and optional_space; - -rbrace - optional_space .and '}' .and optional_space; - -rbracket - optional_space .and ']' .and optional_space; - -rparen - optional_space .and ')' .and optional_space; - -semicolon - optional_space .and ';' .and optional_space; - -slash - optional_space .and '/' .and optional_space; - -slashequals - optional_space .and '/' .and '=' .and optional_space; - -star - optional_space .and '*' .and optional_space; - -starequals - optional_space .and '*' .and '=' .and optional_space; - -/*tilde - optional_space .and '~' .and optional_space;*/ - -/* string rules - these are used internally by the parser when parsing quoted strings */ - -.string string_lexer; - -string_lexer - lex_first_identifier_character .and .loop lex_next_identifier_character; - -lex_first_identifier_character - 'a'-'z' .or 'A'-'Z' .or '_'; - -lex_next_identifier_character - 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_'; - -/* error rules - these are used by error messages */ - -err_token - '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or - '-' .or '+' .or '=' .or '|' .or '\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '"' .or - '\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier; - -err_identifier - id_character_first .and .loop id_character_next; - diff --git a/mesalib/src/mesa/shader/slang/library/slang_shader_syn.h b/mesalib/src/mesa/shader/slang/library/slang_shader_syn.h deleted file mode 100644 index 6a382970e..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_shader_syn.h +++ /dev/null @@ -1,866 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */ - -".syntax translation_unit;\n" -".emtcode REVISION 5\n" -".emtcode EXTERNAL_NULL 0\n" -".emtcode EXTERNAL_FUNCTION_DEFINITION 1\n" -".emtcode EXTERNAL_DECLARATION 2\n" -".emtcode DEFAULT_PRECISION 3\n" -".emtcode INVARIANT_STMT 4\n" -".emtcode PRECISION_DEFAULT 0\n" -".emtcode PRECISION_LOW 1\n" -".emtcode PRECISION_MEDIUM 2\n" -".emtcode PRECISION_HIGH 3\n" -".emtcode DECLARATION_FUNCTION_PROTOTYPE 1\n" -".emtcode DECLARATION_INIT_DECLARATOR_LIST 2\n" -".emtcode FUNCTION_ORDINARY 0\n" -".emtcode FUNCTION_CONSTRUCTOR 1\n" -".emtcode FUNCTION_OPERATOR 2\n" -".emtcode FUNCTION_CALL_NONARRAY 0\n" -".emtcode FUNCTION_CALL_ARRAY 1\n" -".emtcode OPERATOR_ADDASSIGN 1\n" -".emtcode OPERATOR_SUBASSIGN 2\n" -".emtcode OPERATOR_MULASSIGN 3\n" -".emtcode OPERATOR_DIVASSIGN 4\n" -".emtcode OPERATOR_LOGICALXOR 11\n" -".emtcode OPERATOR_LESS 15\n" -".emtcode OPERATOR_GREATER 16\n" -".emtcode OPERATOR_LESSEQUAL 17\n" -".emtcode OPERATOR_GREATEREQUAL 18\n" -".emtcode OPERATOR_MULTIPLY 21\n" -".emtcode OPERATOR_DIVIDE 22\n" -".emtcode OPERATOR_INCREMENT 24\n" -".emtcode OPERATOR_DECREMENT 25\n" -".emtcode OPERATOR_PLUS 26\n" -".emtcode OPERATOR_MINUS 27\n" -".emtcode OPERATOR_NOT 29\n" -".emtcode DECLARATOR_NONE 0\n" -".emtcode DECLARATOR_NEXT 1\n" -".emtcode VARIABLE_NONE 0\n" -".emtcode VARIABLE_IDENTIFIER 1\n" -".emtcode VARIABLE_INITIALIZER 2\n" -".emtcode VARIABLE_ARRAY_EXPLICIT 3\n" -".emtcode VARIABLE_ARRAY_UNKNOWN 4\n" -".emtcode TYPE_QUALIFIER_NONE 0\n" -".emtcode TYPE_QUALIFIER_CONST 1\n" -".emtcode TYPE_QUALIFIER_ATTRIBUTE 2\n" -".emtcode TYPE_QUALIFIER_VARYING 3\n" -".emtcode TYPE_QUALIFIER_UNIFORM 4\n" -".emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5\n" -".emtcode TYPE_QUALIFIER_FIXEDINPUT 6\n" -".emtcode TYPE_VARIANT 90\n" -".emtcode TYPE_INVARIANT 91\n" -".emtcode TYPE_CENTER 95\n" -".emtcode TYPE_CENTROID 96\n" -".emtcode TYPE_SPECIFIER_VOID 0\n" -".emtcode TYPE_SPECIFIER_BOOL 1\n" -".emtcode TYPE_SPECIFIER_BVEC2 2\n" -".emtcode TYPE_SPECIFIER_BVEC3 3\n" -".emtcode TYPE_SPECIFIER_BVEC4 4\n" -".emtcode TYPE_SPECIFIER_INT 5\n" -".emtcode TYPE_SPECIFIER_IVEC2 6\n" -".emtcode TYPE_SPECIFIER_IVEC3 7\n" -".emtcode TYPE_SPECIFIER_IVEC4 8\n" -".emtcode TYPE_SPECIFIER_FLOAT 9\n" -".emtcode TYPE_SPECIFIER_VEC2 10\n" -".emtcode TYPE_SPECIFIER_VEC3 11\n" -".emtcode TYPE_SPECIFIER_VEC4 12\n" -".emtcode TYPE_SPECIFIER_MAT2 13\n" -".emtcode TYPE_SPECIFIER_MAT3 14\n" -".emtcode TYPE_SPECIFIER_MAT4 15\n" -".emtcode TYPE_SPECIFIER_SAMPLER1D 16\n" -".emtcode TYPE_SPECIFIER_SAMPLER2D 17\n" -".emtcode TYPE_SPECIFIER_SAMPLER3D 18\n" -".emtcode TYPE_SPECIFIER_SAMPLERCUBE 19\n" -".emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20\n" -".emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21\n" -".emtcode TYPE_SPECIFIER_SAMPLER2DRECT 22\n" -".emtcode TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23\n" -".emtcode TYPE_SPECIFIER_STRUCT 24\n" -".emtcode TYPE_SPECIFIER_TYPENAME 25\n" -".emtcode TYPE_SPECIFIER_MAT23 26\n" -".emtcode TYPE_SPECIFIER_MAT32 27\n" -".emtcode TYPE_SPECIFIER_MAT24 28\n" -".emtcode TYPE_SPECIFIER_MAT42 29\n" -".emtcode TYPE_SPECIFIER_MAT34 30\n" -".emtcode TYPE_SPECIFIER_MAT43 31\n" -".emtcode TYPE_SPECIFIER_NONARRAY 0\n" -".emtcode TYPE_SPECIFIER_ARRAY 1\n" -".emtcode FIELD_NONE 0\n" -".emtcode FIELD_NEXT 1\n" -".emtcode FIELD_ARRAY 2\n" -".emtcode OP_END 0\n" -".emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1\n" -".emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2\n" -".emtcode OP_DECLARE 3\n" -".emtcode OP_ASM 4\n" -".emtcode OP_BREAK 5\n" -".emtcode OP_CONTINUE 6\n" -".emtcode OP_DISCARD 7\n" -".emtcode OP_RETURN 8\n" -".emtcode OP_EXPRESSION 9\n" -".emtcode OP_IF 10\n" -".emtcode OP_WHILE 11\n" -".emtcode OP_DO 12\n" -".emtcode OP_FOR 13\n" -".emtcode OP_PUSH_VOID 14\n" -".emtcode OP_PUSH_BOOL 15\n" -".emtcode OP_PUSH_INT 16\n" -".emtcode OP_PUSH_FLOAT 17\n" -".emtcode OP_PUSH_IDENTIFIER 18\n" -".emtcode OP_SEQUENCE 19\n" -".emtcode OP_ASSIGN 20\n" -".emtcode OP_ADDASSIGN 21\n" -".emtcode OP_SUBASSIGN 22\n" -".emtcode OP_MULASSIGN 23\n" -".emtcode OP_DIVASSIGN 24\n" -".emtcode OP_SELECT 31\n" -".emtcode OP_LOGICALOR 32\n" -".emtcode OP_LOGICALXOR 33\n" -".emtcode OP_LOGICALAND 34\n" -".emtcode OP_EQUAL 38\n" -".emtcode OP_NOTEQUAL 39\n" -".emtcode OP_LESS 40\n" -".emtcode OP_GREATER 41\n" -".emtcode OP_LESSEQUAL 42\n" -".emtcode OP_GREATEREQUAL 43\n" -".emtcode OP_ADD 46\n" -".emtcode OP_SUBTRACT 47\n" -".emtcode OP_MULTIPLY 48\n" -".emtcode OP_DIVIDE 49\n" -".emtcode OP_PREINCREMENT 51\n" -".emtcode OP_PREDECREMENT 52\n" -".emtcode OP_PLUS 53\n" -".emtcode OP_MINUS 54\n" -".emtcode OP_NOT 56\n" -".emtcode OP_SUBSCRIPT 57\n" -".emtcode OP_CALL 58\n" -".emtcode OP_FIELD 59\n" -".emtcode OP_POSTINCREMENT 60\n" -".emtcode OP_POSTDECREMENT 61\n" -".emtcode OP_PRECISION 62\n" -".emtcode OP_METHOD 63\n" -".emtcode PARAM_QUALIFIER_IN 0\n" -".emtcode PARAM_QUALIFIER_OUT 1\n" -".emtcode PARAM_QUALIFIER_INOUT 2\n" -".emtcode PARAMETER_NONE 0\n" -".emtcode PARAMETER_NEXT 1\n" -".emtcode PARAMETER_ARRAY_NOT_PRESENT 0\n" -".emtcode PARAMETER_ARRAY_PRESENT 1\n" -".errtext INVALID_EXTERNAL_DECLARATION \"2001: Syntax error.\"\n" -".errtext INVALID_OPERATOR_OVERRIDE \"2002: Invalid operator override.\"\n" -".errtext LBRACE_EXPECTED \"2003: '{' expected but '$err_token$' found.\"\n" -".errtext LPAREN_EXPECTED \"2004: '(' expected but '$err_token$' found.\"\n" -".errtext RPAREN_EXPECTED \"2005: ')' expected but '$err_token$' found.\"\n" -".errtext INVALID_PRECISION \"2006: Invalid precision specifier '$err_token$'.\"\n" -".errtext INVALID_PRECISION_TYPE \"2007: Invalid precision type '$err_token$'.\"\n" -".regbyte parsing_builtin 0\n" -".regbyte shader_type 0\n" -"variable_identifier\n" -" identifier .emit OP_PUSH_IDENTIFIER;\n" -"primary_expression\n" -" floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1;\n" -"primary_expression_1\n" -" lparen .and expression .and rparen;\n" -"postfix_expression\n" -" postfix_expression_1 .and .loop postfix_expression_2;\n" -"postfix_expression_1\n" -" function_call .or primary_expression;\n" -"postfix_expression_2\n" -" postfix_expression_3 .or postfix_expression_4 .or\n" -" plusplus .emit OP_POSTINCREMENT .or\n" -" minusminus .emit OP_POSTDECREMENT;\n" -"postfix_expression_3\n" -" lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT;\n" -"postfix_expression_4\n" -" dot .and field_selection .emit OP_FIELD;\n" -"integer_expression\n" -" expression;\n" -"function_call\n" -" function_call_or_method;\n" -"function_call_or_method\n" -" regular_function_call .or method_call;\n" -"method_call\n" -" identifier .emit OP_METHOD .and dot .and function_call_generic .and .true .emit OP_END;\n" -"regular_function_call\n" -" function_call_generic .emit OP_CALL .and .true .emit OP_END;\n" -"function_call_generic\n" -" function_call_generic_1 .or function_call_generic_2;\n" -"function_call_generic_1\n" -" function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;\n" -"function_call_generic_2\n" -" function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;\n" -"function_call_header_no_parameters\n" -" function_call_header .and function_call_header_no_parameters_1;\n" -"function_call_header_no_parameters_1\n" -" \"void\" .or .true;\n" -"function_call_header_with_parameters\n" -" function_call_header .and assignment_expression .and .true .emit OP_END .and\n" -" .loop function_call_header_with_parameters_1;\n" -"function_call_header_with_parameters_1\n" -" comma .and assignment_expression .and .true .emit OP_END;\n" -"function_call_header\n" -" function_identifier .and lparen;\n" -"function_identifier\n" -" identifier .and function_identifier_opt_array;\n" -"function_identifier_opt_array\n" -" function_identifier_array .emit FUNCTION_CALL_ARRAY .or\n" -" .true .emit FUNCTION_CALL_NONARRAY;\n" -"function_identifier_array\n" -" lbracket .and constant_expression .and rbracket;\n" -"unary_expression\n" -" postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or\n" -" unary_expression_4 .or unary_expression_5;\n" -"unary_expression_1\n" -" plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;\n" -"unary_expression_2\n" -" minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;\n" -"unary_expression_3\n" -" plus .and unary_expression .and .true .emit OP_PLUS;\n" -"unary_expression_4\n" -" minus .and unary_expression .and .true .emit OP_MINUS;\n" -"unary_expression_5\n" -" bang .and unary_expression .and .true .emit OP_NOT;\n" -"multiplicative_expression\n" -" unary_expression .and .loop multiplicative_expression_1;\n" -"multiplicative_expression_1\n" -" multiplicative_expression_2 .or multiplicative_expression_3;\n" -"multiplicative_expression_2\n" -" star .and unary_expression .and .true .emit OP_MULTIPLY;\n" -"multiplicative_expression_3\n" -" slash .and unary_expression .and .true .emit OP_DIVIDE;\n" -"additive_expression\n" -" multiplicative_expression .and .loop additive_expression_1;\n" -"additive_expression_1\n" -" additive_expression_2 .or additive_expression_3;\n" -"additive_expression_2\n" -" plus .and multiplicative_expression .and .true .emit OP_ADD;\n" -"additive_expression_3\n" -" minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;\n" -"shift_expression\n" -" additive_expression;\n" -"relational_expression\n" -" shift_expression .and .loop relational_expression_1;\n" -"relational_expression_1\n" -" relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or\n" -" relational_expression_5;\n" -"relational_expression_2\n" -" lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;\n" -"relational_expression_3\n" -" greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;\n" -"relational_expression_4\n" -" less .and shift_expression .and .true .emit OP_LESS;\n" -"relational_expression_5\n" -" greater .and shift_expression .and .true .emit OP_GREATER;\n" -"equality_expression\n" -" relational_expression .and .loop equality_expression_1;\n" -"equality_expression_1\n" -" equality_expression_2 .or equality_expression_3;\n" -"equality_expression_2\n" -" equalsequals .and relational_expression .and .true .emit OP_EQUAL;\n" -"equality_expression_3\n" -" bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;\n" -"and_expression\n" -" equality_expression;\n" -"exclusive_or_expression\n" -" and_expression;\n" -"inclusive_or_expression\n" -" exclusive_or_expression;\n" -"logical_and_expression\n" -" inclusive_or_expression .and .loop logical_and_expression_1;\n" -"logical_and_expression_1\n" -" ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;\n" -"logical_xor_expression\n" -" logical_and_expression .and .loop logical_xor_expression_1;\n" -"logical_xor_expression_1\n" -" caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;\n" -"logical_or_expression\n" -" logical_xor_expression .and .loop logical_or_expression_1;\n" -"logical_or_expression_1\n" -" barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;\n" -"conditional_expression\n" -" logical_or_expression .and .loop conditional_expression_1;\n" -"conditional_expression_1\n" -" question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;\n" -"assignment_expression\n" -" assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or\n" -" assignment_expression_4 .or assignment_expression_5 .or conditional_expression;\n" -"assignment_expression_1\n" -" unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;\n" -"assignment_expression_2\n" -" unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;\n" -"assignment_expression_3\n" -" unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;\n" -"assignment_expression_4\n" -" unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;\n" -"assignment_expression_5\n" -" unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;\n" -"expression\n" -" assignment_expression .and .loop expression_1;\n" -"expression_1\n" -" comma .and assignment_expression .and .true .emit OP_SEQUENCE;\n" -"constant_expression\n" -" conditional_expression .and .true .emit OP_END;\n" -"declaration\n" -" declaration_1 .or declaration_2;\n" -"declaration_1\n" -" function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;\n" -"declaration_2\n" -" init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;\n" -"function_prototype\n" -" function_prototype_1 .or function_prototype_2;\n" -"function_prototype_1\n" -" function_header .and \"void\" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n" -"function_prototype_2\n" -" function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n" -"function_declarator\n" -" function_header_with_parameters .or function_header;\n" -"function_header_with_parameters\n" -" function_header .and parameter_declaration .and .loop function_header_with_parameters_1;\n" -"function_header_with_parameters_1\n" -" comma .and parameter_declaration;\n" -"function_header\n" -" function_header_nospace .or function_header_space;\n" -"function_header_space\n" -" fully_specified_type_space .and space .and function_decl_identifier .and lparen;\n" -"function_header_nospace\n" -" fully_specified_type_nospace .and function_decl_identifier .and lparen;\n" -"function_decl_identifier\n" -" .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or\n" -" .if (parsing_builtin != 0) \"__constructor\" .emit FUNCTION_CONSTRUCTOR .or\n" -" identifier .emit FUNCTION_ORDINARY;\n" -"__operator\n" -" \"__operator\" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE;\n" -"overriden_operator\n" -" plusplus .emit OPERATOR_INCREMENT .or\n" -" plusequals .emit OPERATOR_ADDASSIGN .or\n" -" plus .emit OPERATOR_PLUS .or\n" -" minusminus .emit OPERATOR_DECREMENT .or\n" -" minusequals .emit OPERATOR_SUBASSIGN .or\n" -" minus .emit OPERATOR_MINUS .or\n" -" bang .emit OPERATOR_NOT .or\n" -" starequals .emit OPERATOR_MULASSIGN .or\n" -" star .emit OPERATOR_MULTIPLY .or\n" -" slashequals .emit OPERATOR_DIVASSIGN .or\n" -" slash .emit OPERATOR_DIVIDE .or\n" -" lessequals .emit OPERATOR_LESSEQUAL .or\n" -" \n" -" \n" -" less .emit OPERATOR_LESS .or\n" -" greaterequals .emit OPERATOR_GREATEREQUAL .or\n" -" \n" -" \n" -" greater .emit OPERATOR_GREATER .or\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" caretcaret .emit OPERATOR_LOGICALXOR ;\n" -"parameter_declarator\n" -" parameter_declarator_nospace .or parameter_declarator_space;\n" -"parameter_declarator_nospace\n" -" type_specifier_nospace .and identifier .and parameter_declarator_1;\n" -"parameter_declarator_space\n" -" type_specifier_space .and space .and identifier .and parameter_declarator_1;\n" -"parameter_declarator_1\n" -" parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or\n" -" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n" -"parameter_declarator_2\n" -" lbracket .and constant_expression .and rbracket;\n" -"parameter_declaration\n" -" parameter_declaration_1 .emit PARAMETER_NEXT;\n" -"parameter_declaration_1\n" -" parameter_declaration_2 .or parameter_declaration_3;\n" -"parameter_declaration_2\n" -" type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4;\n" -"parameter_declaration_3\n" -" parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4;\n" -"parameter_declaration_4\n" -" parameter_declaration_optprec .and parameter_declaration_rest;\n" -"parameter_declaration_optprec\n" -" parameter_declaration_prec .or .true .emit PRECISION_DEFAULT;\n" -"parameter_declaration_prec\n" -" precision .and space;\n" -"parameter_declaration_rest\n" -" parameter_declarator .or parameter_type_specifier;\n" -"parameter_qualifier\n" -" parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN;\n" -"parameter_qualifier_1\n" -" parameter_qualifier_2 .and space;\n" -"parameter_qualifier_2\n" -" \"in\" .emit PARAM_QUALIFIER_IN .or\n" -" \"out\" .emit PARAM_QUALIFIER_OUT .or\n" -" \"inout\" .emit PARAM_QUALIFIER_INOUT;\n" -"parameter_type_specifier\n" -" parameter_type_specifier_1 .and .true .emit '\\0' .and parameter_type_specifier_2;\n" -"parameter_type_specifier_1\n" -" type_specifier_nospace .or type_specifier_space;\n" -"parameter_type_specifier_2\n" -" parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or\n" -" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n" -"parameter_type_specifier_3\n" -" lbracket .and constant_expression .and rbracket;\n" -"init_declarator_list\n" -" single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and\n" -" .true .emit DECLARATOR_NONE;\n" -"init_declarator_list_1\n" -" comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2;\n" -"init_declarator_list_2\n" -" init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE;\n" -"init_declarator_list_3\n" -" equals .and initializer .emit VARIABLE_INITIALIZER;\n" -"init_declarator_list_4\n" -" lbracket .and init_declarator_list_5 .and rbracket;\n" -"init_declarator_list_5\n" -" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n" -"single_declaration\n" -" single_declaration_nospace .or single_declaration_space;\n" -"single_declaration_space\n" -" fully_specified_type_space .and single_declaration_space_1;\n" -"single_declaration_nospace\n" -" fully_specified_type_nospace .and single_declaration_nospace_1;\n" -"single_declaration_space_1\n" -" single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n" -"single_declaration_nospace_1\n" -" single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n" -"single_declaration_space_2\n" -" space .and identifier .and single_declaration_3;\n" -"single_declaration_nospace_2\n" -" identifier .and single_declaration_3;\n" -"single_declaration_3\n" -" single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE;\n" -"single_declaration_4\n" -" equals .and initializer .emit VARIABLE_INITIALIZER;\n" -"single_declaration_5\n" -" lbracket .and single_declaration_6 .and rbracket;\n" -"single_declaration_6\n" -" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n" -"fully_specified_type_space\n" -" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_space;\n" -"fully_specified_type_nospace\n" -" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_nospace;\n" -"fully_specified_type_optinvariant\n" -" fully_specified_type_invariant .or .true .emit TYPE_VARIANT;\n" -"fully_specified_type_invariant\n" -" invariant_qualifier .and space;\n" -"fully_specified_type_optcentroid\n" -" fully_specified_type_centroid .or .true .emit TYPE_CENTER;\n" -"fully_specified_type_centroid\n" -" centroid_qualifier .and space;\n" -"fully_specified_type_optqual\n" -" fully_specified_type_qual .or .true .emit TYPE_QUALIFIER_NONE;\n" -"fully_specified_type_qual\n" -" type_qualifier .and space;\n" -"fully_specified_type_optprec\n" -" fully_specified_type_prec .or .true .emit PRECISION_DEFAULT;\n" -"fully_specified_type_prec\n" -" precision .and space;\n" -"invariant_qualifier\n" -" \"invariant\" .emit TYPE_INVARIANT;\n" -"centroid_qualifier\n" -" \"centroid\" .emit TYPE_CENTROID;\n" -"type_qualifier\n" -" \"const\" .emit TYPE_QUALIFIER_CONST .or\n" -" .if (shader_type == 2) \"attribute\" .emit TYPE_QUALIFIER_ATTRIBUTE .or\n" -" \"varying\" .emit TYPE_QUALIFIER_VARYING .or\n" -" \"uniform\" .emit TYPE_QUALIFIER_UNIFORM .or\n" -" .if (parsing_builtin != 0) \"__fixed_output\" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or\n" -" .if (parsing_builtin != 0) \"__fixed_input\" .emit TYPE_QUALIFIER_FIXEDINPUT;\n" -"type_specifier_nonarray_space\n" -" \"void\" .emit TYPE_SPECIFIER_VOID .or\n" -" \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n" -" \"int\" .emit TYPE_SPECIFIER_INT .or\n" -" \"bool\" .emit TYPE_SPECIFIER_BOOL .or\n" -" \"vec2\" .emit TYPE_SPECIFIER_VEC2 .or\n" -" \"vec3\" .emit TYPE_SPECIFIER_VEC3 .or\n" -" \"vec4\" .emit TYPE_SPECIFIER_VEC4 .or\n" -" \"bvec2\" .emit TYPE_SPECIFIER_BVEC2 .or\n" -" \"bvec3\" .emit TYPE_SPECIFIER_BVEC3 .or\n" -" \"bvec4\" .emit TYPE_SPECIFIER_BVEC4 .or\n" -" \"ivec2\" .emit TYPE_SPECIFIER_IVEC2 .or\n" -" \"ivec3\" .emit TYPE_SPECIFIER_IVEC3 .or\n" -" \"ivec4\" .emit TYPE_SPECIFIER_IVEC4 .or\n" -" \"mat2\" .emit TYPE_SPECIFIER_MAT2 .or\n" -" \"mat3\" .emit TYPE_SPECIFIER_MAT3 .or\n" -" \"mat4\" .emit TYPE_SPECIFIER_MAT4 .or\n" -" \"mat2x3\" .emit TYPE_SPECIFIER_MAT23 .or\n" -" \"mat3x2\" .emit TYPE_SPECIFIER_MAT32 .or\n" -" \"mat2x4\" .emit TYPE_SPECIFIER_MAT24 .or\n" -" \"mat4x2\" .emit TYPE_SPECIFIER_MAT42 .or\n" -" \"mat3x4\" .emit TYPE_SPECIFIER_MAT34 .or\n" -" \"mat4x3\" .emit TYPE_SPECIFIER_MAT43 .or\n" -" \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n" -" \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n" -" \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n" -" \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n" -" \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n" -" \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n" -" \"sampler2DRect\" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or\n" -" \"sampler2DRectShadow\" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW .or\n" -" type_name .emit TYPE_SPECIFIER_TYPENAME;\n" -"type_specifier_nonarray_nospace\n" -" struct_specifier .emit TYPE_SPECIFIER_STRUCT;\n" -"type_specifier_nonarray\n" -" type_specifier_nonarray_nospace .or type_specifier_nonarray_space;\n" -"type_specifier_space\n" -" type_specifier_nonarray_space .and .true .emit TYPE_SPECIFIER_NONARRAY;\n" -"type_specifier_nospace\n" -" type_specifier_nospace_array .or type_specifier_nospace_1;\n" -"type_specifier_nospace_1\n" -" type_specifier_nonarray_nospace .and .true .emit TYPE_SPECIFIER_NONARRAY;\n" -"type_specifier_nospace_array\n" -" type_specifier_nonarray .and lbracket .emit TYPE_SPECIFIER_ARRAY .and constant_expression .and rbracket;\n" -"struct_specifier\n" -" \"struct\" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and\n" -" struct_declaration_list .and rbrace .emit FIELD_NONE;\n" -"struct_specifier_1\n" -" struct_specifier_2 .or .true .emit '\\0';\n" -"struct_specifier_2\n" -" space .and identifier;\n" -"struct_declaration_list\n" -" struct_declaration .and .loop struct_declaration .emit FIELD_NEXT;\n" -"struct_declaration\n" -" struct_declaration_nospace .or struct_declaration_space;\n" -"struct_declaration_space\n" -" type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n" -"struct_declaration_nospace\n" -" type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n" -"struct_declarator_list\n" -" struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT;\n" -"struct_declarator_list_1\n" -" comma .and struct_declarator;\n" -"struct_declarator\n" -" identifier .and struct_declarator_1;\n" -"struct_declarator_1\n" -" struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE;\n" -"struct_declarator_2\n" -" lbracket .and constant_expression .and rbracket;\n" -"initializer\n" -" assignment_expression .and .true .emit OP_END;\n" -"declaration_statement\n" -" declaration;\n" -"statement\n" -" compound_statement .or simple_statement;\n" -"statement_space\n" -" compound_statement .or statement_space_1;\n" -"statement_space_1\n" -" space .and simple_statement;\n" -"simple_statement\n" -" .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or\n" -" selection_statement .or\n" -" iteration_statement .or\n" -" precision_stmt .emit OP_PRECISION .or\n" -" jump_statement .or\n" -" expression_statement .emit OP_EXPRESSION .or\n" -" declaration_statement .emit OP_DECLARE;\n" -"compound_statement\n" -" compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END;\n" -"compound_statement_1\n" -" compound_statement_2 .or compound_statement_3;\n" -"compound_statement_2\n" -" lbrace .and rbrace;\n" -"compound_statement_3\n" -" lbrace .and statement_list .and rbrace;\n" -"compound_statement_no_new_scope\n" -" compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;\n" -"compound_statement_no_new_scope_1\n" -" compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3;\n" -"compound_statement_no_new_scope_2\n" -" lbrace .and rbrace;\n" -"compound_statement_no_new_scope_3\n" -" lbrace .and statement_list .and rbrace;\n" -"statement_list\n" -" statement .and .loop statement;\n" -"expression_statement\n" -" expression_statement_1 .or expression_statement_2;\n" -"expression_statement_1\n" -" semicolon .emit OP_PUSH_VOID .emit OP_END;\n" -"expression_statement_2\n" -" expression .and semicolon .emit OP_END;\n" -"selection_statement\n" -" \"if\" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and\n" -" rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement;\n" -"selection_rest_statement\n" -" statement .and selection_rest_statement_1;\n" -"selection_rest_statement_1\n" -" selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END;\n" -"selection_rest_statement_2\n" -" \"else\" .and optional_space .and statement;\n" -"condition\n" -" condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or\n" -" condition_3 .emit OP_EXPRESSION;\n" -"condition_1\n" -" condition_1_nospace .or condition_1_space;\n" -"condition_1_nospace\n" -" fully_specified_type_nospace .and condition_2;\n" -"condition_1_space\n" -" fully_specified_type_space .and space .and condition_2;\n" -"condition_2\n" -" identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and\n" -" initializer .and .true .emit DECLARATOR_NONE;\n" -"condition_3\n" -" expression .and .true .emit OP_END;\n" -"iteration_statement\n" -" iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;\n" -"iteration_statement_1\n" -" \"while\" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and\n" -" rparen .error RPAREN_EXPECTED .and statement;\n" -"iteration_statement_2\n" -" \"do\" .emit OP_DO .and statement_space .and \"while\" .and lparen .error LPAREN_EXPECTED .and\n" -" expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n" -"iteration_statement_3\n" -" \"for\" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and\n" -" for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement;\n" -"for_init_statement\n" -" expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;\n" -"conditionopt\n" -" condition .or\n" -" .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\\0' .emit OP_END;\n" -"for_rest_statement\n" -" conditionopt .and semicolon .and for_rest_statement_1;\n" -"for_rest_statement_1\n" -" for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END;\n" -"for_rest_statement_2\n" -" expression .and .true .emit OP_END;\n" -"jump_statement\n" -" jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or\n" -" .if (shader_type == 1) jump_statement_5;\n" -"jump_statement_1\n" -" \"continue\" .and semicolon .emit OP_CONTINUE;\n" -"jump_statement_2\n" -" \"break\" .and semicolon .emit OP_BREAK;\n" -"jump_statement_3\n" -" \"return\" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END;\n" -"jump_statement_4\n" -" \"return\" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END;\n" -"jump_statement_5\n" -" \"discard\" .and semicolon .emit OP_DISCARD;\n" -"__asm_statement\n" -" \"__asm\" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END;\n" -"asm_arguments\n" -" asm_argument .and .true .emit OP_END .and .loop asm_arguments_1;\n" -"asm_arguments_1\n" -" comma .and asm_argument .and .true .emit OP_END;\n" -"asm_argument\n" -" var_with_field .or\n" -" variable_identifier .or\n" -" floatconstant;\n" -"var_with_field\n" -" variable_identifier .and dot .and field_selection .emit OP_FIELD;\n" -"translation_unit\n" -" optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and\n" -" .loop external_declaration .and optional_space .and\n" -" '\\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;\n" -"external_declaration\n" -" precision_stmt .emit DEFAULT_PRECISION .or\n" -" function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or\n" -" invariant_stmt .emit INVARIANT_STMT .or\n" -" declaration .emit EXTERNAL_DECLARATION;\n" -"precision_stmt\n" -" \"precision\" .and space .and precision .error INVALID_PRECISION .and space .and prectype .error INVALID_PRECISION_TYPE .and semicolon;\n" -"precision\n" -" \"lowp\" .emit PRECISION_LOW .or\n" -" \"mediump\" .emit PRECISION_MEDIUM .or\n" -" \"highp\" .emit PRECISION_HIGH;\n" -"prectype\n" -" \"int\" .emit TYPE_SPECIFIER_INT .or\n" -" \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n" -" \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n" -" \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n" -" \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n" -" \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n" -" \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n" -" \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n" -" \"sampler2DRect\" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or\n" -" \"sampler2DRectShadow\" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW;\n" -"invariant_stmt\n" -" \"invariant\" .and space .and identifier .and semicolon;\n" -"function_definition\n" -" function_prototype .and compound_statement_no_new_scope;\n" -"digit_oct\n" -" '0'-'7';\n" -"digit_dec\n" -" '0'-'9';\n" -"digit_hex\n" -" '0'-'9' .or 'A'-'F' .or 'a'-'f';\n" -"id_character_first\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"id_character_next\n" -" id_character_first .or digit_dec;\n" -"identifier\n" -" id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\\0';\n" -"float\n" -" float_1 .or float_2 .or float_3;\n" -"float_1\n" -" float_fractional_constant .and float_optional_exponent_part .and optional_f_suffix;\n" -"float_2\n" -" float_digit_sequence .and .true .emit '\\0' .and float_exponent_part .and optional_f_suffix;\n" -"float_3\n" -" float_digit_sequence .and .true .emit '\\0' .and 'f' .emit '\\0';\n" -"float_fractional_constant\n" -" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n" -"float_fractional_constant_1\n" -" float_digit_sequence .and '.' .and float_digit_sequence;\n" -"float_fractional_constant_2\n" -" float_digit_sequence .and '.' .and .true .emit '\\0';\n" -"float_fractional_constant_3\n" -" '.' .emit '\\0' .and float_digit_sequence;\n" -"float_optional_exponent_part\n" -" float_exponent_part .or .true .emit '\\0';\n" -"float_digit_sequence\n" -" digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" -"float_exponent_part\n" -" float_exponent_part_1 .or float_exponent_part_2;\n" -"float_exponent_part_1\n" -" 'e' .and float_optional_sign .and float_digit_sequence;\n" -"float_exponent_part_2\n" -" 'E' .and float_optional_sign .and float_digit_sequence;\n" -"float_optional_sign\n" -" float_sign .or .true;\n" -"float_sign\n" -" '+' .or '-' .emit '-';\n" -"optional_f_suffix\n" -" 'f' .or .true;\n" -"integer\n" -" integer_hex .or integer_oct .or integer_dec;\n" -"integer_hex\n" -" '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and\n" -" .true .emit '\\0';\n" -"integer_hex_1\n" -" 'x' .or 'X';\n" -"integer_oct\n" -" '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\\0';\n" -"integer_dec\n" -" digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n" -"boolean\n" -" \"true\" .emit 2 .emit '1' .emit '\\0' .or\n" -" \"false\" .emit 2 .emit '0' .emit '\\0';\n" -"type_name\n" -" identifier;\n" -"field_selection\n" -" identifier;\n" -"floatconstant\n" -" float .emit OP_PUSH_FLOAT;\n" -"intconstant\n" -" integer .emit OP_PUSH_INT;\n" -"boolconstant\n" -" boolean .emit OP_PUSH_BOOL;\n" -"optional_space\n" -" .loop single_space;\n" -"space\n" -" single_space .and .loop single_space;\n" -"single_space\n" -" white_char .or c_style_comment_block .or cpp_style_comment_block;\n" -"white_char\n" -" ' ' .or '\\t' .or new_line .or '\\v' .or '\\f';\n" -"new_line\n" -" cr_lf .or lf_cr .or '\\n' .or '\\r';\n" -"cr_lf\n" -" '\\r' .and '\\n';\n" -"lf_cr\n" -" '\\n' .and '\\r';\n" -"c_style_comment_block\n" -" '/' .and '*' .and c_style_comment_rest;\n" -"c_style_comment_rest\n" -" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n" -"c_style_comment_rest_1\n" -" c_style_comment_end .or c_style_comment_rest_2;\n" -"c_style_comment_rest_2\n" -" '*' .and c_style_comment_rest;\n" -"c_style_comment_char_no_star\n" -" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n" -"c_style_comment_end\n" -" '*' .and '/';\n" -"cpp_style_comment_block\n" -" '/' .and '/' .and cpp_style_comment_block_1;\n" -"cpp_style_comment_block_1\n" -" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n" -"cpp_style_comment_block_2\n" -" .loop cpp_style_comment_char .and new_line;\n" -"cpp_style_comment_block_3\n" -" .loop cpp_style_comment_char;\n" -"cpp_style_comment_char\n" -" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n" -"ampersandampersand\n" -" optional_space .and '&' .and '&' .and optional_space;\n" -"barbar\n" -" optional_space .and '|' .and '|' .and optional_space;\n" -"bang\n" -" optional_space .and '!' .and optional_space;\n" -"bangequals\n" -" optional_space .and '!' .and '=' .and optional_space;\n" -"caretcaret\n" -" optional_space .and '^' .and '^' .and optional_space;\n" -"colon\n" -" optional_space .and ':' .and optional_space;\n" -"comma\n" -" optional_space .and ',' .and optional_space;\n" -"dot\n" -" optional_space .and '.' .and optional_space;\n" -"equals\n" -" optional_space .and '=' .and optional_space;\n" -"equalsequals\n" -" optional_space .and '=' .and '=' .and optional_space;\n" -"greater\n" -" optional_space .and '>' .and optional_space;\n" -"greaterequals\n" -" optional_space .and '>' .and '=' .and optional_space;\n" -"lbrace\n" -" optional_space .and '{' .and optional_space;\n" -"lbracket\n" -" optional_space .and '[' .and optional_space;\n" -"less\n" -" optional_space .and '<' .and optional_space;\n" -"lessequals\n" -" optional_space .and '<' .and '=' .and optional_space;\n" -"lparen\n" -" optional_space .and '(' .and optional_space;\n" -"minus\n" -" optional_space .and '-' .and optional_space;\n" -"minusequals\n" -" optional_space .and '-' .and '=' .and optional_space;\n" -"minusminus\n" -" optional_space .and '-' .and '-' .and optional_space;\n" -"plus\n" -" optional_space .and '+' .and optional_space;\n" -"plusequals\n" -" optional_space .and '+' .and '=' .and optional_space;\n" -"plusplus\n" -" optional_space .and '+' .and '+' .and optional_space;\n" -"question\n" -" optional_space .and '?' .and optional_space;\n" -"rbrace\n" -" optional_space .and '}' .and optional_space;\n" -"rbracket\n" -" optional_space .and ']' .and optional_space;\n" -"rparen\n" -" optional_space .and ')' .and optional_space;\n" -"semicolon\n" -" optional_space .and ';' .and optional_space;\n" -"slash\n" -" optional_space .and '/' .and optional_space;\n" -"slashequals\n" -" optional_space .and '/' .and '=' .and optional_space;\n" -"star\n" -" optional_space .and '*' .and optional_space;\n" -"starequals\n" -" optional_space .and '*' .and '=' .and optional_space;\n" -".string string_lexer;\n" -"string_lexer\n" -" lex_first_identifier_character .and .loop lex_next_identifier_character;\n" -"lex_first_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '_';\n" -"lex_next_identifier_character\n" -" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n" -"err_token\n" -" '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or\n" -" '-' .or '+' .or '=' .or '|' .or '\\\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '\"' .or\n" -" '\\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;\n" -"err_identifier\n" -" id_character_first .and .loop id_character_next;\n" -"" diff --git a/mesalib/src/mesa/shader/slang/library/slang_version.syn b/mesalib/src/mesa/shader/slang/library/slang_version.syn deleted file mode 100644 index aaf8bef34..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_version.syn +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 2005 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/** - * \file slang_version.syn - * slang #version directive syntax - * \author Michal Krol - */ - -.syntax version_directive; - -version_directive - version_directive_1 .and .loop version_directive_2; -version_directive_1 - prior_optional_spaces .and optional_version_directive .and .true .emit $; -version_directive_2 - prior_optional_spaces .and version_directive_body .and .true .emit $; - -optional_version_directive - version_directive_body .or .true .emit 10 .emit 1; - -version_directive_body - '#' .and optional_space .and "version" .and space .and version_number .and optional_space .and - new_line; - -version_number - version_number_110; - -version_number_110 - leading_zeroes .and "110" .emit 10 .emit 1; - -leading_zeroes - .loop zero; - -zero - '0'; - -space - single_space .and .loop single_space; - -optional_space - .loop single_space; - -single_space - ' ' .or '\t'; - -prior_optional_spaces - .loop prior_space; - -prior_space - c_style_comment_block .or cpp_style_comment_block .or space .or new_line; - -c_style_comment_block - '/' .and '*' .and c_style_comment_rest; - -c_style_comment_rest - .loop c_style_comment_char_no_star .and c_style_comment_rest_1; -c_style_comment_rest_1 - c_style_comment_end .or c_style_comment_rest_2; -c_style_comment_rest_2 - '*' .and c_style_comment_rest; - -c_style_comment_char_no_star - '\x2B'-'\xFF' .or '\x01'-'\x29'; - -c_style_comment_end - '*' .and '/'; - -cpp_style_comment_block - '/' .and '/' .and cpp_style_comment_block_1; -cpp_style_comment_block_1 - cpp_style_comment_block_2 .or cpp_style_comment_block_3; -cpp_style_comment_block_2 - .loop cpp_style_comment_char .and new_line; -cpp_style_comment_block_3 - .loop cpp_style_comment_char; - -cpp_style_comment_char - '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C'; - -new_line - cr_lf .or lf_cr .or '\n' .or '\r'; - -cr_lf - '\r' .and '\n'; - -lf_cr - '\n' .and '\r'; - -.string __string_filter; - -__string_filter - .loop __identifier_char; - -__identifier_char - 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9'; - diff --git a/mesalib/src/mesa/shader/slang/library/slang_vertex_builtin.gc b/mesalib/src/mesa/shader/slang/library/slang_vertex_builtin.gc index 9ad5f3542..0c67c2ef2 100644 --- a/mesalib/src/mesa/shader/slang/library/slang_vertex_builtin.gc +++ b/mesalib/src/mesa/shader/slang/library/slang_vertex_builtin.gc @@ -188,3 +188,23 @@ vec4 shadow2DProjLod(const sampler2DShadow sampler, const vec4 coord, __asm vec4_tex_2d_bias_shadow __retVal, sampler, pcoord; } + +//// GL_EXT_texture_array + +vec4 texture1DArrayLod(const sampler1DArray sampler, const vec2 coord, const float lod) +{ + vec4 coord4; + coord4.xy = coord; + coord4.w = lod; + __asm vec4_tex_1d_array_bias __retVal, sampler, coord4; +} + + +vec4 texture2DArrayLod(const sampler2DArray sampler, const vec3 coord, const float lod) +{ + vec4 coord4; + coord4.xyz = coord; + coord4.w = lod; + __asm vec4_tex_2d_array_bias __retVal, sampler, coord4; +} + diff --git a/mesalib/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h b/mesalib/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h deleted file mode 100644 index e5a252b01..000000000 --- a/mesalib/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h +++ /dev/null @@ -1,109 +0,0 @@ - -/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */ -/* slang_vertex_builtin.gc */ - -5,2,2,90,95,5,0,12,0,1,103,108,95,80,111,115,105,116,105,111,110,0,0,0,2,2,90,95,5,0,9,0,1,103,108, -95,80,111,105,110,116,83,105,122,101,0,0,0,2,2,90,95,5,0,12,0,1,103,108,95,67,108,105,112,86,101, -114,116,101,120,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,67,111,108,111,114,0,0,0,2,2,90,95,2,0,12,0, -1,103,108,95,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,2,0,11,0,1,103, -108,95,78,111,114,109,97,108,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,86,101,114,116,101,120,0,0,0,2, -2,90,95,2,0,12,0,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,48,0,0,0,2,2,90,95, -2,0,12,0,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,49,0,0,0,2,2,90,95,2,0,12,0, -1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,50,0,0,0,2,2,90,95,2,0,12,0,1,103, -108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,51,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95, -77,117,108,116,105,84,101,120,67,111,111,114,100,52,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,77,117, -108,116,105,84,101,120,67,111,111,114,100,53,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,77,117,108,116, -105,84,101,120,67,111,111,114,100,54,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,77,117,108,116,105,84, -101,120,67,111,111,114,100,55,0,0,0,2,2,90,95,2,0,9,0,1,103,108,95,70,111,103,67,111,111,114,100,0, -0,0,2,2,90,95,3,0,12,0,1,103,108,95,70,114,111,110,116,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0, -1,103,108,95,66,97,99,107,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,1,103,108,95,70,114,111,110, -116,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,1,103,108,95,66, -97,99,107,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,1,103,108, -95,84,101,120,67,111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111, -114,100,115,0,0,0,2,2,90,95,3,0,9,0,1,103,108,95,70,111,103,70,114,97,103,67,111,111,114,100,0,0,0, -1,90,95,0,0,12,0,0,102,116,114,97,110,115,102,111,114,109,0,0,1,9,18,95,95,114,101,116,86,97,108,0, -18,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116, -114,105,120,0,16,8,48,0,57,18,103,108,95,86,101,114,116,101,120,0,59,120,120,120,120,0,48,18,103, -108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105, -120,0,16,10,49,0,57,18,103,108,95,86,101,114,116,101,120,0,59,121,121,121,121,0,48,46,18,103,108, -95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0, -16,10,50,0,57,18,103,108,95,86,101,114,116,101,120,0,59,122,122,122,122,0,48,46,18,103,108,95,77, -111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,16,10, -51,0,57,18,103,108,95,86,101,114,116,101,120,0,59,119,119,119,119,0,48,46,20,0,0,1,90,95,0,0,12,0, -0,116,101,120,116,117,114,101,49,68,76,111,100,0,1,1,0,0,16,0,115,97,109,112,108,101,114,0,0,1,1,0, -0,9,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114, -100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111, -114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97, -115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100, -52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,0,1,1,0, -0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100, -0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0, -18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,121,0,49,20,0,9,18,112,99,111,111,114, -100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,0, -18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0, -0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,0,1,1,0,0,16,0, -115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1, -3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111, -111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114,100,0,59, -119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,0,18,95,95, -114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90, -95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,76,111,100,0,1,1,0,0,17,0,115,97,109,112,108,101, -114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1, -99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59, -120,121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116, -101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80, -114,111,106,76,111,100,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114, -100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112, -99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59, -122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116, -101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80, -114,111,106,76,111,100,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114, -100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112, -99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59, -122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116, -101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101, -114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,76, -111,100,0,1,1,0,0,18,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0, -9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100, -52,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121,122,0,20,0,9,18,99,111,111,114,100,52,0, -59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,0,18,95, -95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1, -90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,80,114,111,106,76,111,100,0,1,1,0,0,18,0,115,97, -109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90, -95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99, -111,111,114,100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111, -114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115, -0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0, -0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,67,117,98,101,76,111,100,0,1,1,0,0,19,0,115, -97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2, -90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99, -111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52, -95,116,101,120,95,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114, -0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,76,111,100,0, -1,1,0,0,20,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108, -111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59, -120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0, -20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95, -95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1, -90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,80,114,111,106,76,111,100,0,1,1,0,0,20,0,115,97,109, -112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95, -0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111,111,114, -100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18, -99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4, -118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114, -101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95, -0,0,12,0,0,115,104,97,100,111,119,50,68,76,111,100,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,0,1, -1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111, -114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20,0,9,18, -99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,50,100,95, -98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108, -101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,50,68,80, -114,111,106,76,111,100,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114, -100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112, -99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59, -119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18, -112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,50,100, -95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112, -108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,0 diff --git a/mesalib/src/mesa/shader/slang/library/syn_to_c.c b/mesalib/src/mesa/shader/slang/library/syn_to_c.c deleted file mode 100644 index f997edfd8..000000000 --- a/mesalib/src/mesa/shader/slang/library/syn_to_c.c +++ /dev/null @@ -1,72 +0,0 @@ -#include - -static int was_space = 0; -static int first_char = 1; - -static void put_char (int c) -{ - if (c == '\n') { - if (!first_char) { - fputs ("\\n\"\n\"", stdout); - first_char = 1; - } - } - else { - first_char = 0; - if (c == '\\') - fputs ("\\\\", stdout); - else if (c == '\"') - fputs ("\\\"", stdout); - else if (!was_space || !(c == ' ' || c == '\t')) - fputc (c, stdout); - was_space = (c == ' ' || c == '\t'); - } -} - -int main (int argc, char *argv[]) -{ - int c; - FILE *f; - - if (argc == 1) - return 1; - f = fopen (argv[1], "r"); - if (f == NULL) - return 1; - - fputs ("\n", stdout); - fputs ("/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */\n", stdout); - fputs ("\n", stdout); - fputs ("\"", stdout); - c = getc (f); - while (c != EOF) { - if (c == '/') { - int c2 = getc (f); - if (c2 == '*') { - was_space = 0; - c = getc (f); - for (;;) { - if (c == '*') { - c2 = getc (f); - if (c2 == '/') - break; - } - c = getc (f); - } - } - else { - put_char (c); - put_char (c2); - } - } - else { - put_char (c); - } - c = getc (f); - } - fputs ("\"\n", stdout); - - fclose (f); - return 0; -} - diff --git a/mesalib/src/mesa/shader/slang/slang_builtin.c b/mesalib/src/mesa/shader/slang/slang_builtin.c index e5809509c..791e75152 100644 --- a/mesalib/src/mesa/shader/slang/slang_builtin.c +++ b/mesalib/src/mesa/shader/slang/slang_builtin.c @@ -36,7 +36,6 @@ #include "shader/prog_parameter.h" #include "shader/prog_statevars.h" #include "shader/slang/slang_ir.h" -#include "shader/slang/slang_emit.h" #include "shader/slang/slang_builtin.h" @@ -122,6 +121,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, } else if (strcmp(var, "gl_DepthRange") == 0) { tokens[0] = STATE_DEPTH_RANGE; + assert(field); if (strcmp(field, "near") == 0) { *swizzleOut = SWIZZLE_XXXX; } @@ -142,6 +142,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[1] = index1; } else if (strcmp(var, "gl_Point") == 0) { + assert(field); if (strcmp(field, "size") == 0) { tokens[0] = STATE_POINT_SIZE; *swizzleOut = SWIZZLE_XXXX; @@ -181,6 +182,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[1] = 0; else tokens[1] = 1; + assert(field); if (strcmp(field, "emission") == 0) { tokens[2] = STATE_EMISSION; } diff --git a/mesalib/src/mesa/shader/slang/slang_codegen.c b/mesalib/src/mesa/shader/slang/slang_codegen.c index ee5a50ca8..ecb2f6d5c 100644 --- a/mesalib/src/mesa/shader/slang/slang_codegen.c +++ b/mesalib/src/mesa/shader/slang/slang_codegen.c @@ -100,14 +100,18 @@ static GLboolean is_sampler_type(const slang_fully_specified_type *t) { switch (t->specifier.type) { - case SLANG_SPEC_SAMPLER1D: - case SLANG_SPEC_SAMPLER2D: - case SLANG_SPEC_SAMPLER3D: - case SLANG_SPEC_SAMPLERCUBE: - case SLANG_SPEC_SAMPLER1DSHADOW: - case SLANG_SPEC_SAMPLER2DSHADOW: - case SLANG_SPEC_SAMPLER2DRECT: - case SLANG_SPEC_SAMPLER2DRECTSHADOW: + case SLANG_SPEC_SAMPLER_1D: + case SLANG_SPEC_SAMPLER_2D: + case SLANG_SPEC_SAMPLER_3D: + case SLANG_SPEC_SAMPLER_CUBE: + case SLANG_SPEC_SAMPLER_1D_SHADOW: + case SLANG_SPEC_SAMPLER_2D_SHADOW: + case SLANG_SPEC_SAMPLER_RECT: + case SLANG_SPEC_SAMPLER_RECT_SHADOW: + case SLANG_SPEC_SAMPLER_1D_ARRAY: + case SLANG_SPEC_SAMPLER_2D_ARRAY: + case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW: + case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW: return GL_TRUE; default: return GL_FALSE; @@ -222,14 +226,18 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec) case SLANG_SPEC_MAT43: sz = 4 * 4; /* 4 columns (regs) */ break; - case SLANG_SPEC_SAMPLER1D: - case SLANG_SPEC_SAMPLER2D: - case SLANG_SPEC_SAMPLER3D: - case SLANG_SPEC_SAMPLERCUBE: - case SLANG_SPEC_SAMPLER1DSHADOW: - case SLANG_SPEC_SAMPLER2DSHADOW: - case SLANG_SPEC_SAMPLER2DRECT: - case SLANG_SPEC_SAMPLER2DRECTSHADOW: + case SLANG_SPEC_SAMPLER_1D: + case SLANG_SPEC_SAMPLER_2D: + case SLANG_SPEC_SAMPLER_3D: + case SLANG_SPEC_SAMPLER_CUBE: + case SLANG_SPEC_SAMPLER_1D_SHADOW: + case SLANG_SPEC_SAMPLER_2D_SHADOW: + case SLANG_SPEC_SAMPLER_RECT: + case SLANG_SPEC_SAMPLER_RECT_SHADOW: + case SLANG_SPEC_SAMPLER_1D_ARRAY: + case SLANG_SPEC_SAMPLER_2D_ARRAY: + case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW: + case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW: sz = 1; /* a sampler is basically just an integer index */ break; case SLANG_SPEC_STRUCT: @@ -310,22 +318,30 @@ static GLint sampler_to_texture_index(const slang_type_specifier_type type) { switch (type) { - case SLANG_SPEC_SAMPLER1D: + case SLANG_SPEC_SAMPLER_1D: return TEXTURE_1D_INDEX; - case SLANG_SPEC_SAMPLER2D: + case SLANG_SPEC_SAMPLER_2D: return TEXTURE_2D_INDEX; - case SLANG_SPEC_SAMPLER3D: + case SLANG_SPEC_SAMPLER_3D: return TEXTURE_3D_INDEX; - case SLANG_SPEC_SAMPLERCUBE: + case SLANG_SPEC_SAMPLER_CUBE: return TEXTURE_CUBE_INDEX; - case SLANG_SPEC_SAMPLER1DSHADOW: + case SLANG_SPEC_SAMPLER_1D_SHADOW: return TEXTURE_1D_INDEX; /* XXX fix */ - case SLANG_SPEC_SAMPLER2DSHADOW: + case SLANG_SPEC_SAMPLER_2D_SHADOW: return TEXTURE_2D_INDEX; /* XXX fix */ - case SLANG_SPEC_SAMPLER2DRECT: + case SLANG_SPEC_SAMPLER_RECT: return TEXTURE_RECT_INDEX; - case SLANG_SPEC_SAMPLER2DRECTSHADOW: + case SLANG_SPEC_SAMPLER_RECT_SHADOW: return TEXTURE_RECT_INDEX; /* XXX fix */ + case SLANG_SPEC_SAMPLER_1D_ARRAY: + return TEXTURE_1D_ARRAY_INDEX; + case SLANG_SPEC_SAMPLER_2D_ARRAY: + return TEXTURE_2D_ARRAY_INDEX; + case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW: + return TEXTURE_1D_ARRAY_INDEX; + case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW: + return TEXTURE_2D_ARRAY_INDEX; default: return -1; } @@ -453,6 +469,14 @@ static slang_asm_info AsmInfo[] = { { "vec4_tex_cube", IR_TEX, 1, 2 }, /* cubemap */ { "vec4_tex_rect", IR_TEX, 1, 2 }, /* rectangle */ { "vec4_tex_rect_bias", IR_TEX, 1, 2 }, /* rectangle w/ projection */ + { "vec4_tex_1d_array", IR_TEX, 1, 2 }, + { "vec4_tex_1d_array_bias", IR_TEXB, 1, 2 }, + { "vec4_tex_1d_array_shadow", IR_TEX, 1, 2 }, + { "vec4_tex_1d_array_bias_shadow", IR_TEXB, 1, 2 }, + { "vec4_tex_2d_array", IR_TEX, 1, 2 }, + { "vec4_tex_2d_array_bias", IR_TEXB, 1, 2 }, + { "vec4_tex_2d_array_shadow", IR_TEX, 1, 2 }, + { "vec4_tex_2d_array_bias_shadow", IR_TEXB, 1, 2 }, /* texture / sampler but with shadow comparison */ { "vec4_tex_1d_shadow", IR_TEX_SH, 1, 2 }, @@ -1020,7 +1044,7 @@ slang_substitute(slang_assemble_ctx *A, slang_operation *oper, GLuint i; v = _slang_variable_locate(oper->locals, id, GL_TRUE); if (!v) { - if (_mesa_strcmp((char *) oper->a_id, "__notRetFlag")) + if (strcmp((char *) oper->a_id, "__notRetFlag")) _mesa_problem(NULL, "var %s not found!\n", (char *) oper->a_id); return; } @@ -1658,7 +1682,7 @@ slang_find_asm_info(const char *name) { GLuint i; for (i = 0; AsmInfo[i].Name; i++) { - if (_mesa_strcmp(AsmInfo[i].Name, name) == 0) { + if (strcmp(AsmInfo[i].Name, name) == 0) { return AsmInfo + i; } } @@ -1730,7 +1754,7 @@ swizzle_to_writemask(slang_assemble_ctx *A, GLuint swizzle, /* end */ break; } - assert(swz >= 0 && swz <= 3); + assert(swz <= 3); if (swizzle != SWIZZLE_XXXX && swizzle != SWIZZLE_YYYY && @@ -1870,6 +1894,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, _mesa_problem(NULL, "undefined __asm function %s\n", (char *) oper->a_id); assert(info); + return NULL; } assert(info->NumParams <= 3); @@ -2317,7 +2342,7 @@ _slang_is_vec_mat_type(const char *name) }; int i; for (i = 0; vecmat_types[i]; i++) - if (_mesa_strcmp(name, vecmat_types[i]) == 0) + if (strcmp(name, vecmat_types[i]) == 0) return GL_TRUE; return GL_FALSE; } @@ -3117,7 +3142,7 @@ _slang_can_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) if (start >= end) return GL_FALSE; /* degenerate case */ - if (end - start > MAX_FOR_LOOP_UNROLL_ITERATIONS) { + if ((GLuint)(end - start) > MAX_FOR_LOOP_UNROLL_ITERATIONS) { slang_info_log_print(A->log, "Note: 'for (%s=%d; %s<%d; ++%s)' is too" " many iterations to unroll", @@ -3160,6 +3185,7 @@ _slang_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) varId = oper->children[0].children[0].a_id; var = _slang_variable_locate(oper->children[0].children[0].locals, varId, GL_TRUE); + assert(var); start = (GLint) var->initializer->literal[0]; } else { @@ -3196,7 +3222,7 @@ _slang_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper) newOper = slang_operation_new(1); newOper->type = SLANG_OPER_LITERAL_INT; newOper->literal_size = 1; - newOper->literal[0] = iter; + newOper->literal[0] = (GLfloat) iter; /* replace instances of the loop variable with newOper */ slang_substitute(A, body, 1, &oldVar, &newOper, GL_FALSE); @@ -3639,7 +3665,7 @@ make_constant_array(slang_assemble_ctx *A, assert(initializer->type == SLANG_OPER_CALL); assert(initializer->array_constructor); - values = (GLfloat *) _mesa_malloc(numElements * 4 * sizeof(GLfloat)); + values = (GLfloat *) malloc(numElements * 4 * sizeof(GLfloat)); /* convert constructor params into ordinary floats */ for (i = 0; i < numElements; i++) { @@ -3670,7 +3696,7 @@ make_constant_array(slang_assemble_ctx *A, } assert(var->store->Size == size); - _mesa_free(values); + free(values); return GL_TRUE; } @@ -3763,6 +3789,14 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var, #endif } + if (var->type.qualifier == SLANG_QUAL_UNIFORM && + !A->allow_uniform_initializers) { + slang_info_log_error(A->log, + "initializer for uniform %s not allowed", + varName); + return NULL; + } + /* IR for the variable we're initializing */ varRef = new_var(A, var); if (!varRef) { @@ -4174,7 +4208,7 @@ swizzle_size(GLuint swizzle) GLuint size = 0, i; for (i = 0; i < 4; i++) { GLuint swz = GET_SWZ(swizzle, i); - size += (swz >= 0 && swz <= 3); + size += (swz <= 3); } return size; } @@ -4190,6 +4224,7 @@ _slang_gen_swizzle(slang_ir_node *child, GLuint swizzle) n->Store = _slang_new_ir_storage_relative(0, swizzle_size(swizzle), child->Store); + assert(n->Store); n->Store->Swizzle = swizzle; } return n; @@ -4241,14 +4276,15 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) if (oper->children[0].type == SLANG_OPER_IDENTIFIER) { /* Check that var is writeable */ + const char *varName = (char *) oper->children[0].a_id; slang_variable *var = _slang_variable_locate(oper->children[0].locals, oper->children[0].a_id, GL_TRUE); if (!var) { - slang_info_log_error(A->log, "undefined variable '%s'", - (char *) oper->children[0].a_id); + slang_info_log_error(A->log, "undefined variable '%s'", varName); return NULL; } + if (var->type.qualifier == SLANG_QUAL_CONST || var->type.qualifier == SLANG_QUAL_ATTRIBUTE || var->type.qualifier == SLANG_QUAL_UNIFORM || @@ -4256,7 +4292,7 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) A->program->Target == GL_FRAGMENT_PROGRAM_ARB)) { slang_info_log_error(A->log, "illegal assignment to read-only variable '%s'", - (char *) oper->children[0].a_id); + varName); return NULL; } @@ -4490,7 +4526,6 @@ _slang_gen_array_element(slang_assemble_ctx * A, slang_operation *oper) SWIZZLE_NIL); n = _slang_gen_swizzle(n, swizzle); } - assert(n->Store); return n; } else { @@ -4914,8 +4949,8 @@ is_rect_sampler_spec(const slang_type_specifier *spec) while (spec->_array) { spec = spec->_array; } - return spec->type == SLANG_SPEC_SAMPLER2DRECT || - spec->type == SLANG_SPEC_SAMPLER2DRECTSHADOW; + return spec->type == SLANG_SPEC_SAMPLER_RECT || + spec->type == SLANG_SPEC_SAMPLER_RECT_SHADOW; } @@ -5215,7 +5250,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) slang_ir_node *n; GLboolean success = GL_TRUE; - if (_mesa_strcmp((char *) fun->header.a_name, "main") != 0) { + if (strcmp((char *) fun->header.a_name, "main") != 0) { /* we only really generate code for main, all other functions get * inlined or codegen'd upon an actual call. */ @@ -5312,7 +5347,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun) /* free codegen context */ /* - _mesa_free(A->codegen); + free(A->codegen); */ return success; diff --git a/mesalib/src/mesa/shader/slang/slang_codegen.h b/mesalib/src/mesa/shader/slang/slang_codegen.h index ee3be55a4..461633fe3 100644 --- a/mesalib/src/mesa/shader/slang/slang_codegen.h +++ b/mesalib/src/mesa/shader/slang/slang_codegen.h @@ -42,6 +42,7 @@ typedef struct slang_assemble_ctx_ struct gl_sl_pragmas *pragmas; slang_var_table *vartable; slang_info_log *log; + GLboolean allow_uniform_initializers; /* current loop stack */ const slang_operation *LoopOperStack[MAX_LOOP_DEPTH]; diff --git a/mesalib/src/mesa/shader/slang/slang_compile.c b/mesalib/src/mesa/shader/slang/slang_compile.c index 499e16e2d..ad8667615 100644 --- a/mesalib/src/mesa/shader/slang/slang_compile.c +++ b/mesalib/src/mesa/shader/slang/slang_compile.c @@ -35,19 +35,16 @@ #include "shader/prog_optimize.h" #include "shader/prog_print.h" #include "shader/prog_parameter.h" -#include "shader/grammar/grammar_mesa.h" +#include "../../glsl/pp/sl_pp_public.h" +#include "../../glsl/cl/sl_cl_parse.h" #include "slang_codegen.h" #include "slang_compile.h" -#include "slang_preprocess.h" #include "slang_storage.h" -#include "slang_emit.h" #include "slang_log.h" #include "slang_mem.h" #include "slang_vartable.h" #include "slang_simplify.h" -#include "slang_print.h" - /* * This is a straightforward implementation of the slang front-end * compiler. Lots of error-checking functionality is missing but @@ -58,7 +55,7 @@ /** re-defined below, should be the same though */ -#define TYPE_SPECIFIER_COUNT 32 +#define TYPE_SPECIFIER_COUNT 36 /** @@ -68,7 +65,7 @@ static GLboolean legal_identifier(slang_atom name) { /* "gl_" is a reserved prefix */ - if (_mesa_strncmp((char *) name, "gl_", 3) == 0) { + if (strncmp((char *) name, "gl_", 3) == 0) { return GL_FALSE; } return GL_TRUE; @@ -128,7 +125,7 @@ _slang_code_object_dtr(slang_code_object * self) typedef struct slang_parse_ctx_ { - const byte *I; + const unsigned char *I; slang_info_log *L; int parsing_builtin; GLboolean global_scope; /**< Is object being declared a global? */ @@ -170,7 +167,7 @@ static void parse_identifier_str(slang_parse_ctx * C, char **id) { *id = (char *) C->I; - C->I += _mesa_strlen(*id) + 1; + C->I += strlen(*id) + 1; } static slang_atom @@ -179,27 +176,107 @@ parse_identifier(slang_parse_ctx * C) const char *id; id = (const char *) C->I; - C->I += _mesa_strlen(id) + 1; + C->I += strlen(id) + 1; return slang_atom_pool_atom(C->atoms, id); } +static int +is_hex_digit(char c) +{ + return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); +} + +static int +parse_general_number(slang_parse_ctx *ctx, float *number) +{ + char *flt = NULL; + + if (*ctx->I == '0') { + int value = 0; + const unsigned char *pi; + + if (ctx->I[1] == 'x' || ctx->I[1] == 'X') { + ctx->I += 2; + if (!is_hex_digit(*ctx->I)) { + return 0; + } + do { + int digit; + + if (*ctx->I >= '0' && *ctx->I <= '9') { + digit = (int)(*ctx->I - '0'); + } else if (*ctx->I >= 'a' && *ctx->I <= 'f') { + digit = (int)(*ctx->I - 'a') + 10; + } else { + digit = (int)(*ctx->I - 'A') + 10; + } + value = value * 0x10 + digit; + ctx->I++; + } while (is_hex_digit(*ctx->I)); + if (*ctx->I != '\0') { + return 0; + } + ctx->I++; + *number = (float)value; + return 1; + } + + pi = ctx->I; + pi++; + while (*pi >= '0' && *pi <= '7') { + int digit; + + digit = (int)(*pi - '0'); + value = value * 010 + digit; + pi++; + } + if (*pi == '\0') { + pi++; + ctx->I = pi; + *number = (float)value; + return 1; + } + } + + parse_identifier_str(ctx, &flt); + flt = _mesa_strdup(flt); + if (!flt) { + return 0; + } + if (flt[strlen(flt) - 1] == 'f' || flt[strlen(flt) - 1] == 'F') { + flt[strlen(flt) - 1] = '\0'; + } + *number = _mesa_strtof(flt, (char **)NULL); + free(flt); + + return 1; +} + static int parse_number(slang_parse_ctx * C, int *number) { const int radix = (int) (*C->I++); - *number = 0; - while (*C->I != '\0') { - int digit; - if (*C->I >= '0' && *C->I <= '9') - digit = (int) (*C->I - '0'); - else if (*C->I >= 'A' && *C->I <= 'Z') - digit = (int) (*C->I - 'A') + 10; - else - digit = (int) (*C->I - 'a') + 10; - *number = *number * radix + digit; + + if (radix == 1) { + float f = 0.0f; + + parse_general_number(C, &f); + *number = (int)f; + } else { + *number = 0; + while (*C->I != '\0') { + int digit; + if (*C->I >= '0' && *C->I <= '9') + digit = (int) (*C->I - '0'); + else if (*C->I >= 'A' && *C->I <= 'Z') + digit = (int) (*C->I - 'A') + 10; + else + digit = (int) (*C->I - 'a') + 10; + *number = *number * radix + digit; + C->I++; + } C->I++; } - C->I++; if (*number > 65535) slang_info_log_warning(C->L, "%d: literal integer overflow.", *number); return 1; @@ -208,32 +285,37 @@ parse_number(slang_parse_ctx * C, int *number) static int parse_float(slang_parse_ctx * C, float *number) { - char *integral = NULL; - char *fractional = NULL; - char *exponent = NULL; - char *whole = NULL; - - parse_identifier_str(C, &integral); - parse_identifier_str(C, &fractional); - parse_identifier_str(C, &exponent); - - whole = (char *) _slang_alloc((_mesa_strlen(integral) + - _mesa_strlen(fractional) + - _mesa_strlen(exponent) + 3) * sizeof(char)); - if (whole == NULL) { - slang_info_log_memory(C->L); - RETURN0; - } + if (*C->I == 1) { + C->I++; + parse_general_number(C, number); + } else { + char *integral = NULL; + char *fractional = NULL; + char *exponent = NULL; + char *whole = NULL; + + parse_identifier_str(C, &integral); + parse_identifier_str(C, &fractional); + parse_identifier_str(C, &exponent); + + whole = (char *) _slang_alloc((strlen(integral) + + strlen(fractional) + + strlen(exponent) + 3) * sizeof(char)); + if (whole == NULL) { + slang_info_log_memory(C->L); + RETURN0; + } - slang_string_copy(whole, integral); - slang_string_concat(whole, "."); - slang_string_concat(whole, fractional); - slang_string_concat(whole, "E"); - slang_string_concat(whole, exponent); + slang_string_copy(whole, integral); + slang_string_concat(whole, "."); + slang_string_concat(whole, fractional); + slang_string_concat(whole, "E"); + slang_string_concat(whole, exponent); - *number = (float) (_mesa_strtod(whole, (char **) NULL)); + *number = _mesa_strtof(whole, (char **) NULL); - _slang_free(whole); + _slang_free(whole); + } return 1; } @@ -554,6 +636,38 @@ parse_type_centroid(slang_parse_ctx * C, slang_type_centroid *centroid) } +/* Layout qualifiers */ +#define LAYOUT_QUALIFIER_NONE 0 +#define LAYOUT_QUALIFIER_UPPER_LEFT 1 +#define LAYOUT_QUALIFIER_PIXEL_CENTER_INTEGER 2 + +static int +parse_layout_qualifiers(slang_parse_ctx * C, slang_layout_qualifier *layout) +{ + *layout = 0x0; + + /* the layout qualifiers come as a list of LAYOUT_QUALIFER_x tokens, + * terminated by LAYOUT_QUALIFIER_NONE. + */ + while (1) { + GLuint c = *C->I++; + switch (c) { + case LAYOUT_QUALIFIER_NONE: + /* end of list of qualifiers */ + return 1; + case LAYOUT_QUALIFIER_UPPER_LEFT: + *layout |= SLANG_LAYOUT_UPPER_LEFT_BIT; + break; + case LAYOUT_QUALIFIER_PIXEL_CENTER_INTEGER: + *layout |= SLANG_LAYOUT_PIXEL_CENTER_INTEGER_BIT; + break; + default: + assert(0 && "Bad layout qualifier"); + } + } +} + + /* type qualifier */ #define TYPE_QUALIFIER_NONE 0 #define TYPE_QUALIFIER_CONST 1 @@ -628,13 +742,18 @@ parse_type_qualifier(slang_parse_ctx * C, slang_type_qualifier * qual) #define TYPE_SPECIFIER_MAT42 29 #define TYPE_SPECIFIER_MAT34 30 #define TYPE_SPECIFIER_MAT43 31 -#define TYPE_SPECIFIER_COUNT 32 +#define TYPE_SPECIFIER_SAMPLER_1D_ARRAY 32 +#define TYPE_SPECIFIER_SAMPLER_2D_ARRAY 33 +#define TYPE_SPECIFIER_SAMPLER_1D_ARRAY_SHADOW 34 +#define TYPE_SPECIFIER_SAMPLER_2D_ARRAY_SHADOW 35 +#define TYPE_SPECIFIER_COUNT 36 static int parse_type_specifier(slang_parse_ctx * C, slang_output_ctx * O, slang_type_specifier * spec) { - switch (*C->I++) { + int type = *C->I++; + switch (type) { case TYPE_SPECIFIER_VOID: spec->type = SLANG_SPEC_VOID; break; @@ -702,28 +821,40 @@ parse_type_specifier(slang_parse_ctx * C, slang_output_ctx * O, spec->type = SLANG_SPEC_MAT43; break; case TYPE_SPECIFIER_SAMPLER1D: - spec->type = SLANG_SPEC_SAMPLER1D; + spec->type = SLANG_SPEC_SAMPLER_1D; break; case TYPE_SPECIFIER_SAMPLER2D: - spec->type = SLANG_SPEC_SAMPLER2D; + spec->type = SLANG_SPEC_SAMPLER_2D; break; case TYPE_SPECIFIER_SAMPLER3D: - spec->type = SLANG_SPEC_SAMPLER3D; + spec->type = SLANG_SPEC_SAMPLER_3D; break; case TYPE_SPECIFIER_SAMPLERCUBE: - spec->type = SLANG_SPEC_SAMPLERCUBE; + spec->type = SLANG_SPEC_SAMPLER_CUBE; break; case TYPE_SPECIFIER_SAMPLER2DRECT: - spec->type = SLANG_SPEC_SAMPLER2DRECT; + spec->type = SLANG_SPEC_SAMPLER_RECT; break; case TYPE_SPECIFIER_SAMPLER1DSHADOW: - spec->type = SLANG_SPEC_SAMPLER1DSHADOW; + spec->type = SLANG_SPEC_SAMPLER_1D_SHADOW; break; case TYPE_SPECIFIER_SAMPLER2DSHADOW: - spec->type = SLANG_SPEC_SAMPLER2DSHADOW; + spec->type = SLANG_SPEC_SAMPLER_2D_SHADOW; break; case TYPE_SPECIFIER_SAMPLER2DRECTSHADOW: - spec->type = SLANG_SPEC_SAMPLER2DRECTSHADOW; + spec->type = SLANG_SPEC_SAMPLER_RECT_SHADOW; + break; + case TYPE_SPECIFIER_SAMPLER_1D_ARRAY: + spec->type = SLANG_SPEC_SAMPLER_1D_ARRAY; + break; + case TYPE_SPECIFIER_SAMPLER_2D_ARRAY: + spec->type = SLANG_SPEC_SAMPLER_2D_ARRAY; + break; + case TYPE_SPECIFIER_SAMPLER_1D_ARRAY_SHADOW: + spec->type = SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW; + break; + case TYPE_SPECIFIER_SAMPLER_2D_ARRAY_SHADOW: + spec->type = SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW; break; case TYPE_SPECIFIER_STRUCT: spec->type = SLANG_SPEC_STRUCT; @@ -825,9 +956,12 @@ static int parse_fully_specified_type(slang_parse_ctx * C, slang_output_ctx * O, slang_fully_specified_type * type) { + if (!parse_layout_qualifiers(C, &type->layout)) + RETURN0; + if (!parse_type_variant(C, &type->variant)) RETURN0; - + if (!parse_type_centroid(C, &type->centroid)) RETURN0; @@ -1946,6 +2080,30 @@ initialize_global(slang_assemble_ctx * A, slang_variable * var) #define VARIABLE_ARRAY_UNKNOWN 4 +/** + * Check if it's OK to re-declare a variable with the given new type. + * This happens when applying layout qualifiers to gl_FragCoord or + * (re)setting an array size. + * If redeclaration is OK, return a pointer to the incoming variable + * updated with new type info. Else return NULL; + */ +static slang_variable * +redeclare_variable(slang_variable *var, + const slang_fully_specified_type *type) +{ + if (slang_fully_specified_types_compatible(&var->type, type)) { + /* replace orig var layout with new layout */ + var->type.layout = type->layout; + + /* XXX there may be other type updates in the future here */ + + return var; + } + else + return NULL; +} + + /** * Parse the initializer for a variable declaration. */ @@ -1954,7 +2112,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, const slang_fully_specified_type * type) { GET_CURRENT_CONTEXT(ctx); /* a hack */ - slang_variable *var; + slang_variable *var = NULL, *prevDecl; slang_atom a_name; /* empty init declatator (without name, e.g. "float ;") */ @@ -1964,29 +2122,42 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, a_name = parse_identifier(C); /* check if name is already in this scope */ - if (_slang_variable_locate(O->vars, a_name, GL_FALSE)) { - slang_info_log_error(C->L, + prevDecl = _slang_variable_locate(O->vars, a_name, C->global_scope); + if (prevDecl) { + /* A var with this name has already been declared. + * Check if redeclaring the var with a different type/layout is legal. + */ + if (C->global_scope) { + var = redeclare_variable(prevDecl, type); + } + if (!var) { + slang_info_log_error(C->L, "declaration of '%s' conflicts with previous declaration", (char *) a_name); - RETURN0; + RETURN0; + } } - /* make room for the new variable and initialize it */ - var = slang_variable_scope_grow(O->vars); if (!var) { - slang_info_log_memory(C->L); - RETURN0; - } + /* make room for a new variable and initialize it */ + var = slang_variable_scope_grow(O->vars); + if (!var) { + slang_info_log_memory(C->L); + RETURN0; + } - /* copy the declarator type qualifier/etc info, parse the identifier */ - var->type.qualifier = type->qualifier; - var->type.centroid = type->centroid; - var->type.precision = type->precision; - var->type.variant = type->variant; - var->type.array_len = type->array_len; - var->a_name = a_name; - if (var->a_name == SLANG_ATOM_NULL) - RETURN0; + /* copy the declarator type qualifier/etc info, parse the identifier */ + var->type.qualifier = type->qualifier; + var->type.centroid = type->centroid; + var->type.precision = type->precision; + var->type.specifier = type->specifier;/*new*/ + var->type.variant = type->variant; + var->type.layout = type->layout; + var->type.array_len = type->array_len; + var->a_name = a_name; + if (var->a_name == SLANG_ATOM_NULL) + RETURN0; + } switch (*C->I++) { case VARIABLE_NONE: @@ -2058,6 +2229,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, if (C->global_scope) { slang_assemble_ctx A; memset(&A, 0, sizeof(slang_assemble_ctx)); + A.allow_uniform_initializers = C->version > 110; A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -2077,6 +2249,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, if (var->initializer != NULL) { slang_assemble_ctx A; memset(&A, 0, sizeof(slang_assemble_ctx)); + A.allow_uniform_initializers = C->version > 110; A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -2085,6 +2258,21 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, RETURN0; } } + + if (var->type.qualifier == SLANG_QUAL_FIXEDINPUT && + var->a_name == slang_atom_pool_atom(C->atoms, "gl_FragCoord")) { + /* set the program's PixelCenterInteger, OriginUpperLeft fields */ + struct gl_fragment_program *fragProg = + (struct gl_fragment_program *) O->program; + + if (var->type.layout & SLANG_LAYOUT_UPPER_LEFT_BIT) { + fragProg->OriginUpperLeft = GL_TRUE; + } + if (var->type.layout & SLANG_LAYOUT_PIXEL_CENTER_INTEGER_BIT) { + fragProg->PixelCenterInteger = GL_TRUE; + } + } + return 1; } @@ -2271,6 +2459,10 @@ parse_default_precision(slang_parse_ctx * C, slang_output_ctx * O) case TYPE_SPECIFIER_SAMPLER2DSHADOW: case TYPE_SPECIFIER_SAMPLER2DRECT: case TYPE_SPECIFIER_SAMPLER2DRECTSHADOW: + case TYPE_SPECIFIER_SAMPLER_1D_ARRAY: + case TYPE_SPECIFIER_SAMPLER_2D_ARRAY: + case TYPE_SPECIFIER_SAMPLER_1D_ARRAY_SHADOW: + case TYPE_SPECIFIER_SAMPLER_2D_ARRAY_SHADOW: /* OK */ break; default: @@ -2393,8 +2585,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, { slang_function *func; success = parse_function(C, &o, 1, &func); - if (success && - _mesa_strcmp((char *) func->header.a_name, "main") == 0) { + if (success && strcmp((char *) func->header.a_name, "main") == 0) { /* found main() */ mainFunc = func; } @@ -2434,6 +2625,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, A.vartable = o.vartable; A.EmitContReturn = ctx->Shader.EmitContReturn; A.log = C->L; + A.allow_uniform_initializers = C->version > 110; /* main() takes no parameters */ if (mainFunc->param_count > 0) { @@ -2455,7 +2647,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, } static GLboolean -compile_binary(const byte * prod, slang_code_unit * unit, +compile_binary(const unsigned char * prod, slang_code_unit * unit, GLuint version, slang_unit_type type, slang_info_log * infolog, slang_code_unit * builtin, slang_code_unit * downlink, @@ -2488,17 +2680,61 @@ compile_binary(const byte * prod, slang_code_unit * unit, } static GLboolean -compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, - slang_unit_type type, slang_info_log * infolog, - slang_code_unit * builtin, +compile_with_grammar(const char *source, + slang_code_unit *unit, + slang_unit_type type, + slang_info_log *infolog, + slang_code_unit *builtin, struct gl_shader *shader, - const struct gl_extensions *extensions, - struct gl_sl_pragmas *pragmas) + struct gl_sl_pragmas *pragmas, + unsigned int shader_type, + unsigned int parsing_builtin) { - byte *prod; - GLuint size, start, version; - slang_string preprocessed; - GLuint maxVersion; + struct sl_pp_purify_options options; + struct sl_pp_context *context; + unsigned char *prod; + GLuint size; + unsigned int version; + unsigned int maxVersion; + int result; + char errmsg[200] = ""; + + assert(shader_type == 1 || shader_type == 2); + + memset(&options, 0, sizeof(options)); + + context = sl_pp_context_create(source, &options); + if (!context) { + slang_info_log_error(infolog, "out of memory"); + return GL_FALSE; + } + + if (sl_pp_version(context, &version)) { + slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + return GL_FALSE; + } + + if (sl_pp_context_add_extension(context, "GL_ARB_draw_buffers") || + sl_pp_context_add_extension(context, "GL_ARB_texture_rectangle")) { + slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + return GL_FALSE; + } + + if (type == SLANG_UNIT_FRAGMENT_SHADER) { + sl_pp_context_add_extension(context, "GL_ARB_fragment_coord_conventions"); + } + + +#if FEATURE_es2_glsl + if (sl_pp_context_add_predefined(context, "GL_ES", "1") || + sl_pp_context_add_predefined(context, "GL_FRAGMENT_PRECISION_HIGH", "1")) { + slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context)); + sl_pp_context_destroy(context); + return GL_FALSE; + } +#endif #if FEATURE_ARB_shading_language_120 maxVersion = 120; @@ -2508,36 +2744,30 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, maxVersion = 110; #endif - /* First retrieve the version number. */ - if (!_slang_preprocess_version(source, &version, &start, infolog)) - return GL_FALSE; - - if (version > maxVersion) { + if (version > maxVersion || + (version != 100 && version != 110 && version != 120)) { slang_info_log_error(infolog, "language version %.2f is not supported.", version * 0.01); - return GL_FALSE; - } - - /* Now preprocess the source string. */ - slang_string_init(&preprocessed); - if (!_slang_preprocess_directives(&preprocessed, &source[start], - infolog, extensions, pragmas)) { - slang_string_free(&preprocessed); - slang_info_log_error(infolog, "failed to preprocess the source."); + sl_pp_context_destroy(context); return GL_FALSE; } /* Finally check the syntax and generate its binary representation. */ - if (!grammar_fast_check(id, - (const byte *) (slang_string_cstr(&preprocessed)), - &prod, &size, 65536)) { - char buf[1024]; - GLint pos; - - slang_string_free(&preprocessed); - grammar_get_last_error((byte *) (buf), sizeof(buf), &pos); - slang_info_log_error(infolog, buf); + result = sl_cl_compile(context, + shader_type, + parsing_builtin, + &prod, + &size, + errmsg, + sizeof(errmsg)); + + sl_pp_context_destroy(context); + + if (result) { + /*GLint pos;*/ + + slang_info_log_error(infolog, errmsg); /* syntax error (possibly in library code) */ #if 0 { @@ -2551,77 +2781,64 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit, #endif return GL_FALSE; } - slang_string_free(&preprocessed); /* Syntax is okay - translate it to internal representation. */ if (!compile_binary(prod, unit, version, type, infolog, builtin, &builtin[SLANG_BUILTIN_TOTAL - 1], shader)) { - grammar_alloc_free(prod); + free(prod); return GL_FALSE; } - grammar_alloc_free(prod); + free(prod); return GL_TRUE; } -LONGSTRING static const char *slang_shader_syn = -#include "library/slang_shader_syn.h" - ; - -static const byte slang_core_gc[] = { +static const unsigned char slang_core_gc[] = { #include "library/slang_core_gc.h" }; -static const byte slang_120_core_gc[] = { +static const unsigned char slang_120_core_gc[] = { #include "library/slang_120_core_gc.h" }; -static const byte slang_120_fragment_gc[] = { +static const unsigned char slang_120_fragment_gc[] = { #include "library/slang_builtin_120_fragment_gc.h" }; -static const byte slang_common_builtin_gc[] = { +static const unsigned char slang_common_builtin_gc[] = { #include "library/slang_common_builtin_gc.h" }; -static const byte slang_fragment_builtin_gc[] = { +static const unsigned char slang_fragment_builtin_gc[] = { #include "library/slang_fragment_builtin_gc.h" }; -static const byte slang_vertex_builtin_gc[] = { +static const unsigned char slang_vertex_builtin_gc[] = { #include "library/slang_vertex_builtin_gc.h" }; static GLboolean -compile_object(grammar * id, const char *source, slang_code_object * object, - slang_unit_type type, slang_info_log * infolog, +compile_object(const char *source, + slang_code_object *object, + slang_unit_type type, + slang_info_log *infolog, struct gl_shader *shader, - const struct gl_extensions *extensions, struct gl_sl_pragmas *pragmas) { slang_code_unit *builtins = NULL; GLuint base_version = 110; - - /* load GLSL grammar */ - *id = grammar_load_from_text((const byte *) (slang_shader_syn)); - if (*id == 0) { - byte buf[1024]; - int pos; - - grammar_get_last_error(buf, 1024, &pos); - slang_info_log_error(infolog, (const char *) (buf)); - return GL_FALSE; - } + unsigned int shader_type; + unsigned int parsing_builtin; /* set shader type - the syntax is slightly different for different shaders */ - if (type == SLANG_UNIT_FRAGMENT_SHADER - || type == SLANG_UNIT_FRAGMENT_BUILTIN) - grammar_set_reg8(*id, (const byte *) "shader_type", 1); - else - grammar_set_reg8(*id, (const byte *) "shader_type", 2); + if (type == SLANG_UNIT_FRAGMENT_SHADER || type == SLANG_UNIT_FRAGMENT_BUILTIN) { + shader_type = 1; + } else { + shader_type = 2; + } /* enable language extensions */ - grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1); + parsing_builtin = 1; /* if parsing user-specified shader, load built-in library */ if (type == SLANG_UNIT_FRAGMENT_SHADER || type == SLANG_UNIT_VERTEX_SHADER) { @@ -2686,51 +2903,24 @@ compile_object(grammar * id, const char *source, slang_code_object * object, } /* disable language extensions */ -#if NEW_SLANG /* allow-built-ins */ - grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1); -#else - grammar_set_reg8(*id, (const byte *) "parsing_builtin", 0); -#endif + parsing_builtin = 0; + builtins = object->builtin; } /* compile the actual shader - pass-in built-in library for external shader */ - return compile_with_grammar(*id, source, &object->unit, type, infolog, - builtins, shader, extensions, pragmas); + return compile_with_grammar(source, + &object->unit, + type, + infolog, + builtins, + shader, + pragmas, + shader_type, + parsing_builtin); } -static GLboolean -compile_shader(GLcontext *ctx, slang_code_object * object, - slang_unit_type type, slang_info_log * infolog, - struct gl_shader *shader) -{ - GLboolean success; - grammar id = 0; - -#if 0 /* for debug */ - _mesa_printf("********* COMPILE SHADER ***********\n"); - _mesa_printf("%s\n", shader->Source); - _mesa_printf("************************************\n"); -#endif - - assert(shader->Program); - - _slang_code_object_dtr(object); - _slang_code_object_ctr(object); - - success = compile_object(&id, shader->Source, object, type, infolog, shader, - &ctx->Extensions, &shader->Pragmas); - if (id != 0) - grammar_destroy(id); - if (!success) - return GL_FALSE; - - return GL_TRUE; -} - - - GLboolean _slang_compile(GLcontext *ctx, struct gl_shader *shader) { @@ -2771,11 +2961,16 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader) slang_info_log_construct(&info_log); _slang_code_object_ctr(&obj); - success = compile_shader(ctx, &obj, type, &info_log, shader); + success = compile_object(shader->Source, + &obj, + type, + &info_log, + shader, + &shader->Pragmas); /* free shader's prev info log */ if (shader->InfoLog) { - _mesa_free(shader->InfoLog); + free(shader->InfoLog); shader->InfoLog = NULL; } diff --git a/mesalib/src/mesa/shader/slang/slang_compile_operation.c b/mesalib/src/mesa/shader/slang/slang_compile_operation.c index be73094ca..5441d60df 100644 --- a/mesalib/src/mesa/shader/slang/slang_compile_operation.c +++ b/mesalib/src/mesa/shader/slang/slang_compile_operation.c @@ -46,6 +46,7 @@ slang_operation_construct(slang_operation * oper) oper->literal_size = 1; oper->array_constructor = GL_FALSE; oper->a_id = SLANG_ATOM_NULL; + oper->a_obj = SLANG_ATOM_NULL; oper->locals = _slang_variable_scope_new(NULL); if (oper->locals == NULL) return GL_FALSE; @@ -268,10 +269,10 @@ slang_operation_insert(GLuint *numElements, slang_operation **array, slang_operation *newOp; newOp = ops + pos; if (pos > 0) - _mesa_memcpy(ops, *array, pos * sizeof(slang_operation)); + memcpy(ops, *array, pos * sizeof(slang_operation)); if (pos < *numElements) - _mesa_memcpy(newOp + 1, (*array) + pos, - (*numElements - pos) * sizeof(slang_operation)); + memcpy(newOp + 1, (*array) + pos, + (*numElements - pos) * sizeof(slang_operation)); if (!slang_operation_construct(newOp)) { _slang_free(ops); diff --git a/mesalib/src/mesa/shader/slang/slang_compile_variable.c b/mesalib/src/mesa/shader/slang/slang_compile_variable.c index eab912710..23c08a903 100644 --- a/mesalib/src/mesa/shader/slang/slang_compile_variable.c +++ b/mesalib/src/mesa/shader/slang/slang_compile_variable.c @@ -182,7 +182,7 @@ slang_variable_destruct(slang_variable * var) } #if 0 if (var->aux) { - _mesa_free(var->aux); + free(var->aux); } #endif } diff --git a/mesalib/src/mesa/shader/slang/slang_emit.c b/mesalib/src/mesa/shader/slang/slang_emit.c index c0e4b27aa..7c0ea0c11 100644 --- a/mesalib/src/mesa/shader/slang/slang_emit.c +++ b/mesalib/src/mesa/shader/slang/slang_emit.c @@ -38,7 +38,6 @@ #include "main/imports.h" #include "main/context.h" -#include "main/macros.h" #include "shader/program.h" #include "shader/prog_instruction.h" #include "shader/prog_parameter.h" @@ -81,8 +80,8 @@ new_subroutine(slang_emit_info *emitInfo, GLuint *id) emitInfo->Subroutines = (struct gl_program **) _mesa_realloc(emitInfo->Subroutines, - n * sizeof(struct gl_program), - (n + 1) * sizeof(struct gl_program)); + n * sizeof(struct gl_program *), + (n + 1) * sizeof(struct gl_program *)); emitInfo->Subroutines[n] = ctx->Driver.NewProgram(ctx, emitInfo->prog->Target, 0); emitInfo->Subroutines[n]->Parameters = emitInfo->prog->Parameters; emitInfo->NumSubroutines++; @@ -242,7 +241,7 @@ alloc_local_temp(slang_emit_info *emitInfo, slang_ir_storage *temp, GLint size) { assert(size >= 1); assert(size <= 4); - _mesa_bzero(temp, sizeof(*temp)); + memset(temp, 0, sizeof(*temp)); temp->Size = size; temp->File = PROGRAM_TEMPORARY; temp->Index = -1; @@ -551,6 +550,9 @@ emit_instruction(slang_emit_info *emitInfo, &srcRelAddr, NULL, NULL); + if (!inst) { + return NULL; + } src[i] = &newSrc[i]; } @@ -752,7 +754,7 @@ instruction_annotation(gl_inst_opcode opcode, char *dstAnnot, s = (char *) malloc(len); sprintf(s, "%s = %s %s %s %s", dstAnnot, srcAnnot0, operator, srcAnnot1, srcAnnot2); - assert(_mesa_strlen(s) < len); + assert(strlen(s) < len); free(dstAnnot); free(srcAnnot0); @@ -948,6 +950,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) n->Children[0]->Store, n->Children[1]->Store, NULL); + if (!inst) { + return NULL; + } inst_comment(inst, "Compare values"); /* Compute val = DOT(temp, temp) (reduction) */ @@ -957,6 +962,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) &tempStore, &tempStore, NULL); + if (!inst) { + return NULL; + } inst->SrcReg[0].Swizzle = inst->SrcReg[1].Swizzle = swizzle; /*override*/ inst_comment(inst, "Reduce vec to bool"); @@ -972,6 +980,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) n->Store, &zero, NULL); + if (!inst) { + return NULL; + } inst_comment(inst, "Invert true/false"); } } @@ -1001,6 +1012,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) &srcStore0, &srcStore1, NULL); + if (!inst) { + return NULL; + } inst_comment(inst, "Begin struct/array comparison"); } else { @@ -1010,12 +1024,18 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) &srcStore0, &srcStore1, NULL); + if (!inst) { + return NULL; + } /* ADD accTemp, accTemp, sneTemp; # like logical-OR */ inst = emit_instruction(emitInfo, OPCODE_ADD, &accTemp, /* dest */ &accTemp, &sneTemp, NULL); + if (!inst) { + return NULL; + } } } @@ -1025,6 +1045,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) &accTemp, &accTemp, NULL); + if (!inst) { + return NULL; + } inst_comment(inst, "End struct/array comparison"); if (n->Opcode == IR_EQUAL) { @@ -1036,6 +1059,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n) n->Store, &zero, NULL); + if (!inst) { + return NULL; + } inst_comment(inst, "Invert true/false"); } @@ -1096,6 +1122,8 @@ emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n) return inst; } } +#else + (void) inst; #endif if (!alloc_node_storage(emitInfo, n, n->Children[0]->Store->Size)) @@ -1108,7 +1136,7 @@ emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n) * dest for this clamp() is an output reg, we can't use that reg for * the intermediate result. Use a temp register instead. */ - _mesa_bzero(&tmpNode, sizeof(tmpNode)); + memset(&tmpNode, 0, sizeof(tmpNode)); if (!alloc_node_storage(emitInfo, &tmpNode, n->Store->Size)) { return NULL; } @@ -1119,6 +1147,9 @@ emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n) n->Children[0]->Store, n->Children[1]->Store, NULL); + if (!inst) { + return NULL; + } /* n->dest = min(tmp, ch[2]) */ inst = emit_instruction(emitInfo, OPCODE_MIN, @@ -1153,7 +1184,9 @@ emit_negation(slang_emit_info *emitInfo, slang_ir_node *n) n->Children[0]->Store, NULL, NULL); - inst->SrcReg[0].Negate = NEGATE_XYZW; + if (inst) { + inst->SrcReg[0].Negate = NEGATE_XYZW; + } return inst; } @@ -1356,6 +1389,9 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n) n->Children[1]->Store, NULL, NULL); + if (!inst) { + return NULL; + } inst->TexShadow = shadow; @@ -1458,6 +1494,9 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n) &srcStore, NULL, NULL); + if (!inst) { + return NULL; + } inst_comment(inst, "IR_COPY block"); srcStore.Index++; dstStore.Index++; @@ -1473,6 +1512,9 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n) n->Children[1]->Store, NULL, NULL); + if (!inst) { + return NULL; + } dstAnnot = storage_annotation(n->Children[0], emitInfo->prog); srcAnnot = storage_annotation(n->Children[1], emitInfo->prog); inst->Comment = instruction_annotation(inst->Opcode, dstAnnot, @@ -1534,6 +1576,9 @@ emit_cond(slang_emit_info *emitInfo, slang_ir_node *n) n->Children[0]->Store, NULL, NULL); + if (!inst) { + return NULL; + } inst->CondUpdate = GL_TRUE; inst_comment(inst, "COND expr"); _slang_free_temp(emitInfo->vt, n->Store); @@ -1596,6 +1641,9 @@ emit_not(slang_emit_info *emitInfo, slang_ir_node *n) n->Children[0]->Store, &zero, NULL); + if (!inst) { + return NULL; + } inst_comment(inst, "NOT"); free_node_storage(emitInfo->vt, n->Children[0]); @@ -1646,12 +1694,17 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) ifInst->DstReg.CondSwizzle = writemask_to_swizzle(condWritemask); } else { + struct prog_instruction *inst; + /* IF src[0] THEN ... */ - emit_instruction(emitInfo, OPCODE_IF, - NULL, /* dst */ - n->Children[0]->Store, /* op0 */ - NULL, - NULL); + inst = emit_instruction(emitInfo, OPCODE_IF, + NULL, /* dst */ + n->Children[0]->Store, /* op0 */ + NULL, + NULL); + if (!inst) { + return NULL; + } } } else { @@ -1676,6 +1729,7 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) if (!inst) { return NULL; } + prog->Instructions[ifInstLoc].BranchTarget = prog->NumInstructions - 1; } else { /* jump to endif instruction */ @@ -1685,8 +1739,8 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) } inst_comment(inst, "else"); inst->DstReg.CondMask = COND_TR; /* always branch */ + prog->Instructions[ifInstLoc].BranchTarget = prog->NumInstructions; } - prog->Instructions[ifInstLoc].BranchTarget = prog->NumInstructions; emit(emitInfo, n->Children[2]); } else { @@ -1701,8 +1755,14 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n) } } - if (n->Children[2]) { - prog->Instructions[elseInstLoc].BranchTarget = prog->NumInstructions; + if (elseInstLoc) { + /* point ELSE instruction BranchTarget at ENDIF */ + if (emitInfo->EmitHighLevelInstructions) { + prog->Instructions[elseInstLoc].BranchTarget = prog->NumInstructions - 1; + } + else { + prog->Instructions[elseInstLoc].BranchTarget = prog->NumInstructions; + } } return NULL; } @@ -1762,7 +1822,7 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) /* Done emitting loop code. Now walk over the loop's linked list of * BREAK and CONT nodes, filling in their BranchTarget fields (which - * will point to the ENDLOOP+1 or BGNLOOP instructions, respectively). + * will point to the corresponding ENDLOOP instruction. */ for (ir = n->List; ir; ir = ir->List) { struct prog_instruction *inst = prog->Instructions + ir->InstLocation; @@ -1771,8 +1831,13 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n) ir->Opcode == IR_BREAK_IF_TRUE) { assert(inst->Opcode == OPCODE_BRK || inst->Opcode == OPCODE_BRA); - /* go to instruction after end of loop */ - inst->BranchTarget = endInstLoc + 1; + /* go to instruction at end of loop */ + if (emitInfo->EmitHighLevelInstructions) { + inst->BranchTarget = endInstLoc; + } + else { + inst->BranchTarget = endInstLoc + 1; + } } else { assert(ir->Opcode == IR_CONT || @@ -1875,6 +1940,9 @@ emit_cont_break_if_true(slang_emit_info *emitInfo, slang_ir_node *n) n->Children[0]->Store, NULL, NULL); + if (!inst) { + return NULL; + } n->InstLocation = emitInfo->prog->NumInstructions; inst = new_instruction(emitInfo, opcode); @@ -1887,7 +1955,7 @@ emit_cont_break_if_true(slang_emit_info *emitInfo, slang_ir_node *n) } emitInfo->prog->Instructions[ifInstLoc].BranchTarget - = emitInfo->prog->NumInstructions; + = emitInfo->prog->NumInstructions - 1; return inst; } } @@ -2045,6 +2113,9 @@ emit_array_element(slang_emit_info *emitInfo, slang_ir_node *n) indexStore, /* the index */ &elemSizeStore, NULL); + if (!inst) { + return NULL; + } indexStore = indexTemp; } @@ -2071,6 +2142,9 @@ emit_array_element(slang_emit_info *emitInfo, slang_ir_node *n) indexStore, /* the index */ &indirectArray, /* indirect array base */ NULL); + if (!inst) { + return NULL; + } indexStore = indexTemp; } @@ -2230,7 +2304,7 @@ emit_var_ref(slang_emit_info *emitInfo, slang_ir_node *n) char s[100]; /* XXX isn't this really an out of memory/resources error? */ _mesa_snprintf(s, sizeof(s), "Undefined variable '%s'", - (char *) n->Var->a_name); + (char *) n->Var->a_name); slang_info_log_error(emitInfo->log, s); return NULL; } @@ -2454,7 +2528,7 @@ _slang_resolve_subroutines(slang_emit_info *emitInfo) GLuint *subroutineLoc, i, total; subroutineLoc - = (GLuint *) _mesa_malloc(emitInfo->NumSubroutines * sizeof(GLuint)); + = (GLuint *) malloc(emitInfo->NumSubroutines * sizeof(GLuint)); /* total number of instructions */ total = mainP->NumInstructions; @@ -2492,7 +2566,7 @@ _slang_resolve_subroutines(slang_emit_info *emitInfo) /* free subroutine list */ if (emitInfo->Subroutines) { - _mesa_free(emitInfo->Subroutines); + free(emitInfo->Subroutines); emitInfo->Subroutines = NULL; } emitInfo->NumSubroutines = 0; @@ -2511,7 +2585,7 @@ _slang_resolve_subroutines(slang_emit_info *emitInfo) } } - _mesa_free(subroutineLoc); + free(subroutineLoc); } diff --git a/mesalib/src/mesa/shader/slang/slang_label.c b/mesalib/src/mesa/shader/slang/slang_label.c index 1ca1ef0c7..225612a93 100644 --- a/mesalib/src/mesa/shader/slang/slang_label.c +++ b/mesalib/src/mesa/shader/slang/slang_label.c @@ -32,12 +32,12 @@ _slang_label_new_unique(const char *name) static int id = 1; slang_label *l = (slang_label *) _slang_alloc(sizeof(slang_label)); if (l) { - l->Name = (char *) _slang_alloc(_mesa_strlen(name) + 10); + l->Name = (char *) _slang_alloc(strlen(name) + 10); if (!l->Name) { - _mesa_free(l); + free(l); return NULL; } - _mesa_sprintf(l->Name, "%s_%d", name, id); + sprintf(l->Name, "%s_%d", name, id); id++; l->Location = -1; } diff --git a/mesalib/src/mesa/shader/slang/slang_link.c b/mesalib/src/mesa/shader/slang/slang_link.c index 0a2bc4978..7c7bfbdbc 100644 --- a/mesalib/src/mesa/shader/slang/slang_link.c +++ b/mesalib/src/mesa/shader/slang/slang_link.c @@ -31,7 +31,6 @@ #include "main/imports.h" #include "main/context.h" -#include "main/hash.h" #include "main/macros.h" #include "shader/program.h" #include "shader/prog_instruction.h" @@ -69,7 +68,7 @@ static void link_error(struct gl_shader_program *shProg, const char *msg) { if (shProg->InfoLog) { - _mesa_free(shProg->InfoLog); + free(shProg->InfoLog); } shProg->InfoLog = _mesa_strdup(msg); shProg->LinkStatus = GL_FALSE; @@ -104,7 +103,7 @@ link_varying_vars(GLcontext *ctx, GLuint *map, i, firstVarying, newFile; GLbitfield *inOutFlags; - map = (GLuint *) _mesa_malloc(prog->Varying->NumParameters * sizeof(GLuint)); + map = (GLuint *) malloc(prog->Varying->NumParameters * sizeof(GLuint)); if (!map) return GL_FALSE; @@ -135,23 +134,23 @@ link_varying_vars(GLcontext *ctx, &shProg->Varying->Parameters[j]; if (var->Size != v->Size) { link_error(shProg, "mismatched varying variable types"); - _mesa_free(map); + free(map); return GL_FALSE; } if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_CENTROID)) { char msg[100]; _mesa_snprintf(msg, sizeof(msg), - "centroid modifier mismatch for '%s'", var->Name); + "centroid modifier mismatch for '%s'", var->Name); link_error(shProg, msg); - _mesa_free(map); + free(map); return GL_FALSE; } if (!bits_agree(var->Flags, v->Flags, PROG_PARAM_BIT_INVARIANT)) { char msg[100]; _mesa_snprintf(msg, sizeof(msg), - "invariant modifier mismatch for '%s'", var->Name); + "invariant modifier mismatch for '%s'", var->Name); link_error(shProg, msg); - _mesa_free(map); + free(map); return GL_FALSE; } } @@ -163,7 +162,7 @@ link_varying_vars(GLcontext *ctx, if (shProg->Varying->NumParameters > ctx->Const.MaxVarying) { link_error(shProg, "Too many varying variables"); - _mesa_free(map); + free(map); return GL_FALSE; } @@ -203,7 +202,7 @@ link_varying_vars(GLcontext *ctx, } } - _mesa_free(map); + free(map); /* these will get recomputed before linking is completed */ prog->InputsRead = 0x0; @@ -270,8 +269,8 @@ link_uniform_vars(GLcontext *ctx, GLuint newSampNum = *numSamplers; if (newSampNum >= ctx->Const.MaxTextureImageUnits) { char s[100]; - _mesa_sprintf(s, "Too many texture samplers (%u, max is %u)", - newSampNum, ctx->Const.MaxTextureImageUnits); + sprintf(s, "Too many texture samplers (%u, max is %u)", + newSampNum, ctx->Const.MaxTextureImageUnits); link_error(shProg, s); return GL_FALSE; } @@ -564,7 +563,7 @@ remove_extra_version_directives(GLchar *source) { GLuint verCount = 0; while (1) { - char *ver = _mesa_strstr(source, "#version"); + char *ver = strstr(source, "#version"); if (ver) { verCount++; if (verCount > 1) { @@ -590,45 +589,61 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType) { struct gl_shader *newShader; const struct gl_shader *firstShader = NULL; - GLuint shaderLengths[100]; + GLuint *shaderLengths; GLchar *source; GLuint totalLen = 0, len = 0; GLuint i; + shaderLengths = (GLuint *)malloc(shProg->NumShaders * sizeof(GLuint)); + if (!shaderLengths) { + return NULL; + } + /* compute total size of new shader source code */ for (i = 0; i < shProg->NumShaders; i++) { const struct gl_shader *shader = shProg->Shaders[i]; if (shader->Type == shaderType) { - shaderLengths[i] = _mesa_strlen(shader->Source); + shaderLengths[i] = strlen(shader->Source); totalLen += shaderLengths[i]; if (!firstShader) firstShader = shader; } } - if (totalLen == 0) + if (totalLen == 0) { + free(shaderLengths); return NULL; + } - source = (GLchar *) _mesa_malloc(totalLen + 1); - if (!source) + source = (GLchar *) malloc(totalLen + 1); + if (!source) { + free(shaderLengths); return NULL; + } /* concatenate shaders */ for (i = 0; i < shProg->NumShaders; i++) { const struct gl_shader *shader = shProg->Shaders[i]; if (shader->Type == shaderType) { - _mesa_memcpy(source + len, shader->Source, shaderLengths[i]); + memcpy(source + len, shader->Source, shaderLengths[i]); len += shaderLengths[i]; } } source[len] = '\0'; /* - _mesa_printf("---NEW CONCATENATED SHADER---:\n%s\n------------\n", source); + printf("---NEW CONCATENATED SHADER---:\n%s\n------------\n", source); */ + free(shaderLengths); + remove_extra_version_directives(source); newShader = CALLOC_STRUCT(gl_shader); + if (!newShader) { + free(source); + return NULL; + } + newShader->Type = shaderType; newShader->Source = source; newShader->Pragmas = firstShader->Pragmas; @@ -704,6 +719,7 @@ _slang_link(GLcontext *ctx, { const struct gl_vertex_program *vertProg = NULL; const struct gl_fragment_program *fragProg = NULL; + GLboolean vertNotify = GL_TRUE, fragNotify = GL_TRUE; GLuint numSamplers = 0; GLuint i; @@ -757,7 +773,7 @@ _slang_link(GLcontext *ctx, _mesa_reference_vertprog(ctx, &shProg->VertexProgram, NULL); if (vertProg) { struct gl_vertex_program *linked_vprog = - vertex_program(_mesa_clone_program(ctx, &vertProg->Base)); + _mesa_clone_vertex_program(ctx, vertProg); shProg->VertexProgram = linked_vprog; /* refcount OK */ /* vertex program ID not significant; just set Id for debugging purposes */ shProg->VertexProgram->Base.Id = shProg->Name; @@ -767,7 +783,7 @@ _slang_link(GLcontext *ctx, _mesa_reference_fragprog(ctx, &shProg->FragmentProgram, NULL); if (fragProg) { struct gl_fragment_program *linked_fprog = - fragment_program(_mesa_clone_program(ctx, &fragProg->Base)); + _mesa_clone_fragment_program(ctx, fragProg); shProg->FragmentProgram = linked_fprog; /* refcount OK */ /* vertex program ID not significant; just set Id for debugging purposes */ shProg->FragmentProgram->Base.Id = shProg->Name; @@ -856,14 +872,14 @@ _slang_link(GLcontext *ctx, _mesa_update_shader_textures_used(&shProg->FragmentProgram->Base); /* notify driver that a new fragment program has been compiled/linked */ - ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB, - &shProg->FragmentProgram->Base); + vertNotify = ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB, + &shProg->FragmentProgram->Base); if (ctx->Shader.Flags & GLSL_DUMP) { - _mesa_printf("Mesa pre-link fragment program:\n"); + printf("Mesa pre-link fragment program:\n"); _mesa_print_program(&fragProg->Base); _mesa_print_program_parameters(ctx, &fragProg->Base); - _mesa_printf("Mesa post-link fragment program:\n"); + printf("Mesa post-link fragment program:\n"); _mesa_print_program(&shProg->FragmentProgram->Base); _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); } @@ -874,14 +890,14 @@ _slang_link(GLcontext *ctx, _mesa_update_shader_textures_used(&shProg->VertexProgram->Base); /* notify driver that a new vertex program has been compiled/linked */ - ctx->Driver.ProgramStringNotify(ctx, GL_VERTEX_PROGRAM_ARB, - &shProg->VertexProgram->Base); + fragNotify = ctx->Driver.ProgramStringNotify(ctx, GL_VERTEX_PROGRAM_ARB, + &shProg->VertexProgram->Base); if (ctx->Shader.Flags & GLSL_DUMP) { - _mesa_printf("Mesa pre-link vertex program:\n"); + printf("Mesa pre-link vertex program:\n"); _mesa_print_program(&vertProg->Base); _mesa_print_program_parameters(ctx, &vertProg->Base); - _mesa_printf("Mesa post-link vertex program:\n"); + printf("Mesa post-link vertex program:\n"); _mesa_print_program(&shProg->VertexProgram->Base); _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); } @@ -896,13 +912,19 @@ _slang_link(GLcontext *ctx, } if (ctx->Shader.Flags & GLSL_DUMP) { - _mesa_printf("Varying vars:\n"); + printf("Varying vars:\n"); _mesa_print_parameter_list(shProg->Varying); if (shProg->InfoLog) { - _mesa_printf("Info Log: %s\n", shProg->InfoLog); + printf("Info Log: %s\n", shProg->InfoLog); } } - shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); + if (!vertNotify || !fragNotify) { + /* driver rejected one/both of the vertex/fragment programs */ + link_error(shProg, "Vertex and/or fragment program rejected by driver\n"); + } + else { + shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); + } } diff --git a/mesalib/src/mesa/shader/slang/slang_log.c b/mesalib/src/mesa/shader/slang/slang_log.c index d7d2b4fbf..9ff21417b 100644 --- a/mesalib/src/mesa/shader/slang/slang_log.c +++ b/mesalib/src/mesa/shader/slang/slang_log.c @@ -24,7 +24,6 @@ */ #include "main/imports.h" -#include "main/context.h" #include "slang_log.h" #include "slang_utility.h" @@ -44,7 +43,7 @@ void slang_info_log_destruct(slang_info_log * log) { if (!log->dont_free_text) - _mesa_free(log->text); + free(log->text); } static int @@ -64,7 +63,7 @@ slang_info_log_message(slang_info_log * log, const char *prefix, _mesa_realloc(log->text, old_len + 1, old_len + size); } else { - log->text = (char *) (_mesa_malloc(size)); + log->text = (char *) (malloc(size)); if (log->text != NULL) log->text[0] = '\0'; } @@ -87,7 +86,7 @@ slang_info_log_print(slang_info_log * log, const char *msg, ...) char buf[1024]; va_start(va, msg); - _mesa_vsprintf(buf, msg, va); + vsprintf(buf, msg, va); va_end(va); return slang_info_log_message(log, NULL, buf); } @@ -99,7 +98,7 @@ slang_info_log_error(slang_info_log * log, const char *msg, ...) char buf[1024]; va_start(va, msg); - _mesa_vsprintf(buf, msg, va); + vsprintf(buf, msg, va); va_end(va); log->error_flag = GL_TRUE; if (slang_info_log_message(log, "Error", buf)) @@ -115,7 +114,7 @@ slang_info_log_warning(slang_info_log * log, const char *msg, ...) char buf[1024]; va_start(va, msg); - _mesa_vsprintf(buf, msg, va); + vsprintf(buf, msg, va); va_end(va); if (slang_info_log_message(log, "Warning", buf)) return 1; diff --git a/mesalib/src/mesa/shader/slang/slang_mem.c b/mesalib/src/mesa/shader/slang/slang_mem.c index 9224578ed..5eaa7c442 100644 --- a/mesalib/src/mesa/shader/slang/slang_mem.c +++ b/mesalib/src/mesa/shader/slang/slang_mem.c @@ -56,12 +56,12 @@ struct slang_mempool_ slang_mempool * _slang_new_mempool(GLuint initialSize) { - slang_mempool *pool = (slang_mempool *) _mesa_calloc(sizeof(slang_mempool)); + slang_mempool *pool = (slang_mempool *) calloc(1, sizeof(slang_mempool)); if (pool) { - pool->Data = (char *) _mesa_calloc(initialSize); + pool->Data = (char *) calloc(1, initialSize); /*printf("ALLOC MEMPOOL %d at %p\n", initialSize, pool->Data);*/ if (!pool->Data) { - _mesa_free(pool); + free(pool); return NULL; } pool->Size = initialSize; @@ -82,8 +82,8 @@ _slang_delete_mempool(slang_mempool *pool) pool->Used, pool->Size, pool->Count, pool->Largest); */ total += pool->Used; - _mesa_free(pool->Data); - _mesa_free(pool); + free(pool->Data); + free(pool); pool = next; } /*printf("TOTAL ALLOCATED: %u\n", total);*/ @@ -125,7 +125,7 @@ void * _slang_alloc(GLuint bytes) { #if USE_MALLOC_FREE - return _mesa_calloc(bytes); + return calloc(1, bytes); #else slang_mempool *pool; GET_CURRENT_CONTEXT(ctx); @@ -197,7 +197,7 @@ _slang_realloc(void *oldBuffer, GLuint oldSize, GLuint newSize) ASSERT(is_valid_address(pool, oldBuffer)); if (newBuffer && oldBuffer && copySize > 0) - _mesa_memcpy(newBuffer, oldBuffer, copySize); + memcpy(newBuffer, oldBuffer, copySize); return newBuffer; } @@ -212,10 +212,10 @@ char * _slang_strdup(const char *s) { if (s) { - size_t l = _mesa_strlen(s); + size_t l = strlen(s); char *s2 = (char *) _slang_alloc(l + 1); if (s2) - _mesa_strcpy(s2, s); + strcpy(s2, s); return s2; } else { @@ -231,7 +231,7 @@ void _slang_free(void *addr) { #if USE_MALLOC_FREE - _mesa_free(addr); + free(addr); #else if (addr) { GET_CURRENT_CONTEXT(ctx); diff --git a/mesalib/src/mesa/shader/slang/slang_preprocess.c b/mesalib/src/mesa/shader/slang/slang_preprocess.c deleted file mode 100644 index e9a24cc00..000000000 --- a/mesalib/src/mesa/shader/slang/slang_preprocess.c +++ /dev/null @@ -1,1406 +0,0 @@ -/* - * Mesa 3-D graphics library - * - * Copyright (C) 2005-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/** - * \file slang_preprocess.c - * slang preprocessor - * \author Michal Krol - */ - -#include "main/imports.h" -#include "shader/grammar/grammar_mesa.h" -#include "slang_preprocess.h" - -LONGSTRING static const char *slang_pp_directives_syn = -#include "library/slang_pp_directives_syn.h" -; - -LONGSTRING static const char *slang_pp_expression_syn = -#include "library/slang_pp_expression_syn.h" -; - -LONGSTRING static const char *slang_pp_version_syn = -#include "library/slang_pp_version_syn.h" -; - -static GLvoid -grammar_error_to_log (slang_info_log *log) -{ - char buf[1024]; - GLint pos; - - grammar_get_last_error ((byte *) (buf), sizeof (buf), &pos); - if (buf[0] == 0) { - _mesa_snprintf(buf, sizeof(buf), "Preprocessor error"); - } - slang_info_log_error (log, buf); -} - -GLboolean -_slang_preprocess_version (const char *text, GLuint *version, GLuint *eaten, slang_info_log *log) -{ - grammar id; - byte *prod, *I; - unsigned int size; - - id = grammar_load_from_text ((const byte *) (slang_pp_version_syn)); - if (id == 0) { - grammar_error_to_log (log); - return GL_FALSE; - } - - if (!grammar_fast_check (id, (const byte *) (text), &prod, &size, 8)) { - grammar_error_to_log (log); - grammar_destroy (id); - return GL_FALSE; - } - - /* there can be multiple #version directives - grab the last one */ - I = &prod[size - 6]; - *version = (GLuint) (I[0]) + (GLuint) (I[1]) * 100; - *eaten = (GLuint) (I[2]) + ((GLuint) (I[3]) << 8) + ((GLuint) (I[4]) << 16) + ((GLuint) (I[5]) << 24); - - grammar_destroy (id); - grammar_alloc_free (prod); - return GL_TRUE; -} - -/* - * The preprocessor does the following work. - * 1. Remove comments. Each comment block is replaced with a single space and if the - * block contains new-lines, they are preserved. This ensures that line numbers - * stay the same and if a comment block delimits two tokens, the are delitmited - * by the space after comment removal. - * 2. Remove preprocessor directives from the source string, checking their syntax and - * executing them if appropriate. Again, new-lines are preserved. - * 3. Expand macros. - * 4. Tokenize the source string by ensuring there is at least one space between every - * two adjacent tokens. - */ - -#define PP_ANNOTATE 0 - -static GLvoid -pp_annotate (slang_string *output, const char *fmt, ...) -{ -#if PP_ANNOTATE - va_list va; - char buffer[1024]; - - va_start (va, fmt); - _mesa_vsprintf (buffer, fmt, va); - va_end (va); - slang_string_pushs (output, buffer, _mesa_strlen (buffer)); -#else - (GLvoid) (output); - (GLvoid) (fmt); -#endif -} - - /* - * The expression is executed on a fixed-sized stack. The PUSH macro makes a runtime - * check if the stack is not overflown by too complex expressions. In that situation the - * GLSL preprocessor should report internal compiler error. - * The BINARYDIV makes a runtime check if the divider is not 0. If it is, it reports - * compilation error. - */ - -#define EXECUTION_STACK_SIZE 1024 - -#define PUSH(x)\ - do {\ - if (sp == 0) {\ - slang_info_log_error (elog, "internal compiler error: preprocessor execution stack overflow.");\ - return GL_FALSE;\ - }\ - stack[--sp] = x;\ - } while (GL_FALSE) - -#define POP(x)\ - do {\ - assert (sp < EXECUTION_STACK_SIZE);\ - x = stack[sp++];\ - } while (GL_FALSE) - -#define BINARY(op)\ - do {\ - GLint a, b;\ - POP(b);\ - POP(a);\ - PUSH(a op b);\ - } while (GL_FALSE) - -#define BINARYDIV(op)\ - do {\ - GLint a, b;\ - POP(b);\ - POP(a);\ - if (b == 0) {\ - slang_info_log_error (elog, "division by zero in preprocessor expression.");\ - return GL_FALSE;\ - }\ - PUSH(a op b);\ - } while (GL_FALSE) - -#define UNARY(op)\ - do {\ - GLint a;\ - POP(a);\ - PUSH(op a);\ - } while (GL_FALSE) - -#define OP_END 0 -#define OP_PUSHINT 1 -#define OP_LOGICALOR 2 -#define OP_LOGICALAND 3 -#define OP_OR 4 -#define OP_XOR 5 -#define OP_AND 6 -#define OP_EQUAL 7 -#define OP_NOTEQUAL 8 -#define OP_LESSEQUAL 9 -#define OP_GREATEREQUAL 10 -#define OP_LESS 11 -#define OP_GREATER 12 -#define OP_LEFTSHIFT 13 -#define OP_RIGHTSHIFT 14 -#define OP_ADD 15 -#define OP_SUBTRACT 16 -#define OP_MULTIPLY 17 -#define OP_DIVIDE 18 -#define OP_MODULUS 19 -#define OP_PLUS 20 -#define OP_MINUS 21 -#define OP_NEGATE 22 -#define OP_COMPLEMENT 23 - -static GLboolean -execute_expression (slang_string *output, const byte *code, GLuint *pi, GLint *result, - slang_info_log *elog) -{ - GLuint i = *pi; - GLint stack[EXECUTION_STACK_SIZE]; - GLuint sp = EXECUTION_STACK_SIZE; - - while (code[i] != OP_END) { - switch (code[i++]) { - case OP_PUSHINT: - i++; - PUSH(_mesa_atoi ((const char *) (&code[i]))); - i += _mesa_strlen ((const char *) (&code[i])) + 1; - break; - case OP_LOGICALOR: - BINARY(||); - break; - case OP_LOGICALAND: - BINARY(&&); - break; - case OP_OR: - BINARY(|); - break; - case OP_XOR: - BINARY(^); - break; - case OP_AND: - BINARY(&); - break; - case OP_EQUAL: - BINARY(==); - break; - case OP_NOTEQUAL: - BINARY(!=); - break; - case OP_LESSEQUAL: - BINARY(<=); - break; - case OP_GREATEREQUAL: - BINARY(>=); - break; - case OP_LESS: - BINARY(<); - break; - case OP_GREATER: - BINARY(>); - break; - case OP_LEFTSHIFT: - BINARY(<<); - break; - case OP_RIGHTSHIFT: - BINARY(>>); - break; - case OP_ADD: - BINARY(+); - break; - case OP_SUBTRACT: - BINARY(-); - break; - case OP_MULTIPLY: - BINARY(*); - break; - case OP_DIVIDE: - BINARYDIV(/); - break; - case OP_MODULUS: - BINARYDIV(%); - break; - case OP_PLUS: - UNARY(+); - break; - case OP_MINUS: - UNARY(-); - break; - case OP_NEGATE: - UNARY(!); - break; - case OP_COMPLEMENT: - UNARY(~); - break; - default: - assert (0); - } - } - - /* Write-back the index skipping the OP_END. */ - *pi = i + 1; - - /* There should be exactly one value left on the stack. This is our result. */ - POP(*result); - pp_annotate (output, "%d ", *result); - assert (sp == EXECUTION_STACK_SIZE); - return GL_TRUE; -} - -/* - * Function execute_expressions() executes up to 2 expressions. The second expression is there - * for the #line directive which takes 1 or 2 expressions that indicate line and file numbers. - * If it fails, it returns 0. If it succeeds, it returns the number of executed expressions. - */ - -#define EXP_END 0 -#define EXP_EXPRESSION 1 - -static GLuint -execute_expressions (slang_string *output, grammar eid, const byte *expr, GLint results[2], - slang_info_log *elog) -{ - GLint success; - byte *code; - GLuint size, count = 0; - - success = grammar_fast_check (eid, expr, &code, &size, 64); - if (success) { - GLuint i = 0; - - while (code[i++] == EXP_EXPRESSION) { - assert (count < 2); - - if (!execute_expression (output, code, &i, &results[count], elog)) { - count = 0; - break; - } - count++; - } - grammar_alloc_free (code); - } - else { - slang_info_log_error (elog, "syntax error in preprocessor expression.");\ - } - return count; -} - -/* - * The pp_symbol structure is used to hold macro definitions and macro formal parameters. The - * pp_symbols strcture is a collection of pp_symbol. It is used both for storing macro formal - * parameters and all global macro definitions. Making this unification wastes some memory, - * becuse macro formal parameters don't need further lists of symbols. We lose 8 bytes per - * formal parameter here, but making this we can use the same code to substitute macro parameters - * as well as macros in the source string. - */ - -typedef struct -{ - struct pp_symbol_ *symbols; - GLuint count; -} pp_symbols; - -static GLvoid -pp_symbols_init (pp_symbols *self) -{ - self->symbols = NULL; - self->count = 0; -} - -static GLvoid -pp_symbols_free (pp_symbols *); - -typedef struct pp_symbol_ -{ - slang_string name; - slang_string replacement; - pp_symbols parameters; -} pp_symbol; - -static GLvoid -pp_symbol_init (pp_symbol *self) -{ - slang_string_init (&self->name); - slang_string_init (&self->replacement); - pp_symbols_init (&self->parameters); -} - -static GLvoid -pp_symbol_free (pp_symbol *self) -{ - slang_string_free (&self->name); - slang_string_free (&self->replacement); - pp_symbols_free (&self->parameters); -} - -static GLvoid -pp_symbol_reset (pp_symbol *self) -{ - /* Leave symbol name intact. */ - slang_string_reset (&self->replacement); - pp_symbols_free (&self->parameters); - pp_symbols_init (&self->parameters); -} - -static GLvoid -pp_symbols_free (pp_symbols *self) -{ - GLuint i; - - for (i = 0; i < self->count; i++) - pp_symbol_free (&self->symbols[i]); - _mesa_free (self->symbols); -} - -static pp_symbol * -pp_symbols_push (pp_symbols *self) -{ - self->symbols = (pp_symbol *) (_mesa_realloc (self->symbols, self->count * sizeof (pp_symbol), - (self->count + 1) * sizeof (pp_symbol))); - if (self->symbols == NULL) - return NULL; - pp_symbol_init (&self->symbols[self->count]); - return &self->symbols[self->count++]; -} - -static GLboolean -pp_symbols_erase (pp_symbols *self, pp_symbol *symbol) -{ - assert (symbol >= self->symbols && symbol < self->symbols + self->count); - - self->count--; - pp_symbol_free (symbol); - if (symbol < self->symbols + self->count) - _mesa_memcpy (symbol, symbol + 1, sizeof (pp_symbol) * (self->symbols + self->count - symbol)); - self->symbols = (pp_symbol *) (_mesa_realloc (self->symbols, (self->count + 1) * sizeof (pp_symbol), - self->count * sizeof (pp_symbol))); - return self->symbols != NULL; -} - -static pp_symbol * -pp_symbols_find (pp_symbols *self, const char *name) -{ - GLuint i; - - for (i = 0; i < self->count; i++) - if (_mesa_strcmp (name, slang_string_cstr (&self->symbols[i].name)) == 0) - return &self->symbols[i]; - return NULL; -} - -/* - * The condition context of a single #if/#else/#endif level. Those can be nested, so there - * is a stack of condition contexts. - * There is a special global context on the bottom of the stack. It is there to simplify - * context handling. - */ - -typedef struct -{ - GLboolean current; /* The condition value of this level. */ - GLboolean effective; /* The effective product of current condition, outer level conditions - * and position within #if-#else-#endif sections. */ - GLboolean else_allowed; /* TRUE if in #if-#else section, FALSE if in #else-#endif section - * and for global context. */ - GLboolean endif_required; /* FALSE for global context only. */ -} pp_cond_ctx; - -/* Should be enuff. */ -#define CONDITION_STACK_SIZE 64 - -typedef struct -{ - pp_cond_ctx stack[CONDITION_STACK_SIZE]; - pp_cond_ctx *top; -} pp_cond_stack; - -static GLboolean -pp_cond_stack_push (pp_cond_stack *self, slang_info_log *elog) -{ - if (self->top == self->stack) { - slang_info_log_error (elog, "internal compiler error: preprocessor condition stack overflow."); - return GL_FALSE; - } - self->top--; - return GL_TRUE; -} - -static GLvoid -pp_cond_stack_reevaluate (pp_cond_stack *self) -{ - /* There must be at least 2 conditions on the stack - one global and one being evaluated. */ - assert (self->top <= &self->stack[CONDITION_STACK_SIZE - 2]); - - self->top->effective = self->top->current && self->top[1].effective; -} - - -/** - * Extension enables through #extension directive. - * NOTE: Currently, only enable/disable state is stored. - */ -typedef struct -{ - GLboolean ARB_draw_buffers; - GLboolean ARB_texture_rectangle; -} pp_ext; - - -/** - * Disable all extensions. Called at startup and on #extension all: disable. - */ -static GLvoid -pp_ext_disable_all(pp_ext *self) -{ - _mesa_memset(self, 0, sizeof(self)); -} - - -/** - * Called during preprocessor initialization to set the initial enable/disable - * state of extensions. - */ -static GLvoid -pp_ext_init(pp_ext *self, const struct gl_extensions *extensions) -{ - pp_ext_disable_all (self); - self->ARB_draw_buffers = GL_TRUE; - if (extensions->NV_texture_rectangle) - self->ARB_texture_rectangle = GL_TRUE; -} - -/** - * Called in response to #extension directives to enable/disable - * the named extension. - */ -static GLboolean -pp_ext_set(pp_ext *self, const char *name, GLboolean enable) -{ - if (_mesa_strcmp (name, "GL_ARB_draw_buffers") == 0) - self->ARB_draw_buffers = enable; - else if (_mesa_strcmp (name, "GL_ARB_texture_rectangle") == 0) - self->ARB_texture_rectangle = enable; - else - return GL_FALSE; - return GL_TRUE; -} - - -/** - * Called in response to #pragma. For example, "#pragma debug(on)" would - * call this function as pp_pragma("debug", "on"). - * \return GL_TRUE if pragma is valid, GL_FALSE if invalid - */ -static GLboolean -pp_pragma(struct gl_sl_pragmas *pragmas, const char *pragma, const char *param) -{ -#if 0 - printf("#pragma %s %s\n", pragma, param); -#endif - if (_mesa_strcmp(pragma, "optimize") == 0) { - if (!param) - return GL_FALSE; /* missing required param */ - if (_mesa_strcmp(param, "on") == 0) { - if (!pragmas->IgnoreOptimize) - pragmas->Optimize = GL_TRUE; - } - else if (_mesa_strcmp(param, "off") == 0) { - if (!pragmas->IgnoreOptimize) - pragmas->Optimize = GL_FALSE; - } - else { - return GL_FALSE; /* invalid param */ - } - } - else if (_mesa_strcmp(pragma, "debug") == 0) { - if (!param) - return GL_FALSE; /* missing required param */ - if (_mesa_strcmp(param, "on") == 0) { - if (!pragmas->IgnoreDebug) - pragmas->Debug = GL_TRUE; - } - else if (_mesa_strcmp(param, "off") == 0) { - if (!pragmas->IgnoreDebug) - pragmas->Debug = GL_FALSE; - } - else { - return GL_FALSE; /* invalid param */ - } - } - /* all other pragmas are silently ignored */ - return GL_TRUE; -} - - -/** - * The state of preprocessor: current line, file and version number, list - * of all defined macros and the #if/#endif context. - */ -typedef struct -{ - GLint line; - GLint file; - GLint version; - pp_symbols symbols; - pp_ext ext; - slang_info_log *elog; - pp_cond_stack cond; -} pp_state; - -static GLvoid -pp_state_init (pp_state *self, slang_info_log *elog, - const struct gl_extensions *extensions) -{ - self->line = 0; - self->file = 1; -#if FEATURE_es2_glsl - self->version = 100; -#else - self->version = 110; -#endif - pp_symbols_init (&self->symbols); - pp_ext_init (&self->ext, extensions); - self->elog = elog; - - /* Initialize condition stack and create the global context. */ - self->cond.top = &self->cond.stack[CONDITION_STACK_SIZE - 1]; - self->cond.top->current = GL_TRUE; - self->cond.top->effective = GL_TRUE; - self->cond.top->else_allowed = GL_FALSE; - self->cond.top->endif_required = GL_FALSE; -} - -static GLvoid -pp_state_free (pp_state *self) -{ - pp_symbols_free (&self->symbols); -} - -#define IS_FIRST_ID_CHAR(x) (((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') || (x) == '_') -#define IS_NEXT_ID_CHAR(x) (IS_FIRST_ID_CHAR(x) || ((x) >= '0' && (x) <= '9')) -#define IS_WHITE(x) ((x) == ' ' || (x) == '\n') -#define IS_NULL(x) ((x) == '\0') - -#define SKIP_WHITE(x) do { while (IS_WHITE(*(x))) (x)++; } while (GL_FALSE) - -typedef struct -{ - slang_string *output; - const char *input; - pp_state *state; -} expand_state; - -static GLboolean -expand_defined (expand_state *e, slang_string *buffer) -{ - GLboolean in_paren = GL_FALSE; - const char *id; - - /* Parse the optional opening parenthesis. */ - SKIP_WHITE(e->input); - if (*e->input == '(') { - e->input++; - in_paren = GL_TRUE; - SKIP_WHITE(e->input); - } - - /* Parse operand. */ - if (!IS_FIRST_ID_CHAR(*e->input)) { - slang_info_log_error (e->state->elog, - "preprocess error: identifier expected after operator 'defined'."); - return GL_FALSE; - } - slang_string_reset (buffer); - slang_string_pushc (buffer, *e->input++); - while (IS_NEXT_ID_CHAR(*e->input)) - slang_string_pushc (buffer, *e->input++); - id = slang_string_cstr (buffer); - - /* Check if the operand is defined. Output 1 if it is defined, output 0 if not. */ - if (pp_symbols_find (&e->state->symbols, id) == NULL) - slang_string_pushs (e->output, " 0 ", 3); - else - slang_string_pushs (e->output, " 1 ", 3); - - /* Parse the closing parentehesis if the opening one was there. */ - if (in_paren) { - SKIP_WHITE(e->input); - if (*e->input != ')') { - slang_info_log_error (e->state->elog, "preprocess error: ')' expected."); - return GL_FALSE; - } - e->input++; - SKIP_WHITE(e->input); - } - return GL_TRUE; -} - -static GLboolean -expand (expand_state *, pp_symbols *); - -static GLboolean -expand_symbol (expand_state *e, pp_symbol *symbol) -{ - expand_state es; - - /* If the macro has some parameters, we need to parse them. */ - if (symbol->parameters.count != 0) { - GLuint i; - - /* Parse the opening parenthesis. */ - SKIP_WHITE(e->input); - if (*e->input != '(') { - slang_info_log_error (e->state->elog, "preprocess error: '(' expected."); - return GL_FALSE; - } - e->input++; - SKIP_WHITE(e->input); - - /* Parse macro actual parameters. This can be anything, separated by a colon. - */ - for (i = 0; i < symbol->parameters.count; i++) { - GLuint nested_paren_count = 0; /* track number of nested parentheses */ - - if (*e->input == ')') { - slang_info_log_error (e->state->elog, "preprocess error: unexpected ')'."); - return GL_FALSE; - } - - /* Eat all characters up to the comma or closing parentheses. */ - pp_symbol_reset (&symbol->parameters.symbols[i]); - while (!IS_NULL(*e->input)) { - /* Exit loop only when all nested parens have been eaten. */ - if (nested_paren_count == 0 && (*e->input == ',' || *e->input == ')')) - break; - - /* Actually count nested parens here. */ - if (*e->input == '(') - nested_paren_count++; - else if (*e->input == ')') - nested_paren_count--; - - slang_string_pushc (&symbol->parameters.symbols[i].replacement, *e->input++); - } - - /* If it was not the last paremeter, skip the comma. Otherwise, skip the - * closing parentheses. */ - if (i + 1 == symbol->parameters.count) { - /* This is the last paremeter - skip the closing parentheses. */ - if (*e->input != ')') { - slang_info_log_error (e->state->elog, "preprocess error: ')' expected."); - return GL_FALSE; - } - e->input++; - SKIP_WHITE(e->input); - } - else { - /* Skip the separating comma. */ - if (*e->input != ',') { - slang_info_log_error (e->state->elog, "preprocess error: ',' expected."); - return GL_FALSE; - } - e->input++; - SKIP_WHITE(e->input); - } - } - } - - /* Expand the macro. Use its parameters as a priority symbol list to expand - * macro parameters correctly. */ - es.output = e->output; - es.input = slang_string_cstr (&symbol->replacement); - es.state = e->state; - slang_string_pushc (e->output, ' '); - if (!expand (&es, &symbol->parameters)) - return GL_FALSE; - slang_string_pushc (e->output, ' '); - return GL_TRUE; -} - -/* - * Function expand() expands source text from to . The expansion is made using - * the list passed in parameter. It allows us to expand macro formal parameters with - * actual parameters. The global list of symbols from pp state is used when doing a recursive - * call of expand(). - */ - -static GLboolean -expand (expand_state *e, pp_symbols *symbols) -{ - while (!IS_NULL(*e->input)) { - if (IS_FIRST_ID_CHAR(*e->input)) { - slang_string buffer; - const char *id; - - /* Parse the identifier. */ - slang_string_init (&buffer); - slang_string_pushc (&buffer, *e->input++); - while (IS_NEXT_ID_CHAR(*e->input)) - slang_string_pushc (&buffer, *e->input++); - id = slang_string_cstr (&buffer); - - /* Now check if the identifier is special in some way. The "defined" identifier is - * actually an operator that we must handle here and expand it either to " 0 " or " 1 ". - * The other identifiers start with "__" and we expand it to appropriate values - * taken from the preprocessor state. */ - if (_mesa_strcmp (id, "defined") == 0) { - if (!expand_defined (e, &buffer)) - return GL_FALSE; - } - else if (_mesa_strcmp (id, "__LINE__") == 0) { - slang_string_pushc (e->output, ' '); - slang_string_pushi (e->output, e->state->line); - slang_string_pushc (e->output, ' '); - } - else if (_mesa_strcmp (id, "__FILE__") == 0) { - slang_string_pushc (e->output, ' '); - slang_string_pushi (e->output, e->state->file); - slang_string_pushc (e->output, ' '); - } - else if (_mesa_strcmp (id, "__VERSION__") == 0) { - slang_string_pushc (e->output, ' '); - slang_string_pushi (e->output, e->state->version); - slang_string_pushc (e->output, ' '); - } -#if FEATURE_es2_glsl - else if (_mesa_strcmp (id, "GL_ES") == 0 || - _mesa_strcmp (id, "GL_FRAGMENT_PRECISION_HIGH") == 0) { - slang_string_pushc (e->output, ' '); - slang_string_pushi (e->output, '1'); - slang_string_pushc (e->output, ' '); - } -#endif - else { - pp_symbol *symbol; - - /* The list of symbols from take precedence over the list from . - * Note that in some cases this is the same list so avoid double look-up. */ - symbol = pp_symbols_find (symbols, id); - if (symbol == NULL && symbols != &e->state->symbols) - symbol = pp_symbols_find (&e->state->symbols, id); - - /* If the symbol was found, recursively expand its definition. */ - if (symbol != NULL) { - if (!expand_symbol (e, symbol)) { - slang_string_free (&buffer); - return GL_FALSE; - } - } - else { - slang_string_push (e->output, &buffer); - } - } - slang_string_free (&buffer); - } - else if (IS_WHITE(*e->input)) { - slang_string_pushc (e->output, *e->input++); - } - else { - while (!IS_WHITE(*e->input) && !IS_NULL(*e->input) && !IS_FIRST_ID_CHAR(*e->input)) - slang_string_pushc (e->output, *e->input++); - } - } - return GL_TRUE; -} - -static GLboolean -parse_if (slang_string *output, const byte *prod, GLuint *pi, GLint *result, pp_state *state, - grammar eid) -{ - const char *text; - GLuint len; - - text = (const char *) (&prod[*pi]); - len = _mesa_strlen (text); - - if (state->cond.top->effective) { - slang_string expr; - GLuint count; - GLint results[2]; - expand_state es; - - /* Expand the expression. */ - slang_string_init (&expr); - es.output = &expr; - es.input = text; - es.state = state; - if (!expand (&es, &state->symbols)) - return GL_FALSE; - - /* Execute the expression. */ - count = execute_expressions (output, eid, (const byte *) (slang_string_cstr (&expr)), - results, state->elog); - slang_string_free (&expr); - if (count != 1) - return GL_FALSE; - *result = results[0]; - } - else { - /* The directive is dead. */ - *result = 0; - } - - *pi += len + 1; - return GL_TRUE; -} - -#define ESCAPE_TOKEN 0 - -#define TOKEN_END 0 -#define TOKEN_DEFINE 1 -#define TOKEN_UNDEF 2 -#define TOKEN_IF 3 -#define TOKEN_ELSE 4 -#define TOKEN_ELIF 5 -#define TOKEN_ENDIF 6 -#define TOKEN_ERROR 7 -#define TOKEN_PRAGMA 8 -#define TOKEN_EXTENSION 9 -#define TOKEN_LINE 10 - -#define PARAM_END 0 -#define PARAM_PARAMETER 1 - -#define BEHAVIOR_REQUIRE 1 -#define BEHAVIOR_ENABLE 2 -#define BEHAVIOR_WARN 3 -#define BEHAVIOR_DISABLE 4 - -#define PRAGMA_NO_PARAM 0 -#define PRAGMA_PARAM 1 - - -static GLboolean -preprocess_source (slang_string *output, const char *source, - grammar pid, grammar eid, - slang_info_log *elog, - const struct gl_extensions *extensions, - struct gl_sl_pragmas *pragmas) -{ - static const char *predefined[] = { - "__FILE__", - "__LINE__", - "__VERSION__", -#if FEATURE_es2_glsl - "GL_ES", - "GL_FRAGMENT_PRECISION_HIGH", -#endif - NULL - }; - byte *prod; - GLuint size, i; - pp_state state; - - if (!grammar_fast_check (pid, (const byte *) (source), &prod, &size, 65536)) { - grammar_error_to_log (elog); - return GL_FALSE; - } - - pp_state_init (&state, elog, extensions); - - /* add the predefined symbols to the symbol table */ - for (i = 0; predefined[i]; i++) { - pp_symbol *symbol = NULL; - symbol = pp_symbols_push(&state.symbols); - assert(symbol); - slang_string_pushs(&symbol->name, - predefined[i], _mesa_strlen(predefined[i])); - } - - i = 0; - while (i < size) { - if (prod[i] != ESCAPE_TOKEN) { - if (state.cond.top->effective) { - slang_string input; - expand_state es; - - /* Eat only one line of source code to expand it. - * FIXME: This approach has one drawback. If a macro with parameters spans across - * multiple lines, the preprocessor will raise an error. */ - slang_string_init (&input); - while (prod[i] != '\0' && prod[i] != '\n') - slang_string_pushc (&input, prod[i++]); - if (prod[i] != '\0') - slang_string_pushc (&input, prod[i++]); - - /* Increment line number. */ - state.line++; - - es.output = output; - es.input = slang_string_cstr (&input); - es.state = &state; - if (!expand (&es, &state.symbols)) - goto error; - - slang_string_free (&input); - } - else { - /* Condition stack is disabled - keep track on line numbers and output only newlines. */ - if (prod[i] == '\n') { - state.line++; - /*pp_annotate (output, "%c", prod[i]);*/ - } - else { - /*pp_annotate (output, "%c", prod[i]);*/ - } - i++; - } - } - else { - const char *id; - GLuint idlen; - GLubyte token; - - i++; - token = prod[i++]; - switch (token) { - - case TOKEN_END: - /* End of source string. - * Check if all #ifs have been terminated by matching #endifs. - * On condition stack there should be only the global condition context. */ - if (state.cond.top->endif_required) { - slang_info_log_error (elog, "end of source without matching #endif."); - return GL_FALSE; - } - break; - - case TOKEN_DEFINE: - { - pp_symbol *symbol = NULL; - - /* Parse macro name. */ - id = (const char *) (&prod[i]); - idlen = _mesa_strlen (id); - if (state.cond.top->effective) { - pp_annotate (output, "// #define %s(", id); - - /* If the symbol is already defined, override it. */ - symbol = pp_symbols_find (&state.symbols, id); - if (symbol == NULL) { - symbol = pp_symbols_push (&state.symbols); - if (symbol == NULL) - goto error; - slang_string_pushs (&symbol->name, id, idlen); - } - else { - pp_symbol_reset (symbol); - } - } - i += idlen + 1; - - /* Parse optional macro parameters. */ - while (prod[i++] != PARAM_END) { - pp_symbol *param; - - id = (const char *) (&prod[i]); - idlen = _mesa_strlen (id); - if (state.cond.top->effective) { - pp_annotate (output, "%s, ", id); - param = pp_symbols_push (&symbol->parameters); - if (param == NULL) - goto error; - slang_string_pushs (¶m->name, id, idlen); - } - i += idlen + 1; - } - - /* Parse macro replacement. */ - id = (const char *) (&prod[i]); - idlen = _mesa_strlen (id); - if (state.cond.top->effective) { - slang_string replacement; - expand_state es; - - pp_annotate (output, ") %s", id); - - slang_string_init(&replacement); - slang_string_pushs(&replacement, id, idlen); - - /* Expand macro replacement. */ - es.output = &symbol->replacement; - es.input = slang_string_cstr(&replacement); - es.state = &state; - if (!expand(&es, &state.symbols)) { - slang_string_free(&replacement); - goto error; - } - slang_string_free(&replacement); - } - i += idlen + 1; - } - break; - - case TOKEN_UNDEF: - id = (const char *) (&prod[i]); - i += _mesa_strlen (id) + 1; - if (state.cond.top->effective) { - pp_symbol *symbol; - - pp_annotate (output, "// #undef %s", id); - /* Try to find symbol with given name and remove it. */ - symbol = pp_symbols_find (&state.symbols, id); - if (symbol != NULL) - if (!pp_symbols_erase (&state.symbols, symbol)) - goto error; - } - break; - - case TOKEN_IF: - { - GLint result; - - /* Parse #if expression end execute it. */ - pp_annotate (output, "// #if "); - if (!parse_if (output, prod, &i, &result, &state, eid)) - goto error; - - /* Push new condition on the stack. */ - if (!pp_cond_stack_push (&state.cond, state.elog)) - goto error; - state.cond.top->current = result ? GL_TRUE : GL_FALSE; - state.cond.top->else_allowed = GL_TRUE; - state.cond.top->endif_required = GL_TRUE; - pp_cond_stack_reevaluate (&state.cond); - } - break; - - case TOKEN_ELSE: - /* Check if #else is alloved here. */ - if (!state.cond.top->else_allowed) { - slang_info_log_error (elog, "#else without matching #if."); - goto error; - } - - /* Negate current condition and reevaluate it. */ - state.cond.top->current = !state.cond.top->current; - state.cond.top->else_allowed = GL_FALSE; - pp_cond_stack_reevaluate (&state.cond); - if (state.cond.top->effective) - pp_annotate (output, "// #else"); - break; - - case TOKEN_ELIF: - /* Check if #elif is alloved here. */ - if (!state.cond.top->else_allowed) { - slang_info_log_error (elog, "#elif without matching #if."); - goto error; - } - - /* Negate current condition and reevaluate it. */ - state.cond.top->current = !state.cond.top->current; - pp_cond_stack_reevaluate (&state.cond); - - if (state.cond.top->effective) - pp_annotate (output, "// #elif "); - - { - GLint result; - - /* Parse #elif expression end execute it. */ - if (!parse_if (output, prod, &i, &result, &state, eid)) - goto error; - - /* Update current condition and reevaluate it. */ - state.cond.top->current = result ? GL_TRUE : GL_FALSE; - pp_cond_stack_reevaluate (&state.cond); - } - break; - - case TOKEN_ENDIF: - /* Check if #endif is alloved here. */ - if (!state.cond.top->endif_required) { - slang_info_log_error (elog, "#endif without matching #if."); - goto error; - } - - /* Pop the condition off the stack. */ - state.cond.top++; - if (state.cond.top->effective) - pp_annotate (output, "// #endif"); - break; - - case TOKEN_EXTENSION: - /* Parse the extension name. */ - id = (const char *) (&prod[i]); - i += _mesa_strlen (id) + 1; - if (state.cond.top->effective) - pp_annotate (output, "// #extension %s: ", id); - - /* Parse and apply extension behavior. */ - if (state.cond.top->effective) { - switch (prod[i++]) { - - case BEHAVIOR_REQUIRE: - pp_annotate (output, "require"); - if (!pp_ext_set (&state.ext, id, GL_TRUE)) { - if (_mesa_strcmp (id, "all") == 0) { - slang_info_log_error (elog, "require: bad behavior for #extension all."); - goto error; - } - else { - slang_info_log_error (elog, "%s: required extension is not supported.", id); - goto error; - } - } - break; - - case BEHAVIOR_ENABLE: - pp_annotate (output, "enable"); - if (!pp_ext_set (&state.ext, id, GL_TRUE)) { - if (_mesa_strcmp (id, "all") == 0) { - slang_info_log_error (elog, "enable: bad behavior for #extension all."); - goto error; - } - else { - slang_info_log_warning (elog, "%s: enabled extension is not supported.", id); - } - } - break; - - case BEHAVIOR_WARN: - pp_annotate (output, "warn"); - if (!pp_ext_set (&state.ext, id, GL_TRUE)) { - if (_mesa_strcmp (id, "all") != 0) { - slang_info_log_warning (elog, "%s: enabled extension is not supported.", id); - } - } - break; - - case BEHAVIOR_DISABLE: - pp_annotate (output, "disable"); - if (!pp_ext_set (&state.ext, id, GL_FALSE)) { - if (_mesa_strcmp (id, "all") == 0) { - pp_ext_disable_all (&state.ext); - } - else { - slang_info_log_warning (elog, "%s: disabled extension is not supported.", id); - } - } - break; - - default: - assert (0); - } - } - break; - - case TOKEN_PRAGMA: - { - GLint have_param; - const char *pragma, *param; - - pragma = (const char *) (&prod[i]); - i += _mesa_strlen(pragma) + 1; - have_param = (prod[i++] == PRAGMA_PARAM); - if (have_param) { - param = (const char *) (&prod[i]); - i += _mesa_strlen(param) + 1; - } - else { - param = NULL; - } - pp_pragma(pragmas, pragma, param); - } - break; - - case TOKEN_LINE: - id = (const char *) (&prod[i]); - i += _mesa_strlen (id) + 1; - - if (state.cond.top->effective) { - slang_string buffer; - GLuint count; - GLint results[2]; - expand_state es; - - slang_string_init (&buffer); - state.line++; - es.output = &buffer; - es.input = id; - es.state = &state; - if (!expand (&es, &state.symbols)) - goto error; - - pp_annotate (output, "// #line "); - count = execute_expressions (output, eid, - (const byte *) (slang_string_cstr (&buffer)), - results, state.elog); - slang_string_free (&buffer); - if (count == 0) - goto error; - - state.line = results[0] - 1; - if (count == 2) - state.file = results[1]; - } - break; - } - } - } - - /* Check for missing #endifs. */ - if (state.cond.top->endif_required) { - slang_info_log_error (elog, "#endif expected but end of source found."); - goto error; - } - - grammar_alloc_free(prod); - pp_state_free (&state); - return GL_TRUE; - -error: - grammar_alloc_free(prod); - pp_state_free (&state); - return GL_FALSE; -} - - -/** - * Remove the continuation characters from the input string. - * This is the very first step in preprocessing and is effective - * even inside comment blocks. - * If there is a whitespace between a backslash and a newline, - * this is not considered as a line continuation. - * \return GL_TRUE for success, GL_FALSE otherwise. - */ -static GLboolean -_slang_preprocess_backslashes(slang_string *output, - const char *input) -{ - while (*input) { - if (input[0] == '\\') { - /* If a newline follows, eat the backslash and the newline. */ - if (input[1] == '\r') { - if (input[2] == '\n') { - input += 3; - } else { - input += 2; - } - } else if (input[1] == '\n') { - if (input[2] == '\r') { - input += 3; - } else { - input += 2; - } - } else { - /* Leave the backslash alone. */ - slang_string_pushc(output, *input++); - } - } else { - slang_string_pushc(output, *input++); - } - } - return GL_TRUE; -} - - -/** - * Run preprocessor on source code. - * \param extensions indicates which GL extensions are enabled - * \param output the post-process results - * \param input the input text - * \param elog log to record warnings, errors - * \param extensions out extension settings - * \param pragmas in/out #pragma settings - * \return GL_TRUE for success, GL_FALSE for error - */ -GLboolean -_slang_preprocess_directives(slang_string *output, - const char *input, - slang_info_log *elog, - const struct gl_extensions *extensions, - struct gl_sl_pragmas *pragmas) -{ - grammar pid, eid; - GLboolean success; - slang_string without_backslashes; - - pid = grammar_load_from_text ((const byte *) (slang_pp_directives_syn)); - if (pid == 0) { - grammar_error_to_log (elog); - return GL_FALSE; - } - eid = grammar_load_from_text ((const byte *) (slang_pp_expression_syn)); - if (eid == 0) { - grammar_error_to_log (elog); - grammar_destroy (pid); - return GL_FALSE; - } - - slang_string_init(&without_backslashes); - success = _slang_preprocess_backslashes(&without_backslashes, input); - - if (0) { - _mesa_printf("Pre-processed shader:\n"); - _mesa_printf("%s", slang_string_cstr(&without_backslashes)); - _mesa_printf("----------------------\n"); - } - - if (success) { - success = preprocess_source(output, - slang_string_cstr(&without_backslashes), - pid, - eid, - elog, - extensions, - pragmas); - } - - slang_string_free(&without_backslashes); - grammar_destroy (eid); - grammar_destroy (pid); - - if (0) { - _mesa_printf("Post-processed shader:\n"); - _mesa_printf("%s", slang_string_cstr(output)); - _mesa_printf("----------------------\n"); - } - - return success; -} - diff --git a/mesalib/src/mesa/shader/slang/slang_preprocess.h b/mesalib/src/mesa/shader/slang/slang_preprocess.h deleted file mode 100644 index f344820da..000000000 --- a/mesalib/src/mesa/shader/slang/slang_preprocess.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Mesa 3-D graphics library - * - * Copyright (C) 2005-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -#ifndef SLANG_PREPROCESS_H -#define SLANG_PREPROCESS_H - -#include "slang_compile.h" -#include "slang_log.h" - - -extern GLboolean -_slang_preprocess_version (const char *, GLuint *, GLuint *, slang_info_log *); - -extern GLboolean -_slang_preprocess_directives(slang_string *output, const char *input, - slang_info_log *, - const struct gl_extensions *extensions, - struct gl_sl_pragmas *pragmas); - -#endif /* SLANG_PREPROCESS_H */ diff --git a/mesalib/src/mesa/shader/slang/slang_print.c b/mesalib/src/mesa/shader/slang/slang_print.c index 98c787753..3c75523c4 100644 --- a/mesalib/src/mesa/shader/slang/slang_print.c +++ b/mesalib/src/mesa/shader/slang/slang_print.c @@ -119,22 +119,22 @@ print_type(const slang_fully_specified_type *t) case SLANG_SPEC_MAT43: printf("mat4x3"); break; - case SLANG_SPEC_SAMPLER1D: + case SLANG_SPEC_SAMPLER_1D: printf("sampler1D"); break; - case SLANG_SPEC_SAMPLER2D: + case SLANG_SPEC_SAMPLER_2D: printf("sampler2D"); break; - case SLANG_SPEC_SAMPLER3D: + case SLANG_SPEC_SAMPLER_3D: printf("sampler3D"); break; - case SLANG_SPEC_SAMPLERCUBE: + case SLANG_SPEC_SAMPLER_CUBE: printf("samplerCube"); break; - case SLANG_SPEC_SAMPLER1DSHADOW: + case SLANG_SPEC_SAMPLER_1D_SHADOW: printf("sampler1DShadow"); break; - case SLANG_SPEC_SAMPLER2DSHADOW: + case SLANG_SPEC_SAMPLER_2D_SHADOW: printf("sampler2DShadow"); break; case SLANG_SPEC_STRUCT: @@ -698,7 +698,7 @@ slang_print_function(const slang_function *f, GLboolean body) GLuint i; #if 0 - if (_mesa_strcmp((char *) f->header.a_name, "main") != 0) + if (strcmp((char *) f->header.a_name, "main") != 0) return; #endif @@ -783,21 +783,21 @@ slang_type_string(slang_type_specifier_type t) return "mat3"; case SLANG_SPEC_MAT4: return "mat4"; - case SLANG_SPEC_SAMPLER1D: + case SLANG_SPEC_SAMPLER_1D: return "sampler1D"; - case SLANG_SPEC_SAMPLER2D: + case SLANG_SPEC_SAMPLER_2D: return "sampler2D"; - case SLANG_SPEC_SAMPLER3D: + case SLANG_SPEC_SAMPLER_3D: return "sampler3D"; - case SLANG_SPEC_SAMPLERCUBE: + case SLANG_SPEC_SAMPLER_CUBE: return "samplerCube"; - case SLANG_SPEC_SAMPLER1DSHADOW: + case SLANG_SPEC_SAMPLER_1D_SHADOW: return "sampler1DShadow"; - case SLANG_SPEC_SAMPLER2DSHADOW: + case SLANG_SPEC_SAMPLER_2D_SHADOW: return "sampler2DShadow"; - case SLANG_SPEC_SAMPLER2DRECT: + case SLANG_SPEC_SAMPLER_RECT: return "sampler2DRect"; - case SLANG_SPEC_SAMPLER2DRECTSHADOW: + case SLANG_SPEC_SAMPLER_RECT_SHADOW: return "sampler2DRectShadow"; case SLANG_SPEC_STRUCT: return "struct"; diff --git a/mesalib/src/mesa/shader/slang/slang_storage.c b/mesalib/src/mesa/shader/slang/slang_storage.c index e8b0fb774..656e15670 100644 --- a/mesalib/src/mesa/shader/slang/slang_storage.c +++ b/mesalib/src/mesa/shader/slang/slang_storage.c @@ -199,14 +199,19 @@ _slang_aggregate_variable(slang_storage_aggregate * agg, case SLANG_SPEC_MAT43: return aggregate_matrix(agg, SLANG_STORE_FLOAT, 4, 3); - case SLANG_SPEC_SAMPLER1D: - case SLANG_SPEC_SAMPLER2D: - case SLANG_SPEC_SAMPLER3D: - case SLANG_SPEC_SAMPLERCUBE: - case SLANG_SPEC_SAMPLER1DSHADOW: - case SLANG_SPEC_SAMPLER2DSHADOW: - case SLANG_SPEC_SAMPLER2DRECT: - case SLANG_SPEC_SAMPLER2DRECTSHADOW: + case SLANG_SPEC_SAMPLER_1D: + case SLANG_SPEC_SAMPLER_2D: + case SLANG_SPEC_SAMPLER_3D: + case SLANG_SPEC_SAMPLER_CUBE: + case SLANG_SPEC_SAMPLER_1D_SHADOW: + case SLANG_SPEC_SAMPLER_2D_SHADOW: + case SLANG_SPEC_SAMPLER_RECT: + case SLANG_SPEC_SAMPLER_RECT_SHADOW: + case SLANG_SPEC_SAMPLER_1D_ARRAY: + case SLANG_SPEC_SAMPLER_2D_ARRAY: + case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW: + case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW: + return aggregate_vector(agg, SLANG_STORE_INT, 1); case SLANG_SPEC_STRUCT: return aggregate_variables(agg, spec->_struct->fields, funcs, structs, diff --git a/mesalib/src/mesa/shader/slang/slang_typeinfo.c b/mesalib/src/mesa/shader/slang/slang_typeinfo.c index 4a48bc8b8..0f96768b0 100644 --- a/mesalib/src/mesa/shader/slang/slang_typeinfo.c +++ b/mesalib/src/mesa/shader/slang/slang_typeinfo.c @@ -195,14 +195,18 @@ static const type_specifier_type_name type_specifier_type_names[] = { {"mat4x2", SLANG_SPEC_MAT42}, {"mat3x4", SLANG_SPEC_MAT34}, {"mat4x3", SLANG_SPEC_MAT43}, - {"sampler1D", SLANG_SPEC_SAMPLER1D}, - {"sampler2D", SLANG_SPEC_SAMPLER2D}, - {"sampler3D", SLANG_SPEC_SAMPLER3D}, - {"samplerCube", SLANG_SPEC_SAMPLERCUBE}, - {"sampler1DShadow", SLANG_SPEC_SAMPLER1DSHADOW}, - {"sampler2DShadow", SLANG_SPEC_SAMPLER2DSHADOW}, - {"sampler2DRect", SLANG_SPEC_SAMPLER2DRECT}, - {"sampler2DRectShadow", SLANG_SPEC_SAMPLER2DRECTSHADOW}, + {"sampler1D", SLANG_SPEC_SAMPLER_1D}, + {"sampler2D", SLANG_SPEC_SAMPLER_2D}, + {"sampler3D", SLANG_SPEC_SAMPLER_3D}, + {"samplerCube", SLANG_SPEC_SAMPLER_CUBE}, + {"sampler1DShadow", SLANG_SPEC_SAMPLER_1D_SHADOW}, + {"sampler2DShadow", SLANG_SPEC_SAMPLER_2D_SHADOW}, + {"sampler2DRect", SLANG_SPEC_SAMPLER_RECT}, + {"sampler2DRectShadow", SLANG_SPEC_SAMPLER_RECT_SHADOW}, + {"sampler1DArray", SLANG_SPEC_SAMPLER_1D_ARRAY}, + {"sampler2DArray", SLANG_SPEC_SAMPLER_2D_ARRAY}, + {"sampler1DArrayShadow", SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW}, + {"sampler2DArrayShadow", SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW}, {NULL, SLANG_SPEC_VOID} }; @@ -258,6 +262,7 @@ slang_fully_specified_type_copy(slang_fully_specified_type * x, z.precision = y->precision; z.variant = y->variant; z.centroid = y->centroid; + z.layout = y->layout; z.array_len = y->array_len; if (!slang_type_specifier_copy(&z.specifier, &y->specifier)) { slang_fully_specified_type_destruct(&z); @@ -269,6 +274,32 @@ slang_fully_specified_type_copy(slang_fully_specified_type * x, } +/** + * Test if two fully specified types are compatible. This is a bit + * looser than testing for equality. We don't check the precision, + * variant, centroid, etc. information. + * XXX this may need some tweaking. + */ +GLboolean +slang_fully_specified_types_compatible(const slang_fully_specified_type * x, + const slang_fully_specified_type * y) +{ + if (!slang_type_specifier_equal(&x->specifier, &y->specifier)) + return GL_FALSE; + + if (x->qualifier == SLANG_QUAL_FIXEDINPUT && + y->qualifier == SLANG_QUAL_VARYING) + ; /* ok */ + else if (x->qualifier != y->qualifier) + return GL_FALSE; + + /* Note: don't compare precision, variant, centroid */ + + /* XXX array length? */ + + return GL_TRUE; +} + GLvoid slang_type_specifier_ctr(slang_type_specifier * self) @@ -392,7 +423,7 @@ slang_type_specifier_compatible(const slang_type_specifier * x, GLboolean slang_typeinfo_construct(slang_typeinfo * ti) { - _mesa_bzero(ti, sizeof(*ti)); + memset(ti, 0, sizeof(*ti)); slang_type_specifier_ctr(&ti->spec); ti->array_len = 0; return GL_TRUE; @@ -1111,22 +1142,30 @@ _slang_gltype_from_specifier(const slang_type_specifier *type) return GL_FLOAT_MAT3x4; case SLANG_SPEC_MAT43: return GL_FLOAT_MAT4x3; - case SLANG_SPEC_SAMPLER1D: + case SLANG_SPEC_SAMPLER_1D: return GL_SAMPLER_1D; - case SLANG_SPEC_SAMPLER2D: + case SLANG_SPEC_SAMPLER_2D: return GL_SAMPLER_2D; - case SLANG_SPEC_SAMPLER3D: + case SLANG_SPEC_SAMPLER_3D: return GL_SAMPLER_3D; - case SLANG_SPEC_SAMPLERCUBE: + case SLANG_SPEC_SAMPLER_CUBE: return GL_SAMPLER_CUBE; - case SLANG_SPEC_SAMPLER1DSHADOW: + case SLANG_SPEC_SAMPLER_1D_SHADOW: return GL_SAMPLER_1D_SHADOW; - case SLANG_SPEC_SAMPLER2DSHADOW: + case SLANG_SPEC_SAMPLER_2D_SHADOW: return GL_SAMPLER_2D_SHADOW; - case SLANG_SPEC_SAMPLER2DRECT: + case SLANG_SPEC_SAMPLER_RECT: return GL_SAMPLER_2D_RECT_ARB; - case SLANG_SPEC_SAMPLER2DRECTSHADOW: + case SLANG_SPEC_SAMPLER_RECT_SHADOW: return GL_SAMPLER_2D_RECT_SHADOW_ARB; + case SLANG_SPEC_SAMPLER_1D_ARRAY: + return GL_SAMPLER_1D_ARRAY_EXT; + case SLANG_SPEC_SAMPLER_2D_ARRAY: + return GL_SAMPLER_2D_ARRAY_EXT; + case SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW: + return GL_SAMPLER_1D_ARRAY_SHADOW_EXT; + case SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW: + return GL_SAMPLER_2D_ARRAY_SHADOW_EXT; case SLANG_SPEC_ARRAY: return _slang_gltype_from_specifier(type->_array); case SLANG_SPEC_STRUCT: diff --git a/mesalib/src/mesa/shader/slang/slang_typeinfo.h b/mesalib/src/mesa/shader/slang/slang_typeinfo.h index e6fecd350..9a6407a31 100644 --- a/mesalib/src/mesa/shader/slang/slang_typeinfo.h +++ b/mesalib/src/mesa/shader/slang/slang_typeinfo.h @@ -68,6 +68,18 @@ typedef enum slang_type_centroid_ } slang_type_centroid; +/** + * These only apply to gl_FragCoord, but other layout qualifiers may + * appear in the future. + */ +typedef enum slang_layout_qualifier_ +{ + SLANG_LAYOUT_NONE = 0x0, + SLANG_LAYOUT_UPPER_LEFT_BIT = 0x1, + SLANG_LAYOUT_PIXEL_CENTER_INTEGER_BIT = 0x2 +} slang_layout_qualifier; + + typedef enum slang_type_qualifier_ { SLANG_QUAL_NONE, @@ -118,14 +130,18 @@ typedef enum slang_type_specifier_type_ SLANG_SPEC_MAT42, SLANG_SPEC_MAT34, SLANG_SPEC_MAT43, - SLANG_SPEC_SAMPLER1D, - SLANG_SPEC_SAMPLER2D, - SLANG_SPEC_SAMPLER3D, - SLANG_SPEC_SAMPLERCUBE, - SLANG_SPEC_SAMPLER2DRECT, - SLANG_SPEC_SAMPLER1DSHADOW, - SLANG_SPEC_SAMPLER2DSHADOW, - SLANG_SPEC_SAMPLER2DRECTSHADOW, + SLANG_SPEC_SAMPLER_1D, + SLANG_SPEC_SAMPLER_2D, + SLANG_SPEC_SAMPLER_3D, + SLANG_SPEC_SAMPLER_CUBE, + SLANG_SPEC_SAMPLER_RECT, + SLANG_SPEC_SAMPLER_1D_SHADOW, + SLANG_SPEC_SAMPLER_2D_SHADOW, + SLANG_SPEC_SAMPLER_RECT_SHADOW, + SLANG_SPEC_SAMPLER_1D_ARRAY, + SLANG_SPEC_SAMPLER_2D_ARRAY, + SLANG_SPEC_SAMPLER_1D_ARRAY_SHADOW, + SLANG_SPEC_SAMPLER_2D_ARRAY_SHADOW, SLANG_SPEC_STRUCT, SLANG_SPEC_ARRAY } slang_type_specifier_type; @@ -170,8 +186,8 @@ slang_type_specifier_equal(const slang_type_specifier *, extern GLboolean -slang_type_specifier_compatible(const slang_type_specifier * x, - const slang_type_specifier * y); +slang_type_specifier_compatible(const slang_type_specifier *x, + const slang_type_specifier *y); typedef struct slang_fully_specified_type_ @@ -181,6 +197,7 @@ typedef struct slang_fully_specified_type_ slang_type_precision precision; slang_type_variant variant; slang_type_centroid centroid; + slang_layout_qualifier layout; GLint array_len; /**< -1 if not an array type */ } slang_fully_specified_type; @@ -194,6 +211,9 @@ extern int slang_fully_specified_type_copy(slang_fully_specified_type *, const slang_fully_specified_type *); +GLboolean +slang_fully_specified_types_compatible(const slang_fully_specified_type * x, + const slang_fully_specified_type * y); typedef struct slang_typeinfo_ diff --git a/mesalib/src/mesa/shader/slang/slang_utility.c b/mesalib/src/mesa/shader/slang/slang_utility.c index 3631e32b3..e77404f69 100644 --- a/mesalib/src/mesa/shader/slang/slang_utility.c +++ b/mesalib/src/mesa/shader/slang/slang_utility.c @@ -35,7 +35,7 @@ char * slang_string_concat (char *dst, const char *src) { - return _mesa_strcpy (dst + _mesa_strlen (dst), src); + return strcpy (dst + strlen (dst), src); } @@ -54,7 +54,7 @@ GLvoid slang_string_free (slang_string *self) { if (self->data != NULL) - _mesa_free (self->data); + free(self->data); } GLvoid @@ -92,7 +92,7 @@ slang_string_push (slang_string *self, const slang_string *str) return; } if (grow (self, self->length + str->length)) { - _mesa_memcpy (&self->data[self->length], str->data, str->length); + memcpy (&self->data[self->length], str->data, str->length); self->length += str->length; } } @@ -110,7 +110,7 @@ GLvoid slang_string_pushs (slang_string *self, const char *cstr, GLuint len) { if (grow (self, self->length + len)) { - _mesa_memcpy (&self->data[self->length], cstr, len); + memcpy (&self->data[self->length], cstr, len); self->length += len; } } @@ -120,7 +120,7 @@ slang_string_pushi (slang_string *self, GLint i) { char buffer[12]; - _mesa_sprintf (buffer, "%d", i); + sprintf (buffer, "%d", i); slang_string_pushs (self, buffer, strlen (buffer)); } diff --git a/mesalib/src/mesa/shader/slang/slang_utility.h b/mesalib/src/mesa/shader/slang/slang_utility.h index 032c56181..2c0d0bcbb 100644 --- a/mesalib/src/mesa/shader/slang/slang_utility.h +++ b/mesalib/src/mesa/shader/slang/slang_utility.h @@ -32,9 +32,9 @@ #define static_assert(expr) do { int _array[(expr) ? 1 : -1]; (void) _array[0]; } while (0) -#define slang_string_compare(str1, str2) _mesa_strcmp (str1, str2) -#define slang_string_copy(dst, src) _mesa_strcpy (dst, src) -#define slang_string_length(str) _mesa_strlen (str) +#define slang_string_compare(str1, str2) strcmp (str1, str2) +#define slang_string_copy(dst, src) strcpy (dst, src) +#define slang_string_length(str) strlen (str) char *slang_string_concat (char *, const char *); diff --git a/mesalib/src/mesa/shader/symbol_table.c b/mesalib/src/mesa/shader/symbol_table.c index 1f6d9b844..6a5d68689 100644 --- a/mesalib/src/mesa/shader/symbol_table.c +++ b/mesalib/src/mesa/shader/symbol_table.c @@ -354,7 +354,7 @@ _mesa_symbol_table_dtor(struct _mesa_symbol_table *table) for (hdr = table->hdr; hdr != NULL; hdr = next) { next = hdr->next; - _mesa_free(hdr); + free(hdr); } hash_table_dtor(table->ht); diff --git a/mesalib/src/mesa/sources.mak b/mesalib/src/mesa/sources.mak index a0d7dbbac..9f2e4e515 100644 --- a/mesalib/src/mesa/sources.mak +++ b/mesalib/src/mesa/sources.mak @@ -15,6 +15,7 @@ MAIN_SOURCES = \ main/clear.c \ main/clip.c \ main/colortab.c \ + main/condrender.c \ main/context.c \ main/convolve.c \ main/cpuinfo.c \ @@ -80,13 +81,15 @@ MAIN_SOURCES = \ main/texstate.c \ main/texstore.c \ main/varray.c \ + main/version.c \ main/viewport.c \ main/vtxfmt.c GLAPI_SOURCES = \ - main/dispatch.c \ glapi/glapi.c \ + glapi/glapi_dispatch.c \ glapi/glapi_getproc.c \ + glapi/glapi_nop.c \ glapi/glthread.c MATH_SOURCES = \ @@ -190,6 +193,7 @@ STATETRACKER_SOURCES = \ state_tracker/st_cb_blit.c \ state_tracker/st_cb_bufferobjects.c \ state_tracker/st_cb_clear.c \ + state_tracker/st_cb_condrender.c \ state_tracker/st_cb_flush.c \ state_tracker/st_cb_drawpixels.c \ state_tracker/st_cb_fbo.c \ @@ -200,8 +204,6 @@ STATETRACKER_SOURCES = \ state_tracker/st_cb_readpixels.c \ state_tracker/st_cb_strings.c \ state_tracker/st_cb_texture.c \ - state_tracker/st_cb_viewport.c \ - state_tracker/st_api.c \ state_tracker/st_context.c \ state_tracker/st_debug.c \ state_tracker/st_draw.c \ @@ -218,7 +220,6 @@ SHADER_SOURCES = \ shader/arbprogparse.c \ shader/arbprogram.c \ shader/atifragshader.c \ - shader/grammar/grammar_mesa.c \ shader/hash_table.c \ shader/lex.yy.c \ shader/nvfragparse.c \ @@ -255,7 +256,6 @@ SLANG_SOURCES = \ shader/slang/slang_link.c \ shader/slang/slang_log.c \ shader/slang/slang_mem.c \ - shader/slang/slang_preprocess.c \ shader/slang/slang_print.c \ shader/slang/slang_simplify.c \ shader/slang/slang_storage.c \ @@ -365,6 +365,12 @@ GLAPI_OBJECTS = \ COMMON_DRIVER_OBJECTS = $(COMMON_DRIVER_SOURCES:.c=.o) +### Other archives/libraries + +GLSL_LIBS = \ + $(TOP)/src/glsl/pp/libglslpp.a \ + $(TOP)/src/glsl/cl/libglslcl.a + ### Include directories diff --git a/mesalib/src/mesa/swrast/s_aaline.c b/mesalib/src/mesa/swrast/s_aaline.c index 9bfa8f2e6..6ba4604e6 100644 --- a/mesalib/src/mesa/swrast/s_aaline.c +++ b/mesalib/src/mesa/swrast/s_aaline.c @@ -59,10 +59,8 @@ struct LineInfo /* DO_Z */ GLfloat zPlane[4]; - /* DO_RGBA */ + /* DO_RGBA - always enabled */ GLfloat rPlane[4], gPlane[4], bPlane[4], aPlane[4]; - /* DO_INDEX */ - GLfloat iPlane[4]; /* DO_ATTRIBS */ GLfloat wPlane[4]; GLfloat attrPlane[FRAG_ATTRIB_MAX][4][4]; @@ -325,20 +323,6 @@ compute_coveragef(const struct LineInfo *info, } -/** - * Compute coverage value for color index mode. - * XXX this may not be quite correct. - * \return coverage in [0,15]. - */ -static GLfloat -compute_coveragei(const struct LineInfo *info, - GLint winx, GLint winy) -{ - return compute_coveragef(info, winx, winy) * 15.0F; -} - - - typedef void (*plot_func)(GLcontext *ctx, struct LineInfo *line, int ix, int iy); @@ -475,22 +459,13 @@ segment(GLcontext *ctx, } -#define NAME(x) aa_ci_##x -#define DO_Z -#define DO_ATTRIBS /* for fog */ -#define DO_INDEX -#include "s_aalinetemp.h" - - #define NAME(x) aa_rgba_##x #define DO_Z -#define DO_RGBA #include "s_aalinetemp.h" #define NAME(x) aa_general_rgba_##x #define DO_Z -#define DO_RGBA #define DO_ATTRIBS #include "s_aalinetemp.h" @@ -503,22 +478,15 @@ _swrast_choose_aa_line_function(GLcontext *ctx) ASSERT(ctx->Line.SmoothFlag); - if (ctx->Visual.rgbMode) { - /* RGBA */ - if (ctx->Texture._EnabledCoordUnits != 0 - || ctx->FragmentProgram._Current - || (ctx->Light.Enabled && - ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - || ctx->Fog.ColorSumEnabled - || swrast->_FogEnabled) { - swrast->Line = aa_general_rgba_line; - } - else { - swrast->Line = aa_rgba_line; - } + if (ctx->Texture._EnabledCoordUnits != 0 + || ctx->FragmentProgram._Current + || (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) + || ctx->Fog.ColorSumEnabled + || swrast->_FogEnabled) { + swrast->Line = aa_general_rgba_line; } else { - /* Color Index */ - swrast->Line = aa_ci_line; + swrast->Line = aa_rgba_line; } } diff --git a/mesalib/src/mesa/swrast/s_aalinetemp.h b/mesalib/src/mesa/swrast/s_aalinetemp.h index 42ffe9f20..c28d47a67 100644 --- a/mesalib/src/mesa/swrast/s_aalinetemp.h +++ b/mesalib/src/mesa/swrast/s_aalinetemp.h @@ -39,11 +39,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) const SWcontext *swrast = SWRAST_CONTEXT(ctx); const GLfloat fx = (GLfloat) ix; const GLfloat fy = (GLfloat) iy; -#ifdef DO_INDEX - const GLfloat coverage = compute_coveragei(line, ix, iy); -#else const GLfloat coverage = compute_coveragef(line, ix, iy); -#endif const GLuint i = line->span.end; (void) swrast; @@ -63,15 +59,10 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) #ifdef DO_Z line->span.array->z[i] = (GLuint) solve_plane(fx, fy, line->zPlane); #endif -#ifdef DO_RGBA line->span.array->rgba[i][RCOMP] = solve_plane_chan(fx, fy, line->rPlane); line->span.array->rgba[i][GCOMP] = solve_plane_chan(fx, fy, line->gPlane); line->span.array->rgba[i][BCOMP] = solve_plane_chan(fx, fy, line->bPlane); line->span.array->rgba[i][ACOMP] = solve_plane_chan(fx, fy, line->aPlane); -#endif -#ifdef DO_INDEX - line->span.array->index[i] = (GLint) solve_plane(fx, fy, line->iPlane); -#endif #if defined(DO_ATTRIBS) ATTRIB_LOOP_BEGIN GLfloat (*attribArray)[4] = line->span.array->attribs[attr]; @@ -101,11 +92,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy) #endif if (line->span.end == MAX_WIDTH) { -#if defined(DO_RGBA) _swrast_write_rgba_span(ctx, &(line->span)); -#else - _swrast_write_index_span(ctx, &(line->span)); -#endif line->span.end = 0; /* reset counter */ } } @@ -150,7 +137,6 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) compute_plane(line.x0, line.y0, line.x1, line.y1, v0->attrib[FRAG_ATTRIB_WPOS][2], v1->attrib[FRAG_ATTRIB_WPOS][2], line.zPlane); #endif -#ifdef DO_RGBA line.span.arrayMask |= SPAN_RGBA; if (ctx->Light.ShadeModel == GL_SMOOTH) { compute_plane(line.x0, line.y0, line.x1, line.y1, @@ -168,18 +154,6 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) constant_plane(v1->color[BCOMP], line.bPlane); constant_plane(v1->color[ACOMP], line.aPlane); } -#endif -#ifdef DO_INDEX - line.span.arrayMask |= SPAN_INDEX; - if (ctx->Light.ShadeModel == GL_SMOOTH) { - compute_plane(line.x0, line.y0, line.x1, line.y1, - v0->attrib[FRAG_ATTRIB_CI][0], - v1->attrib[FRAG_ATTRIB_CI][0], line.iPlane); - } - else { - constant_plane(v1->attrib[FRAG_ATTRIB_CI][0], line.iPlane); - } -#endif #if defined(DO_ATTRIBS) { const GLfloat invW0 = v0->attrib[FRAG_ATTRIB_WPOS][3]; @@ -257,18 +231,12 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) segment(ctx, &line, NAME(plot), 0.0, 1.0); } -#if defined(DO_RGBA) _swrast_write_rgba_span(ctx, &(line.span)); -#else - _swrast_write_index_span(ctx, &(line.span)); -#endif } #undef DO_Z -#undef DO_RGBA -#undef DO_INDEX #undef DO_ATTRIBS #undef NAME diff --git a/mesalib/src/mesa/swrast/s_aatriangle.c b/mesalib/src/mesa/swrast/s_aatriangle.c index 078f16aea..1d90f322a 100644 --- a/mesalib/src/mesa/swrast/s_aatriangle.c +++ b/mesalib/src/mesa/swrast/s_aatriangle.c @@ -268,88 +268,6 @@ compute_coveragef(const GLfloat v0[3], const GLfloat v1[3], -/* - * Compute how much (area) of the given pixel is inside the triangle. - * Vertices MUST be specified in counter-clockwise order. - * Return: coverage in [0, 15]. - */ -static GLint -compute_coveragei(const GLfloat v0[3], const GLfloat v1[3], - const GLfloat v2[3], GLint winx, GLint winy) -{ - /* NOTE: 15 samples instead of 16. */ - static const GLfloat samples[15][2] = { - /* start with the four corners */ - { POS(0, 2), POS(0, 0) }, - { POS(3, 3), POS(0, 2) }, - { POS(0, 0), POS(3, 1) }, - { POS(3, 1), POS(3, 3) }, - /* continue with interior samples */ - { POS(1, 1), POS(0, 1) }, - { POS(2, 0), POS(0, 3) }, - { POS(0, 3), POS(1, 3) }, - { POS(1, 2), POS(1, 0) }, - { POS(2, 3), POS(1, 2) }, - { POS(3, 2), POS(1, 1) }, - { POS(0, 1), POS(2, 2) }, - { POS(1, 0), POS(2, 1) }, - { POS(2, 1), POS(2, 3) }, - { POS(3, 0), POS(2, 0) }, - { POS(1, 3), POS(3, 0) } - }; - const GLfloat x = (GLfloat) winx; - const GLfloat y = (GLfloat) winy; - const GLfloat dx0 = v1[0] - v0[0]; - const GLfloat dy0 = v1[1] - v0[1]; - const GLfloat dx1 = v2[0] - v1[0]; - const GLfloat dy1 = v2[1] - v1[1]; - const GLfloat dx2 = v0[0] - v2[0]; - const GLfloat dy2 = v0[1] - v2[1]; - GLint stop = 4, i; - GLint insideCount = 15; - -#ifdef DEBUG - { - const GLfloat area = dx0 * dy1 - dx1 * dy0; - ASSERT(area >= 0.0); - } -#endif - - for (i = 0; i < stop; i++) { - const GLfloat sx = x + samples[i][0]; - const GLfloat sy = y + samples[i][1]; - const GLfloat fx0 = sx - v0[0]; - const GLfloat fy0 = sy - v0[1]; - const GLfloat fx1 = sx - v1[0]; - const GLfloat fy1 = sy - v1[1]; - const GLfloat fx2 = sx - v2[0]; - const GLfloat fy2 = sy - v2[1]; - /* cross product determines if sample is inside or outside each edge */ - GLfloat cross0 = (dx0 * fy0 - dy0 * fx0); - GLfloat cross1 = (dx1 * fy1 - dy1 * fx1); - GLfloat cross2 = (dx2 * fy2 - dy2 * fx2); - /* Check if the sample is exactly on an edge. If so, let cross be a - * positive or negative value depending on the direction of the edge. - */ - if (cross0 == 0.0F) - cross0 = dx0 + dy0; - if (cross1 == 0.0F) - cross1 = dx1 + dy1; - if (cross2 == 0.0F) - cross2 = dx2 + dy2; - if (cross0 < 0.0F || cross1 < 0.0F || cross2 < 0.0F) { - /* point is outside triangle */ - insideCount--; - stop = 15; - } - } - if (stop == 4) - return 15; - else - return insideCount; -} - - static void rgba_aa_tri(GLcontext *ctx, const SWvertex *v0, @@ -357,20 +275,6 @@ rgba_aa_tri(GLcontext *ctx, const SWvertex *v2) { #define DO_Z -#define DO_RGBA -#include "s_aatritemp.h" -} - - -static void -index_aa_tri(GLcontext *ctx, - const SWvertex *v0, - const SWvertex *v1, - const SWvertex *v2) -{ -#define DO_Z -#define DO_ATTRIBS -#define DO_INDEX #include "s_aatritemp.h" } @@ -382,7 +286,6 @@ general_aa_tri(GLcontext *ctx, const SWvertex *v2) { #define DO_Z -#define DO_RGBA #define DO_ATTRIBS #include "s_aatritemp.h" } @@ -406,11 +309,8 @@ _swrast_set_aa_triangle_function(GLcontext *ctx) || NEED_SECONDARY_COLOR(ctx)) { SWRAST_CONTEXT(ctx)->Triangle = general_aa_tri; } - else if (ctx->Visual.rgbMode) { - SWRAST_CONTEXT(ctx)->Triangle = rgba_aa_tri; - } else { - SWRAST_CONTEXT(ctx)->Triangle = index_aa_tri; + SWRAST_CONTEXT(ctx)->Triangle = rgba_aa_tri; } ASSERT(SWRAST_CONTEXT(ctx)->Triangle); diff --git a/mesalib/src/mesa/swrast/s_aatritemp.h b/mesalib/src/mesa/swrast/s_aatritemp.h index 0827b3db9..5c1c6d904 100644 --- a/mesalib/src/mesa/swrast/s_aatritemp.h +++ b/mesalib/src/mesa/swrast/s_aatritemp.h @@ -33,8 +33,6 @@ * The following macros may be defined to indicate what auxillary information * must be copmuted across the triangle: * DO_Z - if defined, compute Z values - * DO_RGBA - if defined, compute RGBA values - * DO_INDEX - if defined, compute color index values * DO_ATTRIBS - if defined, compute texcoords, varying, etc. */ @@ -55,12 +53,7 @@ #ifdef DO_Z GLfloat zPlane[4]; #endif -#ifdef DO_RGBA GLfloat rPlane[4], gPlane[4], bPlane[4], aPlane[4]; -#endif -#ifdef DO_INDEX - GLfloat iPlane[4]; -#endif #if defined(DO_ATTRIBS) GLfloat attrPlane[FRAG_ATTRIB_MAX][4][4]; GLfloat wPlane[4]; /* win[3] */ @@ -126,7 +119,6 @@ compute_plane(p0, p1, p2, p0[2], p1[2], p2[2], zPlane); span.arrayMask |= SPAN_Z; #endif -#ifdef DO_RGBA if (ctx->Light.ShadeModel == GL_SMOOTH) { compute_plane(p0, p1, p2, v0->color[RCOMP], v1->color[RCOMP], v2->color[RCOMP], rPlane); compute_plane(p0, p1, p2, v0->color[GCOMP], v1->color[GCOMP], v2->color[GCOMP], gPlane); @@ -140,17 +132,6 @@ constant_plane(v2->color[ACOMP], aPlane); } span.arrayMask |= SPAN_RGBA; -#endif -#ifdef DO_INDEX - if (ctx->Light.ShadeModel == GL_SMOOTH) { - compute_plane(p0, p1, p2, (GLfloat) v0->attrib[FRAG_ATTRIB_CI][0], - v1->attrib[FRAG_ATTRIB_CI][0], v2->attrib[FRAG_ATTRIB_CI][0], iPlane); - } - else { - constant_plane(v2->attrib[FRAG_ATTRIB_CI][0], iPlane); - } - span.arrayMask |= SPAN_INDEX; -#endif #if defined(DO_ATTRIBS) { const GLfloat invW0 = v0->attrib[FRAG_ATTRIB_WPOS][3]; @@ -220,11 +201,11 @@ #if defined(DO_ATTRIBS) /* compute attributes at left-most fragment */ - span.attrStart[FRAG_ATTRIB_WPOS][3] = solve_plane(ix + 0.5, iy + 0.5, wPlane); + span.attrStart[FRAG_ATTRIB_WPOS][3] = solve_plane(ix + 0.5F, iy + 0.5F, wPlane); ATTRIB_LOOP_BEGIN GLuint c; for (c = 0; c < 4; c++) { - span.attrStart[attr][c] = solve_plane(ix + 0.5, iy + 0.5, attrPlane[attr][c]); + span.attrStart[attr][c] = solve_plane(ix + 0.5F, iy + 0.5F, attrPlane[attr][c]); } ATTRIB_LOOP_END #endif @@ -234,23 +215,14 @@ /* (cx,cy) = center of fragment */ const GLfloat cx = ix + 0.5F, cy = iy + 0.5F; SWspanarrays *array = span.array; -#ifdef DO_INDEX - array->coverage[count] = (GLfloat) compute_coveragei(pMin, pMid, pMax, ix, iy); -#else array->coverage[count] = coverage; -#endif #ifdef DO_Z array->z[count] = (GLuint) solve_plane(cx, cy, zPlane); #endif -#ifdef DO_RGBA array->rgba[count][RCOMP] = solve_plane_chan(cx, cy, rPlane); array->rgba[count][GCOMP] = solve_plane_chan(cx, cy, gPlane); array->rgba[count][BCOMP] = solve_plane_chan(cx, cy, bPlane); array->rgba[count][ACOMP] = solve_plane_chan(cx, cy, aPlane); -#endif -#ifdef DO_INDEX - array->index[count] = (GLint) solve_plane(cx, cy, iPlane); -#endif ix++; count++; coverage = compute_coveragef(pMin, pMid, pMax, ix, iy); @@ -262,11 +234,7 @@ span.x = startX; span.y = iy; span.end = (GLuint) ix - (GLuint) startX; -#if defined(DO_RGBA) _swrast_write_rgba_span(ctx, &span); -#else - _swrast_write_index_span(ctx, &span); -#endif } } else { @@ -304,23 +272,14 @@ const GLfloat cx = ix + 0.5F, cy = iy + 0.5F; SWspanarrays *array = span.array; ASSERT(ix >= 0); -#ifdef DO_INDEX - array->coverage[ix] = (GLfloat) compute_coveragei(pMin, pMax, pMid, ix, iy); -#else array->coverage[ix] = coverage; -#endif #ifdef DO_Z array->z[ix] = (GLuint) solve_plane(cx, cy, zPlane); #endif -#ifdef DO_RGBA array->rgba[ix][RCOMP] = solve_plane_chan(cx, cy, rPlane); array->rgba[ix][GCOMP] = solve_plane_chan(cx, cy, gPlane); array->rgba[ix][BCOMP] = solve_plane_chan(cx, cy, bPlane); array->rgba[ix][ACOMP] = solve_plane_chan(cx, cy, aPlane); -#endif -#ifdef DO_INDEX - array->index[ix] = (GLint) solve_plane(cx, cy, iPlane); -#endif ix--; count++; coverage = compute_coveragef(pMin, pMax, pMid, ix, iy); @@ -328,11 +287,11 @@ #if defined(DO_ATTRIBS) /* compute attributes at left-most fragment */ - span.attrStart[FRAG_ATTRIB_WPOS][3] = solve_plane(ix + 1.5, iy + 0.5, wPlane); + span.attrStart[FRAG_ATTRIB_WPOS][3] = solve_plane(ix + 1.5F, iy + 0.5F, wPlane); ATTRIB_LOOP_BEGIN GLuint c; for (c = 0; c < 4; c++) { - span.attrStart[attr][c] = solve_plane(ix + 1.5, iy + 0.5, attrPlane[attr][c]); + span.attrStart[attr][c] = solve_plane(ix + 1.5F, iy + 0.5F, attrPlane[attr][c]); } ATTRIB_LOOP_END #endif @@ -351,12 +310,7 @@ GLint j; for (j = 0; j < (GLint) n; j++) { array->coverage[j] = array->coverage[j + left]; -#ifdef DO_RGBA COPY_CHAN4(array->rgba[j], array->rgba[j + left]); -#endif -#ifdef DO_INDEX - array->index[j] = array->index[j + left]; -#endif #ifdef DO_Z array->z[j] = array->z[j + left]; #endif @@ -366,18 +320,12 @@ span.x = left; span.y = iy; span.end = n; -#if defined(DO_RGBA) _swrast_write_rgba_span(ctx, &span); -#else - _swrast_write_index_span(ctx, &span); -#endif } } } #undef DO_Z -#undef DO_RGBA -#undef DO_INDEX #undef DO_ATTRIBS #undef DO_OCCLUSION_TEST diff --git a/mesalib/src/mesa/swrast/s_accum.c b/mesalib/src/mesa/swrast/s_accum.c index c6c7dbf5c..854e106b7 100644 --- a/mesalib/src/mesa/swrast/s_accum.c +++ b/mesalib/src/mesa/swrast/s_accum.c @@ -27,7 +27,6 @@ #include "main/context.h" #include "main/macros.h" #include "main/imports.h" -#include "main/fbobject.h" #include "s_accum.h" #include "s_context.h" @@ -38,7 +37,7 @@ /* XXX this would have to change for accum buffers with more or less * than 16 bits per color channel. */ -#define ACCUM_SCALE16 32767.0 +#define ACCUM_SCALE16 32767.0F /* @@ -131,11 +130,7 @@ _swrast_clear_accum_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) SWcontext *swrast = SWRAST_CONTEXT(ctx); GLuint x, y, width, height; - if (ctx->Visual.accumRedBits == 0) { - /* No accumulation buffer! Not an error. */ - return; - } - + /* No accumulation buffer! Not an error. */ if (!rb || !rb->Data) return; @@ -436,10 +431,6 @@ accum_return(GLcontext *ctx, GLfloat value, struct gl_renderbuffer *accumRb = fb->Attachment[BUFFER_ACCUM].Renderbuffer; const GLboolean directAccess = (accumRb->GetPointer(ctx, accumRb, 0, 0) != NULL); - const GLboolean masking = (!ctx->Color.ColorMask[RCOMP] || - !ctx->Color.ColorMask[GCOMP] || - !ctx->Color.ColorMask[BCOMP] || - !ctx->Color.ColorMask[ACOMP]); static GLchan multTable[32768]; static GLfloat prevMult = 0.0; @@ -527,8 +518,12 @@ accum_return(GLcontext *ctx, GLfloat value, /* store colors */ for (buffer = 0; buffer < fb->_NumColorDrawBuffers; buffer++) { struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[buffer]; + const GLboolean masking = (!ctx->Color.ColorMask[buffer][RCOMP] || + !ctx->Color.ColorMask[buffer][GCOMP] || + !ctx->Color.ColorMask[buffer][BCOMP] || + !ctx->Color.ColorMask[buffer][ACOMP]); if (masking) { - _swrast_mask_rgba_span(ctx, rb, &span); + _swrast_mask_rgba_span(ctx, rb, &span, buffer); } rb->PutRow(ctx, rb, width, xpos, ypos + i, span.array->rgba, NULL); } diff --git a/mesalib/src/mesa/swrast/s_alpha.c b/mesalib/src/mesa/swrast/s_alpha.c index 5761bb00b..509477433 100644 --- a/mesalib/src/mesa/swrast/s_alpha.c +++ b/mesalib/src/mesa/swrast/s_alpha.c @@ -146,8 +146,8 @@ _swrast_alpha_test(const GLcontext *ctx, SWspan *span) ALPHA_TEST(FixedToInt(alpha), alpha += alphaStep); } else { - const GLfloat alphaStep = span->alphaStep; - GLfloat alpha = span->alpha; + const GLfloat alphaStep = FixedToFloat(span->alphaStep); + GLfloat alpha = FixedToFloat(span->alpha); const GLfloat ref = ctx->Color.AlphaRef; ALPHA_TEST(alpha, alpha += alphaStep); } diff --git a/mesalib/src/mesa/swrast/s_atifragshader.c b/mesalib/src/mesa/swrast/s_atifragshader.c index e88ff1912..0f06cdf9f 100644 --- a/mesalib/src/mesa/swrast/s_atifragshader.c +++ b/mesalib/src/mesa/swrast/s_atifragshader.c @@ -23,7 +23,6 @@ #include "main/colormac.h" #include "main/context.h" #include "main/macros.h" -#include "shader/program.h" #include "shader/atifragshader.h" #include "swrast/s_atifragshader.h" @@ -83,10 +82,11 @@ apply_swizzle(GLfloat values[4], GLuint swizzle) break; case GL_SWIZZLE_STQ_DQ_ATI: /* make sure q is not 0 to avoid problems later with infinite values (texture lookup)? */ - if (q == 0.0F) q = 0.000000001; + if (q == 0.0F) + q = 0.000000001F; values[0] = s / q; values[1] = t / q; - values[2] = 1 / q; + values[2] = 1.0F / q; break; } values[3] = 0.0; @@ -138,7 +138,7 @@ apply_src_mod(GLint optype, GLuint mod, GLfloat * val) val[i] = 1 - val[i]; if (mod & GL_BIAS_BIT_ATI) - val[i] = val[i] - 0.5; + val[i] = val[i] - 0.5F; if (mod & GL_2X_BIT_ATI) val[i] = 2 * val[i]; @@ -172,27 +172,27 @@ apply_dst_mod(GLuint optype, GLuint mod, GLfloat * val) val[i] = 8 * val[i]; break; case GL_HALF_BIT_ATI: - val[i] = val[i] * 0.5; + val[i] = val[i] * 0.5F; break; case GL_QUARTER_BIT_ATI: - val[i] = val[i] * 0.25; + val[i] = val[i] * 0.25F; break; case GL_EIGHTH_BIT_ATI: - val[i] = val[i] * 0.125; + val[i] = val[i] * 0.125F; break; } if (has_sat) { - if (val[i] < 0.0) - val[i] = 0; - else if (val[i] > 1.0) - val[i] = 1.0; + if (val[i] < 0.0F) + val[i] = 0.0F; + else if (val[i] > 1.0F) + val[i] = 1.0F; } else { - if (val[i] < -8.0) - val[i] = -8.0; - else if (val[i] > 8.0) - val[i] = 8.0; + if (val[i] < -8.0F) + val[i] = -8.0F; + else if (val[i] > 8.0F) + val[i] = 8.0F; } } } diff --git a/mesalib/src/mesa/swrast/s_bitmap.c b/mesalib/src/mesa/swrast/s_bitmap.c index 3dbdf2a61..da730213a 100644 --- a/mesalib/src/mesa/swrast/s_bitmap.c +++ b/mesalib/src/mesa/swrast/s_bitmap.c @@ -30,9 +30,9 @@ #include "main/glheader.h" #include "main/bufferobj.h" +#include "main/condrender.h" #include "main/image.h" #include "main/macros.h" -#include "main/pixel.h" #include "s_context.h" #include "s_span.h" @@ -56,6 +56,9 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, ASSERT(ctx->RenderMode == GL_RENDER); + if (!_mesa_check_conditional_render(ctx)) + return; /* don't draw */ + bitmap = (const GLubyte *) _mesa_map_pbo_source(ctx, unpack, bitmap); if (!bitmap) return; @@ -122,10 +125,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, if (count + width >= MAX_WIDTH || row + 1 == height) { /* flush the span */ span.end = count; - if (ctx->Visual.rgbMode) - _swrast_write_rgba_span(ctx, &span); - else - _swrast_write_index_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); span.end = 0; count = 0; } @@ -189,10 +189,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, } } - if (ctx->Visual.rgbMode) - _swrast_write_rgba_span(ctx, &span); - else - _swrast_write_index_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); /* get ready for next row */ if (mask != 1) @@ -212,10 +209,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, } } - if (ctx->Visual.rgbMode) - _swrast_write_rgba_span(ctx, &span); - else - _swrast_write_index_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); /* get ready for next row */ if (mask != 128) diff --git a/mesalib/src/mesa/swrast/s_blend.c b/mesalib/src/mesa/swrast/s_blend.c index 95c83432a..5b090c72c 100644 --- a/mesalib/src/mesa/swrast/s_blend.c +++ b/mesalib/src/mesa/swrast/s_blend.c @@ -89,7 +89,7 @@ blend_noop(GLcontext *ctx, GLuint n, const GLubyte mask[], else bytes = 4 * n * sizeof(GLfloat); - _mesa_memcpy(src, dst, bytes); + memcpy(src, dst, bytes); } diff --git a/mesalib/src/mesa/swrast/s_blit.c b/mesalib/src/mesa/swrast/s_blit.c index 8303e4deb..753f3136f 100644 --- a/mesalib/src/mesa/swrast/s_blit.c +++ b/mesalib/src/mesa/swrast/s_blit.c @@ -24,6 +24,7 @@ #include "main/glheader.h" +#include "main/condrender.h" #include "main/image.h" #include "main/macros.h" #include "s_context.h" @@ -197,14 +198,14 @@ blit_nearest(GLcontext *ctx, } /* allocate the src/dst row buffers */ - srcBuffer = _mesa_malloc(pixelSize * srcWidth); + srcBuffer = malloc(pixelSize * srcWidth); if (!srcBuffer) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT"); return; } - dstBuffer = _mesa_malloc(pixelSize * dstWidth); + dstBuffer = malloc(pixelSize * dstWidth); if (!dstBuffer) { - _mesa_free(srcBuffer); + free(srcBuffer); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT"); return; } @@ -234,8 +235,8 @@ blit_nearest(GLcontext *ctx, drawRb->PutRow(ctx, drawRb, dstWidth, dstXpos, dstY, dstBuffer, NULL); } - _mesa_free(srcBuffer); - _mesa_free(dstBuffer); + free(srcBuffer); + free(dstBuffer); } @@ -365,21 +366,21 @@ blit_linear(GLcontext *ctx, /* Allocate the src/dst row buffers. * Keep two adjacent src rows around for bilinear sampling. */ - srcBuffer0 = _mesa_malloc(pixelSize * srcWidth); + srcBuffer0 = malloc(pixelSize * srcWidth); if (!srcBuffer0) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT"); return; } - srcBuffer1 = _mesa_malloc(pixelSize * srcWidth); + srcBuffer1 = malloc(pixelSize * srcWidth); if (!srcBuffer1) { - _mesa_free(srcBuffer0); + free(srcBuffer0); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT"); return; } - dstBuffer = _mesa_malloc(pixelSize * dstWidth); + dstBuffer = malloc(pixelSize * dstWidth); if (!dstBuffer) { - _mesa_free(srcBuffer0); - _mesa_free(srcBuffer1); + free(srcBuffer0); + free(srcBuffer1); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT"); return; } @@ -443,9 +444,9 @@ blit_linear(GLcontext *ctx, drawRb->PutRow(ctx, drawRb, dstWidth, dstXpos, dstY, dstBuffer, NULL); } - _mesa_free(srcBuffer0); - _mesa_free(srcBuffer1); - _mesa_free(dstBuffer); + free(srcBuffer0); + free(srcBuffer1); + free(dstBuffer); } @@ -534,7 +535,7 @@ simple_blit(GLcontext *ctx, } /* allocate the row buffer */ - rowBuffer = _mesa_malloc(bytesPerRow); + rowBuffer = malloc(bytesPerRow); if (!rowBuffer) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFrameBufferEXT"); return; @@ -547,7 +548,7 @@ simple_blit(GLcontext *ctx, dstY += yStep; } - _mesa_free(rowBuffer); + free(rowBuffer); } @@ -567,6 +568,9 @@ _swrast_BlitFramebuffer(GLcontext *ctx, }; GLint i; + if (!_mesa_check_conditional_render(ctx)) + return; /* don't clear */ + if (!ctx->DrawBuffer->_NumColorDrawBuffers) return; diff --git a/mesalib/src/mesa/swrast/s_clear.c b/mesalib/src/mesa/swrast/s_clear.c index 002718ded..7b0a63391 100644 --- a/mesalib/src/mesa/swrast/s_clear.c +++ b/mesalib/src/mesa/swrast/s_clear.c @@ -24,6 +24,7 @@ #include "main/glheader.h" #include "main/colormac.h" +#include "main/condrender.h" #include "main/formats.h" #include "main/macros.h" #include "main/imports.h" @@ -40,7 +41,8 @@ * Clear the color buffer when glColorMask is in effect. */ static void -clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb) +clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb, + GLuint buf) { const GLint x = ctx->DrawBuffer->_Xmin; const GLint y = ctx->DrawBuffer->_Ymin; @@ -49,7 +51,6 @@ clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb) SWspan span; GLint i; - ASSERT(ctx->Visual.rgbMode); ASSERT(rb->PutRow); /* Initialize color span with clear color */ @@ -75,7 +76,7 @@ clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb) UNCLAMPED_FLOAT_TO_USHORT(clearColor[BCOMP], ctx->Color.ClearColor[2]); UNCLAMPED_FLOAT_TO_USHORT(clearColor[ACOMP], ctx->Color.ClearColor[3]); for (i = 0; i < width; i++) { - COPY_4V(span.array->rgba[i], clearColor); + COPY_4V_CAST(span.array->rgba[i], clearColor, GLchan); } } else { @@ -95,57 +96,18 @@ clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb) for (i = 0; i < height; i++) { span.x = x; span.y = y + i; - _swrast_mask_rgba_span(ctx, rb, &span); + _swrast_mask_rgba_span(ctx, rb, &span, buf); /* write masked row */ rb->PutRow(ctx, rb, width, x, y + i, span.array->rgba, NULL); } } -/** - * Clear color index buffer with masking. - */ -static void -clear_ci_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb) -{ - const GLint x = ctx->DrawBuffer->_Xmin; - const GLint y = ctx->DrawBuffer->_Ymin; - const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin; - const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; - SWspan span; - GLint i; - - ASSERT(!ctx->Visual.rgbMode); - ASSERT(rb->PutRow); - ASSERT(rb->DataType == GL_UNSIGNED_INT); - - /* Initialize index span with clear index */ - INIT_SPAN(span, GL_BITMAP); - span.end = width; - span.arrayMask = SPAN_INDEX; - for (i = 0; i < width;i++) { - span.array->index[i] = ctx->Color.ClearIndex; - } - - /* Note that masking will change the color indexes, but only the - * bits for which the write mask is GL_FALSE. The bits - * which are write-enabled won't get modified. - */ - for (i = 0; i < height;i++) { - span.x = x; - span.y = y + i; - _swrast_mask_ci_span(ctx, rb, &span); - /* write masked row */ - rb->PutRow(ctx, rb, width, x, y + i, span.array->index, NULL); - } -} - - /** * Clear an rgba color buffer without channel masking. */ static void -clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb) +clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint buf) { const GLint x = ctx->DrawBuffer->_Xmin; const GLint y = ctx->DrawBuffer->_Ymin; @@ -156,12 +118,10 @@ clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb) GLvoid *clearVal; GLint i; - ASSERT(ctx->Visual.rgbMode); - - ASSERT(ctx->Color.ColorMask[0] && - ctx->Color.ColorMask[1] && - ctx->Color.ColorMask[2] && - ctx->Color.ColorMask[3]); + ASSERT(ctx->Color.ColorMask[buf][0] && + ctx->Color.ColorMask[buf][1] && + ctx->Color.ColorMask[buf][2] && + ctx->Color.ColorMask[buf][3]); ASSERT(rb->PutMonoRow); @@ -194,50 +154,6 @@ clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb) } -/** - * Clear color index buffer without masking. - */ -static void -clear_ci_buffer(GLcontext *ctx, struct gl_renderbuffer *rb) -{ - const GLint x = ctx->DrawBuffer->_Xmin; - const GLint y = ctx->DrawBuffer->_Ymin; - const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin; - const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; - GLubyte clear8; - GLushort clear16; - GLuint clear32; - GLvoid *clearVal; - GLint i; - - ASSERT(!ctx->Visual.rgbMode); - - ASSERT(rb->PutMonoRow); - - /* setup clear value */ - switch (rb->DataType) { - case GL_UNSIGNED_BYTE: - clear8 = (GLubyte) ctx->Color.ClearIndex; - clearVal = &clear8; - break; - case GL_UNSIGNED_SHORT: - clear16 = (GLushort) ctx->Color.ClearIndex; - clearVal = &clear16; - break; - case GL_UNSIGNED_INT: - clear32 = ctx->Color.ClearIndex; - clearVal = &clear32; - break; - default: - _mesa_problem(ctx, "Bad rb DataType in clear_color_buffer"); - return; - } - - for (i = 0; i < height; i++) - rb->PutMonoRow(ctx, rb, width, x, y + i, clearVal, NULL); -} - - /** * Clear the front/back/left/right/aux color buffers. * This function is usually only called if the device driver can't @@ -246,48 +162,18 @@ clear_ci_buffer(GLcontext *ctx, struct gl_renderbuffer *rb) static void clear_color_buffers(GLcontext *ctx) { - GLboolean masking; GLuint buf; - if (ctx->Visual.rgbMode) { - if (ctx->Color.ColorMask[0] && - ctx->Color.ColorMask[1] && - ctx->Color.ColorMask[2] && - ctx->Color.ColorMask[3]) { - masking = GL_FALSE; - } - else { - masking = GL_TRUE; - } - } - else { - struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; - const GLuint indexMask = (1 << _mesa_get_format_bits(rb->Format, GL_INDEX_BITS)) - 1; - if ((ctx->Color.IndexMask & indexMask) == indexMask) { - masking = GL_FALSE; - } - else { - masking = GL_TRUE; - } - } - for (buf = 0; buf < ctx->DrawBuffer->_NumColorDrawBuffers; buf++) { struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[buf]; - if (ctx->Visual.rgbMode) { - if (masking) { - clear_rgba_buffer_with_masking(ctx, rb); - } - else { - clear_rgba_buffer(ctx, rb); - } + if (ctx->Color.ColorMask[buf][0] == 0 || + ctx->Color.ColorMask[buf][1] == 0 || + ctx->Color.ColorMask[buf][2] == 0 || + ctx->Color.ColorMask[buf][3] == 0) { + clear_rgba_buffer_with_masking(ctx, rb, buf); } else { - if (masking) { - clear_ci_buffer_with_masking(ctx, rb); - } - else { - clear_ci_buffer(ctx, rb); - } + clear_rgba_buffer(ctx, rb, buf); } } } @@ -318,6 +204,9 @@ _swrast_Clear(GLcontext *ctx, GLbitfield buffers) } #endif + if (!_mesa_check_conditional_render(ctx)) + return; /* don't clear */ + swrast_render_start(ctx); /* do software clearing here */ diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c index abf000856..751966348 100644 --- a/mesalib/src/mesa/swrast/s_context.c +++ b/mesalib/src/mesa/swrast/s_context.c @@ -55,6 +55,7 @@ _swrast_update_rasterflags( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); GLbitfield rasterMask = 0; + GLuint i; if (ctx->Color.AlphaEnabled) rasterMask |= ALPHATEST_BIT; if (ctx->Color.BlendEnabled) rasterMask |= BLEND_BIT; @@ -62,17 +63,17 @@ _swrast_update_rasterflags( GLcontext *ctx ) if (swrast->_FogEnabled) rasterMask |= FOG_BIT; if (ctx->Scissor.Enabled) rasterMask |= CLIP_BIT; if (ctx->Stencil._Enabled) rasterMask |= STENCIL_BIT; - if (ctx->Visual.rgbMode) { - const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask); - if (colorMask != 0xffffffff) rasterMask |= MASKING_BIT; - if (ctx->Color._LogicOpEnabled) rasterMask |= LOGIC_OP_BIT; - if (ctx->Texture._EnabledUnits) rasterMask |= TEXTURE_BIT; - } - else { - if (ctx->Color.IndexMask != 0xffffffff) rasterMask |= MASKING_BIT; - if (ctx->Color.IndexLogicOpEnabled) rasterMask |= LOGIC_OP_BIT; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + if (!ctx->Color.ColorMask[i][0] || + !ctx->Color.ColorMask[i][1] || + !ctx->Color.ColorMask[i][2] || + !ctx->Color.ColorMask[i][3]) { + rasterMask |= MASKING_BIT; + break; + } } - + if (ctx->Color._LogicOpEnabled) rasterMask |= LOGIC_OP_BIT; + if (ctx->Texture._EnabledUnits) rasterMask |= TEXTURE_BIT; if ( ctx->Viewport.X < 0 || ctx->Viewport.X + ctx->Viewport.Width > (GLint) ctx->DrawBuffer->Width || ctx->Viewport.Y < 0 @@ -92,13 +93,18 @@ _swrast_update_rasterflags( GLcontext *ctx ) /* more than one color buffer designated for writing (or zero buffers) */ rasterMask |= MULTI_DRAW_BIT; } - else if (ctx->Visual.rgbMode && *((GLuint *) ctx->Color.ColorMask) == 0) { - rasterMask |= MULTI_DRAW_BIT; /* all RGBA channels disabled */ - } - else if (!ctx->Visual.rgbMode && ctx->Color.IndexMask==0) { - rasterMask |= MULTI_DRAW_BIT; /* all color index bits disabled */ + + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + if (ctx->Color.ColorMask[i][0] + + ctx->Color.ColorMask[i][1] + + ctx->Color.ColorMask[i][2] + + ctx->Color.ColorMask[i][3] == 0) { + rasterMask |= MULTI_DRAW_BIT; /* all RGBA channels disabled */ + break; + } } + if (ctx->FragmentProgram._Current) { rasterMask |= FRAGPROG_BIT; } @@ -131,26 +137,26 @@ _swrast_update_polygon( GLcontext *ctx ) if (ctx->Polygon.CullFlag) { switch (ctx->Polygon.CullFaceMode) { case GL_BACK: - backface_sign = -1.0; + backface_sign = -1.0F; break; case GL_FRONT: - backface_sign = 1.0; + backface_sign = 1.0F; break; case GL_FRONT_AND_BACK: /* fallthrough */ default: - backface_sign = 0.0; + backface_sign = 0.0F; } } else { - backface_sign = 0.0; + backface_sign = 0.0F; } SWRAST_CONTEXT(ctx)->_BackfaceCullSign = backface_sign; /* This is for front/back-face determination, but not for culling */ SWRAST_CONTEXT(ctx)->_BackfaceSign - = (ctx->Polygon.FrontFace == GL_CW) ? -1.0 : 1.0; + = (ctx->Polygon.FrontFace == GL_CW) ? -1.0F : 1.0F; } @@ -874,12 +880,7 @@ _swrast_flush( GLcontext *ctx ) SWcontext *swrast = SWRAST_CONTEXT(ctx); /* flush any pending fragments from rendering points */ if (swrast->PointSpan.end > 0) { - if (ctx->Visual.rgbMode) { - _swrast_write_rgba_span(ctx, &(swrast->PointSpan)); - } - else { - _swrast_write_index_span(ctx, &(swrast->PointSpan)); - } + _swrast_write_rgba_span(ctx, &(swrast->PointSpan)); swrast->PointSpan.end = 0; } } diff --git a/mesalib/src/mesa/swrast/s_copypix.c b/mesalib/src/mesa/swrast/s_copypix.c index 5ecfb1e90..f4f0c8a33 100644 --- a/mesalib/src/mesa/swrast/s_copypix.c +++ b/mesalib/src/mesa/swrast/s_copypix.c @@ -26,12 +26,11 @@ #include "main/glheader.h" #include "main/context.h" #include "main/colormac.h" +#include "main/condrender.h" #include "main/convolve.h" -#include "main/histogram.h" #include "main/image.h" #include "main/macros.h" #include "main/imports.h" -#include "main/pixel.h" #include "s_context.h" #include "s_depth.h" @@ -115,14 +114,14 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, span.arrayAttribs = FRAG_BIT_COL0; /* allocate space for GLfloat image */ - tmpImage = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat)); + tmpImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); return; } - convImage = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat)); + convImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat)); if (!convImage) { - _mesa_free(tmpImage); + free(tmpImage); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); return; } @@ -151,7 +150,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, ASSERT(ctx->Pixel.Separable2DEnabled); _mesa_convolve_sep_image(ctx, &width, &height, tmpImage, convImage); } - _mesa_free(tmpImage); + free(tmpImage); /* do remaining post-convolution image transfer ops */ for (row = 0; row < height; row++) { @@ -168,7 +167,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLfloat *rgba = (GLfloat *) span.array->attribs[FRAG_ATTRIB_COL0]; /* copy convolved colors into span array */ - _mesa_memcpy(rgba, src, width * 4 * sizeof(GLfloat)); + memcpy(rgba, src, width * 4 * sizeof(GLfloat)); /* write span */ span.x = destx; @@ -186,7 +185,7 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, span.array->ChanType = CHAN_TYPE; } - _mesa_free(convImage); + free(convImage); } @@ -247,7 +246,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, span.arrayAttribs = FRAG_BIT_COL0; /* we'll fill in COL0 attrib values */ if (overlapping) { - tmpImage = (GLfloat *) _mesa_malloc(width * height * sizeof(GLfloat) * 4); + tmpImage = (GLfloat *) malloc(width * height * sizeof(GLfloat) * 4); if (!tmpImage) { _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; @@ -274,7 +273,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, /* Get row/span of source pixels */ if (overlapping) { /* get from buffered image */ - _mesa_memcpy(rgba, p, width * sizeof(GLfloat) * 4); + memcpy(rgba, p, width * sizeof(GLfloat) * 4); p += width * 4; } else { @@ -304,101 +303,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy, span.array->ChanType = CHAN_TYPE; /* restore */ if (overlapping) - _mesa_free(tmpImage); -} - - -static void -copy_ci_pixels( GLcontext *ctx, GLint srcx, GLint srcy, - GLint width, GLint height, - GLint destx, GLint desty ) -{ - GLuint *tmpImage,*p; - GLint sy, dy, stepy; - GLint j; - const GLboolean zoom = ctx->Pixel.ZoomX != 1.0F || ctx->Pixel.ZoomY != 1.0F; - GLint overlapping; - SWspan span; - - if (!ctx->ReadBuffer->_ColorReadBuffer) { - /* no readbuffer - OK */ - return; - } - - INIT_SPAN(span, GL_BITMAP); - _swrast_span_default_attribs(ctx, &span); - span.arrayMask = SPAN_INDEX; - - if (ctx->DrawBuffer == ctx->ReadBuffer) { - overlapping = regions_overlap(srcx, srcy, destx, desty, width, height, - ctx->Pixel.ZoomX, ctx->Pixel.ZoomY); - } - else { - overlapping = GL_FALSE; - } - - /* Determine if copy should be bottom-to-top or top-to-bottom */ - if (!overlapping && srcy < desty) { - /* top-down max-to-min */ - sy = srcy + height - 1; - dy = desty + height - 1; - stepy = -1; - } - else { - /* bottom-up min-to-max */ - sy = srcy; - dy = desty; - stepy = 1; - } - - if (overlapping) { - GLint ssy = sy; - tmpImage = (GLuint *) _mesa_malloc(width * height * sizeof(GLuint)); - if (!tmpImage) { - _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); - return; - } - /* read the image */ - p = tmpImage; - for (j = 0; j < height; j++, ssy += stepy) { - _swrast_read_index_span( ctx, ctx->ReadBuffer->_ColorReadBuffer, - width, srcx, ssy, p ); - p += width; - } - p = tmpImage; - } - else { - tmpImage = NULL; /* silence compiler warning */ - p = NULL; - } - - for (j = 0; j < height; j++, sy += stepy, dy += stepy) { - /* Get color indexes */ - if (overlapping) { - _mesa_memcpy(span.array->index, p, width * sizeof(GLuint)); - p += width; - } - else { - _swrast_read_index_span( ctx, ctx->ReadBuffer->_ColorReadBuffer, - width, srcx, sy, span.array->index ); - } - - if (ctx->_ImageTransferState) - _mesa_apply_ci_transfer_ops(ctx, ctx->_ImageTransferState, - width, span.array->index); - - /* write color indexes */ - span.x = destx; - span.y = dy; - span.end = width; - if (zoom) - _swrast_write_zoomed_index_span(ctx, destx, desty, &span); - else - _swrast_write_index_span(ctx, &span); - } - - if (overlapping) - _mesa_free(tmpImage); + free(tmpImage); } @@ -488,7 +393,7 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, if (overlapping) { GLint ssy = sy; - tmpImage = (GLfloat *) _mesa_malloc(width * height * sizeof(GLfloat)); + tmpImage = (GLfloat *) malloc(width * height * sizeof(GLfloat)); if (!tmpImage) { _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; @@ -509,7 +414,7 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, GLfloat depth[MAX_WIDTH]; /* get depth values */ if (overlapping) { - _mesa_memcpy(depth, p, width * sizeof(GLfloat)); + memcpy(depth, p, width * sizeof(GLfloat)); p += width; } else { @@ -523,22 +428,14 @@ copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy, span.x = destx; span.y = dy; span.end = width; - if (fb->Visual.rgbMode) { - if (zoom) - _swrast_write_zoomed_depth_span(ctx, destx, desty, &span); - else - _swrast_write_rgba_span(ctx, &span); - } - else { - if (zoom) - _swrast_write_zoomed_depth_span(ctx, destx, desty, &span); - else - _swrast_write_index_span(ctx, &span); - } + if (zoom) + _swrast_write_zoomed_depth_span(ctx, destx, desty, &span); + else + _swrast_write_rgba_span(ctx, &span); } if (overlapping) - _mesa_free(tmpImage); + free(tmpImage); } @@ -585,7 +482,7 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, if (overlapping) { GLint ssy = sy; - tmpImage = (GLstencil *) _mesa_malloc(width * height * sizeof(GLstencil)); + tmpImage = (GLstencil *) malloc(width * height * sizeof(GLstencil)); if (!tmpImage) { _mesa_error( ctx, GL_OUT_OF_MEMORY, "glCopyPixels" ); return; @@ -607,7 +504,7 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, /* Get stencil values */ if (overlapping) { - _mesa_memcpy(stencil, p, width * sizeof(GLstencil)); + memcpy(stencil, p, width * sizeof(GLstencil)); p += width; } else { @@ -627,7 +524,7 @@ copy_stencil_pixels( GLcontext *ctx, GLint srcx, GLint srcy, } if (overlapping) - _mesa_free(tmpImage); + free(tmpImage); } @@ -689,7 +586,7 @@ copy_depth_stencil_pixels(GLcontext *ctx, if (stencilMask != 0x0) { tempStencilImage - = (GLstencil *) _mesa_malloc(width * height * sizeof(GLstencil)); + = (GLstencil *) malloc(width * height * sizeof(GLstencil)); if (!tempStencilImage) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); return; @@ -707,10 +604,10 @@ copy_depth_stencil_pixels(GLcontext *ctx, if (ctx->Depth.Mask) { tempDepthImage - = (GLfloat *) _mesa_malloc(width * height * sizeof(GLfloat)); + = (GLfloat *) malloc(width * height * sizeof(GLfloat)); if (!tempDepthImage) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels"); - _mesa_free(tempStencilImage); + free(tempStencilImage); return; } @@ -731,7 +628,7 @@ copy_depth_stencil_pixels(GLcontext *ctx, /* Get stencil values */ if (overlapping) { - _mesa_memcpy(stencil, stencilPtr, width * sizeof(GLstencil)); + memcpy(stencil, stencilPtr, width * sizeof(GLstencil)); stencilPtr += width; } else { @@ -760,7 +657,7 @@ copy_depth_stencil_pixels(GLcontext *ctx, /* get depth values */ if (overlapping) { - _mesa_memcpy(depth, depthPtr, width * sizeof(GLfloat)); + memcpy(depth, depthPtr, width * sizeof(GLfloat)); depthPtr += width; } else { @@ -800,10 +697,10 @@ copy_depth_stencil_pixels(GLcontext *ctx, } if (tempStencilImage) - _mesa_free(tempStencilImage); + free(tempStencilImage); if (tempDepthImage) - _mesa_free(tempDepthImage); + free(tempDepthImage); } @@ -901,18 +798,16 @@ _swrast_CopyPixels( GLcontext *ctx, SWcontext *swrast = SWRAST_CONTEXT(ctx); swrast_render_start(ctx); + if (!_mesa_check_conditional_render(ctx)) + return; /* don't copy */ + if (swrast->NewState) _swrast_validate_derived( ctx ); if (!fast_copy_pixels(ctx, srcx, srcy, width, height, destx, desty, type)) { switch (type) { case GL_COLOR: - if (ctx->Visual.rgbMode) { - copy_rgba_pixels( ctx, srcx, srcy, width, height, destx, desty ); - } - else { - copy_ci_pixels( ctx, srcx, srcy, width, height, destx, desty ); - } + copy_rgba_pixels( ctx, srcx, srcy, width, height, destx, desty ); break; case GL_DEPTH: copy_depth_pixels( ctx, srcx, srcy, width, height, destx, desty ); diff --git a/mesalib/src/mesa/swrast/s_depth.c b/mesalib/src/mesa/swrast/s_depth.c index c37a54eb3..ed637cac1 100644 --- a/mesalib/src/mesa/swrast/s_depth.c +++ b/mesalib/src/mesa/swrast/s_depth.c @@ -28,7 +28,6 @@ #include "main/formats.h" #include "main/macros.h" #include "main/imports.h" -#include "main/fbobject.h" #include "s_depth.h" #include "s_context.h" @@ -260,7 +259,7 @@ depth_test_span16( GLcontext *ctx, GLuint n, } break; case GL_NEVER: - _mesa_bzero(mask, n * sizeof(GLubyte)); + memset(mask, 0, n * sizeof(GLubyte)); break; default: _mesa_problem(ctx, "Bad depth func in depth_test_span16"); @@ -489,7 +488,7 @@ depth_test_span32( GLcontext *ctx, GLuint n, } break; case GL_NEVER: - _mesa_bzero(mask, n * sizeof(GLubyte)); + memset(mask, 0, n * sizeof(GLubyte)); break; default: _mesa_problem(ctx, "Bad depth func in depth_test_span32"); @@ -498,17 +497,24 @@ depth_test_span32( GLcontext *ctx, GLuint n, return passed; } -/* Apply ARB_depth_clamp to span of fragments. */ + + +/** + * Clamp fragment Z values to the depth near/far range (glDepthRange()). + * This is used when GL_ARB_depth_clamp/GL_DEPTH_CLAMP is turned on. + * In that case, vertexes are not clipped against the near/far planes + * so rasterization will produce fragment Z values outside the usual + * [0,1] range. + */ void _swrast_depth_clamp_span( GLcontext *ctx, SWspan *span ) { struct gl_framebuffer *fb = ctx->DrawBuffer; - struct gl_renderbuffer *rb = fb->_DepthBuffer; const GLuint count = span->end; - GLuint *zValues = span->array->z; - GLuint min, max; + GLint *zValues = (GLint *) span->array->z; /* sign change */ + GLint min, max; GLfloat min_f, max_f; - int i; + GLuint i; if (ctx->Viewport.Near < ctx->Viewport.Far) { min_f = ctx->Viewport.Near; @@ -518,15 +524,21 @@ _swrast_depth_clamp_span( GLcontext *ctx, SWspan *span ) max_f = ctx->Viewport.Near; } - if (rb->DataType == GL_UNSIGNED_SHORT) { - CLAMPED_FLOAT_TO_USHORT(min, min_f); - CLAMPED_FLOAT_TO_USHORT(max, max_f); - } else { - assert(rb->DataType == GL_UNSIGNED_INT); - min = FLOAT_TO_UINT(min_f); - max = FLOAT_TO_UINT(max_f); - } - + /* Convert floating point values in [0,1] to device Z coordinates in + * [0, DepthMax]. + * ex: If the Z buffer has 24 bits, DepthMax = 0xffffff. + * + * XXX this all falls apart if we have 31 or more bits of Z because + * the triangle rasterization code produces unsigned Z values. Negative + * vertex Z values come out as large fragment Z uints. + */ + min = (GLint) (min_f * fb->_DepthMaxF); + max = (GLint) (max_f * fb->_DepthMaxF); + if (max < 0) + max = 0x7fffffff; /* catch over flow for 30-bit z */ + + /* Note that we do the comparisons here using signed integers. + */ for (i = 0; i < count; i++) { if (zValues[i] < min) zValues[i] = min; @@ -832,7 +844,7 @@ direct_depth_test_pixels16(GLcontext *ctx, GLushort *zStart, GLuint stride, break; case GL_NEVER: /* depth test never passes */ - _mesa_bzero(mask, n * sizeof(GLubyte)); + memset(mask, 0, n * sizeof(GLubyte)); break; default: _mesa_problem(ctx, "Bad depth func in direct_depth_test_pixels"); @@ -1078,7 +1090,7 @@ direct_depth_test_pixels32(GLcontext *ctx, GLuint *zStart, GLuint stride, break; case GL_NEVER: /* depth test never passes */ - _mesa_bzero(mask, n * sizeof(GLubyte)); + memset(mask, 0, n * sizeof(GLubyte)); break; default: _mesa_problem(ctx, "Bad depth func in direct_depth_test_pixels"); @@ -1248,7 +1260,7 @@ _swrast_read_depth_span_float( GLcontext *ctx, struct gl_renderbuffer *rb, if (!rb) { /* really only doing this to prevent FP exceptions later */ - _mesa_bzero(depth, n * sizeof(GLfloat)); + memset(depth, 0, n * sizeof(GLfloat)); return; } @@ -1257,7 +1269,7 @@ _swrast_read_depth_span_float( GLcontext *ctx, struct gl_renderbuffer *rb, if (y < 0 || y >= (GLint) rb->Height || x + n <= 0 || x >= (GLint) rb->Width) { /* span is completely outside framebuffer */ - _mesa_bzero(depth, n * sizeof(GLfloat)); + memset(depth, 0, n * sizeof(GLfloat)); return; } @@ -1314,7 +1326,7 @@ _swrast_read_depth_span_uint( GLcontext *ctx, struct gl_renderbuffer *rb, if (!rb) { /* really only doing this to prevent FP exceptions later */ - _mesa_bzero(depth, n * sizeof(GLuint)); + memset(depth, 0, n * sizeof(GLuint)); return; } @@ -1325,7 +1337,7 @@ _swrast_read_depth_span_uint( GLcontext *ctx, struct gl_renderbuffer *rb, if (y < 0 || y >= (GLint) rb->Height || x + n <= 0 || x >= (GLint) rb->Width) { /* span is completely outside framebuffer */ - _mesa_bzero(depth, n * sizeof(GLfloat)); + memset(depth, 0, n * sizeof(GLfloat)); return; } @@ -1426,7 +1438,7 @@ _swrast_clear_depth_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) /* optimized case */ GLushort *dst = (GLushort *) rb->GetPointer(ctx, rb, x, y); GLuint len = width * height * sizeof(GLushort); - _mesa_memset(dst, (clearValue & 0xff), len); + memset(dst, (clearValue & 0xff), len); } else { /* general case */ diff --git a/mesalib/src/mesa/swrast/s_drawpix.c b/mesalib/src/mesa/swrast/s_drawpix.c index 6970b2e9c..3cec3a7a2 100644 --- a/mesalib/src/mesa/swrast/s_drawpix.c +++ b/mesalib/src/mesa/swrast/s_drawpix.c @@ -25,12 +25,12 @@ #include "main/glheader.h" #include "main/bufferobj.h" +#include "main/condrender.h" #include "main/context.h" #include "main/convolve.h" #include "main/image.h" #include "main/macros.h" #include "main/imports.h" -#include "main/pixel.h" #include "main/state.h" #include "s_context.h" @@ -267,7 +267,7 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y, if (format == GL_COLOR_INDEX && type == GL_UNSIGNED_BYTE) { const GLubyte *src = (const GLubyte *) pixels + unpack.SkipRows * unpack.RowLength + unpack.SkipPixels; - if (ctx->Visual.rgbMode && rbType == GL_UNSIGNED_BYTE) { + if (rbType == GL_UNSIGNED_BYTE) { /* convert ubyte/CI data to ubyte/RGBA */ if (simpleZoom) { GLint row; @@ -299,22 +299,6 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y, } return GL_TRUE; } - else if (!ctx->Visual.rgbMode && rbType == GL_UNSIGNED_INT) { - /* write CI data to CI frame buffer */ - GLint row; - if (simpleZoom) { - for (row = 0; row < drawHeight; row++) { - GLuint index32[MAX_WIDTH]; - GLint col; - for (col = 0; col < drawWidth; col++) - index32[col] = src[col]; - rb->PutRow(ctx, rb, drawWidth, destX, destY, index32, NULL); - src += unpack.RowLength; - destY += yStep; - } - return GL_TRUE; - } - } } /* can't handle this pixel format and/or data type */ @@ -323,57 +307,6 @@ fast_draw_rgba_pixels(GLcontext *ctx, GLint x, GLint y, -/* - * Draw color index image. - */ -static void -draw_index_pixels( GLcontext *ctx, GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum type, - const struct gl_pixelstore_attrib *unpack, - const GLvoid *pixels ) -{ - const GLint imgX = x, imgY = y; - const GLboolean zoom = ctx->Pixel.ZoomX!=1.0 || ctx->Pixel.ZoomY!=1.0; - GLint row, skipPixels; - SWspan span; - - INIT_SPAN(span, GL_BITMAP); - span.arrayMask = SPAN_INDEX; - _swrast_span_default_attribs(ctx, &span); - - /* - * General solution - */ - skipPixels = 0; - while (skipPixels < width) { - const GLint spanWidth = MIN2(width - skipPixels, MAX_WIDTH); - ASSERT(spanWidth <= MAX_WIDTH); - for (row = 0; row < height; row++) { - const GLvoid *source = _mesa_image_address2d(unpack, pixels, - width, height, - GL_COLOR_INDEX, type, - row, skipPixels); - _mesa_unpack_index_span(ctx, spanWidth, GL_UNSIGNED_INT, - span.array->index, type, source, unpack, - ctx->_ImageTransferState); - - /* These may get changed during writing/clipping */ - span.x = x + skipPixels; - span.y = y + row; - span.end = spanWidth; - - if (zoom) - _swrast_write_zoomed_index_span(ctx, imgX, imgY, &span); - else - _swrast_write_index_span(ctx, &span); - } - skipPixels += spanWidth; - } -} - - - /* * Draw stencil image. */ @@ -441,7 +374,6 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, && ctx->DrawBuffer->Visual.depthBits == 16 && !scaleOrBias && !zoom - && ctx->Visual.rgbMode && width <= MAX_WIDTH && !unpack->SwapBytes) { /* Special case: directly write 16-bit depth values */ @@ -462,7 +394,6 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, else if (type == GL_UNSIGNED_INT && !scaleOrBias && !zoom - && ctx->Visual.rgbMode && width <= MAX_WIDTH && !unpack->SwapBytes) { /* Special case: shift 32-bit values down to Visual.depthBits */ @@ -473,7 +404,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, _mesa_image_address2d(unpack, pixels, width, height, GL_DEPTH_COMPONENT, type, row, 0); if (shift == 0) { - _mesa_memcpy(span.array->z, zSrc, width * sizeof(GLuint)); + memcpy(span.array->z, zSrc, width * sizeof(GLuint)); } else { GLint col; @@ -515,11 +446,8 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y, if (zoom) { _swrast_write_zoomed_depth_span(ctx, x, y, &span); } - else if (ctx->Visual.rgbMode) { - _swrast_write_rgba_span(ctx, &span); - } else { - _swrast_write_index_span(ctx, &span); + _swrast_write_rgba_span(ctx, &span); } } skipPixels += spanWidth; @@ -566,14 +494,14 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, GLint row; GLfloat *dest, *tmpImage; - tmpImage = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat)); + tmpImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); return; } - convImage = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat)); + convImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat)); if (!convImage) { - _mesa_free(tmpImage); + free(tmpImage); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glDrawPixels"); return; } @@ -597,7 +525,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, ASSERT(ctx->Pixel.Separable2DEnabled); _mesa_convolve_sep_image(ctx, &width, &height, tmpImage, convImage); } - _mesa_free(tmpImage); + free(tmpImage); /* continue transfer ops and draw the convolved image */ unpack = &ctx->DefaultPacking; @@ -677,7 +605,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y, } if (convImage) { - _mesa_free(convImage); + free(convImage); } } @@ -831,6 +759,9 @@ _swrast_DrawPixels( GLcontext *ctx, SWcontext *swrast = SWRAST_CONTEXT(ctx); GLboolean save_vp_override = ctx->VertexProgram._Overriden; + if (!_mesa_check_conditional_render(ctx)) + return; /* don't draw */ + /* We are creating fragments directly, without going through vertex * programs. * @@ -864,11 +795,6 @@ _swrast_DrawPixels( GLcontext *ctx, draw_depth_pixels( ctx, x, y, width, height, type, unpack, pixels ); break; case GL_COLOR_INDEX: - if (ctx->Visual.rgbMode) - draw_rgba_pixels(ctx, x,y, width, height, format, type, unpack, pixels); - else - draw_index_pixels(ctx, x, y, width, height, type, unpack, pixels); - break; case GL_RED: case GL_GREEN: case GL_BLUE: diff --git a/mesalib/src/mesa/swrast/s_feedback.c b/mesalib/src/mesa/swrast/s_feedback.c index 47ed25ee1..373b1416e 100644 --- a/mesalib/src/mesa/swrast/s_feedback.c +++ b/mesalib/src/mesa/swrast/s_feedback.c @@ -25,7 +25,6 @@ #include "main/glheader.h" #include "main/colormac.h" #include "main/context.h" -#include "main/enums.h" #include "main/feedback.h" #include "main/macros.h" @@ -47,7 +46,7 @@ feedback_vertex(GLcontext * ctx, const SWvertex * v, const SWvertex * pv) win[2] = v->attrib[FRAG_ATTRIB_WPOS][2] / ctx->DrawBuffer->_DepthMaxF; win[3] = 1.0F / v->attrib[FRAG_ATTRIB_WPOS][3]; - _mesa_feedback_vertex(ctx, win, color, v->attrib[FRAG_ATTRIB_CI][0], vtc); + _mesa_feedback_vertex(ctx, win, color, vtc); } diff --git a/mesalib/src/mesa/swrast/s_fog.c b/mesalib/src/mesa/swrast/s_fog.c index 77ed0cfef..3fc843921 100644 --- a/mesalib/src/mesa/swrast/s_fog.c +++ b/mesalib/src/mesa/swrast/s_fog.c @@ -122,38 +122,6 @@ else { \ } \ } -/* As above, but CI mode (XXX try to merge someday) */ -#define FOG_LOOP_CI(FOG_FUNC) \ -if (span->arrayAttribs & FRAG_BIT_FOGC) { \ - GLuint i; \ - for (i = 0; i < span->end; i++) { \ - const GLfloat fogCoord = span->array->attribs[FRAG_ATTRIB_FOGC][i][0]; \ - const GLfloat c = FABSF(fogCoord); \ - GLfloat f; \ - FOG_FUNC(f, c); \ - f = CLAMP(f, 0.0F, 1.0F); \ - index[i] = (GLuint) ((GLfloat) index[i] + (1.0F - f) * fogIndex); \ - } \ -} \ -else { \ - const GLfloat fogStep = span->attrStepX[FRAG_ATTRIB_FOGC][0]; \ - GLfloat fogCoord = span->attrStart[FRAG_ATTRIB_FOGC][0]; \ - const GLfloat wStep = span->attrStepX[FRAG_ATTRIB_WPOS][3]; \ - GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; \ - GLuint i; \ - for (i = 0; i < span->end; i++) { \ - const GLfloat c = FABSF(fogCoord) / w; \ - GLfloat f; \ - FOG_FUNC(f, c); \ - f = CLAMP(f, 0.0F, 1.0F); \ - index[i] = (GLuint) ((GLfloat) index[i] + (1.0F - f) * fogIndex); \ - fogCoord += fogStep; \ - w += wStep; \ - } \ -} - - - /** * Apply fog to a span of RGBA pixels. * The fog value are either in the span->array->fog array or interpolated from @@ -172,14 +140,14 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ) /* compute (scaled) fog color */ if (span->array->ChanType == GL_UNSIGNED_BYTE) { - rFog = ctx->Fog.Color[RCOMP] * 255.0; - gFog = ctx->Fog.Color[GCOMP] * 255.0; - bFog = ctx->Fog.Color[BCOMP] * 255.0; + rFog = ctx->Fog.Color[RCOMP] * 255.0F; + gFog = ctx->Fog.Color[GCOMP] * 255.0F; + bFog = ctx->Fog.Color[BCOMP] * 255.0F; } else if (span->array->ChanType == GL_UNSIGNED_SHORT) { - rFog = ctx->Fog.Color[RCOMP] * 65535.0; - gFog = ctx->Fog.Color[GCOMP] * 65535.0; - bFog = ctx->Fog.Color[BCOMP] * 65535.0; + rFog = ctx->Fog.Color[RCOMP] * 65535.0F; + gFog = ctx->Fog.Color[GCOMP] * 65535.0F; + bFog = ctx->Fog.Color[BCOMP] * 65535.0F; } else { rFog = ctx->Fog.Color[RCOMP]; @@ -275,56 +243,3 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ) } } } - - -/** - * As above, but color index mode. - */ -void -_swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ) -{ - const SWcontext *swrast = CONST_SWRAST_CONTEXT(ctx); - const GLuint fogIndex = (GLuint) ctx->Fog.Index; - GLuint *index = span->array->index; - - ASSERT(swrast->_FogEnabled); - ASSERT(span->arrayMask & SPAN_INDEX); - - /* we need to compute fog blend factors */ - if (swrast->_PreferPixelFog) { - /* The span's fog values are fog coordinates, now compute blend factors - * and blend the fragment colors with the fog color. - */ - switch (ctx->Fog.Mode) { - case GL_LINEAR: - { - const GLfloat fogEnd = ctx->Fog.End; - const GLfloat fogScale = (ctx->Fog.Start == ctx->Fog.End) - ? 1.0F : 1.0F / (ctx->Fog.End - ctx->Fog.Start); - FOG_LOOP_CI(LINEAR_FOG); - } - break; - case GL_EXP: - { - const GLfloat density = -ctx->Fog.Density; - FOG_LOOP_CI(EXP_FOG); - } - break; - case GL_EXP2: - { - const GLfloat negDensitySquared = -ctx->Fog.Density * ctx->Fog.Density; - FOG_LOOP_CI(EXP2_FOG); - } - break; - default: - _mesa_problem(ctx, "Bad fog mode in _swrast_fog_ci_span"); - return; - } - } - else { - /* The span's fog start/step/array values are blend factors in [0,1]. - * They were previously computed per-vertex. - */ - FOG_LOOP_CI(BLEND_FOG); - } -} diff --git a/mesalib/src/mesa/swrast/s_fog.h b/mesalib/src/mesa/swrast/s_fog.h index 50760d88a..06107de3f 100644 --- a/mesalib/src/mesa/swrast/s_fog.h +++ b/mesalib/src/mesa/swrast/s_fog.h @@ -37,8 +37,4 @@ _swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z); extern void _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span ); -extern void -_swrast_fog_ci_span( const GLcontext *ctx, SWspan *span ); - - #endif diff --git a/mesalib/src/mesa/swrast/s_fragprog.c b/mesalib/src/mesa/swrast/s_fragprog.c index a22d34415..7c1de62e8 100644 --- a/mesalib/src/mesa/swrast/s_fragprog.c +++ b/mesalib/src/mesa/swrast/s_fragprog.c @@ -25,7 +25,6 @@ #include "main/glheader.h" #include "main/colormac.h" #include "main/context.h" -#include "main/texstate.h" #include "shader/prog_instruction.h" #include "s_fragprog.h" @@ -145,10 +144,19 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine, const struct gl_fragment_program *program, const SWspan *span, GLuint col) { + GLfloat *wpos = span->array->attribs[FRAG_ATTRIB_WPOS][col]; + if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { /* Clear temporary registers (undefined for ARB_f_p) */ - _mesa_bzero(machine->Temporaries, - MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); + memset(machine->Temporaries, 0, MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); + } + + /* ARB_fragment_coord_conventions */ + if (program->OriginUpperLeft) + wpos[1] = ctx->DrawBuffer->Height - 1 - wpos[1]; + if (!program->PixelCenterInteger) { + wpos[0] += 0.5F; + wpos[1] += 0.5F; } /* Setup pointer to input attributes */ @@ -163,7 +171,7 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine, /* if running a GLSL program (not ARB_fragment_program) */ if (ctx->Shader.CurrentProgram) { /* Store front/back facing value */ - machine->Attribs[FRAG_ATTRIB_FACE][col][0] = 1.0 - span->facing; + machine->Attribs[FRAG_ATTRIB_FACE][col][0] = 1.0F - span->facing; } machine->CurElement = col; diff --git a/mesalib/src/mesa/swrast/s_lines.c b/mesalib/src/mesa/swrast/s_lines.c index 23cb9b57e..7db5af4ae 100644 --- a/mesalib/src/mesa/swrast/s_lines.c +++ b/mesalib/src/mesa/swrast/s_lines.c @@ -29,7 +29,6 @@ #include "main/macros.h" #include "s_aaline.h" #include "s_context.h" -#include "s_depth.h" #include "s_feedback.h" #include "s_lines.h" #include "s_span.h" @@ -88,10 +87,7 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor ) for (i = 0; i < span->end; i++) y[i]++; } - if (ctx->Visual.rgbMode) - _swrast_write_rgba_span(ctx, span); - else - _swrast_write_index_span(ctx, span); + _swrast_write_rgba_span(ctx, span); } } else { @@ -107,10 +103,7 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor ) for (i = 0; i < span->end; i++) x[i]++; } - if (ctx->Visual.rgbMode) - _swrast_write_rgba_span(ctx, span); - else - _swrast_write_index_span(ctx, span); + _swrast_write_rgba_span(ctx, span); } } } @@ -121,12 +114,6 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor ) /***** Rasterization *****/ /**********************************************************************/ -/* Simple color index line (no stipple, width=1, no Z, no fog, no tex)*/ -#define NAME simple_no_z_ci_line -#define INTERP_INDEX -#define RENDER_SPAN(span) _swrast_write_index_span(ctx, &span) -#include "s_linetemp.h" - /* Simple RGBA index line (no stipple, width=1, no Z, no fog, no tex)*/ #define NAME simple_no_z_rgba_line #define INTERP_RGBA @@ -134,25 +121,6 @@ draw_wide_line( GLcontext *ctx, SWspan *span, GLboolean xMajor ) #include "s_linetemp.h" -/* Z, fog, wide, stipple color index line */ -#define NAME ci_line -#define INTERP_INDEX -#define INTERP_Z -#define INTERP_ATTRIBS /* for fog */ -#define RENDER_SPAN(span) \ - if (ctx->Line.StippleFlag) { \ - span.arrayMask |= SPAN_MASK; \ - compute_stipple_mask(ctx, span.end, span.array->mask); \ - } \ - if (ctx->Line.Width > 1.0) { \ - draw_wide_line(ctx, &span, (GLboolean)(dx > dy)); \ - } \ - else { \ - _swrast_write_index_span(ctx, &span); \ - } -#include "s_linetemp.h" - - /* Z, fog, wide, stipple RGBA line */ #define NAME rgba_line #define INTERP_RGBA @@ -234,7 +202,7 @@ static const char *lineFuncName = NULL; #define USE(lineFunc) \ do { \ lineFuncName = #lineFunc; \ - /*_mesa_printf("%s\n", lineFuncName);*/ \ + /*printf("%s\n", lineFuncName);*/ \ swrast->Line = lineFunc; \ } while (0) @@ -257,7 +225,6 @@ void _swrast_choose_line( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); - const GLboolean rgbmode = ctx->Visual.rgbMode; GLboolean specular = (ctx->Fog.ColorSumEnabled || (ctx->Light.Enabled && ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)); @@ -278,23 +245,17 @@ _swrast_choose_line( GLcontext *ctx ) || ctx->Line.Width != 1.0 || ctx->Line.StippleFlag) { /* no texture, but Z, fog, width>1, stipple, etc. */ - if (rgbmode) #if CHAN_BITS == 32 - USE(general_line); + USE(general_line); #else - USE(rgba_line); + USE(rgba_line); #endif - else - USE(ci_line); } else { ASSERT(!ctx->Depth.Test); ASSERT(ctx->Line.Width == 1.0); /* simple lines */ - if (rgbmode) - USE(simple_no_z_rgba_line); - else - USE(simple_no_z_ci_line); + USE(simple_no_z_rgba_line); } } else if (ctx->RenderMode == GL_FEEDBACK) { diff --git a/mesalib/src/mesa/swrast/s_linetemp.h b/mesalib/src/mesa/swrast/s_linetemp.h index 1abf8d6c7..033431df2 100644 --- a/mesalib/src/mesa/swrast/s_linetemp.h +++ b/mesalib/src/mesa/swrast/s_linetemp.h @@ -31,8 +31,6 @@ * The following macros may be defined to indicate what auxillary information * must be interplated along the line: * INTERP_Z - if defined, interpolate Z values - * INTERP_RGBA - if defined, interpolate RGBA values - * INTERP_INDEX - if defined, interpolate color index values * INTERP_ATTRIBS - if defined, interpolate attribs (texcoords, varying, etc) * * When one can directly address pixels in the color buffer the following @@ -86,7 +84,6 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) DEPTH_TYPE *zPtr; #elif defined(INTERP_Z) const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; -/*ctx->Visual.depthBits;*/ #endif #ifdef PIXEL_ADDRESS PIXEL_TYPE *pixelPtr; @@ -223,7 +220,6 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) /* * Span setup: compute start and step values for all interpolated values. */ -#ifdef INTERP_RGBA interpFlags |= SPAN_RGBA; if (ctx->Light.ShadeModel == GL_SMOOTH) { span.red = ChanToFixed(vert0->color[0]); @@ -245,19 +241,6 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) span.blueStep = 0; span.alphaStep = 0; } -#endif -#ifdef INTERP_INDEX - interpFlags |= SPAN_INDEX; - if (ctx->Light.ShadeModel == GL_SMOOTH) { - span.index = FloatToFixed(vert0->attrib[FRAG_ATTRIB_CI][0]); - span.indexStep = FloatToFixed( vert1->attrib[FRAG_ATTRIB_CI][0] - - vert0->attrib[FRAG_ATTRIB_CI][0]) / numPixels; - } - else { - span.index = FloatToFixed(vert1->attrib[FRAG_ATTRIB_CI][0]); - span.indexStep = 0; - } -#endif #if defined(INTERP_Z) || defined(DEPTH_TYPE) interpFlags |= SPAN_Z; { @@ -407,9 +390,7 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) #undef NAME #undef INTERP_Z -#undef INTERP_RGBA #undef INTERP_ATTRIBS -#undef INTERP_INDEX #undef PIXEL_ADDRESS #undef PIXEL_TYPE #undef DEPTH_TYPE diff --git a/mesalib/src/mesa/swrast/s_logic.c b/mesalib/src/mesa/swrast/s_logic.c index f0274b4c0..c36a16e66 100644 --- a/mesalib/src/mesa/swrast/s_logic.c +++ b/mesalib/src/mesa/swrast/s_logic.c @@ -182,33 +182,6 @@ logicop_uint4(GLcontext *ctx, GLuint n, GLuint src[], const GLuint dest[], -/* - * Apply the current logic operator to a span of CI pixels. This is only - * used if the device driver can't do logic ops. - */ -void -_swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb, - SWspan *span) -{ - GLuint dest[MAX_WIDTH]; - GLuint *index = span->array->index; - - ASSERT(span->end < MAX_WIDTH); - ASSERT(rb->DataType == GL_UNSIGNED_INT); - - /* Read dest values from frame buffer */ - if (span->arrayMask & SPAN_XY) { - _swrast_get_values(ctx, rb, span->end, span->array->x, span->array->y, - dest, sizeof(GLuint)); - } - else { - rb->GetRow(ctx, rb, span->end, span->x, span->y, dest); - } - - logicop_uint1(ctx, span->end, index, dest, span->array->mask); -} - - /** * Apply the current logic operator to a span of RGBA pixels. * We can handle horizontal runs of pixels (spans) or arrays of x/y diff --git a/mesalib/src/mesa/swrast/s_logic.h b/mesalib/src/mesa/swrast/s_logic.h index ba20cd7b3..e8cfae33f 100644 --- a/mesalib/src/mesa/swrast/s_logic.h +++ b/mesalib/src/mesa/swrast/s_logic.h @@ -29,12 +29,6 @@ #include "swrast.h" - -extern void -_swrast_logicop_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb, - SWspan *span); - - extern void _swrast_logicop_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, SWspan *span); diff --git a/mesalib/src/mesa/swrast/s_masking.c b/mesalib/src/mesa/swrast/s_masking.c index df779b073..e38d90f19 100644 --- a/mesalib/src/mesa/swrast/s_masking.c +++ b/mesalib/src/mesa/swrast/s_masking.c @@ -41,7 +41,7 @@ */ void _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, - SWspan *span) + SWspan *span, GLuint buf) { const GLuint n = span->end; void *rbPixels; @@ -58,7 +58,7 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, */ if (span->array->ChanType == GL_UNSIGNED_BYTE) { /* treat 4xGLubyte as 1xGLuint */ - const GLuint srcMask = *((GLuint *) ctx->Color.ColorMask); + const GLuint srcMask = *((GLuint *) ctx->Color.ColorMask[buf]); const GLuint dstMask = ~srcMask; const GLuint *dst = (const GLuint *) rbPixels; GLuint *src = (GLuint *) span->array->rgba8; @@ -70,10 +70,10 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, else if (span->array->ChanType == GL_UNSIGNED_SHORT) { /* 2-byte components */ /* XXX try to use 64-bit arithmetic someday */ - const GLushort rMask = ctx->Color.ColorMask[RCOMP] ? 0xffff : 0x0; - const GLushort gMask = ctx->Color.ColorMask[GCOMP] ? 0xffff : 0x0; - const GLushort bMask = ctx->Color.ColorMask[BCOMP] ? 0xffff : 0x0; - const GLushort aMask = ctx->Color.ColorMask[ACOMP] ? 0xffff : 0x0; + const GLushort rMask = ctx->Color.ColorMask[buf][RCOMP] ? 0xffff : 0x0; + const GLushort gMask = ctx->Color.ColorMask[buf][GCOMP] ? 0xffff : 0x0; + const GLushort bMask = ctx->Color.ColorMask[buf][BCOMP] ? 0xffff : 0x0; + const GLushort aMask = ctx->Color.ColorMask[buf][ACOMP] ? 0xffff : 0x0; const GLushort (*dst)[4] = (const GLushort (*)[4]) rbPixels; GLushort (*src)[4] = span->array->rgba16; GLuint i; @@ -86,10 +86,10 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, } else { /* 4-byte components */ - const GLuint rMask = ctx->Color.ColorMask[RCOMP] ? ~0x0 : 0x0; - const GLuint gMask = ctx->Color.ColorMask[GCOMP] ? ~0x0 : 0x0; - const GLuint bMask = ctx->Color.ColorMask[BCOMP] ? ~0x0 : 0x0; - const GLuint aMask = ctx->Color.ColorMask[ACOMP] ? ~0x0 : 0x0; + const GLuint rMask = ctx->Color.ColorMask[buf][RCOMP] ? ~0x0 : 0x0; + const GLuint gMask = ctx->Color.ColorMask[buf][GCOMP] ? ~0x0 : 0x0; + const GLuint bMask = ctx->Color.ColorMask[buf][BCOMP] ? ~0x0 : 0x0; + const GLuint aMask = ctx->Color.ColorMask[buf][ACOMP] ? ~0x0 : 0x0; const GLuint (*dst)[4] = (const GLuint (*)[4]) rbPixels; GLuint (*src)[4] = (GLuint (*)[4]) span->array->attribs[FRAG_ATTRIB_COL0]; GLuint i; @@ -101,34 +101,3 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, } } } - - -/** - * Apply the index mask to a span of color index values. - */ -void -_swrast_mask_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb, - SWspan *span) -{ - const GLuint srcMask = ctx->Color.IndexMask; - const GLuint dstMask = ~srcMask; - GLuint *index = span->array->index; - GLuint dest[MAX_WIDTH]; - GLuint i; - - ASSERT(span->arrayMask & SPAN_INDEX); - ASSERT(span->end <= MAX_WIDTH); - ASSERT(rb->DataType == GL_UNSIGNED_INT); - - if (span->arrayMask & SPAN_XY) { - _swrast_get_values(ctx, rb, span->end, span->array->x, span->array->y, - dest, sizeof(GLuint)); - } - else { - _swrast_read_index_span(ctx, rb, span->end, span->x, span->y, dest); - } - - for (i = 0; i < span->end; i++) { - index[i] = (index[i] & srcMask) | (dest[i] & dstMask); - } -} diff --git a/mesalib/src/mesa/swrast/s_masking.h b/mesalib/src/mesa/swrast/s_masking.h index 3260ca34e..3ba4f8356 100644 --- a/mesalib/src/mesa/swrast/s_masking.h +++ b/mesalib/src/mesa/swrast/s_masking.h @@ -32,11 +32,6 @@ extern void _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, - SWspan *span); - - -extern void -_swrast_mask_ci_span(GLcontext *ctx, struct gl_renderbuffer *rb, - SWspan *span); + SWspan *span, GLuint buf); #endif diff --git a/mesalib/src/mesa/swrast/s_points.c b/mesalib/src/mesa/swrast/s_points.c index 50ec2063a..1663ece82 100644 --- a/mesalib/src/mesa/swrast/s_points.c +++ b/mesalib/src/mesa/swrast/s_points.c @@ -27,7 +27,6 @@ #include "main/colormac.h" #include "main/context.h" #include "main/macros.h" -#include "main/texstate.h" #include "s_context.h" #include "s_feedback.h" #include "s_points.h" @@ -126,16 +125,16 @@ sprite_point(GLcontext *ctx, const SWvertex *vert) GLfloat s, r, dsdx; /* texcoord / pointcoord interpolants */ - s = 0.0; - dsdx = 1.0 / size; + s = 0.0F; + dsdx = 1.0F / size; if (ctx->Point.SpriteOrigin == GL_LOWER_LEFT) { - dtdy = 1.0 / size; - t0 = 0.5 * dtdy; + dtdy = 1.0F / size; + t0 = 0.5F * dtdy; } else { /* GL_UPPER_LEFT */ - dtdy = -1.0 / size; - t0 = 1.0 + 0.5 * dtdy; + dtdy = -1.0F / size; + t0 = 1.0F + 0.5F * dtdy; } ATTRIB_LOOP_BEGIN @@ -245,7 +244,6 @@ static void smooth_point(GLcontext *ctx, const SWvertex *vert) { SWcontext *swrast = SWRAST_CONTEXT(ctx); - const GLboolean ciMode = !ctx->Visual.rgbMode; SWspan span; GLfloat size, alphaAtten; @@ -336,10 +334,6 @@ smooth_point(GLcontext *ctx, const SWvertex *vert) if (dist2 >= rmin2) { /* compute partial coverage */ coverage = 1.0F - (dist2 - rmin2) * cscale; - if (ciMode) { - /* coverage in [0,15] */ - coverage *= 15.0; - } } else { /* full coverage */ @@ -370,7 +364,6 @@ static void large_point(GLcontext *ctx, const SWvertex *vert) { SWcontext *swrast = SWRAST_CONTEXT(ctx); - const GLboolean ciMode = !ctx->Visual.rgbMode; SWspan span; GLfloat size; @@ -390,22 +383,15 @@ large_point(GLcontext *ctx, const SWvertex *vert) span.arrayMask = SPAN_XY; span.facing = swrast->PointLineFacing; - if (ciMode) { - span.interpMask = SPAN_Z | SPAN_INDEX; - span.index = FloatToFixed(vert->attrib[FRAG_ATTRIB_CI][0]); - span.indexStep = 0; - } - else { - span.interpMask = SPAN_Z | SPAN_RGBA; - span.red = ChanToFixed(vert->color[0]); - span.green = ChanToFixed(vert->color[1]); - span.blue = ChanToFixed(vert->color[2]); - span.alpha = ChanToFixed(vert->color[3]); - span.redStep = 0; - span.greenStep = 0; - span.blueStep = 0; - span.alphaStep = 0; - } + span.interpMask = SPAN_Z | SPAN_RGBA; + span.red = ChanToFixed(vert->color[0]); + span.green = ChanToFixed(vert->color[1]); + span.blue = ChanToFixed(vert->color[2]); + span.alpha = ChanToFixed(vert->color[3]); + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + span.alphaStep = 0; /* need these for fragment programs */ span.attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F; @@ -467,7 +453,6 @@ static void pixel_point(GLcontext *ctx, const SWvertex *vert) { SWcontext *swrast = SWRAST_CONTEXT(ctx); - const GLboolean ciMode = !ctx->Visual.rgbMode; /* * Note that unlike the other functions, we put single-pixel points * into a special span array in order to render as many points as @@ -481,10 +466,7 @@ pixel_point(GLcontext *ctx, const SWvertex *vert) /* Span init */ span->interpMask = 0; span->arrayMask = SPAN_XY | SPAN_Z; - if (ciMode) - span->arrayMask |= SPAN_INDEX; - else - span->arrayMask |= SPAN_RGBA; + span->arrayMask |= SPAN_RGBA; /*span->arrayMask |= SPAN_LAMBDA;*/ span->arrayAttribs = swrast->_ActiveAttribMask; /* we'll produce these vals */ @@ -498,10 +480,7 @@ pixel_point(GLcontext *ctx, const SWvertex *vert) (swrast->_RasterMask & (BLEND_BIT | LOGIC_OP_BIT | MASKING_BIT)) || span->facing != swrast->PointLineFacing) { if (span->end > 0) { - if (ciMode) - _swrast_write_index_span(ctx, span); - else - _swrast_write_rgba_span(ctx, span); + _swrast_write_rgba_span(ctx, span); span->end = 0; } } @@ -511,15 +490,11 @@ pixel_point(GLcontext *ctx, const SWvertex *vert) span->facing = swrast->PointLineFacing; /* fragment attributes */ - if (ciMode) { - span->array->index[count] = (GLuint) vert->attrib[FRAG_ATTRIB_CI][0]; - } - else { - span->array->rgba[count][RCOMP] = vert->color[0]; - span->array->rgba[count][GCOMP] = vert->color[1]; - span->array->rgba[count][BCOMP] = vert->color[2]; - span->array->rgba[count][ACOMP] = vert->color[3]; - } + span->array->rgba[count][RCOMP] = vert->color[0]; + span->array->rgba[count][GCOMP] = vert->color[1]; + span->array->rgba[count][BCOMP] = vert->color[2]; + span->array->rgba[count][ACOMP] = vert->color[3]; + ATTRIB_LOOP_BEGIN COPY_4V(span->array->attribs[attr][count], vert->attrib[attr]); ATTRIB_LOOP_END diff --git a/mesalib/src/mesa/swrast/s_readpix.c b/mesalib/src/mesa/swrast/s_readpix.c index 44a11cd6d..368311e14 100644 --- a/mesalib/src/mesa/swrast/s_readpix.c +++ b/mesalib/src/mesa/swrast/s_readpix.c @@ -33,7 +33,6 @@ #include "main/image.h" #include "main/macros.h" #include "main/imports.h" -#include "main/pixel.h" #include "main/state.h" #include "s_context.h" @@ -42,42 +41,6 @@ #include "s_stencil.h" -/* - * Read a block of color index pixels. - */ -static void -read_index_pixels( GLcontext *ctx, - GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum type, GLvoid *pixels, - const struct gl_pixelstore_attrib *packing ) -{ - struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer; - GLint i; - - if (!rb) - return; - - /* width should never be > MAX_WIDTH since we did clipping earlier */ - ASSERT(width <= MAX_WIDTH); - - /* process image row by row */ - for (i = 0; i < height; i++) { - GLuint index[MAX_WIDTH]; - GLvoid *dest; - ASSERT(rb->DataType == GL_UNSIGNED_INT); - rb->GetRow(ctx, rb, width, x, y + i, index); - - dest = _mesa_image_address2d(packing, pixels, width, height, - GL_COLOR_INDEX, type, i, 0); - - _mesa_pack_index_span(ctx, width, type, dest, index, - &ctx->Pack, ctx->_ImageTransferState); - } -} - - - /** * Read pixels for format=GL_DEPTH_COMPONENT. */ @@ -290,21 +253,21 @@ fast_read_rgba_pixels( GLcontext *ctx, /** * When we're using a low-precision color buffer (like 16-bit 5/6/5) * we have to adjust our color values a bit to pass conformance. - * The problem is when a 5 or 6-bit color value is convert to an 8-bit + * The problem is when a 5 or 6-bit color value is converted to an 8-bit * value and then a floating point value, the floating point values don't * increment uniformly as the 5 or 6-bit value is incremented. * * This function adjusts floating point values to compensate. */ static void -adjust_colors(GLcontext *ctx, GLuint n, GLfloat rgba[][4]) +adjust_colors(const struct gl_framebuffer *fb, GLuint n, GLfloat rgba[][4]) { - const GLuint rShift = 8 - ctx->Visual.redBits; - const GLuint gShift = 8 - ctx->Visual.greenBits; - const GLuint bShift = 8 - ctx->Visual.blueBits; - const GLfloat rScale = 1.0F / (GLfloat) ((1 << ctx->Visual.redBits ) - 1); - const GLfloat gScale = 1.0F / (GLfloat) ((1 << ctx->Visual.greenBits) - 1); - const GLfloat bScale = 1.0F / (GLfloat) ((1 << ctx->Visual.blueBits ) - 1); + const GLuint rShift = 8 - fb->Visual.redBits; + const GLuint gShift = 8 - fb->Visual.greenBits; + const GLuint bShift = 8 - fb->Visual.blueBits; + const GLfloat rScale = 1.0F / (GLfloat) ((1 << fb->Visual.redBits ) - 1); + const GLfloat gScale = 1.0F / (GLfloat) ((1 << fb->Visual.greenBits) - 1); + const GLfloat bScale = 1.0F / (GLfloat) ((1 << fb->Visual.blueBits ) - 1); GLuint i; for (i = 0; i < n; i++) { GLint r, g, b; @@ -359,14 +322,14 @@ read_rgba_pixels( GLcontext *ctx, GLfloat *dest, *src, *tmpImage, *convImage; GLint row; - tmpImage = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat)); + tmpImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat)); if (!tmpImage) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); return; } - convImage = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat)); + convImage = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat)); if (!convImage) { - _mesa_free(tmpImage); + free(tmpImage); _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); return; } @@ -374,18 +337,7 @@ read_rgba_pixels( GLcontext *ctx, /* read full RGBA, FLOAT image */ dest = tmpImage; for (row = 0; row < height; row++, y++) { - if (fb->Visual.rgbMode) { - _swrast_read_rgba_span(ctx, rb, width, x, y, GL_FLOAT, dest); - } - else { - GLuint index[MAX_WIDTH]; - ASSERT(rb->DataType == GL_UNSIGNED_INT); - rb->GetRow(ctx, rb, width, x, y, index); - _mesa_apply_ci_transfer_ops(ctx, - transferOps & IMAGE_SHIFT_OFFSET_BIT, - width, index); - _mesa_map_ci_to_rgba(ctx, width, index, (GLfloat (*)[4]) dest); - } + _swrast_read_rgba_span(ctx, rb, width, x, y, GL_FLOAT, dest); _mesa_apply_rgba_transfer_ops(ctx, transferOps & IMAGE_PRE_CONVOLUTION_BITS, width, (GLfloat (*)[4]) dest); @@ -400,7 +352,7 @@ read_rgba_pixels( GLcontext *ctx, ASSERT(ctx->Pixel.Separable2DEnabled); _mesa_convolve_sep_image(ctx, &width, &height, tmpImage, convImage); } - _mesa_free(tmpImage); + free(tmpImage); /* finish transfer ops and pack the resulting image */ src = convImage; @@ -413,7 +365,7 @@ read_rgba_pixels( GLcontext *ctx, transferOps & IMAGE_POST_CONVOLUTION_BITS); src += width * 4; } - _mesa_free(convImage); + free(convImage); } else { /* no convolution */ @@ -432,25 +384,13 @@ read_rgba_pixels( GLcontext *ctx, for (row = 0; row < height; row++, y++) { /* Get float rgba pixels */ - if (fb->Visual.rgbMode) { - _swrast_read_rgba_span(ctx, rb, width, x, y, GL_FLOAT, rgba); - } - else { - /* read CI and convert to RGBA */ - GLuint index[MAX_WIDTH]; - ASSERT(rb->DataType == GL_UNSIGNED_INT); - rb->GetRow(ctx, rb, width, x, y, index); - _mesa_apply_ci_transfer_ops(ctx, - transferOps & IMAGE_SHIFT_OFFSET_BIT, - width, index); - _mesa_map_ci_to_rgba(ctx, width, index, rgba); - } + _swrast_read_rgba_span(ctx, rb, width, x, y, GL_FLOAT, rgba); /* apply fudge factor for shallow color buffers */ if (fb->Visual.redBits < 8 || fb->Visual.greenBits < 8 || fb->Visual.blueBits < 8) { - adjust_colors(ctx, width, rgba); + adjust_colors(fb, width, rgba); } /* pack the row of RGBA pixels into user's buffer */ @@ -593,10 +533,6 @@ _swrast_ReadPixels( GLcontext *ctx, return; switch (format) { - case GL_COLOR_INDEX: - read_index_pixels(ctx, x, y, width, height, type, pixels, - &clippedPacking); - break; case GL_STENCIL_INDEX: read_stencil_pixels(ctx, x, y, width, height, type, pixels, &clippedPacking); diff --git a/mesalib/src/mesa/swrast/s_span.c b/mesalib/src/mesa/swrast/s_span.c index d36c8132f..687c8eb0b 100644 --- a/mesalib/src/mesa/swrast/s_span.c +++ b/mesalib/src/mesa/swrast/s_span.c @@ -60,6 +60,7 @@ void _swrast_span_default_attribs(GLcontext *ctx, SWspan *span) { + GLchan r, g, b, a; /* Z*/ { const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF; @@ -80,41 +81,33 @@ _swrast_span_default_attribs(GLcontext *ctx, SWspan *span) span->attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0; /* primary color, or color index */ - if (ctx->Visual.rgbMode) { - GLchan r, g, b, a; - UNCLAMPED_FLOAT_TO_CHAN(r, ctx->Current.RasterColor[0]); - UNCLAMPED_FLOAT_TO_CHAN(g, ctx->Current.RasterColor[1]); - UNCLAMPED_FLOAT_TO_CHAN(b, ctx->Current.RasterColor[2]); - UNCLAMPED_FLOAT_TO_CHAN(a, ctx->Current.RasterColor[3]); + UNCLAMPED_FLOAT_TO_CHAN(r, ctx->Current.RasterColor[0]); + UNCLAMPED_FLOAT_TO_CHAN(g, ctx->Current.RasterColor[1]); + UNCLAMPED_FLOAT_TO_CHAN(b, ctx->Current.RasterColor[2]); + UNCLAMPED_FLOAT_TO_CHAN(a, ctx->Current.RasterColor[3]); #if CHAN_TYPE == GL_FLOAT - span->red = r; - span->green = g; - span->blue = b; - span->alpha = a; + span->red = r; + span->green = g; + span->blue = b; + span->alpha = a; #else - span->red = IntToFixed(r); - span->green = IntToFixed(g); - span->blue = IntToFixed(b); - span->alpha = IntToFixed(a); + span->red = IntToFixed(r); + span->green = IntToFixed(g); + span->blue = IntToFixed(b); + span->alpha = IntToFixed(a); #endif - span->redStep = 0; - span->greenStep = 0; - span->blueStep = 0; - span->alphaStep = 0; - span->interpMask |= SPAN_RGBA; - - COPY_4V(span->attrStart[FRAG_ATTRIB_COL0], ctx->Current.RasterColor); - ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0); - ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0); - } - else { - span->index = FloatToFixed(ctx->Current.RasterIndex); - span->indexStep = 0; - span->interpMask |= SPAN_INDEX; - } + span->redStep = 0; + span->greenStep = 0; + span->blueStep = 0; + span->alphaStep = 0; + span->interpMask |= SPAN_RGBA; + + COPY_4V(span->attrStart[FRAG_ATTRIB_COL0], ctx->Current.RasterColor); + ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0); + ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0); /* Secondary color */ - if (ctx->Visual.rgbMode && (ctx->Light.Enabled || ctx->Fog.ColorSumEnabled)) + if (ctx->Light.Enabled || ctx->Fog.ColorSumEnabled) { COPY_4V(span->attrStart[FRAG_ATTRIB_COL1], ctx->Current.RasterSecondaryColor); ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL1], 0.0, 0.0, 0.0, 0.0); @@ -374,38 +367,6 @@ interpolate_float_colors(SWspan *span) -/* Fill in the span.color.index array from the interpolation values */ -static INLINE void -interpolate_indexes(GLcontext *ctx, SWspan *span) -{ - GLfixed index = span->index; - const GLint indexStep = span->indexStep; - const GLuint n = span->end; - GLuint *indexes = span->array->index; - GLuint i; - (void) ctx; - - ASSERT(!(span->arrayMask & SPAN_INDEX)); - - if ((span->interpMask & SPAN_FLAT) || (indexStep == 0)) { - /* constant color */ - index = FixedToInt(index); - for (i = 0; i < n; i++) { - indexes[i] = index; - } - } - else { - /* interpolate */ - for (i = 0; i < n; i++) { - indexes[i] = FixedToInt(index); - index += indexStep; - } - } - span->arrayMask |= SPAN_INDEX; - span->interpMask &= ~SPAN_INDEX; -} - - /** * Fill in the span.zArray array from the span->z, zStep values. */ @@ -645,7 +606,7 @@ interpolate_wpos(GLcontext *ctx, SWspan *span) { GLfloat (*wpos)[4] = span->array->attribs[FRAG_ATTRIB_WPOS]; GLuint i; - const GLfloat zScale = 1.0 / ctx->DrawBuffer->_DepthMaxF; + const GLfloat zScale = 1.0F / ctx->DrawBuffer->_DepthMaxF; GLfloat w, dw; if (span->arrayMask & SPAN_XY) { @@ -783,15 +744,48 @@ clip_span( GLcontext *ctx, SWspan *span ) * fragment attributes. * For arrays of values, shift them left. */ + for (i = 0; i < FRAG_ATTRIB_MAX; i++) { + if (span->interpMask & (1 << i)) { + GLuint j; + for (j = 0; j < 4; j++) { + span->attrStart[i][j] += leftClip * span->attrStepX[i][j]; + } + } + } + + span->red += leftClip * span->redStep; + span->green += leftClip * span->greenStep; + span->blue += leftClip * span->blueStep; + span->alpha += leftClip * span->alphaStep; + span->index += leftClip * span->indexStep; + span->z += leftClip * span->zStep; + span->intTex[0] += leftClip * span->intTexStep[0]; + span->intTex[1] += leftClip * span->intTexStep[1]; + +#define SHIFT_ARRAY(ARRAY, SHIFT, LEN) \ + memcpy(ARRAY, ARRAY + (SHIFT), (LEN) * sizeof(ARRAY[0])) + for (i = 0; i < FRAG_ATTRIB_MAX; i++) { if (span->arrayAttribs & (1 << i)) { /* shift array elements left by 'leftClip' */ - _mesa_memcpy(span->array->attribs[i], - span->array->attribs[i] + leftClip, - (n - leftClip) * 4 * sizeof(GLfloat)); + SHIFT_ARRAY(span->array->attribs[i], leftClip, n - leftClip); } } + SHIFT_ARRAY(span->array->mask, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->rgba8, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->rgba16, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->x, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->y, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->z, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->index, leftClip, n - leftClip); + for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { + SHIFT_ARRAY(span->array->lambda[i], leftClip, n - leftClip); + } + SHIFT_ARRAY(span->array->coverage, leftClip, n - leftClip); + +#undef SHIFT_ARRAY + span->leftClip = leftClip; span->x = xmin; span->end -= leftClip; @@ -808,249 +802,6 @@ clip_span( GLcontext *ctx, SWspan *span ) } -/** - * Apply all the per-fragment opertions to a span of color index fragments - * and write them to the enabled color drawbuffers. - * The 'span' parameter can be considered to be const. Note that - * span->interpMask and span->arrayMask may be changed but will be restored - * to their original values before returning. - */ -void -_swrast_write_index_span( GLcontext *ctx, SWspan *span) -{ - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - const GLbitfield origInterpMask = span->interpMask; - const GLbitfield origArrayMask = span->arrayMask; - struct gl_framebuffer *fb = ctx->DrawBuffer; - - ASSERT(span->end <= MAX_WIDTH); - ASSERT(span->primitive == GL_POINT || span->primitive == GL_LINE || - span->primitive == GL_POLYGON || span->primitive == GL_BITMAP); - ASSERT((span->interpMask | span->arrayMask) & SPAN_INDEX); - /* - ASSERT((span->interpMask & span->arrayMask) == 0); - */ - - if (span->arrayMask & SPAN_MASK) { - /* mask was initialized by caller, probably glBitmap */ - span->writeAll = GL_FALSE; - } - else { - _mesa_memset(span->array->mask, 1, span->end); - span->writeAll = GL_TRUE; - } - - /* Clipping */ - if ((swrast->_RasterMask & CLIP_BIT) || (span->primitive != GL_POLYGON)) { - if (!clip_span(ctx, span)) { - return; - } - } - - if (!(span->arrayMask & SPAN_MASK)) { - /* post-clip sanity check */ - assert(span->x >= 0); - assert(span->y >= 0); - } - - /* Depth bounds test */ - if (ctx->Depth.BoundsTest && fb->Visual.depthBits > 0) { - if (!_swrast_depth_bounds_test(ctx, span)) { - return; - } - } - -#ifdef DEBUG - /* Make sure all fragments are within window bounds */ - if (span->arrayMask & SPAN_XY) { - GLuint i; - for (i = 0; i < span->end; i++) { - if (span->array->mask[i]) { - assert(span->array->x[i] >= fb->_Xmin); - assert(span->array->x[i] < fb->_Xmax); - assert(span->array->y[i] >= fb->_Ymin); - assert(span->array->y[i] < fb->_Ymax); - } - } - } -#endif - - /* Polygon Stippling */ - if (ctx->Polygon.StippleFlag && span->primitive == GL_POLYGON) { - stipple_polygon_span(ctx, span); - } - - /* Stencil and Z testing */ - if (ctx->Stencil._Enabled || ctx->Depth.Test) { - if (!(span->arrayMask & SPAN_Z)) - _swrast_span_interpolate_z(ctx, span); - - if (ctx->Transform.DepthClamp) - _swrast_depth_clamp_span(ctx, span); - - if (ctx->Stencil._Enabled) { - if (!_swrast_stencil_and_ztest_span(ctx, span)) { - span->arrayMask = origArrayMask; - return; - } - } - else { - ASSERT(ctx->Depth.Test); - if (!_swrast_depth_test_span(ctx, span)) { - span->interpMask = origInterpMask; - span->arrayMask = origArrayMask; - return; - } - } - } - - if (ctx->Query.CurrentOcclusionObject) { - /* update count of 'passed' fragments */ - struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; - GLuint i; - for (i = 0; i < span->end; i++) - q->Result += span->array->mask[i]; - } - - /* we have to wait until after occlusion to do this test */ - if (ctx->Color.IndexMask == 0) { - /* write no pixels */ - span->arrayMask = origArrayMask; - return; - } - - /* Interpolate the color indexes if needed */ - if (swrast->_FogEnabled || - ctx->Color.IndexLogicOpEnabled || - ctx->Color.IndexMask != 0xffffffff || - (span->arrayMask & SPAN_COVERAGE)) { - if (!(span->arrayMask & SPAN_INDEX) /*span->interpMask & SPAN_INDEX*/) { - interpolate_indexes(ctx, span); - } - } - - /* Fog */ - if (swrast->_FogEnabled) { - _swrast_fog_ci_span(ctx, span); - } - - /* Antialias coverage application */ - if (span->arrayMask & SPAN_COVERAGE) { - const GLfloat *coverage = span->array->coverage; - GLuint *index = span->array->index; - GLuint i; - for (i = 0; i < span->end; i++) { - ASSERT(coverage[i] < 16); - index[i] = (index[i] & ~0xf) | ((GLuint) coverage[i]); - } - } - - /* - * Write to renderbuffers - */ - { - const GLuint numBuffers = fb->_NumColorDrawBuffers; - GLuint buf; - - for (buf = 0; buf < numBuffers; buf++) { - struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[buf]; - GLuint indexSave[MAX_WIDTH]; - - ASSERT(rb->_BaseFormat == GL_COLOR_INDEX); - - if (numBuffers > 1) { - /* save indexes for second, third renderbuffer writes */ - _mesa_memcpy(indexSave, span->array->index, - span->end * sizeof(indexSave[0])); - } - - if (ctx->Color.IndexLogicOpEnabled) { - _swrast_logicop_ci_span(ctx, rb, span); - } - - if (ctx->Color.IndexMask != 0xffffffff) { - _swrast_mask_ci_span(ctx, rb, span); - } - - if (!(span->arrayMask & SPAN_INDEX) && span->indexStep == 0) { - /* all fragments have same color index */ - GLubyte index8; - GLushort index16; - GLuint index32; - void *value; - - if (rb->DataType == GL_UNSIGNED_BYTE) { - index8 = FixedToInt(span->index); - value = &index8; - } - else if (rb->DataType == GL_UNSIGNED_SHORT) { - index16 = FixedToInt(span->index); - value = &index16; - } - else { - ASSERT(rb->DataType == GL_UNSIGNED_INT); - index32 = FixedToInt(span->index); - value = &index32; - } - - if (span->arrayMask & SPAN_XY) { - rb->PutMonoValues(ctx, rb, span->end, span->array->x, - span->array->y, value, span->array->mask); - } - else { - rb->PutMonoRow(ctx, rb, span->end, span->x, span->y, - value, span->array->mask); - } - } - else { - /* each fragment is a different color */ - GLubyte index8[MAX_WIDTH]; - GLushort index16[MAX_WIDTH]; - void *values; - - if (rb->DataType == GL_UNSIGNED_BYTE) { - GLuint k; - for (k = 0; k < span->end; k++) { - index8[k] = (GLubyte) span->array->index[k]; - } - values = index8; - } - else if (rb->DataType == GL_UNSIGNED_SHORT) { - GLuint k; - for (k = 0; k < span->end; k++) { - index16[k] = (GLushort) span->array->index[k]; - } - values = index16; - } - else { - ASSERT(rb->DataType == GL_UNSIGNED_INT); - values = span->array->index; - } - - if (span->arrayMask & SPAN_XY) { - rb->PutValues(ctx, rb, span->end, - span->array->x, span->array->y, - values, span->array->mask); - } - else { - rb->PutRow(ctx, rb, span->end, span->x, span->y, - values, span->array->mask); - } - } - - if (buf + 1 < numBuffers) { - /* restore original span values */ - _mesa_memcpy(span->array->index, indexSave, - span->end * sizeof(indexSave[0])); - } - } /* for buf */ - } - - span->interpMask = origInterpMask; - span->arrayMask = origArrayMask; -} - - /** * Add specular colors to primary colors. * Only called during fixed-function operation. @@ -1278,7 +1029,7 @@ void _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) { const SWcontext *swrast = SWRAST_CONTEXT(ctx); - const GLuint colorMask = *((GLuint *) ctx->Color.ColorMask); + const GLuint *colorMask = (GLuint *) ctx->Color.ColorMask; const GLbitfield origInterpMask = span->interpMask; const GLbitfield origArrayMask = span->arrayMask; const GLbitfield origArrayAttribs = span->arrayAttribs; @@ -1305,7 +1056,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) span->writeAll = GL_FALSE; } else { - _mesa_memset(span->array->mask, 1, span->end); + memset(span->array->mask, 1, span->end); span->writeAll = GL_TRUE; } @@ -1316,6 +1067,13 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) ASSERT(span->end <= MAX_WIDTH); + /* Depth bounds test */ + if (ctx->Depth.BoundsTest && fb->Visual.depthBits > 0) { + if (!_swrast_depth_bounds_test(ctx, span)) { + return; + } + } + #ifdef DEBUG /* Make sure all fragments are within window bounds */ if (span->arrayMask & SPAN_XY) { @@ -1389,7 +1147,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) /* We had to wait until now to check for glColorMask(0,0,0,0) because of * the occlusion test. */ - if (colorMask == 0x0) { + if (fb->_NumColorDrawBuffers == 1 && colorMask[0] == 0x0) { /* no colors to write */ goto end; } @@ -1470,8 +1228,8 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) if (!multiFragOutputs && numBuffers > 1) { /* save colors for second, third renderbuffer writes */ - _mesa_memcpy(rgbaSave, span->array->rgba, - 4 * span->end * sizeof(GLchan)); + memcpy(rgbaSave, span->array->rgba, + 4 * span->end * sizeof(GLchan)); } ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB); @@ -1479,12 +1237,12 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) if (ctx->Color._LogicOpEnabled) { _swrast_logicop_rgba_span(ctx, rb, span); } - else if (ctx->Color.BlendEnabled) { + else if ((ctx->Color.BlendEnabled >> buf) & 1) { _swrast_blend_span(ctx, rb, span); } - if (colorMask != 0xffffffff) { - _swrast_mask_rgba_span(ctx, rb, span); + if (colorMask[buf] != 0xffffffff) { + _swrast_mask_rgba_span(ctx, rb, span, buf); } if (span->arrayMask & SPAN_XY) { @@ -1504,8 +1262,8 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span) if (!multiFragOutputs && numBuffers > 1) { /* restore original span values */ - _mesa_memcpy(span->array->rgba, rgbaSave, - 4 * span->end * sizeof(GLchan)); + memcpy(span->array->rgba, rgbaSave, + 4 * span->end * sizeof(GLchan)); } } /* if rb */ @@ -1539,7 +1297,7 @@ _swrast_read_rgba_span( GLcontext *ctx, struct gl_renderbuffer *rb, if (y < 0 || y >= bufHeight || x + (GLint) n < 0 || x >= bufWidth) { /* completely above, below, or right */ /* XXX maybe leave rgba values undefined? */ - _mesa_bzero(rgba, 4 * n * sizeof(GLchan)); + memset(rgba, 0, 4 * n * sizeof(GLchan)); } else { GLint skip, length; @@ -1589,74 +1347,6 @@ _swrast_read_rgba_span( GLcontext *ctx, struct gl_renderbuffer *rb, } -/** - * Read CI pixels from a renderbuffer. Clipping will be done to prevent - * reading ouside the buffer's boundaries. - */ -void -_swrast_read_index_span( GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, GLuint index[] ) -{ - const GLint bufWidth = (GLint) rb->Width; - const GLint bufHeight = (GLint) rb->Height; - - if (y < 0 || y >= bufHeight || x + (GLint) n < 0 || x >= bufWidth) { - /* completely above, below, or right */ - _mesa_bzero(index, n * sizeof(GLuint)); - } - else { - GLint skip, length; - if (x < 0) { - /* left edge clipping */ - skip = -x; - length = (GLint) n - skip; - if (length < 0) { - /* completely left of window */ - return; - } - if (length > bufWidth) { - length = bufWidth; - } - } - else if ((GLint) (x + n) > bufWidth) { - /* right edge clipping */ - skip = 0; - length = bufWidth - x; - if (length < 0) { - /* completely to right of window */ - return; - } - } - else { - /* no clipping */ - skip = 0; - length = (GLint) n; - } - - ASSERT(rb->GetRow); - ASSERT(rb->_BaseFormat == GL_COLOR_INDEX); - - if (rb->DataType == GL_UNSIGNED_BYTE) { - GLubyte index8[MAX_WIDTH]; - GLint i; - rb->GetRow(ctx, rb, length, x + skip, y, index8); - for (i = 0; i < length; i++) - index[skip + i] = index8[i]; - } - else if (rb->DataType == GL_UNSIGNED_SHORT) { - GLushort index16[MAX_WIDTH]; - GLint i; - rb->GetRow(ctx, rb, length, x + skip, y, index16); - for (i = 0; i < length; i++) - index[skip + i] = index16[i]; - } - else if (rb->DataType == GL_UNSIGNED_INT) { - rb->GetRow(ctx, rb, length, x + skip, y, index + skip); - } - } -} - - /** * Wrapper for gl_renderbuffer::GetValues() which does clipping to avoid * reading values outside the buffer bounds. @@ -1766,9 +1456,7 @@ _swrast_get_row(GLcontext *ctx, struct gl_renderbuffer *rb, /** - * Get RGBA pixels from the given renderbuffer. Put the pixel colors into - * the span's specular color arrays. The specular color arrays should no - * longer be needed by time this function is called. + * Get RGBA pixels from the given renderbuffer. * Used by blending, logicop and masking functions. * \return pointer to the colors we read. */ @@ -1779,10 +1467,8 @@ _swrast_get_dest_rgba(GLcontext *ctx, struct gl_renderbuffer *rb, const GLuint pixelSize = RGBA_PIXEL_SIZE(span->array->ChanType); void *rbPixels; - /* - * Point rbPixels to a temporary space (use specular color arrays). - */ - rbPixels = span->array->attribs[FRAG_ATTRIB_COL1]; + /* Point rbPixels to a temporary space */ + rbPixels = span->array->attribs[FRAG_ATTRIB_MAX - 1]; /* Get destination values from renderbuffer */ if (span->arrayMask & SPAN_XY) { diff --git a/mesalib/src/mesa/swrast/s_span.h b/mesalib/src/mesa/swrast/s_span.h index 0eabae20e..aaf1fec2a 100644 --- a/mesalib/src/mesa/swrast/s_span.h +++ b/mesalib/src/mesa/swrast/s_span.h @@ -41,13 +41,12 @@ */ /*@{*/ #define SPAN_RGBA 0x01 /**< interpMask and arrayMask */ -#define SPAN_INDEX 0x02 /**< interpMask and arrayMask */ -#define SPAN_Z 0x04 /**< interpMask and arrayMask */ -#define SPAN_FLAT 0x08 /**< interpMask: flat shading? */ -#define SPAN_XY 0x10 /**< array.x[], y[] valid? */ -#define SPAN_MASK 0x20 /**< was array.mask[] filled in by caller? */ -#define SPAN_LAMBDA 0x40 /**< array.lambda[] valid? */ -#define SPAN_COVERAGE 0x80 /**< array.coverage[] valid? */ +#define SPAN_Z 0x02 /**< interpMask and arrayMask */ +#define SPAN_FLAT 0x04 /**< interpMask: flat shading? */ +#define SPAN_XY 0x08 /**< array.x[], y[] valid? */ +#define SPAN_MASK 0x10 /**< was array.mask[] filled in by caller? */ +#define SPAN_LAMBDA 0x20 /**< array.lambda[] valid? */ +#define SPAN_COVERAGE 0x40 /**< array.coverage[] valid? */ /*@}*/ @@ -187,9 +186,6 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, GLfloat s, GLfloat t, GLfloat q, GLfloat invQ); -extern void -_swrast_write_index_span( GLcontext *ctx, SWspan *span); - extern void _swrast_write_rgba_span( GLcontext *ctx, SWspan *span); @@ -199,10 +195,6 @@ extern void _swrast_read_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint n, GLint x, GLint y, GLenum type, GLvoid *rgba); -extern void -_swrast_read_index_span( GLcontext *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, GLuint indx[] ); - extern void _swrast_get_values(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], diff --git a/mesalib/src/mesa/swrast/s_spantemp.h b/mesalib/src/mesa/swrast/s_spantemp.h index bab2ca737..2948a90f6 100644 --- a/mesalib/src/mesa/swrast/s_spantemp.h +++ b/mesalib/src/mesa/swrast/s_spantemp.h @@ -31,7 +31,6 @@ * Define the following macros before including this file: * NAME(BASE) to generate the function name (i.e. add prefix or suffix) * RB_TYPE the renderbuffer DataType - * CI_MODE if set, color index mode, else RGBA * SPAN_VARS to declare any local variables * INIT_PIXEL_PTR(P, X, Y) to initialize a pointer to a pixel * INC_PIXEL_PTR(P) to increment a pixel pointer by one pixel @@ -46,9 +45,7 @@ #include "main/macros.h" -#ifdef CI_MODE -#define RB_COMPONENTS 1 -#elif !defined(RB_COMPONENTS) +#if !defined(RB_COMPONENTS) #define RB_COMPONENTS 4 #endif @@ -60,11 +57,7 @@ NAME(get_row)( GLcontext *ctx, struct gl_renderbuffer *rb, #ifdef SPAN_VARS SPAN_VARS #endif -#ifdef CI_MODE - RB_TYPE *dest = (RB_TYPE *) values; -#else RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values; -#endif GLuint i; INIT_PIXEL_PTR(pixel, x, y); for (i = 0; i < count; i++) { @@ -82,11 +75,7 @@ NAME(get_values)( GLcontext *ctx, struct gl_renderbuffer *rb, #ifdef SPAN_VARS SPAN_VARS #endif -#ifdef CI_MODE - RB_TYPE *dest = (RB_TYPE *) values; -#else RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values; -#endif GLuint i; for (i = 0; i < count; i++) { INIT_PIXEL_PTR(pixel, x[i], y[i]); @@ -125,7 +114,6 @@ NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb, } -#if !defined(CI_MODE) static void NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, @@ -149,7 +137,6 @@ NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb, } (void) rb; } -#endif static void @@ -226,7 +213,6 @@ NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb, #undef NAME #undef RB_TYPE #undef RB_COMPONENTS -#undef CI_MODE #undef SPAN_VARS #undef INIT_PIXEL_PTR #undef INC_PIXEL_PTR diff --git a/mesalib/src/mesa/swrast/s_stencil.c b/mesalib/src/mesa/swrast/s_stencil.c index e9e9d3a4f..aa74b21ee 100644 --- a/mesalib/src/mesa/swrast/s_stencil.c +++ b/mesalib/src/mesa/swrast/s_stencil.c @@ -475,7 +475,7 @@ stencil_and_ztest_span(GLcontext *ctx, SWspan *span, GLuint face) GLubyte passMask[MAX_WIDTH], failMask[MAX_WIDTH], origMask[MAX_WIDTH]; /* save the current mask bits */ - _mesa_memcpy(origMask, mask, n * sizeof(GLubyte)); + memcpy(origMask, mask, n * sizeof(GLubyte)); /* apply the depth test */ _swrast_depth_test_span(ctx, span); @@ -918,7 +918,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face ) ASSERT(rb->DataType == GL_UNSIGNED_BYTE); _swrast_get_values(ctx, rb, n, x, y, stencil, sizeof(GLubyte)); - _mesa_memcpy(origMask, mask, n * sizeof(GLubyte)); + memcpy(origMask, mask, n * sizeof(GLubyte)); (void) do_stencil_test(ctx, face, n, stencil, mask); @@ -928,7 +928,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face ) } else { GLubyte tmpMask[MAX_WIDTH]; - _mesa_memcpy(tmpMask, mask, n * sizeof(GLubyte)); + memcpy(tmpMask, mask, n * sizeof(GLubyte)); _swrast_depth_test_span(ctx, span); @@ -962,7 +962,7 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face ) ctx->Stencil.ZPassFunc[face], face, mask); } else { - _mesa_memcpy(origMask, mask, n * sizeof(GLubyte)); + memcpy(origMask, mask, n * sizeof(GLubyte)); _swrast_depth_test_span(ctx, span); @@ -1181,7 +1181,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) /* Note: bottom-to-top raster assumed! */ GLubyte *stencil = (GLubyte *) rb->GetPointer(ctx, rb, x, y); GLuint len = width * height * sizeof(GLubyte); - _mesa_memset(stencil, clearVal, len); + memset(stencil, clearVal, len); } else { /* general case */ @@ -1189,7 +1189,7 @@ _swrast_clear_stencil_buffer( GLcontext *ctx, struct gl_renderbuffer *rb ) for (i = 0; i < height; i++) { GLvoid *stencil = rb->GetPointer(ctx, rb, x, y + i); if (rb->DataType == GL_UNSIGNED_BYTE) { - _mesa_memset(stencil, clearVal, width); + memset(stencil, clearVal, width); } else { _mesa_memset16((short unsigned int*) stencil, clearVal, width); diff --git a/mesalib/src/mesa/swrast/s_texcombine.c b/mesalib/src/mesa/swrast/s_texcombine.c index 889164b98..f322663ad 100644 --- a/mesalib/src/mesa/swrast/s_texcombine.c +++ b/mesalib/src/mesa/swrast/s_texcombine.c @@ -29,7 +29,6 @@ #include "main/colormac.h" #include "main/image.h" #include "main/imports.h" -#include "main/pixel.h" #include "shader/prog_instruction.h" #include "s_context.h" @@ -317,18 +316,18 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n, /* (a * b) + (c * d) - 0.5 */ for (i = 0; i < n; i++) { rgba[i][RCOMP] = (arg0[i][RCOMP] * arg1[i][RCOMP] + - arg2[i][RCOMP] * arg3[i][RCOMP] - 0.5) * scaleRGB; + arg2[i][RCOMP] * arg3[i][RCOMP] - 0.5F) * scaleRGB; rgba[i][GCOMP] = (arg0[i][GCOMP] * arg1[i][GCOMP] + - arg2[i][GCOMP] * arg3[i][GCOMP] - 0.5) * scaleRGB; + arg2[i][GCOMP] * arg3[i][GCOMP] - 0.5F) * scaleRGB; rgba[i][BCOMP] = (arg0[i][BCOMP] * arg1[i][BCOMP] + - arg2[i][BCOMP] * arg3[i][BCOMP] - 0.5) * scaleRGB; + arg2[i][BCOMP] * arg3[i][BCOMP] - 0.5F) * scaleRGB; } } else { for (i = 0; i < n; i++) { - rgba[i][RCOMP] = (arg0[i][RCOMP] + arg1[i][RCOMP] - 0.5) * scaleRGB; - rgba[i][GCOMP] = (arg0[i][GCOMP] + arg1[i][GCOMP] - 0.5) * scaleRGB; - rgba[i][BCOMP] = (arg0[i][BCOMP] + arg1[i][BCOMP] - 0.5) * scaleRGB; + rgba[i][RCOMP] = (arg0[i][RCOMP] + arg1[i][RCOMP] - 0.5F) * scaleRGB; + rgba[i][GCOMP] = (arg0[i][GCOMP] + arg1[i][GCOMP] - 0.5F) * scaleRGB; + rgba[i][BCOMP] = (arg0[i][BCOMP] + arg1[i][BCOMP] - 0.5F) * scaleRGB; } } break; @@ -369,7 +368,7 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n, (arg0[i][GCOMP] - 0.5F) * (arg1[i][GCOMP] - 0.5F) + (arg0[i][BCOMP] - 0.5F) * (arg1[i][BCOMP] - 0.5F)) * 4.0F * scaleRGB; - dot = CLAMP(dot, 0.0, 1.0F); + dot = CLAMP(dot, 0.0F, 1.0F); rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = dot; } break; @@ -386,11 +385,11 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n, case GL_MODULATE_SIGNED_ADD_ATI: for (i = 0; i < n; i++) { rgba[i][RCOMP] = ((arg0[i][RCOMP] * arg2[i][RCOMP]) + - arg1[i][RCOMP] - 0.5) * scaleRGB; + arg1[i][RCOMP] - 0.5F) * scaleRGB; rgba[i][GCOMP] = ((arg0[i][GCOMP] * arg2[i][GCOMP]) + - arg1[i][GCOMP] - 0.5) * scaleRGB; + arg1[i][GCOMP] - 0.5F) * scaleRGB; rgba[i][BCOMP] = ((arg0[i][BCOMP] * arg2[i][BCOMP]) + - arg1[i][BCOMP] - 0.5) * scaleRGB; + arg1[i][BCOMP] - 0.5F) * scaleRGB; } break; case GL_MODULATE_SUBTRACT_ATI: @@ -457,7 +456,7 @@ texture_combine( GLcontext *ctx, GLuint unit, GLuint n, for (i = 0; i < n; i++) { rgba[i][ACOMP] = (arg0[i][ACOMP] * arg1[i][ACOMP] + arg2[i][ACOMP] * arg3[i][ACOMP] - - 0.5) * scaleA; + 0.5F) * scaleA; } } else { diff --git a/mesalib/src/mesa/swrast/s_texfilter.c b/mesalib/src/mesa/swrast/s_texfilter.c index 0bb988e3e..997c2f4bb 100644 --- a/mesalib/src/mesa/swrast/s_texfilter.c +++ b/mesalib/src/mesa/swrast/s_texfilter.c @@ -445,7 +445,7 @@ clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max, switch (wrapMode) { case GL_CLAMP: /* Not exactly what the spec says, but it matches NVIDIA output */ - fcol = CLAMP(coord - 0.5F, 0.0, max-1); + fcol = CLAMP(coord - 0.5F, 0.0F, max - 1); i0 = IFLOOR(fcol); i1 = i0 + 1; break; @@ -474,6 +474,18 @@ clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max, } +/** + * Compute slice/image to use for 1D or 2D array texture. + */ +static INLINE GLint +tex_array_slice(GLfloat coord, GLsizei size) +{ + GLint slice = IFLOOR(coord + 0.5f); + slice = CLAMP(slice, 0, size - 1); + return slice; +} + + /** * Compute nearest integer texcoords for given texobj and coordinate. */ @@ -506,13 +518,13 @@ nearest_texcoord(const struct gl_texture_object *texObj, break; case GL_TEXTURE_1D_ARRAY_EXT: *i = nearest_texel_location(texObj->WrapS, img, width, texcoord[0]); - *j = clamp_rect_coord_nearest(texObj->WrapT, texcoord[1], height); + *j = tex_array_slice(texcoord[1], height); *k = 0; break; case GL_TEXTURE_2D_ARRAY_EXT: *i = nearest_texel_location(texObj->WrapS, img, width, texcoord[0]); *j = nearest_texel_location(texObj->WrapT, img, height, texcoord[1]); - *k = clamp_rect_coord_nearest(texObj->WrapR, texcoord[2], depth); + *k = tex_array_slice(texcoord[2], depth); break; default: *i = *j = *k = 0; @@ -556,7 +568,7 @@ linear_texcoord(const struct gl_texture_object *texObj, case GL_TEXTURE_1D_ARRAY_EXT: linear_texel_locations(texObj->WrapS, img, width, texcoord[0], i0, i1, wi); - *j0 = clamp_rect_coord_nearest(texObj->WrapT, texcoord[1], height); + *j0 = tex_array_slice(texcoord[1], height); *j1 = *j0; *slice = 0; break; @@ -566,7 +578,7 @@ linear_texcoord(const struct gl_texture_object *texObj, texcoord[0], i0, i1, wi); linear_texel_locations(texObj->WrapT, img, height, texcoord[1], j0, j1, wj); - *slice = clamp_rect_coord_nearest(texObj->WrapR, texcoord[2], depth); + *slice = tex_array_slice(texcoord[2], depth); break; default: @@ -747,28 +759,28 @@ get_border_color(const struct gl_texture_object *tObj, { switch (img->_BaseFormat) { case GL_RGB: - rgba[0] = tObj->BorderColor[0]; - rgba[1] = tObj->BorderColor[1]; - rgba[2] = tObj->BorderColor[2]; + rgba[0] = tObj->BorderColor.f[0]; + rgba[1] = tObj->BorderColor.f[1]; + rgba[2] = tObj->BorderColor.f[2]; rgba[3] = 1.0F; break; case GL_ALPHA: rgba[0] = rgba[1] = rgba[2] = 0.0; - rgba[3] = tObj->BorderColor[3]; + rgba[3] = tObj->BorderColor.f[3]; break; case GL_LUMINANCE: - rgba[0] = rgba[1] = rgba[2] = tObj->BorderColor[0]; + rgba[0] = rgba[1] = rgba[2] = tObj->BorderColor.f[0]; rgba[3] = 1.0; break; case GL_LUMINANCE_ALPHA: - rgba[0] = rgba[1] = rgba[2] = tObj->BorderColor[0]; - rgba[3] = tObj->BorderColor[3]; + rgba[0] = rgba[1] = rgba[2] = tObj->BorderColor.f[0]; + rgba[3] = tObj->BorderColor.f[3]; break; case GL_INTENSITY: - rgba[0] = rgba[1] = rgba[2] = rgba[3] = tObj->BorderColor[0]; + rgba[0] = rgba[1] = rgba[2] = rgba[3] = tObj->BorderColor.f[0]; break; default: - COPY_4V(rgba, tObj->BorderColor); + COPY_4V(rgba, tObj->BorderColor.f); } } @@ -2269,7 +2281,6 @@ sample_lambda_rect(GLcontext *ctx, } - /**********************************************************************/ /* 2D Texture Array Sampling Functions */ /**********************************************************************/ @@ -2293,7 +2304,7 @@ sample_2d_array_nearest(GLcontext *ctx, i = nearest_texel_location(tObj->WrapS, img, width, texcoord[0]); j = nearest_texel_location(tObj->WrapT, img, height, texcoord[1]); - array = clamp_rect_coord_nearest(tObj->WrapR, texcoord[2], depth); + array = tex_array_slice(texcoord[2], depth); if (i < 0 || i >= (GLint) img->Width || j < 0 || j >= (GLint) img->Height || @@ -2328,10 +2339,10 @@ sample_2d_array_linear(GLcontext *ctx, linear_texel_locations(tObj->WrapS, img, width, texcoord[0], &i0, &i1, &a); linear_texel_locations(tObj->WrapT, img, height, texcoord[1], &j0, &j1, &b); - array = clamp_rect_coord_nearest(tObj->WrapR, texcoord[2], depth); + array = tex_array_slice(texcoord[2], depth); if (array < 0 || array >= depth) { - COPY_4V(rgba, tObj->BorderColor); + COPY_4V(rgba, tObj->BorderColor.f); } else { if (img->Border) { @@ -2601,7 +2612,7 @@ sample_1d_array_nearest(GLcontext *ctx, (void) ctx; i = nearest_texel_location(tObj->WrapS, img, width, texcoord[0]); - array = clamp_rect_coord_nearest(tObj->WrapT, texcoord[1], height); + array = tex_array_slice(texcoord[1], height); if (i < 0 || i >= (GLint) img->Width || array < 0 || array >= (GLint) img->Height) { @@ -2633,7 +2644,7 @@ sample_1d_array_linear(GLcontext *ctx, GLfloat t0[4], t1[4]; linear_texel_locations(tObj->WrapS, img, width, texcoord[0], &i0, &i1, &a); - array = clamp_rect_coord_nearest(tObj->WrapT, texcoord[1], height); + array = tex_array_slice(texcoord[1], height); if (img->Border) { i0 += img->Border; @@ -3002,7 +3013,7 @@ sample_depth_texture( GLcontext *ctx, img->FetchTexelf(img, col, row, slice, &depthSample); } else { - depthSample = tObj->BorderColor[0]; + depthSample = tObj->BorderColor.f[0]; } result = shadow_compare(function, texcoords[i][compare_coord], @@ -3053,21 +3064,21 @@ sample_depth_texture( GLcontext *ctx, } if (slice < 0 || slice >= (GLint) depth) { - depth00 = tObj->BorderColor[0]; - depth01 = tObj->BorderColor[0]; - depth10 = tObj->BorderColor[0]; - depth11 = tObj->BorderColor[0]; + depth00 = tObj->BorderColor.f[0]; + depth01 = tObj->BorderColor.f[0]; + depth10 = tObj->BorderColor.f[0]; + depth11 = tObj->BorderColor.f[0]; } else { /* get four depth samples from the texture */ if (useBorderTexel & (I0BIT | J0BIT)) { - depth00 = tObj->BorderColor[0]; + depth00 = tObj->BorderColor.f[0]; } else { img->FetchTexelf(img, i0, j0, slice, &depth00); } if (useBorderTexel & (I1BIT | J0BIT)) { - depth10 = tObj->BorderColor[0]; + depth10 = tObj->BorderColor.f[0]; } else { img->FetchTexelf(img, i1, j0, slice, &depth10); @@ -3075,13 +3086,13 @@ sample_depth_texture( GLcontext *ctx, if (tObj->Target != GL_TEXTURE_1D_ARRAY_EXT) { if (useBorderTexel & (I0BIT | J1BIT)) { - depth01 = tObj->BorderColor[0]; + depth01 = tObj->BorderColor.f[0]; } else { img->FetchTexelf(img, i0, j1, slice, &depth01); } if (useBorderTexel & (I1BIT | J1BIT)) { - depth11 = tObj->BorderColor[0]; + depth11 = tObj->BorderColor.f[0]; } else { img->FetchTexelf(img, i1, j1, slice, &depth11); diff --git a/mesalib/src/mesa/swrast/s_triangle.c b/mesalib/src/mesa/swrast/s_triangle.c index 5bec60669..812dddf15 100644 --- a/mesalib/src/mesa/swrast/s_triangle.c +++ b/mesalib/src/mesa/swrast/s_triangle.c @@ -69,18 +69,6 @@ _swrast_culltriangle( GLcontext *ctx, -/* - * Render a smooth or flat-shaded color index triangle. - */ -#define NAME ci_triangle -#define INTERP_Z 1 -#define INTERP_ATTRIBS 1 /* just for fog */ -#define INTERP_INDEX 1 -#define RENDER_SPAN( span ) _swrast_write_index_span(ctx, &span); -#include "s_tritemp.h" - - - /* * Render a flat-shaded RGBA triangle. */ @@ -1007,7 +995,6 @@ void _swrast_choose_triangle( GLcontext *ctx ) { SWcontext *swrast = SWRAST_CONTEXT(ctx); - const GLboolean rgbmode = ctx->Visual.rgbMode; if (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) { @@ -1029,23 +1016,15 @@ _swrast_choose_triangle( GLcontext *ctx ) ctx->Depth.Mask == GL_FALSE && ctx->Depth.Func == GL_LESS && !ctx->Stencil._Enabled) { - if ((rgbmode && - ctx->Color.ColorMask[0] == 0 && - ctx->Color.ColorMask[1] == 0 && - ctx->Color.ColorMask[2] == 0 && - ctx->Color.ColorMask[3] == 0) - || - (!rgbmode && ctx->Color.IndexMask == 0)) { + if (ctx->Color.ColorMask[0][0] == 0 && + ctx->Color.ColorMask[0][1] == 0 && + ctx->Color.ColorMask[0][2] == 0 && + ctx->Color.ColorMask[0][3] == 0) { USE(occlusion_zless_triangle); return; } } - if (!rgbmode) { - USE(ci_triangle); - return; - } - /* * XXX should examine swrast->_ActiveAttribMask to determine what * needs to be interpolated. diff --git a/mesalib/src/mesa/swrast/s_tritemp.h b/mesalib/src/mesa/swrast/s_tritemp.h index 8e3c5b5ee..0aa8739f4 100644 --- a/mesalib/src/mesa/swrast/s_tritemp.h +++ b/mesalib/src/mesa/swrast/s_tritemp.h @@ -32,7 +32,6 @@ * INTERP_Z - if defined, interpolate integer Z values * INTERP_RGB - if defined, interpolate integer RGB values * INTERP_ALPHA - if defined, interpolate integer Alpha values - * INTERP_INDEX - if defined, interpolate color index values * INTERP_INT_TEX - if defined, interpolate integer ST texcoords * (fast, simple 2-D texture mapping, without * perspective correction) @@ -319,9 +318,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, { GLint scan_from_left_to_right; /* true if scanning left-to-right */ -#ifdef INTERP_INDEX - GLfloat didx, didy; -#endif /* * Execute user-supplied setup code @@ -398,21 +394,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, # endif } #endif /* INTERP_RGB */ -#ifdef INTERP_INDEX - span.interpMask |= SPAN_INDEX; - if (ctx->Light.ShadeModel == GL_SMOOTH) { - GLfloat eMaj_di = vMax->attrib[FRAG_ATTRIB_CI][0] - vMin->attrib[FRAG_ATTRIB_CI][0]; - GLfloat eBot_di = vMid->attrib[FRAG_ATTRIB_CI][0] - vMin->attrib[FRAG_ATTRIB_CI][0]; - didx = oneOverArea * (eMaj_di * eBot.dy - eMaj.dy * eBot_di); - didy = oneOverArea * (eMaj.dx * eBot_di - eMaj_di * eBot.dx); - span.indexStep = SignedFloatToFixed(didx); - } - else { - span.interpMask |= SPAN_FLAT; - didx = didy = 0.0F; - span.indexStep = 0; - } -#endif #ifdef INTERP_INT_TEX { GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * S_SCALE; @@ -531,9 +512,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_ALPHA GLint aLeft = 0, fdaOuter = 0, fdaInner; #endif -#ifdef INTERP_INDEX - GLfixed iLeft=0, diOuter=0, diInner; -#endif #ifdef INTERP_INT_TEX GLfixed sLeft=0, dsOuter=0, dsInner; GLfixed tLeft=0, dtOuter=0, dtInner; @@ -697,18 +675,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #endif /* INTERP_RGB */ -#ifdef INTERP_INDEX - if (ctx->Light.ShadeModel == GL_SMOOTH) { - iLeft = (GLfixed)(vLower->attrib[FRAG_ATTRIB_CI][0] * FIXED_SCALE - + didx * adjx + didy * adjy) + FIXED_HALF; - diOuter = SignedFloatToFixed(didy + dxOuter * didx); - } - else { - ASSERT(ctx->Light.ShadeModel == GL_FLAT); - iLeft = FloatToFixed(v2->attrib[FRAG_ATTRIB_CI][0]); - diOuter = 0; - } -#endif #ifdef INTERP_INT_TEX { GLfloat s0, t0; @@ -784,9 +750,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_ALPHA fdaInner = fdaOuter + span.alphaStep; #endif -#ifdef INTERP_INDEX - diInner = diOuter + span.indexStep; -#endif #ifdef INTERP_INT_TEX dsInner = dsOuter + span.intTexStep[0]; dtInner = dtOuter + span.intTexStep[1]; @@ -822,9 +785,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_ALPHA span.alpha = aLeft; #endif -#ifdef INTERP_INDEX - span.index = iLeft; -#endif #ifdef INTERP_INT_TEX span.intTex[0] = sLeft; span.intTex[1] = tLeft; @@ -854,9 +814,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #endif #ifdef INTERP_ALPHA CLAMP_INTERPOLANT(alpha, alphaStep, len); -#endif -#ifdef INTERP_INDEX - CLAMP_INTERPOLANT(index, indexStep, len); #endif { RENDER_SPAN( span ); @@ -896,9 +853,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_ALPHA aLeft += fdaOuter; #endif -#ifdef INTERP_INDEX - iLeft += diOuter; -#endif #ifdef INTERP_INT_TEX sLeft += dsOuter; tLeft += dtOuter; @@ -931,9 +885,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #ifdef INTERP_ALPHA aLeft += fdaInner; #endif -#ifdef INTERP_INDEX - iLeft += diInner; -#endif #ifdef INTERP_INT_TEX sLeft += dsInner; tLeft += dtInner; @@ -967,7 +918,6 @@ static void NAME(GLcontext *ctx, const SWvertex *v0, #undef INTERP_Z #undef INTERP_RGB #undef INTERP_ALPHA -#undef INTERP_INDEX #undef INTERP_INT_TEX #undef INTERP_ATTRIBS diff --git a/mesalib/src/mesa/swrast/s_zoom.c b/mesalib/src/mesa/swrast/s_zoom.c index a48eae192..f224627d5 100644 --- a/mesalib/src/mesa/swrast/s_zoom.c +++ b/mesalib/src/mesa/swrast/s_zoom.c @@ -185,15 +185,6 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, zoomed.arrayAttribs |= FRAG_BIT_COL0; /* we'll produce these values */ ASSERT(span->arrayMask & SPAN_RGBA); } - else if (format == GL_COLOR_INDEX) { - /* copy Z info */ - zoomed.z = span->z; - zoomed.zStep = span->zStep; - /* we'll generate an array of color indexes */ - zoomed.interpMask = span->interpMask & ~SPAN_INDEX; - zoomed.arrayMask |= SPAN_INDEX; - ASSERT(span->arrayMask & SPAN_INDEX); - } else if (format == GL_DEPTH_COMPONENT) { /* Copy color info */ zoomed.red = span->red; @@ -288,16 +279,6 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, } } } - else if (format == GL_COLOR_INDEX) { - const GLuint *indexes = (const GLuint *) src; - GLint i; - for (i = 0; i < zoomedWidth; i++) { - GLint j = unzoom_x(ctx->Pixel.ZoomX, imgX, x0 + i) - span->x; - ASSERT(j >= 0); - ASSERT(j < (GLint) span->end); - zoomed.array->index[i] = indexes[j]; - } - } else if (format == GL_DEPTH_COMPONENT) { const GLuint *zValues = (const GLuint *) src; GLint i; @@ -307,8 +288,8 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, ASSERT(j < (GLint) span->end); zoomed.array->z[i] = zValues[j]; } - /* Now, fall into either the RGB or COLOR_INDEX path below */ - format = ctx->Visual.rgbMode ? GL_RGBA : GL_COLOR_INDEX; + /* Now, fall into the RGB path below */ + format = GL_RGBA; } /* write the span in rows [r0, r1) */ @@ -324,30 +305,14 @@ zoom_span( GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, ((zoomed.array->ChanType == GL_UNSIGNED_SHORT) ? 4 * sizeof(GLushort) : 4 * sizeof(GLfloat)); if (y1 - y0 > 1) { - MEMCPY(rgbaSave, zoomed.array->rgba, zoomed.end * pixelSize); + memcpy(rgbaSave, zoomed.array->rgba, zoomed.end * pixelSize); } for (zoomed.y = y0; zoomed.y < y1; zoomed.y++) { _swrast_write_rgba_span(ctx, &zoomed); zoomed.end = end; /* restore */ if (y1 - y0 > 1) { /* restore the colors */ - MEMCPY(zoomed.array->rgba, rgbaSave, zoomed.end * pixelSize); - } - } - } - else if (format == GL_COLOR_INDEX) { - /* use specular color array for temp storage */ - GLuint *indexSave = (GLuint *) zoomed.array->attribs[FRAG_ATTRIB_FOGC]; - const GLint end = zoomed.end; /* save */ - if (y1 - y0 > 1) { - MEMCPY(indexSave, zoomed.array->index, zoomed.end * sizeof(GLuint)); - } - for (zoomed.y = y0; zoomed.y < y1; zoomed.y++) { - _swrast_write_index_span(ctx, &zoomed); - zoomed.end = end; /* restore */ - if (y1 - y0 > 1) { - /* restore the colors */ - MEMCPY(zoomed.array->index, indexSave, zoomed.end * sizeof(GLuint)); + memcpy(zoomed.array->rgba, rgbaSave, zoomed.end * pixelSize); } } } @@ -370,15 +335,6 @@ _swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY, } -void -_swrast_write_zoomed_index_span(GLcontext *ctx, GLint imgX, GLint imgY, - const SWspan *span) -{ - zoom_span(ctx, imgX, imgY, span, - (const GLvoid *) span->array->index, GL_COLOR_INDEX); -} - - void _swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span) diff --git a/mesalib/src/mesa/swrast/s_zoom.h b/mesalib/src/mesa/swrast/s_zoom.h index d2815b41a..43917be65 100644 --- a/mesalib/src/mesa/swrast/s_zoom.h +++ b/mesalib/src/mesa/swrast/s_zoom.h @@ -36,10 +36,6 @@ extern void _swrast_write_zoomed_rgb_span(GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, const GLvoid *rgb); -extern void -_swrast_write_zoomed_index_span(GLcontext *ctx, GLint imgX, GLint imgY, - const SWspan *span); - extern void _swrast_write_zoomed_depth_span(GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span); diff --git a/mesalib/src/mesa/swrast/swrast.h b/mesalib/src/mesa/swrast/swrast.h index c183b315b..c01cf7d1f 100644 --- a/mesalib/src/mesa/swrast/swrast.h +++ b/mesalib/src/mesa/swrast/swrast.h @@ -75,12 +75,6 @@ typedef struct { } SWvertex; -/** - * Fixed point data type. - */ -typedef int GLfixed; - - #define FRAG_ATTRIB_CI FRAG_ATTRIB_COL0 diff --git a/mesalib/src/mesa/swrast_setup/ss_context.c b/mesalib/src/mesa/swrast_setup/ss_context.c index 61172f997..ebd1574c4 100644 --- a/mesalib/src/mesa/swrast_setup/ss_context.c +++ b/mesalib/src/mesa/swrast_setup/ss_context.c @@ -122,7 +122,7 @@ setup_vertex_format(GLcontext *ctx) swsetup->last_index_bitset)) { DECLARE_RENDERINPUTS(index_bitset); struct tnl_attr_map map[_TNL_ATTRIB_MAX]; - int i, e = 0; + unsigned int i, e = 0; swsetup->intColors = intColors; @@ -141,11 +141,6 @@ setup_vertex_format(GLcontext *ctx) EMIT_ATTR( _TNL_ATTRIB_COLOR1, EMIT_4F, attrib[FRAG_ATTRIB_COL1]); } - if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_COLOR_INDEX )) { - EMIT_ATTR( _TNL_ATTRIB_COLOR_INDEX, EMIT_1F, - attrib[FRAG_ATTRIB_CI][0] ); - } - if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_FOG )) { const GLint emit = ctx->FragmentProgram._Current ? EMIT_4F : EMIT_1F; EMIT_ATTR( _TNL_ATTRIB_FOG, emit, attrib[FRAG_ATTRIB_FOGC]); @@ -294,18 +289,12 @@ _swsetup_Translate( GLcontext *ctx, const void *vertex, SWvertex *dest ) _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_GENERIC0 + i, dest->attrib[FRAG_ATTRIB_VAR0 + i] ); - if (ctx->Visual.rgbMode) { - _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR0, - dest->attrib[FRAG_ATTRIB_COL0] ); - UNCLAMPED_FLOAT_TO_RGBA_CHAN( dest->color, tmp ); + _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR0, + dest->attrib[FRAG_ATTRIB_COL0] ); + UNCLAMPED_FLOAT_TO_RGBA_CHAN( dest->color, tmp ); - _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR1, - dest->attrib[FRAG_ATTRIB_COL1]); - } - else { - _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR_INDEX, tmp ); - dest->attrib[FRAG_ATTRIB_CI][0] = tmp[0]; - } + _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_COLOR1, + dest->attrib[FRAG_ATTRIB_COL1]); _tnl_get_attr( ctx, vertex, _TNL_ATTRIB_FOG, tmp ); dest->attrib[FRAG_ATTRIB_FOGC][0] = tmp[0]; diff --git a/mesalib/src/mesa/swrast_setup/ss_triangle.c b/mesalib/src/mesa/swrast_setup/ss_triangle.c index e15b1348d..bad0d8194 100644 --- a/mesalib/src/mesa/swrast_setup/ss_triangle.c +++ b/mesalib/src/mesa/swrast_setup/ss_triangle.c @@ -35,11 +35,10 @@ #include "ss_triangle.h" #include "ss_context.h" -#define SS_RGBA_BIT 0x1 -#define SS_OFFSET_BIT 0x2 -#define SS_TWOSIDE_BIT 0x4 -#define SS_UNFILLED_BIT 0x8 -#define SS_MAX_TRIFUNC 0x10 +#define SS_OFFSET_BIT 0x1 +#define SS_TWOSIDE_BIT 0x2 +#define SS_UNFILLED_BIT 0x4 +#define SS_MAX_TRIFUNC 0x8 static tnl_triangle_func tri_tab[SS_MAX_TRIFUNC]; static tnl_quad_func quad_tab[SS_MAX_TRIFUNC]; @@ -134,23 +133,18 @@ static void _swsetup_render_tri(GLcontext *ctx, if (ctx->Light.ShadeModel == GL_FLAT) { GLchan c[2][4]; GLfloat s[2][4]; - GLfloat i[2]; /* save colors/indexes for v0, v1 vertices */ COPY_CHAN4(c[0], v0->color); COPY_CHAN4(c[1], v1->color); COPY_4V(s[0], v0->attrib[FRAG_ATTRIB_COL1]); COPY_4V(s[1], v1->attrib[FRAG_ATTRIB_COL1]); - i[0] = v0->attrib[FRAG_ATTRIB_CI][0]; - i[1] = v1->attrib[FRAG_ATTRIB_CI][0]; /* copy v2 color/indexes to v0, v1 indexes */ COPY_CHAN4(v0->color, v2->color); COPY_CHAN4(v1->color, v2->color); COPY_4V(v0->attrib[FRAG_ATTRIB_COL1], v2->attrib[FRAG_ATTRIB_COL1]); COPY_4V(v1->attrib[FRAG_ATTRIB_COL1], v2->attrib[FRAG_ATTRIB_COL1]); - v0->attrib[FRAG_ATTRIB_CI][0] = v2->attrib[FRAG_ATTRIB_CI][0]; - v1->attrib[FRAG_ATTRIB_CI][0] = v2->attrib[FRAG_ATTRIB_CI][0]; render(ctx, ef, e0, e1, e2, v0, v1, v2); @@ -158,8 +152,6 @@ static void _swsetup_render_tri(GLcontext *ctx, COPY_CHAN4(v1->color, c[1]); COPY_4V(v0->attrib[FRAG_ATTRIB_COL1], s[0]); COPY_4V(v1->attrib[FRAG_ATTRIB_COL1], s[1]); - v0->attrib[FRAG_ATTRIB_CI][0] = i[0]; - v1->attrib[FRAG_ATTRIB_CI][0] = i[1]; } else { render(ctx, ef, e0, e1, e2, v0, v1, v2); @@ -171,66 +163,34 @@ static void _swsetup_render_tri(GLcontext *ctx, #define SS_IND(a,b) (a = b) #define IND (0) -#define TAG(x) x -#include "ss_tritmp.h" - -#define IND (SS_OFFSET_BIT) -#define TAG(x) x##_offset -#include "ss_tritmp.h" - -#define IND (SS_TWOSIDE_BIT) -#define TAG(x) x##_twoside -#include "ss_tritmp.h" - -#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT) -#define TAG(x) x##_offset_twoside -#include "ss_tritmp.h" - -#define IND (SS_UNFILLED_BIT) -#define TAG(x) x##_unfilled -#include "ss_tritmp.h" - -#define IND (SS_OFFSET_BIT|SS_UNFILLED_BIT) -#define TAG(x) x##_offset_unfilled -#include "ss_tritmp.h" - -#define IND (SS_TWOSIDE_BIT|SS_UNFILLED_BIT) -#define TAG(x) x##_twoside_unfilled -#include "ss_tritmp.h" - -#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT) -#define TAG(x) x##_offset_twoside_unfilled -#include "ss_tritmp.h" - -#define IND (0|SS_RGBA_BIT) #define TAG(x) x##_rgba #include "ss_tritmp.h" -#define IND (SS_OFFSET_BIT|SS_RGBA_BIT) +#define IND (SS_OFFSET_BIT) #define TAG(x) x##_offset_rgba #include "ss_tritmp.h" -#define IND (SS_TWOSIDE_BIT|SS_RGBA_BIT) +#define IND (SS_TWOSIDE_BIT) #define TAG(x) x##_twoside_rgba #include "ss_tritmp.h" -#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_RGBA_BIT) +#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT) #define TAG(x) x##_offset_twoside_rgba #include "ss_tritmp.h" -#define IND (SS_UNFILLED_BIT|SS_RGBA_BIT) +#define IND (SS_UNFILLED_BIT) #define TAG(x) x##_unfilled_rgba #include "ss_tritmp.h" -#define IND (SS_OFFSET_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT) +#define IND (SS_OFFSET_BIT|SS_UNFILLED_BIT) #define TAG(x) x##_offset_unfilled_rgba #include "ss_tritmp.h" -#define IND (SS_TWOSIDE_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT) +#define IND (SS_TWOSIDE_BIT|SS_UNFILLED_BIT) #define TAG(x) x##_twoside_unfilled_rgba #include "ss_tritmp.h" -#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT|SS_RGBA_BIT) +#define IND (SS_OFFSET_BIT|SS_TWOSIDE_BIT|SS_UNFILLED_BIT) #define TAG(x) x##_offset_twoside_unfilled_rgba #include "ss_tritmp.h" @@ -239,15 +199,6 @@ void _swsetup_trifuncs_init( GLcontext *ctx ) { (void) ctx; - init(); - init_offset(); - init_twoside(); - init_offset_twoside(); - init_unfilled(); - init_offset_unfilled(); - init_twoside_unfilled(); - init_offset_twoside_unfilled(); - init_rgba(); init_offset_rgba(); init_twoside_rgba(); @@ -307,9 +258,6 @@ void _swsetup_choose_trifuncs( GLcontext *ctx ) (ctx->Stencil.Enabled && ctx->Stencil._TestTwoSide)) ind |= SS_UNFILLED_BIT; - if (ctx->Visual.rgbMode) - ind |= SS_RGBA_BIT; - tnl->Driver.Render.Triangle = tri_tab[ind]; tnl->Driver.Render.Quad = quad_tab[ind]; tnl->Driver.Render.Line = swsetup_line; diff --git a/mesalib/src/mesa/swrast_setup/ss_tritmp.h b/mesalib/src/mesa/swrast_setup/ss_tritmp.h index bd20a8d97..8e9fa1bd5 100644 --- a/mesalib/src/mesa/swrast_setup/ss_tritmp.h +++ b/mesalib/src/mesa/swrast_setup/ss_tritmp.h @@ -40,10 +40,9 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) GLfloat offset, oz0, oz1, oz2; GLenum mode = GL_FILL; GLuint facing = 0; - GLchan saved_color[3][4]; + GLchan saved_color[3][4] = { { 0 } }; GLfloat saved_col0[3][4] = { { 0 } }; GLfloat saved_spec[3][4] = { { 0 } }; - GLfloat saved_index[3] = { 0 }; v[0] = &verts[e0]; v[1] = &verts[e1]; @@ -66,75 +65,64 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) if (facing == 1) { if (IND & SS_TWOSIDE_BIT) { - if (IND & SS_RGBA_BIT) { - if (VB->ColorPtr[1]) { - GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->data; + if (VB->BackfaceColorPtr) { + GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data; + if (swsetup->intColors) { + COPY_CHAN4(saved_color[0], v[0]->color); + COPY_CHAN4(saved_color[1], v[1]->color); + COPY_CHAN4(saved_color[2], v[2]->color); + } + else { + COPY_4V(saved_col0[0], v[0]->attrib[FRAG_ATTRIB_COL0]); + COPY_4V(saved_col0[1], v[1]->attrib[FRAG_ATTRIB_COL0]); + COPY_4V(saved_col0[2], v[2]->attrib[FRAG_ATTRIB_COL0]); + } + + if (VB->BackfaceColorPtr->stride) { if (swsetup->intColors) { - COPY_CHAN4(saved_color[0], v[0]->color); - COPY_CHAN4(saved_color[1], v[1]->color); - COPY_CHAN4(saved_color[2], v[2]->color); + SS_COLOR(v[0]->color, vbcolor[e0]); + SS_COLOR(v[1]->color, vbcolor[e1]); + SS_COLOR(v[2]->color, vbcolor[e2]); } else { - COPY_4V(saved_col0[0], v[0]->attrib[FRAG_ATTRIB_COL0]); - COPY_4V(saved_col0[1], v[1]->attrib[FRAG_ATTRIB_COL0]); - COPY_4V(saved_col0[2], v[2]->attrib[FRAG_ATTRIB_COL0]); + COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[e0]); + COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[e1]); + COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[e2]); } - - if (VB->ColorPtr[1]->stride) { - if (swsetup->intColors) { - SS_COLOR(v[0]->color, vbcolor[e0]); - SS_COLOR(v[1]->color, vbcolor[e1]); - SS_COLOR(v[2]->color, vbcolor[e2]); - } - else { - COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[e0]); - COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[e1]); - COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[e2]); - } + } + else { + /* flat shade */ + if (swsetup->intColors) { + SS_COLOR(v[0]->color, vbcolor[0]); + SS_COLOR(v[1]->color, vbcolor[0]); + SS_COLOR(v[2]->color, vbcolor[0]); } else { - /* flat shade */ - if (swsetup->intColors) { - SS_COLOR(v[0]->color, vbcolor[0]); - SS_COLOR(v[1]->color, vbcolor[0]); - SS_COLOR(v[2]->color, vbcolor[0]); - } - else { - COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]); - COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]); - COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]); - } + COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]); + COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]); + COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], vbcolor[0]); } } + } - if (VB->SecondaryColorPtr[1]) { - GLfloat (*vbspec)[4] = VB->SecondaryColorPtr[1]->data; + if (VB->BackfaceSecondaryColorPtr) { + GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data; - COPY_4V(saved_spec[0], v[0]->attrib[FRAG_ATTRIB_COL1]); - COPY_4V(saved_spec[1], v[1]->attrib[FRAG_ATTRIB_COL1]); - COPY_4V(saved_spec[2], v[2]->attrib[FRAG_ATTRIB_COL1]); + COPY_4V(saved_spec[0], v[0]->attrib[FRAG_ATTRIB_COL1]); + COPY_4V(saved_spec[1], v[1]->attrib[FRAG_ATTRIB_COL1]); + COPY_4V(saved_spec[2], v[2]->attrib[FRAG_ATTRIB_COL1]); - if (VB->SecondaryColorPtr[1]->stride) { - SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[e0]); - SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[e1]); - SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[e2]); - } - else { - SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[0]); - SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[0]); - SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[0]); - } + if (VB->BackfaceSecondaryColorPtr->stride) { + SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[e0]); + SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[e1]); + SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[e2]); + } + else { + SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[0]); + SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[0]); + SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[0]); } - } else { - GLfloat *vbindex = (GLfloat *)VB->IndexPtr[1]->data; - saved_index[0] = v[0]->attrib[FRAG_ATTRIB_CI][0]; - saved_index[1] = v[1]->attrib[FRAG_ATTRIB_CI][0]; - saved_index[2] = v[2]->attrib[FRAG_ATTRIB_CI][0]; - - SS_IND(v[0]->attrib[FRAG_ATTRIB_CI][0], (GLuint) vbindex[e0]); - SS_IND(v[1]->attrib[FRAG_ATTRIB_CI][0], (GLuint) vbindex[e1]); - SS_IND(v[2]->attrib[FRAG_ATTRIB_CI][0], (GLuint) vbindex[e2]); } } } @@ -159,9 +147,9 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) offset += MAX2(dzdx, dzdy) * ctx->Polygon.OffsetFactor; } /* new Z values */ - oz0 = CLAMP(v[0]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0, max); - oz1 = CLAMP(v[1]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0, max); - oz2 = CLAMP(v[2]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0, max); + oz0 = CLAMP(v[0]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0F, max); + oz1 = CLAMP(v[1]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0F, max); + oz2 = CLAMP(v[2]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0F, max); } } @@ -199,30 +187,24 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) if (IND & SS_TWOSIDE_BIT) { if (facing == 1) { - if (IND & SS_RGBA_BIT) { - if (VB->ColorPtr[1]) { - if (swsetup->intColors) { - COPY_CHAN4(v[0]->color, saved_color[0]); - COPY_CHAN4(v[1]->color, saved_color[1]); - COPY_CHAN4(v[2]->color, saved_color[2]); - } - else { - COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], saved_col0[0]); - COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], saved_col0[1]); - COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], saved_col0[2]); - } - } - - if (VB->SecondaryColorPtr[1]) { - COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL1], saved_spec[0]); - COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL1], saved_spec[1]); - COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL1], saved_spec[2]); - } - } else { - v[0]->attrib[FRAG_ATTRIB_CI][0] = saved_index[0]; - v[1]->attrib[FRAG_ATTRIB_CI][0] = saved_index[1]; - v[2]->attrib[FRAG_ATTRIB_CI][0] = saved_index[2]; - } + if (VB->BackfaceColorPtr) { + if (swsetup->intColors) { + COPY_CHAN4(v[0]->color, saved_color[0]); + COPY_CHAN4(v[1]->color, saved_color[1]); + COPY_CHAN4(v[2]->color, saved_color[2]); + } + else { + COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL0], saved_col0[0]); + COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL0], saved_col0[1]); + COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL0], saved_col0[2]); + } + } + + if (VB->BackfaceSecondaryColorPtr) { + COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL1], saved_spec[0]); + COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL1], saved_spec[1]); + COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL1], saved_spec[2]); + } } } } diff --git a/mesalib/src/mesa/tnl/t_context.c b/mesalib/src/mesa/tnl/t_context.c index db21b4589..f27c8ad9d 100644 --- a/mesalib/src/mesa/tnl/t_context.c +++ b/mesalib/src/mesa/tnl/t_context.c @@ -38,7 +38,6 @@ #include "tnl.h" #include "t_context.h" #include "t_pipeline.h" -#include "t_vp_build.h" #include "vbo/vbo.h" @@ -108,6 +107,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) TNLcontext *tnl = TNL_CONTEXT(ctx); const struct gl_vertex_program *vp = ctx->VertexProgram._Current; const struct gl_fragment_program *fp = ctx->FragmentProgram._Current; + GLuint i; if (new_state & (_NEW_HINT | _NEW_PROGRAM)) { ASSERT(tnl->AllowVertexFog || tnl->AllowPixelFog); @@ -120,29 +120,21 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) /* Calculate tnl->render_inputs. This bitmask indicates which vertex * attributes need to be emitted to the rasterizer. */ - if (ctx->Visual.rgbMode) { - GLuint i; - - RENDERINPUTS_ZERO( tnl->render_inputs_bitset ); - RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS ); + RENDERINPUTS_ZERO( tnl->render_inputs_bitset ); + RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS ); - if (!fp || (fp->Base.InputsRead & FRAG_BIT_COL0)) { - RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 ); - } + if (!fp || (fp->Base.InputsRead & FRAG_BIT_COL0)) { + RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 ); + } - if (NEED_SECONDARY_COLOR(ctx)) - RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR1 ); + if (NEED_SECONDARY_COLOR(ctx)) + RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR1 ); - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { - if (ctx->Texture._EnabledCoordUnits & (1 << i) || - (fp && fp->Base.InputsRead & FRAG_BIT_TEX(i))) { - RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) ); - } - } - } - else { - RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS ); - RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR_INDEX ); + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { + if (ctx->Texture._EnabledCoordUnits & (1 << i) || + (fp && fp->Base.InputsRead & FRAG_BIT_TEX(i))) { + RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) ); + } } if (ctx->Fog.Enabled) { diff --git a/mesalib/src/mesa/tnl/t_context.h b/mesalib/src/mesa/tnl/t_context.h index 6137c2d2f..ebaae6335 100644 --- a/mesalib/src/mesa/tnl/t_context.h +++ b/mesalib/src/mesa/tnl/t_context.h @@ -198,26 +198,23 @@ struct vertex_buffer */ GLuint Count; /**< Number of vertices currently in buffer */ - /* Pointers to current data. - * XXX some of these fields alias AttribPtr below and should be removed - * such as NormalPtr, TexCoordPtr, FogCoordPtr, etc. + /* Pointers to current data. Most of the data is in AttribPtr -- all of + * it that is one of VERT_ATTRIB_X. For things only produced by TNL, + * such as backface color or eye-space coordinates, they are stored + * here. */ GLuint *Elts; - GLvector4f *ObjPtr; /* _TNL_BIT_POS */ GLvector4f *EyePtr; /* _TNL_BIT_POS */ GLvector4f *ClipPtr; /* _TNL_BIT_POS */ GLvector4f *NdcPtr; /* _TNL_BIT_POS */ GLubyte ClipOrMask; /* _TNL_BIT_POS */ GLubyte ClipAndMask; /* _TNL_BIT_POS */ GLubyte *ClipMask; /* _TNL_BIT_POS */ - GLvector4f *NormalPtr; /* _TNL_BIT_NORMAL */ GLfloat *NormalLengthPtr; /* _TNL_BIT_NORMAL */ GLboolean *EdgeFlag; /* _TNL_BIT_EDGEFLAG */ - GLvector4f *TexCoordPtr[MAX_TEXTURE_COORD_UNITS]; /* VERT_TEX_0..n */ - GLvector4f *IndexPtr[2]; /* _TNL_BIT_INDEX */ - GLvector4f *ColorPtr[2]; /* _TNL_BIT_COLOR0 */ - GLvector4f *SecondaryColorPtr[2]; /* _TNL_BIT_COLOR1 */ - GLvector4f *FogCoordPtr; /* _TNL_BIT_FOG */ + GLvector4f *BackfaceIndexPtr; + GLvector4f *BackfaceColorPtr; + GLvector4f *BackfaceSecondaryColorPtr; const struct _mesa_prim *Primitive; GLuint PrimitiveCount; @@ -402,11 +399,6 @@ struct tnl_device_driver /* Alert tnl-aware drivers of changes to material. */ - void (*NotifyInputChanges)(GLcontext *ctx, GLuint bitmask); - /* Alert tnl-aware drivers of changes to size and stride of input - * arrays. - */ - /*** *** Rendering -- These functions called only from t_vb_render.c ***/ diff --git a/mesalib/src/mesa/tnl/t_draw.c b/mesalib/src/mesa/tnl/t_draw.c index 04fa10630..fdde29425 100644 --- a/mesalib/src/mesa/tnl/t_draw.c +++ b/mesalib/src/mesa/tnl/t_draw.c @@ -26,17 +26,14 @@ */ #include "main/glheader.h" +#include "main/condrender.h" #include "main/context.h" #include "main/imports.h" -#include "main/state.h" #include "main/mtypes.h" #include "main/macros.h" #include "main/enums.h" #include "t_context.h" -#include "t_pipeline.h" -#include "t_vp_build.h" -#include "t_vertex.h" #include "tnl.h" @@ -44,7 +41,7 @@ static GLubyte *get_space(GLcontext *ctx, GLuint bytes) { TNLcontext *tnl = TNL_CONTEXT(ctx); - GLubyte *space = _mesa_malloc(bytes); + GLubyte *space = malloc(bytes); tnl->block[tnl->nr_blocks++] = space; return space; @@ -56,7 +53,7 @@ static void free_space(GLcontext *ctx) TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint i; for (i = 0; i < tnl->nr_blocks; i++) - _mesa_free(tnl->block[i]); + free(tnl->block[i]); tnl->nr_blocks = 0; } @@ -111,6 +108,22 @@ convert_bgra_to_float(const struct gl_client_array *input, } } +static void +convert_half_to_float(const struct gl_client_array *input, + const GLubyte *ptr, GLfloat *fptr, + GLuint count, GLuint sz) +{ + GLuint i, j; + + for (i = 0; i < count; i++) { + GLhalfARB *in = (GLhalfARB *)ptr; + + for (j = 0; j < sz; j++) { + *fptr++ = _mesa_half_to_float(in[j]); + } + ptr += input->StrideB; + } +} /* Adjust pointer to point at first requested element, convert to * floating point, populate VB->AttribPtr[]. @@ -158,6 +171,9 @@ static void _tnl_import_array( GLcontext *ctx, case GL_DOUBLE: CONVERT(GLdouble, (GLfloat)); break; + case GL_HALF_FLOAT: + convert_half_to_float(input, ptr, fptr, count, sz); + break; default: assert(0); break; @@ -251,22 +267,10 @@ static void bind_inputs( GLcontext *ctx, */ VB->Count = count; - - /* Legacy pointers -- remove one day. - */ - VB->ObjPtr = VB->AttribPtr[_TNL_ATTRIB_POS]; - VB->NormalPtr = VB->AttribPtr[_TNL_ATTRIB_NORMAL]; - VB->ColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR0]; - VB->ColorPtr[1] = NULL; - VB->IndexPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX]; - VB->IndexPtr[1] = NULL; - VB->SecondaryColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR1]; - VB->SecondaryColorPtr[1] = NULL; - VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG]; - - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { - VB->TexCoordPtr[i] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]; - } + /* These should perhaps be part of _TNL_ATTRIB_* */ + VB->BackfaceColorPtr = NULL; + VB->BackfaceIndexPtr = NULL; + VB->BackfaceSecondaryColorPtr = NULL; /* Clipping and drawing code still requires this to be a packed * array of ubytes which can be written into. TODO: Fix and @@ -395,20 +399,26 @@ void _tnl_draw_prims( GLcontext *ctx, TNLcontext *tnl = TNL_CONTEXT(ctx); const GLuint TEST_SPLIT = 0; const GLint max = TEST_SPLIT ? 8 : tnl->vb.Size - MAX_CLIPPED_VERTICES; - GLuint max_basevertex = prim->basevertex; + GLint max_basevertex = prim->basevertex; GLuint i; + /* Mesa core state should have been validated already */ + assert(ctx->NewState == 0x0); + + if (!_mesa_check_conditional_render(ctx)) + return; /* don't draw */ + for (i = 1; i < nr_prims; i++) max_basevertex = MAX2(max_basevertex, prim[i].basevertex); if (0) { - _mesa_printf("%s %d..%d\n", __FUNCTION__, min_index, max_index); + printf("%s %d..%d\n", __FUNCTION__, min_index, max_index); for (i = 0; i < nr_prims; i++) - _mesa_printf("prim %d: %s start %d count %d\n", i, - _mesa_lookup_enum_by_nr(prim[i].mode), - prim[i].start, - prim[i].count); + printf("prim %d: %s start %d count %d\n", i, + _mesa_lookup_enum_by_nr(prim[i].mode), + prim[i].start, + prim[i].count); } if (min_index) { @@ -419,7 +429,7 @@ void _tnl_draw_prims( GLcontext *ctx, _tnl_vbo_draw_prims ); return; } - else if (max_index + max_basevertex > max) { + else if ((GLint)max_index + max_basevertex > max) { /* The software TNL pipeline has a fixed amount of storage for * vertices and it is necessary to split incoming drawing commands * if they exceed that limit. diff --git a/mesalib/src/mesa/tnl/t_pipeline.c b/mesalib/src/mesa/tnl/t_pipeline.c index 357ef1e24..36fcd074c 100644 --- a/mesalib/src/mesa/tnl/t_pipeline.c +++ b/mesalib/src/mesa/tnl/t_pipeline.c @@ -28,7 +28,6 @@ #include "main/glheader.h" #include "main/context.h" #include "main/imports.h" -#include "main/state.h" #include "main/mtypes.h" #include "t_context.h" @@ -48,7 +47,7 @@ void _tnl_install_pipeline( GLcontext *ctx, */ for (i = 0 ; i < MAX_PIPELINE_STAGES && stages[i] ; i++) { struct tnl_pipeline_stage *s = &tnl->pipeline.stages[i]; - MEMCPY(s, stages[i], sizeof(*s)); + memcpy(s, stages[i], sizeof(*s)); if (s->create) s->create(ctx, s); } @@ -86,10 +85,6 @@ static GLuint check_input_changes( GLcontext *ctx ) } } - if (tnl->pipeline.input_changes && - tnl->Driver.NotifyInputChanges) - tnl->Driver.NotifyInputChanges( ctx, tnl->pipeline.input_changes ); - return tnl->pipeline.input_changes; } diff --git a/mesalib/src/mesa/tnl/t_rasterpos.c b/mesalib/src/mesa/tnl/t_rasterpos.c index 99b678745..3596d162b 100644 --- a/mesalib/src/mesa/tnl/t_rasterpos.c +++ b/mesalib/src/mesa/tnl/t_rasterpos.c @@ -29,7 +29,6 @@ #include "main/feedback.h" #include "main/light.h" #include "main/macros.h" -#include "main/rastpos.h" #include "main/simple_list.h" #include "main/mtypes.h" @@ -120,8 +119,7 @@ shade_rastpos(GLcontext *ctx, const GLfloat vertex[4], const GLfloat normal[3], GLfloat Rcolor[4], - GLfloat Rspec[4], - GLfloat *Rindex) + GLfloat Rspec[4]) { /*const*/ GLfloat (*base)[3] = ctx->Light._BaseColor; const struct gl_light *light; @@ -245,28 +243,14 @@ shade_rastpos(GLcontext *ctx, ACC_SCALE_SCALAR_3V( specularColor, attenuation, specularContrib ); } - if (ctx->Visual.rgbMode) { - Rcolor[0] = CLAMP(diffuseColor[0], 0.0F, 1.0F); - Rcolor[1] = CLAMP(diffuseColor[1], 0.0F, 1.0F); - Rcolor[2] = CLAMP(diffuseColor[2], 0.0F, 1.0F); - Rcolor[3] = CLAMP(diffuseColor[3], 0.0F, 1.0F); - Rspec[0] = CLAMP(specularColor[0], 0.0F, 1.0F); - Rspec[1] = CLAMP(specularColor[1], 0.0F, 1.0F); - Rspec[2] = CLAMP(specularColor[2], 0.0F, 1.0F); - Rspec[3] = CLAMP(specularColor[3], 0.0F, 1.0F); - } - else { - GLfloat *ind = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_INDEXES]; - GLfloat d_a = ind[MAT_INDEX_DIFFUSE] - ind[MAT_INDEX_AMBIENT]; - GLfloat s_a = ind[MAT_INDEX_SPECULAR] - ind[MAT_INDEX_AMBIENT]; - GLfloat i = (ind[MAT_INDEX_AMBIENT] - + diffuseCI * (1.0F-specularCI) * d_a - + specularCI * s_a); - if (i > ind[MAT_INDEX_SPECULAR]) { - i = ind[MAT_INDEX_SPECULAR]; - } - *Rindex = i; - } + Rcolor[0] = CLAMP(diffuseColor[0], 0.0F, 1.0F); + Rcolor[1] = CLAMP(diffuseColor[1], 0.0F, 1.0F); + Rcolor[2] = CLAMP(diffuseColor[2], 0.0F, 1.0F); + Rcolor[3] = CLAMP(diffuseColor[3], 0.0F, 1.0F); + Rspec[0] = CLAMP(specularColor[0], 0.0F, 1.0F); + Rspec[1] = CLAMP(specularColor[1], 0.0F, 1.0F); + Rspec[2] = CLAMP(specularColor[2], 0.0F, 1.0F); + Rspec[3] = CLAMP(specularColor[3], 0.0F, 1.0F); } @@ -470,21 +454,14 @@ _tnl_RasterPos(GLcontext *ctx, const GLfloat vObj[4]) /* lighting */ shade_rastpos( ctx, vObj, norm, ctx->Current.RasterColor, - ctx->Current.RasterSecondaryColor, - &ctx->Current.RasterIndex ); + ctx->Current.RasterSecondaryColor ); } else { - /* use current color or index */ - if (ctx->Visual.rgbMode) { - COPY_4FV(ctx->Current.RasterColor, - ctx->Current.Attrib[VERT_ATTRIB_COLOR0]); - COPY_4FV(ctx->Current.RasterSecondaryColor, - ctx->Current.Attrib[VERT_ATTRIB_COLOR1]); - } - else { - ctx->Current.RasterIndex - = ctx->Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]; - } + /* use current color */ + COPY_4FV(ctx->Current.RasterColor, + ctx->Current.Attrib[VERT_ATTRIB_COLOR0]); + COPY_4FV(ctx->Current.RasterSecondaryColor, + ctx->Current.Attrib[VERT_ATTRIB_COLOR1]); } /* texture coords */ diff --git a/mesalib/src/mesa/tnl/t_vb_cliptmp.h b/mesalib/src/mesa/tnl/t_vb_cliptmp.h index 618b8b313..8cc36e666 100644 --- a/mesalib/src/mesa/tnl/t_vb_cliptmp.h +++ b/mesalib/src/mesa/tnl/t_vb_cliptmp.h @@ -202,12 +202,12 @@ TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask ) if (0) { /* print pre-clip vertex coords */ GLuint i, j; - _mesa_printf("pre clip:\n"); + printf("pre clip:\n"); for (i = 0; i < n; i++) { j = inlist[i]; - _mesa_printf(" %u: %u: %f, %f, %f, %f\n", - i, j, - coord[j][0], coord[j][1], coord[j][2], coord[j][3]); + printf(" %u: %u: %f, %f, %f, %f\n", + i, j, + coord[j][0], coord[j][1], coord[j][2], coord[j][3]); assert(!IS_INF_OR_NAN(coord[j][0])); assert(!IS_INF_OR_NAN(coord[j][1])); assert(!IS_INF_OR_NAN(coord[j][2])); @@ -247,12 +247,12 @@ TAG(clip_tri)( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLubyte mask ) if (0) { /* print post-clip vertex coords */ GLuint i, j; - _mesa_printf("post clip:\n"); + printf("post clip:\n"); for (i = 0; i < n; i++) { j = inlist[i]; - _mesa_printf(" %u: %u: %f, %f, %f, %f\n", - i, j, - coord[j][0], coord[j][1], coord[j][2], coord[j][3]); + printf(" %u: %u: %f, %f, %f, %f\n", + i, j, + coord[j][0], coord[j][1], coord[j][2], coord[j][3]); } } diff --git a/mesalib/src/mesa/tnl/t_vb_fog.c b/mesalib/src/mesa/tnl/t_vb_fog.c index f3a7bd49f..4a0e6ad4f 100644 --- a/mesalib/src/mesa/tnl/t_vb_fog.c +++ b/mesalib/src/mesa/tnl/t_vb_fog.c @@ -156,7 +156,7 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) GLuint i; GLfloat *coord; /* Fog is computed from vertex or fragment Z values */ - /* source = VB->ObjPtr or VB->EyePtr coords */ + /* source = VB->AttribPtr[_TNL_ATTRIB_POS] or VB->EyePtr coords */ /* dest = VB->AttribPtr[_TNL_ATTRIB_FOG] = fog stage private storage */ VB->AttribPtr[_TNL_ATTRIB_FOG] = &store->fogcoord; @@ -176,11 +176,12 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) /* Full eye coords weren't required, just calculate the * eye Z values. */ - _mesa_dotprod_tab[VB->ObjPtr->size]( (GLfloat *) input->data, - 4 * sizeof(GLfloat), - VB->ObjPtr, plane ); + _mesa_dotprod_tab[VB->AttribPtr[_TNL_ATTRIB_POS]->size] + ( (GLfloat *) input->data, + 4 * sizeof(GLfloat), + VB->AttribPtr[_TNL_ATTRIB_POS], plane ); - input->count = VB->ObjPtr->count; + input->count = VB->AttribPtr[_TNL_ATTRIB_POS]->count; /* make sure coords are really positive NOTE should avoid going through array twice */ @@ -213,7 +214,7 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) /* input->count may be one if glFogCoord was only called once * before glBegin. But we need to compute fog for all vertices. */ - input->count = VB->ObjPtr->count; + input->count = VB->AttribPtr[_TNL_ATTRIB_POS]->count; VB->AttribPtr[_TNL_ATTRIB_FOG] = &store->fogcoord; /* dest data */ } @@ -227,7 +228,6 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) VB->AttribPtr[_TNL_ATTRIB_FOG] = input; } - VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG]; return GL_TRUE; } diff --git a/mesalib/src/mesa/tnl/t_vb_light.c b/mesalib/src/mesa/tnl/t_vb_light.c index f47f99397..e7309aaac 100644 --- a/mesalib/src/mesa/tnl/t_vb_light.c +++ b/mesalib/src/mesa/tnl/t_vb_light.c @@ -64,7 +64,6 @@ struct light_stage_data { GLvector4f Input; GLvector4f LitColor[2]; GLvector4f LitSecondary[2]; - GLvector4f LitIndex[2]; light_func *light_func_tab; struct material_cursor mat[MAT_ATTRIB_MAX]; @@ -127,7 +126,7 @@ prepare_materials(GLcontext *ctx, const GLuint bitmask = ctx->Light.ColorMaterialBitmask; for (i = 0 ; i < MAT_ATTRIB_MAX ; i++) if (bitmask & (1<AttribPtr[_TNL_ATTRIB_MAT_FRONT_AMBIENT + i] = VB->ColorPtr[0]; + VB->AttribPtr[_TNL_ATTRIB_MAT_FRONT_AMBIENT + i] = VB->AttribPtr[_TNL_ATTRIB_COLOR0]; } /* Now, for each material attribute that's tracking vertex color, save @@ -161,7 +160,6 @@ static light_func _tnl_light_tab[MAX_LIGHT_FUNC]; static light_func _tnl_light_fast_tab[MAX_LIGHT_FUNC]; static light_func _tnl_light_fast_single_tab[MAX_LIGHT_FUNC]; static light_func _tnl_light_spec_tab[MAX_LIGHT_FUNC]; -static light_func _tnl_light_ci_tab[MAX_LIGHT_FUNC]; #define TAG(x) x #define IDX (0) @@ -200,7 +198,7 @@ static GLboolean run_lighting( GLcontext *ctx, struct light_stage_data *store = LIGHT_STAGE_DATA(stage); TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; - GLvector4f *input = ctx->_NeedEyeCoords ? VB->EyePtr : VB->ObjPtr; + GLvector4f *input = ctx->_NeedEyeCoords ? VB->EyePtr : VB->AttribPtr[_TNL_ATTRIB_POS]; GLuint idx; if (!ctx->Light.Enabled || ctx->VertexProgram._Current) @@ -208,13 +206,13 @@ static GLboolean run_lighting( GLcontext *ctx, /* Make sure we can talk about position x,y and z: */ - if (input->size <= 2 && input == VB->ObjPtr) { + if (input->size <= 2 && input == VB->AttribPtr[_TNL_ATTRIB_POS]) { _math_trans_4f( store->Input.data, - VB->ObjPtr->data, - VB->ObjPtr->stride, + VB->AttribPtr[_TNL_ATTRIB_POS]->data, + VB->AttribPtr[_TNL_ATTRIB_POS]->stride, GL_FLOAT, - VB->ObjPtr->size, + VB->AttribPtr[_TNL_ATTRIB_POS]->size, 0, VB->Count ); @@ -246,10 +244,6 @@ static GLboolean run_lighting( GLcontext *ctx, */ store->light_func_tab[idx]( ctx, VB, stage, input ); - VB->AttribPtr[_TNL_ATTRIB_COLOR0] = VB->ColorPtr[0]; - VB->AttribPtr[_TNL_ATTRIB_COLOR1] = VB->SecondaryColorPtr[0]; - VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX] = VB->IndexPtr[0]; - return GL_TRUE; } @@ -264,22 +258,18 @@ static void validate_lighting( GLcontext *ctx, if (!ctx->Light.Enabled || ctx->VertexProgram._Current) return; - if (ctx->Visual.rgbMode) { - if (ctx->Light._NeedVertices) { - if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - tab = _tnl_light_spec_tab; - else - tab = _tnl_light_tab; - } - else { - if (ctx->Light.EnabledList.next == ctx->Light.EnabledList.prev) - tab = _tnl_light_fast_single_tab; - else - tab = _tnl_light_fast_tab; - } + if (ctx->Light._NeedVertices) { + if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) + tab = _tnl_light_spec_tab; + else + tab = _tnl_light_tab; + } + else { + if (ctx->Light.EnabledList.next == ctx->Light.EnabledList.prev) + tab = _tnl_light_fast_single_tab; + else + tab = _tnl_light_fast_tab; } - else - tab = _tnl_light_ci_tab; LIGHT_STAGE_DATA(stage)->light_func_tab = tab; @@ -315,19 +305,12 @@ static GLboolean init_lighting( GLcontext *ctx, _mesa_vector4f_alloc( &store->LitColor[1], 0, size, 32 ); _mesa_vector4f_alloc( &store->LitSecondary[0], 0, size, 32 ); _mesa_vector4f_alloc( &store->LitSecondary[1], 0, size, 32 ); - _mesa_vector4f_alloc( &store->LitIndex[0], 0, size, 32 ); - _mesa_vector4f_alloc( &store->LitIndex[1], 0, size, 32 ); store->LitColor[0].size = 4; store->LitColor[1].size = 4; store->LitSecondary[0].size = 3; store->LitSecondary[1].size = 3; - store->LitIndex[0].size = 1; - store->LitIndex[0].stride = sizeof(GLfloat); - store->LitIndex[1].size = 1; - store->LitIndex[1].stride = sizeof(GLfloat); - return GL_TRUE; } @@ -344,8 +327,6 @@ static void dtr( struct tnl_pipeline_stage *stage ) _mesa_vector4f_free( &store->LitColor[1] ); _mesa_vector4f_free( &store->LitSecondary[0] ); _mesa_vector4f_free( &store->LitSecondary[1] ); - _mesa_vector4f_free( &store->LitIndex[0] ); - _mesa_vector4f_free( &store->LitIndex[1] ); FREE( store ); stage->privatePtr = NULL; } diff --git a/mesalib/src/mesa/tnl/t_vb_lighttmp.h b/mesalib/src/mesa/tnl/t_vb_lighttmp.h index 124ca3c74..0a98c6b02 100644 --- a/mesalib/src/mesa/tnl/t_vb_lighttmp.h +++ b/mesalib/src/mesa/tnl/t_vb_lighttmp.h @@ -72,13 +72,13 @@ static void TAG(light_rgba_spec)( GLcontext *ctx, fprintf(stderr, "%s\n", __FUNCTION__ ); #endif - VB->ColorPtr[0] = &store->LitColor[0]; - VB->SecondaryColorPtr[0] = &store->LitSecondary[0]; + VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0]; + VB->AttribPtr[_TNL_ATTRIB_COLOR1] = &store->LitSecondary[0]; sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3]; #if IDX & LIGHT_TWOSIDE - VB->ColorPtr[1] = &store->LitColor[1]; - VB->SecondaryColorPtr[1] = &store->LitSecondary[1]; + VB->BackfaceColorPtr = &store->LitColor[1]; + VB->BackfaceSecondaryColorPtr = &store->LitSecondary[1]; sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3]; #endif @@ -259,11 +259,11 @@ static void TAG(light_rgba)( GLcontext *ctx, fprintf(stderr, "%s\n", __FUNCTION__ ); #endif - VB->ColorPtr[0] = &store->LitColor[0]; + VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0]; sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3]; #if IDX & LIGHT_TWOSIDE - VB->ColorPtr[1] = &store->LitColor[1]; + VB->BackfaceColorPtr = &store->LitColor[1]; sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3]; #endif @@ -449,9 +449,9 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx, (void) input; /* doesn't refer to Eye or Obj */ - VB->ColorPtr[0] = &store->LitColor[0]; + VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0]; #if IDX & LIGHT_TWOSIDE - VB->ColorPtr[1] = &store->LitColor[1]; + VB->BackfaceColorPtr = &store->LitColor[1]; #endif if (nr > 1) { @@ -559,9 +559,9 @@ static void TAG(light_fast_rgba)( GLcontext *ctx, sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3]; sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3]; - VB->ColorPtr[0] = &store->LitColor[0]; + VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0]; #if IDX & LIGHT_TWOSIDE - VB->ColorPtr[1] = &store->LitColor[1]; + VB->BackfaceColorPtr = &store->LitColor[1]; #endif if (nr > 1) { @@ -637,185 +637,12 @@ static void TAG(light_fast_rgba)( GLcontext *ctx, - -/* - * Use current lighting/material settings to compute the color indexes - * for an array of vertices. - * Input: n - number of vertices to light - * side - 0=use front material, 1=use back material - * vertex - array of [n] vertex position in eye coordinates - * normal - array of [n] surface normal vector - * Output: indexResult - resulting array of [n] color indexes - */ -static void TAG(light_ci)( GLcontext *ctx, - struct vertex_buffer *VB, - struct tnl_pipeline_stage *stage, - GLvector4f *input ) -{ - struct light_stage_data *store = LIGHT_STAGE_DATA(stage); - GLuint j; - const GLuint vstride = input->stride; - const GLfloat *vertex = (GLfloat *) input->data; - const GLuint nstride = VB->AttribPtr[_TNL_ATTRIB_NORMAL]->stride; - const GLfloat *normal = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_NORMAL]->data; - GLfloat *indexResult[2]; - const GLuint nr = VB->Count; - -#ifdef TRACE - fprintf(stderr, "%s\n", __FUNCTION__ ); -#endif - - VB->IndexPtr[0] = &store->LitIndex[0]; -#if IDX & LIGHT_TWOSIDE - VB->IndexPtr[1] = &store->LitIndex[1]; -#endif - - indexResult[0] = (GLfloat *)VB->IndexPtr[0]->data; -#if IDX & LIGHT_TWOSIDE - indexResult[1] = (GLfloat *)VB->IndexPtr[1]->data; -#endif - - /* loop over vertices */ - for (j=0; jLight.EnabledList) { - - GLfloat attenuation = 1.0F; - GLfloat VP[3]; /* unit vector from vertex to light */ - GLfloat n_dot_VP; /* dot product of l and n */ - GLfloat *h, n_dot_h, correction = 1.0; - - /* compute l and attenuation */ - if (!(light->_Flags & LIGHT_POSITIONAL)) { - /* directional light */ - COPY_3V(VP, light->_VP_inf_norm); - } - else { - GLfloat d; /* distance from vertex to light */ - - SUB_3V(VP, light->_Position, vertex); - - d = (GLfloat) LEN_3FV( VP ); - if ( d > 1e-6) { - GLfloat invd = 1.0F / d; - SELF_SCALE_SCALAR_3V(VP, invd); - } - - attenuation = 1.0F / (light->ConstantAttenuation + d * - (light->LinearAttenuation + d * - light->QuadraticAttenuation)); - - /* spotlight attenuation */ - if (light->_Flags & LIGHT_SPOT) { - GLfloat PV_dot_dir = - DOT3(VP, light->_NormSpotDirection); - if (PV_dot_dir < light->_CosCutoff) { - continue; /* this light makes no contribution */ - } - else { - GLdouble x = PV_dot_dir * (EXP_TABLE_SIZE-1); - GLint k = (GLint) x; - GLfloat spot = (GLfloat) (light->_SpotExpTable[k][0] - + (x-k)*light->_SpotExpTable[k][1]); - attenuation *= spot; - } - } - } - - if (attenuation < 1e-3) - continue; /* this light makes no contribution */ - - n_dot_VP = DOT3( normal, VP ); - - /* which side are we lighting? */ - if (n_dot_VP < 0.0F) { -#if IDX & LIGHT_TWOSIDE - side = 1; - correction = -1; - n_dot_VP = -n_dot_VP; -#else - continue; -#endif - } - - /* accumulate diffuse term */ - diffuse[side] += n_dot_VP * light->_dli * attenuation; - - /* specular term */ - if (ctx->Light.Model.LocalViewer) { - GLfloat v[3]; - COPY_3V(v, vertex); - NORMALIZE_3FV(v); - SUB_3V(VP, VP, v); /* h = VP + VPe */ - h = VP; - NORMALIZE_3FV(h); - } - else if (light->_Flags & LIGHT_POSITIONAL) { - h = VP; - /* Strangely, disabling this addition fixes a conformance - * problem. If this code is enabled, l_sed.c fails. - */ - /*ACC_3V(h, ctx->_EyeZDir);*/ - NORMALIZE_3FV(h); - } - else { - h = light->_h_inf_norm; - } - - n_dot_h = correction * DOT3(normal, h); - if (n_dot_h > 0.0F) { - GLfloat spec_coef; - struct gl_shine_tab *tab = ctx->_ShineTable[side]; - GET_SHINE_TAB_ENTRY( tab, n_dot_h, spec_coef); - specular[side] += spec_coef * light->_sli * attenuation; - } - } /*loop over lights*/ - - /* Now compute final color index */ - for (side = 0 ; side < NR_SIDES ; side++) { - const GLfloat *ind = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_INDEXES + side]; - GLfloat index; - - if (specular[side] > 1.0F) { - index = ind[MAT_INDEX_SPECULAR]; - } - else { - GLfloat d_a = ind[MAT_INDEX_DIFFUSE] - ind[MAT_INDEX_AMBIENT]; - GLfloat s_a = ind[MAT_INDEX_SPECULAR] - ind[MAT_INDEX_AMBIENT]; - index = (ind[MAT_INDEX_AMBIENT] - + diffuse[side] * (1.0F-specular[side]) * d_a - + specular[side] * s_a); - if (index > ind[MAT_INDEX_SPECULAR]) { - index = ind[MAT_INDEX_SPECULAR]; - } - } - indexResult[side][j] = index; - } - } /*for vertex*/ -} - - - static void TAG(init_light_tab)( void ) { _tnl_light_tab[IDX] = TAG(light_rgba); _tnl_light_fast_tab[IDX] = TAG(light_fast_rgba); _tnl_light_fast_single_tab[IDX] = TAG(light_fast_rgba_single); _tnl_light_spec_tab[IDX] = TAG(light_rgba_spec); - _tnl_light_ci_tab[IDX] = TAG(light_ci); } diff --git a/mesalib/src/mesa/tnl/t_vb_normals.c b/mesalib/src/mesa/tnl/t_vb_normals.c index a4821cc1c..61ac40957 100644 --- a/mesalib/src/mesa/tnl/t_vb_normals.c +++ b/mesalib/src/mesa/tnl/t_vb_normals.c @@ -79,7 +79,6 @@ run_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) } VB->AttribPtr[_TNL_ATTRIB_NORMAL] = &store->normal; - VB->NormalPtr = &store->normal; VB->NormalLengthPtr = NULL; /* no longer valid */ return GL_TRUE; @@ -153,7 +152,7 @@ alloc_normal_data(GLcontext *ctx, struct tnl_pipeline_stage *stage) TNLcontext *tnl = TNL_CONTEXT(ctx); struct normal_stage_data *store; - stage->privatePtr = _mesa_malloc(sizeof(*store)); + stage->privatePtr = malloc(sizeof(*store)); store = NORMAL_STAGE_DATA(stage); if (!store) return GL_FALSE; @@ -172,7 +171,7 @@ free_normal_data(struct tnl_pipeline_stage *stage) struct normal_stage_data *store = NORMAL_STAGE_DATA(stage); if (store) { _mesa_vector4f_free( &store->normal ); - _mesa_free( store ); + free( store ); stage->privatePtr = NULL; } } diff --git a/mesalib/src/mesa/tnl/t_vb_points.c b/mesalib/src/mesa/tnl/t_vb_points.c index a52505b4b..20634c80d 100644 --- a/mesalib/src/mesa/tnl/t_vb_points.c +++ b/mesalib/src/mesa/tnl/t_vb_points.c @@ -64,7 +64,7 @@ run_point_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) for (i = 0; i < VB->Count; i++) { const GLfloat dist = FABSF(*eyeCoord); const GLfloat q = p0 + dist * (p1 + dist * p2); - const GLfloat atten = (q != 0.0) ? SQRTF(1.0 / q) : 1.0; + const GLfloat atten = (q != 0.0F) ? SQRTF(1.0F / q) : 1.0F; size[i][0] = pointSize * atten; /* clamping done in rasterization */ eyeCoord += eyeCoordStride; } @@ -81,7 +81,7 @@ alloc_point_data(GLcontext *ctx, struct tnl_pipeline_stage *stage) { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; struct point_stage_data *store; - stage->privatePtr = _mesa_malloc(sizeof(*store)); + stage->privatePtr = malloc(sizeof(*store)); store = POINT_STAGE_DATA(stage); if (!store) return GL_FALSE; @@ -97,7 +97,7 @@ free_point_data(struct tnl_pipeline_stage *stage) struct point_stage_data *store = POINT_STAGE_DATA(stage); if (store) { _mesa_vector4f_free( &store->PointSize ); - _mesa_free( store ); + free( store ); stage->privatePtr = NULL; } } diff --git a/mesalib/src/mesa/tnl/t_vb_program.c b/mesalib/src/mesa/tnl/t_vb_program.c index e69f7d576..0137e52fc 100644 --- a/mesalib/src/mesa/tnl/t_vb_program.c +++ b/mesalib/src/mesa/tnl/t_vb_program.c @@ -40,7 +40,6 @@ #include "shader/prog_statevars.h" #include "shader/prog_execute.h" #include "swrast/s_context.h" -#include "swrast/s_texfilter.h" #include "tnl/tnl.h" #include "tnl/t_context.h" @@ -204,13 +203,14 @@ vp_fetch_texel(GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda, * Called via ctx->Driver.ProgramStringNotify() after a new vertex program * string has been parsed. */ -void +GLboolean _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program) { /* No-op. * If we had derived anything from the program that was private to this * stage we'd recompute/validate it here. */ + return GL_TRUE; } @@ -221,7 +221,7 @@ static void init_machine(GLcontext *ctx, struct gl_program_machine *machine) { /* Input registers get initialized from the current vertex attribs */ - MEMCPY(machine->VertAttribs, ctx->Current.Attrib, + memcpy(machine->VertAttribs, ctx->Current.Attrib, MAX_VERTEX_GENERIC_ATTRIBS * 4 * sizeof(GLfloat)); if (ctx->VertexProgram._Current->IsNVProgram) { @@ -390,6 +390,13 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) #endif COPY_4V(store->results[attr].data[i], machine.Outputs[attr]); } + + /* FOGC is a special case. Fragment shader expects (f,0,0,1) */ + if (program->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_FOGC)) { + store->results[VERT_RESULT_FOGC].data[i][1] = 0.0; + store->results[VERT_RESULT_FOGC].data[i][2] = 0.0; + store->results[VERT_RESULT_FOGC].data[i][3] = 1.0; + } #ifdef NAN_CHECK ASSERT(machine.Outputs[0][3] != 0.0F); #endif @@ -454,19 +461,14 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage ) VB->ClipPtr->count = VB->Count; } - VB->ColorPtr[0] = &store->results[VERT_RESULT_COL0]; - VB->ColorPtr[1] = &store->results[VERT_RESULT_BFC0]; - VB->SecondaryColorPtr[0] = &store->results[VERT_RESULT_COL1]; - VB->SecondaryColorPtr[1] = &store->results[VERT_RESULT_BFC1]; - VB->FogCoordPtr = &store->results[VERT_RESULT_FOGC]; - VB->AttribPtr[VERT_ATTRIB_COLOR0] = &store->results[VERT_RESULT_COL0]; VB->AttribPtr[VERT_ATTRIB_COLOR1] = &store->results[VERT_RESULT_COL1]; VB->AttribPtr[VERT_ATTRIB_FOG] = &store->results[VERT_RESULT_FOGC]; VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->results[VERT_RESULT_PSIZ]; + VB->BackfaceColorPtr = &store->results[VERT_RESULT_BFC0]; + VB->BackfaceSecondaryColorPtr = &store->results[VERT_RESULT_BFC1]; for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { - VB->TexCoordPtr[i] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i] = &store->results[VERT_RESULT_TEX0 + i]; } @@ -512,7 +514,7 @@ init_vp(GLcontext *ctx, struct tnl_pipeline_stage *stage) /* a few other misc allocations */ _mesa_vector4f_alloc( &store->ndcCoords, 0, size, 32 ); - store->clipmask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte)*size, 32 ); + store->clipmask = (GLubyte *) _mesa_align_malloc(sizeof(GLubyte)*size, 32 ); return GL_TRUE; } @@ -535,7 +537,7 @@ dtr(struct tnl_pipeline_stage *stage) /* free misc arrays */ _mesa_vector4f_free( &store->ndcCoords ); - ALIGN_FREE( store->clipmask ); + _mesa_align_free( store->clipmask ); FREE( store ); stage->privatePtr = NULL; diff --git a/mesalib/src/mesa/tnl/t_vb_texgen.c b/mesalib/src/mesa/tnl/t_vb_texgen.c index 7c1819b22..9ef13bc96 100644 --- a/mesalib/src/mesa/tnl/t_vb_texgen.c +++ b/mesalib/src/mesa/tnl/t_vb_texgen.c @@ -341,7 +341,7 @@ static void texgen( GLcontext *ctx, GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit]; GLvector4f *out = &store->texcoord[unit]; const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - const GLvector4f *obj = VB->ObjPtr; + const GLvector4f *obj = VB->AttribPtr[_TNL_ATTRIB_POS]; const GLvector4f *eye = VB->EyePtr; const GLvector4f *normal = VB->AttribPtr[_TNL_ATTRIB_NORMAL]; const GLfloat *m = store->tmp_m; @@ -498,7 +498,6 @@ static GLboolean run_texgen_stage( GLcontext *ctx, store->TexgenFunc[i]( ctx, store, i ); - VB->TexCoordPtr[i] = VB->AttribPtr[VERT_ATTRIB_TEX0 + i] = &store->texcoord[i]; } } diff --git a/mesalib/src/mesa/tnl/t_vb_texmat.c b/mesalib/src/mesa/tnl/t_vb_texmat.c index 0abe8cc35..83688290e 100644 --- a/mesalib/src/mesa/tnl/t_vb_texmat.c +++ b/mesalib/src/mesa/tnl/t_vb_texmat.c @@ -73,7 +73,6 @@ static GLboolean run_texmat_stage( GLcontext *ctx, ctx->TextureMatrixStack[i].Top, VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]); - VB->TexCoordPtr[i] = VB->AttribPtr[VERT_ATTRIB_TEX0+i] = &store->texcoord[i]; } } diff --git a/mesalib/src/mesa/tnl/t_vb_vertex.c b/mesalib/src/mesa/tnl/t_vb_vertex.c index 4734754ea..a27534256 100644 --- a/mesalib/src/mesa/tnl/t_vb_vertex.c +++ b/mesalib/src/mesa/tnl/t_vb_vertex.c @@ -152,16 +152,16 @@ static GLboolean run_vertex_stage( GLcontext *ctx, * Use combined ModelProject to avoid some depth artifacts */ if (ctx->ModelviewMatrixStack.Top->type == MATRIX_IDENTITY) - VB->EyePtr = VB->ObjPtr; + VB->EyePtr = VB->AttribPtr[_TNL_ATTRIB_POS]; else VB->EyePtr = TransformRaw( &store->eye, ctx->ModelviewMatrixStack.Top, - VB->ObjPtr); + VB->AttribPtr[_TNL_ATTRIB_POS]); } VB->ClipPtr = TransformRaw( &store->clip, &ctx->_ModelProjectMatrix, - VB->ObjPtr ); + VB->AttribPtr[_TNL_ATTRIB_POS] ); /* Drivers expect this to be clean to element 4... */ @@ -246,7 +246,7 @@ static GLboolean init_vertex_stage( GLcontext *ctx, _mesa_vector4f_alloc( &store->clip, 0, size, 32 ); _mesa_vector4f_alloc( &store->proj, 0, size, 32 ); - store->clipmask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte)*size, 32 ); + store->clipmask = (GLubyte *) _mesa_align_malloc(sizeof(GLubyte)*size, 32 ); if (!store->clipmask || !store->eye.data || @@ -265,7 +265,7 @@ static void dtr( struct tnl_pipeline_stage *stage ) _mesa_vector4f_free( &store->eye ); _mesa_vector4f_free( &store->clip ); _mesa_vector4f_free( &store->proj ); - ALIGN_FREE( store->clipmask ); + _mesa_align_free( store->clipmask ); FREE(store); stage->privatePtr = NULL; stage->run = init_vertex_stage; diff --git a/mesalib/src/mesa/tnl/t_vertex.c b/mesalib/src/mesa/tnl/t_vertex.c index fe4209ae5..c1b157023 100644 --- a/mesalib/src/mesa/tnl/t_vertex.c +++ b/mesalib/src/mesa/tnl/t_vertex.c @@ -88,7 +88,7 @@ void _tnl_register_fastpath( struct tnl_clipspace *vtx, fastpath->match_strides = match_strides; fastpath->func = vtx->emit; fastpath->attr = (struct tnl_attr_type *) - _mesa_malloc(vtx->attr_count * sizeof(fastpath->attr[0])); + malloc(vtx->attr_count * sizeof(fastpath->attr[0])); for (i = 0; i < vtx->attr_count; i++) { fastpath->attr[i].format = vtx->attr[i].format; @@ -236,7 +236,7 @@ void _tnl_get_attr( GLcontext *ctx, const void *vin, dest[0] = ctx->Point.Size; } else { - _mesa_memcpy( dest, ctx->Current.Attrib[attr], 4*sizeof(GLfloat)); + memcpy( dest, ctx->Current.Attrib[attr], 4*sizeof(GLfloat)); } } @@ -307,8 +307,8 @@ GLuint _tnl_install_attrs( GLcontext *ctx, const struct tnl_attr_map *map, const GLuint format = map[i].format; if (format == EMIT_PAD) { if (DBG) - _mesa_printf("%d: pad %d, offset %d\n", i, - map[i].offset, offset); + printf("%d: pad %d, offset %d\n", i, + map[i].offset, offset); offset += map[i].offset; @@ -338,9 +338,9 @@ GLuint _tnl_install_attrs( GLcontext *ctx, const struct tnl_attr_map *map, if (DBG) - _mesa_printf("%d: %s, vp %p, offset %d\n", i, - _tnl_format_info[format].name, (void *)vp, - vtx->attr[j].vertoffset); + printf("%d: %s, vp %p, offset %d\n", i, + _tnl_format_info[format].name, (void *)vp, + vtx->attr[j].vertoffset); offset += _tnl_format_info[format].attrsize; j++; @@ -383,7 +383,7 @@ static void adjust_input_ptrs( GLcontext *ctx, GLint diff) struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); struct tnl_clipspace_attr *a = vtx->attr; const GLuint count = vtx->attr_count; - int j; + GLuint j; diff -= 1; for (j=0; j vtx->max_vertex_size) { _tnl_free_vertices( ctx ); vtx->max_vertex_size = max_vertex_size; - vtx->vertex_buf = (GLubyte *)ALIGN_CALLOC(vb_size * max_vertex_size, 32 ); + vtx->vertex_buf = (GLubyte *)_mesa_align_calloc(vb_size * max_vertex_size, 32 ); invalidate_funcs(vtx); } @@ -541,7 +541,7 @@ void _tnl_free_vertices( GLcontext *ctx ) struct tnl_clipspace_fastpath *fp, *tmp; if (vtx->vertex_buf) { - ALIGN_FREE(vtx->vertex_buf); + _mesa_align_free(vtx->vertex_buf); vtx->vertex_buf = NULL; } diff --git a/mesalib/src/mesa/tnl/t_vertex_generic.c b/mesalib/src/mesa/tnl/t_vertex_generic.c index 9812f8c80..b1ea14246 100644 --- a/mesalib/src/mesa/tnl/t_vertex_generic.c +++ b/mesalib/src/mesa/tnl/t_vertex_generic.c @@ -210,7 +210,7 @@ static INLINE void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyt { (void) a; (void) v; (void) in; DEBUG_INSERT; - _mesa_exit(1); + exit(1); } static INLINE void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in ) @@ -1074,9 +1074,9 @@ void _tnl_generic_copy_pv( GLcontext *ctx, GLuint edst, GLuint esrc ) if (a[j].attrib == VERT_ATTRIB_COLOR0 || a[j].attrib == VERT_ATTRIB_COLOR1) { - _mesa_memcpy( vdst + a[j].vertoffset, - vsrc + a[j].vertoffset, - a[j].vertattrsize ); + memcpy( vdst + a[j].vertoffset, + vsrc + a[j].vertoffset, + a[j].vertattrsize ); } } } @@ -1092,33 +1092,33 @@ void _tnl_generic_interp_extras( GLcontext *ctx, { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; - /* If stride is zero, ColorPtr[1] is constant across the VB, so + /* If stride is zero, BackfaceColorPtr is constant across the VB, so * there is no point interpolating between two values as they will * be identical. In all other cases, this value is generated by * t_vb_lighttmp.h and has a stride of 4 dwords. */ - if (VB->ColorPtr[1] && VB->ColorPtr[1]->stride) { - assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat)); + if (VB->BackfaceColorPtr && VB->BackfaceColorPtr->stride) { + assert(VB->BackfaceColorPtr->stride == 4 * sizeof(GLfloat)); INTERP_4F( t, - VB->ColorPtr[1]->data[dst], - VB->ColorPtr[1]->data[out], - VB->ColorPtr[1]->data[in] ); + VB->BackfaceColorPtr->data[dst], + VB->BackfaceColorPtr->data[out], + VB->BackfaceColorPtr->data[in] ); } - if (VB->SecondaryColorPtr[1]) { - assert(VB->SecondaryColorPtr[1]->stride == 4 * sizeof(GLfloat)); + if (VB->BackfaceSecondaryColorPtr) { + assert(VB->BackfaceSecondaryColorPtr->stride == 4 * sizeof(GLfloat)); INTERP_3F( t, - VB->SecondaryColorPtr[1]->data[dst], - VB->SecondaryColorPtr[1]->data[out], - VB->SecondaryColorPtr[1]->data[in] ); + VB->BackfaceSecondaryColorPtr->data[dst], + VB->BackfaceSecondaryColorPtr->data[out], + VB->BackfaceSecondaryColorPtr->data[in] ); } - if (VB->IndexPtr[1]) { - VB->IndexPtr[1]->data[dst][0] = LINTERP( t, - VB->IndexPtr[1]->data[out][0], - VB->IndexPtr[1]->data[in][0] ); + if (VB->BackfaceIndexPtr) { + VB->BackfaceIndexPtr->data[dst][0] = LINTERP( t, + VB->BackfaceIndexPtr->data[out][0], + VB->BackfaceIndexPtr->data[in][0] ); } if (VB->EdgeFlag) { @@ -1135,18 +1135,18 @@ void _tnl_generic_copy_pv_extras( GLcontext *ctx, /* See above comment: */ - if (VB->ColorPtr[1] && VB->ColorPtr[1]->stride) { - COPY_4FV( VB->ColorPtr[1]->data[dst], - VB->ColorPtr[1]->data[src] ); + if (VB->BackfaceColorPtr && VB->BackfaceColorPtr->stride) { + COPY_4FV( VB->BackfaceColorPtr->data[dst], + VB->BackfaceColorPtr->data[src] ); } - if (VB->SecondaryColorPtr[1]) { - COPY_4FV( VB->SecondaryColorPtr[1]->data[dst], - VB->SecondaryColorPtr[1]->data[src] ); + if (VB->BackfaceSecondaryColorPtr) { + COPY_4FV( VB->BackfaceSecondaryColorPtr->data[dst], + VB->BackfaceSecondaryColorPtr->data[src] ); } - if (VB->IndexPtr[1]) { - VB->IndexPtr[1]->data[dst][0] = VB->IndexPtr[1]->data[src][0]; + if (VB->BackfaceIndexPtr) { + VB->BackfaceIndexPtr->data[dst][0] = VB->BackfaceIndexPtr->data[src][0]; } _tnl_generic_copy_pv(ctx, dst, src); diff --git a/mesalib/src/mesa/tnl/t_vertex_sse.c b/mesalib/src/mesa/tnl/t_vertex_sse.c index 7a255d680..98058f3bd 100644 --- a/mesalib/src/mesa/tnl/t_vertex_sse.c +++ b/mesalib/src/mesa/tnl/t_vertex_sse.c @@ -496,7 +496,7 @@ static GLboolean build_vertex_emit( struct x86_program *p ) update_src_ptr(p, srcECX, vtxESI, a); } else { - _mesa_printf("Can't emit 1ub %x %x %d\n", a->vertoffset, a[-1].vertoffset, a[-1].vertattrsize ); + printf("Can't emit 1ub %x %x %d\n", a->vertoffset, a[-1].vertoffset, a[-1].vertattrsize ); return GL_FALSE; } break; @@ -542,7 +542,7 @@ static GLboolean build_vertex_emit( struct x86_program *p ) j++; /* NOTE: two attrs consumed */ } else { - _mesa_printf("Can't emit 3ub\n"); + printf("Can't emit 3ub\n"); return GL_FALSE; /* add this later */ } break; @@ -590,12 +590,12 @@ static GLboolean build_vertex_emit( struct x86_program *p ) break; case GL_UNSIGNED_SHORT: default: - _mesa_printf("unknown CHAN_TYPE %s\n", _mesa_lookup_enum_by_nr(CHAN_TYPE)); + printf("unknown CHAN_TYPE %s\n", _mesa_lookup_enum_by_nr(CHAN_TYPE)); return GL_FALSE; } break; default: - _mesa_printf("unknown a[%d].format %d\n", j, a->format); + printf("unknown a[%d].format %d\n", j, a->format); return GL_FALSE; /* catch any new opcodes */ } @@ -648,7 +648,7 @@ void _tnl_generate_sse_emit( GLcontext *ctx ) return; } - _mesa_memset(&p, 0, sizeof(p)); + memset(&p, 0, sizeof(p)); p.ctx = ctx; p.inputs_safe = 0; /* for now */ diff --git a/mesalib/src/mesa/tnl/tnl.h b/mesalib/src/mesa/tnl/tnl.h index 9c66d3b01..2c0d1fef7 100644 --- a/mesalib/src/mesa/tnl/tnl.h +++ b/mesalib/src/mesa/tnl/tnl.h @@ -66,7 +66,7 @@ _tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value ); extern void _tnl_allow_pixel_fog( GLcontext *ctx, GLboolean value ); -extern void +extern GLboolean _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program); struct _mesa_prim; diff --git a/mesalib/src/mesa/vbo/vbo_context.c b/mesalib/src/mesa/vbo/vbo_context.c index 75c32e0b9..e3be39a34 100644 --- a/mesalib/src/mesa/vbo/vbo_context.c +++ b/mesalib/src/mesa/vbo/vbo_context.c @@ -33,24 +33,13 @@ #include "vbo.h" #include "vbo_context.h" -#if 0 -/* Reach out and grab this to use as the default: - */ -extern void _tnl_draw_prims( GLcontext *ctx, - const struct gl_client_array *arrays[], - const struct _mesa_prim *prims, - GLuint nr_prims, - const struct _mesa_index_buffer *ib, - GLuint min_index, - GLuint max_index ); -#endif - #define NR_LEGACY_ATTRIBS 16 #define NR_GENERIC_ATTRIBS 16 #define NR_MAT_ATTRIBS 12 + static GLuint check_size( const GLfloat *attr ) { if (attr[3] != 1.0) return 4; @@ -59,6 +48,7 @@ static GLuint check_size( const GLfloat *attr ) return 1; } + static void init_legacy_currval(GLcontext *ctx) { struct vbo_context *vbo = vbo_context(ctx); @@ -158,23 +148,6 @@ static void init_mat_currval(GLcontext *ctx) } } -#if 0 - -static void vbo_exec_current_init( struct vbo_exec_context *exec ) -{ - GLcontext *ctx = exec->ctx; - GLint i; - - /* setup the pointers for the typical 16 vertex attributes */ - for (i = 0; i < VBO_ATTRIB_FIRST_MATERIAL; i++) - exec->vtx.current[i] = ctx->Current.Attrib[i]; - - /* setup pointers for the 12 material attributes */ - for (i = 0; i < MAT_ATTRIB_MAX; i++) - exec->vtx.current[VBO_ATTRIB_FIRST_MATERIAL + i] = - ctx->Light.Material.Attrib[i]; -} -#endif GLboolean _vbo_CreateContext( GLcontext *ctx ) { @@ -220,12 +193,6 @@ GLboolean _vbo_CreateContext( GLcontext *ctx ) } - /* By default: - */ -#if 0 /* dead - see vbo_set_draw_func() */ - vbo->draw_prims = _tnl_draw_prims; -#endif - /* Hook our functions into exec and compile dispatch tables. These * will pretty much be permanently installed, which means that the * vtxfmt mechanism can be removed now. @@ -240,6 +207,7 @@ GLboolean _vbo_CreateContext( GLcontext *ctx ) return GL_TRUE; } + void _vbo_InvalidateState( GLcontext *ctx, GLuint new_state ) { _ae_invalidate_state(ctx, new_state); @@ -249,17 +217,25 @@ void _vbo_InvalidateState( GLcontext *ctx, GLuint new_state ) void _vbo_DestroyContext( GLcontext *ctx ) { + struct vbo_context *vbo = vbo_context(ctx); + if (ctx->aelt_context) { _ae_destroy_context( ctx ); ctx->aelt_context = NULL; } - if (vbo_context(ctx)) { + if (vbo) { + GLuint i; + + for (i = 0; i < VBO_ATTRIB_MAX; i++) { + _mesa_reference_buffer_object(ctx, &vbo->currval[i].BufferObj, NULL); + } + vbo_exec_destroy(ctx); #if FEATURE_dlist vbo_save_destroy(ctx); #endif - FREE(vbo_context(ctx)); + FREE(vbo); ctx->swtnl_im = NULL; } } diff --git a/mesalib/src/mesa/vbo/vbo_exec.c b/mesalib/src/mesa/vbo/vbo_exec.c index e168a89ea..a057befed 100644 --- a/mesalib/src/mesa/vbo/vbo_exec.c +++ b/mesalib/src/mesa/vbo/vbo_exec.c @@ -28,9 +28,6 @@ #include "main/api_arrayelt.h" #include "main/glheader.h" -#include "main/imports.h" -#include "main/context.h" -#include "main/macros.h" #include "main/mtypes.h" #include "main/vtxfmt.h" diff --git a/mesalib/src/mesa/vbo/vbo_exec_api.c b/mesalib/src/mesa/vbo/vbo_exec_api.c index f0a7eeadd..e40f5f9dc 100644 --- a/mesalib/src/mesa/vbo/vbo_exec_api.c +++ b/mesalib/src/mesa/vbo/vbo_exec_api.c @@ -41,7 +41,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/light.h" #include "main/api_arrayelt.h" #include "main/api_noop.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #include "vbo_context.h" @@ -126,8 +126,8 @@ void vbo_exec_vtx_wrap( struct vbo_exec_context *exec ) assert(exec->vtx.max_vert - exec->vtx.vert_count > exec->vtx.copied.nr); for (i = 0 ; i < exec->vtx.copied.nr ; i++) { - _mesa_memcpy( exec->vtx.buffer_ptr, data, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.buffer_ptr, data, + exec->vtx.vertex_size * sizeof(GLfloat)); exec->vtx.buffer_ptr += exec->vtx.vertex_size; data += exec->vtx.vertex_size; exec->vtx.vert_count++; @@ -414,13 +414,13 @@ static void GLAPIENTRY vbo_exec_EvalCoord1f( GLfloat u ) } - _mesa_memcpy( exec->vtx.copied.buffer, exec->vtx.vertex, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.copied.buffer, exec->vtx.vertex, + exec->vtx.vertex_size * sizeof(GLfloat)); vbo_exec_do_EvalCoord1f( exec, u ); - _mesa_memcpy( exec->vtx.vertex, exec->vtx.copied.buffer, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.vertex, exec->vtx.copied.buffer, + exec->vtx.vertex_size * sizeof(GLfloat)); } static void GLAPIENTRY vbo_exec_EvalCoord2f( GLfloat u, GLfloat v ) @@ -444,13 +444,13 @@ static void GLAPIENTRY vbo_exec_EvalCoord2f( GLfloat u, GLfloat v ) vbo_exec_fixup_vertex( ctx, VBO_ATTRIB_NORMAL, 3 ); } - _mesa_memcpy( exec->vtx.copied.buffer, exec->vtx.vertex, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.copied.buffer, exec->vtx.vertex, + exec->vtx.vertex_size * sizeof(GLfloat)); vbo_exec_do_EvalCoord2f( exec, u, v ); - _mesa_memcpy( exec->vtx.vertex, exec->vtx.copied.buffer, - exec->vtx.vertex_size * sizeof(GLfloat)); + memcpy( exec->vtx.vertex, exec->vtx.copied.buffer, + exec->vtx.vertex_size * sizeof(GLfloat)); } static void GLAPIENTRY vbo_exec_EvalCoord1fv( const GLfloat *u ) @@ -759,6 +759,7 @@ void vbo_use_buffer_objects(GLcontext *ctx) } /* Allocate a real buffer object now */ + _mesa_reference_buffer_object(ctx, &exec->vtx.bufferobj, NULL); exec->vtx.bufferobj = ctx->Driver.NewBufferObject(ctx, bufName, target); ctx->Driver.BufferData(ctx, target, size, NULL, usage, exec->vtx.bufferobj); } @@ -780,7 +781,7 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec ) ctx->Shared->NullBufferObj); ASSERT(!exec->vtx.buffer_map); - exec->vtx.buffer_map = (GLfloat *)ALIGN_MALLOC(VBO_VERT_BUFFER_SIZE, 64); + exec->vtx.buffer_map = (GLfloat *)_mesa_align_malloc(VBO_VERT_BUFFER_SIZE, 64); exec->vtx.buffer_ptr = exec->vtx.buffer_map; vbo_exec_vtxfmt_init( exec ); @@ -803,8 +804,19 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec ) { struct gl_client_array *arrays = exec->vtx.arrays; + unsigned i; + memcpy(arrays, vbo->legacy_currval, 16 * sizeof(arrays[0])); memcpy(arrays + 16, vbo->generic_currval, 16 * sizeof(arrays[0])); + + for (i = 0; i < 16; ++i) { + arrays[i ].BufferObj = NULL; + arrays[i + 16].BufferObj = NULL; + _mesa_reference_buffer_object(ctx, &arrays[i ].BufferObj, + vbo->legacy_currval[i].BufferObj); + _mesa_reference_buffer_object(ctx, &arrays[i + 16].BufferObj, + vbo->generic_currval[i].BufferObj); + } } exec->vtx.vertex_size = 0; @@ -823,7 +835,7 @@ void vbo_exec_vtx_destroy( struct vbo_exec_context *exec ) ASSERT(exec->vtx.bufferobj->Name == 0 || exec->vtx.bufferobj->Name == IMM_BUFFER_NAME); if (exec->vtx.bufferobj->Name == 0) { - ALIGN_FREE(exec->vtx.buffer_map); + _mesa_align_free(exec->vtx.buffer_map); exec->vtx.buffer_map = NULL; exec->vtx.buffer_ptr = NULL; } @@ -845,7 +857,7 @@ void vbo_exec_vtx_destroy( struct vbo_exec_context *exec ) void vbo_exec_BeginVertices( GLcontext *ctx ) { struct vbo_exec_context *exec = &vbo_context(ctx)->exec; - if (0) _mesa_printf("%s\n", __FUNCTION__); + if (0) printf("%s\n", __FUNCTION__); vbo_exec_vtx_map( exec ); assert((exec->ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) == 0); @@ -880,10 +892,10 @@ void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags ) assert(exec->flush_call_depth == 1); #endif - if (0) _mesa_printf("%s\n", __FUNCTION__); + if (0) printf("%s\n", __FUNCTION__); if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) { - if (0) _mesa_printf("%s - inside begin/end\n", __FUNCTION__); + if (0) printf("%s - inside begin/end\n", __FUNCTION__); #ifdef DEBUG exec->flush_call_depth--; assert(exec->flush_call_depth == 0); diff --git a/mesalib/src/mesa/vbo/vbo_exec_array.c b/mesalib/src/mesa/vbo/vbo_exec_array.c index 6de8f059b..90474da7c 100644 --- a/mesalib/src/mesa/vbo/vbo_exec_array.c +++ b/mesalib/src/mesa/vbo/vbo_exec_array.c @@ -35,7 +35,6 @@ #include "main/bufferobj.h" #include "main/enums.h" #include "main/macros.h" -#include "glapi/dispatch.h" #include "vbo_context.h" @@ -50,7 +49,7 @@ vbo_get_minmax_index(GLcontext *ctx, GLuint *min_index, GLuint *max_index) { GLuint i; - GLsizei count = prim->count; + GLuint count = prim->count; const void *indices; if (_mesa_is_bufferobj(ib->obj)) { @@ -133,17 +132,17 @@ check_array_data(GLcontext *ctx, struct gl_client_array *array, case GL_FLOAT: { GLfloat *f = (GLfloat *) ((GLubyte *) data + array->StrideB * j); - GLuint k; + GLint k; for (k = 0; k < array->Size; k++) { if (IS_INF_OR_NAN(f[k]) || f[k] >= 1.0e20 || f[k] <= -1.0e10) { - _mesa_printf("Bad array data:\n"); - _mesa_printf(" Element[%u].%u = %f\n", j, k, f[k]); - _mesa_printf(" Array %u at %p\n", attrib, (void* ) array); - _mesa_printf(" Type 0x%x, Size %d, Stride %d\n", - array->Type, array->Size, array->Stride); - _mesa_printf(" Address/offset %p in Buffer Object %u\n", - array->Ptr, array->BufferObj->Name); + printf("Bad array data:\n"); + printf(" Element[%u].%u = %f\n", j, k, f[k]); + printf(" Array %u at %p\n", attrib, (void* ) array); + printf(" Type 0x%x, Size %d, Stride %d\n", + array->Type, array->Size, array->Stride); + printf(" Address/offset %p in Buffer Object %u\n", + array->Ptr, array->BufferObj->Name); f[k] = 1.0; /* XXX replace the bad value! */ } /*assert(!IS_INF_OR_NAN(f[k]));*/ @@ -258,21 +257,21 @@ print_draw_arrays(GLcontext *ctx, struct vbo_exec_context *exec, { int i; - _mesa_printf("vbo_exec_DrawArrays(mode 0x%x, start %d, count %d):\n", - mode, start, count); + printf("vbo_exec_DrawArrays(mode 0x%x, start %d, count %d):\n", + mode, start, count); for (i = 0; i < 32; i++) { GLuint bufName = exec->array.inputs[i]->BufferObj->Name; GLint stride = exec->array.inputs[i]->Stride; - _mesa_printf("attr %2d: size %d stride %d enabled %d " - "ptr %p Bufobj %u\n", - i, - exec->array.inputs[i]->Size, - stride, - /*exec->array.inputs[i]->Enabled,*/ - exec->array.legacy_array[i]->Enabled, - exec->array.inputs[i]->Ptr, - bufName); + printf("attr %2d: size %d stride %d enabled %d " + "ptr %p Bufobj %u\n", + i, + exec->array.inputs[i]->Size, + stride, + /*exec->array.inputs[i]->Enabled,*/ + exec->array.legacy_array[i]->Enabled, + exec->array.inputs[i]->Ptr, + bufName); if (bufName) { struct gl_buffer_object *buf = _mesa_lookup_bufferobj(ctx, bufName); @@ -285,9 +284,9 @@ print_draw_arrays(GLcontext *ctx, struct vbo_exec_context *exec, int n = (count * stride) / 4; if (n > 32) n = 32; - _mesa_printf(" Data at offset %d:\n", offset); + printf(" Data at offset %d:\n", offset); for (i = 0; i < n; i++) { - _mesa_printf(" float[%d] = 0x%08x %f\n", i, k[i], f[i]); + printf(" float[%d] = 0x%08x %f\n", i, k[i], f[i]); } ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER_ARB, buf); } @@ -444,6 +443,13 @@ recalculate_input_bindings(GLcontext *ctx) } +/** + * Examine the enabled vertex arrays to set the exec->array.inputs[] values. + * These will point to the arrays to actually use for drawing. Some will + * be user-provided arrays, other will be zero-stride const-valued arrays. + * Note that this might set the _NEW_ARRAY dirty flag so state validation + * must be done after this call. + */ static void bind_arrays(GLcontext *ctx) { @@ -485,9 +491,6 @@ vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count) FLUSH_CURRENT( ctx, 0 ); - if (ctx->NewState) - _mesa_update_state( ctx ); - if (!_mesa_valid_to_render(ctx, "glDrawArrays")) { return; } @@ -543,37 +546,37 @@ dump_element_buffer(GLcontext *ctx, GLenum type) case GL_UNSIGNED_BYTE: { const GLubyte *us = (const GLubyte *) map; - GLuint i; + GLint i; for (i = 0; i < ctx->Array.ElementArrayBufferObj->Size; i++) { - _mesa_printf("%02x ", us[i]); + printf("%02x ", us[i]); if (i % 32 == 31) - _mesa_printf("\n"); + printf("\n"); } - _mesa_printf("\n"); + printf("\n"); } break; case GL_UNSIGNED_SHORT: { const GLushort *us = (const GLushort *) map; - GLuint i; + GLint i; for (i = 0; i < ctx->Array.ElementArrayBufferObj->Size / 2; i++) { - _mesa_printf("%04x ", us[i]); + printf("%04x ", us[i]); if (i % 16 == 15) - _mesa_printf("\n"); + printf("\n"); } - _mesa_printf("\n"); + printf("\n"); } break; case GL_UNSIGNED_INT: { const GLuint *us = (const GLuint *) map; - GLuint i; + GLint i; for (i = 0; i < ctx->Array.ElementArrayBufferObj->Size / 4; i++) { - _mesa_printf("%08x ", us[i]); + printf("%08x ", us[i]); if (i % 8 == 7) - _mesa_printf("\n"); + printf("\n"); } - _mesa_printf("\n"); + printf("\n"); } break; default: @@ -601,18 +604,16 @@ vbo_validated_drawrangeelements(GLcontext *ctx, GLenum mode, FLUSH_CURRENT( ctx, 0 ); - if (ctx->NewState) - _mesa_update_state( ctx ); - if (!_mesa_valid_to_render(ctx, "glDraw[Range]Elements")) { return; } + bind_arrays( ctx ); + + /* check for dirty state again */ if (ctx->NewState) _mesa_update_state( ctx ); - bind_arrays( ctx ); - ib.count = count; ib.type = type; ib.obj = ctx->Array.ElementArrayBufferObj; @@ -689,6 +690,16 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, * or we can read/write out of memory in several different places! */ + /* Catch/fix some potential user errors */ + if (type == GL_UNSIGNED_BYTE) { + start = MIN2(start, 0xff); + end = MIN2(end, 0xff); + } + else if (type == GL_UNSIGNED_SHORT) { + start = MIN2(start, 0xffff); + end = MIN2(end, 0xffff); + } + if (end >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ warnCount++; @@ -713,8 +724,7 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, #ifdef DEBUG /* 'end' was out of bounds, but now let's check the actual array - * indexes to see if any of them are out of bounds. If so, warn - * and skip the draw to avoid potential segfault, etc. + * indexes to see if any of them are out of bounds. */ { GLuint max = _mesa_max_buffer_index(ctx, count, type, indices, @@ -731,7 +741,6 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, ctx->Array.ElementArrayBufferObj->Name, ctx->Array.ElementArrayBufferObj->Size); } - return; } /* XXX we could also find the min index and compare to 'start' * to see if start is correct. But it's more likely to get the @@ -739,14 +748,18 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, */ } #endif + + /* Set 'end' to the max possible legal value */ + assert(ctx->Array.ArrayObj->_MaxElement >= 1); + end = ctx->Array.ArrayObj->_MaxElement - 1; } else if (0) { - _mesa_printf("glDraw[Range]Elements{,BaseVertex}" - "(start %u, end %u, type 0x%x, count %d) ElemBuf %u, " - "base %d\n", - start, end, type, count, - ctx->Array.ElementArrayBufferObj->Name, - basevertex); + printf("glDraw[Range]Elements{,BaseVertex}" + "(start %u, end %u, type 0x%x, count %d) ElemBuf %u, " + "base %d\n", + start, end, type, count, + ctx->Array.ElementArrayBufferObj->Name, + basevertex); } #if 0 @@ -837,17 +850,11 @@ vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode, FLUSH_CURRENT( ctx, 0 ); - if (ctx->NewState) - _mesa_update_state( ctx ); - if (!_mesa_valid_to_render(ctx, "glMultiDrawElements")) { return; } - if (ctx->NewState) - _mesa_update_state( ctx ); - - prim = _mesa_calloc(primcount * sizeof(*prim)); + prim = calloc(1, primcount * sizeof(*prim)); if (prim == NULL) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glMultiDrawElements"); return; @@ -858,6 +865,10 @@ vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode, */ bind_arrays( ctx ); + /* check for dirty state again */ + if (ctx->NewState) + _mesa_update_state( ctx ); + switch (type) { case GL_UNSIGNED_INT: index_type_size = 4; @@ -924,13 +935,13 @@ vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode, vbo->draw_prims(ctx, exec->array.inputs, prim, primcount, &ib, GL_FALSE, ~0, ~0); } else { + /* render one prim at a time */ for (i = 0; i < primcount; i++) { ib.count = count[i]; ib.type = type; ib.obj = ctx->Array.ElementArrayBufferObj; ib.ptr = indices[i]; - prim[0].begin = 1; prim[0].end = 1; prim[0].weak = 0; @@ -943,12 +954,13 @@ vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode, prim[0].basevertex = basevertex[i]; else prim[0].basevertex = 0; - } - vbo->draw_prims(ctx, exec->array.inputs, prim, 1, &ib, - GL_FALSE, ~0, ~0); + vbo->draw_prims(ctx, exec->array.inputs, prim, 1, &ib, + GL_FALSE, ~0, ~0); + } } - _mesa_free(prim); + + free(prim); } diff --git a/mesalib/src/mesa/vbo/vbo_exec_draw.c b/mesalib/src/mesa/vbo/vbo_exec_draw.c index 4f4385601..045af46da 100644 --- a/mesalib/src/mesa/vbo/vbo_exec_draw.c +++ b/mesalib/src/mesa/vbo/vbo_exec_draw.c @@ -30,7 +30,6 @@ #include "main/context.h" #include "main/enums.h" #include "main/state.h" -#include "main/macros.h" #include "vbo_context.h" @@ -44,22 +43,22 @@ vbo_exec_debug_verts( struct vbo_exec_context *exec ) GLuint count = exec->vtx.vert_count; GLuint i; - _mesa_printf("%s: %u vertices %d primitives, %d vertsize\n", - __FUNCTION__, - count, - exec->vtx.prim_count, - exec->vtx.vertex_size); + printf("%s: %u vertices %d primitives, %d vertsize\n", + __FUNCTION__, + count, + exec->vtx.prim_count, + exec->vtx.vertex_size); for (i = 0 ; i < exec->vtx.prim_count ; i++) { struct _mesa_prim *prim = &exec->vtx.prim[i]; - _mesa_printf(" prim %d: %s%s %d..%d %s %s\n", - i, - _mesa_lookup_prim_by_nr(prim->mode), - prim->weak ? " (weak)" : "", - prim->start, - prim->start + prim->count, - prim->begin ? "BEGIN" : "(wrap)", - prim->end ? "END" : "(wrap)"); + printf(" prim %d: %s%s %d..%d %s %s\n", + i, + _mesa_lookup_prim_by_nr(prim->mode), + prim->weak ? " (weak)" : "", + prim->start, + prim->start + prim->count, + prim->begin ? "BEGIN" : "(wrap)", + prim->end ? "END" : "(wrap)"); } } @@ -86,24 +85,24 @@ vbo_copy_vertices( struct vbo_exec_context *exec ) case GL_LINES: ovf = nr&1; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); return i; case GL_TRIANGLES: ovf = nr%3; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); return i; case GL_QUADS: ovf = nr&3; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); return i; case GL_LINE_STRIP: if (nr == 0) { return 0; } else { - _mesa_memcpy( dst, src+(nr-1)*sz, sz * sizeof(GLfloat) ); + memcpy( dst, src+(nr-1)*sz, sz * sizeof(GLfloat) ); return 1; } case GL_LINE_LOOP: @@ -113,12 +112,12 @@ vbo_copy_vertices( struct vbo_exec_context *exec ) return 0; } else if (nr == 1) { - _mesa_memcpy( dst, src+0, sz * sizeof(GLfloat) ); + memcpy( dst, src+0, sz * sizeof(GLfloat) ); return 1; } else { - _mesa_memcpy( dst, src+0, sz * sizeof(GLfloat) ); - _mesa_memcpy( dst+sz, src+(nr-1)*sz, sz * sizeof(GLfloat) ); + memcpy( dst, src+0, sz * sizeof(GLfloat) ); + memcpy( dst+sz, src+(nr-1)*sz, sz * sizeof(GLfloat) ); return 2; } case GL_TRIANGLE_STRIP: @@ -140,7 +139,7 @@ vbo_copy_vertices( struct vbo_exec_context *exec ) break; } for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz * sizeof(GLfloat) ); return i; case PRIM_OUTSIDE_BEGIN_END: return 0; @@ -344,7 +343,7 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec ) } if (0) - _mesa_printf("map %d..\n", exec->vtx.buffer_used); + printf("map %d..\n", exec->vtx.buffer_used); } @@ -379,8 +378,8 @@ vbo_exec_vtx_flush( struct vbo_exec_context *exec, GLboolean unmap ) } if (0) - _mesa_printf("%s %d %d\n", __FUNCTION__, exec->vtx.prim_count, - exec->vtx.vert_count); + printf("%s %d %d\n", __FUNCTION__, exec->vtx.prim_count, + exec->vtx.vert_count); vbo_context(ctx)->draw_prims( ctx, exec->vtx.inputs, diff --git a/mesalib/src/mesa/vbo/vbo_exec_eval.c b/mesalib/src/mesa/vbo/vbo_exec_eval.c index a7846213d..23ad12608 100644 --- a/mesalib/src/mesa/vbo/vbo_exec_eval.c +++ b/mesalib/src/mesa/vbo/vbo_exec_eval.c @@ -29,7 +29,7 @@ #include "main/context.h" #include "main/macros.h" #include "math/m_eval.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #include "vbo_exec.h" diff --git a/mesalib/src/mesa/vbo/vbo_rebase.c b/mesalib/src/mesa/vbo/vbo_rebase.c index 55a82ee36..ff7c7a6b0 100644 --- a/mesalib/src/mesa/vbo/vbo_rebase.c +++ b/mesalib/src/mesa/vbo/vbo_rebase.c @@ -124,7 +124,7 @@ void vbo_rebase_prims( GLcontext *ctx, assert(min_index != 0); if (0) - _mesa_printf("%s %d..%d\n", __FUNCTION__, min_index, max_index); + printf("%s %d..%d\n", __FUNCTION__, min_index, max_index); /* XXX this path is disabled for now. @@ -134,7 +134,7 @@ void vbo_rebase_prims( GLcontext *ctx, /* If we can just tell the hardware or the TNL to interpret our * indices with a different base, do so. */ - tmp_prims = (struct _mesa_prim *)_mesa_malloc(sizeof(*prim) * nr_prims); + tmp_prims = (struct _mesa_prim *)malloc(sizeof(*prim) * nr_prims); for (i = 0; i < nr_prims; i++) { tmp_prims[i] = prim[i]; @@ -187,7 +187,7 @@ void vbo_rebase_prims( GLcontext *ctx, else { /* Otherwise the primitives need adjustment. */ - tmp_prims = (struct _mesa_prim *)_mesa_malloc(sizeof(*prim) * nr_prims); + tmp_prims = (struct _mesa_prim *)malloc(sizeof(*prim) * nr_prims); for (i = 0; i < nr_prims; i++) { /* If this fails, it could indicate an application error: @@ -229,10 +229,10 @@ void vbo_rebase_prims( GLcontext *ctx, max_index - min_index ); if (tmp_indices) - _mesa_free(tmp_indices); + free(tmp_indices); if (tmp_prims) - _mesa_free(tmp_prims); + free(tmp_prims); } diff --git a/mesalib/src/mesa/vbo/vbo_save.c b/mesalib/src/mesa/vbo/vbo_save.c index 9757c3d9f..fd9a13027 100644 --- a/mesalib/src/mesa/vbo/vbo_save.c +++ b/mesalib/src/mesa/vbo/vbo_save.c @@ -28,8 +28,6 @@ #include "main/mtypes.h" #include "main/bufferobj.h" -#include "main/dlist.h" -#include "main/vtxfmt.h" #include "main/imports.h" #include "vbo_context.h" @@ -60,8 +58,19 @@ void vbo_save_init( GLcontext *ctx ) { struct gl_client_array *arrays = save->arrays; + unsigned i; + memcpy(arrays, vbo->legacy_currval, 16 * sizeof(arrays[0])); memcpy(arrays + 16, vbo->generic_currval, 16 * sizeof(arrays[0])); + + for (i = 0; i < 16; ++i) { + arrays[i ].BufferObj = NULL; + arrays[i + 16].BufferObj = NULL; + _mesa_reference_buffer_object(ctx, &arrays[i ].BufferObj, + vbo->legacy_currval[i].BufferObj); + _mesa_reference_buffer_object(ctx, &arrays[i + 16].BufferObj, + vbo->generic_currval[i].BufferObj); + } } ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN; diff --git a/mesalib/src/mesa/vbo/vbo_save_api.c b/mesalib/src/mesa/vbo/vbo_save_api.c index 3f86c68b2..a5d027982 100644 --- a/mesalib/src/mesa/vbo/vbo_save_api.c +++ b/mesalib/src/mesa/vbo/vbo_save_api.c @@ -78,7 +78,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/api_validate.h" #include "main/api_arrayelt.h" #include "main/vtxfmt.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #include "vbo_context.h" @@ -118,23 +118,23 @@ static GLuint _save_copy_vertices( GLcontext *ctx, case GL_LINES: ovf = nr&1; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); return i; case GL_TRIANGLES: ovf = nr%3; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); return i; case GL_QUADS: ovf = nr&3; for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); return i; case GL_LINE_STRIP: if (nr == 0) return 0; else { - _mesa_memcpy( dst, src+(nr-1)*sz, sz*sizeof(GLfloat) ); + memcpy( dst, src+(nr-1)*sz, sz*sizeof(GLfloat) ); return 1; } case GL_LINE_LOOP: @@ -143,11 +143,11 @@ static GLuint _save_copy_vertices( GLcontext *ctx, if (nr == 0) return 0; else if (nr == 1) { - _mesa_memcpy( dst, src+0, sz*sizeof(GLfloat) ); + memcpy( dst, src+0, sz*sizeof(GLfloat) ); return 1; } else { - _mesa_memcpy( dst, src+0, sz*sizeof(GLfloat) ); - _mesa_memcpy( dst+sz, src+(nr-1)*sz, sz*sizeof(GLfloat) ); + memcpy( dst, src+0, sz*sizeof(GLfloat) ); + memcpy( dst+sz, src+(nr-1)*sz, sz*sizeof(GLfloat) ); return 2; } case GL_TRIANGLE_STRIP: @@ -158,7 +158,7 @@ static GLuint _save_copy_vertices( GLcontext *ctx, default: ovf = 2 + (nr&1); break; } for (i = 0 ; i < ovf ; i++) - _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); + memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) ); return i; default: assert(0); @@ -277,7 +277,7 @@ static void _save_compile_vertex_list( GLcontext *ctx ) /* Duplicate our template, increment refcounts to the storage structs: */ - _mesa_memcpy(node->attrsz, save->attrsz, sizeof(node->attrsz)); + memcpy(node->attrsz, save->attrsz, sizeof(node->attrsz)); node->vertex_size = save->vertex_size; node->buffer_offset = (save->buffer - save->vertex_store->buffer) * sizeof(GLfloat); node->count = save->vert_count; @@ -441,7 +441,7 @@ static void _save_wrap_filled_vertex( GLcontext *ctx ) assert(save->max_vert - save->vert_count > save->copied.nr); for (i = 0 ; i < save->copied.nr ; i++) { - _mesa_memcpy( save->buffer_ptr, data, save->vertex_size * sizeof(GLfloat)); + memcpy( save->buffer_ptr, data, save->vertex_size * sizeof(GLfloat)); data += save->vertex_size; save->buffer_ptr += save->vertex_size; save->vert_count++; @@ -1185,10 +1185,10 @@ static void vbo_print_vertex_list( GLcontext *ctx, void *data ) GLuint i; (void) ctx; - _mesa_printf("VBO-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n", - node->count, - node->prim_count, - node->vertex_size); + printf("VBO-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n", + node->count, + node->prim_count, + node->vertex_size); for (i = 0 ; i < node->prim_count ; i++) { struct _mesa_prim *prim = &node->prim[i]; diff --git a/mesalib/src/mesa/vbo/vbo_save_draw.c b/mesalib/src/mesa/vbo/vbo_save_draw.c index d834fa1f2..a7cf29acd 100644 --- a/mesalib/src/mesa/vbo/vbo_save_draw.c +++ b/mesalib/src/mesa/vbo/vbo_save_draw.c @@ -243,7 +243,7 @@ void vbo_save_playback_vertex_list( GLcontext *ctx, void *data ) * includes operations such as glBegin or glDrawArrays. */ if (0) - _mesa_printf("displaylist recursive begin"); + printf("displaylist recursive begin"); vbo_save_loopback_vertex_list( ctx, node ); return; diff --git a/mesalib/src/mesa/vbo/vbo_save_loopback.c b/mesalib/src/mesa/vbo/vbo_save_loopback.c index b7a74e453..3f581ea02 100644 --- a/mesalib/src/mesa/vbo/vbo_save_loopback.c +++ b/mesalib/src/mesa/vbo/vbo_save_loopback.c @@ -29,9 +29,8 @@ #include "main/glheader.h" #include "main/enums.h" #include "main/imports.h" -#include "main/macros.h" #include "main/mtypes.h" -#include "glapi/dispatch.h" +#include "main/dispatch.h" #include "glapi/glapi.h" #include "vbo_context.h" @@ -79,7 +78,7 @@ struct loopback_attr { }; /* Don't emit ends and begins on wrapped primitives. Don't replay - * wrapped vertices. If we get here, it's probably because the the + * wrapped vertices. If we get here, it's probably because the * precalculated wrapping is wrong. */ static void loopback_prim( GLcontext *ctx, @@ -96,12 +95,12 @@ static void loopback_prim( GLcontext *ctx, GLuint k; if (0) - _mesa_printf("loopback prim %s(%s,%s) verts %d..%d\n", - _mesa_lookup_prim_by_nr(prim->mode), - prim->begin ? "begin" : "..", - prim->end ? "end" : "..", - start, - end); + printf("loopback prim %s(%s,%s) verts %d..%d\n", + _mesa_lookup_prim_by_nr(prim->mode), + prim->begin ? "begin" : "..", + prim->end ? "end" : "..", + start, + end); if (prim->begin) { CALL_Begin(GET_DISPATCH(), ( prim->mode )); diff --git a/mesalib/src/mesa/vbo/vbo_split.c b/mesalib/src/mesa/vbo/vbo_split.c index c445acca7..ce40cbbcc 100644 --- a/mesalib/src/mesa/vbo/vbo_split.c +++ b/mesalib/src/mesa/vbo/vbo_split.c @@ -108,12 +108,14 @@ void vbo_split_prims( GLcontext *ctx, vbo_draw_func draw, const struct split_limits *limits ) { - GLuint max_basevertex = prim->basevertex; + GLint max_basevertex = prim->basevertex; GLuint i; for (i = 1; i < nr_prims; i++) max_basevertex = MAX2(max_basevertex, prim[i].basevertex); + /* XXX max_basevertex is computed but not used, why? */ + if (ib) { if (limits->max_indices == 0) { /* Could traverse the indices, re-emitting vertices in turn. diff --git a/mesalib/src/mesa/vbo/vbo_split_copy.c b/mesalib/src/mesa/vbo/vbo_split_copy.c index c45190b9d..2ec7d9b0f 100644 --- a/mesalib/src/mesa/vbo/vbo_split_copy.c +++ b/mesalib/src/mesa/vbo/vbo_split_copy.c @@ -34,7 +34,6 @@ #include "main/imports.h" #include "main/image.h" #include "main/macros.h" -#include "main/enums.h" #include "main/mtypes.h" #include "vbo_split.h" @@ -148,21 +147,21 @@ dump_draw_info(GLcontext *ctx, { GLuint i, j; - _mesa_printf("VBO Draw:\n"); + printf("VBO Draw:\n"); for (i = 0; i < nr_prims; i++) { - _mesa_printf("Prim %u of %u\n", i, nr_prims); - _mesa_printf(" Prim mode 0x%x\n", prims[i].mode); - _mesa_printf(" IB: %p\n", (void*) ib); + printf("Prim %u of %u\n", i, nr_prims); + printf(" Prim mode 0x%x\n", prims[i].mode); + printf(" IB: %p\n", (void*) ib); for (j = 0; j < VERT_ATTRIB_MAX; j++) { - _mesa_printf(" array %d at %p:\n", j, (void*) arrays[j]); - _mesa_printf(" enabled %d, ptr %p, size %d, type 0x%x, stride %d\n", - arrays[j]->Enabled, arrays[j]->Ptr, - arrays[j]->Size, arrays[j]->Type, arrays[j]->StrideB); + printf(" array %d at %p:\n", j, (void*) arrays[j]); + printf(" enabled %d, ptr %p, size %d, type 0x%x, stride %d\n", + arrays[j]->Enabled, arrays[j]->Ptr, + arrays[j]->Size, arrays[j]->Type, arrays[j]->StrideB); if (0) { GLint k = prims[i].start + prims[i].count - 1; GLfloat *last = (GLfloat *) (arrays[j]->Ptr + arrays[j]->Stride * k); - _mesa_printf(" last: %f %f %f\n", - last[0], last[1], last[2]); + printf(" last: %f %f %f\n", + last[0], last[1], last[2]); } } } @@ -197,7 +196,7 @@ flush( struct copy_context *copy ) ©->dstib, GL_TRUE, 0, - copy->dstbuf_nr ); + copy->dstbuf_nr - 1 ); /* Reset all pointers: */ @@ -221,8 +220,6 @@ begin( struct copy_context *copy, GLenum mode, GLboolean begin_flag ) { struct _mesa_prim *prim = ©->dstprim[copy->dstprim_nr]; -/* _mesa_printf("begin %s (%d)\n", _mesa_lookup_prim_by_nr(mode), begin_flag); */ - prim->mode = mode; prim->begin = begin_flag; } @@ -238,7 +235,7 @@ elt(struct copy_context *copy, GLuint elt_idx) GLuint elt = copy->srcelt[elt_idx]; GLuint slot = elt & (ELT_TABLE_SIZE-1); -/* _mesa_printf("elt %d\n", elt); */ +/* printf("elt %d\n", elt); */ /* Look up the incoming element in the vertex cache. Re-emit if * necessary. @@ -247,7 +244,7 @@ elt(struct copy_context *copy, GLuint elt_idx) GLubyte *csr = copy->dstptr; GLuint i; -/* _mesa_printf(" --> emit to dstelt %d\n", copy->dstbuf_nr); */ +/* printf(" --> emit to dstelt %d\n", copy->dstbuf_nr); */ for (i = 0; i < copy->nr_varying; i++) { const struct gl_client_array *srcarray = copy->varying[i].array; @@ -271,10 +268,10 @@ elt(struct copy_context *copy, GLuint elt_idx) { const GLuint *f = (const GLuint *)srcptr; GLuint j; - _mesa_printf(" varying %d: ", i); + printf(" varying %d: ", i); for(j = 0; j < copy->varying[i].size / 4; j++) - _mesa_printf("%x ", f[j]); - _mesa_printf("\n"); + printf("%x ", f[j]); + printf("\n"); } } @@ -287,9 +284,9 @@ elt(struct copy_context *copy, GLuint elt_idx) copy->dstbuf_nr * copy->vertex_size)); } /* else */ -/* _mesa_printf(" --> reuse vertex\n"); */ +/* printf(" --> reuse vertex\n"); */ -/* _mesa_printf(" --> emit %d\n", copy->vert_cache[slot].out); */ +/* printf(" --> emit %d\n", copy->vert_cache[slot].out); */ copy->dstelt[copy->dstelt_nr++] = copy->vert_cache[slot].out; return check_flush(copy); } @@ -303,7 +300,7 @@ end( struct copy_context *copy, GLboolean end_flag ) { struct _mesa_prim *prim = ©->dstprim[copy->dstprim_nr]; -/* _mesa_printf("end (%d)\n", end_flag); */ +/* printf("end (%d)\n", end_flag); */ prim->end = end_flag; prim->count = copy->dstelt_nr - prim->start; @@ -469,7 +466,7 @@ replay_init( struct copy_context *copy ) switch (copy->ib->type) { case GL_UNSIGNED_BYTE: - copy->translated_elt_buf = _mesa_malloc(sizeof(GLuint) * copy->ib->count); + copy->translated_elt_buf = malloc(sizeof(GLuint) * copy->ib->count); copy->srcelt = copy->translated_elt_buf; for (i = 0; i < copy->ib->count; i++) @@ -477,7 +474,7 @@ replay_init( struct copy_context *copy ) break; case GL_UNSIGNED_SHORT: - copy->translated_elt_buf = _mesa_malloc(sizeof(GLuint) * copy->ib->count); + copy->translated_elt_buf = malloc(sizeof(GLuint) * copy->ib->count); copy->srcelt = copy->translated_elt_buf; for (i = 0; i < copy->ib->count; i++) @@ -503,7 +500,7 @@ replay_init( struct copy_context *copy ) * * XXX: This should be a VBO! */ - copy->dstbuf = _mesa_malloc(copy->dstbuf_size * copy->vertex_size); + copy->dstbuf = malloc(copy->dstbuf_size * copy->vertex_size); copy->dstptr = copy->dstbuf; /* Setup new vertex arrays to point into the output buffer: @@ -532,7 +529,7 @@ replay_init( struct copy_context *copy ) copy->ib->count * 2 + 3); copy->dstelt_size = MIN2(copy->dstelt_size, copy->limits->max_indices); - copy->dstelt = _mesa_malloc(sizeof(GLuint) * copy->dstelt_size); + copy->dstelt = malloc(sizeof(GLuint) * copy->dstelt_size); copy->dstelt_nr = 0; /* Setup the new index buffer to point to the allocated element @@ -556,9 +553,9 @@ replay_finish( struct copy_context *copy ) /* Free our vertex and index buffers: */ - _mesa_free(copy->translated_elt_buf); - _mesa_free(copy->dstbuf); - _mesa_free(copy->dstelt); + free(copy->translated_elt_buf); + free(copy->dstbuf); + free(copy->dstelt); /* Unmap VBO's */ diff --git a/mesalib/src/mesa/vbo/vbo_split_inplace.c b/mesalib/src/mesa/vbo/vbo_split_inplace.c index da84eaa6e..2fc866c57 100644 --- a/mesalib/src/mesa/vbo/vbo_split_inplace.c +++ b/mesalib/src/mesa/vbo/vbo_split_inplace.c @@ -30,12 +30,15 @@ #include "main/mtypes.h" #include "main/macros.h" #include "main/enums.h" +#include "main/image.h" #include "vbo_split.h" #define MAX_PRIM 32 -/* Used for splitting without copying. +/* Used for splitting without copying. No attempt is made to handle + * too large indexed vertex buffers: In general you need to copy to do + * that. */ struct split_context { GLcontext *ctx; @@ -48,6 +51,7 @@ struct split_context { vbo_draw_func draw; const struct split_limits *limits; + GLuint limit; struct _mesa_prim dstprim[MAX_PRIM]; GLuint dstprim_nr; @@ -58,38 +62,38 @@ struct split_context { static void flush_vertex( struct split_context *split ) { - GLuint min_index, max_index; + struct _mesa_index_buffer ib; GLuint i; if (!split->dstprim_nr) return; - min_index = split->dstprim[0].start; - max_index = min_index + split->dstprim[0].count - 1; + if (split->ib) { + ib = *split->ib; - for (i = 1; i < split->dstprim_nr; i++) { - GLuint tmp_min = split->dstprim[i].start; - GLuint tmp_max = tmp_min + split->dstprim[i].count - 1; + ib.count = split->max_index - split->min_index + 1; + ib.ptr = (const void *)((const char *)ib.ptr + + split->min_index * _mesa_sizeof_type(ib.type)); - if (tmp_min < min_index) - min_index = tmp_min; - - if (tmp_max > max_index) - max_index = tmp_max; + /* Rebase the primitives to save index buffer entries. */ + for (i = 0; i < split->dstprim_nr; i++) + split->dstprim[i].start -= split->min_index; } - assert(max_index >= min_index); + assert(split->max_index >= split->min_index); - split->draw( split->ctx, - split->array, - split->dstprim, - split->dstprim_nr, - NULL, - GL_TRUE, - min_index, - max_index); + split->draw(split->ctx, + split->array, + split->dstprim, + split->dstprim_nr, + split->ib ? &ib : NULL, + !split->ib, + split->min_index, + split->max_index); split->dstprim_nr = 0; + split->min_index = ~0; + split->max_index = 0; } @@ -106,62 +110,67 @@ static struct _mesa_prim *next_outprim( struct split_context *split ) } } -static int align(int value, int alignment) +static void update_index_bounds(struct split_context *split, + const struct _mesa_prim *prim) { - return (value + alignment - 1) & ~(alignment - 1); + split->min_index = MIN2(split->min_index, prim->start); + split->max_index = MAX2(split->max_index, prim->start + prim->count - 1); } - +/* Return the maximum amount of vertices that can be emitted for a + * primitive starting at 'prim->start', depending on the previous + * index bounds. + */ +static GLuint get_max_vertices(struct split_context *split, + const struct _mesa_prim *prim) +{ + if ((prim->start > split->min_index && + prim->start - split->min_index >= split->limit) || + (prim->start < split->max_index && + split->max_index - prim->start >= split->limit)) + /* "prim" starts too far away from the old range. */ + return 0; + + return MIN2(split->min_index, prim->start) + split->limit - prim->start; +} /* Break large primitives into smaller ones. If not possible, convert * the primitive to indexed and pass to split_elts(). */ static void split_prims( struct split_context *split) { - GLuint csr = 0; GLuint i; for (i = 0; i < split->nr_prims; i++) { const struct _mesa_prim *prim = &split->prim[i]; GLuint first, incr; GLboolean split_inplace = split_prim_inplace(prim->mode, &first, &incr); - GLuint count; - - /* Always wrap on an even numbered vertex to avoid problems with - * triangle strips. - */ - GLuint available = align(split->limits->max_verts - csr - 1, 2); - assert(split->limits->max_verts >= csr); + GLuint available = get_max_vertices(split, prim); + GLuint count = prim->count - (prim->count - first) % incr; if (prim->count < first) continue; - - count = prim->count - (prim->count - first) % incr; - - if ((available < count && !split_inplace) || + if ((available < count && !split_inplace) || (available < first && split_inplace)) { flush_vertex(split); - csr = 0; - available = align(split->limits->max_verts - csr - 1, 2); + available = get_max_vertices(split, prim); } if (available >= count) { struct _mesa_prim *outprim = next_outprim(split); + *outprim = *prim; - csr += prim->count; - available = align(split->limits->max_verts - csr - 1, 2); - } + update_index_bounds(split, outprim); + } else if (split_inplace) { GLuint j, nr; - for (j = 0 ; j < count ; ) { GLuint remaining = count - j; struct _mesa_prim *outprim = next_outprim(split); nr = MIN2( available, remaining ); - nr -= (nr - first) % incr; outprim->mode = prim->mode; @@ -169,21 +178,20 @@ static void split_prims( struct split_context *split) outprim->end = (nr == remaining && prim->end); outprim->start = prim->start + j; outprim->count = nr; - + + update_index_bounds(split, outprim); + if (nr == remaining) { /* Finished. */ - j += nr; - csr += nr; - available = align(split->limits->max_verts - csr - 1, 2); + j += nr; } else { /* Wrapped the primitive: */ j += nr - (first - incr); flush_vertex(split); - csr = 0; - available = align(split->limits->max_verts - csr - 1, 2); + available = get_max_vertices(split, prim); } } } @@ -260,10 +268,14 @@ void vbo_split_inplace( GLcontext *ctx, split.prim = prim; split.nr_prims = nr_prims; split.ib = ib; - split.min_index = min_index; - split.max_index = max_index; + + /* Empty interval, makes calculations simpler. */ + split.min_index = ~0; + split.max_index = 0; + split.draw = draw; split.limits = limits; + split.limit = ib ? limits->max_indices : limits->max_verts; split_prims( &split ); } diff --git a/mesalib/windows/VC8/mesa/gdi/gdi.vcproj b/mesalib/windows/VC8/mesa/gdi/gdi.vcproj index a3dd5ef5b..220923f90 100644 --- a/mesalib/windows/VC8/mesa/gdi/gdi.vcproj +++ b/mesalib/windows/VC8/mesa/gdi/gdi.vcproj @@ -396,6 +396,10 @@ RelativePath="..\..\..\..\src\mesa\drivers\windows\gdi\mesa.def" > + + @@ -417,6 +421,10 @@ RelativePath="..\..\..\..\src\mesa\drivers\common\driverfuncs.h" > + + diff --git a/mesalib/windows/VC8/mesa/mesa.sln b/mesalib/windows/VC8/mesa/mesa.sln index dd8c706ee..915e00026 100644 --- a/mesalib/windows/VC8/mesa/mesa.sln +++ b/mesalib/windows/VC8/mesa/mesa.sln @@ -1,5 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 +# Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdi", "gdi\gdi.vcproj", "{A1B24907-E196-4826-B6AF-26723629B633}" ProjectSection(ProjectDependencies) = postProject {2120C974-2717-4709-B44F-D6E6D0A56448} = {2120C974-2717-4709-B44F-D6E6D0A56448} @@ -11,12 +11,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glu", "glu\glu.vcproj", "{2 EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mesa", "mesa\mesa.vcproj", "{2120C974-2717-4709-B44F-D6E6D0A56448}" + ProjectSection(ProjectDependencies) = postProject + {98AB3D51-1820-4D14-9195-75FCA6997784} = {98AB3D51-1820-4D14-9195-75FCA6997784} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osmesa", "osmesa\osmesa.vcproj", "{8D6CD423-383B-49E7-81BC-D20C70B07DF5}" ProjectSection(ProjectDependencies) = postProject {A1B24907-E196-4826-B6AF-26723629B633} = {A1B24907-E196-4826-B6AF-26723629B633} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glsl_apps_compile", "glsl_apps_compile\glsl_apps_compile.vcproj", "{98AB3D51-1820-4D14-9195-75FCA6997784}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug Static CRT|Win32 = Debug Static CRT|Win32 @@ -57,6 +62,14 @@ Global {8D6CD423-383B-49E7-81BC-D20C70B07DF5}.Release Static CRT|Win32.Build.0 = Release Static CRT|Win32 {8D6CD423-383B-49E7-81BC-D20C70B07DF5}.Release|Win32.ActiveCfg = Release|Win32 {8D6CD423-383B-49E7-81BC-D20C70B07DF5}.Release|Win32.Build.0 = Release|Win32 + {98AB3D51-1820-4D14-9195-75FCA6997784}.Debug Static CRT|Win32.ActiveCfg = Debug|Win32 + {98AB3D51-1820-4D14-9195-75FCA6997784}.Debug Static CRT|Win32.Build.0 = Debug|Win32 + {98AB3D51-1820-4D14-9195-75FCA6997784}.Debug|Win32.ActiveCfg = Debug|Win32 + {98AB3D51-1820-4D14-9195-75FCA6997784}.Debug|Win32.Build.0 = Debug|Win32 + {98AB3D51-1820-4D14-9195-75FCA6997784}.Release Static CRT|Win32.ActiveCfg = Release|Win32 + {98AB3D51-1820-4D14-9195-75FCA6997784}.Release Static CRT|Win32.Build.0 = Release|Win32 + {98AB3D51-1820-4D14-9195-75FCA6997784}.Release|Win32.ActiveCfg = Release|Win32 + {98AB3D51-1820-4D14-9195-75FCA6997784}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/mesalib/windows/VC8/mesa/mesa/mesa.vcproj b/mesalib/windows/VC8/mesa/mesa/mesa.vcproj index 993c28ddc..f7c3c7344 100644 --- a/mesalib/windows/VC8/mesa/mesa/mesa.vcproj +++ b/mesalib/windows/VC8/mesa/mesa/mesa.vcproj @@ -26,9 +26,13 @@ > + + + @@ -398,10 +422,6 @@ RelativePath="..\..\..\..\src\mesa\main\depthstencil.c" > - - @@ -450,6 +470,10 @@ RelativePath="..\..\..\..\src\mesa\main\fog.c" > + + @@ -466,16 +490,20 @@ RelativePath="..\..\..\..\src\mesa\glapi\glapi.c" > + + @@ -858,6 +886,70 @@ RelativePath="..\..\..\..\src\mesa\main\shared.c" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -910,10 +1002,6 @@ RelativePath="..\..\..\..\src\mesa\shader\slang\slang_mem.c" > - - @@ -1150,6 +1238,10 @@ RelativePath="..\..\..\..\src\mesa\vbo\vbo_split_inplace.c" > + + @@ -1171,10 +1263,6 @@ RelativePath="..\..\..\..\src\mesa\main\api_arrayelt.h" > - - @@ -1199,10 +1287,6 @@ RelativePath="..\..\..\..\src\mesa\shader\arbprogram.h" > - - @@ -1247,6 +1331,10 @@ RelativePath="..\..\..\..\src\mesa\main\colortab.h" > + + @@ -1323,6 +1411,10 @@ RelativePath="..\..\..\..\src\mesa\main\fog.h" > + + @@ -1359,22 +1451,6 @@ RelativePath="..\..\..\..\src\mesa\glapi\glthread.h" > - - - - - - - - @@ -1463,18 +1539,10 @@ RelativePath="..\..\..\..\src\mesa\main\macros.h" > - - - - @@ -1671,10 +1739,6 @@ RelativePath="..\..\..\..\src\mesa\swrast\s_points.h" > - - @@ -1731,14 +1795,246 @@ RelativePath="..\..\..\..\src\mesa\main\simple_list.h" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1759,10 +2055,106 @@ RelativePath="..\..\..\..\src\mesa\shader\slang\slang_compile_variable.h" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1783,10 +2175,6 @@ RelativePath="..\..\..\..\src\mesa\shader\slang\slang_mem.h" > - - @@ -1811,6 +2199,54 @@ RelativePath="..\..\..\..\src\mesa\shader\slang\slang_vartable.h" > + + + + + + + + + + + + + + @@ -1896,11 +2332,11 @@ >