X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fcommon%2Fdriverfuncs.c;h=915ac57501faffc023308c1debe0b0a4c4a4d057;hb=1044f99812bb29fa06c83c7230fe80f867711266;hp=a9ccbd565dac3131c92d7da065f5eccc8dfebf80;hpb=e42d00b3f4503a0840575c8e5f4517a66c8af613;p=mesa.git diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index a9ccbd565da..915ac57501f 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -1,6 +1,5 @@ /* * Mesa 3-D graphics library - * Version: 7.1 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * @@ -17,9 +16,10 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL 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. + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. */ @@ -28,6 +28,7 @@ #include "main/accum.h" #include "main/arrayobj.h" #include "main/context.h" +#include "main/formatquery.h" #include "main/framebuffer.h" #include "main/mipmap.h" #include "main/queryobj.h" @@ -39,6 +40,7 @@ #include "main/texgetimage.h" #include "main/teximage.h" #include "main/texobj.h" +#include "main/texstorage.h" #include "main/texstore.h" #include "main/bufferobj.h" #include "main/fbobject.h" @@ -73,16 +75,12 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->GetString = NULL; /* REQUIRED! */ driver->UpdateState = NULL; /* REQUIRED! */ - driver->GetBufferSize = NULL; /* REQUIRED! */ - driver->ResizeBuffers = _mesa_resize_framebuffer; - driver->Error = NULL; driver->Finish = NULL; driver->Flush = NULL; /* framebuffer/image functions */ driver->Clear = _swrast_Clear; - driver->Accum = _mesa_accum; driver->RasterPos = _tnl_RasterPos; driver->DrawPixels = _swrast_DrawPixels; driver->ReadPixels = _mesa_readpixels; @@ -91,21 +89,17 @@ _mesa_init_driver_functions(struct dd_function_table *driver) /* Texture functions */ driver->ChooseTextureFormat = _mesa_choose_tex_format; + driver->QuerySamplesForFormat = _mesa_query_samples_for_format; driver->TexImage = _mesa_store_teximage; driver->TexSubImage = _mesa_store_texsubimage; - driver->GetTexImage = _mesa_meta_GetTexImage; - driver->CopyTexSubImage1D = _mesa_meta_CopyTexSubImage1D; - driver->CopyTexSubImage2D = _mesa_meta_CopyTexSubImage2D; - driver->CopyTexSubImage3D = _mesa_meta_CopyTexSubImage3D; + driver->GetTexSubImage = _mesa_meta_GetTexSubImage; + driver->ClearTexSubImage = _mesa_meta_ClearTexSubImage; + driver->CopyTexSubImage = _mesa_meta_CopyTexSubImage; driver->GenerateMipmap = _mesa_meta_GenerateMipmap; driver->TestProxyTexImage = _mesa_test_proxy_teximage; - driver->CompressedTexImage1D = _mesa_store_compressed_teximage1d; - driver->CompressedTexImage2D = _mesa_store_compressed_teximage2d; - driver->CompressedTexImage3D = _mesa_store_compressed_teximage3d; - driver->CompressedTexSubImage1D = _mesa_store_compressed_texsubimage1d; - driver->CompressedTexSubImage2D = _mesa_store_compressed_texsubimage2d; - driver->CompressedTexSubImage3D = _mesa_store_compressed_texsubimage3d; - driver->GetCompressedTexImage = _mesa_get_compressed_teximage; + driver->CompressedTexImage = _mesa_store_compressed_teximage; + driver->CompressedTexSubImage = _mesa_store_compressed_texsubimage; + driver->GetCompressedTexSubImage = _mesa_GetCompressedTexSubImage_sw; driver->BindTexture = NULL; driver->NewTextureObject = _mesa_new_texture_object; driver->DeleteTexture = _mesa_delete_texture_object; @@ -139,7 +133,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->DepthRange = NULL; driver->Enable = NULL; driver->Fogfv = NULL; - driver->Hint = NULL; driver->Lightfv = NULL; driver->LightModelfv = NULL; driver->LineStipple = NULL; @@ -176,16 +169,17 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->UnmapRenderbuffer = _swrast_unmap_soft_renderbuffer; driver->RenderTexture = _swrast_render_texture; driver->FinishRenderTexture = _swrast_finish_render_texture; - driver->FramebufferRenderbuffer = _mesa_framebuffer_renderbuffer; + driver->FramebufferRenderbuffer = _mesa_FramebufferRenderbuffer_sw; driver->ValidateFramebuffer = _mesa_validate_framebuffer; driver->BlitFramebuffer = _swrast_BlitFramebuffer; + driver->DiscardFramebuffer = NULL; _mesa_init_texture_barrier_functions(driver); /* APPLE_vertex_array_object */ - driver->NewArrayObject = _mesa_new_array_object; - driver->DeleteArrayObject = _mesa_delete_array_object; + driver->NewArrayObject = _mesa_new_vao; + driver->DeleteArrayObject = _mesa_delete_vao; driver->BindArrayObject = NULL; _mesa_init_shader_object_functions(driver); @@ -203,7 +197,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->ProgramStringNotify = _tnl_program_string; driver->FlushVertices = NULL; driver->SaveFlushVertices = NULL; - driver->PrepareExecBegin = NULL; driver->NotifySaveBegin = NULL; driver->LightingSpaceChange = NULL; @@ -214,7 +207,13 @@ _mesa_init_driver_functions(struct dd_function_table *driver) driver->EndCallList = NULL; /* GL_ARB_texture_storage */ - driver->AllocTextureStorage = _swrast_AllocTextureStorage; + driver->AllocTextureStorage = _mesa_AllocTextureStorage_sw; + + /* GL_ARB_texture_view */ + driver->TextureView = NULL; + + /* GL_ARB_texture_multisample */ + driver->GetSamplePosition = NULL; } @@ -240,23 +239,11 @@ _mesa_init_driver_state(struct gl_context *ctx) ctx->Color.Blend[0].SrcA, ctx->Color.Blend[0].DstA); - if (ctx->Driver.ColorMaskIndexed) { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - ctx->Driver.ColorMaskIndexed(ctx, i, - ctx->Color.ColorMask[i][RCOMP], - ctx->Color.ColorMask[i][GCOMP], - ctx->Color.ColorMask[i][BCOMP], - ctx->Color.ColorMask[i][ACOMP]); - } - } - else { - ctx->Driver.ColorMask(ctx, - ctx->Color.ColorMask[0][RCOMP], - ctx->Color.ColorMask[0][GCOMP], - ctx->Color.ColorMask[0][BCOMP], - ctx->Color.ColorMask[0][ACOMP]); - } + ctx->Driver.ColorMask(ctx, + ctx->Color.ColorMask[0][RCOMP], + ctx->Color.ColorMask[0][GCOMP], + ctx->Color.ColorMask[0][BCOMP], + ctx->Color.ColorMask[0][ACOMP]); ctx->Driver.CullFace(ctx, ctx->Polygon.CullFaceMode); ctx->Driver.DepthFunc(ctx, ctx->Depth.Func); @@ -273,7 +260,7 @@ _mesa_init_driver_state(struct gl_context *ctx) ctx->Driver.Enable(ctx, GL_LIGHTING, ctx->Light.Enabled); ctx->Driver.Enable(ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag); ctx->Driver.Enable(ctx, GL_POLYGON_STIPPLE, ctx->Polygon.StippleFlag); - ctx->Driver.Enable(ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled); + ctx->Driver.Enable(ctx, GL_SCISSOR_TEST, ctx->Scissor.EnableFlags); ctx->Driver.Enable(ctx, GL_STENCIL_TEST, ctx->Stencil._Enabled); ctx->Driver.Enable(ctx, GL_TEXTURE_1D, GL_FALSE); ctx->Driver.Enable(ctx, GL_TEXTURE_2D, GL_FALSE); @@ -301,8 +288,7 @@ _mesa_init_driver_state(struct gl_context *ctx) ctx->Driver.LogicOpcode(ctx, ctx->Color.LogicOp); ctx->Driver.PointSize(ctx, ctx->Point.Size); ctx->Driver.PolygonStipple(ctx, (const GLubyte *) ctx->PolygonStipple); - ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, - ctx->Scissor.Width, ctx->Scissor.Height); + ctx->Driver.Scissor(ctx); ctx->Driver.ShadeModel(ctx, ctx->Light.ShadeModel); ctx->Driver.StencilFuncSeparate(ctx, GL_FRONT, ctx->Stencil.Function[0],