mesa.git
12 years agollvmpipe: always allocate whole miptrees not individual levels
Roland Scheidegger [Mon, 12 Nov 2012 19:08:19 +0000 (20:08 +0100)]
llvmpipe: always allocate whole miptrees not individual levels

This is preparation work for using mip level offsets + base_ptr for texture
sampling instead of per-mip pointers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agoi965: Add comments for each of the surface state table's columns.
Kenneth Graunke [Mon, 12 Nov 2012 19:14:35 +0000 (11:14 -0800)]
i965: Add comments for each of the surface state table's columns.

I can never remember what "AB" means, and having to constantly consult
the docs is annoying.  Just add comments to the top which explain each
of the abbreviations.

12 years agoglapi: Stop handling XML annotation exec="{es,check,loopback}".
Paul Berry [Wed, 7 Nov 2012 17:31:39 +0000 (09:31 -0800)]
glapi: Stop handling XML annotation exec="{es,check,loopback}".

Previously, we used these XML annotations to make the code generation
scripts aware of any instances where the Mesa implementation of a
function had a prefix other than "_mesa_".  Now that all of the mesa
implementation functions have been renamed to match the XML, we only
need to handle exec="skip", exec="dynamic", and the default case of
exec="mesa".

Acked-by: Brian Paul <brianp@vmware.com>
12 years agoglapi: Remove handling of mesa_name XML attribute.
Paul Berry [Wed, 7 Nov 2012 17:29:20 +0000 (09:29 -0800)]
glapi: Remove handling of mesa_name XML attribute.

Previously, we used the mesa_name XML attribute to make the code
generation scripts aware of any instances where the Mesa
implementation of a function had a different function name suffix than
the primary name in the XML.  Now that all of the Mesa implementation
functions have been renamed to match the XML, this attribute is no
longer necessary.

Acked-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Fix const correctness of API implementation functions.
Paul Berry [Tue, 6 Nov 2012 15:26:56 +0000 (07:26 -0800)]
mesa: Fix const correctness of API implementation functions.

This patch changes the use of const in the type signatures of
_mesa_ShaderSource() and _mesa_TransformFeedbackVaryings(), to match
the type signatures in the GL spec.  This avoids warnings when
building the code-generated api_exec.c file.

Note: previously we avoided the build warnings because these functions
were being type-checked against ShaderSourceARB and
TransformFeedbackVaryingsEXT; those functions are semantically
equivalent, but have fewer const qualifiers in their type signatures.

Acked-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Standardize names of OpenGL functions.
Paul Berry [Tue, 6 Nov 2012 16:57:59 +0000 (08:57 -0800)]
mesa: Standardize names of OpenGL functions.

This patch adjusts the aliasing pattern in the GL API description XML,
and the functions that implement the GL API within Mesa, to
consistently follow these naming conventions:

- When several function names are aliases of each other, the primary
  name is the one with no extension suffix (or the name with the
  suffix "ARB", if no unsuffixed name is available).  (By "primary
  name", I mean the name that all the other functions point to using
  the XML "alias" attribute).

- The name of the mesa implementation of each function is the same as
  the primary name, with the prefix "_mesa_".

This patch renames the following mesa functions:
  _check_GetTexGenxvOES => _mesa_GetTexGenxvOES
  _check_TexGenxOES => _mesa_TexGenxOES
  _check_TexGenxvOES => _mesa_TexGenxvOES
  _es_AlphaFuncx => _mesa_AlphaFuncx
  _es_ClearColorx => _mesa_ClearColorx
  _es_ClearDepthx => _mesa_ClearDepthx
  _es_ClipPlanef => _mesa_ClipPlanef
  _es_ClipPlanex => _mesa_ClipPlanex
  _es_Color4x => _mesa_Color4x
  _es_DepthRangex => _mesa_DepthRangex
  _es_DrawTexxOES => _mesa_DrawTexxOES
  _es_DrawTexxvOES => _mesa_DrawTexxvOES
  _es_Fogx => _mesa_Fogx
  _es_Fogxv => _mesa_Fogxv
  _es_Frustumf => _mesa_Frustumf
  _es_Frustumx => _mesa_Frustumx
  _es_GetClipPlanef => _mesa_GetClipPlanef
  _es_GetClipPlanex => _mesa_GetClipPlanex
  _es_GetLightxv => _mesa_GetLightxv
  _es_GetMaterialxv => _mesa_GetMaterialxv
  _es_GetTexEnvxv => _mesa_GetTexEnvxv
  _es_GetTexParameterxv => _mesa_GetTexParameterxv
  _es_LightModelx => _mesa_LightModelx
  _es_LightModelxv => _mesa_LightModelxv
  _es_Lightx => _mesa_Lightx
  _es_Lightxv => _mesa_Lightxv
  _es_LineWidthx => _mesa_LineWidthx
  _es_LoadMatrixx => _mesa_LoadMatrixx
  _es_Materialx => _mesa_Materialx
  _es_Materialxv => _mesa_Materialxv
  _es_MultMatrixx => _mesa_MultMatrixx
  _es_MultiTexCoord4x => _mesa_MultiTexCoord4x
  _es_Normal3x => _mesa_Normal3x
  _es_Orthof => _mesa_Orthof
  _es_Orthox => _mesa_Orthox
  _es_PointParameterx => _mesa_PointParameterx
  _es_PointParameterxv => _mesa_PointParameterxv
  _es_PointSizex => _mesa_PointSizex
  _es_PolygonOffsetx => _mesa_PolygonOffsetx
  _es_QueryMatrixxOES => _mesa_QueryMatrixxOES
  _es_Rotatex => _mesa_Rotatex
  _es_SampleCoveragex => _mesa_SampleCoveragex
  _es_Scalex => _mesa_Scalex
  _es_TexEnvx => _mesa_TexEnvx
  _es_TexEnvxv => _mesa_TexEnvxv
  _es_TexParameterx => _mesa_TexParameterx
  _es_TexParameterxv => _mesa_TexParameterxv
  _es_Translatex => _mesa_Translatex
  _mesa_ActiveTextureARB => _mesa_ActiveTexture
  _mesa_BeginQueryARB => _mesa_BeginQuery
  _mesa_BindAttribLocationARB => _mesa_BindAttribLocation
  _mesa_BindBufferARB => _mesa_BindBuffer
  _mesa_BindFramebufferEXT => _mesa_BindFramebuffer
  _mesa_BindProgram => _mesa_BindProgramARB
  _mesa_BindRenderbufferEXT => _mesa_BindRenderbuffer
  _mesa_BlendEquationSeparateEXT => _mesa_BlendEquationSeparate
  _mesa_BlendEquationSeparatei => _mesa_BlendEquationSeparateiARB
  _mesa_BlendEquationi => _mesa_BlendEquationiARB
  _mesa_BlendFuncSeparateEXT => _mesa_BlendFuncSeparate
  _mesa_BlendFuncSeparatei => _mesa_BlendFuncSeparateiARB
  _mesa_BlendFunci => _mesa_BlendFunciARB
  _mesa_BlitFramebufferEXT => _mesa_BlitFramebuffer
  _mesa_BufferDataARB => _mesa_BufferData
  _mesa_BufferSubDataARB => _mesa_BufferSubData
  _mesa_CheckFramebufferStatusEXT => _mesa_CheckFramebufferStatus
  _mesa_ClampColorARB => _mesa_ClampColor
  _mesa_ClientActiveTextureARB => _mesa_ClientActiveTexture
  _mesa_ColorMaskIndexed => _mesa_ColorMaski
  _mesa_CompileShaderARB => _mesa_CompileShader
  _mesa_CompressedTexImage1DARB => _mesa_CompressedTexImage1D
  _mesa_CompressedTexImage2DARB => _mesa_CompressedTexImage2D
  _mesa_CompressedTexImage3DARB => _mesa_CompressedTexImage3D
  _mesa_CompressedTexSubImage1DARB => _mesa_CompressedTexSubImage1D
  _mesa_CompressedTexSubImage2DARB => _mesa_CompressedTexSubImage2D
  _mesa_CompressedTexSubImage3DARB => _mesa_CompressedTexSubImage3D
  _mesa_DeleteBuffersARB => _mesa_DeleteBuffers
  _mesa_DeleteFramebuffersEXT => _mesa_DeleteFramebuffers
  _mesa_DeletePrograms => _mesa_DeleteProgramsARB
  _mesa_DeleteQueriesARB => _mesa_DeleteQueries
  _mesa_DeleteRenderbuffersEXT => _mesa_DeleteRenderbuffers
  _mesa_DeleteVertexArraysAPPLE => _mesa_DeleteVertexArrays
  _mesa_DisableIndexed => _mesa_Disablei
  _mesa_DisableVertexAttribArrayARB => _mesa_DisableVertexAttribArray
  _mesa_DrawBuffersARB => _mesa_DrawBuffers
  _mesa_DrawTexf => _mesa_DrawTexfOES
  _mesa_DrawTexfv => _mesa_DrawTexfvOES
  _mesa_DrawTexi => _mesa_DrawTexiOES
  _mesa_DrawTexiv => _mesa_DrawTexivOES
  _mesa_DrawTexs => _mesa_DrawTexsOES
  _mesa_DrawTexsv => _mesa_DrawTexsvOES
  _mesa_EnableIndexed => _mesa_Enablei
  _mesa_EnableVertexAttribArrayARB => _mesa_EnableVertexAttribArray
  _mesa_EndQueryARB => _mesa_EndQuery
  _mesa_FogCoordPointerEXT => _mesa_FogCoordPointer
  _mesa_FramebufferRenderbufferEXT => _mesa_FramebufferRenderbuffer
  _mesa_FramebufferTexture1DEXT => _mesa_FramebufferTexture1D
  _mesa_FramebufferTexture2DEXT => _mesa_FramebufferTexture2D
  _mesa_FramebufferTexture3DEXT => _mesa_FramebufferTexture3D
  _mesa_FramebufferTextureLayerEXT => _mesa_FramebufferTextureLayer
  _mesa_GenBuffersARB => _mesa_GenBuffers
  _mesa_GenFramebuffersEXT => _mesa_GenFramebuffers
  _mesa_GenPrograms => _mesa_GenProgramsARB
  _mesa_GenQueriesARB => _mesa_GenQueries
  _mesa_GenRenderbuffersEXT => _mesa_GenRenderbuffers
  _mesa_GenerateMipmapEXT => _mesa_GenerateMipmap
  _mesa_GetActiveAttribARB => _mesa_GetActiveAttrib
  _mesa_GetActiveUniformARB => _mesa_GetActiveUniform
  _mesa_GetAttribLocationARB => _mesa_GetAttribLocation
  _mesa_GetBooleanIndexedv => _mesa_GetBooleani_v
  _mesa_GetBufferParameterivARB => _mesa_GetBufferParameteriv
  _mesa_GetBufferPointervARB => _mesa_GetBufferPointerv
  _mesa_GetBufferSubDataARB => _mesa_GetBufferSubData
  _mesa_GetCompressedTexImageARB => _mesa_GetCompressedTexImage
  _mesa_GetFramebufferAttachmentParameterivEXT => _mesa_GetFramebufferAttachmentParameteriv
  _mesa_GetIntegerIndexedv => _mesa_GetIntegeri_v
  _mesa_GetQueryObjecti64vEXT => _mesa_GetQueryObjecti64v
  _mesa_GetQueryObjectivARB => _mesa_GetQueryObjectiv
  _mesa_GetQueryObjectui64vEXT => _mesa_GetQueryObjectui64v
  _mesa_GetQueryObjectuivARB => _mesa_GetQueryObjectuiv
  _mesa_GetQueryivARB => _mesa_GetQueryiv
  _mesa_GetRenderbufferParameterivEXT => _mesa_GetRenderbufferParameteriv
  _mesa_GetShaderSourceARB => _mesa_GetShaderSource
  _mesa_GetUniformLocationARB => _mesa_GetUniformLocation
  _mesa_GetUniformfvARB => _mesa_GetUniformfv
  _mesa_GetUniformivARB => _mesa_GetUniformiv
  _mesa_GetVertexAttribPointervARB => _mesa_GetVertexAttribPointerv
  _mesa_GetVertexAttribdvARB => _mesa_GetVertexAttribdv
  _mesa_GetVertexAttribfvARB => _mesa_GetVertexAttribfv
  _mesa_GetVertexAttribivARB => _mesa_GetVertexAttribiv
  _mesa_IsBufferARB => _mesa_IsBuffer
  _mesa_IsEnabledIndexed => _mesa_IsEnabledi
  _mesa_IsFramebufferEXT => _mesa_IsFramebuffer
  _mesa_IsQueryARB => _mesa_IsQuery
  _mesa_IsRenderbufferEXT => _mesa_IsRenderbuffer
  _mesa_IsVertexArrayAPPLE => _mesa_IsVertexArray
  _mesa_LinkProgramARB => _mesa_LinkProgram
  _mesa_LoadTransposeMatrixdARB => _mesa_LoadTransposeMatrixd
  _mesa_LoadTransposeMatrixfARB => _mesa_LoadTransposeMatrixf
  _mesa_MapBufferARB => _mesa_MapBuffer
  _mesa_MultTransposeMatrixdARB => _mesa_MultTransposeMatrixd
  _mesa_MultTransposeMatrixfARB => _mesa_MultTransposeMatrixf
  _mesa_MultiDrawArraysEXT => _mesa_MultiDrawArrays
  _mesa_PointSizePointer => _mesa_PointSizePointerOES
  _mesa_ProvokingVertexEXT => _mesa_ProvokingVertex
  _mesa_RenderbufferStorageEXT => _mesa_RenderbufferStorage
  _mesa_SampleCoverageARB => _mesa_SampleCoverage
  _mesa_SecondaryColorPointerEXT => _mesa_SecondaryColorPointer
  _mesa_ShaderSourceARB => _mesa_ShaderSource
  _mesa_Uniform1fARB => _mesa_Uniform1f
  _mesa_Uniform1fvARB => _mesa_Uniform1fv
  _mesa_Uniform1iARB => _mesa_Uniform1i
  _mesa_Uniform1ivARB => _mesa_Uniform1iv
  _mesa_Uniform2fARB => _mesa_Uniform2f
  _mesa_Uniform2fvARB => _mesa_Uniform2fv
  _mesa_Uniform2iARB => _mesa_Uniform2i
  _mesa_Uniform2ivARB => _mesa_Uniform2iv
  _mesa_Uniform3fARB => _mesa_Uniform3f
  _mesa_Uniform3fvARB => _mesa_Uniform3fv
  _mesa_Uniform3iARB => _mesa_Uniform3i
  _mesa_Uniform3ivARB => _mesa_Uniform3iv
  _mesa_Uniform4fARB => _mesa_Uniform4f
  _mesa_Uniform4fvARB => _mesa_Uniform4fv
  _mesa_Uniform4iARB => _mesa_Uniform4i
  _mesa_Uniform4ivARB => _mesa_Uniform4iv
  _mesa_UniformMatrix2fvARB => _mesa_UniformMatrix2fv
  _mesa_UniformMatrix3fvARB => _mesa_UniformMatrix3fv
  _mesa_UniformMatrix4fvARB => _mesa_UniformMatrix4fv
  _mesa_UnmapBufferARB => _mesa_UnmapBuffer
  _mesa_UseProgramObjectARB => _mesa_UseProgram
  _mesa_ValidateProgramARB => _mesa_ValidateProgram
  _mesa_VertexAttribPointerARB => _mesa_VertexAttribPointer
  _mesa_WindowPos2dMESA => _mesa_WindowPos2d
  _mesa_WindowPos2dvMESA => _mesa_WindowPos2dv
  _mesa_WindowPos2fMESA => _mesa_WindowPos2f
  _mesa_WindowPos2fvMESA => _mesa_WindowPos2fv
  _mesa_WindowPos2iMESA => _mesa_WindowPos2i
  _mesa_WindowPos2ivMESA => _mesa_WindowPos2iv
  _mesa_WindowPos2sMESA => _mesa_WindowPos2s
  _mesa_WindowPos2svMESA => _mesa_WindowPos2sv
  _mesa_WindowPos3dMESA => _mesa_WindowPos3d
  _mesa_WindowPos3dvMESA => _mesa_WindowPos3dv
  _mesa_WindowPos3fMESA => _mesa_WindowPos3f
  _mesa_WindowPos3fvMESA => _mesa_WindowPos3fv
  _mesa_WindowPos3iMESA => _mesa_WindowPos3i
  _mesa_WindowPos3ivMESA => _mesa_WindowPos3iv
  _mesa_WindowPos3sMESA => _mesa_WindowPos3s
  _mesa_WindowPos3svMESA => _mesa_WindowPos3sv
  loopback_Color3b_f => _mesa_Color3b
  loopback_Color3bv_f => _mesa_Color3bv
  loopback_Color3d_f => _mesa_Color3d
  loopback_Color3dv_f => _mesa_Color3dv
  loopback_Color3i_f => _mesa_Color3i
  loopback_Color3iv_f => _mesa_Color3iv
  loopback_Color3s_f => _mesa_Color3s
  loopback_Color3sv_f => _mesa_Color3sv
  loopback_Color3ub_f => _mesa_Color3ub
  loopback_Color3ubv_f => _mesa_Color3ubv
  loopback_Color3ui_f => _mesa_Color3ui
  loopback_Color3uiv_f => _mesa_Color3uiv
  loopback_Color3us_f => _mesa_Color3us
  loopback_Color3usv_f => _mesa_Color3usv
  loopback_Color4b_f => _mesa_Color4b
  loopback_Color4bv_f => _mesa_Color4bv
  loopback_Color4d_f => _mesa_Color4d
  loopback_Color4dv_f => _mesa_Color4dv
  loopback_Color4i_f => _mesa_Color4i
  loopback_Color4iv_f => _mesa_Color4iv
  loopback_Color4s_f => _mesa_Color4s
  loopback_Color4sv_f => _mesa_Color4sv
  loopback_Color4ub_f => _mesa_Color4ub
  loopback_Color4ubv_f => _mesa_Color4ubv
  loopback_Color4ui_f => _mesa_Color4ui
  loopback_Color4uiv_f => _mesa_Color4uiv
  loopback_Color4us_f => _mesa_Color4us
  loopback_Color4usv_f => _mesa_Color4usv
  loopback_EdgeFlagv => _mesa_EdgeFlagv
  loopback_EvalCoord1d => _mesa_EvalCoord1d
  loopback_EvalCoord1dv => _mesa_EvalCoord1dv
  loopback_EvalCoord1fv => _mesa_EvalCoord1fv
  loopback_EvalCoord2d => _mesa_EvalCoord2d
  loopback_EvalCoord2dv => _mesa_EvalCoord2dv
  loopback_EvalCoord2fv => _mesa_EvalCoord2fv
  loopback_FogCoorddEXT => _mesa_FogCoordd
  loopback_FogCoorddvEXT => _mesa_FogCoorddv
  loopback_Indexd => _mesa_Indexd
  loopback_Indexdv => _mesa_Indexdv
  loopback_Indexi => _mesa_Indexi
  loopback_Indexiv => _mesa_Indexiv
  loopback_Indexs => _mesa_Indexs
  loopback_Indexsv => _mesa_Indexsv
  loopback_Indexub => _mesa_Indexub
  loopback_Indexubv => _mesa_Indexubv
  loopback_Materialf => _mesa_Materialf
  loopback_Materiali => _mesa_Materiali
  loopback_Materialiv => _mesa_Materialiv
  loopback_MultiTexCoord1dARB => _mesa_MultiTexCoord1d
  loopback_MultiTexCoord1dvARB => _mesa_MultiTexCoord1dv
  loopback_MultiTexCoord1iARB => _mesa_MultiTexCoord1i
  loopback_MultiTexCoord1ivARB => _mesa_MultiTexCoord1iv
  loopback_MultiTexCoord1sARB => _mesa_MultiTexCoord1s
  loopback_MultiTexCoord1svARB => _mesa_MultiTexCoord1sv
  loopback_MultiTexCoord2dARB => _mesa_MultiTexCoord2d
  loopback_MultiTexCoord2dvARB => _mesa_MultiTexCoord2dv
  loopback_MultiTexCoord2iARB => _mesa_MultiTexCoord2i
  loopback_MultiTexCoord2ivARB => _mesa_MultiTexCoord2iv
  loopback_MultiTexCoord2sARB => _mesa_MultiTexCoord2s
  loopback_MultiTexCoord2svARB => _mesa_MultiTexCoord2sv
  loopback_MultiTexCoord3dARB => _mesa_MultiTexCoord3d
  loopback_MultiTexCoord3dvARB => _mesa_MultiTexCoord3dv
  loopback_MultiTexCoord3iARB => _mesa_MultiTexCoord3i
  loopback_MultiTexCoord3ivARB => _mesa_MultiTexCoord3iv
  loopback_MultiTexCoord3sARB => _mesa_MultiTexCoord3s
  loopback_MultiTexCoord3svARB => _mesa_MultiTexCoord3sv
  loopback_MultiTexCoord4dARB => _mesa_MultiTexCoord4d
  loopback_MultiTexCoord4dvARB => _mesa_MultiTexCoord4dv
  loopback_MultiTexCoord4iARB => _mesa_MultiTexCoord4i
  loopback_MultiTexCoord4ivARB => _mesa_MultiTexCoord4iv
  loopback_MultiTexCoord4sARB => _mesa_MultiTexCoord4s
  loopback_MultiTexCoord4svARB => _mesa_MultiTexCoord4sv
  loopback_Normal3b => _mesa_Normal3b
  loopback_Normal3bv => _mesa_Normal3bv
  loopback_Normal3d => _mesa_Normal3d
  loopback_Normal3dv => _mesa_Normal3dv
  loopback_Normal3i => _mesa_Normal3i
  loopback_Normal3iv => _mesa_Normal3iv
  loopback_Normal3s => _mesa_Normal3s
  loopback_Normal3sv => _mesa_Normal3sv
  loopback_Rectd => _mesa_Rectd
  loopback_Rectdv => _mesa_Rectdv
  loopback_Rectfv => _mesa_Rectfv
  loopback_Recti => _mesa_Recti
  loopback_Rectiv => _mesa_Rectiv
  loopback_Rects => _mesa_Rects
  loopback_Rectsv => _mesa_Rectsv
  loopback_SecondaryColor3bEXT_f => _mesa_SecondaryColor3b
  loopback_SecondaryColor3bvEXT_f => _mesa_SecondaryColor3bv
  loopback_SecondaryColor3dEXT_f => _mesa_SecondaryColor3d
  loopback_SecondaryColor3dvEXT_f => _mesa_SecondaryColor3dv
  loopback_SecondaryColor3iEXT_f => _mesa_SecondaryColor3i
  loopback_SecondaryColor3ivEXT_f => _mesa_SecondaryColor3iv
  loopback_SecondaryColor3sEXT_f => _mesa_SecondaryColor3s
  loopback_SecondaryColor3svEXT_f => _mesa_SecondaryColor3sv
  loopback_SecondaryColor3ubEXT_f => _mesa_SecondaryColor3ub
  loopback_SecondaryColor3ubvEXT_f => _mesa_SecondaryColor3ubv
  loopback_SecondaryColor3uiEXT_f => _mesa_SecondaryColor3ui
  loopback_SecondaryColor3uivEXT_f => _mesa_SecondaryColor3uiv
  loopback_SecondaryColor3usEXT_f => _mesa_SecondaryColor3us
  loopback_SecondaryColor3usvEXT_f => _mesa_SecondaryColor3usv
  loopback_TexCoord1d => _mesa_TexCoord1d
  loopback_TexCoord1dv => _mesa_TexCoord1dv
  loopback_TexCoord1i => _mesa_TexCoord1i
  loopback_TexCoord1iv => _mesa_TexCoord1iv
  loopback_TexCoord1s => _mesa_TexCoord1s
  loopback_TexCoord1sv => _mesa_TexCoord1sv
  loopback_TexCoord2d => _mesa_TexCoord2d
  loopback_TexCoord2dv => _mesa_TexCoord2dv
  loopback_TexCoord2i => _mesa_TexCoord2i
  loopback_TexCoord2iv => _mesa_TexCoord2iv
  loopback_TexCoord2s => _mesa_TexCoord2s
  loopback_TexCoord2sv => _mesa_TexCoord2sv
  loopback_TexCoord3d => _mesa_TexCoord3d
  loopback_TexCoord3dv => _mesa_TexCoord3dv
  loopback_TexCoord3i => _mesa_TexCoord3i
  loopback_TexCoord3iv => _mesa_TexCoord3iv
  loopback_TexCoord3s => _mesa_TexCoord3s
  loopback_TexCoord3sv => _mesa_TexCoord3sv
  loopback_TexCoord4d => _mesa_TexCoord4d
  loopback_TexCoord4dv => _mesa_TexCoord4dv
  loopback_TexCoord4i => _mesa_TexCoord4i
  loopback_TexCoord4iv => _mesa_TexCoord4iv
  loopback_TexCoord4s => _mesa_TexCoord4s
  loopback_TexCoord4sv => _mesa_TexCoord4sv
  loopback_Vertex2d => _mesa_Vertex2d
  loopback_Vertex2dv => _mesa_Vertex2dv
  loopback_Vertex2i => _mesa_Vertex2i
  loopback_Vertex2iv => _mesa_Vertex2iv
  loopback_Vertex2s => _mesa_Vertex2s
  loopback_Vertex2sv => _mesa_Vertex2sv
  loopback_Vertex3d => _mesa_Vertex3d
  loopback_Vertex3dv => _mesa_Vertex3dv
  loopback_Vertex3i => _mesa_Vertex3i
  loopback_Vertex3iv => _mesa_Vertex3iv
  loopback_Vertex3s => _mesa_Vertex3s
  loopback_Vertex3sv => _mesa_Vertex3sv
  loopback_Vertex4d => _mesa_Vertex4d
  loopback_Vertex4dv => _mesa_Vertex4dv
  loopback_Vertex4i => _mesa_Vertex4i
  loopback_Vertex4iv => _mesa_Vertex4iv
  loopback_Vertex4s => _mesa_Vertex4s
  loopback_Vertex4sv => _mesa_Vertex4sv
  loopback_VertexAttrib1dARB => _mesa_VertexAttrib1d
  loopback_VertexAttrib1dNV => _mesa_VertexAttrib1dNV
  loopback_VertexAttrib1dvARB => _mesa_VertexAttrib1dv
  loopback_VertexAttrib1dvNV => _mesa_VertexAttrib1dvNV
  loopback_VertexAttrib1sARB => _mesa_VertexAttrib1s
  loopback_VertexAttrib1sNV => _mesa_VertexAttrib1sNV
  loopback_VertexAttrib1svARB => _mesa_VertexAttrib1sv
  loopback_VertexAttrib1svNV => _mesa_VertexAttrib1svNV
  loopback_VertexAttrib2dARB => _mesa_VertexAttrib2d
  loopback_VertexAttrib2dNV => _mesa_VertexAttrib2dNV
  loopback_VertexAttrib2dvARB => _mesa_VertexAttrib2dv
  loopback_VertexAttrib2dvNV => _mesa_VertexAttrib2dvNV
  loopback_VertexAttrib2sARB => _mesa_VertexAttrib2s
  loopback_VertexAttrib2sNV => _mesa_VertexAttrib2sNV
  loopback_VertexAttrib2svARB => _mesa_VertexAttrib2sv
  loopback_VertexAttrib2svNV => _mesa_VertexAttrib2svNV
  loopback_VertexAttrib3dARB => _mesa_VertexAttrib3d
  loopback_VertexAttrib3dNV => _mesa_VertexAttrib3dNV
  loopback_VertexAttrib3dvARB => _mesa_VertexAttrib3dv
  loopback_VertexAttrib3dvNV => _mesa_VertexAttrib3dvNV
  loopback_VertexAttrib3sARB => _mesa_VertexAttrib3s
  loopback_VertexAttrib3sNV => _mesa_VertexAttrib3sNV
  loopback_VertexAttrib3svARB => _mesa_VertexAttrib3sv
  loopback_VertexAttrib3svNV => _mesa_VertexAttrib3svNV
  loopback_VertexAttrib4NbvARB => _mesa_VertexAttrib4Nbv
  loopback_VertexAttrib4NivARB => _mesa_VertexAttrib4Niv
  loopback_VertexAttrib4NsvARB => _mesa_VertexAttrib4Nsv
  loopback_VertexAttrib4NubARB => _mesa_VertexAttrib4Nub
  loopback_VertexAttrib4NubvARB => _mesa_VertexAttrib4Nubv
  loopback_VertexAttrib4NuivARB => _mesa_VertexAttrib4Nuiv
  loopback_VertexAttrib4NusvARB => _mesa_VertexAttrib4Nusv
  loopback_VertexAttrib4bvARB => _mesa_VertexAttrib4bv
  loopback_VertexAttrib4dARB => _mesa_VertexAttrib4d
  loopback_VertexAttrib4dNV => _mesa_VertexAttrib4dNV
  loopback_VertexAttrib4dvARB => _mesa_VertexAttrib4dv
  loopback_VertexAttrib4dvNV => _mesa_VertexAttrib4dvNV
  loopback_VertexAttrib4ivARB => _mesa_VertexAttrib4iv
  loopback_VertexAttrib4sARB => _mesa_VertexAttrib4s
  loopback_VertexAttrib4sNV => _mesa_VertexAttrib4sNV
  loopback_VertexAttrib4svARB => _mesa_VertexAttrib4sv
  loopback_VertexAttrib4svNV => _mesa_VertexAttrib4svNV
  loopback_VertexAttrib4ubNV => _mesa_VertexAttrib4ubNV
  loopback_VertexAttrib4ubvARB => _mesa_VertexAttrib4ubv
  loopback_VertexAttrib4ubvNV => _mesa_VertexAttrib4ubvNV
  loopback_VertexAttrib4uivARB => _mesa_VertexAttrib4uiv
  loopback_VertexAttrib4usvARB => _mesa_VertexAttrib4usv
  loopback_VertexAttribI1iv => _mesa_VertexAttribI1iv
  loopback_VertexAttribI1uiv => _mesa_VertexAttribI1uiv
  loopback_VertexAttribI4bv => _mesa_VertexAttribI4bv
  loopback_VertexAttribI4sv => _mesa_VertexAttribI4sv
  loopback_VertexAttribI4ubv => _mesa_VertexAttribI4ubv
  loopback_VertexAttribI4usv => _mesa_VertexAttribI4usv
  loopback_VertexAttribs1dvNV => _mesa_VertexAttribs1dvNV
  loopback_VertexAttribs1fvNV => _mesa_VertexAttribs1fvNV
  loopback_VertexAttribs1svNV => _mesa_VertexAttribs1svNV
  loopback_VertexAttribs2dvNV => _mesa_VertexAttribs2dvNV
  loopback_VertexAttribs2fvNV => _mesa_VertexAttribs2fvNV
  loopback_VertexAttribs2svNV => _mesa_VertexAttribs2svNV
  loopback_VertexAttribs3dvNV => _mesa_VertexAttribs3dvNV
  loopback_VertexAttribs3fvNV => _mesa_VertexAttribs3fvNV
  loopback_VertexAttribs3svNV => _mesa_VertexAttribs3svNV
  loopback_VertexAttribs4dvNV => _mesa_VertexAttribs4dvNV
  loopback_VertexAttribs4fvNV => _mesa_VertexAttribs4fvNV
  loopback_VertexAttribs4svNV => _mesa_VertexAttribs4svNV
  loopback_VertexAttribs4ubvNV => _mesa_VertexAttribs4ubvNV

And changes the primary name assignment in the XML as follows:
  ActiveTextureARB => ActiveTexture
  AlphaFuncxOES => AlphaFuncx
  BeginConditionalRenderNV => BeginConditionalRender
  BeginQueryARB => BeginQuery
  BeginTransformFeedbackEXT => BeginTransformFeedback
  BindAttribLocationARB => BindAttribLocation
  BindBufferARB => BindBuffer
  BindBufferBaseEXT => BindBufferBase
  BindBufferRangeEXT => BindBufferRange
  BindFragDataLocationEXT => BindFragDataLocation
  BindFramebufferEXT => BindFramebuffer
  BindProgramNV => BindProgramARB
  BindRenderbufferEXT => BindRenderbuffer
  BlendEquationSeparateEXT => BlendEquationSeparate
  BlendFuncSeparateEXT => BlendFuncSeparate
  BlitFramebufferEXT => BlitFramebuffer
  BufferDataARB => BufferData
  BufferSubDataARB => BufferSubData
  CheckFramebufferStatusEXT => CheckFramebufferStatus
  ClampColorARB => ClampColor
  ClearColorxOES => ClearColorx
  ClearDepthxOES => ClearDepthx
  ClientActiveTextureARB => ClientActiveTexture
  ClipPlanefOES => ClipPlanef
  ClipPlanexOES => ClipPlanex
  Color4xOES => Color4x
  ColorMaskIndexedEXT => ColorMaski
  CompileShaderARB => CompileShader
  CompressedTexImage1DARB => CompressedTexImage1D
  CompressedTexImage2DARB => CompressedTexImage2D
  CompressedTexImage3DARB => CompressedTexImage3D
  CompressedTexSubImage1DARB => CompressedTexSubImage1D
  CompressedTexSubImage2DARB => CompressedTexSubImage2D
  CompressedTexSubImage3DARB => CompressedTexSubImage3D
  DeleteBuffersARB => DeleteBuffers
  DeleteFramebuffersEXT => DeleteFramebuffers
  DeleteProgramsNV => DeleteProgramsARB
  DeleteQueriesARB => DeleteQueries
  DeleteRenderbuffersEXT => DeleteRenderbuffers
  DeleteVertexArraysAPPLE => DeleteVertexArrays
  DepthRangexOES => DepthRangex
  DisableIndexedEXT => Disablei
  DisableVertexAttribArrayARB => DisableVertexAttribArray
  DrawBuffersARB => DrawBuffers
  EnableIndexedEXT => Enablei
  EnableVertexAttribArrayARB => EnableVertexAttribArray
  EndConditionalRenderNV => EndConditionalRender
  EndQueryARB => EndQuery
  EndTransformFeedbackEXT => EndTransformFeedback
  FogCoordPointerEXT => FogCoordPointer
  FogCoorddEXT => FogCoordd
  FogCoorddvEXT => FogCoorddv
  FogxOES => Fogx
  FogxvOES => Fogxv
  FramebufferRenderbufferEXT => FramebufferRenderbuffer
  FramebufferTexture1DEXT => FramebufferTexture1D
  FramebufferTexture2DEXT => FramebufferTexture2D
  FramebufferTexture3DEXT => FramebufferTexture3D
  FramebufferTextureLayerEXT => FramebufferTextureLayer
  FrustumfOES => Frustumf
  FrustumxOES => Frustumx
  GenBuffersARB => GenBuffers
  GenFramebuffersEXT => GenFramebuffers
  GenProgramsNV => GenProgramsARB
  GenQueriesARB => GenQueries
  GenRenderbuffersEXT => GenRenderbuffers
  GenerateMipmapEXT => GenerateMipmap
  GetActiveAttribARB => GetActiveAttrib
  GetActiveUniformARB => GetActiveUniform
  GetAttribLocationARB => GetAttribLocation
  GetBooleanIndexedvEXT => GetBooleani_v
  GetBufferParameterivARB => GetBufferParameteriv
  GetBufferPointervARB => GetBufferPointerv
  GetBufferSubDataARB => GetBufferSubData
  GetClipPlanefOES => GetClipPlanef
  GetClipPlanexOES => GetClipPlanex
  GetCompressedTexImageARB => GetCompressedTexImage
  GetFixedvOES => GetFixedv
  GetFragDataLocationEXT => GetFragDataLocation
  GetFramebufferAttachmentParameterivEXT => GetFramebufferAttachmentParameteriv
  GetIntegerIndexedvEXT => GetIntegeri_v
  GetLightxvOES => GetLightxv
  GetMaterialxvOES => GetMaterialxv
  GetQueryObjecti64vEXT => GetQueryObjecti64v
  GetQueryObjectivARB => GetQueryObjectiv
  GetQueryObjectui64vEXT => GetQueryObjectui64v
  GetQueryObjectuivARB => GetQueryObjectuiv
  GetQueryivARB => GetQueryiv
  GetRenderbufferParameterivEXT => GetRenderbufferParameteriv
  GetShaderSourceARB => GetShaderSource
  GetTexEnvxvOES => GetTexEnvxv
  GetTexParameterIivEXT => GetTexParameterIiv
  GetTexParameterIuivEXT => GetTexParameterIuiv
  GetTexParameterxvOES => GetTexParameterxv
  GetTransformFeedbackVaryingEXT => GetTransformFeedbackVarying
  GetUniformLocationARB => GetUniformLocation
  GetUniformfvARB => GetUniformfv
  GetUniformivARB => GetUniformiv
  GetUniformuivEXT => GetUniformuiv
  GetVertexAttribIivEXT => GetVertexAttribIiv
  GetVertexAttribIuivEXT => GetVertexAttribIuiv
  GetVertexAttribPointervNV => GetVertexAttribPointerv
  GetVertexAttribdvARB => GetVertexAttribdv
  GetVertexAttribfvARB => GetVertexAttribfv
  GetVertexAttribivARB => GetVertexAttribiv
  IsBufferARB => IsBuffer
  IsEnabledIndexedEXT => IsEnabledi
  IsFramebufferEXT => IsFramebuffer
  IsProgramNV => IsProgramARB
  IsQueryARB => IsQuery
  IsRenderbufferEXT => IsRenderbuffer
  IsVertexArrayAPPLE => IsVertexArray
  LightModelxOES => LightModelx
  LightModelxvOES => LightModelxv
  LightxOES => Lightx
  LightxvOES => Lightxv
  LineWidthxOES => LineWidthx
  LinkProgramARB => LinkProgram
  LoadMatrixxOES => LoadMatrixx
  LoadTransposeMatrixdARB => LoadTransposeMatrixd
  LoadTransposeMatrixfARB => LoadTransposeMatrixf
  MapBufferARB => MapBuffer
  MaterialxOES => Materialx
  MaterialxvOES => Materialxv
  MultMatrixxOES => MultMatrixx
  MultTransposeMatrixdARB => MultTransposeMatrixd
  MultTransposeMatrixfARB => MultTransposeMatrixf
  MultiDrawArraysEXT => MultiDrawArrays
  MultiTexCoord1dARB => MultiTexCoord1d
  MultiTexCoord1dvARB => MultiTexCoord1dv
  MultiTexCoord1iARB => MultiTexCoord1i
  MultiTexCoord1ivARB => MultiTexCoord1iv
  MultiTexCoord1sARB => MultiTexCoord1s
  MultiTexCoord1svARB => MultiTexCoord1sv
  MultiTexCoord2dARB => MultiTexCoord2d
  MultiTexCoord2dvARB => MultiTexCoord2dv
  MultiTexCoord2iARB => MultiTexCoord2i
  MultiTexCoord2ivARB => MultiTexCoord2iv
  MultiTexCoord2sARB => MultiTexCoord2s
  MultiTexCoord2svARB => MultiTexCoord2sv
  MultiTexCoord3dARB => MultiTexCoord3d
  MultiTexCoord3dvARB => MultiTexCoord3dv
  MultiTexCoord3iARB => MultiTexCoord3i
  MultiTexCoord3ivARB => MultiTexCoord3iv
  MultiTexCoord3sARB => MultiTexCoord3s
  MultiTexCoord3svARB => MultiTexCoord3sv
  MultiTexCoord4dARB => MultiTexCoord4d
  MultiTexCoord4dvARB => MultiTexCoord4dv
  MultiTexCoord4iARB => MultiTexCoord4i
  MultiTexCoord4ivARB => MultiTexCoord4iv
  MultiTexCoord4sARB => MultiTexCoord4s
  MultiTexCoord4svARB => MultiTexCoord4sv
  MultiTexCoord4xOES => MultiTexCoord4x
  Normal3xOES => Normal3x
  OrthofOES => Orthof
  OrthoxOES => Orthox
  PointParameterfEXT => PointParameterf
  PointParameterfvEXT => PointParameterfv
  PointParameteriNV => PointParameteri
  PointParameterivNV => PointParameteriv
  PointParameterxOES => PointParameterx
  PointParameterxvOES => PointParameterxv
  PointSizexOES => PointSizex
  PolygonOffsetxOES => PolygonOffsetx
  PrimitiveRestartIndexNV => PrimitiveRestartIndex
  ProvokingVertexEXT => ProvokingVertex
  RenderbufferStorageEXT => RenderbufferStorage
  RotatexOES => Rotatex
  SampleCoverageARB => SampleCoverage
  SampleCoveragexOES => SampleCoveragex
  ScalexOES => Scalex
  SecondaryColor3bEXT => SecondaryColor3b
  SecondaryColor3bvEXT => SecondaryColor3bv
  SecondaryColor3dEXT => SecondaryColor3d
  SecondaryColor3dvEXT => SecondaryColor3dv
  SecondaryColor3iEXT => SecondaryColor3i
  SecondaryColor3ivEXT => SecondaryColor3iv
  SecondaryColor3sEXT => SecondaryColor3s
  SecondaryColor3svEXT => SecondaryColor3sv
  SecondaryColor3ubEXT => SecondaryColor3ub
  SecondaryColor3ubvEXT => SecondaryColor3ubv
  SecondaryColor3uiEXT => SecondaryColor3ui
  SecondaryColor3uivEXT => SecondaryColor3uiv
  SecondaryColor3usEXT => SecondaryColor3us
  SecondaryColor3usvEXT => SecondaryColor3usv
  SecondaryColorPointerEXT => SecondaryColorPointer
  ShaderSourceARB => ShaderSource
  TexBufferARB => TexBuffer
  TexEnvxOES => TexEnvx
  TexEnvxvOES => TexEnvxv
  TexParameterIivEXT => TexParameterIiv
  TexParameterIuivEXT => TexParameterIuiv
  TexParameterxOES => TexParameterx
  TexParameterxvOES => TexParameterxv
  TransformFeedbackVaryingsEXT => TransformFeedbackVaryings
  TranslatexOES => Translatex
  Uniform1fARB => Uniform1f
  Uniform1fvARB => Uniform1fv
  Uniform1iARB => Uniform1i
  Uniform1ivARB => Uniform1iv
  Uniform1uiEXT => Uniform1ui
  Uniform1uivEXT => Uniform1uiv
  Uniform2fARB => Uniform2f
  Uniform2fvARB => Uniform2fv
  Uniform2iARB => Uniform2i
  Uniform2ivARB => Uniform2iv
  Uniform2uiEXT => Uniform2ui
  Uniform2uivEXT => Uniform2uiv
  Uniform3fARB => Uniform3f
  Uniform3fvARB => Uniform3fv
  Uniform3iARB => Uniform3i
  Uniform3ivARB => Uniform3iv
  Uniform3uiEXT => Uniform3ui
  Uniform3uivEXT => Uniform3uiv
  Uniform4fARB => Uniform4f
  Uniform4fvARB => Uniform4fv
  Uniform4iARB => Uniform4i
  Uniform4ivARB => Uniform4iv
  Uniform4uiEXT => Uniform4ui
  Uniform4uivEXT => Uniform4uiv
  UniformMatrix2fvARB => UniformMatrix2fv
  UniformMatrix3fvARB => UniformMatrix3fv
  UniformMatrix4fvARB => UniformMatrix4fv
  UnmapBufferARB => UnmapBuffer
  UseProgramObjectARB => UseProgram
  ValidateProgramARB => ValidateProgram
  VertexAttrib1dARB => VertexAttrib1d
  VertexAttrib1dvARB => VertexAttrib1dv
  VertexAttrib1sARB => VertexAttrib1s
  VertexAttrib1svARB => VertexAttrib1sv
  VertexAttrib2dARB => VertexAttrib2d
  VertexAttrib2dvARB => VertexAttrib2dv
  VertexAttrib2sARB => VertexAttrib2s
  VertexAttrib2svARB => VertexAttrib2sv
  VertexAttrib3dARB => VertexAttrib3d
  VertexAttrib3dvARB => VertexAttrib3dv
  VertexAttrib3sARB => VertexAttrib3s
  VertexAttrib3svARB => VertexAttrib3sv
  VertexAttrib4NbvARB => VertexAttrib4Nbv
  VertexAttrib4NivARB => VertexAttrib4Niv
  VertexAttrib4NsvARB => VertexAttrib4Nsv
  VertexAttrib4NubARB => VertexAttrib4Nub
  VertexAttrib4NubvARB => VertexAttrib4Nubv
  VertexAttrib4NuivARB => VertexAttrib4Nuiv
  VertexAttrib4NusvARB => VertexAttrib4Nusv
  VertexAttrib4bvARB => VertexAttrib4bv
  VertexAttrib4dARB => VertexAttrib4d
  VertexAttrib4dvARB => VertexAttrib4dv
  VertexAttrib4ivARB => VertexAttrib4iv
  VertexAttrib4sARB => VertexAttrib4s
  VertexAttrib4svARB => VertexAttrib4sv
  VertexAttrib4ubvARB => VertexAttrib4ubv
  VertexAttrib4uivARB => VertexAttrib4uiv
  VertexAttrib4usvARB => VertexAttrib4usv
  VertexAttribDivisorARB => VertexAttribDivisor
  VertexAttribI1ivEXT => VertexAttribI1iv
  VertexAttribI1uivEXT => VertexAttribI1uiv
  VertexAttribI4bvEXT => VertexAttribI4bv
  VertexAttribI4svEXT => VertexAttribI4sv
  VertexAttribI4ubvEXT => VertexAttribI4ubv
  VertexAttribI4usvEXT => VertexAttribI4usv
  VertexAttribIPointerEXT => VertexAttribIPointer
  VertexAttribPointerARB => VertexAttribPointer
  WindowPos2dMESA => WindowPos2d
  WindowPos2dvMESA => WindowPos2dv
  WindowPos2fMESA => WindowPos2f
  WindowPos2fvMESA => WindowPos2fv
  WindowPos2iMESA => WindowPos2i
  WindowPos2ivMESA => WindowPos2iv
  WindowPos2sMESA => WindowPos2s
  WindowPos2svMESA => WindowPos2sv
  WindowPos3dMESA => WindowPos3d
  WindowPos3dvMESA => WindowPos3dv
  WindowPos3fMESA => WindowPos3f
  WindowPos3fvMESA => WindowPos3fv
  WindowPos3iMESA => WindowPos3i
  WindowPos3ivMESA => WindowPos3iv
  WindowPos3sMESA => WindowPos3s
  WindowPos3svMESA => WindowPos3sv

Acked-by: Brian Paul <brianp@vmware.com>
12 years agoradeonsi: Implement alpha testing in pixel shader.
Michel Dänzer [Fri, 2 Nov 2012 14:57:30 +0000 (15:57 +0100)]
radeonsi: Implement alpha testing in pixel shader.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agoradeonsi: Initialize uses_kill boolean from TGSI info.
Michel Dänzer [Wed, 7 Nov 2012 16:33:08 +0000 (17:33 +0100)]
radeonsi: Initialize uses_kill boolean from TGSI info.

Fixes discarded pixels incorrectly updating the depth buffer.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agoglsl: store read vector in a temp in vec_index_to_cond
Vincent Lejeune [Sun, 4 Nov 2012 22:04:30 +0000 (23:04 +0100)]
glsl: store read vector in a temp in vec_index_to_cond

Vector indexing on matrixes generates several copy of the
constant matrix, for instance vec=mat4[i][j] generates :
vec=mat4[i].x;
vec=(j==1)?mat4[i].y;
vec=(j==2)?mat4[i].z;
vec=(j==3)?mat4[i].w;
In the case of constant matrixes, the mat4[i] expression generates
copy of the 16 elements of the matrix 4 times ; indirect addressing
also prevents some conservative CSE algorithms (like the one in LLVM)
from factoring the mat4[i] expression.
This patch will make the vec_index_to_cond pass generates :
temp = mat4[i];
vec=temp.x;
vec=(j==1)?temp.y;
vec=(j==2)?temp.z;
vec=(j==3)?temp.w;

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agogallium/u_blitter: handle PIPE_TEXTURE_CUBE_ARRAY in is_box_inside_resource
Marek Olšák [Sun, 11 Nov 2012 12:33:01 +0000 (13:33 +0100)]
gallium/u_blitter: handle PIPE_TEXTURE_CUBE_ARRAY in is_box_inside_resource

12 years agobuild: fix enable/disable language in ./configure --help
Andreas Boll [Sat, 10 Nov 2012 16:58:49 +0000 (17:58 +0100)]
build: fix enable/disable language in ./configure --help

Based on patch from Brian Paul.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32317
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Fix AA Line Distance Mode in 3DSTATE_SF on Ivybridge.
Kenneth Graunke [Thu, 8 Nov 2012 12:13:26 +0000 (04:13 -0800)]
i965: Fix AA Line Distance Mode in 3DSTATE_SF on Ivybridge.

We were accidentally setting bit 14 in DWord 2 (which is Reserved/MBZ)
rather than bit 14 in DWord 3 (which is AA Line Distance Mode).

There's also no reason to ever set it to legacy mode; the bit is only
used when drawing antialiased lines anyway.  Set it unconditionally.

NOTE: This is a candidate for stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agodri_util: Fix prologue comment for driCreateConfigs
Ian Romanick [Tue, 30 Oct 2012 23:55:37 +0000 (16:55 -0700)]
dri_util: Fix prologue comment for driCreateConfigs

The parameters and operation of this function changed, but I didn't
bother to change the prologue comment.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoswrast: swrastFillInModes doesn't do 8-bit modes, so don't try
Ian Romanick [Tue, 30 Oct 2012 17:38:54 +0000 (10:38 -0700)]
swrast: swrastFillInModes doesn't do 8-bit modes, so don't try

Support for 8-bit modes was removed in commits 0398a26 and bda208a4.
However, I didn't notice code in dri_init_screen that explicitly tries
to create this modes.  This is structurally different from other drivers
(that only create modes that match the display color depth).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56555
Cc: Vinson Lee <vlee@freedesktop.org>
12 years agoFix use of glsl_parser.{cc,h} where source dir != build dir.
Darren Salt [Mon, 5 Nov 2012 21:26:47 +0000 (21:26 +0000)]
Fix use of glsl_parser.{cc,h} where source dir != build dir.

Fixes a regression caused by commit 9948a3365.

https://bugs.freedesktop.org/show_bug.cgi?id=56787
https://bugs.freedesktop.org/show_bug.cgi?id=56685
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoRevert "mesa: assert that key->fragprog_inputs_read value isn't too large"
Brian Paul [Fri, 9 Nov 2012 21:35:07 +0000 (14:35 -0700)]
Revert "mesa: assert that key->fragprog_inputs_read value isn't too large"

This reverts commit 0d61f879a1f2e6bb37368731a29d5267e1c25195.

Assigning the FS inputs to the 12 bit field is fine since we don't care
about the higher FS inputs.  Maybe I'll revisit silencing the compiler
warning another day.

12 years agoglcpp: wire up glcpp-test to make check
Matt Turner [Wed, 7 Nov 2012 21:58:14 +0000 (13:58 -0800)]
glcpp: wire up glcpp-test to make check

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglcpp/tests: Add tests for multiline #elif
Matt Turner [Wed, 7 Nov 2012 00:24:32 +0000 (16:24 -0800)]
glcpp/tests: Add tests for multiline #elif

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglcpp/tests: Add test for multiline #if
Matt Turner [Wed, 7 Nov 2012 00:24:10 +0000 (16:24 -0800)]
glcpp/tests: Add test for multiline #if

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglcpp/tests: Add test for multiline #line
Matt Turner [Wed, 7 Nov 2012 00:16:02 +0000 (16:16 -0800)]
glcpp/tests: Add test for multiline #line

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglcpp/tests: Add test to check #line followed by code
Matt Turner [Tue, 6 Nov 2012 23:36:15 +0000 (15:36 -0800)]
glcpp/tests: Add test to check #line followed by code

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51802
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51506
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41152
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglcpp: don't push #line directives into next line
Fabian Bieler [Tue, 24 Jul 2012 13:36:46 +0000 (15:36 +0200)]
glcpp: don't push #line directives into next line

By moving the HASH_LINE rule out of control_line: and into line:, we avoid
adding control_line's additional \n (as seen in the first hunk).

mattst88: Carl and I determined independently of Fabian that the 091
test needed to be modified identically to this, and our patch to fix the
test was more complicated.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51506
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Carl Worth <cworth@cworth.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglcpp: Reject garbage after #else and #endif tokens
Matt Turner [Tue, 6 Nov 2012 18:59:30 +0000 (10:59 -0800)]
glcpp: Reject garbage after #else and #endif tokens

Previously we were accepting garbage after #else and #endif tokens when
the previous preprocessor conditional evaluated to false (eg, #if 0).

When the preprocessor hits a false conditional, it switches the lexer
into the SKIP state, in which it ignores non-control tokens. The parser
pops the SKIP state off the stack when it reaches the associated #elif,
#else, or #endif. Unfortunately, that meant that it only left the SKIP
state after the lexing the entire line containing the #token and thus
would accept garbage after the #token.

To fix this we use a mid-rule, which is executed immediately after the
#token is parsed.

NOTE: This is a candidate for the stable branch
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56442
Fixes: preprocess17_frag.test from oglconform
Reviewed-by: Carl Worth <cworth@cworth.org> (glcpp-parse.y)
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agor600g: fix printk warnings
Dave Airlie [Fri, 9 Nov 2012 20:38:57 +0000 (06:38 +1000)]
r600g: fix printk warnings

Brian reported seeing:
r600_texture.c: In function ‘r600_texture_create_object’:
r600_texture.c:468:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’
r600_texture.c:468:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’
r600_texture.c:485:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’
r600_texture.c:485:12: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’

this should wrap over them fine.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agosoftpipe: fix unused variable warning.
Dave Airlie [Fri, 9 Nov 2012 20:36:10 +0000 (06:36 +1000)]
softpipe: fix unused variable warning.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogallium: fix unused cap warnings in drivers for cube map array cap.
Dave Airlie [Fri, 9 Nov 2012 20:34:14 +0000 (06:34 +1000)]
gallium: fix unused cap warnings in drivers for cube map array cap.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: add initial cube map array support (v2)
Dave Airlie [Sat, 3 Nov 2012 10:53:33 +0000 (20:53 +1000)]
r600g: add initial cube map array support (v2)

This contains the evergreen support.

Support is possible on rv670 upwards and the code in here
should work, but it doesn't and I haven't debugged it to
figure out why.

Beyond just adding support for the cube map array sampling,
r600 resinfo isn't conformant with the GL specification,
which states the number of layers should be returned for
the textureSize, so we have to track in an external
constant buffer the layers for each sampler if we need
them in the shader.

v2: only update the sampler constants if the sampler views have changed,
as suggested by Marek.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agou_blitter: fix cube array check
Dave Airlie [Fri, 9 Nov 2012 20:19:19 +0000 (06:19 +1000)]
u_blitter: fix cube array check

Pointed out by Marek on irc,

no committing after beer!

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoutil/u_surface: Support 3D/array textures in util_resource_copy_region().
José Fonseca [Wed, 7 Nov 2012 15:21:36 +0000 (15:21 +0000)]
util/u_surface: Support 3D/array textures in util_resource_copy_region().

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agodraw: Remove redundant draw_geometry_shader_delete().
José Fonseca [Wed, 7 Nov 2012 14:19:55 +0000 (14:19 +0000)]
draw: Remove redundant draw_geometry_shader_delete().

draw_delete_geometry_shader() seems to be the real one.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agotrace: Support geometry shaders.
José Fonseca [Wed, 7 Nov 2012 14:19:25 +0000 (14:19 +0000)]
trace: Support geometry shaders.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agoutil/u_surface: Fix util_clear_depth_stencil for Z32_FLOAT_S8X24_UINT.
José Fonseca [Wed, 7 Nov 2012 12:57:15 +0000 (12:57 +0000)]
util/u_surface: Fix util_clear_depth_stencil for Z32_FLOAT_S8X24_UINT.

util_pack_z_stencil was being unconditionally invoked for all formats,
causing an assertion failure for Z32_FLOAT_S8X24_UINT.

NOTE: Candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agogalahad: Support geometry shader / stream-output methods.
José Fonseca [Wed, 7 Nov 2012 11:45:45 +0000 (11:45 +0000)]
galahad: Support geometry shader / stream-output methods.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agosoftpipe,util: Fix blending of R and RG formats.
José Fonseca [Tue, 6 Nov 2012 17:20:09 +0000 (17:20 +0000)]
softpipe,util: Fix blending of R and RG formats.

Alpha is also 1 for formats like R32G32_FLOAT.

NOTE: Candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agosoftpipe: Fix rgb_dst_factor == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE.
José Fonseca [Tue, 6 Nov 2012 15:59:41 +0000 (15:59 +0000)]
softpipe: Fix rgb_dst_factor == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE.

We must multiply the factor against the destination, not the source.

NOTE: Candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agotgsi: Lift the requirement of indirection being done by ADDR register.
José Fonseca [Tue, 6 Nov 2012 11:38:12 +0000 (11:38 +0000)]
tgsi: Lift the requirement of indirection being done by ADDR register.

For drivers with native integer / SM4 support this is just an hindrance.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agoutil: Fix reduction of line adjacency primitives.
José Fonseca [Tue, 6 Nov 2012 11:36:09 +0000 (11:36 +0000)]
util: Fix reduction of line adjacency primitives.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agosoftpipe: Handle adjacency primitives.
José Fonseca [Tue, 6 Nov 2012 11:35:31 +0000 (11:35 +0000)]
softpipe: Handle adjacency primitives.

Not fully tested.

Based on diagrams from
http://msdn.microsoft.com/en-us/library/windows/desktop/bb205124.aspx#Primitive_Adjacency

v2: Fix based on Brian's feedback.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agoutil/u_rect: Make it C++ safe.
José Fonseca [Mon, 5 Nov 2012 15:45:48 +0000 (15:45 +0000)]
util/u_rect: Make it C++ safe.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agou_blitter: don't create fragment program for cube maps unless supported.
Dave Airlie [Fri, 9 Nov 2012 10:31:00 +0000 (20:31 +1000)]
u_blitter: don't create fragment program for cube maps unless supported.

should fix http://bugs.freedesktop.org/56906

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agomesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0
Mario Kleiner [Sun, 7 Oct 2012 01:44:14 +0000 (03:44 +0200)]
mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0

The GL_POINT_BIT state attribute GL_POINT_SPRITE_COORD_ORIGIN
is only supported on OpenGL-2.0 or later. Prevent glPopAttrib()
from trying to restore it on OpenGL-1.4 implementations which
support GL_ARB_POINT_SPRITE, as otherwise the sequence...

glPushAttrib(GL_POINT_BIT);
glPopAttrib();

throws an GL_INVALID_ENUM error in glPopAttrib().

See also commit f778174ea1e431a7113f12c12beb4aba9e825a9f

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Fix glGetVertexAttribI[u]iv now that we have real integer attribs.
Kenneth Graunke [Thu, 8 Nov 2012 04:29:40 +0000 (20:29 -0800)]
mesa: Fix glGetVertexAttribI[u]iv now that we have real integer attribs.

Since cf438f5375e242, we store actual integers for the attribute data.
We just need to reinterpret the GLfloat array as a GLint/GLuint array
so we can read the proper data.

Fixes oglconform's glsl-vertex-attrib/basic.VertexAttribI[1234][u]i
subtests (after fixing an unrelated bug in those test cases).

v2: Use the COPY_4V macro to be concise.

NOTE: This is a candidate for the stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com> [v1]
12 years agomesa: Fix typo in glDeleteQueriesARB debug message.
Kenneth Graunke [Thu, 8 Nov 2012 02:54:40 +0000 (18:54 -0800)]
mesa: Fix typo in glDeleteQueriesARB debug message.

"Deleete" all the extra letters!

12 years agosvga: Fix memory leak in svga_buffer_transfer_map.
Vinson Lee [Thu, 8 Nov 2012 07:13:38 +0000 (23:13 -0800)]
svga: Fix memory leak in svga_buffer_transfer_map.

Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agodocs: update with ARB_texture_cube_map_array support
Dave Airlie [Fri, 9 Nov 2012 00:57:04 +0000 (10:57 +1000)]
docs: update with ARB_texture_cube_map_array support

just mention softpipe is done, r600g will come soon.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agou_blitter: add cube map array support.
Dave Airlie [Sat, 3 Nov 2012 10:52:49 +0000 (20:52 +1000)]
u_blitter: add cube map array support.

This adds cube array support to the blitter.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agosoftpipe: add ARB_texture_cube_map_array support (v1.1)
Dave Airlie [Sat, 3 Nov 2012 10:51:45 +0000 (20:51 +1000)]
softpipe: add ARB_texture_cube_map_array support (v1.1)

This adds support to the softpipe texture sampler and tgsi exec.

In order to handle the extra input to the texture sampling,
I've had to expand the interfaces to take a c1 value for storing
the texture compare value for the TEX2 case.

v1.1: add comments (Brian)

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agost/mesa: add support for ARB_texture_cube_map_array (v2)
Dave Airlie [Sat, 3 Nov 2012 10:49:35 +0000 (20:49 +1000)]
st/mesa: add support for ARB_texture_cube_map_array (v2)

This adds mesa state tracker support for the new extension,
along with glsl->tgsi conversion to use the new opcodes
where appropriate.

v2: fix assert found running textureSize tests.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogallium: add defines/shader opcode for texture cube map array
Dave Airlie [Sat, 3 Nov 2012 10:44:06 +0000 (20:44 +1000)]
gallium: add defines/shader opcode for texture cube map array

This just adds the texture target and capability along
with 3 new opcodes required to support this extension.

As this extension requires some texture opcodes with samp + 5 args,
we need to use another src register, this is only required
for TEX, TXL and TXB opcodes to implement this spec.

TEX2 is required for shadow cube map arrays
TXL2 is required for cube map array sampler + explicit lod
TXB2 is required for cube map array sampler + lod bias

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agomesa: arb_texture_cube_map_array: fix attrib push/pop
Dave Airlie [Wed, 7 Nov 2012 02:51:35 +0000 (12:51 +1000)]
mesa: arb_texture_cube_map_array: fix attrib push/pop

fdo9833 piglit test caught this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoglsl: add ARB_texture_cube_map_array support (v2)
Dave Airlie [Sat, 3 Nov 2012 10:43:17 +0000 (20:43 +1000)]
glsl: add ARB_texture_cube_map_array support (v2)

This adds all the new builtins + the new sampler types,
and hooks them up if the extension is supported.

v2: fix missing signatures for grad/lod
fix missing textureSize clarifications
fix compare vs starts with usage

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agomesa: add get support for TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB
Dave Airlie [Sat, 3 Nov 2012 10:41:55 +0000 (20:41 +1000)]
mesa: add get support for TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agomesa: add fbo/texture support for ARB_texture_cube_map_array (v2)
Dave Airlie [Sat, 3 Nov 2012 10:41:08 +0000 (20:41 +1000)]
mesa: add fbo/texture support for ARB_texture_cube_map_array (v2)

This adds the mesa core + texture + fbo support for the
texture cube map array extension.

v2:
add comment to _mesa_num_tex_faces related to cube map arrays (Brian)
drop wrong comment cut-n-paste (Brian)
fix / 6 maximum check issue (Kenneth)
coalsece some array case statements (Kenneth)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agomesa: add ARB_texture_cube_map_array extension bits
Dave Airlie [Sat, 3 Nov 2012 10:38:32 +0000 (20:38 +1000)]
mesa: add ARB_texture_cube_map_array extension bits

This just adds the bit + extension name.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoglapi: add ARB_texture_cube_map_array.
Dave Airlie [Sat, 3 Nov 2012 10:36:21 +0000 (20:36 +1000)]
glapi: add ARB_texture_cube_map_array.

This adds the ARB_texture_cube_map_array enums.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: fix lod bias/explicit lod with cube maps.
Dave Airlie [Tue, 6 Nov 2012 21:51:56 +0000 (07:51 +1000)]
r600g: fix lod bias/explicit lod with cube maps.

While developing cube map array support I found that we didn't
support this properly, also piglit didn't test for it at all.

I've submitted a test to piglit to check for this, and this
fixes explicit lod and lod bias with cube maps.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: clarify const buffer numbering and handling
Dave Airlie [Tue, 6 Nov 2012 05:31:41 +0000 (15:31 +1000)]
r600g: clarify const buffer numbering and handling

For cube map arrays I'll need another driver private constant
buffer, and looking forward to UBOs. So clean up with some
defines, that can be modified when adding cube map array and ubos
later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoi965: Fix slow leak of brw->wm.compile_data->store
Eric Anholt [Tue, 6 Nov 2012 17:48:51 +0000 (09:48 -0800)]
i965: Fix slow leak of brw->wm.compile_data->store

We were successfully freeing our compile data at context destroy, but until
then we were allocating a new store every compile without freeing it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56019
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/fs: Add support for global copy propagation.
Eric Anholt [Tue, 30 Oct 2012 18:09:59 +0000 (11:09 -0700)]
i965/fs: Add support for global copy propagation.

It is common for complicated shaders, particularly code-generated ones, to
have a big array of uniforms or attributes, and a prologue in the shader that
dereferences from the big array to more informatively-named local variables.
Then there will be some small control flow operation (like a ? : statement),
and then use of those informatively-named variables.  We were emitting extra
MOVs in these cases, because copy propagation couldn't reach across control
flow.

Instead, implement dataflow analysis on the output of the first copy
propagation pass and re-run it to propagate those extra MOVs out.

On one future Steam release, reduces VS+FS instruction count from 42837 to
41437.  No statistically significant performance difference (n=48), though, at
least at the low resolution I'm running it at.

shader-db results:

total instructions in shared programs: 722170 -> 702545 (-2.72%)
instructions in affected programs:     260618 -> 240993 (-7.53%)

Some shaders do get hurt by up to 2 instructions, because a choice to copy
propagate instead of coalesce or something like that results in a dead write
sticking around.  Given that we already have instances of those instructions
in the affected programs (particularly unigine), we should just improve dead
code elimination to fix the problem.

12 years agoglsl_to_tgsi: fix dst register for texturing fetches.
Dave Airlie [Sat, 1 Sep 2012 03:55:38 +0000 (13:55 +1000)]
glsl_to_tgsi: fix dst register for texturing fetches.

I've no idea why there isn't a piglit that triggers this behaviour,
but while enabling TBOs for softpipe and r600g, I noticed all the
integer tests failed. I tracked it back to the TXF returning a float
when it should be returning an int. This fixed it and I haven't
seen any regressions in a full piglit run on softpipe.

http://bugs.freedesktop.org/55010

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: fix pre eg export with llvm
Vincent Lejeune [Wed, 7 Nov 2012 16:17:58 +0000 (17:17 +0100)]
r600g: fix pre eg export with llvm

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
12 years agoi965: Fix assertion in brw_alu3.
Vinson Lee [Wed, 7 Nov 2012 07:37:20 +0000 (23:37 -0800)]
i965: Fix assertion in brw_alu3.

Fixes side effect in assertion defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agowayland: Destroy frame callback when destroying surface
Jonas Ådahl [Sat, 27 Oct 2012 22:50:12 +0000 (00:50 +0200)]
wayland: Destroy frame callback when destroying surface

If a frame callback is not destroyed when destroying a surface, its
handler function will be invoked if the surface was destroyed after the
callback was requested but before it was invoked, causing a write on
free:ed memory.

This can happen if eglDestroySurface() is called shortly after
eglSwapBuffers().

Note: This is a candidate for stable branches.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
12 years agor600g/compute: fix call to r600_bytecode_init
Alex Deucher [Wed, 7 Nov 2012 16:30:45 +0000 (11:30 -0500)]
r600g/compute: fix call to r600_bytecode_init

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agomesa: Remove PROG_EMIT_VERTEX and PROG_END_PRIMITIVE opcodes.
Kenneth Graunke [Tue, 16 Oct 2012 18:45:00 +0000 (11:45 -0700)]
mesa: Remove PROG_EMIT_VERTEX and PROG_END_PRIMITIVE opcodes.

These were only used for geometry shader support back in the days before
the new GLSL compiler.  Future geometry shader support will not use
these.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agosvga: Ensure vb_transfer in svga_swtnl_draw_vbo in initialized.
Vinson Lee [Tue, 6 Nov 2012 06:27:41 +0000 (22:27 -0800)]
svga: Ensure vb_transfer in svga_swtnl_draw_vbo in initialized.

Fixes a uninitialized pointer read defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoscons: Build src/mesa/main/es1_conversion.c for all builds.
Vinson Lee [Wed, 7 Nov 2012 07:16:29 +0000 (23:16 -0800)]
scons: Build src/mesa/main/es1_conversion.c for all builds.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
12 years agoegl_dri2/x11: Fix eglPostSubBufferNV()
Fredrik Höglund [Tue, 6 Nov 2012 16:36:34 +0000 (17:36 +0100)]
egl_dri2/x11: Fix eglPostSubBufferNV()

This got broken in commit 0a523a8820e8a2549ac1c7887eb1892b228af44b.

NOTE: This is a candidate for the 9.0 branch.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55856

12 years agodispatch: Delete unused init_dispatch functions.
Paul Berry [Wed, 31 Oct 2012 21:13:16 +0000 (14:13 -0700)]
dispatch: Delete unused init_dispatch functions.

The new code-generated version of _mesa_create_exec_table() populates
the entire dispatch table (except for dynamic functions) by itself; it
no longer calls separate functions to initialize parts of the dispatch
table.  This patch removes those no-longer-needed functions.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agodispatch: Code generate api_exec.c.
Paul Berry [Wed, 31 Oct 2012 17:42:08 +0000 (10:42 -0700)]
dispatch: Code generate api_exec.c.

This patch adjusts makefiles to cause src/mesa/main/api_exec.c to be
generated using src/mapi/glapi/gen/gl_genexec.py.  There should be no
functional change.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi/gen: Add code generation script for _mesa_create_exec_table().
Paul Berry [Tue, 30 Oct 2012 23:21:18 +0000 (16:21 -0700)]
glapi/gen: Add code generation script for _mesa_create_exec_table().

This script generates the file api_exec.c, which contains just the
function _mesa_create_exec_table(), based on the XML files in
src/mapi/glapi/gen.

The following XML attributes, in particular, are used:
- "es1" indicates functions that should be available in ES1 contexts.
- "es2" indicates functions that should be available in ES2/ES3
  contexts.
- "exec" indicates which Mesa function should be dispatched to.  E.g.
  if the GL function is glFoo(), then:
  - exec="mesa" (the default) dispatches to _mesa_Foo().
  - exec="check" dispatches to _check_Foo().
  - exec="es" dispatches to _es_Foo().
  - exec="loopback" dispatches to loopback_Foo().
  - exec="skip" or exec="dynamic" causes this function to be skipped;
    either it is not yet supported ("skip"), or its dispatch table
    entry will be dynamically populated based on GL state ("dynamic").
- "desktop" indicates functions that should be available in desktop GL
  (non-ES) contexts.
- "deprecated" indicates functions that should not be available in
  core contexts.
- "mesa_name" indicates functions whose implementation in Mesa has a
  different suffix than the corresponding GL function name.

The generated code looks roughly like this (showing just a single
statement in each block for brevity):

    struct _glapi_table *
    _mesa_create_exec_table(struct gl_context *ctx)
    {
       struct _glapi_table *exec;

       exec = _mesa_alloc_dispatch_table(_gloffset_COUNT);
       if (exec == NULL)
          return NULL;

       if (_mesa_is_desktop_gl(ctx)) {
          SET_ActiveProgramEXT(exec, _mesa_ActiveProgramEXT);
          /* other functions not shown */
       }
       if (_mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx)) {
          SET_BeginQueryARB(exec, _mesa_BeginQueryARB);
          /* other functions not shown */
       }
       if (_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES) {
          SET_GetPointerv(exec, _mesa_GetPointerv);
          /* other functions not shown */
       }
       if (_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES || ctx->API == API_OPENGLES2) {
          SET_ActiveTextureARB(exec, _mesa_ActiveTextureARB);
          /* other functions not shown */
       }
       if (_mesa_is_desktop_gl(ctx) || ctx->API == API_OPENGLES2) {
          SET_AttachShader(exec, _mesa_AttachShader);
          /* other functions not shown */
       }
       if (ctx->API == API_OPENGL) {
          SET_Accum(exec, _mesa_Accum);
          /* other functions not shown */
       }
       if (ctx->API == API_OPENGL || ctx->API == API_OPENGLES) {
          SET_AlphaFunc(exec, _mesa_AlphaFunc);
          /* other functions not shown */
       }
       if (ctx->API == API_OPENGLES) {
          SET_AlphaFuncxOES(exec, _es_AlphaFuncx);
          /* other functions not shown */
       }

       return exec;
    }

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi/gen: handle new XML attributes.
Paul Berry [Tue, 30 Oct 2012 23:21:18 +0000 (16:21 -0700)]
glapi/gen: handle new XML attributes.

This patch updates gl_XML.py to parse the new XML attributes "exec",
"desktop", "deprecated", and "mesa_name", which will be needed to code
generate _mesa_create_exec_table().

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi/gen: Gather API version info across aliased functions.
Paul Berry [Tue, 30 Oct 2012 23:21:18 +0000 (16:21 -0700)]
glapi/gen: Gather API version info across aliased functions.

gl_XML.py's gl_function class keeps track of an entry_point_api_map
property that tracks, for each set of aliased functions, which ES1 or
ES2 version the given function name first appeared in.

This patch aggregates that information together across aliased
functions, into an easier-to-use api_map property.

Future patches will use this information when code generating
_mesa_create_exec_table(), to determine which set of dispatch table
entries should be populated based on the API.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi/gen: Comment fix.
Paul Berry [Wed, 31 Oct 2012 17:20:58 +0000 (10:20 -0700)]
glapi/gen: Comment fix.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agodispatch: Make all API functions non-static.
Paul Berry [Fri, 19 Oct 2012 16:47:11 +0000 (09:47 -0700)]
dispatch: Make all API functions non-static.

Some of the functions that we store in the dispatch table are declared
as non-static in their .c files and are inserted into the dispatch
table directly by _mesa_create_exec_table().  Other functions are
declared as static, and are inserted into the dispatch table by a
dedicated function that lives in the same .c file
(e.g. _mesa_loopback_init_api_table() in api_loopback.c).

This patch makes all of these functions non-static, and creates
appropriate prototypes for them, so that in future patches we can
populate the entire dispatch table using a single code-generated
function.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi: Annotate XML with function name suffix anomalies.
Paul Berry [Fri, 19 Oct 2012 05:12:18 +0000 (22:12 -0700)]
glapi: Annotate XML with function name suffix anomalies.

When the XML lists one or more GL api functions as aliases for another
GL function, the mesa function that implements the functionality is
usually named after the canonical version of the function (the one
that is the target of the aliases).  For example, FogCoordd is listed
as an alias of FogCoorddEXT, and the Mesa function implementing the
functionality is called loopback_FogCoorddEXT.

However, there are exceptions.  For example, Enablei is listed as an
alias of EnableIndexedEXT, but the Mesa function implementing the
functionality is called _mesa_EnableIndexed.

To account for these anomalies, this patch annotates the XML with
"mesa_name" attributes, which describe how to adjust the function name
to find the corresponding Mesa function.

For example:

  <function name="EnableIndexedEXT" mesa_name="-EXT">...</function>
  <function name="IsProgramNV" mesa_name="-NV+ARB">...</function>

means that EnableIndexedEXT is implemented by a Mesa function called
_mesa_EnableIndexed, and IsProgramNV is implemented by a Mesa function
called _mesa_IsProgramARB.

Future patches will use this annotation when code generating
_mesa_create_exec_table(), to determine the name of the Mesa function
that should be stored in each dispatch table entry.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi: Annotate XML with desktop="false" for GLES-only functions.
Paul Berry [Fri, 19 Oct 2012 04:00:25 +0000 (21:00 -0700)]
glapi: Annotate XML with desktop="false" for GLES-only functions.

Future patches will use this annotation when code generating
_mesa_create_exec_table(), to determine which functions should be
skipped when the API is desktop GL.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi: Annotate XML with exec="{es,check}" for special GLES1 functions.
Paul Berry [Mon, 22 Oct 2012 23:49:24 +0000 (16:49 -0700)]
glapi: Annotate XML with exec="{es,check}" for special GLES1 functions.

Future patches will use this annotation when code generating
_mesa_create_exec_table(), to determine which functions should be
dispatched to ES-specific implementations.  exec="es" indicates that
the ES-specific implementation has a name beginning with "_es_"
(e.g. _es_QueryMatrixxOES), and exec="check" indicates that the
ES-specific implementation has a name beginning with "_check_"
(e.g. _check_GetTexGenxvOES).

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi: Annotate XML with exec="loopback" for loopback functions.
Paul Berry [Fri, 19 Oct 2012 05:13:14 +0000 (22:13 -0700)]
glapi: Annotate XML with exec="loopback" for loopback functions.

Future patches will use this annotation when code generating
_mesa_create_exec_table(), to determine which functions should be
dispatched to functions in api_loopback.c.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi: Annotate XML with exec="dynamic" for dynamic functions.
Paul Berry [Fri, 19 Oct 2012 03:58:29 +0000 (20:58 -0700)]
glapi: Annotate XML with exec="dynamic" for dynamic functions.

Future patches will use this annotation when code generating
_mesa_create_exec_table(), to determine which functions should be
skipped because Mesa dispatches them differently depending on GL
state.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi: Annotate XML with exec="skip" for unimplemented functions.
Paul Berry [Fri, 19 Oct 2012 03:53:11 +0000 (20:53 -0700)]
glapi: Annotate XML with exec="skip" for unimplemented functions.

Future patches will use this annotation when code generating
_mesa_create_exec_table(), to determine which functions should be
skipped because they aren't implemented by Mesa.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi: Annotate XML with deprecated="3.1" for deprecated functions.
Paul Berry [Mon, 15 Oct 2012 17:52:13 +0000 (10:52 -0700)]
glapi: Annotate XML with deprecated="3.1" for deprecated functions.

Future patches will use this annotation when code generating
_mesa_create_exec_table(), to determine which functions should be
skipped in core contexts.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi: Mark GLX extensions as window_system="glX".
Paul Berry [Fri, 19 Oct 2012 04:00:50 +0000 (21:00 -0700)]
glapi: Mark GLX extensions as window_system="glX".

We were already doing this for some GLX extensions, but not others.
This patch makes our use of window_system="glX" consistent.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoglapi: Use GL_ or GLX_ prefix for all category names.
Paul Berry [Wed, 17 Oct 2012 20:24:37 +0000 (13:24 -0700)]
glapi: Use GL_ or GLX_ prefix for all category names.

This patch standardizes the category names used in the glapi XML files
to begin each extension name with the prefix "GL_" or "GLX_".  There
is no functional change, because these category names are not used in
the generated code.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agodispatch: Remove a few FEATURE_ES1 conditionals.
Paul Berry [Tue, 30 Oct 2012 21:03:28 +0000 (14:03 -0700)]
dispatch: Remove a few FEATURE_ES1 conditionals.

This allows the GLES1.1 dispatch sanity test to be run on all builds,
even builds that do not include GLES1 support.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agomesa: assert that key->fragprog_inputs_read value isn't too large
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
mesa: assert that key->fragprog_inputs_read value isn't too large

fragprog_inputs_read is a 12-bit bitfield so check the assigned value.
MSVC warns on the assignment.  Not easy to fix but let's do a sanity check.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: fix MSVC signed/unsigned warnings in context.c
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
mesa: fix MSVC signed/unsigned warnings in context.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: fix MSVC signed/unsigned warnings in transformfeedback.c
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
mesa: fix MSVC signed/unsigned warnings in transformfeedback.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoswrast: fix MSVC signed/unsigned warnings
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
swrast: fix MSVC signed/unsigned warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agotnl: fix MSVC signed/unsigned warnings
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
tnl: fix MSVC signed/unsigned warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: silence MSVC signed/unsigned warning in texgetmage.c
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
mesa: silence MSVC signed/unsigned warning in texgetmage.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: silence MSVC signed/unsigned warning in texstorage.c
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
mesa: silence MSVC signed/unsigned warning in texstorage.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agovbo: use GLuint for numInstances to silence MSVC warnings
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
vbo: use GLuint for numInstances to silence MSVC warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: fix signed/unsigned MSVC warnings in fbobject.c
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
mesa: fix signed/unsigned MSVC warnings in fbobject.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: s/GLint/GLuint/ in matrix.c to silence MSVC warnings
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
mesa: s/GLint/GLuint/ in matrix.c to silence MSVC warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: s/int/GLuint/ in get.c to silence MSVC warnings
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
mesa: s/int/GLuint/ in get.c to silence MSVC warnings

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agomesa: fix assorted MSVC conversion warnings in format_pack.c
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
mesa: fix assorted MSVC conversion warnings in format_pack.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agost/mesa: change glsl_to_tgsi_visitor from class to struct
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
st/mesa: change glsl_to_tgsi_visitor from class to struct

To match the declaration in the .h file and silence an MSVC warning.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agost/mesa: add int cast to silence warning
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
st/mesa: add int cast to silence warning

MSVC warns that negating an unsigned value yields an unsigned value.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoglsl: fix signed/unsigned comparision warnings on MSVC
Brian Paul [Sun, 4 Nov 2012 23:43:44 +0000 (16:43 -0700)]
glsl: fix signed/unsigned comparision warnings on MSVC

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>