summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dd.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Remove Driver.GetBufferSize and its callers.Eric Anholt2013-06-251-9/+0
| | | | | | | | Only the GDI driver set it to non-NULL any more, and that driver has a Viewport hook that should keep it limping along as well as it ever has. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Hide weirdness of 1D_ARRAY textures from Driver.CopyTexSubImage().Eric Anholt2013-06-171-1/+7
| | | | | | | | | | | | | | | | | Intel had brokenness here, and I'd like to continue moving Mesa toward hiding 1D_ARRAY's ridiculousness inside of the core, like we did with MapTextureImage. Fixes copyteximage 1D_ARRAY on intel. There's still an impedance mismatch in meta when falling back to read and texsubimage, since texsubimage expects coordinates into 1D_ARRAY as (width, slice, 0) instead of (width, 0, slice). v2: Fix offset of scanline reads from the source. (Thanks Brian!), replace dd.h comment with Paul's text and replace early exit with an assert. Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Paul Berry <[email protected]> (v1)
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Make FinishRenderTexture just take the renderbuffer being finished.Eric Anholt2013-05-171-1/+1
| | | | | | | Now that the rb has a reference to the teximage, we didn't need anything else out of the attachment. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: change ctx->Driver.NeedFlush to GLbitfield and update commentBrian Paul2013-05-031-3/+3
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa; change ctx->Driver.SaveNeedFlush to boolean, and document it.Brian Paul2013-05-031-1/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: update GLvertexformat commentsBrian Paul2013-05-021-20/+7
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove GLvertexformat::EvalMesh1(), EvalMesh2()Brian Paul2013-05-021-16/+0
| | | | | | See previous commit comments. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove GLvertexformat::Rectf()Brian Paul2013-05-021-2/+0
| | | | | | As with the glDraw* functions, this doesn't have to be in GLvertexformat. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: simplify dispatch for glDraw* functionsBrian Paul2013-05-021-58/+0
| | | | | | | | | | | | Remove all the glDraw* functions from the GLvertexformat structure. The point of that dispatch struct is to handle all the functions which dispatch differently depending on whether we're inside glBegin/End. glDraw* are never allowed inside glBegin/End so we can remove those entries. This simplifies the code paths and gets rid of quite a bit of code. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove unused PRIM_INSIDE_UNKNOWN_PRIM constantBrian Paul2013-05-021-4/+3
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Add a clarifying comment about rowStride of compressed textures.Eric Anholt2013-04-301-1/+3
| | | | | | | I always forget how we do this for compressed textures. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <[email protected]>
* mesa: allow internalformat_query with multisample texture targetsChris Forbes2013-03-241-1/+3
| | | | | | | | | | | | | | | | Now that we support ARB_texture_multisample, there are multiple targets accepted for this query, and they may have target-dependent limits, so pass the target to the driverfunc. For example, the sampling hardware may not be able to do general texelFetch() for some format/sample count combination, but the driver may still be able to implement a reasonable resolve operation, so it can be supported for renderbuffers. V2: - Don't break Gallium compile. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add a new QueryCounter() hook for TIMESTAMP queries.Kenneth Graunke2013-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | In OpenGL, most queries record statistics about operations performed between a defined beginning and ending point. However, TIMESTAMP queries are different: they immediately return a single value, and there is no start/stop mechanism. Previously, Mesa implemented TIMESTAMP queries by calling EndQuery without first calling BeginQuery. Apparently this is DirectX convention, and Gallium followed suit. I personally find the asymmetry jarring, however---having BeginQuery and EndQuery handle a different set of enum values looks like a bug. It's also a bit confusing to mix the one-shot query with the start/stop model. So, add a new QueryCounter driver hook for implementing TIMESTAMP. For now, fall back to EndQuery to support drivers that don't do the new mechanism. Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: implement GetMultisamplefvChris Forbes2013-03-021-0/+8
| | | | | | | | | | | | | | | Actual sample locations deferred to a driverfunc since only the driver really knows where they will be. V2: - pass the draw buffer to the driverfunc; don't fallback to pixel center if driverfunc is missing. - rename GetSampleLocation to GetSamplePosition - invert y sample position for winsys FBOs, at Paul's suggestion Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gles2: a stub implementation for GL_EXT_discard_framebufferTapani Pälli2013-02-201-1/+3
| | | | | | | | | | | This patch implements a stub for GL_EXT_discard_framebuffer with required checks listed by the extension specification. This extension is required by GLBenchmark 2.5 when compiled with OpenGL ES 2.0 as the rendering backend. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-and-tested-by: Chad Versace <[email protected]>
* mesa: remove ctx->Driver.Error() hookBrian Paul2013-01-291-6/+0
| | | | | | Not used by any driver anymore. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove the dead PrepareExecBegin() driver hook.Eric Anholt2013-01-211-8/+0
| | | | | | | This was used in i965 for a while, but no more. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add driver method to determine the possible sample countsIan Romanick2013-01-151-0/+16
| | | | | | | | | | | | | | Use this method in _mesa_GetInternalformativ for both GL_SAMPLES and GL_NUM_SAMPLE_COUNTS. v2: internalFormat may not be color renderable by the driver, so zero can be returned as a sample count. Require that drivers supporting the extension provide a QuerySamplesForFormat function. The later was suggested by Eric Anholt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Fix comments for NV_vp code that's now only used by other extensions.Eric Anholt2012-10-151-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: rework texture size error checkingBrian Paul2012-09-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | There are two aspects to texture image size checking: 1. Are the width, height, depth legal values (not negative, not larger than the max size for the mipmap level, etc)? 2. Is the texture just too large to handle? For example, we might not be able to really allocate memory for a 3D texture of maxSize x maxSize x maxSize. Previously, we did (1) via the ctx->Driver.TestProxyTextureImage() hook but those tests are really device-independent. Now we do (2) via that hook since the max texture memory and texture shape are device-dependent. Also, (1) is now done outside the general texture parameter error checking functions because of the special interaction with proxy textures. The recently introduced PROXY_ERROR token is removed. The teximage() and copyteximage() functions are bit simpler now (less if-then nesting, etc.) Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Use a new, more specific hook for shader uniform changes.Kenneth Graunke2012-08-251-0/+7
| | | | | | | | | | | | | | | Gallium drivers and i965 don't require special notification when sampler uniforms change. They simply see the _NEW_TEXTURE and adjust their indirection tables. These drivers don't want ProgramStringNotify: it simply causes pointless recompiles. Unfortunately, i915 still requires shader recompiles and needs ProgramStringNotify. Rather than trying to fix that, simply change the hook to a new, more specific one: ShaderUniformChange. On i915, this translates to ProgramStringNotify; others simply ignore it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add texture target field to ChooseTextureFormat() driver hookBrian Paul2012-08-241-4/+7
| | | | | | | | | This will let us choose the actual hardware format depending on the type of texture. v2: fixup radeon, nouveau, intel and swrast drivers too Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove unnecessary parameters CompressedTexImagePauli Nieminen2012-08-121-3/+0
| | | | | | | | | In tune with previous patches. Again there is duplication of information in function parameters that is good to remove. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unnecessary parameters from AllocTextureImageBufferPauli Nieminen2012-08-121-3/+1
| | | | | | | | | | Size and format information is always stored in gl_texture_image structure. That makes it preferable to remove duplicate information from parameters to make interface easier to understand. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unnecessary parameters from TexImagePauli Nieminen2012-08-121-2/+0
| | | | | | | | | | | gl_texture_image structure always holds size and internal format before TexImage driver hook is called. Those passing same information in function parameters only duplicates information making the interface harder to understand. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: implement display list support for new DrawTransformFeedback functionsMarek Olšák2012-07-121-0/+8
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement glGet(GL_TIMESTAMP) v2Marek Olšák2012-07-101-0/+6
| | | | | | This is adds a new driver function to retrieve the timestamp. Reviewed-by: Eric Anholt <[email protected]>
* mesa: more const qualifiers to match the latest glext.hBrian Paul2012-06-271-1/+1
| | | | | | | For some reason regular gcc on Linux didn't catch these but the mingw compiler did (generated errors, not warnings). v2: include the changes in src/mapi/ too
* mesa: Add support for GL_ARB_base_instanceFredrik Höglund2012-06-191-0/+10
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: consolidate internal glCompressedTexSubImage1/2/3D codeBrian Paul2012-06-061-26/+7
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCompressedTexImage1/2/3D codeBrian Paul2012-06-061-31/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCopyTexSubImage1/2/3D codeBrian Paul2012-06-061-27/+8
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexSubImage1/2/3D codeBrian Paul2012-06-061-36/+9
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexImage1/2/3D codeBrian Paul2012-06-061-33/+11
| | | | | | | The functions for handling 1D, 2D and 3D texture images were nearly identical. This folds them all together. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove ctx->Driver.ClearColor() hookBrian Paul2012-03-121-3/+0
| | | | | | | The driver Clear() function should just grab the clear color out of the context. Reviewed-by: Dave Airlie <[email protected]>
* mesa: remove ctx->Driver.ClearDepth(), ClearStencil() driver hooksBrian Paul2012-03-121-4/+0
| | | | | | | Not used by any drivers. Drivers can easily access the values from the Mesa context at glClear() time. Reviewed-by: Dave Airlie <[email protected]>
* mesa: update comments, fix whitespace in dd.hBrian Paul2012-01-241-21/+14
|
* mesa: remove ctx->Driver.Map/UnmapTexture() hooksBrian Paul2012-01-241-5/+0
| | | | No longer used anywhere.
* mesa: use GL_MAP_INVALIDATE_RANGE_BIT in glTexImage pathsBrian Paul2012-01-181-1/+7
| | | | | | | | | | | | | Update the dd.h docs to indicate that GL_MAP_INVALIDATE_RANGE_BIT can be used with GL_MAP_WRITE_BIT when mapping renderbuffers and texture images. Pass the flag when mapping texture images for glTexImage, glTexSubImage, etc. It's up to drivers whether to actually make use of the flag. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* mesa: rework ctx->Driver.CopyTexSubImage() parametersBrian Paul2012-01-071-20/+22
| | | | | | | | | | | Replace target, level parameters with gl_texture_image. Add gl_renderbuffer parameter to indicate source buffer for the copy. This removes some redundant code in the drivers to find the source renderbuffer and the destination texture image (which we already had in _mesa_CopyTexSubImage). Signed-off-by: Brian Paul <[email protected]>
* mesa: simplify Driver.GetCompressedTexImage() parametersBrian Paul2011-12-301-4/+3
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.CompressedTex[Sub]Image function parametersBrian Paul2011-12-301-63/+32
| | | | | | | | As with previous commits, the target, level and texObj info can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.TexImage() parametersBrian Paul2011-12-301-23/+19
| | | | | | | | As with TexSubImage(), the target, level and texObj values can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: simplify Driver.TexSubImage() parametersBrian Paul2011-12-301-23/+21
| | | | | | | | There's no need to pass the target, level and texObj parameters since they can be easily obtained from the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: update comment for MapTextureImage()Brian Paul2011-12-241-0/+2
|
* mesa: implement DrawTransformFeedback from ARB_transform_feedback2Marek Olšák2011-12-151-2/+1
| | | | | | | | | | | | | | It's like DrawArrays, but the count is taken from a transform feedback object. This removes DrawTransformFeedback from dd_function_table and adds the same function to GLvertexformat (with the function parameters matching GL). The vbo_draw_func callback has a new parameter "struct gl_transform_feedback_object *tfb_vertcount". The rest of the code just validates states and forwards the transform feedback object into vbo_draw_func.