aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dlist.c
Commit message (Collapse)AuthorAgeFilesLines
* remove final imports.h and imports.c bitsDylan Baker2020-04-211-1/+1
| | | | | | | | | | | This moves the fi_types to a new mesa_private.h and removes the imports.c file. The vast majority of this patch is just removing pound includes of imports.h and fixing up the recursive includes. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* mesa|mapi: replace _mesa_[v]snprintf with [v]snprintfDylan Baker2020-04-211-1/+1
| | | | | | | | | | MSVC 2015 and newer has perfectly valid snprintf and vsnprintf implementations, let's just use those. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace malloc macros in imports.h with u_memory.h versionsDylan Baker2020-04-211-0/+1
| | | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* mesa: remove no longer needed _mesa_is_bufferobj functionMarek Olšák2020-04-061-1/+1
| | | | | | | | | | All buffers have Name != 0. Note that there is no longer the pointer dereference to get Name, so it's faster. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
* Move compiler.h and imports.h/c from src/mesa/main into src/utilMarek Olšák2020-03-271-1/+1
| | | | | Reviewed-by: Timothy Arceri <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
* mesa: use vbo_attrib_tmp.h to generate display list vertex attrib functionsMarek Olšák2020-03-191-1316/+165
| | | | | | | | | | | This removes about 1150 lines of code. The diff is messy, but the new code really starts with save_Attr32bit and below. Ignore false Eval/Material/Begin changes etc. Git can't figure out what was really changed. I didn't change them. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4123>
* mesa: implement missing display list functions while switching to the templateMarek Olšák2020-02-041-86/+718
| | | | | | | | The vbo_init_tmp.h template tells us which functions are unimplemented. Reviewed-by: Kristian H. Kristensen <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3611> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3611>
* mesa: add [Program]Uniform*64ARB display list supportTapani Pälli2019-10-301-0/+979
| | | | | | | | This is required for int64 to be enabled in compat profile. Signed-off-by: Tapani Pälli <[email protected]> Acked-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add EXT_dsa + EXT_texture_integer functionsPierre-Eric Pelloux-Prayer2019-10-181-0/+133
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa NamedProgram functionsPierre-Eric Pelloux-Prayer2019-10-181-1/+101
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/main: prefer R8-textures instead of A8 for glBitmap in display listsErik Faye-Lund2019-10-091-3/+8
| | | | | | | This allows drivers to communicate that they prefer R8 textures rather than A8 for glBitmap usage. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glCompressedMultiTex* functions display list supportPierre-Eric Pelloux-Prayer2019-08-191-0/+276
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glCompressedTex* functions display list supportPierre-Eric Pelloux-Prayer2019-08-191-0/+239
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glCopyMultiTexImage* and glCopyMultiTexSubImage*Pierre-Eric Pelloux-Prayer2019-08-061-0/+173
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexSubImage1D/2D/3DEXTPierre-Eric Pelloux-Prayer2019-08-061-0/+141
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexImage1D/2D/3DEXT + glGetMultiTexImageEXTPierre-Eric Pelloux-Prayer2019-08-061-1/+179
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add glBindMultiTextureEXT display list supportPierre-Eric Pelloux-Prayer2019-08-061-0/+23
| | | | | | Fixes: 0972b0b059d ("mesa: add support for glBindMultiTextureEXT") Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexParameter* functionsPierre-Eric Pelloux-Prayer2019-08-061-0/+89
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa (Get)MultiTexEnv functionsPierre-Eric Pelloux-Prayer2019-08-061-0/+82
| | | | Reviewed-by: Marek Olšák <[email protected]>
* main: Free memory allocated for gl_bitmap_atlas structureYevhenii Kolesnikov2019-07-241-0/+1
| | | | | | | | | Structure itself wasn't freed during context tear-down, causing a memory leak on iris. Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa gl(Copy)Texture(Sub)Image1D/2D/3DEXT functionsPierre-Eric Pelloux-Prayer2019-07-191-0/+451
| | | | | | | | | | | | | | | | | | | Added functions: - glTextureImage1DEXT - glTextureImage2DEXT - glTextureImage3DEXT - glTextureSubImage1DEXT - glTextureSubImage3DEXT - glCopyTextureImage1DEXT - glCopyTextureImage2DEXT - glCopyTextureSubImage1DEXT - glCopyTextureSubImage2DEXT - glCopyTextureSubImage3DEXT - glGetTextureImageEXT All but the last one can be compiled in a display list. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add display list support for gl(Compressed)TextureSubImage2DEXTPierre-Eric Pelloux-Prayer2019-06-281-0/+89
| | | | | Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: add glTextureParameteri/iv/f/fvEXTPierre-Eric Pelloux-Prayer2019-06-281-0/+88
| | | | | Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: EXT_dsa add selectorless matrix stack functionsPierre-Eric Pelloux-Prayer2019-06-031-0/+322
| | | | | | | | | Allows the legacy matrix stacks to be manipulated without disturbing the matrix mode selector. Adapted from a patch from Chris Forbes. Reviewed-by: Marek Olšák <[email protected]>
* mesa: Add missing display list support for GL_FOG_COORDINATE_SOURCEIan Romanick2019-04-301-0/+1
| | | | | | Fixes: fe5d67d95f3 ("Implement EXT_fog_coord and EXT_secondary_color.") Reviewed-by: Mathias Fröhlich <[email protected]> Cc: Brian Paul <[email protected]>
* mesa: fix display list corner case assertionBrian Paul2019-02-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a failed assertion in glDeleteLists() for the following case: list = glGenLists(1); glDeleteLists(list, 1); when those are the first display list commands issued by the application. When we generate display lists, we plug in empty lists created with the make_list() helper. This function uses the OPCODE_END_OF_LIST opcode but does not call dlist_alloc() which would set the InstSize[OPCODE_END_OF_LIST] element to non-zero. When the empty list was deleted, we failed the InstSize[opcode] > 0 assertion. Typically, display lists are created with glNewList/glEndList so we set InstSize[OPCODE_END_OF_LIST] = 1 in dlist_alloc(). That's why this bug wasn't found before. To fix this failure, simply initialize the InstSize[OPCODE_END_OF_LIST] element in make_list(). The game oolite was hitting this. Fixes: https://github.com/OoliteProject/oolite/issues/325 Reviewed-by: Marek Olšák <[email protected]>
* vbo: Make no_current_update an argument to vbo_save_NotifyBegin.Mathias Fröhlich2018-11-011-1/+1
| | | | | | | | | | | Instead of coding additional information into the primitive mode, make the only remaining flag there a direct argument to vbo_save_NotifyBegin. v2: Fix incorrect no_current_update in glRectf. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* mesa: add outstanding ARB_vertex_attrib_64bit dlist supportTimothy Arceri2018-06-301-0/+178
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: generate GL_INVALID_OPERATION using draw indirect in dlistTimothy Arceri2018-06-301-0/+47
| | | | | | | | The spec doesn't explicitly say to generate an error but since DrawArraysInstanced* and DrawElementsInstanced* do, it makes sense to do it for these functions also. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add missing display list support for ARB_compute_shaderTimothy Arceri2018-06-301-0/+39
| | | | | | | | | | | The extension is enabled for compat profile but there is currently no display list support. I filed a spec bug and it has been agreed that glDispatchComputeIndirect should generate an INVALID_OPERATION error when called during display list compilation. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add ARB_viewport_array display list supportTimothy Arceri2018-06-301-0/+211
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add glUniformSubroutinesuiv() display list supportTimothy Arceri2018-06-301-0/+34
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add ProgramUniform*d display list supportTimothy Arceri2018-06-301-0/+514
| | | | | | This is required for fp64 to be enabled in compat profile. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add Uniform*d support to display listsTimothy Arceri2018-06-301-0/+493
| | | | | | This is required so we can enable fp64 support in compat profile. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add display list support for glPatchParameter{i,fv}()Timothy Arceri2018-05-301-0/+78
| | | | | | This is required for tessellation shader Compat profile support. Reviewed-by: Marek Olšák <[email protected]>
* mesa: drop GL_EXT_polygon_offset supportTimothy Arceri2018-05-181-11/+0
| | | | | | | | glPolygonOffset() has been part of the GL standard since 1.1. Also niether AMD or Nvidia support this in their binary drivers. Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61761
* mesa: add glUniform*ui{v} support to display listsTimothy Arceri2018-05-171-33/+17
| | | | | | | Fixes: a017c7ecb7ae "mesa: display list support for uint uniforms" Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78097
* mesa: add support for nvidia conservative rasterization extensionsRhys Perry2018-04-301-0/+86
| | | | | | | | Although the specs are written against compatibility GL 4.3 and allows core profile and GLES2+, it is exposed for GL 1.0+ and GLES1 and GLES2+. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: rename api_validate.{c,h} -> draw_validate.{c,h}Timothy Arceri2018-04-241-1/+1
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65422
* mesa: simplify _mesa_delete_list() a bit, add some assertionsBrian Paul2018-01-251-28/+11
| | | | | | | | | All but two cases of the switch did the same n += InstSize[n[0].opcode] instruction. Just move it after the switch. Add some sanity check assertions. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: remove unneeded semicolonsGrazvydas Ignotas2018-01-171-1/+1
| | | | | | Trivial. Found by Coccinelle. Reviewed-by: Eric Engestrom <[email protected]>
* mesa: Implement GL_ARB_polygon_offset_clampAdam Jackson2017-08-251-1/+1
| | | | | | | | | | | Semantically identical to the EXT version (whose string is still valid for GLES), so rename the bit but expose both extension strings. (Suggested by Ilia Mirkin and Ian Romanick.) v3: Fix the entrypoint alias in GL4x.xml (Ilia) Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: finish implementing glPrimitiveRestartNV() for display listsBrian Paul2017-07-071-1/+21
| | | | | | | | | | | | | If we try to build a display list with just a glPrimitiveRestartNV() call, we'd crash because of a null GLvertexformat::PrimitiveRestartNV pointer. This change fixes that case. The previous patch fixed the case of calling glPrimitiveRestartNV() inside a glBegin/End pair. v2: minor clean-up in save_PrimitiveRestartNV(), per Charmaine. Reviewed-by: Charmaine Lee <[email protected]>
* vbo: simplify vbo_save_NotifyBegin()Brian Paul2017-07-071-17/+1
| | | | | | | | | | | | | This function always returned GL_TRUE. Just make it a void function. Remove unreachable code following the call to vbo_save_NotifyBegin() in save_Begin() in dlist.c There were some stale comments that no longer applied since an earlier code refactoring. No Piglit regressions. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: Create pointers for multithread marshalling dispatch table.Paul Berry2017-03-161-8/+20
| | | | | | | | | | | | | | This patch splits the context's CurrentDispatch pointer into two pointers, CurrentClientDispatch, and CurrentServerDispatch, so that when doing multithread marshalling, we can distinguish between the dispatch table that's being used by the client (to serialize GL calls into the marshal buffer) and the dispatch table that's being used by the server (to execute the GL calls). 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]>
* mesa: Silence numerous "unused parameter" warnings in dlist.cIan Romanick2016-12-191-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | main/dlist.c: In function ‘save_DrawArraysInstancedARB’: main/dlist.c:1748:36: warning: unused parameter ‘mode’ [-Wunused-parameter] save_DrawArraysInstancedARB(GLenum mode, ^~~~ main/dlist.c:1749:35: warning: unused parameter ‘first’ [-Wunused-parameter] GLint first, ^~~~~ main/dlist.c:1750:37: warning: unused parameter ‘count’ [-Wunused-parameter] GLsizei count, ^~~~~ main/dlist.c:1751:37: warning: unused parameter ‘primcount’ [-Wunused-parameter] GLsizei primcount) ^~~~~~~~~ main/dlist.c: In function ‘save_DrawElementsInstancedARB’: main/dlist.c:1759:38: warning: unused parameter ‘mode’ [-Wunused-parameter] save_DrawElementsInstancedARB(GLenum mode, ^~~~ main/dlist.c:1760:39: warning: unused parameter ‘count’ [-Wunused-parameter] GLsizei count, ^~~~~ main/dlist.c:1761:38: warning: unused parameter ‘type’ [-Wunused-parameter] GLenum type, ^~~~ main/dlist.c:1762:45: warning: unused parameter ‘indices’ [-Wunused-parameter] const GLvoid *indices, ^~~~~~~ main/dlist.c:1763:39: warning: unused parameter ‘primcount’ [-Wunused-parameter] GLsizei primcount) ^~~~~~~~~ main/dlist.c: In function ‘save_DrawElementsInstancedBaseVertexARB’: main/dlist.c:1771:48: warning: unused parameter ‘mode’ [-Wunused-parameter] save_DrawElementsInstancedBaseVertexARB(GLenum mode, ^~~~ main/dlist.c:1772:49: warning: unused parameter ‘count’ [-Wunused-parameter] GLsizei count, ^~~~~ main/dlist.c:1773:48: warning: unused parameter ‘type’ [-Wunused-parameter] GLenum type, ^~~~ main/dlist.c:1774:55: warning: unused parameter ‘indices’ [-Wunused-parameter] const GLvoid *indices, ^~~~~~~ main/dlist.c:1775:49: warning: unused parameter ‘primcount’ [-Wunused-parameter] GLsizei primcount, ^~~~~~~~~ main/dlist.c:1776:47: warning: unused parameter ‘basevertex’ [-Wunused-parameter] GLint basevertex) ^~~~~~~~~~ main/dlist.c: In function ‘save_DrawArraysInstancedBaseInstance’: main/dlist.c:1785:45: warning: unused parameter ‘mode’ [-Wunused-parameter] save_DrawArraysInstancedBaseInstance(GLenum mode, ^~~~ main/dlist.c:1786:44: warning: unused parameter ‘first’ [-Wunused-parameter] GLint first, ^~~~~ main/dlist.c:1787:46: warning: unused parameter ‘count’ [-Wunused-parameter] GLsizei count, ^~~~~ main/dlist.c:1788:46: warning: unused parameter ‘primcount’ [-Wunused-parameter] GLsizei primcount, ^~~~~~~~~ main/dlist.c:1789:45: warning: unused parameter ‘baseinstance’ [-Wunused-parameter] GLuint baseinstance) ^~~~~~~~~~~~ main/dlist.c: In function ‘save_DrawElementsInstancedBaseInstance’: main/dlist.c:1797:47: warning: unused parameter ‘mode’ [-Wunused-parameter] save_DrawElementsInstancedBaseInstance(GLenum mode, ^~~~ main/dlist.c:1798:48: warning: unused parameter ‘count’ [-Wunused-parameter] GLsizei count, ^~~~~ main/dlist.c:1799:47: warning: unused parameter ‘type’ [-Wunused-parameter] GLenum type, ^~~~ main/dlist.c:1800:52: warning: unused parameter ‘indices’ [-Wunused-parameter] const void *indices, ^~~~~~~ main/dlist.c:1801:48: warning: unused parameter ‘primcount’ [-Wunused-parameter] GLsizei primcount, ^~~~~~~~~ main/dlist.c:1802:47: warning: unused parameter ‘baseinstance’ [-Wunused-parameter] GLuint baseinstance) ^~~~~~~~~~~~ main/dlist.c: In function ‘save_DrawElementsInstancedBaseVertexBaseInstance’: main/dlist.c:1810:57: warning: unused parameter ‘mode’ [-Wunused-parameter] save_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode, ^~~~ main/dlist.c:1811:58: warning: unused parameter ‘count’ [-Wunused-parameter] GLsizei count, ^~~~~ main/dlist.c:1812:57: warning: unused parameter ‘type’ [-Wunused-parameter] GLenum type, ^~~~ main/dlist.c:1813:62: warning: unused parameter ‘indices’ [-Wunused-parameter] const void *indices, ^~~~~~~ main/dlist.c:1814:58: warning: unused parameter ‘primcount’ [-Wunused-parameter] GLsizei primcount, ^~~~~~~~~ main/dlist.c:1815:56: warning: unused parameter ‘basevertex’ [-Wunused-parameter] GLint basevertex, ^~~~~~~~~~ main/dlist.c:1816:57: warning: unused parameter ‘baseinstance’ [-Wunused-parameter] GLuint baseinstance) ^~~~~~~~~~~~ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix all the whitespace errors in dlist.cIan Romanick2016-12-191-187/+186
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Close fp on error path.Matt Turner2016-06-301-6/+4
| | | | Reviewed-by: Ian Romanick <[email protected]>
* Remove wrongly repeated words in commentsGiuseppe Bilotta2016-06-231-1/+1
| | | | | | | | | | | | | | | | | Clean up misrepetitions ('if if', 'the the' etc) found throughout the comments. This has been done manually, after grepping case-insensitively for duplicate if, is, the, then, do, for, an, plus a few other typos corrected in fly-by v2: * proper commit message and non-joke title; * replace two 'as is' followed by 'is' to 'as-is'. v3: * 'a integer' => 'an integer' and similar (originally spotted by Jason Ekstrand, I fixed a few other similar ones while at it) Signed-off-by: Giuseppe Bilotta <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: add GL_EXT_window_rectangles state storage/retrieval functionalityIlia Mirkin2016-06-181-1/+37
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>