summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* mesa: Refactor VertexAttrib[I|L]FormatFredrik Höglund2015-05-081-100/+49
| | | | | | | | The only difference between these functions is the legal types and sizes, so consolidate the code into a single vertex_attrib_format() function and call it from all three entry points. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayVertexBuffersFredrik Höglund2015-05-083-27/+69
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayVertexBufferFredrik Höglund2015-05-083-25/+63
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add a vao parameter to bind_vertex_bufferFredrik Höglund2015-05-081-8/+10
| | | | | | | This is needed to implement VertexArrayVertexBuffer and VertexArrayVertexBuffers. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement VertexArrayElementBufferFredrik Höglund2015-05-083-0/+44
| | | | | | v2: Add a doxygen comment. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement EnableVertexArrayAttribFredrik Höglund2015-05-083-9/+42
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement DisableVertexArrayAttribFredrik Höglund2015-05-083-9/+41
| | | | Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Keep track of the last looked-up VAOFredrik Höglund2015-05-082-13/+27
| | | | | | | | | | | | | | | This saves the cost of repeated hash table lookups when the same vertex array object is referenced in a sequence of calls such as: glVertexArrayAttribFormat(vao, ...); glVertexArrayAttribBinding(vao, ...); glEnableVertexArrayAttrib(vao, ...); ... Note that VAO's are container objects that are not shared between contexts. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Add _mesa_lookup_vao_errFredrik Höglund2015-05-082-0/+50
| | | | | | | This is a convenience function that generates GL_INVALID_OPERATION when the array object doesn't exist. Reviewed-by: Laura Ekstrand <[email protected]>
* mesa: Implement CreateVertexArraysFredrik Höglund2015-05-083-8/+31
| | | | | | v2: Update the documentation for gen_vertex_arrays(). Reviewed-by: Laura Ekstrand <[email protected]>
* mesa/vbo: add support for 64-bit vertex attributes. (v1)Dave Airlie2015-05-088-20/+178
| | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: track which program inputs are doublesDave Airlie2015-05-081-0/+1
| | | | | | | | instead of doing the attempts at dual slot handling here, let the backend do it. Reviewed-by: Ilia Mirkin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add ARB_vertex_attrib_64bit to extensions. (v2)Dave Airlie2015-05-083-1/+3
| | | | | | | | | | Just add the boilerplate bits. v2: add to version.c Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mapi: add GL_ARB_vertex_attrib_64bit supportDave Airlie2015-05-085-12/+77
| | | | | | | | This just adds the glapi bits. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* main/queryobj: add GL_QUERY_TARGET support to GetQueryObjectiv()Martin Peres2015-05-061-0/+12
| | | | | | | | This was missing from my patchset to support the query-related entry points of Direct State Access. Reported-by: Ilia Mirkin <[email protected]> Signed-off-by: Martin Peres <[email protected]>
* mesa: support compute stage in _mesa_program_resource_propTapani Pälli2015-05-061-6/+16
| | | | | | | | | | Increases pass rate of ES31-CTS.*program_interface_query* tests when run with MESA_EXTENSION_OVERRIDE='GL_ARB_compute_shader'. Many of the negative tests that happen to use compute stage in queries start passing. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Martin Peres <[email protected]>
* mesa: fix shininess check for ffvertex_prog v2Tim Rowley2015-05-051-1/+1
| | | | | | | | Switch to using VERT_BIT_GENERIC macro, as varying_vp_inputs is a bitmask. Reviewed-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* mesa/es3.1: Add _mesa_is_gles31 helperIan Romanick2015-05-041-1/+11
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: Use bool in _mesa_is_ helpers instead of GLbooleanIan Romanick2015-05-041-4/+4
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: Trivial coding standards cleanupsIan Romanick2015-05-041-15/+10
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: Use bool instead of GLbooleanIan Romanick2015-05-041-158/+157
| | | | | | | | | | v2: Squash in whitespace fixes. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* mesa: Restore functionality to dispatch sanity testIan Romanick2015-05-041-6/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Along with a couple secondary goals, the dispatch sanity test had two major, primary goals. 1. Ensure that all functions part of an API version are set in the dispatch table. 2. Ensure that functions that cannot be part of an API version are not set in the dispatch table. Commit 4bdbb58 removed the tests ability to fulfill either of its primary goals by removing anything that used _mesa_generic_nop(). It seems like the problem on Windows could have been resolved by adding the NULL context pointer check from nop_handler to _mesa_generic_nop(). There is, however, some debugging benefit to actually getting the (supposed) function name logged in the "unsupported function called" message. The preceding commit added a function, _glapi_new_nop_table, that allocates a table of per-entry point no-op functions. Restore the ability to actually validate the sanity of the dispatch table by using _glapi_new_nop_table. Previous to this commit removing a function from one of the *_functions_possible lists would not cause the test to fail. With this commit removing such a function will result in failure, as is expected. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl: Keep track of the early_fragment_tests flag in gl_shader.Francisco Jerez2015-05-041-0/+6
| | | | | | | | And rename _mesa_glsl_parse_state::early_fragment_tests to fs_early_fragment_tests for consistency with other FS-specific flags in the same struct. Reviewed-by: Matt Turner <[email protected]>
* mesa: Update image unit state when glBindImageTexture is called with texture=0.Francisco Jerez2015-05-041-16/+15
| | | | | | | | | | There's no indication in the spec that the image unit state other than the bound texture object shouldn't be updated when glBindImageTexture() is called passing the zero texture as argument. It's very unlikely that any application would ever have relied on this, but it's easy to get right, and it fixes the "state" ARB_shader_image_load_store piglit test. Reviewed-by: Matt Turner <[email protected]>
* mesa: Initialize image units to default state on context creation.Francisco Jerez2015-05-043-0/+21
| | | | | | | This is the required initial image unit state according to "Table 23.45. Image State (state per image unit)" of the OpenGL 4.3 specification. Reviewed-by: Matt Turner <[email protected]>
* mesa: Implement image uniform queries.Francisco Jerez2015-05-041-1/+3
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: Validate original image internal format rather than derived mesa format.Francisco Jerez2015-05-041-3/+3
| | | | | | | | | | | This matches what _mesa_BindImageTextures() does. The derived image format (gl_texture_image::TexFormat) isn't necessarily equivalent to the internal format of the texture image. If a forbidden internal format has been specified we need to mark the image unit as invalid as required by the spec, regardless of the derived format. Fixes the "invalid" ARB_shader_image_load_store piglit test. Reviewed-by: Matt Turner <[email protected]>
* mesa: Call _mesa_test_texobj_completeness() before using _MaxLevel in image ↵Francisco Jerez2015-05-041-3/+4
| | | | | | | | | | validation. gl_texture_object::_MaxLevel doesn't have any meaningful value until _mesa_test_texobj_completeness() has been run. Fixes the "level" ARB_shader_image_load_store piglit test. Reviewed-by: Matt Turner <[email protected]>
* mesa: Add support for binding a buffer texture to a shader image unit.Francisco Jerez2015-05-041-31/+42
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: Add extern "C" guards to shaderimage.h to allow inclusion from C++ code.Francisco Jerez2015-05-041-0/+8
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: Export shader image format to mesa format conversion function.Francisco Jerez2015-05-042-5/+12
| | | | | | | This function will be useful for back-ends to translate an image internal format as specified in GLSL code into a mesa format. Reviewed-by: Matt Turner <[email protected]>
* main/cs: Implement front end code for glDispatchCompute().Paul Berry2015-05-021-1/+19
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/cs: Add DispatchCompute() to driver function table.Paul Berry2015-05-021-0/+7
| | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/cs: Add compute support to update_program().Paul Berry2015-05-021-0/+21
| | | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add GL_OES_EGL_syncMarek Olšák2015-04-301-0/+1
| | | | | This is an empty extension whose presence means that EGL sync objects can be used with ES contexts.
* util/macros: Move DIV_ROUND_UP to util/macros.hAxel Davy2015-04-291-4/+1
| | | | | | | Move DIV_ROUND_UP to a shared location accessible everywhere Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* mesa: Fix glGetProgramiv(GL_ACTIVE_ATTRIBUTES).Jose Fonseca2015-04-291-2/+4
| | | | | | | | | | | | It's returning random values, because RESOURCE_VAR() is casting different objects into ir_variable pointers. This updates _mesa_count_active_attribs to filter the resources with the same logic used in _mesa_longest_attribute_name_length. https://bugs.freedesktop.org/show_bug.cgi?id=90207 Reviewed-by: Tapani Pälli <[email protected]>
* mesa: remove unneeded #include colortab.hBrian Paul2015-04-281-1/+0
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* mesa: remove unused options var in compile_shader()Brian Paul2015-04-281-3/+0
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* mesa: fix up GLSL version when computing GL versionIlia Mirkin2015-04-271-0/+17
| | | | | | | | | | | In some situations it is convenient for a driver to expose a higher GLSL version while some extensions are still incomplete. However in that situation, it would report a GLSL version that was higher than the GL version. Avoid that situation by limiting the GLSL version to the GL version. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: the function name appears to have a gl prefix alreadyIlia Mirkin2015-04-271-2/+2
| | | | | | | | | | | | Currently we're producing errors like User error: GL_INVALID_OPERATION in glglDeleteProgramsARB(invalid call) And noop_warn appears to be called with the full function name. Don't prepend a gl prefix. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Fix a few typosZoë Blade2015-04-273-3/+3
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* mesa: add support for exposing up to GL4.2Ilia Mirkin2015-04-241-1/+45
| | | | | | | | | Add the 4.0/4.1/4.2 extensions lists to compute_version. A couple of extensions aren't in mesa yet, so those are marked with 0 until they become supported. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: put more info in glTexImage GL_OUT_OF_MEMORY error messageBrian Paul2015-04-241-1/+3
| | | | | | | Give the user some idea about the size of the texture which caused the GL_OUT_OF_MEMORY error. Reviewed-by: Matt Turner <[email protected]>
* mesa: fix glGetActiveUniformsiv regressionTapani Pälli2015-04-241-4/+16
| | | | | | | | | | | Commit 7519ddb caused regression to glGetActiveUniformsiv. Patch adds back validation loop of all given uniforms before writing any values, not touching params in case of errors is tested by the conformance suite. Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90149 Reviewed-by: Martin Peres <[email protected]>