Merge remote branch 'origin/master' into pipe-video
This commit is contained in:
commit
e179a8bf34
|
@ -71,7 +71,7 @@ GL 3.3:
|
|||
GLSL 3.30 not started
|
||||
GL_ARB_blend_func_extended not started
|
||||
GL_ARB_explicit_attrib_location DONE (swrast, i915, i965)
|
||||
GL_ARB_occlusion_query2 not started
|
||||
GL_ARB_occlusion_query2 DONE (swrast, gallium)
|
||||
GL_ARB_sampler_objects not started
|
||||
GL_ARB_texture_rgb10_a2ui not started
|
||||
GL_ARB_texture_swizzle DONE (same as EXT version)
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#define glAccum MANGLE(Accum)
|
||||
#define glActiveProgramEXT MANGLE(ActiveProgramEXT)
|
||||
#define glActiveShaderProgram MANGLE(ActiveShaderProgram)
|
||||
#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
|
||||
#define glActiveTextureARB MANGLE(ActiveTextureARB)
|
||||
#define glActiveTexture MANGLE(ActiveTexture)
|
||||
|
@ -56,6 +57,7 @@
|
|||
#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
|
||||
#define glBeginPerfMonitorAMD MANGLE(BeginPerfMonitorAMD)
|
||||
#define glBeginQueryARB MANGLE(BeginQueryARB)
|
||||
#define glBeginQueryIndexed MANGLE(BeginQueryIndexed)
|
||||
#define glBeginQuery MANGLE(BeginQuery)
|
||||
#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT)
|
||||
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
|
||||
|
@ -75,22 +77,27 @@
|
|||
#define glBindBufferRange MANGLE(BindBufferRange)
|
||||
#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
|
||||
#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
|
||||
#define glBindFragDataLocationIndexed MANGLE(BindFragDataLocationIndexed)
|
||||
#define glBindFragDataLocation MANGLE(BindFragDataLocation)
|
||||
#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
|
||||
#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
|
||||
#define glBindFramebuffer MANGLE(BindFramebuffer)
|
||||
#define glBindImageTextureEXT MANGLE(BindImageTextureEXT)
|
||||
#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 glBindProgramPipeline MANGLE(BindProgramPipeline)
|
||||
#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT)
|
||||
#define glBindRenderbuffer MANGLE(BindRenderbuffer)
|
||||
#define glBindSampler MANGLE(BindSampler)
|
||||
#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT)
|
||||
#define glBindTextureEXT MANGLE(BindTextureEXT)
|
||||
#define glBindTexture MANGLE(BindTexture)
|
||||
#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT)
|
||||
#define glBindTransformFeedback MANGLE(BindTransformFeedback)
|
||||
#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV)
|
||||
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
|
||||
#define glBindVertexArray MANGLE(BindVertexArray)
|
||||
|
@ -112,18 +119,22 @@
|
|||
#define glBlendColorEXT MANGLE(BlendColorEXT)
|
||||
#define glBlendColor MANGLE(BlendColor)
|
||||
#define glBlendEquationEXT MANGLE(BlendEquationEXT)
|
||||
#define glBlendEquationiARB MANGLE(BlendEquationiARB)
|
||||
#define glBlendEquationi MANGLE(BlendEquationi)
|
||||
#define glBlendEquationIndexedAMD MANGLE(BlendEquationIndexedAMD)
|
||||
#define glBlendEquation MANGLE(BlendEquation)
|
||||
#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI)
|
||||
#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT)
|
||||
#define glBlendEquationSeparateiARB MANGLE(BlendEquationSeparateiARB)
|
||||
#define glBlendEquationSeparatei MANGLE(BlendEquationSeparatei)
|
||||
#define glBlendEquationSeparateIndexedAMD MANGLE(BlendEquationSeparateIndexedAMD)
|
||||
#define glBlendEquationSeparate MANGLE(BlendEquationSeparate)
|
||||
#define glBlendFunciARB MANGLE(BlendFunciARB)
|
||||
#define glBlendFunci MANGLE(BlendFunci)
|
||||
#define glBlendFuncIndexedAMD MANGLE(BlendFuncIndexedAMD)
|
||||
#define glBlendFunc MANGLE(BlendFunc)
|
||||
#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
|
||||
#define glBlendFuncSeparateiARB MANGLE(BlendFuncSeparateiARB)
|
||||
#define glBlendFuncSeparatei MANGLE(BlendFuncSeparatei)
|
||||
#define glBlendFuncSeparateIndexedAMD MANGLE(BlendFuncSeparateIndexedAMD)
|
||||
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
|
||||
|
@ -153,6 +164,7 @@
|
|||
#define glClearColor MANGLE(ClearColor)
|
||||
#define glClearDebugLogMESA MANGLE(ClearDebugLogMESA)
|
||||
#define glClearDepthdNV MANGLE(ClearDepthdNV)
|
||||
#define glClearDepthf MANGLE(ClearDepthf)
|
||||
#define glClearDepth MANGLE(ClearDepth)
|
||||
#define glClearIndex MANGLE(ClearIndex)
|
||||
#define glClear MANGLE(Clear)
|
||||
|
@ -215,6 +227,10 @@
|
|||
#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT)
|
||||
#define glColorMask MANGLE(ColorMask)
|
||||
#define glColorMaterial MANGLE(ColorMaterial)
|
||||
#define glColorP3ui MANGLE(ColorP3ui)
|
||||
#define glColorP3uiv MANGLE(ColorP3uiv)
|
||||
#define glColorP4ui MANGLE(ColorP4ui)
|
||||
#define glColorP4uiv MANGLE(ColorP4uiv)
|
||||
#define glColorPointerEXT MANGLE(ColorPointerEXT)
|
||||
#define glColorPointerListIBM MANGLE(ColorPointerListIBM)
|
||||
#define glColorPointer MANGLE(ColorPointer)
|
||||
|
@ -236,6 +252,7 @@
|
|||
#define glCombinerParameterivNV MANGLE(CombinerParameterivNV)
|
||||
#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV)
|
||||
#define glCompileShaderARB MANGLE(CompileShaderARB)
|
||||
#define glCompileShaderIncludeARB MANGLE(CompileShaderIncludeARB)
|
||||
#define glCompileShader MANGLE(CompileShader)
|
||||
#define glCompressedMultiTexImage1DEXT MANGLE(CompressedMultiTexImage1DEXT)
|
||||
#define glCompressedMultiTexImage2DEXT MANGLE(CompressedMultiTexImage2DEXT)
|
||||
|
@ -310,10 +327,18 @@
|
|||
#define glCreateShader MANGLE(CreateShader)
|
||||
#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB)
|
||||
#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT)
|
||||
#define glCreateShaderProgramv MANGLE(CreateShaderProgramv)
|
||||
#define glCreateSyncFromCLeventARB MANGLE(CreateSyncFromCLeventARB)
|
||||
#define glCullFace MANGLE(CullFace)
|
||||
#define glCullParameterdvEXT MANGLE(CullParameterdvEXT)
|
||||
#define glCullParameterfvEXT MANGLE(CullParameterfvEXT)
|
||||
#define glCurrentPaletteMatrixARB MANGLE(CurrentPaletteMatrixARB)
|
||||
#define glDebugMessageCallbackAMD MANGLE(DebugMessageCallbackAMD)
|
||||
#define glDebugMessageCallbackARB MANGLE(DebugMessageCallbackARB)
|
||||
#define glDebugMessageControlARB MANGLE(DebugMessageControlARB)
|
||||
#define glDebugMessageEnableAMD MANGLE(DebugMessageEnableAMD)
|
||||
#define glDebugMessageInsertAMD MANGLE(DebugMessageInsertAMD)
|
||||
#define glDebugMessageInsertARB MANGLE(DebugMessageInsertARB)
|
||||
#define glDeformationMap3dSGIX MANGLE(DeformationMap3dSGIX)
|
||||
#define glDeformationMap3fSGIX MANGLE(DeformationMap3fSGIX)
|
||||
#define glDeformSGIX MANGLE(DeformSGIX)
|
||||
|
@ -326,20 +351,25 @@
|
|||
#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT)
|
||||
#define glDeleteFramebuffers MANGLE(DeleteFramebuffers)
|
||||
#define glDeleteLists MANGLE(DeleteLists)
|
||||
#define glDeleteNamedStringARB MANGLE(DeleteNamedStringARB)
|
||||
#define glDeleteNamesAMD MANGLE(DeleteNamesAMD)
|
||||
#define glDeleteObjectARB MANGLE(DeleteObjectARB)
|
||||
#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV)
|
||||
#define glDeletePerfMonitorsAMD MANGLE(DeletePerfMonitorsAMD)
|
||||
#define glDeleteProgram MANGLE(DeleteProgram)
|
||||
#define glDeleteProgramPipelines MANGLE(DeleteProgramPipelines)
|
||||
#define glDeleteProgramsARB MANGLE(DeleteProgramsARB)
|
||||
#define glDeleteProgramsNV MANGLE(DeleteProgramsNV)
|
||||
#define glDeleteQueriesARB MANGLE(DeleteQueriesARB)
|
||||
#define glDeleteQueries MANGLE(DeleteQueries)
|
||||
#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
|
||||
#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
|
||||
#define glDeleteSamplers MANGLE(DeleteSamplers)
|
||||
#define glDeleteShader MANGLE(DeleteShader)
|
||||
#define glDeleteSync MANGLE(DeleteSync)
|
||||
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
|
||||
#define glDeleteTextures MANGLE(DeleteTextures)
|
||||
#define glDeleteTransformFeedbacks MANGLE(DeleteTransformFeedbacks)
|
||||
#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
|
||||
#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
|
||||
#define glDeleteVertexArrays MANGLE(DeleteVertexArrays)
|
||||
|
@ -348,7 +378,10 @@
|
|||
#define glDepthBoundsEXT MANGLE(DepthBoundsEXT)
|
||||
#define glDepthFunc MANGLE(DepthFunc)
|
||||
#define glDepthMask MANGLE(DepthMask)
|
||||
#define glDepthRangeArrayv MANGLE(DepthRangeArrayv)
|
||||
#define glDepthRangedNV MANGLE(DepthRangedNV)
|
||||
#define glDepthRangef MANGLE(DepthRangef)
|
||||
#define glDepthRangeIndexed MANGLE(DepthRangeIndexed)
|
||||
#define glDepthRange MANGLE(DepthRange)
|
||||
#define glDetachObjectARB MANGLE(DetachObjectARB)
|
||||
#define glDetachShader MANGLE(DetachShader)
|
||||
|
@ -363,6 +396,7 @@
|
|||
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
|
||||
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
|
||||
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
|
||||
#define glDrawArraysIndirect MANGLE(DrawArraysIndirect)
|
||||
#define glDrawArraysInstancedARB MANGLE(DrawArraysInstancedARB)
|
||||
#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT)
|
||||
#define glDrawArraysInstanced MANGLE(DrawArraysInstanced)
|
||||
|
@ -374,6 +408,7 @@
|
|||
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
|
||||
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
|
||||
#define glDrawElementsBaseVertex MANGLE(DrawElementsBaseVertex)
|
||||
#define glDrawElementsIndirect MANGLE(DrawElementsIndirect)
|
||||
#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
|
||||
#define glDrawElementsInstancedBaseVertex MANGLE(DrawElementsInstancedBaseVertex)
|
||||
#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
|
||||
|
@ -386,7 +421,9 @@
|
|||
#define glDrawRangeElementsBaseVertex MANGLE(DrawRangeElementsBaseVertex)
|
||||
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
|
||||
#define glDrawRangeElements MANGLE(DrawRangeElements)
|
||||
#define glDrawTransformFeedback MANGLE(DrawTransformFeedback)
|
||||
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
|
||||
#define glDrawTransformFeedbackStream MANGLE(DrawTransformFeedbackStream)
|
||||
#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV)
|
||||
#define glEdgeFlag MANGLE(EdgeFlag)
|
||||
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
|
||||
|
@ -414,6 +451,7 @@
|
|||
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
|
||||
#define glEndPerfMonitorAMD MANGLE(EndPerfMonitorAMD)
|
||||
#define glEndQueryARB MANGLE(EndQueryARB)
|
||||
#define glEndQueryIndexed MANGLE(EndQueryIndexed)
|
||||
#define glEndQuery MANGLE(EndQuery)
|
||||
#define glEndTransformFeedbackEXT MANGLE(EndTransformFeedbackEXT)
|
||||
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
|
||||
|
@ -447,6 +485,7 @@
|
|||
#define glFlush MANGLE(Flush)
|
||||
#define glFlushMappedBufferRangeAPPLE MANGLE(FlushMappedBufferRangeAPPLE)
|
||||
#define glFlushMappedBufferRange MANGLE(FlushMappedBufferRange)
|
||||
#define glFlushMappedNamedBufferRangeEXT MANGLE(FlushMappedNamedBufferRangeEXT)
|
||||
#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV)
|
||||
#define glFlushRasterSGIX MANGLE(FlushRasterSGIX)
|
||||
#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE)
|
||||
|
@ -498,7 +537,6 @@
|
|||
#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
|
||||
#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
|
||||
#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
|
||||
#define glFramebufferTextureFace MANGLE(FramebufferTextureFace)
|
||||
#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
|
||||
#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
|
||||
#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
|
||||
|
@ -521,23 +559,30 @@
|
|||
#define glGenFramebuffersEXT MANGLE(GenFramebuffersEXT)
|
||||
#define glGenFramebuffers MANGLE(GenFramebuffers)
|
||||
#define glGenLists MANGLE(GenLists)
|
||||
#define glGenNamesAMD MANGLE(GenNamesAMD)
|
||||
#define glGenOcclusionQueriesNV MANGLE(GenOcclusionQueriesNV)
|
||||
#define glGenPerfMonitorsAMD MANGLE(GenPerfMonitorsAMD)
|
||||
#define glGenProgramPipelines MANGLE(GenProgramPipelines)
|
||||
#define glGenProgramsARB MANGLE(GenProgramsARB)
|
||||
#define glGenProgramsNV MANGLE(GenProgramsNV)
|
||||
#define glGenQueriesARB MANGLE(GenQueriesARB)
|
||||
#define glGenQueries MANGLE(GenQueries)
|
||||
#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT)
|
||||
#define glGenRenderbuffers MANGLE(GenRenderbuffers)
|
||||
#define glGenSamplers MANGLE(GenSamplers)
|
||||
#define glGenSymbolsEXT MANGLE(GenSymbolsEXT)
|
||||
#define glGenTexturesEXT MANGLE(GenTexturesEXT)
|
||||
#define glGenTextures MANGLE(GenTextures)
|
||||
#define glGenTransformFeedbacks MANGLE(GenTransformFeedbacks)
|
||||
#define glGenTransformFeedbacksNV MANGLE(GenTransformFeedbacksNV)
|
||||
#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE)
|
||||
#define glGenVertexArrays MANGLE(GenVertexArrays)
|
||||
#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT)
|
||||
#define glGetActiveAttribARB MANGLE(GetActiveAttribARB)
|
||||
#define glGetActiveAttrib MANGLE(GetActiveAttrib)
|
||||
#define glGetActiveSubroutineName MANGLE(GetActiveSubroutineName)
|
||||
#define glGetActiveSubroutineUniformiv MANGLE(GetActiveSubroutineUniformiv)
|
||||
#define glGetActiveSubroutineUniformName MANGLE(GetActiveSubroutineUniformName)
|
||||
#define glGetActiveUniformARB MANGLE(GetActiveUniformARB)
|
||||
#define glGetActiveUniformBlockiv MANGLE(GetActiveUniformBlockiv)
|
||||
#define glGetActiveUniformBlockName MANGLE(GetActiveUniformBlockName)
|
||||
|
@ -589,16 +634,21 @@
|
|||
#define glGetConvolutionParameteriv MANGLE(GetConvolutionParameteriv)
|
||||
#define glGetDebugLogLengthMESA MANGLE(GetDebugLogLengthMESA)
|
||||
#define glGetDebugLogMESA MANGLE(GetDebugLogMESA)
|
||||
#define glGetDebugMessageLogAMD MANGLE(GetDebugMessageLogAMD)
|
||||
#define glGetDebugMessageLogARB MANGLE(GetDebugMessageLogARB)
|
||||
#define glGetDetailTexFuncSGIS MANGLE(GetDetailTexFuncSGIS)
|
||||
#define glGetDoubleIndexedvEXT MANGLE(GetDoubleIndexedvEXT)
|
||||
#define glGetDoublei_v MANGLE(GetDoublei_v)
|
||||
#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 glGetFloati_v MANGLE(GetFloati_v)
|
||||
#define glGetFloatv MANGLE(GetFloatv)
|
||||
#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS)
|
||||
#define glGetFragDataIndex MANGLE(GetFragDataIndex)
|
||||
#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT)
|
||||
#define glGetFragDataLocation MANGLE(GetFragDataLocation)
|
||||
#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX)
|
||||
|
@ -608,6 +658,7 @@
|
|||
#define glGetFramebufferAttachmentParameterivEXT MANGLE(GetFramebufferAttachmentParameterivEXT)
|
||||
#define glGetFramebufferAttachmentParameteriv MANGLE(GetFramebufferAttachmentParameteriv)
|
||||
#define glGetFramebufferParameterivEXT MANGLE(GetFramebufferParameterivEXT)
|
||||
#define glGetGraphicsResetStatusARB MANGLE(GetGraphicsResetStatusARB)
|
||||
#define glGetHandleARB MANGLE(GetHandleARB)
|
||||
#define glGetHistogramEXT MANGLE(GetHistogramEXT)
|
||||
#define glGetHistogram MANGLE(GetHistogram)
|
||||
|
@ -678,6 +729,26 @@
|
|||
#define glGetNamedProgramLocalParameterIuivEXT MANGLE(GetNamedProgramLocalParameterIuivEXT)
|
||||
#define glGetNamedProgramStringEXT MANGLE(GetNamedProgramStringEXT)
|
||||
#define glGetNamedRenderbufferParameterivEXT MANGLE(GetNamedRenderbufferParameterivEXT)
|
||||
#define glGetNamedStringARB MANGLE(GetNamedStringARB)
|
||||
#define glGetNamedStringivARB MANGLE(GetNamedStringivARB)
|
||||
#define glGetnColorTableARB MANGLE(GetnColorTableARB)
|
||||
#define glGetnCompressedTexImageARB MANGLE(GetnCompressedTexImageARB)
|
||||
#define glGetnConvolutionFilterARB MANGLE(GetnConvolutionFilterARB)
|
||||
#define glGetnHistogramARB MANGLE(GetnHistogramARB)
|
||||
#define glGetnMapdvARB MANGLE(GetnMapdvARB)
|
||||
#define glGetnMapfvARB MANGLE(GetnMapfvARB)
|
||||
#define glGetnMapivARB MANGLE(GetnMapivARB)
|
||||
#define glGetnMinmaxARB MANGLE(GetnMinmaxARB)
|
||||
#define glGetnPixelMapfvARB MANGLE(GetnPixelMapfvARB)
|
||||
#define glGetnPixelMapuivARB MANGLE(GetnPixelMapuivARB)
|
||||
#define glGetnPixelMapusvARB MANGLE(GetnPixelMapusvARB)
|
||||
#define glGetnPolygonStippleARB MANGLE(GetnPolygonStippleARB)
|
||||
#define glGetnSeparableFilterARB MANGLE(GetnSeparableFilterARB)
|
||||
#define glGetnTexImageARB MANGLE(GetnTexImageARB)
|
||||
#define glGetnUniformdvARB MANGLE(GetnUniformdvARB)
|
||||
#define glGetnUniformfvARB MANGLE(GetnUniformfvARB)
|
||||
#define glGetnUniformivARB MANGLE(GetnUniformivARB)
|
||||
#define glGetnUniformuivARB MANGLE(GetnUniformuivARB)
|
||||
#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
|
||||
#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
|
||||
#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
|
||||
|
@ -700,6 +771,7 @@
|
|||
#define glGetPointervEXT MANGLE(GetPointervEXT)
|
||||
#define glGetPointerv MANGLE(GetPointerv)
|
||||
#define glGetPolygonStipple MANGLE(GetPolygonStipple)
|
||||
#define glGetProgramBinary MANGLE(GetProgramBinary)
|
||||
#define glGetProgramEnvParameterdvARB MANGLE(GetProgramEnvParameterdvARB)
|
||||
#define glGetProgramEnvParameterfvARB MANGLE(GetProgramEnvParameterfvARB)
|
||||
#define glGetProgramEnvParameterIivNV MANGLE(GetProgramEnvParameterIivNV)
|
||||
|
@ -716,28 +788,42 @@
|
|||
#define glGetProgramNamedParameterfvNV MANGLE(GetProgramNamedParameterfvNV)
|
||||
#define glGetProgramParameterdvNV MANGLE(GetProgramParameterdvNV)
|
||||
#define glGetProgramParameterfvNV MANGLE(GetProgramParameterfvNV)
|
||||
#define glGetProgramPipelineInfoLog MANGLE(GetProgramPipelineInfoLog)
|
||||
#define glGetProgramPipelineiv MANGLE(GetProgramPipelineiv)
|
||||
#define glGetProgramRegisterfvMESA MANGLE(GetProgramRegisterfvMESA)
|
||||
#define glGetProgramStageiv MANGLE(GetProgramStageiv)
|
||||
#define glGetProgramStringARB MANGLE(GetProgramStringARB)
|
||||
#define glGetProgramStringNV MANGLE(GetProgramStringNV)
|
||||
#define glGetProgramSubroutineParameteruivNV MANGLE(GetProgramSubroutineParameteruivNV)
|
||||
#define glGetQueryIndexediv MANGLE(GetQueryIndexediv)
|
||||
#define glGetQueryivARB MANGLE(GetQueryivARB)
|
||||
#define glGetQueryiv MANGLE(GetQueryiv)
|
||||
#define glGetQueryObjecti64vEXT MANGLE(GetQueryObjecti64vEXT)
|
||||
#define glGetQueryObjecti64v MANGLE(GetQueryObjecti64v)
|
||||
#define glGetQueryObjectivARB MANGLE(GetQueryObjectivARB)
|
||||
#define glGetQueryObjectiv MANGLE(GetQueryObjectiv)
|
||||
#define glGetQueryObjectui64vEXT MANGLE(GetQueryObjectui64vEXT)
|
||||
#define glGetQueryObjectui64v MANGLE(GetQueryObjectui64v)
|
||||
#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB)
|
||||
#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv)
|
||||
#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT)
|
||||
#define glGetRenderbufferParameteriv MANGLE(GetRenderbufferParameteriv)
|
||||
#define glGetSamplerParameterfv MANGLE(GetSamplerParameterfv)
|
||||
#define glGetSamplerParameterIiv MANGLE(GetSamplerParameterIiv)
|
||||
#define glGetSamplerParameterIuiv MANGLE(GetSamplerParameterIuiv)
|
||||
#define glGetSamplerParameteriv MANGLE(GetSamplerParameteriv)
|
||||
#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT)
|
||||
#define glGetSeparableFilter MANGLE(GetSeparableFilter)
|
||||
#define glGetShaderInfoLog MANGLE(GetShaderInfoLog)
|
||||
#define glGetShaderiv MANGLE(GetShaderiv)
|
||||
#define glGetShaderPrecisionFormat MANGLE(GetShaderPrecisionFormat)
|
||||
#define glGetShaderSourceARB MANGLE(GetShaderSourceARB)
|
||||
#define glGetShaderSource MANGLE(GetShaderSource)
|
||||
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
|
||||
#define glGetStringi MANGLE(GetStringi)
|
||||
#define glGetString MANGLE(GetString)
|
||||
#define glGetSubroutineIndex MANGLE(GetSubroutineIndex)
|
||||
#define glGetSubroutineUniformLocation MANGLE(GetSubroutineUniformLocation)
|
||||
#define glGetSynciv MANGLE(GetSynciv)
|
||||
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
|
||||
#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
|
||||
|
@ -770,14 +856,17 @@
|
|||
#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV)
|
||||
#define glGetUniformBlockIndex MANGLE(GetUniformBlockIndex)
|
||||
#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT)
|
||||
#define glGetUniformdv MANGLE(GetUniformdv)
|
||||
#define glGetUniformfvARB MANGLE(GetUniformfvARB)
|
||||
#define glGetUniformfv MANGLE(GetUniformfv)
|
||||
#define glGetUniformi64vNV MANGLE(GetUniformi64vNV)
|
||||
#define glGetUniformIndices MANGLE(GetUniformIndices)
|
||||
#define glGetUniformivARB MANGLE(GetUniformivARB)
|
||||
#define glGetUniformiv MANGLE(GetUniformiv)
|
||||
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
|
||||
#define glGetUniformLocation MANGLE(GetUniformLocation)
|
||||
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
|
||||
#define glGetUniformSubroutineuiv MANGLE(GetUniformSubroutineuiv)
|
||||
#define glGetUniformui64vNV MANGLE(GetUniformui64vNV)
|
||||
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
|
||||
#define glGetUniformuiv MANGLE(GetUniformuiv)
|
||||
|
@ -803,6 +892,10 @@
|
|||
#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB)
|
||||
#define glGetVertexAttribiv MANGLE(GetVertexAttribiv)
|
||||
#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV)
|
||||
#define glGetVertexAttribLdvEXT MANGLE(GetVertexAttribLdvEXT)
|
||||
#define glGetVertexAttribLdv MANGLE(GetVertexAttribLdv)
|
||||
#define glGetVertexAttribLi64vNV MANGLE(GetVertexAttribLi64vNV)
|
||||
#define glGetVertexAttribLui64vNV MANGLE(GetVertexAttribLui64vNV)
|
||||
#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB)
|
||||
#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv)
|
||||
#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV)
|
||||
|
@ -864,20 +957,25 @@
|
|||
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
|
||||
#define glIsFramebuffer MANGLE(IsFramebuffer)
|
||||
#define glIsList MANGLE(IsList)
|
||||
#define glIsNameAMD MANGLE(IsNameAMD)
|
||||
#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV)
|
||||
#define glIsNamedStringARB MANGLE(IsNamedStringARB)
|
||||
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
|
||||
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
|
||||
#define glIsProgramARB MANGLE(IsProgramARB)
|
||||
#define glIsProgram MANGLE(IsProgram)
|
||||
#define glIsProgramNV MANGLE(IsProgramNV)
|
||||
#define glIsProgramPipeline MANGLE(IsProgramPipeline)
|
||||
#define glIsQueryARB MANGLE(IsQueryARB)
|
||||
#define glIsQuery MANGLE(IsQuery)
|
||||
#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
|
||||
#define glIsRenderbuffer MANGLE(IsRenderbuffer)
|
||||
#define glIsSampler MANGLE(IsSampler)
|
||||
#define glIsShader MANGLE(IsShader)
|
||||
#define glIsSync MANGLE(IsSync)
|
||||
#define glIsTextureEXT MANGLE(IsTextureEXT)
|
||||
#define glIsTexture MANGLE(IsTexture)
|
||||
#define glIsTransformFeedback MANGLE(IsTransformFeedback)
|
||||
#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
|
||||
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
|
||||
#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
|
||||
|
@ -915,6 +1013,8 @@
|
|||
#define glLogicOp MANGLE(LogicOp)
|
||||
#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV)
|
||||
#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV)
|
||||
#define glMakeNamedBufferNonResidentNV MANGLE(MakeNamedBufferNonResidentNV)
|
||||
#define glMakeNamedBufferResidentNV MANGLE(MakeNamedBufferResidentNV)
|
||||
#define glMap1d MANGLE(Map1d)
|
||||
#define glMap1f MANGLE(Map1f)
|
||||
#define glMap2d MANGLE(Map2d)
|
||||
|
@ -928,6 +1028,7 @@
|
|||
#define glMapGrid2d MANGLE(MapGrid2d)
|
||||
#define glMapGrid2f MANGLE(MapGrid2f)
|
||||
#define glMapNamedBufferEXT MANGLE(MapNamedBufferEXT)
|
||||
#define glMapNamedBufferRangeEXT MANGLE(MapNamedBufferRangeEXT)
|
||||
#define glMapObjectBufferATI MANGLE(MapObjectBufferATI)
|
||||
#define glMapParameterfvNV MANGLE(MapParameterfvNV)
|
||||
#define glMapParameterivNV MANGLE(MapParameterivNV)
|
||||
|
@ -963,8 +1064,10 @@
|
|||
#define glMatrixScalefEXT MANGLE(MatrixScalefEXT)
|
||||
#define glMatrixTranslatedEXT MANGLE(MatrixTranslatedEXT)
|
||||
#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT)
|
||||
#define glMemoryBarrierEXT MANGLE(MemoryBarrierEXT)
|
||||
#define glMinmaxEXT MANGLE(MinmaxEXT)
|
||||
#define glMinmax MANGLE(Minmax)
|
||||
#define glMinSampleShadingARB MANGLE(MinSampleShadingARB)
|
||||
#define glMinSampleShading MANGLE(MinSampleShading)
|
||||
#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT)
|
||||
#define glMultiDrawArrays MANGLE(MultiDrawArrays)
|
||||
|
@ -1048,6 +1151,14 @@
|
|||
#define glMultiTexCoord4s MANGLE(MultiTexCoord4s)
|
||||
#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB)
|
||||
#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv)
|
||||
#define glMultiTexCoordP1ui MANGLE(MultiTexCoordP1ui)
|
||||
#define glMultiTexCoordP1uiv MANGLE(MultiTexCoordP1uiv)
|
||||
#define glMultiTexCoordP2ui MANGLE(MultiTexCoordP2ui)
|
||||
#define glMultiTexCoordP2uiv MANGLE(MultiTexCoordP2uiv)
|
||||
#define glMultiTexCoordP3ui MANGLE(MultiTexCoordP3ui)
|
||||
#define glMultiTexCoordP3uiv MANGLE(MultiTexCoordP3uiv)
|
||||
#define glMultiTexCoordP4ui MANGLE(MultiTexCoordP4ui)
|
||||
#define glMultiTexCoordP4uiv MANGLE(MultiTexCoordP4uiv)
|
||||
#define glMultiTexCoordPointerEXT MANGLE(MultiTexCoordPointerEXT)
|
||||
#define glMultiTexEnvfEXT MANGLE(MultiTexEnvfEXT)
|
||||
#define glMultiTexEnvfvEXT MANGLE(MultiTexEnvfvEXT)
|
||||
|
@ -1080,6 +1191,7 @@
|
|||
#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf)
|
||||
#define glNamedBufferDataEXT MANGLE(NamedBufferDataEXT)
|
||||
#define glNamedBufferSubDataEXT MANGLE(NamedBufferSubDataEXT)
|
||||
#define glNamedCopyBufferSubDataEXT MANGLE(NamedCopyBufferSubDataEXT)
|
||||
#define glNamedFramebufferRenderbufferEXT MANGLE(NamedFramebufferRenderbufferEXT)
|
||||
#define glNamedFramebufferTexture1DEXT MANGLE(NamedFramebufferTexture1DEXT)
|
||||
#define glNamedFramebufferTexture2DEXT MANGLE(NamedFramebufferTexture2DEXT)
|
||||
|
@ -1087,8 +1199,6 @@
|
|||
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
|
||||
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
|
||||
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
|
||||
#define glNamedMakeBufferNonResidentNV MANGLE(NamedMakeBufferNonResidentNV)
|
||||
#define glNamedMakeBufferResidentNV MANGLE(NamedMakeBufferResidentNV)
|
||||
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
|
||||
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
|
||||
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
|
||||
|
@ -1104,6 +1214,7 @@
|
|||
#define glNamedRenderbufferStorageEXT MANGLE(NamedRenderbufferStorageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleCoverageEXT MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleEXT MANGLE(NamedRenderbufferStorageMultisampleEXT)
|
||||
#define glNamedStringARB MANGLE(NamedStringARB)
|
||||
#define glNewList MANGLE(NewList)
|
||||
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
|
||||
#define glNormal3b MANGLE(Normal3b)
|
||||
|
@ -1121,6 +1232,8 @@
|
|||
#define glNormal3s MANGLE(Normal3s)
|
||||
#define glNormal3sv MANGLE(Normal3sv)
|
||||
#define glNormalFormatNV MANGLE(NormalFormatNV)
|
||||
#define glNormalP3ui MANGLE(NormalP3ui)
|
||||
#define glNormalP3uiv MANGLE(NormalP3uiv)
|
||||
#define glNormalPointerEXT MANGLE(NormalPointerEXT)
|
||||
#define glNormalPointerListIBM MANGLE(NormalPointerListIBM)
|
||||
#define glNormalPointer MANGLE(NormalPointer)
|
||||
|
@ -1140,6 +1253,9 @@
|
|||
#define glOrtho MANGLE(Ortho)
|
||||
#define glPassTexCoordATI MANGLE(PassTexCoordATI)
|
||||
#define glPassThrough MANGLE(PassThrough)
|
||||
#define glPatchParameterfv MANGLE(PatchParameterfv)
|
||||
#define glPatchParameteri MANGLE(PatchParameteri)
|
||||
#define glPauseTransformFeedback MANGLE(PauseTransformFeedback)
|
||||
#define glPauseTransformFeedbackNV MANGLE(PauseTransformFeedbackNV)
|
||||
#define glPixelDataRangeNV MANGLE(PixelDataRangeNV)
|
||||
#define glPixelMapfv MANGLE(PixelMapfv)
|
||||
|
@ -1191,6 +1307,7 @@
|
|||
#define glPrimitiveRestartNV MANGLE(PrimitiveRestartNV)
|
||||
#define glPrioritizeTexturesEXT MANGLE(PrioritizeTexturesEXT)
|
||||
#define glPrioritizeTextures MANGLE(PrioritizeTextures)
|
||||
#define glProgramBinary MANGLE(ProgramBinary)
|
||||
#define glProgramBufferParametersfvNV MANGLE(ProgramBufferParametersfvNV)
|
||||
#define glProgramBufferParametersIivNV MANGLE(ProgramBufferParametersIivNV)
|
||||
#define glProgramBufferParametersIuivNV MANGLE(ProgramBufferParametersIuivNV)
|
||||
|
@ -1231,39 +1348,123 @@
|
|||
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
|
||||
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
|
||||
#define glProgramStringARB MANGLE(ProgramStringARB)
|
||||
#define glProgramSubroutineParametersuivNV MANGLE(ProgramSubroutineParametersuivNV)
|
||||
#define glProgramUniform1dEXT MANGLE(ProgramUniform1dEXT)
|
||||
#define glProgramUniform1d MANGLE(ProgramUniform1d)
|
||||
#define glProgramUniform1dvEXT MANGLE(ProgramUniform1dvEXT)
|
||||
#define glProgramUniform1dv MANGLE(ProgramUniform1dv)
|
||||
#define glProgramUniform1fEXT MANGLE(ProgramUniform1fEXT)
|
||||
#define glProgramUniform1f MANGLE(ProgramUniform1f)
|
||||
#define glProgramUniform1fvEXT MANGLE(ProgramUniform1fvEXT)
|
||||
#define glProgramUniform1fv MANGLE(ProgramUniform1fv)
|
||||
#define glProgramUniform1i64NV MANGLE(ProgramUniform1i64NV)
|
||||
#define glProgramUniform1i64vNV MANGLE(ProgramUniform1i64vNV)
|
||||
#define glProgramUniform1iEXT MANGLE(ProgramUniform1iEXT)
|
||||
#define glProgramUniform1i MANGLE(ProgramUniform1i)
|
||||
#define glProgramUniform1ivEXT MANGLE(ProgramUniform1ivEXT)
|
||||
#define glProgramUniform1iv MANGLE(ProgramUniform1iv)
|
||||
#define glProgramUniform1ui64NV MANGLE(ProgramUniform1ui64NV)
|
||||
#define glProgramUniform1ui64vNV MANGLE(ProgramUniform1ui64vNV)
|
||||
#define glProgramUniform1uiEXT MANGLE(ProgramUniform1uiEXT)
|
||||
#define glProgramUniform1ui MANGLE(ProgramUniform1ui)
|
||||
#define glProgramUniform1uivEXT MANGLE(ProgramUniform1uivEXT)
|
||||
#define glProgramUniform1uiv MANGLE(ProgramUniform1uiv)
|
||||
#define glProgramUniform2dEXT MANGLE(ProgramUniform2dEXT)
|
||||
#define glProgramUniform2d MANGLE(ProgramUniform2d)
|
||||
#define glProgramUniform2dvEXT MANGLE(ProgramUniform2dvEXT)
|
||||
#define glProgramUniform2dv MANGLE(ProgramUniform2dv)
|
||||
#define glProgramUniform2fEXT MANGLE(ProgramUniform2fEXT)
|
||||
#define glProgramUniform2f MANGLE(ProgramUniform2f)
|
||||
#define glProgramUniform2fvEXT MANGLE(ProgramUniform2fvEXT)
|
||||
#define glProgramUniform2fv MANGLE(ProgramUniform2fv)
|
||||
#define glProgramUniform2i64NV MANGLE(ProgramUniform2i64NV)
|
||||
#define glProgramUniform2i64vNV MANGLE(ProgramUniform2i64vNV)
|
||||
#define glProgramUniform2iEXT MANGLE(ProgramUniform2iEXT)
|
||||
#define glProgramUniform2i MANGLE(ProgramUniform2i)
|
||||
#define glProgramUniform2ivEXT MANGLE(ProgramUniform2ivEXT)
|
||||
#define glProgramUniform2iv MANGLE(ProgramUniform2iv)
|
||||
#define glProgramUniform2ui64NV MANGLE(ProgramUniform2ui64NV)
|
||||
#define glProgramUniform2ui64vNV MANGLE(ProgramUniform2ui64vNV)
|
||||
#define glProgramUniform2uiEXT MANGLE(ProgramUniform2uiEXT)
|
||||
#define glProgramUniform2ui MANGLE(ProgramUniform2ui)
|
||||
#define glProgramUniform2uivEXT MANGLE(ProgramUniform2uivEXT)
|
||||
#define glProgramUniform2uiv MANGLE(ProgramUniform2uiv)
|
||||
#define glProgramUniform3dEXT MANGLE(ProgramUniform3dEXT)
|
||||
#define glProgramUniform3d MANGLE(ProgramUniform3d)
|
||||
#define glProgramUniform3dvEXT MANGLE(ProgramUniform3dvEXT)
|
||||
#define glProgramUniform3dv MANGLE(ProgramUniform3dv)
|
||||
#define glProgramUniform3fEXT MANGLE(ProgramUniform3fEXT)
|
||||
#define glProgramUniform3f MANGLE(ProgramUniform3f)
|
||||
#define glProgramUniform3fvEXT MANGLE(ProgramUniform3fvEXT)
|
||||
#define glProgramUniform3fv MANGLE(ProgramUniform3fv)
|
||||
#define glProgramUniform3i64NV MANGLE(ProgramUniform3i64NV)
|
||||
#define glProgramUniform3i64vNV MANGLE(ProgramUniform3i64vNV)
|
||||
#define glProgramUniform3iEXT MANGLE(ProgramUniform3iEXT)
|
||||
#define glProgramUniform3i MANGLE(ProgramUniform3i)
|
||||
#define glProgramUniform3ivEXT MANGLE(ProgramUniform3ivEXT)
|
||||
#define glProgramUniform3iv MANGLE(ProgramUniform3iv)
|
||||
#define glProgramUniform3ui64NV MANGLE(ProgramUniform3ui64NV)
|
||||
#define glProgramUniform3ui64vNV MANGLE(ProgramUniform3ui64vNV)
|
||||
#define glProgramUniform3uiEXT MANGLE(ProgramUniform3uiEXT)
|
||||
#define glProgramUniform3ui MANGLE(ProgramUniform3ui)
|
||||
#define glProgramUniform3uivEXT MANGLE(ProgramUniform3uivEXT)
|
||||
#define glProgramUniform3uiv MANGLE(ProgramUniform3uiv)
|
||||
#define glProgramUniform4dEXT MANGLE(ProgramUniform4dEXT)
|
||||
#define glProgramUniform4d MANGLE(ProgramUniform4d)
|
||||
#define glProgramUniform4dvEXT MANGLE(ProgramUniform4dvEXT)
|
||||
#define glProgramUniform4dv MANGLE(ProgramUniform4dv)
|
||||
#define glProgramUniform4fEXT MANGLE(ProgramUniform4fEXT)
|
||||
#define glProgramUniform4f MANGLE(ProgramUniform4f)
|
||||
#define glProgramUniform4fvEXT MANGLE(ProgramUniform4fvEXT)
|
||||
#define glProgramUniform4fv MANGLE(ProgramUniform4fv)
|
||||
#define glProgramUniform4i64NV MANGLE(ProgramUniform4i64NV)
|
||||
#define glProgramUniform4i64vNV MANGLE(ProgramUniform4i64vNV)
|
||||
#define glProgramUniform4iEXT MANGLE(ProgramUniform4iEXT)
|
||||
#define glProgramUniform4i MANGLE(ProgramUniform4i)
|
||||
#define glProgramUniform4ivEXT MANGLE(ProgramUniform4ivEXT)
|
||||
#define glProgramUniform4iv MANGLE(ProgramUniform4iv)
|
||||
#define glProgramUniform4ui64NV MANGLE(ProgramUniform4ui64NV)
|
||||
#define glProgramUniform4ui64vNV MANGLE(ProgramUniform4ui64vNV)
|
||||
#define glProgramUniform4uiEXT MANGLE(ProgramUniform4uiEXT)
|
||||
#define glProgramUniform4ui MANGLE(ProgramUniform4ui)
|
||||
#define glProgramUniform4uivEXT MANGLE(ProgramUniform4uivEXT)
|
||||
#define glProgramUniform4uiv MANGLE(ProgramUniform4uiv)
|
||||
#define glProgramUniformMatrix2dvEXT MANGLE(ProgramUniformMatrix2dvEXT)
|
||||
#define glProgramUniformMatrix2dv MANGLE(ProgramUniformMatrix2dv)
|
||||
#define glProgramUniformMatrix2fvEXT MANGLE(ProgramUniformMatrix2fvEXT)
|
||||
#define glProgramUniformMatrix2fv MANGLE(ProgramUniformMatrix2fv)
|
||||
#define glProgramUniformMatrix2x3dvEXT MANGLE(ProgramUniformMatrix2x3dvEXT)
|
||||
#define glProgramUniformMatrix2x3dv MANGLE(ProgramUniformMatrix2x3dv)
|
||||
#define glProgramUniformMatrix2x3fvEXT MANGLE(ProgramUniformMatrix2x3fvEXT)
|
||||
#define glProgramUniformMatrix2x3fv MANGLE(ProgramUniformMatrix2x3fv)
|
||||
#define glProgramUniformMatrix2x4dvEXT MANGLE(ProgramUniformMatrix2x4dvEXT)
|
||||
#define glProgramUniformMatrix2x4dv MANGLE(ProgramUniformMatrix2x4dv)
|
||||
#define glProgramUniformMatrix2x4fvEXT MANGLE(ProgramUniformMatrix2x4fvEXT)
|
||||
#define glProgramUniformMatrix2x4fv MANGLE(ProgramUniformMatrix2x4fv)
|
||||
#define glProgramUniformMatrix3dvEXT MANGLE(ProgramUniformMatrix3dvEXT)
|
||||
#define glProgramUniformMatrix3dv MANGLE(ProgramUniformMatrix3dv)
|
||||
#define glProgramUniformMatrix3fvEXT MANGLE(ProgramUniformMatrix3fvEXT)
|
||||
#define glProgramUniformMatrix3fv MANGLE(ProgramUniformMatrix3fv)
|
||||
#define glProgramUniformMatrix3x2dvEXT MANGLE(ProgramUniformMatrix3x2dvEXT)
|
||||
#define glProgramUniformMatrix3x2dv MANGLE(ProgramUniformMatrix3x2dv)
|
||||
#define glProgramUniformMatrix3x2fvEXT MANGLE(ProgramUniformMatrix3x2fvEXT)
|
||||
#define glProgramUniformMatrix3x2fv MANGLE(ProgramUniformMatrix3x2fv)
|
||||
#define glProgramUniformMatrix3x4dvEXT MANGLE(ProgramUniformMatrix3x4dvEXT)
|
||||
#define glProgramUniformMatrix3x4dv MANGLE(ProgramUniformMatrix3x4dv)
|
||||
#define glProgramUniformMatrix3x4fvEXT MANGLE(ProgramUniformMatrix3x4fvEXT)
|
||||
#define glProgramUniformMatrix3x4fv MANGLE(ProgramUniformMatrix3x4fv)
|
||||
#define glProgramUniformMatrix4dvEXT MANGLE(ProgramUniformMatrix4dvEXT)
|
||||
#define glProgramUniformMatrix4dv MANGLE(ProgramUniformMatrix4dv)
|
||||
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
|
||||
#define glProgramUniformMatrix4fv MANGLE(ProgramUniformMatrix4fv)
|
||||
#define glProgramUniformMatrix4x2dvEXT MANGLE(ProgramUniformMatrix4x2dvEXT)
|
||||
#define glProgramUniformMatrix4x2dv MANGLE(ProgramUniformMatrix4x2dv)
|
||||
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
|
||||
#define glProgramUniformMatrix4x2fv MANGLE(ProgramUniformMatrix4x2fv)
|
||||
#define glProgramUniformMatrix4x3dvEXT MANGLE(ProgramUniformMatrix4x3dvEXT)
|
||||
#define glProgramUniformMatrix4x3dv MANGLE(ProgramUniformMatrix4x3dv)
|
||||
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
|
||||
#define glProgramUniformMatrix4x3fv MANGLE(ProgramUniformMatrix4x3fv)
|
||||
#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV)
|
||||
#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV)
|
||||
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
|
||||
|
@ -1274,6 +1475,7 @@
|
|||
#define glPushClientAttrib MANGLE(PushClientAttrib)
|
||||
#define glPushMatrix MANGLE(PushMatrix)
|
||||
#define glPushName MANGLE(PushName)
|
||||
#define glQueryCounter MANGLE(QueryCounter)
|
||||
#define glRasterPos2d MANGLE(RasterPos2d)
|
||||
#define glRasterPos2dv MANGLE(RasterPos2dv)
|
||||
#define glRasterPos2f MANGLE(RasterPos2f)
|
||||
|
@ -1300,6 +1502,7 @@
|
|||
#define glRasterPos4sv MANGLE(RasterPos4sv)
|
||||
#define glReadBuffer MANGLE(ReadBuffer)
|
||||
#define glReadInstrumentsSGIX MANGLE(ReadInstrumentsSGIX)
|
||||
#define glReadnPixelsARB MANGLE(ReadnPixelsARB)
|
||||
#define glReadPixels MANGLE(ReadPixels)
|
||||
#define glRectd MANGLE(Rectd)
|
||||
#define glRectdv MANGLE(Rectdv)
|
||||
|
@ -1310,6 +1513,7 @@
|
|||
#define glRects MANGLE(Rects)
|
||||
#define glRectsv MANGLE(Rectsv)
|
||||
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
|
||||
#define glReleaseShaderCompiler MANGLE(ReleaseShaderCompiler)
|
||||
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
|
||||
#define glRenderbufferStorage MANGLE(RenderbufferStorage)
|
||||
#define glRenderbufferStorageMultisampleCoverageNV MANGLE(RenderbufferStorageMultisampleCoverageNV)
|
||||
|
@ -1345,6 +1549,7 @@
|
|||
#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT)
|
||||
#define glResetMinmax MANGLE(ResetMinmax)
|
||||
#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA)
|
||||
#define glResumeTransformFeedback MANGLE(ResumeTransformFeedback)
|
||||
#define glResumeTransformFeedbackNV MANGLE(ResumeTransformFeedbackNV)
|
||||
#define glRotated MANGLE(Rotated)
|
||||
#define glRotatef MANGLE(Rotatef)
|
||||
|
@ -1357,8 +1562,17 @@
|
|||
#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
|
||||
#define glSamplePatternEXT MANGLE(SamplePatternEXT)
|
||||
#define glSamplePatternSGIS MANGLE(SamplePatternSGIS)
|
||||
#define glSamplerParameterf MANGLE(SamplerParameterf)
|
||||
#define glSamplerParameterfv MANGLE(SamplerParameterfv)
|
||||
#define glSamplerParameterIiv MANGLE(SamplerParameterIiv)
|
||||
#define glSamplerParameteri MANGLE(SamplerParameteri)
|
||||
#define glSamplerParameterIuiv MANGLE(SamplerParameterIuiv)
|
||||
#define glSamplerParameteriv MANGLE(SamplerParameteriv)
|
||||
#define glScaled MANGLE(Scaled)
|
||||
#define glScalef MANGLE(Scalef)
|
||||
#define glScissorArrayv MANGLE(ScissorArrayv)
|
||||
#define glScissorIndexed MANGLE(ScissorIndexed)
|
||||
#define glScissorIndexedv MANGLE(ScissorIndexedv)
|
||||
#define glScissor MANGLE(Scissor)
|
||||
#define glSecondaryColor3bEXT MANGLE(SecondaryColor3bEXT)
|
||||
#define glSecondaryColor3b MANGLE(SecondaryColor3b)
|
||||
|
@ -1395,6 +1609,8 @@
|
|||
#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT)
|
||||
#define glSecondaryColor3usv MANGLE(SecondaryColor3usv)
|
||||
#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV)
|
||||
#define glSecondaryColorP3ui MANGLE(SecondaryColorP3ui)
|
||||
#define glSecondaryColorP3uiv MANGLE(SecondaryColorP3uiv)
|
||||
#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT)
|
||||
#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM)
|
||||
#define glSecondaryColorPointer MANGLE(SecondaryColorPointer)
|
||||
|
@ -1408,6 +1624,7 @@
|
|||
#define glSetInvariantEXT MANGLE(SetInvariantEXT)
|
||||
#define glSetLocalConstantEXT MANGLE(SetLocalConstantEXT)
|
||||
#define glShadeModel MANGLE(ShadeModel)
|
||||
#define glShaderBinary MANGLE(ShaderBinary)
|
||||
#define glShaderOp1EXT MANGLE(ShaderOp1EXT)
|
||||
#define glShaderOp2EXT MANGLE(ShaderOp2EXT)
|
||||
#define glShaderOp3EXT MANGLE(ShaderOp3EXT)
|
||||
|
@ -1509,6 +1726,14 @@
|
|||
#define glTexCoord4s MANGLE(TexCoord4s)
|
||||
#define glTexCoord4sv MANGLE(TexCoord4sv)
|
||||
#define glTexCoordFormatNV MANGLE(TexCoordFormatNV)
|
||||
#define glTexCoordP1ui MANGLE(TexCoordP1ui)
|
||||
#define glTexCoordP1uiv MANGLE(TexCoordP1uiv)
|
||||
#define glTexCoordP2ui MANGLE(TexCoordP2ui)
|
||||
#define glTexCoordP2uiv MANGLE(TexCoordP2uiv)
|
||||
#define glTexCoordP3ui MANGLE(TexCoordP3ui)
|
||||
#define glTexCoordP3uiv MANGLE(TexCoordP3uiv)
|
||||
#define glTexCoordP4ui MANGLE(TexCoordP4ui)
|
||||
#define glTexCoordP4uiv MANGLE(TexCoordP4uiv)
|
||||
#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT)
|
||||
#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM)
|
||||
#define glTexCoordPointer MANGLE(TexCoordPointer)
|
||||
|
@ -1569,73 +1794,108 @@
|
|||
#define glTextureSubImage3DEXT MANGLE(TextureSubImage3DEXT)
|
||||
#define glTrackMatrixNV MANGLE(TrackMatrixNV)
|
||||
#define glTransformFeedbackAttribsNV MANGLE(TransformFeedbackAttribsNV)
|
||||
#define glTransformFeedbackStreamAttribsNV MANGLE(TransformFeedbackStreamAttribsNV)
|
||||
#define glTransformFeedbackVaryingsEXT MANGLE(TransformFeedbackVaryingsEXT)
|
||||
#define glTransformFeedbackVaryings MANGLE(TransformFeedbackVaryings)
|
||||
#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV)
|
||||
#define glTranslated MANGLE(Translated)
|
||||
#define glTranslatef MANGLE(Translatef)
|
||||
#define glUniform1d MANGLE(Uniform1d)
|
||||
#define glUniform1dv MANGLE(Uniform1dv)
|
||||
#define glUniform1fARB MANGLE(Uniform1fARB)
|
||||
#define glUniform1f MANGLE(Uniform1f)
|
||||
#define glUniform1fvARB MANGLE(Uniform1fvARB)
|
||||
#define glUniform1fv MANGLE(Uniform1fv)
|
||||
#define glUniform1i64NV MANGLE(Uniform1i64NV)
|
||||
#define glUniform1i64vNV MANGLE(Uniform1i64vNV)
|
||||
#define glUniform1iARB MANGLE(Uniform1iARB)
|
||||
#define glUniform1i MANGLE(Uniform1i)
|
||||
#define glUniform1ivARB MANGLE(Uniform1ivARB)
|
||||
#define glUniform1iv MANGLE(Uniform1iv)
|
||||
#define glUniform1ui64NV MANGLE(Uniform1ui64NV)
|
||||
#define glUniform1ui64vNV MANGLE(Uniform1ui64vNV)
|
||||
#define glUniform1uiEXT MANGLE(Uniform1uiEXT)
|
||||
#define glUniform1ui MANGLE(Uniform1ui)
|
||||
#define glUniform1uivEXT MANGLE(Uniform1uivEXT)
|
||||
#define glUniform1uiv MANGLE(Uniform1uiv)
|
||||
#define glUniform2d MANGLE(Uniform2d)
|
||||
#define glUniform2dv MANGLE(Uniform2dv)
|
||||
#define glUniform2fARB MANGLE(Uniform2fARB)
|
||||
#define glUniform2f MANGLE(Uniform2f)
|
||||
#define glUniform2fvARB MANGLE(Uniform2fvARB)
|
||||
#define glUniform2fv MANGLE(Uniform2fv)
|
||||
#define glUniform2i64NV MANGLE(Uniform2i64NV)
|
||||
#define glUniform2i64vNV MANGLE(Uniform2i64vNV)
|
||||
#define glUniform2iARB MANGLE(Uniform2iARB)
|
||||
#define glUniform2i MANGLE(Uniform2i)
|
||||
#define glUniform2ivARB MANGLE(Uniform2ivARB)
|
||||
#define glUniform2iv MANGLE(Uniform2iv)
|
||||
#define glUniform2ui64NV MANGLE(Uniform2ui64NV)
|
||||
#define glUniform2ui64vNV MANGLE(Uniform2ui64vNV)
|
||||
#define glUniform2uiEXT MANGLE(Uniform2uiEXT)
|
||||
#define glUniform2ui MANGLE(Uniform2ui)
|
||||
#define glUniform2uivEXT MANGLE(Uniform2uivEXT)
|
||||
#define glUniform2uiv MANGLE(Uniform2uiv)
|
||||
#define glUniform3d MANGLE(Uniform3d)
|
||||
#define glUniform3dv MANGLE(Uniform3dv)
|
||||
#define glUniform3fARB MANGLE(Uniform3fARB)
|
||||
#define glUniform3f MANGLE(Uniform3f)
|
||||
#define glUniform3fvARB MANGLE(Uniform3fvARB)
|
||||
#define glUniform3fv MANGLE(Uniform3fv)
|
||||
#define glUniform3i64NV MANGLE(Uniform3i64NV)
|
||||
#define glUniform3i64vNV MANGLE(Uniform3i64vNV)
|
||||
#define glUniform3iARB MANGLE(Uniform3iARB)
|
||||
#define glUniform3i MANGLE(Uniform3i)
|
||||
#define glUniform3ivARB MANGLE(Uniform3ivARB)
|
||||
#define glUniform3iv MANGLE(Uniform3iv)
|
||||
#define glUniform3ui64NV MANGLE(Uniform3ui64NV)
|
||||
#define glUniform3ui64vNV MANGLE(Uniform3ui64vNV)
|
||||
#define glUniform3uiEXT MANGLE(Uniform3uiEXT)
|
||||
#define glUniform3ui MANGLE(Uniform3ui)
|
||||
#define glUniform3uivEXT MANGLE(Uniform3uivEXT)
|
||||
#define glUniform3uiv MANGLE(Uniform3uiv)
|
||||
#define glUniform4d MANGLE(Uniform4d)
|
||||
#define glUniform4dv MANGLE(Uniform4dv)
|
||||
#define glUniform4fARB MANGLE(Uniform4fARB)
|
||||
#define glUniform4f MANGLE(Uniform4f)
|
||||
#define glUniform4fvARB MANGLE(Uniform4fvARB)
|
||||
#define glUniform4fv MANGLE(Uniform4fv)
|
||||
#define glUniform4i64NV MANGLE(Uniform4i64NV)
|
||||
#define glUniform4i64vNV MANGLE(Uniform4i64vNV)
|
||||
#define glUniform4iARB MANGLE(Uniform4iARB)
|
||||
#define glUniform4i MANGLE(Uniform4i)
|
||||
#define glUniform4ivARB MANGLE(Uniform4ivARB)
|
||||
#define glUniform4iv MANGLE(Uniform4iv)
|
||||
#define glUniform4ui64NV MANGLE(Uniform4ui64NV)
|
||||
#define glUniform4ui64vNV MANGLE(Uniform4ui64vNV)
|
||||
#define glUniform4uiEXT MANGLE(Uniform4uiEXT)
|
||||
#define glUniform4ui MANGLE(Uniform4ui)
|
||||
#define glUniform4uivEXT MANGLE(Uniform4uivEXT)
|
||||
#define glUniform4uiv MANGLE(Uniform4uiv)
|
||||
#define glUniformBlockBinding MANGLE(UniformBlockBinding)
|
||||
#define glUniformBufferEXT MANGLE(UniformBufferEXT)
|
||||
#define glUniformMatrix2dv MANGLE(UniformMatrix2dv)
|
||||
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
|
||||
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
|
||||
#define glUniformMatrix2x3dv MANGLE(UniformMatrix2x3dv)
|
||||
#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv)
|
||||
#define glUniformMatrix2x4dv MANGLE(UniformMatrix2x4dv)
|
||||
#define glUniformMatrix2x4fv MANGLE(UniformMatrix2x4fv)
|
||||
#define glUniformMatrix3dv MANGLE(UniformMatrix3dv)
|
||||
#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB)
|
||||
#define glUniformMatrix3fv MANGLE(UniformMatrix3fv)
|
||||
#define glUniformMatrix3x2dv MANGLE(UniformMatrix3x2dv)
|
||||
#define glUniformMatrix3x2fv MANGLE(UniformMatrix3x2fv)
|
||||
#define glUniformMatrix3x4dv MANGLE(UniformMatrix3x4dv)
|
||||
#define glUniformMatrix3x4fv MANGLE(UniformMatrix3x4fv)
|
||||
#define glUniformMatrix4dv MANGLE(UniformMatrix4dv)
|
||||
#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB)
|
||||
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
|
||||
#define glUniformMatrix4x2dv MANGLE(UniformMatrix4x2dv)
|
||||
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
|
||||
#define glUniformMatrix4x3dv MANGLE(UniformMatrix4x3dv)
|
||||
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
|
||||
#define glUniformSubroutinesuiv MANGLE(UniformSubroutinesuiv)
|
||||
#define glUniformui64NV MANGLE(Uniformui64NV)
|
||||
#define glUniformui64vNV MANGLE(Uniformui64vNV)
|
||||
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
|
||||
|
@ -1646,9 +1906,11 @@
|
|||
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
|
||||
#define glUseProgram MANGLE(UseProgram)
|
||||
#define glUseProgramObjectARB MANGLE(UseProgramObjectARB)
|
||||
#define glUseProgramStages MANGLE(UseProgramStages)
|
||||
#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT)
|
||||
#define glValidateProgramARB MANGLE(ValidateProgramARB)
|
||||
#define glValidateProgram MANGLE(ValidateProgram)
|
||||
#define glValidateProgramPipeline MANGLE(ValidateProgramPipeline)
|
||||
#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI)
|
||||
#define glVariantbvEXT MANGLE(VariantbvEXT)
|
||||
#define glVariantdvEXT MANGLE(VariantdvEXT)
|
||||
|
@ -1659,6 +1921,16 @@
|
|||
#define glVariantubvEXT MANGLE(VariantubvEXT)
|
||||
#define glVariantuivEXT MANGLE(VariantuivEXT)
|
||||
#define glVariantusvEXT MANGLE(VariantusvEXT)
|
||||
#define glVDPAUFiniNV MANGLE(VDPAUFiniNV)
|
||||
#define glVDPAUGetSurfaceivNV MANGLE(VDPAUGetSurfaceivNV)
|
||||
#define glVDPAUInitNV MANGLE(VDPAUInitNV)
|
||||
#define glVDPAUIsSurfaceNV MANGLE(VDPAUIsSurfaceNV)
|
||||
#define glVDPAUMapSurfacesNV MANGLE(VDPAUMapSurfacesNV)
|
||||
#define glVDPAURegisterOutputSurfaceNV MANGLE(VDPAURegisterOutputSurfaceNV)
|
||||
#define glVDPAURegisterVideoSurfaceNV MANGLE(VDPAURegisterVideoSurfaceNV)
|
||||
#define glVDPAUSurfaceAccessNV MANGLE(VDPAUSurfaceAccessNV)
|
||||
#define glVDPAUUnmapSurfacesNV MANGLE(VDPAUUnmapSurfacesNV)
|
||||
#define glVDPAUUnregisterSurfaceNV MANGLE(VDPAUUnregisterSurfaceNV)
|
||||
#define glVertex2d MANGLE(Vertex2d)
|
||||
#define glVertex2dv MANGLE(Vertex2dv)
|
||||
#define glVertex2f MANGLE(Vertex2f)
|
||||
|
@ -1692,6 +1964,7 @@
|
|||
#define glVertexArrayParameteriAPPLE MANGLE(VertexArrayParameteriAPPLE)
|
||||
#define glVertexArrayRangeAPPLE MANGLE(VertexArrayRangeAPPLE)
|
||||
#define glVertexArrayRangeNV MANGLE(VertexArrayRangeNV)
|
||||
#define glVertexArrayVertexAttribLOffsetEXT MANGLE(VertexArrayVertexAttribLOffsetEXT)
|
||||
#define glVertexAttrib1dARB MANGLE(VertexAttrib1dARB)
|
||||
#define glVertexAttrib1d MANGLE(VertexAttrib1d)
|
||||
#define glVertexAttrib1dNV MANGLE(VertexAttrib1dNV)
|
||||
|
@ -1800,6 +2073,7 @@
|
|||
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
|
||||
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
|
||||
#define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB)
|
||||
#define glVertexAttribDivisor MANGLE(VertexAttribDivisor)
|
||||
#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV)
|
||||
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
|
||||
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
|
||||
|
@ -1844,6 +2118,49 @@
|
|||
#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV)
|
||||
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
|
||||
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
|
||||
#define glVertexAttribL1dEXT MANGLE(VertexAttribL1dEXT)
|
||||
#define glVertexAttribL1d MANGLE(VertexAttribL1d)
|
||||
#define glVertexAttribL1dvEXT MANGLE(VertexAttribL1dvEXT)
|
||||
#define glVertexAttribL1dv MANGLE(VertexAttribL1dv)
|
||||
#define glVertexAttribL1i64NV MANGLE(VertexAttribL1i64NV)
|
||||
#define glVertexAttribL1i64vNV MANGLE(VertexAttribL1i64vNV)
|
||||
#define glVertexAttribL1ui64NV MANGLE(VertexAttribL1ui64NV)
|
||||
#define glVertexAttribL1ui64vNV MANGLE(VertexAttribL1ui64vNV)
|
||||
#define glVertexAttribL2dEXT MANGLE(VertexAttribL2dEXT)
|
||||
#define glVertexAttribL2d MANGLE(VertexAttribL2d)
|
||||
#define glVertexAttribL2dvEXT MANGLE(VertexAttribL2dvEXT)
|
||||
#define glVertexAttribL2dv MANGLE(VertexAttribL2dv)
|
||||
#define glVertexAttribL2i64NV MANGLE(VertexAttribL2i64NV)
|
||||
#define glVertexAttribL2i64vNV MANGLE(VertexAttribL2i64vNV)
|
||||
#define glVertexAttribL2ui64NV MANGLE(VertexAttribL2ui64NV)
|
||||
#define glVertexAttribL2ui64vNV MANGLE(VertexAttribL2ui64vNV)
|
||||
#define glVertexAttribL3dEXT MANGLE(VertexAttribL3dEXT)
|
||||
#define glVertexAttribL3d MANGLE(VertexAttribL3d)
|
||||
#define glVertexAttribL3dvEXT MANGLE(VertexAttribL3dvEXT)
|
||||
#define glVertexAttribL3dv MANGLE(VertexAttribL3dv)
|
||||
#define glVertexAttribL3i64NV MANGLE(VertexAttribL3i64NV)
|
||||
#define glVertexAttribL3i64vNV MANGLE(VertexAttribL3i64vNV)
|
||||
#define glVertexAttribL3ui64NV MANGLE(VertexAttribL3ui64NV)
|
||||
#define glVertexAttribL3ui64vNV MANGLE(VertexAttribL3ui64vNV)
|
||||
#define glVertexAttribL4dEXT MANGLE(VertexAttribL4dEXT)
|
||||
#define glVertexAttribL4d MANGLE(VertexAttribL4d)
|
||||
#define glVertexAttribL4dvEXT MANGLE(VertexAttribL4dvEXT)
|
||||
#define glVertexAttribL4dv MANGLE(VertexAttribL4dv)
|
||||
#define glVertexAttribL4i64NV MANGLE(VertexAttribL4i64NV)
|
||||
#define glVertexAttribL4i64vNV MANGLE(VertexAttribL4i64vNV)
|
||||
#define glVertexAttribL4ui64NV MANGLE(VertexAttribL4ui64NV)
|
||||
#define glVertexAttribL4ui64vNV MANGLE(VertexAttribL4ui64vNV)
|
||||
#define glVertexAttribLFormatNV MANGLE(VertexAttribLFormatNV)
|
||||
#define glVertexAttribLPointerEXT MANGLE(VertexAttribLPointerEXT)
|
||||
#define glVertexAttribLPointer MANGLE(VertexAttribLPointer)
|
||||
#define glVertexAttribP1ui MANGLE(VertexAttribP1ui)
|
||||
#define glVertexAttribP1uiv MANGLE(VertexAttribP1uiv)
|
||||
#define glVertexAttribP2ui MANGLE(VertexAttribP2ui)
|
||||
#define glVertexAttribP2uiv MANGLE(VertexAttribP2uiv)
|
||||
#define glVertexAttribP3ui MANGLE(VertexAttribP3ui)
|
||||
#define glVertexAttribP3uiv MANGLE(VertexAttribP3uiv)
|
||||
#define glVertexAttribP4ui MANGLE(VertexAttribP4ui)
|
||||
#define glVertexAttribP4uiv MANGLE(VertexAttribP4uiv)
|
||||
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
|
||||
#define glVertexAttribPointer MANGLE(VertexAttribPointer)
|
||||
#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)
|
||||
|
@ -1868,6 +2185,12 @@
|
|||
#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI)
|
||||
#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI)
|
||||
#define glVertexFormatNV MANGLE(VertexFormatNV)
|
||||
#define glVertexP2ui MANGLE(VertexP2ui)
|
||||
#define glVertexP2uiv MANGLE(VertexP2uiv)
|
||||
#define glVertexP3ui MANGLE(VertexP3ui)
|
||||
#define glVertexP3uiv MANGLE(VertexP3uiv)
|
||||
#define glVertexP4ui MANGLE(VertexP4ui)
|
||||
#define glVertexP4uiv MANGLE(VertexP4uiv)
|
||||
#define glVertexPointerEXT MANGLE(VertexPointerEXT)
|
||||
#define glVertexPointerListIBM MANGLE(VertexPointerListIBM)
|
||||
#define glVertexPointer MANGLE(VertexPointer)
|
||||
|
@ -1913,6 +2236,9 @@
|
|||
#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV)
|
||||
#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV)
|
||||
#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV)
|
||||
#define glViewportArrayv MANGLE(ViewportArrayv)
|
||||
#define glViewportIndexedf MANGLE(ViewportIndexedf)
|
||||
#define glViewportIndexedfv MANGLE(ViewportIndexedfv)
|
||||
#define glViewport MANGLE(Viewport)
|
||||
#define glWaitSync MANGLE(WaitSync)
|
||||
#define glWeightbvARB MANGLE(WeightbvARB)
|
||||
|
|
|
@ -186,11 +186,22 @@ _eglLoadModule(_EGLModule *mod)
|
|||
static void
|
||||
_eglUnloadModule(_EGLModule *mod)
|
||||
{
|
||||
#if defined(_EGL_OS_UNIX)
|
||||
/* destroy the driver */
|
||||
if (mod->Driver && mod->Driver->Unload)
|
||||
mod->Driver->Unload(mod->Driver);
|
||||
|
||||
/*
|
||||
* XXX At this point (atexit), the module might be the last reference to
|
||||
* libEGL. Closing the module might unmap libEGL and give problems.
|
||||
*/
|
||||
#if 0
|
||||
if (mod->Handle)
|
||||
close_library(mod->Handle);
|
||||
#endif
|
||||
#elif defined(_EGL_OS_WINDOWS)
|
||||
/* XXX Windows unloads DLLs before atexit */
|
||||
#endif
|
||||
|
||||
mod->Driver = NULL;
|
||||
mod->Handle = NULL;
|
||||
|
@ -670,12 +681,7 @@ _eglUnloadDrivers(void)
|
|||
{
|
||||
/* this is called at atexit time */
|
||||
if (_eglModules) {
|
||||
#if defined(_EGL_OS_UNIX)
|
||||
_eglDestroyArray(_eglModules, _eglFreeModule);
|
||||
#elif defined(_EGL_OS_WINDOWS)
|
||||
/* XXX Windows unloads DLLs before atexit */
|
||||
_eglDestroyArray(_eglModules, NULL);
|
||||
#endif
|
||||
_eglModules = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,8 +58,8 @@ struct fetch_shade_emit {
|
|||
const ubyte *src[PIPE_MAX_ATTRIBS];
|
||||
unsigned prim;
|
||||
|
||||
struct draw_vs_varient_key key;
|
||||
struct draw_vs_varient *active;
|
||||
struct draw_vs_variant_key key;
|
||||
struct draw_vs_variant *active;
|
||||
|
||||
|
||||
const struct vertex_info *vinfo;
|
||||
|
@ -150,7 +150,7 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
|
|||
}
|
||||
|
||||
|
||||
fse->active = draw_vs_lookup_varient( draw->vs.vertex_shader,
|
||||
fse->active = draw_vs_lookup_variant( draw->vs.vertex_shader,
|
||||
&fse->key );
|
||||
|
||||
if (!fse->active) {
|
||||
|
|
|
@ -165,10 +165,10 @@ draw_delete_vertex_shader(struct draw_context *draw,
|
|||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < dvs->nr_varients; i++)
|
||||
dvs->varient[i]->destroy( dvs->varient[i] );
|
||||
for (i = 0; i < dvs->nr_variants; i++)
|
||||
dvs->variant[i]->destroy( dvs->variant[i] );
|
||||
|
||||
dvs->nr_varients = 0;
|
||||
dvs->nr_variants = 0;
|
||||
|
||||
dvs->delete( dvs );
|
||||
}
|
||||
|
@ -225,40 +225,40 @@ draw_vs_destroy( struct draw_context *draw )
|
|||
}
|
||||
|
||||
|
||||
struct draw_vs_varient *
|
||||
draw_vs_lookup_varient( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_varient_key *key )
|
||||
struct draw_vs_variant *
|
||||
draw_vs_lookup_variant( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_variant_key *key )
|
||||
{
|
||||
struct draw_vs_varient *varient;
|
||||
struct draw_vs_variant *variant;
|
||||
unsigned i;
|
||||
|
||||
/* Lookup existing varient:
|
||||
/* Lookup existing variant:
|
||||
*/
|
||||
for (i = 0; i < vs->nr_varients; i++)
|
||||
if (draw_vs_varient_key_compare(key, &vs->varient[i]->key) == 0)
|
||||
return vs->varient[i];
|
||||
for (i = 0; i < vs->nr_variants; i++)
|
||||
if (draw_vs_variant_key_compare(key, &vs->variant[i]->key) == 0)
|
||||
return vs->variant[i];
|
||||
|
||||
/* Else have to create a new one:
|
||||
*/
|
||||
varient = vs->create_varient( vs, key );
|
||||
if (varient == NULL)
|
||||
variant = vs->create_variant( vs, key );
|
||||
if (variant == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Add it to our list, could be smarter:
|
||||
*/
|
||||
if (vs->nr_varients < Elements(vs->varient)) {
|
||||
vs->varient[vs->nr_varients++] = varient;
|
||||
if (vs->nr_variants < Elements(vs->variant)) {
|
||||
vs->variant[vs->nr_variants++] = variant;
|
||||
}
|
||||
else {
|
||||
vs->last_varient++;
|
||||
vs->last_varient %= Elements(vs->varient);
|
||||
vs->varient[vs->last_varient]->destroy(vs->varient[vs->last_varient]);
|
||||
vs->varient[vs->last_varient] = varient;
|
||||
vs->last_variant++;
|
||||
vs->last_variant %= Elements(vs->variant);
|
||||
vs->variant[vs->last_variant]->destroy(vs->variant[vs->last_variant]);
|
||||
vs->variant[vs->last_variant] = variant;
|
||||
}
|
||||
|
||||
/* Done
|
||||
*/
|
||||
return varient;
|
||||
return variant;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
struct draw_context;
|
||||
struct pipe_shader_state;
|
||||
|
||||
struct draw_varient_input
|
||||
struct draw_variant_input
|
||||
{
|
||||
enum pipe_format format;
|
||||
unsigned buffer;
|
||||
|
@ -46,19 +46,19 @@ struct draw_varient_input
|
|||
unsigned instance_divisor;
|
||||
};
|
||||
|
||||
struct draw_varient_output
|
||||
struct draw_variant_output
|
||||
{
|
||||
enum pipe_format format; /* output format */
|
||||
unsigned vs_output:8; /* which vertex shader output is this? */
|
||||
unsigned offset:24; /* offset into output vertex */
|
||||
};
|
||||
|
||||
struct draw_varient_element {
|
||||
struct draw_varient_input in;
|
||||
struct draw_varient_output out;
|
||||
struct draw_variant_element {
|
||||
struct draw_variant_input in;
|
||||
struct draw_variant_output out;
|
||||
};
|
||||
|
||||
struct draw_vs_varient_key {
|
||||
struct draw_vs_variant_key {
|
||||
unsigned output_stride;
|
||||
unsigned nr_elements:8; /* max2(nr_inputs, nr_outputs) */
|
||||
unsigned nr_inputs:8;
|
||||
|
@ -66,34 +66,34 @@ struct draw_vs_varient_key {
|
|||
unsigned viewport:1;
|
||||
unsigned clip:1;
|
||||
unsigned const_vbuffers:5;
|
||||
struct draw_varient_element element[PIPE_MAX_ATTRIBS];
|
||||
struct draw_variant_element element[PIPE_MAX_ATTRIBS];
|
||||
};
|
||||
|
||||
struct draw_vs_varient;
|
||||
struct draw_vs_variant;
|
||||
|
||||
|
||||
struct draw_vs_varient {
|
||||
struct draw_vs_varient_key key;
|
||||
struct draw_vs_variant {
|
||||
struct draw_vs_variant_key key;
|
||||
|
||||
struct draw_vertex_shader *vs;
|
||||
|
||||
void (*set_buffer)( struct draw_vs_varient *,
|
||||
void (*set_buffer)( struct draw_vs_variant *,
|
||||
unsigned i,
|
||||
const void *ptr,
|
||||
unsigned stride,
|
||||
unsigned max_stride );
|
||||
|
||||
void (PIPE_CDECL *run_linear)( struct draw_vs_varient *shader,
|
||||
void (PIPE_CDECL *run_linear)( struct draw_vs_variant *shader,
|
||||
unsigned start,
|
||||
unsigned count,
|
||||
void *output_buffer );
|
||||
|
||||
void (PIPE_CDECL *run_elts)( struct draw_vs_varient *shader,
|
||||
void (PIPE_CDECL *run_elts)( struct draw_vs_variant *shader,
|
||||
const unsigned *elts,
|
||||
unsigned count,
|
||||
void *output_buffer );
|
||||
|
||||
void (*destroy)( struct draw_vs_varient * );
|
||||
void (*destroy)( struct draw_vs_variant * );
|
||||
};
|
||||
|
||||
|
||||
|
@ -117,11 +117,11 @@ struct draw_vertex_shader {
|
|||
|
||||
/*
|
||||
*/
|
||||
struct draw_vs_varient *varient[16];
|
||||
unsigned nr_varients;
|
||||
unsigned last_varient;
|
||||
struct draw_vs_varient *(*create_varient)( struct draw_vertex_shader *shader,
|
||||
const struct draw_vs_varient_key *key );
|
||||
struct draw_vs_variant *variant[16];
|
||||
unsigned nr_variants;
|
||||
unsigned last_variant;
|
||||
struct draw_vs_variant *(*create_variant)( struct draw_vertex_shader *shader,
|
||||
const struct draw_vs_variant_key *key );
|
||||
|
||||
|
||||
void (*prepare)( struct draw_vertex_shader *shader,
|
||||
|
@ -144,9 +144,9 @@ struct draw_vertex_shader {
|
|||
};
|
||||
|
||||
|
||||
struct draw_vs_varient *
|
||||
draw_vs_lookup_varient( struct draw_vertex_shader *base,
|
||||
const struct draw_vs_varient_key *key );
|
||||
struct draw_vs_variant *
|
||||
draw_vs_lookup_variant( struct draw_vertex_shader *base,
|
||||
const struct draw_vs_variant_key *key );
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
|
@ -166,12 +166,12 @@ draw_create_vs_ppc(struct draw_context *draw,
|
|||
const struct pipe_shader_state *templ);
|
||||
|
||||
|
||||
struct draw_vs_varient_key;
|
||||
struct draw_vs_variant_key;
|
||||
struct draw_vertex_shader;
|
||||
|
||||
struct draw_vs_varient *
|
||||
draw_vs_create_varient_aos_sse( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_varient_key *key );
|
||||
struct draw_vs_variant *
|
||||
draw_vs_create_variant_aos_sse( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_variant_key *key );
|
||||
|
||||
#if HAVE_LLVM
|
||||
struct draw_vertex_shader *
|
||||
|
@ -181,7 +181,7 @@ draw_create_vs_llvm(struct draw_context *draw,
|
|||
|
||||
|
||||
/********************************************************************************
|
||||
* Helpers for vs implementations that don't do their own fetch/emit varients.
|
||||
* Helpers for vs implementations that don't do their own fetch/emit variants.
|
||||
* Means these can be shared between shaders.
|
||||
*/
|
||||
struct translate;
|
||||
|
@ -194,21 +194,21 @@ struct translate *draw_vs_get_fetch( struct draw_context *draw,
|
|||
struct translate *draw_vs_get_emit( struct draw_context *draw,
|
||||
struct translate_key *key );
|
||||
|
||||
struct draw_vs_varient *
|
||||
draw_vs_create_varient_generic( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_varient_key *key );
|
||||
struct draw_vs_variant *
|
||||
draw_vs_create_variant_generic( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_variant_key *key );
|
||||
|
||||
|
||||
|
||||
static INLINE int draw_vs_varient_keysize( const struct draw_vs_varient_key *key )
|
||||
static INLINE int draw_vs_variant_keysize( const struct draw_vs_variant_key *key )
|
||||
{
|
||||
return 2 * sizeof(int) + key->nr_elements * sizeof(struct draw_varient_element);
|
||||
return 2 * sizeof(int) + key->nr_elements * sizeof(struct draw_variant_element);
|
||||
}
|
||||
|
||||
static INLINE int draw_vs_varient_key_compare( const struct draw_vs_varient_key *a,
|
||||
const struct draw_vs_varient_key *b )
|
||||
static INLINE int draw_vs_variant_key_compare( const struct draw_vs_variant_key *a,
|
||||
const struct draw_vs_variant_key *b )
|
||||
{
|
||||
int keysize = draw_vs_varient_keysize(a);
|
||||
int keysize = draw_vs_variant_keysize(a);
|
||||
return memcmp(a, b, keysize);
|
||||
}
|
||||
|
||||
|
|
|
@ -1918,7 +1918,7 @@ static void find_last_write_outputs( struct aos_compilation *cp )
|
|||
#define ARG_OUTBUF 4
|
||||
|
||||
|
||||
static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
|
||||
static boolean build_vertex_program( struct draw_vs_variant_aos_sse *variant,
|
||||
boolean linear )
|
||||
{
|
||||
struct tgsi_parse_context parse;
|
||||
|
@ -1927,14 +1927,14 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
|
|||
|
||||
util_init_math();
|
||||
|
||||
tgsi_parse_init( &parse, varient->base.vs->state.tokens );
|
||||
tgsi_parse_init( &parse, variant->base.vs->state.tokens );
|
||||
|
||||
memset(&cp, 0, sizeof(cp));
|
||||
|
||||
cp.insn_counter = 1;
|
||||
cp.vaos = varient;
|
||||
cp.vaos = variant;
|
||||
cp.have_sse2 = 1;
|
||||
cp.func = &varient->func[ linear ? 0 : 1 ];
|
||||
cp.func = &variant->func[ linear ? 0 : 1 ];
|
||||
|
||||
cp.tmp_EAX = x86_make_reg(file_REG32, reg_AX);
|
||||
cp.idx_EBX = x86_make_reg(file_REG32, reg_BX);
|
||||
|
@ -2090,20 +2090,20 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
|
|||
|
||||
|
||||
/** cast wrapper */
|
||||
static INLINE struct draw_vs_varient_aos_sse *
|
||||
draw_vs_varient_aos_sse(struct draw_vs_varient *varient)
|
||||
static INLINE struct draw_vs_variant_aos_sse *
|
||||
draw_vs_variant_aos_sse(struct draw_vs_variant *variant)
|
||||
{
|
||||
return (struct draw_vs_varient_aos_sse *) varient;
|
||||
return (struct draw_vs_variant_aos_sse *) variant;
|
||||
}
|
||||
|
||||
|
||||
static void vaos_set_buffer( struct draw_vs_varient *varient,
|
||||
static void vaos_set_buffer( struct draw_vs_variant *variant,
|
||||
unsigned buf,
|
||||
const void *ptr,
|
||||
unsigned stride,
|
||||
unsigned max_stride)
|
||||
{
|
||||
struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient);
|
||||
struct draw_vs_variant_aos_sse *vaos = draw_vs_variant_aos_sse(variant);
|
||||
|
||||
if (buf < vaos->nr_vb) {
|
||||
vaos->buffer[buf].base_ptr = (char *)ptr;
|
||||
|
@ -2115,12 +2115,12 @@ static void vaos_set_buffer( struct draw_vs_varient *varient,
|
|||
|
||||
|
||||
|
||||
static void PIPE_CDECL vaos_run_elts( struct draw_vs_varient *varient,
|
||||
static void PIPE_CDECL vaos_run_elts( struct draw_vs_variant *variant,
|
||||
const unsigned *elts,
|
||||
unsigned count,
|
||||
void *output_buffer )
|
||||
{
|
||||
struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient);
|
||||
struct draw_vs_variant_aos_sse *vaos = draw_vs_variant_aos_sse(variant);
|
||||
struct aos_machine *machine = vaos->draw->vs.aos_machine;
|
||||
unsigned i;
|
||||
|
||||
|
@ -2139,12 +2139,12 @@ static void PIPE_CDECL vaos_run_elts( struct draw_vs_varient *varient,
|
|||
output_buffer );
|
||||
}
|
||||
|
||||
static void PIPE_CDECL vaos_run_linear( struct draw_vs_varient *varient,
|
||||
static void PIPE_CDECL vaos_run_linear( struct draw_vs_variant *variant,
|
||||
unsigned start,
|
||||
unsigned count,
|
||||
void *output_buffer )
|
||||
{
|
||||
struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient);
|
||||
struct draw_vs_variant_aos_sse *vaos = draw_vs_variant_aos_sse(variant);
|
||||
struct aos_machine *machine = vaos->draw->vs.aos_machine;
|
||||
unsigned i;
|
||||
|
||||
|
@ -2171,9 +2171,9 @@ static void PIPE_CDECL vaos_run_linear( struct draw_vs_varient *varient,
|
|||
|
||||
|
||||
|
||||
static void vaos_destroy( struct draw_vs_varient *varient )
|
||||
static void vaos_destroy( struct draw_vs_variant *variant )
|
||||
{
|
||||
struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient);
|
||||
struct draw_vs_variant_aos_sse *vaos = draw_vs_variant_aos_sse(variant);
|
||||
|
||||
FREE( vaos->buffer );
|
||||
|
||||
|
@ -2185,11 +2185,11 @@ static void vaos_destroy( struct draw_vs_varient *varient )
|
|||
|
||||
|
||||
|
||||
static struct draw_vs_varient *varient_aos_sse( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_varient_key *key )
|
||||
static struct draw_vs_variant *variant_aos_sse( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_variant_key *key )
|
||||
{
|
||||
unsigned i;
|
||||
struct draw_vs_varient_aos_sse *vaos = CALLOC_STRUCT(draw_vs_varient_aos_sse);
|
||||
struct draw_vs_variant_aos_sse *vaos = CALLOC_STRUCT(draw_vs_variant_aos_sse);
|
||||
|
||||
if (!vaos)
|
||||
goto fail;
|
||||
|
@ -2249,17 +2249,17 @@ static struct draw_vs_varient *varient_aos_sse( struct draw_vertex_shader *vs,
|
|||
}
|
||||
|
||||
|
||||
struct draw_vs_varient *
|
||||
draw_vs_create_varient_aos_sse( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_varient_key *key )
|
||||
struct draw_vs_variant *
|
||||
draw_vs_create_variant_aos_sse( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_variant_key *key )
|
||||
{
|
||||
struct draw_vs_varient *varient = varient_aos_sse( vs, key );
|
||||
struct draw_vs_variant *variant = variant_aos_sse( vs, key );
|
||||
|
||||
if (varient == NULL) {
|
||||
varient = draw_vs_create_varient_generic( vs, key );
|
||||
if (variant == NULL) {
|
||||
variant = draw_vs_create_variant_generic( vs, key );
|
||||
}
|
||||
|
||||
return varient;
|
||||
return variant;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -98,9 +98,9 @@ struct aos_buffer {
|
|||
|
||||
|
||||
|
||||
/* This is the temporary storage used by all the aos_sse vs varients.
|
||||
/* This is the temporary storage used by all the aos_sse vs variants.
|
||||
* Create one per context and reuse by passing a pointer in at
|
||||
* vs_varient creation??
|
||||
* vs_variant creation??
|
||||
*/
|
||||
struct aos_machine {
|
||||
float input [MAX_INPUTS ][4];
|
||||
|
@ -134,7 +134,7 @@ struct aos_machine {
|
|||
|
||||
struct aos_compilation {
|
||||
struct x86_function *func;
|
||||
struct draw_vs_varient_aos_sse *vaos;
|
||||
struct draw_vs_variant_aos_sse *vaos;
|
||||
|
||||
unsigned insn_counter;
|
||||
unsigned num_immediates;
|
||||
|
@ -234,8 +234,8 @@ typedef void (PIPE_CDECL *vaos_run_linear_func)( struct aos_machine *,
|
|||
void *output_buffer);
|
||||
|
||||
|
||||
struct draw_vs_varient_aos_sse {
|
||||
struct draw_vs_varient base;
|
||||
struct draw_vs_variant_aos_sse {
|
||||
struct draw_vs_variant base;
|
||||
struct draw_context *draw;
|
||||
|
||||
struct aos_buffer *buffer;
|
||||
|
|
|
@ -203,7 +203,7 @@ draw_create_vs_exec(struct draw_context *draw,
|
|||
vs->base.prepare = vs_exec_prepare;
|
||||
vs->base.run_linear = vs_exec_run_linear;
|
||||
vs->base.delete = vs_exec_delete;
|
||||
vs->base.create_varient = draw_vs_create_varient_generic;
|
||||
vs->base.create_variant = draw_vs_create_variant_generic;
|
||||
vs->machine = draw->vs.machine;
|
||||
|
||||
return &vs->base;
|
||||
|
|
|
@ -107,7 +107,7 @@ draw_create_vs_llvm(struct draw_context *draw,
|
|||
vs->base.prepare = vs_llvm_prepare;
|
||||
vs->base.run_linear = vs_llvm_run_linear;
|
||||
vs->base.delete = vs_llvm_delete;
|
||||
vs->base.create_varient = draw_vs_create_varient_generic;
|
||||
vs->base.create_variant = draw_vs_create_variant_generic;
|
||||
|
||||
make_empty_list(&vs->variants);
|
||||
|
||||
|
|
|
@ -187,10 +187,10 @@ draw_create_vs_ppc(struct draw_context *draw,
|
|||
vs->base.draw = draw;
|
||||
#if 0
|
||||
if (1)
|
||||
vs->base.create_varient = draw_vs_varient_aos_ppc;
|
||||
vs->base.create_variant = draw_vs_variant_aos_ppc;
|
||||
else
|
||||
#endif
|
||||
vs->base.create_varient = draw_vs_create_varient_generic;
|
||||
vs->base.create_variant = draw_vs_create_variant_generic;
|
||||
vs->base.prepare = vs_ppc_prepare;
|
||||
vs->base.run_linear = vs_ppc_run_linear;
|
||||
vs->base.delete = vs_ppc_delete;
|
||||
|
|
|
@ -166,9 +166,9 @@ draw_create_vs_sse(struct draw_context *draw,
|
|||
|
||||
vs->base.draw = draw;
|
||||
if (1)
|
||||
vs->base.create_varient = draw_vs_create_varient_aos_sse;
|
||||
vs->base.create_variant = draw_vs_create_variant_aos_sse;
|
||||
else
|
||||
vs->base.create_varient = draw_vs_create_varient_generic;
|
||||
vs->base.create_variant = draw_vs_create_variant_generic;
|
||||
vs->base.prepare = vs_sse_prepare;
|
||||
vs->base.run_linear = vs_sse_run_linear;
|
||||
vs->base.delete = vs_sse_delete;
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
|
||||
/* A first pass at incorporating vertex fetch/emit functionality into
|
||||
*/
|
||||
struct draw_vs_varient_generic {
|
||||
struct draw_vs_varient base;
|
||||
struct draw_vs_variant_generic {
|
||||
struct draw_vs_variant base;
|
||||
|
||||
struct draw_vertex_shader *shader;
|
||||
struct draw_context *draw;
|
||||
|
@ -63,13 +63,13 @@ struct draw_vs_varient_generic {
|
|||
|
||||
|
||||
|
||||
static void vsvg_set_buffer( struct draw_vs_varient *varient,
|
||||
static void vsvg_set_buffer( struct draw_vs_variant *variant,
|
||||
unsigned buffer,
|
||||
const void *ptr,
|
||||
unsigned stride,
|
||||
unsigned max_index )
|
||||
{
|
||||
struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient;
|
||||
struct draw_vs_variant_generic *vsvg = (struct draw_vs_variant_generic *)variant;
|
||||
|
||||
vsvg->fetch->set_buffer(vsvg->fetch,
|
||||
buffer,
|
||||
|
@ -81,7 +81,7 @@ static void vsvg_set_buffer( struct draw_vs_varient *varient,
|
|||
|
||||
/* Mainly for debug at this stage:
|
||||
*/
|
||||
static void do_rhw_viewport( struct draw_vs_varient_generic *vsvg,
|
||||
static void do_rhw_viewport( struct draw_vs_variant_generic *vsvg,
|
||||
unsigned count,
|
||||
void *output_buffer )
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ static void do_rhw_viewport( struct draw_vs_varient_generic *vsvg,
|
|||
}
|
||||
}
|
||||
|
||||
static void do_viewport( struct draw_vs_varient_generic *vsvg,
|
||||
static void do_viewport( struct draw_vs_variant_generic *vsvg,
|
||||
unsigned count,
|
||||
void *output_buffer )
|
||||
{
|
||||
|
@ -126,12 +126,12 @@ static void do_viewport( struct draw_vs_varient_generic *vsvg,
|
|||
}
|
||||
|
||||
|
||||
static void PIPE_CDECL vsvg_run_elts( struct draw_vs_varient *varient,
|
||||
static void PIPE_CDECL vsvg_run_elts( struct draw_vs_variant *variant,
|
||||
const unsigned *elts,
|
||||
unsigned count,
|
||||
void *output_buffer)
|
||||
{
|
||||
struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient;
|
||||
struct draw_vs_variant_generic *vsvg = (struct draw_vs_variant_generic *)variant;
|
||||
unsigned temp_vertex_stride = vsvg->temp_vertex_stride;
|
||||
void *temp_buffer = MALLOC( align(count,4) * temp_vertex_stride );
|
||||
|
||||
|
@ -193,12 +193,12 @@ static void PIPE_CDECL vsvg_run_elts( struct draw_vs_varient *varient,
|
|||
}
|
||||
|
||||
|
||||
static void PIPE_CDECL vsvg_run_linear( struct draw_vs_varient *varient,
|
||||
static void PIPE_CDECL vsvg_run_linear( struct draw_vs_variant *variant,
|
||||
unsigned start,
|
||||
unsigned count,
|
||||
void *output_buffer )
|
||||
{
|
||||
struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient;
|
||||
struct draw_vs_variant_generic *vsvg = (struct draw_vs_variant_generic *)variant;
|
||||
unsigned temp_vertex_stride = vsvg->temp_vertex_stride;
|
||||
void *temp_buffer = MALLOC( align(count,4) * temp_vertex_stride );
|
||||
|
||||
|
@ -259,20 +259,20 @@ static void PIPE_CDECL vsvg_run_linear( struct draw_vs_varient *varient,
|
|||
|
||||
|
||||
|
||||
static void vsvg_destroy( struct draw_vs_varient *varient )
|
||||
static void vsvg_destroy( struct draw_vs_variant *variant )
|
||||
{
|
||||
FREE(varient);
|
||||
FREE(variant);
|
||||
}
|
||||
|
||||
|
||||
struct draw_vs_varient *
|
||||
draw_vs_create_varient_generic( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_varient_key *key )
|
||||
struct draw_vs_variant *
|
||||
draw_vs_create_variant_generic( struct draw_vertex_shader *vs,
|
||||
const struct draw_vs_variant_key *key )
|
||||
{
|
||||
unsigned i;
|
||||
struct translate_key fetch, emit;
|
||||
|
||||
struct draw_vs_varient_generic *vsvg = CALLOC_STRUCT( draw_vs_varient_generic );
|
||||
struct draw_vs_variant_generic *vsvg = CALLOC_STRUCT( draw_vs_variant_generic );
|
||||
if (vsvg == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -125,4 +125,22 @@ lp_build_const_float(struct gallivm_state *gallivm, float x)
|
|||
}
|
||||
|
||||
|
||||
/** Return constant-valued pointer to int */
|
||||
static INLINE LLVMValueRef
|
||||
lp_build_const_int_pointer(struct gallivm_state *gallivm, const void *ptr)
|
||||
{
|
||||
LLVMTypeRef int_type;
|
||||
LLVMValueRef v;
|
||||
|
||||
/* int type large enough to hold a pointer */
|
||||
int_type = LLVMIntTypeInContext(gallivm->context, 8 * sizeof(void *));
|
||||
v = LLVMConstInt(int_type, (unsigned long long) ptr, 0);
|
||||
v = LLVMBuildIntToPtr(gallivm->builder, v,
|
||||
LLVMPointerType(int_type, 0),
|
||||
"cast int to ptr");
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* !LP_BLD_CONST_H */
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "util/u_format.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_pointer.h"
|
||||
#include "util/u_string.h"
|
||||
|
||||
#include "lp_bld_arit.h"
|
||||
|
@ -511,8 +512,6 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
|||
* or incentive to optimize.
|
||||
*/
|
||||
|
||||
LLVMModuleRef module = LLVMGetGlobalParent(LLVMGetBasicBlockParent(LLVMGetInsertBlock(gallivm->builder)));
|
||||
char name[256];
|
||||
LLVMTypeRef i8t = LLVMInt8TypeInContext(gallivm->context);
|
||||
LLVMTypeRef pi8t = LLVMPointerType(i8t, 0);
|
||||
LLVMTypeRef i32t = LLVMInt32TypeInContext(gallivm->context);
|
||||
|
@ -522,19 +521,20 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
|||
LLVMValueRef res;
|
||||
unsigned k;
|
||||
|
||||
util_snprintf(name, sizeof name, "util_format_%s_fetch_rgba_8unorm",
|
||||
format_desc->short_name);
|
||||
|
||||
if (gallivm_debug & GALLIVM_DEBUG_PERF) {
|
||||
debug_printf("%s: falling back to %s\n", __FUNCTION__, name);
|
||||
debug_printf("%s: falling back to util_format_%s_fetch_rgba_8unorm\n",
|
||||
__FUNCTION__, format_desc->short_name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Declare and bind format_desc->fetch_rgba_8unorm().
|
||||
*/
|
||||
|
||||
function = LLVMGetNamedFunction(module, name);
|
||||
if (!function) {
|
||||
{
|
||||
/*
|
||||
* Function to call looks like:
|
||||
* fetch(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j)
|
||||
*/
|
||||
LLVMTypeRef ret_type;
|
||||
LLVMTypeRef arg_types[4];
|
||||
LLVMTypeRef function_type;
|
||||
|
@ -542,17 +542,19 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
|||
ret_type = LLVMVoidTypeInContext(gallivm->context);
|
||||
arg_types[0] = pi8t;
|
||||
arg_types[1] = pi8t;
|
||||
arg_types[3] = arg_types[2] = LLVMIntTypeInContext(gallivm->context, sizeof(unsigned) * 8);
|
||||
function_type = LLVMFunctionType(ret_type, arg_types, Elements(arg_types), 0);
|
||||
function = LLVMAddFunction(module, name, function_type);
|
||||
arg_types[2] = i32t;
|
||||
arg_types[3] = i32t;
|
||||
function_type = LLVMFunctionType(ret_type, arg_types,
|
||||
Elements(arg_types), 0);
|
||||
|
||||
LLVMSetFunctionCallConv(function, LLVMCCallConv);
|
||||
LLVMSetLinkage(function, LLVMExternalLinkage);
|
||||
/* make const pointer for the C fetch_rgba_8unorm function */
|
||||
function = lp_build_const_int_pointer(gallivm,
|
||||
func_to_pointer((func_pointer) format_desc->fetch_rgba_8unorm));
|
||||
|
||||
assert(LLVMIsDeclaration(function));
|
||||
|
||||
LLVMAddGlobalMapping(gallivm->engine, function,
|
||||
func_to_pointer((func_pointer)format_desc->fetch_rgba_8unorm));
|
||||
/* cast the callee pointer to the function's type */
|
||||
function = LLVMBuildBitCast(builder, function,
|
||||
LLVMPointerType(function_type, 0),
|
||||
"cast callee");
|
||||
}
|
||||
|
||||
tmp_ptr = lp_build_alloca(gallivm, i32t, "");
|
||||
|
@ -614,48 +616,55 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
|||
* or incentive to optimize.
|
||||
*/
|
||||
|
||||
LLVMModuleRef module = LLVMGetGlobalParent(LLVMGetBasicBlockParent(LLVMGetInsertBlock(builder)));
|
||||
char name[256];
|
||||
LLVMTypeRef f32t = LLVMFloatTypeInContext(gallivm->context);
|
||||
LLVMTypeRef f32x4t = LLVMVectorType(f32t, 4);
|
||||
LLVMTypeRef pf32t = LLVMPointerType(f32t, 0);
|
||||
LLVMTypeRef pi8t = LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0);
|
||||
LLVMTypeRef i32t = LLVMInt32TypeInContext(gallivm->context);
|
||||
LLVMValueRef function;
|
||||
LLVMValueRef tmp_ptr;
|
||||
LLVMValueRef tmps[LP_MAX_VECTOR_LENGTH/4];
|
||||
LLVMValueRef res;
|
||||
unsigned k;
|
||||
|
||||
util_snprintf(name, sizeof name, "util_format_%s_fetch_rgba_float",
|
||||
format_desc->short_name);
|
||||
|
||||
if (gallivm_debug & GALLIVM_DEBUG_PERF) {
|
||||
debug_printf("%s: falling back to %s\n", __FUNCTION__, name);
|
||||
debug_printf("%s: falling back to util_format_%s_fetch_rgba_float\n",
|
||||
__FUNCTION__, format_desc->short_name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Declare and bind format_desc->fetch_rgba_float().
|
||||
*/
|
||||
|
||||
function = LLVMGetNamedFunction(module, name);
|
||||
if (!function) {
|
||||
{
|
||||
/*
|
||||
* Function to call looks like:
|
||||
* fetch(float *dst, const uint8_t *src, unsigned i, unsigned j)
|
||||
*/
|
||||
LLVMTypeRef ret_type;
|
||||
LLVMTypeRef arg_types[4];
|
||||
LLVMTypeRef function_type;
|
||||
|
||||
ret_type = LLVMVoidTypeInContext(gallivm->context);
|
||||
arg_types[0] = pf32t;
|
||||
arg_types[1] = LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0);
|
||||
arg_types[3] = arg_types[2] = LLVMIntTypeInContext(gallivm->context, sizeof(unsigned) * 8);
|
||||
function_type = LLVMFunctionType(ret_type, arg_types, Elements(arg_types), 0);
|
||||
function = LLVMAddFunction(module, name, function_type);
|
||||
arg_types[1] = pi8t;
|
||||
arg_types[2] = i32t;
|
||||
arg_types[3] = i32t;
|
||||
function_type = LLVMFunctionType(ret_type, arg_types,
|
||||
Elements(arg_types), 0);
|
||||
|
||||
LLVMSetFunctionCallConv(function, LLVMCCallConv);
|
||||
LLVMSetLinkage(function, LLVMExternalLinkage);
|
||||
/* Note: we're using this casting here instead of LLVMAddGlobalMapping()
|
||||
* to work around a bug in LLVM 2.6, and for efficiency/simplicity.
|
||||
*/
|
||||
|
||||
assert(LLVMIsDeclaration(function));
|
||||
/* make const pointer for the C fetch_rgba_float function */
|
||||
function = lp_build_const_int_pointer(gallivm,
|
||||
func_to_pointer((func_pointer) format_desc->fetch_rgba_float));
|
||||
|
||||
LLVMAddGlobalMapping(gallivm->engine, function,
|
||||
func_to_pointer((func_pointer)format_desc->fetch_rgba_float));
|
||||
/* cast the callee pointer to the function's type */
|
||||
function = LLVMBuildBitCast(builder, function,
|
||||
LLVMPointerType(function_type, 0),
|
||||
"cast callee");
|
||||
}
|
||||
|
||||
tmp_ptr = lp_build_alloca(gallivm, f32x4t, "");
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "util/u_cpu_detect.h"
|
||||
#include "util/u_debug.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_simple_list.h"
|
||||
#include "lp_bld_debug.h"
|
||||
#include "lp_bld_init.h"
|
||||
|
||||
|
@ -291,12 +292,12 @@ struct callback
|
|||
{
|
||||
garbage_collect_callback_func func;
|
||||
void *cb_data;
|
||||
struct callback *prev, *next;
|
||||
};
|
||||
|
||||
|
||||
#define MAX_CALLBACKS 32
|
||||
static struct callback Callbacks[MAX_CALLBACKS];
|
||||
static unsigned NumCallbacks = 0;
|
||||
/** list of all garbage collector callbacks */
|
||||
static struct callback callback_list = {NULL, NULL, NULL, NULL};
|
||||
|
||||
|
||||
/**
|
||||
|
@ -307,20 +308,24 @@ void
|
|||
gallivm_register_garbage_collector_callback(garbage_collect_callback_func func,
|
||||
void *cb_data)
|
||||
{
|
||||
unsigned i;
|
||||
struct callback *cb;
|
||||
|
||||
for (i = 0; i < NumCallbacks; i++) {
|
||||
if (Callbacks[i].func == func && Callbacks[i].cb_data == cb_data) {
|
||||
/* already in list: no-op */
|
||||
return;
|
||||
}
|
||||
if (!callback_list.prev) {
|
||||
make_empty_list(&callback_list);
|
||||
}
|
||||
|
||||
assert(NumCallbacks < MAX_CALLBACKS);
|
||||
if (NumCallbacks < MAX_CALLBACKS) {
|
||||
Callbacks[NumCallbacks].func = func;
|
||||
Callbacks[NumCallbacks].cb_data = cb_data;
|
||||
NumCallbacks++;
|
||||
/* see if already in list */
|
||||
foreach(cb, &callback_list) {
|
||||
if (cb->func == func && cb->cb_data == cb_data)
|
||||
return;
|
||||
}
|
||||
|
||||
/* add to list */
|
||||
cb = CALLOC_STRUCT(callback);
|
||||
if (cb) {
|
||||
cb->func = func;
|
||||
cb->cb_data = cb_data;
|
||||
insert_at_head(&callback_list, cb);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -332,15 +337,13 @@ void
|
|||
gallivm_remove_garbage_collector_callback(garbage_collect_callback_func func,
|
||||
void *cb_data)
|
||||
{
|
||||
unsigned i;
|
||||
struct callback *cb;
|
||||
|
||||
for (i = 0; i < NumCallbacks; i++) {
|
||||
if (Callbacks[i].func == func && Callbacks[i].cb_data == cb_data) {
|
||||
/* found, now remove it */
|
||||
NumCallbacks--;
|
||||
for ( ; i < NumCallbacks; i++) {
|
||||
Callbacks[i] = Callbacks[i + 1];
|
||||
}
|
||||
/* search list */
|
||||
foreach(cb, &callback_list) {
|
||||
if (cb->func == func && cb->cb_data == cb_data) {
|
||||
/* found, remove it */
|
||||
remove_from_list(cb);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -354,10 +357,9 @@ gallivm_remove_garbage_collector_callback(garbage_collect_callback_func func,
|
|||
static void
|
||||
call_garbage_collector_callbacks(void)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < NumCallbacks; i++) {
|
||||
Callbacks[i].func(Callbacks[i].cb_data);
|
||||
struct callback *cb;
|
||||
foreach(cb, &callback_list) {
|
||||
cb->func(cb->cb_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1098,6 +1098,4 @@ lp_build_sample_aos(struct lp_build_sample_context *bld,
|
|||
texel_out[2] = unswizzled[2];
|
||||
texel_out[3] = unswizzled[3];
|
||||
}
|
||||
|
||||
apply_sampler_swizzle(bld, texel_out);
|
||||
}
|
||||
|
|
|
@ -187,8 +187,6 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
|
|||
border_chan_vec, texel_out[chan]);
|
||||
}
|
||||
}
|
||||
|
||||
apply_sampler_swizzle(bld, texel_out);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1268,4 +1266,6 @@ lp_build_sample_soa(struct gallivm_state *gallivm,
|
|||
}
|
||||
|
||||
lp_build_sample_compare(&bld, r, texel_out);
|
||||
|
||||
apply_sampler_swizzle(&bld, texel_out);
|
||||
}
|
||||
|
|
|
@ -136,7 +136,8 @@ tgsi_parse_token(
|
|||
static INLINE unsigned
|
||||
tgsi_num_tokens(const struct tgsi_token *tokens)
|
||||
{
|
||||
struct tgsi_header header = *(const struct tgsi_header *) tokens;
|
||||
struct tgsi_header header;
|
||||
memcpy(&header, tokens, sizeof(header));
|
||||
return header.HeaderSize + header.BodySize;
|
||||
}
|
||||
|
||||
|
|
|
@ -738,8 +738,8 @@ void util_blitter_copy_region(struct blitter_context *blitter,
|
|||
assert(!is_overlap(srcbox->x, srcbox->x + width, srcbox->y, srcbox->y + height,
|
||||
dstx, dstx + width, dsty, dsty + height));
|
||||
} else {
|
||||
assert(util_is_format_compatible(util_format_description(dst->format),
|
||||
util_format_description(src->format)));
|
||||
assert(util_is_format_compatible(util_format_description(src->format),
|
||||
util_format_description(dst->format)));
|
||||
}
|
||||
assert(src->target < PIPE_MAX_TEXTURE_TYPES);
|
||||
/* XXX should handle 3d regions */
|
||||
|
|
|
@ -52,8 +52,8 @@ void util_shorten_ubyte_elts(struct pipe_context *context,
|
|||
out_map++;
|
||||
}
|
||||
|
||||
pipe_buffer_unmap(context, *elts, src_transfer);
|
||||
pipe_buffer_unmap(context, new_elts, dst_transfer);
|
||||
pipe_buffer_unmap(context, src_transfer);
|
||||
pipe_buffer_unmap(context, dst_transfer);
|
||||
|
||||
*elts = new_elts;
|
||||
}
|
||||
|
@ -86,8 +86,8 @@ void util_rebuild_ushort_elts(struct pipe_context *context,
|
|||
out_map++;
|
||||
}
|
||||
|
||||
pipe_buffer_unmap(context, *elts, in_transfer);
|
||||
pipe_buffer_unmap(context, new_elts, out_transfer);
|
||||
pipe_buffer_unmap(context, in_transfer);
|
||||
pipe_buffer_unmap(context, out_transfer);
|
||||
|
||||
*elts = new_elts;
|
||||
}
|
||||
|
@ -120,8 +120,8 @@ void util_rebuild_uint_elts(struct pipe_context *context,
|
|||
out_map++;
|
||||
}
|
||||
|
||||
pipe_buffer_unmap(context, *elts, in_transfer);
|
||||
pipe_buffer_unmap(context, new_elts, out_transfer);
|
||||
pipe_buffer_unmap(context, in_transfer);
|
||||
pipe_buffer_unmap(context, out_transfer);
|
||||
|
||||
*elts = new_elts;
|
||||
}
|
||||
|
|
|
@ -242,7 +242,6 @@ pipe_buffer_map(struct pipe_context *pipe,
|
|||
|
||||
static INLINE void
|
||||
pipe_buffer_unmap(struct pipe_context *pipe,
|
||||
struct pipe_resource *buf,
|
||||
struct pipe_transfer *transfer)
|
||||
{
|
||||
if (transfer) {
|
||||
|
@ -341,7 +340,7 @@ pipe_buffer_read(struct pipe_context *pipe,
|
|||
if (map)
|
||||
memcpy(data, map + offset, size);
|
||||
|
||||
pipe_buffer_unmap(pipe, buf, src_transfer);
|
||||
pipe_buffer_unmap(pipe, src_transfer);
|
||||
}
|
||||
|
||||
static INLINE struct pipe_transfer *
|
||||
|
|
|
@ -108,7 +108,7 @@ my_buffer_write(struct pipe_context *pipe,
|
|||
|
||||
memcpy(map + offset, data, size);
|
||||
pipe_buffer_flush_mapped_range(pipe, transfer, offset, dirty_size);
|
||||
pipe_buffer_unmap(pipe, buf, transfer);
|
||||
pipe_buffer_unmap(pipe, transfer);
|
||||
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
|
|||
|
||||
done:
|
||||
if (map)
|
||||
pipe_buffer_unmap( upload->pipe, inbuf, transfer );
|
||||
pipe_buffer_unmap( upload->pipe, transfer );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -577,17 +577,45 @@ This instruction replicates its result.
|
|||
|
||||
.. opcode:: TEX - Texture Lookup
|
||||
|
||||
TBD
|
||||
.. math::
|
||||
|
||||
coord = src0
|
||||
|
||||
bias = 0.0
|
||||
|
||||
dst = texture_sample(unit, coord, bias)
|
||||
|
||||
|
||||
.. opcode:: TXD - Texture Lookup with Derivatives
|
||||
|
||||
TBD
|
||||
.. math::
|
||||
|
||||
coord = src0
|
||||
|
||||
ddx = src1
|
||||
|
||||
ddy = src2
|
||||
|
||||
bias = 0.0
|
||||
|
||||
dst = texture_sample_deriv(unit, coord, bias, ddx, ddy)
|
||||
|
||||
|
||||
.. opcode:: TXP - Projective Texture Lookup
|
||||
|
||||
TBD
|
||||
.. math::
|
||||
|
||||
coord.x = src0.x / src.w
|
||||
|
||||
coord.y = src0.y / src.w
|
||||
|
||||
coord.z = src0.z / src.w
|
||||
|
||||
coord.w = src0.w
|
||||
|
||||
bias = 0.0
|
||||
|
||||
dst = texture_sample(unit, coord, bias)
|
||||
|
||||
|
||||
.. opcode:: UP2H - Unpack Two 16-Bit Floats
|
||||
|
@ -729,7 +757,19 @@ This instruction replicates its result.
|
|||
|
||||
.. opcode:: TXB - Texture Lookup With Bias
|
||||
|
||||
TBD
|
||||
.. math::
|
||||
|
||||
coord.x = src.x
|
||||
|
||||
coord.y = src.y
|
||||
|
||||
coord.z = src.z
|
||||
|
||||
coord.w = 1.0
|
||||
|
||||
bias = src.z
|
||||
|
||||
dst = texture_sample(unit, coord, bias)
|
||||
|
||||
|
||||
.. opcode:: NRM - 3-component Vector Normalise
|
||||
|
@ -767,9 +807,21 @@ This instruction replicates its result.
|
|||
dst = src0.x \times src1.x + src0.y \times src1.y
|
||||
|
||||
|
||||
.. opcode:: TXL - Texture Lookup With LOD
|
||||
.. opcode:: TXL - Texture Lookup With explicit LOD
|
||||
|
||||
TBD
|
||||
.. math::
|
||||
|
||||
coord.x = src0.x
|
||||
|
||||
coord.y = src0.y
|
||||
|
||||
coord.z = src0.z
|
||||
|
||||
coord.w = 1.0
|
||||
|
||||
lod = src0.w
|
||||
|
||||
dst = texture_sample(unit, coord, lod)
|
||||
|
||||
|
||||
.. opcode:: BRK - Break
|
||||
|
|
|
@ -272,7 +272,7 @@ struct i915_context {
|
|||
#define I915_HW_PROGRAM (1<<I915_CACHE_PROGRAM)
|
||||
#define I915_HW_CONSTANTS (1<<I915_CACHE_CONSTANTS)
|
||||
#define I915_HW_IMMEDIATE (1<<(I915_MAX_CACHE+0))
|
||||
#define I915_HW_INVARIENT (1<<(I915_MAX_CACHE+1))
|
||||
#define I915_HW_INVARIANT (1<<(I915_MAX_CACHE+1))
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -976,7 +976,7 @@ i915_dump_hardware_dirty(struct i915_context *i915, const char *func)
|
|||
{I915_HW_PROGRAM, "program"},
|
||||
{I915_HW_CONSTANTS, "constants"},
|
||||
{I915_HW_IMMEDIATE, "immediate"},
|
||||
{I915_HW_INVARIENT, "invarient"},
|
||||
{I915_HW_INVARIANT, "invariant"},
|
||||
{0, NULL},
|
||||
};
|
||||
int i;
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "i915_debug.h"
|
||||
#include "i915_context.h"
|
||||
#include "i915_screen.h"
|
||||
#include "i915_surface.h"
|
||||
#include "i915_resource.h"
|
||||
#include "i915_winsys.h"
|
||||
#include "i915_public.h"
|
||||
|
|
|
@ -142,7 +142,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
|
|||
save_relocs = i915->batch->relocs;
|
||||
|
||||
/* 14 dwords, 0 relocs */
|
||||
if (i915->hardware_dirty & I915_HW_INVARIENT)
|
||||
if (i915->hardware_dirty & I915_HW_INVARIANT)
|
||||
{
|
||||
OUT_BATCH(_3DSTATE_AA_CMD |
|
||||
AA_LINE_ECAAR_WIDTH_ENABLE |
|
||||
|
|
|
@ -363,10 +363,10 @@ const struct brw_tracked_state brw_line_stipple = {
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* Misc invarient state packets
|
||||
* Misc invariant state packets
|
||||
*/
|
||||
|
||||
static int upload_invarient_state( struct brw_context *brw )
|
||||
static int upload_invariant_state( struct brw_context *brw )
|
||||
{
|
||||
{
|
||||
/* 0x61040000 Pipeline Select */
|
||||
|
@ -439,7 +439,7 @@ static int upload_invarient_state( struct brw_context *brw )
|
|||
{
|
||||
struct brw_polygon_stipple_offset bpso;
|
||||
|
||||
/* This is invarient state in gallium:
|
||||
/* This is invariant state in gallium:
|
||||
*/
|
||||
memset(&bpso, 0, sizeof(bpso));
|
||||
bpso.header.opcode = CMD_POLY_STIPPLE_OFFSET;
|
||||
|
@ -453,13 +453,13 @@ static int upload_invarient_state( struct brw_context *brw )
|
|||
return 0;
|
||||
}
|
||||
|
||||
const struct brw_tracked_state brw_invarient_state = {
|
||||
const struct brw_tracked_state brw_invariant_state = {
|
||||
.dirty = {
|
||||
.mesa = 0,
|
||||
.brw = BRW_NEW_CONTEXT,
|
||||
.cache = 0
|
||||
},
|
||||
.emit = upload_invarient_state
|
||||
.emit = upload_invariant_state
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ const struct brw_tracked_state brw_clip_prog;
|
|||
const struct brw_tracked_state brw_clip_unit;
|
||||
const struct brw_tracked_state brw_curbe_buffer;
|
||||
const struct brw_tracked_state brw_curbe_offsets;
|
||||
const struct brw_tracked_state brw_invarient_state;
|
||||
const struct brw_tracked_state brw_invariant_state;
|
||||
const struct brw_tracked_state brw_gs_prog;
|
||||
const struct brw_tracked_state brw_gs_unit;
|
||||
const struct brw_tracked_state brw_line_stipple;
|
||||
|
|
|
@ -69,7 +69,7 @@ const struct brw_tracked_state *atoms[] =
|
|||
|
||||
/* Command packets:
|
||||
*/
|
||||
&brw_invarient_state,
|
||||
&brw_invariant_state,
|
||||
&brw_state_base_address,
|
||||
|
||||
&brw_binding_table_pointers,
|
||||
|
|
|
@ -812,7 +812,7 @@ static void precalc_tex( struct brw_wm_compile *c,
|
|||
}
|
||||
|
||||
/* XXX: add GL_EXT_texture_swizzle support to gallium -- by
|
||||
* generating shader varients in mesa state tracker.
|
||||
* generating shader variants in mesa state tracker.
|
||||
*/
|
||||
|
||||
/* Release this temp if we ended up allocating it:
|
||||
|
|
|
@ -36,9 +36,7 @@
|
|||
#include "util/u_memory.h"
|
||||
#include "gallivm/lp_bld_init.h"
|
||||
#include "gallivm/lp_bld_debug.h"
|
||||
#include "gallivm/lp_bld_intr.h"
|
||||
#include "lp_context.h"
|
||||
#include "lp_screen.h"
|
||||
#include "lp_jit.h"
|
||||
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@
|
|||
#include "lp_context.h"
|
||||
#include "lp_debug.h"
|
||||
#include "lp_perf.h"
|
||||
#include "lp_screen.h"
|
||||
#include "lp_setup.h"
|
||||
#include "lp_state.h"
|
||||
#include "lp_tex_sample.h"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "nouveau/nouveau_grobj.h"
|
||||
#include "nouveau/nouveau_notifier.h"
|
||||
#include "nouveau/nouveau_resource.h"
|
||||
#include "nouveau/nouveau_pushbuf.h"
|
||||
#include "nouveau/nv04_pushbuf.h"
|
||||
|
||||
#ifndef NV04_PFIFO_MAX_PACKET_LEN
|
||||
#define NV04_PFIFO_MAX_PACKET_LEN 2047
|
||||
|
|
|
@ -71,7 +71,7 @@ nv50_transfer_constbuf(struct nv50_context *nv50,
|
|||
map += nr;
|
||||
}
|
||||
|
||||
pipe_buffer_unmap(pipe, buf, transfer);
|
||||
pipe_buffer_unmap(pipe, transfer);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#define __NOUVEAU_PUSH_H__
|
||||
#include <stdint.h>
|
||||
#include "nouveau/nouveau_pushbuf.h"
|
||||
#include "nouveau/nv04_pushbuf.h"
|
||||
#include "nv50_context.h"
|
||||
#include "nv50_resource.h"
|
||||
#include "pipe/p_defines.h"
|
||||
|
|
|
@ -284,7 +284,7 @@ nv50_draw_elements_inline(struct pipe_context *pipe,
|
|||
nzi = TRUE;
|
||||
}
|
||||
|
||||
pipe_buffer_unmap(pipe, indexBuffer, transfer);
|
||||
pipe_buffer_unmap(pipe, transfer);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <nouveau/nouveau_device.h>
|
||||
#include <nouveau/nouveau_pushbuf.h>
|
||||
#include <nouveau/nouveau_channel.h>
|
||||
#include <nouveau/nouveau_bo.h>
|
||||
#include <nouveau/nouveau_notifier.h>
|
||||
#include <nouveau/nouveau_grobj.h>
|
||||
#include <nouveau/nv04_pushbuf.h>
|
||||
#include "nv04_2d.h"
|
||||
|
||||
#include "nouveau/nv_object.xml.h"
|
||||
|
|
|
@ -1189,12 +1189,12 @@ out_err:
|
|||
static inline void
|
||||
nvfx_fp_memcpy(void* dst, const void* src, size_t len)
|
||||
{
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
#ifndef PIPE_ARCH_BIG_ENDIAN
|
||||
memcpy(dst, src, len);
|
||||
#else
|
||||
size_t i;
|
||||
for(i = 0; i < len; i += 4) {
|
||||
uint32_t v = (uint32_t*)((char*)src + i);
|
||||
uint32_t v = *(uint32_t*)((char*)src + i);
|
||||
*(uint32_t*)((char*)dst + i) = (v >> 16) | (v << 16);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
#include "nvfx_resource.h"
|
||||
|
||||
#include "nouveau/nouveau_channel.h"
|
||||
|
||||
#include "nouveau/nouveau_pushbuf.h"
|
||||
#include "nouveau/nv04_pushbuf.h"
|
||||
|
||||
static inline unsigned
|
||||
util_guess_unique_indices_count(unsigned mode, unsigned indices)
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
#include "r300_screen_buffer.h"
|
||||
#include "r300_winsys.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
static void r300_update_num_contexts(struct r300_screen *r300screen,
|
||||
int diff)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "util/u_format.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_mm.h"
|
||||
#include "util/u_simple_list.h"
|
||||
|
||||
#include "r300_context.h"
|
||||
#include "r300_cb.h"
|
||||
|
|
|
@ -425,7 +425,7 @@ static void r300_emit_draw_arrays_immediate(struct r300_context *r300,
|
|||
|
||||
if (transfer[vbi]) {
|
||||
vbuf = &r300->vertex_buffer[vbi];
|
||||
pipe_buffer_unmap(&r300->context, vbuf->buffer, transfer[vbi]);
|
||||
pipe_buffer_unmap(&r300->context, transfer[vbi]);
|
||||
transfer[vbi] = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -551,7 +551,27 @@ static void r300_draw_range_elements(struct pipe_context* pipe,
|
|||
&start, count);
|
||||
|
||||
r300_update_derived_state(r300);
|
||||
r300_upload_index_buffer(r300, &indexBuffer, indexSize, start, count, &new_offset);
|
||||
|
||||
/* Fallback for misaligned ushort indices. */
|
||||
if (indexSize == 2 && start % 2 == 1) {
|
||||
struct pipe_transfer *transfer;
|
||||
struct pipe_resource *userbuf;
|
||||
uint16_t *ptr = pipe_buffer_map(pipe, indexBuffer,
|
||||
PIPE_TRANSFER_READ, &transfer);
|
||||
|
||||
/* Copy the mapped index buffer directly to the upload buffer.
|
||||
* The start index will be aligned simply from the fact that
|
||||
* every sub-buffer in u_upload_mgr is aligned. */
|
||||
userbuf = pipe->screen->user_buffer_create(pipe->screen,
|
||||
ptr + start, count * 2,
|
||||
PIPE_BIND_INDEX_BUFFER);
|
||||
indexBuffer = userbuf;
|
||||
r300_upload_index_buffer(r300, &indexBuffer, indexSize, 0, count, &new_offset);
|
||||
pipe_resource_reference(&userbuf, NULL);
|
||||
pipe_buffer_unmap(pipe, transfer);
|
||||
} else {
|
||||
r300_upload_index_buffer(r300, &indexBuffer, indexSize, start, count, &new_offset);
|
||||
}
|
||||
|
||||
start = new_offset;
|
||||
|
||||
|
@ -750,14 +770,13 @@ static void r300_swtcl_draw_vbo(struct pipe_context* pipe,
|
|||
|
||||
for (i = 0; i < r300->vertex_buffer_count; i++) {
|
||||
if (r300->vertex_buffer[i].buffer) {
|
||||
pipe_buffer_unmap(pipe, r300->vertex_buffer[i].buffer,
|
||||
vb_transfer[i]);
|
||||
pipe_buffer_unmap(pipe, vb_transfer[i]);
|
||||
draw_set_mapped_vertex_buffer(r300->draw, i, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (indexed) {
|
||||
pipe_buffer_unmap(pipe, r300->index_buffer.buffer, ib_transfer);
|
||||
pipe_buffer_unmap(pipe, ib_transfer);
|
||||
draw_set_mapped_index_buffer(r300->draw, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -857,7 +876,7 @@ static void r300_render_unmap_vertices(struct vbuf_render* render,
|
|||
|
||||
r300render->vbo_max_used = MAX2(r300render->vbo_max_used,
|
||||
r300render->vertex_size * (max + 1));
|
||||
pipe_buffer_unmap(context, r300->vbo, r300render->vbo_transfer);
|
||||
pipe_buffer_unmap(context, r300render->vbo_transfer);
|
||||
|
||||
r300render->vbo_transfer = NULL;
|
||||
}
|
||||
|
|
|
@ -128,12 +128,11 @@ void r300_begin_vertex_translate(struct r300_context *r300)
|
|||
/* Unmap all buffers. */
|
||||
for (i = 0; i < r300->vertex_buffer_count; i++) {
|
||||
if (vb_translated[i]) {
|
||||
pipe_buffer_unmap(pipe, r300->vertex_buffer[i].buffer,
|
||||
vb_transfer[i]);
|
||||
pipe_buffer_unmap(pipe, vb_transfer[i]);
|
||||
}
|
||||
}
|
||||
|
||||
pipe_buffer_unmap(pipe, out_buffer, out_transfer);
|
||||
pipe_buffer_unmap(pipe, out_transfer);
|
||||
|
||||
/* Setup the new vertex buffer in the first free slot. */
|
||||
for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
|
||||
|
@ -204,7 +203,7 @@ void r300_translate_index_buffer(struct r300_context *r300,
|
|||
break;
|
||||
|
||||
case 2:
|
||||
if (*start % 2 != 0 || index_offset) {
|
||||
if (index_offset) {
|
||||
util_rebuild_ushort_elts(&r300->context, index_buffer, index_offset, *start, count);
|
||||
*start = 0;
|
||||
r300->validate_buffers = TRUE;
|
||||
|
|
|
@ -309,7 +309,9 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
|
|||
unsigned usage,
|
||||
unsigned geom_flags)
|
||||
{
|
||||
struct r300_winsys_screen *rws = r300_screen(screen)->rws;
|
||||
uint32_t retval = 0;
|
||||
boolean drm_2_8_0 = rws->get_value(rws, R300_VID_DRM_2_8_0);
|
||||
boolean is_r500 = r300_screen(screen)->caps.is_r500;
|
||||
boolean is_r400 = r300_screen(screen)->caps.is_r400;
|
||||
boolean is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM ||
|
||||
|
@ -363,7 +365,7 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
|
|||
PIPE_BIND_SCANOUT |
|
||||
PIPE_BIND_SHARED)) &&
|
||||
/* 2101010 cannot be rendered to on non-r5xx. */
|
||||
(is_r500 || !is_color2101010) &&
|
||||
(!is_color2101010 || (is_r500 && drm_2_8_0)) &&
|
||||
r300_is_colorbuffer_format_supported(format)) {
|
||||
retval |= usage &
|
||||
(PIPE_BIND_RENDER_TARGET |
|
||||
|
|
|
@ -1298,29 +1298,27 @@ static void r300_set_fragment_sampler_views(struct pipe_context* pipe,
|
|||
}
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
if (&state->sampler_views[i]->base != views[i]) {
|
||||
pipe_sampler_view_reference(
|
||||
(struct pipe_sampler_view**)&state->sampler_views[i],
|
||||
views[i]);
|
||||
pipe_sampler_view_reference(
|
||||
(struct pipe_sampler_view**)&state->sampler_views[i],
|
||||
views[i]);
|
||||
|
||||
if (!views[i]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* A new sampler view (= texture)... */
|
||||
dirty_tex = TRUE;
|
||||
|
||||
/* Set the texrect factor in the fragment shader.
|
||||
* Needed for RECT and NPOT fallback. */
|
||||
texture = r300_texture(views[i]->texture);
|
||||
if (texture->desc.is_npot) {
|
||||
r300_mark_atom_dirty(r300, &r300->fs_rc_constant_state);
|
||||
}
|
||||
|
||||
state->sampler_views[i]->texcache_region =
|
||||
r300_assign_texture_cache_region(view_index, real_num_views);
|
||||
view_index++;
|
||||
if (!views[i]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* A new sampler view (= texture)... */
|
||||
dirty_tex = TRUE;
|
||||
|
||||
/* Set the texrect factor in the fragment shader.
|
||||
* Needed for RECT and NPOT fallback. */
|
||||
texture = r300_texture(views[i]->texture);
|
||||
if (texture->desc.is_npot) {
|
||||
r300_mark_atom_dirty(r300, &r300->fs_rc_constant_state);
|
||||
}
|
||||
|
||||
state->sampler_views[i]->texcache_region =
|
||||
r300_assign_texture_cache_region(view_index, real_num_views);
|
||||
view_index++;
|
||||
}
|
||||
|
||||
for (i = count; i < tex_units; i++) {
|
||||
|
@ -1496,14 +1494,14 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe,
|
|||
any_user_buffer = TRUE;
|
||||
}
|
||||
|
||||
/* The stride of zero means we will be fetching only the first
|
||||
* vertex, so don't care about max_index. */
|
||||
if (!vbo->stride)
|
||||
continue;
|
||||
|
||||
if (vbo->max_index == ~0) {
|
||||
/* if no VBO stride then only one vertex value so max index is 1 */
|
||||
/* should think about converting to VS constants like svga does */
|
||||
if (!vbo->stride)
|
||||
vbo->max_index = 1;
|
||||
else
|
||||
vbo->max_index =
|
||||
(vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
|
||||
vbo->max_index =
|
||||
(vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
|
||||
}
|
||||
|
||||
max_index = MIN2(vbo->max_index, max_index);
|
||||
|
|
|
@ -481,6 +481,8 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format)
|
|||
} else {
|
||||
if (desc->channel[i].size == 16) {
|
||||
modifier |= R300_US_OUT_FMT_C4_16;
|
||||
} else if (desc->channel[i].size == 10) {
|
||||
modifier |= R300_US_OUT_FMT_C4_10;
|
||||
} else {
|
||||
/* C4_8 seems to be used for the formats whose pixel size
|
||||
* is <= 32 bits. */
|
||||
|
@ -899,7 +901,7 @@ struct pipe_surface* r300_create_surface(struct pipe_context * ctx,
|
|||
tex->desc.b.b.nr_samples,
|
||||
tex->desc.microtile,
|
||||
tex->desc.macrotile[level],
|
||||
DIM_HEIGHT);
|
||||
DIM_HEIGHT, 0);
|
||||
|
||||
surface->cbzb_height = align((surface->base.height + 1) / 2,
|
||||
tile_height);
|
||||
|
|
|
@ -34,7 +34,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
|
|||
unsigned num_samples,
|
||||
enum r300_buffer_tiling microtile,
|
||||
enum r300_buffer_tiling macrotile,
|
||||
enum r300_dim dim)
|
||||
enum r300_dim dim, boolean is_rs690)
|
||||
{
|
||||
static const unsigned table[2][5][3][2] =
|
||||
{
|
||||
|
@ -57,6 +57,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
|
|||
{{ 16, 8}, { 0, 0}, { 0, 0}} /* 128 bits per pixel */
|
||||
}
|
||||
};
|
||||
|
||||
static const unsigned aa_block[2] = {4, 8};
|
||||
unsigned tile = 0;
|
||||
unsigned pixsize = util_format_get_blocksize(format);
|
||||
|
@ -74,6 +75,14 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
|
|||
} else {
|
||||
/* Standard alignment. */
|
||||
tile = table[macrotile][util_logbase2(pixsize)][microtile][dim];
|
||||
if (macrotile == 0 && is_rs690 && dim == DIM_WIDTH) {
|
||||
int align;
|
||||
int h_tile;
|
||||
h_tile = table[macrotile][util_logbase2(pixsize)][microtile][DIM_HEIGHT];
|
||||
align = 64 / (pixsize * h_tile);
|
||||
if (tile < align)
|
||||
tile = align;
|
||||
}
|
||||
}
|
||||
|
||||
assert(tile);
|
||||
|
@ -89,7 +98,7 @@ static boolean r300_texture_macro_switch(struct r300_texture_desc *desc,
|
|||
unsigned tile, texdim;
|
||||
|
||||
tile = r300_get_pixel_alignment(desc->b.b.format, desc->b.b.nr_samples,
|
||||
desc->microtile, R300_BUFFER_TILED, dim);
|
||||
desc->microtile, R300_BUFFER_TILED, dim, 0);
|
||||
if (dim == DIM_WIDTH) {
|
||||
texdim = u_minify(desc->width0, level);
|
||||
} else {
|
||||
|
@ -113,6 +122,9 @@ static unsigned r300_texture_get_stride(struct r300_screen *screen,
|
|||
unsigned level)
|
||||
{
|
||||
unsigned tile_width, width, stride;
|
||||
boolean is_rs690 = (screen->caps.family == CHIP_FAMILY_RS600 ||
|
||||
screen->caps.family == CHIP_FAMILY_RS690 ||
|
||||
screen->caps.family == CHIP_FAMILY_RS740);
|
||||
|
||||
if (desc->stride_in_bytes_override)
|
||||
return desc->stride_in_bytes_override;
|
||||
|
@ -131,38 +143,14 @@ static unsigned r300_texture_get_stride(struct r300_screen *screen,
|
|||
desc->b.b.nr_samples,
|
||||
desc->microtile,
|
||||
desc->macrotile[level],
|
||||
DIM_WIDTH);
|
||||
DIM_WIDTH, is_rs690);
|
||||
width = align(width, tile_width);
|
||||
|
||||
stride = util_format_get_stride(desc->b.b.format, width);
|
||||
|
||||
/* Some IGPs need a minimum stride of 64 bytes, hmm... */
|
||||
if (!desc->macrotile[level] &&
|
||||
(screen->caps.family == CHIP_FAMILY_RS600 ||
|
||||
screen->caps.family == CHIP_FAMILY_RS690 ||
|
||||
screen->caps.family == CHIP_FAMILY_RS740)) {
|
||||
unsigned min_stride;
|
||||
|
||||
if (desc->microtile) {
|
||||
unsigned tile_height =
|
||||
r300_get_pixel_alignment(desc->b.b.format,
|
||||
desc->b.b.nr_samples,
|
||||
desc->microtile,
|
||||
desc->macrotile[level],
|
||||
DIM_HEIGHT);
|
||||
|
||||
min_stride = 64 / tile_height;
|
||||
} else {
|
||||
min_stride = 64;
|
||||
}
|
||||
|
||||
return stride < min_stride ? min_stride : stride;
|
||||
}
|
||||
|
||||
/* The alignment to 32 bytes is sort of implied by the layout... */
|
||||
return stride;
|
||||
} else {
|
||||
return align(util_format_get_stride(desc->b.b.format, width), 32);
|
||||
return align(util_format_get_stride(desc->b.b.format, width), is_rs690 ? 64 : 32);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,7 +167,7 @@ static unsigned r300_texture_get_nblocksy(struct r300_texture_desc *desc,
|
|||
desc->b.b.nr_samples,
|
||||
desc->microtile,
|
||||
desc->macrotile[level],
|
||||
DIM_HEIGHT);
|
||||
DIM_HEIGHT, 0);
|
||||
height = align(height, tile_height);
|
||||
|
||||
/* This is needed for the kernel checker, unfortunately. */
|
||||
|
|
|
@ -41,7 +41,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
|
|||
unsigned num_samples,
|
||||
enum r300_buffer_tiling microtile,
|
||||
enum r300_buffer_tiling macrotile,
|
||||
enum r300_dim dim);
|
||||
enum r300_dim dim, boolean is_rs690);
|
||||
|
||||
boolean r300_texture_desc_init(struct r300_screen *rscreen,
|
||||
struct r300_texture_desc *desc,
|
||||
|
|
|
@ -51,8 +51,9 @@ enum r300_value_id {
|
|||
R300_VID_GB_PIPES,
|
||||
R300_VID_Z_PIPES,
|
||||
R300_VID_SQUARE_TILING_SUPPORT,
|
||||
R300_VID_DRM_2_3_0,
|
||||
R300_VID_DRM_2_6_0,
|
||||
R300_VID_DRM_2_3_0, /* R500 VAP regs, MSPOS regs, fixed tex3D size checking */
|
||||
R300_VID_DRM_2_6_0, /* Hyper-Z, GB_Z_PEQ_CONFIG on rv350->r4xx, R500 FG_ALPHA_VALUE */
|
||||
R300_VID_DRM_2_8_0, /* R500 US_FORMAT regs, R500 ARGB2101010 colorbuffer */
|
||||
R300_CAN_HYPERZ,
|
||||
};
|
||||
|
||||
|
|
|
@ -770,8 +770,6 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
|
|||
|
||||
util_copy_framebuffer_state(&rctx->framebuffer, state);
|
||||
|
||||
rctx->pframebuffer = &rctx->framebuffer;
|
||||
|
||||
/* build states */
|
||||
for (int i = 0; i < state->nr_cbufs; i++) {
|
||||
evergreen_cb(rctx, rstate, state, i);
|
||||
|
@ -1295,11 +1293,6 @@ void evergreen_vertex_buffer_update(struct r600_pipe_context *rctx)
|
|||
if (rctx->vertex_elements == NULL || !rctx->nvertex_buffer)
|
||||
return;
|
||||
|
||||
/* delete previous translated vertex elements */
|
||||
if (rctx->tran.new_velems) {
|
||||
r600_end_vertex_translate(rctx);
|
||||
}
|
||||
|
||||
if (rctx->vertex_elements->incompatible_layout) {
|
||||
/* translate rebind new vertex elements so
|
||||
* return once translated
|
||||
|
@ -1332,16 +1325,16 @@ void evergreen_vertex_buffer_update(struct r600_pipe_context *rctx)
|
|||
vbuffer_index = rctx->vertex_elements->elements[i].vertex_buffer_index;
|
||||
vertex_buffer = &rctx->vertex_buffer[vbuffer_index];
|
||||
rbuffer = (struct r600_resource*)vertex_buffer->buffer;
|
||||
offset = rctx->vertex_elements->vbuffer_offset[i] +
|
||||
vertex_buffer->buffer_offset +
|
||||
r600_bo_offset(rbuffer->bo);
|
||||
offset = rctx->vertex_elements->vbuffer_offset[i];
|
||||
} else {
|
||||
/* bind vertex buffer once */
|
||||
vertex_buffer = &rctx->vertex_buffer[i];
|
||||
rbuffer = (struct r600_resource*)vertex_buffer->buffer;
|
||||
offset = vertex_buffer->buffer_offset +
|
||||
r600_bo_offset(rbuffer->bo);
|
||||
offset = 0;
|
||||
}
|
||||
if (vertex_buffer == NULL || rbuffer == NULL)
|
||||
continue;
|
||||
offset += vertex_buffer->buffer_offset + r600_bo_offset(rbuffer->bo);
|
||||
|
||||
r600_pipe_state_add_reg(rstate, R_030000_RESOURCE0_WORD0,
|
||||
offset, 0xFFFFFFFF, rbuffer->bo);
|
||||
|
@ -1364,7 +1357,7 @@ void evergreen_vertex_buffer_update(struct r600_pipe_context *rctx)
|
|||
0x00000000, 0xFFFFFFFF, NULL);
|
||||
r600_pipe_state_add_reg(rstate, R_03001C_RESOURCE0_WORD7,
|
||||
0xC0000000, 0xFFFFFFFF, NULL);
|
||||
evergreen_fs_resource_set(&rctx->ctx, rstate, i);
|
||||
evergreen_context_pipe_state_set_fs_resource(&rctx->ctx, rstate, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -284,10 +284,6 @@ void r600_context_queries_resume(struct r600_context *ctx);
|
|||
|
||||
int evergreen_context_init(struct r600_context *ctx, struct radeon *radeon);
|
||||
void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *draw);
|
||||
void evergreen_ps_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
|
||||
void evergreen_vs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
|
||||
void evergreen_fs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
|
||||
|
||||
void evergreen_context_pipe_state_set_ps_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
|
||||
void evergreen_context_pipe_state_set_vs_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
|
||||
void evergreen_context_pipe_state_set_fs_resource(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid);
|
||||
|
|
|
@ -103,7 +103,7 @@ static void r600_buffer_destroy(struct pipe_screen *screen,
|
|||
{
|
||||
struct r600_resource_buffer *rbuffer = r600_buffer(buf);
|
||||
|
||||
if (!rbuffer->uploaded && rbuffer->r.bo) {
|
||||
if (rbuffer->r.bo) {
|
||||
r600_bo_reference((struct radeon*)screen->winsys, &rbuffer->r.bo, NULL);
|
||||
}
|
||||
rbuffer->r.bo = NULL;
|
||||
|
|
|
@ -136,7 +136,6 @@ struct r600_upload;
|
|||
struct r600_pipe_context {
|
||||
struct pipe_context context;
|
||||
struct blitter_context *blitter;
|
||||
struct pipe_framebuffer_state *pframebuffer;
|
||||
unsigned family;
|
||||
void *custom_dsa_flush;
|
||||
struct r600_screen *screen;
|
||||
|
|
|
@ -1421,7 +1421,7 @@ static int tgsi_pow(struct r600_shader_ctx *ctx)
|
|||
return r;
|
||||
/* b * LOG2(a) */
|
||||
memset(&alu, 0, sizeof(struct r600_bc_alu));
|
||||
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_IEEE);
|
||||
alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL);
|
||||
r = tgsi_src(ctx, &inst->Src[1], &alu.src[0]);
|
||||
if (r)
|
||||
return r;
|
||||
|
|
|
@ -135,11 +135,6 @@ void r600_vertex_buffer_update(struct r600_pipe_context *rctx)
|
|||
if (rctx->vertex_elements == NULL || !rctx->nvertex_buffer)
|
||||
return;
|
||||
|
||||
/* delete previous translated vertex elements */
|
||||
if (rctx->tran.new_velems) {
|
||||
r600_end_vertex_translate(rctx);
|
||||
}
|
||||
|
||||
if (rctx->vertex_elements->incompatible_layout) {
|
||||
/* translate rebind new vertex elements so
|
||||
* return once translated
|
||||
|
@ -172,16 +167,16 @@ void r600_vertex_buffer_update(struct r600_pipe_context *rctx)
|
|||
vbuffer_index = rctx->vertex_elements->elements[i].vertex_buffer_index;
|
||||
vertex_buffer = &rctx->vertex_buffer[vbuffer_index];
|
||||
rbuffer = (struct r600_resource*)vertex_buffer->buffer;
|
||||
offset = rctx->vertex_elements->vbuffer_offset[i] +
|
||||
vertex_buffer->buffer_offset +
|
||||
r600_bo_offset(rbuffer->bo);
|
||||
offset = rctx->vertex_elements->vbuffer_offset[i];
|
||||
} else {
|
||||
/* bind vertex buffer once */
|
||||
vertex_buffer = &rctx->vertex_buffer[i];
|
||||
rbuffer = (struct r600_resource*)vertex_buffer->buffer;
|
||||
offset = vertex_buffer->buffer_offset +
|
||||
r600_bo_offset(rbuffer->bo);
|
||||
offset = 0;
|
||||
}
|
||||
if (vertex_buffer == NULL || rbuffer == NULL)
|
||||
continue;
|
||||
offset += vertex_buffer->buffer_offset + r600_bo_offset(rbuffer->bo);
|
||||
|
||||
r600_pipe_state_add_reg(rstate, R_038000_RESOURCE0_WORD0,
|
||||
offset, 0xFFFFFFFF, rbuffer->bo);
|
||||
|
@ -280,7 +275,6 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
|
|||
{
|
||||
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
|
||||
struct r600_drawl draw;
|
||||
boolean translate = FALSE;
|
||||
|
||||
memset(&draw, 0, sizeof(struct r600_drawl));
|
||||
draw.ctx = ctx;
|
||||
|
@ -312,9 +306,6 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
|
|||
}
|
||||
r600_draw_common(&draw);
|
||||
|
||||
if (translate)
|
||||
r600_end_vertex_translate(rctx);
|
||||
|
||||
pipe_resource_reference(&draw.index_buffer, NULL);
|
||||
}
|
||||
|
||||
|
@ -1039,8 +1030,6 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
|
|||
|
||||
util_copy_framebuffer_state(&rctx->framebuffer, state);
|
||||
|
||||
rctx->pframebuffer = &rctx->framebuffer;
|
||||
|
||||
/* build states */
|
||||
for (int i = 0; i < state->nr_cbufs; i++) {
|
||||
r600_cb(rctx, rstate, state, i);
|
||||
|
|
|
@ -119,6 +119,11 @@ void r600_bind_vertex_elements(struct pipe_context *ctx, void *state)
|
|||
struct r600_pipe_context *rctx = (struct r600_pipe_context *)ctx;
|
||||
struct r600_vertex_element *v = (struct r600_vertex_element*)state;
|
||||
|
||||
/* delete previous translated vertex elements */
|
||||
if (rctx->tran.new_velems) {
|
||||
r600_end_vertex_translate(rctx);
|
||||
}
|
||||
|
||||
rctx->vertex_elements = v;
|
||||
if (v) {
|
||||
rctx->states[v->rstate.id] = &v->rstate;
|
||||
|
@ -174,8 +179,16 @@ void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count,
|
|||
struct pipe_vertex_buffer *vbo;
|
||||
unsigned max_index = (unsigned)-1;
|
||||
|
||||
for (int i = 0; i < rctx->nvertex_buffer; i++) {
|
||||
pipe_resource_reference(&rctx->vertex_buffer[i].buffer, NULL);
|
||||
if (rctx->family >= CHIP_CEDAR) {
|
||||
for (int i = 0; i < rctx->nvertex_buffer; i++) {
|
||||
pipe_resource_reference(&rctx->vertex_buffer[i].buffer, NULL);
|
||||
evergreen_context_pipe_state_set_fs_resource(&rctx->ctx, NULL, i);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < rctx->nvertex_buffer; i++) {
|
||||
pipe_resource_reference(&rctx->vertex_buffer[i].buffer, NULL);
|
||||
r600_context_pipe_state_set_fs_resource(&rctx->ctx, NULL, i);
|
||||
}
|
||||
}
|
||||
memcpy(rctx->vertex_buffer, buffers, sizeof(struct pipe_vertex_buffer) * count);
|
||||
|
||||
|
@ -183,15 +196,19 @@ void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count,
|
|||
vbo = (struct pipe_vertex_buffer*)&buffers[i];
|
||||
|
||||
rctx->vertex_buffer[i].buffer = NULL;
|
||||
if (buffers[i].buffer == NULL)
|
||||
continue;
|
||||
if (r600_buffer_is_user_buffer(buffers[i].buffer))
|
||||
rctx->any_user_vbs = TRUE;
|
||||
pipe_resource_reference(&rctx->vertex_buffer[i].buffer, buffers[i].buffer);
|
||||
|
||||
/* The stride of zero means we will be fetching only the first
|
||||
* vertex, so don't care about max_index. */
|
||||
if (!vbo->stride)
|
||||
continue;
|
||||
|
||||
if (vbo->max_index == ~0) {
|
||||
if (!vbo->stride)
|
||||
vbo->max_index = 1;
|
||||
else
|
||||
vbo->max_index = (vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
|
||||
vbo->max_index = (vbo->buffer->width0 - vbo->buffer_offset) / vbo->stride;
|
||||
}
|
||||
max_index = MIN2(vbo->max_index, max_index);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ void r600_begin_vertex_translate(struct r600_pipe_context *rctx)
|
|||
struct pipe_resource *out_buffer;
|
||||
unsigned i, num_verts;
|
||||
struct pipe_vertex_element new_velems[PIPE_MAX_ATTRIBS];
|
||||
void *tmp;
|
||||
|
||||
/* Initialize the translate key, i.e. the recipe how vertices should be
|
||||
* translated. */
|
||||
|
@ -124,12 +125,11 @@ void r600_begin_vertex_translate(struct r600_pipe_context *rctx)
|
|||
/* Unmap all buffers. */
|
||||
for (i = 0; i < rctx->nvertex_buffer; i++) {
|
||||
if (vb_translated[i]) {
|
||||
pipe_buffer_unmap(pipe, rctx->vertex_buffer[i].buffer,
|
||||
vb_transfer[i]);
|
||||
pipe_buffer_unmap(pipe, vb_transfer[i]);
|
||||
}
|
||||
}
|
||||
|
||||
pipe_buffer_unmap(pipe, out_buffer, out_transfer);
|
||||
pipe_buffer_unmap(pipe, out_transfer);
|
||||
|
||||
/* Setup the new vertex buffer in the first free slot. */
|
||||
for (i = 0; i < PIPE_MAX_ATTRIBS; i++) {
|
||||
|
@ -159,8 +159,9 @@ void r600_begin_vertex_translate(struct r600_pipe_context *rctx)
|
|||
}
|
||||
}
|
||||
|
||||
rctx->tran.new_velems = pipe->create_vertex_elements_state(pipe, ve->count, new_velems);
|
||||
pipe->bind_vertex_elements_state(pipe, rctx->tran.new_velems);
|
||||
tmp = pipe->create_vertex_elements_state(pipe, ve->count, new_velems);
|
||||
pipe->bind_vertex_elements_state(pipe, tmp);
|
||||
rctx->tran.new_velems = tmp;
|
||||
|
||||
pipe_resource_reference(&out_buffer, NULL);
|
||||
}
|
||||
|
@ -173,15 +174,11 @@ void r600_end_vertex_translate(struct r600_pipe_context *rctx)
|
|||
return;
|
||||
}
|
||||
/* Restore vertex elements. */
|
||||
if (rctx->vertex_elements == rctx->tran.new_velems) {
|
||||
pipe->bind_vertex_elements_state(pipe, NULL);
|
||||
}
|
||||
pipe->delete_vertex_elements_state(pipe, rctx->tran.new_velems);
|
||||
rctx->tran.new_velems = NULL;
|
||||
|
||||
/* Delete the now-unused VBO. */
|
||||
pipe_resource_reference(&rctx->vertex_buffer[rctx->tran.vb_slot].buffer,
|
||||
NULL);
|
||||
pipe_resource_reference(&rctx->vertex_buffer[rctx->tran.vb_slot].buffer, NULL);
|
||||
}
|
||||
|
||||
void r600_translate_index_buffer(struct r600_pipe_context *r600,
|
||||
|
|
|
@ -69,6 +69,7 @@ void r600_upload_flush(struct r600_upload *upload)
|
|||
upload->default_size = MAX2(upload->total_alloc_size, upload->default_size);
|
||||
upload->total_alloc_size = 0;
|
||||
upload->size = 0;
|
||||
upload->offset = 0;
|
||||
upload->ptr = NULL;
|
||||
upload->buffer = NULL;
|
||||
}
|
||||
|
@ -105,7 +106,8 @@ int r600_upload_buffer(struct r600_upload *upload, unsigned offset,
|
|||
memcpy(upload->ptr + upload->offset, (uint8_t *) in_ptr + offset, size);
|
||||
*out_offset = upload->offset;
|
||||
*out_size = upload->size;
|
||||
*out_buffer = upload->buffer;
|
||||
*out_buffer = NULL;
|
||||
r600_bo_reference(upload->rctx->radeon, out_buffer, upload->buffer);
|
||||
upload->offset += alloc_size;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -154,9 +154,9 @@ struct softpipe_context {
|
|||
|
||||
/** TGSI exec things */
|
||||
struct {
|
||||
struct sp_sampler_varient *geom_samplers_list[PIPE_MAX_GEOMETRY_SAMPLERS];
|
||||
struct sp_sampler_varient *vert_samplers_list[PIPE_MAX_VERTEX_SAMPLERS];
|
||||
struct sp_sampler_varient *frag_samplers_list[PIPE_MAX_SAMPLERS];
|
||||
struct sp_sampler_variant *geom_samplers_list[PIPE_MAX_GEOMETRY_SAMPLERS];
|
||||
struct sp_sampler_variant *vert_samplers_list[PIPE_MAX_VERTEX_SAMPLERS];
|
||||
struct sp_sampler_variant *frag_samplers_list[PIPE_MAX_SAMPLERS];
|
||||
} tgsi;
|
||||
|
||||
struct tgsi_exec_machine *fs_machine;
|
||||
|
@ -192,7 +192,7 @@ softpipe_context( struct pipe_context *pipe )
|
|||
}
|
||||
|
||||
void
|
||||
softpipe_reset_sampler_varients(struct softpipe_context *softpipe);
|
||||
softpipe_reset_sampler_variants(struct softpipe_context *softpipe);
|
||||
|
||||
struct pipe_context *
|
||||
softpipe_create_context( struct pipe_screen *, void *priv );
|
||||
|
|
|
@ -197,7 +197,7 @@ update_tgsi_samplers( struct softpipe_context *softpipe )
|
|||
{
|
||||
unsigned i;
|
||||
|
||||
softpipe_reset_sampler_varients( softpipe );
|
||||
softpipe_reset_sampler_variants( softpipe );
|
||||
|
||||
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
|
||||
struct softpipe_tex_tile_cache *tc = softpipe->tex_cache[i];
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
|
||||
struct sp_sampler {
|
||||
struct pipe_sampler_state base;
|
||||
struct sp_sampler_varient *varients;
|
||||
struct sp_sampler_varient *current;
|
||||
struct sp_sampler_variant *variants;
|
||||
struct sp_sampler_variant *current;
|
||||
};
|
||||
|
||||
static struct sp_sampler *sp_sampler( struct pipe_sampler_state *sampler )
|
||||
|
@ -60,7 +60,7 @@ softpipe_create_sampler_state(struct pipe_context *pipe,
|
|||
struct sp_sampler *sp_sampler = CALLOC_STRUCT(sp_sampler);
|
||||
|
||||
sp_sampler->base = *sampler;
|
||||
sp_sampler->varients = NULL;
|
||||
sp_sampler->variants = NULL;
|
||||
|
||||
return (void *)sp_sampler;
|
||||
}
|
||||
|
@ -277,23 +277,24 @@ softpipe_set_geometry_sampler_views(struct pipe_context *pipe,
|
|||
|
||||
|
||||
/**
|
||||
* Find/create an sp_sampler_varient object for sampling the given texture,
|
||||
* Find/create an sp_sampler_variant object for sampling the given texture,
|
||||
* sampler and tex unit.
|
||||
*
|
||||
* Note that the tex unit is significant. We can't re-use a sampler
|
||||
* varient for multiple texture units because the sampler varient contains
|
||||
* variant for multiple texture units because the sampler variant contains
|
||||
* the texture object pointer. If the texture object pointer were stored
|
||||
* somewhere outside the sampler varient, we could re-use samplers for
|
||||
* somewhere outside the sampler variant, we could re-use samplers for
|
||||
* multiple texture units.
|
||||
*/
|
||||
static struct sp_sampler_varient *
|
||||
get_sampler_varient( unsigned unit,
|
||||
static struct sp_sampler_variant *
|
||||
get_sampler_variant( unsigned unit,
|
||||
struct sp_sampler *sampler,
|
||||
struct pipe_sampler_view *view,
|
||||
struct pipe_resource *resource,
|
||||
unsigned processor )
|
||||
{
|
||||
struct softpipe_resource *sp_texture = softpipe_resource(resource);
|
||||
struct sp_sampler_varient *v = NULL;
|
||||
struct sp_sampler_variant *v = NULL;
|
||||
union sp_sampler_key key;
|
||||
|
||||
/* if this fails, widen the key.unit field and update this assertion */
|
||||
|
@ -303,6 +304,10 @@ get_sampler_varient( unsigned unit,
|
|||
key.bits.is_pot = sp_texture->pot;
|
||||
key.bits.processor = processor;
|
||||
key.bits.unit = unit;
|
||||
key.bits.swizzle_r = view->swizzle_r;
|
||||
key.bits.swizzle_g = view->swizzle_g;
|
||||
key.bits.swizzle_b = view->swizzle_b;
|
||||
key.bits.swizzle_a = view->swizzle_a;
|
||||
key.bits.pad = 0;
|
||||
|
||||
if (sampler->current &&
|
||||
|
@ -311,14 +316,14 @@ get_sampler_varient( unsigned unit,
|
|||
}
|
||||
|
||||
if (v == NULL) {
|
||||
for (v = sampler->varients; v; v = v->next)
|
||||
for (v = sampler->variants; v; v = v->next)
|
||||
if (v->key.value == key.value)
|
||||
break;
|
||||
|
||||
if (v == NULL) {
|
||||
v = sp_create_sampler_varient( &sampler->base, key );
|
||||
v->next = sampler->varients;
|
||||
sampler->varients = v;
|
||||
v = sp_create_sampler_variant( &sampler->base, key );
|
||||
v->next = sampler->variants;
|
||||
sampler->variants = v;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -328,7 +333,7 @@ get_sampler_varient( unsigned unit,
|
|||
|
||||
|
||||
void
|
||||
softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
|
||||
softpipe_reset_sampler_variants(struct softpipe_context *softpipe)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -345,12 +350,13 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
|
|||
}
|
||||
|
||||
softpipe->tgsi.vert_samplers_list[i] =
|
||||
get_sampler_varient( i,
|
||||
get_sampler_variant( i,
|
||||
sp_sampler(softpipe->vertex_samplers[i]),
|
||||
softpipe->vertex_sampler_views[i],
|
||||
texture,
|
||||
TGSI_PROCESSOR_VERTEX );
|
||||
|
||||
sp_sampler_varient_bind_texture( softpipe->tgsi.vert_samplers_list[i],
|
||||
sp_sampler_variant_bind_texture( softpipe->tgsi.vert_samplers_list[i],
|
||||
softpipe->vertex_tex_cache[i],
|
||||
texture );
|
||||
}
|
||||
|
@ -366,13 +372,14 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
|
|||
}
|
||||
|
||||
softpipe->tgsi.geom_samplers_list[i] =
|
||||
get_sampler_varient(
|
||||
get_sampler_variant(
|
||||
i,
|
||||
sp_sampler(softpipe->geometry_samplers[i]),
|
||||
softpipe->geometry_sampler_views[i],
|
||||
texture,
|
||||
TGSI_PROCESSOR_GEOMETRY );
|
||||
|
||||
sp_sampler_varient_bind_texture(
|
||||
sp_sampler_variant_bind_texture(
|
||||
softpipe->tgsi.geom_samplers_list[i],
|
||||
softpipe->geometry_tex_cache[i],
|
||||
texture );
|
||||
|
@ -389,12 +396,13 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
|
|||
}
|
||||
|
||||
softpipe->tgsi.frag_samplers_list[i] =
|
||||
get_sampler_varient( i,
|
||||
get_sampler_variant( i,
|
||||
sp_sampler(softpipe->sampler[i]),
|
||||
softpipe->sampler_views[i],
|
||||
texture,
|
||||
TGSI_PROCESSOR_FRAGMENT );
|
||||
|
||||
sp_sampler_varient_bind_texture( softpipe->tgsi.frag_samplers_list[i],
|
||||
sp_sampler_variant_bind_texture( softpipe->tgsi.frag_samplers_list[i],
|
||||
softpipe->tex_cache[i],
|
||||
texture );
|
||||
}
|
||||
|
@ -406,11 +414,11 @@ softpipe_delete_sampler_state(struct pipe_context *pipe,
|
|||
void *sampler)
|
||||
{
|
||||
struct sp_sampler *sp_sampler = (struct sp_sampler *)sampler;
|
||||
struct sp_sampler_varient *v, *tmp;
|
||||
struct sp_sampler_variant *v, *tmp;
|
||||
|
||||
for (v = sp_sampler->varients; v; v = tmp) {
|
||||
for (v = sp_sampler->variants; v; v = tmp) {
|
||||
tmp = v->next;
|
||||
sp_sampler_varient_destroy(v);
|
||||
sp_sampler_variant_destroy(v);
|
||||
}
|
||||
|
||||
FREE( sampler );
|
||||
|
|
|
@ -545,7 +545,7 @@ wrap_linear_unorm_clamp_to_edge(const float s[4], unsigned size,
|
|||
* derivatives w.r.t X and Y, then compute lambda (level of detail).
|
||||
*/
|
||||
static float
|
||||
compute_lambda_1d(const struct sp_sampler_varient *samp,
|
||||
compute_lambda_1d(const struct sp_sampler_variant *samp,
|
||||
const float s[QUAD_SIZE],
|
||||
const float t[QUAD_SIZE],
|
||||
const float p[QUAD_SIZE])
|
||||
|
@ -560,7 +560,7 @@ compute_lambda_1d(const struct sp_sampler_varient *samp,
|
|||
|
||||
|
||||
static float
|
||||
compute_lambda_2d(const struct sp_sampler_varient *samp,
|
||||
compute_lambda_2d(const struct sp_sampler_variant *samp,
|
||||
const float s[QUAD_SIZE],
|
||||
const float t[QUAD_SIZE],
|
||||
const float p[QUAD_SIZE])
|
||||
|
@ -579,7 +579,7 @@ compute_lambda_2d(const struct sp_sampler_varient *samp,
|
|||
|
||||
|
||||
static float
|
||||
compute_lambda_3d(const struct sp_sampler_varient *samp,
|
||||
compute_lambda_3d(const struct sp_sampler_variant *samp,
|
||||
const float s[QUAD_SIZE],
|
||||
const float t[QUAD_SIZE],
|
||||
const float p[QUAD_SIZE])
|
||||
|
@ -608,7 +608,7 @@ compute_lambda_3d(const struct sp_sampler_varient *samp,
|
|||
* Since there aren't derivatives to use, just return 0.
|
||||
*/
|
||||
static float
|
||||
compute_lambda_vert(const struct sp_sampler_varient *samp,
|
||||
compute_lambda_vert(const struct sp_sampler_variant *samp,
|
||||
const float s[QUAD_SIZE],
|
||||
const float t[QUAD_SIZE],
|
||||
const float p[QUAD_SIZE])
|
||||
|
@ -634,7 +634,7 @@ compute_lambda_vert(const struct sp_sampler_varient *samp,
|
|||
|
||||
|
||||
static INLINE const float *
|
||||
get_texel_2d_no_border(const struct sp_sampler_varient *samp,
|
||||
get_texel_2d_no_border(const struct sp_sampler_variant *samp,
|
||||
union tex_tile_address addr, int x, int y)
|
||||
{
|
||||
const struct softpipe_tex_cached_tile *tile;
|
||||
|
@ -651,7 +651,7 @@ get_texel_2d_no_border(const struct sp_sampler_varient *samp,
|
|||
|
||||
|
||||
static INLINE const float *
|
||||
get_texel_2d(const struct sp_sampler_varient *samp,
|
||||
get_texel_2d(const struct sp_sampler_variant *samp,
|
||||
union tex_tile_address addr, int x, int y)
|
||||
{
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
|
@ -659,8 +659,7 @@ get_texel_2d(const struct sp_sampler_varient *samp,
|
|||
|
||||
if (x < 0 || x >= (int) u_minify(texture->width0, level) ||
|
||||
y < 0 || y >= (int) u_minify(texture->height0, level)) {
|
||||
return sp_tex_tile_cache_border_color(samp->cache,
|
||||
samp->sampler->border_color);
|
||||
return samp->sampler->border_color;
|
||||
}
|
||||
else {
|
||||
return get_texel_2d_no_border( samp, addr, x, y );
|
||||
|
@ -671,7 +670,7 @@ get_texel_2d(const struct sp_sampler_varient *samp,
|
|||
/* Gather a quad of adjacent texels within a tile:
|
||||
*/
|
||||
static INLINE void
|
||||
get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_varient *samp,
|
||||
get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_variant *samp,
|
||||
union tex_tile_address addr,
|
||||
unsigned x, unsigned y,
|
||||
const float *out[4])
|
||||
|
@ -695,7 +694,7 @@ get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_varient *samp,
|
|||
/* Gather a quad of potentially non-adjacent texels:
|
||||
*/
|
||||
static INLINE void
|
||||
get_texel_quad_2d_no_border(const struct sp_sampler_varient *samp,
|
||||
get_texel_quad_2d_no_border(const struct sp_sampler_variant *samp,
|
||||
union tex_tile_address addr,
|
||||
int x0, int y0,
|
||||
int x1, int y1,
|
||||
|
@ -710,7 +709,7 @@ get_texel_quad_2d_no_border(const struct sp_sampler_varient *samp,
|
|||
/* Can involve a lot of unnecessary checks for border color:
|
||||
*/
|
||||
static INLINE void
|
||||
get_texel_quad_2d(const struct sp_sampler_varient *samp,
|
||||
get_texel_quad_2d(const struct sp_sampler_variant *samp,
|
||||
union tex_tile_address addr,
|
||||
int x0, int y0,
|
||||
int x1, int y1,
|
||||
|
@ -724,10 +723,10 @@ get_texel_quad_2d(const struct sp_sampler_varient *samp,
|
|||
|
||||
|
||||
|
||||
/* 3d varients:
|
||||
/* 3d variants:
|
||||
*/
|
||||
static INLINE const float *
|
||||
get_texel_3d_no_border(const struct sp_sampler_varient *samp,
|
||||
get_texel_3d_no_border(const struct sp_sampler_variant *samp,
|
||||
union tex_tile_address addr, int x, int y, int z)
|
||||
{
|
||||
const struct softpipe_tex_cached_tile *tile;
|
||||
|
@ -745,7 +744,7 @@ get_texel_3d_no_border(const struct sp_sampler_varient *samp,
|
|||
|
||||
|
||||
static INLINE const float *
|
||||
get_texel_3d(const struct sp_sampler_varient *samp,
|
||||
get_texel_3d(const struct sp_sampler_variant *samp,
|
||||
union tex_tile_address addr, int x, int y, int z)
|
||||
{
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
|
@ -754,8 +753,7 @@ get_texel_3d(const struct sp_sampler_varient *samp,
|
|||
if (x < 0 || x >= (int) u_minify(texture->width0, level) ||
|
||||
y < 0 || y >= (int) u_minify(texture->height0, level) ||
|
||||
z < 0 || z >= (int) u_minify(texture->depth0, level)) {
|
||||
return sp_tex_tile_cache_border_color(samp->cache,
|
||||
samp->sampler->border_color);
|
||||
return samp->sampler->border_color;
|
||||
}
|
||||
else {
|
||||
return get_texel_3d_no_border( samp, addr, x, y, z );
|
||||
|
@ -800,7 +798,7 @@ img_filter_2d_linear_repeat_POT(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
unsigned j;
|
||||
unsigned level = samp->level;
|
||||
unsigned xpot = pot_level_size(samp->xpot, level);
|
||||
|
@ -863,7 +861,7 @@ img_filter_2d_nearest_repeat_POT(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
unsigned j;
|
||||
unsigned level = samp->level;
|
||||
unsigned xpot = pot_level_size(samp->xpot, level);
|
||||
|
@ -907,7 +905,7 @@ img_filter_2d_nearest_clamp_POT(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
unsigned j;
|
||||
unsigned level = samp->level;
|
||||
unsigned xpot = pot_level_size(samp->xpot, level);
|
||||
|
@ -960,7 +958,7 @@ img_filter_1d_nearest(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
unsigned level0, j;
|
||||
int width;
|
||||
|
@ -1000,7 +998,7 @@ img_filter_2d_nearest(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
unsigned level0, j;
|
||||
int width, height;
|
||||
|
@ -1052,7 +1050,7 @@ img_filter_cube_nearest(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
const unsigned *faces = samp->faces; /* zero when not cube-mapping */
|
||||
unsigned level0, j;
|
||||
|
@ -1096,7 +1094,7 @@ img_filter_3d_nearest(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
unsigned level0, j;
|
||||
int width, height, depth;
|
||||
|
@ -1138,7 +1136,7 @@ img_filter_1d_linear(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
unsigned level0, j;
|
||||
int width;
|
||||
|
@ -1178,7 +1176,7 @@ img_filter_2d_linear(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
unsigned level0, j;
|
||||
int width, height;
|
||||
|
@ -1225,7 +1223,7 @@ img_filter_cube_linear(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
const unsigned *faces = samp->faces; /* zero when not cube-mapping */
|
||||
unsigned level0, j;
|
||||
|
@ -1274,7 +1272,7 @@ img_filter_3d_linear(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
const struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
unsigned level0, j;
|
||||
int width, height, depth;
|
||||
|
@ -1350,7 +1348,7 @@ mip_filter_linear(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
int level0;
|
||||
float lambda;
|
||||
|
@ -1417,7 +1415,7 @@ mip_filter_nearest(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
float lambda;
|
||||
float lod[QUAD_SIZE];
|
||||
|
@ -1460,7 +1458,7 @@ mip_filter_none(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
float lambda;
|
||||
float lod[QUAD_SIZE];
|
||||
|
||||
|
@ -1501,7 +1499,7 @@ mip_filter_linear_2d_linear_repeat_POT(
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_resource *texture = samp->texture;
|
||||
int level0;
|
||||
float lambda;
|
||||
|
@ -1569,7 +1567,7 @@ sample_compare(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
const struct pipe_sampler_state *sampler = samp->sampler;
|
||||
int j, k0, k1, k2, k3;
|
||||
float val;
|
||||
|
@ -1656,7 +1654,7 @@ sample_cube(struct tgsi_sampler *tgsi_sampler,
|
|||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
struct sp_sampler_varient *samp = sp_sampler_varient(tgsi_sampler);
|
||||
struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
unsigned j;
|
||||
float ssss[4], tttt[4];
|
||||
|
||||
|
@ -1731,6 +1729,86 @@ sample_cube(struct tgsi_sampler *tgsi_sampler,
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
sample_swizzle(struct tgsi_sampler *tgsi_sampler,
|
||||
const float s[QUAD_SIZE],
|
||||
const float t[QUAD_SIZE],
|
||||
const float p[QUAD_SIZE],
|
||||
const float c0[QUAD_SIZE],
|
||||
enum tgsi_sampler_control control,
|
||||
float rgba[NUM_CHANNELS][QUAD_SIZE])
|
||||
{
|
||||
struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler);
|
||||
float rgba_temp[NUM_CHANNELS][QUAD_SIZE];
|
||||
const unsigned swizzle_r = samp->key.bits.swizzle_r;
|
||||
const unsigned swizzle_g = samp->key.bits.swizzle_g;
|
||||
const unsigned swizzle_b = samp->key.bits.swizzle_b;
|
||||
const unsigned swizzle_a = samp->key.bits.swizzle_a;
|
||||
unsigned j;
|
||||
|
||||
samp->sample_target(tgsi_sampler, s, t, p, c0, control, rgba_temp);
|
||||
|
||||
switch (swizzle_r) {
|
||||
case PIPE_SWIZZLE_ZERO:
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[0][j] = 0.0f;
|
||||
break;
|
||||
case PIPE_SWIZZLE_ONE:
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[0][j] = 1.0f;
|
||||
break;
|
||||
default:
|
||||
assert(swizzle_r < 4);
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[0][j] = rgba_temp[swizzle_r][j];
|
||||
}
|
||||
|
||||
switch (swizzle_g) {
|
||||
case PIPE_SWIZZLE_ZERO:
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[1][j] = 0.0f;
|
||||
break;
|
||||
case PIPE_SWIZZLE_ONE:
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[1][j] = 1.0f;
|
||||
break;
|
||||
default:
|
||||
assert(swizzle_g < 4);
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[1][j] = rgba_temp[swizzle_g][j];
|
||||
}
|
||||
|
||||
switch (swizzle_b) {
|
||||
case PIPE_SWIZZLE_ZERO:
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[2][j] = 0.0f;
|
||||
break;
|
||||
case PIPE_SWIZZLE_ONE:
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[2][j] = 1.0f;
|
||||
break;
|
||||
default:
|
||||
assert(swizzle_b < 4);
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[2][j] = rgba_temp[swizzle_b][j];
|
||||
}
|
||||
|
||||
switch (swizzle_a) {
|
||||
case PIPE_SWIZZLE_ZERO:
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[3][j] = 0.0f;
|
||||
break;
|
||||
case PIPE_SWIZZLE_ONE:
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[3][j] = 1.0f;
|
||||
break;
|
||||
default:
|
||||
assert(swizzle_a < 4);
|
||||
for (j = 0; j < 4; j++)
|
||||
rgba[3][j] = rgba_temp[swizzle_a][j];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static wrap_nearest_func
|
||||
get_nearest_unorm_wrap(unsigned mode)
|
||||
|
@ -1909,10 +1987,10 @@ get_img_filter(const union sp_sampler_key key,
|
|||
|
||||
|
||||
/**
|
||||
* Bind the given texture object and texture cache to the sampler varient.
|
||||
* Bind the given texture object and texture cache to the sampler variant.
|
||||
*/
|
||||
void
|
||||
sp_sampler_varient_bind_texture( struct sp_sampler_varient *samp,
|
||||
sp_sampler_variant_bind_texture( struct sp_sampler_variant *samp,
|
||||
struct softpipe_tex_tile_cache *tex_cache,
|
||||
const struct pipe_resource *texture )
|
||||
{
|
||||
|
@ -1927,20 +2005,20 @@ sp_sampler_varient_bind_texture( struct sp_sampler_varient *samp,
|
|||
|
||||
|
||||
void
|
||||
sp_sampler_varient_destroy( struct sp_sampler_varient *samp )
|
||||
sp_sampler_variant_destroy( struct sp_sampler_variant *samp )
|
||||
{
|
||||
FREE(samp);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a sampler varient for a given set of non-orthogonal state.
|
||||
* Create a sampler variant for a given set of non-orthogonal state.
|
||||
*/
|
||||
struct sp_sampler_varient *
|
||||
sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
|
||||
struct sp_sampler_variant *
|
||||
sp_create_sampler_variant( const struct pipe_sampler_state *sampler,
|
||||
const union sp_sampler_key key )
|
||||
{
|
||||
struct sp_sampler_varient *samp = CALLOC_STRUCT(sp_sampler_varient);
|
||||
struct sp_sampler_variant *samp = CALLOC_STRUCT(sp_sampler_variant);
|
||||
if (!samp)
|
||||
return NULL;
|
||||
|
||||
|
@ -2015,7 +2093,7 @@ sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
|
|||
}
|
||||
|
||||
if (key.bits.target == PIPE_TEXTURE_CUBE) {
|
||||
samp->base.get_samples = sample_cube;
|
||||
samp->sample_target = sample_cube;
|
||||
}
|
||||
else {
|
||||
samp->faces[0] = 0;
|
||||
|
@ -2026,7 +2104,17 @@ sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
|
|||
/* Skip cube face determination by promoting the compare
|
||||
* function pointer:
|
||||
*/
|
||||
samp->base.get_samples = samp->compare;
|
||||
samp->sample_target = samp->compare;
|
||||
}
|
||||
|
||||
if (key.bits.swizzle_r != PIPE_SWIZZLE_RED ||
|
||||
key.bits.swizzle_g != PIPE_SWIZZLE_GREEN ||
|
||||
key.bits.swizzle_b != PIPE_SWIZZLE_BLUE ||
|
||||
key.bits.swizzle_a != PIPE_SWIZZLE_ALPHA) {
|
||||
samp->base.get_samples = sample_swizzle;
|
||||
}
|
||||
else {
|
||||
samp->base.get_samples = samp->sample_target;
|
||||
}
|
||||
|
||||
return samp;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "tgsi/tgsi_exec.h"
|
||||
|
||||
struct sp_sampler_varient;
|
||||
struct sp_sampler_variant;
|
||||
|
||||
typedef void (*wrap_nearest_func)(const float s[4],
|
||||
unsigned size,
|
||||
|
@ -44,7 +44,7 @@ typedef void (*wrap_linear_func)(const float s[4],
|
|||
int icoord1[4],
|
||||
float w[4]);
|
||||
|
||||
typedef float (*compute_lambda_func)(const struct sp_sampler_varient *sampler,
|
||||
typedef float (*compute_lambda_func)(const struct sp_sampler_variant *sampler,
|
||||
const float s[QUAD_SIZE],
|
||||
const float t[QUAD_SIZE],
|
||||
const float p[QUAD_SIZE]);
|
||||
|
@ -64,7 +64,11 @@ union sp_sampler_key {
|
|||
unsigned is_pot:1;
|
||||
unsigned processor:2;
|
||||
unsigned unit:4;
|
||||
unsigned pad:22;
|
||||
unsigned swizzle_r:3;
|
||||
unsigned swizzle_g:3;
|
||||
unsigned swizzle_b:3;
|
||||
unsigned swizzle_a:3;
|
||||
unsigned pad:10;
|
||||
} bits;
|
||||
unsigned value;
|
||||
};
|
||||
|
@ -72,7 +76,7 @@ union sp_sampler_key {
|
|||
/**
|
||||
* Subclass of tgsi_sampler
|
||||
*/
|
||||
struct sp_sampler_varient
|
||||
struct sp_sampler_variant
|
||||
{
|
||||
struct tgsi_sampler base; /**< base class */
|
||||
|
||||
|
@ -113,32 +117,33 @@ struct sp_sampler_varient
|
|||
|
||||
filter_func mip_filter;
|
||||
filter_func compare;
|
||||
filter_func sample_target;
|
||||
|
||||
/* Linked list:
|
||||
*/
|
||||
struct sp_sampler_varient *next;
|
||||
struct sp_sampler_variant *next;
|
||||
};
|
||||
|
||||
struct sp_sampler;
|
||||
|
||||
/* Create a sampler varient for a given set of non-orthogonal state. Currently the
|
||||
/* Create a sampler variant for a given set of non-orthogonal state. Currently the
|
||||
*/
|
||||
struct sp_sampler_varient *
|
||||
sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
|
||||
struct sp_sampler_variant *
|
||||
sp_create_sampler_variant( const struct pipe_sampler_state *sampler,
|
||||
const union sp_sampler_key key );
|
||||
|
||||
void sp_sampler_varient_bind_texture( struct sp_sampler_varient *varient,
|
||||
void sp_sampler_variant_bind_texture( struct sp_sampler_variant *variant,
|
||||
struct softpipe_tex_tile_cache *tex_cache,
|
||||
const struct pipe_resource *tex );
|
||||
|
||||
void sp_sampler_varient_destroy( struct sp_sampler_varient * );
|
||||
void sp_sampler_variant_destroy( struct sp_sampler_variant * );
|
||||
|
||||
|
||||
|
||||
static INLINE struct sp_sampler_varient *
|
||||
sp_sampler_varient(const struct tgsi_sampler *sampler)
|
||||
static INLINE struct sp_sampler_variant *
|
||||
sp_sampler_variant(const struct tgsi_sampler *sampler)
|
||||
{
|
||||
return (struct sp_sampler_varient *) sampler;
|
||||
return (struct sp_sampler_variant *) sampler;
|
||||
}
|
||||
|
||||
extern void
|
||||
|
|
|
@ -278,45 +278,26 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
|
|||
tc->tex_z = addr.bits.z;
|
||||
}
|
||||
|
||||
/* get tile from the transfer (view into texture) */
|
||||
/* get tile from the transfer (view into texture)
|
||||
* Note we're using the swizzle version of this fuction only because
|
||||
* we need to pass the texture cache's format explicitly.
|
||||
*/
|
||||
pipe_get_tile_swizzle(tc->pipe,
|
||||
tc->tex_trans,
|
||||
addr.bits.x * TILE_SIZE,
|
||||
addr.bits.y * TILE_SIZE,
|
||||
TILE_SIZE,
|
||||
TILE_SIZE,
|
||||
tc->swizzle_r,
|
||||
tc->swizzle_g,
|
||||
tc->swizzle_b,
|
||||
tc->swizzle_a,
|
||||
PIPE_SWIZZLE_RED,
|
||||
PIPE_SWIZZLE_GREEN,
|
||||
PIPE_SWIZZLE_BLUE,
|
||||
PIPE_SWIZZLE_ALPHA,
|
||||
tc->format,
|
||||
(float *) tile->data.color);
|
||||
|
||||
tile->addr = addr;
|
||||
}
|
||||
|
||||
tc->last_tile = tile;
|
||||
return tile;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return the swizzled border color.
|
||||
*/
|
||||
const float *
|
||||
sp_tex_tile_cache_border_color(struct softpipe_tex_tile_cache *tc,
|
||||
const float border_color[4])
|
||||
{
|
||||
float rgba01[6];
|
||||
|
||||
COPY_4V(rgba01, border_color);
|
||||
rgba01[PIPE_SWIZZLE_ZERO] = 0.0f;
|
||||
rgba01[PIPE_SWIZZLE_ONE] = 1.0f;
|
||||
|
||||
tc->swz_border_color[0] = rgba01[tc->swizzle_r];
|
||||
tc->swz_border_color[1] = rgba01[tc->swizzle_g];
|
||||
tc->swz_border_color[2] = rgba01[tc->swizzle_b];
|
||||
tc->swz_border_color[3] = rgba01[tc->swizzle_a];
|
||||
|
||||
return tc->swz_border_color;
|
||||
}
|
||||
|
|
|
@ -95,8 +95,6 @@ struct softpipe_tex_tile_cache
|
|||
unsigned format;
|
||||
|
||||
struct softpipe_tex_cached_tile *last_tile; /**< most recently retrieved tile */
|
||||
|
||||
float swz_border_color[4]; /**< swizzled border color */
|
||||
};
|
||||
|
||||
|
||||
|
@ -161,10 +159,5 @@ sp_get_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
|
|||
}
|
||||
|
||||
|
||||
const float *
|
||||
sp_tex_tile_cache_border_color(struct softpipe_tex_tile_cache *tc,
|
||||
const float border_color[4]);
|
||||
|
||||
|
||||
#endif /* SP_TEX_TILE_CACHE_H */
|
||||
|
||||
|
|
|
@ -65,14 +65,14 @@ static enum pipe_error generate_indices( struct svga_hwtnl *hwtnl,
|
|||
generate( nr,
|
||||
dst_map );
|
||||
|
||||
pipe_buffer_unmap( pipe, dst, transfer );
|
||||
pipe_buffer_unmap( pipe, transfer );
|
||||
|
||||
*out_buf = dst;
|
||||
return PIPE_OK;
|
||||
|
||||
fail:
|
||||
if (dst_map)
|
||||
pipe_buffer_unmap( pipe, dst, transfer );
|
||||
pipe_buffer_unmap( pipe, transfer );
|
||||
|
||||
if (dst)
|
||||
pipe->screen->resource_destroy( pipe->screen, dst );
|
||||
|
|
|
@ -72,18 +72,18 @@ translate_indices( struct svga_hwtnl *hwtnl,
|
|||
nr,
|
||||
dst_map );
|
||||
|
||||
pipe_buffer_unmap( pipe, src, src_transfer );
|
||||
pipe_buffer_unmap( pipe, dst, dst_transfer );
|
||||
pipe_buffer_unmap( pipe, src_transfer );
|
||||
pipe_buffer_unmap( pipe, dst_transfer );
|
||||
|
||||
*out_buf = dst;
|
||||
return PIPE_OK;
|
||||
|
||||
fail:
|
||||
if (src_map)
|
||||
pipe_buffer_unmap( pipe, src, src_transfer );
|
||||
pipe_buffer_unmap( pipe, src_transfer );
|
||||
|
||||
if (dst_map)
|
||||
pipe_buffer_unmap( pipe, dst, dst_transfer );
|
||||
pipe_buffer_unmap( pipe, dst_transfer );
|
||||
|
||||
if (dst)
|
||||
pipe->screen->resource_destroy( pipe->screen, dst );
|
||||
|
|
|
@ -68,7 +68,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
|
|||
/* need this for draw module. */
|
||||
rast->templ = *templ;
|
||||
|
||||
/* light_twoside - XXX: need fragment shader varient */
|
||||
/* light_twoside - XXX: need fragment shader variant */
|
||||
/* poly_smooth - XXX: no fallback available */
|
||||
/* poly_stipple_enable - draw module */
|
||||
/* sprite_coord_enable - ? */
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "svga_resource_texture.h"
|
||||
#include "svga_resource.h"
|
||||
#include "svga_debug.h"
|
||||
#include "svga_surface.h"
|
||||
|
||||
#include "svga3d_shaderdefs.h"
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ static int emit_consts( struct svga_context *svga,
|
|||
|
||||
done:
|
||||
if (data)
|
||||
pipe_buffer_unmap(&svga->pipe, svga->curr.cb[unit], transfer);
|
||||
pipe_buffer_unmap(&svga->pipe, transfer);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ static int make_fs_key( const struct svga_context *svga,
|
|||
|
||||
/* The blend workaround for simulating logicop xor behaviour
|
||||
* requires that the incoming fragment color be white. This change
|
||||
* achieves that by creating a varient of the current fragment
|
||||
* achieves that by creating a variant of the current fragment
|
||||
* shader that overrides all output colors with 1,1,1,1
|
||||
*
|
||||
* This will work for most shaders, including those containing
|
||||
|
|
|
@ -233,9 +233,7 @@ static int update_zero_stride( struct svga_context *svga,
|
|||
translate->run(translate, 0, 1, 0,
|
||||
svga->curr.zero_stride_constants);
|
||||
|
||||
pipe_buffer_unmap(&svga->pipe,
|
||||
vbuffer->buffer,
|
||||
transfer);
|
||||
pipe_buffer_unmap(&svga->pipe, transfer);
|
||||
|
||||
translate->release(translate);
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ svga_vbuf_render_unmap_vertices( struct vbuf_render *render,
|
|||
pipe_buffer_flush_mapped_range(&svga->pipe,
|
||||
svga_render->vbuf_transfer,
|
||||
offset, length);
|
||||
pipe_buffer_unmap(&svga->pipe, svga_render->vbuf, svga_render->vbuf_transfer);
|
||||
pipe_buffer_unmap(&svga->pipe, svga_render->vbuf_transfer);
|
||||
svga_render->min_index = min_index;
|
||||
svga_render->max_index = max_index;
|
||||
svga_render->vbuf_used = MAX2(svga_render->vbuf_used, used);
|
||||
|
|
|
@ -106,20 +106,17 @@ svga_swtnl_draw_vbo(struct svga_context *svga,
|
|||
* unmap vertex/index buffers
|
||||
*/
|
||||
for (i = 0; i < svga->curr.num_vertex_buffers; i++) {
|
||||
pipe_buffer_unmap(&svga->pipe, svga->curr.vb[i].buffer,
|
||||
vb_transfer[i]);
|
||||
pipe_buffer_unmap(&svga->pipe, vb_transfer[i]);
|
||||
draw_set_mapped_vertex_buffer(draw, i, NULL);
|
||||
}
|
||||
|
||||
if (ib_transfer) {
|
||||
pipe_buffer_unmap(&svga->pipe, svga->curr.ib.buffer, ib_transfer);
|
||||
pipe_buffer_unmap(&svga->pipe, ib_transfer);
|
||||
draw_set_mapped_index_buffer(draw, NULL);
|
||||
}
|
||||
|
||||
if (svga->curr.cb[PIPE_SHADER_VERTEX]) {
|
||||
pipe_buffer_unmap(&svga->pipe,
|
||||
svga->curr.cb[PIPE_SHADER_VERTEX],
|
||||
cb_transfer);
|
||||
pipe_buffer_unmap(&svga->pipe, cb_transfer);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -183,17 +183,21 @@ init_config_attributes(_EGLConfig *conf, const struct native_config *nconf,
|
|||
}
|
||||
|
||||
surface_type = 0x0;
|
||||
if (nconf->window_bit)
|
||||
surface_type |= EGL_WINDOW_BIT;
|
||||
if (nconf->pixmap_bit)
|
||||
surface_type |= EGL_PIXMAP_BIT;
|
||||
/* pixmap surfaces should be EGL_SINGLE_BUFFER */
|
||||
if (nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_FRONT_LEFT)) {
|
||||
if (nconf->pixmap_bit)
|
||||
surface_type |= EGL_PIXMAP_BIT;
|
||||
}
|
||||
/* the others surfaces should be EGL_BACK_BUFFER (or settable) */
|
||||
if (nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_BACK_LEFT)) {
|
||||
if (nconf->window_bit)
|
||||
surface_type |= EGL_WINDOW_BIT;
|
||||
#ifdef EGL_MESA_screen_surface
|
||||
if (nconf->scanout_bit)
|
||||
surface_type |= EGL_SCREEN_BIT_MESA;
|
||||
if (nconf->scanout_bit)
|
||||
surface_type |= EGL_SCREEN_BIT_MESA;
|
||||
#endif
|
||||
|
||||
if (nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_BACK_LEFT))
|
||||
surface_type |= EGL_PBUFFER_BIT;
|
||||
}
|
||||
|
||||
conf->Conformant = api_mask;
|
||||
conf->RenderableType = api_mask;
|
||||
|
@ -226,11 +230,6 @@ init_config_attributes(_EGLConfig *conf, const struct native_config *nconf,
|
|||
}
|
||||
|
||||
conf->Level = nconf->level;
|
||||
conf->Samples = nconf->samples;
|
||||
conf->SampleBuffers = 0;
|
||||
|
||||
if (nconf->slow_config)
|
||||
conf->ConfigCaveat = EGL_SLOW_CONFIG;
|
||||
|
||||
if (nconf->transparent_rgb) {
|
||||
conf->TransparentType = EGL_TRANSPARENT_RGB;
|
||||
|
@ -257,13 +256,9 @@ egl_g3d_init_config(_EGLDriver *drv, _EGLDisplay *dpy,
|
|||
int preserve_buffer, int max_swap_interval)
|
||||
{
|
||||
struct egl_g3d_config *gconf = egl_g3d_config(conf);
|
||||
EGLint buffer_mask, api_mask;
|
||||
EGLint buffer_mask;
|
||||
EGLBoolean valid;
|
||||
|
||||
/* skip single-buffered configs */
|
||||
if (!(nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_BACK_LEFT)))
|
||||
return EGL_FALSE;
|
||||
|
||||
buffer_mask = 0x0;
|
||||
if (nconf->buffer_mask & (1 << NATIVE_ATTACHMENT_FRONT_LEFT))
|
||||
buffer_mask |= ST_ATTACHMENT_FRONT_LEFT_MASK;
|
||||
|
@ -278,24 +273,14 @@ egl_g3d_init_config(_EGLDriver *drv, _EGLDisplay *dpy,
|
|||
gconf->stvis.color_format = nconf->color_format;
|
||||
gconf->stvis.depth_stencil_format = depth_stencil_format;
|
||||
gconf->stvis.accum_format = PIPE_FORMAT_NONE;
|
||||
gconf->stvis.samples = nconf->samples;
|
||||
gconf->stvis.samples = 0;
|
||||
|
||||
/* will be overridden per surface */
|
||||
gconf->stvis.render_buffer = (buffer_mask & ST_ATTACHMENT_BACK_LEFT_MASK) ?
|
||||
ST_ATTACHMENT_BACK_LEFT : ST_ATTACHMENT_FRONT_LEFT;
|
||||
|
||||
api_mask = dpy->ClientAPIsMask;
|
||||
/* this is required by EGL, not by OpenGL ES */
|
||||
if (nconf->window_bit &&
|
||||
gconf->stvis.render_buffer != ST_ATTACHMENT_BACK_LEFT)
|
||||
api_mask &= ~(EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT);
|
||||
|
||||
if (!api_mask) {
|
||||
_eglLog(_EGL_DEBUG, "no state tracker supports config 0x%x",
|
||||
nconf->native_visual_id);
|
||||
}
|
||||
|
||||
valid = init_config_attributes(&gconf->base,
|
||||
nconf, api_mask, depth_stencil_format,
|
||||
nconf, dpy->ClientAPIsMask, depth_stencil_format,
|
||||
preserve_buffer, max_swap_interval);
|
||||
if (!valid) {
|
||||
_eglLog(_EGL_DEBUG, "skip invalid config 0x%x", nconf->native_visual_id);
|
||||
|
|
|
@ -324,7 +324,8 @@ egl_g3d_create_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
|
|||
}
|
||||
|
||||
gsurf->stvis = gconf->stvis;
|
||||
if (gsurf->base.RenderBuffer == EGL_SINGLE_BUFFER)
|
||||
if (gsurf->base.RenderBuffer == EGL_SINGLE_BUFFER &&
|
||||
gconf->stvis.buffer_mask & ST_ATTACHMENT_FRONT_LEFT_MASK)
|
||||
gsurf->stvis.render_buffer = ST_ATTACHMENT_FRONT_LEFT;
|
||||
|
||||
gsurf->stfbi = egl_g3d_create_st_framebuffer(&gsurf->base);
|
||||
|
@ -402,7 +403,6 @@ egl_g3d_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *dpy,
|
|||
_EGLConfig *conf, const EGLint *attribs)
|
||||
{
|
||||
struct egl_g3d_surface *gsurf;
|
||||
struct pipe_resource *ptex = NULL;
|
||||
|
||||
gsurf = create_pbuffer_surface(dpy, conf, attribs,
|
||||
"eglCreatePbufferSurface");
|
||||
|
@ -411,13 +411,6 @@ egl_g3d_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *dpy,
|
|||
|
||||
gsurf->client_buffer_type = EGL_NONE;
|
||||
|
||||
if (!gsurf->stfbi->validate(gsurf->stfbi,
|
||||
&gsurf->stvis.render_buffer, 1, &ptex)) {
|
||||
egl_g3d_destroy_st_framebuffer(gsurf->stfbi);
|
||||
FREE(gsurf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &gsurf->base;
|
||||
}
|
||||
|
||||
|
@ -477,12 +470,14 @@ egl_g3d_create_pbuffer_from_client_buffer(_EGLDriver *drv, _EGLDisplay *dpy,
|
|||
gsurf->client_buffer_type = buftype;
|
||||
gsurf->client_buffer = buffer;
|
||||
|
||||
/* validate now so that it fails if the client buffer is invalid */
|
||||
if (!gsurf->stfbi->validate(gsurf->stfbi,
|
||||
&gsurf->stvis.render_buffer, 1, &ptex)) {
|
||||
egl_g3d_destroy_st_framebuffer(gsurf->stfbi);
|
||||
FREE(gsurf);
|
||||
return NULL;
|
||||
}
|
||||
pipe_resource_reference(&ptex, NULL);
|
||||
|
||||
return &gsurf->base;
|
||||
}
|
||||
|
@ -643,19 +638,13 @@ egl_g3d_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
|
|||
struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
|
||||
struct egl_g3d_surface *gsurf = egl_g3d_surface(surf);
|
||||
_EGLContext *ctx = _eglGetCurrentContext();
|
||||
struct egl_g3d_config *gconf;
|
||||
struct native_surface *nsurf;
|
||||
struct pipe_resource *ptex;
|
||||
|
||||
if (!gsurf->render_texture)
|
||||
return EGL_TRUE;
|
||||
|
||||
gconf = egl_g3d_config(egl_g3d_find_pixmap_config(dpy, target));
|
||||
if (!gconf)
|
||||
return _eglError(EGL_BAD_NATIVE_PIXMAP, "eglCopyBuffers");
|
||||
|
||||
nsurf = gdpy->native->create_pixmap_surface(gdpy->native,
|
||||
target, gconf->native);
|
||||
nsurf = gdpy->native->create_pixmap_surface(gdpy->native, target, NULL);
|
||||
if (!nsurf)
|
||||
return _eglError(EGL_BAD_NATIVE_PIXMAP, "eglCopyBuffers");
|
||||
|
||||
|
@ -676,14 +665,13 @@ egl_g3d_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
|
|||
|
||||
ptex = get_pipe_resource(gdpy->native, nsurf, NATIVE_ATTACHMENT_FRONT_LEFT);
|
||||
if (ptex) {
|
||||
struct pipe_resource *psrc = gsurf->render_texture;
|
||||
struct pipe_box src_box;
|
||||
|
||||
u_box_origin_2d(ptex->width0, ptex->height0, &src_box);
|
||||
if (psrc) {
|
||||
gdpy->pipe->resource_copy_region(gdpy->pipe, ptex, 0, 0, 0, 0,
|
||||
gsurf->render_texture, 0, &src_box);
|
||||
nsurf->present(nsurf, NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
|
||||
}
|
||||
gdpy->pipe->resource_copy_region(gdpy->pipe, ptex, 0, 0, 0, 0,
|
||||
gsurf->render_texture, 0, &src_box);
|
||||
gdpy->pipe->flush(gdpy->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
|
||||
nsurf->present(nsurf, NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
|
||||
|
||||
pipe_resource_reference(&ptex, NULL);
|
||||
}
|
||||
|
@ -888,25 +876,6 @@ egl_g3d_show_screen_surface(_EGLDriver *drv, _EGLDisplay *dpy,
|
|||
|
||||
#endif /* EGL_MESA_screen_surface */
|
||||
|
||||
/**
|
||||
* Find a config that supports the pixmap.
|
||||
*/
|
||||
_EGLConfig *
|
||||
egl_g3d_find_pixmap_config(_EGLDisplay *dpy, EGLNativePixmapType pix)
|
||||
{
|
||||
struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
|
||||
struct egl_g3d_config *gconf;
|
||||
EGLint i;
|
||||
|
||||
for (i = 0; i < dpy->Configs->Size; i++) {
|
||||
gconf = egl_g3d_config((_EGLConfig *) dpy->Configs->Elements[i]);
|
||||
if (gdpy->native->is_pixmap_supported(gdpy->native, pix, gconf->native))
|
||||
break;
|
||||
}
|
||||
|
||||
return (i < dpy->Configs->Size) ? &gconf->base : NULL;
|
||||
}
|
||||
|
||||
void
|
||||
egl_g3d_init_driver_api(_EGLDriver *drv)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,4 @@
|
|||
void
|
||||
egl_g3d_init_driver_api(_EGLDriver *drv);
|
||||
|
||||
_EGLConfig *
|
||||
egl_g3d_find_pixmap_config(_EGLDisplay *dpy, EGLNativePixmapType pix);
|
||||
|
||||
#endif /* _EGL_G3D_API_H_ */
|
||||
|
|
|
@ -48,17 +48,11 @@ static struct pipe_resource *
|
|||
egl_g3d_reference_native_pixmap(_EGLDisplay *dpy, EGLNativePixmapType pix)
|
||||
{
|
||||
struct egl_g3d_display *gdpy = egl_g3d_display(dpy);
|
||||
struct egl_g3d_config *gconf;
|
||||
struct native_surface *nsurf;
|
||||
struct pipe_resource *textures[NUM_NATIVE_ATTACHMENTS];
|
||||
enum native_attachment natt;
|
||||
|
||||
gconf = egl_g3d_config(egl_g3d_find_pixmap_config(dpy, pix));
|
||||
if (!gconf)
|
||||
return NULL;
|
||||
|
||||
nsurf = gdpy->native->create_pixmap_surface(gdpy->native,
|
||||
pix, gconf->native);
|
||||
nsurf = gdpy->native->create_pixmap_surface(gdpy->native, pix, NULL);
|
||||
if (!nsurf)
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -126,8 +126,6 @@ struct native_config {
|
|||
int native_visual_id;
|
||||
int native_visual_type;
|
||||
int level;
|
||||
int samples;
|
||||
boolean slow_config;
|
||||
boolean transparent_rgb;
|
||||
int transparent_rgb_values[3];
|
||||
};
|
||||
|
@ -185,7 +183,9 @@ struct native_display {
|
|||
const struct native_config *nconf);
|
||||
|
||||
/**
|
||||
* Create a pixmap surface. Required unless no config has pixmap_bit set.
|
||||
* Create a pixmap surface. The native config may be NULL. In that case, a
|
||||
* "best config" will be picked. Required unless no config has pixmap_bit
|
||||
* set.
|
||||
*/
|
||||
struct native_surface *(*create_pixmap_surface)(struct native_display *ndpy,
|
||||
EGLNativePixmapType pix,
|
||||
|
|
|
@ -319,7 +319,6 @@ gdi_display_get_configs(struct native_display *ndpy, int *num_configs)
|
|||
nconf->color_format = formats[i];
|
||||
|
||||
nconf->window_bit = TRUE;
|
||||
nconf->slow_config = TRUE;
|
||||
}
|
||||
|
||||
gdpy->num_configs = count;
|
||||
|
|
|
@ -40,11 +40,6 @@
|
|||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
|
||||
enum dri2_surface_type {
|
||||
DRI2_SURFACE_TYPE_WINDOW,
|
||||
DRI2_SURFACE_TYPE_PIXMAP,
|
||||
};
|
||||
|
||||
struct dri2_display {
|
||||
struct native_display base;
|
||||
Display *dpy;
|
||||
|
@ -66,7 +61,6 @@ struct dri2_display {
|
|||
struct dri2_surface {
|
||||
struct native_surface base;
|
||||
Drawable drawable;
|
||||
enum dri2_surface_type type;
|
||||
enum pipe_format color_format;
|
||||
struct dri2_display *dri2dpy;
|
||||
|
||||
|
@ -439,12 +433,10 @@ dri2_surface_destroy(struct native_surface *nsurf)
|
|||
|
||||
static struct dri2_surface *
|
||||
dri2_display_create_surface(struct native_display *ndpy,
|
||||
enum dri2_surface_type type,
|
||||
Drawable drawable,
|
||||
const struct native_config *nconf)
|
||||
enum pipe_format color_format)
|
||||
{
|
||||
struct dri2_display *dri2dpy = dri2_display(ndpy);
|
||||
struct dri2_config *dri2conf = dri2_config(nconf);
|
||||
struct dri2_surface *dri2surf;
|
||||
|
||||
dri2surf = CALLOC_STRUCT(dri2_surface);
|
||||
|
@ -452,9 +444,8 @@ dri2_display_create_surface(struct native_display *ndpy,
|
|||
return NULL;
|
||||
|
||||
dri2surf->dri2dpy = dri2dpy;
|
||||
dri2surf->type = type;
|
||||
dri2surf->drawable = drawable;
|
||||
dri2surf->color_format = dri2conf->base.color_format;
|
||||
dri2surf->color_format = color_format;
|
||||
|
||||
dri2surf->base.destroy = dri2_surface_destroy;
|
||||
dri2surf->base.present = dri2_surface_present;
|
||||
|
@ -480,8 +471,8 @@ dri2_display_create_window_surface(struct native_display *ndpy,
|
|||
{
|
||||
struct dri2_surface *dri2surf;
|
||||
|
||||
dri2surf = dri2_display_create_surface(ndpy, DRI2_SURFACE_TYPE_WINDOW,
|
||||
(Drawable) win, nconf);
|
||||
dri2surf = dri2_display_create_surface(ndpy,
|
||||
(Drawable) win, nconf->color_format);
|
||||
return (dri2surf) ? &dri2surf->base : NULL;
|
||||
}
|
||||
|
||||
|
@ -492,8 +483,29 @@ dri2_display_create_pixmap_surface(struct native_display *ndpy,
|
|||
{
|
||||
struct dri2_surface *dri2surf;
|
||||
|
||||
dri2surf = dri2_display_create_surface(ndpy, DRI2_SURFACE_TYPE_PIXMAP,
|
||||
(Drawable) pix, nconf);
|
||||
if (!nconf) {
|
||||
struct dri2_display *dri2dpy = dri2_display(ndpy);
|
||||
uint depth, nconf_depth;
|
||||
int i;
|
||||
|
||||
depth = x11_drawable_get_depth(dri2dpy->xscr, (Drawable) pix);
|
||||
for (i = 0; i < dri2dpy->num_configs; i++) {
|
||||
nconf_depth = util_format_get_blocksizebits(
|
||||
dri2dpy->configs[i].base.color_format);
|
||||
/* simple depth match for now */
|
||||
if (depth == nconf_depth ||
|
||||
(depth == 24 && depth + 8 == nconf_depth)) {
|
||||
nconf = &dri2dpy->configs[i].base;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!nconf)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dri2surf = dri2_display_create_surface(ndpy,
|
||||
(Drawable) pix, nconf->color_format);
|
||||
return (dri2surf) ? &dri2surf->base : NULL;
|
||||
}
|
||||
|
||||
|
@ -548,6 +560,10 @@ dri2_display_convert_config(struct native_display *ndpy,
|
|||
if (!mode->xRenderable || !mode->drawableType)
|
||||
return FALSE;
|
||||
|
||||
/* fast/slow configs are probably not relevant */
|
||||
if (mode->visualRating == GLX_SLOW_CONFIG)
|
||||
return FALSE;
|
||||
|
||||
nconf->buffer_mask = 1 << NATIVE_ATTACHMENT_FRONT_LEFT;
|
||||
if (mode->doubleBufferMode)
|
||||
nconf->buffer_mask |= 1 << NATIVE_ATTACHMENT_BACK_LEFT;
|
||||
|
@ -568,17 +584,33 @@ dri2_display_convert_config(struct native_display *ndpy,
|
|||
if (nconf->color_format == PIPE_FORMAT_NONE)
|
||||
return FALSE;
|
||||
|
||||
if (mode->drawableType & GLX_WINDOW_BIT)
|
||||
if ((mode->drawableType & GLX_WINDOW_BIT) && mode->visualID)
|
||||
nconf->window_bit = TRUE;
|
||||
if (mode->drawableType & GLX_PIXMAP_BIT)
|
||||
nconf->pixmap_bit = TRUE;
|
||||
|
||||
nconf->native_visual_id = mode->visualID;
|
||||
nconf->native_visual_type = mode->visualType;
|
||||
switch (mode->visualType) {
|
||||
case GLX_TRUE_COLOR:
|
||||
nconf->native_visual_type = TrueColor;
|
||||
break;
|
||||
case GLX_DIRECT_COLOR:
|
||||
nconf->native_visual_type = DirectColor;
|
||||
break;
|
||||
case GLX_PSEUDO_COLOR:
|
||||
nconf->native_visual_type = PseudoColor;
|
||||
break;
|
||||
case GLX_STATIC_COLOR:
|
||||
nconf->native_visual_type = StaticColor;
|
||||
break;
|
||||
case GLX_GRAY_SCALE:
|
||||
nconf->native_visual_type = GrayScale;
|
||||
break;
|
||||
case GLX_STATIC_GRAY:
|
||||
nconf->native_visual_type = StaticGray;
|
||||
break;
|
||||
}
|
||||
nconf->level = mode->level;
|
||||
nconf->samples = mode->samples;
|
||||
|
||||
nconf->slow_config = (mode->visualRating == GLX_SLOW_CONFIG);
|
||||
|
||||
if (mode->transparentPixel == GLX_TRANSPARENT_RGB) {
|
||||
nconf->transparent_rgb = TRUE;
|
||||
|
@ -614,8 +646,17 @@ dri2_display_get_configs(struct native_display *ndpy, int *num_configs)
|
|||
count = 0;
|
||||
for (i = 0; i < num_modes; i++) {
|
||||
struct native_config *nconf = &dri2dpy->configs[count].base;
|
||||
if (dri2_display_convert_config(&dri2dpy->base, modes, nconf))
|
||||
count++;
|
||||
|
||||
if (dri2_display_convert_config(&dri2dpy->base, modes, nconf)) {
|
||||
int j;
|
||||
/* look for duplicates */
|
||||
for (j = 0; j < count; j++) {
|
||||
if (memcmp(&dri2dpy->configs[j], nconf, sizeof(*nconf)) == 0)
|
||||
break;
|
||||
}
|
||||
if (j == count)
|
||||
count++;
|
||||
}
|
||||
modes = modes->next;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,11 +38,6 @@
|
|||
#include "native_x11.h"
|
||||
#include "x11_screen.h"
|
||||
|
||||
enum ximage_surface_type {
|
||||
XIMAGE_SURFACE_TYPE_WINDOW,
|
||||
XIMAGE_SURFACE_TYPE_PIXMAP,
|
||||
};
|
||||
|
||||
struct ximage_display {
|
||||
struct native_display base;
|
||||
Display *dpy;
|
||||
|
@ -60,7 +55,6 @@ struct ximage_display {
|
|||
struct ximage_surface {
|
||||
struct native_surface base;
|
||||
Drawable drawable;
|
||||
enum ximage_surface_type type;
|
||||
enum pipe_format color_format;
|
||||
XVisualInfo visual;
|
||||
struct ximage_display *xdpy;
|
||||
|
@ -245,7 +239,6 @@ ximage_surface_destroy(struct native_surface *nsurf)
|
|||
|
||||
static struct ximage_surface *
|
||||
ximage_display_create_surface(struct native_display *ndpy,
|
||||
enum ximage_surface_type type,
|
||||
Drawable drawable,
|
||||
const struct native_config *nconf)
|
||||
{
|
||||
|
@ -258,7 +251,6 @@ ximage_display_create_surface(struct native_display *ndpy,
|
|||
return NULL;
|
||||
|
||||
xsurf->xdpy = xdpy;
|
||||
xsurf->type = type;
|
||||
xsurf->color_format = xconf->base.color_format;
|
||||
xsurf->drawable = drawable;
|
||||
|
||||
|
@ -297,11 +289,37 @@ ximage_display_create_window_surface(struct native_display *ndpy,
|
|||
{
|
||||
struct ximage_surface *xsurf;
|
||||
|
||||
xsurf = ximage_display_create_surface(ndpy, XIMAGE_SURFACE_TYPE_WINDOW,
|
||||
(Drawable) win, nconf);
|
||||
xsurf = ximage_display_create_surface(ndpy, (Drawable) win, nconf);
|
||||
return (xsurf) ? &xsurf->base : NULL;
|
||||
}
|
||||
|
||||
static enum pipe_format
|
||||
get_pixmap_format(struct native_display *ndpy, EGLNativePixmapType pix)
|
||||
{
|
||||
struct ximage_display *xdpy = ximage_display(ndpy);
|
||||
enum pipe_format fmt;
|
||||
uint depth;
|
||||
|
||||
depth = x11_drawable_get_depth(xdpy->xscr, (Drawable) pix);
|
||||
|
||||
switch (depth) {
|
||||
case 32:
|
||||
fmt = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
break;
|
||||
case 24:
|
||||
fmt = PIPE_FORMAT_B8G8R8X8_UNORM;
|
||||
break;
|
||||
case 16:
|
||||
fmt = PIPE_FORMAT_B5G6R5_UNORM;
|
||||
break;
|
||||
default:
|
||||
fmt = PIPE_FORMAT_NONE;
|
||||
break;
|
||||
}
|
||||
|
||||
return fmt;
|
||||
}
|
||||
|
||||
static struct native_surface *
|
||||
ximage_display_create_pixmap_surface(struct native_display *ndpy,
|
||||
EGLNativePixmapType pix,
|
||||
|
@ -309,8 +327,26 @@ ximage_display_create_pixmap_surface(struct native_display *ndpy,
|
|||
{
|
||||
struct ximage_surface *xsurf;
|
||||
|
||||
xsurf = ximage_display_create_surface(ndpy, XIMAGE_SURFACE_TYPE_PIXMAP,
|
||||
(Drawable) pix, nconf);
|
||||
/* find the config */
|
||||
if (!nconf) {
|
||||
struct ximage_display *xdpy = ximage_display(ndpy);
|
||||
enum pipe_format fmt = get_pixmap_format(&xdpy->base, pix);
|
||||
int i;
|
||||
|
||||
if (fmt != PIPE_FORMAT_NONE) {
|
||||
for (i = 0; i < xdpy->num_configs; i++) {
|
||||
if (xdpy->configs[i].base.color_format == fmt) {
|
||||
nconf = &xdpy->configs[i].base;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!nconf)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
xsurf = ximage_display_create_surface(ndpy, (Drawable) pix, nconf);
|
||||
return (xsurf) ? &xsurf->base : NULL;
|
||||
}
|
||||
|
||||
|
@ -384,8 +420,6 @@ ximage_display_get_configs(struct native_display *ndpy, int *num_configs)
|
|||
xconf->base.native_visual_type = xconf->visual->class;
|
||||
#endif
|
||||
|
||||
xconf->base.slow_config = TRUE;
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
|
@ -408,24 +442,7 @@ ximage_display_is_pixmap_supported(struct native_display *ndpy,
|
|||
const struct native_config *nconf)
|
||||
{
|
||||
struct ximage_display *xdpy = ximage_display(ndpy);
|
||||
enum pipe_format fmt;
|
||||
uint depth;
|
||||
|
||||
depth = x11_drawable_get_depth(xdpy->xscr, (Drawable) pix);
|
||||
switch (depth) {
|
||||
case 32:
|
||||
fmt = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
break;
|
||||
case 24:
|
||||
fmt = PIPE_FORMAT_B8G8R8X8_UNORM;
|
||||
break;
|
||||
case 16:
|
||||
fmt = PIPE_FORMAT_B5G6R5_UNORM;
|
||||
break;
|
||||
default:
|
||||
fmt = PIPE_FORMAT_NONE;
|
||||
break;
|
||||
}
|
||||
enum pipe_format fmt = get_pixmap_format(&xdpy->base, pix);
|
||||
|
||||
return (fmt == nconf->color_format);
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ struct st_context {
|
|||
if (!map)
|
||||
goto error2;
|
||||
memcpy(map, vertices, size);
|
||||
pipe_buffer_unmap(pipe, vbuf, transfer);
|
||||
pipe_buffer_unmap(pipe, transfer);
|
||||
|
||||
cso_save_vertex_elements($self->cso);
|
||||
|
||||
|
|
|
@ -32,10 +32,6 @@
|
|||
|
||||
#include "vg_context.h"
|
||||
#include "pipe/p_context.h"
|
||||
#include "util/u_inlines.h"
|
||||
|
||||
#include "util/u_pack_color.h"
|
||||
#include "util/u_draw_quad.h"
|
||||
|
||||
void vegaMask(VGHandle mask, VGMaskOperation operation,
|
||||
VGint x, VGint y,
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "renderer.h"
|
||||
|
||||
#include "vg_context.h"
|
||||
#include "image.h"
|
||||
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_state.h"
|
||||
|
|
|
@ -34,9 +34,7 @@
|
|||
#include "renderer.h"
|
||||
|
||||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_screen.h"
|
||||
#include "pipe/p_state.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_math.h"
|
||||
#include "util/u_format.h"
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "text.h"
|
||||
#include "image.h"
|
||||
#include "path.h"
|
||||
#include "api.h"
|
||||
|
||||
#ifdef OPENVG_VERSION_1_1
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "renderer.h"
|
||||
#include "shaders_cache.h"
|
||||
#include "shader.h"
|
||||
#include "asm_util.h"
|
||||
#include "vg_manager.h"
|
||||
#include "api.h"
|
||||
#include "mask.h"
|
||||
|
@ -40,7 +39,6 @@
|
|||
|
||||
#include "cso_cache/cso_context.h"
|
||||
|
||||
#include "util/u_simple_shaders.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_blit.h"
|
||||
#include "util/u_sampler.h"
|
||||
|
|
|
@ -33,14 +33,12 @@
|
|||
#include "pipe/p_screen.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_sampler.h"
|
||||
#include "util/u_box.h"
|
||||
#include "util/u_surface.h"
|
||||
|
||||
#include "vg_api.h"
|
||||
#include "vg_manager.h"
|
||||
#include "vg_context.h"
|
||||
#include "image.h"
|
||||
#include "api.h"
|
||||
|
||||
static boolean
|
||||
|
|
|
@ -9,7 +9,6 @@ C_SOURCES = \
|
|||
evergreen_hw_context.c \
|
||||
radeon_bo.c \
|
||||
radeon_pciid.c \
|
||||
r600.c \
|
||||
r600_bo.c \
|
||||
r600_drm.c \
|
||||
r600_hw_context.c \
|
||||
|
|
|
@ -7,7 +7,6 @@ r600_sources = [
|
|||
'evergreen_hw_context.c',
|
||||
'radeon_bo.c',
|
||||
'radeon_pciid.c',
|
||||
'r600.c',
|
||||
'r600_bo.c',
|
||||
'r600_drm.c',
|
||||
'r600_hw_context.c',
|
||||
|
|
|
@ -880,59 +880,3 @@ void evergreen_context_draw(struct r600_context *ctx, const struct r600_draw *dr
|
|||
ctx->pm4_dirty_cdwords = 0;
|
||||
}
|
||||
|
||||
static inline void evergreen_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned offset)
|
||||
{
|
||||
struct r600_range *range;
|
||||
struct r600_block *block;
|
||||
|
||||
range = &ctx->range[CTX_RANGE_ID(ctx, offset)];
|
||||
block = range->blocks[CTX_BLOCK_ID(ctx, offset)];
|
||||
block->reg[0] = state->regs[0].value;
|
||||
block->reg[1] = state->regs[1].value;
|
||||
block->reg[2] = state->regs[2].value;
|
||||
block->reg[3] = state->regs[3].value;
|
||||
block->reg[4] = state->regs[4].value;
|
||||
block->reg[5] = state->regs[5].value;
|
||||
block->reg[6] = state->regs[6].value;
|
||||
block->reg[7] = state->regs[7].value;
|
||||
r600_bo_reference(ctx->radeon, &block->reloc[1].bo, NULL);
|
||||
r600_bo_reference(ctx->radeon , &block->reloc[2].bo, NULL);
|
||||
if (state->regs[0].bo) {
|
||||
/* VERTEX RESOURCE, we preted there is 2 bo to relocate so
|
||||
* we have single case btw VERTEX & TEXTURE resource
|
||||
*/
|
||||
r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[0].bo);
|
||||
r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[0].bo);
|
||||
} else {
|
||||
/* TEXTURE RESOURCE */
|
||||
r600_bo_reference(ctx->radeon, &block->reloc[1].bo, state->regs[2].bo);
|
||||
r600_bo_reference(ctx->radeon, &block->reloc[2].bo, state->regs[3].bo);
|
||||
}
|
||||
if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
|
||||
block->status |= R600_BLOCK_STATUS_ENABLED;
|
||||
block->status |= R600_BLOCK_STATUS_DIRTY;
|
||||
ctx->pm4_dirty_cdwords += block->pm4_ndwords + block->pm4_flush_ndwords;
|
||||
LIST_ADDTAIL(&block->list,&ctx->dirty);
|
||||
}
|
||||
}
|
||||
|
||||
void evergreen_ps_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
|
||||
{
|
||||
unsigned offset = R_030000_RESOURCE0_WORD0 + 0x20 * rid;
|
||||
|
||||
evergreen_resource_set(ctx, state, offset);
|
||||
}
|
||||
|
||||
void evergreen_vs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
|
||||
{
|
||||
unsigned offset = R_030000_RESOURCE0_WORD0 + 0x1600 + 0x20 * rid;
|
||||
|
||||
evergreen_resource_set(ctx, state, offset);
|
||||
}
|
||||
|
||||
void evergreen_fs_resource_set(struct r600_context *ctx, struct r600_pipe_state *state, unsigned rid)
|
||||
{
|
||||
unsigned offset = R_030000_RESOURCE0_WORD0 + 0x7C00 + 0x20 * rid;
|
||||
|
||||
evergreen_resource_set(ctx, state, offset);
|
||||
}
|
||||
|
|
|
@ -1,174 +0,0 @@
|
|||
/*
|
||||
* Copyright 2010 Jerome Glisse <glisse@freedesktop.org>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, and/or sell copies of the Software, and to permit persons to whom
|
||||
* the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Authors:
|
||||
* Jerome Glisse
|
||||
*/
|
||||
#include "xf86drm.h"
|
||||
#include "radeon_drm.h"
|
||||
#include "pipe/p_compiler.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "r600_priv.h"
|
||||
|
||||
enum radeon_family r600_get_family(struct radeon *r600)
|
||||
{
|
||||
return r600->family;
|
||||
}
|
||||
|
||||
enum chip_class r600_get_family_class(struct radeon *radeon)
|
||||
{
|
||||
return radeon->chip_class;
|
||||
}
|
||||
|
||||
struct r600_tiling_info *r600_get_tiling_info(struct radeon *radeon)
|
||||
{
|
||||
return &radeon->tiling_info;
|
||||
}
|
||||
|
||||
static int r600_get_device(struct radeon *r600)
|
||||
{
|
||||
struct drm_radeon_info info;
|
||||
|
||||
r600->device = 0;
|
||||
info.request = RADEON_INFO_DEVICE_ID;
|
||||
info.value = (uintptr_t)&r600->device;
|
||||
return drmCommandWriteRead(r600->fd, DRM_RADEON_INFO, &info, sizeof(struct drm_radeon_info));
|
||||
}
|
||||
|
||||
struct radeon *r600_new(int fd, unsigned device)
|
||||
{
|
||||
struct radeon *r600;
|
||||
int r;
|
||||
|
||||
r600 = calloc(1, sizeof(*r600));
|
||||
if (r600 == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
r600->fd = fd;
|
||||
r600->device = device;
|
||||
if (fd >= 0) {
|
||||
r = r600_get_device(r600);
|
||||
if (r) {
|
||||
R600_ERR("Failed to get device id\n");
|
||||
r600_delete(r600);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
r600->family = radeon_family_from_device(r600->device);
|
||||
if (r600->family == CHIP_UNKNOWN) {
|
||||
R600_ERR("Unknown chipset 0x%04X\n", r600->device);
|
||||
r600_delete(r600);
|
||||
return NULL;
|
||||
}
|
||||
switch (r600->family) {
|
||||
case CHIP_R600:
|
||||
case CHIP_RV610:
|
||||
case CHIP_RV630:
|
||||
case CHIP_RV670:
|
||||
case CHIP_RV620:
|
||||
case CHIP_RV635:
|
||||
case CHIP_RS780:
|
||||
case CHIP_RS880:
|
||||
case CHIP_RV770:
|
||||
case CHIP_RV730:
|
||||
case CHIP_RV710:
|
||||
case CHIP_RV740:
|
||||
case CHIP_CEDAR:
|
||||
case CHIP_REDWOOD:
|
||||
case CHIP_JUNIPER:
|
||||
case CHIP_CYPRESS:
|
||||
case CHIP_HEMLOCK:
|
||||
case CHIP_PALM:
|
||||
break;
|
||||
case CHIP_R100:
|
||||
case CHIP_RV100:
|
||||
case CHIP_RS100:
|
||||
case CHIP_RV200:
|
||||
case CHIP_RS200:
|
||||
case CHIP_R200:
|
||||
case CHIP_RV250:
|
||||
case CHIP_RS300:
|
||||
case CHIP_RV280:
|
||||
case CHIP_R300:
|
||||
case CHIP_R350:
|
||||
case CHIP_RV350:
|
||||
case CHIP_RV380:
|
||||
case CHIP_R420:
|
||||
case CHIP_R423:
|
||||
case CHIP_RV410:
|
||||
case CHIP_RS400:
|
||||
case CHIP_RS480:
|
||||
case CHIP_RS600:
|
||||
case CHIP_RS690:
|
||||
case CHIP_RS740:
|
||||
case CHIP_RV515:
|
||||
case CHIP_R520:
|
||||
case CHIP_RV530:
|
||||
case CHIP_RV560:
|
||||
case CHIP_RV570:
|
||||
case CHIP_R580:
|
||||
default:
|
||||
R600_ERR("unknown or unsupported chipset 0x%04X\n", r600->device);
|
||||
break;
|
||||
}
|
||||
|
||||
/* setup class */
|
||||
switch (r600->family) {
|
||||
case CHIP_R600:
|
||||
case CHIP_RV610:
|
||||
case CHIP_RV630:
|
||||
case CHIP_RV670:
|
||||
case CHIP_RV620:
|
||||
case CHIP_RV635:
|
||||
case CHIP_RS780:
|
||||
case CHIP_RS880:
|
||||
r600->chip_class = R600;
|
||||
break;
|
||||
case CHIP_RV770:
|
||||
case CHIP_RV730:
|
||||
case CHIP_RV710:
|
||||
case CHIP_RV740:
|
||||
r600->chip_class = R700;
|
||||
break;
|
||||
case CHIP_CEDAR:
|
||||
case CHIP_REDWOOD:
|
||||
case CHIP_JUNIPER:
|
||||
case CHIP_CYPRESS:
|
||||
case CHIP_HEMLOCK:
|
||||
case CHIP_PALM:
|
||||
r600->chip_class = EVERGREEN;
|
||||
break;
|
||||
default:
|
||||
R600_ERR("unknown or unsupported chipset 0x%04X\n", r600->device);
|
||||
break;
|
||||
}
|
||||
|
||||
return r600;
|
||||
}
|
||||
|
||||
void r600_delete(struct radeon *r600)
|
||||
{
|
||||
if (r600 == NULL)
|
||||
return;
|
||||
drmClose(r600->fd);
|
||||
free(r600);
|
||||
}
|
|
@ -42,6 +42,21 @@
|
|||
|
||||
static struct radeon *radeon_new(int fd, unsigned device);
|
||||
|
||||
enum radeon_family r600_get_family(struct radeon *r600)
|
||||
{
|
||||
return r600->family;
|
||||
}
|
||||
|
||||
enum chip_class r600_get_family_class(struct radeon *radeon)
|
||||
{
|
||||
return radeon->chip_class;
|
||||
}
|
||||
|
||||
struct r600_tiling_info *r600_get_tiling_info(struct radeon *radeon)
|
||||
{
|
||||
return &radeon->tiling_info;
|
||||
}
|
||||
|
||||
static int radeon_get_device(struct radeon *radeon)
|
||||
{
|
||||
struct drm_radeon_info info;
|
||||
|
@ -134,59 +149,6 @@ static struct radeon *radeon_new(int fd, unsigned device)
|
|||
fprintf(stderr, "Unknown chipset 0x%04X\n", radeon->device);
|
||||
return radeon_decref(radeon);
|
||||
}
|
||||
switch (radeon->family) {
|
||||
case CHIP_R600:
|
||||
case CHIP_RV610:
|
||||
case CHIP_RV630:
|
||||
case CHIP_RV670:
|
||||
case CHIP_RV620:
|
||||
case CHIP_RV635:
|
||||
case CHIP_RS780:
|
||||
case CHIP_RS880:
|
||||
case CHIP_RV770:
|
||||
case CHIP_RV730:
|
||||
case CHIP_RV710:
|
||||
case CHIP_RV740:
|
||||
case CHIP_CEDAR:
|
||||
case CHIP_REDWOOD:
|
||||
case CHIP_JUNIPER:
|
||||
case CHIP_CYPRESS:
|
||||
case CHIP_HEMLOCK:
|
||||
case CHIP_PALM:
|
||||
break;
|
||||
case CHIP_R100:
|
||||
case CHIP_RV100:
|
||||
case CHIP_RS100:
|
||||
case CHIP_RV200:
|
||||
case CHIP_RS200:
|
||||
case CHIP_R200:
|
||||
case CHIP_RV250:
|
||||
case CHIP_RS300:
|
||||
case CHIP_RV280:
|
||||
case CHIP_R300:
|
||||
case CHIP_R350:
|
||||
case CHIP_RV350:
|
||||
case CHIP_RV380:
|
||||
case CHIP_R420:
|
||||
case CHIP_R423:
|
||||
case CHIP_RV410:
|
||||
case CHIP_RS400:
|
||||
case CHIP_RS480:
|
||||
case CHIP_RS600:
|
||||
case CHIP_RS690:
|
||||
case CHIP_RS740:
|
||||
case CHIP_RV515:
|
||||
case CHIP_R520:
|
||||
case CHIP_RV530:
|
||||
case CHIP_RV560:
|
||||
case CHIP_RV570:
|
||||
case CHIP_R580:
|
||||
default:
|
||||
fprintf(stderr, "%s unknown or unsupported chipset 0x%04X\n",
|
||||
__func__, radeon->device);
|
||||
break;
|
||||
}
|
||||
|
||||
/* setup class */
|
||||
switch (radeon->family) {
|
||||
case CHIP_R600:
|
||||
|
|
|
@ -122,6 +122,10 @@ static void do_ioctls(struct radeon_drm_winsys *winsys)
|
|||
(version->version_major == 2 &&
|
||||
version->version_minor >= 6);
|
||||
|
||||
winsys->drm_2_8_0 = version->version_major > 2 ||
|
||||
(version->version_major == 2 &&
|
||||
version->version_minor >= 8);
|
||||
|
||||
info.request = RADEON_INFO_DEVICE_ID;
|
||||
retval = drmCommandWriteRead(winsys->fd, DRM_RADEON_INFO, &info, sizeof(info));
|
||||
if (retval) {
|
||||
|
|
|
@ -211,6 +211,8 @@ static uint32_t radeon_get_value(struct r300_winsys_screen *rws,
|
|||
return ws->drm_2_3_0;
|
||||
case R300_VID_DRM_2_6_0:
|
||||
return ws->drm_2_6_0;
|
||||
case R300_VID_DRM_2_8_0:
|
||||
return ws->drm_2_8_0;
|
||||
case R300_CAN_HYPERZ:
|
||||
return ws->hyperz;
|
||||
}
|
||||
|
|
|
@ -49,8 +49,10 @@ struct radeon_drm_winsys {
|
|||
boolean squaretiling; /* Square tiling support. */
|
||||
/* DRM 2.3.0 (R500 VAP regs, MSPOS regs, fixed tex3D size checking) */
|
||||
boolean drm_2_3_0;
|
||||
/* DRM 2.6.0 (Hyper-Z, GB_Z_PEQ_CONFIG allowed on rv350->r4xx) */
|
||||
/* DRM 2.6.0 (Hyper-Z, GB_Z_PEQ_CONFIG allowed on rv350->r4xx, FG_ALPHA_VALUE) */
|
||||
boolean drm_2_6_0;
|
||||
/* DRM 2.8.0 (US_FORMAT regs, ARGB2101010 colorbuffer) */
|
||||
boolean drm_2_8_0;
|
||||
/* Hyper-Z user */
|
||||
boolean hyperz;
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ GLCPP_SOURCES = \
|
|||
glcpp/glcpp.c
|
||||
|
||||
C_SOURCES = \
|
||||
strtod.c \
|
||||
$(LIBGLCPP_SOURCES)
|
||||
|
||||
CXX_SOURCES = \
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue