From 30af30b78075159fce477ae99cc72540133714d0 Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 26 Jan 2014 20:05:50 +0100 Subject: xserver randrproto libxtrans fontconfig libxcb xcb-proto mesa git update 26 Jan 2014 xserver commit c1ce807d9f18f215332d7eeb844e8c640f71c53c libxcb commit e7263931aff3e3450dc938ad465a7577f943549f libxcb/xcb-proto commit d898fd39ad6c82207eb78666b2daad982dd757b5 randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6 libxtrans commit e1e6121a1638d43d9929589b4723da2b38cb6b44 fontconfig commit e2b406053c2937799da8636c56b72a77998bcab0 mesa commit 07149f0252c52b4ac58b6df4e307fd786b49b490 --- mesalib/src/mesa/drivers/common/driverfuncs.c | 2 +- mesalib/src/mesa/drivers/common/meta.c | 90 +++--- .../src/mesa/drivers/dri/common/xmlpool/.gitignore | 1 + .../mesa/drivers/dri/common/xmlpool/Makefile.am | 2 +- mesalib/src/mesa/drivers/dri/common/xmlpool/ca.po | 321 +++++++++++++++++++ mesalib/src/mesa/drivers/dri/common/xmlpool/de.po | 235 ++++++++------ mesalib/src/mesa/drivers/dri/common/xmlpool/es.po | 234 +++++++++----- mesalib/src/mesa/drivers/dri/common/xmlpool/fr.po | 199 ++++++++---- mesalib/src/mesa/drivers/dri/common/xmlpool/nl.po | 197 ++++++++---- mesalib/src/mesa/drivers/dri/common/xmlpool/sv.po | 216 ++++++++----- mesalib/src/mesa/main/api_validate.c | 10 +- mesalib/src/mesa/main/attrib.c | 40 ++- mesalib/src/mesa/main/config.h | 5 +- mesalib/src/mesa/main/context.c | 72 +++-- mesalib/src/mesa/main/dlist.c | 1 + mesalib/src/mesa/main/enable.c | 36 ++- mesalib/src/mesa/main/extensions.c | 2 + mesalib/src/mesa/main/fbobject.c | 2 +- mesalib/src/mesa/main/ff_fragment_shader.cpp | 8 +- mesalib/src/mesa/main/ffvertex_prog.c | 2 +- mesalib/src/mesa/main/formats.c | 12 + mesalib/src/mesa/main/framebuffer.c | 86 +++-- mesalib/src/mesa/main/framebuffer.h | 5 + mesalib/src/mesa/main/get.c | 229 +++++++++++++- mesalib/src/mesa/main/get.h | 6 + mesalib/src/mesa/main/get_hash_params.py | 13 +- mesalib/src/mesa/main/glformats.c | 130 ++++---- mesalib/src/mesa/main/macros.h | 2 + mesalib/src/mesa/main/mtypes.h | 46 ++- mesalib/src/mesa/main/rastpos.c | 5 +- mesalib/src/mesa/main/scissor.c | 161 +++++++++- mesalib/src/mesa/main/scissor.h | 10 +- mesalib/src/mesa/main/shaderapi.c | 62 ++-- mesalib/src/mesa/main/shaderapi.h | 3 + mesalib/src/mesa/main/shaderobj.c | 4 +- mesalib/src/mesa/main/shared.c | 4 +- mesalib/src/mesa/main/state.c | 24 +- mesalib/src/mesa/main/texobj.c | 8 +- mesalib/src/mesa/main/texstate.c | 75 ++--- mesalib/src/mesa/main/texstorage.c | 40 ++- mesalib/src/mesa/main/transformfeedback.c | 51 ++- mesalib/src/mesa/main/viewport.c | 347 +++++++++++++++++---- mesalib/src/mesa/main/viewport.h | 21 +- mesalib/src/mesa/math/m_matrix.c | 13 +- mesalib/src/mesa/math/m_matrix.h | 4 +- mesalib/src/mesa/program/ir_to_mesa.cpp | 2 +- mesalib/src/mesa/program/prog_print.c | 10 +- mesalib/src/mesa/program/prog_statevars.c | 6 +- mesalib/src/mesa/program/program.c | 5 +- mesalib/src/mesa/program/program.h | 22 +- mesalib/src/mesa/program/programopt.c | 2 +- mesalib/src/mesa/state_tracker/st_atom_clip.c | 2 +- mesalib/src/mesa/state_tracker/st_atom_constbuf.c | 9 +- .../src/mesa/state_tracker/st_atom_rasterizer.c | 2 +- mesalib/src/mesa/state_tracker/st_atom_scissor.c | 14 +- mesalib/src/mesa/state_tracker/st_atom_viewport.c | 12 +- mesalib/src/mesa/state_tracker/st_cb_bitmap.c | 2 +- mesalib/src/mesa/state_tracker/st_cb_clear.c | 10 +- mesalib/src/mesa/state_tracker/st_cb_drawpixels.c | 4 +- mesalib/src/mesa/state_tracker/st_cb_fbo.c | 9 +- mesalib/src/mesa/state_tracker/st_context.c | 2 +- mesalib/src/mesa/state_tracker/st_draw.c | 6 +- mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 2 +- mesalib/src/mesa/state_tracker/st_program.c | 6 +- mesalib/src/mesa/swrast/s_context.c | 10 +- mesalib/src/mesa/swrast/s_depth.c | 10 +- mesalib/src/mesa/swrast/s_fragprog.c | 2 +- mesalib/src/mesa/swrast_setup/ss_context.c | 4 +- mesalib/src/mesa/tnl/t_rasterpos.c | 16 +- mesalib/src/mesa/x86/read_rgba_span_x86.h | 56 ---- 70 files changed, 2325 insertions(+), 936 deletions(-) create mode 100644 mesalib/src/mesa/drivers/dri/common/xmlpool/ca.po delete mode 100644 mesalib/src/mesa/x86/read_rgba_span_x86.h (limited to 'mesalib/src/mesa') diff --git a/mesalib/src/mesa/drivers/common/driverfuncs.c b/mesalib/src/mesa/drivers/common/driverfuncs.c index e8dcb2476..6d56838cd 100644 --- a/mesalib/src/mesa/drivers/common/driverfuncs.c +++ b/mesalib/src/mesa/drivers/common/driverfuncs.c @@ -274,7 +274,7 @@ _mesa_init_driver_state(struct gl_context *ctx) ctx->Driver.Enable(ctx, GL_LIGHTING, ctx->Light.Enabled); ctx->Driver.Enable(ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag); ctx->Driver.Enable(ctx, GL_POLYGON_STIPPLE, ctx->Polygon.StippleFlag); - ctx->Driver.Enable(ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled); + ctx->Driver.Enable(ctx, GL_SCISSOR_TEST, ctx->Scissor.EnableFlags); ctx->Driver.Enable(ctx, GL_STENCIL_TEST, ctx->Stencil._Enabled); ctx->Driver.Enable(ctx, GL_TEXTURE_1D, GL_FALSE); ctx->Driver.Enable(ctx, GL_TEXTURE_2D, GL_FALSE); diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index 129451471..2443a7723 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -138,9 +138,7 @@ struct save_state GLboolean FragmentProgramEnabled; struct gl_fragment_program *FragmentProgram; GLboolean ATIFragmentShaderEnabled; - struct gl_shader_program *VertexShader; - struct gl_shader_program *GeometryShader; - struct gl_shader_program *FragmentShader; + struct gl_shader_program *Shader[MESA_SHADER_STAGES]; struct gl_shader_program *ActiveShader; /** MESA_META_STENCIL_TEST */ @@ -170,7 +168,7 @@ struct save_state struct gl_buffer_object *ArrayBufferObj; /** MESA_META_VIEWPORT */ - GLint ViewportX, ViewportY, ViewportW, ViewportH; + GLfloat ViewportX, ViewportY, ViewportW, ViewportH; GLclampd DepthNear, DepthFar; /** MESA_META_CLAMP_FRAGMENT_COLOR */ @@ -598,6 +596,8 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) } if (state & MESA_META_SHADER) { + int i; + if (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_vertex_program) { save->VertexProgramEnabled = ctx->VertexProgram.Enabled; _mesa_reference_vertprog(ctx, &save->VertexProgram, @@ -617,12 +617,10 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) _mesa_set_enable(ctx, GL_FRAGMENT_SHADER_ATI, GL_FALSE); } - _mesa_reference_shader_program(ctx, &save->VertexShader, - ctx->Shader.CurrentVertexProgram); - _mesa_reference_shader_program(ctx, &save->GeometryShader, - ctx->Shader.CurrentGeometryProgram); - _mesa_reference_shader_program(ctx, &save->FragmentShader, - ctx->Shader.CurrentFragmentProgram); + for (i = 0; i < MESA_SHADER_STAGES; i++) { + _mesa_reference_shader_program(ctx, &save->Shader[i], + ctx->Shader.CurrentProgram[i]); + } _mesa_reference_shader_program(ctx, &save->ActiveShader, ctx->Shader.ActiveProgram); @@ -737,21 +735,21 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) if (state & MESA_META_VIEWPORT) { /* save viewport state */ - save->ViewportX = ctx->Viewport.X; - save->ViewportY = ctx->Viewport.Y; - save->ViewportW = ctx->Viewport.Width; - save->ViewportH = ctx->Viewport.Height; + save->ViewportX = ctx->ViewportArray[0].X; + save->ViewportY = ctx->ViewportArray[0].Y; + save->ViewportW = ctx->ViewportArray[0].Width; + save->ViewportH = ctx->ViewportArray[0].Height; /* set viewport to match window size */ - if (ctx->Viewport.X != 0 || - ctx->Viewport.Y != 0 || - ctx->Viewport.Width != ctx->DrawBuffer->Width || - ctx->Viewport.Height != ctx->DrawBuffer->Height) { - _mesa_set_viewport(ctx, 0, 0, + if (ctx->ViewportArray[0].X != 0 || + ctx->ViewportArray[0].Y != 0 || + ctx->ViewportArray[0].Width != (float) ctx->DrawBuffer->Width || + ctx->ViewportArray[0].Height != (float) ctx->DrawBuffer->Height) { + _mesa_set_viewport(ctx, 0, 0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height); } /* save depth range state */ - save->DepthNear = ctx->Viewport.Near; - save->DepthFar = ctx->Viewport.Far; + save->DepthNear = ctx->ViewportArray[0].Near; + save->DepthFar = ctx->ViewportArray[0].Far; /* set depth range to default */ _mesa_DepthRange(0.0, 1.0); } @@ -829,6 +827,7 @@ _mesa_meta_end(struct gl_context *ctx) { struct save_state *save = &ctx->Meta->Save[ctx->Meta->SaveStackDepth - 1]; const GLbitfield state = save->SavedState; + int i; /* After starting a new occlusion query, initialize the results to the * values saved previously. The driver will then continue to increment @@ -933,9 +932,17 @@ _mesa_meta_end(struct gl_context *ctx) } if (state & MESA_META_SCISSOR) { - _mesa_set_enable(ctx, GL_SCISSOR_TEST, save->Scissor.Enabled); - _mesa_Scissor(save->Scissor.X, save->Scissor.Y, - save->Scissor.Width, save->Scissor.Height); + unsigned i; + + for (i = 0; i < ctx->Const.MaxViewports; i++) { + _mesa_set_scissor(ctx, i, + save->Scissor.ScissorArray[i].X, + save->Scissor.ScissorArray[i].Y, + save->Scissor.ScissorArray[i].Width, + save->Scissor.ScissorArray[i].Height); + _mesa_set_enablei(ctx, GL_SCISSOR_TEST, i, + (save->Scissor.EnableFlags >> i) & 1); + } } if (state & MESA_META_SHADER) { @@ -960,23 +967,24 @@ _mesa_meta_end(struct gl_context *ctx) save->ATIFragmentShaderEnabled); } - if (ctx->Extensions.ARB_vertex_shader) - _mesa_use_shader_program(ctx, GL_VERTEX_SHADER, save->VertexShader); + if (ctx->Extensions.ARB_vertex_shader) { + _mesa_use_shader_program(ctx, GL_VERTEX_SHADER, + save->Shader[MESA_SHADER_VERTEX]); + } if (_mesa_has_geometry_shaders(ctx)) _mesa_use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB, - save->GeometryShader); + save->Shader[MESA_SHADER_GEOMETRY]); if (ctx->Extensions.ARB_fragment_shader) _mesa_use_shader_program(ctx, GL_FRAGMENT_SHADER, - save->FragmentShader); + save->Shader[MESA_SHADER_FRAGMENT]); _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, save->ActiveShader); - _mesa_reference_shader_program(ctx, &save->VertexShader, NULL); - _mesa_reference_shader_program(ctx, &save->GeometryShader, NULL); - _mesa_reference_shader_program(ctx, &save->FragmentShader, NULL); + for (i = 0; i < MESA_SHADER_STAGES; i++) + _mesa_reference_shader_program(ctx, &save->Shader[i], NULL); _mesa_reference_shader_program(ctx, &save->ActiveShader, NULL); } @@ -1089,11 +1097,11 @@ _mesa_meta_end(struct gl_context *ctx) } if (state & MESA_META_VIEWPORT) { - if (save->ViewportX != ctx->Viewport.X || - save->ViewportY != ctx->Viewport.Y || - save->ViewportW != ctx->Viewport.Width || - save->ViewportH != ctx->Viewport.Height) { - _mesa_set_viewport(ctx, save->ViewportX, save->ViewportY, + if (save->ViewportX != ctx->ViewportArray[0].X || + save->ViewportY != ctx->ViewportArray[0].Y || + save->ViewportW != ctx->ViewportArray[0].Width || + save->ViewportH != ctx->ViewportArray[0].Height) { + _mesa_set_viewport(ctx, 0, save->ViewportX, save->ViewportY, save->ViewportW, save->ViewportH); } _mesa_DepthRange(save->DepthNear, save->DepthFar); @@ -1761,7 +1769,7 @@ blitframebuffer_texture(struct gl_context *ctx, } /* setup viewport */ - _mesa_set_viewport(ctx, dstX, dstY, dstW, dstH); + _mesa_set_viewport(ctx, 0, dstX, dstY, dstW, dstH); _mesa_ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); _mesa_DepthMask(GL_FALSE); _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); @@ -1916,7 +1924,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx, _mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); } - _mesa_set_viewport(ctx, dstX, dstY, dstW, dstH); + _mesa_set_viewport(ctx, 0, dstX, dstY, dstW, dstH); _mesa_ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); _mesa_set_enable(ctx, GL_DEPTH_TEST, GL_FALSE); _mesa_DepthMask(GL_FALSE); @@ -1965,7 +1973,7 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx, _mesa_DepthFunc(GL_ALWAYS); _mesa_DepthMask(GL_TRUE); - _mesa_set_viewport(ctx, dstX, dstY, dstW, dstH); + _mesa_set_viewport(ctx, 0, dstX, dstY, dstW, dstH); _mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); mask &= ~GL_DEPTH_BUFFER_BIT; @@ -3782,7 +3790,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, assert(dstHeight == ctx->DrawBuffer->Height); /* setup viewport */ - _mesa_set_viewport(ctx, 0, 0, dstWidth, dstHeight); + _mesa_set_viewport(ctx, 0, 0, 0, dstWidth, dstHeight); _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); } @@ -4072,7 +4080,7 @@ decompress_texture_image(struct gl_context *ctx, _mesa_MatrixMode(GL_PROJECTION); _mesa_LoadIdentity(); _mesa_Ortho(0.0, width, 0.0, height, -1.0, 1.0); - _mesa_set_viewport(ctx, 0, 0, width, height); + _mesa_set_viewport(ctx, 0, 0, 0, width, height); /* upload new vertex data */ _mesa_BufferSubData(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/.gitignore b/mesalib/src/mesa/drivers/dri/common/xmlpool/.gitignore index 0e0bf178e..383df727a 100644 --- a/mesalib/src/mesa/drivers/dri/common/xmlpool/.gitignore +++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/.gitignore @@ -1,3 +1,4 @@ +ca de es fr diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/Makefile.am b/mesalib/src/mesa/drivers/dri/common/xmlpool/Makefile.am index ad7887d06..0908c8264 100644 --- a/mesalib/src/mesa/drivers/dri/common/xmlpool/Makefile.am +++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/Makefile.am @@ -41,7 +41,7 @@ # - info gettext # The set of supported languages. Add languages as needed. -POS=de.po es.po nl.po fr.po sv.po +POS=ca.po de.po es.po nl.po fr.po sv.po # # Don't change anything below, unless you know what you're doing. diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/ca.po b/mesalib/src/mesa/drivers/dri/common/xmlpool/ca.po new file mode 100644 index 000000000..c0cf7f62c --- /dev/null +++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/ca.po @@ -0,0 +1,321 @@ +# Language translations for Mesa package +# Traduccions al català del paquet «Mesa». +# +# Copyright © 2014 Alex Henrie +# +# 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. + +msgid "" +msgstr "" +"Project-Id-Version: Mesa 10.1.0-devel\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-01-13 22:30-0700\n" +"PO-Revision-Date: 2014-01-15 10:37-0700\n" +"Last-Translator: Alex Henrie \n" +"Language-Team: Catalan \n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 1.5.4\n" + +#: t_options.h:56 +msgid "Debugging" +msgstr "Depuració" + +#: t_options.h:60 +msgid "Disable 3D acceleration" +msgstr "Deshabilita l'acceleració 3D" + +#: t_options.h:65 +msgid "Show performance boxes" +msgstr "Mostra les caixes de rendiment" + +#: t_options.h:70 +msgid "Enable flushing batchbuffer after each draw call" +msgstr "Habilita el buidatge del batchbuffer després de cada trucada de dibuix" + +#: t_options.h:75 +msgid "Enable flushing GPU caches with each draw call" +msgstr "" +"Habilita el buidatge de les memòries cau de GPU amb cada trucada de dibuix" + +#: t_options.h:80 +msgid "Disable throttling on first batch after flush" +msgstr "Deshabilita la regulació en el primer lot després de buidar" + +#: t_options.h:85 +msgid "Force GLSL extension default behavior to 'warn'" +msgstr "" +"Força que el comportament per defecte de les extensions GLSL sigui 'warn'" + +#: t_options.h:90 +msgid "Disable dual source blending" +msgstr "Deshabilita la barreja de font dual" + +#: t_options.h:95 +msgid "Disable backslash-based line continuations in GLSL source" +msgstr "" +"Deshabilitar les continuacions de línia basades en barra invertida en la " +"font GLSL" + +#: t_options.h:100 +msgid "Disable GL_ARB_shader_bit_encoding" +msgstr "Deshabilita el GL_ARB_shader_bit_encoding" + +#: t_options.h:105 +msgid "" +"Force a default GLSL version for shaders that lack an explicit #version line" +msgstr "" +"Força una versió GLSL per defecte en els shaders als quals falta una línia " +"#version explícita" + +#: t_options.h:115 +msgid "Image Quality" +msgstr "Qualitat d'Imatge" + +#: t_options.h:128 +msgid "Texture color depth" +msgstr "Profunditat de color de textura" + +#: t_options.h:129 +msgid "Prefer frame buffer color depth" +msgstr "Prefereix profunditat de color del framebuffer" + +#: t_options.h:130 +msgid "Prefer 32 bits per texel" +msgstr "Prefereix 32 bits per texel" + +#: t_options.h:131 +msgid "Prefer 16 bits per texel" +msgstr "Prefereix 16 bits per texel" + +#: t_options.h:132 +msgid "Force 16 bits per texel" +msgstr "Força 16 bits per texel" + +#: t_options.h:138 +msgid "Initial maximum value for anisotropic texture filtering" +msgstr "Valor màxim inicial per a la filtració de textura anisòtropa" + +#: t_options.h:143 +msgid "Forbid negative texture LOD bias" +msgstr "" +"Prohibeix una parcialitat negativa del Nivell de Detalle (LOD) de les " +"textures" + +#: t_options.h:148 +msgid "" +"Enable S3TC texture compression even if software support is not available" +msgstr "" +"Habilitar la compressió de textures S3TC encara que el suport de programari " +"no estigui disponible" + +#: t_options.h:155 +msgid "Initial color reduction method" +msgstr "Mètode inicial de reducció de color" + +#: t_options.h:156 +msgid "Round colors" +msgstr "Colors arrodonits" + +#: t_options.h:157 +msgid "Dither colors" +msgstr "Colors tramats" + +#: t_options.h:165 +msgid "Color rounding method" +msgstr "Mètode d'arrodoniment de color" + +#: t_options.h:166 +msgid "Round color components downward" +msgstr "Arrondeix els components de color a baix" + +#: t_options.h:167 +msgid "Round to nearest color" +msgstr "Arrondeix al color més proper" + +#: t_options.h:176 +msgid "Color dithering method" +msgstr "Mètode de tramat de color" + +#: t_options.h:177 +msgid "Horizontal error diffusion" +msgstr "Difusió d'error horitzontal" + +#: t_options.h:178 +msgid "Horizontal error diffusion, reset error at line start" +msgstr "Difusió d'error horitzontal, reinicia l'error a l'inici de la línia" + +#: t_options.h:179 +msgid "Ordered 2D color dithering" +msgstr "Tramat de color 2D ordenat" + +#: t_options.h:185 +msgid "Floating point depth buffer" +msgstr "Buffer de profunditat de punt flotant" + +#: t_options.h:190 +msgid "A post-processing filter to cel-shade the output" +msgstr "Un filtre de postprocessament per a aplicar cel shading a la sortida" + +#: t_options.h:195 +msgid "A post-processing filter to remove the red channel" +msgstr "Un filtre de postprocessament per a treure el canal vermell" + +#: t_options.h:200 +msgid "A post-processing filter to remove the green channel" +msgstr "Un filtre de postprocessament per a treure el canal verd" + +#: t_options.h:205 +msgid "A post-processing filter to remove the blue channel" +msgstr "Un filtre de postprocessament per a treure el canal blau" + +#: t_options.h:210 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality" +msgstr "" +"Antialiàsing morfològic basat en el MLAA de Jimenez. 0 per deshabilitar, 8 " +"per qualitat per defecte" + +#: t_options.h:215 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality. Color version, usable with 2d GL apps" +msgstr "" +"Antialiàsing morfològic basat en el MLAA de Jimenez. 0 per deshabilitar, 8 " +"per qualitat per defecte. Versió en color, utilitzable amb les aplicacions " +"GL 2D" + +#: t_options.h:225 +msgid "Performance" +msgstr "Rendiment" + +#: t_options.h:233 +msgid "TCL mode (Transformation, Clipping, Lighting)" +msgstr "Mode TCL (Transformació, Retall, Il·luminació)" + +#: t_options.h:234 +msgid "Use software TCL pipeline" +msgstr "Utilitza la canonada TCL de programari" + +#: t_options.h:235 +msgid "Use hardware TCL as first TCL pipeline stage" +msgstr "Utilitza el TCL maquinàri com la primera fase de la canonada TCL" + +#: t_options.h:236 +msgid "Bypass the TCL pipeline" +msgstr "Passar per alt la canonada TCL" + +#: t_options.h:237 +msgid "" +"Bypass the TCL pipeline with state-based machine code generated on-the-fly" +msgstr "" +"Passar per alt la canonada TCL amb codi màquina basat en estats, generat " +"sobre la marxa" + +#: t_options.h:246 +msgid "Method to limit rendering latency" +msgstr "Mètode per a limitar la latència de renderització" + +#: t_options.h:247 +msgid "Busy waiting for the graphics hardware" +msgstr "Espera activa pel maquinari de gràfics" + +#: t_options.h:248 +msgid "Sleep for brief intervals while waiting for the graphics hardware" +msgstr "Dormi per intervals breus mentre s'espera al maquinari de gràfics" + +#: t_options.h:249 +msgid "Let the graphics hardware emit a software interrupt and sleep" +msgstr "" +"Deixa que el maquinari de gràfics emeti una interrupció de programari i dormi" + +#: t_options.h:259 +msgid "Synchronization with vertical refresh (swap intervals)" +msgstr "Sincronització amb refresc vertical (intervals d'intercanvi)" + +#: t_options.h:260 +msgid "Never synchronize with vertical refresh, ignore application's choice" +msgstr "" +"Mai sincronitzis amb el refresc vertial, ignora l'elecció de l'aplicació" + +#: t_options.h:261 +msgid "Initial swap interval 0, obey application's choice" +msgstr "Interval d'intercanvi inicial 0, obeeix l'elecció de l'aplicació" + +#: t_options.h:262 +msgid "Initial swap interval 1, obey application's choice" +msgstr "Interval d'intercanvi inicial 1, obeeix l'elecció de l'aplicació" + +#: t_options.h:263 +msgid "" +"Always synchronize with vertical refresh, application chooses the minimum " +"swap interval" +msgstr "" +"Sempre sincronitza amb el refresc vertical, l'aplicació tria l'interval " +"mínim d'intercanvi" + +#: t_options.h:271 +msgid "Use HyperZ to boost performance" +msgstr "Utilitza el HyperZ per a augmentar el rendiment" + +#: t_options.h:276 +msgid "Number of texture units used" +msgstr "Nombre d'unitats de textura utilitzades" + +#: t_options.h:281 +msgid "Texture filtering quality vs. speed, AKA “brilinear” texture filtering" +msgstr "" +"Qualitat vs. velocitat de filtració de textura, àlies filtració \"brilinear" +"\" de textura" + +#: t_options.h:289 +msgid "Used types of texture memory" +msgstr "Tipus utilitzats de memòria de textura" + +#: t_options.h:290 +msgid "All available memory" +msgstr "Tota la memòria disponible" + +#: t_options.h:291 +msgid "Only card memory (if available)" +msgstr "Només memòria de tarjeta (si està disponible)" + +#: t_options.h:292 +msgid "Only GART (AGP/PCIE) memory (if available)" +msgstr "Només memòria GART (AGP/PCIE) (si està disponible)" + +#: t_options.h:304 +msgid "Features that are not hardware-accelerated" +msgstr "Característiques no accelerades per maquinari" + +#: t_options.h:308 +msgid "Enable extension GL_ARB_vertex_program" +msgstr "Habilita l'extensió GL_ARB_vertex_program" + +#: t_options.h:318 +msgid "Miscellaneous" +msgstr "Miscel·lània" + +#: t_options.h:322 +msgid "Create all visuals with a depth buffer" +msgstr "Crea tots els visuals amb buffer de profunditat" diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/de.po b/mesalib/src/mesa/drivers/dri/common/xmlpool/de.po index a87c8d513..fff7e8bef 100644 --- a/mesalib/src/mesa/drivers/dri/common/xmlpool/de.po +++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Mesa 6.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-08-30 11:40+0200\n" +"POT-Creation-Date: 2014-01-13 22:30-0700\n" "PO-Revision-Date: 2005-04-11 01:34+0200\n" "Last-Translator: Felix Kuehling \n" "Language-Team: German \n" @@ -17,164 +17,230 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: t_options.h:53 +#: t_options.h:56 msgid "Debugging" msgstr "Fehlersuche" -#: t_options.h:57 +#: t_options.h:60 msgid "Disable 3D acceleration" msgstr "3D-Beschleunigung abschalten" -#: t_options.h:62 +#: t_options.h:65 msgid "Show performance boxes" msgstr "Zeige Performanceboxen" -#: t_options.h:69 +#: t_options.h:70 +msgid "Enable flushing batchbuffer after each draw call" +msgstr "Aktiviere sofortige Leerung des Stapelpuffers nach jedem Zeichenaufruf" + +#: t_options.h:75 +msgid "Enable flushing GPU caches with each draw call" +msgstr "" +"Aktiviere sofortige Leerung der GPU-Zwischenspeicher mit jedem Zeichenaufruf" + +#: t_options.h:80 +msgid "Disable throttling on first batch after flush" +msgstr "" + +#: t_options.h:85 +msgid "Force GLSL extension default behavior to 'warn'" +msgstr "" + +#: t_options.h:90 +msgid "Disable dual source blending" +msgstr "" + +#: t_options.h:95 +msgid "Disable backslash-based line continuations in GLSL source" +msgstr "" + +#: t_options.h:100 +msgid "Disable GL_ARB_shader_bit_encoding" +msgstr "" + +#: t_options.h:105 +msgid "" +"Force a default GLSL version for shaders that lack an explicit #version line" +msgstr "" + +#: t_options.h:115 msgid "Image Quality" msgstr "Bildqualität" -#: t_options.h:82 +#: t_options.h:128 msgid "Texture color depth" msgstr "Texturfarbtiefe" -#: t_options.h:83 +#: t_options.h:129 msgid "Prefer frame buffer color depth" msgstr "Bevorzuge Farbtiefe des Framebuffers" -#: t_options.h:84 +#: t_options.h:130 msgid "Prefer 32 bits per texel" msgstr "Bevorzuge 32 bits pro Texel" -#: t_options.h:85 +#: t_options.h:131 msgid "Prefer 16 bits per texel" msgstr "Bevorzuge 16 bits pro Texel" -#: t_options.h:86 +#: t_options.h:132 msgid "Force 16 bits per texel" msgstr "Erzwinge 16 bits pro Texel" -#: t_options.h:92 +#: t_options.h:138 msgid "Initial maximum value for anisotropic texture filtering" msgstr "Initialer Maximalwert für anisotropische Texturfilterung" -#: t_options.h:97 +#: t_options.h:143 msgid "Forbid negative texture LOD bias" msgstr "Verbiete negative Textur-Detailgradverschiebung" -#: t_options.h:102 +#: t_options.h:148 msgid "" "Enable S3TC texture compression even if software support is not available" msgstr "" "Aktiviere S3TC Texturkomprimierung auch wenn die nötige " "Softwareunterstützung fehlt" -#: t_options.h:109 +#: t_options.h:155 msgid "Initial color reduction method" msgstr "Initiale Farbreduktionsmethode" -#: t_options.h:110 +#: t_options.h:156 msgid "Round colors" msgstr "Farben runden" -#: t_options.h:111 +#: t_options.h:157 msgid "Dither colors" msgstr "Farben rastern" -#: t_options.h:119 +#: t_options.h:165 msgid "Color rounding method" msgstr "Farbrundungsmethode" -#: t_options.h:120 +#: t_options.h:166 msgid "Round color components downward" msgstr "Farbkomponenten abrunden" -#: t_options.h:121 +#: t_options.h:167 msgid "Round to nearest color" msgstr "Zur ähnlichsten Farbe runden" -#: t_options.h:130 +#: t_options.h:176 msgid "Color dithering method" msgstr "Farbrasterungsmethode" -#: t_options.h:131 +#: t_options.h:177 msgid "Horizontal error diffusion" msgstr "Horizontale Fehlerstreuung" -#: t_options.h:132 +#: t_options.h:178 msgid "Horizontal error diffusion, reset error at line start" msgstr "Horizontale Fehlerstreuung, Fehler am Zeilenanfang zurücksetzen" -#: t_options.h:133 +#: t_options.h:179 msgid "Ordered 2D color dithering" msgstr "Geordnete 2D Farbrasterung" -#: t_options.h:139 +#: t_options.h:185 msgid "Floating point depth buffer" msgstr "Fließkomma z-Puffer" -#: t_options.h:145 +#: t_options.h:190 +msgid "A post-processing filter to cel-shade the output" +msgstr "Nachbearbeitungsfilter für Cell Shading" + +#: t_options.h:195 +msgid "A post-processing filter to remove the red channel" +msgstr "Nachbearbeitungsfilter zum Entfernen des Rotkanals" + +#: t_options.h:200 +msgid "A post-processing filter to remove the green channel" +msgstr "Nachbearbeitungsfilter zum Entfernen des Grünkanals" + +#: t_options.h:205 +msgid "A post-processing filter to remove the blue channel" +msgstr "Nachbearbeitungsfilter zum Entfernen des Blaukanals" + +#: t_options.h:210 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality" +msgstr "" +"Morphologische Kantenglättung (Anti-Aliasing) basierend auf Jimenez' MLAA. 0 " +"für deaktiviert, 8 für Standardqualität" + +#: t_options.h:215 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality. Color version, usable with 2d GL apps" +msgstr "" +"Morphologische Kantenglättung (Anti-Aliasing) basierend auf Jimenez' MLAA. 0 " +"für deaktiviert, 8 für Standardqualität. Farbversion, für 2D-Anwendungen" + +#: t_options.h:225 msgid "Performance" msgstr "Leistung" -#: t_options.h:153 +#: t_options.h:233 msgid "TCL mode (Transformation, Clipping, Lighting)" msgstr "TCL-Modus (Transformation, Clipping, Licht)" -#: t_options.h:154 +#: t_options.h:234 msgid "Use software TCL pipeline" msgstr "Benutze die Software-TCL-Pipeline" -#: t_options.h:155 +#: t_options.h:235 msgid "Use hardware TCL as first TCL pipeline stage" msgstr "Benutze Hardware TCL als erste Stufe der TCL-Pipeline" -#: t_options.h:156 +#: t_options.h:236 msgid "Bypass the TCL pipeline" msgstr "Umgehe die TCL-Pipeline" -#: t_options.h:157 +#: t_options.h:237 msgid "" "Bypass the TCL pipeline with state-based machine code generated on-the-fly" msgstr "" "Umgehe die TCL-Pipeline mit zur Laufzeit erzeugtem, zustandsbasiertem " "Maschinencode" -#: t_options.h:166 +#: t_options.h:246 msgid "Method to limit rendering latency" msgstr "Methode zur Begrenzung der Bildverzögerung" -#: t_options.h:167 +#: t_options.h:247 msgid "Busy waiting for the graphics hardware" msgstr "Aktives Warten auf die Grafikhardware" -#: t_options.h:168 +#: t_options.h:248 msgid "Sleep for brief intervals while waiting for the graphics hardware" msgstr "Kurze Schlafintervalle beim Warten auf die Grafikhardware" -#: t_options.h:169 +#: t_options.h:249 msgid "Let the graphics hardware emit a software interrupt and sleep" msgstr "" "Die Grafikhardware eine Softwareunterbrechnung erzeugen lassen und schlafen" -#: t_options.h:179 +#: t_options.h:259 msgid "Synchronization with vertical refresh (swap intervals)" msgstr "Synchronisation mit der vertikalen Bildwiederholung" -#: t_options.h:180 +#: t_options.h:260 msgid "Never synchronize with vertical refresh, ignore application's choice" msgstr "" "Niemals mit der Bildwiederholung synchronisieren, Anweisungen der Anwendung " "ignorieren" -#: t_options.h:181 +#: t_options.h:261 msgid "Initial swap interval 0, obey application's choice" msgstr "Initiales Bildinterval 0, Anweisungen der Anwendung gehorchen" -#: t_options.h:182 +#: t_options.h:262 msgid "Initial swap interval 1, obey application's choice" msgstr "Initiales Bildinterval 1, Anweisungen der Anwendung gehorchen" -#: t_options.h:183 +#: t_options.h:263 msgid "" "Always synchronize with vertical refresh, application chooses the minimum " "swap interval" @@ -182,96 +248,61 @@ msgstr "" "Immer mit der Bildwiederholung synchronisieren, Anwendung wählt das minimale " "Bildintervall" -#: t_options.h:191 +#: t_options.h:271 msgid "Use HyperZ to boost performance" msgstr "HyperZ zur Leistungssteigerung verwenden" -#: t_options.h:196 -msgid "A post-processing filter to cel-shade the output" -msgstr "Nachbearbeitungsfilter für Cell Shading" - -#: t_options.h:201 -msgid "A post-processing filter to remove the red channel" -msgstr "Nachbearbeitungsfilter zum Entfernen des Rotkanals" - -#: t_options.h:206 -msgid "A post-processing filter to remove the green channel" -msgstr "Nachbearbeitungsfilter zum Entfernen des Grünkanals" - -#: t_options.h:211 -msgid "A post-processing filter to remove the blue channel" -msgstr "Nachbearbeitungsfilter zum Entfernen des Blaukanals" - -#: t_options.h:216 -msgid "" -"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " -"default quality" -msgstr "Morphologische Kantenglättung (Anti-Aliasing) basierend auf " -"Jimenez' MLAA. 0 für deaktiviert, 8 für Standardqualität" - -#: t_options.h:221 -msgid "" -"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " -"default quality. Color version, usable with 2d GL apps" -msgstr "Morphologische Kantenglättung (Anti-Aliasing) basierend auf " -"Jimenez' MLAA. 0 für deaktiviert, 8 für Standardqualität. " -"Farbversion, für 2D-Anwendungen" - -#: t_options.h:226 +#: t_options.h:276 msgid "Number of texture units used" msgstr "Anzahl der benutzten Textureinheiten" -#: t_options.h:231 -msgid "Support larger textures not guaranteed to fit into graphics memory" -msgstr "" -"Unterstütze grosse Texturen die evtl. nicht in den Grafikspeicher passen" - -#: t_options.h:232 -msgid "No" -msgstr "Nein" - -#: t_options.h:233 -msgid "At least 1 texture must fit under worst-case assumptions" -msgstr "Mindestens 1 Textur muss auch im schlechtesten Fall Platz haben" - -#: t_options.h:234 -msgid "Announce hardware limits" -msgstr "Benutze Hardware-Limits" - -#: t_options.h:240 +#: t_options.h:281 msgid "Texture filtering quality vs. speed, AKA “brilinear” texture filtering" msgstr "" "Texturfilterqualität versus -geschwindigkeit, auch bekannt als „brilineare“ " "Texturfilterung" -#: t_options.h:248 +#: t_options.h:289 msgid "Used types of texture memory" msgstr "Benutzte Arten von Texturspeicher" -#: t_options.h:249 +#: t_options.h:290 msgid "All available memory" msgstr "Aller verfügbarer Speicher" -#: t_options.h:250 +#: t_options.h:291 msgid "Only card memory (if available)" msgstr "Nur Grafikspeicher (falls verfügbar)" -#: t_options.h:251 +#: t_options.h:292 msgid "Only GART (AGP/PCIE) memory (if available)" msgstr "Nur GART-Speicher (AGP/PCIE) (falls verfügbar)" -#: t_options.h:259 +#: t_options.h:304 msgid "Features that are not hardware-accelerated" msgstr "Funktionalität, die nicht hardwarebeschleunigt ist" -#: t_options.h:263 +#: t_options.h:308 msgid "Enable extension GL_ARB_vertex_program" msgstr "Erweiterung GL_ARB_vertex_program aktivieren" -#: t_options.h:273 -msgid "Enable flushing batchbuffer after each draw call" -msgstr "Aktiviere sofortige Leerung des Stapelpuffers nach jedem Zeichenaufruf" +#: t_options.h:318 +msgid "Miscellaneous" +msgstr "" -#: t_options.h:278 -msgid "Enable flushing GPU caches with each draw call" -msgstr "Aktiviere sofortige Leerung der GPU-Zwischenspeicher mit jedem Zeichenaufruf" +#: t_options.h:322 +msgid "Create all visuals with a depth buffer" +msgstr "" + +#~ msgid "Support larger textures not guaranteed to fit into graphics memory" +#~ msgstr "" +#~ "Unterstütze grosse Texturen die evtl. nicht in den Grafikspeicher passen" + +#~ msgid "No" +#~ msgstr "Nein" + +#~ msgid "At least 1 texture must fit under worst-case assumptions" +#~ msgstr "Mindestens 1 Textur muss auch im schlechtesten Fall Platz haben" + +#~ msgid "Announce hardware limits" +#~ msgstr "Benutze Hardware-Limits" diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/es.po b/mesalib/src/mesa/drivers/dri/common/xmlpool/es.po index 8bccd8631..4a6ab91a5 100644 --- a/mesalib/src/mesa/drivers/dri/common/xmlpool/es.po +++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/es.po @@ -9,206 +9,296 @@ msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-04-12 12:18+0200\n" -"PO-Revision-Date: 2005-04-12 20:26+0200\n" -"Last-Translator: David Rubio Miguélez \n" +"POT-Creation-Date: 2014-01-13 22:30-0700\n" +"PO-Revision-Date: 2014-01-15 10:34-0700\n" +"Last-Translator: Alex Henrie \n" "Language-Team: Spanish \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: KBabel 1.10\n" +"X-Generator: Poedit 1.5.4\n" -#: t_options.h:53 +#: t_options.h:56 msgid "Debugging" -msgstr "Depurando" +msgstr "Depuración" -#: t_options.h:57 +#: t_options.h:60 msgid "Disable 3D acceleration" -msgstr "Desactivar aceleración 3D" +msgstr "Deshabilitar aceleración 3D" -#: t_options.h:62 +#: t_options.h:65 msgid "Show performance boxes" msgstr "Mostrar cajas de rendimiento" -#: t_options.h:69 +#: t_options.h:70 +msgid "Enable flushing batchbuffer after each draw call" +msgstr "Habilitar vaciado del batchbuffer después de cada llamada de dibujo" + +#: t_options.h:75 +msgid "Enable flushing GPU caches with each draw call" +msgstr "Habilitar vaciado de los cachés GPU con cada llamada de dibujo" + +#: t_options.h:80 +msgid "Disable throttling on first batch after flush" +msgstr "Deshabilitar regulación del primer lote después de vaciar" + +#: t_options.h:85 +msgid "Force GLSL extension default behavior to 'warn'" +msgstr "" +"Forzar que el comportamiento por defecto de las extensiones GLSL sea 'warn'" + +#: t_options.h:90 +msgid "Disable dual source blending" +msgstr "Deshabilitar mezcla de fuente dual" + +#: t_options.h:95 +msgid "Disable backslash-based line continuations in GLSL source" +msgstr "" +"Deshabilitar continuaciones de línea basadas en barra inversa en el código " +"GLSL" + +#: t_options.h:100 +msgid "Disable GL_ARB_shader_bit_encoding" +msgstr "Deshabilitar GL_ARB_shader_bit_encoding" + +#: t_options.h:105 +msgid "" +"Force a default GLSL version for shaders that lack an explicit #version line" +msgstr "" +"Forzar una versión de GLSL por defecto en los shaders a los cuales les falta " +"una línea #version explícita" + +#: t_options.h:115 msgid "Image Quality" msgstr "Calidad de imagen" -#: t_options.h:77 +#: t_options.h:128 msgid "Texture color depth" msgstr "Profundidad de color de textura" -#: t_options.h:78 +#: t_options.h:129 msgid "Prefer frame buffer color depth" -msgstr "Preferir profundidad de color del \"framebuffer\"" +msgstr "Preferir profundidad de color del framebuffer" -#: t_options.h:79 +#: t_options.h:130 msgid "Prefer 32 bits per texel" msgstr "Preferir 32 bits por texel" -#: t_options.h:80 +#: t_options.h:131 msgid "Prefer 16 bits per texel" msgstr "Preferir 16 bits por texel" -#: t_options.h:81 +#: t_options.h:132 msgid "Force 16 bits per texel" msgstr "Forzar a 16 bits por texel" -#: t_options.h:87 +#: t_options.h:138 msgid "Initial maximum value for anisotropic texture filtering" msgstr "Valor máximo inicial para filtrado anisotrópico de textura" -#: t_options.h:92 +#: t_options.h:143 msgid "Forbid negative texture LOD bias" msgstr "Prohibir valores negativos de Nivel De Detalle (LOD) de texturas" -#: t_options.h:97 -msgid "Enable S3TC texture compression even if software support is not available" -msgstr "Activar la compresión de texturas S3TC incluso si el soporte por software no está disponible" +#: t_options.h:148 +msgid "" +"Enable S3TC texture compression even if software support is not available" +msgstr "" +"Habilitar la compresión de texturas S3TC incluso si el soporte por software " +"no está disponible" -#: t_options.h:104 +#: t_options.h:155 msgid "Initial color reduction method" msgstr "Método inicial de reducción de color" -#: t_options.h:105 +#: t_options.h:156 msgid "Round colors" msgstr "Colores redondeados" -#: t_options.h:106 +#: t_options.h:157 msgid "Dither colors" msgstr "Colores suavizados" -#: t_options.h:114 +#: t_options.h:165 msgid "Color rounding method" msgstr "Método de redondeo de colores" -#: t_options.h:115 +#: t_options.h:166 msgid "Round color components downward" msgstr "Redondear hacia abajo los componentes de color" -#: t_options.h:116 +#: t_options.h:167 msgid "Round to nearest color" msgstr "Redondear al color más cercano" -#: t_options.h:125 +#: t_options.h:176 msgid "Color dithering method" msgstr "Método de suavizado de color" -#: t_options.h:126 +#: t_options.h:177 msgid "Horizontal error diffusion" msgstr "Difusión de error horizontal" -#: t_options.h:127 +#: t_options.h:178 msgid "Horizontal error diffusion, reset error at line start" msgstr "Difusión de error horizontal, reiniciar error al comienzo de línea" -#: t_options.h:128 +#: t_options.h:179 msgid "Ordered 2D color dithering" msgstr "Suavizado de color 2D ordenado" -#: t_options.h:134 +#: t_options.h:185 msgid "Floating point depth buffer" msgstr "Búfer de profundidad en coma flotante" -#: t_options.h:140 +#: t_options.h:190 +msgid "A post-processing filter to cel-shade the output" +msgstr "Un filtro de postprocesamiento para aplicar cel shading a la salida" + +#: t_options.h:195 +msgid "A post-processing filter to remove the red channel" +msgstr "Un filtro de postprocesamiento para eliminar el canal rojo" + +#: t_options.h:200 +msgid "A post-processing filter to remove the green channel" +msgstr "Un filtro de postprocesamiento para eliminar el canal verde" + +#: t_options.h:205 +msgid "A post-processing filter to remove the blue channel" +msgstr "Un filtro de postprocesamiento para eliminar el canal azul" + +#: t_options.h:210 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality" +msgstr "" +"Antialiasing morfológico basado en el MLAA de Jimenez. 0 para deshabilitar, " +"8 para calidad por defecto" + +#: t_options.h:215 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality. Color version, usable with 2d GL apps" +msgstr "" +"Antialiasing morfológico basado en el MLAA de Jimenez. 0 para deshabilitar, " +"8 para calidad por defecto. Versión en color, usable con aplicaciones GL 2D" + +#: t_options.h:225 msgid "Performance" msgstr "Rendimiento" -#: t_options.h:148 +#: t_options.h:233 msgid "TCL mode (Transformation, Clipping, Lighting)" msgstr "Modo TCL (Transformación, Recorte, Iluminación)" -#: t_options.h:149 +#: t_options.h:234 msgid "Use software TCL pipeline" msgstr "Usar tubería TCL por software" -#: t_options.h:150 +#: t_options.h:235 msgid "Use hardware TCL as first TCL pipeline stage" msgstr "Usar TCL por hardware en la primera fase de la tubería TCL" -#: t_options.h:151 +#: t_options.h:236 msgid "Bypass the TCL pipeline" msgstr "Pasar por alto la tubería TCL" -#: t_options.h:152 -msgid "Bypass the TCL pipeline with state-based machine code generated on-the-fly" -msgstr "Pasar por alto la tubería TCL con código máquina basado en estados generado al vuelo" +#: t_options.h:237 +msgid "" +"Bypass the TCL pipeline with state-based machine code generated on-the-fly" +msgstr "" +"Pasar por alto la tubería TCL con código máquina basado en estados, generado " +"al vuelo" -#: t_options.h:161 +#: t_options.h:246 msgid "Method to limit rendering latency" -msgstr "Método para limitar la latencia de rénder" +msgstr "Método para limitar la latencia de renderización" -#: t_options.h:162 +#: t_options.h:247 msgid "Busy waiting for the graphics hardware" msgstr "Esperar activamente al hardware gráfico" -#: t_options.h:163 +#: t_options.h:248 msgid "Sleep for brief intervals while waiting for the graphics hardware" msgstr "Dormir en intervalos cortos mientras se espera al hardware gráfico" -#: t_options.h:164 +#: t_options.h:249 msgid "Let the graphics hardware emit a software interrupt and sleep" -msgstr "Permitir que el hardware gráfico emita una interrupción de software y duerma" +msgstr "" +"Permitir que el hardware gráfico emita una interrupción de software y duerma" -#: t_options.h:174 +#: t_options.h:259 msgid "Synchronization with vertical refresh (swap intervals)" msgstr "Sincronización con el refresco vertical (intervalos de intercambio)" -#: t_options.h:175 +#: t_options.h:260 msgid "Never synchronize with vertical refresh, ignore application's choice" -msgstr "No sincronizar nunca con el refresco vertical, ignorar la elección de la aplicación" +msgstr "" +"No sincronizar nunca con el refresco vertical, ignorar la elección de la " +"aplicación" -#: t_options.h:176 +#: t_options.h:261 msgid "Initial swap interval 0, obey application's choice" -msgstr "Intervalo de intercambio inicial 0, obedecer la elección de la aplicación" +msgstr "" +"Intervalo de intercambio inicial 0, obedecer la elección de la aplicación" -#: t_options.h:177 +#: t_options.h:262 msgid "Initial swap interval 1, obey application's choice" -msgstr "Intervalo de intercambio inicial 1, obedecer la elección de la aplicación" +msgstr "" +"Intervalo de intercambio inicial 1, obedecer la elección de la aplicación" -#: t_options.h:178 +#: t_options.h:263 msgid "" "Always synchronize with vertical refresh, application chooses the minimum " "swap interval" -msgstr "Sincronizar siempre con el refresco vertical, la aplicación elige el intervalo de intercambio mínimo" +msgstr "" +"Sincronizar siempre con el refresco vertical, la aplicación elige el " +"intervalo de intercambio mínimo" -#: t_options.h:186 +#: t_options.h:271 msgid "Use HyperZ to boost performance" msgstr "Usar HyperZ para potenciar rendimiento" -#: t_options.h:191 +#: t_options.h:276 msgid "Number of texture units used" msgstr "Número de unidades de textura usadas" -#: t_options.h:196 -msgid "Enable hack to allow larger textures with texture compression on radeon/r200" -msgstr "Activar \"hack\" para permitir texturas más grandes con compresión de textura activada en la Radeon/r200" - -#: t_options.h:201 +#: t_options.h:281 msgid "Texture filtering quality vs. speed, AKA “brilinear” texture filtering" -msgstr "Calidad de filtrado de textura vs. velocidad, alias filtrado \"brilinear\" de textura" +msgstr "" +"Calidad de filtrado de textura vs. velocidad, alias filtrado \"brilinear\" " +"de textura" -#: t_options.h:209 +#: t_options.h:289 msgid "Used types of texture memory" msgstr "Tipos de memoria de textura usados" -#: t_options.h:210 +#: t_options.h:290 msgid "All available memory" msgstr "Toda la memoria disponible" -#: t_options.h:211 +#: t_options.h:291 msgid "Only card memory (if available)" -msgstr "Sólo la memoria de la tarjeta (si disponible)" +msgstr "Solo memoria de tarjeta (si está disponible)" -#: t_options.h:212 +#: t_options.h:292 msgid "Only GART (AGP/PCIE) memory (if available)" -msgstr "Sólo memoria GART (AGP/PCIE) (si disponible)" +msgstr "Solo memoria GART (AGP/PCIE) (si está disponible)" -#: t_options.h:220 +#: t_options.h:304 msgid "Features that are not hardware-accelerated" msgstr "Características no aceleradas por hardware" -#: t_options.h:224 +#: t_options.h:308 msgid "Enable extension GL_ARB_vertex_program" -msgstr "Activar la extensión GL_ARB_vertex_program" +msgstr "Habilitar la extensión GL_ARB_vertex_program" + +#: t_options.h:318 +msgid "Miscellaneous" +msgstr "Misceláneo" + +#: t_options.h:322 +msgid "Create all visuals with a depth buffer" +msgstr "Crear todos los visuales con buffer de profundidad" diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/fr.po b/mesalib/src/mesa/drivers/dri/common/xmlpool/fr.po index 7a10969b8..4a747b355 100644 --- a/mesalib/src/mesa/drivers/dri/common/xmlpool/fr.po +++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/fr.po @@ -7,215 +7,292 @@ msgid "" msgstr "" "Project-Id-Version: Mesa 6.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-04-11 23:19+0200\n" +"POT-Creation-Date: 2014-01-13 22:30-0700\n" "PO-Revision-Date: 2005-04-11 01:34+0200\n" "Last-Translator: Stephane Marchesin \n" "Language-Team: French \n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: t_options.h:53 +#: t_options.h:56 msgid "Debugging" msgstr "Debogage" -#: t_options.h:57 +#: t_options.h:60 msgid "Disable 3D acceleration" msgstr "Désactiver l'accélération 3D" -#: t_options.h:62 +#: t_options.h:65 msgid "Show performance boxes" msgstr "Afficher les boîtes de performance" -#: t_options.h:69 +#: t_options.h:70 +msgid "Enable flushing batchbuffer after each draw call" +msgstr "" + +#: t_options.h:75 +msgid "Enable flushing GPU caches with each draw call" +msgstr "" + +#: t_options.h:80 +msgid "Disable throttling on first batch after flush" +msgstr "" + +#: t_options.h:85 +msgid "Force GLSL extension default behavior to 'warn'" +msgstr "" + +#: t_options.h:90 +msgid "Disable dual source blending" +msgstr "" + +#: t_options.h:95 +msgid "Disable backslash-based line continuations in GLSL source" +msgstr "" + +#: t_options.h:100 +msgid "Disable GL_ARB_shader_bit_encoding" +msgstr "" + +#: t_options.h:105 +msgid "" +"Force a default GLSL version for shaders that lack an explicit #version line" +msgstr "" + +#: t_options.h:115 msgid "Image Quality" msgstr "Qualité d'image" -#: t_options.h:77 +#: t_options.h:128 msgid "Texture color depth" msgstr "Profondeur de texture" -#: t_options.h:78 +#: t_options.h:129 msgid "Prefer frame buffer color depth" msgstr "Profondeur de couleur" -#: t_options.h:79 +#: t_options.h:130 msgid "Prefer 32 bits per texel" msgstr "Préférer 32 bits par texel" -#: t_options.h:80 +#: t_options.h:131 msgid "Prefer 16 bits per texel" msgstr "Prérérer 16 bits par texel" -#: t_options.h:81 +#: t_options.h:132 msgid "Force 16 bits per texel" msgstr "Forcer 16 bits par texel" -#: t_options.h:87 +#: t_options.h:138 msgid "Initial maximum value for anisotropic texture filtering" msgstr "Valeur maximale initiale pour le filtrage anisotropique de texture" -#: t_options.h:92 +#: t_options.h:143 msgid "Forbid negative texture LOD bias" msgstr "Interdire le LOD bias negatif" -#: t_options.h:97 +#: t_options.h:148 msgid "" "Enable S3TC texture compression even if software support is not available" msgstr "" "Activer la compression de texture S3TC même si le support logiciel est absent" -#: t_options.h:104 +#: t_options.h:155 msgid "Initial color reduction method" msgstr "Technique de réduction de couleurs" -#: t_options.h:105 +#: t_options.h:156 msgid "Round colors" msgstr "Arrondir les valeurs de couleur" -#: t_options.h:106 +#: t_options.h:157 msgid "Dither colors" msgstr "Tramer les couleurs" -#: t_options.h:114 +#: t_options.h:165 msgid "Color rounding method" msgstr "Méthode d'arrondi des couleurs" -#: t_options.h:115 +#: t_options.h:166 msgid "Round color components downward" msgstr "Arrondi à l'inférieur" -#: t_options.h:116 +#: t_options.h:167 msgid "Round to nearest color" msgstr "Arrondi au plus proche" -#: t_options.h:125 +#: t_options.h:176 msgid "Color dithering method" msgstr "Méthode de tramage" -#: t_options.h:126 +#: t_options.h:177 msgid "Horizontal error diffusion" msgstr "Diffusion d'erreur horizontale" -#: t_options.h:127 +#: t_options.h:178 msgid "Horizontal error diffusion, reset error at line start" msgstr "Diffusion d'erreur horizontale, réinitialisé pour chaque ligne" -#: t_options.h:128 +#: t_options.h:179 msgid "Ordered 2D color dithering" msgstr "Tramage ordonné des couleurs" -#: t_options.h:134 +#: t_options.h:185 msgid "Floating point depth buffer" msgstr "Z-buffer en virgule flottante" -#: t_options.h:140 +#: t_options.h:190 +msgid "A post-processing filter to cel-shade the output" +msgstr "" + +#: t_options.h:195 +msgid "A post-processing filter to remove the red channel" +msgstr "" + +#: t_options.h:200 +msgid "A post-processing filter to remove the green channel" +msgstr "" + +#: t_options.h:205 +msgid "A post-processing filter to remove the blue channel" +msgstr "" + +#: t_options.h:210 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality" +msgstr "" + +#: t_options.h:215 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality. Color version, usable with 2d GL apps" +msgstr "" + +#: t_options.h:225 msgid "Performance" msgstr "Performance" -#: t_options.h:148 +#: t_options.h:233 msgid "TCL mode (Transformation, Clipping, Lighting)" msgstr "Mode de TCL (Transformation, Clipping, Eclairage)" -#: t_options.h:149 +#: t_options.h:234 msgid "Use software TCL pipeline" msgstr "Utiliser un pipeline TCL logiciel" -#: t_options.h:150 +#: t_options.h:235 msgid "Use hardware TCL as first TCL pipeline stage" msgstr "Utiliser le TCL matériel pour le premier niveau de pipeline" -#: t_options.h:151 +#: t_options.h:236 msgid "Bypass the TCL pipeline" msgstr "Court-circuiter le pipeline TCL" -#: t_options.h:152 +#: t_options.h:237 msgid "" "Bypass the TCL pipeline with state-based machine code generated on-the-fly" msgstr "" -"Court-circuiter le pipeline TCL par une machine à états qui génère le code" -"de TCL à la volée" +"Court-circuiter le pipeline TCL par une machine à états qui génère le codede " +"TCL à la volée" -#: t_options.h:161 +#: t_options.h:246 msgid "Method to limit rendering latency" msgstr "Méthode d'attente de la carte graphique" -#: t_options.h:162 +#: t_options.h:247 msgid "Busy waiting for the graphics hardware" msgstr "Attente active de la carte graphique" -#: t_options.h:163 +#: t_options.h:248 msgid "Sleep for brief intervals while waiting for the graphics hardware" msgstr "Attente utilisant usleep()" -#: t_options.h:164 +#: t_options.h:249 msgid "Let the graphics hardware emit a software interrupt and sleep" msgstr "Utiliser les interruptions" -#: t_options.h:174 +#: t_options.h:259 msgid "Synchronization with vertical refresh (swap intervals)" msgstr "Synchronisation de l'affichage avec le balayage vertical" -#: t_options.h:175 +#: t_options.h:260 msgid "Never synchronize with vertical refresh, ignore application's choice" -msgstr "Ne jamais synchroniser avec le balayage vertical, ignorer le choix de l'application" +msgstr "" +"Ne jamais synchroniser avec le balayage vertical, ignorer le choix de " +"l'application" -#: t_options.h:176 +#: t_options.h:261 msgid "Initial swap interval 0, obey application's choice" -msgstr "Ne pas synchroniser avec le balayage vertical par défaut, mais obéir au choix de l'application" +msgstr "" +"Ne pas synchroniser avec le balayage vertical par défaut, mais obéir au " +"choix de l'application" -#: t_options.h:177 +#: t_options.h:262 msgid "Initial swap interval 1, obey application's choice" -msgstr "Synchroniser avec le balayage vertical par défaut, mais obéir au choix de l'application" +msgstr "" +"Synchroniser avec le balayage vertical par défaut, mais obéir au choix de " +"l'application" -#: t_options.h:178 +#: t_options.h:263 msgid "" "Always synchronize with vertical refresh, application chooses the minimum " "swap interval" msgstr "" -"Toujours synchroniser avec le balayage vertical, l'application choisit l'intervalle minimal" +"Toujours synchroniser avec le balayage vertical, l'application choisit " +"l'intervalle minimal" -#: t_options.h:186 +#: t_options.h:271 msgid "Use HyperZ to boost performance" msgstr "Utiliser le HyperZ pour améliorer les performances" -#: t_options.h:191 +#: t_options.h:276 msgid "Number of texture units used" msgstr "Nombre d'unités de texture" -#: t_options.h:196 -msgid "" -"Enable hack to allow larger textures with texture compression on radeon/r200" -msgstr "" -"Activer le hack permettant l'utilisation de textures de grande taille avec la " -"compression de textures sur radeon/r200" - -#: t_options.h:201 +#: t_options.h:281 msgid "Texture filtering quality vs. speed, AKA “brilinear” texture filtering" msgstr "" "Qualité/performance du filtrage trilinéaire de texture (filtrage brilinéaire)" -#: t_options.h:209 +#: t_options.h:289 msgid "Used types of texture memory" msgstr "Types de mémoire de texture" -#: t_options.h:210 +#: t_options.h:290 msgid "All available memory" msgstr "Utiliser toute la mémoire disponible" -#: t_options.h:211 +#: t_options.h:291 msgid "Only card memory (if available)" msgstr "Utiliser uniquement la mémoire graphique (si disponible)" -#: t_options.h:212 +#: t_options.h:292 msgid "Only GART (AGP/PCIE) memory (if available)" msgstr "Utiliser uniquement la mémoire GART (AGP/PCIE) (si disponible)" -#: t_options.h:220 +#: t_options.h:304 msgid "Features that are not hardware-accelerated" msgstr "Fonctionnalités ne bénéficiant pas d'une accélération matérielle" -#: t_options.h:224 +#: t_options.h:308 msgid "Enable extension GL_ARB_vertex_program" msgstr "Activer l'extension GL_ARB_vertex_program" + +#: t_options.h:318 +msgid "Miscellaneous" +msgstr "" + +#: t_options.h:322 +msgid "Create all visuals with a depth buffer" +msgstr "" + +#~ msgid "" +#~ "Enable hack to allow larger textures with texture compression on radeon/" +#~ "r200" +#~ msgstr "" +#~ "Activer le hack permettant l'utilisation de textures de grande taille " +#~ "avec la compression de textures sur radeon/r200" diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/nl.po b/mesalib/src/mesa/drivers/dri/common/xmlpool/nl.po index 64516f606..8dc1f5566 100644 --- a/mesalib/src/mesa/drivers/dri/common/xmlpool/nl.po +++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/nl.po @@ -7,173 +7,237 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-04-12 20:09+0200\n" +"POT-Creation-Date: 2014-01-13 22:30-0700\n" "PO-Revision-Date: 2005-04-12 20:09+0200\n" "Last-Translator: Manfred Stienstra \n" "Language-Team: Dutch \n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: t_options.h:53 +#: t_options.h:56 msgid "Debugging" msgstr "Debuggen" -#: t_options.h:57 +#: t_options.h:60 msgid "Disable 3D acceleration" msgstr "3D versnelling uitschakelen" -#: t_options.h:62 +#: t_options.h:65 msgid "Show performance boxes" msgstr "Laat prestatie boxjes zien" -#: t_options.h:69 +#: t_options.h:70 +msgid "Enable flushing batchbuffer after each draw call" +msgstr "" + +#: t_options.h:75 +msgid "Enable flushing GPU caches with each draw call" +msgstr "" + +#: t_options.h:80 +msgid "Disable throttling on first batch after flush" +msgstr "" + +#: t_options.h:85 +msgid "Force GLSL extension default behavior to 'warn'" +msgstr "" + +#: t_options.h:90 +msgid "Disable dual source blending" +msgstr "" + +#: t_options.h:95 +msgid "Disable backslash-based line continuations in GLSL source" +msgstr "" + +#: t_options.h:100 +msgid "Disable GL_ARB_shader_bit_encoding" +msgstr "" + +#: t_options.h:105 +msgid "" +"Force a default GLSL version for shaders that lack an explicit #version line" +msgstr "" + +#: t_options.h:115 msgid "Image Quality" msgstr "Beeldkwaliteit" -#: t_options.h:77 +#: t_options.h:128 msgid "Texture color depth" msgstr "Textuurkleurendiepte" -#: t_options.h:78 +#: t_options.h:129 msgid "Prefer frame buffer color depth" msgstr "Prefereer kaderbufferkleurdiepte" -#: t_options.h:79 +#: t_options.h:130 msgid "Prefer 32 bits per texel" msgstr "Prefereer 32 bits per texel" -#: t_options.h:80 +#: t_options.h:131 msgid "Prefer 16 bits per texel" msgstr "Prefereer 16 bits per texel" -#: t_options.h:81 +#: t_options.h:132 msgid "Force 16 bits per texel" msgstr "Dwing 16 bits per texel af" -#: t_options.h:87 +#: t_options.h:138 msgid "Initial maximum value for anisotropic texture filtering" msgstr "Initïele maximum waarde voor anisotrophische textuur filtering" -#: t_options.h:92 +#: t_options.h:143 msgid "Forbid negative texture LOD bias" msgstr "Verbied negatief niveau detailonderscheid (LOD) van texturen" -#: t_options.h:97 +#: t_options.h:148 msgid "" "Enable S3TC texture compression even if software support is not available" msgstr "" "Schakel S3TC textuurcompressie in, zelfs als softwareondersteuning niet " "aanwezig is" -#: t_options.h:104 +#: t_options.h:155 msgid "Initial color reduction method" msgstr "Initïele kleurreductie methode" -#: t_options.h:105 +#: t_options.h:156 msgid "Round colors" msgstr "Rond kleuren af" -#: t_options.h:106 +#: t_options.h:157 msgid "Dither colors" msgstr "Rasteriseer kleuren" -#: t_options.h:114 +#: t_options.h:165 msgid "Color rounding method" msgstr "Kleurafrondingmethode" -#: t_options.h:115 +#: t_options.h:166 msgid "Round color components downward" msgstr "Rond kleurencomponenten af naar beneden" -#: t_options.h:116 +#: t_options.h:167 msgid "Round to nearest color" msgstr "Rond af naar dichtsbijzijnde kleur" -#: t_options.h:125 +#: t_options.h:176 msgid "Color dithering method" msgstr "Kleurrasteriseringsmethode" -#: t_options.h:126 +#: t_options.h:177 msgid "Horizontal error diffusion" msgstr "Horizontale foutdiffusie" -#: t_options.h:127 +#: t_options.h:178 msgid "Horizontal error diffusion, reset error at line start" msgstr "Horizontale foutdiffusie, zet fout bij lijnbegin terug" -#: t_options.h:128 +#: t_options.h:179 msgid "Ordered 2D color dithering" msgstr "Geordende 2D kleurrasterisering" -#: t_options.h:134 +#: t_options.h:185 msgid "Floating point depth buffer" msgstr "Dieptebuffer als commagetal" -#: t_options.h:140 +#: t_options.h:190 +msgid "A post-processing filter to cel-shade the output" +msgstr "" + +#: t_options.h:195 +msgid "A post-processing filter to remove the red channel" +msgstr "" + +#: t_options.h:200 +msgid "A post-processing filter to remove the green channel" +msgstr "" + +#: t_options.h:205 +msgid "A post-processing filter to remove the blue channel" +msgstr "" + +#: t_options.h:210 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality" +msgstr "" + +#: t_options.h:215 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality. Color version, usable with 2d GL apps" +msgstr "" + +#: t_options.h:225 msgid "Performance" msgstr "Prestatie" -#: t_options.h:148 +#: t_options.h:233 msgid "TCL mode (Transformation, Clipping, Lighting)" msgstr "TCL-modus (Transformatie, Clipping, Licht)" -#: t_options.h:149 +#: t_options.h:234 msgid "Use software TCL pipeline" msgstr "Gebruik software TCL pijpleiding" -#: t_options.h:150 +#: t_options.h:235 msgid "Use hardware TCL as first TCL pipeline stage" msgstr "Gebruik hardware TCL as eerste TCL pijpleiding trap" -#: t_options.h:151 +#: t_options.h:236 msgid "Bypass the TCL pipeline" msgstr "Omzeil de TCL pijpleiding" -#: t_options.h:152 +#: t_options.h:237 msgid "" "Bypass the TCL pipeline with state-based machine code generated on-the-fly" msgstr "" "Omzeil de TCL pijpleiding met staatgebaseerde machinecode die tijdens " "executie gegenereerd wordt" -#: t_options.h:161 +#: t_options.h:246 msgid "Method to limit rendering latency" msgstr "Methode om beeldopbouwvertraging te onderdrukken" -#: t_options.h:162 +#: t_options.h:247 msgid "Busy waiting for the graphics hardware" msgstr "Actief wachten voor de grafische hardware" -#: t_options.h:163 +#: t_options.h:248 msgid "Sleep for brief intervals while waiting for the graphics hardware" -msgstr "Slaap voor korte intervallen tijdens het wachten op de grafische " -"hardware" +msgstr "" +"Slaap voor korte intervallen tijdens het wachten op de grafische hardware" -#: t_options.h:164 +#: t_options.h:249 msgid "Let the graphics hardware emit a software interrupt and sleep" -msgstr "Laat de grafische hardware een software onderbreking uitzenden en in " -"slaap vallen" +msgstr "" +"Laat de grafische hardware een software onderbreking uitzenden en in slaap " +"vallen" -#: t_options.h:174 +#: t_options.h:259 msgid "Synchronization with vertical refresh (swap intervals)" msgstr "Synchronisatie met verticale verversing (interval omwisselen)" -#: t_options.h:175 +#: t_options.h:260 msgid "Never synchronize with vertical refresh, ignore application's choice" -msgstr "Nooit synchroniseren met verticale verversing, negeer de keuze van de " +msgstr "" +"Nooit synchroniseren met verticale verversing, negeer de keuze van de " "applicatie" -#: t_options.h:176 +#: t_options.h:261 msgid "Initial swap interval 0, obey application's choice" msgstr "Initïeel omwisselingsinterval 0, honoreer de keuze van de applicatie" -#: t_options.h:177 +#: t_options.h:262 msgid "Initial swap interval 1, obey application's choice" msgstr "Initïeel omwisselingsinterval 1, honoreer de keuze van de applicatie" -#: t_options.h:178 +#: t_options.h:263 msgid "" "Always synchronize with vertical refresh, application chooses the minimum " "swap interval" @@ -181,46 +245,55 @@ msgstr "" "Synchroniseer altijd met verticale verversing, de applicatie kiest het " "minimum omwisselingsinterval" -#: t_options.h:186 +#: t_options.h:271 msgid "Use HyperZ to boost performance" msgstr "Gebruik HyperZ om de prestaties te verbeteren" -#: t_options.h:191 +#: t_options.h:276 msgid "Number of texture units used" msgstr "Aantal textuureenheden in gebruik" -#: t_options.h:196 -msgid "" -"Enable hack to allow larger textures with texture compression on radeon/r200" -msgstr "" -"Schakel hack in om met textuurcompressie grotere texturen toe te staan op " -"een radeon/r200" - -#: t_options.h:201 +#: t_options.h:281 msgid "Texture filtering quality vs. speed, AKA “brilinear” texture filtering" -msgstr "Textuurfilterkwaliteit versus -snelheid, ookwel bekend als " -"“brilineaire” textuurfiltering" +msgstr "" +"Textuurfilterkwaliteit versus -snelheid, ookwel bekend als “brilineaire” " +"textuurfiltering" -#: t_options.h:209 +#: t_options.h:289 msgid "Used types of texture memory" msgstr "Gebruikte soorten textuurgeheugen" -#: t_options.h:210 +#: t_options.h:290 msgid "All available memory" msgstr "Al het beschikbaar geheugen" -#: t_options.h:211 +#: t_options.h:291 msgid "Only card memory (if available)" msgstr "Alleen geheugen op de kaart (als het aanwezig is)" -#: t_options.h:212 +#: t_options.h:292 msgid "Only GART (AGP/PCIE) memory (if available)" msgstr "Alleen GART (AGP/PCIE) geheugen (als het aanwezig is)" -#: t_options.h:220 +#: t_options.h:304 msgid "Features that are not hardware-accelerated" msgstr "Eigenschappen die niet hardwareversneld zijn" -#: t_options.h:224 +#: t_options.h:308 msgid "Enable extension GL_ARB_vertex_program" msgstr "Zet uitbreiding GL_ARB_vertex_program aan" + +#: t_options.h:318 +msgid "Miscellaneous" +msgstr "" + +#: t_options.h:322 +msgid "Create all visuals with a depth buffer" +msgstr "" + +#~ msgid "" +#~ "Enable hack to allow larger textures with texture compression on radeon/" +#~ "r200" +#~ msgstr "" +#~ "Schakel hack in om met textuurcompressie grotere texturen toe te staan op " +#~ "een radeon/r200" diff --git a/mesalib/src/mesa/drivers/dri/common/xmlpool/sv.po b/mesalib/src/mesa/drivers/dri/common/xmlpool/sv.po index d1cb56bba..082a22a94 100644 --- a/mesalib/src/mesa/drivers/dri/common/xmlpool/sv.po +++ b/mesalib/src/mesa/drivers/dri/common/xmlpool/sv.po @@ -7,215 +7,291 @@ msgid "" msgstr "" "Project-Id-Version: Mesa DRI\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-04-11 23:19+0200\n" +"POT-Creation-Date: 2014-01-13 22:30-0700\n" "PO-Revision-Date: 2006-09-18 10:56+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" +"Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: t_options.h:53 +#: t_options.h:56 msgid "Debugging" msgstr "Felsökning" -#: t_options.h:57 +#: t_options.h:60 msgid "Disable 3D acceleration" msgstr "Inaktivera 3D-accelerering" -#: t_options.h:62 +#: t_options.h:65 msgid "Show performance boxes" msgstr "Visa prestandarutor" -#: t_options.h:69 +#: t_options.h:70 +msgid "Enable flushing batchbuffer after each draw call" +msgstr "" + +#: t_options.h:75 +msgid "Enable flushing GPU caches with each draw call" +msgstr "" + +#: t_options.h:80 +msgid "Disable throttling on first batch after flush" +msgstr "" + +#: t_options.h:85 +msgid "Force GLSL extension default behavior to 'warn'" +msgstr "" + +#: t_options.h:90 +msgid "Disable dual source blending" +msgstr "" + +#: t_options.h:95 +msgid "Disable backslash-based line continuations in GLSL source" +msgstr "" + +#: t_options.h:100 +msgid "Disable GL_ARB_shader_bit_encoding" +msgstr "" + +#: t_options.h:105 +msgid "" +"Force a default GLSL version for shaders that lack an explicit #version line" +msgstr "" + +#: t_options.h:115 msgid "Image Quality" msgstr "Bildkvalitet" -#: t_options.h:77 +#: t_options.h:128 msgid "Texture color depth" msgstr "Färgdjup för texturer" -#: t_options.h:78 +#: t_options.h:129 msgid "Prefer frame buffer color depth" msgstr "Föredra färgdjupet för framebuffer" -#: t_options.h:79 +#: t_options.h:130 msgid "Prefer 32 bits per texel" msgstr "Föredra 32 bitar per texel" -#: t_options.h:80 +#: t_options.h:131 msgid "Prefer 16 bits per texel" msgstr "Föredra 16 bitar per texel" -#: t_options.h:81 +#: t_options.h:132 msgid "Force 16 bits per texel" msgstr "Tvinga 16 bitar per texel" -#: t_options.h:87 +#: t_options.h:138 msgid "Initial maximum value for anisotropic texture filtering" msgstr "Initialt maximalt värde för anisotropisk texturfiltrering" -#: t_options.h:92 +#: t_options.h:143 msgid "Forbid negative texture LOD bias" msgstr "Förbjud negativ LOD-kompensation för texturer" -#: t_options.h:97 -msgid "Enable S3TC texture compression even if software support is not available" +#: t_options.h:148 +msgid "" +"Enable S3TC texture compression even if software support is not available" msgstr "Aktivera S3TC-texturkomprimering även om programvarustöd saknas" -#: t_options.h:104 +#: t_options.h:155 msgid "Initial color reduction method" msgstr "Initial färgminskningsmetod" -#: t_options.h:105 +#: t_options.h:156 msgid "Round colors" msgstr "Avrunda färger" -#: t_options.h:106 +#: t_options.h:157 msgid "Dither colors" msgstr "Utjämna färger" -#: t_options.h:114 +#: t_options.h:165 msgid "Color rounding method" msgstr "Färgavrundningsmetod" -#: t_options.h:115 +#: t_options.h:166 msgid "Round color components downward" msgstr "Avrunda färdkomponenter nedåt" -#: t_options.h:116 +#: t_options.h:167 msgid "Round to nearest color" msgstr "Avrunda till närmsta färg" -#: t_options.h:125 +#: t_options.h:176 msgid "Color dithering method" msgstr "Färgutjämningsmetod" -#: t_options.h:126 +#: t_options.h:177 msgid "Horizontal error diffusion" msgstr "Horisontell felspridning" -#: t_options.h:127 +#: t_options.h:178 msgid "Horizontal error diffusion, reset error at line start" msgstr "Horisontell felspridning, återställ fel vid radbörjan" -#: t_options.h:128 +#: t_options.h:179 msgid "Ordered 2D color dithering" msgstr "Ordnad 2D-färgutjämning" -#: t_options.h:134 +#: t_options.h:185 msgid "Floating point depth buffer" msgstr "Buffert för flytande punktdjup" -#: t_options.h:140 +#: t_options.h:190 +msgid "A post-processing filter to cel-shade the output" +msgstr "" + +#: t_options.h:195 +msgid "A post-processing filter to remove the red channel" +msgstr "" + +#: t_options.h:200 +msgid "A post-processing filter to remove the green channel" +msgstr "" + +#: t_options.h:205 +msgid "A post-processing filter to remove the blue channel" +msgstr "" + +#: t_options.h:210 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality" +msgstr "" + +#: t_options.h:215 +msgid "" +"Morphological anti-aliasing based on Jimenez\\' MLAA. 0 to disable, 8 for " +"default quality. Color version, usable with 2d GL apps" +msgstr "" + +#: t_options.h:225 msgid "Performance" msgstr "Prestanda" -#: t_options.h:148 +#: t_options.h:233 msgid "TCL mode (Transformation, Clipping, Lighting)" msgstr "TCL-läge (Transformation, Clipping, Lighting)" -#: t_options.h:149 +#: t_options.h:234 msgid "Use software TCL pipeline" msgstr "Använd programvaru-TCL-rörledning" -#: t_options.h:150 +#: t_options.h:235 msgid "Use hardware TCL as first TCL pipeline stage" msgstr "Använd maskinvaru-TCL som första TCL-rörledningssteg" -#: t_options.h:151 +#: t_options.h:236 msgid "Bypass the TCL pipeline" msgstr "Kringgå TCL-rörledningen" -#: t_options.h:152 -msgid "Bypass the TCL pipeline with state-based machine code generated on-the-fly" -msgstr "Kringgå TCL-rörledningen med tillståndsbaserad maskinkod som direktgenereras" +#: t_options.h:237 +msgid "" +"Bypass the TCL pipeline with state-based machine code generated on-the-fly" +msgstr "" +"Kringgå TCL-rörledningen med tillståndsbaserad maskinkod som direktgenereras" -#: t_options.h:161 +#: t_options.h:246 msgid "Method to limit rendering latency" msgstr "Metod för att begränsa renderingslatens" -#: t_options.h:162 +#: t_options.h:247 msgid "Busy waiting for the graphics hardware" msgstr "Upptagen med att vänta på grafikhårdvaran" -#: t_options.h:163 +#: t_options.h:248 msgid "Sleep for brief intervals while waiting for the graphics hardware" msgstr "Sov i korta intervall under väntan på grafikhårdvaran" -#: t_options.h:164 +#: t_options.h:249 msgid "Let the graphics hardware emit a software interrupt and sleep" msgstr "Låt grafikhårdvaran sända ut ett programvaruavbrott och sov" -#: t_options.h:174 +#: t_options.h:259 msgid "Synchronization with vertical refresh (swap intervals)" msgstr "Synkronisering med vertikal uppdatering (växlingsintervall)" -#: t_options.h:175 +#: t_options.h:260 msgid "Never synchronize with vertical refresh, ignore application's choice" msgstr "Synkronisera aldrig med vertikal uppdatering, ignorera programmets val" -#: t_options.h:176 +#: t_options.h:261 msgid "Initial swap interval 0, obey application's choice" msgstr "Initialt växlingsintervall 0, följ programmets val" -#: t_options.h:177 +#: t_options.h:262 msgid "Initial swap interval 1, obey application's choice" msgstr "Initialt växlingsintervall 1, följ programmets val" -#: t_options.h:178 -msgid "Always synchronize with vertical refresh, application chooses the minimum swap interval" -msgstr "Synkronisera alltid med vertikal uppdatering, programmet väljer den minsta växlingsintervallen" +#: t_options.h:263 +msgid "" +"Always synchronize with vertical refresh, application chooses the minimum " +"swap interval" +msgstr "" +"Synkronisera alltid med vertikal uppdatering, programmet väljer den minsta " +"växlingsintervallen" -#: t_options.h:186 +#: t_options.h:271 msgid "Use HyperZ to boost performance" msgstr "Använd HyperZ för att maximera prestandan" -#: t_options.h:191 +#: t_options.h:276 msgid "Number of texture units used" msgstr "Antal använda texturenheter" -#: t_options.h:196 -msgid "Support larger textures not guaranteed to fit into graphics memory" -msgstr "Stöd för större texturer är inte garanterat att passa i grafikminnet" - -#: t_options.h:197 -msgid "No" -msgstr "Nej" - -#: t_options.h:198 -msgid "At least 1 texture must fit under worst-case assumptions" -msgstr "Åtminstone en textur måste passa för antaget sämsta förhållande" - -#: t_options.h:199 -msgid "Announce hardware limits" -msgstr "Annonsera hårdvarubegränsningar" - -#: t_options.h:205 +#: t_options.h:281 msgid "Texture filtering quality vs. speed, AKA “brilinear” texture filtering" -msgstr "Texturfiltreringskvalitet mot hastighet, även kallad \"brilinear\"-texturfiltrering" +msgstr "" +"Texturfiltreringskvalitet mot hastighet, även kallad \"brilinear\"-" +"texturfiltrering" -#: t_options.h:213 +#: t_options.h:289 msgid "Used types of texture memory" msgstr "Använda typer av texturminne" -#: t_options.h:214 +#: t_options.h:290 msgid "All available memory" msgstr "Allt tillgängligt minne" -#: t_options.h:215 +#: t_options.h:291 msgid "Only card memory (if available)" msgstr "Endast kortminne (om tillgängligt)" -#: t_options.h:216 +#: t_options.h:292 msgid "Only GART (AGP/PCIE) memory (if available)" msgstr "Endast GART-minne (AGP/PCIE) (om tillgängligt)" -#: t_options.h:224 +#: t_options.h:304 msgid "Features that are not hardware-accelerated" msgstr "Funktioner som inte är hårdvaruaccelererade" -#: t_options.h:228 +#: t_options.h:308 msgid "Enable extension GL_ARB_vertex_program" msgstr "Aktivera tillägget GL_ARB_vertex_program" + +#: t_options.h:318 +msgid "Miscellaneous" +msgstr "" + +#: t_options.h:322 +msgid "Create all visuals with a depth buffer" +msgstr "" + +#~ msgid "Support larger textures not guaranteed to fit into graphics memory" +#~ msgstr "" +#~ "Stöd för större texturer är inte garanterat att passa i grafikminnet" + +#~ msgid "No" +#~ msgstr "Nej" + +#~ msgid "At least 1 texture must fit under worst-case assumptions" +#~ msgstr "Åtminstone en textur måste passa för antaget sämsta förhållande" + +#~ msgid "Announce hardware limits" +#~ msgstr "Annonsera hårdvarubegränsningar" diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c index 96b178905..694558443 100644 --- a/mesalib/src/mesa/main/api_validate.c +++ b/mesalib/src/mesa/main/api_validate.c @@ -128,7 +128,7 @@ check_valid_to_render(struct gl_context *ctx, const char *function) case API_OPENGL_CORE: { const struct gl_shader_program *vsProg = - ctx->Shader.CurrentVertexProgram; + ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; GLboolean haveVertexShader = (vsProg && vsProg->LinkStatus); GLboolean haveVertexProgram = ctx->VertexProgram._Enabled; if (haveVertexShader || haveVertexProgram) { @@ -269,9 +269,9 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name) * TRIANGLES_ADJACENCY_ARB or TRIANGLE_STRIP_ADJACENCY_ARB. * */ - if (ctx->Shader.CurrentGeometryProgram) { + if (ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]) { const GLenum geom_mode = - ctx->Shader.CurrentGeometryProgram->Geom.InputType; + ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.InputType; switch (mode) { case GL_POINTS: valid_enum = (geom_mode == GL_POINTS); @@ -330,8 +330,8 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name) if (_mesa_is_xfb_active_and_unpaused(ctx)) { GLboolean pass = GL_TRUE; - if(ctx->Shader.CurrentGeometryProgram) { - switch (ctx->Shader.CurrentGeometryProgram->Geom.OutputType) { + if(ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]) { + switch (ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.OutputType) { case GL_POINTS: pass = ctx->TransformFeedback.Mode == GL_POINTS; break; diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c index 30c815d67..7b7cf0ef3 100644 --- a/mesalib/src/mesa/main/attrib.c +++ b/mesalib/src/mesa/main/attrib.c @@ -112,7 +112,7 @@ struct gl_enable_attrib GLboolean PolygonSmooth; GLboolean PolygonStipple; GLboolean RescaleNormals; - GLboolean Scissor; + GLbitfield Scissor; GLboolean Stencil; GLboolean StencilTwoSide; /* GL_EXT_stencil_two_side */ GLboolean MultisampleEnabled; /* GL_ARB_multisample */ @@ -354,7 +354,7 @@ _mesa_PushAttrib(GLbitfield mask) attr->PolygonSmooth = ctx->Polygon.SmoothFlag; attr->PolygonStipple = ctx->Polygon.StippleFlag; attr->RescaleNormals = ctx->Transform.RescaleNormals; - attr->Scissor = ctx->Scissor.Enabled; + attr->Scissor = ctx->Scissor.EnableFlags; attr->Stencil = ctx->Stencil.Enabled; attr->StencilTwoSide = ctx->Stencil.TestTwoSide; attr->MultisampleEnabled = ctx->Multisample.Enabled; @@ -533,8 +533,9 @@ _mesa_PushAttrib(GLbitfield mask) if (mask & GL_VIEWPORT_BIT) { if (!push_attrib(ctx, &head, GL_VIEWPORT_BIT, - sizeof(struct gl_viewport_attrib), - (void*)&ctx->Viewport)) + sizeof(struct gl_viewport_attrib) + * ctx->Const.MaxViewports, + (void*)&ctx->ViewportArray)) goto end; } @@ -658,7 +659,13 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) GL_POLYGON_SMOOTH); TEST_AND_UPDATE(ctx->Polygon.StippleFlag, enable->PolygonStipple, GL_POLYGON_STIPPLE); - TEST_AND_UPDATE(ctx->Scissor.Enabled, enable->Scissor, GL_SCISSOR_TEST); + if (ctx->Scissor.EnableFlags != enable->Scissor) { + unsigned i; + + for (i = 0; i < ctx->Const.MaxViewports; i++) { + _mesa_set_enablei(ctx, GL_SCISSOR_TEST, i, (enable->Scissor >> i) & 1); + } + } TEST_AND_UPDATE(ctx->Stencil.Enabled, enable->Stencil, GL_STENCIL_TEST); if (ctx->Extensions.EXT_stencil_two_side) { TEST_AND_UPDATE(ctx->Stencil.TestTwoSide, enable->StencilTwoSide, GL_STENCIL_TEST_TWO_SIDE_EXT); @@ -1262,11 +1269,19 @@ _mesa_PopAttrib(void) break; case GL_SCISSOR_BIT: { + unsigned i; const struct gl_scissor_attrib *scissor; scissor = (const struct gl_scissor_attrib *) attr->data; - _mesa_Scissor(scissor->X, scissor->Y, - scissor->Width, scissor->Height); - _mesa_set_enable(ctx, GL_SCISSOR_TEST, scissor->Enabled); + + for (i = 0; i < ctx->Const.MaxViewports; i++) { + _mesa_set_scissor(ctx, i, + scissor->ScissorArray[i].X, + scissor->ScissorArray[i].Y, + scissor->ScissorArray[i].Width, + scissor->ScissorArray[i].Height); + _mesa_set_enablei(ctx, GL_SCISSOR_TEST, i, + (scissor->EnableFlags >> i) & 1); + } } break; case GL_STENCIL_BUFFER_BIT: @@ -1342,10 +1357,15 @@ _mesa_PopAttrib(void) break; case GL_VIEWPORT_BIT: { + unsigned i; const struct gl_viewport_attrib *vp; vp = (const struct gl_viewport_attrib *) attr->data; - _mesa_Viewport(vp->X, vp->Y, vp->Width, vp->Height); - _mesa_DepthRange(vp->Near, vp->Far); + + for (i = 0; i < ctx->Const.MaxViewports; i++) { + _mesa_set_viewport(ctx, i, vp[i].X, vp[i].Y, vp[i].Width, + vp[i].Height); + _mesa_set_depth_range(ctx, i, vp[i].Near, vp[i].Far); + } } break; case GL_MULTISAMPLE_BIT_ARB: diff --git a/mesalib/src/mesa/main/config.h b/mesalib/src/mesa/main/config.h index ff9da779b..0c1782ad7 100644 --- a/mesalib/src/mesa/main/config.h +++ b/mesalib/src/mesa/main/config.h @@ -121,7 +121,7 @@ * Max number of texture image units. Also determines number of texture * samplers in shaders. */ -#define MAX_TEXTURE_IMAGE_UNITS 16 +#define MAX_TEXTURE_IMAGE_UNITS 32 /** * Larger of MAX_TEXTURE_COORD_UNITS and MAX_TEXTURE_IMAGE_UNITS. @@ -137,6 +137,9 @@ #define MAX_VIEWPORT_WIDTH 16384 #define MAX_VIEWPORT_HEIGHT 16384 +/** Maximun number of viewports supported with ARB_viewport_array */ +#define MAX_VIEWPORTS 16 + /** Maxmimum size for CVA. May be overridden by the drivers. */ #define MAX_ARRAY_LOCK_SIZE 3000 diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index 0b8fb94e8..b7cd56866 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -587,6 +587,16 @@ _mesa_init_constants(struct gl_context *ctx) ctx->Const.MaxSpotExponent = 128.0; ctx->Const.MaxViewportWidth = MAX_VIEWPORT_WIDTH; ctx->Const.MaxViewportHeight = MAX_VIEWPORT_HEIGHT; + ctx->Const.MinMapBufferAlignment = 1; + + /* Driver must override these values if ARB_viewport_array is supported. */ + ctx->Const.MaxViewports = 1; + ctx->Const.ViewportSubpixelBits = 0; + ctx->Const.ViewportBounds.Min = 0; + ctx->Const.ViewportBounds.Max = 0; + + /* Driver must override if it supports ARB_viewport_array */ + ctx->Const.MaxViewports = 1; /** GL_ARB_uniform_buffer_object */ ctx->Const.MaxCombinedUniformBlocks = 36; @@ -1348,13 +1358,17 @@ _mesa_copy_context( const struct gl_context *src, struct gl_context *dst, } if (mask & GL_VIEWPORT_BIT) { /* Cannot use memcpy, because of pointers in GLmatrix _WindowMap */ - dst->Viewport.X = src->Viewport.X; - dst->Viewport.Y = src->Viewport.Y; - dst->Viewport.Width = src->Viewport.Width; - dst->Viewport.Height = src->Viewport.Height; - dst->Viewport.Near = src->Viewport.Near; - dst->Viewport.Far = src->Viewport.Far; - _math_matrix_copy(&dst->Viewport._WindowMap, &src->Viewport._WindowMap); + unsigned i; + for (i = 0; i < src->Const.MaxViewports; i++) { + dst->ViewportArray[i].X = src->ViewportArray[i].X; + dst->ViewportArray[i].Y = src->ViewportArray[i].Y; + dst->ViewportArray[i].Width = src->ViewportArray[i].Width; + dst->ViewportArray[i].Height = src->ViewportArray[i].Height; + dst->ViewportArray[i].Near = src->ViewportArray[i].Near; + dst->ViewportArray[i].Far = src->ViewportArray[i].Far; + _math_matrix_copy(&dst->ViewportArray[i]._WindowMap, + &src->ViewportArray[i]._WindowMap); + } } /* XXX FIXME: Call callbacks? @@ -1423,12 +1437,20 @@ void _mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height) { if (!ctx->ViewportInitialized && width > 0 && height > 0) { + unsigned i; + /* Note: set flag here, before calling _mesa_set_viewport(), to prevent * potential infinite recursion. */ ctx->ViewportInitialized = GL_TRUE; - _mesa_set_viewport(ctx, 0, 0, width, height); - _mesa_set_scissor(ctx, 0, 0, width, height); + + /* Note: ctx->Const.MaxViewports may not have been set by the driver + * yet, so just initialize all of them. + */ + for (i = 0; i < MAX_VIEWPORTS; i++) { + _mesa_set_viewport(ctx, i, 0, 0, width, height); + _mesa_set_scissor(ctx, i, 0, 0, width, height); + } } } @@ -1744,10 +1766,10 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where) if (ctx->NewState) _mesa_update_state(ctx); - if (ctx->Shader.CurrentVertexProgram) { + if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]) { vert_from_glsl_shader = true; - if (!ctx->Shader.CurrentVertexProgram->LinkStatus) { + if (!ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(shader not linked)", where); return GL_FALSE; @@ -1756,19 +1778,19 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where) { char errMsg[100]; if (!_mesa_validate_shader_program(ctx, - ctx->Shader.CurrentVertexProgram, + ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX], errMsg)) { _mesa_warning(ctx, "Shader program %u is invalid: %s", - ctx->Shader.CurrentVertexProgram->Name, errMsg); + ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->Name, errMsg); } } #endif } - if (ctx->Shader.CurrentGeometryProgram) { + if (ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]) { geom_from_glsl_shader = true; - if (!ctx->Shader.CurrentGeometryProgram->LinkStatus) { + if (!ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(shader not linked)", where); return GL_FALSE; @@ -1777,19 +1799,20 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where) { char errMsg[100]; if (!_mesa_validate_shader_program(ctx, - ctx->Shader.CurrentGeometryProgram, + ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY], errMsg)) { _mesa_warning(ctx, "Shader program %u is invalid: %s", - ctx->Shader.CurrentGeometryProgram->Name, errMsg); + ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->Name, + errMsg); } } #endif } - if (ctx->Shader.CurrentFragmentProgram) { + if (ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]) { frag_from_glsl_shader = true; - if (!ctx->Shader.CurrentFragmentProgram->LinkStatus) { + if (!ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(shader not linked)", where); return GL_FALSE; @@ -1798,10 +1821,11 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where) { char errMsg[100]; if (!_mesa_validate_shader_program(ctx, - ctx->Shader.CurrentFragmentProgram, + ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT], errMsg)) { _mesa_warning(ctx, "Shader program %u is invalid: %s", - ctx->Shader.CurrentFragmentProgram->Name, errMsg); + ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]->Name, + errMsg); } } #endif @@ -1851,13 +1875,9 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where) #ifdef DEBUG if (ctx->Shader.Flags & GLSL_LOG) { - struct gl_shader_program *shProg[MESA_SHADER_STAGES]; + struct gl_shader_program **shProg = ctx->Shader.CurrentProgram; gl_shader_stage i; - shProg[MESA_SHADER_VERTEX] = ctx->Shader.CurrentVertexProgram; - shProg[MESA_SHADER_GEOMETRY] = ctx->Shader.CurrentGeometryProgram; - shProg[MESA_SHADER_FRAGMENT] = ctx->Shader.CurrentFragmentProgram; - for (i = 0; i < MESA_SHADER_STAGES; i++) { if (shProg[i] == NULL || shProg[i]->_Used || shProg[i]->_LinkedShaders[i] == NULL) diff --git a/mesalib/src/mesa/main/dlist.c b/mesalib/src/mesa/main/dlist.c index cb40ff4db..08943c9f9 100644 --- a/mesalib/src/mesa/main/dlist.c +++ b/mesalib/src/mesa/main/dlist.c @@ -767,6 +767,7 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) break; case OPCODE_PIXEL_MAP: free(get_pointer(&n[3])); + n += InstSize[n[0].opcode]; break; case OPCODE_CONTINUE: diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c index fca306890..640db8490 100644 --- a/mesalib/src/mesa/main/enable.c +++ b/mesalib/src/mesa/main/enable.c @@ -659,10 +659,15 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->Transform.RescaleNormals = state; break; case GL_SCISSOR_TEST: - if (ctx->Scissor.Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_SCISSOR); - ctx->Scissor.Enabled = state; + { + /* Must expand glEnable to all scissors */ + GLbitfield newEnabled = + state * ((1 << ctx->Const.MaxViewports) - 1); + if (newEnabled != ctx->Scissor.EnableFlags) { + FLUSH_VERTICES(ctx, _NEW_SCISSOR); + ctx->Scissor.EnableFlags = newEnabled; + } + } break; case GL_STENCIL_TEST: if (ctx->Stencil.Enabled == state) @@ -1076,6 +1081,20 @@ _mesa_set_enablei(struct gl_context *ctx, GLenum cap, ctx->Color.BlendEnabled &= ~(1 << index); } break; + case GL_SCISSOR_TEST: + if (index >= ctx->Const.MaxViewports) { + _mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", + state ? "glEnablei" : "glDisablei", index); + return; + } + if (((ctx->Scissor.EnableFlags >> index) & 1) != state) { + FLUSH_VERTICES(ctx, _NEW_SCISSOR); + if (state) + ctx->Scissor.EnableFlags |= (1 << index); + else + ctx->Scissor.EnableFlags &= ~(1 << index); + } + break; default: goto invalid_enum_error; } @@ -1117,6 +1136,13 @@ _mesa_IsEnabledi( GLenum cap, GLuint index ) return GL_FALSE; } return (ctx->Color.BlendEnabled >> index) & 1; + case GL_SCISSOR_TEST: + if (index >= ctx->Const.MaxViewports) { + _mesa_error(ctx, GL_INVALID_VALUE, "glIsEnabledIndexed(index=%u)", + index); + return GL_FALSE; + } + return (ctx->Scissor.EnableFlags >> index) & 1; default: _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabledIndexed(cap=%s)", _mesa_lookup_enum_by_nr(cap)); @@ -1349,7 +1375,7 @@ _mesa_IsEnabled( GLenum cap ) goto invalid_enum_error; return ctx->Transform.RescaleNormals; case GL_SCISSOR_TEST: - return ctx->Scissor.Enabled; + return ctx->Scissor.EnableFlags & 1; /* return state for index 0 */ case GL_STENCIL_TEST: return ctx->Stencil.Enabled; case GL_TEXTURE_1D: diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c index 2e0ccc3b6..0676f1e3d 100644 --- a/mesalib/src/mesa/main/extensions.c +++ b/mesalib/src/mesa/main/extensions.c @@ -80,6 +80,7 @@ static const struct extension extension_table[] = { /* ARB Extensions */ { "GL_ARB_ES2_compatibility", o(ARB_ES2_compatibility), GL, 2009 }, { "GL_ARB_ES3_compatibility", o(ARB_ES3_compatibility), GL, 2012 }, + { "GL_ARB_arrays_of_arrays", o(ARB_arrays_of_arrays), GL, 2012 }, { "GL_ARB_base_instance", o(ARB_base_instance), GL, 2011 }, { "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL, 2009 }, { "GL_ARB_clear_buffer_object", o(dummy_true), GL, 2012 }, @@ -176,6 +177,7 @@ static const struct extension extension_table[] = { { "GL_ARB_vertex_shader", o(ARB_vertex_shader), GL, 2002 }, { "GL_ARB_vertex_type_10f_11f_11f_rev", o(ARB_vertex_type_10f_11f_11f_rev), GL, 2013 }, { "GL_ARB_vertex_type_2_10_10_10_rev", o(ARB_vertex_type_2_10_10_10_rev), GL, 2009 }, + { "GL_ARB_viewport_array", o(ARB_viewport_array), GLC, 2010 }, { "GL_ARB_window_pos", o(dummy_true), GLL, 2001 }, /* EXT extensions */ { "GL_EXT_abgr", o(dummy_true), GL, 1995 }, diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index dc7184ad4..943f40bd9 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -880,7 +880,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, /* Covers max_layer_count, is_layered, and layer_tex_target */ bool layer_info_valid = false; GLuint max_layer_count = 0, att_layer_count; - bool is_layered; + bool is_layered = false; GLenum layer_tex_target = 0; assert(_mesa_is_user_fbo(fb)); diff --git a/mesalib/src/mesa/main/ff_fragment_shader.cpp b/mesalib/src/mesa/main/ff_fragment_shader.cpp index 8523edf41..cad67aa85 100644 --- a/mesalib/src/mesa/main/ff_fragment_shader.cpp +++ b/mesalib/src/mesa/main/ff_fragment_shader.cpp @@ -317,9 +317,9 @@ static GLbitfield get_fp_input_mask( struct gl_context *ctx ) { /* _NEW_PROGRAM */ const GLboolean vertexShader = - (ctx->Shader.CurrentVertexProgram && - ctx->Shader.CurrentVertexProgram->LinkStatus && - ctx->Shader.CurrentVertexProgram->_LinkedShaders[MESA_SHADER_VERTEX]); + (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] && + ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->LinkStatus && + ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]); const GLboolean vertexProgram = ctx->VertexProgram._Enabled; GLbitfield fp_inputs = 0x0; @@ -383,7 +383,7 @@ static GLbitfield get_fp_input_mask( struct gl_context *ctx ) * validation (see additional comments in state.c). */ if (vertexShader) - vprog = ctx->Shader.CurrentVertexProgram->_LinkedShaders[MESA_SHADER_VERTEX]->Program; + vprog = ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]->Program; else vprog = &ctx->VertexProgram.Current->Base; diff --git a/mesalib/src/mesa/main/ffvertex_prog.c b/mesalib/src/mesa/main/ffvertex_prog.c index aec2b2dbc..4d71c55ee 100644 --- a/mesalib/src/mesa/main/ffvertex_prog.c +++ b/mesalib/src/mesa/main/ffvertex_prog.c @@ -1676,7 +1676,7 @@ _mesa_get_fixed_func_vertex_program(struct gl_context *ctx) return NULL; create_new_program( &key, prog, - ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4, + ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS, ctx->Const.Program[MESA_SHADER_VERTEX].MaxTemps ); #if 0 diff --git a/mesalib/src/mesa/main/formats.c b/mesalib/src/mesa/main/formats.c index 1246c4d92..7bde1f1a8 100644 --- a/mesalib/src/mesa/main/formats.c +++ b/mesalib/src/mesa/main/formats.c @@ -2032,6 +2032,9 @@ _mesa_get_format_color_encoding(gl_format format) case MESA_FORMAT_SRGBA_DXT3: case MESA_FORMAT_SRGBA_DXT5: case MESA_FORMAT_XBGR8888_SRGB: + case MESA_FORMAT_ETC2_SRGB8: + case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC: + case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1: return GL_SRGB; default: return GL_LINEAR; @@ -2077,6 +2080,15 @@ _mesa_get_srgb_format_linear(gl_format format) case MESA_FORMAT_XBGR8888_SRGB: format = MESA_FORMAT_RGBX8888_REV; break; + case MESA_FORMAT_ETC2_SRGB8: + format = MESA_FORMAT_ETC2_RGB8; + break; + case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC: + format = MESA_FORMAT_ETC2_RGBA8_EAC; + break; + case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1: + format = MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1; + break; default: break; } diff --git a/mesalib/src/mesa/main/framebuffer.c b/mesalib/src/mesa/main/framebuffer.c index 2fad45880..bd8f4933f 100644 --- a/mesalib/src/mesa/main/framebuffer.c +++ b/mesalib/src/mesa/main/framebuffer.c @@ -356,6 +356,56 @@ update_framebuffer_size(struct gl_context *ctx, struct gl_framebuffer *fb) } +/** + * Calculate the inclusive bounding box for the scissor of a specific viewport + * + * \param ctx GL context. + * \param buffer Framebuffer to be checked against + * \param idx Index of the desired viewport + * \param bbox Bounding box for the scissored viewport. Stored as xmin, + * xmax, ymin, ymax. + * + * \warning This function assumes that the framebuffer dimensions are up to + * date (e.g., update_framebuffer_size has been recently called on \c buffer). + * + * \sa _mesa_clip_to_region + */ +void +_mesa_scissor_bounding_box(const struct gl_context *ctx, + const struct gl_framebuffer *buffer, + unsigned idx, int *bbox) +{ + bbox[0] = 0; + bbox[2] = 0; + bbox[1] = buffer->Width; + bbox[3] = buffer->Height; + + if (ctx->Scissor.EnableFlags & (1u << idx)) { + if (ctx->Scissor.ScissorArray[idx].X > bbox[0]) { + bbox[0] = ctx->Scissor.ScissorArray[idx].X; + } + if (ctx->Scissor.ScissorArray[idx].Y > bbox[2]) { + bbox[2] = ctx->Scissor.ScissorArray[idx].Y; + } + if (ctx->Scissor.ScissorArray[idx].X + ctx->Scissor.ScissorArray[idx].Width < bbox[1]) { + bbox[1] = ctx->Scissor.ScissorArray[idx].X + ctx->Scissor.ScissorArray[idx].Width; + } + if (ctx->Scissor.ScissorArray[idx].Y + ctx->Scissor.ScissorArray[idx].Height < bbox[3]) { + bbox[3] = ctx->Scissor.ScissorArray[idx].Y + ctx->Scissor.ScissorArray[idx].Height; + } + /* finally, check for empty region */ + if (bbox[0] > bbox[1]) { + bbox[0] = bbox[1]; + } + if (bbox[2] > bbox[3]) { + bbox[2] = bbox[3]; + } + } + + ASSERT(bbox[0] <= bbox[1]); + ASSERT(bbox[2] <= bbox[3]); +} + /** * Update the context's current drawing buffer's Xmin, Xmax, Ymin, Ymax fields. * These values are computed from the buffer's width and height and @@ -366,6 +416,7 @@ void _mesa_update_draw_buffer_bounds(struct gl_context *ctx) { struct gl_framebuffer *buffer = ctx->DrawBuffer; + int bbox[4]; if (!buffer) return; @@ -375,35 +426,12 @@ _mesa_update_draw_buffer_bounds(struct gl_context *ctx) update_framebuffer_size(ctx, buffer); } - buffer->_Xmin = 0; - buffer->_Ymin = 0; - buffer->_Xmax = buffer->Width; - buffer->_Ymax = buffer->Height; - - if (ctx->Scissor.Enabled) { - if (ctx->Scissor.X > buffer->_Xmin) { - buffer->_Xmin = ctx->Scissor.X; - } - if (ctx->Scissor.Y > buffer->_Ymin) { - buffer->_Ymin = ctx->Scissor.Y; - } - if (ctx->Scissor.X + ctx->Scissor.Width < buffer->_Xmax) { - buffer->_Xmax = ctx->Scissor.X + ctx->Scissor.Width; - } - if (ctx->Scissor.Y + ctx->Scissor.Height < buffer->_Ymax) { - buffer->_Ymax = ctx->Scissor.Y + ctx->Scissor.Height; - } - /* finally, check for empty region */ - if (buffer->_Xmin > buffer->_Xmax) { - buffer->_Xmin = buffer->_Xmax; - } - if (buffer->_Ymin > buffer->_Ymax) { - buffer->_Ymin = buffer->_Ymax; - } - } - - ASSERT(buffer->_Xmin <= buffer->_Xmax); - ASSERT(buffer->_Ymin <= buffer->_Ymax); + /* Default to the first scissor as that's always valid */ + _mesa_scissor_bounding_box(ctx, buffer, 0, bbox); + buffer->_Xmin = bbox[0]; + buffer->_Ymin = bbox[2]; + buffer->_Xmax = bbox[1]; + buffer->_Ymax = bbox[3]; } diff --git a/mesalib/src/mesa/main/framebuffer.h b/mesalib/src/mesa/main/framebuffer.h index 264566477..a4274216e 100644 --- a/mesalib/src/mesa/main/framebuffer.h +++ b/mesalib/src/mesa/main/framebuffer.h @@ -71,6 +71,11 @@ _mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb, extern void _mesa_resizebuffers( struct gl_context *ctx ); +extern void +_mesa_scissor_bounding_box(const struct gl_context *ctx, + const struct gl_framebuffer *buffer, + unsigned idx, int *bbox); + extern void _mesa_update_draw_buffer_bounds(struct gl_context *ctx); diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index b13f9a3db..16dce5b65 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -113,6 +113,7 @@ enum value_type { TYPE_FLOATN_3, TYPE_FLOATN_4, TYPE_DOUBLEN, + TYPE_DOUBLEN_2, TYPE_MATRIX, TYPE_MATRIX_T, TYPE_CONST @@ -162,6 +163,7 @@ struct value_desc { union value { GLfloat value_float; GLfloat value_float_4[4]; + GLdouble value_double_2[2]; GLmatrix *value_matrix; GLint value_int; GLint value_int_4[4]; @@ -389,6 +391,7 @@ EXTRA_EXT(ARB_texture_gather); EXTRA_EXT(ARB_shader_atomic_counters); EXTRA_EXT(ARB_draw_indirect); EXTRA_EXT(ARB_shader_image_load_store); +EXTRA_EXT(ARB_viewport_array); static const int extra_ARB_color_buffer_float_or_glcore[] = { @@ -665,10 +668,14 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu break; case GL_SCISSOR_BOX: - v->value_int_4[0] = ctx->Scissor.X; - v->value_int_4[1] = ctx->Scissor.Y; - v->value_int_4[2] = ctx->Scissor.Width; - v->value_int_4[3] = ctx->Scissor.Height; + v->value_int_4[0] = ctx->Scissor.ScissorArray[0].X; + v->value_int_4[1] = ctx->Scissor.ScissorArray[0].Y; + v->value_int_4[2] = ctx->Scissor.ScissorArray[0].Width; + v->value_int_4[3] = ctx->Scissor.ScissorArray[0].Height; + break; + + case GL_SCISSOR_TEST: + v->value_bool = ctx->Scissor.EnableFlags & 1; break; case GL_LIST_INDEX: @@ -685,10 +692,15 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu break; case GL_VIEWPORT: - v->value_int_4[0] = ctx->Viewport.X; - v->value_int_4[1] = ctx->Viewport.Y; - v->value_int_4[2] = ctx->Viewport.Width; - v->value_int_4[3] = ctx->Viewport.Height; + v->value_float_4[0] = ctx->ViewportArray[0].X; + v->value_float_4[1] = ctx->ViewportArray[0].Y; + v->value_float_4[2] = ctx->ViewportArray[0].Width; + v->value_float_4[3] = ctx->ViewportArray[0].Height; + break; + + case GL_DEPTH_RANGE: + v->value_double_2[0] = ctx->ViewportArray[0].Near; + v->value_double_2[1] = ctx->ViewportArray[0].Far; break; case GL_ACTIVE_STENCIL_FACE_EXT: @@ -1235,6 +1247,8 @@ _mesa_GetBooleanv(GLenum pname, GLboolean *params) params[0] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[0]); break; + case TYPE_DOUBLEN_2: + params[1] = FLOAT_TO_BOOLEAN(((GLdouble *) p)[1]); case TYPE_DOUBLEN: params[0] = FLOAT_TO_BOOLEAN(((GLdouble *) p)[0]); break; @@ -1321,6 +1335,8 @@ _mesa_GetFloatv(GLenum pname, GLfloat *params) params[0] = ((GLfloat *) p)[0]; break; + case TYPE_DOUBLEN_2: + params[1] = (GLfloat) (((GLdouble *) p)[1]); case TYPE_DOUBLEN: params[0] = (GLfloat) (((GLdouble *) p)[0]); break; @@ -1413,6 +1429,8 @@ _mesa_GetIntegerv(GLenum pname, GLint *params) params[0] = FLOAT_TO_INT(((GLfloat *) p)[0]); break; + case TYPE_DOUBLEN_2: + params[1] = FLOAT_TO_INT(((GLdouble *) p)[1]); case TYPE_DOUBLEN: params[0] = FLOAT_TO_INT(((GLdouble *) p)[0]); break; @@ -1505,6 +1523,8 @@ _mesa_GetInteger64v(GLenum pname, GLint64 *params) params[0] = FLOAT_TO_INT64(((GLfloat *) p)[0]); break; + case TYPE_DOUBLEN_2: + params[1] = FLOAT_TO_INT64(((GLdouble *) p)[1]); case TYPE_DOUBLEN: params[0] = FLOAT_TO_INT64(((GLdouble *) p)[0]); break; @@ -1591,6 +1611,8 @@ _mesa_GetDoublev(GLenum pname, GLdouble *params) params[0] = ((GLfloat *) p)[0]; break; + case TYPE_DOUBLEN_2: + params[1] = ((GLdouble *) p)[1]; case TYPE_DOUBLEN: params[0] = ((GLdouble *) p)[0]; break; @@ -1719,6 +1741,31 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v) v->value_int_4[3] = ctx->Color.ColorMask[index][ACOMP] ? 1 : 0; return TYPE_INT_4; + case GL_SCISSOR_BOX: + if (index >= ctx->Const.MaxViewports) + goto invalid_value; + v->value_int_4[0] = ctx->Scissor.ScissorArray[index].X; + v->value_int_4[1] = ctx->Scissor.ScissorArray[index].Y; + v->value_int_4[2] = ctx->Scissor.ScissorArray[index].Width; + v->value_int_4[3] = ctx->Scissor.ScissorArray[index].Height; + return TYPE_INT_4; + + case GL_VIEWPORT: + if (index >= ctx->Const.MaxViewports) + goto invalid_value; + v->value_float_4[0] = ctx->ViewportArray[index].X; + v->value_float_4[1] = ctx->ViewportArray[index].Y; + v->value_float_4[2] = ctx->ViewportArray[index].Width; + v->value_float_4[3] = ctx->ViewportArray[index].Height; + return TYPE_FLOAT_4; + + case GL_DEPTH_RANGE: + if (index >= ctx->Const.MaxViewports) + goto invalid_value; + v->value_double_2[0] = ctx->ViewportArray[index].Near; + v->value_double_2[1] = ctx->ViewportArray[index].Far; + return TYPE_DOUBLEN_2; + case GL_TRANSFORM_FEEDBACK_BUFFER_START: if (index >= ctx->Const.MaxTransformFeedbackBuffers) goto invalid_value; @@ -1927,6 +1974,26 @@ _mesa_GetIntegeri_v( GLenum pname, GLuint index, GLint *params ) find_value_indexed("glGetIntegeri_v", pname, index, &v); switch (type) { + case TYPE_FLOAT_4: + case TYPE_FLOATN_4: + params[3] = IROUND(v.value_float_4[3]); + case TYPE_FLOAT_3: + case TYPE_FLOATN_3: + params[2] = IROUND(v.value_float_4[2]); + case TYPE_FLOAT_2: + case TYPE_FLOATN_2: + params[1] = IROUND(v.value_float_4[1]); + case TYPE_FLOAT: + case TYPE_FLOATN: + params[0] = IROUND(v.value_float_4[0]); + break; + + case TYPE_DOUBLEN_2: + params[1] = IROUND(v.value_double_2[1]); + case TYPE_DOUBLEN: + params[0] = IROUND(v.value_double_2[0]); + break; + case TYPE_INT: params[0] = v.value_int; break; @@ -1969,6 +2036,150 @@ _mesa_GetInteger64i_v( GLenum pname, GLuint index, GLint64 *params ) } } +void GLAPIENTRY +_mesa_GetFloati_v(GLenum pname, GLuint index, GLfloat *params) +{ + int i; + GLmatrix *m; + union value v; + enum value_type type = + find_value_indexed("glGetFloati_v", pname, index, &v); + + switch (type) { + case TYPE_FLOAT_4: + case TYPE_FLOATN_4: + params[3] = v.value_float_4[3]; + case TYPE_FLOAT_3: + case TYPE_FLOATN_3: + params[2] = v.value_float_4[2]; + case TYPE_FLOAT_2: + case TYPE_FLOATN_2: + params[1] = v.value_float_4[1]; + case TYPE_FLOAT: + case TYPE_FLOATN: + params[0] = v.value_float_4[0]; + break; + + case TYPE_DOUBLEN_2: + params[1] = (GLfloat) v.value_double_2[1]; + case TYPE_DOUBLEN: + params[0] = (GLfloat) v.value_double_2[0]; + break; + + case TYPE_INT_4: + params[3] = (GLfloat) v.value_int_4[3]; + case TYPE_INT_3: + params[2] = (GLfloat) v.value_int_4[2]; + case TYPE_INT_2: + case TYPE_ENUM_2: + params[1] = (GLfloat) v.value_int_4[1]; + case TYPE_INT: + case TYPE_ENUM: + params[0] = (GLfloat) v.value_int_4[0]; + break; + + case TYPE_INT_N: + for (i = 0; i < v.value_int_n.n; i++) + params[i] = INT_TO_FLOAT(v.value_int_n.ints[i]); + break; + + case TYPE_INT64: + params[0] = (GLfloat) v.value_int64; + break; + + case TYPE_BOOLEAN: + params[0] = BOOLEAN_TO_FLOAT(v.value_bool); + break; + + case TYPE_MATRIX: + m = *(GLmatrix **) &v; + for (i = 0; i < 16; i++) + params[i] = m->m[i]; + break; + + case TYPE_MATRIX_T: + m = *(GLmatrix **) &v; + for (i = 0; i < 16; i++) + params[i] = m->m[transpose[i]]; + break; + + default: + ; + } +} + +void GLAPIENTRY +_mesa_GetDoublei_v(GLenum pname, GLuint index, GLdouble *params) +{ + int i; + GLmatrix *m; + union value v; + enum value_type type = + find_value_indexed("glGetDoublei_v", pname, index, &v); + + switch (type) { + case TYPE_FLOAT_4: + case TYPE_FLOATN_4: + params[3] = (GLdouble) v.value_float_4[3]; + case TYPE_FLOAT_3: + case TYPE_FLOATN_3: + params[2] = (GLdouble) v.value_float_4[2]; + case TYPE_FLOAT_2: + case TYPE_FLOATN_2: + params[1] = (GLdouble) v.value_float_4[1]; + case TYPE_FLOAT: + case TYPE_FLOATN: + params[0] = (GLdouble) v.value_float_4[0]; + break; + + case TYPE_DOUBLEN_2: + params[1] = v.value_double_2[1]; + case TYPE_DOUBLEN: + params[0] = v.value_double_2[0]; + break; + + case TYPE_INT_4: + params[3] = (GLdouble) v.value_int_4[3]; + case TYPE_INT_3: + params[2] = (GLdouble) v.value_int_4[2]; + case TYPE_INT_2: + case TYPE_ENUM_2: + params[1] = (GLdouble) v.value_int_4[1]; + case TYPE_INT: + case TYPE_ENUM: + params[0] = (GLdouble) v.value_int_4[0]; + break; + + case TYPE_INT_N: + for (i = 0; i < v.value_int_n.n; i++) + params[i] = (GLdouble) INT_TO_FLOAT(v.value_int_n.ints[i]); + break; + + case TYPE_INT64: + params[0] = (GLdouble) v.value_int64; + break; + + case TYPE_BOOLEAN: + params[0] = (GLdouble) BOOLEAN_TO_FLOAT(v.value_bool); + break; + + case TYPE_MATRIX: + m = *(GLmatrix **) &v; + for (i = 0; i < 16; i++) + params[i] = (GLdouble) m->m[i]; + break; + + case TYPE_MATRIX_T: + m = *(GLmatrix **) &v; + for (i = 0; i < 16; i++) + params[i] = (GLdouble) m->m[transpose[i]]; + break; + + default: + ; + } +} + void GLAPIENTRY _mesa_GetFixedv(GLenum pname, GLfixed *params) { @@ -2000,6 +2211,8 @@ _mesa_GetFixedv(GLenum pname, GLfixed *params) params[0] = FLOAT_TO_FIXED(((GLfloat *) p)[0]); break; + case TYPE_DOUBLEN_2: + params[1] = FLOAT_TO_FIXED(((GLdouble *) p)[1]); case TYPE_DOUBLEN: params[0] = FLOAT_TO_FIXED(((GLdouble *) p)[0]); break; diff --git a/mesalib/src/mesa/main/get.h b/mesalib/src/mesa/main/get.h index 0f72508a7..ce97cc586 100644 --- a/mesalib/src/mesa/main/get.h +++ b/mesalib/src/mesa/main/get.h @@ -65,6 +65,12 @@ _mesa_GetInteger64i_v( GLenum pname, GLuint index, GLint64 *params ); extern void GLAPIENTRY _mesa_GetPointerv( GLenum pname, GLvoid **params ); +extern void GLAPIENTRY +_mesa_GetFloati_v(GLenum target, GLuint index, GLfloat *data); + +extern void GLAPIENTRY +_mesa_GetDoublei_v(GLenum target, GLuint index, GLdouble *data); + extern const GLubyte * GLAPIENTRY _mesa_GetString( GLenum name ); diff --git a/mesalib/src/mesa/main/get_hash_params.py b/mesalib/src/mesa/main/get_hash_params.py index bc2bbafa8..b45e1430b 100644 --- a/mesalib/src/mesa/main/get_hash_params.py +++ b/mesalib/src/mesa/main/get_hash_params.py @@ -11,7 +11,7 @@ descriptor=[ [ "DEPTH_BITS", "BUFFER_INT(Visual.depthBits), extra_new_buffers" ], [ "DEPTH_CLEAR_VALUE", "CONTEXT_FIELD(Depth.Clear, TYPE_DOUBLEN), NO_EXTRA" ], [ "DEPTH_FUNC", "CONTEXT_ENUM(Depth.Func), NO_EXTRA" ], - [ "DEPTH_RANGE", "CONTEXT_FIELD(Viewport.Near, TYPE_FLOATN_2), NO_EXTRA" ], + [ "DEPTH_RANGE", "LOC_CUSTOM, TYPE_DOUBLEN_2, 0, NO_EXTRA" ], [ "DEPTH_TEST", "CONTEXT_BOOL(Depth.Test), NO_EXTRA" ], [ "DEPTH_WRITEMASK", "CONTEXT_BOOL(Depth.Mask), NO_EXTRA" ], [ "DITHER", "CONTEXT_BOOL(Color.DitherFlag), NO_EXTRA" ], @@ -30,7 +30,7 @@ descriptor=[ [ "POLYGON_OFFSET_FILL", "CONTEXT_BOOL(Polygon.OffsetFill), NO_EXTRA" ], [ "RED_BITS", "BUFFER_INT(Visual.redBits), extra_new_buffers" ], [ "SCISSOR_BOX", "LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA" ], - [ "SCISSOR_TEST", "CONTEXT_BOOL(Scissor.Enabled), NO_EXTRA" ], + [ "SCISSOR_TEST", "LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA" ], [ "STENCIL_BITS", "BUFFER_INT(Visual.stencilBits), extra_new_buffers" ], [ "STENCIL_CLEAR_VALUE", "CONTEXT_INT(Stencil.Clear), NO_EXTRA" ], [ "STENCIL_FAIL", "LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA" ], @@ -44,7 +44,7 @@ descriptor=[ [ "SUBPIXEL_BITS", "CONTEXT_INT(Const.SubPixelBits), NO_EXTRA" ], [ "TEXTURE_BINDING_2D", "LOC_CUSTOM, TYPE_INT, TEXTURE_2D_INDEX, NO_EXTRA" ], [ "UNPACK_ALIGNMENT", "CONTEXT_INT(Unpack.Alignment), NO_EXTRA" ], - [ "VIEWPORT", "LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA" ], + [ "VIEWPORT", "LOC_CUSTOM, TYPE_FLOAT_4, 0, NO_EXTRA" ], # GL_ARB_multitexture [ "ACTIVE_TEXTURE", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ], @@ -759,6 +759,13 @@ descriptor=[ [ "TEXTURE_BUFFER_OFFSET_ALIGNMENT", "CONTEXT_INT(Const.TextureBufferOffsetAlignment), extra_ARB_texture_buffer_range" ], # GL_ARB_draw_indirect [ "DRAW_INDIRECT_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_draw_indirect" ], + +# GL_ARB_viewport_array + [ "MAX_VIEWPORTS", "CONTEXT_INT(Const.MaxViewports), extra_ARB_viewport_array" ], + [ "VIEWPORT_SUBPIXEL_BITS", "CONTEXT_INT(Const.ViewportSubpixelBits), extra_ARB_viewport_array" ], + [ "VIEWPORT_BOUNDS_RANGE", "CONTEXT_FLOAT2(Const.ViewportBounds), extra_ARB_viewport_array" ], + [ "LAYER_PROVOKING_VERTEX", "CONTEXT_ENUM(Light.ProvokingVertex), extra_ARB_viewport_array" ], + [ "VIEWPORT_INDEX_PROVOKING_VERTEX", "CONTEXT_ENUM(Light.ProvokingVertex), extra_ARB_viewport_array" ], ]} ] diff --git a/mesalib/src/mesa/main/glformats.c b/mesalib/src/mesa/main/glformats.c index bec7a9bbb..7d4a31057 100644 --- a/mesalib/src/mesa/main/glformats.c +++ b/mesalib/src/mesa/main/glformats.c @@ -1136,76 +1136,60 @@ GLenum _mesa_get_nongeneric_internalformat(GLenum format) { switch (format) { - /* GL 1.1 formats. */ - case 4: - case GL_RGBA: - return GL_RGBA8; - - case 3: - case GL_RGB: - return GL_RGB8; - - case 2: - case GL_LUMINANCE_ALPHA: - return GL_LUMINANCE8_ALPHA8; - - case 1: - case GL_LUMINANCE: - return GL_LUMINANCE8; - - case GL_ALPHA: - return GL_ALPHA8; - - case GL_INTENSITY: - return GL_INTENSITY8; - - /* GL_ARB_texture_rg */ - case GL_RED: - return GL_R8; - - case GL_RG: - return GL_RG8; - - /* GL_EXT_texture_sRGB */ - case GL_SRGB: - return GL_SRGB8; - - case GL_SRGB_ALPHA: - return GL_SRGB8_ALPHA8; - - case GL_SLUMINANCE: - return GL_SLUMINANCE8; - - case GL_SLUMINANCE_ALPHA: - return GL_SLUMINANCE8_ALPHA8; - - /* GL_EXT_texture_snorm */ - case GL_RGBA_SNORM: - return GL_RGBA8_SNORM; - - case GL_RGB_SNORM: - return GL_RGB8_SNORM; - - case GL_RG_SNORM: - return GL_RG8_SNORM; - - case GL_RED_SNORM: - return GL_R8_SNORM; - - case GL_LUMINANCE_ALPHA_SNORM: - return GL_LUMINANCE8_ALPHA8_SNORM; - - case GL_LUMINANCE_SNORM: - return GL_LUMINANCE8_SNORM; + /* GL 1.1 formats. */ + case 4: + case GL_RGBA: + return GL_RGBA8; + case 3: + case GL_RGB: + return GL_RGB8; + case 2: + case GL_LUMINANCE_ALPHA: + return GL_LUMINANCE8_ALPHA8; + case 1: + case GL_LUMINANCE: + return GL_LUMINANCE8; + case GL_ALPHA: + return GL_ALPHA8; + case GL_INTENSITY: + return GL_INTENSITY8; - case GL_ALPHA_SNORM: - return GL_ALPHA8_SNORM; + /* GL_ARB_texture_rg */ + case GL_RED: + return GL_R8; + case GL_RG: + return GL_RG8; - case GL_INTENSITY_SNORM: - return GL_INTENSITY8_SNORM; + /* GL_EXT_texture_sRGB */ + case GL_SRGB: + return GL_SRGB8; + case GL_SRGB_ALPHA: + return GL_SRGB8_ALPHA8; + case GL_SLUMINANCE: + return GL_SLUMINANCE8; + case GL_SLUMINANCE_ALPHA: + return GL_SLUMINANCE8_ALPHA8; + + /* GL_EXT_texture_snorm */ + case GL_RGBA_SNORM: + return GL_RGBA8_SNORM; + case GL_RGB_SNORM: + return GL_RGB8_SNORM; + case GL_RG_SNORM: + return GL_RG8_SNORM; + case GL_RED_SNORM: + return GL_R8_SNORM; + case GL_LUMINANCE_ALPHA_SNORM: + return GL_LUMINANCE8_ALPHA8_SNORM; + case GL_LUMINANCE_SNORM: + return GL_LUMINANCE8_SNORM; + case GL_ALPHA_SNORM: + return GL_ALPHA8_SNORM; + case GL_INTENSITY_SNORM: + return GL_INTENSITY8_SNORM; - default: - return format; + default: + return format; } } @@ -1219,22 +1203,20 @@ _mesa_get_linear_internalformat(GLenum format) switch (format) { case GL_SRGB: return GL_RGB; - case GL_SRGB_ALPHA: return GL_RGBA; - case GL_SRGB8: return GL_RGB8; - case GL_SRGB8_ALPHA8: return GL_RGBA8; - - case GL_SLUMINANCE: + case GL_SLUMINANCE8: return GL_LUMINANCE8; - + case GL_SLUMINANCE: + return GL_LUMINANCE; case GL_SLUMINANCE_ALPHA: + return GL_LUMINANCE_ALPHA; + case GL_SLUMINANCE8_ALPHA8: return GL_LUMINANCE8_ALPHA8; - default: return format; } diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h index 379f75663..dafeaa372 100644 --- a/mesalib/src/mesa/main/macros.h +++ b/mesalib/src/mesa/main/macros.h @@ -809,5 +809,7 @@ DIFFERENT_SIGNS(GLfloat x, GLfloat y) /* Compute the size of an array */ #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) +/* Stringify */ +#define STRINGIFY(x) #x #endif diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index 33df682cf..9ab2de026 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -235,6 +235,7 @@ typedef enum VARYING_SLOT_CLIP_DIST1, VARYING_SLOT_PRIMITIVE_ID, /* Does not appear in VS */ VARYING_SLOT_LAYER, /* Appears as VS or GS output */ + VARYING_SLOT_VIEWPORT, /* Appears as VS or GS output */ VARYING_SLOT_FACE, /* FS only */ VARYING_SLOT_PNTC, /* FS only */ VARYING_SLOT_VAR0, /* First generic varying slot */ @@ -270,6 +271,7 @@ typedef enum #define VARYING_BIT_CLIP_DIST1 BITFIELD64_BIT(VARYING_SLOT_CLIP_DIST1) #define VARYING_BIT_PRIMITIVE_ID BITFIELD64_BIT(VARYING_SLOT_PRIMITIVE_ID) #define VARYING_BIT_LAYER BITFIELD64_BIT(VARYING_SLOT_LAYER) +#define VARYING_BIT_VIEWPORT BITFIELD64_BIT(VARYING_SLOT_VIEWPORT) #define VARYING_BIT_FACE BITFIELD64_BIT(VARYING_SLOT_FACE) #define VARYING_BIT_PNTC BITFIELD64_BIT(VARYING_SLOT_PNTC) #define VARYING_BIT_VAR(V) BITFIELD64_BIT(VARYING_SLOT_VAR0 + (V)) @@ -1009,12 +1011,16 @@ struct gl_polygon_attrib /** * Scissor attributes (GL_SCISSOR_BIT). */ -struct gl_scissor_attrib +struct gl_scissor_rect { - GLboolean Enabled; /**< Scissor test enabled? */ GLint X, Y; /**< Lower left corner of box */ GLsizei Width, Height; /**< Size of box */ }; +struct gl_scissor_attrib +{ + GLbitfield EnableFlags; /**< Scissor test enabled? */ + struct gl_scissor_rect ScissorArray[MAX_VIEWPORTS]; +}; /** @@ -1428,9 +1434,9 @@ struct gl_transform_attrib */ struct gl_viewport_attrib { - GLint X, Y; /**< position */ - GLsizei Width, Height; /**< size */ - GLfloat Near, Far; /**< Depth buffer range */ + GLfloat X, Y; /**< position */ + GLfloat Width, Height; /**< size */ + GLdouble Near, Far; /**< Depth buffer range */ GLmatrix _WindowMap; /**< Mapping transformation as a matrix. */ }; @@ -1809,7 +1815,9 @@ struct gl_transform_feedback_object /** * The shader program active when BeginTransformFeedback() was called. - * When active and unpaused, this equals ctx->Shader.CurrentVertexProgram. + * When active and unpaused, this equals ctx->Shader.CurrentProgram[stage], + * where stage is the pipeline stage that is the source of data for + * transform feedback. */ struct gl_shader_program *shader_program; @@ -2708,9 +2716,7 @@ struct gl_shader_state * GL_EXT_separate_shader_objects is not supported, each of these must point * to \c NULL or to the same program. */ - struct gl_shader_program *CurrentVertexProgram; - struct gl_shader_program *CurrentGeometryProgram; - struct gl_shader_program *CurrentFragmentProgram; + struct gl_shader_program *CurrentProgram[MESA_SHADER_STAGES]; struct gl_shader_program *_CurrentFragmentProgram; @@ -2754,10 +2760,13 @@ struct gl_shader_compiler_options GLuint MaxUnrollIterations; /** - * Prefer DP4 instructions (rather than MUL/MAD) for matrix * vector - * operations, such as position transformation. + * Optimize code for array of structures backends. + * + * This is a proxy for: + * - preferring DP4 instructions (rather than MUL/MAD) for + * matrix * vector operations, such as position transformation. */ - GLboolean PreferDP4; + GLboolean OptimizeForAOS; struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */ }; @@ -3166,6 +3175,12 @@ struct gl_constants GLfloat MaxSpotExponent; /**< GL_NV_light_max_exponent */ GLuint MaxViewportWidth, MaxViewportHeight; + GLuint MaxViewports; /**< GL_ARB_viewport_array */ + GLuint ViewportSubpixelBits; /**< GL_ARB_viewport_array */ + struct { + GLfloat Min; + GLfloat Max; + } ViewportBounds; /**< GL_ARB_viewport_array */ struct gl_program_constants Program[MESA_SHADER_STAGES]; GLuint MaxProgramMatrices; @@ -3366,6 +3381,7 @@ struct gl_extensions GLboolean ANGLE_texture_compression_dxt; GLboolean ARB_ES2_compatibility; GLboolean ARB_ES3_compatibility; + GLboolean ARB_arrays_of_arrays; GLboolean ARB_base_instance; GLboolean ARB_blend_func_extended; GLboolean ARB_color_buffer_float; @@ -3434,6 +3450,7 @@ struct gl_extensions GLboolean ARB_vertex_shader; GLboolean ARB_vertex_type_10f_11f_11f_rev; GLboolean ARB_vertex_type_2_10_10_10_rev; + GLboolean ARB_viewport_array; GLboolean EXT_blend_color; GLboolean EXT_blend_equation_separate; GLboolean EXT_blend_func_separate; @@ -3764,6 +3781,9 @@ struct gl_driver_flags /** gl_context::TransformFeedback::CurrentObject */ GLbitfield NewTransformFeedback; + /** gl_context::TransformFeedback::CurrentObject::shader_program */ + GLbitfield NewTransformFeedbackProg; + /** gl_context::RasterDiscard */ GLbitfield NewRasterizerDiscard; @@ -3972,7 +3992,7 @@ struct gl_context struct gl_stencil_attrib Stencil; /**< Stencil buffer attributes */ struct gl_texture_attrib Texture; /**< Texture attributes */ struct gl_transform_attrib Transform; /**< Transformation attributes */ - struct gl_viewport_attrib Viewport; /**< Viewport attributes */ + struct gl_viewport_attrib ViewportArray[MAX_VIEWPORTS]; /**< Viewport attributes */ /*@}*/ /** \name Client attribute stack */ diff --git a/mesalib/src/mesa/main/rastpos.c b/mesalib/src/mesa/main/rastpos.c index 1acdb8b53..a9a6ceec0 100644 --- a/mesalib/src/mesa/main/rastpos.c +++ b/mesalib/src/mesa/main/rastpos.c @@ -227,8 +227,9 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z) FLUSH_VERTICES(ctx, 0); FLUSH_CURRENT(ctx, 0); - z2 = CLAMP(z, 0.0F, 1.0F) * (ctx->Viewport.Far - ctx->Viewport.Near) - + ctx->Viewport.Near; + z2 = CLAMP(z, 0.0F, 1.0F) + * (ctx->ViewportArray[0].Far - ctx->ViewportArray[0].Near) + + ctx->ViewportArray[0].Near; /* set raster position */ ctx->Current.RasterPos[0] = x; diff --git a/mesalib/src/mesa/main/scissor.c b/mesalib/src/mesa/main/scissor.c index ac86bd591..14c8e8a6c 100644 --- a/mesalib/src/mesa/main/scissor.c +++ b/mesalib/src/mesa/main/scissor.c @@ -29,12 +29,38 @@ #include "main/scissor.h" +/** + * Set scissor rectangle data directly in ScissorArray + * + * This is an internal function that performs no error checking on the + * supplied data. It also does \b not call \c dd_function_table::Scissor. + * + * \sa _mesa_set_scissor + */ +static void +set_scissor_no_notify(struct gl_context *ctx, unsigned idx, + GLint x, GLint y, GLsizei width, GLsizei height) +{ + if (x == ctx->Scissor.ScissorArray[idx].X && + y == ctx->Scissor.ScissorArray[idx].Y && + width == ctx->Scissor.ScissorArray[idx].Width && + height == ctx->Scissor.ScissorArray[idx].Height) + return; + + FLUSH_VERTICES(ctx, _NEW_SCISSOR); + ctx->Scissor.ScissorArray[idx].X = x; + ctx->Scissor.ScissorArray[idx].Y = y; + ctx->Scissor.ScissorArray[idx].Width = width; + ctx->Scissor.ScissorArray[idx].Height = height; +} + /** * Called via glScissor */ void GLAPIENTRY _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) { + unsigned i; GET_CURRENT_CONTEXT(ctx); if (MESA_VERBOSE & VERBOSE_API) @@ -45,7 +71,23 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) return; } - _mesa_set_scissor(ctx, x, y, width, height); + /* The GL_ARB_viewport_array spec says: + * + * "Scissor sets the scissor rectangle for all viewports to the same + * values and is equivalent (assuming no errors are generated) to: + * + * for (uint i = 0; i < MAX_VIEWPORTS; i++) { + * ScissorIndexed(i, left, bottom, width, height); + * }" + * + * Set the scissor rectangle for all of the viewports supported by the + * implementation, but only signal the driver once at the end. + */ + for (i = 0; i < ctx->Const.MaxViewports; i++) + set_scissor_no_notify(ctx, i, x, y, width, height); + + if (ctx->Driver.Scissor) + ctx->Driver.Scissor(ctx); } @@ -63,25 +105,108 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) * the dd_function_table::Scissor callback. */ void -_mesa_set_scissor(struct gl_context *ctx, +_mesa_set_scissor(struct gl_context *ctx, unsigned idx, GLint x, GLint y, GLsizei width, GLsizei height) { - if (x == ctx->Scissor.X && - y == ctx->Scissor.Y && - width == ctx->Scissor.Width && - height == ctx->Scissor.Height) + set_scissor_no_notify(ctx, idx, x, y, width, height); + + if (ctx->Driver.Scissor) + ctx->Driver.Scissor(ctx); +} + +/** + * Define count scissor boxes starting at index. + * + * \param index index of first scissor records to set + * \param count number of scissor records to set + * \param x, y pointer to array of struct gl_scissor_rects + * + * \sa glScissorArrayv(). + * + * Verifies the parameters and call set_scissor_no_notify to do the work. + */ +void GLAPIENTRY +_mesa_ScissorArrayv(GLuint first, GLsizei count, const GLint *v) +{ + int i; + struct gl_scissor_rect *p = (struct gl_scissor_rect *) v; + GET_CURRENT_CONTEXT(ctx); + + if ((first + count) > ctx->Const.MaxViewports) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glScissorArrayv: first (%d) + count (%d) >= MaxViewports (%d)", + first, count, ctx->Const.MaxViewports); return; + } - FLUSH_VERTICES(ctx, _NEW_SCISSOR); - ctx->Scissor.X = x; - ctx->Scissor.Y = y; - ctx->Scissor.Width = width; - ctx->Scissor.Height = height; + /* Verify width & height */ + for (i = 0; i < count; i++) { + if (p[i].Width < 0 || p[i].Height < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glScissorArrayv: index (%d) width or height < 0 (%d, %d)", + i, p[i].Width, p[i].Height); + } + } + + for (i = 0; i < count; i++) + set_scissor_no_notify(ctx, i + first, + p[i].X, p[i].Y, p[i].Width, p[i].Height); if (ctx->Driver.Scissor) ctx->Driver.Scissor(ctx); } +/** + * Define the scissor box. + * + * \param index index of scissor records to set + * \param x, y coordinates of the scissor box lower-left corner. + * \param width width of the scissor box. + * \param height height of the scissor box. + * + * Verifies the parameters call set_scissor_no_notify to do the work. + */ +static void +ScissorIndexed(GLuint index, GLint left, GLint bottom, + GLsizei width, GLsizei height, const char *function) +{ + GET_CURRENT_CONTEXT(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "%s(%d, %d, %d, %d, %d)\n", + function, index, left, bottom, width, height); + + if (index >= ctx->Const.MaxViewports) { + _mesa_error(ctx, GL_INVALID_VALUE, + "%s: index (%d) >= MaxViewports (%d)", + function, index, ctx->Const.MaxViewports); + return; + } + + if (width < 0 || height < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "%s: index (%d) width or height < 0 (%d, %d)", + function, index, width, height); + } + + set_scissor_no_notify(ctx, index, left, bottom, width, height); + + if (ctx->Driver.Scissor) + ctx->Driver.Scissor(ctx); +} + +void GLAPIENTRY +_mesa_ScissorIndexed(GLuint index, GLint left, GLint bottom, + GLsizei width, GLsizei height) +{ + ScissorIndexed(index, left, bottom, width, height, "glScissorIndexd"); +} + +void GLAPIENTRY +_mesa_ScissorIndexedv(GLuint index, const GLint *v) +{ + ScissorIndexed(index, v[0], v[1], v[2], v[3], "glScissorIndexdv"); +} /** * Initialize the context's scissor state. @@ -90,10 +215,14 @@ _mesa_set_scissor(struct gl_context *ctx, void _mesa_init_scissor(struct gl_context *ctx) { + unsigned i; + /* Scissor group */ - ctx->Scissor.Enabled = GL_FALSE; - ctx->Scissor.X = 0; - ctx->Scissor.Y = 0; - ctx->Scissor.Width = 0; - ctx->Scissor.Height = 0; + ctx->Scissor.EnableFlags = 0; + + /* Note: ctx->Const.MaxViewports may not have been set by the driver yet, + * so just initialize all of them. + */ + for (i = 0; i < MAX_VIEWPORTS; i++) + set_scissor_no_notify(ctx, i, 0, 0, 0, 0); } diff --git a/mesalib/src/mesa/main/scissor.h b/mesalib/src/mesa/main/scissor.h index 0d7e2010a..5f9a9945a 100644 --- a/mesalib/src/mesa/main/scissor.h +++ b/mesalib/src/mesa/main/scissor.h @@ -34,9 +34,17 @@ struct gl_context; extern void GLAPIENTRY _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ); +extern void GLAPIENTRY +_mesa_ScissorArrayv(GLuint first, GLsizei count, const GLint * v); + +extern void GLAPIENTRY +_mesa_ScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); + +extern void GLAPIENTRY +_mesa_ScissorIndexedv(GLuint index, const GLint * v); extern void -_mesa_set_scissor(struct gl_context *ctx, +_mesa_set_scissor(struct gl_context *ctx, unsigned idx, GLint x, GLint y, GLsizei width, GLsizei height); diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c index 6042fa896..61ac0e35a 100644 --- a/mesalib/src/mesa/main/shaderapi.c +++ b/mesalib/src/mesa/main/shaderapi.c @@ -130,11 +130,11 @@ _mesa_init_shader_state(struct gl_context *ctx) void _mesa_free_shader_state(struct gl_context *ctx) { - _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentVertexProgram, NULL); - _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentGeometryProgram, - NULL); - _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentFragmentProgram, - NULL); + int i; + for (i = 0; i < MESA_SHADER_STAGES; i++) { + _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentProgram[i], + NULL); + } _mesa_reference_shader_program(ctx, &ctx->Shader._CurrentFragmentProgram, NULL); _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, NULL); @@ -171,16 +171,23 @@ _mesa_copy_string(GLchar *dst, GLsizei maxLength, * \param type Shader target * */ -static bool -validate_shader_target(const struct gl_context *ctx, GLenum type) -{ +bool +_mesa_validate_shader_target(const struct gl_context *ctx, GLenum type) +{ + /* Note: when building built-in GLSL functions, this function may be + * invoked with ctx == NULL. In that case, we can only validate that it's + * a shader target we recognize, not that it's supported in the current + * context. But that's fine--we don't need any further validation than + * that when building built-in GLSL functions. + */ + switch (type) { case GL_FRAGMENT_SHADER: - return ctx->Extensions.ARB_fragment_shader; + return ctx == NULL || ctx->Extensions.ARB_fragment_shader; case GL_VERTEX_SHADER: - return ctx->Extensions.ARB_vertex_shader; + return ctx == NULL || ctx->Extensions.ARB_vertex_shader; case GL_GEOMETRY_SHADER_ARB: - return _mesa_has_geometry_shaders(ctx); + return ctx == NULL || _mesa_has_geometry_shaders(ctx); default: return false; } @@ -273,7 +280,7 @@ create_shader(struct gl_context *ctx, GLenum type) struct gl_shader *sh; GLuint name; - if (!validate_shader_target(ctx, type)) { + if (!_mesa_validate_shader_target(ctx, type)) { _mesa_error(ctx, GL_INVALID_ENUM, "CreateShader(type)"); return 0; } @@ -939,32 +946,11 @@ use_shader_program(struct gl_context *ctx, GLenum type, struct gl_shader_program *shProg) { struct gl_shader_program **target; + gl_shader_stage stage = _mesa_shader_enum_to_shader_stage(type); - switch (type) { - case GL_VERTEX_SHADER: - target = &ctx->Shader.CurrentVertexProgram; - if ((shProg == NULL) - || (shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL)) { - shProg = NULL; - } - break; - case GL_GEOMETRY_SHADER_ARB: - target = &ctx->Shader.CurrentGeometryProgram; - if ((shProg == NULL) - || (shProg->_LinkedShaders[MESA_SHADER_GEOMETRY] == NULL)) { - shProg = NULL; - } - break; - case GL_FRAGMENT_SHADER: - target = &ctx->Shader.CurrentFragmentProgram; - if ((shProg == NULL) - || (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)) { - shProg = NULL; - } - break; - default: - return; - } + target = &ctx->Shader.CurrentProgram[stage]; + if ((shProg == NULL) || (shProg->_LinkedShaders[stage] == NULL)) + shProg = NULL; if (*target != shProg) { FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS); @@ -1739,7 +1725,7 @@ _mesa_UseShaderProgramEXT(GLenum type, GLuint program) GET_CURRENT_CONTEXT(ctx); struct gl_shader_program *shProg = NULL; - if (!validate_shader_target(ctx, type)) { + if (!_mesa_validate_shader_target(ctx, type)) { _mesa_error(ctx, GL_INVALID_ENUM, "glUseShaderProgramEXT(type)"); return; } diff --git a/mesalib/src/mesa/main/shaderapi.h b/mesalib/src/mesa/main/shaderapi.h index 4822e32c2..10f810caf 100644 --- a/mesalib/src/mesa/main/shaderapi.h +++ b/mesalib/src/mesa/main/shaderapi.h @@ -215,6 +215,9 @@ _mesa_copy_linked_program_data(gl_shader_stage type, const struct gl_shader_program *src, struct gl_program *dst); +extern bool +_mesa_validate_shader_target(const struct gl_context *ctx, GLenum type); + #ifdef __cplusplus } diff --git a/mesalib/src/mesa/main/shaderobj.c b/mesalib/src/mesa/main/shaderobj.c index dc81bbc77..4f4bb69a8 100644 --- a/mesalib/src/mesa/main/shaderobj.c +++ b/mesalib/src/mesa/main/shaderobj.c @@ -34,6 +34,7 @@ #include "main/context.h" #include "main/hash.h" #include "main/mtypes.h" +#include "main/shaderapi.h" #include "main/shaderobj.h" #include "main/uniforms.h" #include "program/program.h" @@ -105,8 +106,7 @@ struct gl_shader * _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type) { struct gl_shader *shader; - assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER || - type == GL_GEOMETRY_SHADER_ARB); + assert(_mesa_validate_shader_target(ctx, type)); shader = rzalloc(NULL, struct gl_shader); if (shader) { shader->Type = type; diff --git a/mesalib/src/mesa/main/shared.c b/mesalib/src/mesa/main/shared.c index 2f73cf3ca..c11c7f9e9 100644 --- a/mesalib/src/mesa/main/shared.c +++ b/mesalib/src/mesa/main/shared.c @@ -38,6 +38,7 @@ #include "dlist.h" #include "samplerobj.h" #include "set.h" +#include "shaderapi.h" #include "shaderobj.h" #include "syncobj.h" @@ -218,8 +219,7 @@ delete_shader_cb(GLuint id, void *data, void *userData) { struct gl_context *ctx = (struct gl_context *) userData; struct gl_shader *sh = (struct gl_shader *) data; - if (sh->Type == GL_FRAGMENT_SHADER || sh->Type == GL_VERTEX_SHADER || - sh->Type == GL_GEOMETRY_SHADER) { + if (_mesa_validate_shader_target(ctx, sh->Type)) { ctx->Driver.DeleteShader(ctx, sh); } else { diff --git a/mesalib/src/mesa/main/state.c b/mesalib/src/mesa/main/state.c index 33070b7e0..bdebbc141 100644 --- a/mesalib/src/mesa/main/state.c +++ b/mesalib/src/mesa/main/state.c @@ -94,9 +94,12 @@ update_program_enables(struct gl_context *ctx) static GLbitfield update_program(struct gl_context *ctx) { - const struct gl_shader_program *vsProg = ctx->Shader.CurrentVertexProgram; - const struct gl_shader_program *gsProg = ctx->Shader.CurrentGeometryProgram; - struct gl_shader_program *fsProg = ctx->Shader.CurrentFragmentProgram; + const struct gl_shader_program *vsProg = + ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; + const struct gl_shader_program *gsProg = + ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]; + struct gl_shader_program *fsProg = + ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]; const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current; const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current; const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current; @@ -269,6 +272,7 @@ static void update_viewport_matrix(struct gl_context *ctx) { const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF; + unsigned i; ASSERT(depthMax > 0); @@ -276,11 +280,13 @@ update_viewport_matrix(struct gl_context *ctx) * and should be maintained elsewhere if at all. * NOTE: RasterPos uses this. */ - _math_matrix_viewport(&ctx->Viewport._WindowMap, - ctx->Viewport.X, ctx->Viewport.Y, - ctx->Viewport.Width, ctx->Viewport.Height, - ctx->Viewport.Near, ctx->Viewport.Far, - depthMax); + for (i = 0; i < ctx->Const.MaxViewports; i++) { + _math_matrix_viewport(&ctx->ViewportArray[i]._WindowMap, + ctx->ViewportArray[i].X, ctx->ViewportArray[i].Y, + ctx->ViewportArray[i].Width, ctx->ViewportArray[i].Height, + ctx->ViewportArray[i].Near, ctx->ViewportArray[i].Far, + depthMax); + } } @@ -304,7 +310,7 @@ update_multisample(struct gl_context *ctx) static void update_twoside(struct gl_context *ctx) { - if (ctx->Shader.CurrentVertexProgram || + if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] || ctx->VertexProgram._Enabled) { ctx->VertexProgram._TwoSideEnabled = ctx->VertexProgram.TwoSideEnabled; } else { diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c index 3c64c4376..5d516c55f 100644 --- a/mesalib/src/mesa/main/texobj.c +++ b/mesalib/src/mesa/main/texobj.c @@ -1104,10 +1104,10 @@ unbind_texobj_from_texunits(struct gl_context *ctx, * and unbind it if that's the case. */ static void -unbind_texobj_from_imgunits(struct gl_context *ctx, - struct gl_texture_object *texObj) +unbind_texobj_from_image_units(struct gl_context *ctx, + struct gl_texture_object *texObj) { - int i; + GLuint i; for (i = 0; i < ctx->Const.MaxImageUnits; i++) { struct gl_image_unit *unit = &ctx->ImageUnits[i]; @@ -1169,7 +1169,7 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures) * image unit. If so, unbind it. * See section 3.9.X of GL_ARB_shader_image_load_store. */ - unbind_texobj_from_imgunits(ctx, delObj); + unbind_texobj_from_image_units(ctx, delObj); _mesa_unlock_texture(ctx, delObj); diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c index 7720965a8..08725f601 100644 --- a/mesalib/src/mesa/main/texstate.c +++ b/mesalib/src/mesa/main/texstate.c @@ -527,27 +527,20 @@ static void update_texture_state( struct gl_context *ctx ) { GLuint unit; - struct gl_program *fprog = NULL; - struct gl_program *vprog = NULL; - struct gl_program *gprog = NULL; + struct gl_program *prog[MESA_SHADER_STAGES]; GLbitfield enabledFragUnits = 0x0; - - if (ctx->Shader.CurrentVertexProgram && - ctx->Shader.CurrentVertexProgram->LinkStatus) { - vprog = ctx->Shader.CurrentVertexProgram->_LinkedShaders[MESA_SHADER_VERTEX]->Program; - } - - if (ctx->Shader.CurrentGeometryProgram && - ctx->Shader.CurrentGeometryProgram->LinkStatus) { - gprog = ctx->Shader.CurrentGeometryProgram->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program; - } - - if (ctx->Shader.CurrentFragmentProgram && - ctx->Shader.CurrentFragmentProgram->LinkStatus) { - fprog = ctx->Shader.CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program; - } - else if (ctx->FragmentProgram._Enabled) { - fprog = &ctx->FragmentProgram.Current->Base; + int i; + + for (i = 0; i < MESA_SHADER_STAGES; i++) { + if (ctx->Shader.CurrentProgram[i] && + ctx->Shader.CurrentProgram[i]->LinkStatus) { + prog[i] = ctx->Shader.CurrentProgram[i]->_LinkedShaders[i]->Program; + } else { + if (i == MESA_SHADER_FRAGMENT && ctx->FragmentProgram._Enabled) + prog[i] = &ctx->FragmentProgram.Current->Base; + else + prog[i] = NULL; + } } /* TODO: only set this if there are actual changes */ @@ -563,9 +556,7 @@ update_texture_state( struct gl_context *ctx ) */ for (unit = 0; unit < ctx->Const.MaxCombinedTextureImageUnits; unit++) { struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - GLbitfield enabledVertTargets = 0x0; - GLbitfield enabledFragTargets = 0x0; - GLbitfield enabledGeomTargets = 0x0; + GLbitfield enabledTargetsByStage[MESA_SHADER_STAGES]; GLbitfield enabledTargets = 0x0; GLuint texIndex; @@ -575,25 +566,16 @@ update_texture_state( struct gl_context *ctx ) * by a fragment program/program. When multiple flags are set, we'll * settle on the one with highest priority (see below). */ - if (vprog) { - enabledVertTargets |= vprog->TexturesUsed[unit]; + for (i = 0; i < MESA_SHADER_STAGES; i++) { + if (prog[i]) + enabledTargetsByStage[i] = prog[i]->TexturesUsed[unit]; + else if (i == MESA_SHADER_FRAGMENT) + enabledTargetsByStage[i] = texUnit->Enabled; + else + enabledTargetsByStage[i] = 0; + enabledTargets |= enabledTargetsByStage[i]; } - if (gprog) { - enabledGeomTargets |= gprog->TexturesUsed[unit]; - } - - if (fprog) { - enabledFragTargets |= fprog->TexturesUsed[unit]; - } - else { - /* fixed-function fragment program */ - enabledFragTargets |= texUnit->Enabled; - } - - enabledTargets = enabledVertTargets | enabledFragTargets | - enabledGeomTargets; - texUnit->_ReallyEnabled = 0x0; if (enabledTargets == 0x0) { @@ -625,7 +607,7 @@ update_texture_state( struct gl_context *ctx ) } if (!texUnit->_ReallyEnabled) { - if (fprog) { + if (prog[MESA_SHADER_FRAGMENT]) { /* If we get here it means the shader is expecting a texture * object, but there isn't one (or it's incomplete). Use the * fallback texture. @@ -655,25 +637,26 @@ update_texture_state( struct gl_context *ctx ) ctx->Texture._EnabledUnits |= (1 << unit); - if (enabledFragTargets) + if (enabledTargetsByStage[MESA_SHADER_FRAGMENT]) enabledFragUnits |= (1 << unit); - if (!fprog) + if (!prog[MESA_SHADER_FRAGMENT]) update_tex_combine(ctx, texUnit); } /* Determine which texture coordinate sets are actually needed */ - if (fprog) { + if (prog[MESA_SHADER_FRAGMENT]) { const GLuint coordMask = (1 << MAX_TEXTURE_COORD_UNITS) - 1; ctx->Texture._EnabledCoordUnits - = (fprog->InputsRead >> VARYING_SLOT_TEX0) & coordMask; + = (prog[MESA_SHADER_FRAGMENT]->InputsRead >> VARYING_SLOT_TEX0) & + coordMask; } else { ctx->Texture._EnabledCoordUnits = enabledFragUnits; } - if (!fprog || !vprog) + if (!prog[MESA_SHADER_FRAGMENT] || !prog[MESA_SHADER_VERTEX]) update_texgen(ctx); _mesa_validate_image_units(ctx); diff --git a/mesalib/src/mesa/main/texstorage.c b/mesalib/src/mesa/main/texstorage.c index 5062fdb4f..22208572f 100644 --- a/mesalib/src/mesa/main/texstorage.c +++ b/mesalib/src/mesa/main/texstorage.c @@ -244,6 +244,10 @@ _mesa_alloc_texture_storage(struct gl_context *ctx, int face; int level; + (void) width; + (void) height; + (void) depth; + for (face = 0; face < numFaces; face++) { for (level = 0; level < levels; level++) { struct gl_texture_image *const texImage = texObj->Image[face][level]; @@ -460,7 +464,16 @@ _mesa_TextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { - /* no-op */ + GET_CURRENT_CONTEXT(ctx); + + (void) texture; + (void) target; + (void) levels; + (void) internalformat; + (void) width; + + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureStorage1DEXT not supported"); } @@ -469,7 +482,17 @@ _mesa_TextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - /* no-op */ + GET_CURRENT_CONTEXT(ctx); + + (void) texture; + (void) target; + (void) levels; + (void) internalformat; + (void) width; + (void) height; + + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureStorage2DEXT not supported"); } @@ -479,5 +502,16 @@ _mesa_TextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { - /* no-op */ + GET_CURRENT_CONTEXT(ctx); + + (void) texture; + (void) target; + (void) levels; + (void) internalformat; + (void) width; + (void) height; + (void) depth; + + _mesa_error(ctx, GL_INVALID_OPERATION, + "glTextureStorage3DEXT not supported"); } diff --git a/mesalib/src/mesa/main/transformfeedback.c b/mesalib/src/mesa/main/transformfeedback.c index 76d213b16..6b9565ca3 100644 --- a/mesalib/src/mesa/main/transformfeedback.c +++ b/mesalib/src/mesa/main/transformfeedback.c @@ -24,7 +24,7 @@ /* - * Vertex transform feedback support. + * Transform feedback support. * * Authors: * Brian Paul @@ -376,24 +376,48 @@ _mesa_compute_max_transform_feedback_vertices( **/ +/** + * Figure out which stage of the pipeline is the source of transform feedback + * data given the current context state, and return its gl_shader_program. + * + * If no active program can generate transform feedback data (i.e. no vertex + * shader is active), returns NULL. + */ +static struct gl_shader_program * +get_xfb_source(struct gl_context *ctx) +{ + int i; + for (i = MESA_SHADER_GEOMETRY; i >= MESA_SHADER_VERTEX; i--) { + if (ctx->Shader.CurrentProgram[i] != NULL) + return ctx->Shader.CurrentProgram[i]; + } + return NULL; +} + + void GLAPIENTRY _mesa_BeginTransformFeedback(GLenum mode) { struct gl_transform_feedback_object *obj; - struct gl_transform_feedback_info *info; + struct gl_transform_feedback_info *info = NULL; + struct gl_shader_program *source; GLuint i; unsigned vertices_per_prim; GET_CURRENT_CONTEXT(ctx); obj = ctx->TransformFeedback.CurrentObject; - if (ctx->Shader.CurrentVertexProgram == NULL) { + /* Figure out what pipeline stage is the source of data for transform + * feedback. + */ + source = get_xfb_source(ctx); + if (source == NULL) { _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginTransformFeedback(no program active)"); return; } - info = &ctx->Shader.CurrentVertexProgram->LinkedTransformFeedback; + info = &source->LinkedTransformFeedback; if (info->NumOutputs == 0) { _mesa_error(ctx, GL_INVALID_OPERATION, @@ -451,7 +475,10 @@ _mesa_BeginTransformFeedback(GLenum mode) obj->GlesRemainingPrims = max_vertices / vertices_per_prim; } - obj->shader_program = ctx->Shader.CurrentVertexProgram; + if (obj->shader_program != source) { + ctx->NewDriverState |= ctx->DriverFlags.NewTransformFeedbackProg; + obj->shader_program = source; + } assert(ctx->Driver.BeginTransformFeedback); ctx->Driver.BeginTransformFeedback(ctx, mode, obj); @@ -518,7 +545,7 @@ bind_buffer_range(struct gl_context *ctx, GLuint index, /** - * Specify a buffer object to receive vertex shader results. Plus, + * Specify a buffer object to receive transform feedback results. Plus, * specify the starting offset to place the results, and max size. * Called from the glBindBufferRange() function. */ @@ -562,7 +589,7 @@ _mesa_bind_buffer_range_transform_feedback(struct gl_context *ctx, /** - * Specify a buffer object to receive vertex shader results. + * Specify a buffer object to receive transform feedback results. * As above, but start at offset = 0. * Called from the glBindBufferBase() function. */ @@ -591,7 +618,7 @@ _mesa_bind_buffer_base_transform_feedback(struct gl_context *ctx, /** - * Specify a buffer object to receive vertex shader results, plus the + * Specify a buffer object to receive transform feedback results, plus the * offset in the buffer to start placing results. * This function is part of GL_EXT_transform_feedback, but not GL3. */ @@ -646,7 +673,7 @@ _mesa_BindBufferOffsetEXT(GLenum target, GLuint index, GLuint buffer, /** - * This function specifies the vertex shader outputs to be written + * This function specifies the transform feedback outputs to be written * to the feedback buffer(s), and in what order. */ void GLAPIENTRY @@ -756,7 +783,7 @@ _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count, /** - * Get info about the vertex shader's outputs which are to be written + * Get info about the transform feedback outputs which are to be written * to the feedback buffer(s). */ void GLAPIENTRY @@ -993,9 +1020,9 @@ _mesa_ResumeTransformFeedback(void) * the program object being used by the current transform feedback object * is not active." */ - if (obj->shader_program != ctx->Shader.CurrentVertexProgram) { + if (obj->shader_program != get_xfb_source(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glResumeTransformFeedback(wrong vertex program bound)"); + "glResumeTransformFeedback(wrong program bound)"); return; } diff --git a/mesalib/src/mesa/main/viewport.c b/mesalib/src/mesa/main/viewport.c index 3aaab2d46..6545bf68a 100644 --- a/mesalib/src/mesa/main/viewport.c +++ b/mesalib/src/mesa/main/viewport.c @@ -34,6 +34,60 @@ #include "mtypes.h" #include "viewport.h" +static void +set_viewport_no_notify(struct gl_context *ctx, unsigned idx, + GLfloat x, GLfloat y, + GLfloat width, GLfloat height) +{ + /* clamp width and height to the implementation dependent range */ + width = MIN2(width, (GLfloat) ctx->Const.MaxViewportWidth); + height = MIN2(height, (GLfloat) ctx->Const.MaxViewportHeight); + + /* The GL_ARB_viewport_array spec says: + * + * "The location of the viewport's bottom-left corner, given by (x,y), + * are clamped to be within the implementation-dependent viewport + * bounds range. The viewport bounds range [min, max] tuple may be + * determined by calling GetFloatv with the symbolic constant + * VIEWPORT_BOUNDS_RANGE (see section 6.1)." + */ + if (ctx->Extensions.ARB_viewport_array) { + x = CLAMP(x, + ctx->Const.ViewportBounds.Min, ctx->Const.ViewportBounds.Max); + y = CLAMP(y, + ctx->Const.ViewportBounds.Min, ctx->Const.ViewportBounds.Max); + } + + ctx->ViewportArray[idx].X = x; + ctx->ViewportArray[idx].Width = width; + ctx->ViewportArray[idx].Y = y; + ctx->ViewportArray[idx].Height = height; + ctx->NewState |= _NEW_VIEWPORT; + +#if 1 + /* XXX remove this someday. Currently the DRI drivers rely on + * the WindowMap matrix being up to date in the driver's Viewport + * and DepthRange functions. + */ + _math_matrix_viewport(&ctx->ViewportArray[idx]._WindowMap, + ctx->ViewportArray[idx].X, + ctx->ViewportArray[idx].Y, + ctx->ViewportArray[idx].Width, + ctx->ViewportArray[idx].Height, + ctx->ViewportArray[idx].Near, + ctx->ViewportArray[idx].Far, + ctx->DrawBuffer->_DepthMaxF); +#endif +} + +struct gl_viewport_inputs { + GLfloat X, Y; /**< position */ + GLfloat Width, Height; /**< size */ +}; + +struct gl_depthrange_inputs { + GLdouble Near, Far; /**< Depth buffer range */ +}; /** * Set the viewport. @@ -45,9 +99,39 @@ void GLAPIENTRY _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height) { + unsigned i; GET_CURRENT_CONTEXT(ctx); FLUSH_VERTICES(ctx, 0); - _mesa_set_viewport(ctx, x, y, width, height); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glViewport %d %d %d %d\n", x, y, width, height); + + if (width < 0 || height < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glViewport(%d, %d, %d, %d)", x, y, width, height); + return; + } + + /* The GL_ARB_viewport_array spec says: + * + * "Viewport sets the parameters for all viewports to the same values + * and is equivalent (assuming no errors are generated) to: + * + * for (uint i = 0; i < MAX_VIEWPORTS; i++) + * ViewportIndexedf(i, 1, (float)x, (float)y, (float)w, (float)h);" + * + * Set all of the viewports supported by the implementation, but only + * signal the driver once at the end. + */ + for (i = 0; i < ctx->Const.MaxViewports; i++) + set_viewport_no_notify(ctx, i, x, y, width, height); + + if (ctx->Driver.Viewport) { + /* Many drivers will use this call to check for window size changes + * and reallocate the z/stencil/accum/etc buffers if needed. + */ + ctx->Driver.Viewport(ctx); + } } @@ -56,31 +140,114 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height) * matrix). Usually called from _mesa_Viewport(). * * \param ctx GL context. + * \param idx Index of the viewport to be updated. * \param x, y coordinates of the lower left corner of the viewport rectangle. * \param width width of the viewport rectangle. * \param height height of the viewport rectangle. */ void -_mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y, - GLsizei width, GLsizei height) +_mesa_set_viewport(struct gl_context *ctx, unsigned idx, GLfloat x, GLfloat y, + GLfloat width, GLfloat height) { + set_viewport_no_notify(ctx, idx, x, y, width, height); + + if (ctx->Driver.Viewport) { + /* Many drivers will use this call to check for window size changes + * and reallocate the z/stencil/accum/etc buffers if needed. + */ + ctx->Driver.Viewport(ctx); + } +} + +void GLAPIENTRY +_mesa_ViewportArrayv(GLuint first, GLsizei count, const GLfloat *v) +{ + int i; + const struct gl_viewport_inputs *const p = (struct gl_viewport_inputs *) v; + GET_CURRENT_CONTEXT(ctx); + if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glViewport %d %d %d %d\n", x, y, width, height); + _mesa_debug(ctx, "glViewportArrayv %d %d\n", first, count); - if (width < 0 || height < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glViewport(%d, %d, %d, %d)", x, y, width, height); + if ((first + count) > ctx->Const.MaxViewports) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glViewportArrayv: first (%d) + count (%d) > MaxViewports " + "(%d)", + first, count, ctx->Const.MaxViewports); return; } - /* clamp width and height to the implementation dependent range */ - width = MIN2(width, (GLsizei) ctx->Const.MaxViewportWidth); - height = MIN2(height, (GLsizei) ctx->Const.MaxViewportHeight); + /* Verify width & height */ + for (i = 0; i < count; i++) { + if (p[i].Width < 0 || p[i].Height < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glViewportArrayv: index (%d) width or height < 0 " + "(%f, %f)", + i + first, p[i].Width, p[i].Height); + return; + } + } + + for (i = 0; i < count; i++) + set_viewport_no_notify(ctx, i + first, + p[i].X, p[i].Y, + p[i].Width, p[i].Height); + + if (ctx->Driver.Viewport) + ctx->Driver.Viewport(ctx); +} - ctx->Viewport.X = x; - ctx->Viewport.Width = width; - ctx->Viewport.Y = y; - ctx->Viewport.Height = height; +static void +ViewportIndexedf(GLuint index, GLfloat x, GLfloat y, + GLfloat w, GLfloat h, const char *function) +{ + GET_CURRENT_CONTEXT(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "%s(%d, %f, %f, %f, %f)\n", + function, index, x, y, w, h); + + if (index >= ctx->Const.MaxViewports) { + _mesa_error(ctx, GL_INVALID_VALUE, + "%s: index (%d) >= MaxViewports (%d)", + function, index, ctx->Const.MaxViewports); + return; + } + + /* Verify width & height */ + if (w < 0 || h < 0) { + _mesa_error(ctx, GL_INVALID_VALUE, + "%s: index (%d) width or height < 0 (%f, %f)", + function, index, w, h); + return; + } + + _mesa_set_viewport(ctx, index, x, y, w, h); +} + +void GLAPIENTRY +_mesa_ViewportIndexedf(GLuint index, GLfloat x, GLfloat y, + GLfloat w, GLfloat h) +{ + ViewportIndexedf(index, x, y, w, h, "glViewportIndexedf"); +} + +void GLAPIENTRY +_mesa_ViewportIndexedfv(GLuint index, const GLfloat *v) +{ + ViewportIndexedf(index, v[0], v[1], v[2], v[3], "glViewportIndexedfv"); +} + +static void +set_depth_range_no_notify(struct gl_context *ctx, unsigned idx, + GLclampd nearval, GLclampd farval) +{ + if (ctx->ViewportArray[idx].Near == nearval && + ctx->ViewportArray[idx].Far == farval) + return; + + ctx->ViewportArray[idx].Near = CLAMP(nearval, 0.0, 1.0); + ctx->ViewportArray[idx].Far = CLAMP(farval, 0.0, 1.0); ctx->NewState |= _NEW_VIEWPORT; #if 1 @@ -88,21 +255,26 @@ _mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y, * the WindowMap matrix being up to date in the driver's Viewport * and DepthRange functions. */ - _math_matrix_viewport(&ctx->Viewport._WindowMap, - ctx->Viewport.X, ctx->Viewport.Y, - ctx->Viewport.Width, ctx->Viewport.Height, - ctx->Viewport.Near, ctx->Viewport.Far, + _math_matrix_viewport(&ctx->ViewportArray[idx]._WindowMap, + ctx->ViewportArray[idx].X, + ctx->ViewportArray[idx].Y, + ctx->ViewportArray[idx].Width, + ctx->ViewportArray[idx].Height, + ctx->ViewportArray[idx].Near, + ctx->ViewportArray[idx].Far, ctx->DrawBuffer->_DepthMaxF); #endif - - if (ctx->Driver.Viewport) { - /* Many drivers will use this call to check for window size changes - * and reallocate the z/stencil/accum/etc buffers if needed. - */ - ctx->Driver.Viewport(ctx); - } } +void +_mesa_set_depth_range(struct gl_context *ctx, unsigned idx, + GLclampd nearval, GLclampd farval) +{ + set_depth_range_no_notify(ctx, idx, nearval, farval); + + if (ctx->Driver.DepthRange) + ctx->Driver.DepthRange(ctx); +} /** * Called by glDepthRange @@ -115,6 +287,7 @@ _mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y, void GLAPIENTRY _mesa_DepthRange(GLclampd nearval, GLclampd farval) { + unsigned i; GET_CURRENT_CONTEXT(ctx); FLUSH_VERTICES(ctx, 0); @@ -122,25 +295,19 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval) if (MESA_VERBOSE&VERBOSE_API) _mesa_debug(ctx, "glDepthRange %f %f\n", nearval, farval); - if (ctx->Viewport.Near == nearval && - ctx->Viewport.Far == farval) - return; - - ctx->Viewport.Near = (GLfloat) CLAMP(nearval, 0.0, 1.0); - ctx->Viewport.Far = (GLfloat) CLAMP(farval, 0.0, 1.0); - ctx->NewState |= _NEW_VIEWPORT; - -#if 1 - /* XXX remove this someday. Currently the DRI drivers rely on - * the WindowMap matrix being up to date in the driver's Viewport - * and DepthRange functions. + /* The GL_ARB_viewport_array spec says: + * + * "DepthRange sets the depth range for all viewports to the same + * values and is equivalent (assuming no errors are generated) to: + * + * for (uint i = 0; i < MAX_VIEWPORTS; i++) + * DepthRangeIndexed(i, n, f);" + * + * Set the depth range for all of the viewports supported by the + * implementation, but only signal the driver once at the end. */ - _math_matrix_viewport(&ctx->Viewport._WindowMap, - ctx->Viewport.X, ctx->Viewport.Y, - ctx->Viewport.Width, ctx->Viewport.Height, - ctx->Viewport.Near, ctx->Viewport.Far, - ctx->DrawBuffer->_DepthMaxF); -#endif + for (i = 0; i < ctx->Const.MaxViewports; i++) + set_depth_range_no_notify(ctx, i, nearval, farval); if (ctx->Driver.DepthRange) { ctx->Driver.DepthRange(ctx); @@ -153,6 +320,67 @@ _mesa_DepthRangef(GLclampf nearval, GLclampf farval) _mesa_DepthRange(nearval, farval); } +/** + * Update a range DepthRange values + * + * \param first starting array index + * \param count count of DepthRange items to update + * \param v pointer to memory containing + * GLclampd near and far clip-plane values + */ +void GLAPIENTRY +_mesa_DepthRangeArrayv(GLuint first, GLsizei count, const GLclampd *v) +{ + int i; + const struct gl_depthrange_inputs *const p = + (struct gl_depthrange_inputs *) v; + GET_CURRENT_CONTEXT(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glDepthRangeArrayv %d %d\n", first, count); + + if ((first + count) > ctx->Const.MaxViewports) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glDepthRangev: first (%d) + count (%d) >= MaxViewports (%d)", + first, count, ctx->Const.MaxViewports); + return; + } + + for (i = 0; i < count; i++) + set_depth_range_no_notify(ctx, i + first, p[i].Near, p[i].Far); + + if (ctx->Driver.DepthRange) + ctx->Driver.DepthRange(ctx); +} + +/** + * Update a single DepthRange + * + * \param index array index to update + * \param nearval specifies the Z buffer value which should correspond to + * the near clip plane + * \param farval specifies the Z buffer value which should correspond to + * the far clip plane + */ +void GLAPIENTRY +_mesa_DepthRangeIndexed(GLuint index, GLclampd nearval, GLclampd farval) +{ + GET_CURRENT_CONTEXT(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glDepthRangeIndexed(%d, %f, %f)\n", + index, nearval, farval); + + if (index >= ctx->Const.MaxViewports) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glDepthRangeIndexed: index (%d) >= MaxViewports (%d)", + index, ctx->Const.MaxViewports); + return; + } + + _mesa_set_depth_range(ctx, index, nearval, farval); +} + /** * Initialize the context viewport attribute group. * \param ctx the GL context. @@ -160,18 +388,24 @@ _mesa_DepthRangef(GLclampf nearval, GLclampf farval) void _mesa_init_viewport(struct gl_context *ctx) { GLfloat depthMax = 65535.0F; /* sorf of arbitrary */ + unsigned i; - /* Viewport group */ - ctx->Viewport.X = 0; - ctx->Viewport.Y = 0; - ctx->Viewport.Width = 0; - ctx->Viewport.Height = 0; - ctx->Viewport.Near = 0.0; - ctx->Viewport.Far = 1.0; - _math_matrix_ctr(&ctx->Viewport._WindowMap); - - _math_matrix_viewport(&ctx->Viewport._WindowMap, 0, 0, 0, 0, - 0.0F, 1.0F, depthMax); + /* Note: ctx->Const.MaxViewports may not have been set by the driver yet, + * so just initialize all of them. + */ + for (i = 0; i < MAX_VIEWPORTS; i++) { + /* Viewport group */ + ctx->ViewportArray[i].X = 0; + ctx->ViewportArray[i].Y = 0; + ctx->ViewportArray[i].Width = 0; + ctx->ViewportArray[i].Height = 0; + ctx->ViewportArray[i].Near = 0.0; + ctx->ViewportArray[i].Far = 1.0; + _math_matrix_ctr(&ctx->ViewportArray[i]._WindowMap); + + _math_matrix_viewport(&ctx->ViewportArray[i]._WindowMap, 0, 0, 0, 0, + 0.0F, 1.0F, depthMax); + } } @@ -181,6 +415,9 @@ void _mesa_init_viewport(struct gl_context *ctx) */ void _mesa_free_viewport_data(struct gl_context *ctx) { - _math_matrix_dtr(&ctx->Viewport._WindowMap); + unsigned i; + + for (i = 0; i < MAX_VIEWPORTS; i++) + _math_matrix_dtr(&ctx->ViewportArray[i]._WindowMap); } diff --git a/mesalib/src/mesa/main/viewport.h b/mesalib/src/mesa/main/viewport.h index ffa3a729c..f2311c02b 100644 --- a/mesalib/src/mesa/main/viewport.h +++ b/mesalib/src/mesa/main/viewport.h @@ -34,10 +34,18 @@ struct gl_context; extern void GLAPIENTRY _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height); +extern void GLAPIENTRY +_mesa_ViewportArrayv(GLuint first, GLsizei count, const GLfloat * v); + +extern void GLAPIENTRY +_mesa_ViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); + +extern void GLAPIENTRY +_mesa_ViewportIndexedfv(GLuint index, const GLfloat * v); extern void -_mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y, - GLsizei width, GLsizei height); +_mesa_set_viewport(struct gl_context *ctx, unsigned idx, GLfloat x, GLfloat y, + GLfloat width, GLfloat height); extern void GLAPIENTRY @@ -46,6 +54,15 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval); extern void GLAPIENTRY _mesa_DepthRangef(GLclampf nearval, GLclampf farval); +extern void GLAPIENTRY +_mesa_DepthRangeArrayv(GLuint first, GLsizei count, const GLclampd * v); + +extern void GLAPIENTRY +_mesa_DepthRangeIndexed(GLuint index, GLclampd n, GLclampd f); + +extern void +_mesa_set_depth_range(struct gl_context *ctx, unsigned idx, + GLclampd nearval, GLclampd farval); extern void _mesa_init_viewport(struct gl_context *ctx); diff --git a/mesalib/src/mesa/math/m_matrix.c b/mesalib/src/mesa/math/m_matrix.c index 274f969d2..e512e456f 100644 --- a/mesalib/src/mesa/math/m_matrix.c +++ b/mesalib/src/mesa/math/m_matrix.c @@ -1110,15 +1110,16 @@ _math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ) * Transforms Normalized Device Coords to window/Z values. */ void -_math_matrix_viewport(GLmatrix *m, GLint x, GLint y, GLint width, GLint height, - GLfloat zNear, GLfloat zFar, GLfloat depthMax) +_math_matrix_viewport(GLmatrix *m, GLfloat x, GLfloat y, + GLfloat width, GLfloat height, + GLdouble zNear, GLdouble zFar, GLdouble depthMax) { - m->m[MAT_SX] = (GLfloat) width / 2.0F; + m->m[MAT_SX] = width / 2.0F; m->m[MAT_TX] = m->m[MAT_SX] + x; - m->m[MAT_SY] = (GLfloat) height / 2.0F; + m->m[MAT_SY] = height / 2.0F; m->m[MAT_TY] = m->m[MAT_SY] + y; - m->m[MAT_SZ] = depthMax * ((zFar - zNear) / 2.0F); - m->m[MAT_TZ] = depthMax * ((zFar - zNear) / 2.0F + zNear); + m->m[MAT_SZ] = (GLfloat) (depthMax * ((zFar - zNear) / 2.0)); + m->m[MAT_TZ] = (GLfloat) (depthMax * ((zFar - zNear) / 2.0 + zNear)); m->flags = MAT_FLAG_GENERAL_SCALE | MAT_FLAG_TRANSLATION; m->type = MATRIX_3D_NO_ROT; } diff --git a/mesalib/src/mesa/math/m_matrix.h b/mesalib/src/mesa/math/m_matrix.h index 2b097cb31..dddce7019 100644 --- a/mesalib/src/mesa/math/m_matrix.h +++ b/mesalib/src/mesa/math/m_matrix.h @@ -122,8 +122,8 @@ _math_matrix_frustum( GLmatrix *mat, GLfloat nearval, GLfloat farval ); extern void -_math_matrix_viewport(GLmatrix *m, GLint x, GLint y, GLint width, GLint height, - GLfloat zNear, GLfloat zFar, GLfloat depthMax); +_math_matrix_viewport(GLmatrix *m, GLfloat x, GLfloat y, GLfloat width, GLfloat height, + GLdouble zNear, GLdouble zFar, GLdouble depthMax); extern void _math_matrix_set_identity( GLmatrix *dest ); diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp index 85d414259..74c512b33 100644 --- a/mesalib/src/mesa/program/ir_to_mesa.cpp +++ b/mesalib/src/mesa/program/ir_to_mesa.cpp @@ -3053,7 +3053,7 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) _mesa_reference_program(ctx, &prog->_LinkedShaders[i]->Program, linked_prog); if (!ctx->Driver.ProgramStringNotify(ctx, - _mesa_program_index_to_target(i), + _mesa_shader_stage_to_program(i), linked_prog)) { return GL_FALSE; } diff --git a/mesalib/src/mesa/program/prog_print.c b/mesalib/src/mesa/program/prog_print.c index 9391e99ff..02ba01eca 100644 --- a/mesalib/src/mesa/program/prog_print.c +++ b/mesalib/src/mesa/program/prog_print.c @@ -144,8 +144,9 @@ arb_input_attrib_string(GLint index, GLenum progType) "fragment.(eighteen)", /* VARYING_SLOT_CLIP_DIST1 */ "fragment.(nineteen)", /* VARYING_SLOT_PRIMITIVE_ID */ "fragment.(twenty)", /* VARYING_SLOT_LAYER */ - "fragment.(twenty-one)", /* VARYING_SLOT_FACE */ - "fragment.(twenty-two)", /* VARYING_SLOT_PNTC */ + "fragment.(twenty-one)", /* VARYING_SLOT_VIEWPORT */ + "fragment.(twenty-two)", /* VARYING_SLOT_FACE */ + "fragment.(twenty-three)", /* VARYING_SLOT_PNTC */ "fragment.varying[0]", "fragment.varying[1]", "fragment.varying[2]", @@ -268,8 +269,9 @@ arb_output_attrib_string(GLint index, GLenum progType) "result.(eighteen)", /* VARYING_SLOT_CLIP_DIST1 */ "result.(nineteen)", /* VARYING_SLOT_PRIMITIVE_ID */ "result.(twenty)", /* VARYING_SLOT_LAYER */ - "result.(twenty-one)", /* VARYING_SLOT_FACE */ - "result.(twenty-two)", /* VARYING_SLOT_PNTC */ + "result.(twenty-one)", /* VARYING_SLOT_VIEWPORT */ + "result.(twenty-two)", /* VARYING_SLOT_FACE */ + "result.(twenty-three)", /* VARYING_SLOT_PNTC */ "result.varying[0]", "result.varying[1]", "result.varying[2]", diff --git a/mesalib/src/mesa/program/prog_statevars.c b/mesalib/src/mesa/program/prog_statevars.c index 58e1f496e..5dda8e28d 100644 --- a/mesalib/src/mesa/program/prog_statevars.c +++ b/mesalib/src/mesa/program/prog_statevars.c @@ -353,9 +353,9 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], ((int *)value)[0] = ctx->DrawBuffer->Visual.samples; return; case STATE_DEPTH_RANGE: - value[0] = ctx->Viewport.Near; /* near */ - value[1] = ctx->Viewport.Far; /* far */ - value[2] = ctx->Viewport.Far - ctx->Viewport.Near; /* far - near */ + value[0] = ctx->ViewportArray[0].Near; /* near */ + value[1] = ctx->ViewportArray[0].Far; /* far */ + value[2] = ctx->ViewportArray[0].Far - ctx->ViewportArray[0].Near; /* far - near */ value[3] = 1.0; return; case STATE_FRAGMENT_PROGRAM: diff --git a/mesalib/src/mesa/program/program.c b/mesalib/src/mesa/program/program.c index 3c19e8c60..ea8eb0d3a 100644 --- a/mesalib/src/mesa/program/program.c +++ b/mesalib/src/mesa/program/program.c @@ -1023,7 +1023,8 @@ _mesa_postprocess_program(struct gl_context *ctx, struct gl_program *prog) */ GLint _mesa_get_min_invocations_per_fragment(struct gl_context *ctx, - const struct gl_fragment_program *prog) + const struct gl_fragment_program *prog, + bool ignore_sample_qualifier) { /* From ARB_sample_shading specification: * "Using gl_SampleID in a fragment shader causes the entire shader @@ -1041,7 +1042,7 @@ _mesa_get_min_invocations_per_fragment(struct gl_context *ctx, * "Use of the "sample" qualifier on a fragment shader input * forces per-sample shading" */ - if (prog->IsSample) + if (prog->IsSample && !ignore_sample_qualifier) return MAX2(ctx->DrawBuffer->Visual.samples, 1); if (prog->Base.SystemValuesRead & (SYSTEM_BIT_SAMPLE_ID | diff --git a/mesalib/src/mesa/program/program.h b/mesalib/src/mesa/program/program.h index 0e350cd6f..71b0a4af2 100644 --- a/mesalib/src/mesa/program/program.h +++ b/mesalib/src/mesa/program/program.h @@ -189,7 +189,8 @@ _mesa_postprocess_program(struct gl_context *ctx, struct gl_program *prog); extern GLint _mesa_get_min_invocations_per_fragment(struct gl_context *ctx, - const struct gl_fragment_program *prog); + const struct gl_fragment_program *prog, + bool ignore_sample_qualifier); static inline GLuint _mesa_program_enum_to_shader_stage(GLenum v) @@ -209,7 +210,7 @@ _mesa_program_enum_to_shader_stage(GLenum v) static inline GLenum -_mesa_shader_stage_to_program(gl_shader_stage stage) +_mesa_shader_stage_to_program(unsigned stage) { switch (stage) { case MESA_SHADER_VERTEX: @@ -225,23 +226,6 @@ _mesa_shader_stage_to_program(gl_shader_stage stage) } -static inline GLenum -_mesa_program_index_to_target(GLuint i) -{ - static const GLenum enums[] = { - GL_VERTEX_PROGRAM_ARB, - GL_GEOMETRY_PROGRAM_NV, - GL_FRAGMENT_PROGRAM_ARB - }; - STATIC_ASSERT(Elements(enums) == MESA_SHADER_STAGES); - if(i >= MESA_SHADER_STAGES) { - assert(!"Unexpected program index"); - return 0; - } else - return enums[i]; -} - - /* Cast wrappers from gl_program to gl_vertex/geometry/fragment_program */ static inline struct gl_fragment_program * diff --git a/mesalib/src/mesa/program/programopt.c b/mesalib/src/mesa/program/programopt.c index 7e0057223..92a8831d2 100644 --- a/mesalib/src/mesa/program/programopt.c +++ b/mesalib/src/mesa/program/programopt.c @@ -218,7 +218,7 @@ _mesa_insert_mvp_mad_code(struct gl_context *ctx, struct gl_vertex_program *vpro void _mesa_insert_mvp_code(struct gl_context *ctx, struct gl_vertex_program *vprog) { - if (ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4) + if (ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS) _mesa_insert_mvp_dp4_code( ctx, vprog ); else _mesa_insert_mvp_mad_code( ctx, vprog ); diff --git a/mesalib/src/mesa/state_tracker/st_atom_clip.c b/mesalib/src/mesa/state_tracker/st_atom_clip.c index 700899934..274b36a62 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_clip.c +++ b/mesalib/src/mesa/state_tracker/st_atom_clip.c @@ -52,7 +52,7 @@ static void update_clip( struct st_context *st ) /* if we have a vertex shader that writes clip vertex we need to pass the pre-projection transformed coordinates into the driver. */ if (st->vp) { - if (ctx->Shader.CurrentVertexProgram) + if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]) use_eye = TRUE; } diff --git a/mesalib/src/mesa/state_tracker/st_atom_constbuf.c b/mesalib/src/mesa/state_tracker/st_atom_constbuf.c index 14cdfc6f9..a5013ed2c 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_constbuf.c +++ b/mesalib/src/mesa/state_tracker/st_atom_constbuf.c @@ -218,7 +218,8 @@ static void st_bind_ubos(struct st_context *st, static void bind_vs_ubos(struct st_context *st) { - struct gl_shader_program *prog = st->ctx->Shader.CurrentVertexProgram; + struct gl_shader_program *prog = + st->ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]; if (!prog) return; @@ -237,7 +238,8 @@ const struct st_tracked_state st_bind_vs_ubos = { static void bind_fs_ubos(struct st_context *st) { - struct gl_shader_program *prog = st->ctx->Shader.CurrentFragmentProgram; + struct gl_shader_program *prog = + st->ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]; if (!prog) return; @@ -256,7 +258,8 @@ const struct st_tracked_state st_bind_fs_ubos = { static void bind_gs_ubos(struct st_context *st) { - struct gl_shader_program *prog = st->ctx->Shader.CurrentGeometryProgram; + struct gl_shader_program *prog = + st->ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]; if (!prog) return; diff --git a/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c b/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c index ca227dcfa..a4f3ffee3 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/mesalib/src/mesa/state_tracker/st_atom_rasterizer.c @@ -223,7 +223,7 @@ static void update_raster_state( struct st_context *st ) raster->multisample = ctx->Multisample._Enabled; /* _NEW_SCISSOR */ - raster->scissor = ctx->Scissor.Enabled; + raster->scissor = ctx->Scissor.EnableFlags; /* _NEW_FRAG_CLAMP */ raster->clamp_fragment_color = !st->clamp_frag_color_in_shader && diff --git a/mesalib/src/mesa/state_tracker/st_atom_scissor.c b/mesalib/src/mesa/state_tracker/st_atom_scissor.c index 539c423eb..a1f72da47 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_scissor.c +++ b/mesalib/src/mesa/state_tracker/st_atom_scissor.c @@ -53,15 +53,15 @@ update_scissor( struct st_context *st ) scissor.maxx = fb->Width; scissor.maxy = fb->Height; - if (ctx->Scissor.Enabled) { + if (ctx->Scissor.EnableFlags & 1) { /* need to be careful here with xmax or ymax < 0 */ - GLint xmax = MAX2(0, ctx->Scissor.X + ctx->Scissor.Width); - GLint ymax = MAX2(0, ctx->Scissor.Y + ctx->Scissor.Height); + GLint xmax = MAX2(0, ctx->Scissor.ScissorArray[0].X + ctx->Scissor.ScissorArray[0].Width); + GLint ymax = MAX2(0, ctx->Scissor.ScissorArray[0].Y + ctx->Scissor.ScissorArray[0].Height); - if (ctx->Scissor.X > (GLint)scissor.minx) - scissor.minx = ctx->Scissor.X; - if (ctx->Scissor.Y > (GLint)scissor.miny) - scissor.miny = ctx->Scissor.Y; + if (ctx->Scissor.ScissorArray[0].X > (GLint)scissor.minx) + scissor.minx = ctx->Scissor.ScissorArray[0].X; + if (ctx->Scissor.ScissorArray[0].Y > (GLint)scissor.miny) + scissor.miny = ctx->Scissor.ScissorArray[0].Y; if (xmax < (GLint) scissor.maxx) scissor.maxx = xmax; diff --git a/mesalib/src/mesa/state_tracker/st_atom_viewport.c b/mesalib/src/mesa/state_tracker/st_atom_viewport.c index 7a1a689b7..8c6d679a0 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_viewport.c +++ b/mesalib/src/mesa/state_tracker/st_atom_viewport.c @@ -62,12 +62,12 @@ update_viewport( struct st_context *st ) /* _NEW_VIEWPORT */ { - GLfloat x = (GLfloat)ctx->Viewport.X; - GLfloat y = (GLfloat)ctx->Viewport.Y; - GLfloat z = ctx->Viewport.Near; - GLfloat half_width = (GLfloat)ctx->Viewport.Width * 0.5f; - GLfloat half_height = (GLfloat)ctx->Viewport.Height * 0.5f; - GLfloat half_depth = (GLfloat)(ctx->Viewport.Far - ctx->Viewport.Near) * 0.5f; + GLfloat x = ctx->ViewportArray[0].X; + GLfloat y = ctx->ViewportArray[0].Y; + GLfloat z = ctx->ViewportArray[0].Near; + GLfloat half_width = ctx->ViewportArray[0].Width * 0.5f; + GLfloat half_height = ctx->ViewportArray[0].Height * 0.5f; + GLfloat half_depth = (GLfloat)(ctx->ViewportArray[0].Far - ctx->ViewportArray[0].Near) * 0.5f; st->state.viewport.scale[0] = half_width; st->state.viewport.scale[1] = half_height * yScale; diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c index 487a46164..874ff77b5 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c +++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c @@ -457,7 +457,7 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z, cso_save_aux_vertex_buffer_slot(cso); /* rasterizer state: just scissor */ - st->bitmap.rasterizer.scissor = ctx->Scissor.Enabled; + st->bitmap.rasterizer.scissor = ctx->Scissor.EnableFlags & 1; cso_set_rasterizer(cso, &st->bitmap.rasterizer); /* fragment shader state: TEX lookup program */ diff --git a/mesalib/src/mesa/state_tracker/st_cb_clear.c b/mesalib/src/mesa/state_tracker/st_cb_clear.c index 28f9c83d5..97cc5a232 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_clear.c +++ b/mesalib/src/mesa/state_tracker/st_cb_clear.c @@ -364,11 +364,11 @@ clear_with_quad(struct gl_context *ctx, unsigned clear_buffers) static INLINE GLboolean is_scissor_enabled(struct gl_context *ctx, struct gl_renderbuffer *rb) { - return ctx->Scissor.Enabled && - (ctx->Scissor.X > 0 || - ctx->Scissor.Y > 0 || - (unsigned) ctx->Scissor.Width < rb->Width || - (unsigned) ctx->Scissor.Height < rb->Height); + return (ctx->Scissor.EnableFlags & 1) && + (ctx->Scissor.ScissorArray[0].X > 0 || + ctx->Scissor.ScissorArray[0].Y > 0 || + (unsigned) ctx->Scissor.ScissorArray[0].Width < rb->Width || + (unsigned) ctx->Scissor.ScissorArray[0].Height < rb->Height); } diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c index 72cc9fa54..97f213077 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c @@ -713,7 +713,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z, rasterizer.half_pixel_center = 1; rasterizer.bottom_edge_rule = 1; rasterizer.depth_clip = !ctx->Transform.DepthClamp; - rasterizer.scissor = ctx->Scissor.Enabled; + rasterizer.scissor = ctx->Scissor.EnableFlags; cso_set_rasterizer(cso, &rasterizer); } @@ -1364,7 +1364,7 @@ blit_copy_pixels(struct gl_context *ctx, GLint srcx, GLint srcy, !ctx->Stencil.Enabled && !ctx->FragmentProgram.Enabled && !ctx->VertexProgram.Enabled && - !ctx->Shader.CurrentFragmentProgram && + !ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] && ctx->DrawBuffer->_NumColorDrawBuffers == 1 && !ctx->Query.CondRenderQuery && !ctx->Query.CurrentOcclusionObject) { diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c index 637f7ee98..780148487 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c +++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c @@ -544,6 +544,12 @@ st_validate_attachment(struct gl_context *ctx, gl_format texFormat; GLboolean valid; + /* Sanity check: we must be binding the surface as a (color) render target + * or depth/stencil target. + */ + assert(bindings == PIPE_BIND_RENDER_TARGET || + bindings == PIPE_BIND_DEPTH_STENCIL); + /* Only validate texture attachments for now, since * st_renderbuffer_alloc_storage makes sure that * the format is supported. @@ -700,7 +706,8 @@ st_ReadBuffer(struct gl_context *ctx, GLenum buffer) (void) buffer; /* add the renderbuffer on demand */ - st_manager_add_color_renderbuffer(st, fb, fb->_ColorReadBufferIndex); + if (fb->_ColorReadBufferIndex >= 0) + st_manager_add_color_renderbuffer(st, fb, fb->_ColorReadBufferIndex); } diff --git a/mesalib/src/mesa/state_tracker/st_context.c b/mesalib/src/mesa/state_tracker/st_context.c index 77db6ab39..0ffc76263 100644 --- a/mesalib/src/mesa/state_tracker/st_context.c +++ b/mesalib/src/mesa/state_tracker/st_context.c @@ -240,7 +240,7 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe, * driver prefers DP4 or MUL/MAD for vertex transformation. */ if (debug_get_option_mesa_mvp_dp4()) - ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].PreferDP4 = GL_TRUE; + ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = GL_TRUE; return st_create_context_priv(ctx, pipe, options); } diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index 46257e0f5..355c180f8 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -131,11 +131,7 @@ setup_index_buffer(struct st_context *st, static void check_uniforms(struct gl_context *ctx) { - struct gl_shader_program *shProg[3] = { - ctx->Shader.CurrentVertexProgram, - ctx->Shader.CurrentGeometryProgram, - ctx->Shader.CurrentFragmentProgram, - }; + struct gl_shader_program **shProg = ctx->Shader.CurrentProgram; unsigned j; for (j = 0; j < 3; j++) { diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index f1b354429..0871dd064 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -5312,7 +5312,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) _mesa_reference_program(ctx, &prog->_LinkedShaders[i]->Program, linked_prog); if (!ctx->Driver.ProgramStringNotify(ctx, - _mesa_program_index_to_target(i), + _mesa_shader_stage_to_program(i), linked_prog)) { _mesa_reference_program(ctx, &prog->_LinkedShaders[i]->Program, NULL); diff --git a/mesalib/src/mesa/state_tracker/st_program.c b/mesalib/src/mesa/state_tracker/st_program.c index 2d6d43099..7a15b23fa 100644 --- a/mesalib/src/mesa/state_tracker/st_program.c +++ b/mesalib/src/mesa/state_tracker/st_program.c @@ -1195,11 +1195,7 @@ st_get_gp_variant(struct st_context *st, void st_print_shaders(struct gl_context *ctx) { - struct gl_shader_program *shProg[3] = { - ctx->Shader.CurrentVertexProgram, - ctx->Shader.CurrentGeometryProgram, - ctx->Shader.CurrentFragmentProgram, - }; + struct gl_shader_program **shProg = ctx->Shader.CurrentProgram; unsigned j; for (j = 0; j < 3; j++) { diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c index f219d3de0..07485006c 100644 --- a/mesalib/src/mesa/swrast/s_context.c +++ b/mesalib/src/mesa/swrast/s_context.c @@ -61,7 +61,7 @@ _swrast_update_rasterflags( struct gl_context *ctx ) if (ctx->Color.BlendEnabled) rasterMask |= BLEND_BIT; if (ctx->Depth.Test) rasterMask |= DEPTH_BIT; if (swrast->_FogEnabled) rasterMask |= FOG_BIT; - if (ctx->Scissor.Enabled) rasterMask |= CLIP_BIT; + if (ctx->Scissor.EnableFlags) rasterMask |= CLIP_BIT; if (ctx->Stencil._Enabled) rasterMask |= STENCIL_BIT; for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { if (!ctx->Color.ColorMask[i][0] || @@ -74,10 +74,10 @@ _swrast_update_rasterflags( struct gl_context *ctx ) } if (ctx->Color.ColorLogicOpEnabled) 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 - || ctx->Viewport.Y + ctx->Viewport.Height > (GLint) ctx->DrawBuffer->Height) { + if ( ctx->ViewportArray[0].X < 0 + || ctx->ViewportArray[0].X + ctx->ViewportArray[0].Width > (GLfloat) ctx->DrawBuffer->Width + || ctx->ViewportArray[0].Y < 0 + || ctx->ViewportArray[0].Y + ctx->ViewportArray[0].Height > (GLfloat) ctx->DrawBuffer->Height) { rasterMask |= CLIP_BIT; } diff --git a/mesalib/src/mesa/swrast/s_depth.c b/mesalib/src/mesa/swrast/s_depth.c index 0f4fb9506..7f3c76de4 100644 --- a/mesalib/src/mesa/swrast/s_depth.c +++ b/mesalib/src/mesa/swrast/s_depth.c @@ -171,12 +171,12 @@ _swrast_depth_clamp_span( struct gl_context *ctx, SWspan *span ) GLfloat min_f, max_f; GLuint i; - if (ctx->Viewport.Near < ctx->Viewport.Far) { - min_f = ctx->Viewport.Near; - max_f = ctx->Viewport.Far; + if (ctx->ViewportArray[0].Near < ctx->ViewportArray[0].Far) { + min_f = ctx->ViewportArray[0].Near; + max_f = ctx->ViewportArray[0].Far; } else { - min_f = ctx->Viewport.Far; - max_f = ctx->Viewport.Near; + min_f = ctx->ViewportArray[0].Far; + max_f = ctx->ViewportArray[0].Near; } /* Convert floating point values in [0,1] to device Z coordinates in diff --git a/mesalib/src/mesa/swrast/s_fragprog.c b/mesalib/src/mesa/swrast/s_fragprog.c index 4e9ac394e..fa45fa97a 100644 --- a/mesalib/src/mesa/swrast/s_fragprog.c +++ b/mesalib/src/mesa/swrast/s_fragprog.c @@ -182,7 +182,7 @@ init_machine(struct gl_context *ctx, struct gl_program_machine *machine, machine->Samplers = program->Base.SamplerUnits; /* if running a GLSL program (not ARB_fragment_program) */ - if (ctx->Shader.CurrentFragmentProgram) { + if (ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]) { /* Store front/back facing value */ machine->Attribs[VARYING_SLOT_FACE][col][0] = 1.0F - span->facing; } diff --git a/mesalib/src/mesa/swrast_setup/ss_context.c b/mesalib/src/mesa/swrast_setup/ss_context.c index 1be37d4c8..12a47358f 100644 --- a/mesalib/src/mesa/swrast_setup/ss_context.c +++ b/mesalib/src/mesa/swrast_setup/ss_context.c @@ -167,7 +167,7 @@ setup_vertex_format(struct gl_context *ctx) EMIT_ATTR( _TNL_ATTRIB_POINTSIZE, EMIT_1F, pointSize ); _tnl_install_attrs( ctx, map, e, - ctx->Viewport._WindowMap.m, + ctx->ViewportArray[0]._WindowMap.m, sizeof(SWvertex) ); swsetup->last_index_bitset = index_bitset; @@ -265,7 +265,7 @@ _swsetup_Wakeup( struct gl_context *ctx ) void _swsetup_Translate( struct gl_context *ctx, const void *vertex, SWvertex *dest ) { - const GLfloat *m = ctx->Viewport._WindowMap.m; + const GLfloat *m = ctx->ViewportArray[0]._WindowMap.m; GLfloat tmp[4]; GLuint i; diff --git a/mesalib/src/mesa/tnl/t_rasterpos.c b/mesalib/src/mesa/tnl/t_rasterpos.c index 3ee5c4547..e538c348f 100644 --- a/mesalib/src/mesa/tnl/t_rasterpos.c +++ b/mesalib/src/mesa/tnl/t_rasterpos.c @@ -409,19 +409,19 @@ _tnl_RasterPos(struct gl_context *ctx, const GLfloat vObj[4]) ndc[1] = clip[1] * d; ndc[2] = clip[2] * d; /* wincoord = viewport_mapping(ndc) */ - ctx->Current.RasterPos[0] = (ndc[0] * ctx->Viewport._WindowMap.m[MAT_SX] - + ctx->Viewport._WindowMap.m[MAT_TX]); - ctx->Current.RasterPos[1] = (ndc[1] * ctx->Viewport._WindowMap.m[MAT_SY] - + ctx->Viewport._WindowMap.m[MAT_TY]); - ctx->Current.RasterPos[2] = (ndc[2] * ctx->Viewport._WindowMap.m[MAT_SZ] - + ctx->Viewport._WindowMap.m[MAT_TZ]) + ctx->Current.RasterPos[0] = (ndc[0] * ctx->ViewportArray[0]._WindowMap.m[MAT_SX] + + ctx->ViewportArray[0]._WindowMap.m[MAT_TX]); + ctx->Current.RasterPos[1] = (ndc[1] * ctx->ViewportArray[0]._WindowMap.m[MAT_SY] + + ctx->ViewportArray[0]._WindowMap.m[MAT_TY]); + ctx->Current.RasterPos[2] = (ndc[2] * ctx->ViewportArray[0]._WindowMap.m[MAT_SZ] + + ctx->ViewportArray[0]._WindowMap.m[MAT_TZ]) / ctx->DrawBuffer->_DepthMaxF; ctx->Current.RasterPos[3] = clip[3]; if (ctx->Transform.DepthClamp) { ctx->Current.RasterPos[3] = CLAMP(ctx->Current.RasterPos[3], - ctx->Viewport.Near, - ctx->Viewport.Far); + ctx->ViewportArray[0].Near, + ctx->ViewportArray[0].Far); } /* compute raster distance */ diff --git a/mesalib/src/mesa/x86/read_rgba_span_x86.h b/mesalib/src/mesa/x86/read_rgba_span_x86.h deleted file mode 100644 index 564b1bb0f..000000000 --- a/mesalib/src/mesa/x86/read_rgba_span_x86.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * (C) Copyright IBM Corporation 2004 - * 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 - * on 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. - */ - -/** - * \file read_rgba_span_x86.h - * - * \author Ian Romanick - */ - -#ifndef READ_RGBA_SPAN_X86_H -#define READ_RGBA_SPAN_X86_H - -#if defined(USE_SSE_ASM) || defined(USE_MMX_ASM) -#include "x86/common_x86_asm.h" -#endif - -#if defined(USE_SSE_ASM) -extern void _generic_read_RGBA_span_BGRA8888_REV_SSE2( const unsigned char *, - unsigned char *, unsigned ); -#endif - -#if defined(USE_SSE_ASM) -extern void _generic_read_RGBA_span_BGRA8888_REV_SSE( const unsigned char *, - unsigned char *, unsigned ); -#endif - -#if defined(USE_MMX_ASM) -extern void _generic_read_RGBA_span_BGRA8888_REV_MMX( const unsigned char *, - unsigned char *, unsigned ); - -extern void _generic_read_RGBA_span_RGB565_MMX( const unsigned char *, - unsigned char *, unsigned ); -#endif - -#endif /* READ_RGBA_SPAN_X86_H */ -- cgit v1.2.3