diff options
Diffstat (limited to 'src/mesa/x86')
-rw-r--r-- | src/mesa/x86/Makefile | 2 | ||||
-rw-r--r-- | src/mesa/x86/common_x86.c | 2 | ||||
-rw-r--r-- | src/mesa/x86/common_x86_asm.S | 1 | ||||
-rw-r--r-- | src/mesa/x86/glapi_x86.S | 127 | ||||
-rw-r--r-- | src/mesa/x86/read_rgba_span_x86.S | 137 | ||||
-rw-r--r-- | src/mesa/x86/rtasm/x86sse.c | 3 | ||||
-rw-r--r-- | src/mesa/x86/rtasm/x86sse.h | 2 |
7 files changed, 97 insertions, 177 deletions
diff --git a/src/mesa/x86/Makefile b/src/mesa/x86/Makefile index 09481dc509..aa49a9134a 100644 --- a/src/mesa/x86/Makefile +++ b/src/mesa/x86/Makefile @@ -17,7 +17,7 @@ INCLUDE_DIRS = \ default: gen_matypes matypes.h clean: - rm -f matypes.h gen_matypes + -rm -f matypes.h gen_matypes gen_matypes: gen_matypes.c diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c index dc80d26fa9..5321547935 100644 --- a/src/mesa/x86/common_x86.c +++ b/src/mesa/x86/common_x86.c @@ -48,8 +48,8 @@ #include <machine/cpu.h> #endif -#include "common_x86_asm.h" #include "main/imports.h" +#include "common_x86_asm.h" int _mesa_x86_cpu_features = 0; diff --git a/src/mesa/x86/common_x86_asm.S b/src/mesa/x86/common_x86_asm.S index 09c86b05ba..ea4047a0e1 100644 --- a/src/mesa/x86/common_x86_asm.S +++ b/src/mesa/x86/common_x86_asm.S @@ -39,6 +39,7 @@ * in there will break the build on some platforms. */ +#include "matypes.h" #include "assyntax.h" #include "common_x86_features.h" diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S index b99c2b6520..2e05a74ac6 100644 --- a/src/mesa/x86/glapi_x86.S +++ b/src/mesa/x86/glapi_x86.S @@ -712,23 +712,24 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(GetActiveAttribARB, _gloffset_GetActiveAttribARB, GetActiveAttribARB@28) GL_STUB(GetAttribLocationARB, _gloffset_GetAttribLocationARB, GetAttribLocationARB@8) GL_STUB(DrawBuffersARB, _gloffset_DrawBuffersARB, DrawBuffersARB@8) + GL_STUB(RenderbufferStorageMultisample, _gloffset_RenderbufferStorageMultisample, RenderbufferStorageMultisample@20) GL_STUB(PolygonOffsetEXT, _gloffset_PolygonOffsetEXT, PolygonOffsetEXT@8) - GL_STUB(_dispatch_stub_562, _gloffset_GetPixelTexGenParameterfvSGIS, _dispatch_stub_562@8) - HIDDEN(GL_PREFIX(_dispatch_stub_562, _dispatch_stub_562@8)) - GL_STUB(_dispatch_stub_563, _gloffset_GetPixelTexGenParameterivSGIS, _dispatch_stub_563@8) + GL_STUB(_dispatch_stub_563, _gloffset_GetPixelTexGenParameterfvSGIS, _dispatch_stub_563@8) HIDDEN(GL_PREFIX(_dispatch_stub_563, _dispatch_stub_563@8)) - GL_STUB(_dispatch_stub_564, _gloffset_PixelTexGenParameterfSGIS, _dispatch_stub_564@8) + GL_STUB(_dispatch_stub_564, _gloffset_GetPixelTexGenParameterivSGIS, _dispatch_stub_564@8) HIDDEN(GL_PREFIX(_dispatch_stub_564, _dispatch_stub_564@8)) - GL_STUB(_dispatch_stub_565, _gloffset_PixelTexGenParameterfvSGIS, _dispatch_stub_565@8) + GL_STUB(_dispatch_stub_565, _gloffset_PixelTexGenParameterfSGIS, _dispatch_stub_565@8) HIDDEN(GL_PREFIX(_dispatch_stub_565, _dispatch_stub_565@8)) - GL_STUB(_dispatch_stub_566, _gloffset_PixelTexGenParameteriSGIS, _dispatch_stub_566@8) + GL_STUB(_dispatch_stub_566, _gloffset_PixelTexGenParameterfvSGIS, _dispatch_stub_566@8) HIDDEN(GL_PREFIX(_dispatch_stub_566, _dispatch_stub_566@8)) - GL_STUB(_dispatch_stub_567, _gloffset_PixelTexGenParameterivSGIS, _dispatch_stub_567@8) + GL_STUB(_dispatch_stub_567, _gloffset_PixelTexGenParameteriSGIS, _dispatch_stub_567@8) HIDDEN(GL_PREFIX(_dispatch_stub_567, _dispatch_stub_567@8)) - GL_STUB(_dispatch_stub_568, _gloffset_SampleMaskSGIS, _dispatch_stub_568@8) + GL_STUB(_dispatch_stub_568, _gloffset_PixelTexGenParameterivSGIS, _dispatch_stub_568@8) HIDDEN(GL_PREFIX(_dispatch_stub_568, _dispatch_stub_568@8)) - GL_STUB(_dispatch_stub_569, _gloffset_SamplePatternSGIS, _dispatch_stub_569@4) - HIDDEN(GL_PREFIX(_dispatch_stub_569, _dispatch_stub_569@4)) + GL_STUB(_dispatch_stub_569, _gloffset_SampleMaskSGIS, _dispatch_stub_569@8) + HIDDEN(GL_PREFIX(_dispatch_stub_569, _dispatch_stub_569@8)) + GL_STUB(_dispatch_stub_570, _gloffset_SamplePatternSGIS, _dispatch_stub_570@4) + HIDDEN(GL_PREFIX(_dispatch_stub_570, _dispatch_stub_570@4)) GL_STUB(ColorPointerEXT, _gloffset_ColorPointerEXT, ColorPointerEXT@20) GL_STUB(EdgeFlagPointerEXT, _gloffset_EdgeFlagPointerEXT, EdgeFlagPointerEXT@12) GL_STUB(IndexPointerEXT, _gloffset_IndexPointerEXT, IndexPointerEXT@16) @@ -739,10 +740,10 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(PointParameterfvEXT, _gloffset_PointParameterfvEXT, PointParameterfvEXT@8) GL_STUB(LockArraysEXT, _gloffset_LockArraysEXT, LockArraysEXT@8) GL_STUB(UnlockArraysEXT, _gloffset_UnlockArraysEXT, UnlockArraysEXT@0) - GL_STUB(_dispatch_stub_580, _gloffset_CullParameterdvEXT, _dispatch_stub_580@8) - HIDDEN(GL_PREFIX(_dispatch_stub_580, _dispatch_stub_580@8)) - GL_STUB(_dispatch_stub_581, _gloffset_CullParameterfvEXT, _dispatch_stub_581@8) + GL_STUB(_dispatch_stub_581, _gloffset_CullParameterdvEXT, _dispatch_stub_581@8) HIDDEN(GL_PREFIX(_dispatch_stub_581, _dispatch_stub_581@8)) + GL_STUB(_dispatch_stub_582, _gloffset_CullParameterfvEXT, _dispatch_stub_582@8) + HIDDEN(GL_PREFIX(_dispatch_stub_582, _dispatch_stub_582@8)) GL_STUB(SecondaryColor3bEXT, _gloffset_SecondaryColor3bEXT, SecondaryColor3bEXT@12) GL_STUB(SecondaryColor3bvEXT, _gloffset_SecondaryColor3bvEXT, SecondaryColor3bvEXT@4) GL_STUB(SecondaryColor3dEXT, _gloffset_SecondaryColor3dEXT, SecondaryColor3dEXT@24) @@ -767,8 +768,8 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(FogCoorddvEXT, _gloffset_FogCoorddvEXT, FogCoorddvEXT@4) GL_STUB(FogCoordfEXT, _gloffset_FogCoordfEXT, FogCoordfEXT@4) GL_STUB(FogCoordfvEXT, _gloffset_FogCoordfvEXT, FogCoordfvEXT@4) - GL_STUB(_dispatch_stub_606, _gloffset_PixelTexGenSGIX, _dispatch_stub_606@4) - HIDDEN(GL_PREFIX(_dispatch_stub_606, _dispatch_stub_606@4)) + GL_STUB(_dispatch_stub_607, _gloffset_PixelTexGenSGIX, _dispatch_stub_607@4) + HIDDEN(GL_PREFIX(_dispatch_stub_607, _dispatch_stub_607@4)) GL_STUB(BlendFuncSeparateEXT, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparateEXT@16) GL_STUB(FlushVertexArrayRangeNV, _gloffset_FlushVertexArrayRangeNV, FlushVertexArrayRangeNV@0) GL_STUB(VertexArrayRangeNV, _gloffset_VertexArrayRangeNV, VertexArrayRangeNV@8) @@ -810,24 +811,24 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(WindowPos4ivMESA, _gloffset_WindowPos4ivMESA, WindowPos4ivMESA@4) GL_STUB(WindowPos4sMESA, _gloffset_WindowPos4sMESA, WindowPos4sMESA@16) GL_STUB(WindowPos4svMESA, _gloffset_WindowPos4svMESA, WindowPos4svMESA@4) - GL_STUB(_dispatch_stub_648, _gloffset_MultiModeDrawArraysIBM, _dispatch_stub_648@20) - HIDDEN(GL_PREFIX(_dispatch_stub_648, _dispatch_stub_648@20)) - GL_STUB(_dispatch_stub_649, _gloffset_MultiModeDrawElementsIBM, _dispatch_stub_649@24) - HIDDEN(GL_PREFIX(_dispatch_stub_649, _dispatch_stub_649@24)) - GL_STUB(_dispatch_stub_650, _gloffset_DeleteFencesNV, _dispatch_stub_650@8) - HIDDEN(GL_PREFIX(_dispatch_stub_650, _dispatch_stub_650@8)) - GL_STUB(_dispatch_stub_651, _gloffset_FinishFenceNV, _dispatch_stub_651@4) - HIDDEN(GL_PREFIX(_dispatch_stub_651, _dispatch_stub_651@4)) - GL_STUB(_dispatch_stub_652, _gloffset_GenFencesNV, _dispatch_stub_652@8) - HIDDEN(GL_PREFIX(_dispatch_stub_652, _dispatch_stub_652@8)) - GL_STUB(_dispatch_stub_653, _gloffset_GetFenceivNV, _dispatch_stub_653@12) - HIDDEN(GL_PREFIX(_dispatch_stub_653, _dispatch_stub_653@12)) - GL_STUB(_dispatch_stub_654, _gloffset_IsFenceNV, _dispatch_stub_654@4) - HIDDEN(GL_PREFIX(_dispatch_stub_654, _dispatch_stub_654@4)) - GL_STUB(_dispatch_stub_655, _gloffset_SetFenceNV, _dispatch_stub_655@8) - HIDDEN(GL_PREFIX(_dispatch_stub_655, _dispatch_stub_655@8)) - GL_STUB(_dispatch_stub_656, _gloffset_TestFenceNV, _dispatch_stub_656@4) - HIDDEN(GL_PREFIX(_dispatch_stub_656, _dispatch_stub_656@4)) + GL_STUB(_dispatch_stub_649, _gloffset_MultiModeDrawArraysIBM, _dispatch_stub_649@20) + HIDDEN(GL_PREFIX(_dispatch_stub_649, _dispatch_stub_649@20)) + GL_STUB(_dispatch_stub_650, _gloffset_MultiModeDrawElementsIBM, _dispatch_stub_650@24) + HIDDEN(GL_PREFIX(_dispatch_stub_650, _dispatch_stub_650@24)) + GL_STUB(_dispatch_stub_651, _gloffset_DeleteFencesNV, _dispatch_stub_651@8) + HIDDEN(GL_PREFIX(_dispatch_stub_651, _dispatch_stub_651@8)) + GL_STUB(_dispatch_stub_652, _gloffset_FinishFenceNV, _dispatch_stub_652@4) + HIDDEN(GL_PREFIX(_dispatch_stub_652, _dispatch_stub_652@4)) + GL_STUB(_dispatch_stub_653, _gloffset_GenFencesNV, _dispatch_stub_653@8) + HIDDEN(GL_PREFIX(_dispatch_stub_653, _dispatch_stub_653@8)) + GL_STUB(_dispatch_stub_654, _gloffset_GetFenceivNV, _dispatch_stub_654@12) + HIDDEN(GL_PREFIX(_dispatch_stub_654, _dispatch_stub_654@12)) + GL_STUB(_dispatch_stub_655, _gloffset_IsFenceNV, _dispatch_stub_655@4) + HIDDEN(GL_PREFIX(_dispatch_stub_655, _dispatch_stub_655@4)) + GL_STUB(_dispatch_stub_656, _gloffset_SetFenceNV, _dispatch_stub_656@8) + HIDDEN(GL_PREFIX(_dispatch_stub_656, _dispatch_stub_656@8)) + GL_STUB(_dispatch_stub_657, _gloffset_TestFenceNV, _dispatch_stub_657@4) + HIDDEN(GL_PREFIX(_dispatch_stub_657, _dispatch_stub_657@4)) GL_STUB(AreProgramsResidentNV, _gloffset_AreProgramsResidentNV, AreProgramsResidentNV@12) GL_STUB(BindProgramNV, _gloffset_BindProgramNV, BindProgramNV@8) GL_STUB(DeleteProgramsNV, _gloffset_DeleteProgramsNV, DeleteProgramsNV@8) @@ -904,26 +905,26 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(SetFragmentShaderConstantATI, _gloffset_SetFragmentShaderConstantATI, SetFragmentShaderConstantATI@8) GL_STUB(PointParameteriNV, _gloffset_PointParameteriNV, PointParameteriNV@8) GL_STUB(PointParameterivNV, _gloffset_PointParameterivNV, PointParameterivNV@8) - GL_STUB(_dispatch_stub_733, _gloffset_ActiveStencilFaceEXT, _dispatch_stub_733@4) - HIDDEN(GL_PREFIX(_dispatch_stub_733, _dispatch_stub_733@4)) - GL_STUB(_dispatch_stub_734, _gloffset_BindVertexArrayAPPLE, _dispatch_stub_734@4) + GL_STUB(_dispatch_stub_734, _gloffset_ActiveStencilFaceEXT, _dispatch_stub_734@4) HIDDEN(GL_PREFIX(_dispatch_stub_734, _dispatch_stub_734@4)) - GL_STUB(_dispatch_stub_735, _gloffset_DeleteVertexArraysAPPLE, _dispatch_stub_735@8) - HIDDEN(GL_PREFIX(_dispatch_stub_735, _dispatch_stub_735@8)) - GL_STUB(_dispatch_stub_736, _gloffset_GenVertexArraysAPPLE, _dispatch_stub_736@8) + GL_STUB(_dispatch_stub_735, _gloffset_BindVertexArrayAPPLE, _dispatch_stub_735@4) + HIDDEN(GL_PREFIX(_dispatch_stub_735, _dispatch_stub_735@4)) + GL_STUB(_dispatch_stub_736, _gloffset_DeleteVertexArraysAPPLE, _dispatch_stub_736@8) HIDDEN(GL_PREFIX(_dispatch_stub_736, _dispatch_stub_736@8)) - GL_STUB(_dispatch_stub_737, _gloffset_IsVertexArrayAPPLE, _dispatch_stub_737@4) - HIDDEN(GL_PREFIX(_dispatch_stub_737, _dispatch_stub_737@4)) + GL_STUB(_dispatch_stub_737, _gloffset_GenVertexArraysAPPLE, _dispatch_stub_737@8) + HIDDEN(GL_PREFIX(_dispatch_stub_737, _dispatch_stub_737@8)) + GL_STUB(_dispatch_stub_738, _gloffset_IsVertexArrayAPPLE, _dispatch_stub_738@4) + HIDDEN(GL_PREFIX(_dispatch_stub_738, _dispatch_stub_738@4)) GL_STUB(GetProgramNamedParameterdvNV, _gloffset_GetProgramNamedParameterdvNV, GetProgramNamedParameterdvNV@16) GL_STUB(GetProgramNamedParameterfvNV, _gloffset_GetProgramNamedParameterfvNV, GetProgramNamedParameterfvNV@16) GL_STUB(ProgramNamedParameter4dNV, _gloffset_ProgramNamedParameter4dNV, ProgramNamedParameter4dNV@44) GL_STUB(ProgramNamedParameter4dvNV, _gloffset_ProgramNamedParameter4dvNV, ProgramNamedParameter4dvNV@16) GL_STUB(ProgramNamedParameter4fNV, _gloffset_ProgramNamedParameter4fNV, ProgramNamedParameter4fNV@28) GL_STUB(ProgramNamedParameter4fvNV, _gloffset_ProgramNamedParameter4fvNV, ProgramNamedParameter4fvNV@16) - GL_STUB(_dispatch_stub_744, _gloffset_DepthBoundsEXT, _dispatch_stub_744@16) - HIDDEN(GL_PREFIX(_dispatch_stub_744, _dispatch_stub_744@16)) - GL_STUB(_dispatch_stub_745, _gloffset_BlendEquationSeparateEXT, _dispatch_stub_745@8) - HIDDEN(GL_PREFIX(_dispatch_stub_745, _dispatch_stub_745@8)) + GL_STUB(_dispatch_stub_745, _gloffset_DepthBoundsEXT, _dispatch_stub_745@16) + HIDDEN(GL_PREFIX(_dispatch_stub_745, _dispatch_stub_745@16)) + GL_STUB(_dispatch_stub_746, _gloffset_BlendEquationSeparateEXT, _dispatch_stub_746@8) + HIDDEN(GL_PREFIX(_dispatch_stub_746, _dispatch_stub_746@8)) GL_STUB(BindFramebufferEXT, _gloffset_BindFramebufferEXT, BindFramebufferEXT@8) GL_STUB(BindRenderbufferEXT, _gloffset_BindRenderbufferEXT, BindRenderbufferEXT@8) GL_STUB(CheckFramebufferStatusEXT, _gloffset_CheckFramebufferStatusEXT, CheckFramebufferStatusEXT@4) @@ -941,19 +942,19 @@ GLNAME(gl_dispatch_functions_start): GL_STUB(IsFramebufferEXT, _gloffset_IsFramebufferEXT, IsFramebufferEXT@4) GL_STUB(IsRenderbufferEXT, _gloffset_IsRenderbufferEXT, IsRenderbufferEXT@4) GL_STUB(RenderbufferStorageEXT, _gloffset_RenderbufferStorageEXT, RenderbufferStorageEXT@16) - GL_STUB(_dispatch_stub_763, _gloffset_BlitFramebufferEXT, _dispatch_stub_763@40) - HIDDEN(GL_PREFIX(_dispatch_stub_763, _dispatch_stub_763@40)) + GL_STUB(_dispatch_stub_764, _gloffset_BlitFramebufferEXT, _dispatch_stub_764@40) + HIDDEN(GL_PREFIX(_dispatch_stub_764, _dispatch_stub_764@40)) GL_STUB(FramebufferTextureLayerEXT, _gloffset_FramebufferTextureLayerEXT, FramebufferTextureLayerEXT@20) - GL_STUB(_dispatch_stub_765, _gloffset_StencilFuncSeparateATI, _dispatch_stub_765@16) - HIDDEN(GL_PREFIX(_dispatch_stub_765, _dispatch_stub_765@16)) - GL_STUB(_dispatch_stub_766, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_766@16) + GL_STUB(_dispatch_stub_766, _gloffset_StencilFuncSeparateATI, _dispatch_stub_766@16) HIDDEN(GL_PREFIX(_dispatch_stub_766, _dispatch_stub_766@16)) - GL_STUB(_dispatch_stub_767, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_767@16) + GL_STUB(_dispatch_stub_767, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_767@16) HIDDEN(GL_PREFIX(_dispatch_stub_767, _dispatch_stub_767@16)) - GL_STUB(_dispatch_stub_768, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_768@12) - HIDDEN(GL_PREFIX(_dispatch_stub_768, _dispatch_stub_768@12)) - GL_STUB(_dispatch_stub_769, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_769@12) + GL_STUB(_dispatch_stub_768, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_768@16) + HIDDEN(GL_PREFIX(_dispatch_stub_768, _dispatch_stub_768@16)) + GL_STUB(_dispatch_stub_769, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_769@12) HIDDEN(GL_PREFIX(_dispatch_stub_769, _dispatch_stub_769@12)) + GL_STUB(_dispatch_stub_770, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_770@12) + HIDDEN(GL_PREFIX(_dispatch_stub_770, _dispatch_stub_770@12)) GL_STUB_ALIAS(ArrayElementEXT, _gloffset_ArrayElement, ArrayElementEXT@4, ArrayElement, ArrayElement@4) GL_STUB_ALIAS(BindTextureEXT, _gloffset_BindTexture, BindTextureEXT@8, BindTexture, BindTexture@8) GL_STUB_ALIAS(DrawArraysEXT, _gloffset_DrawArrays, DrawArraysEXT@12, DrawArrays, DrawArrays@12) @@ -1269,6 +1270,24 @@ GLNAME(gl_dispatch_functions_start): GL_STUB_ALIAS(IsProgramARB, _gloffset_IsProgramNV, IsProgramARB@4, IsProgramNV, IsProgramNV@4) GL_STUB_ALIAS(PointParameteri, _gloffset_PointParameteriNV, PointParameteri@8, PointParameteriNV, PointParameteriNV@8) GL_STUB_ALIAS(PointParameteriv, _gloffset_PointParameterivNV, PointParameteriv@8, PointParameterivNV, PointParameterivNV@8) + GL_STUB_ALIAS(BindFramebuffer, _gloffset_BindFramebufferEXT, BindFramebuffer@8, BindFramebufferEXT, BindFramebufferEXT@8) + GL_STUB_ALIAS(BindRenderbuffer, _gloffset_BindRenderbufferEXT, BindRenderbuffer@8, BindRenderbufferEXT, BindRenderbufferEXT@8) + GL_STUB_ALIAS(CheckFramebufferStatus, _gloffset_CheckFramebufferStatusEXT, CheckFramebufferStatus@4, CheckFramebufferStatusEXT, CheckFramebufferStatusEXT@4) + GL_STUB_ALIAS(DeleteFramebuffers, _gloffset_DeleteFramebuffersEXT, DeleteFramebuffers@8, DeleteFramebuffersEXT, DeleteFramebuffersEXT@8) + GL_STUB_ALIAS(DeleteRenderbuffers, _gloffset_DeleteRenderbuffersEXT, DeleteRenderbuffers@8, DeleteRenderbuffersEXT, DeleteRenderbuffersEXT@8) + GL_STUB_ALIAS(FramebufferRenderbuffer, _gloffset_FramebufferRenderbufferEXT, FramebufferRenderbuffer@16, FramebufferRenderbufferEXT, FramebufferRenderbufferEXT@16) + GL_STUB_ALIAS(FramebufferTexture1D, _gloffset_FramebufferTexture1DEXT, FramebufferTexture1D@20, FramebufferTexture1DEXT, FramebufferTexture1DEXT@20) + GL_STUB_ALIAS(FramebufferTexture2D, _gloffset_FramebufferTexture2DEXT, FramebufferTexture2D@20, FramebufferTexture2DEXT, FramebufferTexture2DEXT@20) + GL_STUB_ALIAS(FramebufferTexture3D, _gloffset_FramebufferTexture3DEXT, FramebufferTexture3D@24, FramebufferTexture3DEXT, FramebufferTexture3DEXT@24) + GL_STUB_ALIAS(GenFramebuffers, _gloffset_GenFramebuffersEXT, GenFramebuffers@8, GenFramebuffersEXT, GenFramebuffersEXT@8) + GL_STUB_ALIAS(GenRenderbuffers, _gloffset_GenRenderbuffersEXT, GenRenderbuffers@8, GenRenderbuffersEXT, GenRenderbuffersEXT@8) + GL_STUB_ALIAS(GenerateMipmap, _gloffset_GenerateMipmapEXT, GenerateMipmap@4, GenerateMipmapEXT, GenerateMipmapEXT@4) + GL_STUB_ALIAS(GetFramebufferAttachmentParameteriv, _gloffset_GetFramebufferAttachmentParameterivEXT, GetFramebufferAttachmentParameteriv@16, GetFramebufferAttachmentParameterivEXT, GetFramebufferAttachmentParameterivEXT@16) + GL_STUB_ALIAS(GetRenderbufferParameteriv, _gloffset_GetRenderbufferParameterivEXT, GetRenderbufferParameteriv@12, GetRenderbufferParameterivEXT, GetRenderbufferParameterivEXT@12) + GL_STUB_ALIAS(IsFramebuffer, _gloffset_IsFramebufferEXT, IsFramebuffer@4, IsFramebufferEXT, IsFramebufferEXT@4) + GL_STUB_ALIAS(IsRenderbuffer, _gloffset_IsRenderbufferEXT, IsRenderbuffer@4, IsRenderbufferEXT, IsRenderbufferEXT@4) + GL_STUB_ALIAS(RenderbufferStorage, _gloffset_RenderbufferStorageEXT, RenderbufferStorage@16, RenderbufferStorageEXT, RenderbufferStorageEXT@16) + GL_STUB_ALIAS(FramebufferTextureLayer, _gloffset_FramebufferTextureLayerEXT, FramebufferTextureLayer@20, FramebufferTextureLayerEXT, FramebufferTextureLayerEXT@20) GLOBL GLNAME(gl_dispatch_functions_end) HIDDEN(GLNAME(gl_dispatch_functions_end)) diff --git a/src/mesa/x86/read_rgba_span_x86.S b/src/mesa/x86/read_rgba_span_x86.S index 3cbcd71996..80144b889c 100644 --- a/src/mesa/x86/read_rgba_span_x86.S +++ b/src/mesa/x86/read_rgba_span_x86.S @@ -33,20 +33,7 @@ .file "read_rgba_span_x86.S" #if !defined(__DJGPP__) && !defined(__MINGW32__) /* this one cries for assyntax.h */ /* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - .section .rodata - .align 16 - .type mask, @object - .size mask, 32 -mask: - .long 0xff00ff00 - .long 0xff00ff00 - .long 0xff00ff00 - .long 0xff00ff00 - .long 0x00ff0000 - .long 0x00ff0000 - .long 0x00ff0000 - .long 0x00ff0000 + * Replaced data segment constants with text-segment instructions. */ #define LOAD_MASK(mvins,m1,m2) \ pushl $0xff00ff00 ;\ @@ -61,8 +48,7 @@ mask: mvins (%esp), m2 ;\ addl $32, %esp - -/* I implemented these as macros because the appear in quite a few places, +/* I implemented these as macros because they appear in several places, * and I've tweaked them a number of times. I got tired of changing every * place they appear. :) */ @@ -99,11 +85,6 @@ _generic_read_RGBA_span_BGRA8888_REV_MMX: #ifdef USE_INNER_EMMS emms #endif -/* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - movq mask, %mm1 - movq mask+16, %mm2 - */ LOAD_MASK(movq,%mm1,%mm2) movl 8(%esp), %ebx /* source pointer */ @@ -201,11 +182,7 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE: #ifdef USE_INNER_EMMS emms #endif -/* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - movq mask, %mm1 - movq mask+16, %mm2 - */ + LOAD_MASK(movq,%mm1,%mm2) movl 16(%esp), %ebx /* source pointer */ @@ -364,11 +341,6 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2: pushl %esi pushl %ebx -/* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - movdqa mask, %xmm1 - movdqa mask+16, %xmm2 - */ LOAD_MASK(movdqu,%xmm1,%xmm2) movl 12(%esp), %ebx /* source pointer */ @@ -462,7 +434,8 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2: je .L47 movq (%ebx), %xmm0 - + addl $8, %ebx + movdqa %xmm0, %xmm3 movdqa %xmm0, %xmm4 andps %xmm1, %xmm0 @@ -476,6 +449,7 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2: orps %xmm3, %xmm0 movq %xmm0, (%ecx) + addl $8, %ecx .L47: testl $1, %edx @@ -491,60 +465,12 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2: -/* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - */ -#if 0 - .section .rodata - - .align 16 -mask_565: - .word 0xf800 - .word 0x07e0 - .word 0x001f - .word 0x0000 - -/* Setting SCALE_ADJUST to 5 gives a perfect match with the classic C - * implementation in Mesa. Setting SCALE_ADJUST to 0 is slightly faster but - * at a small cost to accuracy. - */ - -#define SCALE_ADJUST 5 -#if SCALE_ADJUST == 5 -prescale: - .word 0x0001 - .word 0x0010 - .word 0x0200 - .word 0x0000 - -scale: - .word 0x20e8 /* (0x00ff0000 / 0x000007c0) + 1 */ - .word 0x40c5 /* (0x00ff0000 / 0x000003f0) + 1 */ - .word 0x839d /* (0x00ff0000 / 0x000001f0) + 1 */ - .word 0x0000 -#elif SCALE_ADJUST == 0 -prescale: - .word 0x0001 - .word 0x0020 - .word 0x0800 - .word 0x0000 - -scale: - .word 0x0108 /* (0x00ff0000 / 0x0000f800) + 1 */ - .word 0x0104 /* (0x00ff0000 / 0x0000fc00) + 1 */ - .word 0x0108 /* (0x00ff0000 / 0x0000f800) + 1 */ - .word 0x0000 -#else -#error SCALE_ADJUST must either be 5 or 0. -#endif - - -alpha: .long 0x00000000 - .long 0x00ff0000 -#endif - #define MASK_565_L 0x07e0f800 #define MASK_565_H 0x0000001f +/* Setting SCALE_ADJUST to 5 gives a perfect match with the + * classic C implementation in Mesa. Setting SCALE_ADJUST + * to 0 is slightly faster but at a small cost to accuracy. + */ #define SCALE_ADJUST 5 #if SCALE_ADJUST == 5 #define PRESCALE_L 0x00100001 @@ -581,23 +507,17 @@ _generic_read_RGBA_span_RGB565_MMX: movl 8(%esp), %edx /* destination pointer */ movl 12(%esp), %ecx /* number of pixels to copy */ -/* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - movq mask_565, %mm5 - movq prescale, %mm6 - movq scale, %mm7 - */ - pushl MASK_565_H - pushl MASK_565_L + pushl $MASK_565_H + pushl $MASK_565_L movq (%esp), %mm5 - pushl PRESCALE_H - pushl PRESCALE_L + pushl $PRESCALE_H + pushl $PRESCALE_L movq (%esp), %mm6 - pushl SCALE_H - pushl SCALE_L + pushl $SCALE_H + pushl $SCALE_L movq (%esp), %mm7 - pushl ALPHA_H - pushl ALPHA_L + pushl $ALPHA_H + pushl $ALPHA_L movq (%esp), %mm3 addl $32,%esp @@ -648,11 +568,6 @@ _generic_read_RGBA_span_RGB565_MMX: /* Always set the alpha value to 0xff. */ -/* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - por alpha, %mm0 - por alpha, %mm2 - */ por %mm3, %mm0 por %mm3, %mm2 @@ -665,8 +580,6 @@ _generic_read_RGBA_span_RGB565_MMX: movq %mm0, (%edx) addl $8, %edx - - pshufw $0xaa, %mm4, %mm0 pshufw $0xff, %mm4, %mm2 @@ -681,11 +594,6 @@ _generic_read_RGBA_span_RGB565_MMX: pmulhuw %mm7, %mm0 pmulhuw %mm7, %mm2 -/* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - por alpha, %mm0 - por alpha, %mm2 - */ por %mm3, %mm0 por %mm3, %mm2 @@ -724,11 +632,6 @@ _generic_read_RGBA_span_RGB565_MMX: pmulhuw %mm7, %mm0 pmulhuw %mm7, %mm2 -/* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - por alpha, %mm0 - por alpha, %mm2 - */ por %mm3, %mm0 por %mm3, %mm2 @@ -757,10 +660,6 @@ _generic_read_RGBA_span_RGB565_MMX: #endif pmulhuw %mm7, %mm0 -/* Kevin F. Quinn 2nd July 2006 - * Replace data segment constants with text-segment instructions - por alpha, %mm0 - */ por %mm3, %mm0 packuswb %mm0, %mm0 diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 5c4bab7331..5aedf5b04b 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -1162,11 +1162,12 @@ void x86_init_func( struct x86_function *p ) p->csr = p->store; } -void x86_init_func_size( struct x86_function *p, unsigned code_size ) +int x86_init_func_size( struct x86_function *p, unsigned code_size ) { p->size = code_size; p->store = _mesa_exec_malloc(code_size); p->csr = p->store; + return p->store != NULL; } void x86_release_func( struct x86_function *p ) diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h index c2aa416492..f6282f5bd4 100644 --- a/src/mesa/x86/rtasm/x86sse.h +++ b/src/mesa/x86/rtasm/x86sse.h @@ -80,7 +80,7 @@ enum sse_cc { void x86_init_func( struct x86_function *p ); -void x86_init_func_size( struct x86_function *p, unsigned code_size ); +int x86_init_func_size( struct x86_function *p, unsigned code_size ); void x86_release_func( struct x86_function *p ); void (*x86_get_func( struct x86_function *p ))( void ); |