summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dd.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove 'params' parameter from ctx->Driver.TexParameter()Brian Paul2016-10-131-3/+2
| | | | | | | | | | | None of the drivers which implement this hook do anything with the texture parameter value. Drivers just look at the pname and set a dirty flag if needed. We were doing some ugly casting and type conversion to setup the argument so that all goes away. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* mesa/main: add support for ARB_compute_variable_groups_sizeSamuel Pitoiset2016-10-071-0/+9
| | | | | | | | | | | | | v5: - replace fixed_local_size by !LocalSizeVariable (Nicolai) v4: - slightly indent spec quotes (Nicolai) - drop useless _mesa_has_compute_shaders() check (Nicolai) - move the fixed local size outside of the loop (Nicolai) - add missing check for invalid use of work group count v2: - update formatting spec quotations (Ian) - move the total_invocations check outside of the loop (Ian) Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* mesa: Add blend barrier entry point and driver hook.Francisco Jerez2016-08-241-0/+12
| | | | | | | | | | | | | Both MESA_shader_framebuffer_fetch_non_coherent and the non-coherent variant of KHR_blend_equation_advanced will use this driver hook to request coherency between framebuffer reads and writes. This intentionally doesn't hook up glBlendBarrierMESA to the dispatch layer since the extension isn't exposed to applications yet, see [1] for more details. [1] https://lists.freedesktop.org/archives/mesa-dev/2016-July/124028.html Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: remove dd_function_table::UseProgramMarek Olšák2016-07-301-1/+0
| | | | | | finally unused Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* mesa: add numLevels, numSamples to Driver.TestProxyTexImage()Brian Paul2016-07-151-2/+3
| | | | | | | | | | | | | So that the function can work properly with glTexStorage(), where we know how many mipmap levels there are. And so we can compute storage for MSAA textures. Also, remove the obsolete texture border parameter. A subsequent patch will update _mesa_test_proxy_teximage() to use these new parameters. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* glsl/mesa: split gl_shader in twoTimothy Arceri2016-06-301-2/+1
| | | | | | | | | | | | | | | | | There are two distinctly different uses of this struct. The first is to store GL shader objects. The second is to store information about a shader stage thats been linked. The two uses actually share few fields and there is clearly confusion about their use. For example the linked shaders map one to one with a program so can simply be destroyed along with the program. However previously we were calling reference counting on the linked shaders. We were also creating linked shaders with a name even though it is always 0 and called the driver version of the _mesa_new_shader() function unnecessarily for GL shader objects. Acked-by: Iago Toral Quiroga <itoral@igalia.com>
* mesa/glsl: stop using GL shader type internallyTimothy Arceri2016-06-161-1/+1
| | | | | | | | | | | | Instead use the internal gl_shader_stage enum everywhere. This makes things more consistent and gets rid of unnecessary conversions. Ideally it would be nice to remove the Type field from gl_shader altogether but currently it is used to differentiate between gl_shader and gl_shader_program in the ShaderObjects hash table. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: move MESA_MAP_NOWAIT_BIT up away from GL_MAP_PERSISTENT_BITDave Airlie2016-05-111-1/+1
| | | | | | | | | | This was colliding badly and making GL45-CTS.buffer_storage.map_persistent_texture fail on radeonsi. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* mesa: optionally associate a gl_program to ATI_fragment_shaderMiklós Máté2016-03-271-0/+5
| | | | | | | | | the state tracker will use it Acked-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Miklós Máté <mtmkls@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* mesa: Completely remove QuerySamplesForFormat from driver func tableEduardo Lima Mitev2016-03-031-18/+0
| | | | | | | At this point, all uses have been replaced by the more general hook QueryInternalFormat, introduced by ARB_internalformat_query2. Reviewed-by: Dave Airlie <airlied@redhat.com>
* mesa: Add QueryInternalFormat to device driver virtual tableEduardo Lima Mitev2016-03-031-0/+20
| | | | | | | | | | | | | This new function queries different driver parameters for a particular target and texture format. It is basically a driver hook to support ARB_internalformat_query2. Since ARB_internalformat_query2 introduced several new query parameters over ARB_internalformat_query, having one driver hook for each parameter is no longer feasible. So this is the generic entry-point for calls to glGetInternalFormativ and glGetInternalFormati64v. Reviewed-by: Dave Airlie <airlied@redhat.com>
* mesa: implement a display list / glBitmap texture atlasBrian Paul2016-02-171-0/+9
| | | | | | | | | | | | | | | | | | | | | This improves the performance of applications which use glXUseXFont() or wglUseFontBitmaps() and glCallLists() to draw bitmap text. Basically, we collect all the glBitmap images from the display lists and put them into a texture atlas. To render the bitmaps for a glCallLists() command, we render a set of textured quads where each quad is textured with one bitmap image. Actually, the rendering part has to be done by the Mesa driver or Mesa/gallium state tracker. Note that GLUT demos that use glutBitmapCharacter() don't benefit from this. v2, per Nicolai Hähnle: - check the max tex rect size is at least 1024. - add comment in dd.h that texture_rectangle is required. - in _mesa_DeleteLists(), try to delete the atlas before the list(s) Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
* mesa: implement GL_NVX_gpu_memory_info (v2)Marek Olšák2016-02-051-0/+8
| | | | | | | | v2: implement eviction queries properly add gl_memory_info structure Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* mesa: add driver interface for writing query results to buffersIlia Mirkin2016-02-041-0/+9
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* mesa: add GREMEDY_string_markerRob Clark2016-01-211-0/+6
| | | | | Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: add Driver.InvalidateBufferSubDataNicolai Hähnle2016-01-141-0/+5
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa/main: allow delayed initialization of performance monitorsNicolai Hähnle2015-11-251-0/+1
| | | | | | | | | | | | | | | | Most applications never use performance counters, so allow drivers to skip potentially expensive initialization steps. A driver that wants to use this must enable the appropriate extension(s) at context initialization and set the InitPerfMonitorGroups driver function which will be called the first time information about the performance monitor groups is actually used. The init_groups helper is called for API functions that can be called before a monitor object exists. Functions that require an existing monitor object can rely on init_groups having been called before. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* mesa: remove Driver.BindImageTextureMarek Olšák2015-10-031-6/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.DeleteSamplerObjectMarek Olšák2015-10-031-2/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.EndCallListMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove Driver.BeginCallListMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove Driver.EndListMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove Driver.NewListMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove Driver.NotifySaveBeginMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove Driver.SaveFlushVerticesMarek Olšák2015-10-031-3/+1
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove Driver.FlushVerticesMarek Olšák2015-10-031-10/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove Driver.BeginVerticesMarek Olšák2015-10-031-5/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove Driver.BindArrayObjectMarek Olšák2015-10-031-8/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.DeleteArrayObjectMarek Olšák2015-10-031-1/+0
| | | | | | | Nothing reimplements it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.NewArrayObjectMarek Olšák2015-10-031-1/+0
| | | | | | | Nothing reimplements it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.HintMarek Olšák2015-10-031-2/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.ColorMaskIndexedMarek Olšák2015-10-031-2/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove some Driver.Blend* hooksMarek Olšák2015-10-031-5/+0
| | | | | | | Nothing sets them. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.AccumMarek Olšák2015-10-031-6/+0
| | | | | | | Nothing calls it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.ResizeBuffersMarek Olšák2015-10-031-7/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.DeleteShaderProgramMarek Olšák2015-10-031-2/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.NewShaderProgramMarek Olšák2015-10-031-1/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: remove Driver.DeleteShaderMarek Olšák2015-10-031-1/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa/cs: Implement glDispatchComputeIndirectJordan Justen2015-09-241-0/+1
| | | | | Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* mesa: rework Driver.CopyImageSubData() and related codeBrian Paul2015-09-241-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | Previously, core Mesa's _mesa_CopyImageSubData() created temporary textures to wrap renderbuffer sources/destinations. This caused a bit of a mess in the Mesa/gallium state tracker because we had to basically undo that wrapping. Instead, change ctx->Driver.CopyImageSubData() to take both gl_renderbuffer and gl_texture_image src/dst pointers (one being null, the other non-null) so the driver can handle renderbuffer vs. texture as needed. For the i965 driver, we basically moved the code that wrapped textures around renderbuffers from copyimage.c down into the met and driver code. The old code in copyimage.c also made some questionable calls to _mesa_BindTexture(), etc. which weren't undone at the end. v2 (Jason Ekstrand): Rework the intel bits v3 (Brian Paul): Update the temporary st_CopyImageSubData() function. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Tested-by: Kai Wasserbäch <kai@dev.carbon-project.org> Tested-by: Nick Sarnie <commendsarnex@gmail.com>
* mesa: s/GLint/GLsizei/ for consistencyBrian Paul2015-07-211-1/+1
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: replace Driver.GetCompressedTexImage() w/ GetCompressedTexSubImage()Brian Paul2015-07-211-3/+6
| | | | | | | For now, pass offsets of zero and width/height/depth equal to the whole image. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: replace Driver.GetTexImage with GetTexSubImage()Brian Paul2015-07-211-4/+6
| | | | | | | | | | | | | | | The new driver hook has x/y/zoffset and width/height/depth parameters for the new glGetTextureSubImage() function. The meta code and gallium state tracker are updated to handle the new parameters. Callers to Driver.GetTexSubImage() pass in offsets=0 and sizes equal to the whole texture size. v2: update i965 driver code, s/GLint/GLsizei/ in GetTexSubImage hook Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa/vbo: add support for 64-bit vertex attributes. (v1)Dave Airlie2015-05-081-0/+13
| | | | | | | | | | | | This adds support in the vbo and array code to handle double vertex attributes. v0.2: merge code to handle doubles in vbo layer. v1: don't use v0, merge api_array elt code. Acked-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* mesa/cs: Add DispatchCompute() to driver function table.Paul Berry2015-05-021-0/+7
| | | | | Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-231-1/+1
| | | | Acked-by: Eric Anholt <eric@anholt.net>
* mesa: add support for GL_EXT_polygon_offset_clampIlia Mirkin2015-02-021-1/+1
| | | | | | | | | | Nothing enables the extension yet, but the values are now available. The spec calls for it to only be exposed for GL 3.3+, which is core-only in mesa. Instead we allow any driver to enable it, including in a compat context for any GL version. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
* DD: Refactor BlitFramebuffer.Laura Ekstrand2015-02-021-0/+2
| | | | | | | | | In preparation for glBlitNamedFramebuffer, the DD table function BlitFramebuffer needs to accept two arbitrary framebuffer objects rather than assuming ctx->ReadBuffer and ctx->DrawBuffer. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa/dd: Add a function for creating a texture from a buffer objectJason Ekstrand2015-01-221-0/+16
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* mesa: Remove context parameter from dd_function_table::NewShaderProgramIan Romanick2014-10-241-2/+1
| | | | | | | | | | This fixes some unused parameter warnings introduced by the previous commit. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>