summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dd.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: implement sparse buffer commitmentNicolai Hähnle2017-04-051-0/+10
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: remove dd_function_table::BindProgramMarek Olšák2017-03-291-3/+0
| | | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Add SetBackgroundContext to dd_function_tablePaul Berry2017-03-161-0/+18
| | | | | | | Acked-by: Timothy Arceri <[email protected]> Acked-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]> Tested-by: Mike Lothian <[email protected]>
* main/performance_query: s/GLboolean/bool/Robert Bragg2017-02-241-4/+4
| | | | | | | | | Ideally would have caught these when adding the interface but this just switches a few return types for the INTEL_performance_query backend interface to bool instead of GLboolean. Signed-off-by: Robert Bragg <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Model INTEL perf query backend after query obj BERobert Bragg2017-02-221-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using the same backend interface as AMD_performance_monitor this defines a dedicated INTEL_performance_query interface that is modelled more on the ARB_query_buffer_object interface (considering the similarity of the extensions) with the addition of vfuncs for initializing and enumerating query and counter info. Compared to the previous backend, some notable differences are: - The backend is free to represent counters using whatever data structures are optimal/convenient since queries and counters are enumerated via an iterator api instead of declaring them using structures directly shared with the frontend. This is also done to help us support the full range of data and semantic types available with INTEL_performance_query which is awkward while using a structure shared with the AMD_performance_monitor backend since neither extension's types are a subset of the other. - The backend must support waiting for a query instead of the frontend simply using glFinish(). - Objects go through 'Active' and 'Ready' states consistent with the query object backend (hopefully making them more familiar). There is no 'Ended' state (which used to show that a query has ended at least once for a given object). There is a new 'Used' state, set when a query is first begun which implies that we are expecting to get results back for the object at some point. There's no equivalent to the 'EverBound' state since the spec doesn't require there to be a limbo state between generating IDs and associating them with an object on query Begin. The INTEL_performance_query and AMD_performance_monitor extensions are now completely orthogonal within Mesa main (though a driver could optionally choose to implement both extensions within a unified backend if that were convenient for the sake of sharing state/code). v2: (Samuel Pitoiset) - init PerfQuery.NumQueries in frontend - s/return_string/output_clipped_string/ - s/backed/backend/ typo - remove redundant *bytesWritten = 0 v3: - Add InitPerfQueryInfo for lazy probing of available queries v4: - Clean up some internal usage of GL typedefs (Ken) Signed-off-by: Robert Bragg <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa/glsl: add new is_arb_asm flag in gl_programTimothy Arceri2017-01-061-1/+1
| | | | | | | | | | | | | | | | Set the flag via the _mesa_init_gl_program() and NewProgram() helpers. In i965 we currently check for the existance of gl_shader_program to decide if this is an ARB assembly style program or not. Adding a flag makes the code clearer and will help removes a dependency on gl_shader_program in the i965 codegen functions. Also this will allow use to skip initialising sampler units for linked shaders, we currently memset it to zero again during linking. Reviewed-by: Eric Anholt <[email protected]>
* mesa/glsl/i965: remove Driver.NewShader()Timothy Arceri2016-12-301-7/+0
| | | | | | | | | After removing brw_shader in the previous commit this is no longer needed. V2: remove use in src/compiler/glsl/test_optpass.cpp Reviewed-by: Eric Anholt <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* 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 <[email protected]>
* mesa: remove dd_function_table::UseProgramMarek Olšák2016-07-301-1/+0
| | | | | | finally unused Reviewed-by: Nicolai Hähnle <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
* 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Miklós Máté <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* mesa: add driver interface for writing query results to buffersIlia Mirkin2016-02-041-0/+9
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add GREMEDY_string_markerRob Clark2016-01-211-0/+6
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add Driver.InvalidateBufferSubDataNicolai Hähnle2016-01-141-0/+5
| | | | Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]>
* mesa: remove Driver.BindImageTextureMarek Olšák2015-10-031-6/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.DeleteSamplerObjectMarek Olšák2015-10-031-2/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.EndCallListMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.BeginCallListMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.EndListMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.NewListMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.NotifySaveBeginMarek Olšák2015-10-031-7/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.SaveFlushVerticesMarek Olšák2015-10-031-3/+1
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.FlushVerticesMarek Olšák2015-10-031-10/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.BeginVerticesMarek Olšák2015-10-031-5/+0
| | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove Driver.BindArrayObjectMarek Olšák2015-10-031-8/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.DeleteArrayObjectMarek Olšák2015-10-031-1/+0
| | | | | | | Nothing reimplements it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.NewArrayObjectMarek Olšák2015-10-031-1/+0
| | | | | | | Nothing reimplements it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.HintMarek Olšák2015-10-031-2/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.ColorMaskIndexedMarek Olšák2015-10-031-2/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove some Driver.Blend* hooksMarek Olšák2015-10-031-5/+0
| | | | | | | Nothing sets them. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.AccumMarek Olšák2015-10-031-6/+0
| | | | | | | Nothing calls it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.ResizeBuffersMarek Olšák2015-10-031-7/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.DeleteShaderProgramMarek Olšák2015-10-031-2/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.NewShaderProgramMarek Olšák2015-10-031-1/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove Driver.DeleteShaderMarek Olšák2015-10-031-1/+0
| | | | | | | Nothing overrides it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/cs: Implement glDispatchComputeIndirectJordan Justen2015-09-241-0/+1
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* 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 <[email protected]> Tested-by: Kai Wasserbäch <[email protected]> Tested-by: Nick Sarnie <[email protected]>
* mesa: s/GLint/GLsizei/ for consistencyBrian Paul2015-07-211-1/+1
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>