From 82dd62fb22c8f88d62e3c77666c6805a2ac6ecd3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Mar 2011 11:39:21 -0600 Subject: mesa: new MESA_EXTENSION_MAX_YEAR env var If set to year X, only report extensions up to that year. This is a work-around for games that try to copy the extensions string to a fixed size buffer and overflow. If a game was released in year X, setting MESA_EXTENSION_MAX_YEAR to that year will likely fix the problem. --- docs/envvars.html | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs') diff --git a/docs/envvars.html b/docs/envvars.html index c8be8437176..986d2f8eb35 100644 --- a/docs/envvars.html +++ b/docs/envvars.html @@ -49,6 +49,15 @@ Setting this variable automatically sets the MESA_TEX_PROG variable as well.
  • MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions. A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension and disable the GL_EXT_bar extension. +
  • MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted +by extension year. +If this variable is set to year X, only extensions defined on or before year +X will be reported. +This is to work-around a bug in some games where the extension string is +copied into a fixed-size buffer without truncating. +If the extension string is too long, the buffer overrun can cause the game +to crash. +This is a work-around for that.
  • MESA_GLSL - shading language compiler options -- cgit v1.2.3 From e5c6a92a12b5cd7db205d72039f58d302b0be9d5 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 15 Feb 2011 23:30:23 +0100 Subject: mesa: implement clamping controls (ARB_color_buffer_float) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squashed commit of the following: Author: Marek Olšák mesa: fix getteximage so that it doesn't clamp values mesa: update the compute_version function mesa: add display list support for ARB_color_buffer_float mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float commit b2f6ddf907935b2594d2831ddab38cf57a1729ce Author: Luca Barbieri Date: Tue Aug 31 16:50:57 2010 +0200 mesa: document known possible deviations from ARB_color_buffer_float commit 5458935be800c1b19d1c9d1569dc4fa30a97e8b8 Author: Luca Barbieri Date: Tue Aug 24 21:54:56 2010 +0200 mesa: expose GL_ARB_color_buffer_float commit aef5c3c6be6edd076e955e37c80905bc447f8a82 Author: Luca Barbieri Date: Thu Aug 26 18:12:34 2010 +0200 mesa, mesa/st: handle read color clamping properly (I'll squash the st/mesa part to a separate commit. -Marek) We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where the operation mandates it. TODO: did I get the set of operations mandating it right? commit 3a9cb5e59b676b6148c50907ce6eef5441677e36 Author: Luca Barbieri Date: Thu Aug 26 18:09:41 2010 +0200 mesa: respect color clamping in texenv programs (v2) Changes in v2: - Fix attributes other than vertex color sometimes getting clamped commit de26f9e47e886e176aab6e5a2c3d4481efb64362 Author: Luca Barbieri Date: Thu Aug 26 18:05:53 2010 +0200 mesa: restore color clamps on glPopAttrib commit a55ac3c300c189616627c05d924c40a8b55bfafa Author: Luca Barbieri Date: Thu Aug 26 18:04:26 2010 +0200 mesa: clamp color queries if and only if fragment clamping is enabled commit 9940a3e31c2fb76cc3d28b15ea78dde369825107 Author: Luca Barbieri Date: Wed Aug 25 00:00:16 2010 +0200 mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY To do this, we make ClampColor call FLUSH_VERTICES with the appropriate _NEW flag. We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging effects, despite being in the Color attrib group. This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g commit 6244c446e3beed5473b4e811d10787e4019f59d6 Author: Luca Barbieri Date: Thu Aug 26 17:58:24 2010 +0200 mesa: add unclamped color parameters --- docs/ARB_color_buffer_float.txt | 4 +++ src/mapi/glapi/gen/ARB_color_buffer_float.xml | 25 +++++++++++++++ src/mapi/glapi/gen/Makefile | 1 + src/mapi/glapi/gen/gl_API.xml | 1 + src/mesa/drivers/dri/i915/i915_fragprog.c | 2 +- src/mesa/drivers/dri/i965/brw_program.c | 2 +- src/mesa/main/api_exec.c | 2 ++ src/mesa/main/attrib.c | 21 +++++++------ src/mesa/main/blend.c | 37 ++++++++++++++-------- src/mesa/main/clear.c | 20 ++++++++---- src/mesa/main/colortab.c | 7 ++++- src/mesa/main/dlist.c | 27 ++++++++++++++++ src/mesa/main/extensions.c | 1 + src/mesa/main/ff_fragment_shader.cpp | 4 +-- src/mesa/main/fog.c | 5 +++ src/mesa/main/get.c | 45 ++++++++++++++++++++++++--- src/mesa/main/mtypes.h | 20 ++++++++++-- src/mesa/main/pack.c | 11 ------- src/mesa/main/state.c | 40 +++++++++++++++++++++++- src/mesa/main/texenv.c | 21 ++++++++----- src/mesa/main/texparam.c | 21 ++++++++++--- src/mesa/main/version.c | 2 ++ src/mesa/program/arbprogparse.c | 5 ++- src/mesa/program/prog_statevars.c | 32 +++++++++++++++++-- src/mesa/program/prog_statevars.h | 1 + src/mesa/program/programopt.c | 5 +-- src/mesa/program/programopt.h | 2 +- 27 files changed, 294 insertions(+), 70 deletions(-) create mode 100644 docs/ARB_color_buffer_float.txt create mode 100644 src/mapi/glapi/gen/ARB_color_buffer_float.xml (limited to 'docs') diff --git a/docs/ARB_color_buffer_float.txt b/docs/ARB_color_buffer_float.txt new file mode 100644 index 00000000000..e5011200263 --- /dev/null +++ b/docs/ARB_color_buffer_float.txt @@ -0,0 +1,4 @@ +Known issues in the ARB_color_buffer_float implementation: +- Rendering to multiple render targets, some fixed-point, some floating-point, with FIXED_ONLY fragment clamping and polygon smooth enabled may write incorrect values to the fixed point buffers (depends on spec interpretation) +- For fragment programs with ARB_fog_* options, colors are clamped before fog application regardless of the fragment clamping setting (this depends on spec interpretation) + diff --git a/src/mapi/glapi/gen/ARB_color_buffer_float.xml b/src/mapi/glapi/gen/ARB_color_buffer_float.xml new file mode 100644 index 00000000000..7acf271558e --- /dev/null +++ b/src/mapi/glapi/gen/ARB_color_buffer_float.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/Makefile b/src/mapi/glapi/gen/Makefile index 42eed167969..454ea4c9b31 100644 --- a/src/mapi/glapi/gen/Makefile +++ b/src/mapi/glapi/gen/Makefile @@ -69,6 +69,7 @@ XORG_OUTPUTS = \ API_XML = \ gl_API.xml \ + ARB_color_buffer_float.xml \ ARB_copy_buffer.xml \ ARB_depth_clamp.xml \ ARB_draw_buffers_blend.xml \ diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 56c0ec71b36..cb20ac73e86 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -7979,6 +7979,7 @@ + diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 2bfe665cb65..89de2a8b0d3 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -1291,7 +1291,7 @@ i915ProgramStringNotify(struct gl_context * ctx, */ if (p->FragProg.FogOption) { /* add extra instructions to do fog, then turn off FogOption field */ - _mesa_append_fog_code(ctx, &p->FragProg); + _mesa_append_fog_code(ctx, &p->FragProg, TRUE); p->FragProg.FogOption = GL_NONE; } } diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index ee68095fceb..2132b8210ba 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -135,7 +135,7 @@ static GLboolean brwProgramStringNotify( struct gl_context *ctx, struct gl_shader_program *shader_program; if (fprog->FogOption) { - _mesa_append_fog_code(ctx, fprog); + _mesa_append_fog_code(ctx, fprog, TRUE); fprog->FogOption = GL_NONE; } diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c index 4da48936484..f7603705b72 100644 --- a/src/mesa/main/api_exec.c +++ b/src/mesa/main/api_exec.c @@ -691,6 +691,8 @@ _mesa_create_exec_table(void) SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB); #endif + SET_ClampColorARB(exec, _mesa_ClampColorARB); + /* GL_EXT_texture_integer */ SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT); SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT); diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index ae7f633b8d8..340c06c979d 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -879,10 +879,10 @@ _mesa_PopAttrib(void) color = (const struct gl_colorbuffer_attrib *) attr->data; _mesa_ClearIndex((GLfloat) color->ClearIndex); - _mesa_ClearColor(color->ClearColor[0], - color->ClearColor[1], - color->ClearColor[2], - color->ClearColor[3]); + _mesa_ClearColor(color->ClearColorUnclamped[0], + color->ClearColorUnclamped[1], + color->ClearColorUnclamped[2], + color->ClearColorUnclamped[3]); _mesa_IndexMask(color->IndexMask); if (!ctx->Extensions.EXT_draw_buffers2) { _mesa_ColorMask((GLboolean) (color->ColorMask[0][0] != 0), @@ -930,7 +930,7 @@ _mesa_PopAttrib(void) _mesa_DrawBuffer(color->DrawBuffer[0]); } _mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled); - _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRef); + _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRefUnclamped); if (ctx->Color.BlendEnabled != color->BlendEnabled) { if (ctx->Extensions.EXT_draw_buffers2) { GLuint i; @@ -976,16 +976,18 @@ _mesa_PopAttrib(void) color->Blend[0].EquationA); } } - _mesa_BlendColor(color->BlendColor[0], - color->BlendColor[1], - color->BlendColor[2], - color->BlendColor[3]); + _mesa_BlendColor(color->BlendColorUnclamped[0], + color->BlendColorUnclamped[1], + color->BlendColorUnclamped[2], + color->BlendColorUnclamped[3]); _mesa_LogicOp(color->LogicOp); _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, color->ColorLogicOpEnabled); _mesa_set_enable(ctx, GL_INDEX_LOGIC_OP, color->IndexLogicOpEnabled); _mesa_set_enable(ctx, GL_DITHER, color->DitherFlag); + _mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, color->ClampFragmentColor); + _mesa_ClampColorARB(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor); } break; case GL_CURRENT_BIT: @@ -1108,6 +1110,7 @@ _mesa_PopAttrib(void) /* materials */ memcpy(&ctx->Light.Material, &light->Material, sizeof(struct gl_material)); + _mesa_ClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, light->ClampVertexColor); } break; case GL_LINE_BIT: diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index c74a168036a..95c101c34ae 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -513,19 +513,24 @@ _mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - tmp[0] = CLAMP( red, 0.0F, 1.0F ); - tmp[1] = CLAMP( green, 0.0F, 1.0F ); - tmp[2] = CLAMP( blue, 0.0F, 1.0F ); - tmp[3] = CLAMP( alpha, 0.0F, 1.0F ); + tmp[0] = red; + tmp[1] = green; + tmp[2] = blue; + tmp[3] = alpha; - if (TEST_EQ_4V(tmp, ctx->Color.BlendColor)) + if (TEST_EQ_4V(tmp, ctx->Color.BlendColorUnclamped)) return; FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4FV( ctx->Color.BlendColor, tmp ); + COPY_4FV( ctx->Color.BlendColorUnclamped, tmp ); + + ctx->Color.BlendColor[0] = CLAMP(tmp[0], 0.0F, 1.0F); + ctx->Color.BlendColor[1] = CLAMP(tmp[1], 0.0F, 1.0F); + ctx->Color.BlendColor[2] = CLAMP(tmp[2], 0.0F, 1.0F); + ctx->Color.BlendColor[3] = CLAMP(tmp[3], 0.0F, 1.0F); if (ctx->Driver.BlendColor) - (*ctx->Driver.BlendColor)(ctx, tmp); + (*ctx->Driver.BlendColor)(ctx, ctx->Color.BlendColor); } @@ -558,17 +563,16 @@ _mesa_AlphaFunc( GLenum func, GLclampf ref ) case GL_NOTEQUAL: case GL_GEQUAL: case GL_ALWAYS: - ref = CLAMP(ref, 0.0F, 1.0F); - - if (ctx->Color.AlphaFunc == func && ctx->Color.AlphaRef == ref) + if (ctx->Color.AlphaFunc == func && ctx->Color.AlphaRefUnclamped == ref) return; /* no change */ FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.AlphaFunc = func; - ctx->Color.AlphaRef = ref; + ctx->Color.AlphaRefUnclamped = ref; + ctx->Color.AlphaRef = CLAMP(ref, 0.0F, 1.0F); if (ctx->Driver.AlphaFunc) - ctx->Driver.AlphaFunc(ctx, func, ref); + ctx->Driver.AlphaFunc(ctx, func, ctx->Color.AlphaRef); return; default: @@ -737,7 +741,7 @@ _mesa_ColorMaskIndexed( GLuint buf, GLboolean red, GLboolean green, } -extern void GLAPIENTRY +void GLAPIENTRY _mesa_ClampColorARB(GLenum target, GLenum clamp) { GET_CURRENT_CONTEXT(ctx); @@ -751,12 +755,15 @@ _mesa_ClampColorARB(GLenum target, GLenum clamp) switch (target) { case GL_CLAMP_VERTEX_COLOR_ARB: + FLUSH_VERTICES(ctx, _NEW_LIGHT); ctx->Light.ClampVertexColor = clamp; break; case GL_CLAMP_FRAGMENT_COLOR_ARB: + FLUSH_VERTICES(ctx, _NEW_FRAG_CLAMP); ctx->Color.ClampFragmentColor = clamp; break; case GL_CLAMP_READ_COLOR_ARB: + FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.ClampReadColor = clamp; break; default: @@ -789,6 +796,7 @@ void _mesa_init_color( struct gl_context * ctx ) memset(ctx->Color.ColorMask, 0xff, sizeof(ctx->Color.ColorMask)); ctx->Color.ClearIndex = 0; ASSIGN_4V( ctx->Color.ClearColor, 0, 0, 0, 0 ); + ASSIGN_4V( ctx->Color.ClearColorUnclamped, 0, 0, 0, 0 ); ctx->Color.AlphaEnabled = GL_FALSE; ctx->Color.AlphaFunc = GL_ALWAYS; ctx->Color.AlphaRef = 0; @@ -802,6 +810,7 @@ void _mesa_init_color( struct gl_context * ctx ) ctx->Color.Blend[i].EquationA = GL_FUNC_ADD; } ASSIGN_4V( ctx->Color.BlendColor, 0.0, 0.0, 0.0, 0.0 ); + ASSIGN_4V( ctx->Color.BlendColorUnclamped, 0.0, 0.0, 0.0, 0.0 ); ctx->Color.IndexLogicOpEnabled = GL_FALSE; ctx->Color.ColorLogicOpEnabled = GL_FALSE; ctx->Color._LogicOpEnabled = GL_FALSE; @@ -816,7 +825,9 @@ void _mesa_init_color( struct gl_context * ctx ) } ctx->Color.ClampFragmentColor = GL_FIXED_ONLY_ARB; + ctx->Color._ClampFragmentColor = GL_TRUE; ctx->Color.ClampReadColor = GL_FIXED_ONLY_ARB; + ctx->Color._ClampReadColor = GL_TRUE; } /*@}*/ diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 43a9ccc116a..fa95e4522f2 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -78,19 +78,27 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - tmp[0] = CLAMP(red, 0.0F, 1.0F); - tmp[1] = CLAMP(green, 0.0F, 1.0F); - tmp[2] = CLAMP(blue, 0.0F, 1.0F); - tmp[3] = CLAMP(alpha, 0.0F, 1.0F); + tmp[0] = red; + tmp[1] = green; + tmp[2] = blue; + tmp[3] = alpha; - if (TEST_EQ_4V(tmp, ctx->Color.ClearColor)) + if (TEST_EQ_4V(tmp, ctx->Color.ClearColorUnclamped)) return; /* no change */ FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4V(ctx->Color.ClearColor, tmp); + COPY_4V(ctx->Color.ClearColorUnclamped, tmp); + + ctx->Color.ClearColor[0] = CLAMP(tmp[0], 0.0F, 1.0F); + ctx->Color.ClearColor[1] = CLAMP(tmp[1], 0.0F, 1.0F); + ctx->Color.ClearColor[2] = CLAMP(tmp[2], 0.0F, 1.0F); + ctx->Color.ClearColor[3] = CLAMP(tmp[3], 0.0F, 1.0F); if (ctx->Driver.ClearColor) { /* it's OK to call glClearColor in CI mode but it should be a NOP */ + /* we pass the clamped color, since all drivers that need this don't + * support GL_ARB_color_buffer_float + */ (*ctx->Driver.ClearColor)(ctx, ctx->Color.ClearColor); } } diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c index d0c865735ac..35b3096f650 100644 --- a/src/mesa/main/colortab.c +++ b/src/mesa/main/colortab.c @@ -516,6 +516,7 @@ _mesa_GetColorTable( GLenum target, GLenum format, struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx); struct gl_color_table *table = NULL; GLfloat rgba[MAX_COLOR_TABLE_SIZE][4]; + GLbitfield transferOps = 0; ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (ctx->NewState) { @@ -618,8 +619,12 @@ _mesa_GetColorTable( GLenum target, GLenum format, if (!data) return; + /* TODO: is this correct? */ + if(ctx->Color._ClampReadColor) + transferOps |= IMAGE_CLAMP_BIT; + _mesa_pack_rgba_span_float(ctx, table->Size, rgba, - format, type, data, &ctx->Pack, 0x0); + format, type, data, &ctx->Pack, transferOps); _mesa_unmap_pbo_dest(ctx, &ctx->Pack); } diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 3de6832d3cd..7e86f1d0ed0 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -388,6 +388,9 @@ typedef enum OPCODE_UNIFORM_3UIV, OPCODE_UNIFORM_4UIV, + /* GL_ARB_color_buffer_float */ + OPCODE_CLAMP_COLOR, + /* GL_EXT_framebuffer_blit */ OPCODE_BLIT_FRAMEBUFFER, @@ -6886,6 +6889,22 @@ save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, } } +static void GLAPIENTRY +save_ClampColorARB(GLenum target, GLenum clamp) +{ + GET_CURRENT_CONTEXT(ctx); + Node *n; + ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); + n = alloc_instruction(ctx, OPCODE_CLAMP_COLOR, 2); + if (n) { + n[1].e = target; + n[2].e = clamp; + } + if (ctx->ExecuteFlag) { + CALL_ClampColorARB(ctx->Exec, (target, clamp)); + } +} + static void GLAPIENTRY save_UseShaderProgramEXT(GLenum type, GLuint program) { @@ -8071,6 +8090,10 @@ execute_list(struct gl_context *ctx, GLuint list) (n[1].i, n[2].i, n[3].b, n[4].data)); break; + case OPCODE_CLAMP_COLOR: + CALL_ClampColorARB(ctx->Exec, (n[1].e, n[2].e)); + break; + case OPCODE_TEX_BUMP_PARAMETER_ATI: { GLfloat values[4]; @@ -9868,6 +9891,10 @@ _mesa_create_save_table(void) SET_UseShaderProgramEXT(table, save_UseShaderProgramEXT); SET_ActiveProgramEXT(table, save_ActiveProgramEXT); + /* GL_ARB_color_buffer_float */ + SET_ClampColorARB(table, save_ClampColorARB); + SET_ClampColor(table, save_ClampColorARB); + /* GL 3.0 */ #if 0 SET_ClearBufferiv(table, save_ClearBufferiv); diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index d0c08ca719a..7844b5060a1 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -79,6 +79,7 @@ static const struct extension extension_table[] = { /* ARB Extensions */ { "GL_ARB_ES2_compatibility", o(ARB_ES2_compatibility), GL, 2009 }, { "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL, 2009 }, + { "GL_ARB_color_buffer_float", o(ARB_color_buffer_float), GL, 2004 }, { "GL_ARB_copy_buffer", o(ARB_copy_buffer), GL, 2008 }, { "GL_ARB_depth_buffer_float", o(ARB_depth_buffer_float), GL, 2008 }, { "GL_ARB_depth_clamp", o(ARB_depth_clamp), GL, 2003 }, diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index 9be531735ed..bf65a4f6485 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -726,7 +726,7 @@ static struct ureg register_input( struct texenv_fragment_program *p, GLuint inp } else { GLuint idx = frag_to_vert_attrib( input ); - return register_param3( p, STATE_INTERNAL, STATE_CURRENT_ATTRIB, idx ); + return register_param3( p, STATE_INTERNAL, STATE_CURRENT_ATTRIB_MAYBE_VP_CLAMPED, idx ); } } @@ -1563,7 +1563,7 @@ create_new_program(struct gl_context *ctx, struct state_key *key, p.program->Base.NumInstructions); if (key->num_draw_buffers && p.program->FogOption) { - _mesa_append_fog_code(ctx, p.program); + _mesa_append_fog_code(ctx, p.program, GL_FALSE); p.program->FogOption = GL_NONE; } diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c index 439232248e6..88aa31a7fcb 100644 --- a/src/mesa/main/fog.c +++ b/src/mesa/main/fog.c @@ -150,6 +150,10 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) if (TEST_EQ_4V(ctx->Fog.Color, params)) return; FLUSH_VERTICES(ctx, _NEW_FOG); + ctx->Fog.ColorUnclamped[0] = params[0]; + ctx->Fog.ColorUnclamped[1] = params[1]; + ctx->Fog.ColorUnclamped[2] = params[2]; + ctx->Fog.ColorUnclamped[3] = params[3]; ctx->Fog.Color[0] = CLAMP(params[0], 0.0F, 1.0F); ctx->Fog.Color[1] = CLAMP(params[1], 0.0F, 1.0F); ctx->Fog.Color[2] = CLAMP(params[2], 0.0F, 1.0F); @@ -189,6 +193,7 @@ void _mesa_init_fog( struct gl_context * ctx ) ctx->Fog.Enabled = GL_FALSE; ctx->Fog.Mode = GL_EXP; ASSIGN_4V( ctx->Fog.Color, 0.0, 0.0, 0.0, 0.0 ); + ASSIGN_4V( ctx->Fog.ColorUnclamped, 0.0, 0.0, 0.0, 0.0 ); ctx->Fog.Index = 0.0; ctx->Fog.Density = 1.0; ctx->Fog.Start = 0.0; diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 81a2a4e7c9f..9090ca661e3 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -131,6 +131,7 @@ enum value_extra { EXTRA_VERSION_32, EXTRA_VERSION_ES2, EXTRA_NEW_BUFFERS, + EXTRA_NEW_FRAG_CLAMP, EXTRA_VALID_DRAW_BUFFER, EXTRA_VALID_TEXTURE_UNIT, EXTRA_FLUSH_CURRENT, @@ -223,6 +224,11 @@ static const int extra_new_buffers[] = { EXTRA_END }; +static const int extra_new_frag_clamp[] = { + EXTRA_NEW_FRAG_CLAMP, + EXTRA_END +}; + static const int extra_valid_draw_buffer[] = { EXTRA_VALID_DRAW_BUFFER, EXTRA_END @@ -374,7 +380,7 @@ static const struct value_desc values[] = { { GL_BLEND, CONTEXT_BIT0(Color.BlendEnabled), NO_EXTRA }, { GL_BLEND_SRC, CONTEXT_ENUM(Color.Blend[0].SrcRGB), NO_EXTRA }, { GL_BLUE_BITS, BUFFER_INT(Visual.blueBits), extra_new_buffers }, - { GL_COLOR_CLEAR_VALUE, CONTEXT_FIELD(Color.ClearColor[0], TYPE_FLOATN_4), NO_EXTRA }, + { GL_COLOR_CLEAR_VALUE, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp }, { GL_COLOR_WRITEMASK, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA }, { GL_CULL_FACE, CONTEXT_BOOL(Polygon.CullFlag), NO_EXTRA }, { GL_CULL_FACE_MODE, CONTEXT_ENUM(Polygon.CullFaceMode), NO_EXTRA }, @@ -511,7 +517,7 @@ static const struct value_desc values[] = { { GL_LIGHT_MODEL_TWO_SIDE, CONTEXT_BOOL(Light.Model.TwoSide), NO_EXTRA }, { GL_ALPHA_TEST, CONTEXT_BOOL(Color.AlphaEnabled), NO_EXTRA }, { GL_ALPHA_TEST_FUNC, CONTEXT_ENUM(Color.AlphaFunc), NO_EXTRA }, - { GL_ALPHA_TEST_REF, CONTEXT_FIELD(Color.AlphaRef, TYPE_FLOATN), NO_EXTRA }, + { GL_ALPHA_TEST_REF, LOC_CUSTOM, TYPE_FLOATN, 0, extra_new_frag_clamp }, { GL_BLEND_DST, CONTEXT_ENUM(Color.Blend[0].DstRGB), NO_EXTRA }, { GL_CLIP_PLANE0, CONTEXT_BIT0(Transform.ClipPlanesEnabled), NO_EXTRA }, { GL_CLIP_PLANE1, CONTEXT_BIT1(Transform.ClipPlanesEnabled), NO_EXTRA }, @@ -530,7 +536,7 @@ static const struct value_desc values[] = { extra_flush_current_valid_texture_unit }, { GL_DISTANCE_ATTENUATION_EXT, CONTEXT_FLOAT3(Point.Params[0]), NO_EXTRA }, { GL_FOG, CONTEXT_BOOL(Fog.Enabled), NO_EXTRA }, - { GL_FOG_COLOR, CONTEXT_FIELD(Fog.Color[0], TYPE_FLOATN_4), NO_EXTRA }, + { GL_FOG_COLOR, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp }, { GL_FOG_DENSITY, CONTEXT_FLOAT(Fog.Density), NO_EXTRA }, { GL_FOG_END, CONTEXT_FLOAT(Fog.End), NO_EXTRA }, { GL_FOG_HINT, CONTEXT_ENUM(Hint.Fog), NO_EXTRA }, @@ -674,7 +680,7 @@ static const struct value_desc values[] = { /* GL_ARB_draw_buffers */ { GL_MAX_DRAW_BUFFERS_ARB, CONTEXT_INT(Const.MaxDrawBuffers), NO_EXTRA }, - { GL_BLEND_COLOR_EXT, CONTEXT_FIELD(Color.BlendColor[0], TYPE_FLOATN_4), NO_EXTRA }, + { GL_BLEND_COLOR_EXT, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp }, /* GL_ARB_fragment_program */ { GL_MAX_TEXTURE_IMAGE_UNITS_ARB, /* == GL_MAX_TEXTURE_IMAGE_UNITS_NV */ CONTEXT_INT(Const.MaxTextureImageUnits), @@ -1219,6 +1225,9 @@ static const struct value_desc values[] = { CONTEXT_INT(Const.MaxVertexVaryingComponents), extra_ARB_geometry_shader4 }, + /* GL_ARB_color_buffer_float */ + { GL_RGBA_FLOAT_MODE_ARB, BUFFER_FIELD(Visual.floatMode, TYPE_BOOLEAN), 0 }, + /* GL_EXT_gpu_shader4 / GL 3.0 */ { GL_MIN_PROGRAM_TEXEL_OFFSET, CONTEXT_INT(Const.MinProgramTexelOffset), @@ -1633,6 +1642,30 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu v->value_int = ctx->Array.ArrayObj->PointSize.BufferObj->Name; break; + case GL_FOG_COLOR: + if(ctx->Color._ClampFragmentColor) + COPY_4FV(v->value_float_4, ctx->Fog.Color); + else + COPY_4FV(v->value_float_4, ctx->Fog.ColorUnclamped); + break; + case GL_COLOR_CLEAR_VALUE: + if(ctx->Color._ClampFragmentColor) + COPY_4FV(v->value_float_4, ctx->Color.ClearColor); + else + COPY_4FV(v->value_float_4, ctx->Color.ClearColorUnclamped); + break; + case GL_BLEND_COLOR_EXT: + if(ctx->Color._ClampFragmentColor) + COPY_4FV(v->value_float_4, ctx->Color.BlendColor); + else + COPY_4FV(v->value_float_4, ctx->Color.BlendColorUnclamped); + break; + case GL_ALPHA_TEST_REF: + if(ctx->Color._ClampFragmentColor) + v->value_float = ctx->Color.AlphaRef; + else + v->value_float = ctx->Color.AlphaRefUnclamped; + break; case GL_MAX_VERTEX_UNIFORM_VECTORS: v->value_int = ctx->Const.VertexProgram.MaxUniformComponents / 4; break; @@ -1687,6 +1720,10 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d enabled++; } break; + case EXTRA_NEW_FRAG_CLAMP: + if (ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP)) + _mesa_update_state(ctx); + break; case EXTRA_VERSION_ES2: if (ctx->API == API_OPENGLES2) { total++; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 39577bb0254..2e3ea5c0c1c 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -691,7 +691,8 @@ struct gl_accum_attrib struct gl_colorbuffer_attrib { GLuint ClearIndex; /**< Index to use for glClear */ - GLclampf ClearColor[4]; /**< Color to use for glClear */ + GLfloat ClearColorUnclamped[4]; /**< Color to use for glClear*/ + GLclampf ClearColor[4]; /**< Color to use for glClear */ GLuint IndexMask; /**< Color index write mask */ GLubyte ColorMask[MAX_DRAW_BUFFERS][4];/**< Each flag is 0xff or 0x0 */ @@ -704,6 +705,7 @@ struct gl_colorbuffer_attrib /*@{*/ GLboolean AlphaEnabled; /**< Alpha test enabled flag */ GLenum AlphaFunc; /**< Alpha test function */ + GLfloat AlphaRefUnclamped; GLclampf AlphaRef; /**< Alpha reference value */ /*@}*/ @@ -712,7 +714,14 @@ struct gl_colorbuffer_attrib */ /*@{*/ GLbitfield BlendEnabled; /**< Per-buffer blend enable flags */ + + /* NOTE: this does _not_ depend on fragment clamping or any other clamping control, + * only on the fixed-pointness of the render target. + * The query does however depend on fragment color clamping. + */ + GLfloat BlendColorUnclamped[4]; /**< Blending color */ GLfloat BlendColor[4]; /**< Blending color */ + struct { GLenum SrcRGB; /**< RGB blend source term */ @@ -741,7 +750,9 @@ struct gl_colorbuffer_attrib GLboolean DitherFlag; /**< Dither enable flag */ GLenum ClampFragmentColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */ + GLboolean _ClampFragmentColor; /** < with GL_FIXED_ONLY_ARB resolved */ GLenum ClampReadColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */ + GLboolean _ClampReadColor; /** < with GL_FIXED_ONLY_ARB resolved */ GLboolean sRGBEnabled; /**< Framebuffer sRGB blending/updating requested */ }; @@ -840,6 +851,7 @@ struct gl_eval_attrib struct gl_fog_attrib { GLboolean Enabled; /**< Fog enabled flag */ + GLfloat ColorUnclamped[4]; /**< Fog color */ GLfloat Color[4]; /**< Fog color */ GLfloat Density; /**< Density >= 0.0 */ GLfloat Start; /**< Start distance in eye coords */ @@ -921,6 +933,7 @@ struct gl_light_attrib GLbitfield ColorMaterialBitmask; /**< bitmask formed from Face and Mode */ GLboolean ColorMaterialEnabled; GLenum ClampVertexColor; + GLboolean _ClampVertexColor; struct gl_light EnabledList; /**< List sentinel */ @@ -1396,7 +1409,8 @@ struct gl_texture_unit GLbitfield _ReallyEnabled; /**< 0 or exactly one of TEXTURE_*_BIT flags */ GLenum EnvMode; /**< GL_MODULATE, GL_DECAL, GL_BLEND, etc. */ - GLfloat EnvColor[4]; + GLclampf EnvColor[4]; + GLfloat EnvColorUnclamped[4]; struct gl_texgen GenS; struct gl_texgen GenT; @@ -2704,6 +2718,7 @@ struct gl_extensions GLboolean dummy_false; /* Set false by _mesa_init_extensions(). */ GLboolean ARB_ES2_compatibility; GLboolean ARB_blend_func_extended; + GLboolean ARB_color_buffer_float; GLboolean ARB_copy_buffer; GLboolean ARB_depth_buffer_float; GLboolean ARB_depth_clamp; @@ -2933,6 +2948,7 @@ struct gl_matrix_stack #define _NEW_PROGRAM (1 << 26) /**< New program/shader state */ #define _NEW_PROGRAM_CONSTANTS (1 << 27) #define _NEW_BUFFER_OBJECT (1 << 28) +#define _NEW_FRAG_CLAMP (1 << 29) #define _NEW_ALL ~0 /*@}*/ diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 512835cb803..02154585aca 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -504,17 +504,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4], luminance = NULL; } - /* XXX - * This test should probably go away. Have the caller set/clear the - * IMAGE_CLAMP_BIT as needed. - */ - if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) { - if (!intDstFormat) { - /* need to clamp to [0, 1] */ - transferOps |= IMAGE_CLAMP_BIT; - } - } - if (transferOps) { _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba); } diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 118ed1d284a..1d1ae47374e 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -445,6 +445,35 @@ update_color(struct gl_context *ctx) ctx->Color._LogicOpEnabled = _mesa_rgba_logicop_enabled(ctx); } +static void +update_clamp_fragment_color(struct gl_context *ctx) +{ + if(ctx->Color.ClampFragmentColor == GL_FIXED_ONLY_ARB) + ctx->Color._ClampFragmentColor = !ctx->DrawBuffer || !ctx->DrawBuffer->Visual.floatMode; + else + ctx->Color._ClampFragmentColor = ctx->Color.ClampFragmentColor; +} + +static void +update_clamp_vertex_color(struct gl_context *ctx) +{ + if(ctx->Light.ClampVertexColor == GL_FIXED_ONLY_ARB) + ctx->Light._ClampVertexColor = !ctx->DrawBuffer || !ctx->DrawBuffer->Visual.floatMode; + else + ctx->Light._ClampVertexColor = ctx->Light.ClampVertexColor; +} + +static void +update_clamp_read_color(struct gl_context *ctx) +{ + if(ctx->Color.ClampReadColor == GL_FIXED_ONLY_ARB) + ctx->Color._ClampReadColor = !ctx->ReadBuffer || !ctx->ReadBuffer->Visual.floatMode; + else + ctx->Color._ClampReadColor = ctx->Color.ClampReadColor; +} + + + /* * Check polygon state and set DD_TRI_CULL_FRONT_BACK and/or DD_TRI_OFFSET @@ -565,7 +594,7 @@ _mesa_update_state_locked( struct gl_context *ctx ) if (ctx->FragmentProgram._MaintainTexEnvProgram) { prog_flags |= (_NEW_BUFFERS | _NEW_TEXTURE | _NEW_FOG | _NEW_ARRAY | _NEW_LIGHT | _NEW_POINT | _NEW_RENDERMODE | - _NEW_PROGRAM); + _NEW_PROGRAM | _NEW_FRAG_CLAMP); } if (ctx->VertexProgram._MaintainTnlProgram) { prog_flags |= (_NEW_ARRAY | _NEW_TEXTURE | _NEW_TEXTURE_MATRIX | @@ -599,6 +628,9 @@ _mesa_update_state_locked( struct gl_context *ctx ) if (new_state & _NEW_LIGHT) _mesa_update_lighting( ctx ); + if (new_state & (_NEW_LIGHT | _NEW_BUFFERS)) + update_clamp_vertex_color(ctx); + if (new_state & (_NEW_STENCIL | _NEW_BUFFERS)) _mesa_update_stencil( ctx ); @@ -617,6 +649,12 @@ _mesa_update_state_locked( struct gl_context *ctx ) if (new_state & _NEW_COLOR) update_color( ctx ); + if (new_state & (_NEW_COLOR | _NEW_BUFFERS)) + update_clamp_read_color(ctx); + + if(new_state & (_NEW_FRAG_CLAMP | _NEW_BUFFERS)) + update_clamp_fragment_color(ctx); + #if 0 if (new_state & (_NEW_POINT | _NEW_LINE | _NEW_POLYGON | _NEW_LIGHT | _NEW_STENCIL | _DD_NEW_SEPARATE_SPECULAR)) diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c index 45a2e195e98..9228e354a4d 100644 --- a/src/mesa/main/texenv.c +++ b/src/mesa/main/texenv.c @@ -35,6 +35,7 @@ #include "main/enums.h" #include "main/macros.h" #include "main/mtypes.h" +#include "main/state.h" #include "main/texenv.h" #include "main/texstate.h" @@ -94,15 +95,14 @@ set_env_color(struct gl_context *ctx, struct gl_texture_unit *texUnit, const GLfloat *color) { - GLfloat tmp[4]; - tmp[0] = CLAMP(color[0], 0.0F, 1.0F); - tmp[1] = CLAMP(color[1], 0.0F, 1.0F); - tmp[2] = CLAMP(color[2], 0.0F, 1.0F); - tmp[3] = CLAMP(color[3], 0.0F, 1.0F); - if (TEST_EQ_4V(tmp, texUnit->EnvColor)) + if (TEST_EQ_4V(color, texUnit->EnvColorUnclamped)) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); - COPY_4FV(texUnit->EnvColor, tmp); + COPY_4FV(texUnit->EnvColorUnclamped, color); + texUnit->EnvColor[0] = CLAMP(color[0], 0.0F, 1.0F); + texUnit->EnvColor[1] = CLAMP(color[1], 0.0F, 1.0F); + texUnit->EnvColor[2] = CLAMP(color[2], 0.0F, 1.0F); + texUnit->EnvColor[3] = CLAMP(color[3], 0.0F, 1.0F); } @@ -758,7 +758,12 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) if (target == GL_TEXTURE_ENV) { if (pname == GL_TEXTURE_ENV_COLOR) { - COPY_4FV( params, texUnit->EnvColor ); + if(ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP)) + _mesa_update_state(ctx); + if(ctx->Color._ClampFragmentColor) + COPY_4FV( params, texUnit->EnvColor ); + else + COPY_4FV( params, texUnit->EnvColorUnclamped ); } else { GLint val = get_texenvi(ctx, texUnit, pname); diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 6e14face4dd..adb6bcebfab 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -38,6 +38,7 @@ #include "main/macros.h" #include "main/mfeatures.h" #include "main/mtypes.h" +#include "main/state.h" #include "main/texcompress.h" #include "main/texparam.h" #include "main/teximage.h" @@ -1107,10 +1108,22 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = ENUM_TO_FLOAT(obj->WrapR); break; case GL_TEXTURE_BORDER_COLOR: - params[0] = CLAMP(obj->BorderColor.f[0], 0.0F, 1.0F); - params[1] = CLAMP(obj->BorderColor.f[1], 0.0F, 1.0F); - params[2] = CLAMP(obj->BorderColor.f[2], 0.0F, 1.0F); - params[3] = CLAMP(obj->BorderColor.f[3], 0.0F, 1.0F); + if(ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP)) + _mesa_update_state_locked(ctx); + if(ctx->Color._ClampFragmentColor) + { + params[0] = CLAMP(obj->BorderColor.f[0], 0.0F, 1.0F); + params[1] = CLAMP(obj->BorderColor.f[1], 0.0F, 1.0F); + params[2] = CLAMP(obj->BorderColor.f[2], 0.0F, 1.0F); + params[3] = CLAMP(obj->BorderColor.f[3], 0.0F, 1.0F); + } + else + { + params[0] = obj->BorderColor.f[0]; + params[1] = obj->BorderColor.f[1]; + params[2] = obj->BorderColor.f[2]; + params[3] = obj->BorderColor.f[3]; + } break; case GL_TEXTURE_RESIDENT: { diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index a10b86e761e..956c7b90a37 100644 --- a/src/mesa/main/version.c +++ b/src/mesa/main/version.c @@ -89,6 +89,8 @@ compute_version(struct gl_context *ctx) ctx->Extensions.EXT_pixel_buffer_object && ctx->Extensions.EXT_texture_sRGB); const GLboolean ver_3_0 = (ver_2_1 && + ctx->Extensions.ARB_color_buffer_float && + ctx->Extensions.ARB_depth_buffer_float && ctx->Extensions.ARB_half_float_pixel && ctx->Extensions.ARB_map_buffer_range && ctx->Extensions.ARB_texture_float && diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c index ca63e72c085..7f778c3c381 100644 --- a/src/mesa/program/arbprogparse.c +++ b/src/mesa/program/arbprogparse.c @@ -144,7 +144,10 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target, * from the fragment shader. */ if (program->FogOption != GL_NONE) { - _mesa_append_fog_code(ctx, program); + /* XXX: we should somehow recompile this to remove clamping if disabled + * On the ATI driver, this is unclampled if fragment clamping is disabled + */ + _mesa_append_fog_code(ctx, program, GL_TRUE); program->FogOption = GL_NONE; } diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c index c310acb01d4..384aa2cb2c6 100644 --- a/src/mesa/program/prog_statevars.c +++ b/src/mesa/program/prog_statevars.c @@ -237,11 +237,17 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], { /* state[1] is the texture unit */ const GLuint unit = (GLuint) state[1]; - COPY_4V(value, ctx->Texture.Unit[unit].EnvColor); + if(ctx->Color._ClampFragmentColor) + COPY_4V(value, ctx->Texture.Unit[unit].EnvColor); + else + COPY_4V(value, ctx->Texture.Unit[unit].EnvColorUnclamped); } return; case STATE_FOG_COLOR: - COPY_4V(value, ctx->Fog.Color); + if(ctx->Color._ClampFragmentColor) + COPY_4V(value, ctx->Fog.Color); + else + COPY_4V(value, ctx->Fog.ColorUnclamped); return; case STATE_FOG_PARAMS: value[0] = ctx->Fog.Density; @@ -399,6 +405,22 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], } return; + case STATE_CURRENT_ATTRIB_MAYBE_VP_CLAMPED: + { + const GLuint idx = (GLuint) state[2]; + if(ctx->Light._ClampVertexColor && + (idx == VERT_ATTRIB_COLOR0 || + idx == VERT_ATTRIB_COLOR1)) { + value[0] = CLAMP(ctx->Current.Attrib[idx][0], 0.0f, 1.0f); + value[1] = CLAMP(ctx->Current.Attrib[idx][1], 0.0f, 1.0f); + value[2] = CLAMP(ctx->Current.Attrib[idx][2], 0.0f, 1.0f); + value[3] = CLAMP(ctx->Current.Attrib[idx][3], 0.0f, 1.0f); + } + else + COPY_4V(value, ctx->Current.Attrib[idx]); + } + return; + case STATE_NORMAL_SCALE: ASSIGN_4V(value, ctx->_ModelViewInvScale, @@ -649,10 +671,12 @@ _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]) return _NEW_LIGHT; case STATE_TEXGEN: - case STATE_TEXENV_COLOR: return _NEW_TEXTURE; + case STATE_TEXENV_COLOR: + return _NEW_TEXTURE | _NEW_BUFFERS | _NEW_FRAG_CLAMP; case STATE_FOG_COLOR: + return _NEW_FOG | _NEW_BUFFERS | _NEW_FRAG_CLAMP; case STATE_FOG_PARAMS: return _NEW_FOG; @@ -688,6 +712,8 @@ _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]) switch (state[1]) { case STATE_CURRENT_ATTRIB: return _NEW_CURRENT_ATTRIB; + case STATE_CURRENT_ATTRIB_MAYBE_VP_CLAMPED: + return _NEW_CURRENT_ATTRIB | _NEW_LIGHT | _NEW_BUFFERS; case STATE_NORMAL_SCALE: return _NEW_MODELVIEW; diff --git a/src/mesa/program/prog_statevars.h b/src/mesa/program/prog_statevars.h index f2407af9c87..9fe8d81b3dd 100644 --- a/src/mesa/program/prog_statevars.h +++ b/src/mesa/program/prog_statevars.h @@ -106,6 +106,7 @@ typedef enum gl_state_index_ { STATE_INTERNAL, /* Mesa additions */ STATE_CURRENT_ATTRIB, /* ctx->Current vertex attrib value */ + STATE_CURRENT_ATTRIB_MAYBE_VP_CLAMPED, /* ctx->Current vertex attrib value after passthrough vertex processing */ STATE_NORMAL_SCALE, STATE_TEXRECT_SCALE, STATE_FOG_PARAMS_OPTIMIZED, /* for faster fog calc */ diff --git a/src/mesa/program/programopt.c b/src/mesa/program/programopt.c index f92881f8337..5ad9571f757 100644 --- a/src/mesa/program/programopt.c +++ b/src/mesa/program/programopt.c @@ -238,7 +238,7 @@ _mesa_insert_mvp_code(struct gl_context *ctx, struct gl_vertex_program *vprog) * to vertex programs too. */ void -_mesa_append_fog_code(struct gl_context *ctx, struct gl_fragment_program *fprog) +_mesa_append_fog_code(struct gl_context *ctx, struct gl_fragment_program *fprog, GLboolean saturate) { static const gl_state_index fogPStateOpt[STATE_LENGTH] = { STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED, 0, 0, 0 }; @@ -290,7 +290,7 @@ _mesa_append_fog_code(struct gl_context *ctx, struct gl_fragment_program *fprog) /* change the instruction to write to colorTemp w/ clamping */ inst->DstReg.File = PROGRAM_TEMPORARY; inst->DstReg.Index = colorTemp; - inst->SaturateMode = SATURATE_ZERO_ONE; + inst->SaturateMode = saturate; /* don't break (may be several writes to result.color) */ } inst++; @@ -300,6 +300,7 @@ _mesa_append_fog_code(struct gl_context *ctx, struct gl_fragment_program *fprog) _mesa_init_instructions(inst, 5); /* emit instructions to compute fog blending factor */ + /* this is always clamped to [0, 1] regardless of fragment clamping */ if (fprog->FogOption == GL_LINEAR) { /* MAD fogFactorTemp.x, fragment.fogcoord.x, fogPRefOpt.x, fogPRefOpt.y; */ inst->Opcode = OPCODE_MAD; diff --git a/src/mesa/program/programopt.h b/src/mesa/program/programopt.h index ef6f1bd0794..79631aa5843 100644 --- a/src/mesa/program/programopt.h +++ b/src/mesa/program/programopt.h @@ -32,7 +32,7 @@ extern void _mesa_insert_mvp_code(struct gl_context *ctx, struct gl_vertex_program *vprog); extern void -_mesa_append_fog_code(struct gl_context *ctx, struct gl_fragment_program *fprog); +_mesa_append_fog_code(struct gl_context *ctx, struct gl_fragment_program *fprog, GLboolean saturate); extern void _mesa_count_texture_indirections(struct gl_program *prog); -- cgit v1.2.3 From 8cbdfe1de4a5793d2d43dca81dd8996419b7aeed Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 29 Mar 2011 13:03:26 +0200 Subject: docs: update GL3 status --- docs/GL3.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/GL3.txt b/docs/GL3.txt index ca265af54d7..c704699f0b1 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -15,7 +15,7 @@ GL 3.0: GLSL changes (GL_EXT_gpu_shader4, etc) not started Conditional rendering (GL_NV_conditional_render) DONE (swrast & softpipe) Map buffer subranges (GL_ARB_map_buffer_range) DONE -Clamping controls (GL_ARB_color_buffer_float) BRANCH ~mareko/mesa floating2 +Clamping controls (GL_ARB_color_buffer_float) DONE Float textures, renderbuffers (GL_ARB_texture_float) BRANCH ~mareko/mesa floating2 GL_EXT_packed_float not started GL_EXT_texture_shared_exponent not started @@ -53,7 +53,7 @@ Primitive restart (GL_NV_primitive_restart) DONE (gallium) Texture buffer objs (GL_ARB_texture_buffer_object) not started Rectangular textures (GL_ARB_texture_rectangle) DONE Uniform buffer objs (GL_ARB_uniform_buffer_object) not started -Signed normalized textures (GL_EXT_texture_snorm) ~50% done +Signed normalized textures (GL_EXT_texture_snorm) DONE (gallium) GL 3.2: -- cgit v1.2.3 From 48f696c79364bc006e77e27de3511b090241080d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 4 Apr 2011 11:16:51 -0600 Subject: docs: update info about Mesa packaging/contents --- docs/download.html | 83 ++++++++++++++++-------------------------------------- 1 file changed, 25 insertions(+), 58 deletions(-) (limited to 'docs') diff --git a/docs/download.html b/docs/download.html index 3cb9423dd91..03fa60b4dc5 100644 --- a/docs/download.html +++ b/docs/download.html @@ -21,76 +21,52 @@ When a new release is coming, release candidates (betas) may be found

    -Mesa is distributed in several parts: +The Mesa package is named MesaLib-x.y.z.{tar.bz2, tar.gz, zip} where x.y.z +is the version. There are three types of compressed archives.

    -
      -
    • MesaLib-x.y.z - the main Mesa library source code, drivers - and documentation. -
    • -
    • MesaDemos-x.y.z - OpenGL demonstration and test programs. - Most of the programs require GLUT (either the - original GLUT by Mark Kilgard or - freeglut or - OpenGLUT). -
    • -
    • MesaGLUT-x.y.z - Mark Kilgard's GLUT, easily compiled and used - with Mesa. Plus, other implementation of GLUT for DOS, OS/2, BeOS, etc. -
    • -
    -

    -If you're not interested in running the demos, you'll only need the first -package. +There's also the MesaGLUT-x.y.z.{tar.bz2, tar.gz, zip} packages which +contain Mark Kilgard's GLUT library. +This is optional. +Most Linux distributions include an implementation of GLUT (such as freeglut).

    -

    -If you're new to this and not sure what you're doing, grab all three packages. +In the past, the Mesa demos collection was distributed as +MesaDemos-x.y.z.{tar.bz2, tar.gz, zip}. +Now, the + +Mesa demos are distributed separately.

    -

    -The packages are available in .tar.gz, .tar.bz2 and .zip formats. -Other sites might offer additional package formats. -

    Unpacking

    -All the packages should be in the same directory prior to unpacking. +To unpack .tar.gz files:

    - -
      -
    • To unpack .tar.gz files:
      -	tar zxf MesaLib-X.Y.tar.gz
      -	tar zxf MesaDemos-X.Y.tar.gz
      -	tar zxf MesaGLUT-X.Y.tar.gz
      +	tar zxf MesaLib-x.y.z.tar.gz
       
      or
      -	gzcat MesaLib-X.Y.tar.gz | tar xf -
      -	gzcat MesaDemos-X.Y.tar.gz | tar xf -
      -	gzcat MesaGLUT-X.Y.tar.gz | tar xf -
      +	gzcat MesaLib-x.y.z.tar.gz | tar xf -
       
      or
      -	gunzip MesaLib-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
      -	gunzip MesaDemos-X.Y.tar.gz ; tar xf MesaDemos-X.Y.tar
      -	gunzip MesaGLUT-X.Y.tar.gz ; tar xf MesaGLUT-X.Y.tar
      +	gunzip MesaLib-x.y.z.tar.gz ; tar xf MesaLib-x.y.z.tar
       
      -
    • To unpack .tar.bz2 files: +

      +To unpack .tar.bz2 files: +

      -	bunzip2 -c MesaLib-X.Y.tar.gz | tar xf -
      -	bunzip2 -c MesaDemos-X.Y.tar.gz | tar xf -
      -	bunzip2 -c MesaGLUT-X.Y.tar.gz | tar xf -
      +	bunzip2 -c MesaLib-x.y.z.tar.gz | tar xf -
       
      -
    • To unpack .zip files: +

      +To unpack .zip files: +

      -	unzip MesaLib-X.Y.zip
      -	unzip MesaDemos-X.Y.zip
      -	unzip MesaGLUT-X.Y.zip
      +	unzip MesaLib-x.y.z.zip
       
      -

    Contents

    @@ -106,22 +82,13 @@ bin/ - shell scripts for making shared libraries, etc docs/ - documentation src/ - source code for libraries src/mesa - sources for the main Mesa library and device drivers +src/gallium - sources for Gallium and Gallium drivers src/glu - libGLU source code src/glx - sources for building libGL with full GLX and DRI support src/glw - Xt/Motif/OpenGL widget code -If you downloaded and unpacked the MesaDemos.X.Y package: - -
    -progs/demos	- original Mesa demos
    -progs/xdemos	- GLX OpenGL/Mesa demos
    -progs/redbook	- examples from the OpenGL Programming Guide
    -progs/samples	- examples from SGI
    -progs/images/	- image files
    -
    - -If you downloaded and unpacked the MesaGLUT.X.Y package: +If you downloaded and unpacked the MesaGLUT.x.y.z package:
     src/glut	- GLUT library source code
     
    -- cgit v1.2.3 From 32a11e5324dcad267d21188ae21bdc8f0b0f29a1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 4 Apr 2011 11:30:46 -0600 Subject: docs: update prerequisites, remove old demo info --- docs/install.html | 104 +++++++++++++----------------------------------------- 1 file changed, 24 insertions(+), 80 deletions(-) (limited to 'docs') diff --git a/docs/install.html b/docs/install.html index 3962ea5c91e..bfa3bb8f842 100644 --- a/docs/install.html +++ b/docs/install.html @@ -12,16 +12,16 @@
    1. Unix / X11
    2. Windows -
    3. SCons +
    4. Building with SCons
    5. Other

    @@ -31,8 +31,22 @@

    1. Unix/X11 Compilation and Installation

    - -

    1.1 Prerequisites for DRI and hardware acceleration

    +
    +

    1.1 General prerequisites for building

    + +
      +
    • lex / yacc - for building the GLSL compiler. +On Linux systems, flex and bison are used. +Versions 2.5.35 and 2.4.1, respectively, (or later) should work. +
    • +
    • python - Python is needed for building the Gallium components. +Version 2.6.4 or later should work. +
    • +
    + + +
    +

    1.2 Prerequisites for DRI and hardware acceleration

    The following are required for DRI-based hardware acceleration with Mesa: @@ -49,7 +63,7 @@ version 2.4.15 or later -

    1.2 Building with Autoconf

    +

    1.3 Building with Autoconf

    Mesa may be built using autoconf. @@ -59,7 +73,7 @@ If that fails the traditional Mesa build system is available. -

    1.3 Building with traditional Makefiles

    +

    1.4 Building with traditional Makefiles

    The traditional Mesa build system is based on a collection of pre-defined @@ -126,7 +140,7 @@ Later, if you want to rebuild for a different configuration run -

    1.4 The libraries

    +

    1.5 The libraries

    When compilation has finished, look in the top-level lib/ @@ -185,81 +199,11 @@ If you built the DRI hardware drivers, you'll also see the DRI drivers: -rwxr-xr-x 1 brian users 10997120 Jul 21 12:13 unichrome_dri.so - - -

    1.5 Running the demos

    - -

    -If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or -obtained Mesa from CVS, the progs/ directory will contain a -bunch of demonstration programs. -

    - -

    -Before running a demo, you'll probably have to set two environment variables -to indicate where the libraries are located. For example: -

    -

    -cd lib/ -
    -export LD_LIBRARY_PATH=${PWD} -
    -export LIBGL_DRIVERS_PATH=${PWD} (if using DRI drivers) -
    -

    -Next, change to the Mesa/demos/ directory: +If you built with Gallium support, look in lib/gallium/ for Gallium-based +versions of libGL and device drivers.

    -
    -cd ../progs/demos -
    -

    -Run a demo such as gears: -

    -
    -./gears -
    - -

    -If this doesn't work, try the Mesa/progs/xdemos/glxinfo program -and see that it prints the expected Mesa version number. -

    - -

    -If you're using Linux or a similar OS, verify that the demo program is -being linked with the proper library files: -

    -
    -ldd gears -
    - -

    -You should see something like this: -

    -
    -        libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
    -        libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
    -        libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
    -        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
    -        libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
    -        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
    -        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
    -        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
    -        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
    -        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
    -        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
    -        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
    -        libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
    -        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
    -        libdl.so.2 => /lib/libdl.so.2 (0x40644000)
    -        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
    -        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
    -
    - -

    -Retrace your steps if this doesn't look right. -

    -- cgit v1.2.3 From 2c8ba760fa7ecb875eafff8afc449c078afdbfc2 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 6 Apr 2011 13:46:20 -0700 Subject: Import 7.10.2 release notes from 7.10 branch --- docs/relnotes-7.10.2.html | 206 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 docs/relnotes-7.10.2.html (limited to 'docs') diff --git a/docs/relnotes-7.10.2.html b/docs/relnotes-7.10.2.html new file mode 100644 index 00000000000..55b6794a1a1 --- /dev/null +++ b/docs/relnotes-7.10.2.html @@ -0,0 +1,206 @@ + + + +Mesa Release Notes + + + + + + + + +

    Mesa 7.10.2 Release Notes / April 6, 2011

    + +

    +Mesa 7.10.2 is a bug fix release which fixes bugs found since the 7.10 release. +

    +

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

    +

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

    + + +

    MD5 checksums

    +
    +2f9f444265534a2cfd9a99d1a8291089  MesaLib-7.10.2.tar.gz
    +f5de82852f1243f42cc004039e10b771  MesaLib-7.10.2.tar.bz2
    +47836e37bab6fcafe3ac90c9544ba0e9  MesaLib-7.10.2.zip
    +175120325828f313621cc5bc6c504803  MesaGLUT-7.10.2.tar.gz
    +8c71d273f5f8d6c5eda4ffc39e0fe03e  MesaGLUT-7.10.2.tar.bz2
    +03036c8efe7b791a90fa0f2c41b43f43  MesaGLUT-7.10.2.zip
    +
    + + +

    New features

    +

    None.

    + +

    Bug fixes

    +

    This list is likely incomplete.

    +
      + +
    • Bug 29172 - Arrandale - Pill Popper Pops Pills
    • + +
    • Bug 31159 - shadow problem in 0ad game
    • + +
    • Bug 32688 - [RADEON:KMS:R300G] some games have a wireframe or outline visible
    • + +
    • Bug 32949 - [glsl wine] Need for Speed renders incorrectly with GLSL enabled
    • + +
    • Bug 34203 - [GLSL] fail to call long chains across shaders
    • + +
    • Bug 34376 - [GLSL] allowing assignment to unsized array +
        +
      • The commit message incorrectly + lists bug + 34367.
      • +
      +
    • + +
    • Bug 34370 - [GLSL] "i<5 && i<4" in for loop fails
    • + +
    • Bug 34374 - [GLSL] fail to redeclare an array using initializer
    • + +
    • Bug 35073 - [GM45] Alpha test is broken when rendering to FBO with no color attachment
    • + +
    • Bug 35483 - util_blit_pixels_writemask: crash in line 322 of src/gallium/auxiliary/util/u_blit.c
    • + + + +
    + + +

    Changes

    +

    The full set of changes can be viewed by using the following GIT command:

    + +
    +  git log mesa-7.10.1..mesa-7.10.2
    +
    + +

    Note: Reverted commits and the reverts are not included in this list.

    + +

    Alex Deucher (2): +

      +
    • r600c: add new ontario pci ids
    • +
    • r600g: add some additional ontario pci ids
    • +

    + +

    Benjamin Franzke (1): +

      +
    • st/dri: Fix surfaceless gl using contexts with previous bound surfaces
    • +

    + +

    Brian Paul (9): +

      +
    • docs: pull 7.9.2 release notes into 7.10 branch
    • +
    • docs: update news.html with 7.10.1 and 7.9.2 releases
    • +
    • docs: fill in 7.10.1 release data
    • +
    • docs: add, fix release notes links
    • +
    • docs: update info about Mesa packaging/contents
    • +
    • docs: update prerequisites, remove old demo info
    • +
    • mesa: Guard against null pointer deref in fbo validation
    • +
    • st/mesa: Apply LOD bias from correct texture unit
    • +
    • glsl: silence warning in printf() with a cast
    • +

    + +

    Chad Versace (1): +

      +
    • i965: Fix tex_swizzle when depth mode is GL_RED
    • +

    + +

    Dave Airlie (1): +

      +
    • r600: don't close fd on failed load
    • +

    + +

    Eric Anholt (2): +

      +
    • i965: Apply a workaround for the Ironlake "vertex flashing".
    • +
    • i965: Fix alpha testing when there is no color buffer in the FBO.
    • +

    + +

    Fabian Bieler (1): +

      +
    • st/mesa: Apply LOD from texture object
    • +

    + +

    Henri Verbeet (1): +

      +
    • st/mesa: Validate state before doing blits.
    • +

    + +

    Ian Romanick (13): +

      +
    • docs: Add 7.10.1 md5sums
    • +
    • glsl: Refactor AST-to-HIR code handling variable initializers
    • +
    • glsl: Refactor AST-to-HIR code handling variable redeclarations
    • +
    • glsl: Process redeclarations before initializers
    • +
    • glsl: Function signatures cannot have NULL return type
    • +
    • glsl: Add several function / call related validations
    • +
    • linker: Add imported functions to the linked IR
    • +
    • glsl: Use insert_before for lists instead of open coding it
    • +
    • glsl: Only allow unsized array assignment in an initializer
    • +
    • glcpp: Refresh autogenerated lexer files
    • +
    • docs: Initial bits of 7.10.2 release notes
    • +
    • mesa: set version string to 7.10.2
    • +
    • mesa: Remove nonexistant files from _FILES lists
    • +

    + +

    Jerome Glisse (1): +

      +
    • r600g: move user fence into base radeon structure
    • +

    + +

    José Fonseca (2): +

      +
    • mesa: Fix typo glGet*v(GL_TEXTURE_COORD_ARRAY_*).
    • +
    • mesa: More glGet* fixes.
    • +

    + +

    Kenneth Graunke (4): +

      +
    • glcpp: Rework lexer to use a SKIP state rather than REJECT.
    • +
    • glcpp: Remove trailing contexts from #if rules.
    • +
    • i965/fs: Fix linear gl_Color interpolation on pre-gen6 hardware.
    • +
    • glsl: Accept precision qualifiers on sampler types, but only in ES.
    • +

    + +

    Marek Olšák (15): +

      +
    • st/mesa: fix crash when DrawBuffer->_ColorDrawBuffers[0] is NULL
    • +
    • st/mesa: fail to alloc a renderbuffer if st_choose_renderbuffer_format fails
    • +
    • r300/compiler: fix the saturate modifier when applied to TEX instructions
    • +
    • r300/compiler: fix translating the src negate bits in pair_translate
    • +
    • r300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)
    • +
    • r300/compiler: TEX instructions don't support negation on source arguments
    • +
    • r300/compiler: do not set TEX_IGNORE_UNCOVERED on r500
    • +
    • r300/compiler: saturate Z before the shadow comparison
    • +
    • r300/compiler: fix equal and notequal shadow compare functions
    • +
    • r300/compiler: remove unused variables
    • +
    • st/mesa: fix crash when using both user and vbo buffers with the same stride
    • +
    • r300g: fix alpha-test with no colorbuffer
    • +
    • r300g: tell the GLSL compiler to lower the continue opcode
    • +
    • r300/compiler: propagate SaturateMode down to the result of shadow comparison
    • +
    • r300/compiler: apply the texture swizzle to shadow pass and fail values too
    • +

    + +

    Michel Dänzer (1): +

      +
    • Use proper source row stride when getting depth/stencil texels.
    • +

    + +

    Tom Stellard (4): +

      +
    • r300/compiler: Use a 4-bit writemask in pair instructions
    • +
    • prog_optimize: Fix reallocating registers for shaders with loops
    • +
    • r300/compiler: Fix vertex shader MAD instructions with constant swizzles
    • +
    • r300/compiler: Don't try to convert RGB to Alpha in full instructions
    • +

    + + + -- cgit v1.2.3 From 130872a2a676bc89d4d936dba418748af08b3743 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 6 Apr 2011 13:41:43 -0700 Subject: docs: update news.html with 7.10.2 release (cherry picked from commit b0866f6cfdfcaf23686b1ae2a99627d468196db2) --- docs/news.html | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/news.html b/docs/news.html index 6a706ab3c56..a6a658aefaf 100644 --- a/docs/news.html +++ b/docs/news.html @@ -11,6 +11,13 @@

    News

    +

    April 6, 2011

    + +

    +Mesa 7.10.2 is released. This is a bug +fix release release. +

    +

    March 2, 2011

    -- cgit v1.2.3 From de4cb19a1c3f166a2ffae3369aa95d3f81198b6b Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 6 Apr 2011 13:46:58 -0700 Subject: mesa: Add link to 7.10.2 release notes --- docs/relnotes.html | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/relnotes.html b/docs/relnotes.html index b0ca3ef4313..c1a7ab78dfd 100644 --- a/docs/relnotes.html +++ b/docs/relnotes.html @@ -14,6 +14,7 @@ The release notes summarize what's new or changed in each Mesa release.

    • 7.11 release notes +
    • 7.10.2 release notes
    • 7.10.1 release notes
    • 7.10 release notes
    • 7.9.2 release notes -- cgit v1.2.3 From 0da2a22ba6cbe6a2175ac47ab4541b1cfa939d1f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 7 Apr 2011 13:56:45 -0600 Subject: docs: replace llvmpipe/README with docs/llvmpipe.html --- docs/contents.html | 1 + docs/llvmpipe.html | 204 ++++++++++++++++++++++++++++++++++++ src/gallium/drivers/llvmpipe/README | 138 ------------------------ 3 files changed, 205 insertions(+), 138 deletions(-) create mode 100644 docs/llvmpipe.html delete mode 100644 src/gallium/drivers/llvmpipe/README (limited to 'docs') diff --git a/docs/contents.html b/docs/contents.html index cf1661e4eac..8fc2ac0da9f 100644 --- a/docs/contents.html +++ b/docs/contents.html @@ -62,6 +62,7 @@ a:visited {
    • Performance Tips
    • Mesa Extensions
    • Function Name Mangling +
    • Gallium llvmpipe driver
    Developer Topics diff --git a/docs/llvmpipe.html b/docs/llvmpipe.html new file mode 100644 index 00000000000..28d7411d434 --- /dev/null +++ b/docs/llvmpipe.html @@ -0,0 +1,204 @@ + + +llvmpipe + + + + + +

    Introduction

    + +

    +The Gallium llvmpipe driver is a software rasterizer that uses LLVM to +do runtime code generation. +Shaders, point/line/triangle rasterization and vertex processing are +implemented with LLVM IR which is translated to x86 or x86-64 machine +code. +Also, the driver is multithreaded to take advantage of multiple CPU cores +(up to 8 at this time). +It's the fastest software rasterizer for Mesa. +

    + + +

    Requirements

    + +
    +
    An x86 or amd64 processor. 64-bit mode is preferred.
    +
    +

    + Support for sse2 is strongly encouraged. Support for ssse3, and sse4.1 will + yield the most efficient code. The less features the CPU has the more + likely is that you ran into underperforming, buggy, or incomplete code. +

    +

    + See /proc/cpuinfo to know what your CPU supports. +

    +
    +
    LLVM. Version 2.8 recommended. 2.6 or later required.
    +
    +

    + NOTE: LLVM 2.8 and earlier will not work on systems that support the + Intel AVX extensions (e.g. Sandybridge). LLVM's code generator will + fail when trying to emit AVX instructions. This was fixed in LLVM 2.9. +

    +

    + For Linux, on a recent Debian based distribution do: +

    +
    +     aptitude install llvm-dev
    +
    + For a RPM-based distribution do: +

    +
    +     yum install llvm-devel
    +
    + +

    + For Windows download pre-built MSVC 9.0 or MinGW binaries from + http://people.freedesktop.org/~jrfonseca/llvm/ and set the LLVM environment + variable to the extracted path. +

    + +

    + For MSVC there are two set of binaries: llvm-x.x-msvc32mt.7z and + llvm-x.x-msvc32mtd.7z . +

    + +

    + You have to set the LLVM=/path/to/llvm-x.x-msvc32mtd env var when passing + debug=yes to scons, and LLVM=/path/to/llvm-x.x-msvc32mt when building with + debug=no. This is necessary as LLVM builds as static library so the chosen + MS CRT must match. +

    +
    + +
    scons (optional)
    +
    + + + +

    Building

    + +To build everything on Linux invoke scons as: + +
    +  scons build=debug libgl-xlib
    +
    + +Alternatively, you can build it with GNU make, if you prefer, by invoking it as + +
    +  make linux-llvm
    +
    + +but the rest of these instructions assume that scons is used. + +For windows is everything the except except the winsys: + +
    +  scons build=debug libgl-gdi
    +
    + + +

    Using

    + +On Linux, building will create a drop-in alternative for libGL.so into + +
    +  build/foo/gallium/targets/libgl-xlib/libGL.so
    +
    +or +
    +  lib/gallium/libGL.so
    +
    + +To use it set the LD_LIBRARY_PATH environment variable accordingly. + +For performance evaluation pass debug=no to scons, and use the corresponding +lib directory without the "-debug" suffix. + +On Windows, building will create a drop-in alternative for opengl32.dll. To use +it put it in the same directory as the application. It can also be used by +replacing the native ICD driver, but it's quite an advanced usage, so if you +need to ask, don't even try it. + + +

    Profiling

    + +To profile llvmpipe you should pass the options + +
    +  scons build=profile 
    +
    + +This will ensure that frame pointers are used both in C and JIT functions, and +that no tail call optimizations are done by gcc. + +To better profile JIT code you'll need to build LLVM with oprofile integration. + +
    +  ./configure \
    +      --prefix=$install_dir \
    +      --enable-optimized \
    +      --disable-profiling \
    +      --enable-targets=host-only \
    +      --with-oprofile
    +
    +  make -C "$build_dir"
    +  make -C "$build_dir" install
    +
    +  find "$install_dir/lib" -iname '*.a' -print0 | xargs -0 strip --strip-debug
    +
    + +The you should define + +
    +  export LLVM=/path/to/llvm-2.6-profile
    +
    + +and rebuild. + + +

    Unit testing

    + +

    +Building will also create several unit tests in +build/linux-???-debug/gallium/drivers/llvmpipe: +

    + + +
  • lp_test_blend: blending +
  • lp_test_conv: SIMD vector conversion +
  • lp_test_format: pixel unpacking/packing + + +

    +Some of this tests can output results and benchmarks to a tab-separated-file +for posterior analysis, e.g.: +

    +
    +  build/linux-x86_64-debug/gallium/drivers/llvmpipe/lp_test_blend -o blend.tsv
    +
    + + +

    Development Notes

    + + diff --git a/src/gallium/drivers/llvmpipe/README b/src/gallium/drivers/llvmpipe/README deleted file mode 100644 index cd0e476e73b..00000000000 --- a/src/gallium/drivers/llvmpipe/README +++ /dev/null @@ -1,138 +0,0 @@ -LLVMPIPE -- a fork of softpipe that employs LLVM for code generation. - - -Requirements -============ - - - A x86 or amd64 processor. 64bit mode is preferred. - - Support for sse2 is strongly encouraged. Support for ssse3, and sse4.1 will - yield the most efficient code. The less features the CPU has the more - likely is that you ran into underperforming, buggy, or incomplete code. - - See /proc/cpuinfo to know what your CPU supports. - - - LLVM. Version 2.8 recommended. 2.6 or later required. - - NOTE: LLVM 2.8 and earlier will not work on systems that support the - Intel AVX extensions (e.g. Sandybridge). LLVM's code generator will - fail when trying to emit AVX instructions. This was fixed in LLVM 2.9. - - For Linux, on a recent Debian based distribution do: - - aptitude install llvm-dev - - For Windows download pre-built MSVC 9.0 or MinGW binaries from - http://people.freedesktop.org/~jrfonseca/llvm/ and set the LLVM environment - variable to the extracted path. - - For MSVC there are two set of binaries: llvm-x.x-msvc32mt.7z and - llvm-x.x-msvc32mtd.7z . - - You have to set the LLVM=/path/to/llvm-x.x-msvc32mtd env var when passing - debug=yes to scons, and LLVM=/path/to/llvm-x.x-msvc32mt when building with - debug=no. This is necessary as LLVM builds as static library so the chosen - MS CRT must match. - - - scons (optional) - - -Building -======== - -To build everything on Linux invoke scons as: - - scons build=debug libgl-xlib - -Alternatively, you can build it with GNU make, if you prefer, by invoking it as - - make linux-llvm - -but the rest of these instructions assume that scons is used. - -For windows is everything the except except the winsys: - - scons build=debug libgl-gdi - -Using -===== - -On Linux, building will create a drop-in alternative for libGL.so into - - build/foo/gallium/targets/libgl-xlib/libGL.so - -To use it set the LD_LIBRARY_PATH environment variable accordingly. - -For performance evaluation pass debug=no to scons, and use the corresponding -lib directory without the "-debug" suffix. - -On Windows, building will create a drop-in alternative for opengl32.dll. To use -it put it in the same directory as the application. It can also be used by -replacing the native ICD driver, but it's quite an advanced usage, so if you -need to ask, don't even try it. - - -Profiling -========= - -To profile llvmpipe you should pass the options - - scons build=profile - -This will ensure that frame pointers are used both in C and JIT functions, and -that no tail call optimizations are done by gcc. - - -To better profile JIT code you'll need to build LLVM with oprofile integration. - - ./configure \ - --prefix=$install_dir \ - --enable-optimized \ - --disable-profiling \ - --enable-targets=host-only \ - --with-oprofile - - make -C "$build_dir" - make -C "$build_dir" install - - find "$install_dir/lib" -iname '*.a' -print0 | xargs -0 strip --strip-debug - -The you should define - - export LLVM=/path/to/llvm-2.6-profile - -and rebuild. - - -Unit testing -============ - -Building will also create several unit tests in -build/linux-???-debug/gallium/drivers/llvmpipe: - - - lp_test_blend: blending - - lp_test_conv: SIMD vector conversion - - lp_test_format: pixel unpacking/packing - -Some of this tests can output results and benchmarks to a tab-separated-file -for posterior analysis, e.g.: - - build/linux-x86_64-debug/gallium/drivers/llvmpipe/lp_test_blend -o blend.tsv - - -Development Notes -================= - -- When looking to this code by the first time start in lp_state_fs.c, and - then skim through the lp_bld_* functions called in there, and the comments - at the top of the lp_bld_*.c functions. - -- The driver-independent parts of the LLVM / Gallium code are found in - src/gallium/auxiliary/gallivm/. The filenames and function prefixes - need to be renamed from "lp_bld_" to something else though. - -- We use LLVM-C bindings for now. They are not documented, but follow the C++ - interfaces very closely, and appear to be complete enough for code - generation. See - http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html - for a stand-alone example. See the llvm-c/Core.h file for reference. -- cgit v1.2.3 From ae5776c41f12515bb73c07ee2a0aed56cdd1a1ef Mon Sep 17 00:00:00 2001 From: Nicolas Kaiser Date: Sun, 10 Apr 2011 09:58:50 -0600 Subject: docs: fix typos in Mesa specs Signed-off-by: Nicolas Kaiser Signed-off-by: Brian Paul --- docs/MESA_agp_offset.spec | 2 +- docs/MESA_drm_image.spec | 4 ++-- docs/MESA_pack_invert.spec | 2 +- docs/MESA_release_buffers.spec | 8 ++++---- docs/MESA_resize_buffers.spec | 4 ++-- docs/MESA_swap_control.spec | 4 ++-- docs/MESA_texture_array.spec | 8 ++++---- docs/MESA_texture_signed_rgba.spec | 4 ++-- docs/MESA_window_pos.spec | 4 ++-- docs/MESA_ycbcr_texture.spec | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) (limited to 'docs') diff --git a/docs/MESA_agp_offset.spec b/docs/MESA_agp_offset.spec index 8dcc72379cd..06e1d902edd 100644 --- a/docs/MESA_agp_offset.spec +++ b/docs/MESA_agp_offset.spec @@ -67,7 +67,7 @@ Additions to Chapter 3 the GLX 1.4 Specification (Functions and Errors) On "PC" computers, AGP memory can be allocated with glXAllocateMemoryNV and freed with glXFreeMemoryNV. Sometimes it's useful to know where a block of AGP memory is located with respect to the start of the AGP - aperature. The function + aperture. The function GLuint glXGetAGPOffsetMESA( const GLvoid *pointer ) diff --git a/docs/MESA_drm_image.spec b/docs/MESA_drm_image.spec index c9853a7fd0f..198de3ec3ce 100644 --- a/docs/MESA_drm_image.spec +++ b/docs/MESA_drm_image.spec @@ -24,7 +24,7 @@ Number Dependencies - Reguires EGL 1.4 or later. This extension is written against the + Requires EGL 1.4 or later. This extension is written against the wording of the EGL 1.4 specification. EGL_KHR_base_image is required. @@ -134,7 +134,7 @@ Issues RESOLVED: The eglQueryImage function has been proposed often, but it goes against the EGLImage design. EGLImages are opaque handles to a 2D array of pixels, which can be passed between - client APIs. By referenceing an EGLImage in a client API, the + client APIs. By referencing an EGLImage in a client API, the EGLImage target (a texture, a renderbuffer or such) can be used to query the attributes of the EGLImage. We don't have a full client API for creating and querying DRM buffers, though, diff --git a/docs/MESA_pack_invert.spec b/docs/MESA_pack_invert.spec index 53d5fca71b0..33fb3c7bf80 100644 --- a/docs/MESA_pack_invert.spec +++ b/docs/MESA_pack_invert.spec @@ -48,7 +48,7 @@ IP Status Issues - 1. Should we also defined UNPACK_INVERT_MESA for glDrawPixels, etc? + 1. Should we also define UNPACK_INVERT_MESA for glDrawPixels, etc? Resolved: No, we're only concerned with pixel packing. There are other solutions for inverting images when using glDrawPixels (negative Y pixel diff --git a/docs/MESA_release_buffers.spec b/docs/MESA_release_buffers.spec index 8db9350d831..52d1e5a9c7c 100644 --- a/docs/MESA_release_buffers.spec +++ b/docs/MESA_release_buffers.spec @@ -31,12 +31,12 @@ Overview Mesa's implementation of GLX is entirely implemented on the client side. Therefore, Mesa cannot immediately detect when an X window or pixmap is - destroyed in order to free any ancilliary data associated with the window + destroyed in order to free any ancillary data associated with the window or pixmap. The glxMesaReleaseBuffers() function can be used to explicitly indicate - when the back color buffer, depth buffer, stencil buffer, and/or accum- - ulation buffer associated with a drawable can be freed. + when the back color buffer, depth buffer, stencil buffer, and/or accumu- + lation buffer associated with a drawable can be freed. IP Status @@ -60,7 +60,7 @@ Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors) Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d ); - causes all software ancilliary buffers (back buffer, depth, stencil, + causes all software ancillary buffers (back buffer, depth, stencil, accum, etc) associated with the named drawable to be immediately deallocated. True is returned if is a valid Mesa GLX drawable, else False is returned. After calling glXReleaseBuffersMESA, the diff --git a/docs/MESA_resize_buffers.spec b/docs/MESA_resize_buffers.spec index 533d017c9a9..dabc7c421da 100644 --- a/docs/MESA_resize_buffers.spec +++ b/docs/MESA_resize_buffers.spec @@ -35,7 +35,7 @@ Overview Mesa's glViewport command queries the current window size and updates its internal data structors accordingly. This normally works fine - since most applications call glViewport in responce to window size + since most applications call glViewport in response to window size changes. In some situations, however, the application may not call glViewport @@ -65,7 +65,7 @@ Additions to the AGL/GLX/WGL Specifications Errors - INVALID_OPERATION is generated if ResizeBuffersMESA is called betweeen + INVALID_OPERATION is generated if glResizeBuffersMESA is called between Begin and End. New State diff --git a/docs/MESA_swap_control.spec b/docs/MESA_swap_control.spec index 856978b535b..a002563c9dc 100644 --- a/docs/MESA_swap_control.spec +++ b/docs/MESA_swap_control.spec @@ -88,8 +88,8 @@ Additions to the GLX 1.3 Specification this is typically the time required to display both the even and odd fields of a frame of video data. - If is set to a value of 0, buffer swaps are not synchron- - ized to a video frame. The value is silently clamped to + If is set to a value of 0, buffer swaps are not synchro- + nized to a video frame. The value is silently clamped to the maximum implementation-dependent value supported before being stored. diff --git a/docs/MESA_texture_array.spec b/docs/MESA_texture_array.spec index 9dee65b045d..b146821f72e 100644 --- a/docs/MESA_texture_array.spec +++ b/docs/MESA_texture_array.spec @@ -328,7 +328,7 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) -- Section 3.8.10 "Texture Completeness" - Change the second paragaph (page 177) to say (spec changes identical + Change the second paragraph (page 177) to say (spec changes identical to EXT_texture_array): "For one-, two-, or three-dimensional textures and one- or @@ -443,10 +443,10 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) Change second through fourth paragraphs (page 188) to say: "Let D_t be the depth texture value, in the range [0, 1]. For - texture lookups from one- and two-dimesional, rectangle, and + texture lookups from one- and two-dimensional, rectangle, and one-dimensional array targets, let R be the interpolated texture coordinate, clamped to the range [0, 1]. For texture lookups - from two-dimesional array texture targets, let R be the interpolated + from two-dimensional array texture targets, let R be the interpolated texture coordinate, clamped to the range [0, 1]. Then the effective texture value L_t, I_t, or A_t is computed as follows: @@ -604,7 +604,7 @@ Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions) -- Section 5.4 "Display Lists" - Change the first paragraphi on page 242 to say (spec changes + Change the first paragraph on page 242 to say (spec changes identical to EXT_texture_array): "TexImage3D, TexImage2D, TexImage1D, Histogram, and ColorTable are diff --git a/docs/MESA_texture_signed_rgba.spec b/docs/MESA_texture_signed_rgba.spec index 49c8e9e5dd4..e3a6b59afac 100644 --- a/docs/MESA_texture_signed_rgba.spec +++ b/docs/MESA_texture_signed_rgba.spec @@ -44,7 +44,7 @@ Overview ARB_texture_compression_rgtc introduces some compressed red and red_green signed formats but no uncompressed ones, which might still be useful. NV_texture_shader adds signed texture formats, - but also a lot of functionality which has been superceded by fragment + but also a lot of functionality which has been superseded by fragment shaders. It is usually possible to get the same functionality using a unsigned format by doing scale and bias in a shader, but this @@ -105,7 +105,7 @@ Issues This is also different to what NV_texture_shader used. The above mapping should be considered the reference, but there is some leeway so other mappings are allowed for implementations which - cannot do this. Particulary the mapping given in NV_texture_shader or + cannot do this. Particularly the mapping given in NV_texture_shader or the standard OpenGL byte/float mapping is considered acceptable too, as might be a mapping which represents -1.0 by -128, 0.0 by 0 and 1.0 by 127 (that is, uses different scale factors for negative and positive diff --git a/docs/MESA_window_pos.spec b/docs/MESA_window_pos.spec index 4d01f1814c1..9e81e9c4db4 100644 --- a/docs/MESA_window_pos.spec +++ b/docs/MESA_window_pos.spec @@ -88,7 +88,7 @@ Additions to Chapter 2 of the OpenGL 1.2 Specification (OpenGL Operation) WindosPos4MESA takes four values indicating x, y, z, and w. WindowPos3MESA (or WindowPos2MESA) is analaguos, but sets only x, y, and z with w implicitly set to 1 (or only x and y with z - implicititly set to 0 and w implicitly set to 1). + implicitly set to 0 and w implicitly set to 1). WindowPosMESA operates like RasterPos except that the current modelview matrix, projection matrix and viewport parameters are ignored and the @@ -108,7 +108,7 @@ GLX Protocol Errors - INVALID_OPERATION is generated if WindowPosMESA is called betweeen + INVALID_OPERATION is generated if WindowPosMESA is called between Begin and End. New State diff --git a/docs/MESA_ycbcr_texture.spec b/docs/MESA_ycbcr_texture.spec index 0fa1f7b39dd..6a730e81ccf 100644 --- a/docs/MESA_ycbcr_texture.spec +++ b/docs/MESA_ycbcr_texture.spec @@ -26,7 +26,7 @@ Number Dependencies OpenGL 1.0 or later is required - This extensions is written against the OpenGL 1.4 Specification. + This extension is written against the OpenGL 1.4 Specification. NV_texture_rectangle effects the definition of this extension. Overview @@ -104,7 +104,7 @@ Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization) In section 3.6.4, Rasterization of Pixel Rectangles, on page 104, - add the following to Table 3.12 (Packed pixel fiedl assignments): + add the following to Table 3.12 (Packed pixel field assignments): First Second Third Fourth Format Element Element Element Element -- cgit v1.2.3 From 82cb6e6519376ea21a9ec4694c6657a1f98c034f Mon Sep 17 00:00:00 2001 From: Nicolas Kaiser Date: Sun, 10 Apr 2011 05:04:44 -0700 Subject: docs: fix typos in wayland spec Signed-off-by: Nicolas Kaiser Signed-off-by: Brian Paul --- docs/WL_bind_wayland_display.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/WL_bind_wayland_display.spec b/docs/WL_bind_wayland_display.spec index 0ff49d6a762..b4e670303d3 100644 --- a/docs/WL_bind_wayland_display.spec +++ b/docs/WL_bind_wayland_display.spec @@ -25,7 +25,7 @@ Number Dependencies - Reguires EGL 1.4 or later. This extension is written against the + Requires EGL 1.4 or later. This extension is written against the wording of the EGL 1.4 specification. EGL_KHR_base_image is required. @@ -40,9 +40,9 @@ Overview provides a new target for eglCreateImageKHR, to create an EGLImage from a wl_buffer - Adding a implementation specific wayland interface, allows the + Adding an implementation specific wayland interface, allows the EGL implementation to define specific wayland requests and events, - needed for buffer sharing in a EGL wayland platform. + needed for buffer sharing in an EGL wayland platform. IP Status -- cgit v1.2.3 From da8d0c965cc71058b570b7e34ba9c03639173da7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 10 Apr 2011 13:06:27 -0600 Subject: docs: GL_ARB_sampler_objects updates --- docs/GL3.txt | 2 +- docs/relnotes-7.11.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/GL3.txt b/docs/GL3.txt index c704699f0b1..339a0cbdff1 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -77,7 +77,7 @@ GLSL 3.30 not started GL_ARB_blend_func_extended not started GL_ARB_explicit_attrib_location DONE (swrast, i915, i965) GL_ARB_occlusion_query2 DONE (swrast, gallium) -GL_ARB_sampler_objects not started +GL_ARB_sampler_objects DONE (gallium) GL_ARB_texture_rgb10_a2ui not started GL_ARB_texture_swizzle DONE (same as EXT version) GL_ARB_timer_query DONE (only Xlib sw driver) diff --git a/docs/relnotes-7.11.html b/docs/relnotes-7.11.html index 277339bc4ce..c8d380e3b8c 100644 --- a/docs/relnotes-7.11.html +++ b/docs/relnotes-7.11.html @@ -41,6 +41,7 @@ tbd
  • GL_ARB_texture_compression_rgtc (gallium r600, swrast)
  • GL_ARB_draw_buffers_blend (gallium)
  • GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965) +
  • GL_ARB_sampler_objects (gallium drivers) -- cgit v1.2.3 From 2d12dbb28d80fb24289fee17a1b4f97708ab2d3e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 1 Apr 2011 01:12:41 +0200 Subject: docs: add patents.txt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to José Fonseca for writing this. --- docs/patents.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/patents.txt (limited to 'docs') diff --git a/docs/patents.txt b/docs/patents.txt new file mode 100644 index 00000000000..fabe214bb4a --- /dev/null +++ b/docs/patents.txt @@ -0,0 +1,31 @@ +ARB_texture_float: + + Silicon Graphics, Inc. owns US Patent #6,650,327, issued November 18, + 2003 [1]. + + SGI believes this patent contains necessary IP for graphics systems + implementing floating point rasterization and floating point + framebuffer capabilities described in ARB_texture_float extension, and + will discuss licensing on RAND terms, on an individual basis with + companies wishing to use this IP in the context of conformant OpenGL + implementations [2]. + + The source code to implement ARB_texture_float extension is included + and can be toggled on at compile time only by those who purchased + a license from SGI, or are in a country where the patent does not + apply. + + 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. + + You should contact a lawyer or SGI's legal department if you want to + enable this extension. + + +[1] http://www.google.com/patents/about?id=mIIOAAAAEBAJ&dq=6650327 +[2] http://www.opengl.org/registry/specs/ARB/texture_float.txt -- cgit v1.2.3 From 397e47868378c386c483fda94631597af6d58405 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 13 Apr 2011 23:48:15 +0200 Subject: docs: update GL3 status --- docs/GL3.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/GL3.txt b/docs/GL3.txt index 339a0cbdff1..e373a945363 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -12,11 +12,11 @@ Feature Status GL 3.0: -GLSL changes (GL_EXT_gpu_shader4, etc) not started +GLSL 1.30 (GL_EXT_gpu_shader4, etc.) not started Conditional rendering (GL_NV_conditional_render) DONE (swrast & softpipe) Map buffer subranges (GL_ARB_map_buffer_range) DONE Clamping controls (GL_ARB_color_buffer_float) DONE -Float textures, renderbuffers (GL_ARB_texture_float) BRANCH ~mareko/mesa floating2 +Float textures, renderbuffers (GL_ARB_texture_float) DONE (gallium r300) GL_EXT_packed_float not started GL_EXT_texture_shared_exponent not started Float depth buffers (GL_ARB_depth_buffer_float) not started @@ -45,7 +45,7 @@ Depth format cube textures 0% done GL 3.1: -GLSL 1.30 and 1.40 not started +GLSL 1.40 not started Instanced drawing (GL_ARB_draw_instanced) DONE (gallium, swrast) Buffer copying (GL_ARB_copy_buffer) DONE Primitive restart (GL_NV_primitive_restart) DONE (gallium) -- cgit v1.2.3 From 93059225633d3e2c69087afb643f4b271545fd71 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 14 Apr 2011 17:27:03 +0200 Subject: docs: update relnotes-7.11 I made a glxinfo diff between 7.10 and master and added missing items and also sorted the list. --- docs/relnotes-7.11.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/relnotes-7.11.html b/docs/relnotes-7.11.html index c8d380e3b8c..131fecd1884 100644 --- a/docs/relnotes-7.11.html +++ b/docs/relnotes-7.11.html @@ -36,12 +36,22 @@ tbd

    New features

      +
    • GL_ARB_color_buffer_float (gallium drivers) +
    • GL_ARB_draw_buffers_blend (gallium)
    • GL_ARB_draw_instanced extension (gallium drivers, swrast)
    • GL_ARB_instanced_arrays extension (gallium drivers) -
    • GL_ARB_texture_compression_rgtc (gallium r600, swrast) -
    • GL_ARB_draw_buffers_blend (gallium) -
    • GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965) +
    • GL_ARB_occlusion_query2 (gallium drivers, swrast)
    • GL_ARB_sampler_objects (gallium drivers) +
    • GL_ARB_texture_compression_rgtc (gallium drivers, swrast) +
    • GL_ARB_texture_float (gallium) +
    • GL_EXT_texture_compression_latc (gallium drivers, swrast) +
    • GL_EXT_texture_compression_rgtc (gallium drivers, swrast) +
    • GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965) +
    • GL_EXT_texture_snorm (gallium drivers) +
    • GL_ATI_draw_buffers (all drivers) +
    • GL_ATI_texture_compression_3dc (gallium drivers, swrast) +
    • GL_ATI_texture_float (gallium) +
    • GL_NV_texture_barrier (gallium drivers)
    -- cgit v1.2.3 From 4ee40c37a0c773954967ade311627f0e46ef1bed Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 16 Apr 2011 09:22:34 +0100 Subject: docs: Undo Marek typo fixes to original text. Not really typos. --- docs/patents.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/patents.txt b/docs/patents.txt index fabe214bb4a..6af830e8287 100644 --- a/docs/patents.txt +++ b/docs/patents.txt @@ -11,9 +11,9 @@ ARB_texture_float: implementations [2]. The source code to implement ARB_texture_float extension is included - and can be toggled on at compile time only by those who purchased - a license from SGI, or are in a country where the patent does not - apply. + and can be toggled on at compile time, for those who purchased a + license from SGI, or are in a country where the this patent do not + apply, etc. The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of -- cgit v1.2.3 From 77db34b50d8d358bdccdcc99a61ca2b40532baab Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 16 Apr 2011 11:14:25 +0100 Subject: docs: Reapply some of Marek's typo fixes. There were some typos too. --- docs/patents.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/patents.txt b/docs/patents.txt index 6af830e8287..3834e255cc9 100644 --- a/docs/patents.txt +++ b/docs/patents.txt @@ -12,8 +12,8 @@ ARB_texture_float: The source code to implement ARB_texture_float extension is included and can be toggled on at compile time, for those who purchased a - license from SGI, or are in a country where the this patent do not - apply, etc. + license from SGI, or are in a country where the patent does not apply, + etc. The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of -- cgit v1.2.3 From 6e13cbcb749c017ebece5dbebb780f67cbc9a15b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 18 Apr 2011 13:44:35 -0700 Subject: docs: Update for Intel ARB_texture_float and ARB_color_buffer_float. Reviewed-by: Brian Paul --- docs/relnotes-7.11.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/relnotes-7.11.html b/docs/relnotes-7.11.html index 131fecd1884..2bd126c6bce 100644 --- a/docs/relnotes-7.11.html +++ b/docs/relnotes-7.11.html @@ -36,21 +36,21 @@ tbd

    New features

      -
    • GL_ARB_color_buffer_float (gallium drivers) +
    • GL_ARB_color_buffer_float (gallium drivers, i965)
    • GL_ARB_draw_buffers_blend (gallium)
    • GL_ARB_draw_instanced extension (gallium drivers, swrast)
    • GL_ARB_instanced_arrays extension (gallium drivers)
    • GL_ARB_occlusion_query2 (gallium drivers, swrast)
    • GL_ARB_sampler_objects (gallium drivers)
    • GL_ARB_texture_compression_rgtc (gallium drivers, swrast) -
    • GL_ARB_texture_float (gallium) +
    • GL_ARB_texture_float (gallium, i965)
    • GL_EXT_texture_compression_latc (gallium drivers, swrast)
    • GL_EXT_texture_compression_rgtc (gallium drivers, swrast)
    • GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965)
    • GL_EXT_texture_snorm (gallium drivers)
    • GL_ATI_draw_buffers (all drivers)
    • GL_ATI_texture_compression_3dc (gallium drivers, swrast) -
    • GL_ATI_texture_float (gallium) +
    • GL_ATI_texture_float (gallium, i965)
    • GL_NV_texture_barrier (gallium drivers)
    -- cgit v1.2.3 From 2ea0aa4cd9eeea17b84860fd5ab7a70aabcf1efc Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 18 Apr 2011 13:45:00 -0700 Subject: docs: Mention that GLSL 1.30 is started. Things definitely remaining todo: switch statements, clip distances. On 965, we also need real integers in the VS, and implementations of some things like isinf/isnan. Reviewed-by: Brian Paul --- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/GL3.txt b/docs/GL3.txt index e373a945363..6eeb9e4f35f 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -12,7 +12,7 @@ Feature Status GL 3.0: -GLSL 1.30 (GL_EXT_gpu_shader4, etc.) not started +GLSL 1.30 (GL_EXT_gpu_shader4, etc.) started Conditional rendering (GL_NV_conditional_render) DONE (swrast & softpipe) Map buffer subranges (GL_ARB_map_buffer_range) DONE Clamping controls (GL_ARB_color_buffer_float) DONE -- cgit v1.2.3 From 7142a67473b4fc77bdd58baf7cced9bfc54ccb73 Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Thu, 21 Apr 2011 23:47:36 -0400 Subject: WL_bind_wayland_display: clarify that context must be NULL --- docs/WL_bind_wayland_display.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/WL_bind_wayland_display.spec b/docs/WL_bind_wayland_display.spec index b4e670303d3..e2fde3c507b 100644 --- a/docs/WL_bind_wayland_display.spec +++ b/docs/WL_bind_wayland_display.spec @@ -82,7 +82,7 @@ Additions to the EGL 1.4 Specification: Import a wl_buffer by calling eglCreateImageKHR with wl_buffer as EGLClientBuffer, EGL_WAYLAND_BUFFER_WL as the target, - and an empty attribute_list. + NULL context and an empty attribute_list. Issues -- cgit v1.2.3