summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* main: Refactor _mesa_ReadBuffer.Laura Ekstrand2015-05-143-24/+32
| | | | | | | | | | | | | | This could have added a new DD table entry for ReadBuffer that takes an arbitrary read buffer, but, after looking at the existing DD functions, Kenneth Graunke recommended that we just skip calling the DD functions in the case of ARB_direct_state_access. The DD implementations for ReadBuffer have limited functionality, especially with respect to ARB_direct_state_access. [Fredrik: Call the driver function when fb is the bound read buffer] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry point for NamedFramebufferDrawBuffer.Laura Ekstrand2015-05-143-0/+23
| | | | | | | [Fredrik: Fix the name of the buf parameter in the XML file] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_DrawBuffer.Laura Ekstrand2015-05-142-17/+29
| | | | | | | | | | | | | | This could have added a new DD table entry for DrawBuffer that takes an arbitrary draw buffer, but, after looking at the existing DD functions, Kenneth Graunke recommended that we just skip calling the DD functions in the case of ARB_direct_state_access. The DD implementations for DrawBuffer(s) have limited functionality, especially with respect to ARB_direct_state_access. [Fredrik: Call the driver function when fb is the bound draw buffer] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_drawbuffers.Laura Ekstrand2015-05-144-17/+18
| | | | | | | [Fredrik: Whitespace fix] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add stubs for [Get]NamedFramebufferParameteri[v].Laura Ekstrand2015-05-143-0/+42
| | | | | | | | | | | | | | The ARB_direct_state_access specification says (as of 2015.02.05): "Interactions with OpenGL 4.3 or ARB_framebuffer_no_attachments If neither OpenGL 4.3 nor ARB_framebuffer_no_attachments are supported, ignore the support for NamedFramebufferParameteri and GetNamedFramebufferParameteriv." This commit adds stubs for these entry points. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fake entry point for glClearNamedFramebufferfi.Laura Ekstrand2015-05-143-0/+23
| | | | | | | | | | Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fake entry point for glClearNamedFramebufferfv.Laura Ekstrand2015-05-143-0/+23
| | | | | | | | | | Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fake entry point for glClearNamedFramebufferuiv.Laura Ekstrand2015-05-143-0/+23
| | | | | | | | | | Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fake entry point for glClearNamedFramebufferiv.Laura Ekstrand2015-05-143-0/+25
| | | | | | | | | | Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry points for InvalidateNamedFramebuffer[Sub]Data.Laura Ekstrand2015-05-143-0/+83
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor invalidate_framebuffer_storage.Laura Ekstrand2015-05-141-11/+27
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Complete error conditions for glInvalidate*Framebuffer.Laura Ekstrand2015-05-141-1/+19
| | | | | | | Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: "10.4 10.5" <[email protected]>
* main: _mesa_blit_framebuffer updates its arbitrary framebuffers.Laura Ekstrand2015-05-141-3/+6
| | | | | | | | | Previously, we used _mesa_update_state to update the currently bound framebuffers prior to performing a blit. Now that _mesa_blit_framebuffer uses arbitrary framebuffers, _mesa_update_state is not specific enough. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry point for BlitNamedFramebuffer.Laura Ekstrand2015-05-143-0/+58
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_update_draw_buffer_bounds.Laura Ekstrand2015-05-143-5/+6
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_get_clamp_read_color.Laura Ekstrand2015-05-143-5/+7
| | | | | | | | This wasn't neccessary for ARB_direct_state_access, but felt like a good idea for the sake of completeness. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_[update|get]_clamp_fragment_color.Laura Ekstrand2015-05-146-18/+21
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_[update|get]_clamp_vertex_color.Laura Ekstrand2015-05-143-8/+14
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor _mesa_update_framebuffer.Laura Ekstrand2015-05-143-9/+8
| | | | | | | | | _mesa_update_framebuffer now operates on arbitrary read and draw framebuffers. This allows BlitNamedFramebuffer to update the state of its arbitrary read and draw framebuffers. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor glBlitFramebuffer.Laura Ekstrand2015-05-142-53/+74
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fix whitespace in blit.cLaura Ekstrand2015-05-141-18/+18
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry point GetNamedFramebufferAttachmentParameteriv.Laura Ekstrand2015-05-143-41/+94
| | | | | | | | | [Fredrik: - Update one of the error messages to reflect that the framebuffer might not be the bound framebuffer. - Whitespace fixes.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry point for CheckNamedFramebufferStatus.Laura Ekstrand2015-05-143-15/+72
| | | | | | | | [Fredrik: - Retain the debugging code in CheckFramebufferStatus. - Whitespace fixes.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fix indents in former get_texture_for_framebuffer functions.Laura Ekstrand2015-05-141-39/+39
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Major refactor of get_texture_for_framebuffer.Laura Ekstrand2015-05-142-227/+267
| | | | | | | | | | | | | | | | | | | | | This splits off the (still) rather large chunk that is get_texture_for_framebuffer into lots of smaller functions specialized to service the wide variety of unique needs of *FramebufferTexture* entry points. The result is much cleaner because, rather than having a pile of branches and confusing conditions (like the boolean layered), the uniqueness is baked into the entry points. The entry points know whether or not they are layered or use a textarget. [Fredrik: - Mention the value of <textarget> in the error message. - Rename check_zoffset to check_layer, and zoffset to layer. The zoffset parameter was renamed to layer in ARB_framebuffer_object. - Make layered a GLboolean since the value is visible to the API. - Remove EXT suffixes in refactored code. - Whitespace fixes.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry points for glNamedFramebufferTexture[Layer].Laura Ekstrand2015-05-143-0/+74
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fix indentation in get_texture_for_framebuffer.Laura Ekstrand2015-05-141-85/+85
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Refactor get_texture_for_framebuffer.Laura Ekstrand2015-05-141-22/+21
| | | | | | | | | | | | This moves a few blocks around so that the control flow is more obvious. If the texture is 0, just return true at the beginning of the function. Likewise, if the texObj is NULL, return true at the beginning of the function as well. [Fredrik: Fix the texObj NULL check] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Split framebuffer_texture.Laura Ekstrand2015-05-142-75/+198
| | | | | | | | | | | | | | | | Split apart utility function framebuffer_texture to better prepare for implementing NamedFramebufferTexture and NamedFramebufferTextureLayer. This should also pave the way for some future cleanup work. [Fredrik: - Mention which limit was exceeded when <layer> is out of range. - Update a comment to reflect that <fb> might not be the bound framebuffer. - Make it clear that the error message in glFramebufferTexture*D refers to the <textarget> parameter. - Remove EXT suffixes.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Fix an error generated by FramebufferTextureLaura Ekstrand2015-05-141-4/+13
| | | | | | | | | | | | gl*FramebufferTexture should generate GL_INVALID_VALUE when the texture doesn't exist. [Fredrik: Split this change out from the next commit] Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: "10.4 10.5" <[email protected]>
* mesa: Generate GL_INVALID_VALUE in framebuffer_texture when layer < 0Fredrik Höglund2015-05-141-0/+12
| | | | | | Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: "10.4 10.5" <[email protected]>
* main: Require that the texture exists in framebuffer_textureFredrik Höglund2015-05-141-1/+1
| | | | | | | | Generate GL_INVALID_OPERATION if the texture hasn't been created. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: "10.4 10.5" <[email protected]>
* main: Fix the indentation in framebuffer_textureLaura Ekstrand2015-05-141-1/+2
| | | | | Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add entry point for NamedFramebufferRenderbuffer.Laura Ekstrand2015-05-143-44/+98
| | | | | | | | | | | | [Fredrik: - Remove the DummyRenderbuffer checks now that they are done in _mesa_lookup_renderbuffer_err. - Fix the <renderbuffertarget> name in error messages. - Make the error message in _mesa_framebuffer_renderbuffer reflect that <fb> might not be the bound framebuffer. - Remove EXT suffixes from GL tokens.] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Rename framebuffer renderbuffer software fallback.Laura Ekstrand2015-05-142-6/+8
| | | | | | | | | Rename _mesa_framebuffer_renderbuffer to _mesa_FramebufferRenderbuffer_sw in preparation for adding the ARB_direct_state_access backend function for FramebufferRenderbuffer and NamedFramebufferRenderbuffer to share. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add utility function _mesa_lookup_renderbuffer_err.Laura Ekstrand2015-05-142-0/+25
| | | | | | | [Fredrik: Generate an error for non-existent renderbuffers] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add glCreateFramebuffers.Laura Ekstrand2015-05-143-5/+41
| | | | | | | [Fredrik: Whitespace fixes] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* main: Add utility function _mesa_lookup_framebuffer_err.Laura Ekstrand2015-05-142-0/+25
| | | | | | | | [Fredrik: Generate an error for non-existent framebuffers] Reviewed-by: Fredrik Höglund <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
* mesa: use _mesa_has_compute_shaders instead of extension checkTapani Pälli2015-05-111-1/+3
| | | | | | | | | | | This was really the original purpose, for enabling the path for ES3.1 tests without the extension being set. Set also fallthrough comment for Coverity (caught by Matt). v2: .. and test the right way, not wrong one (Ilia Mirkin) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* main: glGetIntegeri_v fails for GL_VERTEX_BINDING_STRIDEMarta Lofstedt2015-05-111-0/+1
| | | | | | | | | | The return type for GL_VERTEX_BINDING_STRIDE is missing, this cause glGetIntegeri_v to fail. Signed-off-by: Marta Lofstedt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Cc: "10.4 10.5" <[email protected]>
* mesa: Implement GetVertexArrayIndexed[64]ivFredrik Höglund2015-05-083-0/+129
| | | | | | v2: Fix the name of the entry point in the error messages. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add support for querying GL_VERTEX_ATTRIB_ARRAY_LONGFredrik Höglund2015-05-081-0/+5
| | | | | | This parameter was added in OpenGL 4.3 and GL_ARB_direct_state_access. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to get_vertex_array_attribFredrik Höglund2015-05-081-9/+16
| | | | | | | | | This is needed to implement glGetVertexArrayIndexediv and glGetVertexArrayIndexed64iv. v2: Make the vao parameter const. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement GetVertexArrayivFredrik Höglund2015-05-083-0/+37
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayBindingDivisorFredrik Höglund2015-05-083-16/+52
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to vertex_binding_divisorFredrik Höglund2015-05-081-4/+6
| | | | | | This is needed to implement VertexArrayBindingDivisor. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayAttribBindingFredrik Höglund2015-05-083-22/+60
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to vertex_attrib_bindingFredrik Höglund2015-05-081-6/+9
| | | | | | This is needed to implement VertexArrayAttribBinding. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayAttrib[I|L]FormatFredrik Höglund2015-05-083-0/+97
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to update_array_formatFredrik Höglund2015-05-081-7/+10
| | | | | | This is needed to implement VertexArrayAttrib*Format. Reviewed-by: Laura Ekstrand <[email protected]>