mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
update Mesa3D to version 7.4
svn path=/trunk/; revision=40283
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5.1
|
||||
* Version: 7.4
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
*
|
||||
|
||||
+298
@@ -48,34 +48,49 @@
|
||||
#define glAsyncMarkerSGIX MANGLE(AsyncMarkerSGIX)
|
||||
#define glAttachObjectARB MANGLE(AttachObjectARB)
|
||||
#define glAttachShader MANGLE(AttachShader)
|
||||
#define glBeginConditionalRender MANGLE(BeginConditionalRender)
|
||||
#define glBeginConditionalRenderNV MANGLE(BeginConditionalRenderNV)
|
||||
#define glBeginFragmentShaderATI MANGLE(BeginFragmentShaderATI)
|
||||
#define glBegin MANGLE(Begin)
|
||||
#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
|
||||
#define glBeginQueryARB MANGLE(BeginQueryARB)
|
||||
#define glBeginQuery MANGLE(BeginQuery)
|
||||
#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT)
|
||||
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
|
||||
#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
|
||||
#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
|
||||
#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
|
||||
#define glBindAttribLocation MANGLE(BindAttribLocation)
|
||||
#define glBindBufferARB MANGLE(BindBufferARB)
|
||||
#define glBindBufferBaseEXT MANGLE(BindBufferBaseEXT)
|
||||
#define glBindBufferBase MANGLE(BindBufferBase)
|
||||
#define glBindBufferBaseNV MANGLE(BindBufferBaseNV)
|
||||
#define glBindBuffer MANGLE(BindBuffer)
|
||||
#define glBindBufferOffsetEXT MANGLE(BindBufferOffsetEXT)
|
||||
#define glBindBufferOffsetNV MANGLE(BindBufferOffsetNV)
|
||||
#define glBindBufferRangeEXT MANGLE(BindBufferRangeEXT)
|
||||
#define glBindBufferRange MANGLE(BindBufferRange)
|
||||
#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
|
||||
#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
|
||||
#define glBindFragDataLocation MANGLE(BindFragDataLocation)
|
||||
#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
|
||||
#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
|
||||
#define glBindFramebuffer MANGLE(BindFramebuffer)
|
||||
#define glBindLightParameterEXT MANGLE(BindLightParameterEXT)
|
||||
#define glBindMaterialParameterEXT MANGLE(BindMaterialParameterEXT)
|
||||
#define glBindMultiTextureEXT MANGLE(BindMultiTextureEXT)
|
||||
#define glBindParameterEXT MANGLE(BindParameterEXT)
|
||||
#define glBindProgramARB MANGLE(BindProgramARB)
|
||||
#define glBindProgramNV MANGLE(BindProgramNV)
|
||||
#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT)
|
||||
#define glBindRenderbuffer MANGLE(BindRenderbuffer)
|
||||
#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT)
|
||||
#define glBindTextureEXT MANGLE(BindTextureEXT)
|
||||
#define glBindTexture MANGLE(BindTexture)
|
||||
#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT)
|
||||
#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV)
|
||||
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
|
||||
#define glBindVertexArray MANGLE(BindVertexArray)
|
||||
#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT)
|
||||
#define glBinormal3bEXT MANGLE(Binormal3bEXT)
|
||||
#define glBinormal3bvEXT MANGLE(Binormal3bvEXT)
|
||||
@@ -101,6 +116,7 @@
|
||||
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
|
||||
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
|
||||
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
|
||||
#define glBlitFramebuffer MANGLE(BlitFramebuffer)
|
||||
#define glBufferDataARB MANGLE(BufferDataARB)
|
||||
#define glBufferData MANGLE(BufferData)
|
||||
#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
|
||||
@@ -109,8 +125,15 @@
|
||||
#define glCallList MANGLE(CallList)
|
||||
#define glCallLists MANGLE(CallLists)
|
||||
#define glCheckFramebufferStatusEXT MANGLE(CheckFramebufferStatusEXT)
|
||||
#define glCheckFramebufferStatus MANGLE(CheckFramebufferStatus)
|
||||
#define glCheckNamedFramebufferStatusEXT MANGLE(CheckNamedFramebufferStatusEXT)
|
||||
#define glClampColorARB MANGLE(ClampColorARB)
|
||||
#define glClampColor MANGLE(ClampColor)
|
||||
#define glClearAccum MANGLE(ClearAccum)
|
||||
#define glClearBufferfi MANGLE(ClearBufferfi)
|
||||
#define glClearBufferfv MANGLE(ClearBufferfv)
|
||||
#define glClearBufferiv MANGLE(ClearBufferiv)
|
||||
#define glClearBufferuiv MANGLE(ClearBufferuiv)
|
||||
#define glClearColorIiEXT MANGLE(ClearColorIiEXT)
|
||||
#define glClearColorIuiEXT MANGLE(ClearColorIuiEXT)
|
||||
#define glClearColor MANGLE(ClearColor)
|
||||
@@ -123,6 +146,7 @@
|
||||
#define glClientActiveTextureARB MANGLE(ClientActiveTextureARB)
|
||||
#define glClientActiveTexture MANGLE(ClientActiveTexture)
|
||||
#define glClientActiveVertexStreamATI MANGLE(ClientActiveVertexStreamATI)
|
||||
#define glClientAttribDefaultEXT MANGLE(ClientAttribDefaultEXT)
|
||||
#define glClipPlane MANGLE(ClipPlane)
|
||||
#define glColor3b MANGLE(Color3b)
|
||||
#define glColor3bv MANGLE(Color3bv)
|
||||
@@ -171,6 +195,7 @@
|
||||
#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI)
|
||||
#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI)
|
||||
#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI)
|
||||
#define glColorMaski MANGLE(ColorMaski)
|
||||
#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT)
|
||||
#define glColorMask MANGLE(ColorMask)
|
||||
#define glColorMaterial MANGLE(ColorMaterial)
|
||||
@@ -196,6 +221,12 @@
|
||||
#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV)
|
||||
#define glCompileShaderARB MANGLE(CompileShaderARB)
|
||||
#define glCompileShader MANGLE(CompileShader)
|
||||
#define glCompressedMultiTexImage1DEXT MANGLE(CompressedMultiTexImage1DEXT)
|
||||
#define glCompressedMultiTexImage2DEXT MANGLE(CompressedMultiTexImage2DEXT)
|
||||
#define glCompressedMultiTexImage3DEXT MANGLE(CompressedMultiTexImage3DEXT)
|
||||
#define glCompressedMultiTexSubImage1DEXT MANGLE(CompressedMultiTexSubImage1DEXT)
|
||||
#define glCompressedMultiTexSubImage2DEXT MANGLE(CompressedMultiTexSubImage2DEXT)
|
||||
#define glCompressedMultiTexSubImage3DEXT MANGLE(CompressedMultiTexSubImage3DEXT)
|
||||
#define glCompressedTexImage1DARB MANGLE(CompressedTexImage1DARB)
|
||||
#define glCompressedTexImage1D MANGLE(CompressedTexImage1D)
|
||||
#define glCompressedTexImage2DARB MANGLE(CompressedTexImage2DARB)
|
||||
@@ -208,6 +239,12 @@
|
||||
#define glCompressedTexSubImage2D MANGLE(CompressedTexSubImage2D)
|
||||
#define glCompressedTexSubImage3DARB MANGLE(CompressedTexSubImage3DARB)
|
||||
#define glCompressedTexSubImage3D MANGLE(CompressedTexSubImage3D)
|
||||
#define glCompressedTextureImage1DEXT MANGLE(CompressedTextureImage1DEXT)
|
||||
#define glCompressedTextureImage2DEXT MANGLE(CompressedTextureImage2DEXT)
|
||||
#define glCompressedTextureImage3DEXT MANGLE(CompressedTextureImage3DEXT)
|
||||
#define glCompressedTextureSubImage1DEXT MANGLE(CompressedTextureSubImage1DEXT)
|
||||
#define glCompressedTextureSubImage2DEXT MANGLE(CompressedTextureSubImage2DEXT)
|
||||
#define glCompressedTextureSubImage3DEXT MANGLE(CompressedTextureSubImage3DEXT)
|
||||
#define glConvolutionFilter1DEXT MANGLE(ConvolutionFilter1DEXT)
|
||||
#define glConvolutionFilter1D MANGLE(ConvolutionFilter1D)
|
||||
#define glConvolutionFilter2DEXT MANGLE(ConvolutionFilter2DEXT)
|
||||
@@ -228,6 +265,11 @@
|
||||
#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D)
|
||||
#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT)
|
||||
#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D)
|
||||
#define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT)
|
||||
#define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT)
|
||||
#define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT)
|
||||
#define glCopyMultiTexSubImage2DEXT MANGLE(CopyMultiTexSubImage2DEXT)
|
||||
#define glCopyMultiTexSubImage3DEXT MANGLE(CopyMultiTexSubImage3DEXT)
|
||||
#define glCopyPixels MANGLE(CopyPixels)
|
||||
#define glCopyTexImage1DEXT MANGLE(CopyTexImage1DEXT)
|
||||
#define glCopyTexImage1D MANGLE(CopyTexImage1D)
|
||||
@@ -239,6 +281,11 @@
|
||||
#define glCopyTexSubImage2D MANGLE(CopyTexSubImage2D)
|
||||
#define glCopyTexSubImage3DEXT MANGLE(CopyTexSubImage3DEXT)
|
||||
#define glCopyTexSubImage3D MANGLE(CopyTexSubImage3D)
|
||||
#define glCopyTextureImage1DEXT MANGLE(CopyTextureImage1DEXT)
|
||||
#define glCopyTextureImage2DEXT MANGLE(CopyTextureImage2DEXT)
|
||||
#define glCopyTextureSubImage1DEXT MANGLE(CopyTextureSubImage1DEXT)
|
||||
#define glCopyTextureSubImage2DEXT MANGLE(CopyTextureSubImage2DEXT)
|
||||
#define glCopyTextureSubImage3DEXT MANGLE(CopyTextureSubImage3DEXT)
|
||||
#define glCreateDebugObjectMESA MANGLE(CreateDebugObjectMESA)
|
||||
#define glCreateProgram MANGLE(CreateProgram)
|
||||
#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB)
|
||||
@@ -258,6 +305,7 @@
|
||||
#define glDeleteFencesNV MANGLE(DeleteFencesNV)
|
||||
#define glDeleteFragmentShaderATI MANGLE(DeleteFragmentShaderATI)
|
||||
#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT)
|
||||
#define glDeleteFramebuffers MANGLE(DeleteFramebuffers)
|
||||
#define glDeleteLists MANGLE(DeleteLists)
|
||||
#define glDeleteObjectARB MANGLE(DeleteObjectARB)
|
||||
#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV)
|
||||
@@ -267,10 +315,13 @@
|
||||
#define glDeleteQueriesARB MANGLE(DeleteQueriesARB)
|
||||
#define glDeleteQueries MANGLE(DeleteQueries)
|
||||
#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
|
||||
#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
|
||||
#define glDeleteShader MANGLE(DeleteShader)
|
||||
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
|
||||
#define glDeleteTextures MANGLE(DeleteTextures)
|
||||
#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
|
||||
#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
|
||||
#define glDeleteVertexArrays MANGLE(DeleteVertexArrays)
|
||||
#define glDeleteVertexShaderEXT MANGLE(DeleteVertexShaderEXT)
|
||||
#define glDepthBoundsdNV MANGLE(DepthBoundsdNV)
|
||||
#define glDepthBoundsEXT MANGLE(DepthBoundsEXT)
|
||||
@@ -281,13 +332,16 @@
|
||||
#define glDetachObjectARB MANGLE(DetachObjectARB)
|
||||
#define glDetachShader MANGLE(DetachShader)
|
||||
#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS)
|
||||
#define glDisableClientStateIndexedEXT MANGLE(DisableClientStateIndexedEXT)
|
||||
#define glDisableClientState MANGLE(DisableClientState)
|
||||
#define glDisablei MANGLE(Disablei)
|
||||
#define glDisableIndexedEXT MANGLE(DisableIndexedEXT)
|
||||
#define glDisable MANGLE(Disable)
|
||||
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
|
||||
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
|
||||
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
|
||||
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
|
||||
#define glDrawArraysInstancedARB MANGLE(DrawArraysInstancedARB)
|
||||
#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT)
|
||||
#define glDrawArrays MANGLE(DrawArrays)
|
||||
#define glDrawBuffer MANGLE(DrawBuffer)
|
||||
@@ -296,6 +350,7 @@
|
||||
#define glDrawBuffers MANGLE(DrawBuffers)
|
||||
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
|
||||
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
|
||||
#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
|
||||
#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
|
||||
#define glDrawElements MANGLE(DrawElements)
|
||||
#define glDrawMeshArraysSUN MANGLE(DrawMeshArraysSUN)
|
||||
@@ -304,6 +359,7 @@
|
||||
#define glDrawRangeElementArrayATI MANGLE(DrawRangeElementArrayATI)
|
||||
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
|
||||
#define glDrawRangeElements MANGLE(DrawRangeElements)
|
||||
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
|
||||
#define glEdgeFlag MANGLE(EdgeFlag)
|
||||
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
|
||||
#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
|
||||
@@ -311,18 +367,24 @@
|
||||
#define glEdgeFlagv MANGLE(EdgeFlagv)
|
||||
#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE)
|
||||
#define glElementPointerATI MANGLE(ElementPointerATI)
|
||||
#define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT)
|
||||
#define glEnableClientState MANGLE(EnableClientState)
|
||||
#define glEnablei MANGLE(Enablei)
|
||||
#define glEnableIndexedEXT MANGLE(EnableIndexedEXT)
|
||||
#define glEnable MANGLE(Enable)
|
||||
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
|
||||
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
|
||||
#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray)
|
||||
#define glEndConditionalRender MANGLE(EndConditionalRender)
|
||||
#define glEndConditionalRenderNV MANGLE(EndConditionalRenderNV)
|
||||
#define glEndFragmentShaderATI MANGLE(EndFragmentShaderATI)
|
||||
#define glEndList MANGLE(EndList)
|
||||
#define glEnd MANGLE(End)
|
||||
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
|
||||
#define glEndQueryARB MANGLE(EndQueryARB)
|
||||
#define glEndQuery MANGLE(EndQuery)
|
||||
#define glEndTransformFeedbackEXT MANGLE(EndTransformFeedbackEXT)
|
||||
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
|
||||
#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV)
|
||||
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
|
||||
#define glEvalCoord1d MANGLE(EvalCoord1d)
|
||||
@@ -350,6 +412,7 @@
|
||||
#define glFinishTextureSUNX MANGLE(FinishTextureSUNX)
|
||||
#define glFlush MANGLE(Flush)
|
||||
#define glFlushMappedBufferRangeAPPLE MANGLE(FlushMappedBufferRangeAPPLE)
|
||||
#define glFlushMappedBufferRange MANGLE(FlushMappedBufferRange)
|
||||
#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV)
|
||||
#define glFlushRasterSGIX MANGLE(FlushRasterSGIX)
|
||||
#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE)
|
||||
@@ -385,13 +448,25 @@
|
||||
#define glFragmentMaterialfvSGIX MANGLE(FragmentMaterialfvSGIX)
|
||||
#define glFragmentMaterialiSGIX MANGLE(FragmentMaterialiSGIX)
|
||||
#define glFragmentMaterialivSGIX MANGLE(FragmentMaterialivSGIX)
|
||||
#define glFramebufferDrawBufferEXT MANGLE(FramebufferDrawBufferEXT)
|
||||
#define glFramebufferDrawBuffersEXT MANGLE(FramebufferDrawBuffersEXT)
|
||||
#define glFramebufferReadBufferEXT MANGLE(FramebufferReadBufferEXT)
|
||||
#define glFramebufferRenderbufferEXT MANGLE(FramebufferRenderbufferEXT)
|
||||
#define glFramebufferRenderbuffer MANGLE(FramebufferRenderbuffer)
|
||||
#define glFramebufferTexture1DEXT MANGLE(FramebufferTexture1DEXT)
|
||||
#define glFramebufferTexture1D MANGLE(FramebufferTexture1D)
|
||||
#define glFramebufferTexture2DEXT MANGLE(FramebufferTexture2DEXT)
|
||||
#define glFramebufferTexture2D MANGLE(FramebufferTexture2D)
|
||||
#define glFramebufferTexture3DEXT MANGLE(FramebufferTexture3DEXT)
|
||||
#define glFramebufferTexture3D MANGLE(FramebufferTexture3D)
|
||||
#define glFramebufferTextureARB MANGLE(FramebufferTextureARB)
|
||||
#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
|
||||
#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
|
||||
#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
|
||||
#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
|
||||
#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
|
||||
#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
|
||||
#define glFrameTerminatorGREMEDY MANGLE(FrameTerminatorGREMEDY)
|
||||
#define glFrameZoomSGIX MANGLE(FrameZoomSGIX)
|
||||
#define glFreeObjectBufferATI MANGLE(FreeObjectBufferATI)
|
||||
#define glFrontFace MANGLE(FrontFace)
|
||||
@@ -400,10 +475,14 @@
|
||||
#define glGenBuffersARB MANGLE(GenBuffersARB)
|
||||
#define glGenBuffers MANGLE(GenBuffers)
|
||||
#define glGenerateMipmapEXT MANGLE(GenerateMipmapEXT)
|
||||
#define glGenerateMipmap MANGLE(GenerateMipmap)
|
||||
#define glGenerateMultiTexMipmapEXT MANGLE(GenerateMultiTexMipmapEXT)
|
||||
#define glGenerateTextureMipmapEXT MANGLE(GenerateTextureMipmapEXT)
|
||||
#define glGenFencesAPPLE MANGLE(GenFencesAPPLE)
|
||||
#define glGenFencesNV MANGLE(GenFencesNV)
|
||||
#define glGenFragmentShadersATI MANGLE(GenFragmentShadersATI)
|
||||
#define glGenFramebuffersEXT MANGLE(GenFramebuffersEXT)
|
||||
#define glGenFramebuffers MANGLE(GenFramebuffers)
|
||||
#define glGenLists MANGLE(GenLists)
|
||||
#define glGenOcclusionQueriesNV MANGLE(GenOcclusionQueriesNV)
|
||||
#define glGenProgramsARB MANGLE(GenProgramsARB)
|
||||
@@ -411,10 +490,13 @@
|
||||
#define glGenQueriesARB MANGLE(GenQueriesARB)
|
||||
#define glGenQueries MANGLE(GenQueries)
|
||||
#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT)
|
||||
#define glGenRenderbuffers MANGLE(GenRenderbuffers)
|
||||
#define glGenSymbolsEXT MANGLE(GenSymbolsEXT)
|
||||
#define glGenTexturesEXT MANGLE(GenTexturesEXT)
|
||||
#define glGenTextures MANGLE(GenTextures)
|
||||
#define glGenTransformFeedbacksNV MANGLE(GenTransformFeedbacksNV)
|
||||
#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE)
|
||||
#define glGenVertexArrays MANGLE(GenVertexArrays)
|
||||
#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT)
|
||||
#define glGetActiveAttribARB MANGLE(GetActiveAttribARB)
|
||||
#define glGetActiveAttrib MANGLE(GetActiveAttrib)
|
||||
@@ -428,6 +510,7 @@
|
||||
#define glGetAttribLocationARB MANGLE(GetAttribLocationARB)
|
||||
#define glGetAttribLocation MANGLE(GetAttribLocation)
|
||||
#define glGetBooleanIndexedvEXT MANGLE(GetBooleanIndexedvEXT)
|
||||
#define glGetBooleani_v MANGLE(GetBooleani_v)
|
||||
#define glGetBooleanv MANGLE(GetBooleanv)
|
||||
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
|
||||
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
|
||||
@@ -450,8 +533,10 @@
|
||||
#define glGetCombinerOutputParameterfvNV MANGLE(GetCombinerOutputParameterfvNV)
|
||||
#define glGetCombinerOutputParameterivNV MANGLE(GetCombinerOutputParameterivNV)
|
||||
#define glGetCombinerStageParameterfvNV MANGLE(GetCombinerStageParameterfvNV)
|
||||
#define glGetCompressedMultiTexImageEXT MANGLE(GetCompressedMultiTexImageEXT)
|
||||
#define glGetCompressedTexImageARB MANGLE(GetCompressedTexImageARB)
|
||||
#define glGetCompressedTexImage MANGLE(GetCompressedTexImage)
|
||||
#define glGetCompressedTextureImageEXT MANGLE(GetCompressedTextureImageEXT)
|
||||
#define glGetConvolutionFilterEXT MANGLE(GetConvolutionFilterEXT)
|
||||
#define glGetConvolutionFilter MANGLE(GetConvolutionFilter)
|
||||
#define glGetConvolutionParameterfvEXT MANGLE(GetConvolutionParameterfvEXT)
|
||||
@@ -461,19 +546,24 @@
|
||||
#define glGetDebugLogLengthMESA MANGLE(GetDebugLogLengthMESA)
|
||||
#define glGetDebugLogMESA MANGLE(GetDebugLogMESA)
|
||||
#define glGetDetailTexFuncSGIS MANGLE(GetDetailTexFuncSGIS)
|
||||
#define glGetDoubleIndexedvEXT MANGLE(GetDoubleIndexedvEXT)
|
||||
#define glGetDoublev MANGLE(GetDoublev)
|
||||
#define glGetError MANGLE(GetError)
|
||||
#define glGetFenceivNV MANGLE(GetFenceivNV)
|
||||
#define glGetFinalCombinerInputParameterfvNV MANGLE(GetFinalCombinerInputParameterfvNV)
|
||||
#define glGetFinalCombinerInputParameterivNV MANGLE(GetFinalCombinerInputParameterivNV)
|
||||
#define glGetFloatIndexedvEXT MANGLE(GetFloatIndexedvEXT)
|
||||
#define glGetFloatv MANGLE(GetFloatv)
|
||||
#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS)
|
||||
#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT)
|
||||
#define glGetFragDataLocation MANGLE(GetFragDataLocation)
|
||||
#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX)
|
||||
#define glGetFragmentLightivSGIX MANGLE(GetFragmentLightivSGIX)
|
||||
#define glGetFragmentMaterialfvSGIX MANGLE(GetFragmentMaterialfvSGIX)
|
||||
#define glGetFragmentMaterialivSGIX MANGLE(GetFragmentMaterialivSGIX)
|
||||
#define glGetFramebufferAttachmentParameterivEXT MANGLE(GetFramebufferAttachmentParameterivEXT)
|
||||
#define glGetFramebufferAttachmentParameteriv MANGLE(GetFramebufferAttachmentParameteriv)
|
||||
#define glGetFramebufferParameterivEXT MANGLE(GetFramebufferParameterivEXT)
|
||||
#define glGetHandleARB MANGLE(GetHandleARB)
|
||||
#define glGetHistogramEXT MANGLE(GetHistogramEXT)
|
||||
#define glGetHistogram MANGLE(GetHistogram)
|
||||
@@ -486,6 +576,7 @@
|
||||
#define glGetInfoLogARB MANGLE(GetInfoLogARB)
|
||||
#define glGetInstrumentsSGIX MANGLE(GetInstrumentsSGIX)
|
||||
#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
|
||||
#define glGetIntegeri_v MANGLE(GetIntegeri_v)
|
||||
#define glGetIntegerv MANGLE(GetIntegerv)
|
||||
#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT)
|
||||
#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT)
|
||||
@@ -513,6 +604,30 @@
|
||||
#define glGetMinmaxParameterfv MANGLE(GetMinmaxParameterfv)
|
||||
#define glGetMinmaxParameterivEXT MANGLE(GetMinmaxParameterivEXT)
|
||||
#define glGetMinmaxParameteriv MANGLE(GetMinmaxParameteriv)
|
||||
#define glGetMultisamplefvNV MANGLE(GetMultisamplefvNV)
|
||||
#define glGetMultiTexEnvfvEXT MANGLE(GetMultiTexEnvfvEXT)
|
||||
#define glGetMultiTexEnvivEXT MANGLE(GetMultiTexEnvivEXT)
|
||||
#define glGetMultiTexGendvEXT MANGLE(GetMultiTexGendvEXT)
|
||||
#define glGetMultiTexGenfvEXT MANGLE(GetMultiTexGenfvEXT)
|
||||
#define glGetMultiTexGenivEXT MANGLE(GetMultiTexGenivEXT)
|
||||
#define glGetMultiTexImageEXT MANGLE(GetMultiTexImageEXT)
|
||||
#define glGetMultiTexLevelParameterfvEXT MANGLE(GetMultiTexLevelParameterfvEXT)
|
||||
#define glGetMultiTexLevelParameterivEXT MANGLE(GetMultiTexLevelParameterivEXT)
|
||||
#define glGetMultiTexParameterfvEXT MANGLE(GetMultiTexParameterfvEXT)
|
||||
#define glGetMultiTexParameterIivEXT MANGLE(GetMultiTexParameterIivEXT)
|
||||
#define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT)
|
||||
#define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT)
|
||||
#define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT)
|
||||
#define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT)
|
||||
#define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT)
|
||||
#define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT)
|
||||
#define glGetNamedProgramivEXT MANGLE(GetNamedProgramivEXT)
|
||||
#define glGetNamedProgramLocalParameterdvEXT MANGLE(GetNamedProgramLocalParameterdvEXT)
|
||||
#define glGetNamedProgramLocalParameterfvEXT MANGLE(GetNamedProgramLocalParameterfvEXT)
|
||||
#define glGetNamedProgramLocalParameterIivEXT MANGLE(GetNamedProgramLocalParameterIivEXT)
|
||||
#define glGetNamedProgramLocalParameterIuivEXT MANGLE(GetNamedProgramLocalParameterIuivEXT)
|
||||
#define glGetNamedProgramStringEXT MANGLE(GetNamedProgramStringEXT)
|
||||
#define glGetNamedRenderbufferParameterivEXT MANGLE(GetNamedRenderbufferParameterivEXT)
|
||||
#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
|
||||
#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
|
||||
#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
|
||||
@@ -524,6 +639,7 @@
|
||||
#define glGetPixelMapusv MANGLE(GetPixelMapusv)
|
||||
#define glGetPixelTexGenParameterfvSGIS MANGLE(GetPixelTexGenParameterfvSGIS)
|
||||
#define glGetPixelTexGenParameterivSGIS MANGLE(GetPixelTexGenParameterivSGIS)
|
||||
#define glGetPointerIndexedvEXT MANGLE(GetPointerIndexedvEXT)
|
||||
#define glGetPointervEXT MANGLE(GetPointervEXT)
|
||||
#define glGetPointerv MANGLE(GetPointerv)
|
||||
#define glGetPolygonStipple MANGLE(GetPolygonStipple)
|
||||
@@ -555,6 +671,7 @@
|
||||
#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB)
|
||||
#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv)
|
||||
#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT)
|
||||
#define glGetRenderbufferParameteriv MANGLE(GetRenderbufferParameteriv)
|
||||
#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT)
|
||||
#define glGetSeparableFilter MANGLE(GetSeparableFilter)
|
||||
#define glGetShaderInfoLog MANGLE(GetShaderInfoLog)
|
||||
@@ -562,6 +679,7 @@
|
||||
#define glGetShaderSourceARB MANGLE(GetShaderSourceARB)
|
||||
#define glGetShaderSource MANGLE(GetShaderSource)
|
||||
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
|
||||
#define glGetStringi MANGLE(GetStringi)
|
||||
#define glGetString MANGLE(GetString)
|
||||
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
|
||||
#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
|
||||
@@ -576,9 +694,20 @@
|
||||
#define glGetTexLevelParameteriv MANGLE(GetTexLevelParameteriv)
|
||||
#define glGetTexParameterfv MANGLE(GetTexParameterfv)
|
||||
#define glGetTexParameterIivEXT MANGLE(GetTexParameterIivEXT)
|
||||
#define glGetTexParameterIiv MANGLE(GetTexParameterIiv)
|
||||
#define glGetTexParameterIuivEXT MANGLE(GetTexParameterIuivEXT)
|
||||
#define glGetTexParameterIuiv MANGLE(GetTexParameterIuiv)
|
||||
#define glGetTexParameteriv MANGLE(GetTexParameteriv)
|
||||
#define glGetTextureImageEXT MANGLE(GetTextureImageEXT)
|
||||
#define glGetTextureLevelParameterfvEXT MANGLE(GetTextureLevelParameterfvEXT)
|
||||
#define glGetTextureLevelParameterivEXT MANGLE(GetTextureLevelParameterivEXT)
|
||||
#define glGetTextureParameterfvEXT MANGLE(GetTextureParameterfvEXT)
|
||||
#define glGetTextureParameterIivEXT MANGLE(GetTextureParameterIivEXT)
|
||||
#define glGetTextureParameterIuivEXT MANGLE(GetTextureParameterIuivEXT)
|
||||
#define glGetTextureParameterivEXT MANGLE(GetTextureParameterivEXT)
|
||||
#define glGetTrackMatrixivNV MANGLE(GetTrackMatrixivNV)
|
||||
#define glGetTransformFeedbackVaryingEXT MANGLE(GetTransformFeedbackVaryingEXT)
|
||||
#define glGetTransformFeedbackVarying MANGLE(GetTransformFeedbackVarying)
|
||||
#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV)
|
||||
#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT)
|
||||
#define glGetUniformfvARB MANGLE(GetUniformfvARB)
|
||||
@@ -589,6 +718,7 @@
|
||||
#define glGetUniformLocation MANGLE(GetUniformLocation)
|
||||
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
|
||||
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
|
||||
#define glGetUniformuiv MANGLE(GetUniformuiv)
|
||||
#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
|
||||
#define glGetVariantArrayObjectivATI MANGLE(GetVariantArrayObjectivATI)
|
||||
#define glGetVariantBooleanvEXT MANGLE(GetVariantBooleanvEXT)
|
||||
@@ -605,7 +735,9 @@
|
||||
#define glGetVertexAttribfv MANGLE(GetVertexAttribfv)
|
||||
#define glGetVertexAttribfvNV MANGLE(GetVertexAttribfvNV)
|
||||
#define glGetVertexAttribIivEXT MANGLE(GetVertexAttribIivEXT)
|
||||
#define glGetVertexAttribIiv MANGLE(GetVertexAttribIiv)
|
||||
#define glGetVertexAttribIuivEXT MANGLE(GetVertexAttribIuivEXT)
|
||||
#define glGetVertexAttribIuiv MANGLE(GetVertexAttribIuiv)
|
||||
#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB)
|
||||
#define glGetVertexAttribiv MANGLE(GetVertexAttribiv)
|
||||
#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV)
|
||||
@@ -652,11 +784,13 @@
|
||||
#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX)
|
||||
#define glIsBufferARB MANGLE(IsBufferARB)
|
||||
#define glIsBuffer MANGLE(IsBuffer)
|
||||
#define glIsEnabledi MANGLE(IsEnabledi)
|
||||
#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT)
|
||||
#define glIsEnabled MANGLE(IsEnabled)
|
||||
#define glIsFenceAPPLE MANGLE(IsFenceAPPLE)
|
||||
#define glIsFenceNV MANGLE(IsFenceNV)
|
||||
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
|
||||
#define glIsFramebuffer MANGLE(IsFramebuffer)
|
||||
#define glIsList MANGLE(IsList)
|
||||
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
|
||||
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
|
||||
@@ -666,11 +800,14 @@
|
||||
#define glIsQueryARB MANGLE(IsQueryARB)
|
||||
#define glIsQuery MANGLE(IsQuery)
|
||||
#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
|
||||
#define glIsRenderbuffer MANGLE(IsRenderbuffer)
|
||||
#define glIsShader MANGLE(IsShader)
|
||||
#define glIsTextureEXT MANGLE(IsTextureEXT)
|
||||
#define glIsTexture MANGLE(IsTexture)
|
||||
#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
|
||||
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
|
||||
#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
|
||||
#define glIsVertexArray MANGLE(IsVertexArray)
|
||||
#define glLightEnviSGIX MANGLE(LightEnviSGIX)
|
||||
#define glLightf MANGLE(Lightf)
|
||||
#define glLightfv MANGLE(Lightfv)
|
||||
@@ -707,11 +844,13 @@
|
||||
#define glMap2f MANGLE(Map2f)
|
||||
#define glMapBufferARB MANGLE(MapBufferARB)
|
||||
#define glMapBuffer MANGLE(MapBuffer)
|
||||
#define glMapBufferRange MANGLE(MapBufferRange)
|
||||
#define glMapControlPointsNV MANGLE(MapControlPointsNV)
|
||||
#define glMapGrid1d MANGLE(MapGrid1d)
|
||||
#define glMapGrid1f MANGLE(MapGrid1f)
|
||||
#define glMapGrid2d MANGLE(MapGrid2d)
|
||||
#define glMapGrid2f MANGLE(MapGrid2f)
|
||||
#define glMapNamedBufferEXT MANGLE(MapNamedBufferEXT)
|
||||
#define glMapObjectBufferATI MANGLE(MapObjectBufferATI)
|
||||
#define glMapParameterfvNV MANGLE(MapParameterfvNV)
|
||||
#define glMapParameterivNV MANGLE(MapParameterivNV)
|
||||
@@ -719,11 +858,30 @@
|
||||
#define glMaterialfv MANGLE(Materialfv)
|
||||
#define glMateriali MANGLE(Materiali)
|
||||
#define glMaterialiv MANGLE(Materialiv)
|
||||
#define glMatrixFrustumEXT MANGLE(MatrixFrustumEXT)
|
||||
#define glMatrixIndexPointerARB MANGLE(MatrixIndexPointerARB)
|
||||
#define glMatrixIndexubvARB MANGLE(MatrixIndexubvARB)
|
||||
#define glMatrixIndexuivARB MANGLE(MatrixIndexuivARB)
|
||||
#define glMatrixIndexusvARB MANGLE(MatrixIndexusvARB)
|
||||
#define glMatrixLoaddEXT MANGLE(MatrixLoaddEXT)
|
||||
#define glMatrixLoadfEXT MANGLE(MatrixLoadfEXT)
|
||||
#define glMatrixLoadIdentityEXT MANGLE(MatrixLoadIdentityEXT)
|
||||
#define glMatrixLoadTransposedEXT MANGLE(MatrixLoadTransposedEXT)
|
||||
#define glMatrixLoadTransposefEXT MANGLE(MatrixLoadTransposefEXT)
|
||||
#define glMatrixMode MANGLE(MatrixMode)
|
||||
#define glMatrixMultdEXT MANGLE(MatrixMultdEXT)
|
||||
#define glMatrixMultfEXT MANGLE(MatrixMultfEXT)
|
||||
#define glMatrixMultTransposedEXT MANGLE(MatrixMultTransposedEXT)
|
||||
#define glMatrixMultTransposefEXT MANGLE(MatrixMultTransposefEXT)
|
||||
#define glMatrixOrthoEXT MANGLE(MatrixOrthoEXT)
|
||||
#define glMatrixPopEXT MANGLE(MatrixPopEXT)
|
||||
#define glMatrixPushEXT MANGLE(MatrixPushEXT)
|
||||
#define glMatrixRotatedEXT MANGLE(MatrixRotatedEXT)
|
||||
#define glMatrixRotatefEXT MANGLE(MatrixRotatefEXT)
|
||||
#define glMatrixScaledEXT MANGLE(MatrixScaledEXT)
|
||||
#define glMatrixScalefEXT MANGLE(MatrixScalefEXT)
|
||||
#define glMatrixTranslatedEXT MANGLE(MatrixTranslatedEXT)
|
||||
#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT)
|
||||
#define glMinmaxEXT MANGLE(MinmaxEXT)
|
||||
#define glMinmax MANGLE(Minmax)
|
||||
#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT)
|
||||
@@ -734,6 +892,7 @@
|
||||
#define glMultiDrawRangeElementArrayAPPLE MANGLE(MultiDrawRangeElementArrayAPPLE)
|
||||
#define glMultiModeDrawArraysIBM MANGLE(MultiModeDrawArraysIBM)
|
||||
#define glMultiModeDrawElementsIBM MANGLE(MultiModeDrawElementsIBM)
|
||||
#define glMultiTexBufferEXT MANGLE(MultiTexBufferEXT)
|
||||
#define glMultiTexCoord1dARB MANGLE(MultiTexCoord1dARB)
|
||||
#define glMultiTexCoord1d MANGLE(MultiTexCoord1d)
|
||||
#define glMultiTexCoord1dvARB MANGLE(MultiTexCoord1dvARB)
|
||||
@@ -806,12 +965,60 @@
|
||||
#define glMultiTexCoord4s MANGLE(MultiTexCoord4s)
|
||||
#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB)
|
||||
#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv)
|
||||
#define glMultiTexCoordPointerEXT MANGLE(MultiTexCoordPointerEXT)
|
||||
#define glMultiTexEnvfEXT MANGLE(MultiTexEnvfEXT)
|
||||
#define glMultiTexEnvfvEXT MANGLE(MultiTexEnvfvEXT)
|
||||
#define glMultiTexEnviEXT MANGLE(MultiTexEnviEXT)
|
||||
#define glMultiTexEnvivEXT MANGLE(MultiTexEnvivEXT)
|
||||
#define glMultiTexGendEXT MANGLE(MultiTexGendEXT)
|
||||
#define glMultiTexGendvEXT MANGLE(MultiTexGendvEXT)
|
||||
#define glMultiTexGenfEXT MANGLE(MultiTexGenfEXT)
|
||||
#define glMultiTexGenfvEXT MANGLE(MultiTexGenfvEXT)
|
||||
#define glMultiTexGeniEXT MANGLE(MultiTexGeniEXT)
|
||||
#define glMultiTexGenivEXT MANGLE(MultiTexGenivEXT)
|
||||
#define glMultiTexImage1DEXT MANGLE(MultiTexImage1DEXT)
|
||||
#define glMultiTexImage2DEXT MANGLE(MultiTexImage2DEXT)
|
||||
#define glMultiTexImage3DEXT MANGLE(MultiTexImage3DEXT)
|
||||
#define glMultiTexParameterfEXT MANGLE(MultiTexParameterfEXT)
|
||||
#define glMultiTexParameterfvEXT MANGLE(MultiTexParameterfvEXT)
|
||||
#define glMultiTexParameteriEXT MANGLE(MultiTexParameteriEXT)
|
||||
#define glMultiTexParameterIivEXT MANGLE(MultiTexParameterIivEXT)
|
||||
#define glMultiTexParameterIuivEXT MANGLE(MultiTexParameterIuivEXT)
|
||||
#define glMultiTexParameterivEXT MANGLE(MultiTexParameterivEXT)
|
||||
#define glMultiTexRenderbufferEXT MANGLE(MultiTexRenderbufferEXT)
|
||||
#define glMultiTexSubImage1DEXT MANGLE(MultiTexSubImage1DEXT)
|
||||
#define glMultiTexSubImage2DEXT MANGLE(MultiTexSubImage2DEXT)
|
||||
#define glMultiTexSubImage3DEXT MANGLE(MultiTexSubImage3DEXT)
|
||||
#define glMultMatrixd MANGLE(MultMatrixd)
|
||||
#define glMultMatrixf MANGLE(MultMatrixf)
|
||||
#define glMultTransposeMatrixdARB MANGLE(MultTransposeMatrixdARB)
|
||||
#define glMultTransposeMatrixd MANGLE(MultTransposeMatrixd)
|
||||
#define glMultTransposeMatrixfARB MANGLE(MultTransposeMatrixfARB)
|
||||
#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf)
|
||||
#define glNamedBufferDataEXT MANGLE(NamedBufferDataEXT)
|
||||
#define glNamedBufferSubDataEXT MANGLE(NamedBufferSubDataEXT)
|
||||
#define glNamedFramebufferRenderbufferEXT MANGLE(NamedFramebufferRenderbufferEXT)
|
||||
#define glNamedFramebufferTexture1DEXT MANGLE(NamedFramebufferTexture1DEXT)
|
||||
#define glNamedFramebufferTexture2DEXT MANGLE(NamedFramebufferTexture2DEXT)
|
||||
#define glNamedFramebufferTexture3DEXT MANGLE(NamedFramebufferTexture3DEXT)
|
||||
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
|
||||
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
|
||||
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
|
||||
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
|
||||
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
|
||||
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
|
||||
#define glNamedProgramLocalParameter4fvEXT MANGLE(NamedProgramLocalParameter4fvEXT)
|
||||
#define glNamedProgramLocalParameterI4iEXT MANGLE(NamedProgramLocalParameterI4iEXT)
|
||||
#define glNamedProgramLocalParameterI4ivEXT MANGLE(NamedProgramLocalParameterI4ivEXT)
|
||||
#define glNamedProgramLocalParameterI4uiEXT MANGLE(NamedProgramLocalParameterI4uiEXT)
|
||||
#define glNamedProgramLocalParameterI4uivEXT MANGLE(NamedProgramLocalParameterI4uivEXT)
|
||||
#define glNamedProgramLocalParameters4fvEXT MANGLE(NamedProgramLocalParameters4fvEXT)
|
||||
#define glNamedProgramLocalParametersI4ivEXT MANGLE(NamedProgramLocalParametersI4ivEXT)
|
||||
#define glNamedProgramLocalParametersI4uivEXT MANGLE(NamedProgramLocalParametersI4uivEXT)
|
||||
#define glNamedProgramStringEXT MANGLE(NamedProgramStringEXT)
|
||||
#define glNamedRenderbufferStorageEXT MANGLE(NamedRenderbufferStorageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleCoverageEXT MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleEXT MANGLE(NamedRenderbufferStorageMultisampleEXT)
|
||||
#define glNewList MANGLE(NewList)
|
||||
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
|
||||
#define glNormal3b MANGLE(Normal3b)
|
||||
@@ -845,6 +1052,7 @@
|
||||
#define glOrtho MANGLE(Ortho)
|
||||
#define glPassTexCoordATI MANGLE(PassTexCoordATI)
|
||||
#define glPassThrough MANGLE(PassThrough)
|
||||
#define glPauseTransformFeedbackNV MANGLE(PauseTransformFeedbackNV)
|
||||
#define glPixelDataRangeNV MANGLE(PixelDataRangeNV)
|
||||
#define glPixelMapfv MANGLE(PixelMapfv)
|
||||
#define glPixelMapuiv MANGLE(PixelMapuiv)
|
||||
@@ -926,12 +1134,47 @@
|
||||
#define glProgramParameter4dvNV MANGLE(ProgramParameter4dvNV)
|
||||
#define glProgramParameter4fNV MANGLE(ProgramParameter4fNV)
|
||||
#define glProgramParameter4fvNV MANGLE(ProgramParameter4fvNV)
|
||||
#define glProgramParameteriARB MANGLE(ProgramParameteriARB)
|
||||
#define glProgramParameteriEXT MANGLE(ProgramParameteriEXT)
|
||||
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
|
||||
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
|
||||
#define glProgramStringARB MANGLE(ProgramStringARB)
|
||||
#define glProgramUniform1fEXT MANGLE(ProgramUniform1fEXT)
|
||||
#define glProgramUniform1fvEXT MANGLE(ProgramUniform1fvEXT)
|
||||
#define glProgramUniform1iEXT MANGLE(ProgramUniform1iEXT)
|
||||
#define glProgramUniform1ivEXT MANGLE(ProgramUniform1ivEXT)
|
||||
#define glProgramUniform1uiEXT MANGLE(ProgramUniform1uiEXT)
|
||||
#define glProgramUniform1uivEXT MANGLE(ProgramUniform1uivEXT)
|
||||
#define glProgramUniform2fEXT MANGLE(ProgramUniform2fEXT)
|
||||
#define glProgramUniform2fvEXT MANGLE(ProgramUniform2fvEXT)
|
||||
#define glProgramUniform2iEXT MANGLE(ProgramUniform2iEXT)
|
||||
#define glProgramUniform2ivEXT MANGLE(ProgramUniform2ivEXT)
|
||||
#define glProgramUniform2uiEXT MANGLE(ProgramUniform2uiEXT)
|
||||
#define glProgramUniform2uivEXT MANGLE(ProgramUniform2uivEXT)
|
||||
#define glProgramUniform3fEXT MANGLE(ProgramUniform3fEXT)
|
||||
#define glProgramUniform3fvEXT MANGLE(ProgramUniform3fvEXT)
|
||||
#define glProgramUniform3iEXT MANGLE(ProgramUniform3iEXT)
|
||||
#define glProgramUniform3ivEXT MANGLE(ProgramUniform3ivEXT)
|
||||
#define glProgramUniform3uiEXT MANGLE(ProgramUniform3uiEXT)
|
||||
#define glProgramUniform3uivEXT MANGLE(ProgramUniform3uivEXT)
|
||||
#define glProgramUniform4fEXT MANGLE(ProgramUniform4fEXT)
|
||||
#define glProgramUniform4fvEXT MANGLE(ProgramUniform4fvEXT)
|
||||
#define glProgramUniform4iEXT MANGLE(ProgramUniform4iEXT)
|
||||
#define glProgramUniform4ivEXT MANGLE(ProgramUniform4ivEXT)
|
||||
#define glProgramUniform4uiEXT MANGLE(ProgramUniform4uiEXT)
|
||||
#define glProgramUniform4uivEXT MANGLE(ProgramUniform4uivEXT)
|
||||
#define glProgramUniformMatrix2fvEXT MANGLE(ProgramUniformMatrix2fvEXT)
|
||||
#define glProgramUniformMatrix2x3fvEXT MANGLE(ProgramUniformMatrix2x3fvEXT)
|
||||
#define glProgramUniformMatrix2x4fvEXT MANGLE(ProgramUniformMatrix2x4fvEXT)
|
||||
#define glProgramUniformMatrix3fvEXT MANGLE(ProgramUniformMatrix3fvEXT)
|
||||
#define glProgramUniformMatrix3x2fvEXT MANGLE(ProgramUniformMatrix3x2fvEXT)
|
||||
#define glProgramUniformMatrix3x4fvEXT MANGLE(ProgramUniformMatrix3x4fvEXT)
|
||||
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
|
||||
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
|
||||
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
|
||||
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
|
||||
#define glPushAttrib MANGLE(PushAttrib)
|
||||
#define glPushClientAttribDefaultEXT MANGLE(PushClientAttribDefaultEXT)
|
||||
#define glPushClientAttrib MANGLE(PushClientAttrib)
|
||||
#define glPushMatrix MANGLE(PushMatrix)
|
||||
#define glPushName MANGLE(PushName)
|
||||
@@ -972,8 +1215,10 @@
|
||||
#define glRectsv MANGLE(Rectsv)
|
||||
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
|
||||
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
|
||||
#define glRenderbufferStorage MANGLE(RenderbufferStorage)
|
||||
#define glRenderbufferStorageMultisampleCoverageNV MANGLE(RenderbufferStorageMultisampleCoverageNV)
|
||||
#define glRenderbufferStorageMultisampleEXT MANGLE(RenderbufferStorageMultisampleEXT)
|
||||
#define glRenderbufferStorageMultisample MANGLE(RenderbufferStorageMultisample)
|
||||
#define glRenderMode MANGLE(RenderMode)
|
||||
#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN)
|
||||
#define glReplacementCodeubSUN MANGLE(ReplacementCodeubSUN)
|
||||
@@ -1004,12 +1249,14 @@
|
||||
#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT)
|
||||
#define glResetMinmax MANGLE(ResetMinmax)
|
||||
#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA)
|
||||
#define glResumeTransformFeedbackNV MANGLE(ResumeTransformFeedbackNV)
|
||||
#define glRotated MANGLE(Rotated)
|
||||
#define glRotatef MANGLE(Rotatef)
|
||||
#define glSampleCoverageARB MANGLE(SampleCoverageARB)
|
||||
#define glSampleCoverage MANGLE(SampleCoverage)
|
||||
#define glSampleMapATI MANGLE(SampleMapATI)
|
||||
#define glSampleMaskEXT MANGLE(SampleMaskEXT)
|
||||
#define glSampleMaskIndexedNV MANGLE(SampleMaskIndexedNV)
|
||||
#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
|
||||
#define glSamplePatternEXT MANGLE(SamplePatternEXT)
|
||||
#define glSamplePatternSGIS MANGLE(SamplePatternSGIS)
|
||||
@@ -1101,6 +1348,7 @@
|
||||
#define glTestFenceAPPLE MANGLE(TestFenceAPPLE)
|
||||
#define glTestFenceNV MANGLE(TestFenceNV)
|
||||
#define glTestObjectAPPLE MANGLE(TestObjectAPPLE)
|
||||
#define glTexBufferARB MANGLE(TexBufferARB)
|
||||
#define glTexBufferEXT MANGLE(TexBufferEXT)
|
||||
#define glTexBumpParameterfvATI MANGLE(TexBumpParameterfvATI)
|
||||
#define glTexBumpParameterivATI MANGLE(TexBumpParameterivATI)
|
||||
@@ -1181,9 +1429,12 @@
|
||||
#define glTexParameterf MANGLE(TexParameterf)
|
||||
#define glTexParameterfv MANGLE(TexParameterfv)
|
||||
#define glTexParameterIivEXT MANGLE(TexParameterIivEXT)
|
||||
#define glTexParameterIiv MANGLE(TexParameterIiv)
|
||||
#define glTexParameteri MANGLE(TexParameteri)
|
||||
#define glTexParameterIuivEXT MANGLE(TexParameterIuivEXT)
|
||||
#define glTexParameterIuiv MANGLE(TexParameterIuiv)
|
||||
#define glTexParameteriv MANGLE(TexParameteriv)
|
||||
#define glTexRenderbufferNV MANGLE(TexRenderbufferNV)
|
||||
#define glTexSubImage1DEXT MANGLE(TexSubImage1DEXT)
|
||||
#define glTexSubImage1D MANGLE(TexSubImage1D)
|
||||
#define glTexSubImage2DEXT MANGLE(TexSubImage2DEXT)
|
||||
@@ -1191,12 +1442,28 @@
|
||||
#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT)
|
||||
#define glTexSubImage3D MANGLE(TexSubImage3D)
|
||||
#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS)
|
||||
#define glTextureBufferEXT MANGLE(TextureBufferEXT)
|
||||
#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS)
|
||||
#define glTextureImage1DEXT MANGLE(TextureImage1DEXT)
|
||||
#define glTextureImage2DEXT MANGLE(TextureImage2DEXT)
|
||||
#define glTextureImage3DEXT MANGLE(TextureImage3DEXT)
|
||||
#define glTextureLightEXT MANGLE(TextureLightEXT)
|
||||
#define glTextureMaterialEXT MANGLE(TextureMaterialEXT)
|
||||
#define glTextureNormalEXT MANGLE(TextureNormalEXT)
|
||||
#define glTextureParameterfEXT MANGLE(TextureParameterfEXT)
|
||||
#define glTextureParameterfvEXT MANGLE(TextureParameterfvEXT)
|
||||
#define glTextureParameteriEXT MANGLE(TextureParameteriEXT)
|
||||
#define glTextureParameterIivEXT MANGLE(TextureParameterIivEXT)
|
||||
#define glTextureParameterIuivEXT MANGLE(TextureParameterIuivEXT)
|
||||
#define glTextureParameterivEXT MANGLE(TextureParameterivEXT)
|
||||
#define glTextureRenderbufferEXT MANGLE(TextureRenderbufferEXT)
|
||||
#define glTextureSubImage1DEXT MANGLE(TextureSubImage1DEXT)
|
||||
#define glTextureSubImage2DEXT MANGLE(TextureSubImage2DEXT)
|
||||
#define glTextureSubImage3DEXT MANGLE(TextureSubImage3DEXT)
|
||||
#define glTrackMatrixNV MANGLE(TrackMatrixNV)
|
||||
#define glTransformFeedbackAttribsNV MANGLE(TransformFeedbackAttribsNV)
|
||||
#define glTransformFeedbackVaryingsEXT MANGLE(TransformFeedbackVaryingsEXT)
|
||||
#define glTransformFeedbackVaryings MANGLE(TransformFeedbackVaryings)
|
||||
#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV)
|
||||
#define glTranslated MANGLE(Translated)
|
||||
#define glTranslatef MANGLE(Translatef)
|
||||
@@ -1209,7 +1476,9 @@
|
||||
#define glUniform1ivARB MANGLE(Uniform1ivARB)
|
||||
#define glUniform1iv MANGLE(Uniform1iv)
|
||||
#define glUniform1uiEXT MANGLE(Uniform1uiEXT)
|
||||
#define glUniform1ui MANGLE(Uniform1ui)
|
||||
#define glUniform1uivEXT MANGLE(Uniform1uivEXT)
|
||||
#define glUniform1uiv MANGLE(Uniform1uiv)
|
||||
#define glUniform2fARB MANGLE(Uniform2fARB)
|
||||
#define glUniform2f MANGLE(Uniform2f)
|
||||
#define glUniform2fvARB MANGLE(Uniform2fvARB)
|
||||
@@ -1219,7 +1488,9 @@
|
||||
#define glUniform2ivARB MANGLE(Uniform2ivARB)
|
||||
#define glUniform2iv MANGLE(Uniform2iv)
|
||||
#define glUniform2uiEXT MANGLE(Uniform2uiEXT)
|
||||
#define glUniform2ui MANGLE(Uniform2ui)
|
||||
#define glUniform2uivEXT MANGLE(Uniform2uivEXT)
|
||||
#define glUniform2uiv MANGLE(Uniform2uiv)
|
||||
#define glUniform3fARB MANGLE(Uniform3fARB)
|
||||
#define glUniform3f MANGLE(Uniform3f)
|
||||
#define glUniform3fvARB MANGLE(Uniform3fvARB)
|
||||
@@ -1229,7 +1500,9 @@
|
||||
#define glUniform3ivARB MANGLE(Uniform3ivARB)
|
||||
#define glUniform3iv MANGLE(Uniform3iv)
|
||||
#define glUniform3uiEXT MANGLE(Uniform3uiEXT)
|
||||
#define glUniform3ui MANGLE(Uniform3ui)
|
||||
#define glUniform3uivEXT MANGLE(Uniform3uivEXT)
|
||||
#define glUniform3uiv MANGLE(Uniform3uiv)
|
||||
#define glUniform4fARB MANGLE(Uniform4fARB)
|
||||
#define glUniform4f MANGLE(Uniform4f)
|
||||
#define glUniform4fvARB MANGLE(Uniform4fvARB)
|
||||
@@ -1239,7 +1512,9 @@
|
||||
#define glUniform4ivARB MANGLE(Uniform4ivARB)
|
||||
#define glUniform4iv MANGLE(Uniform4iv)
|
||||
#define glUniform4uiEXT MANGLE(Uniform4uiEXT)
|
||||
#define glUniform4ui MANGLE(Uniform4ui)
|
||||
#define glUniform4uivEXT MANGLE(Uniform4uivEXT)
|
||||
#define glUniform4uiv MANGLE(Uniform4uiv)
|
||||
#define glUniformBufferEXT MANGLE(UniformBufferEXT)
|
||||
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
|
||||
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
|
||||
@@ -1256,6 +1531,7 @@
|
||||
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
|
||||
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
|
||||
#define glUnmapBuffer MANGLE(UnmapBuffer)
|
||||
#define glUnmapNamedBufferEXT MANGLE(UnmapNamedBufferEXT)
|
||||
#define glUnmapObjectBufferATI MANGLE(UnmapObjectBufferATI)
|
||||
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
|
||||
#define glUseProgram MANGLE(UseProgram)
|
||||
@@ -1412,27 +1688,49 @@
|
||||
#define glVertexAttrib4usvARB MANGLE(VertexAttrib4usvARB)
|
||||
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
|
||||
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
|
||||
#define glVertexAttribDivisor MANGLE(VertexAttribDivisor)
|
||||
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
|
||||
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
|
||||
#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT)
|
||||
#define glVertexAttribI1iv MANGLE(VertexAttribI1iv)
|
||||
#define glVertexAttribI1uiEXT MANGLE(VertexAttribI1uiEXT)
|
||||
#define glVertexAttribI1ui MANGLE(VertexAttribI1ui)
|
||||
#define glVertexAttribI1uivEXT MANGLE(VertexAttribI1uivEXT)
|
||||
#define glVertexAttribI1uiv MANGLE(VertexAttribI1uiv)
|
||||
#define glVertexAttribI2iEXT MANGLE(VertexAttribI2iEXT)
|
||||
#define glVertexAttribI2i MANGLE(VertexAttribI2i)
|
||||
#define glVertexAttribI2ivEXT MANGLE(VertexAttribI2ivEXT)
|
||||
#define glVertexAttribI2iv MANGLE(VertexAttribI2iv)
|
||||
#define glVertexAttribI2uiEXT MANGLE(VertexAttribI2uiEXT)
|
||||
#define glVertexAttribI2ui MANGLE(VertexAttribI2ui)
|
||||
#define glVertexAttribI2uivEXT MANGLE(VertexAttribI2uivEXT)
|
||||
#define glVertexAttribI2uiv MANGLE(VertexAttribI2uiv)
|
||||
#define glVertexAttribI3iEXT MANGLE(VertexAttribI3iEXT)
|
||||
#define glVertexAttribI3i MANGLE(VertexAttribI3i)
|
||||
#define glVertexAttribI3ivEXT MANGLE(VertexAttribI3ivEXT)
|
||||
#define glVertexAttribI3iv MANGLE(VertexAttribI3iv)
|
||||
#define glVertexAttribI3uiEXT MANGLE(VertexAttribI3uiEXT)
|
||||
#define glVertexAttribI3ui MANGLE(VertexAttribI3ui)
|
||||
#define glVertexAttribI3uivEXT MANGLE(VertexAttribI3uivEXT)
|
||||
#define glVertexAttribI3uiv MANGLE(VertexAttribI3uiv)
|
||||
#define glVertexAttribI4bvEXT MANGLE(VertexAttribI4bvEXT)
|
||||
#define glVertexAttribI4bv MANGLE(VertexAttribI4bv)
|
||||
#define glVertexAttribI4iEXT MANGLE(VertexAttribI4iEXT)
|
||||
#define glVertexAttribI4i MANGLE(VertexAttribI4i)
|
||||
#define glVertexAttribI4ivEXT MANGLE(VertexAttribI4ivEXT)
|
||||
#define glVertexAttribI4iv MANGLE(VertexAttribI4iv)
|
||||
#define glVertexAttribI4svEXT MANGLE(VertexAttribI4svEXT)
|
||||
#define glVertexAttribI4sv MANGLE(VertexAttribI4sv)
|
||||
#define glVertexAttribI4ubvEXT MANGLE(VertexAttribI4ubvEXT)
|
||||
#define glVertexAttribI4ubv MANGLE(VertexAttribI4ubv)
|
||||
#define glVertexAttribI4uiEXT MANGLE(VertexAttribI4uiEXT)
|
||||
#define glVertexAttribI4ui MANGLE(VertexAttribI4ui)
|
||||
#define glVertexAttribI4uivEXT MANGLE(VertexAttribI4uivEXT)
|
||||
#define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv)
|
||||
#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT)
|
||||
#define glVertexAttribI4usv MANGLE(VertexAttribI4usv)
|
||||
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
|
||||
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
|
||||
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
|
||||
#define glVertexAttribPointer MANGLE(VertexAttribPointer)
|
||||
#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)
|
||||
|
||||
+118
-12
@@ -46,9 +46,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated 2008/11/14 */
|
||||
/* glext.h last updated 2009/03/19 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GL_GLEXT_VERSION 44
|
||||
#define GL_GLEXT_VERSION 48
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
@@ -3862,6 +3862,42 @@ extern "C" {
|
||||
#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
|
||||
#endif
|
||||
|
||||
#ifndef GL_ATI_meminfo
|
||||
#define GL_VBO_FREE_MEMORY_ATI 0x87FB
|
||||
#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
|
||||
#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_performance_monitor
|
||||
#define GL_COUNTER_TYPE_AMD 0x8BC0
|
||||
#define GL_COUNTER_RANGE_AMD 0x8BC1
|
||||
#define GL_UNSIGNED_INT64_AMD 0x8BC2
|
||||
#define GL_PERCENTAGE_AMD 0x8BC3
|
||||
#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
|
||||
#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
|
||||
#define GL_PERFMON_RESULT_AMD 0x8BC6
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_texture_texture4
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_vertex_shader_tesselator
|
||||
#define GL_SAMPLER_BUFFER_AMD 0x9001
|
||||
#define GL_INT_SAMPLER_BUFFER_AMD 0x9002
|
||||
#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003
|
||||
#define GL_TESSELLATION_MODE_AMD 0x9004
|
||||
#define GL_TESSELLATION_FACTOR_AMD 0x9005
|
||||
#define GL_DISCRETE_AMD 0x9006
|
||||
#define GL_CONTINUOUS_AMD 0x9007
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_provoking_vertex
|
||||
#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C
|
||||
#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D
|
||||
#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E
|
||||
#define GL_PROVOKING_VERTEX_EXT 0x8E4F
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -4487,8 +4523,8 @@ GLAPI void APIENTRY glBeginTransformFeedback (GLenum);
|
||||
GLAPI void APIENTRY glEndTransformFeedback (void);
|
||||
GLAPI void APIENTRY glBindBufferRange (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
|
||||
GLAPI void APIENTRY glBindBufferBase (GLenum, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint, GLsizei, const GLint *, GLenum);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint, GLuint, GLint *);
|
||||
GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint, GLsizei, const GLchar* *, GLenum);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
|
||||
GLAPI void APIENTRY glClampColor (GLenum, GLenum);
|
||||
GLAPI void APIENTRY glBeginConditionalRender (GLuint, GLenum);
|
||||
GLAPI void APIENTRY glEndConditionalRender (void);
|
||||
@@ -4546,8 +4582,8 @@ typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
|
||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLint *location);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
|
||||
typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
|
||||
typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
|
||||
typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
|
||||
@@ -5268,10 +5304,10 @@ typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divi
|
||||
#ifndef GL_ARB_map_buffer_range
|
||||
#define GL_ARB_map_buffer_range 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glMapBufferRange (GLenum, GLintptr, GLsizeiptr, GLbitfield);
|
||||
GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum, GLintptr, GLsizeiptr, GLbitfield);
|
||||
GLAPI void APIENTRY glFlushMappedBufferRange (GLenum, GLintptr, GLsizeiptr);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
#endif
|
||||
|
||||
@@ -8011,6 +8047,22 @@ typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
|
||||
|
||||
#ifndef GL_NV_present_video
|
||||
#define GL_NV_present_video 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLuint, GLenum, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint);
|
||||
GLAPI void APIENTRY glGetVideoivNV (GLuint, GLenum, GLint *);
|
||||
GLAPI void APIENTRY glGetVideouivNV (GLuint, GLenum, GLuint *);
|
||||
GLAPI void APIENTRY glGetVideoi64vNV (GLuint, GLenum, GLint64EXT *);
|
||||
GLAPI void APIENTRY glGetVideoui64vNV (GLuint, GLenum, GLuint64EXT *);
|
||||
GLAPI void APIENTRY glVideoParameterivNV (GLuint, GLenum, const GLint *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
|
||||
typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
|
||||
typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
|
||||
typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
|
||||
typedef void (APIENTRYP PFNGLVIDEOPARAMETERIVNVPROC) (GLuint video_slot, GLenum pname, const GLint *params);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_transform_feedback
|
||||
@@ -8021,16 +8073,16 @@ GLAPI void APIENTRY glEndTransformFeedbackEXT (void);
|
||||
GLAPI void APIENTRY glBindBufferRangeEXT (GLenum, GLuint, GLuint, GLintptr, GLsizeiptr);
|
||||
GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum, GLuint, GLuint, GLintptr);
|
||||
GLAPI void APIENTRY glBindBufferBaseEXT (GLenum, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint, GLsizei, const GLint *, GLenum);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint, GLuint, GLint *);
|
||||
GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint, GLsizei, const GLchar* *, GLenum);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode);
|
||||
typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLint *location);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_direct_state_access
|
||||
@@ -8451,6 +8503,60 @@ typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
|
||||
#endif
|
||||
|
||||
#ifndef GL_ATI_meminfo
|
||||
#define GL_ATI_meminfo 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_performance_monitor
|
||||
#define GL_AMD_performance_monitor 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *, GLsizei, GLuint *);
|
||||
GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint, GLint *, GLint *, GLsizei, GLuint *);
|
||||
GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint, GLsizei, GLsizei *, GLchar *);
|
||||
GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint, GLuint, GLsizei, GLsizei *, GLchar *);
|
||||
GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint, GLuint, GLenum, void *);
|
||||
GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei, GLuint *);
|
||||
GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei, GLuint *);
|
||||
GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint, GLboolean, GLuint, GLint, GLuint *);
|
||||
GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint);
|
||||
GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint);
|
||||
GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint, GLenum, GLsizei, GLuint *, GLint *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
|
||||
typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
|
||||
typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
|
||||
typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
|
||||
typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
|
||||
typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_texture_texture4
|
||||
#define GL_AMD_texture_texture4 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_vertex_shader_tesselator
|
||||
#define GL_AMD_vertex_shader_tesselator 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glTessellationFactorAMD (GLfloat);
|
||||
GLAPI void APIENTRY glTessellationModeAMD (GLenum);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor);
|
||||
typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_provoking_vertex
|
||||
#define GL_EXT_provoking_vertex 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glProvokingVertexEXT (GLenum);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Makefile for core library for VMS
|
||||
# contributed by Jouk Jansen [email protected]
|
||||
# Last revision : 3 October 2007
|
||||
# Last revision : 29 September 2008
|
||||
|
||||
.first
|
||||
define gl [----.include.gl]
|
||||
@@ -19,7 +19,8 @@ VPATH = RCS
|
||||
|
||||
INCDIR = [----.include],[--.main],[--.glapi],[--.shader]
|
||||
LIBDIR = [----.lib]
|
||||
CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ieee/ieee=denorm
|
||||
CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)\
|
||||
/float=ieee/ieee=denorm/warn=disable=(PTRMISMATCH)
|
||||
|
||||
SOURCES = driverfuncs.c
|
||||
|
||||
|
||||
+24
-20
@@ -23,35 +23,36 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "glheader.h"
|
||||
#include "imports.h"
|
||||
#include "arrayobj.h"
|
||||
#include "buffers.h"
|
||||
#include "context.h"
|
||||
#include "framebuffer.h"
|
||||
#include "mipmap.h"
|
||||
#include "queryobj.h"
|
||||
#include "renderbuffer.h"
|
||||
#include "texcompress.h"
|
||||
#include "texformat.h"
|
||||
#include "teximage.h"
|
||||
#include "texobj.h"
|
||||
#include "texstore.h"
|
||||
#include "main/glheader.h"
|
||||
#include "main/imports.h"
|
||||
#include "main/arrayobj.h"
|
||||
#include "main/buffers.h"
|
||||
#include "main/context.h"
|
||||
#include "main/framebuffer.h"
|
||||
#include "main/mipmap.h"
|
||||
#include "main/queryobj.h"
|
||||
#include "main/renderbuffer.h"
|
||||
#include "main/texcompress.h"
|
||||
#include "main/texformat.h"
|
||||
#include "main/teximage.h"
|
||||
#include "main/texobj.h"
|
||||
#include "main/texstore.h"
|
||||
#if FEATURE_ARB_vertex_buffer_object
|
||||
#include "bufferobj.h"
|
||||
#include "main/bufferobj.h"
|
||||
#endif
|
||||
#if FEATURE_EXT_framebuffer_object
|
||||
#include "fbobject.h"
|
||||
#include "texrender.h"
|
||||
#include "main/fbobject.h"
|
||||
#include "main/texrender.h"
|
||||
#endif
|
||||
|
||||
#include "shader/program.h"
|
||||
#include "shader/prog_execute.h"
|
||||
#include "shader/shader_api.h"
|
||||
#include "driverfuncs.h"
|
||||
#include "tnl/tnl.h"
|
||||
#include "swrast/swrast.h"
|
||||
|
||||
#include "driverfuncs.h"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -80,6 +81,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
|
||||
/* framebuffer/image functions */
|
||||
driver->Clear = _swrast_Clear;
|
||||
driver->Accum = _swrast_Accum;
|
||||
driver->RasterPos = _tnl_RasterPos;
|
||||
driver->DrawPixels = _swrast_DrawPixels;
|
||||
driver->ReadPixels = _swrast_ReadPixels;
|
||||
driver->CopyPixels = _swrast_CopyPixels;
|
||||
@@ -227,8 +229,10 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
|
||||
|
||||
/* query objects */
|
||||
driver->NewQueryObject = _mesa_new_query_object;
|
||||
driver->BeginQuery = NULL;
|
||||
driver->EndQuery = NULL;
|
||||
driver->DeleteQuery = _mesa_delete_query;
|
||||
driver->BeginQuery = _mesa_begin_query;
|
||||
driver->EndQuery = _mesa_end_query;
|
||||
driver->WaitQuery = _mesa_wait_query;
|
||||
|
||||
/* APPLE_vertex_array_object */
|
||||
driver->NewArrayObject = _mesa_new_array_object;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* $Id: gld_debug_clip.c,v 1.1 2004/04/20 11:13:11 alanh Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* $Id: gld_debug_norm.c,v 1.1 2004/04/20 11:13:11 alanh Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* $Id: gld_debug_xform.c,v 1.1 2004/04/20 11:13:11 alanh Exp $ */
|
||||
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
DESCRIPTION 'Mesa (OpenGL driver) for Win32'
|
||||
VERSION 7.3
|
||||
VERSION 7.4
|
||||
|
||||
EXPORTS
|
||||
;
|
||||
@@ -22,7 +22,7 @@ EXPORTS
|
||||
DrvSwapLayerBuffers
|
||||
DrvValidateVersion
|
||||
|
||||
; Standalon
|
||||
; Standalone
|
||||
glNewList
|
||||
glEndList
|
||||
glCallList
|
||||
|
||||
+7
-1
@@ -87,7 +87,13 @@ find_entry( const char * n )
|
||||
GLuint i;
|
||||
for (i = 0; static_functions[i].Name_offset >= 0; i++) {
|
||||
const char *testName = gl_string_table + static_functions[i].Name_offset;
|
||||
if (strcmp(testName, n) == 0) {
|
||||
#ifdef MANGLE
|
||||
/* skip the "m" prefix on the name */
|
||||
if (strcmp(testName, n + 1) == 0)
|
||||
#else
|
||||
if (strcmp(testName, n) == 0)
|
||||
#endif
|
||||
{
|
||||
return &static_functions[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,9 +225,21 @@ typedef xmutex_rec _glthread_Mutex;
|
||||
*/
|
||||
#ifdef BEOS_THREADS
|
||||
|
||||
/* Problem with OS.h and this file on haiku */
|
||||
#ifndef __HAIKU__
|
||||
#include <kernel/OS.h>
|
||||
#endif
|
||||
|
||||
#include <support/TLS.h>
|
||||
|
||||
/* The only two typedefs required here
|
||||
* this is cause of the OS.h problem
|
||||
*/
|
||||
#ifdef __HAIKU__
|
||||
typedef int32 thread_id;
|
||||
typedef int32 sem_id;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int32 key;
|
||||
int initMagic;
|
||||
|
||||
+12
-3
@@ -87,11 +87,20 @@ check_valid_to_render(GLcontext *ctx, char *function)
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
/* Always need vertex positions, unless a vertex program is in use */
|
||||
if (!ctx->VertexProgram._Current &&
|
||||
!ctx->Array.ArrayObj->Vertex.Enabled &&
|
||||
#if FEATURE_es2_glsl
|
||||
/* For ES2, we can draw if any vertex array is enabled (and we should
|
||||
* always have a vertex program/shader).
|
||||
*/
|
||||
if (ctx->Array.ArrayObj->_Enabled == 0x0 || !ctx->VertexProgram._Current)
|
||||
return GL_FALSE;
|
||||
#else
|
||||
/* For regular OpenGL, only draw if we have vertex positions (regardless
|
||||
* of whether or not we have a vertex program/shader).
|
||||
*/
|
||||
if (!ctx->Array.ArrayObj->Vertex.Enabled &&
|
||||
!ctx->Array.ArrayObj->VertexAttrib[0].Enabled)
|
||||
return GL_FALSE;
|
||||
#endif
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
+9
-32
@@ -365,7 +365,7 @@ _mesa_PushAttrib(GLbitfield mask)
|
||||
|
||||
if (mask & GL_TEXTURE_BIT) {
|
||||
struct texture_state *texstate = CALLOC_STRUCT(texture_state);
|
||||
GLuint u;
|
||||
GLuint u, tex;
|
||||
|
||||
if (!texstate) {
|
||||
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib(GL_TEXTURE_BIT)");
|
||||
@@ -381,38 +381,18 @@ _mesa_PushAttrib(GLbitfield mask)
|
||||
* accidentally get deleted while referenced in the attribute stack.
|
||||
*/
|
||||
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
|
||||
_mesa_reference_texobj(&texstate->SavedTexRef[u][TEXTURE_1D_INDEX],
|
||||
ctx->Texture.Unit[u].Current1D);
|
||||
_mesa_reference_texobj(&texstate->SavedTexRef[u][TEXTURE_2D_INDEX],
|
||||
ctx->Texture.Unit[u].Current2D);
|
||||
_mesa_reference_texobj(&texstate->SavedTexRef[u][TEXTURE_3D_INDEX],
|
||||
ctx->Texture.Unit[u].Current3D);
|
||||
_mesa_reference_texobj(&texstate->SavedTexRef[u][TEXTURE_CUBE_INDEX],
|
||||
ctx->Texture.Unit[u].CurrentCubeMap);
|
||||
_mesa_reference_texobj(&texstate->SavedTexRef[u][TEXTURE_RECT_INDEX],
|
||||
ctx->Texture.Unit[u].CurrentRect);
|
||||
_mesa_reference_texobj(&texstate->SavedTexRef[u][TEXTURE_1D_ARRAY_INDEX],
|
||||
ctx->Texture.Unit[u].Current1DArray);
|
||||
_mesa_reference_texobj(&texstate->SavedTexRef[u][TEXTURE_2D_ARRAY_INDEX],
|
||||
ctx->Texture.Unit[u].Current2DArray);
|
||||
for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
|
||||
_mesa_reference_texobj(&texstate->SavedTexRef[u][tex],
|
||||
ctx->Texture.Unit[u].CurrentTex[tex]);
|
||||
}
|
||||
}
|
||||
|
||||
/* copy state/contents of the currently bound texture objects */
|
||||
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
|
||||
_mesa_copy_texture_object(&texstate->SavedObj[u][TEXTURE_1D_INDEX],
|
||||
ctx->Texture.Unit[u].Current1D);
|
||||
_mesa_copy_texture_object(&texstate->SavedObj[u][TEXTURE_2D_INDEX],
|
||||
ctx->Texture.Unit[u].Current2D);
|
||||
_mesa_copy_texture_object(&texstate->SavedObj[u][TEXTURE_3D_INDEX],
|
||||
ctx->Texture.Unit[u].Current3D);
|
||||
_mesa_copy_texture_object(&texstate->SavedObj[u][TEXTURE_CUBE_INDEX],
|
||||
ctx->Texture.Unit[u].CurrentCubeMap);
|
||||
_mesa_copy_texture_object(&texstate->SavedObj[u][TEXTURE_RECT_INDEX],
|
||||
ctx->Texture.Unit[u].CurrentRect);
|
||||
_mesa_copy_texture_object(&texstate->SavedObj[u][TEXTURE_1D_ARRAY_INDEX],
|
||||
ctx->Texture.Unit[u].Current1DArray);
|
||||
_mesa_copy_texture_object(&texstate->SavedObj[u][TEXTURE_2D_ARRAY_INDEX],
|
||||
ctx->Texture.Unit[u].Current2DArray);
|
||||
for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
|
||||
_mesa_copy_texture_object(&texstate->SavedObj[u][tex],
|
||||
ctx->Texture.Unit[u].CurrentTex[tex]);
|
||||
}
|
||||
}
|
||||
|
||||
_mesa_unlock_context_textures(ctx);
|
||||
@@ -1275,9 +1255,6 @@ adjust_buffer_object_ref_counts(struct gl_array_attrib *array, GLint step)
|
||||
array->ArrayObj->TexCoord[i].BufferObj->RefCount += step;
|
||||
for (i = 0; i < VERT_ATTRIB_MAX; i++)
|
||||
array->ArrayObj->VertexAttrib[i].BufferObj->RefCount += step;
|
||||
|
||||
array->ArrayBufferObj->RefCount += step;
|
||||
array->ElementArrayBufferObj->RefCount += step;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+13
-7
@@ -794,6 +794,13 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
|
||||
|
||||
ASSERT(bufObj->Name == ids[i]);
|
||||
|
||||
if (bufObj->Pointer) {
|
||||
/* if mapped, unmap it now */
|
||||
ctx->Driver.UnmapBuffer(ctx, 0, bufObj);
|
||||
bufObj->Access = GL_READ_WRITE_ARB;
|
||||
bufObj->Pointer = NULL;
|
||||
}
|
||||
|
||||
unbind(ctx, &ctx->Array.ArrayObj->Vertex.BufferObj, bufObj);
|
||||
unbind(ctx, &ctx->Array.ArrayObj->Normal.BufferObj, bufObj);
|
||||
unbind(ctx, &ctx->Array.ArrayObj->Color.BufferObj, bufObj);
|
||||
@@ -944,8 +951,10 @@ _mesa_BufferDataARB(GLenum target, GLsizeiptrARB size,
|
||||
}
|
||||
|
||||
if (bufObj->Pointer) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glBufferDataARB(buffer is mapped)" );
|
||||
return;
|
||||
/* Unmap the existing buffer. We'll replace it now. Not an error. */
|
||||
ctx->Driver.UnmapBuffer(ctx, target, bufObj);
|
||||
bufObj->Access = GL_READ_WRITE_ARB;
|
||||
bufObj->Pointer = NULL;
|
||||
}
|
||||
|
||||
ASSERT(ctx->Driver.BufferData);
|
||||
@@ -1061,11 +1070,8 @@ _mesa_UnmapBufferARB(GLenum target)
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (ctx->Driver.UnmapBuffer) {
|
||||
status = ctx->Driver.UnmapBuffer( ctx, target, bufObj );
|
||||
}
|
||||
|
||||
bufObj->Access = GL_READ_WRITE_ARB; /* initial value, OK? */
|
||||
status = ctx->Driver.UnmapBuffer( ctx, target, bufObj );
|
||||
bufObj->Access = GL_READ_WRITE_ARB;
|
||||
bufObj->Pointer = NULL;
|
||||
|
||||
return status;
|
||||
|
||||
+3
-2
@@ -247,13 +247,14 @@ _mesa_DrawBuffer(GLenum buffer)
|
||||
destMask = draw_buffer_enum_to_bitmask(buffer);
|
||||
if (destMask == BAD_MASK) {
|
||||
/* totally bogus buffer */
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawBuffer(buffer)");
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawBuffer(buffer=0x%x)", buffer);
|
||||
return;
|
||||
}
|
||||
destMask &= supportedMask;
|
||||
if (destMask == 0x0) {
|
||||
/* none of the named color buffers exist! */
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffer(buffer)");
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glDrawBuffer(buffer=0x%x)", buffer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -191,7 +191,7 @@
|
||||
#define MAX_PROGRAM_CALL_DEPTH 8
|
||||
#define MAX_PROGRAM_TEMPS 128
|
||||
#define MAX_PROGRAM_ADDRESS_REGS 2
|
||||
#define MAX_UNIFORMS 256 /**< number of vec4 uniforms */
|
||||
#define MAX_UNIFORMS 1024 /**< number of vec4 uniforms */
|
||||
#define MAX_VARYING 8 /**< number of float[4] vectors */
|
||||
#define MAX_SAMPLERS MAX_TEXTURE_IMAGE_UNITS
|
||||
#define MAX_PROGRAM_INPUTS 32
|
||||
|
||||
+31
-52
@@ -429,6 +429,7 @@ one_time_init( GLcontext *ctx )
|
||||
static GLboolean
|
||||
alloc_shared_state( GLcontext *ctx )
|
||||
{
|
||||
GLuint i;
|
||||
struct gl_shared_state *ss = CALLOC_STRUCT(gl_shared_state);
|
||||
if (!ss)
|
||||
return GL_FALSE;
|
||||
@@ -470,36 +471,24 @@ alloc_shared_state( GLcontext *ctx )
|
||||
ss->ShaderObjects = _mesa_NewHashTable();
|
||||
#endif
|
||||
|
||||
ss->Default1D = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_1D);
|
||||
if (!ss->Default1D)
|
||||
goto cleanup;
|
||||
|
||||
ss->Default2D = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_2D);
|
||||
if (!ss->Default2D)
|
||||
goto cleanup;
|
||||
|
||||
ss->Default3D = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_3D);
|
||||
if (!ss->Default3D)
|
||||
goto cleanup;
|
||||
|
||||
ss->DefaultCubeMap = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_CUBE_MAP_ARB);
|
||||
if (!ss->DefaultCubeMap)
|
||||
goto cleanup;
|
||||
|
||||
ss->DefaultRect = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_RECTANGLE_NV);
|
||||
if (!ss->DefaultRect)
|
||||
goto cleanup;
|
||||
|
||||
ss->Default1DArray = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_1D_ARRAY_EXT);
|
||||
if (!ss->Default1DArray)
|
||||
goto cleanup;
|
||||
|
||||
ss->Default2DArray = (*ctx->Driver.NewTextureObject)(ctx, 0, GL_TEXTURE_2D_ARRAY_EXT);
|
||||
if (!ss->Default2DArray)
|
||||
goto cleanup;
|
||||
/* Create default texture objects */
|
||||
for (i = 0; i < NUM_TEXTURE_TARGETS; i++) {
|
||||
static const GLenum targets[NUM_TEXTURE_TARGETS] = {
|
||||
GL_TEXTURE_1D,
|
||||
GL_TEXTURE_2D,
|
||||
GL_TEXTURE_3D,
|
||||
GL_TEXTURE_CUBE_MAP,
|
||||
GL_TEXTURE_RECTANGLE_NV,
|
||||
GL_TEXTURE_1D_ARRAY_EXT,
|
||||
GL_TEXTURE_2D_ARRAY_EXT
|
||||
};
|
||||
ss->DefaultTex[i] = ctx->Driver.NewTextureObject(ctx, 0, targets[i]);
|
||||
if (!ss->DefaultTex[i])
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* sanity check */
|
||||
assert(ss->Default1D->RefCount == 1);
|
||||
assert(ss->DefaultTex[TEXTURE_1D_INDEX]->RefCount == 1);
|
||||
|
||||
_glthread_INIT_MUTEX(ss->TexMutex);
|
||||
ss->TextureStateStamp = 0;
|
||||
@@ -553,20 +542,10 @@ cleanup:
|
||||
_mesa_DeleteHashTable(ss->RenderBuffers);
|
||||
#endif
|
||||
|
||||
if (ss->Default1D)
|
||||
(*ctx->Driver.DeleteTexture)(ctx, ss->Default1D);
|
||||
if (ss->Default2D)
|
||||
(*ctx->Driver.DeleteTexture)(ctx, ss->Default2D);
|
||||
if (ss->Default3D)
|
||||
(*ctx->Driver.DeleteTexture)(ctx, ss->Default3D);
|
||||
if (ss->DefaultCubeMap)
|
||||
(*ctx->Driver.DeleteTexture)(ctx, ss->DefaultCubeMap);
|
||||
if (ss->DefaultRect)
|
||||
(*ctx->Driver.DeleteTexture)(ctx, ss->DefaultRect);
|
||||
if (ss->Default1DArray)
|
||||
(*ctx->Driver.DeleteTexture)(ctx, ss->Default1DArray);
|
||||
if (ss->Default2DArray)
|
||||
(*ctx->Driver.DeleteTexture)(ctx, ss->Default2DArray);
|
||||
for (i = 0; i < NUM_TEXTURE_TARGETS; i++) {
|
||||
if (ss->DefaultTex[i])
|
||||
ctx->Driver.DeleteTexture(ctx, ss->DefaultTex[i]);
|
||||
}
|
||||
|
||||
_mesa_free(ss);
|
||||
|
||||
@@ -728,6 +707,8 @@ delete_renderbuffer_cb(GLuint id, void *data, void *userData)
|
||||
static void
|
||||
free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
|
||||
{
|
||||
GLuint i;
|
||||
|
||||
/*
|
||||
* Free display lists
|
||||
*/
|
||||
@@ -777,13 +758,9 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
|
||||
*/
|
||||
ASSERT(ctx->Driver.DeleteTexture);
|
||||
/* the default textures */
|
||||
ctx->Driver.DeleteTexture(ctx, ss->Default1D);
|
||||
ctx->Driver.DeleteTexture(ctx, ss->Default2D);
|
||||
ctx->Driver.DeleteTexture(ctx, ss->Default3D);
|
||||
ctx->Driver.DeleteTexture(ctx, ss->DefaultCubeMap);
|
||||
ctx->Driver.DeleteTexture(ctx, ss->DefaultRect);
|
||||
ctx->Driver.DeleteTexture(ctx, ss->Default1DArray);
|
||||
ctx->Driver.DeleteTexture(ctx, ss->Default2DArray);
|
||||
for (i = 0; i < NUM_TEXTURE_TARGETS; i++) {
|
||||
ctx->Driver.DeleteTexture(ctx, ss->DefaultTex[i]);
|
||||
}
|
||||
/* all other textures */
|
||||
_mesa_HashDeleteAll(ss->TexObjects, delete_texture_cb, ctx);
|
||||
_mesa_DeleteHashTable(ss->TexObjects);
|
||||
@@ -1293,6 +1270,8 @@ _mesa_create_context(const GLvisual *visual,
|
||||
void
|
||||
_mesa_free_context_data( GLcontext *ctx )
|
||||
{
|
||||
GLint RefCount;
|
||||
|
||||
if (!_mesa_get_current_context()){
|
||||
/* No current context, but we may need one in order to delete
|
||||
* texture objs, etc. So temporarily bind the context now.
|
||||
@@ -1342,10 +1321,10 @@ _mesa_free_context_data( GLcontext *ctx )
|
||||
|
||||
/* Shared context state (display lists, textures, etc) */
|
||||
_glthread_LOCK_MUTEX(ctx->Shared->Mutex);
|
||||
ctx->Shared->RefCount--;
|
||||
assert(ctx->Shared->RefCount >= 0);
|
||||
RefCount = --ctx->Shared->RefCount;
|
||||
_glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
|
||||
if (ctx->Shared->RefCount == 0) {
|
||||
assert(RefCount >= 0);
|
||||
if (RefCount == 0) {
|
||||
/* free shared state */
|
||||
free_shared_state( ctx, ctx->Shared );
|
||||
}
|
||||
|
||||
@@ -36,6 +36,15 @@
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(__HAIKU__)
|
||||
/* for NULL */
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper for dlopen().
|
||||
|
||||
+5
-2
@@ -922,10 +922,13 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_STENCIL);
|
||||
ctx->Stencil.TestTwoSide = state;
|
||||
if (state)
|
||||
if (state) {
|
||||
ctx->Stencil._BackFace = 2;
|
||||
ctx->_TriangleCaps |= DD_TRI_TWOSTENCIL;
|
||||
else
|
||||
} else {
|
||||
ctx->Stencil._BackFace = 1;
|
||||
ctx->_TriangleCaps &= ~DD_TRI_TWOSTENCIL;
|
||||
}
|
||||
break;
|
||||
|
||||
#if FEATURE_ARB_fragment_program
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
|
||||
#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__)
|
||||
#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun)
|
||||
|
||||
/*
|
||||
* Allocate a large block of memory which can hold code then dole it out
|
||||
|
||||
+4
-4
@@ -204,7 +204,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
|
||||
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
|
||||
#endif
|
||||
#if FEATURE_ARB_shading_language_120
|
||||
ctx->Extensions.ARB_shading_language_120 = GL_FALSE; /* not quite done */
|
||||
ctx->Extensions.ARB_shading_language_120 = GL_TRUE;
|
||||
#endif
|
||||
ctx->Extensions.ARB_shadow = GL_TRUE;
|
||||
ctx->Extensions.ARB_texture_border_clamp = GL_TRUE;
|
||||
@@ -258,7 +258,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
|
||||
ctx->Extensions.EXT_secondary_color = GL_TRUE;
|
||||
ctx->Extensions.EXT_shared_texture_palette = GL_TRUE;
|
||||
ctx->Extensions.EXT_stencil_wrap = GL_TRUE;
|
||||
ctx->Extensions.EXT_stencil_two_side = GL_FALSE; /* obsolete */
|
||||
ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
|
||||
ctx->Extensions.EXT_texture_env_add = GL_TRUE;
|
||||
ctx->Extensions.EXT_texture_env_combine = GL_TRUE;
|
||||
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
|
||||
@@ -406,7 +406,7 @@ _mesa_enable_2_0_extensions(GLcontext *ctx)
|
||||
#if FEATURE_ARB_shading_language_100
|
||||
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
|
||||
#endif
|
||||
ctx->Extensions.EXT_stencil_two_side = GL_FALSE; /* obsolete */
|
||||
ctx->Extensions.EXT_stencil_two_side = GL_TRUE;
|
||||
#if FEATURE_ARB_vertex_shader
|
||||
ctx->Extensions.ARB_vertex_shader = GL_TRUE;
|
||||
#endif
|
||||
@@ -427,7 +427,7 @@ _mesa_enable_2_1_extensions(GLcontext *ctx)
|
||||
ctx->Extensions.EXT_texture_sRGB = GL_TRUE;
|
||||
#endif
|
||||
#ifdef FEATURE_ARB_shading_language_120
|
||||
ctx->Extensions.ARB_shading_language_120 = GL_FALSE; /* not quite done */
|
||||
ctx->Extensions.ARB_shading_language_120 = GL_TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ _mesa_new_framebuffer(GLcontext *ctx, GLuint name)
|
||||
fb->ColorReadBuffer = GL_COLOR_ATTACHMENT0_EXT;
|
||||
fb->_ColorReadBufferIndex = BUFFER_COLOR0;
|
||||
fb->Delete = _mesa_destroy_framebuffer;
|
||||
_glthread_INIT_MUTEX(fb->Mutex);
|
||||
}
|
||||
return fb;
|
||||
}
|
||||
|
||||
+21
-21
@@ -884,21 +884,21 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
params[0] = _mesa_IsEnabled(GL_TEXTURE_2D_ARRAY_EXT);
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_1D:
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_2D:
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_3D:
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
|
||||
CHECK_EXT1(MESA_texture_array, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1DArray->Name);
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
|
||||
CHECK_EXT1(MESA_texture_array, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2DArray->Name);
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_GEN_S:
|
||||
params[0] = ((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0);
|
||||
@@ -1071,7 +1071,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
|
||||
CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name);
|
||||
break;
|
||||
case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
|
||||
CHECK_EXT1(ARB_texture_cube_map, "GetBooleanv");
|
||||
@@ -1569,7 +1569,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_RECTANGLE_NV:
|
||||
CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
|
||||
params[0] = INT_TO_BOOLEAN(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name);
|
||||
break;
|
||||
case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
|
||||
CHECK_EXT1(NV_texture_rectangle, "GetBooleanv");
|
||||
@@ -2732,21 +2732,21 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
params[0] = BOOLEAN_TO_FLOAT(_mesa_IsEnabled(GL_TEXTURE_2D_ARRAY_EXT));
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_1D:
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name);
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_2D:
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name);
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_3D:
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name);
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
|
||||
CHECK_EXT1(MESA_texture_array, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1DArray->Name);
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
|
||||
CHECK_EXT1(MESA_texture_array, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2DArray->Name);
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
|
||||
break;
|
||||
case GL_TEXTURE_GEN_S:
|
||||
params[0] = BOOLEAN_TO_FLOAT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
|
||||
@@ -2919,7 +2919,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
|
||||
CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name);
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name);
|
||||
break;
|
||||
case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
|
||||
CHECK_EXT1(ARB_texture_cube_map, "GetFloatv");
|
||||
@@ -3417,7 +3417,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_RECTANGLE_NV:
|
||||
CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name);
|
||||
params[0] = (GLfloat)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name);
|
||||
break;
|
||||
case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
|
||||
CHECK_EXT1(NV_texture_rectangle, "GetFloatv");
|
||||
@@ -4580,21 +4580,21 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
params[0] = BOOLEAN_TO_INT(_mesa_IsEnabled(GL_TEXTURE_2D_ARRAY_EXT));
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_1D:
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1D->Name;
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name;
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_2D:
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2D->Name;
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name;
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_3D:
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current3D->Name;
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name;
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
|
||||
CHECK_EXT1(MESA_texture_array, "GetIntegerv");
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current1DArray->Name;
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name;
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
|
||||
CHECK_EXT1(MESA_texture_array, "GetIntegerv");
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Current2DArray->Name;
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name;
|
||||
break;
|
||||
case GL_TEXTURE_GEN_S:
|
||||
params[0] = BOOLEAN_TO_INT(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
|
||||
@@ -4767,7 +4767,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
|
||||
CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap->Name;
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name;
|
||||
break;
|
||||
case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
|
||||
CHECK_EXT1(ARB_texture_cube_map, "GetIntegerv");
|
||||
@@ -5265,7 +5265,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
||||
break;
|
||||
case GL_TEXTURE_BINDING_RECTANGLE_NV:
|
||||
CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentRect->Name;
|
||||
params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name;
|
||||
break;
|
||||
case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
|
||||
CHECK_EXT1(NV_texture_rectangle, "GetIntegerv");
|
||||
|
||||
+11
-2
@@ -82,9 +82,18 @@ compute_version(const GLcontext *ctx)
|
||||
ctx->Extensions.ARB_vertex_shader &&
|
||||
ctx->Extensions.ARB_fragment_shader &&
|
||||
ctx->Extensions.ARB_texture_non_power_of_two &&
|
||||
ctx->Extensions.EXT_blend_equation_separate);
|
||||
ctx->Extensions.EXT_blend_equation_separate &&
|
||||
|
||||
/* Technically, 2.0 requires the functionality
|
||||
* of the EXT version. Enable 2.0 if either
|
||||
* extension is available, and assume that a
|
||||
* driver that only exposes the ATI extension
|
||||
* will fallback to software when necessary.
|
||||
*/
|
||||
(ctx->Extensions.EXT_stencil_two_side
|
||||
|| ctx->Extensions.ATI_separate_stencil));
|
||||
const GLboolean ver_2_1 = (ver_2_0 &&
|
||||
/*ctx->Extensions.ARB_shading_language_120 &&*/
|
||||
ctx->Extensions.ARB_shading_language_120 &&
|
||||
ctx->Extensions.EXT_pixel_buffer_object &&
|
||||
ctx->Extensions.EXT_texture_sRGB);
|
||||
if (ver_2_1)
|
||||
|
||||
+1
-1
@@ -300,7 +300,7 @@ _mesa_HashWalk(const struct _mesa_HashTable *table,
|
||||
GLuint pos;
|
||||
ASSERT(table);
|
||||
ASSERT(callback);
|
||||
_glthread_UNLOCK_MUTEX(table2->Mutex);
|
||||
_glthread_LOCK_MUTEX(table2->Mutex);
|
||||
for (pos = 0; pos < TABLE_SIZE; pos++) {
|
||||
struct HashEntry *entry;
|
||||
for (entry = table->Table[pos]; entry; entry = entry->Next) {
|
||||
|
||||
+14
-1
@@ -955,9 +955,22 @@ _mesa_printf( const char *fmtString, ... )
|
||||
va_start( args, fmtString );
|
||||
vsnprintf(s, MAXSTRING, fmtString, args);
|
||||
va_end( args );
|
||||
fprintf(stderr,"%s", s);
|
||||
fprintf(stderr, "%s", s);
|
||||
}
|
||||
|
||||
/** Wrapper around fprintf(), using vsprintf() for the formatting. */
|
||||
void
|
||||
_mesa_fprintf( FILE *f, const char *fmtString, ... )
|
||||
{
|
||||
char s[MAXSTRING];
|
||||
va_list args;
|
||||
va_start( args, fmtString );
|
||||
vsnprintf(s, MAXSTRING, fmtString, args);
|
||||
va_end( args );
|
||||
fprintf(f, "%s", s);
|
||||
}
|
||||
|
||||
|
||||
/** Wrapper around vsprintf() */
|
||||
int
|
||||
_mesa_vsprintf( char *str, const char *fmt, va_list args )
|
||||
|
||||
+5
-1
@@ -325,7 +325,8 @@ static INLINE int iround(float f)
|
||||
}
|
||||
#define IROUND(x) iround(x)
|
||||
#elif defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \
|
||||
(!defined(__BEOS__) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)))
|
||||
(!(defined(__BEOS__) || defined(__HAIKU__)) || \
|
||||
(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)))
|
||||
static INLINE int iround(float f)
|
||||
{
|
||||
int r;
|
||||
@@ -773,6 +774,9 @@ _mesa_snprintf( char *str, size_t size, const char *fmt, ... );
|
||||
extern void
|
||||
_mesa_printf( const char *fmtString, ... );
|
||||
|
||||
extern void
|
||||
_mesa_fprintf( FILE *f, const char *fmtString, ... );
|
||||
|
||||
extern int
|
||||
_mesa_vsprintf( char *str, const char *fmt, va_list args );
|
||||
|
||||
|
||||
+38
-30
@@ -1108,20 +1108,34 @@ struct gl_scissor_attrib
|
||||
|
||||
/**
|
||||
* Stencil attribute group (GL_STENCIL_BUFFER_BIT).
|
||||
*
|
||||
* Three sets of stencil data are tracked so that OpenGL 2.0,
|
||||
* GL_EXT_stencil_two_side, and GL_ATI_separate_stencil can all be supported
|
||||
* simultaneously. In each of the stencil state arrays, element 0 corresponds
|
||||
* to GL_FRONT. Element 1 corresponds to the OpenGL 2.0 /
|
||||
* GL_ATI_separate_stencil GL_BACK state. Element 2 corresponds to the
|
||||
* GL_EXT_stencil_two_side GL_BACK state.
|
||||
*
|
||||
* The derived value \c _BackFace is either 1 or 2 depending on whether or
|
||||
* not GL_STENCIL_TEST_TWO_SIDE_EXT is enabled.
|
||||
*
|
||||
* The derived value \c _TestTwoSide is set when the front-face and back-face
|
||||
* stencil state are different.
|
||||
*/
|
||||
struct gl_stencil_attrib
|
||||
{
|
||||
GLboolean Enabled; /**< Enabled flag */
|
||||
GLboolean TestTwoSide; /**< GL_EXT_stencil_two_side */
|
||||
GLubyte ActiveFace; /**< GL_EXT_stencil_two_side (0 or 1) */
|
||||
GLubyte ActiveFace; /**< GL_EXT_stencil_two_side (0 or 2) */
|
||||
GLboolean _TestTwoSide;
|
||||
GLenum Function[2]; /**< Stencil function */
|
||||
GLenum FailFunc[2]; /**< Fail function */
|
||||
GLenum ZPassFunc[2]; /**< Depth buffer pass function */
|
||||
GLenum ZFailFunc[2]; /**< Depth buffer fail function */
|
||||
GLint Ref[2]; /**< Reference value */
|
||||
GLuint ValueMask[2]; /**< Value mask */
|
||||
GLuint WriteMask[2]; /**< Write mask */
|
||||
GLubyte _BackFace; /**< Current back stencil state (1 or 2) */
|
||||
GLenum Function[3]; /**< Stencil function */
|
||||
GLenum FailFunc[3]; /**< Fail function */
|
||||
GLenum ZPassFunc[3]; /**< Depth buffer pass function */
|
||||
GLenum ZFailFunc[3]; /**< Depth buffer fail function */
|
||||
GLint Ref[3]; /**< Reference value */
|
||||
GLuint ValueMask[3]; /**< Value mask */
|
||||
GLuint WriteMask[3]; /**< Write mask */
|
||||
GLuint Clear; /**< Clear value */
|
||||
};
|
||||
|
||||
@@ -1527,15 +1541,11 @@ struct gl_texture_unit
|
||||
*/
|
||||
struct gl_tex_env_combine_state *_CurrentCombine;
|
||||
|
||||
struct gl_texture_object *Current1D;
|
||||
struct gl_texture_object *Current2D;
|
||||
struct gl_texture_object *Current3D;
|
||||
struct gl_texture_object *CurrentCubeMap; /**< GL_ARB_texture_cube_map */
|
||||
struct gl_texture_object *CurrentRect; /**< GL_NV_texture_rectangle */
|
||||
struct gl_texture_object *Current1DArray; /**< GL_MESA_texture_array */
|
||||
struct gl_texture_object *Current2DArray; /**< GL_MESA_texture_array */
|
||||
/** Current texture object pointers */
|
||||
struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS];
|
||||
|
||||
struct gl_texture_object *_Current; /**< Points to really enabled tex obj */
|
||||
/** Points to highest priority, complete and enabled texture object */
|
||||
struct gl_texture_object *_Current;
|
||||
|
||||
/** GL_SGI_texture_color_table */
|
||||
/*@{*/
|
||||
@@ -2172,18 +2182,8 @@ struct gl_shared_state
|
||||
struct _mesa_HashTable *DisplayList; /**< Display lists hash table */
|
||||
struct _mesa_HashTable *TexObjects; /**< Texture objects hash table */
|
||||
|
||||
/**
|
||||
* \name Default texture objects (shared by all multi-texture units)
|
||||
*/
|
||||
/*@{*/
|
||||
struct gl_texture_object *Default1D;
|
||||
struct gl_texture_object *Default2D;
|
||||
struct gl_texture_object *Default3D;
|
||||
struct gl_texture_object *DefaultCubeMap;
|
||||
struct gl_texture_object *DefaultRect;
|
||||
struct gl_texture_object *Default1DArray;
|
||||
struct gl_texture_object *Default2DArray;
|
||||
/*@}*/
|
||||
/** Default texture objects (shared by all texture units) */
|
||||
struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS];
|
||||
|
||||
/**
|
||||
* \name Thread safety and statechange notification for texture
|
||||
@@ -2376,8 +2376,16 @@ struct gl_renderbuffer_attachment
|
||||
*/
|
||||
struct gl_framebuffer
|
||||
{
|
||||
_glthread_Mutex Mutex; /**< for thread safety */
|
||||
GLuint Name; /* if zero, this is a window system framebuffer */
|
||||
_glthread_Mutex Mutex; /**< for thread safety */
|
||||
/**
|
||||
* If zero, this is a window system framebuffer. If non-zero, this
|
||||
* is a FBO framebuffer; note that for some devices (i.e. those with
|
||||
* a natural pixel coordinate system for FBOs that differs from the
|
||||
* OpenGL/Mesa coordinate system), this means that the viewport,
|
||||
* polygon face orientation, and polygon stipple will have to be inverted.
|
||||
*/
|
||||
GLuint Name;
|
||||
|
||||
GLint RefCount;
|
||||
GLboolean DeletePending;
|
||||
|
||||
|
||||
+71
-24
@@ -173,13 +173,16 @@ update_arrays( GLcontext *ctx )
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the following fields:
|
||||
* ctx->VertexProgram._Enabled
|
||||
* ctx->FragmentProgram._Enabled
|
||||
* ctx->ATIFragmentShader._Enabled
|
||||
* This needs to be done before texture state validation.
|
||||
*/
|
||||
static void
|
||||
update_program(GLcontext *ctx)
|
||||
update_program_enables(GLcontext *ctx)
|
||||
{
|
||||
const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
|
||||
const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
|
||||
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
|
||||
|
||||
/* These _Enabled flags indicate if the program is enabled AND valid. */
|
||||
ctx->VertexProgram._Enabled = ctx->VertexProgram.Enabled
|
||||
&& ctx->VertexProgram.Current->Base.Instructions;
|
||||
@@ -187,6 +190,29 @@ update_program(GLcontext *ctx)
|
||||
&& ctx->FragmentProgram.Current->Base.Instructions;
|
||||
ctx->ATIFragmentShader._Enabled = ctx->ATIFragmentShader.Enabled
|
||||
&& ctx->ATIFragmentShader.Current->Instructions[0];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update vertex/fragment program state. In particular, update these fields:
|
||||
* ctx->VertexProgram._Current
|
||||
* ctx->VertexProgram._TnlProgram,
|
||||
* These point to the highest priority enabled vertex/fragment program or are
|
||||
* NULL if fixed-function processing is to be done.
|
||||
*
|
||||
* This function needs to be called after texture state validation in case
|
||||
* we're generating a fragment program from fixed-function texture state.
|
||||
*
|
||||
* \return bitfield which will indicate _NEW_PROGRAM state if a new vertex
|
||||
* or fragment program is being used.
|
||||
*/
|
||||
static GLbitfield
|
||||
update_program(GLcontext *ctx)
|
||||
{
|
||||
const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
|
||||
const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
|
||||
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
|
||||
GLbitfield new_state = 0x0;
|
||||
|
||||
/*
|
||||
* Set the ctx->VertexProgram._Current and ctx->FragmentProgram._Current
|
||||
@@ -256,15 +282,23 @@ update_program(GLcontext *ctx)
|
||||
|
||||
/* Let the driver know what's happening:
|
||||
*/
|
||||
if (ctx->FragmentProgram._Current != prevFP && ctx->Driver.BindProgram) {
|
||||
ctx->Driver.BindProgram(ctx, GL_FRAGMENT_PROGRAM_ARB,
|
||||
(struct gl_program *) ctx->FragmentProgram._Current);
|
||||
if (ctx->FragmentProgram._Current != prevFP) {
|
||||
new_state |= _NEW_PROGRAM;
|
||||
if (ctx->Driver.BindProgram) {
|
||||
ctx->Driver.BindProgram(ctx, GL_FRAGMENT_PROGRAM_ARB,
|
||||
(struct gl_program *) ctx->FragmentProgram._Current);
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->VertexProgram._Current != prevVP && ctx->Driver.BindProgram) {
|
||||
ctx->Driver.BindProgram(ctx, GL_VERTEX_PROGRAM_ARB,
|
||||
(struct gl_program *) ctx->VertexProgram._Current);
|
||||
if (ctx->VertexProgram._Current != prevVP) {
|
||||
new_state |= _NEW_PROGRAM;
|
||||
if (ctx->Driver.BindProgram) {
|
||||
ctx->Driver.BindProgram(ctx, GL_VERTEX_PROGRAM_ARB,
|
||||
(struct gl_program *) ctx->VertexProgram._Current);
|
||||
}
|
||||
}
|
||||
|
||||
return new_state;
|
||||
}
|
||||
|
||||
|
||||
@@ -425,10 +459,29 @@ _mesa_update_state_locked( GLcontext *ctx )
|
||||
{
|
||||
GLbitfield new_state = ctx->NewState;
|
||||
GLbitfield prog_flags = _NEW_PROGRAM;
|
||||
GLbitfield new_prog_state = 0x0;
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_STATE)
|
||||
_mesa_print_state("_mesa_update_state", new_state);
|
||||
|
||||
/* Determine which state flags effect vertex/fragment program state */
|
||||
if (ctx->FragmentProgram._MaintainTexEnvProgram) {
|
||||
prog_flags |= (_NEW_TEXTURE | _NEW_FOG | _DD_NEW_SEPARATE_SPECULAR);
|
||||
}
|
||||
if (ctx->VertexProgram._MaintainTnlProgram) {
|
||||
prog_flags |= (_NEW_ARRAY | _NEW_TEXTURE | _NEW_TEXTURE_MATRIX |
|
||||
_NEW_TRANSFORM | _NEW_POINT |
|
||||
_NEW_FOG | _NEW_LIGHT |
|
||||
_MESA_NEW_NEED_EYE_COORDS);
|
||||
}
|
||||
|
||||
/*
|
||||
* Now update derived state info
|
||||
*/
|
||||
|
||||
if (new_state & prog_flags)
|
||||
update_program_enables( ctx );
|
||||
|
||||
if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION))
|
||||
_mesa_update_modelview_project( ctx, new_state );
|
||||
|
||||
@@ -488,19 +541,13 @@ _mesa_update_state_locked( GLcontext *ctx )
|
||||
if (new_state & _MESA_NEW_NEED_EYE_COORDS)
|
||||
_mesa_update_tnl_spaces( ctx, new_state );
|
||||
|
||||
if (ctx->FragmentProgram._MaintainTexEnvProgram) {
|
||||
prog_flags |= (_NEW_TEXTURE | _NEW_FOG | _DD_NEW_SEPARATE_SPECULAR);
|
||||
if (new_state & prog_flags) {
|
||||
/* When we generate programs from fixed-function vertex/fragment state
|
||||
* this call may generate/bind a new program. If so, we need to
|
||||
* propogate the _NEW_PROGRAM flag to the driver.
|
||||
*/
|
||||
new_prog_state |= update_program( ctx );
|
||||
}
|
||||
if (ctx->VertexProgram._MaintainTnlProgram) {
|
||||
prog_flags |= (_NEW_ARRAY | _NEW_TEXTURE | _NEW_TEXTURE_MATRIX |
|
||||
_NEW_TRANSFORM | _NEW_POINT |
|
||||
_NEW_FOG | _NEW_LIGHT |
|
||||
_MESA_NEW_NEED_EYE_COORDS);
|
||||
}
|
||||
if (new_state & prog_flags)
|
||||
update_program( ctx );
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Give the driver a chance to act upon the new_state flags.
|
||||
@@ -511,7 +558,7 @@ _mesa_update_state_locked( GLcontext *ctx )
|
||||
* Set ctx->NewState to zero to avoid recursion if
|
||||
* Driver.UpdateState() has to call FLUSH_VERTICES(). (fixed?)
|
||||
*/
|
||||
new_state = ctx->NewState;
|
||||
new_state = ctx->NewState | new_prog_state;
|
||||
ctx->NewState = 0;
|
||||
ctx->Driver.UpdateState(ctx, new_state);
|
||||
ctx->Array.NewState = 0;
|
||||
|
||||
+64
-38
@@ -27,7 +27,7 @@
|
||||
* \file stencil.c
|
||||
* Stencil operations.
|
||||
*
|
||||
* Note: There's an incompatibility between GL_EXT_stencil_two_side and
|
||||
* Note: There's some conflict between GL_EXT_stencil_two_side and
|
||||
* OpenGL 2.0's two-sided stencil feature.
|
||||
*
|
||||
* With GL_EXT_stencil_two_side, calling glStencilOp/Func/Mask() only the
|
||||
@@ -36,12 +36,14 @@
|
||||
* But with OpenGL 2.0, calling glStencilOp/Func/Mask() sets BOTH the
|
||||
* front AND back state.
|
||||
*
|
||||
* So either we advertise the GL_EXT_stencil_two_side extension, or OpenGL
|
||||
* 2.0, but not both.
|
||||
*
|
||||
* Also, note that GL_ATI_separate_stencil is different as well:
|
||||
* glStencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, ...) vs.
|
||||
* glStencilFuncSeparate(GLenum face, GLenum func, ...).
|
||||
*
|
||||
* This problem is solved by keeping three sets of stencil state:
|
||||
* state[0] = GL_FRONT state.
|
||||
* state[1] = OpenGL 2.0 / GL_ATI_separate_stencil GL_BACK state.
|
||||
* state[2] = GL_EXT_stencil_two_side GL_BACK state.
|
||||
*/
|
||||
|
||||
|
||||
@@ -198,6 +200,7 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1;
|
||||
const GLint face = ctx->Stencil.ActiveFace;
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (!validate_stencil_func(ctx, func)) {
|
||||
@@ -207,9 +210,7 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
|
||||
|
||||
ref = CLAMP( ref, 0, stencilMax );
|
||||
|
||||
if (ctx->Extensions.EXT_stencil_two_side) {
|
||||
/* only set active face state */
|
||||
const GLint face = ctx->Stencil.ActiveFace;
|
||||
if (face != 0) {
|
||||
if (ctx->Stencil.Function[face] == func &&
|
||||
ctx->Stencil.ValueMask[face] == mask &&
|
||||
ctx->Stencil.Ref[face] == ref)
|
||||
@@ -218,9 +219,12 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
|
||||
ctx->Stencil.Function[face] = func;
|
||||
ctx->Stencil.Ref[face] = ref;
|
||||
ctx->Stencil.ValueMask[face] = mask;
|
||||
if (ctx->Driver.StencilFuncSeparate) {
|
||||
ctx->Driver.StencilFuncSeparate(ctx, face ? GL_BACK : GL_FRONT,
|
||||
func, ref, mask);
|
||||
|
||||
/* Only propagate the change to the driver if EXT_stencil_two_side
|
||||
* is enabled.
|
||||
*/
|
||||
if (ctx->Driver.StencilFuncSeparate && ctx->Stencil.TestTwoSide) {
|
||||
ctx->Driver.StencilFuncSeparate(ctx, GL_BACK, func, ref, mask);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -237,7 +241,9 @@ _mesa_StencilFunc( GLenum func, GLint ref, GLuint mask )
|
||||
ctx->Stencil.Ref[0] = ctx->Stencil.Ref[1] = ref;
|
||||
ctx->Stencil.ValueMask[0] = ctx->Stencil.ValueMask[1] = mask;
|
||||
if (ctx->Driver.StencilFuncSeparate) {
|
||||
ctx->Driver.StencilFuncSeparate(ctx, GL_FRONT_AND_BACK,
|
||||
ctx->Driver.StencilFuncSeparate(ctx,
|
||||
((ctx->Stencil.TestTwoSide)
|
||||
? GL_FRONT : GL_FRONT_AND_BACK),
|
||||
func, ref, mask);
|
||||
}
|
||||
}
|
||||
@@ -259,17 +265,23 @@ void GLAPIENTRY
|
||||
_mesa_StencilMask( GLuint mask )
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
const GLint face = ctx->Stencil.ActiveFace;
|
||||
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (ctx->Extensions.EXT_stencil_two_side) {
|
||||
/* only set active face state */
|
||||
const GLint face = ctx->Stencil.ActiveFace;
|
||||
if (face != 0) {
|
||||
/* Only modify the EXT_stencil_two_side back-face state.
|
||||
*/
|
||||
if (ctx->Stencil.WriteMask[face] == mask)
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_STENCIL);
|
||||
ctx->Stencil.WriteMask[face] = mask;
|
||||
if (ctx->Driver.StencilMaskSeparate) {
|
||||
ctx->Driver.StencilMaskSeparate(ctx, face ? GL_BACK : GL_FRONT, mask);
|
||||
|
||||
/* Only propagate the change to the driver if EXT_stencil_two_side
|
||||
* is enabled.
|
||||
*/
|
||||
if (ctx->Driver.StencilMaskSeparate && ctx->Stencil.TestTwoSide) {
|
||||
ctx->Driver.StencilMaskSeparate(ctx, GL_BACK, mask);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -280,7 +292,10 @@ _mesa_StencilMask( GLuint mask )
|
||||
FLUSH_VERTICES(ctx, _NEW_STENCIL);
|
||||
ctx->Stencil.WriteMask[0] = ctx->Stencil.WriteMask[1] = mask;
|
||||
if (ctx->Driver.StencilMaskSeparate) {
|
||||
ctx->Driver.StencilMaskSeparate(ctx, GL_FRONT_AND_BACK, mask);
|
||||
ctx->Driver.StencilMaskSeparate(ctx,
|
||||
((ctx->Stencil.TestTwoSide)
|
||||
? GL_FRONT : GL_FRONT_AND_BACK),
|
||||
mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -304,6 +319,8 @@ void GLAPIENTRY
|
||||
_mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
const GLint face = ctx->Stencil.ActiveFace;
|
||||
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (!validate_stencil_op(ctx, fail)) {
|
||||
@@ -319,9 +336,8 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->Extensions.EXT_stencil_two_side) {
|
||||
if (face != 0) {
|
||||
/* only set active face state */
|
||||
const GLint face = ctx->Stencil.ActiveFace;
|
||||
if (ctx->Stencil.ZFailFunc[face] == zfail &&
|
||||
ctx->Stencil.ZPassFunc[face] == zpass &&
|
||||
ctx->Stencil.FailFunc[face] == fail)
|
||||
@@ -330,9 +346,12 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
|
||||
ctx->Stencil.ZFailFunc[face] = zfail;
|
||||
ctx->Stencil.ZPassFunc[face] = zpass;
|
||||
ctx->Stencil.FailFunc[face] = fail;
|
||||
if (ctx->Driver.StencilOpSeparate) {
|
||||
ctx->Driver.StencilOpSeparate(ctx, face ? GL_BACK : GL_FRONT,
|
||||
fail, zfail, zpass);
|
||||
|
||||
/* Only propagate the change to the driver if EXT_stencil_two_side
|
||||
* is enabled.
|
||||
*/
|
||||
if (ctx->Driver.StencilOpSeparate && ctx->Stencil.TestTwoSide) {
|
||||
ctx->Driver.StencilOpSeparate(ctx, GL_BACK, fail, zfail, zpass);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -349,7 +368,9 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
|
||||
ctx->Stencil.ZPassFunc[0] = ctx->Stencil.ZPassFunc[1] = zpass;
|
||||
ctx->Stencil.FailFunc[0] = ctx->Stencil.FailFunc[1] = fail;
|
||||
if (ctx->Driver.StencilOpSeparate) {
|
||||
ctx->Driver.StencilOpSeparate(ctx, GL_FRONT_AND_BACK,
|
||||
ctx->Driver.StencilOpSeparate(ctx,
|
||||
((ctx->Stencil.TestTwoSide)
|
||||
? GL_FRONT : GL_FRONT_AND_BACK),
|
||||
fail, zfail, zpass);
|
||||
}
|
||||
}
|
||||
@@ -372,7 +393,7 @@ _mesa_ActiveStencilFaceEXT(GLenum face)
|
||||
|
||||
if (face == GL_FRONT || face == GL_BACK) {
|
||||
FLUSH_VERTICES(ctx, _NEW_STENCIL);
|
||||
ctx->Stencil.ActiveFace = (face == GL_FRONT) ? 0 : 1;
|
||||
ctx->Stencil.ActiveFace = (face == GL_FRONT) ? 0 : 2;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glActiveStencilFaceEXT(face)");
|
||||
@@ -513,19 +534,16 @@ _mesa_StencilMaskSeparate(GLenum face, GLuint mask)
|
||||
void
|
||||
_mesa_update_stencil(GLcontext *ctx)
|
||||
{
|
||||
if (ctx->Extensions.EXT_stencil_two_side) {
|
||||
ctx->Stencil._TestTwoSide = ctx->Stencil.TestTwoSide;
|
||||
}
|
||||
else {
|
||||
ctx->Stencil._TestTwoSide =
|
||||
(ctx->Stencil.Function[0] != ctx->Stencil.Function[1] ||
|
||||
ctx->Stencil.FailFunc[0] != ctx->Stencil.FailFunc[1] ||
|
||||
ctx->Stencil.ZPassFunc[0] != ctx->Stencil.ZPassFunc[1] ||
|
||||
ctx->Stencil.ZFailFunc[0] != ctx->Stencil.ZFailFunc[1] ||
|
||||
ctx->Stencil.Ref[0] != ctx->Stencil.Ref[1] ||
|
||||
ctx->Stencil.ValueMask[0] != ctx->Stencil.ValueMask[1] ||
|
||||
ctx->Stencil.WriteMask[0] != ctx->Stencil.WriteMask[1]);
|
||||
}
|
||||
const GLint face = ctx->Stencil._BackFace;
|
||||
|
||||
ctx->Stencil._TestTwoSide =
|
||||
(ctx->Stencil.Function[0] != ctx->Stencil.Function[face] ||
|
||||
ctx->Stencil.FailFunc[0] != ctx->Stencil.FailFunc[face] ||
|
||||
ctx->Stencil.ZPassFunc[0] != ctx->Stencil.ZPassFunc[face] ||
|
||||
ctx->Stencil.ZFailFunc[0] != ctx->Stencil.ZFailFunc[face] ||
|
||||
ctx->Stencil.Ref[0] != ctx->Stencil.Ref[face] ||
|
||||
ctx->Stencil.ValueMask[0] != ctx->Stencil.ValueMask[face] ||
|
||||
ctx->Stencil.WriteMask[0] != ctx->Stencil.WriteMask[face]);
|
||||
}
|
||||
|
||||
|
||||
@@ -541,20 +559,28 @@ _mesa_init_stencil(GLcontext *ctx)
|
||||
{
|
||||
ctx->Stencil.Enabled = GL_FALSE;
|
||||
ctx->Stencil.TestTwoSide = GL_FALSE;
|
||||
ctx->Stencil.ActiveFace = 0; /* 0 = GL_FRONT, 1 = GL_BACK */
|
||||
ctx->Stencil.ActiveFace = 0; /* 0 = GL_FRONT, 2 = GL_BACK */
|
||||
ctx->Stencil.Function[0] = GL_ALWAYS;
|
||||
ctx->Stencil.Function[1] = GL_ALWAYS;
|
||||
ctx->Stencil.Function[2] = GL_ALWAYS;
|
||||
ctx->Stencil.FailFunc[0] = GL_KEEP;
|
||||
ctx->Stencil.FailFunc[1] = GL_KEEP;
|
||||
ctx->Stencil.FailFunc[2] = GL_KEEP;
|
||||
ctx->Stencil.ZPassFunc[0] = GL_KEEP;
|
||||
ctx->Stencil.ZPassFunc[1] = GL_KEEP;
|
||||
ctx->Stencil.ZPassFunc[2] = GL_KEEP;
|
||||
ctx->Stencil.ZFailFunc[0] = GL_KEEP;
|
||||
ctx->Stencil.ZFailFunc[1] = GL_KEEP;
|
||||
ctx->Stencil.ZFailFunc[2] = GL_KEEP;
|
||||
ctx->Stencil.Ref[0] = 0;
|
||||
ctx->Stencil.Ref[1] = 0;
|
||||
ctx->Stencil.Ref[2] = 0;
|
||||
ctx->Stencil.ValueMask[0] = ~0U;
|
||||
ctx->Stencil.ValueMask[1] = ~0U;
|
||||
ctx->Stencil.ValueMask[2] = ~0U;
|
||||
ctx->Stencil.WriteMask[0] = ~0U;
|
||||
ctx->Stencil.WriteMask[1] = ~0U;
|
||||
ctx->Stencil.WriteMask[2] = ~0U;
|
||||
ctx->Stencil.Clear = 0;
|
||||
ctx->Stencil._BackFace = 1;
|
||||
}
|
||||
|
||||
+125
-214
@@ -533,6 +533,112 @@ _mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param )
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Helper for glGetTexEnvi/f()
|
||||
* \return value of queried pname or -1 if error.
|
||||
*/
|
||||
static GLint
|
||||
get_texenvi(GLcontext *ctx, const struct gl_texture_unit *texUnit,
|
||||
GLenum pname)
|
||||
{
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_ENV_MODE:
|
||||
return texUnit->EnvMode;
|
||||
break;
|
||||
case GL_COMBINE_RGB:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
return texUnit->Combine.ModeRGB;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_COMBINE_ALPHA:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
return texUnit->Combine.ModeA;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_SOURCE0_RGB:
|
||||
case GL_SOURCE1_RGB:
|
||||
case GL_SOURCE2_RGB:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned rgb_idx = pname - GL_SOURCE0_RGB;
|
||||
return texUnit->Combine.SourceRGB[rgb_idx];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_SOURCE0_ALPHA:
|
||||
case GL_SOURCE1_ALPHA:
|
||||
case GL_SOURCE2_ALPHA:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned alpha_idx = pname - GL_SOURCE0_ALPHA;
|
||||
return texUnit->Combine.SourceA[alpha_idx];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_OPERAND0_RGB:
|
||||
case GL_OPERAND1_RGB:
|
||||
case GL_OPERAND2_RGB:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned op_rgb = pname - GL_OPERAND0_RGB;
|
||||
return texUnit->Combine.OperandRGB[op_rgb];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_OPERAND0_ALPHA:
|
||||
case GL_OPERAND1_ALPHA:
|
||||
case GL_OPERAND2_ALPHA:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned op_alpha = pname - GL_OPERAND0_ALPHA;
|
||||
return texUnit->Combine.OperandA[op_alpha];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_RGB_SCALE:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
return 1 << texUnit->Combine.ScaleShiftRGB;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_ALPHA_SCALE:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
return 1 << texUnit->Combine.ScaleShiftA;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
;
|
||||
}
|
||||
|
||||
return -1; /* error */
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
|
||||
{
|
||||
@@ -551,111 +657,14 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
|
||||
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
|
||||
|
||||
if (target == GL_TEXTURE_ENV) {
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_ENV_MODE:
|
||||
*params = ENUM_TO_FLOAT(texUnit->EnvMode);
|
||||
break;
|
||||
case GL_TEXTURE_ENV_COLOR:
|
||||
COPY_4FV( params, texUnit->EnvColor );
|
||||
break;
|
||||
case GL_COMBINE_RGB:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
*params = (GLfloat) texUnit->Combine.ModeRGB;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_COMBINE_ALPHA:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
*params = (GLfloat) texUnit->Combine.ModeA;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_SOURCE0_RGB:
|
||||
case GL_SOURCE1_RGB:
|
||||
case GL_SOURCE2_RGB:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned rgb_idx = pname - GL_SOURCE0_RGB;
|
||||
*params = (GLfloat) texUnit->Combine.SourceRGB[rgb_idx];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_SOURCE0_ALPHA:
|
||||
case GL_SOURCE1_ALPHA:
|
||||
case GL_SOURCE2_ALPHA:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned alpha_idx = pname - GL_SOURCE0_ALPHA;
|
||||
*params = (GLfloat) texUnit->Combine.SourceA[alpha_idx];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_OPERAND0_RGB:
|
||||
case GL_OPERAND1_RGB:
|
||||
case GL_OPERAND2_RGB:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned op_rgb = pname - GL_OPERAND0_RGB;
|
||||
*params = (GLfloat) texUnit->Combine.OperandRGB[op_rgb];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_OPERAND0_ALPHA:
|
||||
case GL_OPERAND1_ALPHA:
|
||||
case GL_OPERAND2_ALPHA:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned op_alpha = pname - GL_OPERAND0_ALPHA;
|
||||
*params = (GLfloat) texUnit->Combine.OperandA[op_alpha];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_RGB_SCALE:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
if (texUnit->Combine.ScaleShiftRGB == 0)
|
||||
*params = 1.0;
|
||||
else if (texUnit->Combine.ScaleShiftRGB == 1)
|
||||
*params = 2.0;
|
||||
else
|
||||
*params = 4.0;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_ALPHA_SCALE:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
if (texUnit->Combine.ScaleShiftA == 0)
|
||||
*params = 1.0;
|
||||
else if (texUnit->Combine.ScaleShiftA == 1)
|
||||
*params = 2.0;
|
||||
else
|
||||
*params = 4.0;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname=0x%x)", pname);
|
||||
if (pname == GL_TEXTURE_ENV_COLOR) {
|
||||
COPY_4FV( params, texUnit->EnvColor );
|
||||
}
|
||||
else {
|
||||
GLint val = get_texenvi(ctx, texUnit, pname);
|
||||
if (val >= 0) {
|
||||
*params = (GLfloat) val;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (target == GL_TEXTURE_FILTER_CONTROL_EXT) {
|
||||
@@ -712,115 +721,17 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
|
||||
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
|
||||
|
||||
if (target == GL_TEXTURE_ENV) {
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_ENV_MODE:
|
||||
*params = (GLint) texUnit->EnvMode;
|
||||
break;
|
||||
case GL_TEXTURE_ENV_COLOR:
|
||||
params[0] = FLOAT_TO_INT( texUnit->EnvColor[0] );
|
||||
params[1] = FLOAT_TO_INT( texUnit->EnvColor[1] );
|
||||
params[2] = FLOAT_TO_INT( texUnit->EnvColor[2] );
|
||||
params[3] = FLOAT_TO_INT( texUnit->EnvColor[3] );
|
||||
break;
|
||||
case GL_COMBINE_RGB:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
*params = (GLint) texUnit->Combine.ModeRGB;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_COMBINE_ALPHA:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
*params = (GLint) texUnit->Combine.ModeA;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_SOURCE0_RGB:
|
||||
case GL_SOURCE1_RGB:
|
||||
case GL_SOURCE2_RGB:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned rgb_idx = pname - GL_SOURCE0_RGB;
|
||||
*params = (GLint) texUnit->Combine.SourceRGB[rgb_idx];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_SOURCE0_ALPHA:
|
||||
case GL_SOURCE1_ALPHA:
|
||||
case GL_SOURCE2_ALPHA:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned alpha_idx = pname - GL_SOURCE0_ALPHA;
|
||||
*params = (GLint) texUnit->Combine.SourceA[alpha_idx];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_OPERAND0_RGB:
|
||||
case GL_OPERAND1_RGB:
|
||||
case GL_OPERAND2_RGB:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned op_rgb = pname - GL_OPERAND0_RGB;
|
||||
*params = (GLint) texUnit->Combine.OperandRGB[op_rgb];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_OPERAND0_ALPHA:
|
||||
case GL_OPERAND1_ALPHA:
|
||||
case GL_OPERAND2_ALPHA:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
const unsigned op_alpha = pname - GL_OPERAND0_ALPHA;
|
||||
*params = (GLint) texUnit->Combine.OperandA[op_alpha];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
|
||||
}
|
||||
break;
|
||||
case GL_RGB_SCALE:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
if (texUnit->Combine.ScaleShiftRGB == 0)
|
||||
*params = 1;
|
||||
else if (texUnit->Combine.ScaleShiftRGB == 1)
|
||||
*params = 2;
|
||||
else
|
||||
*params = 4;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_ALPHA_SCALE:
|
||||
if (ctx->Extensions.EXT_texture_env_combine ||
|
||||
ctx->Extensions.ARB_texture_env_combine) {
|
||||
if (texUnit->Combine.ScaleShiftA == 0)
|
||||
*params = 1;
|
||||
else if (texUnit->Combine.ScaleShiftA == 1)
|
||||
*params = 2;
|
||||
else
|
||||
*params = 4;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname=0x%x)",
|
||||
pname);
|
||||
if (pname == GL_TEXTURE_ENV_COLOR) {
|
||||
params[0] = FLOAT_TO_INT( texUnit->EnvColor[0] );
|
||||
params[1] = FLOAT_TO_INT( texUnit->EnvColor[1] );
|
||||
params[2] = FLOAT_TO_INT( texUnit->EnvColor[2] );
|
||||
params[3] = FLOAT_TO_INT( texUnit->EnvColor[3] );
|
||||
}
|
||||
else {
|
||||
GLint val = get_texenvi(ctx, texUnit, pname);
|
||||
if (val >= 0) {
|
||||
*params = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (target == GL_TEXTURE_FILTER_CONTROL_EXT) {
|
||||
|
||||
+9
-9
@@ -718,9 +718,9 @@ static void store_texel_rgb888(struct gl_texture_image *texImage,
|
||||
{
|
||||
const GLubyte *rgba = (const GLubyte *) texel;
|
||||
GLubyte *dst = TEXEL_ADDR(GLubyte, texImage, i, j, k, 3);
|
||||
dst[0] = rgba[RCOMP];
|
||||
dst[0] = rgba[BCOMP];
|
||||
dst[1] = rgba[GCOMP];
|
||||
dst[2] = rgba[BCOMP];
|
||||
dst[2] = rgba[RCOMP];
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -744,9 +744,9 @@ static void store_texel_bgr888(struct gl_texture_image *texImage,
|
||||
{
|
||||
const GLubyte *rgba = (const GLubyte *) texel;
|
||||
GLubyte *dst = TEXEL_ADDR(GLubyte, texImage, i, j, k, 3);
|
||||
dst[0] = rgba[BCOMP];
|
||||
dst[0] = rgba[RCOMP];
|
||||
dst[1] = rgba[GCOMP];
|
||||
dst[2] = rgba[RCOMP];
|
||||
dst[2] = rgba[BCOMP];
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1131,7 +1131,7 @@ static void FETCH(ci8)( const struct gl_texture_image *texImage,
|
||||
texelUB[GCOMP] =
|
||||
texelUB[BCOMP] = 0;
|
||||
texelUB[ACOMP] = table[index];
|
||||
break;
|
||||
break;;
|
||||
case GL_LUMINANCE:
|
||||
texelUB[RCOMP] =
|
||||
texelUB[GCOMP] =
|
||||
@@ -1143,25 +1143,25 @@ static void FETCH(ci8)( const struct gl_texture_image *texImage,
|
||||
texelUB[GCOMP] =
|
||||
texelUB[BCOMP] =
|
||||
texelUB[ACOMP] = table[index];
|
||||
break;
|
||||
break;;
|
||||
case GL_LUMINANCE_ALPHA:
|
||||
texelUB[RCOMP] =
|
||||
texelUB[GCOMP] =
|
||||
texelUB[BCOMP] = table[index * 2 + 0];
|
||||
texelUB[ACOMP] = table[index * 2 + 1];
|
||||
break;
|
||||
break;;
|
||||
case GL_RGB:
|
||||
texelUB[RCOMP] = table[index * 3 + 0];
|
||||
texelUB[GCOMP] = table[index * 3 + 1];
|
||||
texelUB[BCOMP] = table[index * 3 + 2];
|
||||
texelUB[ACOMP] = 255;
|
||||
break;
|
||||
break;;
|
||||
case GL_RGBA:
|
||||
texelUB[RCOMP] = table[index * 4 + 0];
|
||||
texelUB[GCOMP] = table[index * 4 + 1];
|
||||
texelUB[BCOMP] = table[index * 4 + 2];
|
||||
texelUB[ACOMP] = table[index * 4 + 3];
|
||||
break;
|
||||
break;;
|
||||
default:
|
||||
_mesa_problem(ctx, "Bad palette format in fetch_texel_ci8");
|
||||
return;
|
||||
|
||||
+10
-9
@@ -766,15 +766,15 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
|
||||
{
|
||||
switch (target) {
|
||||
case GL_TEXTURE_1D:
|
||||
return texUnit->Current1D;
|
||||
return texUnit->CurrentTex[TEXTURE_1D_INDEX];
|
||||
case GL_PROXY_TEXTURE_1D:
|
||||
return ctx->Texture.ProxyTex[TEXTURE_1D_INDEX];
|
||||
case GL_TEXTURE_2D:
|
||||
return texUnit->Current2D;
|
||||
return texUnit->CurrentTex[TEXTURE_2D_INDEX];
|
||||
case GL_PROXY_TEXTURE_2D:
|
||||
return ctx->Texture.ProxyTex[TEXTURE_2D_INDEX];
|
||||
case GL_TEXTURE_3D:
|
||||
return texUnit->Current3D;
|
||||
return texUnit->CurrentTex[TEXTURE_3D_INDEX];
|
||||
case GL_PROXY_TEXTURE_3D:
|
||||
return ctx->Texture.ProxyTex[TEXTURE_3D_INDEX];
|
||||
case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
|
||||
@@ -785,25 +785,25 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
|
||||
case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
|
||||
case GL_TEXTURE_CUBE_MAP_ARB:
|
||||
return ctx->Extensions.ARB_texture_cube_map
|
||||
? texUnit->CurrentCubeMap : NULL;
|
||||
? texUnit->CurrentTex[TEXTURE_CUBE_INDEX] : NULL;
|
||||
case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
|
||||
return ctx->Extensions.ARB_texture_cube_map
|
||||
? ctx->Texture.ProxyTex[TEXTURE_CUBE_INDEX] : NULL;
|
||||
case GL_TEXTURE_RECTANGLE_NV:
|
||||
return ctx->Extensions.NV_texture_rectangle
|
||||
? texUnit->CurrentRect : NULL;
|
||||
? texUnit->CurrentTex[TEXTURE_RECT_INDEX] : NULL;
|
||||
case GL_PROXY_TEXTURE_RECTANGLE_NV:
|
||||
return ctx->Extensions.NV_texture_rectangle
|
||||
? ctx->Texture.ProxyTex[TEXTURE_RECT_INDEX] : NULL;
|
||||
case GL_TEXTURE_1D_ARRAY_EXT:
|
||||
return ctx->Extensions.MESA_texture_array
|
||||
? texUnit->Current1DArray : NULL;
|
||||
? texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX] : NULL;
|
||||
case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
|
||||
return ctx->Extensions.MESA_texture_array
|
||||
? ctx->Texture.ProxyTex[TEXTURE_1D_ARRAY_INDEX] : NULL;
|
||||
case GL_TEXTURE_2D_ARRAY_EXT:
|
||||
return ctx->Extensions.MESA_texture_array
|
||||
? texUnit->Current2DArray : NULL;
|
||||
? texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
|
||||
case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
|
||||
return ctx->Extensions.MESA_texture_array
|
||||
? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
|
||||
@@ -2224,7 +2224,8 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
|
||||
|
||||
if (!_mesa_source_buffer_exists(ctx, teximage->_BaseFormat)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCopyTexSubImage%dD(missing readbuffer)", dimensions);
|
||||
"glCopyTexSubImage%dD(missing readbuffer, format=0x%x)",
|
||||
dimensions, teximage->_BaseFormat);
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
@@ -2603,7 +2604,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
|
||||
1, border)) {
|
||||
/* when error, clear all proxy texture image parameters */
|
||||
if (texImage)
|
||||
clear_teximage_fields(ctx->Texture.ProxyTex[TEXTURE_2D_INDEX]->Image[0][level]);
|
||||
clear_teximage_fields(texImage);
|
||||
}
|
||||
else {
|
||||
/* no error, set the tex image parameters */
|
||||
|
||||
+44
-85
@@ -756,37 +756,17 @@ unbind_texobj_from_fbo(GLcontext *ctx, struct gl_texture_object *texObj)
|
||||
static void
|
||||
unbind_texobj_from_texunits(GLcontext *ctx, struct gl_texture_object *texObj)
|
||||
{
|
||||
GLuint u;
|
||||
GLuint u, tex;
|
||||
|
||||
for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) {
|
||||
struct gl_texture_unit *unit = &ctx->Texture.Unit[u];
|
||||
if (texObj == unit->Current1D) {
|
||||
_mesa_reference_texobj(&unit->Current1D, ctx->Shared->Default1D);
|
||||
ASSERT(unit->Current1D);
|
||||
}
|
||||
else if (texObj == unit->Current2D) {
|
||||
_mesa_reference_texobj(&unit->Current2D, ctx->Shared->Default2D);
|
||||
ASSERT(unit->Current2D);
|
||||
}
|
||||
else if (texObj == unit->Current3D) {
|
||||
_mesa_reference_texobj(&unit->Current3D, ctx->Shared->Default3D);
|
||||
ASSERT(unit->Current3D);
|
||||
}
|
||||
else if (texObj == unit->CurrentCubeMap) {
|
||||
_mesa_reference_texobj(&unit->CurrentCubeMap, ctx->Shared->DefaultCubeMap);
|
||||
ASSERT(unit->CurrentCubeMap);
|
||||
}
|
||||
else if (texObj == unit->CurrentRect) {
|
||||
_mesa_reference_texobj(&unit->CurrentRect, ctx->Shared->DefaultRect);
|
||||
ASSERT(unit->CurrentRect);
|
||||
}
|
||||
else if (texObj == unit->Current1DArray) {
|
||||
_mesa_reference_texobj(&unit->Current1DArray, ctx->Shared->Default1DArray);
|
||||
ASSERT(unit->Current1DArray);
|
||||
}
|
||||
else if (texObj == unit->Current2DArray) {
|
||||
_mesa_reference_texobj(&unit->Current2DArray, ctx->Shared->Default2DArray);
|
||||
ASSERT(unit->Current2DArray);
|
||||
for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
|
||||
if (texObj == unit->CurrentTex[tex]) {
|
||||
_mesa_reference_texobj(&unit->CurrentTex[tex],
|
||||
ctx->Shared->DefaultTex[TEXTURE_1D_INDEX]);
|
||||
ASSERT(unit->CurrentTex[tex]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -856,6 +836,35 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert a GL texture target enum such as GL_TEXTURE_2D or GL_TEXTURE_3D
|
||||
* into the corresponding Mesa texture target index.
|
||||
* Return -1 if target is invalid.
|
||||
*/
|
||||
static GLint
|
||||
target_enum_to_index(GLenum target)
|
||||
{
|
||||
switch (target) {
|
||||
case GL_TEXTURE_1D:
|
||||
return TEXTURE_1D_INDEX;
|
||||
case GL_TEXTURE_2D:
|
||||
return TEXTURE_2D_INDEX;
|
||||
case GL_TEXTURE_3D:
|
||||
return TEXTURE_3D_INDEX;
|
||||
case GL_TEXTURE_CUBE_MAP_ARB:
|
||||
return TEXTURE_CUBE_INDEX;
|
||||
case GL_TEXTURE_RECTANGLE_NV:
|
||||
return TEXTURE_RECT_INDEX;
|
||||
case GL_TEXTURE_1D_ARRAY_EXT:
|
||||
return TEXTURE_1D_ARRAY_INDEX;
|
||||
case GL_TEXTURE_2D_ARRAY_EXT:
|
||||
return TEXTURE_2D_ARRAY_INDEX;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Bind a named texture to a texturing target.
|
||||
*
|
||||
@@ -878,38 +887,20 @@ _mesa_BindTexture( GLenum target, GLuint texName )
|
||||
const GLuint unit = ctx->Texture.CurrentUnit;
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
|
||||
struct gl_texture_object *newTexObj = NULL, *defaultTexObj = NULL;
|
||||
GLint targetIndex;
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
|
||||
_mesa_debug(ctx, "glBindTexture %s %d\n",
|
||||
_mesa_lookup_enum_by_nr(target), (GLint) texName);
|
||||
|
||||
switch (target) {
|
||||
case GL_TEXTURE_1D:
|
||||
defaultTexObj = ctx->Shared->Default1D;
|
||||
break;
|
||||
case GL_TEXTURE_2D:
|
||||
defaultTexObj = ctx->Shared->Default2D;
|
||||
break;
|
||||
case GL_TEXTURE_3D:
|
||||
defaultTexObj = ctx->Shared->Default3D;
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP_ARB:
|
||||
defaultTexObj = ctx->Shared->DefaultCubeMap;
|
||||
break;
|
||||
case GL_TEXTURE_RECTANGLE_NV:
|
||||
defaultTexObj = ctx->Shared->DefaultRect;
|
||||
break;
|
||||
case GL_TEXTURE_1D_ARRAY_EXT:
|
||||
defaultTexObj = ctx->Shared->Default1DArray;
|
||||
break;
|
||||
case GL_TEXTURE_2D_ARRAY_EXT:
|
||||
defaultTexObj = ctx->Shared->Default2DArray;
|
||||
break;
|
||||
default:
|
||||
targetIndex = target_enum_to_index(target);
|
||||
if (targetIndex < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glBindTexture(target)");
|
||||
return;
|
||||
}
|
||||
assert(targetIndex < NUM_TEXTURE_TARGETS);
|
||||
defaultTexObj = ctx->Shared->DefaultTex[targetIndex];
|
||||
|
||||
/*
|
||||
* Get pointer to new texture object (newTexObj)
|
||||
@@ -957,40 +948,8 @@ _mesa_BindTexture( GLenum target, GLuint texName )
|
||||
* texture object will be decremented. It'll be deleted if the
|
||||
* count hits zero.
|
||||
*/
|
||||
switch (target) {
|
||||
case GL_TEXTURE_1D:
|
||||
_mesa_reference_texobj(&texUnit->Current1D, newTexObj);
|
||||
ASSERT(texUnit->Current1D);
|
||||
break;
|
||||
case GL_TEXTURE_2D:
|
||||
_mesa_reference_texobj(&texUnit->Current2D, newTexObj);
|
||||
ASSERT(texUnit->Current2D);
|
||||
break;
|
||||
case GL_TEXTURE_3D:
|
||||
_mesa_reference_texobj(&texUnit->Current3D, newTexObj);
|
||||
ASSERT(texUnit->Current3D);
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP_ARB:
|
||||
_mesa_reference_texobj(&texUnit->CurrentCubeMap, newTexObj);
|
||||
ASSERT(texUnit->CurrentCubeMap);
|
||||
break;
|
||||
case GL_TEXTURE_RECTANGLE_NV:
|
||||
_mesa_reference_texobj(&texUnit->CurrentRect, newTexObj);
|
||||
ASSERT(texUnit->CurrentRect);
|
||||
break;
|
||||
case GL_TEXTURE_1D_ARRAY_EXT:
|
||||
texUnit->Current1DArray = newTexObj;
|
||||
ASSERT(texUnit->Current1DArray);
|
||||
break;
|
||||
case GL_TEXTURE_2D_ARRAY_EXT:
|
||||
texUnit->Current2DArray = newTexObj;
|
||||
ASSERT(texUnit->Current2DArray);
|
||||
break;
|
||||
default:
|
||||
/* Bad target should be caught above */
|
||||
_mesa_problem(ctx, "bad target in BindTexture");
|
||||
return;
|
||||
}
|
||||
_mesa_reference_texobj(&texUnit->CurrentTex[targetIndex], newTexObj);
|
||||
ASSERT(texUnit->CurrentTex[targetIndex]);
|
||||
|
||||
/* Pass BindTexture call to device driver */
|
||||
if (ctx->Driver.BindTexture)
|
||||
|
||||
+506
-355
@@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.1
|
||||
* Version: 7.5
|
||||
*
|
||||
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -72,404 +73,554 @@ validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap)
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_TexParameterf( GLenum target, GLenum pname, GLfloat param )
|
||||
/**
|
||||
* Get current texture object for given target.
|
||||
* Return NULL if any error.
|
||||
*/
|
||||
static struct gl_texture_object *
|
||||
get_texobj(GLcontext *ctx, GLenum target)
|
||||
{
|
||||
_mesa_TexParameterfv(target, pname, ¶m);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
|
||||
{
|
||||
const GLenum eparam = (GLenum) (GLint) params[0];
|
||||
struct gl_texture_unit *texUnit;
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
|
||||
_mesa_debug(ctx, "glTexParameter %s %s %.1f(%s)...\n",
|
||||
_mesa_lookup_enum_by_nr(target),
|
||||
_mesa_lookup_enum_by_nr(pname),
|
||||
*params,
|
||||
_mesa_lookup_enum_by_nr(eparam));
|
||||
|
||||
if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureImageUnits) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameterfv(current unit)");
|
||||
return;
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(current unit)");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
|
||||
|
||||
switch (target) {
|
||||
case GL_TEXTURE_1D:
|
||||
texObj = texUnit->Current1D;
|
||||
break;
|
||||
case GL_TEXTURE_2D:
|
||||
texObj = texUnit->Current2D;
|
||||
break;
|
||||
case GL_TEXTURE_3D:
|
||||
texObj = texUnit->Current3D;
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
if (!ctx->Extensions.ARB_texture_cube_map) {
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" );
|
||||
return;
|
||||
}
|
||||
texObj = texUnit->CurrentCubeMap;
|
||||
break;
|
||||
case GL_TEXTURE_RECTANGLE_NV:
|
||||
if (!ctx->Extensions.NV_texture_rectangle) {
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" );
|
||||
return;
|
||||
}
|
||||
texObj = texUnit->CurrentRect;
|
||||
break;
|
||||
case GL_TEXTURE_1D_ARRAY_EXT:
|
||||
if (!ctx->Extensions.MESA_texture_array) {
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" );
|
||||
return;
|
||||
}
|
||||
texObj = texUnit->Current1DArray;
|
||||
break;
|
||||
case GL_TEXTURE_2D_ARRAY_EXT:
|
||||
if (!ctx->Extensions.MESA_texture_array) {
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" );
|
||||
return;
|
||||
}
|
||||
texObj = texUnit->Current2DArray;
|
||||
break;
|
||||
default:
|
||||
_mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" );
|
||||
return;
|
||||
case GL_TEXTURE_1D:
|
||||
return texUnit->CurrentTex[TEXTURE_1D_INDEX];
|
||||
case GL_TEXTURE_2D:
|
||||
return texUnit->CurrentTex[TEXTURE_2D_INDEX];
|
||||
case GL_TEXTURE_3D:
|
||||
return texUnit->CurrentTex[TEXTURE_3D_INDEX];
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
if (ctx->Extensions.ARB_texture_cube_map) {
|
||||
return texUnit->CurrentTex[TEXTURE_CUBE_INDEX];
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_RECTANGLE_NV:
|
||||
if (ctx->Extensions.NV_texture_rectangle) {
|
||||
return texUnit->CurrentTex[TEXTURE_RECT_INDEX];
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_1D_ARRAY_EXT:
|
||||
if (ctx->Extensions.MESA_texture_array) {
|
||||
return texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX];
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_2D_ARRAY_EXT:
|
||||
if (ctx->Extensions.MESA_texture_array) {
|
||||
return texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
;
|
||||
}
|
||||
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_MIN_FILTER:
|
||||
/* A small optimization */
|
||||
if (texObj->MinFilter == eparam)
|
||||
return;
|
||||
if (eparam==GL_NEAREST || eparam==GL_LINEAR) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->MinFilter = eparam;
|
||||
}
|
||||
else if ((eparam==GL_NEAREST_MIPMAP_NEAREST ||
|
||||
eparam==GL_LINEAR_MIPMAP_NEAREST ||
|
||||
eparam==GL_NEAREST_MIPMAP_LINEAR ||
|
||||
eparam==GL_LINEAR_MIPMAP_LINEAR) &&
|
||||
texObj->Target != GL_TEXTURE_RECTANGLE_NV) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->MinFilter = eparam;
|
||||
}
|
||||
else {
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_MAG_FILTER:
|
||||
/* A small optimization */
|
||||
if (texObj->MagFilter == eparam)
|
||||
return;
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(target)");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (eparam==GL_NEAREST || eparam==GL_LINEAR) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->MagFilter = eparam;
|
||||
}
|
||||
else {
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
|
||||
|
||||
/**
|
||||
* This is called just prior to changing any texture object state.
|
||||
* Any pending rendering will be flushed out, we'll set the _NEW_TEXTURE
|
||||
* state flag and then mark the texture object as 'incomplete' so that any
|
||||
* per-texture derived state gets recomputed.
|
||||
*/
|
||||
static INLINE void
|
||||
flush(GLcontext *ctx, struct gl_texture_object *texObj)
|
||||
{
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->_Complete = GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
/** Set an integer-valued texture parameter */
|
||||
static void
|
||||
set_tex_parameteri(GLcontext *ctx,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum pname, const GLint *params)
|
||||
{
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_MIN_FILTER:
|
||||
if (texObj->MinFilter == params[0])
|
||||
return;
|
||||
switch (params[0]) {
|
||||
case GL_NEAREST:
|
||||
case GL_LINEAR:
|
||||
flush(ctx, texObj);
|
||||
texObj->MinFilter = params[0];
|
||||
return;
|
||||
case GL_NEAREST_MIPMAP_NEAREST:
|
||||
case GL_LINEAR_MIPMAP_NEAREST:
|
||||
case GL_NEAREST_MIPMAP_LINEAR:
|
||||
case GL_LINEAR_MIPMAP_LINEAR:
|
||||
if (texObj->Target != GL_TEXTURE_RECTANGLE_NV) {
|
||||
flush(ctx, texObj);
|
||||
texObj->MinFilter = params[0];
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_WRAP_S:
|
||||
if (texObj->WrapS == eparam)
|
||||
return;
|
||||
if (validate_texture_wrap_mode(ctx, texObj->Target, eparam)) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->WrapS = eparam;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_WRAP_T:
|
||||
if (texObj->WrapT == eparam)
|
||||
return;
|
||||
if (validate_texture_wrap_mode(ctx, texObj->Target, eparam)) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->WrapT = eparam;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_WRAP_R:
|
||||
if (texObj->WrapR == eparam)
|
||||
return;
|
||||
if (validate_texture_wrap_mode(ctx, texObj->Target, eparam)) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->WrapR = eparam;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_BORDER_COLOR:
|
||||
/* fall-through */
|
||||
default:
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_MAG_FILTER:
|
||||
if (texObj->MagFilter == params[0])
|
||||
return;
|
||||
switch (params[0]) {
|
||||
case GL_NEAREST:
|
||||
case GL_LINEAR:
|
||||
flush(ctx, texObj);
|
||||
texObj->MagFilter = params[0];
|
||||
return;
|
||||
default:
|
||||
_mesa_error( ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_WRAP_S:
|
||||
if (texObj->WrapS == params[0])
|
||||
return;
|
||||
if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
|
||||
flush(ctx, texObj);
|
||||
texObj->WrapS = params[0];
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_WRAP_T:
|
||||
if (texObj->WrapT == params[0])
|
||||
return;
|
||||
if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
|
||||
flush(ctx, texObj);
|
||||
texObj->WrapT = params[0];
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_WRAP_R:
|
||||
if (texObj->WrapR == params[0])
|
||||
return;
|
||||
if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
|
||||
flush(ctx, texObj);
|
||||
texObj->WrapR = params[0];
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_BASE_LEVEL:
|
||||
if (texObj->BaseLevel == params[0])
|
||||
return;
|
||||
if (params[0] < 0 ||
|
||||
(texObj->Target == GL_TEXTURE_RECTANGLE_ARB && params[0] != 0)) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)");
|
||||
return;
|
||||
}
|
||||
flush(ctx, texObj);
|
||||
texObj->BaseLevel = params[0];
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_MAX_LEVEL:
|
||||
if (texObj->MaxLevel == params[0])
|
||||
return;
|
||||
if (params[0] < 0 || texObj->Target == GL_TEXTURE_RECTANGLE_ARB) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(param)");
|
||||
return;
|
||||
}
|
||||
flush(ctx, texObj);
|
||||
texObj->MaxLevel = params[0];
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_COMPARE_SGIX:
|
||||
if (ctx->Extensions.SGIX_shadow) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->BorderColor[RCOMP] = params[0];
|
||||
texObj->BorderColor[GCOMP] = params[1];
|
||||
texObj->BorderColor[BCOMP] = params[2];
|
||||
texObj->BorderColor[ACOMP] = params[3];
|
||||
UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[RCOMP], params[0]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[GCOMP], params[1]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[BCOMP], params[2]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[ACOMP], params[3]);
|
||||
break;
|
||||
case GL_TEXTURE_MIN_LOD:
|
||||
if (texObj->MinLod == params[0])
|
||||
return;
|
||||
texObj->CompareFlag = params[0] ? GL_TRUE : GL_FALSE;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_TEXTURE_COMPARE_SGIX)");
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
|
||||
if (ctx->Extensions.SGIX_shadow &&
|
||||
(params[0] == GL_TEXTURE_LEQUAL_R_SGIX ||
|
||||
params[0] == GL_TEXTURE_GEQUAL_R_SGIX)) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->MinLod = params[0];
|
||||
break;
|
||||
case GL_TEXTURE_MAX_LOD:
|
||||
if (texObj->MaxLod == params[0])
|
||||
return;
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->MaxLod = params[0];
|
||||
break;
|
||||
case GL_TEXTURE_BASE_LEVEL:
|
||||
if (params[0] < 0.0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)");
|
||||
return;
|
||||
}
|
||||
if (target == GL_TEXTURE_RECTANGLE_ARB && params[0] != 0.0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)");
|
||||
return;
|
||||
}
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->BaseLevel = (GLint) params[0];
|
||||
break;
|
||||
case GL_TEXTURE_MAX_LEVEL:
|
||||
if (params[0] < 0.0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)");
|
||||
return;
|
||||
}
|
||||
if (target == GL_TEXTURE_RECTANGLE_ARB) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(param)");
|
||||
return;
|
||||
}
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->MaxLevel = (GLint) params[0];
|
||||
break;
|
||||
case GL_TEXTURE_PRIORITY:
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->Priority = CLAMP( params[0], 0.0F, 1.0F );
|
||||
break;
|
||||
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
|
||||
if (ctx->Extensions.EXT_texture_filter_anisotropic) {
|
||||
if (params[0] < 1.0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
|
||||
return;
|
||||
}
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
/* clamp to max, that's what NVIDIA does */
|
||||
texObj->MaxAnisotropy = MIN2(params[0],
|
||||
ctx->Const.MaxTextureMaxAnisotropy);
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_TEXTURE_MAX_ANISOTROPY_EXT)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_COMPARE_SGIX:
|
||||
if (ctx->Extensions.SGIX_shadow) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->CompareFlag = params[0] ? GL_TRUE : GL_FALSE;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_TEXTURE_COMPARE_SGIX)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
|
||||
if (ctx->Extensions.SGIX_shadow) {
|
||||
GLenum op = (GLenum) params[0];
|
||||
if (op == GL_TEXTURE_LEQUAL_R_SGIX ||
|
||||
op == GL_TEXTURE_GEQUAL_R_SGIX) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->CompareOperator = op;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(param)");
|
||||
}
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_TEXTURE_COMPARE_OPERATOR_SGIX)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_SHADOW_AMBIENT_SGIX: /* aka GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
|
||||
if (ctx->Extensions.SGIX_shadow_ambient) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->ShadowAmbient = CLAMP(params[0], 0.0F, 1.0F);
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_SHADOW_AMBIENT_SGIX)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_GENERATE_MIPMAP_SGIS:
|
||||
if (ctx->Extensions.SGIS_generate_mipmap) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->CompareOperator = params[0];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(GL_TEXTURE_COMPARE_OPERATOR_SGIX)");
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_GENERATE_MIPMAP_SGIS:
|
||||
if (ctx->Extensions.SGIS_generate_mipmap) {
|
||||
if (texObj->GenerateMipmap != params[0]) {
|
||||
flush(ctx, texObj);
|
||||
texObj->GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_GENERATE_MIPMAP_SGIS)");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_GENERATE_MIPMAP_SGIS)");
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_COMPARE_MODE_ARB:
|
||||
if (ctx->Extensions.ARB_shadow &&
|
||||
(params[0] == GL_NONE ||
|
||||
params[0] == GL_COMPARE_R_TO_TEXTURE_ARB)) {
|
||||
if (texObj->CompareMode != params[0]) {
|
||||
flush(ctx, texObj);
|
||||
texObj->CompareMode = params[0];
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_COMPARE_MODE_ARB:
|
||||
if (ctx->Extensions.ARB_shadow) {
|
||||
const GLenum mode = (GLenum) params[0];
|
||||
if (mode == GL_NONE || mode == GL_COMPARE_R_TO_TEXTURE_ARB) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->CompareMode = mode;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(bad GL_TEXTURE_COMPARE_MODE_ARB: 0x%x)", mode);
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(GL_TEXTURE_COMPARE_MODE_ARB)");
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_COMPARE_FUNC_ARB:
|
||||
if (ctx->Extensions.ARB_shadow) {
|
||||
if (texObj->CompareFunc == params[0])
|
||||
return;
|
||||
switch (params[0]) {
|
||||
case GL_LEQUAL:
|
||||
case GL_GEQUAL:
|
||||
flush(ctx, texObj);
|
||||
texObj->CompareFunc = params[0];
|
||||
return;
|
||||
case GL_EQUAL:
|
||||
case GL_NOTEQUAL:
|
||||
case GL_LESS:
|
||||
case GL_GREATER:
|
||||
case GL_ALWAYS:
|
||||
case GL_NEVER:
|
||||
if (ctx->Extensions.EXT_shadow_funcs) {
|
||||
flush(ctx, texObj);
|
||||
texObj->CompareFunc = params[0];
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* fall-through */
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_TEXTURE_COMPARE_MODE_ARB)");
|
||||
return;
|
||||
"glTexParameter(GL_TEXTURE_COMPARE_FUNC_ARB)");
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_COMPARE_FUNC_ARB:
|
||||
if (ctx->Extensions.ARB_shadow) {
|
||||
const GLenum func = (GLenum) params[0];
|
||||
if (func == GL_LEQUAL || func == GL_GEQUAL) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->CompareFunc = func;
|
||||
}
|
||||
else if (ctx->Extensions.EXT_shadow_funcs &&
|
||||
(func == GL_EQUAL ||
|
||||
func == GL_NOTEQUAL ||
|
||||
func == GL_LESS ||
|
||||
func == GL_GREATER ||
|
||||
func == GL_ALWAYS ||
|
||||
func == GL_NEVER)) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->CompareFunc = func;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(bad GL_TEXTURE_COMPARE_FUNC_ARB)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(param)");
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_DEPTH_TEXTURE_MODE_ARB:
|
||||
if (ctx->Extensions.ARB_depth_texture &&
|
||||
(params[0] == GL_LUMINANCE ||
|
||||
params[0] == GL_INTENSITY ||
|
||||
params[0] == GL_ALPHA)) {
|
||||
if (texObj->DepthMode != params[0]) {
|
||||
flush(ctx, texObj);
|
||||
texObj->DepthMode = params[0];
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_TEXTURE_COMPARE_FUNC_ARB)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_DEPTH_TEXTURE_MODE_ARB:
|
||||
if (ctx->Extensions.ARB_depth_texture) {
|
||||
const GLenum result = (GLenum) params[0];
|
||||
if (result == GL_LUMINANCE || result == GL_INTENSITY
|
||||
|| result == GL_ALPHA) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->DepthMode = result;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(bad GL_DEPTH_TEXTURE_MODE_ARB)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_DEPTH_TEXTURE_MODE_ARB)");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_LOD_BIAS:
|
||||
/* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias*/
|
||||
if (ctx->Extensions.EXT_texture_lod_bias) {
|
||||
if (texObj->LodBias != params[0]) {
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
texObj->LodBias = params[0];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(GL_DEPTH_TEXTURE_MODE_ARB)");
|
||||
}
|
||||
return;
|
||||
|
||||
#ifdef FEATURE_OES_draw_texture
|
||||
case GL_TEXTURE_CROP_RECT_OES:
|
||||
texObj->CropRect[0] = (GLint) params[0];
|
||||
texObj->CropRect[1] = (GLint) params[1];
|
||||
texObj->CropRect[2] = (GLint) params[2];
|
||||
texObj->CropRect[3] = (GLint) params[3];
|
||||
break;
|
||||
case GL_TEXTURE_CROP_RECT_OES:
|
||||
texObj->CropRect[0] = params[0];
|
||||
texObj->CropRect[1] = params[1];
|
||||
texObj->CropRect[2] = params[2];
|
||||
texObj->CropRect[3] = params[3];
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=0x%x)", pname);
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Set a float-valued texture parameter */
|
||||
static void
|
||||
set_tex_parameterf(GLcontext *ctx,
|
||||
struct gl_texture_object *texObj,
|
||||
GLenum pname, const GLfloat *params)
|
||||
{
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_MIN_LOD:
|
||||
if (texObj->MinLod == params[0])
|
||||
return;
|
||||
}
|
||||
flush(ctx, texObj);
|
||||
texObj->MinLod = params[0];
|
||||
return;
|
||||
|
||||
texObj->_Complete = GL_FALSE;
|
||||
case GL_TEXTURE_MAX_LOD:
|
||||
if (texObj->MaxLod == params[0])
|
||||
return;
|
||||
flush(ctx, texObj);
|
||||
texObj->MaxLod = params[0];
|
||||
return;
|
||||
|
||||
if (ctx->Driver.TexParameter) {
|
||||
(*ctx->Driver.TexParameter)( ctx, target, texObj, pname, params );
|
||||
case GL_TEXTURE_PRIORITY:
|
||||
flush(ctx, texObj);
|
||||
texObj->Priority = CLAMP(params[0], 0.0F, 1.0F);
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
|
||||
if (ctx->Extensions.EXT_texture_filter_anisotropic) {
|
||||
if (texObj->MaxAnisotropy == params[0])
|
||||
return;
|
||||
if (params[0] < 1.0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
|
||||
return;
|
||||
}
|
||||
flush(ctx, texObj);
|
||||
/* clamp to max, that's what NVIDIA does */
|
||||
texObj->MaxAnisotropy = MIN2(params[0],
|
||||
ctx->Const.MaxTextureMaxAnisotropy);
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_TEXTURE_MAX_ANISOTROPY_EXT)");
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
|
||||
if (ctx->Extensions.SGIX_shadow_ambient) {
|
||||
if (texObj->ShadowAmbient != params[0]) {
|
||||
flush(ctx, texObj);
|
||||
texObj->ShadowAmbient = CLAMP(params[0], 0.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"glTexParameter(pname=GL_SHADOW_AMBIENT_SGIX)");
|
||||
}
|
||||
return;
|
||||
|
||||
case GL_TEXTURE_LOD_BIAS:
|
||||
/* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias */
|
||||
if (ctx->Extensions.EXT_texture_lod_bias) {
|
||||
if (texObj->LodBias != params[0]) {
|
||||
flush(ctx, texObj);
|
||||
texObj->LodBias = params[0];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GL_TEXTURE_BORDER_COLOR:
|
||||
flush(ctx, texObj);
|
||||
texObj->BorderColor[RCOMP] = params[0];
|
||||
texObj->BorderColor[GCOMP] = params[1];
|
||||
texObj->BorderColor[BCOMP] = params[2];
|
||||
texObj->BorderColor[ACOMP] = params[3];
|
||||
UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[RCOMP], params[0]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[GCOMP], params[1]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[BCOMP], params[2]);
|
||||
UNCLAMPED_FLOAT_TO_CHAN(texObj->_BorderChan[ACOMP], params[3]);
|
||||
return;
|
||||
|
||||
default:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=0x%x)", pname);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_TexParameteri( GLenum target, GLenum pname, GLint param )
|
||||
_mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
|
||||
{
|
||||
GLfloat fparam[4];
|
||||
if (pname == GL_TEXTURE_PRIORITY)
|
||||
fparam[0] = INT_TO_FLOAT(param);
|
||||
else
|
||||
fparam[0] = (GLfloat) param;
|
||||
fparam[1] = fparam[2] = fparam[3] = 0.0;
|
||||
_mesa_TexParameterfv(target, pname, fparam);
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
texObj = get_texobj(ctx, target);
|
||||
if (!texObj)
|
||||
return;
|
||||
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_MIN_FILTER:
|
||||
case GL_TEXTURE_MAG_FILTER:
|
||||
case GL_TEXTURE_WRAP_S:
|
||||
case GL_TEXTURE_WRAP_T:
|
||||
case GL_TEXTURE_WRAP_R:
|
||||
case GL_TEXTURE_BASE_LEVEL:
|
||||
case GL_TEXTURE_MAX_LEVEL:
|
||||
case GL_TEXTURE_COMPARE_SGIX:
|
||||
case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
|
||||
case GL_GENERATE_MIPMAP_SGIS:
|
||||
case GL_TEXTURE_COMPARE_MODE_ARB:
|
||||
case GL_TEXTURE_COMPARE_FUNC_ARB:
|
||||
case GL_DEPTH_TEXTURE_MODE_ARB:
|
||||
{
|
||||
/* convert float param to int */
|
||||
GLint p = (GLint) param;
|
||||
set_tex_parameteri(ctx, texObj, pname, &p);
|
||||
}
|
||||
return;
|
||||
default:
|
||||
/* this will generate an error if pname is illegal */
|
||||
set_tex_parameterf(ctx, texObj, pname, ¶m);
|
||||
}
|
||||
|
||||
if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
|
||||
ctx->Driver.TexParameter(ctx, target, texObj, pname, ¶m);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_TexParameteriv( GLenum target, GLenum pname, const GLint *params )
|
||||
_mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
|
||||
{
|
||||
GLfloat fparam[4];
|
||||
if (pname == GL_TEXTURE_BORDER_COLOR) {
|
||||
fparam[0] = INT_TO_FLOAT(params[0]);
|
||||
fparam[1] = INT_TO_FLOAT(params[1]);
|
||||
fparam[2] = INT_TO_FLOAT(params[2]);
|
||||
fparam[3] = INT_TO_FLOAT(params[3]);
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
texObj = get_texobj(ctx, target);
|
||||
if (!texObj)
|
||||
return;
|
||||
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_MIN_FILTER:
|
||||
case GL_TEXTURE_MAG_FILTER:
|
||||
case GL_TEXTURE_WRAP_S:
|
||||
case GL_TEXTURE_WRAP_T:
|
||||
case GL_TEXTURE_WRAP_R:
|
||||
case GL_TEXTURE_BASE_LEVEL:
|
||||
case GL_TEXTURE_MAX_LEVEL:
|
||||
case GL_TEXTURE_COMPARE_SGIX:
|
||||
case GL_TEXTURE_COMPARE_OPERATOR_SGIX:
|
||||
case GL_GENERATE_MIPMAP_SGIS:
|
||||
case GL_TEXTURE_COMPARE_MODE_ARB:
|
||||
case GL_TEXTURE_COMPARE_FUNC_ARB:
|
||||
case GL_DEPTH_TEXTURE_MODE_ARB:
|
||||
{
|
||||
/* convert float param to int */
|
||||
GLint p = (GLint) params[0];
|
||||
set_tex_parameteri(ctx, texObj, pname, &p);
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef FEATURE_OES_draw_texture
|
||||
case GL_TEXTURE_CROP_RECT_OES:
|
||||
{
|
||||
/* convert float params to int */
|
||||
GLint iparams[4];
|
||||
iparams[0] = (GLint) params[0];
|
||||
iparams[1] = (GLint) params[1];
|
||||
iparams[2] = (GLint) params[2];
|
||||
iparams[3] = (GLint) params[3];
|
||||
set_tex_parameteri(ctx, target, iparams);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
/* this will generate an error if pname is illegal */
|
||||
set_tex_parameterf(ctx, texObj, pname, params);
|
||||
}
|
||||
else if (pname == GL_TEXTURE_CROP_RECT_OES) {
|
||||
fparam[0] = (GLfloat) params[0];
|
||||
fparam[1] = (GLfloat) params[1];
|
||||
fparam[2] = (GLfloat) params[2];
|
||||
fparam[3] = (GLfloat) params[3];
|
||||
|
||||
if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
|
||||
ctx->Driver.TexParameter(ctx, target, texObj, pname, params);
|
||||
}
|
||||
else {
|
||||
if (pname == GL_TEXTURE_PRIORITY)
|
||||
fparam[0] = INT_TO_FLOAT(params[0]);
|
||||
else
|
||||
fparam[0] = (GLfloat) params[0];
|
||||
fparam[1] = fparam[2] = fparam[3] = 0.0F;
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
|
||||
{
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
texObj = get_texobj(ctx, target);
|
||||
if (!texObj)
|
||||
return;
|
||||
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_MIN_LOD:
|
||||
case GL_TEXTURE_MAX_LOD:
|
||||
case GL_TEXTURE_PRIORITY:
|
||||
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
|
||||
case GL_TEXTURE_LOD_BIAS:
|
||||
case GL_SHADOW_AMBIENT_SGIX: /* aka GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
|
||||
{
|
||||
GLfloat fparam = (GLfloat) param;
|
||||
/* convert int param to float */
|
||||
set_tex_parameterf(ctx, texObj, pname, &fparam);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* this will generate an error if pname is illegal */
|
||||
set_tex_parameteri(ctx, texObj, pname, ¶m);
|
||||
}
|
||||
|
||||
if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
|
||||
GLfloat fparam = (GLfloat) param;
|
||||
ctx->Driver.TexParameter(ctx, target, texObj, pname, &fparam);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
|
||||
{
|
||||
struct gl_texture_object *texObj;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
texObj = get_texobj(ctx, target);
|
||||
if (!texObj)
|
||||
return;
|
||||
|
||||
switch (pname) {
|
||||
case GL_TEXTURE_BORDER_COLOR:
|
||||
{
|
||||
/* convert int params to float */
|
||||
GLfloat fparams[4];
|
||||
fparams[0] = INT_TO_FLOAT(params[0]);
|
||||
fparams[1] = INT_TO_FLOAT(params[1]);
|
||||
fparams[2] = INT_TO_FLOAT(params[2]);
|
||||
fparams[3] = INT_TO_FLOAT(params[3]);
|
||||
set_tex_parameterf(ctx, texObj, pname, fparams);
|
||||
}
|
||||
break;
|
||||
case GL_TEXTURE_MIN_LOD:
|
||||
case GL_TEXTURE_MAX_LOD:
|
||||
case GL_TEXTURE_PRIORITY:
|
||||
case GL_TEXTURE_MAX_ANISOTROPY_EXT:
|
||||
case GL_TEXTURE_LOD_BIAS:
|
||||
case GL_SHADOW_AMBIENT_SGIX: /* aka GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
|
||||
{
|
||||
/* convert int param to float */
|
||||
GLfloat fparam = (GLfloat) params[0];
|
||||
set_tex_parameterf(ctx, texObj, pname, &fparam);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* this will generate an error if pname is illegal */
|
||||
set_tex_parameteri(ctx, texObj, pname, params);
|
||||
}
|
||||
|
||||
if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
|
||||
GLfloat fparams[4];
|
||||
fparams[0] = INT_TO_FLOAT(params[0]);
|
||||
if (pname == GL_TEXTURE_BORDER_COLOR ||
|
||||
pname == GL_TEXTURE_CROP_RECT_OES) {
|
||||
fparams[1] = INT_TO_FLOAT(params[1]);
|
||||
fparams[2] = INT_TO_FLOAT(params[2]);
|
||||
fparams[3] = INT_TO_FLOAT(params[3]);
|
||||
}
|
||||
ctx->Driver.TexParameter(ctx, target, texObj, pname, fparams);
|
||||
}
|
||||
_mesa_TexParameterfv(target, pname, fparam);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -194,6 +194,59 @@ texture_put_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Put row of RGB values into a renderbuffer that wraps a texture image.
|
||||
*/
|
||||
static void
|
||||
texture_put_row_rgb(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
|
||||
GLint x, GLint y, const void *values, const GLubyte *mask)
|
||||
{
|
||||
const struct texture_renderbuffer *trb
|
||||
= (const struct texture_renderbuffer *) rb;
|
||||
const GLint z = trb->Zoffset;
|
||||
GLuint i;
|
||||
|
||||
y += trb->Yoffset;
|
||||
|
||||
if (rb->DataType == CHAN_TYPE) {
|
||||
const GLchan *rgb = (const GLchan *) values;
|
||||
for (i = 0; i < count; i++) {
|
||||
if (!mask || mask[i]) {
|
||||
trb->Store(trb->TexImage, x + i, y, z, rgb);
|
||||
}
|
||||
rgb += 3;
|
||||
}
|
||||
}
|
||||
else if (rb->DataType == GL_UNSIGNED_SHORT) {
|
||||
const GLushort *zValues = (const GLushort *) values;
|
||||
for (i = 0; i < count; i++) {
|
||||
if (!mask || mask[i]) {
|
||||
trb->Store(trb->TexImage, x + i, y, z, zValues + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (rb->DataType == GL_UNSIGNED_INT) {
|
||||
const GLuint *zValues = (const GLuint *) values;
|
||||
for (i = 0; i < count; i++) {
|
||||
if (!mask || mask[i]) {
|
||||
trb->Store(trb->TexImage, x + i, y, z, zValues + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (rb->DataType == GL_UNSIGNED_INT_24_8_EXT) {
|
||||
const GLuint *zValues = (const GLuint *) values;
|
||||
for (i = 0; i < count; i++) {
|
||||
if (!mask || mask[i]) {
|
||||
GLfloat flt = (GLfloat) ((zValues[i] >> 8) * (1.0 / 0xffffff));
|
||||
trb->Store(trb->TexImage, x + i, y, z, &flt);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
_mesa_problem(ctx, "invalid rb->DataType in texture_put_row");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
texture_put_mono_row(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count,
|
||||
@@ -380,6 +433,7 @@ wrap_texture(GLcontext *ctx, struct gl_renderbuffer_attachment *att)
|
||||
trb->Base.GetRow = texture_get_row;
|
||||
trb->Base.GetValues = texture_get_values;
|
||||
trb->Base.PutRow = texture_put_row;
|
||||
trb->Base.PutRowRGB = texture_put_row_rgb;
|
||||
trb->Base.PutMonoRow = texture_put_mono_row;
|
||||
trb->Base.PutValues = texture_put_values;
|
||||
trb->Base.PutMonoValues = texture_put_mono_values;
|
||||
|
||||
+51
-70
@@ -69,7 +69,7 @@ static const struct gl_tex_env_combine_state default_combine_state = {
|
||||
void
|
||||
_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
|
||||
{
|
||||
GLuint i;
|
||||
GLuint i, tex;
|
||||
|
||||
ASSERT(src);
|
||||
ASSERT(dst);
|
||||
@@ -118,20 +118,10 @@ _mesa_copy_texture_state( const GLcontext *src, GLcontext *dst )
|
||||
/* copy texture object bindings, not contents of texture objects */
|
||||
_mesa_lock_context_textures(dst);
|
||||
|
||||
_mesa_reference_texobj(&dst->Texture.Unit[i].Current1D,
|
||||
src->Texture.Unit[i].Current1D);
|
||||
_mesa_reference_texobj(&dst->Texture.Unit[i].Current2D,
|
||||
src->Texture.Unit[i].Current2D);
|
||||
_mesa_reference_texobj(&dst->Texture.Unit[i].Current3D,
|
||||
src->Texture.Unit[i].Current3D);
|
||||
_mesa_reference_texobj(&dst->Texture.Unit[i].CurrentCubeMap,
|
||||
src->Texture.Unit[i].CurrentCubeMap);
|
||||
_mesa_reference_texobj(&dst->Texture.Unit[i].CurrentRect,
|
||||
src->Texture.Unit[i].CurrentRect);
|
||||
_mesa_reference_texobj(&dst->Texture.Unit[i].Current1DArray,
|
||||
src->Texture.Unit[i].Current1DArray);
|
||||
_mesa_reference_texobj(&dst->Texture.Unit[i].Current2DArray,
|
||||
src->Texture.Unit[i].Current2DArray);
|
||||
for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
|
||||
_mesa_reference_texobj(&dst->Texture.Unit[i].CurrentTex[tex],
|
||||
src->Texture.Unit[i].CurrentTex[tex]);
|
||||
}
|
||||
|
||||
_mesa_unlock_context_textures(dst);
|
||||
}
|
||||
@@ -493,56 +483,56 @@ update_texture_state( GLcontext *ctx )
|
||||
for (unit = 0; unit < ctx->Const.MaxTextureImageUnits; unit++) {
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
|
||||
GLbitfield enableBits;
|
||||
GLuint tex;
|
||||
|
||||
texUnit->_Current = NULL;
|
||||
texUnit->_ReallyEnabled = 0;
|
||||
texUnit->_GenFlags = 0;
|
||||
|
||||
/* Get the bitmask of texture enables.
|
||||
/* Get the bitmask of texture target enables.
|
||||
* enableBits will be a mask of the TEXTURE_*_BIT flags indicating
|
||||
* which texture targets are enabled (fixed function) or referenced
|
||||
* by a fragment shader/program. When multiple flags are set, we'll
|
||||
* settle on the one with highest priority (see texture_override below).
|
||||
*/
|
||||
if (fprog || vprog) {
|
||||
enableBits = 0x0;
|
||||
if (fprog)
|
||||
enableBits |= fprog->Base.TexturesUsed[unit];
|
||||
if (vprog)
|
||||
enableBits |= vprog->Base.TexturesUsed[unit];
|
||||
enableBits = 0x0;
|
||||
if (vprog) {
|
||||
enableBits |= vprog->Base.TexturesUsed[unit];
|
||||
}
|
||||
if (fprog) {
|
||||
enableBits |= fprog->Base.TexturesUsed[unit];
|
||||
}
|
||||
else {
|
||||
if (!texUnit->Enabled)
|
||||
continue;
|
||||
enableBits = texUnit->Enabled;
|
||||
/* fixed-function fragment program */
|
||||
enableBits |= texUnit->Enabled;
|
||||
}
|
||||
|
||||
ASSERT(texUnit->Current1D);
|
||||
ASSERT(texUnit->Current2D);
|
||||
ASSERT(texUnit->Current3D);
|
||||
ASSERT(texUnit->CurrentCubeMap);
|
||||
ASSERT(texUnit->CurrentRect);
|
||||
ASSERT(texUnit->Current1DArray);
|
||||
ASSERT(texUnit->Current2DArray);
|
||||
if (enableBits == 0x0)
|
||||
continue;
|
||||
|
||||
for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
|
||||
ASSERT(texUnit->CurrentTex[tex]);
|
||||
}
|
||||
|
||||
/* Look for the highest-priority texture target that's enabled and
|
||||
* complete. That's the one we'll use for texturing. If we're using
|
||||
* a fragment program we're guaranteed that bitcount(enabledBits) <= 1.
|
||||
*/
|
||||
texture_override(ctx, texUnit, enableBits,
|
||||
texUnit->Current2DArray, TEXTURE_2D_ARRAY_BIT);
|
||||
texture_override(ctx, texUnit, enableBits,
|
||||
texUnit->Current1DArray, TEXTURE_1D_ARRAY_BIT);
|
||||
texture_override(ctx, texUnit, enableBits,
|
||||
texUnit->CurrentCubeMap, TEXTURE_CUBE_BIT);
|
||||
texture_override(ctx, texUnit, enableBits,
|
||||
texUnit->Current3D, TEXTURE_3D_BIT);
|
||||
texture_override(ctx, texUnit, enableBits,
|
||||
texUnit->CurrentRect, TEXTURE_RECT_BIT);
|
||||
texture_override(ctx, texUnit, enableBits,
|
||||
texUnit->Current2D, TEXTURE_2D_BIT);
|
||||
texture_override(ctx, texUnit, enableBits,
|
||||
texUnit->Current1D, TEXTURE_1D_BIT);
|
||||
for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
|
||||
/* texture indexes from highest to lowest priority */
|
||||
static const GLuint targets[NUM_TEXTURE_TARGETS] = {
|
||||
TEXTURE_2D_ARRAY_INDEX,
|
||||
TEXTURE_1D_ARRAY_INDEX,
|
||||
TEXTURE_CUBE_INDEX,
|
||||
TEXTURE_3D_INDEX,
|
||||
TEXTURE_RECT_INDEX,
|
||||
TEXTURE_2D_INDEX,
|
||||
TEXTURE_1D_INDEX
|
||||
};
|
||||
GLuint texIndex = targets[tex];
|
||||
texture_override(ctx, texUnit, enableBits,
|
||||
texUnit->CurrentTex[texIndex], 1 << texIndex);
|
||||
}
|
||||
|
||||
if (!texUnit->_ReallyEnabled) {
|
||||
continue;
|
||||
@@ -728,6 +718,7 @@ static void
|
||||
init_texture_unit( GLcontext *ctx, GLuint unit )
|
||||
{
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
|
||||
GLuint tex;
|
||||
|
||||
texUnit->EnvMode = GL_MODULATE;
|
||||
ASSIGN_4V( texUnit->EnvColor, 0.0, 0.0, 0.0, 0.0 );
|
||||
@@ -757,13 +748,10 @@ init_texture_unit( GLcontext *ctx, GLuint unit )
|
||||
ASSIGN_4V( texUnit->EyePlaneQ, 0.0, 0.0, 0.0, 0.0 );
|
||||
|
||||
/* initialize current texture object ptrs to the shared default objects */
|
||||
_mesa_reference_texobj(&texUnit->Current1D, ctx->Shared->Default1D);
|
||||
_mesa_reference_texobj(&texUnit->Current2D, ctx->Shared->Default2D);
|
||||
_mesa_reference_texobj(&texUnit->Current3D, ctx->Shared->Default3D);
|
||||
_mesa_reference_texobj(&texUnit->CurrentCubeMap, ctx->Shared->DefaultCubeMap);
|
||||
_mesa_reference_texobj(&texUnit->CurrentRect, ctx->Shared->DefaultRect);
|
||||
_mesa_reference_texobj(&texUnit->Current1DArray, ctx->Shared->Default1DArray);
|
||||
_mesa_reference_texobj(&texUnit->Current2DArray, ctx->Shared->Default2DArray);
|
||||
for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
|
||||
_mesa_reference_texobj(&texUnit->CurrentTex[tex],
|
||||
ctx->Shared->DefaultTex[tex]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -792,7 +780,8 @@ _mesa_init_texture(GLcontext *ctx)
|
||||
/* After we're done initializing the context's texture state the default
|
||||
* texture objects' refcounts should be at least MAX_TEXTURE_UNITS + 1.
|
||||
*/
|
||||
assert(ctx->Shared->Default1D->RefCount >= MAX_TEXTURE_UNITS + 1);
|
||||
assert(ctx->Shared->DefaultTex[TEXTURE_1D_INDEX]->RefCount
|
||||
>= MAX_TEXTURE_UNITS + 1);
|
||||
|
||||
/* Allocate proxy textures */
|
||||
if (!alloc_proxy_textures( ctx ))
|
||||
@@ -813,13 +802,9 @@ _mesa_free_texture_data(GLcontext *ctx)
|
||||
/* unreference current textures */
|
||||
for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) {
|
||||
struct gl_texture_unit *unit = ctx->Texture.Unit + u;
|
||||
_mesa_reference_texobj(&unit->Current1D, NULL);
|
||||
_mesa_reference_texobj(&unit->Current2D, NULL);
|
||||
_mesa_reference_texobj(&unit->Current3D, NULL);
|
||||
_mesa_reference_texobj(&unit->CurrentCubeMap, NULL);
|
||||
_mesa_reference_texobj(&unit->CurrentRect, NULL);
|
||||
_mesa_reference_texobj(&unit->Current1DArray, NULL);
|
||||
_mesa_reference_texobj(&unit->Current2DArray, NULL);
|
||||
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
|
||||
_mesa_reference_texobj(&unit->CurrentTex[tgt], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Free proxy texture objects */
|
||||
@@ -844,17 +829,13 @@ _mesa_free_texture_data(GLcontext *ctx)
|
||||
void
|
||||
_mesa_update_default_objects_texture(GLcontext *ctx)
|
||||
{
|
||||
GLuint i;
|
||||
GLuint i, tex;
|
||||
|
||||
for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
|
||||
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
|
||||
|
||||
_mesa_reference_texobj(&texUnit->Current1D, ctx->Shared->Default1D);
|
||||
_mesa_reference_texobj(&texUnit->Current2D, ctx->Shared->Default2D);
|
||||
_mesa_reference_texobj(&texUnit->Current3D, ctx->Shared->Default3D);
|
||||
_mesa_reference_texobj(&texUnit->CurrentCubeMap, ctx->Shared->DefaultCubeMap);
|
||||
_mesa_reference_texobj(&texUnit->CurrentRect, ctx->Shared->DefaultRect);
|
||||
_mesa_reference_texobj(&texUnit->Current1DArray, ctx->Shared->Default1DArray);
|
||||
_mesa_reference_texobj(&texUnit->Current2DArray, ctx->Shared->Default2DArray);
|
||||
for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
|
||||
_mesa_reference_texobj(&texUnit->CurrentTex[tex],
|
||||
ctx->Shared->DefaultTex[tex]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.3
|
||||
* Version: 7.4
|
||||
*
|
||||
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
|
||||
*
|
||||
@@ -29,9 +29,9 @@
|
||||
|
||||
/* Mesa version */
|
||||
#define MESA_MAJOR 7
|
||||
#define MESA_MINOR 3
|
||||
#define MESA_MINOR 4
|
||||
#define MESA_PATCH 0
|
||||
#define MESA_VERSION_STRING "7.3"
|
||||
#define MESA_VERSION_STRING "7.4"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
||||
+1
-1
@@ -171,7 +171,7 @@ static void ref_norm_transform_normalize( const GLmatrix *mat,
|
||||
out[i][0] = out[i][1] = out[i][2] = 0;
|
||||
}
|
||||
} else {
|
||||
scale = lengths[i];
|
||||
scale = lengths[i];;
|
||||
SCALE_SCALAR_3V( out[i], scale, t );
|
||||
}
|
||||
|
||||
|
||||
+12
-4
@@ -239,13 +239,22 @@ typedef enum prog_opcode {
|
||||
} gl_inst_opcode;
|
||||
|
||||
|
||||
/**
|
||||
* Number of bits for the src/dst register Index field.
|
||||
* This limits the size of temp/uniform register files.
|
||||
*/
|
||||
#define INST_INDEX_BITS 10
|
||||
|
||||
|
||||
/**
|
||||
* Instruction source register.
|
||||
*/
|
||||
struct prog_src_register
|
||||
{
|
||||
GLuint File:4; /**< One of the PROGRAM_* register file values. */
|
||||
GLint Index:9; /**< May be negative for relative addressing. */
|
||||
GLint Index:(INST_INDEX_BITS+1); /**< Extra bit here for sign bit.
|
||||
* May be negative for relative addressing.
|
||||
*/
|
||||
GLuint Swizzle:12;
|
||||
GLuint RelAddr:1;
|
||||
|
||||
@@ -289,7 +298,7 @@ struct prog_src_register
|
||||
struct prog_dst_register
|
||||
{
|
||||
GLuint File:4; /**< One of the PROGRAM_* register file values */
|
||||
GLuint Index:8;
|
||||
GLuint Index:INST_INDEX_BITS; /**< Unsigned, never negative */
|
||||
GLuint WriteMask:4;
|
||||
GLuint RelAddr:1;
|
||||
|
||||
@@ -322,8 +331,7 @@ struct prog_dst_register
|
||||
*/
|
||||
GLuint CondSrc:1;
|
||||
/*@}*/
|
||||
|
||||
GLuint pad:30;
|
||||
GLuint pad:28;
|
||||
};
|
||||
|
||||
|
||||
|
||||
+12
-1
@@ -85,6 +85,9 @@ file_string(enum register_file f, gl_prog_print_mode mode)
|
||||
static const char *
|
||||
arb_input_attrib_string(GLint index, GLenum progType)
|
||||
{
|
||||
/*
|
||||
* These strings should match the VERT_ATTRIB_x and FRAG_ATTRIB_x tokens.
|
||||
*/
|
||||
const char *vertAttribs[] = {
|
||||
"vertex.position",
|
||||
"vertex.weight",
|
||||
@@ -159,6 +162,9 @@ arb_input_attrib_string(GLint index, GLenum progType)
|
||||
static const char *
|
||||
arb_output_attrib_string(GLint index, GLenum progType)
|
||||
{
|
||||
/*
|
||||
* These strings should match the VERT_RESULT_x and FRAG_RESULT_x tokens.
|
||||
*/
|
||||
const char *vertResults[] = {
|
||||
"result.position",
|
||||
"result.color.primary",
|
||||
@@ -183,7 +189,12 @@ arb_output_attrib_string(GLint index, GLenum progType)
|
||||
};
|
||||
const char *fragResults[] = {
|
||||
"result.color",
|
||||
"result.depth"
|
||||
"result.color(half)",
|
||||
"result.depth",
|
||||
"result.color[0]",
|
||||
"result.color[1]",
|
||||
"result.color[2]",
|
||||
"result.color[3]"
|
||||
};
|
||||
|
||||
if (progType == GL_VERTEX_PROGRAM_ARB) {
|
||||
|
||||
@@ -53,6 +53,15 @@ _mesa_init_program(GLcontext *ctx)
|
||||
{
|
||||
GLuint i;
|
||||
|
||||
/*
|
||||
* If this assertion fails, we need to increase the field
|
||||
* size for register indexes.
|
||||
*/
|
||||
ASSERT(ctx->Const.VertexProgram.MaxUniformComponents / 4
|
||||
<= (1 << INST_INDEX_BITS));
|
||||
ASSERT(ctx->Const.FragmentProgram.MaxUniformComponents / 4
|
||||
<= (1 << INST_INDEX_BITS));
|
||||
|
||||
ctx->Program.ErrorPos = -1;
|
||||
ctx->Program.ErrorString = _mesa_strdup("");
|
||||
|
||||
|
||||
+172
-99
@@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.2
|
||||
* Version: 7.5
|
||||
*
|
||||
* Copyright (C) 2004-2008 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -801,6 +802,27 @@ is_integer_type(GLenum type)
|
||||
}
|
||||
|
||||
|
||||
static GLboolean
|
||||
is_sampler_type(GLenum type)
|
||||
{
|
||||
switch (type) {
|
||||
case GL_SAMPLER_1D:
|
||||
case GL_SAMPLER_2D:
|
||||
case GL_SAMPLER_3D:
|
||||
case GL_SAMPLER_CUBE:
|
||||
case GL_SAMPLER_1D_SHADOW:
|
||||
case GL_SAMPLER_2D_SHADOW:
|
||||
case GL_SAMPLER_2D_RECT_ARB:
|
||||
case GL_SAMPLER_2D_RECT_SHADOW_ARB:
|
||||
case GL_SAMPLER_1D_ARRAY_EXT:
|
||||
case GL_SAMPLER_2D_ARRAY_EXT:
|
||||
return GL_TRUE;
|
||||
default:
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
|
||||
GLsizei maxLength, GLsizei *length, GLint *size,
|
||||
@@ -866,6 +888,7 @@ _mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
|
||||
{
|
||||
const struct gl_shader_program *shProg;
|
||||
const struct gl_program *prog;
|
||||
const struct gl_program_parameter *param;
|
||||
GLint progPos;
|
||||
|
||||
shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetActiveUniform");
|
||||
@@ -891,14 +914,30 @@ _mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
|
||||
if (!prog || progPos < 0)
|
||||
return; /* should never happen */
|
||||
|
||||
if (nameOut)
|
||||
copy_string(nameOut, maxLength, length,
|
||||
prog->Parameters->Parameters[progPos].Name);
|
||||
if (size)
|
||||
*size = prog->Parameters->Parameters[progPos].Size
|
||||
/ sizeof_glsl_type(prog->Parameters->Parameters[progPos].DataType);
|
||||
if (type)
|
||||
*type = prog->Parameters->Parameters[progPos].DataType;
|
||||
ASSERT(progPos < prog->Parameters->NumParameters);
|
||||
param = &prog->Parameters->Parameters[progPos];
|
||||
|
||||
if (nameOut) {
|
||||
copy_string(nameOut, maxLength, length, param->Name);
|
||||
}
|
||||
|
||||
if (size) {
|
||||
GLint typeSize = sizeof_glsl_type(param->DataType);
|
||||
if (param->Size > typeSize) {
|
||||
/* This is an array.
|
||||
* Array elements are placed on vector[4] boundaries so they're
|
||||
* a multiple of four floats. We round typeSize up to next multiple
|
||||
* of four to get the right size below.
|
||||
*/
|
||||
typeSize = (typeSize + 3) & ~3;
|
||||
}
|
||||
/* Note that the returned size is in units of the <type>, not bytes */
|
||||
*size = param->Size / typeSize;
|
||||
}
|
||||
|
||||
if (type) {
|
||||
*type = param->DataType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1135,24 +1174,30 @@ get_uniform_rows_cols(const struct gl_program_parameter *p,
|
||||
}
|
||||
|
||||
|
||||
#define MAX_UNIFORM_ELEMENTS 16
|
||||
|
||||
/**
|
||||
* Helper for GetUniformfv(), GetUniformiv()
|
||||
* Returns number of elements written to 'params' output.
|
||||
* Helper for get_uniform[fi]v() functions.
|
||||
* Given a shader program name and uniform location, return a pointer
|
||||
* to the shader program and return the program parameter position.
|
||||
*/
|
||||
static GLuint
|
||||
get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
|
||||
GLfloat *params)
|
||||
static void
|
||||
lookup_uniform_parameter(GLcontext *ctx, GLuint program, GLint location,
|
||||
struct gl_program **progOut, GLint *paramPosOut)
|
||||
{
|
||||
struct gl_shader_program *shProg
|
||||
= _mesa_lookup_shader_program_err(ctx, program, "glGetUniform[if]v");
|
||||
if (shProg) {
|
||||
if (shProg->Uniforms &&
|
||||
location >= 0 && location < (GLint) shProg->Uniforms->NumUniforms) {
|
||||
GLint progPos;
|
||||
const struct gl_program *prog = NULL;
|
||||
struct gl_program *prog = NULL;
|
||||
GLint progPos = -1;
|
||||
|
||||
/* if shProg is NULL, we'll have already recorded an error */
|
||||
|
||||
if (shProg) {
|
||||
if (!shProg->Uniforms ||
|
||||
location < 0 ||
|
||||
location >= (GLint) shProg->Uniforms->NumUniforms) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(location)");
|
||||
}
|
||||
else {
|
||||
/* OK, find the gl_program and program parameter location */
|
||||
progPos = shProg->Uniforms->Uniforms[location].VertPos;
|
||||
if (progPos >= 0) {
|
||||
prog = &shProg->VertexProgram->Base;
|
||||
@@ -1163,33 +1208,11 @@ get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
|
||||
prog = &shProg->FragmentProgram->Base;
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(prog);
|
||||
if (prog) {
|
||||
const struct gl_program_parameter *p =
|
||||
&prog->Parameters->Parameters[progPos];
|
||||
GLint rows, cols, i, j, k;
|
||||
|
||||
/* See uniformiv() below */
|
||||
assert(p->Size <= MAX_UNIFORM_ELEMENTS);
|
||||
|
||||
get_uniform_rows_cols(p, &rows, &cols);
|
||||
|
||||
k = 0;
|
||||
for (i = 0; i < rows; i++) {
|
||||
for (j = 0; j < cols; j++ ) {
|
||||
params[k++] = prog->Parameters->ParameterValues[progPos+i][j];
|
||||
}
|
||||
}
|
||||
|
||||
return p->Size;
|
||||
}
|
||||
}
|
||||
else {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(location)");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
*progOut = prog;
|
||||
*paramPosOut = progPos;
|
||||
}
|
||||
|
||||
|
||||
@@ -1200,23 +1223,54 @@ static void
|
||||
_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
|
||||
GLfloat *params)
|
||||
{
|
||||
(void) get_uniformfv(ctx, program, location, params);
|
||||
struct gl_program *prog;
|
||||
GLint paramPos;
|
||||
|
||||
lookup_uniform_parameter(ctx, program, location, &prog, ¶mPos);
|
||||
|
||||
if (prog) {
|
||||
const struct gl_program_parameter *p =
|
||||
&prog->Parameters->Parameters[paramPos];
|
||||
GLint rows, cols, i, j, k;
|
||||
|
||||
get_uniform_rows_cols(p, &rows, &cols);
|
||||
|
||||
k = 0;
|
||||
for (i = 0; i < rows; i++) {
|
||||
for (j = 0; j < cols; j++ ) {
|
||||
params[k++] = prog->Parameters->ParameterValues[paramPos+i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called via ctx->Driver.GetUniformiv().
|
||||
* \sa _mesa_get_uniformfv, only difference is a cast.
|
||||
*/
|
||||
static void
|
||||
_mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location,
|
||||
GLint *params)
|
||||
{
|
||||
GLfloat fparams[MAX_UNIFORM_ELEMENTS];
|
||||
GLuint n = get_uniformfv(ctx, program, location, fparams);
|
||||
GLuint i;
|
||||
assert(n <= MAX_UNIFORM_ELEMENTS);
|
||||
for (i = 0; i < n; i++) {
|
||||
params[i] = (GLint) fparams[i];
|
||||
struct gl_program *prog;
|
||||
GLint paramPos;
|
||||
|
||||
lookup_uniform_parameter(ctx, program, location, &prog, ¶mPos);
|
||||
|
||||
if (prog) {
|
||||
const struct gl_program_parameter *p =
|
||||
&prog->Parameters->Parameters[paramPos];
|
||||
GLint rows, cols, i, j, k;
|
||||
|
||||
get_uniform_rows_cols(p, &rows, &cols);
|
||||
|
||||
k = 0;
|
||||
for (i = 0; i < rows; i++) {
|
||||
for (j = 0; j < cols; j++ ) {
|
||||
params[k++] = (GLint) prog->Parameters->ParameterValues[paramPos+i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1401,7 +1455,8 @@ _mesa_use_program(GLcontext *ctx, GLuint program)
|
||||
return;
|
||||
}
|
||||
if (!shProg->LinkStatus) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glUseProgram");
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glUseProgram(program %u not linked)", program);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1447,27 +1502,6 @@ _mesa_update_shader_textures_used(struct gl_program *prog)
|
||||
}
|
||||
|
||||
|
||||
static GLboolean
|
||||
is_sampler_type(GLenum type)
|
||||
{
|
||||
switch (type) {
|
||||
case GL_SAMPLER_1D:
|
||||
case GL_SAMPLER_2D:
|
||||
case GL_SAMPLER_3D:
|
||||
case GL_SAMPLER_CUBE:
|
||||
case GL_SAMPLER_1D_SHADOW:
|
||||
case GL_SAMPLER_2D_SHADOW:
|
||||
case GL_SAMPLER_2D_RECT_ARB:
|
||||
case GL_SAMPLER_2D_RECT_SHADOW_ARB:
|
||||
case GL_SAMPLER_1D_ARRAY_EXT:
|
||||
case GL_SAMPLER_2D_ARRAY_EXT:
|
||||
return GL_TRUE;
|
||||
default:
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check if the type given by userType is allowed to set a uniform of the
|
||||
* target type. Generally, equivalence is required, but setting Boolean
|
||||
@@ -1506,10 +1540,10 @@ compatible_types(GLenum userType, GLenum targetType)
|
||||
* \param program the program whose uniform to update
|
||||
* \param index the index of the program parameter for the uniform
|
||||
* \param offset additional parameter slot offset (for arrays)
|
||||
* \param type the datatype of the uniform
|
||||
* \param type the incoming datatype of 'values'
|
||||
* \param count the number of uniforms to set
|
||||
* \param elems number of elements per uniform
|
||||
* \param values the new values
|
||||
* \param elems number of elements per uniform (1, 2, 3 or 4)
|
||||
* \param values the new values, of datatype 'type'
|
||||
*/
|
||||
static void
|
||||
set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
||||
@@ -1519,8 +1553,12 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
||||
{
|
||||
struct gl_program_parameter *param =
|
||||
&program->Parameters->Parameters[index];
|
||||
const GLboolean isUniformBool = is_boolean_type(param->DataType);
|
||||
const GLboolean areIntValues = is_integer_type(type);
|
||||
|
||||
assert(offset >= 0);
|
||||
assert(elems >= 1);
|
||||
assert(elems <= 4);
|
||||
|
||||
if (!compatible_types(type, param->DataType)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(type mismatch)");
|
||||
@@ -1535,27 +1573,36 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
||||
if (param->Type == PROGRAM_SAMPLER) {
|
||||
/* This controls which texture unit which is used by a sampler */
|
||||
GLuint texUnit, sampler;
|
||||
GLint i;
|
||||
|
||||
/* data type for setting samplers must be int */
|
||||
if (type != GL_INT || count != 1) {
|
||||
if (type != GL_INT) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glUniform(only glUniform1i can be used "
|
||||
"to set sampler uniforms)");
|
||||
return;
|
||||
}
|
||||
|
||||
sampler = (GLuint) program->Parameters->ParameterValues[index][0];
|
||||
texUnit = ((GLuint *) values)[0];
|
||||
/* XXX arrays of samplers haven't been tested much, but it's not a
|
||||
* common thing...
|
||||
*/
|
||||
for (i = 0; i < count; i++) {
|
||||
sampler = (GLuint) program->Parameters->ParameterValues[index + i][0];
|
||||
texUnit = ((GLuint *) values)[i];
|
||||
|
||||
/* check that the sampler (tex unit index) is legal */
|
||||
if (texUnit >= ctx->Const.MaxTextureImageUnits) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"glUniform1(invalid sampler/tex unit index)");
|
||||
return;
|
||||
/* check that the sampler (tex unit index) is legal */
|
||||
if (texUnit >= ctx->Const.MaxTextureImageUnits) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"glUniform1(invalid sampler/tex unit index)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* This maps a sampler to a texture unit: */
|
||||
if (sampler < MAX_SAMPLERS) {
|
||||
program->SamplerUnits[sampler] = texUnit;
|
||||
}
|
||||
}
|
||||
|
||||
/* This maps a sampler to a texture unit: */
|
||||
program->SamplerUnits[sampler] = texUnit;
|
||||
_mesa_update_shader_textures_used(program);
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
|
||||
@@ -1563,20 +1610,36 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
||||
else {
|
||||
/* ordinary uniform variable */
|
||||
GLsizei k, i;
|
||||
GLint slots = (param->Size + 3) / 4;
|
||||
const GLint slots = (param->Size + 3) / 4;
|
||||
const GLint typeSize = sizeof_glsl_type(param->DataType);
|
||||
|
||||
if (count * elems > (GLint) param->Size) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(count too large)");
|
||||
return;
|
||||
if (param->Size > typeSize) {
|
||||
/* an array */
|
||||
/* we'll ignore extra data below */
|
||||
}
|
||||
else {
|
||||
/* non-array: count must be one */
|
||||
if (count != 1) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glUniform(uniform is not an array)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (count > slots)
|
||||
count = slots;
|
||||
|
||||
/* loop over number of array elements */
|
||||
for (k = 0; k < count; k++) {
|
||||
GLfloat *uniformVal =
|
||||
program->Parameters->ParameterValues[index + offset + k];
|
||||
if (is_integer_type(type)) {
|
||||
GLfloat *uniformVal;
|
||||
|
||||
if (offset + k >= slots) {
|
||||
/* Extra array data is ignored */
|
||||
break;
|
||||
}
|
||||
|
||||
/* uniformVal (the destination) is always float[4] */
|
||||
uniformVal = program->Parameters->ParameterValues[index + offset + k];
|
||||
|
||||
if (areIntValues) {
|
||||
/* convert user's ints to floats */
|
||||
const GLint *iValues = ((const GLint *) values) + k * elems;
|
||||
for (i = 0; i < elems; i++) {
|
||||
uniformVal[i] = (GLfloat) iValues[i];
|
||||
@@ -1590,7 +1653,7 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program,
|
||||
}
|
||||
|
||||
/* if the uniform is bool-valued, convert to 1.0 or 0.0 */
|
||||
if (is_boolean_type(param->DataType)) {
|
||||
if (isUniformBool) {
|
||||
for (i = 0; i < elems; i++) {
|
||||
uniformVal[i] = uniformVal[i] ? 1.0 : 0.0;
|
||||
}
|
||||
@@ -1619,6 +1682,11 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count,
|
||||
if (location == -1)
|
||||
return; /* The standard specifies this as a no-op */
|
||||
|
||||
if (location < -1) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(location)");
|
||||
return;
|
||||
}
|
||||
|
||||
split_location_offset(&location, &offset);
|
||||
|
||||
if (location < 0 || location >= (GLint) shProg->Uniforms->NumUniforms) {
|
||||
@@ -1758,6 +1826,11 @@ _mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows,
|
||||
if (location == -1)
|
||||
return; /* The standard specifies this as a no-op */
|
||||
|
||||
if (location < -1) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix(location)");
|
||||
return;
|
||||
}
|
||||
|
||||
split_location_offset(&location, &offset);
|
||||
|
||||
if (location < 0 || location >= (GLint) shProg->Uniforms->NumUniforms) {
|
||||
|
||||
@@ -527,7 +527,7 @@ static slang_asm_info AsmInfo[] = {
|
||||
{ "vec4_texp3d", IR_TEXP, 1, 2 }, /* 3d w/ projection */
|
||||
{ "vec4_texcube", IR_TEX, 1, 2 }, /* cubemap */
|
||||
{ "vec4_tex_rect", IR_TEX, 1, 2 }, /* rectangle */
|
||||
{ "vec4_texp_rect", IR_TEX, 1, 2 },/* rectangle w/ projection */
|
||||
{ "vec4_texp_rect", IR_TEXP, 1, 2 },/* rectangle w/ projection */
|
||||
|
||||
/* unary op */
|
||||
{ "ivec4_to_vec4", IR_I_TO_F, 1, 1 }, /* int[4] to float[4] */
|
||||
@@ -3662,7 +3662,7 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper)
|
||||
if (lhs && rhs) {
|
||||
/* convert lhs swizzle into writemask */
|
||||
const GLuint swizzle = root_swizzle(lhs->Store);
|
||||
GLuint writemask, newSwizzle;
|
||||
GLuint writemask, newSwizzle = 0x0;
|
||||
if (!swizzle_to_writemask(A, swizzle, &writemask, &newSwizzle)) {
|
||||
/* Non-simple writemask, need to swizzle right hand side in
|
||||
* order to put components into the right place.
|
||||
|
||||
@@ -1450,7 +1450,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O,
|
||||
case OP_CALL:
|
||||
{
|
||||
GLboolean array_constructor = GL_FALSE;
|
||||
GLint array_constructor_size;
|
||||
GLint array_constructor_size = 0;
|
||||
|
||||
op->type = SLANG_OPER_CALL;
|
||||
op->a_id = parse_identifier(C);
|
||||
|
||||
+49
-14
@@ -164,7 +164,7 @@ _slang_var_swizzle(GLint size, GLint comp)
|
||||
{
|
||||
switch (size) {
|
||||
case 1:
|
||||
return MAKE_SWIZZLE4(comp, comp, comp, comp);
|
||||
return MAKE_SWIZZLE4(comp, SWIZZLE_NIL, SWIZZLE_NIL, SWIZZLE_NIL);
|
||||
case 2:
|
||||
return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_NIL, SWIZZLE_NIL);
|
||||
case 3:
|
||||
@@ -451,7 +451,7 @@ emit_arl_load(slang_emit_info *emitInfo,
|
||||
struct prog_instruction *inst = new_instruction(emitInfo, OPCODE_ARL);
|
||||
inst->SrcReg[0].File = file;
|
||||
inst->SrcReg[0].Index = index;
|
||||
inst->SrcReg[0].Swizzle = swizzle;
|
||||
inst->SrcReg[0].Swizzle = fix_swizzle(swizzle);
|
||||
inst->DstReg.File = PROGRAM_ADDRESS;
|
||||
inst->DstReg.Index = 0;
|
||||
inst->DstReg.WriteMask = WRITEMASK_X;
|
||||
@@ -873,6 +873,7 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
|
||||
if (n->Children[0]->Store->Size != n->Children[1]->Store->Size) {
|
||||
slang_info_log_error(emitInfo->log, "invalid operands to == or !=");
|
||||
n->Store = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -902,6 +903,7 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
slang_ir_storage tempStore;
|
||||
|
||||
if (!alloc_local_temp(emitInfo, &tempStore, 4)) {
|
||||
n->Store = NULL;
|
||||
return NULL;
|
||||
/* out of temps */
|
||||
}
|
||||
@@ -1358,6 +1360,7 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
|
||||
#if PEEPHOLE_OPTIMIZATIONS
|
||||
if (inst &&
|
||||
(n->Children[1]->Opcode != IR_SWIZZLE) &&
|
||||
_slang_is_temp(emitInfo->vt, n->Children[1]->Store) &&
|
||||
(inst->DstReg.File == n->Children[1]->Store->File) &&
|
||||
(inst->DstReg.Index == n->Children[1]->Store->Index) &&
|
||||
@@ -1374,13 +1377,9 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
* becomes:
|
||||
* MUL a, x, y;
|
||||
*/
|
||||
if (n->Children[1]->Opcode != IR_SWIZZLE)
|
||||
_slang_free_temp(emitInfo->vt, n->Children[1]->Store);
|
||||
*n->Children[1]->Store = *n->Children[0]->Store;
|
||||
|
||||
/* fixup the previous instruction (which stored the RHS result) */
|
||||
assert(n->Children[0]->Store->Index >= 0);
|
||||
|
||||
storage_to_dst_reg(&inst->DstReg, n->Children[0]->Store);
|
||||
return inst;
|
||||
}
|
||||
@@ -1813,6 +1812,25 @@ emit_cont_break_if_true(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the size of a swizzle mask given that some swizzle components
|
||||
* may be NIL/undefined. For example:
|
||||
* swizzle_size(".zzxx") = 4
|
||||
* swizzle_size(".xy??") = 2
|
||||
* swizzle_size(".w???") = 1
|
||||
*/
|
||||
static GLuint
|
||||
swizzle_size(GLuint swizzle)
|
||||
{
|
||||
GLuint i;
|
||||
for (i = 0; i < 4; i++) {
|
||||
if (GET_SWZ(swizzle, i) == SWIZZLE_NIL)
|
||||
return i;
|
||||
}
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
||||
static struct prog_instruction *
|
||||
emit_swizzle(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
{
|
||||
@@ -1820,14 +1838,25 @@ emit_swizzle(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
|
||||
inst = emit(emitInfo, n->Children[0]);
|
||||
|
||||
#if 0
|
||||
assert(n->Store->Parent);
|
||||
/* Apply this node's swizzle to parent's storage */
|
||||
GLuint swizzle = n->Store->Swizzle;
|
||||
_slang_copy_ir_storage(n->Store, n->Store->Parent);
|
||||
n->Store->Swizzle = _slang_swizzle_swizzle(n->Store->Swizzle, swizzle);
|
||||
if (!n->Store->Parent) {
|
||||
/* this covers a case such as "(b ? p : q).x" */
|
||||
n->Store->Parent = n->Children[0]->Store;
|
||||
assert(n->Store->Parent);
|
||||
}
|
||||
|
||||
{
|
||||
const GLuint swizzle = n->Store->Swizzle;
|
||||
/* new storage is parent storage with updated Swizzle + Size fields */
|
||||
_slang_copy_ir_storage(n->Store, n->Store->Parent);
|
||||
/* Apply this node's swizzle to parent's storage */
|
||||
n->Store->Swizzle = _slang_swizzle_swizzle(n->Store->Swizzle, swizzle);
|
||||
/* Update size */
|
||||
n->Store->Size = swizzle_size(n->Store->Swizzle);
|
||||
}
|
||||
|
||||
assert(!n->Store->Parent);
|
||||
#endif
|
||||
assert(n->Store->Index >= 0);
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
||||
@@ -2120,6 +2149,10 @@ emit_var_ref(slang_emit_info *emitInfo, slang_ir_node *n)
|
||||
/* mark var as used */
|
||||
_mesa_use_uniform(emitInfo->prog->Parameters, (char *) n->Var->a_name);
|
||||
}
|
||||
else if (n->Store->File == PROGRAM_INPUT) {
|
||||
assert(n->Store->Index >= 0);
|
||||
emitInfo->prog->InputsRead |= (1 << n->Store->Index);
|
||||
}
|
||||
|
||||
if (n->Store->Index < 0) {
|
||||
/* probably ran out of registers */
|
||||
@@ -2424,7 +2457,9 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt,
|
||||
maxUniforms = ctx->Const.VertexProgram.MaxUniformComponents / 4;
|
||||
}
|
||||
if (prog->Parameters->NumParameters > maxUniforms) {
|
||||
slang_info_log_error(log, "Constant/uniform register limit exceeded");
|
||||
slang_info_log_error(log, "Constant/uniform register limit exceeded "
|
||||
"(max=%u vec4)", maxUniforms);
|
||||
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
+36
-2
@@ -318,7 +318,7 @@ _slang_resolve_attributes(struct gl_shader_program *shProg,
|
||||
{
|
||||
GLint attribMap[MAX_VERTEX_ATTRIBS];
|
||||
GLuint i, j;
|
||||
GLbitfield usedAttributes;
|
||||
GLbitfield usedAttributes; /* generics only, not legacy attributes */
|
||||
|
||||
assert(origProg != linkedProg);
|
||||
assert(origProg->Target == GL_VERTEX_PROGRAM_ARB);
|
||||
@@ -342,6 +342,15 @@ _slang_resolve_attributes(struct gl_shader_program *shProg,
|
||||
usedAttributes |= (1 << attr);
|
||||
}
|
||||
|
||||
/* If gl_Vertex is used, that actually counts against the limit
|
||||
* on generic vertex attributes. This avoids the ambiguity of
|
||||
* whether glVertexAttrib4fv(0, v) sets legacy attribute 0 (vert pos)
|
||||
* or generic attribute[0]. If gl_Vertex is used, we want the former.
|
||||
*/
|
||||
if (origProg->InputsRead & VERT_BIT_POS) {
|
||||
usedAttributes |= 0x1;
|
||||
}
|
||||
|
||||
/* initialize the generic attribute map entries to -1 */
|
||||
for (i = 0; i < MAX_VERTEX_ATTRIBS; i++) {
|
||||
attribMap[i] = -1;
|
||||
@@ -384,7 +393,7 @@ _slang_resolve_attributes(struct gl_shader_program *shProg,
|
||||
* Start at 1 since generic attribute 0 always aliases
|
||||
* glVertex/position.
|
||||
*/
|
||||
for (attr = 1; attr < MAX_VERTEX_ATTRIBS; attr++) {
|
||||
for (attr = 0; attr < MAX_VERTEX_ATTRIBS; attr++) {
|
||||
if (((1 << attr) & usedAttributes) == 0)
|
||||
break;
|
||||
}
|
||||
@@ -486,8 +495,33 @@ _slang_update_inputs_outputs(struct gl_program *prog)
|
||||
maxAddrReg = MAX2(maxAddrReg, (GLuint) (inst->SrcReg[j].Index + 1));
|
||||
}
|
||||
}
|
||||
|
||||
if (inst->DstReg.File == PROGRAM_OUTPUT) {
|
||||
prog->OutputsWritten |= 1 << inst->DstReg.Index;
|
||||
if (inst->DstReg.RelAddr) {
|
||||
/* If the output attribute is indexed with relative addressing
|
||||
* we know that it must be a varying or texcoord such as
|
||||
* gl_TexCoord[i] = v; In this case, mark all the texcoords
|
||||
* or varying outputs as being written. It's not an error if
|
||||
* a vertex shader writes varying vars that aren't used by the
|
||||
* fragment shader. But it is an error for a fragment shader
|
||||
* to use varyings that are not written by the vertex shader.
|
||||
*/
|
||||
if (prog->Target == GL_VERTEX_PROGRAM_ARB) {
|
||||
if (inst->DstReg.Index == VERT_RESULT_TEX0) {
|
||||
/* mark all texcoord outputs as written */
|
||||
const GLbitfield mask =
|
||||
((1 << MAX_TEXTURE_COORD_UNITS) - 1) << VERT_RESULT_TEX0;
|
||||
prog->OutputsWritten |= mask;
|
||||
}
|
||||
else if (inst->DstReg.Index == VERT_RESULT_VAR0) {
|
||||
/* mark all generic varying outputs as written */
|
||||
const GLbitfield mask =
|
||||
((1 << MAX_VARYING) - 1) << VERT_RESULT_VAR0;
|
||||
prog->OutputsWritten |= mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (inst->DstReg.File == PROGRAM_ADDRESS) {
|
||||
maxAddrReg = MAX2(maxAddrReg, inst->DstReg.Index + 1);
|
||||
|
||||
+20
-39
@@ -4,6 +4,7 @@
|
||||
#include "shader/prog_print.h"
|
||||
#include "slang_compile.h"
|
||||
#include "slang_compile_variable.h"
|
||||
#include "slang_emit.h"
|
||||
#include "slang_mem.h"
|
||||
#include "slang_vartable.h"
|
||||
#include "slang_ir.h"
|
||||
@@ -72,9 +73,8 @@ _slang_delete_var_table(slang_var_table *vt)
|
||||
|
||||
|
||||
/**
|
||||
* Create new table, put at head, return ptr to it.
|
||||
* XXX we should take a maxTemps parameter to indicate how many temporaries
|
||||
* are available for the current shader/program target.
|
||||
* Create new table on top of vartable stack.
|
||||
* Used when we enter a {} block.
|
||||
*/
|
||||
void
|
||||
_slang_push_var_table(slang_var_table *vt)
|
||||
@@ -95,7 +95,8 @@ _slang_push_var_table(slang_var_table *vt)
|
||||
|
||||
|
||||
/**
|
||||
* Destroy given table, return ptr to Parent
|
||||
* Pop top entry from variable table.
|
||||
* Used when we leave a {} block.
|
||||
*/
|
||||
void
|
||||
_slang_pop_var_table(slang_var_table *vt)
|
||||
@@ -125,10 +126,12 @@ _slang_pop_var_table(slang_var_table *vt)
|
||||
else
|
||||
comp = 0;
|
||||
|
||||
assert(store->Index >= 0);
|
||||
for (j = 0; j < store->Size; j++) {
|
||||
assert(t->Temps[store->Index * 4 + j + comp] == VAR);
|
||||
t->Temps[store->Index * 4 + j + comp] = FREE;
|
||||
/* store->Index may be -1 if we run out of registers */
|
||||
if (store->Index >= 0) {
|
||||
for (j = 0; j < store->Size; j++) {
|
||||
assert(t->Temps[store->Index * 4 + j + comp] == VAR);
|
||||
t->Temps[store->Index * 4 + j + comp] = FREE;
|
||||
}
|
||||
}
|
||||
store->Index = -1;
|
||||
}
|
||||
@@ -156,7 +159,7 @@ _slang_pop_var_table(slang_var_table *vt)
|
||||
|
||||
|
||||
/**
|
||||
* Add a new variable to the given symbol table.
|
||||
* Add a new variable to the given var/symbol table.
|
||||
*/
|
||||
void
|
||||
_slang_add_variable(slang_var_table *vt, slang_variable *v)
|
||||
@@ -214,6 +217,7 @@ alloc_reg(slang_var_table *vt, GLint size, GLboolean isTemp)
|
||||
for (i = 0; i <= vt->MaxRegisters * 4 - size; i += step) {
|
||||
GLuint found = 0;
|
||||
for (j = 0; j < (GLuint) size; j++) {
|
||||
assert(i + j < 4 * MAX_PROGRAM_TEMPS);
|
||||
if (i + j < vt->MaxRegisters * 4 && t->Temps[i + j] == FREE) {
|
||||
found++;
|
||||
}
|
||||
@@ -225,13 +229,17 @@ alloc_reg(slang_var_table *vt, GLint size, GLboolean isTemp)
|
||||
/* found block of size free regs */
|
||||
if (size > 1)
|
||||
assert(i % 4 == 0);
|
||||
for (j = 0; j < (GLuint) size; j++)
|
||||
for (j = 0; j < (GLuint) size; j++) {
|
||||
assert(i + j < 4 * MAX_PROGRAM_TEMPS);
|
||||
t->Temps[i + j] = isTemp ? TEMP : VAR;
|
||||
}
|
||||
assert(i < MAX_PROGRAM_TEMPS * 4);
|
||||
t->ValSize[i] = size;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
/* if we get here, we ran out of registers */
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -259,21 +267,7 @@ _slang_alloc_var(slang_var_table *vt, slang_ir_storage *store)
|
||||
return GL_FALSE;
|
||||
|
||||
store->Index = i / 4;
|
||||
if (store->Size == 1) {
|
||||
const GLuint comp = i % 4;
|
||||
store->Swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp);
|
||||
}
|
||||
else if (store->Size == 2) {
|
||||
store->Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y,
|
||||
SWIZZLE_NIL, SWIZZLE_NIL);
|
||||
}
|
||||
else if (store->Size == 3) {
|
||||
store->Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y,
|
||||
SWIZZLE_Z, SWIZZLE_NIL);
|
||||
}
|
||||
else {
|
||||
store->Swizzle = SWIZZLE_NOOP;
|
||||
}
|
||||
store->Swizzle = _slang_var_swizzle(store->Size, i % 4);
|
||||
|
||||
if (dbg)
|
||||
printf("Alloc var storage sz %d at %d.%s (level %d) store %p\n",
|
||||
@@ -301,20 +295,7 @@ _slang_alloc_temp(slang_var_table *vt, slang_ir_storage *store)
|
||||
assert(store->Index < 0);
|
||||
|
||||
store->Index = i / 4;
|
||||
if (store->Size == 1) {
|
||||
const GLuint comp = i % 4;
|
||||
store->Swizzle = MAKE_SWIZZLE4(comp, comp, comp, comp);
|
||||
}
|
||||
else {
|
||||
/* XXX improve swizzled for size=2/3, use for writemask... */
|
||||
#if 1
|
||||
if (store->Size == 2) {
|
||||
store->Swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y,
|
||||
SWIZZLE_NIL, SWIZZLE_NIL);
|
||||
}
|
||||
#endif
|
||||
store->Swizzle = SWIZZLE_NOOP;
|
||||
}
|
||||
store->Swizzle = _slang_var_swizzle(store->Size, i % 4);
|
||||
|
||||
if (dbg) printf("Alloc temp sz %d at %d.%s (level %d) store %p\n",
|
||||
store->Size, store->Index,
|
||||
|
||||
+34
-20
@@ -40,20 +40,27 @@ static void
|
||||
fetch_texel_lod( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
|
||||
GLuint unit, GLfloat color[4] )
|
||||
{
|
||||
GLchan rgba[4];
|
||||
SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||
const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current;
|
||||
|
||||
if (texObj)
|
||||
if (texObj) {
|
||||
SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||
GLchan rgba[4];
|
||||
|
||||
lambda = CLAMP(lambda, texObj->MinLod, texObj->MaxLod);
|
||||
|
||||
/* XXX use a float-valued TextureSample routine here!!! */
|
||||
swrast->TextureSample[unit](ctx, texObj, 1, (const GLfloat (*)[4]) texcoord,
|
||||
&lambda, &rgba);
|
||||
color[0] = CHAN_TO_FLOAT(rgba[0]);
|
||||
color[1] = CHAN_TO_FLOAT(rgba[1]);
|
||||
color[2] = CHAN_TO_FLOAT(rgba[2]);
|
||||
color[3] = CHAN_TO_FLOAT(rgba[3]);
|
||||
/* XXX use a float-valued TextureSample routine here!!! */
|
||||
swrast->TextureSample[unit](ctx, texObj, 1,
|
||||
(const GLfloat (*)[4]) texcoord,
|
||||
&lambda, &rgba);
|
||||
color[0] = CHAN_TO_FLOAT(rgba[0]);
|
||||
color[1] = CHAN_TO_FLOAT(rgba[1]);
|
||||
color[2] = CHAN_TO_FLOAT(rgba[2]);
|
||||
color[3] = CHAN_TO_FLOAT(rgba[3]);
|
||||
}
|
||||
else {
|
||||
color[0] = color[1] = color[2] = 0.0F;
|
||||
color[3] = 1.0F;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,13 +76,14 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4],
|
||||
{
|
||||
SWcontext *swrast = SWRAST_CONTEXT(ctx);
|
||||
const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current;
|
||||
GLfloat lambda;
|
||||
GLchan rgba[4];
|
||||
|
||||
if (texObj) {
|
||||
const struct gl_texture_image *texImg = texObj->Image[0][texObj->BaseLevel];
|
||||
const struct gl_texture_image *texImg =
|
||||
texObj->Image[0][texObj->BaseLevel];
|
||||
const GLfloat texW = (GLfloat) texImg->WidthScale;
|
||||
const GLfloat texH = (GLfloat) texImg->HeightScale;
|
||||
GLfloat lambda;
|
||||
GLchan rgba[4];
|
||||
|
||||
lambda = _swrast_compute_lambda(texdx[0], texdy[0], /* ds/dx, ds/dy */
|
||||
texdx[1], texdy[1], /* dt/dx, dt/dy */
|
||||
@@ -85,14 +93,20 @@ fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4],
|
||||
1.0F / texcoord[3]) + lodBias;
|
||||
|
||||
lambda = CLAMP(lambda, texObj->MinLod, texObj->MaxLod);
|
||||
}
|
||||
|
||||
swrast->TextureSample[unit](ctx, texObj, 1, (const GLfloat (*)[4]) texcoord,
|
||||
&lambda, &rgba);
|
||||
color[0] = CHAN_TO_FLOAT(rgba[0]);
|
||||
color[1] = CHAN_TO_FLOAT(rgba[1]);
|
||||
color[2] = CHAN_TO_FLOAT(rgba[2]);
|
||||
color[3] = CHAN_TO_FLOAT(rgba[3]);
|
||||
/* XXX use a float-valued TextureSample routine here!!! */
|
||||
swrast->TextureSample[unit](ctx, texObj, 1,
|
||||
(const GLfloat (*)[4]) texcoord,
|
||||
&lambda, &rgba);
|
||||
color[0] = CHAN_TO_FLOAT(rgba[0]);
|
||||
color[1] = CHAN_TO_FLOAT(rgba[1]);
|
||||
color[2] = CHAN_TO_FLOAT(rgba[2]);
|
||||
color[3] = CHAN_TO_FLOAT(rgba[3]);
|
||||
}
|
||||
else {
|
||||
color[0] = color[1] = color[2] = 0.0F;
|
||||
color[3] = 1.0F;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+6
-6
@@ -442,11 +442,10 @@ _swrast_span_interpolate_z( const GLcontext *ctx, SWspan *span )
|
||||
* Compute mipmap LOD from partial derivatives.
|
||||
* This the ideal solution, as given in the OpenGL spec.
|
||||
*/
|
||||
#if 0
|
||||
static GLfloat
|
||||
compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
|
||||
GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH,
|
||||
GLfloat s, GLfloat t, GLfloat q, GLfloat invQ)
|
||||
GLfloat
|
||||
_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
|
||||
GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH,
|
||||
GLfloat s, GLfloat t, GLfloat q, GLfloat invQ)
|
||||
{
|
||||
GLfloat dudx = texW * ((s + dsdx) / (q + dqdx) - s * invQ);
|
||||
GLfloat dvdx = texH * ((t + dtdx) / (q + dqdx) - t * invQ);
|
||||
@@ -458,13 +457,13 @@ compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
|
||||
GLfloat lambda = LOG2(rho);
|
||||
return lambda;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Compute mipmap LOD from partial derivatives.
|
||||
* This is a faster approximation than above function.
|
||||
*/
|
||||
#if 0
|
||||
GLfloat
|
||||
_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
|
||||
GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH,
|
||||
@@ -485,6 +484,7 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
|
||||
lambda = LOG2(rho);
|
||||
return lambda;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+4
-2
@@ -997,10 +997,12 @@ stencil_and_ztest_pixels( GLcontext *ctx, SWspan *span, GLuint face )
|
||||
GLboolean
|
||||
_swrast_stencil_and_ztest_span(GLcontext *ctx, SWspan *span)
|
||||
{
|
||||
const GLuint face = (span->facing == 0) ? 0 : ctx->Stencil._BackFace;
|
||||
|
||||
if (span->arrayMask & SPAN_XY)
|
||||
return stencil_and_ztest_pixels(ctx, span, span->facing);
|
||||
return stencil_and_ztest_pixels(ctx, span, face);
|
||||
else
|
||||
return stencil_and_ztest_span(ctx, span, span->facing);
|
||||
return stencil_and_ztest_span(ctx, span, face);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+13
-8
@@ -131,7 +131,8 @@ _swrast_culltriangle( GLcontext *ctx,
|
||||
|
||||
#define SETUP_CODE \
|
||||
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; \
|
||||
struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \
|
||||
struct gl_texture_object *obj = \
|
||||
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
|
||||
const GLint b = obj->BaseLevel; \
|
||||
const GLfloat twidth = (GLfloat) obj->Image[0][b]->Width; \
|
||||
const GLfloat theight = (GLfloat) obj->Image[0][b]->Height; \
|
||||
@@ -182,7 +183,8 @@ _swrast_culltriangle( GLcontext *ctx,
|
||||
|
||||
#define SETUP_CODE \
|
||||
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; \
|
||||
struct gl_texture_object *obj = ctx->Texture.Unit[0].Current2D; \
|
||||
struct gl_texture_object *obj = \
|
||||
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
|
||||
const GLint b = obj->BaseLevel; \
|
||||
const GLfloat twidth = (GLfloat) obj->Image[0][b]->Width; \
|
||||
const GLfloat theight = (GLfloat) obj->Image[0][b]->Height; \
|
||||
@@ -265,9 +267,6 @@ affine_span(GLcontext *ctx, SWspan *span,
|
||||
GLchan sample[4]; /* the filtered texture sample */
|
||||
const GLuint texEnableSave = ctx->Texture._EnabledUnits;
|
||||
|
||||
/* Disable tex units so they're not re-applied in swrast_write_rgba_span */
|
||||
ctx->Texture._EnabledUnits = 0x0;
|
||||
|
||||
/* Instead of defining a function for each mode, a test is done
|
||||
* between the outer and inner loops. This is to reduce code size
|
||||
* and complexity. Observe that an optimizing compiler kills
|
||||
@@ -396,6 +395,9 @@ affine_span(GLcontext *ctx, SWspan *span,
|
||||
GLuint i;
|
||||
GLchan *dest = span->array->rgba[0];
|
||||
|
||||
/* Disable tex units so they're not re-applied in swrast_write_rgba_span */
|
||||
ctx->Texture._EnabledUnits = 0x0;
|
||||
|
||||
span->intTex[0] -= FIXED_HALF;
|
||||
span->intTex[1] -= FIXED_HALF;
|
||||
switch (info->filter) {
|
||||
@@ -523,7 +525,8 @@ affine_span(GLcontext *ctx, SWspan *span,
|
||||
#define SETUP_CODE \
|
||||
struct affine_info info; \
|
||||
struct gl_texture_unit *unit = ctx->Texture.Unit+0; \
|
||||
struct gl_texture_object *obj = unit->Current2D; \
|
||||
struct gl_texture_object *obj = \
|
||||
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
|
||||
const GLint b = obj->BaseLevel; \
|
||||
const GLfloat twidth = (GLfloat) obj->Image[0][b]->Width; \
|
||||
const GLfloat theight = (GLfloat) obj->Image[0][b]->Height; \
|
||||
@@ -793,7 +796,8 @@ fast_persp_span(GLcontext *ctx, SWspan *span,
|
||||
#define SETUP_CODE \
|
||||
struct persp_info info; \
|
||||
const struct gl_texture_unit *unit = ctx->Texture.Unit+0; \
|
||||
const struct gl_texture_object *obj = unit->Current2D; \
|
||||
struct gl_texture_object *obj = \
|
||||
ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; \
|
||||
const GLint b = obj->BaseLevel; \
|
||||
info.texture = (const GLchan *) obj->Image[0][b]->Data; \
|
||||
info.twidth_log2 = obj->Image[0][b]->WidthLog2; \
|
||||
@@ -1049,7 +1053,8 @@ _swrast_choose_triangle( GLcontext *ctx )
|
||||
const struct gl_texture_image *texImg;
|
||||
GLenum minFilter, magFilter, envMode;
|
||||
GLint format;
|
||||
texObj2D = ctx->Texture.Unit[0].Current2D;
|
||||
texObj2D = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX];
|
||||
|
||||
texImg = texObj2D ? texObj2D->Image[0][texObj2D->BaseLevel] : NULL;
|
||||
format = texImg ? texImg->TexFormat->MesaFormat : -1;
|
||||
minFilter = texObj2D ? texObj2D->MinFilter : (GLenum) 0;
|
||||
|
||||
+10
-6
@@ -109,24 +109,28 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
|
||||
|
||||
tnl->pipeline.new_state |= new_state;
|
||||
|
||||
/* Calculate tnl->render_inputs:
|
||||
/* Calculate tnl->render_inputs. This bitmask indicates which vertex
|
||||
* attributes need to be emitted to the rasterizer.
|
||||
*/
|
||||
if (ctx->Visual.rgbMode) {
|
||||
GLuint i;
|
||||
|
||||
RENDERINPUTS_ZERO( tnl->render_inputs_bitset );
|
||||
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS );
|
||||
|
||||
if (!fp || (fp->Base.InputsRead & FRAG_BIT_COL0)) {
|
||||
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR0 );
|
||||
}
|
||||
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
|
||||
if (ctx->Texture._EnabledCoordUnits & (1 << i)) {
|
||||
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) );
|
||||
}
|
||||
}
|
||||
|
||||
if (NEED_SECONDARY_COLOR(ctx))
|
||||
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_COLOR1 );
|
||||
|
||||
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
|
||||
if (ctx->Texture._EnabledCoordUnits & (1 << i) ||
|
||||
(fp && fp->Base.InputsRead & FRAG_BIT_TEX(i))) {
|
||||
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_TEX(i) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POS );
|
||||
|
||||
+4
-1
@@ -148,11 +148,14 @@ static void vbo_exec_copy_to_current( struct vbo_exec_context *exec )
|
||||
/* Note: the exec->vtx.current[i] pointers point into the
|
||||
* ctx->Current.Attrib and ctx->Light.Material.Attrib arrays.
|
||||
*/
|
||||
if (exec->vtx.attrptr[i]) {
|
||||
|
||||
COPY_CLEAN_4V(current,
|
||||
exec->vtx.attrsz[i],
|
||||
exec->vtx.attrptr[i]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Given that we explicitly state size here, there is no need
|
||||
* for the COPY_CLEAN above, could just copy 16 bytes and be
|
||||
* done. The only problem is when Mesa accesses ctx->Current
|
||||
|
||||
@@ -175,7 +175,20 @@ static void vbo_exec_bind_arrays( GLcontext *ctx )
|
||||
exec->vtx.inputs[attr + 16] = &vbo->generic_currval[attr];
|
||||
}
|
||||
map = vbo->map_vp_arb;
|
||||
|
||||
/* check if VERT_ATTRIB_POS is not read but VERT_BIT_GENERIC0 is read.
|
||||
* In that case we effectively need to route the data from
|
||||
* glVertexAttrib(0, val) calls to feed into the GENERIC0 input.
|
||||
*/
|
||||
if ((ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_POS) == 0 &&
|
||||
(ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_GENERIC0)) {
|
||||
exec->vtx.inputs[16] = exec->vtx.inputs[0];
|
||||
exec->vtx.attrsz[16] = exec->vtx.attrsz[0];
|
||||
exec->vtx.attrsz[0] = 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
||||
/* Make all active attributes (including edgeflag) available as
|
||||
|
||||
+17
-1
@@ -110,6 +110,9 @@ static void vbo_bind_vertex_list( GLcontext *ctx,
|
||||
GLuint data = node->buffer_offset;
|
||||
const GLuint *map;
|
||||
GLuint attr;
|
||||
GLubyte node_attrsz[VBO_ATTRIB_MAX]; /* copy of node->attrsz[] */
|
||||
|
||||
memcpy(node_attrsz, node->attrsz, sizeof(node->attrsz));
|
||||
|
||||
/* Install the default (ie Current) attributes first, then overlay
|
||||
* all active ones.
|
||||
@@ -135,13 +138,26 @@ static void vbo_bind_vertex_list( GLcontext *ctx,
|
||||
save->inputs[attr + 16] = &vbo->generic_currval[attr];
|
||||
}
|
||||
map = vbo->map_vp_arb;
|
||||
|
||||
/* check if VERT_ATTRIB_POS is not read but VERT_BIT_GENERIC0 is read.
|
||||
* In that case we effectively need to route the data from
|
||||
* glVertexAttrib(0, val) calls to feed into the GENERIC0 input.
|
||||
*/
|
||||
if ((ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_POS) == 0 &&
|
||||
(ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_GENERIC0)) {
|
||||
save->inputs[16] = save->inputs[0];
|
||||
node_attrsz[16] = node_attrsz[0];
|
||||
node_attrsz[0] = 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
||||
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
|
||||
GLuint src = map[attr];
|
||||
|
||||
if (node->attrsz[src]) {
|
||||
if (node_attrsz[src]) {
|
||||
/* override the default array set above */
|
||||
save->inputs[attr] = &arrays[attr];
|
||||
|
||||
|
||||
+2
-2
@@ -61,7 +61,7 @@ do { \
|
||||
printf( "\n" ); \
|
||||
} while (0)
|
||||
|
||||
#if defined(__BEOS__) || defined(_LP64)
|
||||
#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64)
|
||||
#define OFFSET( s, t, m ) \
|
||||
printf( "#define %s\t%ld\n", s, offsetof( t, m ) );
|
||||
#else
|
||||
@@ -69,7 +69,7 @@ do { \
|
||||
printf( "#define %s\t%d\n", s, offsetof( t, m ) );
|
||||
#endif
|
||||
|
||||
#if defined(__BEOS__) || defined(_LP64)
|
||||
#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64)
|
||||
#define SIZEOF( s, t ) \
|
||||
printf( "#define %s\t%ld\n", s, sizeof(t) );
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user